Core/Auras: Implemented SPELL_AURA_MOVE_SET_CANT_SWIM and related new opcodes

Port From (https://github.com/TrinityCore/TrinityCore/commit/010550da224c446461b26bc4f38ee5cc35d4aa3d)
This commit is contained in:
Hondacrx
2024-11-10 13:30:00 -05:00
parent 6c8387f9ec
commit 026e717fde
5 changed files with 46 additions and 1 deletions
+16
View File
@@ -2408,6 +2408,22 @@ namespace Game.Spells
target.SetDisableInertia(apply);
}
void HandleSetCantSwim(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag(AuraEffectHandleModes.SendForClientMask))
return;
Unit target = aurApp.GetTarget();
if (!apply)
{
// do not remove unit flag if there are more than this auraEffect of that kind on unit on unit
if (target.HasAuraType(GetAuraType()))
return;
}
target.SetMoveCantSwim(apply);
}
/****************************/
/*** THREAT ***/
/****************************/