From ec35c0d93328d6006bcb2a54726bc6746bf31138 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Thu, 26 Jun 2014 05:40:09 -0400 Subject: [PATCH] Implemented SE_MassGroupBuff as spell effect (no longer hard coded for AA only). Run required SQL to update AA tables. Updated spells_new field175 -> numhits_type --- changelog.txt | 4 ++++ common/spdat.h | 2 +- zone/AA.cpp | 5 ----- zone/AA.h | 2 +- zone/mob.cpp | 1 + zone/mob.h | 3 +++ zone/spell_effects.cpp | 10 +++++++++- zone/spells.cpp | 6 +++--- 8 files changed, 22 insertions(+), 11 deletions(-) diff --git a/changelog.txt b/changelog.txt index 5a77ec900..991ffbba5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,10 @@ Kayen: Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant Kayen: Updated SE_FadingMemories - Base value will be properly utilized to set % chance for fade effect to work. 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) + +Required SQL: utils/sql/git/required/2014_06_25_MGB_AA.sql + == 06/17/2014 == Kayen: Implemented SE_AStacker, SE_BStacker, SE_CStacker, SE_DStacker. diff --git a/common/spdat.h b/common/spdat.h index f4883552b..956d40b31 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -350,7 +350,7 @@ typedef enum { #define SE_ProcChance 200 // implemented #define SE_RangedProc 201 // implemented //#define SE_IllusionOther 202 // *not implemented as bonus(Project Illusion) -//#define SE_MassGroupBuff 203 // *not implemented as bonus +#define SE_MassGroupBuff 203 // implemented #define SE_GroupFearImmunity 204 // *not implemented as bonus #define SE_Rampage 205 // implemented #define SE_AETaunt 206 // implemented diff --git a/zone/AA.cpp b/zone/AA.cpp index 8566c09b5..bd1e568b3 100644 --- a/zone/AA.cpp +++ b/zone/AA.cpp @@ -352,11 +352,6 @@ void Client::HandleAAAction(aaID activate) { entity_list.AETaunt(this); break; - case aaActionMassBuff: - EnableAAEffect(aaEffectMassGroupBuff, 3600); - Message_StringID(MT_Disciplines, MGB_STRING); //The next group buff you cast will hit all targets in range. - break; - case aaActionFlamingArrows: //toggle it if(CheckAAEffect(aaEffectFlamingArrows)) diff --git a/zone/AA.h b/zone/AA.h index ccdddf317..36cc886af 100644 --- a/zone/AA.h +++ b/zone/AA.h @@ -43,7 +43,7 @@ typedef enum { //use these for AAs which dont cast spells, yet need effects //if this list grows beyond 32, more work is needed in *AAEffect typedef enum { //AA Effect IDs - aaEffectMassGroupBuff = 1, + aaEffectMassGroupBuff = 1, //unused - Handled via spell effect. aaEffectRampage, aaEffectSharedHealth, aaEffectFlamingArrows, diff --git a/zone/mob.cpp b/zone/mob.cpp index 138c159cd..e10a1aeb1 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -180,6 +180,7 @@ Mob::Mob(const char* in_name, trackable = true; has_shieldequiped = false; has_numhits = false; + has_MGB = false; if(in_aa_title>0) aa_title = in_aa_title; diff --git a/zone/mob.h b/zone/mob.h index 4ab9d8a84..599fa3b69 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -268,6 +268,8 @@ public: void CheckNumHitsRemaining(uint8 type, uint32 buff_slot=0, uint16 spell_id=SPELL_UNKNOWN); bool HasNumhits() const { return has_numhits; } inline void Numhits(bool val) { has_numhits = val; } + bool HasMGB() const { return has_MGB; } + inline void SetMGB(bool val) { has_MGB = val; } void SpreadVirus(uint16 spell_id, uint16 casterID); bool IsNimbusEffectActive(uint32 nimbus_effect); void SetNimbusEffect(uint32 nimbus_effect); @@ -1097,6 +1099,7 @@ protected: bool offhand; bool has_shieldequiped; bool has_numhits; + bool has_MGB; // Bind wound Timer bindwound_timer; diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index b073b65e2..35e8ecf66 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -2710,6 +2710,13 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) break; } + case SE_MassGroupBuff:{ + + SetMGB(true); + Message_StringID(MT_Disciplines, MGB_STRING); + break; + } + // Handled Elsewhere case SE_ImmuneFleeing: case SE_NegateSpellEffect: @@ -2864,7 +2871,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) case SE_ACv2: case SE_ManaRegen_v2: case SE_FcDamagePctCrit: - case SE_FcHealAmt: + case SE_FcHealAmt: case SE_FcHealPctIncoming: case SE_CriticalHealDecay: case SE_CriticalRegenDecay: @@ -2878,6 +2885,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) case SE_PetCriticalHit: case SE_SlayUndead: case SE_GiveDoubleAttack: + case SE_StrikeThrough: case SE_StrikeThrough2: case SE_SecondaryDmgInc: case SE_ArcheryDamageModifier: diff --git a/zone/spells.cpp b/zone/spells.cpp index 32140849b..041f13fce 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -399,7 +399,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot, mana_cost = GetActSpellCost(spell_id, mana_cost); } - if(IsClient() && CastToClient()->CheckAAEffect(aaEffectMassGroupBuff) && spells[spell_id].can_mgb) + if(HasMGB() && spells[spell_id].can_mgb) mana_cost *= 2; // mana is checked for clients on the frontend. we need to recheck it for NPCs though @@ -1969,11 +1969,11 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16 } #endif //BOTS - if(spells[spell_id].can_mgb && IsClient() && CastToClient()->CheckAAEffect(aaEffectMassGroupBuff)) + if(spells[spell_id].can_mgb && HasMGB()) { SpellOnTarget(spell_id, this); entity_list.MassGroupBuff(this, this, spell_id, true); - CastToClient()->DisableAAEffect(aaEffectMassGroupBuff); + SetMGB(false); } else {