Monk wearing magical gloves can hit creatures that need a magical weapon

when fighting hand to hand.
This commit is contained in:
Paul Coene 2015-04-29 19:18:17 -04:00
parent 46d7019909
commit 2c4ca77ffc

View File

@ -982,14 +982,22 @@ int Mob::GetWeaponDamage(Mob *against, const ItemInst *weapon_item, uint32 *hate
return 0;
}
else{
if((GetClass() == MONK || GetClass() == BEASTLORD) && GetLevel() >= 30){
dmg = GetMonkHandToHandDamage();
if (hate) *hate += dmg;
bool MagicGloves=false;
ItemInst *gloves=CastToClient()->GetInv().GetItem(MainHands);
if (gloves != nullptr) {
MagicGloves = gloves->GetItem()->Magic;
}
if((GetClass() == MONK || GetClass() == BEASTLORD)) {
if(MagicGloves || GetLevel() >= 30){
dmg = GetMonkHandToHandDamage();
if (hate) *hate += dmg;
}
}
else if(GetOwner() && GetLevel() >= RuleI(Combat, PetAttackMagicLevel)){ //pets wouldn't actually use this but...
dmg = 1; //it gives us an idea if we can hit
}
else if(GetSpecialAbility(SPECATK_MAGICAL)){
else if(MagicGloves || GetSpecialAbility(SPECATK_MAGICAL)){
dmg = 1;
}
else