Core/Auras: Updated mount capability check and implemented SPELL_AURA_MOUNT_RESTRICTIONS

This commit is contained in:
hondacrx
2017-12-13 14:34:37 -05:00
parent e26e0783ab
commit 4b2675944b
7 changed files with 93 additions and 34 deletions
+1 -1
View File
@@ -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)]
+7 -6
View File
@@ -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;
}