Core/Auras: Updated mount capability check and implemented SPELL_AURA_MOUNT_RESTRICTIONS
This commit is contained in:
@@ -1025,7 +1025,7 @@ namespace Game.Spells
|
||||
[AuraEffectHandler(AuraType.Unk324)]
|
||||
[AuraEffectHandler(AuraType.ModBlind)]
|
||||
[AuraEffectHandler(AuraType.Unk335)]
|
||||
[AuraEffectHandler(AuraType.ModFlyingRestrictions)]
|
||||
[AuraEffectHandler(AuraType.MountRestrictions)]
|
||||
[AuraEffectHandler(AuraType.IncreaseSkillGainChance)]
|
||||
[AuraEffectHandler(AuraType.ModResurrectedHealthByGuildMember)]
|
||||
[AuraEffectHandler(AuraType.ModAutoattackDamage)]
|
||||
|
||||
@@ -896,14 +896,15 @@ namespace Game.Spells
|
||||
|
||||
switch (effect.ApplyAuraName)
|
||||
{
|
||||
case AuraType.Fly:
|
||||
case AuraType.ModShapeshift:
|
||||
{
|
||||
var bounds = Global.SpellMgr.GetSkillLineAbilityMapBounds(Id);
|
||||
foreach (var skillRecord in bounds)
|
||||
SpellShapeshiftFormRecord spellShapeshiftForm = CliDB.SpellShapeshiftFormStorage.LookupByKey(effect.MiscValue);
|
||||
if (spellShapeshiftForm != null)
|
||||
{
|
||||
if (skillRecord.SkillLine == (int)SkillType.Mounts)
|
||||
if (!player.CanFlyInZone(map_id, zone_id))
|
||||
return SpellCastResult.IncorrectArea;
|
||||
uint mountType = spellShapeshiftForm.MountTypeID;
|
||||
if (mountType != 0)
|
||||
if (player.GetMountCapability(mountType) == null)
|
||||
return SpellCastResult.NotHere;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user