Core/Spells: Updated spell shapeshift form flags enum

Port From (https://github.com/TrinityCore/TrinityCore/commit/6db27c58b97a028026e0159109fbf20f6132e6b5)
This commit is contained in:
hondacrx
2021-03-28 14:44:49 -04:00
parent fea5674e88
commit d93c4fc3cb
5 changed files with 31 additions and 15 deletions
@@ -2726,7 +2726,6 @@ namespace Game.Entities
});
return itemList;
}
public bool HasItemCount(uint item, uint count = 1, bool inBankAlso = false)
{
+1 -1
View File
@@ -282,7 +282,7 @@ namespace Game.Entities
if (shapeshift == null)
return true;
if (!shapeshift.Flags.HasAnyFlag(SpellShapeshiftFormFlags.IsNotAShapeshift))
if (!shapeshift.Flags.HasAnyFlag(SpellShapeshiftFormFlags.Stance))
return true;
}
if (displayId == GetNativeDisplayId())
+3 -3
View File
@@ -814,12 +814,12 @@ namespace Game.Spells
Log.outError(LogFilter.Spells, "GetErrorAtShapeshiftedCast: unknown shapeshift {0}", form);
return SpellCastResult.SpellCastOk;
}
actAsShifted = !shapeInfo.Flags.HasAnyFlag(SpellShapeshiftFormFlags.IsNotAShapeshift);
actAsShifted = !shapeInfo.Flags.HasAnyFlag(SpellShapeshiftFormFlags.Stance);
}
if (actAsShifted)
{
if (HasAttribute(SpellAttr0.NotShapeshift) || (shapeInfo != null && shapeInfo.Flags.HasAnyFlag(SpellShapeshiftFormFlags.PreventUsingOwnSkills))) // not while shapeshifted
if (HasAttribute(SpellAttr0.NotShapeshift) || (shapeInfo != null && shapeInfo.Flags.HasAnyFlag(SpellShapeshiftFormFlags.CanOnlyCastShapeshiftSpells))) // not while shapeshifted
return SpellCastResult.NotShapeshift;
else if (Stances != 0) // needs other shapeshift
return SpellCastResult.OnlyShapeshift;
@@ -1214,7 +1214,7 @@ namespace Game.Spells
if (effect != null && effect.ApplyAuraName == AuraType.ModShapeshift)
{
var shapeShiftFromEntry = CliDB.SpellShapeshiftFormStorage.LookupByKey((uint)effect.MiscValue);
if (shapeShiftFromEntry != null && !shapeShiftFromEntry.Flags.HasAnyFlag(SpellShapeshiftFormFlags.IsNotAShapeshift))
if (shapeShiftFromEntry != null && !shapeShiftFromEntry.Flags.HasAnyFlag(SpellShapeshiftFormFlags.Stance))
checkMask |= VehicleSeatFlags.Uncontrolled;
break;
}