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:
kaelima
2012-09-27 22:15:06 +02:00
parent a7fd0825f7
commit 138c52c967
5 changed files with 8 additions and 16 deletions
@@ -612,32 +612,25 @@ 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:
}
if (!isWorkshop)
return; return;
}
for (Workshop::const_iterator itr = WorkshopsList.begin(); itr != WorkshopsList.end(); ++itr) for (Workshop::const_iterator itr = WorkshopsList.begin(); itr != WorkshopsList.end(); ++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);
@@ -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)