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); } }
Creature::Creature() { onIdleStatus(); }