Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Maple2.Server.Core/Formulas/BonusAttack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ public static double Coefficient(int rightHandRarity, int leftHandRarity, JobCod
}

double weaponBonusAttackCoefficient = RarityMultiplier(rightHandRarity);
if (leftHandRarity == 0) {
return weaponBonusAttackCoefficient;
if (leftHandRarity > 0) {
weaponBonusAttackCoefficient = 0.5 * (weaponBonusAttackCoefficient + RarityMultiplier(leftHandRarity));
}

weaponBonusAttackCoefficient = 0.5 * (weaponBonusAttackCoefficient + RarityMultiplier(leftHandRarity));
return 4.96 * weaponBonusAttackCoefficient * JobBonusMultiplier(jobCode);
}

Expand Down
4 changes: 2 additions & 2 deletions Maple2.Server.Game/Manager/StatsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
return (1, 1);

double BonusAttackCoefficient(FieldPlayer player) {
int leftHandRarity = player.Session.Item.Equips.Get(EquipSlot.RH)?.Rarity ?? 0;
int rightHandRarity = player.Session.Item.Equips.Get(EquipSlot.LH)?.Rarity ?? 0;
int rightHandRarity = player.Session.Item.Equips.Get(EquipSlot.RH)?.Rarity ?? 0;
int leftHandRarity = player.Session.Item.Equips.Get(EquipSlot.LH)?.Rarity ?? 0;
return BonusAttack.Coefficient(rightHandRarity, leftHandRarity, player.Value.Character.Job.Code());
}
}
Expand Down Expand Up @@ -133,7 +133,7 @@
Values.Reset(metadata, character.Job.Code());
} else {
Log.Logger.Error("Failed to refresh stats for {Job} level {Level}.", character.Job.Code(), character.Level);
Values.Reset(character.Job.Code(), character.Level);

Check warning on line 136 in Maple2.Server.Game/Manager/StatsManager.cs

View workflow job for this annotation

GitHub Actions / build

'Stats.Reset(JobCode, short)' is obsolete: 'Use Reset(UserStatMetadata, JobCode) instead.'
}

AddEquips(player);
Expand Down
Loading