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:
commit
2cbe7d7624
@ -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);
|
||||
|
@ -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*>&>();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user