[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

@ -586,7 +586,7 @@ struct WeatherZoneChances
struct GraveYardData
{
uint32 safeLocId;
uint32 team;
Team team;
};
typedef std::multimap<uint32, GraveYardData> GraveYardMap;
typedef std::pair<GraveYardMap::const_iterator, GraveYardMap::const_iterator> GraveYardMapBounds;
@ -799,13 +799,13 @@ class ObjectMgr
uint64 GetPlayerGUIDByName(std::string name) const;
bool GetPlayerNameByGUID(ObjectGuid guid, std::string &name) const;
uint32 GetPlayerTeamByGUID(ObjectGuid guid) const;
Team GetPlayerTeamByGUID(ObjectGuid guid) const;
uint32 GetPlayerAccountIdByGUID(ObjectGuid guid) const;
uint32 GetPlayerAccountIdByPlayerName(const std::string& name) const;
uint32 GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team );
uint32 GetNearestTaxiNode( float x, float y, float z, uint32 mapid, Team team );
void GetTaxiPath( uint32 source, uint32 destination, uint32 &path, uint32 &cost);
uint32 GetTaxiMountDisplayId( uint32 id, uint32 team, bool allowed_alt_team = false);
uint32 GetTaxiMountDisplayId( uint32 id, Team team, bool allowed_alt_team = false);
Quest const* GetQuestTemplate(uint32 quest_id) const
{
@ -833,8 +833,8 @@ class ObjectMgr
GossipText const* GetGossipText(uint32 Text_ID) const;
WorldSafeLocsEntry const *GetClosestGraveYard(float x, float y, float z, uint32 MapId, uint32 team);
bool AddGraveYardLink(uint32 id, uint32 zone, uint32 team, bool inDB = true);
WorldSafeLocsEntry const *GetClosestGraveYard(float x, float y, float z, uint32 MapId, Team team);
bool AddGraveYardLink(uint32 id, uint32 zone, Team team, bool inDB = true);
void LoadGraveyardZones();
GraveYardData const* FindGraveYardData(uint32 id, uint32 zone) const;