Core/Spells: Updated spell shapeshift form flags enum
Port From (https://github.com/TrinityCore/TrinityCore/commit/6db27c58b97a028026e0159109fbf20f6132e6b5)
This commit is contained in:
@@ -1701,15 +1701,23 @@ namespace Framework.Constants
|
||||
|
||||
public enum SpellShapeshiftFormFlags
|
||||
{
|
||||
IsNotAShapeshift = 0x0001,
|
||||
CannotCancel = 0x0002, // Player Cannot Cancel The Aura Giving This Shapeshift
|
||||
CanInteract = 0x0008, // If The Form Does Not Have IsNotAShapeshift Then This Flag Must Be Present To Allow Npc Interaction
|
||||
CanEquipItems = 0x0040, // If The Form Does Not Have IsNotAShapeshift Then This Flag Allows Equipping Items Without ItemFlagUsableWhenShapeshifted
|
||||
CanUseItems = 0x0080, // If The Form Does Not Have IsNotAShapeshift Then This Flag Allows Using Items Without ItemFlagUsableWhenShapeshifted
|
||||
CanAutoUnshift = 0x0100, // Clientside
|
||||
PreventLfgTeleport = 0x0200,
|
||||
PreventUsingOwnSkills = 0x0400, // Prevents Using Spells That Don'T Have Any Shapeshift Requirement
|
||||
PreventEmoteSounds = 0x1000a
|
||||
Stance = 0x01,
|
||||
NotToggleable = 0x02, // player cannot cancel the aura giving this shapeshift
|
||||
PersistOnDeath = 0x04,
|
||||
CanInteractNPC = 0x08, // if the form does not have SHAPESHIFT_FORM_IS_NOT_A_SHAPESHIFT then this flag must be present to allow NPC interaction
|
||||
DontUseWeapon = 0x10,
|
||||
|
||||
CanUseEquippedItems = 0x40, // if the form does not have SHAPESHIFT_FORM_IS_NOT_A_SHAPESHIFT then this flag allows equipping items without ITEM_FLAG_USABLE_WHEN_SHAPESHIFTED
|
||||
CanUseItems = 0x80, // if the form does not have SHAPESHIFT_FORM_IS_NOT_A_SHAPESHIFT then this flag allows using items without ITEM_FLAG_USABLE_WHEN_SHAPESHIFTED
|
||||
DontAutoUnshift = 0x100, // clientside
|
||||
ConsideredDead = 0x200,
|
||||
CanOnlyCastShapeshiftSpells = 0x400, // prevents using spells that don't have any shapeshift requirement
|
||||
StanceCancelsAtFlightmaster = 0x800,
|
||||
NoEmoteSounds = 0x1000,
|
||||
NoTriggerTeleport = 0x2000,
|
||||
CannotChangeEquippedItems = 0x4000,
|
||||
|
||||
CannotUseGameObjects = 0x10000
|
||||
}
|
||||
|
||||
public enum SummonPropFlags
|
||||
|
||||
@@ -337,7 +337,16 @@ namespace Framework.Constants
|
||||
Stealth = 30,
|
||||
MoonkinForm = 31,
|
||||
SpiritOfRedemption = 32,
|
||||
GladiatorStance = 33
|
||||
GladiatorStance = 33,
|
||||
Metamorphosis2 = 34,
|
||||
MoonkinRestoration = 35,
|
||||
TreantForm = 36,
|
||||
SpiritOwlForm = 37,
|
||||
SpiritOwl2 = 38,
|
||||
WispForm = 39,
|
||||
Wisp2 = 40,
|
||||
Soulshape = 41,
|
||||
ForgeborneReveries = 42
|
||||
}
|
||||
|
||||
public enum ReactiveType
|
||||
|
||||
@@ -2726,7 +2726,6 @@ namespace Game.Entities
|
||||
});
|
||||
|
||||
return itemList;
|
||||
|
||||
}
|
||||
public bool HasItemCount(uint item, uint count = 1, bool inBankAlso = false)
|
||||
{
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user