diff --git a/src/game/DBCEnums.h b/src/game/DBCEnums.h index 257a6e6d1..a0461aaee 100644 --- a/src/game/DBCEnums.h +++ b/src/game/DBCEnums.h @@ -399,6 +399,32 @@ enum SummonPropFlags SUMMON_PROP_FLAG_UNK14 = 0x2000, // 2 spells in 3.0.3, escort? }; +// SpellEntry::Targets +enum SpellCastTargetFlags +{ + TARGET_FLAG_SELF = 0x00000000, + TARGET_FLAG_UNUSED1 = 0x00000001, // not used in any spells as of 3.0.3 (can be set dynamically) + TARGET_FLAG_UNIT = 0x00000002, // pguid + TARGET_FLAG_UNUSED2 = 0x00000004, // not used in any spells as of 3.0.3 (can be set dynamically) + TARGET_FLAG_UNUSED3 = 0x00000008, // not used in any spells as of 3.0.3 (can be set dynamically) + TARGET_FLAG_ITEM = 0x00000010, // pguid + TARGET_FLAG_SOURCE_LOCATION = 0x00000020, // 3 float + TARGET_FLAG_DEST_LOCATION = 0x00000040, // 3 float + TARGET_FLAG_OBJECT_UNK = 0x00000080, // used in 7 spells only + TARGET_FLAG_UNIT_UNK = 0x00000100, // looks like self target (480 spells) + TARGET_FLAG_PVP_CORPSE = 0x00000200, // pguid + TARGET_FLAG_UNIT_CORPSE = 0x00000400, // 10 spells (gathering professions) + TARGET_FLAG_OBJECT = 0x00000800, // pguid, 2 spells + TARGET_FLAG_TRADE_ITEM = 0x00001000, // pguid, 0 spells + TARGET_FLAG_STRING = 0x00002000, // string, 0 spells + TARGET_FLAG_UNK1 = 0x00004000, // 199 spells, opening object/lock + TARGET_FLAG_CORPSE = 0x00008000, // pguid, resurrection spells + TARGET_FLAG_UNK2 = 0x00010000, // pguid, not used in any spells as of 3.0.3 (can be set dynamically) + TARGET_FLAG_GLYPH = 0x00020000, // used in glyph spells + TARGET_FLAG_UNK3 = 0x00040000, // + TARGET_FLAG_UNK4 = 0x00080000 // uint32, loop { vec3, guid -> if guid == 0 break } +}; + enum SpellEffectIndex { EFFECT_INDEX_0 = 0, diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 191196818..3548a30de 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -770,7 +770,10 @@ bool Item::IsFitToSpellRequirements(SpellEntry const* spellInfo) const } } - if(spellInfo->EquippedItemInventoryTypeMask != 0) // 0 == any inventory type + // Only check for item enchantments (TARGET_FLAG_ITEM), all other spells are either NPC spells + // or spells where slot requirements are already handled with AttributesEx3 fields + // and special code (Titan's Grip, Windfury Attack). Check clearly not applicable for Lava Lash. + if(spellInfo->EquippedItemInventoryTypeMask != 0 && (spellInfo->Targets & TARGET_FLAG_ITEM)) // 0 == any inventory type { if((spellInfo->EquippedItemInventoryTypeMask & (1 << proto->InventoryType)) == 0) return false; // inventory type not present in mask diff --git a/src/game/Spell.h b/src/game/Spell.h index 27aaf4dd8..7dec310d0 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -35,31 +35,6 @@ class GameObject; class Group; class Aura; -enum SpellCastTargetFlags -{ - TARGET_FLAG_SELF = 0x00000000, - TARGET_FLAG_UNUSED1 = 0x00000001, // not used in any spells as of 3.0.3 (can be set dynamically) - TARGET_FLAG_UNIT = 0x00000002, // pguid - TARGET_FLAG_UNUSED2 = 0x00000004, // not used in any spells as of 3.0.3 (can be set dynamically) - TARGET_FLAG_UNUSED3 = 0x00000008, // not used in any spells as of 3.0.3 (can be set dynamically) - TARGET_FLAG_ITEM = 0x00000010, // pguid - TARGET_FLAG_SOURCE_LOCATION = 0x00000020, // 3 float - TARGET_FLAG_DEST_LOCATION = 0x00000040, // 3 float - TARGET_FLAG_OBJECT_UNK = 0x00000080, // used in 7 spells only - TARGET_FLAG_UNIT_UNK = 0x00000100, // looks like self target (480 spells) - TARGET_FLAG_PVP_CORPSE = 0x00000200, // pguid - TARGET_FLAG_UNIT_CORPSE = 0x00000400, // 10 spells (gathering professions) - TARGET_FLAG_OBJECT = 0x00000800, // pguid, 2 spells - TARGET_FLAG_TRADE_ITEM = 0x00001000, // pguid, 0 spells - TARGET_FLAG_STRING = 0x00002000, // string, 0 spells - TARGET_FLAG_UNK1 = 0x00004000, // 199 spells, opening object/lock - TARGET_FLAG_CORPSE = 0x00008000, // pguid, resurrection spells - TARGET_FLAG_UNK2 = 0x00010000, // pguid, not used in any spells as of 3.0.3 (can be set dynamically) - TARGET_FLAG_GLYPH = 0x00020000, // used in glyph spells - TARGET_FLAG_UNK3 = 0x00040000, // - TARGET_FLAG_UNK4 = 0x00080000 // uint32, loop { vec3, guid -> if guid == 0 break } -}; - enum SpellCastFlags { CAST_FLAG_NONE = 0x00000000, diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c6508e84a..8823efa37 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10121" + #define REVISION_NR "10122" #endif // __REVISION_NR_H__