Misc fixes

This commit is contained in:
hondacrx
2024-03-19 17:21:32 -04:00
parent 5237c49b77
commit 1e421b9f53
71 changed files with 337 additions and 319 deletions
+5 -5
View File
@@ -476,7 +476,7 @@ namespace Game.Spells
return true;
SpellCategoryRecord category = CliDB.SpellCategoryStorage.LookupByKey(CategoryId);
return category != null && category.Flags.HasAnyFlag(SpellCategoryFlags.CooldownStartsOnEvent);
return category != null && category.HasFlag(SpellCategoryFlags.CooldownStartsOnEvent);
}
public bool IsDeathPersistent()
@@ -796,12 +796,12 @@ namespace Game.Spells
Log.outError(LogFilter.Spells, "GetErrorAtShapeshiftedCast: unknown shapeshift {0}", form);
return SpellCastResult.SpellCastOk;
}
actAsShifted = !shapeInfo.Flags.HasAnyFlag(SpellShapeshiftFormFlags.Stance);
actAsShifted = !shapeInfo.HasFlag(SpellShapeshiftFormFlags.Stance);
}
if (actAsShifted)
{
if (HasAttribute(SpellAttr0.NotShapeshifted) || (shapeInfo != null && shapeInfo.Flags.HasAnyFlag(SpellShapeshiftFormFlags.CanOnlyCastShapeshiftSpells))) // not while shapeshifted
if (HasAttribute(SpellAttr0.NotShapeshifted) || (shapeInfo != null && shapeInfo.HasFlag(SpellShapeshiftFormFlags.CanOnlyCastShapeshiftSpells))) // not while shapeshifted
return SpellCastResult.NotShapeshift;
else if (Stances != 0) // needs other shapeshift
return SpellCastResult.OnlyShapeshift;
@@ -849,7 +849,7 @@ namespace Game.Spells
{
AreaTableRecord areaTable = CliDB.AreaTableStorage.LookupByKey(area_id);
if (areaTable != null)
mountFlags = areaTable.GetMountFlags();
mountFlags = (AreaMountFlags)areaTable.MountFlags;
}
if (!mountFlags.HasFlag(AreaMountFlags.AllowFlyingMounts))
return SpellCastResult.IncorrectArea;
@@ -1245,7 +1245,7 @@ namespace Game.Spells
if (effectInfo.IsAura(AuraType.ModShapeshift))
{
var shapeShiftFromEntry = CliDB.SpellShapeshiftFormStorage.LookupByKey((uint)effectInfo.MiscValue);
if (shapeShiftFromEntry != null && !shapeShiftFromEntry.Flags.HasAnyFlag(SpellShapeshiftFormFlags.Stance))
if (shapeShiftFromEntry != null && !shapeShiftFromEntry.HasFlag(SpellShapeshiftFormFlags.Stance))
checkMask |= VehicleSeatFlags.Uncontrolled;
break;
}