diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 8a647bacfe..9dc60c3332 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -58,6 +58,7 @@ static WMOAreaInfoByTripple sWMOAreaInfoByTripple; DBCStorage sAchievementStore(Achievementfmt); DBCStorage sAchievementCriteriaStore(AchievementCriteriafmt); DBCStorage sAreaTriggerStore(AreaTriggerEntryfmt); +DBCStorage sPhaseStore(PhaseEntryfmt); DBCStorage sArmorLocationStore(ArmorLocationfmt); DBCStorage sAuctionHouseStore(AuctionHouseEntryfmt); DBCStorage sBankBagSlotPricesStore(BankBagSlotPricesEntryfmt); @@ -328,6 +329,7 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementStore, dbcPath, "Achievement.dbc"/*, &CustomAchievementfmt, &CustomAchievementIndex*/);//14545 LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementCriteriaStore, dbcPath, "Achievement_Criteria.dbc");//14545 LoadDBC(availableDbcLocales, bad_dbc_files, sAreaTriggerStore, dbcPath, "AreaTrigger.dbc");//14545 + LoadDBC(availableDbcLocales, bad_dbc_files, sPhaseStore, dbcPath, "Phase.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sAreaGroupStore, dbcPath, "AreaGroup.dbc");//14545 LoadDBC(availableDbcLocales, bad_dbc_files, sAreaPOIStore, dbcPath, "AreaPOI.dbc");//14545 LoadDBC(availableDbcLocales, bad_dbc_files, sAuctionHouseStore, dbcPath, "AuctionHouse.dbc");//14545 diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index c4e012c62c..80bed703c8 100755 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -81,6 +81,7 @@ extern DBCStorage sAreaStore;// recommend access extern DBCStorage sAreaGroupStore; extern DBCStorage sAreaPOIStore; extern DBCStorage sAreaTriggerStore; +extern DBCStorage sPhaseStore; extern DBCStorage sArmorLocationStore; extern DBCStorage sAuctionHouseStore; extern DBCStorage sBankBagSlotPricesStore; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 87e77ad491..31e1817d0a 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -609,6 +609,13 @@ struct AreaTriggerEntry float box_orientation; // 12 m_box_yaw }; +struct PhaseEntry +{ + uint32 Id; + char* Name; + uint32 Flag; +} + struct ArmorLocationEntry { uint32 InventoryType; // 0 diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index c1430c7bef..17d036e6e5 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -30,6 +30,7 @@ char const AreaTableEntryfmt[]="iiinixxxxxisiiiiifxxxxxxxx"; char const AreaGroupEntryfmt[]="niiiiiii"; char const AreaPOIEntryfmt[]="niiiiiiiiiiiffixixxixx"; char const AreaTriggerEntryfmt[]="nifffxxxfffff"; +char const PhaseEntryfmt[]="isi"; char const ArmorLocationfmt[]="nfffff"; char const AuctionHouseEntryfmt[]="niiix"; char const BankBagSlotPricesEntryfmt[]="ni"; diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index d1bf36b885..38e3a56985 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -1756,7 +1756,12 @@ void WorldSession::SendSetPhaseShift(std::set const& phaseIds, std::set< data.WriteByteSeq(guid[1]); - data << uint32(0); // flags (not phasemask) + uint32 flag = 8; + for (std::set::const_iterator itr = phaseIds.begin(); itr != phaseIds.end(); ++itr) + if (PhaseEntry const* phaseEntry = sPhaseStore.LookupEntry(*itr)) + flag |= phaseEntry->Flag; + + data << uint32(flag); // flags (not phasemask) data.WriteByteSeq(guid[2]); data.WriteByteSeq(guid[6]);