Core/Spells: Fixed travel form

This commit is contained in:
hondacrx
2018-07-25 14:08:35 -04:00
parent 943e858ccf
commit 8673e7218d
8 changed files with 167 additions and 5 deletions
+1 -1
View File
@@ -6699,7 +6699,7 @@ namespace Game.Entities
if (GetDisplayId() != GetNativeDisplayId())
RestoreDisplayId(true);
if (IsDisallowedMountForm(getTransForm(), FORM_NONE, GetDisplayId()))
if (IsDisallowedMountForm(getTransForm(), ShapeShiftForm.None, GetDisplayId()))
{
GetSession().SendActivateTaxiReply(ActivateTaxiReply.PlayerShapeshifted);
return false;
+1 -1
View File
@@ -2160,7 +2160,7 @@ namespace Game.Entities
}
}
uint getTransForm() { return m_transform; }
public uint getTransForm() { return m_transform; }
public bool HasStealthAura() { return HasAuraType(AuraType.ModStealth); }
public bool HasInvisibilityAura() { return HasAuraType(AuraType.ModInvisibility); }
+1 -1
View File
@@ -256,7 +256,7 @@ namespace Game.Entities
return IsDisallowedMountForm(getTransForm(), GetShapeshiftForm(), GetDisplayId());
}
bool IsDisallowedMountForm(uint spellId, ShapeShiftForm form, uint displayId)
public bool IsDisallowedMountForm(uint spellId, ShapeShiftForm form, uint displayId)
{
SpellInfo transformSpellInfo = Global.SpellMgr.GetSpellInfo(getTransForm());
if (transformSpellInfo != null)
+3
View File
@@ -2750,6 +2750,9 @@ namespace Game.Entities
case 24314: // Threatening Gaze
spellInfo.AuraInterruptFlags[0] |= (uint)(SpellAuraInterruptFlags.Cast | SpellAuraInterruptFlags.Move | SpellAuraInterruptFlags.Jump);
break;
case 783: // Travel Form (dummy) - cannot be cast indoors.
spellInfo.Attributes |= SpellAttr0.OutdoorsOnly;
break;
case 5420: // Tree of Life (Passive)
spellInfo.Stances = 1 << ((int)ShapeShiftForm.TreeOfLife - 1);
break;