Você está na página 1de 5

case TR_FEL_REAVER_POINT:

- if (m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL &&


m_PointOwnedByTeam[FEL_REAVER] == player->GetBGTeam())
+ if (m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL &&
m_PointOwnedByTeam[FEL_REAVER] == player->GetTeam())
if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
EventPlayerCapturedFlag(player, BG_EY_OBJECT_FLAG_FEL_REAVER);
break;
case TR_MAGE_TOWER_POINT:
- if (m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL &&
m_PointOwnedByTeam[MAGE_TOWER] == player->GetBGTeam())
+ if (m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL &&
m_PointOwnedByTeam[MAGE_TOWER] == player->GetTeam())
if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
EventPlayerCapturedFlag(player, BG_EY_OBJECT_FLAG_MAGE_TOWER);
break;
case TR_DRAENEI_RUINS_POINT:
- if (m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL &&
m_PointOwnedByTeam[DRAENEI_RUINS] == player->GetBGTeam())
+ if (m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL &&
m_PointOwnedByTeam[DRAENEI_RUINS] == player->GetTeam())
if (m_FlagState && GetFlagPickerGUID() == player->GetGUID())
EventPlayerCapturedFlag(player,
BG_EY_OBJECT_FLAG_DRAENEI_RUINS);
break;
@@ -621,7 +621,7 @@ void BattlegroundEY::EventPlayerDroppedFlag(Player* Source)
UpdateWorldState(NETHERSTORM_FLAG_STATE_HORDE, BG_EY_FLAG_STATE_WAIT_RESPAWN);
UpdateWorldState(NETHERSTORM_FLAG_STATE_ALLIANCE,
BG_EY_FLAG_STATE_WAIT_RESPAWN);

- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE,
NULL);
else
SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, NULL);
@@ -632,7 +632,7 @@ void BattlegroundEY::EventPlayerClickedOnFlag(Player* Source,
GameObject* target
if (GetStatus() != STATUS_IN_PROGRESS || IsFlagPickedup() || !Source-
>IsWithinDistInMap(target_obj, 10))
return;

- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
{
UpdateWorldState(NETHERSTORM_FLAG_STATE_ALLIANCE,
BG_EY_FLAG_STATE_ON_PLAYER);
PlaySoundToAll(BG_EY_SOUND_FLAG_PICKED_UP_ALLIANCE);
@@ -653,7 +653,7 @@ void BattlegroundEY::EventPlayerClickedOnFlag(Player* Source,
GameObject* target
Source->CastSpell(Source, BG_EY_NETHERSTORM_FLAG_SPELL, true);
Source->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);

- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
PSendMessageToAll(LANG_BG_EY_HAS_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE,
NULL, Source->GetName().c_str());
else
PSendMessageToAll(LANG_BG_EY_HAS_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_HORDE,
NULL, Source->GetName().c_str());
@@ -712,7 +712,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* Source,
uint32 Point)
if (GetStatus() != STATUS_IN_PROGRESS)
return;

- uint32 Team = Source->GetBGTeam();


+ uint32 Team = Source->GetTeam();

SpawnBGObject(m_CapturingPointTypes[Point].DespawnNeutralObjectType,
RESPAWN_ONE_DAY);
SpawnBGObject(m_CapturingPointTypes[Point].DespawnNeutralObjectType + 1,
RESPAWN_ONE_DAY);
@@ -785,7 +785,7 @@ void BattlegroundEY::EventPlayerCapturedFlag(Player* Source,
uint32 BgObjectType

Source->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);

- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
PlaySoundToAll(BG_EY_SOUND_FLAG_CAPTURED_ALLIANCE);
else
PlaySoundToAll(BG_EY_SOUND_FLAG_CAPTURED_HORDE);
@@ -796,7 +796,7 @@ void BattlegroundEY::EventPlayerCapturedFlag(Player* Source,
uint32 BgObjectType
m_FlagCapturedBgObjectType = BgObjectType;

uint8 team_id = 0;
- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
{
team_id = TEAM_ALLIANCE;
SendMessageToAll(LANG_BG_EY_CAPTURED_FLAG_A, CHAT_MSG_BG_SYSTEM_ALLIANCE,
Source);
@@ -808,7 +808,7 @@ void BattlegroundEY::EventPlayerCapturedFlag(Player* Source,
uint32 BgObjectType
}

if (m_TeamPointsCount[team_id] > 0)
- AddPoints(Source->GetBGTeam(), BG_EY_FlagPoints[m_TeamPointsCount[team_id]
- 1]);
+ AddPoints(Source->GetTeam(), BG_EY_FlagPoints[m_TeamPointsCount[team_id] -
1]);

UpdatePlayerScore(Source, SCORE_FLAG_CAPTURES, 1);


}
@@ -885,7 +885,7 @@ WorldSafeLocsEntry const*
BattlegroundEY::GetClosestGraveYard(Player* player)
{
uint32 g_id = 0;

- switch (player->GetBGTeam())
+ switch (player->GetTeam())
{
case ALLIANCE: g_id = EY_GRAVEYARD_MAIN_ALLIANCE; break;
case HORDE: g_id = EY_GRAVEYARD_MAIN_HORDE; break;
@@ -914,7 +914,7 @@ WorldSafeLocsEntry const*
BattlegroundEY::GetClosestGraveYard(Player* player)
for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
{
- if (m_PointOwnedByTeam[i] == player->GetBGTeam() && m_PointState[i] ==
EY_POINT_UNDER_CONTROL)
+ if (m_PointOwnedByTeam[i] == player->GetTeam() && m_PointState[i] ==
EY_POINT_UNDER_CONTROL)
{
entry =
sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[i].GraveYardId);
if (!entry)

src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -282,7 +282,7 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player* Source)
uint32 winner = 0;

Source->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);
- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
{
if (!IsHordeFlagPickedup())
return;
@@ -319,23 +319,23 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player* Source)
RewardReputationToTeam(889, m_ReputationCapture, HORDE);
}
//for flag capture is reward 2 honorable kills
- RewardHonorToTeam(GetBonusHonorFromKill(2), Source->GetBGTeam());
+ RewardHonorToTeam(GetBonusHonorFromKill(2), Source->GetTeam());

SpawnBGObject(BG_WS_OBJECT_H_FLAG, BG_WS_FLAG_RESPAWN_TIME);
SpawnBGObject(BG_WS_OBJECT_A_FLAG, BG_WS_FLAG_RESPAWN_TIME);

- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
SendMessageToAll(LANG_BG_WS_CAPTURED_HF, CHAT_MSG_BG_SYSTEM_ALLIANCE,
Source);
else
SendMessageToAll(LANG_BG_WS_CAPTURED_AF, CHAT_MSG_BG_SYSTEM_HORDE,
Source);

- UpdateFlagState(Source->GetBGTeam(), 1); // flag state none


+ UpdateFlagState(Source->GetTeam(), 1); // flag state none
UpdateTeamScore(Source->GetTeamId());
// only flag capture should be updated
UpdatePlayerScore(Source, SCORE_FLAG_CAPTURES, 1); // +1 flag captures

// update last flag capture to be used if teamscore is equal


- SetLastFlagCapture(Source->GetBGTeam());
+ SetLastFlagCapture(Source->GetTeam());

if (GetTeamScore(TEAM_ALLIANCE) == BG_WS_MAX_TEAM_SCORE)
winner = ALLIANCE;
@@ -356,7 +356,7 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player* Source)
}
else
{
- _flagsTimer[GetTeamIndexByTeamId(Source->GetBGTeam()) ? 0 : 1] =
BG_WS_FLAG_RESPAWN_TIME;
+ _flagsTimer[GetTeamIndexByTeamId(Source->GetTeam()) ? 0 : 1] =
BG_WS_FLAG_RESPAWN_TIME;
}
}

@@ -366,7 +366,7 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player* Source)


{
// if not running, do not cast things at the dropper player (prevent
spawning the "dropped" flag), neither send unnecessary messages
// just take off the aura
- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
{
if (!IsHordeFlagPickedup())
return;
@@ -391,7 +391,7 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player* Source)

