diff --git a/src/game/Battlefield/Battlefield.cpp b/src/game/Battlefield/Battlefield.cpp index b0f59215813..6e936de79f7 100644 --- a/src/game/Battlefield/Battlefield.cpp +++ b/src/game/Battlefield/Battlefield.cpp @@ -26,6 +26,7 @@ #include "Maps/MapManager.h" #include "Spells/SpellAuras.h" #include "Entities/Unit.h" +#include "Chat/Chat.h" Battlefield::Battlefield() : OutdoorPvP(), m_battleFieldId(0) { @@ -55,7 +56,7 @@ void Battlefield::HandlePlayerEnterZone(Player* player, bool isMainZone) { if (GetBattlefieldStatus() == BF_STATUS_IN_PROGRESS) { - m_invitedPlayers[GetTeamIndexByTeamId(player->GetTeam())][player->GetObjectGuid()] = time(NULL) + BF_TIME_TO_ACCEPT; + m_invitedPlayers[GetTeamIndexByTeamId(player->GetTeam())][player->GetObjectGuid()] = time(nullptr) + BF_TIME_TO_ACCEPT; player->GetSession()->SendBattlefieldWarInvite(m_battleFieldId, m_zoneId, BF_TIME_TO_ACCEPT); } else if (GetBattlefieldStatus() == BF_STATUS_COOLDOWN && m_timer < m_startInviteDelay) @@ -92,7 +93,7 @@ void Battlefield::HandlePlayerLeaveZone(Player* player, bool isMainZone) if (HasPlayer(itr->first)) { player->GetSession()->SendBattlefieldLeaveMessage(m_battleFieldId, BATTLEFIELD_LEAVE_REASON_EXITED); - itr->second->removeTime = time(NULL); + itr->second->removeTime = time(nullptr); itr->second->removeDelay = BF_UNACCEPTED_REMOVE_DELAY; } else @@ -184,7 +185,7 @@ void Battlefield::UpdateBattlefieldPlayers() bool bRemoved = false; for (BattlefieldPlayerMap::iterator itr = m_activePlayers.begin(); itr != m_activePlayers.end();) { - if (itr->second->removeTime && itr->second->removeTime + itr->second->removeDelay < time(NULL)) + if (itr->second->removeTime && itr->second->removeTime + itr->second->removeDelay < time(nullptr)) { delete itr->second; if (Player* player = sObjectMgr.GetPlayer(itr->first)) @@ -215,7 +216,7 @@ Function that starts battlefield battle */ void Battlefield::StartBattle(Team defender) { - m_startTime = time(NULL); + m_startTime = time(nullptr); m_status = BF_STATUS_IN_PROGRESS; m_timer = m_battleDuration; m_zoneOwner = defender; @@ -253,7 +254,7 @@ void Battlefield::StartBattle(Team defender) if (itr2 != m_queuedPlayers[idx].end()) { - m_invitedPlayers[idx][itr->first] = time(NULL) + BF_TIME_TO_ACCEPT; + m_invitedPlayers[idx][itr->first] = time(nullptr) + BF_TIME_TO_ACCEPT; plr->GetSession()->SendBattlefieldWarInvite(m_battleFieldId, m_zoneId, BF_TIME_TO_ACCEPT); m_queuedPlayers[idx].erase(itr2); } @@ -263,7 +264,7 @@ void Battlefield::StartBattle(Team defender) SendRemoveWorldStates(plr); if (m_activePlayers.find(itr->first) != m_activePlayers.end()) { - m_activePlayers[itr->first]->removeTime = time(NULL); + m_activePlayers[itr->first]->removeTime = time(nullptr); m_activePlayers[itr->first]->removeDelay = BF_UNACCEPTED_REMOVE_DELAY; } } @@ -276,7 +277,7 @@ void Battlefield::StartBattle(Team defender) { if (Player* plr = sObjectMgr.GetPlayer(*itr, true)) { - m_invitedPlayers[i][plr->GetObjectGuid()] = time(NULL) + BF_TIME_TO_ACCEPT; + m_invitedPlayers[i][plr->GetObjectGuid()] = time(nullptr) + BF_TIME_TO_ACCEPT; plr->GetSession()->SendBattlefieldWarInvite(m_battleFieldId, m_zoneId, BF_TIME_TO_ACCEPT); } @@ -347,7 +348,7 @@ void Battlefield::Update(uint32 diff) { for (std::map::iterator itr = m_invitedPlayers[i].begin(); itr != m_invitedPlayers[i].end();) { - if (itr->second < time(NULL)) + if (itr->second < time(nullptr)) { if (Player* player = sObjectMgr.GetPlayer(itr->first)) player->GetSession()->SendBattlefieldLeaveMessage(m_battleFieldId, BATTLEFIELD_LEAVE_REASON_EXITED); @@ -594,7 +595,7 @@ void Battlefield::HandleBattlefieldGroupDisband(Player* player) if (m_activePlayers.find(player->GetObjectGuid()) != m_activePlayers.end()) { - m_activePlayers[player->GetObjectGuid()]->removeTime = time(NULL); + m_activePlayers[player->GetObjectGuid()]->removeTime = time(nullptr); m_activePlayers[player->GetObjectGuid()]->removeDelay = BF_UNACCEPTED_REMOVE_DELAY; } } @@ -656,7 +657,7 @@ void Battlefield::HandleQueueInviteResponse(Player* player, bool accepted) { if (GetBattlefieldStatus() == BF_STATUS_IN_PROGRESS) { - m_invitedPlayers[teamIdx][player->GetObjectGuid()] = time(NULL) + BF_TIME_TO_ACCEPT; + m_invitedPlayers[teamIdx][player->GetObjectGuid()] = time(nullptr) + BF_TIME_TO_ACCEPT; player->GetSession()->SendBattlefieldWarInvite(m_battleFieldId, m_zoneId, BF_TIME_TO_ACCEPT); } else @@ -715,7 +716,7 @@ void Battlefield::HandleWarInviteResponse(Player* player, bool accepted) player->GetSession()->SendBattlefieldLeaveMessage(m_battleFieldId, BATTLEFIELD_LEAVE_REASON_EXITED); if (m_activePlayers.find(player->GetObjectGuid()) != m_activePlayers.end()) { - m_activePlayers[player->GetObjectGuid()]->removeTime = time(NULL); + m_activePlayers[player->GetObjectGuid()]->removeTime = time(nullptr); m_activePlayers[player->GetObjectGuid()]->removeDelay = BF_UNACCEPTED_REMOVE_DELAY; } } @@ -738,7 +739,7 @@ void Battlefield::HandleExitRequest(Player* player) if (m_activePlayers.find(player->GetObjectGuid()) != m_activePlayers.end()) { - m_activePlayers[player->GetObjectGuid()]->removeTime = time(NULL); + m_activePlayers[player->GetObjectGuid()]->removeTime = time(nullptr); m_activePlayers[player->GetObjectGuid()]->removeDelay = BF_UNACCEPTED_REMOVE_DELAY; } } @@ -754,7 +755,7 @@ void Battlefield::HandleExitRequest(Player* player) if (m_activePlayers.find(player->GetObjectGuid()) != m_activePlayers.end()) { - m_activePlayers[player->GetObjectGuid()]->removeTime = time(NULL); + m_activePlayers[player->GetObjectGuid()]->removeTime = time(nullptr); m_activePlayers[player->GetObjectGuid()]->removeDelay = BF_UNACCEPTED_REMOVE_DELAY; } } @@ -765,8 +766,9 @@ void Battlefield::HandleExitRequest(Player* player) Function that sends a zone wide warning to all players @param text id +@param source object. Can be null */ -void Battlefield::SendZoneWarning(int32 entry) +void Battlefield::SendZoneWarning(int32 entry, WorldObject* source) { for (GuidZoneMap::iterator itr = m_zonePlayers.begin(); itr != m_zonePlayers.end(); ++itr) { @@ -780,23 +782,13 @@ void Battlefield::SendZoneWarning(int32 entry) if (player->GetZoneId() != m_zoneId) continue; - int32 loc_idx = player->GetSession()->GetSessionDbLocaleIndex(); - - char const* text = sObjectMgr.GetMangosString(entry, loc_idx); - - WorldPacket data(SMSG_MESSAGECHAT, 200); - data << uint8(CHAT_MSG_RAID_BOSS_EMOTE); - data << uint32(LANG_UNIVERSAL); - data << ObjectGuid(); - data << uint32(0); - data << uint32(1); - data << uint8(0); - data << ObjectGuid(); - data << uint32(strlen(text) + 1); - data << text; - data << uint8(0); - data << float(0.0f); - data << uint8(0); + int32 locIdx = player->GetSession()->GetSessionDbLocaleIndex(); + + char const* text = sObjectMgr.GetMangosString(entry, locIdx); + + WorldPacket data; + ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID_BOSS_EMOTE, text, LANG_UNIVERSAL, CHAT_TAG_NONE, + source ? source->GetObjectGuid() : ObjectGuid(), source ? source->GetName() : "", player->GetObjectGuid(), player->GetName()); player->GetSession()->SendPacket(data); } diff --git a/src/game/Battlefield/Battlefield.h b/src/game/Battlefield/Battlefield.h index 12af57bb8b3..9c6d3250fea 100644 --- a/src/game/Battlefield/Battlefield.h +++ b/src/game/Battlefield/Battlefield.h @@ -169,7 +169,7 @@ class Battlefield : public OutdoorPvP void UpdateBattlefieldPlayers(); // sends a raid warning to all players in the zone - void SendZoneWarning(int32 /*entry*/); + void SendZoneWarning(int32 /*entry*/, WorldObject* source = nullptr); // update the graveyard on capture event virtual void UpdateGraveyardOwner(uint8 id, PvpTeamIndex newOwner) {}; @@ -178,7 +178,7 @@ class Battlefield : public OutdoorPvP virtual void RewardPlayersOnBattleEnd(Team /*winner*/) {}; // ToDo!!! for review! - void QuestCreditTeam(uint32 credit, Team team, WorldObject* source = NULL, float radius = -1.0f); + void QuestCreditTeam(uint32 credit, Team team, WorldObject* source = nullptr, float radius = -1.0f); // Group system bool CanAddPlayerToRaid(Player* /*player*/); diff --git a/src/game/Battlefield/BattlefieldHandler.cpp b/src/game/Battlefield/BattlefieldHandler.cpp index b31373e4ce4..c88d5e6a166 100644 --- a/src/game/Battlefield/BattlefieldHandler.cpp +++ b/src/game/Battlefield/BattlefieldHandler.cpp @@ -37,7 +37,7 @@ void WorldSession::SendBattlefieldWarInvite(uint32 battlefieldId, uint32 zoneId, WorldPacket data(SMSG_BATTLEFIELD_MANAGER_ENTRY_INVITE, 12); data << uint32(battlefieldId); data << uint32(zoneId); - data << uint32(time(NULL) + acceptDelay); + data << uint32(time(nullptr) + acceptDelay); SendPacket(data); } diff --git a/src/game/Battlefield/BattlefieldWG.cpp b/src/game/Battlefield/BattlefieldWG.cpp index 37d70358ca0..019ce434d9b 100644 --- a/src/game/Battlefield/BattlefieldWG.cpp +++ b/src/game/Battlefield/BattlefieldWG.cpp @@ -262,3 +262,13 @@ bool BattlefieldWG::HandleDestructibleBuildingEvent(uint32 eventId, GameObject* { return false; } + +bool BattlefieldWG::IsConditionFulfilled(Player const* source, uint32 conditionId, WorldObject const* conditionSource, uint32 conditionSourceType) +{ + return false; +} + +void BattlefieldWG::HandleConditionStateChange(uint32 conditionId, bool state) +{ + +} diff --git a/src/game/Battlefield/BattlefieldWG.h b/src/game/Battlefield/BattlefieldWG.h index 1035bd298f2..82e616bfd79 100644 --- a/src/game/Battlefield/BattlefieldWG.h +++ b/src/game/Battlefield/BattlefieldWG.h @@ -117,111 +117,112 @@ enum // ***** Area ids ***** - AREA_ID_THE_SUNKEN_RING = 4538, - AREA_ID_THE_BROKEN_TEMPLE = 4539, - AREA_ID_WINTERGRASP_FORTRESS = 4575, - AREA_ID_CENTRAL_BRIDGE = 4576, - AREA_ID_EASTERN_BRIDGE = 4577, - AREA_ID_WESTERN_BRIDGE = 4578, - AREA_ID_FLAMEWATCH_TOWER = 4581, - AREA_ID_WINTERS_EDGE_TOWER = 4582, - AREA_ID_SHADOWSIGHT_TOWER = 4583, - AREA_ID_THE_CAULDRON_OF_FLAMES = 4584, - AREA_ID_GLACIAL_FALLS = 4585, - AREA_ID_WINDY_BLUFFS = 4586, - AREA_ID_THE_FOREST_OF_SHADOWS = 4587, - AREA_ID_THE_CHILLED_QUAGMIRE = 4589, - AREA_ID_THE_STEPPE_OF_LIFE = 4590, - AREA_ID_WESTPARK_WORKSHOP = 4611, - AREA_ID_EASTPARK_WORKSHOP = 4612, + AREA_ID_THE_SUNKEN_RING = 4538, + AREA_ID_THE_BROKEN_TEMPLE = 4539, + AREA_ID_WINTERGRASP_FORTRESS = 4575, + AREA_ID_CENTRAL_BRIDGE = 4576, + AREA_ID_EASTERN_BRIDGE = 4577, + AREA_ID_WESTERN_BRIDGE = 4578, + AREA_ID_FLAMEWATCH_TOWER = 4581, + AREA_ID_WINTERS_EDGE_TOWER = 4582, + AREA_ID_SHADOWSIGHT_TOWER = 4583, + AREA_ID_THE_CAULDRON_OF_FLAMES = 4584, + AREA_ID_GLACIAL_FALLS = 4585, + AREA_ID_WINDY_BLUFFS = 4586, + AREA_ID_THE_FOREST_OF_SHADOWS = 4587, + AREA_ID_THE_CHILLED_QUAGMIRE = 4589, + AREA_ID_THE_STEPPE_OF_LIFE = 4590, + AREA_ID_WESTPARK_WORKSHOP = 4611, + AREA_ID_EASTPARK_WORKSHOP = 4612, // ***** Creatures ***** // ally creatures - NPC_ANCHORITE_TESSA = 31054, - NPC_COMMANDER_ZANNETH = 31036, - NPC_SENIOR_DEMOLITIONIST_LEGOSO = 31109, - NPC_SIEGE_MASTER_STOUTHANDLE = 31108, - NPC_SORCERESS_KAYLANA = 31051, - NPC_TACTICAL_OFFICER_AHBRAMIS = 31153, - NPC_BOWYER_RANDOLPH = 31052, + NPC_ANCHORITE_TESSA = 31054, + NPC_COMMANDER_ZANNETH = 31036, + NPC_SENIOR_DEMOLITIONIST_LEGOSO = 31109, + NPC_SIEGE_MASTER_STOUTHANDLE = 31108, + NPC_SORCERESS_KAYLANA = 31051, + NPC_TACTICAL_OFFICER_AHBRAMIS = 31153, + NPC_BOWYER_RANDOLPH = 31052, - NPC_KNIGHT_DAMERON = 32294, - NPC_MARSHAL_MAGRUDER = 39172, + NPC_KNIGHT_DAMERON = 32294, + NPC_MARSHAL_MAGRUDER = 39172, - NPC_MORGAN_DAY = 30489, - NPC_TRAVIS_DAY = 30488, + NPC_MORGAN_DAY = 30489, + NPC_TRAVIS_DAY = 30488, // horde creatures - NPC_COMMANDER_DARDOSH = 31091, - NPC_HOODOO_MASTER_FUJIN = 31101, - NPC_LEUTENANT_MURP = 31107, - NPC_PRIMALIST_MULFORT = 31053, - NPC_SIEGESMITH_STRONGHOOF = 31106, - NPC_TACTICAL_OFFICER_KILRATH = 31151, - NPC_VIERON_BLAZEFEATHER = 31102, + NPC_COMMANDER_DARDOSH = 31091, + NPC_HOODOO_MASTER_FUJIN = 31101, + NPC_LEUTENANT_MURP = 31107, + NPC_PRIMALIST_MULFORT = 31053, + NPC_SIEGESMITH_STRONGHOOF = 31106, + NPC_TACTICAL_OFFICER_KILRATH = 31151, + NPC_VIERON_BLAZEFEATHER = 31102, - NPC_STONE_GUARD_MUKAR = 32296, - NPC_CHAMPION_ROSSLAI = 39173, + NPC_STONE_GUARD_MUKAR = 32296, + NPC_CHAMPION_ROSSLAI = 39173, // trash - NPC_CHILLED_EARH_ELEMENTAL = 30849, - NPC_EARTHBOUND_REVENANT = 30876, - NPC_RAGING_FLAME = 30847, - NPC_FLAME_REVENANT = 30873, - NPC_GLACIAL_SPIRIT = 30846, - NPC_WATER_REVENANT = 30877, - NPC_WANDERING_SHADOW = 30842, - NPC_SHADOW_REVENANT = 30872, - NPC_WHISPERING_WIND = 30848, - NPC_TEMPEST_REVENANT = 30875, - NPC_LIVING_LASHER = 30845, - NPC_MATURE_LASHER = 34300, + NPC_CHILLED_EARH_ELEMENTAL = 30849, + NPC_EARTHBOUND_REVENANT = 30876, + NPC_RAGING_FLAME = 30847, + NPC_FLAME_REVENANT = 30873, + NPC_GLACIAL_SPIRIT = 30846, + NPC_WATER_REVENANT = 30877, + NPC_WANDERING_SHADOW = 30842, + NPC_SHADOW_REVENANT = 30872, + NPC_WHISPERING_WIND = 30848, + NPC_TEMPEST_REVENANT = 30875, + NPC_LIVING_LASHER = 30845, + NPC_MATURE_LASHER = 34300, - NPC_GNOMISH_MECHANIC = 30499, - NPC_GOBLIN_ENGINEER = 30400, + NPC_GNOMISH_MECHANIC = 30499, + NPC_GOBLIN_ENGINEER = 30400, - NPC_ALLIANCE_SPIRIT_GUIDE = 31842, - NPC_HORDE_SPIRIT_GUIDE = 31841, + NPC_ALLIANCE_SPIRIT_GUIDE = 31842, + NPC_HORDE_SPIRIT_GUIDE = 31841, - NPC_VALLIANCE_EXPEDITION_CHAMPION = 30740, - NPC_VALLIANCE_EXPEDITION_GUARD = 32308, + NPC_VALLIANCE_EXPEDITION_CHAMPION = 30740, + NPC_VALLIANCE_EXPEDITION_GUARD = 32308, - NPC_WARSONG_CHAMPION = 30739, - NPC_WARSONG_GUARD = 32307, + NPC_WARSONG_CHAMPION = 30739, + NPC_WARSONG_GUARD = 32307, - NPC_ALLIANCE_BRIGADIER_GENERAL = 32626, - NPC_HORDE_WARBRINGER = 32615, + NPC_ALLIANCE_BRIGADIER_GENERAL = 32626, + NPC_HORDE_WARBRINGER = 32615, - NPC_WINTERGRASP_CATAPULT = 27881, - NPC_WINTERGRASP_DEMOLISHER = 28094, - NPC_WINTERGRASP_SIEGE_ENGINE_A = 28312, - NPC_WINTERGRASP_SIEGE_ENGINE_H = 32627, - NPC_WINTERGRASP_SIEGE_TURRET_A = 28319, - NPC_WINTERGRASP_SIEGE_TURRET_H = 32629, - NPC_WINTERGRASP_TOWER_CANNON = 28366, + NPC_WINTERGRASP_CATAPULT = 27881, + NPC_WINTERGRASP_DEMOLISHER = 28094, + NPC_WINTERGRASP_SIEGE_ENGINE_A = 28312, + NPC_WINTERGRASP_SIEGE_ENGINE_H = 32627, + NPC_WINTERGRASP_SIEGE_TURRET_A = 28319, + NPC_WINTERGRASP_SIEGE_TURRET_H = 32629, + NPC_WINTERGRASP_TOWER_CANNON = 28366, - NPC_RP_GG = 30560, - NPC_CONTROL_ARMS = 27852, + NPC_RP_GG = 30560, + NPC_CONTROL_ARMS = 27852, - //NPC_WORLD_TRIGGER = 23472, + //NPC_WORLD_TRIGGER = 23472, + NPC_INVISIBLE_STALKER = 15214, // sends raid emotes - //NPC_ARATHI_BASIN_PORTAL_A = 32618, - //NPC_ARATHI_BASIN_PORTAL_H = 32619, + //NPC_ARATHI_BASIN_PORTAL_A = 32618, + //NPC_ARATHI_BASIN_PORTAL_H = 32619, - //NPC_WARSONG_GULCH_PORTAL_A = 32624, - //NPC_WARSONG_GULCH_PORTAL_H = 32625, + //NPC_WARSONG_GULCH_PORTAL_A = 32624, + //NPC_WARSONG_GULCH_PORTAL_H = 32625, - //NPC_STRAND_OF_THE_ANCIENTS_PORTAL_A = 32622, - //NPC_STRAND_OF_THE_ANCIENTS_PORTAL_H = 32623, + //NPC_STRAND_OF_THE_ANCIENTS_PORTAL_A = 32622, + //NPC_STRAND_OF_THE_ANCIENTS_PORTAL_H = 32623, - //NPC_EYE_OF_THE_STORM_PORTAL_A = 32621, - //NPC_EYE_OF_THE_STORM_PORTAL_H = 32620, + //NPC_EYE_OF_THE_STORM_PORTAL_A = 32621, + //NPC_EYE_OF_THE_STORM_PORTAL_H = 32620, - //NPC_ALTERAC_VALLEY_PORTAL_A = 32616, - //NPC_ALTERAC_VALLEY_PORTAL_H = 32617, + //NPC_ALTERAC_VALLEY_PORTAL_A = 32616, + //NPC_ALTERAC_VALLEY_PORTAL_H = 32617, - //NPC_ISLE_OF_CONQUEST_PORTAL_A = 34952, - //NPC_ISLE_OF_CONQUEST_PORTAL_H = 34953, + //NPC_ISLE_OF_CONQUEST_PORTAL_A = 34952, + //NPC_ISLE_OF_CONQUEST_PORTAL_H = 34953, // ***** Gameobjects ***** // titan relics @@ -285,181 +286,181 @@ enum GO_CAPTUREPOINT_SUNKEN_RING_H = 190475, // other GOs - //GO_ALLIANCE_BANNER_1 = 192287, - //GO_ALLIANCE_BANNER_2 = 192320, - //GO_ALLIANCE_BANNER_3 = 192314, - //GO_ALLIANCE_BANNER_4 = 192487, - //GO_ALLIANCE_BANNER_5 = 192313, - //GO_ALLIANCE_BANNER_6 = 192312, - //GO_ALLIANCE_BANNER_7 = 192299, - //GO_ALLIANCE_BANNER_8 = 192292, - //GO_ALLIANCE_BANNER_9 = 192308, - //GO_ALLIANCE_BANNER_10 = 192327, - //GO_ALLIANCE_BANNER_11 = 192329, - //GO_ALLIANCE_BANNER_12 = 192309, - //GO_ALLIANCE_BANNER_13 = 192324, - //GO_ALLIANCE_BANNER_14 = 192310, - //GO_ALLIANCE_BANNER_15 = 192325, - //GO_ALLIANCE_BANNER_16 = 192326, - //GO_ALLIANCE_BANNER_17 = 192322, - //GO_ALLIANCE_BANNER_18 = 192323, - //GO_ALLIANCE_BANNER_19 = 192318, - //GO_ALLIANCE_BANNER_20 = 192319, - //GO_ALLIANCE_BANNER_21 = 192304, - //GO_ALLIANCE_BANNER_22 = 192305, - //GO_ALLIANCE_BANNER_23 = 192286, - //GO_ALLIANCE_BANNER_24 = 192317, - //GO_ALLIANCE_BANNER_25 = 192316, - //GO_ALLIANCE_BANNER_26 = 192321, - //GO_ALLIANCE_BANNER_27 = 192335, - //GO_ALLIANCE_BANNER_28 = 192334, - //GO_ALLIANCE_BANNER_29 = 192331, - //GO_ALLIANCE_BANNER_30 = 192332, - //GO_ALLIANCE_BANNER_31 = 192333, - //GO_ALLIANCE_BANNER_32 = 192314, - //GO_ALLIANCE_BANNER_33 = 192306, - //GO_ALLIANCE_BANNER_34 = 192307, - //GO_ALLIANCE_BANNER_35 = 192330, - //GO_ALLIANCE_BANNER_36 = 192328, - //GO_ALLIANCE_BANNER_37 = 192252, - //GO_ALLIANCE_BANNER_38 = 192253, + //GO_ALLIANCE_BANNER_1 = 192287, + //GO_ALLIANCE_BANNER_2 = 192320, + //GO_ALLIANCE_BANNER_3 = 192314, + //GO_ALLIANCE_BANNER_4 = 192487, + //GO_ALLIANCE_BANNER_5 = 192313, + //GO_ALLIANCE_BANNER_6 = 192312, + //GO_ALLIANCE_BANNER_7 = 192299, + //GO_ALLIANCE_BANNER_8 = 192292, + //GO_ALLIANCE_BANNER_9 = 192308, + //GO_ALLIANCE_BANNER_10 = 192327, + //GO_ALLIANCE_BANNER_11 = 192329, + //GO_ALLIANCE_BANNER_12 = 192309, + //GO_ALLIANCE_BANNER_13 = 192324, + //GO_ALLIANCE_BANNER_14 = 192310, + //GO_ALLIANCE_BANNER_15 = 192325, + //GO_ALLIANCE_BANNER_16 = 192326, + //GO_ALLIANCE_BANNER_17 = 192322, + //GO_ALLIANCE_BANNER_18 = 192323, + //GO_ALLIANCE_BANNER_19 = 192318, + //GO_ALLIANCE_BANNER_20 = 192319, + //GO_ALLIANCE_BANNER_21 = 192304, + //GO_ALLIANCE_BANNER_22 = 192305, + //GO_ALLIANCE_BANNER_23 = 192286, + //GO_ALLIANCE_BANNER_24 = 192317, + //GO_ALLIANCE_BANNER_25 = 192316, + //GO_ALLIANCE_BANNER_26 = 192321, + //GO_ALLIANCE_BANNER_27 = 192335, + //GO_ALLIANCE_BANNER_28 = 192334, + //GO_ALLIANCE_BANNER_29 = 192331, + //GO_ALLIANCE_BANNER_30 = 192332, + //GO_ALLIANCE_BANNER_31 = 192333, + //GO_ALLIANCE_BANNER_32 = 192314, + //GO_ALLIANCE_BANNER_33 = 192306, + //GO_ALLIANCE_BANNER_34 = 192307, + //GO_ALLIANCE_BANNER_35 = 192330, + //GO_ALLIANCE_BANNER_36 = 192328, + //GO_ALLIANCE_BANNER_37 = 192252, + //GO_ALLIANCE_BANNER_38 = 192253, //// center tower - //GO_ALLIANCE_BANNER_39 = 192269, // named horde banner in db - //GO_ALLIANCE_BANNER_40 = 192501, // all towers have this - //GO_ALLIANCE_BANNER_41 = 192266, - //GO_ALLIANCE_BANNER_42 = 192415, - //GO_ALLIANCE_BANNER_43 = 192429, - //GO_ALLIANCE_BANNER_44 = 192430, - //GO_ALLIANCE_BANNER_45 = 192270, - //GO_ALLIANCE_BANNER_46 = 192431, - //GO_ALLIANCE_BANNER_47 = 192414, + //GO_ALLIANCE_BANNER_39 = 192269, // named horde banner in db + //GO_ALLIANCE_BANNER_40 = 192501, // all towers have this + //GO_ALLIANCE_BANNER_41 = 192266, + //GO_ALLIANCE_BANNER_42 = 192415, + //GO_ALLIANCE_BANNER_43 = 192429, + //GO_ALLIANCE_BANNER_44 = 192430, + //GO_ALLIANCE_BANNER_45 = 192270, + //GO_ALLIANCE_BANNER_46 = 192431, + //GO_ALLIANCE_BANNER_47 = 192414, //// wespark - //GO_ALLIANCE_BANNER_48 = 192274, - //GO_ALLIANCE_BANNER_49 = 192409, - //GO_ALLIANCE_BANNER_50 = 192433, - //GO_ALLIANCE_BANNER_51 = 192407, - //GO_ALLIANCE_BANNER_52 = 192406, + //GO_ALLIANCE_BANNER_48 = 192274, + //GO_ALLIANCE_BANNER_49 = 192409, + //GO_ALLIANCE_BANNER_50 = 192433, + //GO_ALLIANCE_BANNER_51 = 192407, + //GO_ALLIANCE_BANNER_52 = 192406, //// west tower - //GO_ALLIANCE_BANNER_53 = 192278, - //GO_ALLIANCE_BANNER_54 = 192277, + //GO_ALLIANCE_BANNER_53 = 192278, + //GO_ALLIANCE_BANNER_54 = 192277, //// broken temple - //GO_ALLIANCE_BANNER_55 = 192401, - //GO_ALLIANCE_BANNER_56 = 192281, - //GO_ALLIANCE_BANNER_57 = 192400, - //GO_ALLIANCE_BANNER_58 = 192282, + //GO_ALLIANCE_BANNER_55 = 192401, + //GO_ALLIANCE_BANNER_56 = 192281, + //GO_ALLIANCE_BANNER_57 = 192400, + //GO_ALLIANCE_BANNER_58 = 192282, //// sunken ring - //GO_ALLIANCE_BANNER_59 = 192291, - //GO_ALLIANCE_BANNER_60 = 192427, - //GO_ALLIANCE_BANNER_61 = 192428, - //GO_ALLIANCE_BANNER_62 = 192426, - //GO_ALLIANCE_BANNER_63 = 192425, - //GO_ALLIANCE_BANNER_64 = 192288, + //GO_ALLIANCE_BANNER_59 = 192291, + //GO_ALLIANCE_BANNER_60 = 192427, + //GO_ALLIANCE_BANNER_61 = 192428, + //GO_ALLIANCE_BANNER_62 = 192426, + //GO_ALLIANCE_BANNER_63 = 192425, + //GO_ALLIANCE_BANNER_64 = 192288, //// eastpark - //GO_ALLIANCE_BANNER_65 = 192418, - //GO_ALLIANCE_BANNER_66 = 192273, - //GO_ALLIANCE_BANNER_67 = 192417, - //GO_ALLIANCE_BANNER_68 = 192416, + //GO_ALLIANCE_BANNER_65 = 192418, + //GO_ALLIANCE_BANNER_66 = 192273, + //GO_ALLIANCE_BANNER_67 = 192417, + //GO_ALLIANCE_BANNER_68 = 192416, //// east tower - //GO_ALLIANCE_BANNER_69 = 192423, - - //GO_HORDE_BANNER_1 = 192284, - //GO_HORDE_BANNER_2 = 192355, - //GO_HORDE_BANNER_3 = 192364, - //GO_HORDE_BANNER_4 = 192488, - //GO_HORDE_BANNER_5 = 192367, - //GO_HORDE_BANNER_6 = 192366, - //GO_HORDE_BANNER_7 = 192349, - //GO_HORDE_BANNER_8 = 192336, - //GO_HORDE_BANNER_9 = 192375, - //GO_HORDE_BANNER_10 = 192353, - //GO_HORDE_BANNER_11 = 192357, - //GO_HORDE_BANNER_12 = 192374, - //GO_HORDE_BANNER_13 = 192373, - ////GO_HORDE_BANNER_14 = ?, - //GO_HORDE_BANNER_15 = 192360, - //GO_HORDE_BANNER_16 = 192361, - //GO_HORDE_BANNER_17 = 192372, - //GO_HORDE_BANNER_18 = 192371, - //GO_HORDE_BANNER_19 = 192358, - //GO_HORDE_BANNER_20 = 192359, - //GO_HORDE_BANNER_21 = 192338, - //GO_HORDE_BANNER_22 = 192339, - //GO_HORDE_BANNER_23 = 192285, - //GO_HORDE_BANNER_24 = 192379, - //GO_HORDE_BANNER_25 = 192378, - //GO_HORDE_BANNER_26 = 192354, - //GO_HORDE_BANNER_27 = 192363, - //GO_HORDE_BANNER_28 = 192362, - //GO_HORDE_BANNER_29 = 192368, - //GO_HORDE_BANNER_30 = 192369, - //GO_HORDE_BANNER_31 = 192370, - //GO_HORDE_BANNER_32 = 192364, - //GO_HORDE_BANNER_33 = 192350, - //GO_HORDE_BANNER_34 = 192351, - //GO_HORDE_BANNER_35 = 192356, - //GO_HORDE_BANNER_36 = 192352, - //GO_HORDE_BANNER_37 = 192255, - //GO_HORDE_BANNER_38 = 192254, + //GO_ALLIANCE_BANNER_69 = 192423, + + //GO_HORDE_BANNER_1 = 192284, + //GO_HORDE_BANNER_2 = 192355, + //GO_HORDE_BANNER_3 = 192364, + //GO_HORDE_BANNER_4 = 192488, + //GO_HORDE_BANNER_5 = 192367, + //GO_HORDE_BANNER_6 = 192366, + //GO_HORDE_BANNER_7 = 192349, + //GO_HORDE_BANNER_8 = 192336, + //GO_HORDE_BANNER_9 = 192375, + //GO_HORDE_BANNER_10 = 192353, + //GO_HORDE_BANNER_11 = 192357, + //GO_HORDE_BANNER_12 = 192374, + //GO_HORDE_BANNER_13 = 192373, + ////GO_HORDE_BANNER_14 = ?, + //GO_HORDE_BANNER_15 = 192360, + //GO_HORDE_BANNER_16 = 192361, + //GO_HORDE_BANNER_17 = 192372, + //GO_HORDE_BANNER_18 = 192371, + //GO_HORDE_BANNER_19 = 192358, + //GO_HORDE_BANNER_20 = 192359, + //GO_HORDE_BANNER_21 = 192338, + //GO_HORDE_BANNER_22 = 192339, + //GO_HORDE_BANNER_23 = 192285, + //GO_HORDE_BANNER_24 = 192379, + //GO_HORDE_BANNER_25 = 192378, + //GO_HORDE_BANNER_26 = 192354, + //GO_HORDE_BANNER_27 = 192363, + //GO_HORDE_BANNER_28 = 192362, + //GO_HORDE_BANNER_29 = 192368, + //GO_HORDE_BANNER_30 = 192369, + //GO_HORDE_BANNER_31 = 192370, + //GO_HORDE_BANNER_32 = 192364, + //GO_HORDE_BANNER_33 = 192350, + //GO_HORDE_BANNER_34 = 192351, + //GO_HORDE_BANNER_35 = 192356, + //GO_HORDE_BANNER_36 = 192352, + //GO_HORDE_BANNER_37 = 192255, + //GO_HORDE_BANNER_38 = 192254, //// center tower - //GO_HORDE_BANNER_39 = 192268, - //GO_HORDE_BANNER_40 = 192502, // all towers have this - //GO_HORDE_BANNER_41 = 192267, - //GO_HORDE_BANNER_42 = 192449, - //GO_HORDE_BANNER_43 = 192444, - //GO_HORDE_BANNER_44 = 192443, - //GO_HORDE_BANNER_45 = 192271, - //GO_HORDE_BANNER_46 = 192442, - //GO_HORDE_BANNER_47 = 192450, + //GO_HORDE_BANNER_39 = 192268, + //GO_HORDE_BANNER_40 = 192502, // all towers have this + //GO_HORDE_BANNER_41 = 192267, + //GO_HORDE_BANNER_42 = 192449, + //GO_HORDE_BANNER_43 = 192444, + //GO_HORDE_BANNER_44 = 192443, + //GO_HORDE_BANNER_45 = 192271, + //GO_HORDE_BANNER_46 = 192442, + //GO_HORDE_BANNER_47 = 192450, //// westpark - //GO_HORDE_BANNER_48 = 192275, - //GO_HORDE_BANNER_49 = 192408, - //GO_HORDE_BANNER_50 = 192432, - //GO_HORDE_BANNER_51 = 192441, - //GO_HORDE_BANNER_52 = 192440, + //GO_HORDE_BANNER_48 = 192275, + //GO_HORDE_BANNER_49 = 192408, + //GO_HORDE_BANNER_50 = 192432, + //GO_HORDE_BANNER_51 = 192441, + //GO_HORDE_BANNER_52 = 192440, //// west tower - //GO_HORDE_BANNER_53 = 192279, - //GO_HORDE_BANNER_54 = 192276, + //GO_HORDE_BANNER_53 = 192279, + //GO_HORDE_BANNER_54 = 192276, //// broken temple - //GO_HORDE_BANNER_55 = 192435, - //GO_HORDE_BANNER_56 = 192280, - //GO_HORDE_BANNER_57 = 192434, - //GO_HORDE_BANNER_58 = 192283, + //GO_HORDE_BANNER_55 = 192435, + //GO_HORDE_BANNER_56 = 192280, + //GO_HORDE_BANNER_57 = 192434, + //GO_HORDE_BANNER_58 = 192283, //// sunken ring - //GO_HORDE_BANNER_59 = 192290, - //GO_HORDE_BANNER_60 = 192460, - //GO_HORDE_BANNER_61 = 192461, - //GO_HORDE_BANNER_62 = 192459, - //GO_HORDE_BANNER_63 = 192458, - //GO_HORDE_BANNER_64 = 192289, + //GO_HORDE_BANNER_59 = 192290, + //GO_HORDE_BANNER_60 = 192460, + //GO_HORDE_BANNER_61 = 192461, + //GO_HORDE_BANNER_62 = 192459, + //GO_HORDE_BANNER_63 = 192458, + //GO_HORDE_BANNER_64 = 192289, //// eastpark - //GO_HORDE_BANNER_65 = 192453, - //GO_HORDE_BANNER_66 = 192272, - //GO_HORDE_BANNER_67 = 192452, - //GO_HORDE_BANNER_68 = 192451, + //GO_HORDE_BANNER_65 = 192453, + //GO_HORDE_BANNER_66 = 192272, + //GO_HORDE_BANNER_67 = 192452, + //GO_HORDE_BANNER_68 = 192451, //// east tower - //GO_HORDE_BANNER_69 = 192424, + //GO_HORDE_BANNER_69 = 192424, //// Keep misc GOs - //GO_ALLIANCE_MISC_01 = 193138, - //GO_ALLIANCE_MISC_02 = 193131, - //GO_ALLIANCE_MISC_03 = 193137, - //GO_ALLIANCE_MISC_04 = 193135, - //GO_ALLIANCE_MISC_05 = 193134, - //GO_ALLIANCE_MISC_06 = 193132, - //GO_ALLIANCE_MISC_07 = 193128, - //GO_ALLIANCE_MISC_08 = 193165, - //GO_ALLIANCE_MISC_09 = 193124, - - //GO_HORDE_MISC_01 = 193145, - //GO_HORDE_MISC_02 = 193139, - //GO_HORDE_MISC_03 = 193142, - //GO_HORDE_MISC_04 = 193146, - //GO_HORDE_MISC_05 = 193141, - //GO_HORDE_MISC_06 = 193140, - //GO_HORDE_MISC_07 = 193144, - //GO_HORDE_MISC_08 = 193143, - //GO_HORDE_MISC_09 = 193161, - //GO_HORDE_MISC_10 = 193127, + //GO_ALLIANCE_MISC_01 = 193138, + //GO_ALLIANCE_MISC_02 = 193131, + //GO_ALLIANCE_MISC_03 = 193137, + //GO_ALLIANCE_MISC_04 = 193135, + //GO_ALLIANCE_MISC_05 = 193134, + //GO_ALLIANCE_MISC_06 = 193132, + //GO_ALLIANCE_MISC_07 = 193128, + //GO_ALLIANCE_MISC_08 = 193165, + //GO_ALLIANCE_MISC_09 = 193124, + + //GO_HORDE_MISC_01 = 193145, + //GO_HORDE_MISC_02 = 193139, + //GO_HORDE_MISC_03 = 193142, + //GO_HORDE_MISC_04 = 193146, + //GO_HORDE_MISC_05 = 193141, + //GO_HORDE_MISC_06 = 193140, + //GO_HORDE_MISC_07 = 193144, + //GO_HORDE_MISC_08 = 193143, + //GO_HORDE_MISC_09 = 193161, + //GO_HORDE_MISC_10 = 193127, // portal GOs GO_DEFENDERS_PORTAL_HORDE = 190763, @@ -579,6 +580,11 @@ enum // ***** Factions ***** FACTION_ID_WARSONG = 1979, FACTION_ID_VALLIANCE = 1891, + + + // ***** Condition entries ***** + // used to check the gossip options in DB for various npcs + // ToDo: add condition entries here }; struct WintergraspGoData @@ -700,6 +706,9 @@ class BattlefieldWG : public Battlefield void UpdateGraveyardOwner(uint8 id, PvpTeamIndex newOwner) override; + bool IsConditionFulfilled(Player const* source, uint32 conditionId, WorldObject const* conditionSource, uint32 conditionSourceType) override; + void HandleConditionStateChange(uint32 conditionId, bool state) override; + private: void InitPlayerBattlefieldData(Player* player) override; bool GetPlayerKickLocation(Player* player, float& x, float& y, float& z) override;