fix(Core/Spells): Glyphs should send SMSG_LEARNED_SPELL/SMSG_REMOVED_… (#7161)
* fix(Core/Spells): Glyphs should send SMSG_LEARNED_SPELL/SMSG_REMOVED_SPELL packet in case of updating spell tooltips. Fixed #6323 * chore(Core/CharacterHandler): improve comment * chore(Core/SpellEffects): improve comment Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
parent
ed4cfd37f4
commit
ffdd990aa4
3 changed files with 21 additions and 1 deletions
|
|
@ -2670,6 +2670,21 @@ void Player::SendInitialSpells()
|
|||
++spellCount;
|
||||
}
|
||||
|
||||
// Added spells from glyphs too (needed by spell tooltips)
|
||||
for (uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i)
|
||||
{
|
||||
if (uint32 glyph = GetGlyph(i))
|
||||
{
|
||||
if (GlyphPropertiesEntry const* glyphEntry = sGlyphPropertiesStore.LookupEntry(glyph))
|
||||
{
|
||||
data << uint32(glyphEntry->SpellId);
|
||||
data << uint16(0); // it's not slot id
|
||||
|
||||
++spellCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// xinef: we have to send talents, but not those on m_spells list
|
||||
for (PlayerTalentMap::iterator itr = m_talents.begin(); itr != m_talents.end(); ++itr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1548,6 +1548,7 @@ void WorldSession::HandleRemoveGlyph(WorldPacket& recvData)
|
|||
if (GlyphPropertiesEntry const* glyphEntry = sGlyphPropertiesStore.LookupEntry(glyph))
|
||||
{
|
||||
_player->RemoveAurasDueToSpell(glyphEntry->SpellId);
|
||||
_player->SendLearnPacket(glyphEntry->SpellId, false); // Send packet to properly handle client-side spell tooltips
|
||||
_player->SetGlyph(slot, 0, true);
|
||||
_player->SendTalentsInfoData(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS] =
|
|||
&Spell::EffectTeleUnitsFaceCaster, // 43 SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER
|
||||
&Spell::EffectLearnSkill, // 44 SPELL_EFFECT_SKILL_STEP
|
||||
&Spell::EffectAddHonor, // 45 SPELL_EFFECT_ADD_HONOR honor/pvp related
|
||||
&Spell::EffectUnused, // 46 SPELL_EFFECT_SPAWN clientside, unit appears as if it was just spawned
|
||||
&Spell::EffectUnused, // 46 SPELL_EFFECT_SPAWN client-side, unit appears as if it was just spawned
|
||||
&Spell::EffectTradeSkill, // 47 SPELL_EFFECT_TRADE_SKILL
|
||||
&Spell::EffectUnused, // 48 SPELL_EFFECT_STEALTH one spell: Base Stealth
|
||||
&Spell::EffectUnused, // 49 SPELL_EFFECT_DETECT one spell: Detect
|
||||
|
|
@ -4540,8 +4540,12 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex)
|
|||
// remove old glyph aura
|
||||
if (uint32 oldGlyph = player->GetGlyph(m_glyphIndex))
|
||||
if (GlyphPropertiesEntry const* oldGlyphEntry = sGlyphPropertiesStore.LookupEntry(oldGlyph))
|
||||
{
|
||||
player->RemoveAurasDueToSpell(oldGlyphEntry->SpellId);
|
||||
player->SendLearnPacket(oldGlyphEntry->SpellId, false); // Send packet to properly handle client-side spell tooltips
|
||||
}
|
||||
|
||||
player->SendLearnPacket(glyphEntry->SpellId, true); // Send packet to properly handle client-side spell tooltips
|
||||
player->CastSpell(m_caster, glyphEntry->SpellId, TriggerCastFlags(TRIGGERED_FULL_MASK & ~(TRIGGERED_IGNORE_SHAPESHIFT | TRIGGERED_IGNORE_CASTER_AURASTATE)));
|
||||
player->SetGlyph(m_glyphIndex, glyph, !player->GetSession()->PlayerLoading());
|
||||
player->SendTalentsInfoData(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue