diff --git a/contrib/mysql_to_pgsql/src/defines.h b/contrib/mysql_to_pgsql/src/defines.h index db29f7914..1fe9c570f 100644 --- a/contrib/mysql_to_pgsql/src/defines.h +++ b/contrib/mysql_to_pgsql/src/defines.h @@ -181,3 +181,4 @@ void PG_Escape_Str(string& str) } #endif + diff --git a/src/game/Corpse.cpp b/src/game/Corpse.cpp index 864f08f85..0ef3f8e9a 100644 --- a/src/game/Corpse.cpp +++ b/src/game/Corpse.cpp @@ -118,7 +118,7 @@ void Corpse::SaveToDB() << uint64(m_time) << ", " << uint32(GetType()) << ", " << int(GetInstanceId()) << ", " - << uint16(GetPhaseMask()) << ")"; // prevent out of range error + << uint32(GetPhaseMask()) << ")"; // prevent out of range error CharacterDatabase.Execute(ss.str().c_str()); CharacterDatabase.CommitTransaction(); } diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index ba71b6db9..275f3359b 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1139,7 +1139,7 @@ void Creature::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) << data.id << "," << data.mapid << "," << uint32(data.spawnMask) << "," // cast to prevent save as symbol - << uint16(data.phaseMask) << "," // prevent out of range error + << uint32(data.phaseMask) << "," // prevent out of range error << data.modelid_override << "," << data.equipmentId << "," << data.posX << "," diff --git a/src/game/Creature.h b/src/game/Creature.h index 5f0b7982a..8791e417b 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -193,7 +193,7 @@ struct CreatureData { uint32 id; // entry in creature_template uint16 mapid; - uint16 phaseMask; + uint32 phaseMask; uint32 modelid_override; // overrides any model defined in creature_template int32 equipmentId; float posX; diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index c73b3746b..aeea94639 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -567,7 +567,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) << GetEntry() << ", " << mapid << ", " << uint32(spawnMask) << "," // cast to prevent save as symbol - << uint16(GetPhaseMask()) << "," // prevent out of range error + << uint32(GetPhaseMask()) << "," // prevent out of range error << GetPositionX() << ", " << GetPositionY() << ", " << GetPositionZ() << ", " diff --git a/src/game/GameObject.h b/src/game/GameObject.h index f1c7dc836..0092f568e 100644 --- a/src/game/GameObject.h +++ b/src/game/GameObject.h @@ -585,7 +585,7 @@ struct GameObjectData { uint32 id; // entry in gamobject_template uint16 mapid; - uint16 phaseMask; + uint32 phaseMask; float posX; float posY; float posZ; diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 0a2246d58..50802b223 100755 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1262,7 +1262,7 @@ void ObjectMgr::LoadCreatures() data.is_dead = fields[14].GetBool(); data.movementType = fields[15].GetUInt8(); data.spawnMask = fields[16].GetUInt8(); - data.phaseMask = fields[17].GetUInt16(); + data.phaseMask = fields[17].GetUInt32(); int16 gameEvent = fields[18].GetInt16(); int16 GuidPoolId = fields[19].GetInt16(); int16 EntryPoolId = fields[20].GetInt16(); @@ -1492,7 +1492,7 @@ void ObjectMgr::LoadGameObjects() data.animprogress = fields[12].GetUInt32(); uint32 go_state = fields[13].GetUInt32(); data.spawnMask = fields[14].GetUInt8(); - data.phaseMask = fields[15].GetUInt16(); + data.phaseMask = fields[15].GetUInt32(); int16 gameEvent = fields[16].GetInt16(); int16 GuidPoolId = fields[17].GetInt16(); int16 EntryPoolId = fields[18].GetInt16(); diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 17bc724b2..94adf6106 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -597,25 +597,21 @@ void WorldSession::SendSetPhaseShift(uint32 phaseMask, uint16 mapId) data.WriteGuidMask<2, 3, 1, 6, 4, 5, 0, 7>(guid); data.WriteGuidBytes<7, 4>(guid); - // Seen only 0 bytes - data << uint32(0); + data << uint32(0); // number of WorldMapArea.dbc entries to control world map shift * 2 data.WriteGuidBytes<1>(guid); data << uint32(phaseMask ? phaseFlags : 8); data.WriteGuidBytes<2, 6>(guid); - // Seen only 0 bytes - data << uint32(0); + data << uint32(0); // number of inactive terrain swaps * 2 - // PhaseShift, uint16 (2 bytes) - data << uint32(phaseMask ? 2 : 0); + data << uint32(phaseMask ? 2 : 0); // WRONG: number of Phase.dbc ids * 2 if (phaseMask) data << uint16(phaseMask); data.WriteGuidBytes<3, 0>(guid); - // MapId , uint16 (2 bytes) - data << uint32(mapId ? 2 : 0); + data << uint32(mapId ? 2 : 0); // number of terrains swaps * 2 if (mapId) data << uint16(mapId); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 600e6d085..b007376e0 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12630" + #define REVISION_NR "12631" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 6612e4e25..7ef9c339a 100644 --- a/src/shared/revision_sql.h +++ b/src/shared/revision_sql.h @@ -1,6 +1,6 @@ #ifndef __REVISION_SQL_H__ #define __REVISION_SQL_H__ - #define REVISION_DB_CHARACTERS "required_12447_02_characters_calendar_invites" - #define REVISION_DB_MANGOS "required_12602_01_mangos_npc_spellclick_spells" + #define REVISION_DB_CHARACTERS "required_c12631_01_characters_corpse" + #define REVISION_DB_MANGOS "required_c12631_02_mangos_gameobject" #define REVISION_DB_REALMD "required_c12484_02_realmd_account_access" #endif // __REVISION_SQL_H__