From 037fa6eae1e88c930ccb123668e552f191e87559 Mon Sep 17 00:00:00 2001 From: QAston Date: Wed, 5 Aug 2009 16:00:36 +0200 Subject: [PATCH] *Script effect for Big Blizzard Bear - by simon. --HG-- branch : trunk --- sql/updates/4759_world.sql | 4 ++++ src/game/SpellEffects.cpp | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 sql/updates/4759_world.sql diff --git a/sql/updates/4759_world.sql b/sql/updates/4759_world.sql new file mode 100644 index 0000000000..89dd597f90 --- /dev/null +++ b/sql/updates/4759_world.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN(58872, 58872); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +( 58872, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0, 0, 0), -- Damage Shield (Rank 1) +( 58872, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0, 0, 0); -- Damage Shield (Rank 2) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index b3ee8baa7e..e35b7ea0ff 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5085,6 +5085,24 @@ void Spell::EffectScriptEffect(uint32 effIndex) } } return; + case 58983: + { + if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) + return; + + // Prevent stacking of mounts + unitTarget->RemoveAurasByType(SPELL_AURA_MOUNTED); + + // Triggered spell id dependent of riding skill + if(uint16 skillval = ((Player*)unitTarget)->GetSkillValue(SKILL_RIDING)) + { + if (skillval >= 150) + unitTarget->CastSpell(unitTarget, 58999, true); + else + unitTarget->CastSpell(unitTarget, 58997, true); + } + return; + } case 59317: // Teleporting if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) return;