aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorVlad <vlad852@gmail.com>2013-07-19 04:03:40 +0100
committerNay <dnpd.dd@gmail.com>2013-07-19 04:03:40 +0100
commit0b9a8ccef5c4ae8971f097f464e4fbb31a38f279 (patch)
treea36d7dff43ebab528c41295c33f5e875fe66a2e2 /src/server/game
parentebd9090d80df3494fe2b023110d402c5bb7a1460 (diff)
Core/Misc: Change creatures and gameobject phasemask from 16 to 32 bits
Signed-off-by: Nay <dnpd.dd@gmail.com>
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Entities/Corpse/Corpse.cpp4
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp2
-rw-r--r--src/server/game/Entities/Creature/Creature.h2
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp2
-rw-r--r--src/server/game/Entities/GameObject/GameObject.h2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp4
6 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp
index c38082bb542..ccceec7185b 100644
--- a/src/server/game/Entities/Corpse/Corpse.cpp
+++ b/src/server/game/Entities/Corpse/Corpse.cpp
@@ -122,7 +122,7 @@ void Corpse::SaveToDB()
stmt->setUInt32(index++, uint32(m_time)); // time
stmt->setUInt8 (index++, GetType()); // corpseType
stmt->setUInt32(index++, GetInstanceId()); // instanceId
- stmt->setUInt16(index++, GetPhaseMask()); // phaseMask
+ stmt->setUInt32(index++, GetPhaseMask()); // phaseMask
trans->Append(stmt);
CharacterDatabase.CommitTransaction(trans);
@@ -186,7 +186,7 @@ bool Corpse::LoadCorpseFromDB(uint32 guid, Field* fields)
m_time = time_t(fields[12].GetUInt32());
uint32 instanceId = fields[14].GetUInt32();
- uint32 phaseMask = fields[15].GetUInt16();
+ uint32 phaseMask = fields[15].GetUInt32();
// place
SetLocationInstanceId(instanceId);
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 3900f532d5c..b46ee4703db 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -999,7 +999,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
stmt->setUInt32(index++, GetEntry());
stmt->setUInt16(index++, uint16(mapid));
stmt->setUInt8(index++, spawnMask);
- stmt->setUInt16(index++, uint16(GetPhaseMask()));
+ stmt->setUInt32(index++, GetPhaseMask());
stmt->setUInt32(index++, displayId);
stmt->setInt32(index++, int32(GetCurrentEquipmentId()));
stmt->setFloat(index++, GetPositionX());
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 216e9246c0f..34084dd662b 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -249,7 +249,7 @@ struct CreatureData
CreatureData() : dbData(true) {}
uint32 id; // entry in creature_template
uint16 mapid;
- uint16 phaseMask;
+ uint32 phaseMask;
uint32 displayid;
int8 equipmentId;
float posX;
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index f6fd332e6a4..0915d19cdfa 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -712,7 +712,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask)
stmt->setUInt32(index++, GetEntry());
stmt->setUInt16(index++, uint16(mapid));
stmt->setUInt8(index++, spawnMask);
- stmt->setUInt16(index++, uint16(GetPhaseMask()));
+ stmt->setUInt32(index++, GetPhaseMask());
stmt->setFloat(index++, GetPositionX());
stmt->setFloat(index++, GetPositionY());
stmt->setFloat(index++, GetPositionZ());
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index cf916afd6dc..3bddac81ee9 100644
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -582,7 +582,7 @@ struct GameObjectData
explicit GameObjectData() : dbData(true) {}
uint32 id; // entry in gamobject_template
uint16 mapid;
- uint16 phaseMask;
+ uint32 phaseMask;
float posX;
float posY;
float posZ;
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 7bf87a72e8c..8a970963c37 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1561,7 +1561,7 @@ void ObjectMgr::LoadCreatures()
data.curmana = fields[13].GetUInt32();
data.movementType = fields[14].GetUInt8();
data.spawnMask = fields[15].GetUInt8();
- data.phaseMask = fields[16].GetUInt16();
+ data.phaseMask = fields[16].GetUInt32();
int16 gameEvent = fields[17].GetInt8();
uint32 PoolId = fields[18].GetUInt32();
data.npcflag = fields[19].GetUInt32();
@@ -1913,7 +1913,7 @@ void ObjectMgr::LoadGameobjects()
if (data.spawnMask & ~spawnMasks[data.mapid])
TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject` has gameobject (GUID: %u Entry: %u) that has wrong spawn mask %u including not supported difficulty modes for map (Id: %u), skip", guid, data.id, data.spawnMask, data.mapid);
- data.phaseMask = fields[15].GetUInt16();
+ data.phaseMask = fields[15].GetUInt32();
int16 gameEvent = fields[16].GetInt8();
uint32 PoolId = fields[17].GetUInt32();