aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGyx <2359980687@qq.com>2012-01-08 12:17:06 +0800
committerGyx <2359980687@qq.com>2012-01-08 12:17:06 +0800
commit636e2fb7525db490c35e53442c564d37d87b9369 (patch)
treedb07a2d37b907de3f7341b4ab22f28ae0122ea0a
parent79e7e86384e565d989654c547dac52ead20af6ff (diff)
P8: Fixed corpse loading crash.
Signed-off-by: Gyx <2359980687@qq.com>
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index e2cf7d981cd..8c14c0b04fc 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -6791,6 +6791,9 @@ uint32 ObjectMgr::GeneratePetNumber()
void ObjectMgr::LoadCorpses()
{
+ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ // SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, flags, dynFlags, time, corpseType, instanceId, phaseMask, corpseGuid, guid FROM corpse WHERE corpseType <> 0
+
uint32 oldMSTime = getMSTime();
PreparedQueryResult result = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_SEL_CORPSES));
@@ -6806,7 +6809,7 @@ void ObjectMgr::LoadCorpses()
{
Field* fields = result->Fetch();
uint32 guid = fields[16].GetUInt32();
- CorpseType type = CorpseType(fields[13].GetUInt8());
+ CorpseType type = CorpseType(fields[12].GetUInt8());
if (type >= MAX_CORPSE_TYPE)
{
sLog->outError("Corpse (guid: %u) have wrong corpse type (%u), not loading.", guid, type);