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

Port From (https://github.com/TrinityCore/TrinityCore/commit/4ac86c13d2b00817c9213ca2c22b747d3fff454e)
This commit is contained in:
hondacrx
2022-07-01 22:53:01 -04:00
parent 25bbf63341
commit cabb59efe8
6 changed files with 55 additions and 41 deletions
+9 -4
View File
@@ -4441,10 +4441,15 @@ namespace Scripts.Spells.Generic
if (target == null)
return;
if (target.GetTeamId() == Global.WorldMgr.GetWarModeDominantFaction())
return;
amount += Global.WorldMgr.GetWarModeOutnumberedFactionReward();
switch (target.GetTeamId())
{
case TeamId.Alliance:
amount = Global.WorldStateMgr.GetValue(WorldStates.WarModeAllianceBuffValue, null);
break;
case TeamId.Horde:
amount = Global.WorldStateMgr.GetValue(WorldStates.WarModeHordeBuffValue, null);
break;
}
}
public override void Register()