[10781] Use BattleGround(AV)TeamIndex enum types in AV battleground code.

* Added BattleGroundAVTeamIndex enum type for 3-case special team list fo AV.
* Rename BattleGroundTeamId -> BattleGroundTeamIndex for clarify
* Some safe checks added and dropped bogus call RewardReputationToTeam in BattleGroundAV::HandleQuestComplete
  for BattleGroundTeamIndex as faction. Unclear for what it expected used so dropped.
This commit is contained in:
VladimirMangos 2010-11-24 17:27:10 +03:00
parent 26668c067b
commit c2331f58bc
7 changed files with 149 additions and 141 deletions

View file

@ -340,7 +340,7 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* target
return;
BG_AB_Nodes node = BG_AB_Nodes(event);
BattleGroundTeamId teamIndex = GetTeamIndexByTeamId(source->GetTeam());
BattleGroundTeamIndex teamIndex = GetTeamIndexByTeamId(source->GetTeam());
// Check if player really could use this banner, not cheated
if (!(m_Nodes[node] == 0 || teamIndex == m_Nodes[node] % 2))
@ -500,7 +500,7 @@ void BattleGroundAB::EndBattleGround(uint32 winner)
WorldSafeLocsEntry const* BattleGroundAB::GetClosestGraveYard(Player* player)
{
BattleGroundTeamId teamIndex = GetTeamIndexByTeamId(player->GetTeam());
BattleGroundTeamIndex teamIndex = GetTeamIndexByTeamId(player->GetTeam());
// Is there any occupied node for this team?
std::vector<uint8> nodes;