mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
[10571] Properly remove dual-wield flag at spell unlearn.
This commit is contained in:
parent
a67b6a1da5
commit
85f8219ecf
2 changed files with 13 additions and 6 deletions
|
|
@ -3580,19 +3580,26 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank, bo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CanTitanGrip())
|
// for Titan's Grip and shaman Dual-wield
|
||||||
|
if (CanDualWield() || CanTitanGrip())
|
||||||
{
|
{
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id);
|
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id);
|
||||||
if (IsSpellHaveEffect(spellInfo, SPELL_EFFECT_TITAN_GRIP))
|
|
||||||
|
if (CanDualWield() && IsSpellHaveEffect(spellInfo, SPELL_EFFECT_DUAL_WIELD))
|
||||||
|
SetCanDualWield(false);
|
||||||
|
|
||||||
|
if (CanTitanGrip() && IsSpellHaveEffect(spellInfo, SPELL_EFFECT_TITAN_GRIP))
|
||||||
{
|
{
|
||||||
SetCanTitanGrip(false);
|
SetCanTitanGrip(false);
|
||||||
// Remove Titan's Grip damage penalty now
|
// Remove Titan's Grip damage penalty now
|
||||||
RemoveAurasDueToSpell(49152);
|
RemoveAurasDueToSpell(49152);
|
||||||
if(sWorld.getConfig(CONFIG_BOOL_OFFHAND_CHECK_AT_TALENTS_RESET))
|
|
||||||
AutoUnequipOffhandIfNeed();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// for talents and normal spell unlearn that allow offhand use for some weapons
|
||||||
|
if(sWorld.getConfig(CONFIG_BOOL_OFFHAND_CHECK_AT_TALENTS_RESET))
|
||||||
|
AutoUnequipOffhandIfNeed();
|
||||||
|
|
||||||
// remove from spell book if not replaced by lesser rank
|
// remove from spell book if not replaced by lesser rank
|
||||||
if (!prev_activate && sendUpdate)
|
if (!prev_activate && sendUpdate)
|
||||||
{
|
{
|
||||||
|
|
@ -20137,7 +20144,7 @@ void Player::AutoUnequipOffhandIfNeed()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// need unequip offhand for 2h-weapon without TitanGrip (in any from hands)
|
// need unequip offhand for 2h-weapon without TitanGrip (in any from hands)
|
||||||
if (CanTitanGrip() || (offItem->GetProto()->InventoryType != INVTYPE_2HWEAPON && !IsTwoHandUsed()))
|
if (CanDualWield() && (CanTitanGrip() || (offItem->GetProto()->InventoryType != INVTYPE_2HWEAPON && !IsTwoHandUsed())))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ItemPosCountVec off_dest;
|
ItemPosCountVec off_dest;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10570"
|
#define REVISION_NR "10571"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue