Exemple #1
0
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;
}
Exemple #2
0
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);
  }
}
Exemple #3
0
Creature::Creature()
{
	onIdleStatus();
}