From 608815855fe15009cd3e201b6734a992e70d2362 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sun, 17 Oct 2010 12:36:48 +0200 Subject: [PATCH] [10615] Add script effect of spell 66741 Signed-off-by: NoFantasy --- src/game/SpellEffects.cpp | 26 ++++++++++++++++++++++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f0ce84be0..297fba524 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -6229,6 +6229,32 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx) unitTarget->CastSpell(unitTarget, 66622, true); break; } + case 66741: // Chum the Water + { + // maybe this check should be done sooner? + if (!m_caster->IsInWater()) + return; + + uint32 spellId = 0; + + // too low/high? + if (roll_chance_i(33)) + spellId = 66737; // angry + else + { + switch(rand() % 3) + { + case 0: spellId = 66740; break; // blue + case 1: spellId = 66739; break; // tresher + case 2: spellId = 66738; break; // mako + } + } + + if (spellId) + m_caster->CastSpell(m_caster, spellId, true); + + return; + } case 66744: // Make Player Destroy Totems { if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a348ae3af..3f91c0098 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 "10614" + #define REVISION_NR "10615" #endif // __REVISION_NR_H__