Core/Battleground: Change notice about unhandled areatriggers to debug info and removed the GM notice.
Added comment for a field in HandleBattlefieldListOpcode. And removed useless bool in BattlefieldWG::OnGameObjectCreate.
This commit is contained in:
@@ -612,33 +612,26 @@ void BattlefieldWG::OnCreatureRemove(Creature* /*creature*/)
|
|||||||
|
|
||||||
void BattlefieldWG::OnGameObjectCreate(GameObject* go)
|
void BattlefieldWG::OnGameObjectCreate(GameObject* go)
|
||||||
{
|
{
|
||||||
bool isWorkshop = false;
|
|
||||||
uint8 workshopId = 0;
|
uint8 workshopId = 0;
|
||||||
|
|
||||||
switch (go->GetEntry())
|
switch (go->GetEntry())
|
||||||
{
|
{
|
||||||
case GO_WINTERGRASP_FACTORY_BANNER_NE:
|
case GO_WINTERGRASP_FACTORY_BANNER_NE:
|
||||||
isWorkshop = true;
|
|
||||||
workshopId = BATTLEFIELD_WG_WORKSHOP_NE;
|
workshopId = BATTLEFIELD_WG_WORKSHOP_NE;
|
||||||
break;
|
break;
|
||||||
case GO_WINTERGRASP_FACTORY_BANNER_NW:
|
case GO_WINTERGRASP_FACTORY_BANNER_NW:
|
||||||
isWorkshop = true;
|
|
||||||
workshopId = BATTLEFIELD_WG_WORKSHOP_NW;
|
workshopId = BATTLEFIELD_WG_WORKSHOP_NW;
|
||||||
break;
|
break;
|
||||||
case GO_WINTERGRASP_FACTORY_BANNER_SE:
|
case GO_WINTERGRASP_FACTORY_BANNER_SE:
|
||||||
isWorkshop = true;
|
|
||||||
workshopId = BATTLEFIELD_WG_WORKSHOP_SE;
|
workshopId = BATTLEFIELD_WG_WORKSHOP_SE;
|
||||||
break;
|
break;
|
||||||
case GO_WINTERGRASP_FACTORY_BANNER_SW:
|
case GO_WINTERGRASP_FACTORY_BANNER_SW:
|
||||||
isWorkshop = true;
|
|
||||||
workshopId = BATTLEFIELD_WG_WORKSHOP_SW;
|
workshopId = BATTLEFIELD_WG_WORKSHOP_SW;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isWorkshop)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (Workshop::const_iterator itr = WorkshopsList.begin(); itr != WorkshopsList.end(); ++itr)
|
for (Workshop::const_iterator itr = WorkshopsList.begin(); itr != WorkshopsList.end(); ++itr)
|
||||||
{
|
{
|
||||||
if (WGWorkshop* workshop = (*itr))
|
if (WGWorkshop* workshop = (*itr))
|
||||||
|
|||||||
@@ -1940,8 +1940,6 @@ void Battleground::RewardXPAtKill(Player* killer, Player* victim)
|
|||||||
|
|
||||||
void Battleground::HandleAreaTrigger(Player* player, uint32 trigger)
|
void Battleground::HandleAreaTrigger(Player* player, uint32 trigger)
|
||||||
{
|
{
|
||||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger %u in Battleground %u. Player coords (x: %f, y: %f, z: %f)",
|
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Unhandled AreaTrigger %u in Battleground %u. Player coords (x: %f, y: %f, z: %f)",
|
||||||
trigger, player->GetMapId(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
trigger, player->GetMapId(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
||||||
if (player->isGameMaster())
|
|
||||||
player->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", trigger);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ void BattlegroundAB::HandleAreaTrigger(Player* player, uint32 trigger)
|
|||||||
case 3870: // Black Smith
|
case 3870: // Black Smith
|
||||||
case 4020: // Unk1
|
case 4020: // Unk1
|
||||||
case 4021: // Unk2
|
case 4021: // Unk2
|
||||||
|
case 4674: // Unk3
|
||||||
//break;
|
//break;
|
||||||
default:
|
default:
|
||||||
Battleground::HandleAreaTrigger(player, trigger);
|
Battleground::HandleAreaTrigger(player, trigger);
|
||||||
|
|||||||
@@ -105,11 +105,11 @@ enum EYBattlegroundObjectEntry
|
|||||||
enum EYBattlegroundPointsTrigger
|
enum EYBattlegroundPointsTrigger
|
||||||
{
|
{
|
||||||
TR_BLOOD_ELF_POINT = 4476,
|
TR_BLOOD_ELF_POINT = 4476,
|
||||||
TR_FEL_REAVER_POINT = 4514,
|
TR_FEL_REAVER_POINT = 4514,
|
||||||
TR_MAGE_TOWER_POINT = 4516,
|
TR_MAGE_TOWER_POINT = 4516,
|
||||||
TR_DRAENEI_RUINS_POINT = 4518,
|
TR_DRAENEI_RUINS_POINT = 4518,
|
||||||
TR_BLOOD_ELF_BUFF = 4568,
|
TR_BLOOD_ELF_BUFF = 4568,
|
||||||
TR_FEL_REAVER_BUFF = 4569,
|
TR_FEL_REAVER_BUFF = 4569,
|
||||||
TR_MAGE_TOWER_BUFF = 4570,
|
TR_MAGE_TOWER_BUFF = 4570,
|
||||||
TR_DRAENEI_RUINS_BUFF = 4571
|
TR_DRAENEI_RUINS_BUFF = 4571
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -324,8 +324,8 @@ void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recv_data)
|
|||||||
uint8 fromWhere;
|
uint8 fromWhere;
|
||||||
recv_data >> fromWhere; // 0 - battlemaster (lua: ShowBattlefieldList), 1 - UI (lua: RequestBattlegroundInstanceInfo)
|
recv_data >> fromWhere; // 0 - battlemaster (lua: ShowBattlefieldList), 1 - UI (lua: RequestBattlegroundInstanceInfo)
|
||||||
|
|
||||||
uint8 unk1;
|
uint8 canGainXP;
|
||||||
recv_data >> unk1; // Unknown 3.2.2
|
recv_data >> canGainXP; // players with locked xp have their own bg queue on retail
|
||||||
|
|
||||||
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
|
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
|
||||||
if (!bl)
|
if (!bl)
|
||||||
|
|||||||
Reference in New Issue
Block a user