mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 04:37:04 +00:00
[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:
parent
26668c067b
commit
c2331f58bc
7 changed files with 149 additions and 141 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue