mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Merge pull request #774 from hgtw/spa112
Make SPA 112 affect fizzle rate not effective caster level
This commit is contained in:
commit
898aea80c7
@ -1205,8 +1205,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;
|
||||
}
|
||||
@ -1914,8 +1918,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;
|
||||
@ -3850,8 +3859,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;
|
||||
|
||||
@ -388,6 +388,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;
|
||||
|
||||
@ -757,6 +757,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