Hi, I have a problem with summon the creature walk inside pz but not summon inside pz
if i change
to RET_NOERROR;
it will summon inside pz but also all monsters can enter in pz zone
somebody has the clue for that? Thank you in advance
Code:
if(const Monster* monster = creature->getMonster())
{
if(monster->getMaster())
return RET_NOERROR;
if(hasFlag(TILESTATE_PROTECTIONZONE))
return RET_NOTPOSSIBLE;
if(floorChange() || positionChange())
return RET_NOTPOSSIBLE;
if(monster->canPushCreatures() && !monster->isSummon())
{
if(creatures)
{
Creature* tmp = NULL;
for(uint32_t i = 0; i < creatures->size(); ++i)
{
tmp = creatures->at(i);
if(creature->canWalkthrough(tmp))
continue;
if(!tmp->getMonster() || !tmp->isPushable() ||
(tmp->getMonster()->isSummon() &&
tmp->getMonster()->isPlayerSummon()))
return RET_NOTPOSSIBLE;
}
}
}
if i change
Code:
if(hasFlag(TILESTATE_PROTECTIONZONE))
return RET_NOTPOSSIBLE;
it will summon inside pz but also all monsters can enter in pz zone
somebody has the clue for that? Thank you in advance