From 87e7b9c3f0ee8418494c7f44c9e3a9378cbf42f5 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Thu, 26 Jun 2014 06:23:27 -0400 Subject: [PATCH] Implemented SE_IllusionOther - Allows next Illusion buff (self only) cast to be cast on target. (AA ProjectIllusion now uses this) Run required SLQ to update AA. --- changelog.txt | 1 + common/spdat.h | 2 +- utils/sql/git/required/2014_06_25_AA_Updates..sql | 10 ++++++++++ zone/AA.cpp | 6 ------ zone/AA.h | 2 +- zone/mob.cpp | 1 + zone/mob.h | 3 +++ zone/spell_effects.cpp | 6 ++++++ zone/spells.cpp | 8 ++++---- 9 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 utils/sql/git/required/2014_06_25_AA_Updates..sql diff --git a/changelog.txt b/changelog.txt index 991ffbba5..d54a8d52d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,7 @@ Kayen: Updated SE_FadingMemories - Base value will be properly utilized to set % Kayen: Implemented SE_StrikeThough (Was incorrectly defined as implemented previously) - Works same as item bonus. Kayen: Update SE_Taunt - Limit value if present will now add instant hate. Kayen: Implemented SE_MassGroupBuff - Allows next group buff cast to be a MGB (AA now uses this) +Kayen: Implemented SE_IllusionOther - Allows next Illusion buff (self only) cast to be cast on target. (AA now uses this) Required SQL: utils/sql/git/required/2014_06_25_MGB_AA.sql diff --git a/common/spdat.h b/common/spdat.h index 956d40b31..ea4218ff1 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -349,7 +349,7 @@ typedef enum { #define SE_Taunt 199 // implemented - % chance to taunt the target #define SE_ProcChance 200 // implemented #define SE_RangedProc 201 // implemented -//#define SE_IllusionOther 202 // *not implemented as bonus(Project Illusion) +#define SE_IllusionOther 202 // implemented - Project Illusion #define SE_MassGroupBuff 203 // implemented #define SE_GroupFearImmunity 204 // *not implemented as bonus #define SE_Rampage 205 // implemented diff --git a/utils/sql/git/required/2014_06_25_AA_Updates..sql b/utils/sql/git/required/2014_06_25_AA_Updates..sql new file mode 100644 index 000000000..2e2b7579f --- /dev/null +++ b/utils/sql/git/required/2014_06_25_AA_Updates..sql @@ -0,0 +1,10 @@ +-- AA MGB update +UPDATE altadv_vars SET spellid = 5228 WHERE skill_id = 128; +UPDATE aa_actions SET spell_id = 5228, nonspell_action = 0 WHERE aaid = 128; + +-- AA Project Illusion update +UPDATE altadv_vars SET spellid = 5227 WHERE skill_id = 643; +UPDATE aa_actions SET spell_id = 5227, nonspell_action = 0 WHERE aaid = 643; + +-- spells_new update +ALTER TABLE `spells_new` CHANGE `field175` `numhits_type` INT(11) NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/zone/AA.cpp b/zone/AA.cpp index bd1e568b3..6e5569c3c 100644 --- a/zone/AA.cpp +++ b/zone/AA.cpp @@ -454,12 +454,6 @@ void Client::HandleAAAction(aaID activate) { } break; - case aaActionProjectIllusion: - EnableAAEffect(aaEffectProjectIllusion, 3600); - Message(10, "The power of your next illusion spell will flow to your grouped target in your place."); - break; - - case aaActionEscape: Escape(); break; diff --git a/zone/AA.h b/zone/AA.h index 36cc886af..3adc887e3 100644 --- a/zone/AA.h +++ b/zone/AA.h @@ -50,7 +50,7 @@ typedef enum { //AA Effect IDs aaEffectFrostArrows, aaEffectWarcry, aaEffectLeechTouch, - aaEffectProjectIllusion // seveian 2008-09-23 + aaEffectProjectIllusion // unused - Handled via spell effect } aaEffectType; diff --git a/zone/mob.cpp b/zone/mob.cpp index e10a1aeb1..ed2072e21 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -181,6 +181,7 @@ Mob::Mob(const char* in_name, has_shieldequiped = false; has_numhits = false; has_MGB = false; + has_ProjectIllusion = false; if(in_aa_title>0) aa_title = in_aa_title; diff --git a/zone/mob.h b/zone/mob.h index 599fa3b69..61a2220d6 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -270,6 +270,8 @@ public: inline void Numhits(bool val) { has_numhits = val; } bool HasMGB() const { return has_MGB; } inline void SetMGB(bool val) { has_MGB = val; } + bool HasProjectIllusion() const { return has_ProjectIllusion ; } + inline void SetProjectIllusion(bool val) { has_ProjectIllusion = val; } void SpreadVirus(uint16 spell_id, uint16 casterID); bool IsNimbusEffectActive(uint32 nimbus_effect); void SetNimbusEffect(uint32 nimbus_effect); @@ -1100,6 +1102,7 @@ protected: bool has_shieldequiped; bool has_numhits; bool has_MGB; + bool has_ProjectIllusion; // Bind wound Timer bindwound_timer; diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 35e8ecf66..635fc9270 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -2717,6 +2717,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) break; } + case SE_IllusionOther: { + SetProjectIllusion(true); + Message(10, "The power of your next illusion spell will flow to your grouped target in your place."); + break; + } + // Handled Elsewhere case SE_ImmuneFleeing: case SE_NegateSpellEffect: diff --git a/zone/spells.cpp b/zone/spells.cpp index 041f13fce..78dce3379 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1371,7 +1371,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce && IsClient() && (IsGrouped() // still self only if not grouped || IsRaidGrouped()) - && CastToClient()->CheckAAEffect(aaEffectProjectIllusion)){ + && (HasProjectIllusion())){ mlog(AA__MESSAGE, "Project Illusion overwrote target caster: %s spell id: %d was ON", GetName(), spell_id); targetType = ST_GroupClientAndPet; } @@ -1853,7 +1853,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16 range = GetActSpellRange(spell_id, range); if(IsPlayerIllusionSpell(spell_id) && IsClient() - && CastToClient()->CheckAAEffect(aaEffectProjectIllusion)){ + && (HasProjectIllusion())){ range = 100; } if(spell_target != nullptr && spell_target != this) { @@ -1912,9 +1912,9 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16 if(IsPlayerIllusionSpell(spell_id) && IsClient() - && CastToClient()->CheckAAEffect(aaEffectProjectIllusion)){ + && (HasProjectIllusion())){ mlog(AA__MESSAGE, "Effect Project Illusion for %s on spell id: %d was ON", GetName(), spell_id); - CastToClient()->DisableAAEffect(aaEffectProjectIllusion); + SetProjectIllusion(false); } else{ mlog(AA__MESSAGE, "Effect Project Illusion for %s on spell id: %d was OFF", GetName(), spell_id);