aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-04-23 10:26:08 +0200
committerShauren <shauren.trinity@gmail.com>2011-04-23 10:26:08 +0200
commitca451a8cd1ea3e67a78d34db453ff8599e612c46 (patch)
tree12e660f69ef8a86072287ada68ad468f21d7dff4
parentf3178285399bdd81e5a022345aafcb05f77f3267 (diff)
Core/Corpses: Fixed loading and saving phase
-rw-r--r--sql/updates/auth_char/2011_04_23_00_characters_corpse.sql1
-rwxr-xr-xsrc/server/game/Entities/Corpse/Corpse.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/sql/updates/auth_char/2011_04_23_00_characters_corpse.sql b/sql/updates/auth_char/2011_04_23_00_characters_corpse.sql
new file mode 100644
index 00000000000..d9464f53f49
--- /dev/null
+++ b/sql/updates/auth_char/2011_04_23_00_characters_corpse.sql
@@ -0,0 +1 @@
+ALTER TABLE `corpse` CHANGE COLUMN `phaseMask` `phaseMask` smallint(5) unsigned NOT NULL DEFAULT '1';
diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp
index 1e643f88c1e..5fdf8709852 100755
--- a/src/server/game/Entities/Corpse/Corpse.cpp
+++ b/src/server/game/Entities/Corpse/Corpse.cpp
@@ -167,7 +167,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
uint32 ownerGuid = fields[17].GetUInt32();
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, guildId, flags, dynFlags, time, corpseType, instanceId, phaseMask, corpseGuid, guid FROM corpse WHERE corpseType <> 0
- m_type = CorpseType(fields[13].GetUInt32());
+ m_type = CorpseType(fields[13].GetUInt8());
if (m_type >= MAX_CORPSE_TYPE)
{
sLog->outError("Corpse (guid: %u, owner: %u) have wrong corpse type (%u), not loading.", guid, ownerGuid, m_type);
@@ -190,7 +190,7 @@ bool Corpse::LoadFromDB(uint32 guid, Field *fields)
SetUInt32Value(CORPSE_FIELD_BYTES_2, fields[8].GetUInt32());
SetUInt32Value(CORPSE_FIELD_GUILD, fields[9].GetUInt32());
SetUInt32Value(CORPSE_FIELD_FLAGS, fields[10].GetUInt8());
- SetUInt32Value(CORPSE_FIELD_DYNAMIC_FLAGS, fields[11].GetUInt32());
+ SetUInt32Value(CORPSE_FIELD_DYNAMIC_FLAGS, fields[11].GetUInt8());
SetUInt64Value(CORPSE_FIELD_OWNER, MAKE_NEW_GUID(ownerGuid, 0, HIGHGUID_PLAYER));
m_time = time_t(fields[12].GetUInt32());