[9655] Fixed bug with possible double remove spell.

In case when saved in DB spell remove triggering by
dependendences chain self remove attempt.
This commit is contained in:
VladimirMangos 2010-04-02 06:32:32 +04:00
parent a9d6eed447
commit db22a0a9fb
2 changed files with 3 additions and 3 deletions

View file

@ -3269,7 +3269,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank, bo
// re-search, it can be corrupted in prev loop // re-search, it can be corrupted in prev loop
itr = m_spells.find(spell_id); itr = m_spells.find(spell_id);
if (itr == m_spells.end()) if (itr == m_spells.end() || itr->second.state == PLAYERSPELL_REMOVED)
return; // already unleared return; // already unleared
bool cur_active = itr->second.active; bool cur_active = itr->second.active;
@ -5649,7 +5649,7 @@ void Player::SendInitialActionButtons() const
sLog.outDetail( "Initializing Action Buttons for '%u' spec '%u'", GetGUIDLow(), m_activeSpec); sLog.outDetail( "Initializing Action Buttons for '%u' spec '%u'", GetGUIDLow(), m_activeSpec);
WorldPacket data(SMSG_ACTION_BUTTONS, 1+(MAX_ACTION_BUTTONS*4)); WorldPacket data(SMSG_ACTION_BUTTONS, 1+(MAX_ACTION_BUTTONS*4));
data << uint8(1); // talent spec amount data << uint8(1); // talent spec amount (in packet)
ActionButtonList const& currentActionButtonList = m_actionButtons[m_activeSpec]; ActionButtonList const& currentActionButtonList = m_actionButtons[m_activeSpec];
for(uint8 button = 0; button < MAX_ACTION_BUTTONS; ++button) for(uint8 button = 0; button < MAX_ACTION_BUTTONS; ++button)
{ {

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 "9654" #define REVISION_NR "9655"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__