mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-13 10:52:28 +00:00
[BugFix] Fix for bard song instrument mod formula from recent update (#1654)
* Update spell_effects.cpp * Update spell_effects.cpp * Update spell_effects.cpp
This commit is contained in:
parent
f9855fd097
commit
4389f84ea5
@ -3329,14 +3329,14 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
int Mob::CalcSpellEffectValue(uint16 spell_id, int effect_id, int caster_level, uint32 instrument_mod, Mob *caster,
|
||||
int ticsremaining, uint16 caster_id)
|
||||
{
|
||||
int formula, base, max, effect_value, oval;
|
||||
|
||||
if (!IsValidSpell(spell_id) || effect_id < 0 || effect_id >= EFFECT_COUNT)
|
||||
return 0;
|
||||
|
||||
formula = spells[spell_id].formula[effect_id];
|
||||
base = spells[spell_id].base[effect_id];
|
||||
max = spells[spell_id].max[effect_id];
|
||||
int formula = spells[spell_id].formula[effect_id];
|
||||
int base = spells[spell_id].base[effect_id];
|
||||
int max = spells[spell_id].max[effect_id];
|
||||
int effect_value = 0;
|
||||
int oval = 0;
|
||||
|
||||
if (IsBlankSpellEffect(spell_id, effect_id))
|
||||
return 0;
|
||||
@ -3345,13 +3345,12 @@ int Mob::CalcSpellEffectValue(uint16 spell_id, int effect_id, int caster_level,
|
||||
|
||||
// this doesn't actually need to be a song to get mods, just the right skill
|
||||
if (EQ::skills::IsBardInstrumentSkill(spells[spell_id].skill)
|
||||
&& IsInstrumentModAppliedToSpellEffect(spell_id, spells[spell_id].effectid[effect_id])){
|
||||
&& IsInstrumentModAppliedToSpellEffect(spell_id, spells[spell_id].effectid[effect_id])) {
|
||||
|
||||
oval = effect_value;
|
||||
effect_value = effect_value * instrument_mod / 10;
|
||||
|
||||
LogSpells("Effect value [{}] altered with bard modifier of [{}] to yeild [{}]",
|
||||
oval, instrument_mod, effect_value);
|
||||
oval = effect_value;
|
||||
effect_value = effect_value * static_cast<int>(instrument_mod) / 10;
|
||||
LogSpells("Effect value [{}] altered with bard modifier of [{}] to yeild [{}]",
|
||||
oval, instrument_mod, effect_value);
|
||||
}
|
||||
/*
|
||||
SPA 413 SE_FcBaseEffects, modifies base value of a spell effect after formula calcultion, but before other focuses.
|
||||
@ -3370,7 +3369,7 @@ int Mob::CalcSpellEffectValue(uint16 spell_id, int effect_id, int caster_level,
|
||||
if (caster_id && instrument_mod > 10) {
|
||||
//This is checked from Mob::ApplySpellBonuses, applied to buffs that receive bonuses. See above, must be in 10% intervals to work.
|
||||
oval = effect_value;
|
||||
effect_value = effect_value * instrument_mod / 10;
|
||||
effect_value = effect_value * static_cast<int>(instrument_mod) / 10;
|
||||
|
||||
LogSpells("Bonus Effect value [{}] altered with base effects modifier of [{}] to yeild [{}]",
|
||||
oval, instrument_mod, effect_value);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user