Fix for bot auto-combat damage (please post any abnormalities)

This commit is contained in:
Uleat
2017-03-04 14:50:32 -05:00
parent 2690d8fed8
commit d559e9da10
2 changed files with 28 additions and 8 deletions
+5 -2
View File
@@ -1301,9 +1301,12 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
my_hit.min_damage = 0;
uint8 mylevel = GetLevel() ? GetLevel() : 1;
uint32 hate = 0;
if (weapon) hate = weapon->GetItem()->Damage + weapon->GetItem()->ElemDmgAmt;
if (weapon)
hate = (weapon->GetItem()->Damage + weapon->GetItem()->ElemDmgAmt);
my_hit.base_damage = GetWeaponDamage(other, weapon, &hate);
if (hate == 0 && my_hit.base_damage > 1) hate = my_hit.base_damage;
if (hate == 0 && my_hit.base_damage > 1)
hate = my_hit.base_damage;
//if weapon damage > 0 then we know we can hit the target with this weapon
//otherwise we cannot and we set the damage to -5 later on