Пример #1
0
Monster::~Monster()
{
	clearTargetList();
	clearFriendList();
#ifdef __ENABLE_SERVER_DIAGNOSTIC__
	monsterCount--;
#endif
}
void Monster::die()
{
	setAttackedCreature(NULL);
	destroySummons();
	clearTargetList();
	clearFriendList();
	Creature::die();
}
Пример #3
0
void Actor::die()
{
  setAttackedCreature(NULL);
  destroySummons();

  clearTargetList();
  clearFriendList();
  onIdleStatus();
  Creature::die();
}
Пример #4
0
Monster::~Monster()
{
	clearTargetList();
	clearFriendList();
#ifdef __ENABLE_SERVER_DIAGNOSTIC__

	monsterCount--;
#endif
	if(raid)
	{
		raid->unRef();
		raid = NULL;
	}
}
Пример #5
0
void Monster::death(Creature*)
{
	setAttackedCreature(nullptr);

	for (Creature* summon : summons) {
		summon->changeHealth(-summon->getHealth());
		summon->removeMaster();
	}
	summons.clear();

	clearTargetList();
	clearFriendList();
	onIdleStatus();
}
Пример #6
0
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();
}
Пример #7
0
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);
}
Пример #8
0
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);
	}
}
Пример #9
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;
}
Пример #10
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);
  }
}
Пример #11
0
Monster::~Monster()
{
	clearTargetList();
	clearFriendList();
}