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:
@@ -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 ***/
|
||||
/****************************/
|
||||
|
||||
Reference in New Issue
Block a user