diff --git a/changelog.txt b/changelog.txt index 4a7b1a43f..dafc65268 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,11 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 04/06/2014 == +Uleat: Changed Mob::CanThisClassDualWield() behavior. This should let non-monk/beastlord dual-wielding classes attack with either fist as long as the other hand is occupied. +Notes: + See this thread for more information and to provide feedback: http://www.eqemulator.org/forums/showthread.php?p=229328#post229328 + + == 04/05/2014 == Akkadius: Fix for the Fix for the Fix: Rule Combat:OneProcPerWeapon was created so that you can revert to the original proc functionality for custom servers that have balanced their content around having more than 1 aug proc on weapons. By having this rule set to 'false' you revert this functionality. diff --git a/zone/mob.cpp b/zone/mob.cpp index d3199d0e6..87486714c 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -2088,27 +2088,35 @@ void Mob::SetAttackTimer() { } -bool Mob::CanThisClassDualWield(void) const -{ - if (!IsClient()) { +bool Mob::CanThisClassDualWield(void) const { + if(!IsClient()) { return(GetSkill(SkillDualWield) > 0); - } else { - const ItemInst* inst = CastToClient()->GetInv().GetItem(SLOT_PRIMARY); + } + else if(CastToClient()->HasSkill(SkillDualWield)) { + const ItemInst* pinst = CastToClient()->GetInv().GetItem(SLOT_PRIMARY); + const ItemInst* sinst = CastToClient()->GetInv().GetItem(SLOT_SECONDARY); + // 2HS, 2HB, or 2HP - if (inst && inst->IsType(ItemClassCommon)) { - const Item_Struct* item = inst->GetItem(); - if ((item->ItemType == ItemType2HBlunt) || (item->ItemType == ItemType2HSlash) || (item->ItemType == ItemType2HPiercing)) + if(pinst && pinst->IsWeapon()) { + const Item_Struct* item = pinst->GetItem(); + + if((item->ItemType == ItemType2HBlunt) || (item->ItemType == ItemType2HSlash) || (item->ItemType == ItemType2HPiercing)) return false; - } else { - //No weapon in hand... using hand-to-hand... - //only monks and beastlords? can dual wield their fists. - if(class_ != MONK && class_ != MONKGM && class_ != BEASTLORD && class_ != BEASTLORDGM) { - return false; - } } - return (CastToClient()->HasSkill(SkillDualWield)); // No skill = no chance + // OffHand Weapon + if(sinst && !sinst->IsWeapon()) + return false; + + // Dual-Wielding Empty Fists + if(!pinst && !sinst) + if(class_ != MONK && class_ != MONKGM && class_ != BEASTLORD && class_ != BEASTLORDGM) + return false; + + return true; } + + return false; } bool Mob::CanThisClassDoubleAttack(void) const