Monster::~Monster() { clearTargetList(); clearFriendList(); #ifdef __ENABLE_SERVER_DIAGNOSTIC__ monsterCount--; #endif }
void Monster::die() { setAttackedCreature(NULL); destroySummons(); clearTargetList(); clearFriendList(); Creature::die(); }
void Actor::die() { setAttackedCreature(NULL); destroySummons(); clearTargetList(); clearFriendList(); onIdleStatus(); Creature::die(); }
Monster::~Monster() { clearTargetList(); clearFriendList(); #ifdef __ENABLE_SERVER_DIAGNOSTIC__ monsterCount--; #endif if(raid) { raid->unRef(); raid = NULL; } }
void Monster::death(Creature*) { setAttackedCreature(nullptr); for (Creature* summon : summons) { summon->changeHealth(-summon->getHealth()); summon->removeMaster(); } summons.clear(); clearTargetList(); clearFriendList(); onIdleStatus(); }
void Monster::death() { setAttackedCreature(NULL); for(std::list<Creature*>::iterator cit = summons.begin(); cit != summons.end(); ++cit) { (*cit)->changeHealth(-(*cit)->getHealth()); (*cit)->setMaster(NULL); (*cit)->releaseThing2(); } summons.clear(); clearTargetList(); clearFriendList(); onIdleStatus(); }
void Monster::setIdle(bool _idle) { if(isRemoved() || getHealth() <= 0) return; isIdle = _idle; if(isIdle) { onIdleStatus(); clearTargetList(); clearFriendList(); g_game.removeCreatureCheck(this); } else g_game.addCreatureCheck(this); }
void Monster::setIdle(bool idle) { if (isRemoved() || getHealth() <= 0) { return; } isIdle = idle; if (!isIdle) { g_game.addCreatureCheck(this); } else { onIdleStatus(); clearTargetList(); clearFriendList(); Game::removeCreatureCheck(this); } }
bool Monster::onDeath() { if(!Creature::onDeath()) return false; destroySummons(); clearTargetList(); clearFriendList(); setAttackedCreature(NULL); onIdleStatus(); if(raid) { raid->unRef(); raid = NULL; } g_game.removeCreature(this, false); return true; }
void Actor::setIdle(bool _idle) { if(getHealth() <= 0 || isRemoved()){ return; } isIdle = _idle; // don't go any further if we are set // with always think if(alwaysThink()) return; if(!isIdle){ g_game.addCreatureCheck(this); } else{ onIdleStatus(); clearTargetList(); clearFriendList(); g_game.removeCreatureCheck(this); } }
Monster::~Monster() { clearTargetList(); clearFriendList(); }