Apply the dual-wield damage cut only when both hands hold weapons
The 30% cut never applied: each hand was passed itself as the other hand, and the check compared the template to ItemType.WEAPON. The client (0x466EB0 / 0x46D200) multiplies min and max damage by 0.7 when both held slots contain an item_type WEAPON. Value change: players wielding two weapons now deal 70% damage per hand; single weapon, weapon + shield and unarmed are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
70ea9b3bc9
commit
f39e35ac23
1 file changed
+7
-10
@@ -653,8 +653,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
AssignDefenseValue(abstractCharacter);
|
||||
// calculate atr and damage for each hand
|
||||
ConcurrentHashMap<EquipSlotType, Item> equipped = abstractCharacter.charItemManager.getEquipped();
|
||||
AssignDamageAtrForPlayers(abstractCharacter, equipped.get(EquipSlotType.RHELD), true, equipped.get(EquipSlotType.RHELD));
|
||||
AssignDamageAtrForPlayers(abstractCharacter, equipped.get(EquipSlotType.LHELD), false, equipped.get(EquipSlotType.LHELD));
|
||||
AssignDamageAtrForPlayers(abstractCharacter, equipped.get(EquipSlotType.RHELD), true, equipped.get(EquipSlotType.LHELD));
|
||||
AssignDamageAtrForPlayers(abstractCharacter, equipped.get(EquipSlotType.LHELD), false, equipped.get(EquipSlotType.RHELD));
|
||||
if (abstractCharacter.getObjectType().equals(GameObjectType.Mob)) {
|
||||
Mob mob = (Mob) abstractCharacter;
|
||||
RuneTemplate rune = RuneTemplate._runes.get(mob.loadID);
|
||||
@@ -883,15 +883,12 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
max *= percentMaxDamage;
|
||||
}
|
||||
|
||||
//if duel wielding, cut damage by 30%
|
||||
// Client (0x466EB0 sets char+0xD0C, 0x46D200 applies it): 30% cut only when both hands hold a WEAPON.
|
||||
|
||||
if (otherHand != null) {
|
||||
ItemTemplate ibo = otherHand.template;
|
||||
|
||||
if (ibo != null && otherHand.template.equals(ItemType.WEAPON)) {
|
||||
min *= 0.7f;
|
||||
max *= 0.7f;
|
||||
}
|
||||
if (!noWeapon && otherHand != null && otherHand.template != null
|
||||
&& otherHand.template.cacheTemplate.getItemType().equals(ItemType.WEAPON)) {
|
||||
min *= 0.7f;
|
||||
max *= 0.7f;
|
||||
}
|
||||
|
||||
// calculate damage
|
||||
|
||||
Reference in new issue
Block a user