bool set = false;

- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
{
if (!IsHordeFlagPickedup())
return;
@@ -429,9 +429,9 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player* Source)
if (set)
{
Source->CastSpell(Source, SPELL_RECENTLY_DROPPED_FLAG, true);
- UpdateFlagState(Source->GetBGTeam(), 1);
+ UpdateFlagState(Source->GetTeam(), 1);

- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
{
SendMessageToAll(LANG_BG_WS_DROPPED_HF, CHAT_MSG_BG_SYSTEM_HORDE,
Source);
UpdateWorldState(BG_WS_FLAG_UNK_HORDE, uint32(-1));
@@ -442,7 +442,7 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player* Source)
UpdateWorldState(BG_WS_FLAG_UNK_ALLIANCE, uint32(-1));
}

- _flagsDropTimer[GetTeamIndexByTeamId(Source->GetBGTeam()) ? 0 : 1] =
BG_WS_FLAG_DROP_TIME;
+ _flagsDropTimer[GetTeamIndexByTeamId(Source->GetTeam()) ? 0 : 1] =
BG_WS_FLAG_DROP_TIME;
}
}

@@ -455,7 +455,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source,


GameObject* target
ChatMsg type = CHAT_MSG_BG_SYSTEM_NEUTRAL;

//alliance flag picked up from base


- if (Source->GetBGTeam() == HORDE && GetFlagState(ALLIANCE) ==
BG_WS_FLAG_STATE_ON_BASE
+ if (Source->GetTeam() == HORDE && GetFlagState(ALLIANCE) ==
BG_WS_FLAG_STATE_ON_BASE
&& BgObjects[BG_WS_OBJECT_A_FLAG] == target_obj->GetGUID())
{
message_id = LANG_BG_WS_PICKEDUP_AF;
@@ -474,7 +474,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source,
GameObject* target
}

//horde flag picked up from base


- if (Source->GetBGTeam() == ALLIANCE && GetFlagState(HORDE) ==
BG_WS_FLAG_STATE_ON_BASE
+ if (Source->GetTeam() == ALLIANCE && GetFlagState(HORDE) ==
BG_WS_FLAG_STATE_ON_BASE
&& BgObjects[BG_WS_OBJECT_H_FLAG] == target_obj->GetGUID())
{
message_id = LANG_BG_WS_PICKEDUP_HF;
@@ -496,7 +496,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source,
GameObject* target
if (GetFlagState(ALLIANCE) == BG_WS_FLAG_STATE_ON_GROUND && Source-
>IsWithinDistInMap(target_obj, 10)
&& target_obj->GetGOInfo()->entry == BG_OBJECT_A_FLAG_GROUND_WS_ENTRY)
{
- if (Source->GetBGTeam() == ALLIANCE)
+ if (Source->GetTeam() == ALLIANCE)
{
message_id = LANG_BG_WS_RETURNED_AF;
type = CHAT_MSG_BG_SYSTEM_ALLIANCE;
@@ -531,7 +531,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* Source,
GameObject* target
if (GetFlagState(HORDE) == BG_WS_FLAG_STATE_ON_GROUND && Source-
>IsWithinDistInMap(target_obj, 10)
&& target_obj->GetGOInfo()->entry == BG_OBJECT_H_FLAG_GROUND_WS_ENTRY)
{
- if (Source->GetBGTeam() == HORDE)
+ if (Source->GetTeam() == HORDE)
{
message_id = LANG_BG_WS_RETURNED_HF;
type = CHAT_MSG_BG_SYSTEM_HORDE;
@@ -802,7 +802,7 @@ WorldSafeLocsEntry const*
BattlegroundWS::GetClosestGraveYard(Player* player)
//if a player dies in preparation phase - then the player can't cheat
//and teleport to the graveyard outside the flagroom
//and start running around, while the doors are still closed
- if (player->GetBGTeam() == ALLIANCE)
+ if (player->GetTeam() == ALLIANCE)
{
if (GetStatus() == STATUS_IN_PROGRESS)
return sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE);

Você também pode gostar