Implemented SPA 474, 494

Implemented
 SE_Pet_Crit_Melee_Damage_Pct_Owner	474 - Gives pets a critical melee damage modifier from the owner

SE_Pet_Add_Atk	494 - Gives pet a ATK bonus from the owner

Fixed SE_PetMeleeMitigation 397 - The bonus was not being calculated
This commit is contained in:
KayenEQ
2021-07-14 10:31:46 -04:00
parent 3122cd3edb
commit 8fedf40440
7 changed files with 112 additions and 33 deletions
+7 -3
View File
@@ -4672,17 +4672,21 @@ bool Mob::TrySpellOnDeath()
//in death because the heal will not register before the script kills you.
}
int16 Mob::GetCritDmgMod(uint16 skill)
int16 Mob::GetCritDmgMod(uint16 skill, Mob* owner)
{
int critDmg_mod = 0;
// All skill dmg mod + Skill specific [SPA 330 and 496]
critDmg_mod += itembonuses.CritDmgMod[EQ::skills::HIGHEST_SKILL + 1] + spellbonuses.CritDmgMod[EQ::skills::HIGHEST_SKILL + 1] + aabonuses.CritDmgMod[EQ::skills::HIGHEST_SKILL + 1] +
itembonuses.CritDmgMod[skill] + spellbonuses.CritDmgMod[skill] + aabonuses.CritDmgMod[skill];
Shout("Mod 1 %i", critDmg_mod);
critDmg_mod += itembonuses.CritDmgModNoStack[EQ::skills::HIGHEST_SKILL + 1] + spellbonuses.CritDmgModNoStack[EQ::skills::HIGHEST_SKILL + 1] + aabonuses.CritDmgModNoStack[EQ::skills::HIGHEST_SKILL + 1] +
itembonuses.CritDmgModNoStack[skill] + spellbonuses.CritDmgModNoStack[skill] + aabonuses.CritDmgModNoStack[skill];
Shout("Mod 2 %i", critDmg_mod);
if (owner) //Checked in TryPetCriticalHit
critDmg_mod += owner->aabonuses.Pet_Crit_Melee_Damage_Pct_Owner + owner->itembonuses.Pet_Crit_Melee_Damage_Pct_Owner + owner->spellbonuses.Pet_Crit_Melee_Damage_Pct_Owner;
return critDmg_mod;
}