diff options
| author | megamage <none@none> | 2009-08-26 21:17:47 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-08-26 21:17:47 -0500 |
| commit | a6e7a836449456ea06506420f1c943bc10214a16 (patch) | |
| tree | f8b0eaa28ce0c7a4bc0cff4ee73a07371768eea9 /src | |
| parent | ef093eb9f08e0d9f3f030d5fe20a67ca9a2dd651 (diff) | |
*Fix a crash caused by recall pet. Thanks to nanouniko
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/SpellEffects.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 4f1195d001c..b23efd27312 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4131,14 +4131,17 @@ void Spell::EffectSummonPet(uint32 i) if( OldSummon->isDead() ) return; - OldSummon->GetMap()->Remove((Creature*)OldSummon,false); + assert(OldSummon->GetMap() == owner->GetMap()); + + //OldSummon->GetMap()->Remove((Creature*)OldSummon,false); float px, py, pz; owner->GetClosePoint(px, py, pz, OldSummon->GetObjectSize()); - OldSummon->Relocate(px, py, pz, OldSummon->GetOrientation()); - OldSummon->SetMap(owner->GetMap()); - owner->GetMap()->Add((Creature*)OldSummon); + OldSummon->NearTeleportTo(px, py, pz, OldSummon->GetOrientation()); + //OldSummon->Relocate(px, py, pz, OldSummon->GetOrientation()); + //OldSummon->SetMap(owner->GetMap()); + //owner->GetMap()->Add((Creature*)OldSummon); if(owner->GetTypeId() == TYPEID_PLAYER && OldSummon->isControlled() ) { |
