mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 13:47:23 +01:00
*SetMap for corpse in Create function as other objects.
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user