Update to focus SE_BlockNextSpell (#1479)

Minor code changes to make the focus be checked consistent with how all other focuses are checked. No change in functionality.
This commit is contained in:
KayenEQ 2021-08-01 14:19:42 -04:00 committed by GitHub
parent 38beb804a3
commit 93b0264a8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 10 deletions

View File

@ -2750,10 +2750,6 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
break;
}
case SE_BlockNextSpellFocus:
new_bonus->BlockNextSpell = true;
break;
case SE_NegateSpellEffect:
new_bonus->NegateEffects = true;
break;
@ -3827,8 +3823,7 @@ uint8 Mob::IsFocusEffect(uint16 spell_id,int effect_index, bool AA,uint32 aa_eff
case SE_Fc_Spell_Damage_Pct_IncomingPC:
return focusFcSpellDamagePctIncomingPC;
case SE_BlockNextSpellFocus:
//return focusBlockNextSpell;
return 0; //This is calculated as an actual bonus
return focusBlockNextSpell;
case SE_FcTwincast:
return focusTwincast;
case SE_SympatheticProc:

View File

@ -483,8 +483,6 @@ struct StatBonuses {
int HPPercCap[2]; //Spell effect that limits you to being healed/regening beyond a % of your max
int ManaPercCap[2]; // ^^ 0 = % Cap 1 = Flat Amount Cap
int EndPercCap[2]; // ^^
bool BlockNextSpell; // Indicates whether the client can block a spell or not
//uint16 BlockSpellEffect[EFFECT_COUNT]; // Prevents spells with certain effects from landing on you *no longer used
bool ImmuneToFlee; // Bypass the fleeing flag
uint32 VoiceGraft; // Stores the ID of the mob with which to talk through
int32 SpellProcChance; // chance to proc from sympathetic spell effects

View File

@ -677,7 +677,7 @@ int Lua_StatBonuses::GetXPRateMod() const {
bool Lua_StatBonuses::GetBlockNextSpell() const {
Lua_Safe_Call_Bool();
return self->BlockNextSpell;
//return self->BlockNextSpell; bonus no longer used due to effect being a focus
}
bool Lua_StatBonuses::GetImmuneToFlee() const {

View File

@ -823,7 +823,7 @@ public:
int GetCriticalChanceBonus(uint16 skill);
int16 GetSkillDmgAmt(uint16 skill);
bool TryReflectSpell(uint32 spell_id);
bool CanBlockSpell() const { return(spellbonuses.BlockNextSpell); }
inline bool CanBlockSpell() const { return(spellbonuses.FocusEffects[focusBlockNextSpell]); }
bool DoHPToManaCovert(uint16 mana_cost = 0);
int32 ApplySpellEffectiveness(int16 spell_id, int32 value, bool IsBard = false, uint16 caster_id=0);
int8 GetDecayEffectValue(uint16 spell_id, uint16 spelleffect);