Core/Auras: Implemented SPELL_AURA_ADV_FLYING

Port From (https://github.com/TrinityCore/TrinityCore/commit/c7a073140cb9cc41aefaff76eca5355acceff409)
This commit is contained in:
Hondacrx
2024-11-10 22:19:03 -05:00
parent 3a4eec6ebd
commit 16f13eece9
4 changed files with 26 additions and 6 deletions
+17
View File
@@ -2219,7 +2219,10 @@ namespace Game.Spells
{
var mountCapability = CliDB.MountCapabilityStorage.LookupByKey(GetAmount());
if (mountCapability != null)
{
target.SetFlightCapabilityID(mountCapability.FlightCapabilityID, true);
target.CastSpell(target, mountCapability.ModSpellAuraID, new CastSpellExtraArgs(this));
}
}
}
else
@@ -2239,6 +2242,8 @@ namespace Game.Spells
var mountCapability = CliDB.MountCapabilityStorage.LookupByKey(GetAmount());
if (mountCapability != null)
target.RemoveAurasDueToSpell(mountCapability.ModSpellAuraID, target.GetGUID());
target.SetFlightCapabilityID(0, true);
}
}
}
@@ -2373,6 +2378,18 @@ namespace Game.Spells
target.SetCanTurnWhileFalling(apply);
}
[AuraEffectHandler(AuraType.AdvFlying)]
void HandleModAdvFlying(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag(AuraEffectHandleModes.SendForClientMask))
return;
Unit target = aurApp.GetTarget();
target.SetCanDoubleJump(apply || target.HasAura(196055));
target.SetCanFly(apply);
target.SetCanAdvFly(apply);
}
[AuraEffectHandler(AuraType.IgnoreMovementForces)]
void HandleIgnoreMovementForces(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{