diff options
| author | megamage <none@none> | 2009-04-13 12:11:36 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-04-13 12:11:36 -0500 |
| commit | 52571d6d48c14ebfffec68b4f47ad499b431fa45 (patch) | |
| tree | 70fd24f10922854b81ef50404c316cca9b46e1a4 /src/game/Pet.cpp | |
| parent | 064866bdfef2aa0449572669b99305774c06b738 (diff) | |
*Fix a 100% crash that pet is killed by DOT.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Pet.cpp')
| -rw-r--r-- | src/game/Pet.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 4d87a224f7e..86f0ec58db5 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -477,11 +477,7 @@ void Pet::setDeathState(DeathState s) // overwrite virtual Creature::setDeathState(s); if(getDeathState()==CORPSE) { - //remove summoned pet (no corpse) - if(getPetType()==SUMMON_PET) - Remove(PET_SAVE_NOT_IN_SLOT); - // other will despawn at corpse desppawning (Pet::Update code) - else + if(getPetType() == HUNTER_PET) { // pet corpse non lootable and non skinnable SetUInt32Value( UNIT_DYNAMIC_FLAGS, 0x00 ); @@ -511,9 +507,8 @@ void Pet::Update(uint32 diff) { case CORPSE: { - if( m_deathTimer <= diff ) + if(getPetType() != HUNTER_PET || m_deathTimer <= diff ) { - assert(getPetType()!=SUMMON_PET && "Must be already removed."); Remove(PET_SAVE_NOT_IN_SLOT); //hunters' pets never get removed because of death, NEVER! return; } |
