Exemplo n.º 1
0
//////////////////////////////////////////////////////////////////////////////////////////
///This function handles CMSG_GROUP_DISBAND:
//////////////////////////////////////////////////////////////////////////////////////////
void WorldSession::HandleGroupDisbandOpcode( WorldPacket & recv_data )
{
	if(!_player->IsInWorld()) return;
	Group* pGroup = _player->GetGroup();
	if(!pGroup) return;

	if(pGroup->HasFlag(GROUP_FLAG_BATTLEGROUND_GROUP))
		return;

	//pGroup->Disband();
	pGroup->RemovePlayer(_player->m_playerInfo);
}
//////////////////////////////////////////////////////////////////////////////////////////
///This function handles CMSG_GROUP_DISBAND:
//////////////////////////////////////////////////////////////////////////////////////////
void WorldSession::HandleGroupDisbandOpcode( WorldPacket & recv_data )
{
	if(!_player->IsInWorld())
		return;

	Group* pGroup = _player->GetGroup();
	if(!pGroup)
		return;

	if(pGroup->HasFlag(GROUP_FLAG_BATTLEGROUND_GROUP))
		return;

	//Update the group list
	pGroup->SendNullUpdate( _player );

	//Do we need to update our comrades inside an instance?
	if( _player->GetInstanceID() )
		sInstanceMgr.PlayerLeftGroup( pGroup, _player );
	pGroup->RemovePlayer(_player->m_playerInfo);
}