mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 19:37:01 +00:00
[12148] Improve BattleGroundAB::IsAllNodesControlledByTeam
This commit is contained in:
parent
caa36a0219
commit
e0043ecc56
2 changed files with 5 additions and 6 deletions
|
|
@ -563,11 +563,10 @@ void BattleGroundAB::UpdatePlayerScore(Player* source, uint32 type, uint32 value
|
|||
|
||||
bool BattleGroundAB::IsAllNodesControlledByTeam(Team team) const
|
||||
{
|
||||
uint8 count = 0;
|
||||
for (uint8 i = 0; i < BG_AB_NODES_MAX; ++i)
|
||||
if ((team == ALLIANCE && m_Nodes[i] == BG_AB_NODE_STATUS_ALLY_OCCUPIED) ||
|
||||
(team == HORDE && m_Nodes[i] == BG_AB_NODE_STATUS_HORDE_OCCUPIED))
|
||||
++count;
|
||||
if ((team == ALLIANCE && m_Nodes[i] != BG_AB_NODE_STATUS_ALLY_OCCUPIED) ||
|
||||
(team == HORDE && m_Nodes[i] != BG_AB_NODE_STATUS_HORDE_OCCUPIED))
|
||||
return false;
|
||||
|
||||
return count == BG_AB_NODES_MAX;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12147"
|
||||
#define REVISION_NR "12148"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue