[10782] Use Team enum types in all appropriate cases and catches bug in result fix.

* Fixed wrong arenaid use at leave arena queue.
* Fixed memory lost and etc at not virtual EndBattleground call
* Fixed crash at arena join with fake data from client.
* Code cleanups.
This commit is contained in:
VladimirMangos 2010-11-24 23:25:53 +03:00
parent c2331f58bc
commit cc0655a402
38 changed files with 315 additions and 321 deletions

View file

@ -186,7 +186,7 @@ void SocialMgr::GetFriendInfo(Player *player, uint32 friend_lowguid, FriendInfo
Player *pFriend = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, friend_lowguid));
uint32 team = player->GetTeam();
Team team = player->GetTeam();
AccountTypes security = player->GetSession()->GetSecurity();
bool allowTwoSideWhoList = sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_WHO_LIST);
AccountTypes gmLevelInWhoList = AccountTypes (sWorld.getConfig(CONFIG_UINT32_GM_LEVEL_IN_WHO_LIST));
@ -268,7 +268,7 @@ void SocialMgr::BroadcastToFriendListers(Player *player, WorldPacket *packet)
if(!player)
return;
uint32 team = player->GetTeam();
Team team = player->GetTeam();
AccountTypes security = player->GetSession()->GetSecurity();
uint32 guid = player->GetGUIDLow();
AccountTypes gmLevelInWhoList = AccountTypes(sWorld.getConfig(CONFIG_UINT32_GM_LEVEL_IN_WHO_LIST));