mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Spells] Implemented SPA 471 SE_Double_Melee_Round (#1492)
* Implemented SPA 471 SE_Double_Melee_Round #define SE_Double_Melee_Round 471 Percent chance to repeat primary weapon round with a percent damage modifier, base: pct chance repeat, limit: pct dmg mod, max: none * minor fixes * tab to spaces
This commit is contained in:
@@ -471,6 +471,8 @@ Mob::Mob(
|
||||
AssistAggro = false;
|
||||
npc_assist_cap = 0;
|
||||
|
||||
use_double_melee_round_dmg_bonus = false;
|
||||
|
||||
#ifdef BOTS
|
||||
m_manual_follow = false;
|
||||
#endif
|
||||
@@ -4841,6 +4843,10 @@ int16 Mob::GetMeleeDamageMod_SE(uint16 skill)
|
||||
dmg_mod += itembonuses.DamageModifier3[EQ::skills::HIGHEST_SKILL + 1] + spellbonuses.DamageModifier3[EQ::skills::HIGHEST_SKILL + 1] + aabonuses.DamageModifier3[EQ::skills::HIGHEST_SKILL + 1] +
|
||||
itembonuses.DamageModifier3[skill] + spellbonuses.DamageModifier3[skill] + aabonuses.DamageModifier3[skill];
|
||||
|
||||
if (GetUseDoubleMeleeRoundDmgBonus()) {
|
||||
dmg_mod += itembonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_DMG_BONUS] + spellbonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_DMG_BONUS] + aabonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_DMG_BONUS];
|
||||
}
|
||||
|
||||
if(dmg_mod < -100)
|
||||
dmg_mod = -100;
|
||||
|
||||
@@ -4964,6 +4970,20 @@ void Mob::MeleeLifeTap(int32 damage) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Mob::TryDoubleMeleeRoundEffect() {
|
||||
|
||||
auto chance = aabonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] + itembonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] +
|
||||
spellbonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE];
|
||||
|
||||
if (chance && zone->random.Roll(chance)) {
|
||||
SetUseDoubleMeleeRoundDmgBonus(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
SetUseDoubleMeleeRoundDmgBonus(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Mob::TryReflectSpell(uint32 spell_id)
|
||||
{
|
||||
if (!spells[spell_id].reflectable)
|
||||
|
||||
Reference in New Issue
Block a user