1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Merge branch 'develop' of https://github.com/vcmi/vcmi into develop

This commit is contained in:
DjWarmonger 2015-05-25 09:53:51 +02:00
commit 2cbe7d7624
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);
}