Core/WorldStates: Migrate war mode bonus value worldstates to new system

This commit is contained in:
Shauren
2022-07-01 15:19:31 +02:00
parent cfca26c264
commit 4ac86c13d2
6 changed files with 51 additions and 43 deletions

View File

@@ -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