aboutsummaryrefslogtreecommitdiff
path: root/src/game/Corpse.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-08-01 19:50:42 +0200
committerQAston <none@none>2009-08-01 19:50:42 +0200
commitd577d00313c673b51e79181ed8a5eb3146aded9e (patch)
tree294c7d8a7f3b0ce99ce4302fb09058e68a1b2ea5 /src/game/Corpse.cpp
parentc8c2a3b0da82e3500b92802d4db7fdfcd005b486 (diff)
*Store mapId in Corpse class for access to corpse when grid containing them is unloaded and map pointer is unloaded leading to crash.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Corpse.cpp')
-rw-r--r--src/game/Corpse.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/Corpse.cpp b/src/game/Corpse.cpp
index 3f6d724b6a8..31cfb700d4b 100644
--- a/src/game/Corpse.cpp
+++ b/src/game/Corpse.cpp
@@ -39,6 +39,8 @@ Corpse::Corpse(CorpseType type) : WorldObject()
m_type = type;
+ m_mapId = 0;
+
m_time = time(NULL);
lootForBody = false;
@@ -198,6 +200,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields, uint32 & mapId, uint32 & in
}
mapId = fields[4].GetUInt32();
+ SetMapId(mapId);
instanceId = fields[8].GetUInt32();
m_time = time_t(fields[6].GetUInt64());