aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Corpse.cpp3
-rw-r--r--src/game/Corpse.h2
-rw-r--r--src/game/ObjectAccessor.cpp3
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));