mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8550] call Unit::Update() also for spiritguides
cause they are dead i had to add another hack :-/
This commit is contained in:
parent
db7c9f4fc1
commit
9143f19bef
3 changed files with 15 additions and 4 deletions
|
|
@ -331,6 +331,15 @@ void Creature::Update(uint32 diff)
|
|||
break;
|
||||
case DEAD:
|
||||
{
|
||||
if (isSpiritService())
|
||||
{
|
||||
Unit::Update( diff );
|
||||
// do not allow the AI to be changed during update
|
||||
m_AI_locked = true;
|
||||
i_AI->UpdateAI(diff);
|
||||
m_AI_locked = false;
|
||||
break; // they don't should respawn
|
||||
}
|
||||
if( m_respawnTime <= time(NULL) )
|
||||
{
|
||||
DEBUG_LOG("Respawning...");
|
||||
|
|
@ -1533,12 +1542,15 @@ void Creature::setDeathState(DeathState s)
|
|||
{
|
||||
SetHealth(GetMaxHealth());
|
||||
SetLootRecipient(NULL);
|
||||
Unit::setDeathState(ALIVE);
|
||||
CreatureInfo const *cinfo = GetCreatureInfo();
|
||||
SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
|
||||
RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||
AddMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||
SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag);
|
||||
if (!isSpiritService())
|
||||
Unit::setDeathState(ALIVE);
|
||||
else
|
||||
Unit::setDeathState(DEAD);
|
||||
clearUnitState(UNIT_STAT_ALL_STATE);
|
||||
i_motionMaster.Clear();
|
||||
SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool));
|
||||
|
|
|
|||
|
|
@ -44,8 +44,7 @@ inline void
|
|||
MaNGOS::ObjectUpdater::Visit(CreatureMapType &m)
|
||||
{
|
||||
for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
||||
if(!iter->getSource()->isSpiritService())
|
||||
iter->getSource()->Update(i_timeDiff);
|
||||
iter->getSource()->Update(i_timeDiff);
|
||||
}
|
||||
|
||||
inline void
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8549"
|
||||
#define REVISION_NR "8550"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue