mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Fix Immune Melee Nonmagical logic (#1606)
This commit is contained in:
+16
-17
@@ -990,32 +990,31 @@ int Mob::GetWeaponDamage(Mob *against, const EQ::ItemData *weapon_item) {
|
||||
|
||||
//check to see if our weapons or fists are magical.
|
||||
if (against->GetSpecialAbility(IMMUNE_MELEE_NONMAGICAL)) {
|
||||
if (weapon_item) {
|
||||
if (GetSpecialAbility(SPECATK_MAGICAL)) {
|
||||
dmg = 1;
|
||||
}
|
||||
//On live this occurs for pets and charmed pet >= level 10
|
||||
else if (GetOwner() && GetLevel() >= RuleI(Combat, PetAttackMagicLevel)) {
|
||||
//pets wouldn't actually use this but...
|
||||
//it gives us an idea if we can hit due to the dual nature of this function
|
||||
dmg = 1;
|
||||
}
|
||||
else if (weapon_item) {
|
||||
if (weapon_item->Magic) {
|
||||
dmg = weapon_item->Damage;
|
||||
|
||||
//this is more for non weapon items, ex: boots for kick
|
||||
//they don't have a dmg but we should be able to hit magical
|
||||
dmg = dmg <= 0 ? 1 : dmg;
|
||||
}
|
||||
else
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if ((GetClass() == MONK || GetClass() == BEASTLORD) && GetLevel() >= 30) {
|
||||
dmg = GetHandToHandDamage();
|
||||
}
|
||||
else {
|
||||
if ((GetClass() == MONK || GetClass() == BEASTLORD) && GetLevel() >= 30) {
|
||||
dmg = GetHandToHandDamage();
|
||||
}
|
||||
else if (GetOwner() && GetLevel() >= RuleI(Combat, PetAttackMagicLevel)) {
|
||||
//pets wouldn't actually use this but...
|
||||
//it gives us an idea if we can hit due to the dual nature of this function
|
||||
dmg = 1;
|
||||
}
|
||||
else if (GetSpecialAbility(SPECATK_MAGICAL))
|
||||
{
|
||||
dmg = 1;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user