1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Stacks #5: giving creatures, practically finished (many fixes needed).

This commit is contained in:
Michał W. Urbańczyk
2010-12-12 23:44:16 +00:00
parent fc6d6e02a3
commit 02e4ef507e
10 changed files with 96 additions and 106 deletions

View File

@ -3589,7 +3589,7 @@ void CBattleHex::mouseMoved(const SDL_MouseMotionEvent &sEvent)
if(hovered && strictHovered) //print attacked creature to console
{
if(myInterface->console->alterTxt.size() == 0 && myInterface->curInt->cb->battleGetStackByID(myNumber) != NULL &&
if(myInterface->console->alterTxt.size() == 0 && myInterface->curInt->cb->battleGetStackByPos(myNumber) != NULL &&
myInterface->curInt->cb->battleGetStackByPos(myNumber)->owner != myInterface->curInt->playerID &&
myInterface->curInt->cb->battleGetStackByPos(myNumber)->alive())
{

View File

@ -110,7 +110,7 @@ public:
void showGarrisonDialog(int upobj, int hid, bool removableUnits, const boost::function<void()> &cb){};
void showThievesGuildWindow(int requestingObjId){};
void giveResource(int player, int which, int val){};
void giveCreatures (int objid, const CGHeroInstance * h, const CCreatureSet &creatures, bool remove) {};
void giveCreatures (const CArmedInstance * objid, const CGHeroInstance * h, const CCreatureSet &creatures, bool remove) {};
void takeCreatures (int objid, TSlots creatures){};
void takeCreatures (int objid, std::vector<CStackBasicDescriptor> creatures){};
bool changeStackType(const StackLocation &sl, CCreature *c){return false;};
@ -119,7 +119,7 @@ public:
bool eraseStack(const StackLocation &sl, bool forceRemoval = false){return false;};
bool swapStacks(const StackLocation &sl1, const StackLocation &sl2){return false;}
bool addToSlot(const StackLocation &sl, const CCreature *c, TQuantity count){return false;}
void tryJoiningArmy(const CArmedInstance *src, const CArmedInstance *dst, bool removeObjWhenFinished){}
void tryJoiningArmy(const CArmedInstance *src, const CArmedInstance *dst, bool removeObjWhenFinished, bool allowMerging){}
bool moveStack(const StackLocation &src, const StackLocation &dst, TQuantity count = -1){return false;}
void showCompInfo(ShowInInfobox * comp){};
void heroVisitCastle(int obj, int heroID){};