From 3e8fcd03c16e7511aa1d305a150a3441fb2b3cb2 Mon Sep 17 00:00:00 2001 From: laise Date: Sun, 10 Jan 2010 00:41:09 +0300 Subject: [PATCH] [9133] Fixes in talent 11129 work. * Restore after client switch talent triggering. * Propertly remove triggred auras stack or main spell aura at expire/cancel. Signed-off-by: VladimirMangos --- sql/mangos.sql | 4 ++-- sql/updates/9133_01_mangos_spell_proc_event.sql | 5 +++++ sql/updates/Makefile.am | 2 ++ src/game/SpellAuras.cpp | 16 ++++++++++++++++ src/game/Unit.cpp | 4 +--- src/shared/revision_nr.h | 2 +- src/shared/revision_sql.h | 2 +- 7 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 sql/updates/9133_01_mangos_spell_proc_event.sql diff --git a/sql/mangos.sql b/sql/mangos.sql index 1c265f227..8b4b1c9a7 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -24,7 +24,7 @@ CREATE TABLE `db_version` ( `version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL, `cache_id` int(10) default '0', - `required_9125_01_mangos_npc_spellclick_spells` bit(1) default NULL + `required_9133_01_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -17745,7 +17745,7 @@ INSERT INTO `spell_proc_event` VALUES (11095, 0x00000000, 3, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (11119, 0x00000004, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (11120, 0x00000004, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -(11129, 0x00000000, 3, 0x00C00017, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(11129, 0x00000004, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (11180, 0x00000010, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (11185, 0x00000000, 3, 0x00000080, 0x00000000, 0x00000000, 0x00050000, 0x00000000, 0.000000, 0.000000, 0), (11255, 0x00000000, 3, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), diff --git a/sql/updates/9133_01_mangos_spell_proc_event.sql b/sql/updates/9133_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..fbc39456a --- /dev/null +++ b/sql/updates/9133_01_mangos_spell_proc_event.sql @@ -0,0 +1,5 @@ +ALTER TABLE db_version CHANGE COLUMN required_9125_01_mangos_npc_spellclick_spells required_9133_01_mangos_spell_proc_event bit; + +DELETE FROM `spell_proc_event` WHERE `entry` IN (11129); +INSERT INTO `spell_proc_event` VALUES +(11129, 0x00000004, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 57990022c..6edcc6698 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -227,6 +227,7 @@ pkgdata_DATA = \ 9095_01_mangos_command.sql \ 9121_01_mangos_npc_spellclick_spells.sql \ 9125_01_mangos_npc_spellclick_spells.sql \ + 9133_01_mangos_spell_proc_event.sql \ README ## Additional files to include when running 'make dist' @@ -434,4 +435,5 @@ EXTRA_DIST = \ 9095_01_mangos_command.sql \ 9121_01_mangos_npc_spellclick_spells.sql \ 9125_01_mangos_npc_spellclick_spells.sql \ + 9133_01_mangos_spell_proc_event.sql \ README diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 26cf7f466..84b139fbe 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5930,6 +5930,22 @@ void Aura::HandleSpellSpecificBoosts(bool apply) else return; } + // Combustion (remove triggered aura stack) + else if (m_spellProto->Id == 11129) + { + if(!apply) + spellId1 = 28682; + else + return; + } + // Combustion (remove main aura) + else if (m_spellProto->Id == 28682) + { + if(!apply) + spellId1 = 11129; + else + return; + } else return; break; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 1146cc6b2..3a20ec133 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5386,10 +5386,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu { //last charge and crit if (triggeredByAura->GetAuraCharges() <= 1 && (procEx & PROC_EX_CRITICAL_HIT) ) - { - RemoveAurasDueToSpell(28682); //-> remove Combustion auras return true; // charge counting (will removed) - } CastSpell(this, 28682, true, castItem, triggeredByAura); return (procEx & PROC_EX_CRITICAL_HIT); // charge update only at crit hits, no hidden cooldowns @@ -11965,6 +11962,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN: case SPELL_AURA_MANA_SHIELD: case SPELL_AURA_OBS_MOD_MANA: + case SPELL_AURA_ADD_PCT_MODIFIER: case SPELL_AURA_DUMMY: { sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 405e1531c..449e7e834 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9132" + #define REVISION_NR "9133" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index b6aa01d75..36d086c4a 100644 --- a/src/shared/revision_sql.h +++ b/src/shared/revision_sql.h @@ -1,6 +1,6 @@ #ifndef __REVISION_SQL_H__ #define __REVISION_SQL_H__ #define REVISION_DB_CHARACTERS "required_8874_01_characters_character_skills" - #define REVISION_DB_MANGOS "required_9125_01_mangos_npc_spellclick_spells" + #define REVISION_DB_MANGOS "required_9133_01_mangos_spell_proc_event" #define REVISION_DB_REALMD "required_9010_01_realmd_realmlist" #endif // __REVISION_SQL_H__ -- 2.11.4.GIT