mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Alllow SE_PetMeleeMitigation to work on swarm pets.
This commit is contained in:
parent
1b239b7119
commit
9fcea56fbf
@ -566,15 +566,15 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit, ExtraAttac
|
|||||||
|
|
||||||
if (!IsPet())
|
if (!IsPet())
|
||||||
armor = (armor / RuleR(Combat, NPCACFactor));
|
armor = (armor / RuleR(Combat, NPCACFactor));
|
||||||
else{
|
|
||||||
Mob *owner = nullptr;
|
Mob *owner = nullptr;
|
||||||
|
if (IsPet())
|
||||||
owner = GetOwner();
|
owner = GetOwner();
|
||||||
if (owner){
|
else if ((CastToNPC()->GetSwarmOwner()))
|
||||||
PetACBonus = owner->aabonuses.PetMeleeMitigation
|
owner = entity_list.GetMobID(CastToNPC()->GetSwarmOwner());
|
||||||
+ owner->itembonuses.PetMeleeMitigation +
|
|
||||||
owner->spellbonuses.PetMeleeMitigation;
|
if (owner)
|
||||||
}
|
PetACBonus = owner->aabonuses.PetMeleeMitigation + owner->itembonuses.PetMeleeMitigation + owner->spellbonuses.PetMeleeMitigation;
|
||||||
}
|
|
||||||
|
|
||||||
armor += spellbonuses.AC + itembonuses.AC + PetACBonus + 1;
|
armor += spellbonuses.AC + itembonuses.AC + PetACBonus + 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user