mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Conditions: partially revert 723c253, replacing CONDITION_WINTERGRASP_HORDE with a ConditionScript.
This commit is contained in:
@@ -628,6 +628,34 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class condition_is_wintergrasp_horde : public ConditionScript
|
||||
{
|
||||
public:
|
||||
condition_is_wintergrasp_horde() : ConditionScript("condition_is_wintergrasp_horde") { }
|
||||
|
||||
bool OnConditionCheck(Condition const* /* condition */, ConditionSourceInfo& /* sourceInfo */)
|
||||
{
|
||||
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
|
||||
if (wintergrasp->IsEnabled() && wintergrasp->GetDefenderTeam() == TEAM_HORDE)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class condition_is_wintergrasp_alliance : public ConditionScript
|
||||
{
|
||||
public:
|
||||
condition_is_wintergrasp_alliance() : ConditionScript("condition_is_wintergrasp_alliance") { }
|
||||
|
||||
bool OnConditionCheck(Condition const* /* condition */, ConditionSourceInfo& /* sourceInfo */)
|
||||
{
|
||||
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
|
||||
if (wintergrasp->IsEnabled() && wintergrasp->GetDefenderTeam() == TEAM_ALLIANCE)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_wintergrasp()
|
||||
{
|
||||
new npc_wg_queue();
|
||||
@@ -640,4 +668,6 @@ void AddSC_wintergrasp()
|
||||
new achievement_wg_didnt_stand_a_chance();
|
||||
new spell_wintergrasp_defender_teleport();
|
||||
new spell_wintergrasp_defender_teleport_trigger();
|
||||
new condition_is_wintergrasp_horde();
|
||||
new condition_is_wintergrasp_alliance();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user