if (player->GetTeam() == ALLIANCE)
{
if (!IsHordeFlagPickedup())
return;
SetHordeFlagPicker(ObjectGuid::Empty); // must be before aura remove to prevent 2 events (drop+capture) at the same time
// horde flag in base (but not respawned yet)
_flagState[TEAM_HORDE] = BG_WS_FLAG_STATE_WAIT_RESPAWN;
// Drop Horde Flag from Player
player->RemoveAurasDueToSpell(BG_WS_SPELL_WARSONG_FLAG);
if (_flagDebuffState == 1)
player->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
else if (_flagDebuffState == 2)
player->RemoveAurasDueToSpell(WS_SPELL_BRUTAL_ASSAULT);
if (GetTeamScore(TEAM_ALLIANCE) < BG_WS_MAX_TEAM_SCORE)
AddPoint(ALLIANCE, 1);
PlaySoundToAll(BG_WS_SOUND_FLAG_CAPTURED_ALLIANCE);
RewardReputationToTeam(890, m_ReputationCapture, ALLIANCE);
[COLOR="#00FF00"] if (player->hasQuest(1234) && player->GetQuestStatus(1234) == QUEST_STATUS_INCOMPLETE)
player->AreaExploredOrEventHappens(1234)[/COLOR]
}
else
{
if (!IsAllianceFlagPickedup())
return;
SetAllianceFlagPicker(ObjectGuid::Empty); // must be before aura remove to prevent 2 events (drop+capture) at the same time
// alliance flag in base (but not respawned yet)
_flagState[TEAM_ALLIANCE] = BG_WS_FLAG_STATE_WAIT_RESPAWN;
// Drop Alliance Flag from Player
player->RemoveAurasDueToSpell(BG_WS_SPELL_SILVERWING_FLAG);
if (_flagDebuffState == 1)
player->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
else if (_flagDebuffState == 2)
player->RemoveAurasDueToSpell(WS_SPELL_BRUTAL_ASSAULT);
if (GetTeamScore(TEAM_HORDE) < BG_WS_MAX_TEAM_SCORE)
AddPoint(HORDE, 1);
PlaySoundToAll(BG_WS_SOUND_FLAG_CAPTURED_HORDE);
RewardReputationToTeam(889, m_ReputationCapture, HORDE);
[COLOR="#00FF00"] if (player->hasQuest(12345) && player->GetQuestStatus(12345) == QUEST_STATUS_INCOMPLETE)
player->AreaExploredOrEventHappens(12345)[/COLOR]
}