Use race rune natural attack damage for unarmed players
Unarmed base damage was a hardcoded 1-3 (TODO). Read it from the race rune natural attack for the swinging hand (1-4 for all races), then scale it with the existing formula, matching the client (0x46D200). Falls back to 1-3 if the rune has no natural attack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
330db50985
commit
66a731005e
1 file changed
+12
-3
@@ -735,9 +735,18 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
mastDam = CharacterSkill.getQuickMastery(abstractCharacter, "Unarmed Combat Mastery");
|
||||
else
|
||||
mastDam = masteryPercentage;
|
||||
// TODO Correct these
|
||||
min = 1;
|
||||
max = 3;
|
||||
// Base fist damage from the race rune natural attack (1-4 for all races), scaled below like a weapon.
|
||||
// Matches the client's unarmed damage calc (0x46D200).
|
||||
|
||||
float[] naturalAttack = CombatManager.getNaturalAttack(abstractCharacter, mainHand ? EquipSlotType.RHELD : EquipSlotType.LHELD);
|
||||
|
||||
if (naturalAttack != null && naturalAttack.length > 9) {
|
||||
min = (int) naturalAttack[8];
|
||||
max = (int) naturalAttack[9];
|
||||
} else {
|
||||
min = 1;
|
||||
max = 3;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (mainHand)
|
||||
|
||||
Reference in new issue
Block a user