mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
[svn] Update serpent shrine scripts. Patch provided by streetrat.
--HG-- branch : trunk
This commit is contained in:
@@ -4,4 +4,10 @@ UPDATE creature_template SET ScriptName = 'mob_greyheart_spellbinder' WHERE entr
|
||||
UPDATE creature_template SET ScriptName = 'mob_inner_demon' WHERE entry = '21857';
|
||||
|
||||
UPDATE creature_template SET ScriptName = 'mob_toxic_sporebat', speed = '1' WHERE entry = '22140';
|
||||
UPDATE creature_template SET modelid_A = '11686', modelid_H = '11686', flags_extra = '128' WHERE entry = '22207';
|
||||
UPDATE creature_template SET modelid_A = '11686', modelid_H = '11686', flags_extra = '128' WHERE entry = '22207';
|
||||
|
||||
-- lurker
|
||||
UPDATE creature_model_info SET bounding_radius = '13', combat_reach = '20' WHERE modelid = '20216';
|
||||
UPDATE creature_template SET InhabitType = '3', ScriptName = 'boss_the_lurker_below' WHERE entry = '21865';
|
||||
UPDATE creature_template SET ScriptName = 'mob_coilfang_ambusher' WHERE entry = '21865';
|
||||
UPDATE creature_template SET ScriptName = 'mob_coilfang_guardian' WHERE entry = '21873';
|
||||
@@ -159,6 +159,7 @@ scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp \
|
||||
scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp \
|
||||
scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp \
|
||||
scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp \
|
||||
scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp \
|
||||
scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp \
|
||||
scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp \
|
||||
scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp \
|
||||
|
||||
@@ -237,6 +237,7 @@ extern void AddSC_boss_lady_vashj();
|
||||
extern void AddSC_boss_leotheras_the_blind();
|
||||
extern void AddSC_boss_morogrim_tidewalker();
|
||||
extern void AddSC_instance_serpentshrine_cavern();
|
||||
extern void AddSC_boss_the_lurker_below();
|
||||
|
||||
//--Slave Pens
|
||||
|
||||
@@ -1420,6 +1421,7 @@ void ScriptsInit()
|
||||
AddSC_boss_leotheras_the_blind();
|
||||
AddSC_boss_morogrim_tidewalker();
|
||||
AddSC_instance_serpentshrine_cavern();
|
||||
AddSC_boss_the_lurker_below();
|
||||
|
||||
//--Slave Pens
|
||||
//--Steam Vault
|
||||
|
||||
@@ -1660,6 +1660,10 @@
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_hydross_the_unstable.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lurker_below.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lady_vashj.cpp"
|
||||
>
|
||||
|
||||
@@ -1905,6 +1905,10 @@
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_hydross_the_unstable.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lurker_below.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lady_vashj.cpp"
|
||||
>
|
||||
|
||||
@@ -1892,6 +1892,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lurker_below.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\serpent_shrine\boss_lady_vashj.cpp"
|
||||
>
|
||||
</File>
|
||||
|
||||
@@ -198,7 +198,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
ShieldGeneratorChannel[1] = 0;
|
||||
ShieldGeneratorChannel[2] = 0;
|
||||
ShieldGeneratorChannel[3] = 0;
|
||||
|
||||
|
||||
m_creature->SetCorpseDelay(1000*60*60);
|
||||
}
|
||||
|
||||
@@ -597,23 +597,11 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetSpeed(MOVE_WALK,0.6,true);//walk
|
||||
m_creature->SetSpeed(MOVE_RUN,0.6,true);//run
|
||||
m_creature->SetSpeed(MOVE_WALK,0.6);//walk
|
||||
m_creature->SetSpeed(MOVE_RUN,0.6);//run
|
||||
move = 0;
|
||||
phase = 1;
|
||||
Vashj = NULL;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) { return; }
|
||||
|
||||
void MoveInLineOfSight(Unit *who){return;}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!pInstance)
|
||||
return;
|
||||
|
||||
if (!Vashj){ Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ)); }
|
||||
|
||||
for (int i = 0;i<8;i++)//search for nearest waypoint (up on stairs)
|
||||
{
|
||||
@@ -633,15 +621,27 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ));
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) { return; }
|
||||
|
||||
void MoveInLineOfSight(Unit *who){return;}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!pInstance)
|
||||
return;
|
||||
|
||||
if (!Vashj)
|
||||
{
|
||||
m_creature->Say("Error Vashj not found!", LANG_UNIVERSAL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(move < diff)
|
||||
{
|
||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_WALK_MODE);
|
||||
if (phase == 1)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_the_lurker_below
|
||||
SD%Complete: 10
|
||||
SDComment:
|
||||
SDCategory: The Lurker Below
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_serpent_shrine.h"
|
||||
#include "../../../creature/simple_ai.h"
|
||||
#include "Spell.h"
|
||||
|
||||
#define SPELL_SPOUT 37433
|
||||
#define SPELL_SPOUT_2 42835
|
||||
#define SPELL_KNOCKBACK 19813
|
||||
#define SPELL_GEYSER 37478
|
||||
#define SPELL_WHIRL 37660
|
||||
#define SPELL_WATERBOLT 37138
|
||||
#define SPELL_SUBMERGE 37550
|
||||
#define SPELL_EMERGE 20568
|
||||
|
||||
#define EMOTE_SPOUT "takes a deep breath."
|
||||
|
||||
#define MOB_COILFANG_GUARDIAN 21873
|
||||
#define MOB_COILFANG_AMBUSHER 21865
|
||||
|
||||
//Ambusher spells
|
||||
#define SPELL_SPREAD_SHOT 37790
|
||||
#define SPELL_SHOOT 37770
|
||||
|
||||
//Guardian spells
|
||||
#define SPELL_ARCINGSMASH 38761 // Wrong SpellId. Can't find the right one.
|
||||
#define SPELL_HAMSTRING 26211
|
||||
|
||||
struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public ScriptedAI
|
||||
{
|
||||
boss_the_lurker_belowAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_coilfang_guardian(Creature *_Creature)
|
||||
{
|
||||
SimpleAI* ai = new SimpleAI (_Creature);
|
||||
|
||||
ai->Spell[0].Enabled = true;
|
||||
ai->Spell[0].Spell_Id = SPELL_ARCINGSMASH;
|
||||
ai->Spell[0].Cooldown = 15000;
|
||||
ai->Spell[0].First_Cast = 5000;
|
||||
ai->Spell[0].Cast_Target_Type = CAST_HOSTILE_TARGET;
|
||||
|
||||
ai->Spell[1].Enabled = true;
|
||||
ai->Spell[1].Spell_Id = SPELL_HAMSTRING;
|
||||
ai->Spell[1].Cooldown = 10000;
|
||||
ai->Spell[1].First_Cast = 2000;
|
||||
ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET;
|
||||
|
||||
return ai;
|
||||
}
|
||||
|
||||
struct TRINITY_DLL_DECL mob_coilfang_ambusherAI : public Scripted_NoMovementAI
|
||||
{
|
||||
mob_coilfang_ambusherAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
Reset();
|
||||
SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SHOOT);
|
||||
if(TempSpell)
|
||||
TempSpell->Effect[0] = 2;//change spell effect from weapon % dmg to simple phisical dmg
|
||||
}
|
||||
|
||||
uint32 MultiShotTimer;
|
||||
uint32 ShootBowTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
MultiShotTimer = 10000;
|
||||
ShootBowTimer = 4000;
|
||||
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!who || m_creature->getVictim()) return;
|
||||
|
||||
if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
||||
{
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(MultiShotTimer < diff)
|
||||
{
|
||||
if(m_creature->getVictim())
|
||||
DoCast(m_creature->getVictim(), SPELL_SPREAD_SHOT, true);
|
||||
|
||||
MultiShotTimer = 10000;
|
||||
ShootBowTimer += 1500;//add global cooldown
|
||||
}else MultiShotTimer -= diff;
|
||||
|
||||
if(ShootBowTimer < diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
int bp0 = 1100;
|
||||
if(target)
|
||||
m_creature->CastCustomSpell(target,SPELL_SHOOT,&bp0,NULL,NULL,true);
|
||||
ShootBowTimer = 4000;
|
||||
MultiShotTimer += 1500;//add global cooldown
|
||||
}else ShootBowTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_coilfang_ambusher(Creature *_Creature)
|
||||
{
|
||||
return new mob_coilfang_ambusherAI (_Creature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_boss_the_lurker_below(Creature *_Creature)
|
||||
{
|
||||
return new boss_the_lurker_belowAI (_Creature);
|
||||
}
|
||||
|
||||
void AddSC_boss_the_lurker_below()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name="boss_the_lurker_below";
|
||||
newscript->GetAI = GetAI_boss_the_lurker_below;
|
||||
m_scripts[nrscripts++] = newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="mob_coilfang_guardian";
|
||||
newscript->GetAI = GetAI_mob_coilfang_guardian;
|
||||
m_scripts[nrscripts++] = newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="mob_coilfang_ambusher";
|
||||
newscript->GetAI = GetAI_mob_coilfang_ambusher;
|
||||
m_scripts[nrscripts++] = newscript;
|
||||
}
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
#define DATA_SHIELDGENERATOR2 13
|
||||
#define DATA_SHIELDGENERATOR3 14
|
||||
#define DATA_SHIELDGENERATOR4 15
|
||||
#define DATA_THELURKERBELOWEVENT 16
|
||||
#define DATA_TIDALVESS 17
|
||||
#define DATA_FATHOMLORDKARATHRESSEVENT 18
|
||||
#define DATA_LEOTHERAS 19
|
||||
#define DATA_LEOTHERAS_EVENT_STARTER 20
|
||||
#define DATA_THELURKERBELOW 16
|
||||
#define DATA_THELURKERBELOWEVENT 17
|
||||
#define DATA_TIDALVESS 18
|
||||
#define DATA_FATHOMLORDKARATHRESSEVENT 19
|
||||
#define DATA_LEOTHERAS 20
|
||||
#define DATA_LEOTHERAS_EVENT_STARTER 21
|
||||
#endif
|
||||
|
||||
@@ -39,6 +39,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
{
|
||||
instance_serpentshrine_cavern(Map *Map) : ScriptedInstance(Map) {Initialize();};
|
||||
|
||||
uint64 LurkerBelow;
|
||||
uint64 Sharkkis;
|
||||
uint64 Tidalvess;
|
||||
uint64 Caribdis;
|
||||
@@ -55,6 +56,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
LurkerBelow = 0;
|
||||
Sharkkis = 0;
|
||||
Tidalvess = 0;
|
||||
Caribdis = 0;
|
||||
@@ -89,6 +91,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
case 21212: LadyVashj = creature->GetGUID(); break;
|
||||
case 21214: Karathress = creature->GetGUID(); break;
|
||||
case 21966: Sharkkis = creature->GetGUID(); break;
|
||||
case 21217: LurkerBelow = creature->GetGUID(); break;
|
||||
case 21965: Tidalvess = creature->GetGUID(); break;
|
||||
case 21964: Caribdis = creature->GetGUID(); break;
|
||||
case 21215: LeotherasTheBlind = creature->GetGUID(); break;}
|
||||
@@ -106,6 +109,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
{
|
||||
switch(identifier)
|
||||
{
|
||||
case DATA_THELURKERBELOW: return LurkerBelow;
|
||||
case DATA_SHARKKIS: return Sharkkis;
|
||||
case DATA_TIDALVESS: return Tidalvess;
|
||||
case DATA_CARIBDIS: return Caribdis;
|
||||
|
||||
Reference in New Issue
Block a user