コード例 #1
0
void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recv_data)
{
	uint64 guid;
	recv_data >> guid;

	CHECK_INWORLD_RETURN;
	Creature * pCreature = _player->GetMapMgr()->GetCreature( GET_LOWGUID_PART(guid) );
	if( pCreature == NULL )
		return;

	SendBattlegroundList( pCreature, 0 );
}
コード例 #2
0
void WorldSession::HandleBattleMasterHelloOpcode(WorldPacket &recv_data)
{
	CHECK_PACKET_SIZE(recv_data, 8);
	if( !_player || !_player->IsInWorld() )
		return;

	uint64 guid;
	recv_data >> guid;
	sLog.outDebug("Received CMSG_BATTLEMASTER_HELLO from " I64FMT, guid);

	Creature * bm = _player->GetMapMgr()->GetCreature(GET_LOWGUID_PART(guid));

	if(!bm)
		return;

	if(!bm->HasFlag( UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BATTLEFIELDPERSON ))		// Not a Battlemaster
		return;

	SendBattlegroundList(bm, 0);
}