mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 02:20:00 +01:00
[Equip score] Weapon dps calculation
This commit is contained in:
parent
10166048d7
commit
924c1a2197
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user