aboutsummaryrefslogtreecommitdiff
path: root/src/game/Corpse.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-08-03 12:52:31 +0200
committerQAston <none@none>2009-08-03 12:52:31 +0200
commit8777efd03cbad7036c371c88b0212e8425c5bf59 (patch)
treef7e806455220abbdb599d52c03d9455f8c233ec6 /src/game/Corpse.cpp
parent71adccb1c77d45d9663a84fcc7adfcc5ec89d19d (diff)
*Add some crash prevention checks.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Corpse.cpp')
-rw-r--r--src/game/Corpse.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/Corpse.cpp b/src/game/Corpse.cpp
index 31cfb700d4b..83d21bb3b14 100644
--- a/src/game/Corpse.cpp
+++ b/src/game/Corpse.cpp
@@ -182,7 +182,7 @@ bool Corpse::LoadFromDB(uint32 guid, QueryResult *result, uint32 InstanceId)
return true;
}*/
-bool Corpse::LoadFromDB(uint32 guid, Field *fields, uint32 & mapId, uint32 & instanceId)
+bool Corpse::LoadFromDB(uint32 guid, Field *fields)
{
// 0 1 2 3 4 5 6 7 8 9
//result = CharacterDatabase.PQuery("SELECT position_x,position_y,position_z,orientation,map,data,time,corpse_type,instance,phaseMask FROM corpse WHERE guid = '%u'",guid);
@@ -199,9 +199,8 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields, uint32 & mapId, uint32 & in
return false;
}
- mapId = fields[4].GetUInt32();
- SetMapId(mapId);
- instanceId = fields[8].GetUInt32();
+ SetMapId(fields[4].GetUInt32());
+ SetInstanceId(fields[8].GetUInt32());
m_time = time_t(fields[6].GetUInt64());
m_type = CorpseType(fields[7].GetUInt32());