aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundHandler.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2009-06-11 17:56:20 +0200
committerMachiavelli <none@none>2009-06-11 17:56:20 +0200
commit1c97b2bf796fb367b77e653556220e69cf7b5878 (patch)
treeffaa612c7502785edc750a664ebc2253c41e4f5c /src/game/BattleGroundHandler.cpp
parent6eaf6e962a31aa308406289d538aef30a56b95cb (diff)
parent6c069aa5b8405d51202781104daf5c6e8642b891 (diff)
Merge
--HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGroundHandler.cpp')
-rw-r--r--src/game/BattleGroundHandler.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp
index 7a772fce8f1..6d16abfd5ea 100644
--- a/src/game/BattleGroundHandler.cpp
+++ b/src/game/BattleGroundHandler.cpp
@@ -68,7 +68,7 @@ void WorldSession::HandleBattlemasterHelloOpcode( WorldPacket & recv_data )
void WorldSession::SendBattlegGroundList( uint64 guid, BattleGroundTypeId bgTypeId )
{
WorldPacket data;
- sBattleGroundMgr.BuildBattleGroundListPacket(&data, guid, _player, bgTypeId);
+ sBattleGroundMgr.BuildBattleGroundListPacket(&data, guid, _player, bgTypeId, 0);
SendPacket( &data );
}
@@ -105,13 +105,6 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data )
if (_player->InBattleGround())
return;
- Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
- if (!unit)
- return;
-
- if(!unit->isBattleMaster()) // it's not battlemaster
- return;
-
// get bg instance or bg template if instance not found
BattleGround *bg = NULL;
if (instanceId)
@@ -290,13 +283,16 @@ void WorldSession::HandlePVPLogDataOpcode( WorldPacket & /*recv_data*/ )
void WorldSession::HandleBattlefieldListOpcode( WorldPacket &recv_data )
{
- CHECK_PACKET_SIZE(recv_data, 4);
+ CHECK_PACKET_SIZE(recv_data, 4 + 1);
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEFIELD_LIST Message");
uint32 bgTypeId;
recv_data >> bgTypeId; // id from DBC
+ uint8 fromWhere;
+ recv_data >> fromWhere; // 0 - battlemaster, 1 - UI
+
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
if (!bl)
{
@@ -305,7 +301,7 @@ void WorldSession::HandleBattlefieldListOpcode( WorldPacket &recv_data )
}
WorldPacket data;
- sBattleGroundMgr.BuildBattleGroundListPacket(&data, _player->GetGUID(), _player, BattleGroundTypeId(bgTypeId));
+ sBattleGroundMgr.BuildBattleGroundListPacket(&data, 0, _player, BattleGroundTypeId(bgTypeId), fromWhere);
SendPacket( &data );
}