mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Quest API/Cleanup] Add several spell methods to Perl/Lua (#3379)
* [Quest API/Cleanup] Add several spell methods to Perl/Lua - Add `quest::CalculateCorruptionCounters(spell_id)`. - Add `quest::CalculateCounters(spell_id)`. - Add `quest::CalculateCurseCounters(spell_id)`. - Add `quest::CalculateDiseaseCounters(spell_id)`. - Add `quest::CalculatePoisonCounters(spell_id)`. - Add `quest::GetSpellEffectDescriptionNumber(spell_id)`. - Add `quest::GetSpellEffectIndex(spell_id, effect_id)`. - Add `quest::GetSpellFuriousBash(spell_id)`. - Add `quest::GetSpellMinimumLevel(spell_id)`. - Add `quest::GetSpellNimbusEffect(spell_id)`. - Add `quest::GetSpellPartialMagicRuneAmount(spell_id)`. - Add `quest::GetSpellPartialMagicRuneReduction(spell_id)`. - Add `quest::GetSpellPartialMeleeRuneAmount(spell_id)`. - Add `quest::GetSpellPartialMeleeRuneReduction(spell_id)`. - Add `quest::GetSpellProcLimitTimer(spell_id)`. - Add `quest::GetSpellResistType(spell_id)`. - Add `quest::GetSpellResurrectionSicknessCheck(spell_id_one, spell_id_two)`. - Add `quest::GetSpellTargetType(spell_id)`. - Add `quest::GetSpellTriggerSpellID(spell_id)`. - Add `quest::GetSpellViralMaximumSpreadTime(spell_id)`. - Add `quest::GetSpellViralMinimumSpreadTime(spell_id)`. - Add `quest::GetSpellViralSpreadRange(spell_id)`. - Add `quest::IsAEDurationSpell(spell_id)`. - Add `quest::IsAENukeSpell(spell_id)`. - Add `quest::IsAERainNukeSpell(spell_id)`. - Add `quest::IsAllianceSpell(spell_id)`. - Add `quest::IsBardOnlyStackEffect(effect_id)`. - Add `quest::IsBardSong(spell_id)`. - Add `quest::IsBlankSpellEffect(spell_id, effect_index)`. - Add `quest::IsBlindSpell(spell_id)`. - Add `quest::IsBuffSpell(spell_id)`. - Add `quest::IsCastNotStandingSpell(spell_id)`. - Add `quest::IsCastOnFadeDurationSpell(spell_id)`. - Add `quest::IsCastRestrictedSpell(spell_id)`. - Add `quest::IsCastTimeReductionSpell(spell_id)`. - Add `quest::IsCastWhileInvisibleSpell(spell_id)`. - Add `quest::IsCharmSpell(spell_id)`. - Add `quest::IsCombatSkill(spell_id)`. - Add `quest::IsCompleteHealDurationSpell(spell_id)`. - Add `quest::IsCompleteHealSpell(spell_id)`. - Add `quest::IsCureSpell(spell_id)`. - Add `quest::IsDamageSpell(spell_id)`. - Add `quest::IsDeathSaveSpell(spell_id)`. - Add `quest::IsDebuffSpell(spell_id)`. - Add `quest::IsDetrimentalSpell(spell_id)`. - Add `quest::IsDiscipline(spell_id)`. - Add `quest::IsDisciplineBuff(spell_id)`. - Add `quest::IsDiseaseCounterSpell(spell_id)`. - Add `quest::IsDistanceModifierSpell(spell_id)`. - Add `quest::IsEffectIgnoredInStacking(effect_id)`. - Add `quest::IsFastHealSpell(spell_id)`. - Add `quest::IsFearSpell(spell_id)`. - Add `quest::IsFocusLimit(effect_id)`. - Add `quest::IsFullDeathSaveSpell(spell_id)`. - Add `quest::IsGateSpell(spell_id)`. - Add `quest::IsImprovedDamageSpell(spell_id)`. - Add `quest::IsImprovedHealingSpell(spell_id)`. - Add `quest::IsIncreaseDurationSpell(spell_id)`. - Add `quest::IsIncreaseRangeSpell(spell_id)`. - Add `quest::IsInstrumentModifierAppliedToSpellEffect(spell_id, effect_id)`. - Add `quest::IsInvisibleSpell(spell_id)`. - Add `quest::IsInvulnerabilitySpell(spell_id)`. - Add `quest::IsLDoNObjectSpell(spell_id)`. - Add `quest::IsLifetapSpell(spell_id)`. - Add `quest::IsMagicRuneSpell(spell_id)`. - Add `quest::IsManaCostReductionSpell(spell_id)`. - Add `quest::IsManaTapSpell(spell_id)`. - Add `quest::IsMesmerizeSpell(spell_id)`. - Add `quest::IsNoDetrimentalSpellAggroSpell(spell_id)`. - Add `quest::IsPBAENukeSpell(spell_id)`. - Add `quest::IsPartialDeathSaveSpell(spell_id)`. - Add `quest::IsPartialResistableSpell(spell_id)`. - Add `quest::IsPercentalHealSpell(spell_id)`. - Add `quest::IsPersistDeathSpell(spell_id)`. - Add `quest::IsPetSpell(spell_id)`. - Add `quest::IsPoisonCounterSpell(spell_id)`. - Add `quest::IsPulsingBardSong(spell_id)`. - Add `quest::IsPureNukeSpell(spell_id)`. - Add `quest::IsRegularGroupHealSpell(spell_id)`. - Add `quest::IsRegularSingleTargetHealSpell(spell_id)`. - Add `quest::IsResistDebuffSpell(spell_id)`. - Add `quest::IsResistableSpell(spell_id)`. - Add `quest::IsRestAllowedSpell(spell_id)`. - Add `quest::IsResurrectionEffects(spell_id)`. - Add `quest::IsRuneSpell(spell_id)`. - Add `quest::IsRunning(spell_id)`. - Add `quest::IsSacrificeSpell(spell_id)`. - Add `quest::IsSelfConversionSpell(spell_id)`. - Add `quest::IsShadowStepSpell(spell_id)`. - Add `quest::IsShortDurationBuff(spell_id)`. - Add `quest::IsSpellUsableInThisZoneType(spell_id)`. - Add `quest::IsSpellUsableInThisZoneType(spell_id, zone_type)`. - Add `quest::IsStackableDOT(spell_id)`. - Add `quest::IsStunSpell(spell_id)`. - Add `quest::IsSuccorSpell(spell_id)`. - Add `quest::IsSummonItemSpell(spell_id)`. - Add `quest::IsSummonPCSpell(spell_id)`. - Add `quest::IsSummonPetSpell(spell_id)`. - Add `quest::IsSummonSkeletonSpell(spell_id)`. - Add `quest::IsSummonSpell(spell_id)`. - Add `quest::IsSuspendableSpell(spell_id)`. - Add `quest::IsTargetRequiredForSpell(spell_id)`. - Add `quest::IsTargetableAESpell(spell_id)`. - Add `quest::IsTeleportSpell(spell_id)`. - Add `quest::IsTranslocateSpell(spell_id)`. - Add `quest::IsValidSpell(spell_id)`. - Add `quest::IsVeryFastHealSpell(spell_id)`. - Add `quest::IsVirusSpell(spell_id)`. - Add `eq.calculate_corruption_counters(spell_id)`. - Add `eq.calculate_counters(spell_id)`. - Add `eq.calculate_curse_counters(spell_id)`. - Add `eq.calculate_disease_counters(spell_id)`. - Add `eq.calculate_poison_counters(spell_id)`. - Add `eq.get_spell_effect_description_number(spell_id)`. - Add `eq.get_spell_effect_index(spell_id, effect_id)`. - Add `eq.get_spell_furious_bash(spell_id)`. - Add `eq.get_spell_level(spell_id, class_id)`. - Add `eq.get_spell_minimum_level(spell_id)`. - Add `eq.get_spell_nimbus_effect(spell_id)`. - Add `eq.get_spell_partial_magic_rune_amount(spell_id)`. - Add `eq.get_spell_partial_magic_rune_reduction(spell_id)`. - Add `eq.get_spell_partial_melee_rune_amount(spell_id)`. - Add `eq.get_spell_partial_melee_rune_reduction(spell_id)`. - Add `eq.get_spell_proc_limit_timer(spell_id)`. - Add `eq.get_spell_resist_type(spell_id)`. - Add `eq.get_spell_resurrection_sickness_check(spell_id_one, spell_id_two)`. - Add `eq.get_spell_target_type(spell_id)`. - Add `eq.get_spell_trigger_spell_id(spell_id)`. - Add `eq.get_spell_viral_maximum_spread_time(spell_id)`. - Add `eq.get_spell_viral_minimum_spread_time(spell_id)`. - Add `eq.get_spell_viral_spread_range(spell_id)`. - Add `eq.is_ae_duration_spell(spell_id)`. - Add `eq.is_ae_nuke_spell(spell_id)`. - Add `eq.is_ae_rain_nuke_spell(spell_id)`. - Add `eq.is_alliance_spell(spell_id)`. - Add `eq.is_bard_only_stack_effect(spell_id)`. - Add `eq.is_bard_song(spell_id)`. - Add `eq.is_beneficial_spell(spell_id)`. - Add `eq.is_blank_spell_effect(spell_id)`. - Add `eq.is_blind_spell(spell_id)`. - Add `eq.is_buff_spell(spell_id)`. - Add `eq.is_cast_not_standing_spell(spell_id)`. - Add `eq.is_cast_on_fade_duration_spell(spell_id)`. - Add `eq.is_cast_restricted_spell(spell_id)`. - Add `eq.is_cast_time_reduction_spell(spell_id)`. - Add `eq.is_cast_while_invisible_spell(spell_id)`. - Add `eq.is_charm_spell(spell_id)`. - Add `eq.is_combat_skill(spell_id)`. - Add `eq.is_complete_heal_duration_spell(spell_id)`. - Add `eq.is_complete_heal_spell(spell_id)`. - Add `eq.is_cure_spell(spell_id)`. - Add `eq.is_damage_spell(spell_id)`. - Add `eq.is_death_save_spell(spell_id)`. - Add `eq.is_debuff_spell(spell_id)`. - Add `eq.is_detrimental_spell(spell_id)`. - Add `eq.is_discipline(spell_id)`. - Add `eq.is_discipline_buff(spell_id)`. - Add `eq.is_disease_counter_spell(spell_id)`. - Add `eq.is_distance_modifier_spell(spell_id)`. - Add `eq.is_effect_ignored_in_stacking(effect_id)`. - Add `eq.is_effect_in_spell(spell_id, effect_id)`. - Add `eq.is_fast_heal_spell(spell_id)`. - Add `eq.is_fear_spell(spell_id)`. - Add `eq.is_focus_limit(effect_id)`. - Add `eq.is_full_death_save_spell(spell_id)`. - Add `eq.is_gate_spell(spell_id)`. - Add `eq.is_group_complete_heal_spell(spell_id)`. - Add `eq.is_group_heal_over_time_spell(spell_id)`. - Add `eq.is_group_only_spell(spell_id)`. - Add `eq.is_group_spell(spell_id)`. - Add `eq.is_harmony_spell(spell_id)`. - Add `eq.is_haste_spell(spell_id)`. - Add `eq.is_heal_over_time_spell(spell_id)`. - Add `eq.is_health_spell(spell_id)`. - Add `eq.is_illusion_spell(spell_id)`. - Add `eq.is_improved_damage_spell(spell_id)`. - Add `eq.is_improved_healing_spell(spell_id)`. - Add `eq.is_increase_duration_spell(spell_id)`. - Add `eq.is_increase_range_spell(spell_id)`. - Add `eq.is_instrument_modifier_applied_to_spell_effect(spell_id, effect_id)`. - Add `eq.is_invisible_spell(spell_id)`. - Add `eq.is_invulnerability_spell(spell_id)`. - Add `eq.is_ldon_object_spell(spell_id)`. - Add `eq.is_lifetap_spell(spell_id)`. - Add `eq.is_magic_rune_spell(spell_id)`. - Add `eq.is_mana_cost_reduction_spell(spell_id)`. - Add `eq.is_mana_tap_spell(spell_id)`. - Add `eq.is_mesmerize_spell(spell_id)`. - Add `eq.is_no_detrimental_spell_aggro_spell(spell_id)`. - Add `eq.is_partial_death_save_spell(spell_id)`. - Add `eq.is_partial_resistable_spell(spell_id)`. - Add `eq.is_pbae_nuke_spell(spell_id)`. - Add `eq.is_percental_heal_spell(spell_id)`. - Add `eq.is_persist_death_spell(spell_id)`. - Add `eq.is_pet_spell(spell_id)`. - Add `eq.is_poison_counter_spell(spell_id)`. - Add `eq.is_pulsing_bard_song(spell_id)`. - Add `eq.is_pure_nuke_spell(spell_id)`. - Add `eq.is_regular_group_heal_spell(spell_id)`. - Add `eq.is_regular_single_target_heal_spell(spell_id)`. - Add `eq.is_resist_debuff_spell(spell_id)`. - Add `eq.is_resistable_spell(spell_id)`. - Add `eq.is_rest_allowed_spell(spell_id)`. - Add `eq.is_resurrection_effects(spell_id)`. - Add `eq.is_rune_spell(spell_id)`. - Add `eq.is_sacrifice_spell(spell_id)`. - Add `eq.is_self_conversion_spell(spell_id)`. - Add `eq.is_shadow_step_spell(spell_id)`. - Add `eq.is_short_duration_buff(spell_id)`. - Add `eq.is_spell_usable_in_this_zone_type(spell_id)`. - Add `eq.is_spell_usable_in_this_zone_type(spell_id, zone_type)`. - Add `eq.is_stackable_dot(spell_id)`. - Add `eq.is_stun_spell(spell_id)`. - Add `eq.is_succor_spell(spell_id)`. - Add `eq.is_summon_item_spell(spell_id)`. - Add `eq.is_summon_pc_spell(spell_id)`. - Add `eq.is_summon_pet_spell(spell_id)`. - Add `eq.is_summon_skeleton_spell(spell_id)`. - Add `eq.is_summon_spell(spell_id)`. - Add `eq.is_suspendable_spell(spell_id)`. - Add `eq.is_target_required_for_spell(spell_id)`. - Add `eq.is_targetable_ae_spell(spell_id)`. - Add `eq.is_teleport_spell(spell_id)`. - Add `eq.is_tgb_compatible_spell(spell_id)`. - Add `eq.is_translocate_spell(spell_id)`. - Add `eq.is_valid_spell(spell_id)`. - Add `eq.is_very_fast_heal_spell(spell_id)`. - Add `eq.is_virus_spell(spell_id)`. - A lot of cleanup in the logic and naming of these methods was done. - Missing GM restricted spells like Guide spells and GM Health buffs were added as defines. - Good effect values were added as defines. - Resurrection effects non-stacking value was added as a define. - Max fast heal casting time and max very fast heal casting time were added as defines. - `SE_Display` was uncommented so we could use it instead of the magic number `425`. - `IsEvacSpell(spell_id)` was removed as it was unnecessary since `IsSuccorSpell(spell_id)` checks for `SE_Succor` as well. - `GetMorphTrigger(spell_id)` was removed as it was unused. - `GroupOnlySpell(spell_id)` was removed as it was unnecessary since `IsGroupOnlySpell(spell_id)` exists. - `CanUseSpell(spell_id)` was removed as it was unnecessary since `GetSpellLevel(spell_id, class_id)` exists. - `BeneficialSpell(spell_id)` was removed as it was unnecessary since `IsBeneficialSpell(spell_id)` exists. * Update spell_effects.cpp * Update spdat.cpp
This commit is contained in:
+21
-21
@@ -545,7 +545,7 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
|
||||
/*
|
||||
Cannot cast if stunned or mezzed, unless spell has 'cast_not_standing' flag.
|
||||
*/
|
||||
if ((IsStunned() || IsMezzed()) && !IgnoreCastingRestriction(spell_id)) {
|
||||
if ((IsStunned() || IsMezzed()) && !IsCastNotStandingSpell(spell_id)) {
|
||||
LogSpells("Spell casting canceled [{}] : can not cast spell when stunned.", spell_id);
|
||||
return false;
|
||||
}
|
||||
@@ -575,7 +575,7 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
|
||||
/*
|
||||
Cannot cast under divine aura, unless spell has 'cast_not_standing' flag.
|
||||
*/
|
||||
if (DivineAura() && !IgnoreCastingRestriction(spell_id)) {
|
||||
if (DivineAura() && !IsCastNotStandingSpell(spell_id)) {
|
||||
LogSpells("Spell casting canceled [{}] : cannot cast while Divine Aura is in effect.", spell_id);
|
||||
InterruptSpell(173, 0x121, false); //not sure we need this.
|
||||
return false;
|
||||
@@ -873,7 +873,7 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
|
||||
/*
|
||||
Requires target to be in same group or same raid in order to apply invisible.
|
||||
*/
|
||||
if (check_on_casting && RuleB(Spells, InvisRequiresGroup) && IsInvisSpell(spell_id)) {
|
||||
if (check_on_casting && RuleB(Spells, InvisRequiresGroup) && IsInvisibleSpell(spell_id)) {
|
||||
if (IsClient() && spell_target && spell_target->IsClient()) {
|
||||
if (spell_target && spell_target->GetID() != GetID()) {
|
||||
bool cast_failed = true;
|
||||
@@ -1781,7 +1781,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
SpellTargetType targetType = spells[spell_id].target_type;
|
||||
bodyType mob_body = spell_target ? spell_target->GetBodyType() : BT_Humanoid;
|
||||
|
||||
if(IsPlayerIllusionSpell(spell_id)
|
||||
if(IsIllusionSpell(spell_id)
|
||||
&& spell_target != nullptr // null ptr crash safeguard
|
||||
&& !spell_target->IsNPC() // still self only if NPC targetted
|
||||
&& IsClient()
|
||||
@@ -2377,7 +2377,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
|
||||
range = spells[spell_id].aoe_range;
|
||||
|
||||
range = GetActSpellRange(spell_id, range);
|
||||
if(IsClient() && IsPlayerIllusionSpell(spell_id) && (HasProjectIllusion())){
|
||||
if(IsClient() && IsIllusionSpell(spell_id) && (HasProjectIllusion())){
|
||||
range = 100;
|
||||
}
|
||||
|
||||
@@ -2461,7 +2461,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
|
||||
}
|
||||
}
|
||||
|
||||
if(IsPlayerIllusionSpell(spell_id)
|
||||
if(IsIllusionSpell(spell_id)
|
||||
&& IsClient()
|
||||
&& (HasProjectIllusion())){
|
||||
LogAA("Effect Project Illusion for [{}] on spell id: [{}] was ON", GetName(), spell_id);
|
||||
@@ -2604,7 +2604,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
|
||||
}
|
||||
|
||||
// Set and send the nimbus effect if this spell has one
|
||||
int NimbusEffect = GetNimbusEffect(spell_id);
|
||||
int NimbusEffect = GetSpellNimbusEffect(spell_id);
|
||||
if(NimbusEffect) {
|
||||
if(!IsNimbusEffectActive(NimbusEffect)) {
|
||||
SendSpellEffect(NimbusEffect, 500, 0, 1, 3000, true);
|
||||
@@ -2754,7 +2754,7 @@ bool Mob::ApplyBardPulse(int32 spell_id, Mob *spell_target, CastingSlot slot) {
|
||||
/*
|
||||
If divine aura applied while pulsing, it is not interrupted but does not reapply until DA fades.
|
||||
*/
|
||||
if (DivineAura() && !IgnoreCastingRestriction(spell_id)) {
|
||||
if (DivineAura() && !IsCastNotStandingSpell(spell_id)) {
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
@@ -2931,7 +2931,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!IsStackableDot(spellid1) && !IsEffectInSpell(spellid1, SE_ManaBurn)) { // mana burn spells we need to use the stacking command blocks live actually checks those first, we should probably rework to that too
|
||||
if (!IsStackableDOT(spellid1) && !IsEffectInSpell(spellid1, SE_ManaBurn)) { // mana burn spells we need to use the stacking command blocks live actually checks those first, we should probably rework to that too
|
||||
if (caster_level1 > caster_level2) { // cur buff higher level than new
|
||||
if (IsEffectInSpell(spellid1, SE_ImprovedTaunt)) {
|
||||
LogSpells("SE_ImprovedTaunt level exception, overwriting");
|
||||
@@ -3005,21 +3005,21 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
||||
if (spellbonuses.BStacker[SBIndex::BUFFSTACKER_EXISTS]) {
|
||||
if ((effect2 == SE_BStacker) && (sp2.effect_id[i] <= spellbonuses.BStacker[SBIndex::BUFFSTACKER_VALUE]))
|
||||
return -1;
|
||||
if ((effect2 == SE_AStacker) && (!IsCastonFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_BStacker)))
|
||||
if ((effect2 == SE_AStacker) && (!IsCastOnFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_BStacker)))
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (spellbonuses.CStacker[SBIndex::BUFFSTACKER_EXISTS]) {
|
||||
if ((effect2 == SE_CStacker) && (sp2.effect_id[i] <= spellbonuses.CStacker[SBIndex::BUFFSTACKER_VALUE]))
|
||||
return -1;
|
||||
if ((effect2 == SE_BStacker) && (!IsCastonFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_CStacker)))
|
||||
if ((effect2 == SE_BStacker) && (!IsCastOnFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_CStacker)))
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (spellbonuses.DStacker[SBIndex::BUFFSTACKER_EXISTS]) {
|
||||
if ((effect2 == SE_DStacker) && (sp2.effect_id[i] <= spellbonuses.DStacker[SBIndex::BUFFSTACKER_VALUE]))
|
||||
return -1;
|
||||
if ((effect2 == SE_CStacker) && (!IsCastonFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_DStacker)))
|
||||
if ((effect2 == SE_CStacker) && (!IsCastOnFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_DStacker)))
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -3038,7 +3038,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
||||
if(sp1_value < overwrite_below_value)
|
||||
{
|
||||
if (IsResurrectionEffects(spellid1)) {
|
||||
int8 res_effect_check = GetResurrectionSicknessCheck(spellid1, spellid2);
|
||||
int8 res_effect_check = GetSpellResurrectionSicknessCheck(spellid1, spellid2);
|
||||
if (res_effect_check != 0) {
|
||||
return res_effect_check;
|
||||
}
|
||||
@@ -3169,7 +3169,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
||||
sp2_value = 0 - sp2_value;
|
||||
|
||||
if (IsResurrectionEffects(spellid1)) {
|
||||
int8 res_effect_check = GetResurrectionSicknessCheck(spellid1, spellid2);
|
||||
int8 res_effect_check = GetSpellResurrectionSicknessCheck(spellid1, spellid2);
|
||||
if (res_effect_check != 0) {
|
||||
return res_effect_check;
|
||||
}
|
||||
@@ -3247,7 +3247,7 @@ bool Mob::CheckSpellLevelRestriction(Mob *caster, uint16 spell_id)
|
||||
}
|
||||
|
||||
if (check_for_restrictions) {
|
||||
int spell_level = GetMinLevel(spell_id);
|
||||
int spell_level = GetSpellMinimumLevel(spell_id);
|
||||
|
||||
// Only check for beneficial buffs
|
||||
if (IsBuffSpell(spell_id) && IsBeneficialSpell(spell_id)) {
|
||||
@@ -3772,7 +3772,7 @@ bool Mob::SpellOnTarget(
|
||||
if (
|
||||
(spelltar->GetInvul() && !spelltar->DivineAura()) ||
|
||||
(spelltar != this && spelltar->DivineAura()) ||
|
||||
(spelltar == this && spelltar->DivineAura() && !IgnoreCastingRestriction(spell_id))
|
||||
(spelltar == this && spelltar->DivineAura() && !IsCastNotStandingSpell(spell_id))
|
||||
) {
|
||||
LogSpells("Casting spell [{}] on [{}] aborted: they are invulnerable", spell_id, spelltar->GetName());
|
||||
safe_delete(action_packet);
|
||||
@@ -3883,7 +3883,7 @@ bool Mob::SpellOnTarget(
|
||||
}
|
||||
|
||||
if (
|
||||
(!IsAllianceSpellLine(spell_id) && !IsBeneficialAllowed(spelltar)) ||
|
||||
(!IsAllianceSpell(spell_id) && !IsBeneficialAllowed(spelltar)) ||
|
||||
(IsGroupOnlySpell(spell_id) &&
|
||||
!(
|
||||
(
|
||||
@@ -4115,7 +4115,7 @@ bool Mob::SpellOnTarget(
|
||||
|
||||
if (
|
||||
IsCharmSpell(spell_id) ||
|
||||
IsMezSpell(spell_id) ||
|
||||
IsMesmerizeSpell(spell_id) ||
|
||||
IsFearSpell(spell_id)
|
||||
) {
|
||||
spell_effectiveness = spelltar->ResistSpell(
|
||||
@@ -4144,7 +4144,7 @@ bool Mob::SpellOnTarget(
|
||||
}
|
||||
|
||||
if (spell_effectiveness < 100) {
|
||||
if (spell_effectiveness == 0 || !IsPartialCapableSpell(spell_id)) {
|
||||
if (spell_effectiveness == 0 || !IsPartialResistableSpell(spell_id)) {
|
||||
LogSpells("Spell [{}] was completely resisted by [{}]", spell_id, spelltar->GetName());
|
||||
|
||||
if (spells[spell_id].resist_type == RESIST_PHYSICAL){
|
||||
@@ -4687,7 +4687,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
if(IsBeneficialSpell(spell_id) && (caster->GetNPCTypeID())) //then skip the rest, stop NPCs aggroing each other with buff spells. 2013-03-05
|
||||
return false;
|
||||
|
||||
if(IsMezSpell(spell_id))
|
||||
if(IsMesmerizeSpell(spell_id))
|
||||
{
|
||||
if(GetSpecialAbility(UNMEZABLE)) {
|
||||
LogSpells("We are immune to Mez spells");
|
||||
@@ -5150,7 +5150,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use
|
||||
{
|
||||
//This is confusing but it's basically right
|
||||
//It skews partial resists up over 100 more often than not
|
||||
if(!IsPartialCapableSpell(spell_id))
|
||||
if(!IsPartialResistableSpell(spell_id))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user