1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Merge pull request #102 from rohit-n/whyboost

Makes sense now, thanks!
This commit is contained in:
DjWarmonger 2015-05-07 06:25:43 +02:00
commit b67bc622af
3 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ void CCallback::recruitCreatures(const CGDwelling *obj, const CArmedInstance * d
bool CCallback::dismissCreature(const CArmedInstance *obj, SlotID stackPos)
{
if(((player>=0) && obj->tempOwner != player) || (obj->stacksCount()<2 && obj->needsLastStack()))
if((player && obj->tempOwner != player) || (obj->stacksCount()<2 && obj->needsLastStack()))
return false;
DisbandCreature pack(stackPos,obj->id);

View File

@ -671,7 +671,7 @@ boost::optional<std::vector<CArtifact*>&> CArtHandler::listFromClass( CArtifact:
case CArtifact::ART_RELIC:
return relics;
default: //special artifacts should not be erased
return nullptr;
return boost::optional<std::vector<CArtifact*>&>();
}
}

View File

@ -403,7 +403,7 @@ std::vector <const CGObjectInstance * > CGameInfoCallback::getVisitableObjs(int3
for(const CGObjectInstance * obj : t->visitableObjects)
{
if(player < nullptr || obj->ID != Obj::EVENT) //hide events from players
if(player || obj->ID != Obj::EVENT) //hide events from players
ret.push_back(obj);
}