diff options
author | megamage <none@none> | 2009-08-12 07:10:07 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-12 07:10:07 -0500 |
commit | 296771f7e7207ece5d88dce853f95a0c898d67f6 (patch) | |
tree | 59c34fb981e38ca836e08ed18051543ecf75c6c9 /src | |
parent | da9de7135d049d746d3f281cd9e9f2fa213f4326 (diff) |
*SetMap for corpse in Create function as other objects.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Corpse.cpp | 3 | ||||
-rw-r--r-- | src/game/Corpse.h | 2 | ||||
-rw-r--r-- | src/game/ObjectAccessor.cpp | 3 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Corpse.cpp b/src/game/Corpse.cpp index e15d535ca37..7fc8dc7fb50 100644 --- a/src/game/Corpse.cpp +++ b/src/game/Corpse.cpp @@ -70,8 +70,9 @@ void Corpse::RemoveFromWorld() Object::RemoveFromWorld(); } -bool Corpse::Create( uint32 guidlow ) +bool Corpse::Create( uint32 guidlow, Map *map ) { + SetMap(map); Object::_Create(guidlow, 0, HIGHGUID_CORPSE); return true; } diff --git a/src/game/Corpse.h b/src/game/Corpse.h index ee6556e3436..2a6ebc71809 100644 --- a/src/game/Corpse.h +++ b/src/game/Corpse.h @@ -57,7 +57,7 @@ class Corpse : public WorldObject void AddToWorld(); void RemoveFromWorld(); - bool Create( uint32 guidlow ); + bool Create( uint32 guidlow, Map *map ); bool Create( uint32 guidlow, Player *owner ); void SaveToDB(); diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp index 4ce90d57219..a1c7395ad07 100644 --- a/src/game/ObjectAccessor.cpp +++ b/src/game/ObjectAccessor.cpp @@ -344,8 +344,7 @@ ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia) { // Create bones, don't change Corpse bones = new Corpse; - bones->Create(corpse->GetGUIDLow()); - bones->SetMap(map); + bones->Create(corpse->GetGUIDLow(), map); for (int i = 3; i < CORPSE_END; ++i) // don't overwrite guid and object type bones->SetUInt32Value(i, corpse->GetUInt32Value(i)); |