[Equip score] Weapon dps calculation

This commit is contained in:
Yunfan Li
2024-04-20 16:30:03 +08:00
parent 10166048d7
commit 924c1a2197

View File

@@ -3593,9 +3593,9 @@ float PlayerbotFactory::CalculateItemScore(uint32 item_id, Player* bot)
int meleeDps = 0, rangeDps = 0; int meleeDps = 0, rangeDps = 0;
float score = 0; float score = 0;
if (proto->IsRangedWeapon()) { 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()) { } 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; armor += proto->Armor;
block += proto->Block; block += proto->Block;