mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Make SPA 112 affect fizzle rate not effective caster level
Per dev quote, SPA 112 "Modifies casting skills of the affected entity by BaseEffect for the purposes of determining whether or not a fizzle occurs when casting spells." Fixes issues caused by having a spell with this effect on caster such as wrong target debuff durations and buff refreshes not taking hold.
This commit is contained in:
parent
953bee6c21
commit
a73bf221ed
@ -1217,8 +1217,12 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_CastingLevel2:
|
||||
case SE_CastingLevel: {
|
||||
newbon->adjusted_casting_skill += base1;
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_CastingLevel2: {
|
||||
newbon->effective_casting_level += base1;
|
||||
break;
|
||||
}
|
||||
@ -1917,8 +1921,13 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_CastingLevel2:
|
||||
case SE_CastingLevel: // Brilliance of Ro
|
||||
{
|
||||
new_bonus->adjusted_casting_skill += effect_value;
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_CastingLevel2:
|
||||
{
|
||||
new_bonus->effective_casting_level += effect_value;
|
||||
break;
|
||||
@ -3867,8 +3876,13 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
|
||||
aabonuses.Corrup = effect_value;
|
||||
break;
|
||||
|
||||
case SE_CastingLevel2:
|
||||
case SE_CastingLevel: // Brilliance of Ro
|
||||
spellbonuses.adjusted_casting_skill = effect_value;
|
||||
aabonuses.adjusted_casting_skill = effect_value;
|
||||
itembonuses.adjusted_casting_skill = effect_value;
|
||||
break;
|
||||
|
||||
case SE_CastingLevel2:
|
||||
spellbonuses.effective_casting_level = effect_value;
|
||||
aabonuses.effective_casting_level = effect_value;
|
||||
itembonuses.effective_casting_level = effect_value;
|
||||
|
||||
@ -354,6 +354,7 @@ struct StatBonuses {
|
||||
int32 skillmod[EQEmu::skills::HIGHEST_SKILL + 1];
|
||||
int32 skillmodmax[EQEmu::skills::HIGHEST_SKILL + 1];
|
||||
int effective_casting_level;
|
||||
int adjusted_casting_skill; // SPA 112 for fizzles
|
||||
int reflect_chance; // chance to reflect incoming spell
|
||||
uint32 singingMod;
|
||||
uint32 Amplification; // stacks with singingMod
|
||||
|
||||
@ -333,6 +333,11 @@ int Lua_StatBonuses::Geteffective_casting_level() const {
|
||||
return self->effective_casting_level;
|
||||
}
|
||||
|
||||
int Lua_StatBonuses::Getadjusted_casting_skill() const {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->adjusted_casting_skill;
|
||||
}
|
||||
|
||||
int Lua_StatBonuses::Getreflect_chance() const {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->reflect_chance;
|
||||
@ -1347,6 +1352,7 @@ luabind::scope lua_register_stat_bonuses() {
|
||||
.def("skillmod", &Lua_StatBonuses::Getskillmod)
|
||||
.def("skillmodmax", &Lua_StatBonuses::Getskillmodmax)
|
||||
.def("effective_casting_level", &Lua_StatBonuses::Geteffective_casting_level)
|
||||
.def("adjusted_casting_skill", &Lua_StatBonuses::Getadjusted_casting_skill)
|
||||
.def("reflect_chance", &Lua_StatBonuses::Getreflect_chance)
|
||||
.def("singingMod", &Lua_StatBonuses::GetsingingMod)
|
||||
.def("Amplification", &Lua_StatBonuses::GetAmplification)
|
||||
|
||||
@ -91,6 +91,7 @@ public:
|
||||
int32 Getskillmod(int idx) const;
|
||||
int32 Getskillmodmax(int idx) const;
|
||||
int Geteffective_casting_level() const;
|
||||
int Getadjusted_casting_skill() const;
|
||||
int Getreflect_chance() const;
|
||||
uint32 GetsingingMod() const;
|
||||
uint32 GetAmplification() const;
|
||||
|
||||
@ -752,6 +752,8 @@ bool Client::CheckFizzle(uint16 spell_id)
|
||||
|
||||
act_skill = GetSkill(spells[spell_id].skill);
|
||||
act_skill += GetLevel(); // maximum of whatever the client can cheat
|
||||
act_skill += itembonuses.adjusted_casting_skill + spellbonuses.adjusted_casting_skill + aabonuses.adjusted_casting_skill;
|
||||
Log(Logs::Detail, Logs::Spells, "Adjusted casting skill: %d+%d+%d+%d+%d=%d", GetSkill(spells[spell_id].skill), GetLevel(), itembonuses.adjusted_casting_skill, spellbonuses.adjusted_casting_skill, aabonuses.adjusted_casting_skill, act_skill);
|
||||
|
||||
//spell specialization
|
||||
float specialize = GetSpecializeSkillValue(spell_id);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user