void Monster::getPathSearchParams(const Creature* creature, FindPathParams& fpp) const
{
Creature::getPathSearchParams(creature, fpp);
fpp.minTargetDist = 1;
fpp.maxTargetDist = mType->targetDistance;
if(isSummon())
{
if(getMaster() == creature)
{
[B][COLOR="red"]fpp.maxTargetDist = 2;[/COLOR][/B]
fpp.fullPathSearch = true;
}
else if(mType->targetDistance <= 1)
fpp.fullPathSearch = true;
else
fpp.fullPathSearch = !canUseAttack(getPosition(), creature);
}
else if(isFleeing())
{
//Distance should be higher than the client view range (Map::maxClientViewportX/Map::maxClientViewportY)
fpp.maxTargetDist = Map::maxViewportX;
fpp.clearSight = fpp.fullPathSearch = false;
fpp.keepDistance = true;
}
else if(mType->targetDistance <= 1)
fpp.fullPathSearch = true;
else
fpp.fullPathSearch = !canUseAttack(getPosition(), creature);
}