diff options
author | Shocker <none@none> | 2010-08-24 08:19:17 +0300 |
---|---|---|
committer | Shocker <none@none> | 2010-08-24 08:19:17 +0300 |
commit | 4a30a2815b53229cb092db2e1cd37c6877bbd604 (patch) | |
tree | db840e3cf4536296f2a7bbaea7dbe45a4722e209 /src | |
parent | b2f542530ff683a32ee80fb42a4c2554edf59589 (diff) |
Force offhand weapon unequip when player doesn't have Dual Wield anymore
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 4bb81156930..775489c2266 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3787,6 +3787,8 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) if (spell_id == 46917 && m_canTitanGrip) SetCanTitanGrip(false); + if (spell_id == 674 && m_canDualWield) + SetCanDualWield(false); if (sWorld.getBoolConfig(CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN)) AutoUnequipOffhandIfNeed(); @@ -21534,6 +21536,10 @@ void Player::AutoUnequipOffhandIfNeed(bool force /*= false*/) if (!offItem) return; + // unequip offhand weapon if player doesn't have dual wield anymore + if (!CanDualWield() && (offItem->GetProto()->InventoryType == INVTYPE_WEAPONOFFHAND || offItem->GetProto()->InventoryType == INVTYPE_WEAPON)) + force = true; + // need unequip offhand for 2h-weapon without TitanGrip (in any from hands) if (!force && (CanTitanGrip() || (offItem->GetProto()->InventoryType != INVTYPE_2HWEAPON && !IsTwoHandUsed()))) return; |