1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

I managed to display battlefield in creature bank - before game crashed.

This commit is contained in:
DjWarmonger
2009-08-24 16:01:45 +00:00
parent 82ddb607e6
commit 20ef4c0fb9
2 changed files with 2 additions and 2 deletions

View File

@@ -3862,7 +3862,7 @@ void CBank::fightGuards (const CGHeroInstance * h, ui32 accept) const
{ {
case 1: case 1:
for (int i = 1; i <= 5; i++) for (int i = 1; i <= 5; i++)
ourArmy.setCreature (i, bc->guards[1].first + upgraded, bc->guards[1].second / 5 ); ourArmy.setCreature (i, bc->guards[0].first + upgraded, bc->guards[0].second / 5 );
break; break;
case 4: case 4:
{ {

2
int3.h
View File

@@ -22,7 +22,7 @@ public:
bool formation; //false - wide, true - tight bool formation; //false - wide, true - tight
bool setCreature (si32 slot, ui32 type, si32 quantity) //slots 1 to 7 bool setCreature (si32 slot, ui32 type, si32 quantity) //slots 1 to 7
{ {
slots.find(slot)->second = std::pair<ui32,si32>(type, quantity); //brutal force slots[slot] = std::pair<ui32, si32>(type, quantity); //brutal force
if (slots.size() > 7) return false; if (slots.size() > 7) return false;
else return true; else return true;
} }