mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Banks will now handle creature stacks with size of zero (as in Crypt).
This commit is contained in:
2
int3.h
2
int3.h
@@ -31,6 +31,8 @@ public:
|
|||||||
bool setCreature (TSlot slot, TCreature type, TQuantity quantity) //slots 0 to 6
|
bool setCreature (TSlot slot, TCreature type, TQuantity quantity) //slots 0 to 6
|
||||||
{
|
{
|
||||||
slots[slot] = TStack(type, quantity); //brutal force
|
slots[slot] = TStack(type, quantity); //brutal force
|
||||||
|
if (quantity == 0)
|
||||||
|
slots.erase(slot);
|
||||||
if (slots.size() > 7) return false;
|
if (slots.size() > 7) return false;
|
||||||
else return true;
|
else return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user