[11519] Fix player totem icons (those under player portrait)

SMSG_TOTEM_CREATED must be sent before totem added to map.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2011-05-21 10:31:37 +02:00
parent 569d7cdc42
commit b46237b643
2 changed files with 4 additions and 3 deletions

View file

@ -7997,8 +7997,7 @@ void Spell::DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc)
if (m_caster->IsFFAPvP()) if (m_caster->IsFFAPvP())
pTotem->SetFFAPvP(true); pTotem->SetFFAPvP(true);
pTotem->Summon(m_caster); // sending SMSG_TOTEM_CREATED before add to map (done in Summon)
if (slot < MAX_TOTEM_SLOT && m_caster->GetTypeId() == TYPEID_PLAYER) if (slot < MAX_TOTEM_SLOT && m_caster->GetTypeId() == TYPEID_PLAYER)
{ {
WorldPacket data(SMSG_TOTEM_CREATED, 1 + 8 + 4 + 4); WorldPacket data(SMSG_TOTEM_CREATED, 1 + 8 + 4 + 4);
@ -8008,6 +8007,8 @@ void Spell::DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc)
data << uint32(m_spellInfo->Id); data << uint32(m_spellInfo->Id);
((Player*)m_caster)->SendDirectMessage(&data); ((Player*)m_caster)->SendDirectMessage(&data);
} }
pTotem->Summon(m_caster);
} }
void Spell::EffectEnchantHeldItem(SpellEffectIndex eff_idx) void Spell::EffectEnchantHeldItem(SpellEffectIndex eff_idx)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11518" #define REVISION_NR "11519"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__