From 924c1a219770bfcc6f86500ddddf6de5c1fd7ee8 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sat, 20 Apr 2024 16:30:03 +0800 Subject: [PATCH] [Equip score] Weapon dps calculation --- src/PlayerbotFactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index 245df3bc..32ceda4f 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -3593,9 +3593,9 @@ float PlayerbotFactory::CalculateItemScore(uint32 item_id, Player* bot) int meleeDps = 0, rangeDps = 0; float score = 0; if (proto->IsRangedWeapon()) { - rangeDps = (proto->Damage[0].DamageMin + proto->Damage[0].DamageMax) / 2 * proto->Delay / 1000; + rangeDps = (proto->Damage[0].DamageMin + proto->Damage[0].DamageMax) / 2 * 1000 / proto->Delay; } else if (proto->IsWeapon()) { - meleeDps = (proto->Damage[0].DamageMin + proto->Damage[0].DamageMax) / 2 * proto->Delay / 1000; + meleeDps = (proto->Damage[0].DamageMin + proto->Damage[0].DamageMax) / 2 * 1000 / proto->Delay; } armor += proto->Armor; block += proto->Block;