From bef47ce1265cc7d1bd5ccc1bfcf8f362056e212a Mon Sep 17 00:00:00 2001 From: Neveragain Date: Sat, 26 Feb 2011 23:46:54 +0100 Subject: [PATCH] [11205] Implement talent 48492 and ranks. Signed-off-by: Lynx3d --- sql/mangos.sql | 3 ++- sql/mangos_spell_check.sql | 3 +++ .../11205_01_mangos_spell_proc_event.sql | 5 +++++ src/game/SpellAuras.cpp | 2 ++ src/game/UnitAuraProcHandler.cpp | 22 +++++++++++++++++++ src/shared/revision_nr.h | 2 +- src/shared/revision_sql.h | 2 +- 7 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 sql/updates/11205_01_mangos_spell_proc_event.sql diff --git a/sql/mangos.sql b/sql/mangos.sql index 7519ea4bc..8e31799a3 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_11200_01_mangos_spell_bonus_data` bit(1) default NULL + `required_11205_01_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -17349,6 +17349,7 @@ INSERT INTO `spell_proc_event` VALUES (48110, 0x7F, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000A02A8, 0x00000000, 0.000000, 0.000000, 0), (48111, 0x7F, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000A02A8, 0x00000000, 0.000000, 0.000000, 0), (48483, 0x00, 7, 0x00008800, 0x00008800, 0x00008800, 0x00000440, 0x00000440, 0x00000440, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), +(48492, 0x00, 7, 0x00080000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000800, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0), (48496, 0x00, 7, 0x00000060, 0x00000060, 0x00000060, 0x02000002, 0x02000002, 0x02000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (48506, 0x00, 7, 0x00000005, 0x00000005, 0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (48516, 0x00, 7, 0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 30), diff --git a/sql/mangos_spell_check.sql b/sql/mangos_spell_check.sql index 1e679373e..e274567a4 100644 --- a/sql/mangos_spell_check.sql +++ b/sql/mangos_spell_check.sql @@ -49,6 +49,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (6788, -1, -1, -1, -1, -1, -1, -1, -1,-1,'Weakened Soul', 'Spell::cast'), (9512, -1, -1, -1, -1, -1, -1, 30, -1,-1,'Restore Energy', 'Spell::EffectEnergize'), (4073, -1, -1, -1, -1, -1, -1, -1, -1,-1,'Mechanical Dragonling', 'Spell::EffectDummy'), +(5229, -1, -1, -1, -1, -1, -1, -1, -1,-1,'Enrage', 'SpellAuraHolder::HandleSpellSpecificBoosts'), (5938, 8, -1, -1, -1, -1, -1, 3, -1,-1,'Shiv', 'Spell::EffectDummy'), (5940, -1, -1, -1, -1, -1, -1, -1, -1,-1,'Shiv', 'Spell::EffectDummy'), (8017, 11,0x0000000000400000,0x00000000, -1, -1, -1, 54, -1,-1,'Rockbiter Weapon', 'Spell::EffectEnchantItemTmp'), @@ -404,6 +405,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas (50927,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Gluttonous Lurkers: Create Zul\'Drak Rat Cover','Spell::EffectDummy'), (51026, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Create Drakkari Medallion Cover', 'Spell::EffectDummy'), (51037,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Captured Chicken Cover', 'Spell::EffectDummy'), +(51185,-1, -1, -1, -1, -1, -1, -1, -1,-1,'King of the Jungle', 'SpellAuraHolder::HandleSpellSpecificBoosts'), (51209,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Hungering Cold', 'Spell::EffectDummy'), (51276, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Incinerate Corpse', 'Spell::EffectDummy'), (51278,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Incinerate Corpse', 'Spell::EffectDummy'), @@ -676,6 +678,7 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas ( 0,10, -1, -1, 561, -1, -1, 3, -1,-1,'Judgement of command', 'Spell::EffectDummy'), ( 0,10,0x0000000800000000,0x00000000,2292, -1, -1, 2, -1,-1,'Judgement of Vengeance', 'Spell::EffectSchoolDMG'), ( 0,10,0x0001000900B80400,0x00000000, -1, -1, -1, -1, -1,-1,'Judgements (all) / Holy Shock', 'Spell::prepareDataForTriggerSystem'), +( 0, 7,0x0000000000000000,0x00000000,2850, -1, -1, -1, 4,-1,'King of the Jungle', 'Unit::HandleDummyAuraProc'), ( 0, 7,0x0000010000000000,0x00000000,2246, -1, -1, 2, -1,-1,'Lacerate', 'Spell::EffectSchoolDMG'), ( 0,11,0x0000000000000000,0x00000004, -1, -1, -1, 3, -1,-1,'Lava Lash', 'Spell::EffectDummy'), ( 0,10,0x0000000000008000,0x00000000, -1, -1, -1, -1, -1,-1,'Lay on Hands', 'Spell::cast'), diff --git a/sql/updates/11205_01_mangos_spell_proc_event.sql b/sql/updates/11205_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..89eb098ef --- /dev/null +++ b/sql/updates/11205_01_mangos_spell_proc_event.sql @@ -0,0 +1,5 @@ +ALTER TABLE db_version CHANGE COLUMN required_11200_01_mangos_spell_bonus_data required_11205_01_mangos_spell_proc_event bit; + +DELETE FROM spell_proc_event WHERE entry = 48492; +INSERT INTO spell_proc_event VALUES +(48492, 0x00, 7, 0x00080000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000800, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 9320ab285..b68add48a 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -9003,6 +9003,8 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply) // Barkskin if (GetId()==22812 && m_target->HasAura(63057)) // Glyph of Barkskin spellId1 = 63058; // Glyph - Barkskin 01 + else if (!apply && GetId() == 5229) // Enrage (Druid Bear) + spellId1 = 51185; // King of the Jungle (Enrage damage aura) else return; break; diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index a54d4b125..31883bcf9 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -1609,6 +1609,28 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura return SPELL_AURA_PROC_OK; } } + // King of the Jungle + if (dummySpell->SpellIconID == 2850) + { + switch (effIndex) + { + case EFFECT_INDEX_0: // Enrage (bear) + { + // note : aura removal is done in SpellAuraHolder::HandleSpellSpecificBoosts + basepoints[0] = triggerAmount; + triggered_spell_id = 51185; + break; + } + case EFFECT_INDEX_1: // Tiger's Fury (cat) + { + basepoints[0] = triggerAmount; + triggered_spell_id = 51178; + break; + } + default: + return SPELL_AURA_PROC_FAILED; + } + } // Eclipse if (dummySpell->SpellIconID == 2856) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 6e2b7a52b..3b2c8be06 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 "11204" + #define REVISION_NR "11205" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index afdc94bc5..07dbf61c2 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_11117_02_characters_world" - #define REVISION_DB_MANGOS "required_11200_01_mangos_spell_bonus_data" + #define REVISION_DB_MANGOS "required_11205_01_mangos_spell_proc_event" #define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version" #endif // __REVISION_SQL_H__