diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h index e54b526d8..c7efc69d6 100644 --- a/src/game/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -1981,6 +1981,7 @@ struct SpellEntry inline bool HasAttribute(SpellAttributesEx5 attribute) const { return AttributesEx5 & attribute; } inline bool HasAttribute(SpellAttributesEx6 attribute) const { return AttributesEx6 & attribute; } inline bool HasAttribute(SpellAttributesEx7 attribute) const { return AttributesEx7 & attribute; } + inline bool HasAttribute(SpellAttributesEx8 attribute) const { return AttributesEx8 & attribute; } private: // prevent creating custom entries (copy data from original in fact) diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 2b5be1df8..476f53f31 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -432,7 +432,7 @@ enum SpellAttributesEx5 SPELL_ATTR_EX5_UNK7 = 0x00000080,// 7 SPELL_ATTR_EX5_UNK8 = 0x00000100,// 8 SPELL_ATTR_EX5_START_PERIODIC_AT_APPLY = 0x00000200,// 9 begin periodic tick at aura apply - SPELL_ATTR_EX5_UNK10 = 0x00000400,// 10 + SPELL_ATTR_EX5_HIDE_DURATION = 0x00000400,// 10 SPELL_ATTR_EX5_UNK11 = 0x00000800,// 11 SPELL_ATTR_EX5_UNK12 = 0x00001000,// 12 SPELL_ATTR_EX5_UNK13 = 0x00002000,// 13 haste affects duration (e.g. 8050 since 3.3.3) @@ -528,6 +528,42 @@ enum SpellAttributesEx7 SPELL_ATTR_EX7_UNK31 = 0x80000000,// 31 }; +enum SpellAttributesEx8 +{ + SPELL_ATTR_EX8_UNK0 = 0x00000001,// 0 + SPELL_ATTR_EX8_UNK1 = 0x00000002,// 1 Single spell Summon Fire (94655) + SPELL_ATTR_EX8_UNK2 = 0x00000004,// 2 Luck of the Draw and Whirling Blades + SPELL_ATTR_EX8_UNK3 = 0x00000008,// 3 + SPELL_ATTR_EX8_UNK4 = 0x00000010,// 4 + SPELL_ATTR_EX8_UNK5 = 0x00000020,// 5 + SPELL_ATTR_EX8_UNK6 = 0x00000040,// 6 Rune Strike, [DND] Falling, Altered Form + SPELL_ATTR_EX8_UNK7 = 0x00000080,// 7 + SPELL_ATTR_EX8_UNK8 = 0x00000100,// 8 some raid-wide buffs + SPELL_ATTR_EX8_UNK9 = 0x00000200,// 9 some dot/hot spells + SPELL_ATTR_EX8_UNK10 = 0x00000400,// 10 some transformation spells + SPELL_ATTR_EX8_UNK11 = 0x00000800,// 11 Phase 2 Intro Aura (80224) + SPELL_ATTR_EX8_AURA_SENDS_AMOUNT = 0x00001000,// 12 + SPELL_ATTR_EX8_UNK13 = 0x00002000,// 13 + SPELL_ATTR_EX8_UNK14 = 0x00004000,// 14 Focus Magic, Honor Among Thieves, Turn the Tables + SPELL_ATTR_EX8_UNK15 = 0x00008000,// 15 River Boat (76203) + SPELL_ATTR_EX8_UNK16 = 0x00010000,// 16 + SPELL_ATTR_EX8_UNK17 = 0x00020000,// 17 + SPELL_ATTR_EX8_UNK18 = 0x00040000,// 18 Dark Simulacrum, Soul Swap + SPELL_ATTR_EX8_UNK19 = 0x00080000,// 19 Slice and Dice, Savage Roar, Recuperate + SPELL_ATTR_EX8_ARMOR_SPECIALIZATION = 0x00100000,// 20 + SPELL_ATTR_EX8_UNK21 = 0x00200000,// 21 some spells that summon smth + SPELL_ATTR_EX8_UNK22 = 0x00400000,// 22 some health-affecting spells + SPELL_ATTR_EX8_UNK23 = 0x00800000,// 23 spells that show revive player and show messagebox + SPELL_ATTR_EX8_UNK24 = 0x01000000,// 24 some healing spells + SPELL_ATTR_EX8_UNK25 = 0x02000000,// 25 mostly druid and mostly feral spells + SPELL_ATTR_EX8_RAID_MARKER = 0x04000000,// 26 probably spell doesn't need to be learned to cast. Raid markers + Juggle Torch (Catch) + SPELL_ATTR_EX8_UNK27 = 0x08000000,// 27 + SPELL_ATTR_EX8_GUILD_PERKS = 0x10000000,// 28 + SPELL_ATTR_EX8_MASTERY = 0x20000000,// 29 + SPELL_ATTR_EX8_UNK30 = 0x40000000,// 30 + SPELL_ATTR_EX8_UNK31 = 0x80000000,// 31 +}; + #define MAX_TALENT_SPEC_COUNT 2 #define MAX_GLYPH_SLOT_INDEX 6 diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 753dfbfe8..73315864e 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -8876,7 +8876,22 @@ void SpellAuraHolder::_AddSpellAuraHolder() if (m_auras[i]) flags |= (1 << i); } - flags |= ((GetCasterGuid() == GetTarget()->GetObjectGuid()) ? AFLAG_NOT_CASTER : AFLAG_NONE) | ((GetSpellMaxDuration(m_spellProto) > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE); + + if (GetCasterGuid() == GetTarget()->GetObjectGuid()) + flags |= AFLAG_NOT_CASTER; + + if (!m_spellProto->HasAttribute(SPELL_ATTR_EX5_HIDE_DURATION) && GetSpellMaxDuration(m_spellProto) > 0) + flags |= AFLAG_DURATION; + + if (IsPositive()) + flags |= AFLAG_POSITIVE; + else + flags |= AFLAG_NEGATIVE; + + if (m_spellProto->HasAttribute(SPELL_ATTR_EX8_AURA_SENDS_AMOUNT) && + flags & (AFLAG_EFF_INDEX_0 | AFLAG_EFF_INDEX_1 | AFLAG_EFF_INDEX_2)) + flags |= AFLAG_EFFECT_AMOUNT_SEND; + SetAuraFlags(flags); SetAuraLevel(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL)); @@ -9253,6 +9268,14 @@ void SpellAuraHolder::BuildUpdatePacket(WorldPacket& data) const data << uint32(GetAuraMaxDuration()); data << uint32(GetAuraDuration()); } + + if (auraFlags & AFLAG_EFFECT_AMOUNT_SEND) + { + for (uint8 i = 0; i < MAX_EFFECT_INDEX; ++i) + if (auraFlags & (1 << i)) + if (Aura const* aura = m_auras[i]) + data << int32(aura->GetModifier()->m_amount); + } } void SpellAuraHolder::SendAuraUpdate(bool remove) const diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0e84cbc0a..f06b1ab58 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 "0089" + #define REVISION_NR "0090" #endif // __REVISION_NR_H__