diff options
| author | Shauren <shauren.trinity@gmail.com> | 2022-07-01 15:19:31 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-07-01 15:19:31 +0200 |
| commit | 4ac86c13d2b00817c9213ca2c22b747d3fff454e (patch) | |
| tree | c40dab4bf4ef1211a91e0f5215de2e6ade95901e /src/server/scripts | |
| parent | cfca26c2641f684533e07d9933ba1f31e5ef8204 (diff) | |
Core/WorldStates: Migrate war mode bonus value worldstates to new system
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 5127602b02e..89f49b6fa41 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -45,7 +45,7 @@ #include "SpellPackets.h" #include "SpellScript.h" #include "Vehicle.h" -#include "World.h" +#include "WorldStateMgr.h" class spell_gen_absorb0_hitlimit1 : public AuraScript { @@ -4821,10 +4821,15 @@ class spell_gen_war_mode_enlisted : public AuraScript if (!target) return; - if (target->GetTeamId() == sWorld->GetWarModeDominantFaction()) - return; - - amount += sWorld->GetWarModeOutnumberedFactionReward(); + switch (target->GetTeamId()) + { + case TEAM_ALLIANCE: + amount = sWorldStateMgr->GetValue(WS_WAR_MODE_ALLIANCE_BUFF_VALUE, nullptr); + break; + case TEAM_HORDE: + amount = sWorldStateMgr->GetValue(WS_WAR_MODE_HORDE_BUFF_VALUE, nullptr); + break; + } } void Register() override |
