Core/Battlegrounds: Implement mercenary system

Port From (https://github.com/TrinityCore/TrinityCore/commit/87723e32e24f03ac1d062e33edcbe935e4e59421)
This commit is contained in:
hondacrx
2022-05-31 11:46:04 -04:00
parent 6751370788
commit 1ba88f81db
9 changed files with 90 additions and 3 deletions
+11
View File
@@ -5736,6 +5736,17 @@ namespace Game.Spells
}
}
[AuraEffectHandler(AuraType.SwitchTeam)]
void HandleSwitchTeam(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasFlag(AuraEffectHandleModes.Real))
return;
Player player = aurApp.GetTarget().ToPlayer();
if (player != null)
player.SwitchToOppositeTeam(apply);
}
[AuraEffectHandler(AuraType.SetFFAPvp)]
void HandleSetFFAPvP(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{