[9658] Remove SPELL_EFFECT_TITAN_GRIP flag at related spell remove.

This let have correct state for flag at .unlearn related spell and etc.
Not only at full talent reset.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Laise 2010-04-02 22:47:35 +04:00 committed by VladimirMangos
parent 973a21060b
commit eee89851a6
2 changed files with 12 additions and 10 deletions

View file

@ -3431,6 +3431,17 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank, bo
}
}
if (m_canTitanGrip)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id);
if (IsSpellHaveEffect(spellInfo, SPELL_EFFECT_TITAN_GRIP))
{
m_canTitanGrip = false;
if(sWorld.getConfig(CONFIG_BOOL_OFFHAND_CHECK_AT_TALENTS_RESET))
AutoUnequipOffhandIfNeed();
}
}
// remove from spell book if not replaced by lesser rank
if (!prev_activate && sendUpdate)
{
@ -3700,15 +3711,6 @@ bool Player::resetTalents(bool no_cost)
RemovePet(NULL,PET_SAVE_NOT_IN_SLOT, true);
}
*/
if(m_canTitanGrip)
{
m_canTitanGrip = false;
if(sWorld.getConfig(CONFIG_BOOL_OFFHAND_CHECK_AT_TALENTS_RESET))
AutoUnequipOffhandIfNeed();
}
return true;
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9657"
#define REVISION_NR "9658"
#endif // __REVISION_NR_H__