*Update to HG 714.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-30 20:05:36 -06:00
21 changed files with 324 additions and 47 deletions
+1
View File
@@ -72,6 +72,7 @@ scripts/zone/alterac_mountains/alterac_mountains.cpp \
scripts/zone/arathi_highlands/arathi_highlands.cpp \
scripts/zone/ashenvale_forest/ashenvale.cpp\
scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp \
scripts/zone/aunchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp \
scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp \
scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp \
scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp \
+3
View File
@@ -116,6 +116,8 @@ extern void AddSC_ashenvale();
//Aunchindoun
//--Auchenai Crypts
extern void AddSC_boss_exarch_maladaar();
extern void AddSC_boss_shirrak_the_dead_watcher();
//--Mana Tombs
extern void AddSC_boss_nexusprince_shaffar();
extern void AddSC_boss_pandemonius();
@@ -1317,6 +1319,7 @@ void ScriptsInit()
//Aunchindoun
//--Auchenai Crypts
AddSC_boss_exarch_maladaar();
AddSC_boss_shirrak_the_dead_watcher();
//--Mana Tombs
AddSC_boss_nexusprince_shaffar();
@@ -1259,6 +1259,10 @@
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_exarch_maladaar.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_shirrak_the_dead_watcher.cpp"
>
</File>
</Filter>
<Filter
Name="Mana Tombs"
@@ -1436,6 +1436,10 @@
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_exarch_maladaar.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_shirrak_the_dead_watcher.cpp"
>
</File>
</Filter>
<Filter
Name="Mana Tombs"
@@ -1429,6 +1429,10 @@
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_exarch_maladaar.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\aunchindoun\auchenai_crypts\boss_shirrak_the_dead_watcher.cpp"
>
</File>
</Filter>
<Filter
Name="Mana Tombs"
@@ -0,0 +1,195 @@
/* 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
Name: Boss_Shirrak_the_dead_watcher
%Complete: 80
Comment: InhibitMagic should stack slower far from the boss, proper Visual for Focus Fire, heroic implemented
Category: Auchindoun, Auchenai Crypts
EndScriptData */
#include "precompiled.h"
#define SPELL_INHABITMAGIC 32264
#define SPELL_ATTRACTMAGIC 32265
#define N_SPELL_CARNIVOROUSBITE 36383
#define H_SPELL_CARNIVOROUSBITE 39382
#define SPELL_CARNIVOROUSBITE (HeroicMode?H_SPELL_CARNIVOROUSBITE:N_SPELL_CARNIVOROUSBITE)
#define ENTRY_FOCUS_FIRE 18374
#define N_SPELL_FIERY_BLAST 32302
#define H_SPELL_FIERY_BLAST 38382
#define SPELL_FIERY_BLAST (HeroicMode?H_SPELL_FIERY_BLAST:N_SPELL_FIERY_BLAST)
#define SPELL_FOCUS_FIRE_VISUAL 42075 //need to find better visual
struct TRINITY_DLL_DECL boss_shirrak_the_dead_watcherAI : public ScriptedAI
{
boss_shirrak_the_dead_watcherAI(Creature *c) : ScriptedAI(c)
{
HeroicMode = m_creature->GetMap()->IsHeroic();
Reset();
}
uint32 Inhabitmagic_Timer;
uint32 Attractmagic_Timer;
uint32 Carnivorousbite_Timer;
uint32 FocusFire_Timer;
bool HeroicMode;
Unit *focusedTarget;
void Reset()
{
Inhabitmagic_Timer = 3000;
Attractmagic_Timer = 28000;
Carnivorousbite_Timer = 10000;
FocusFire_Timer = 17000;
focusedTarget = NULL;
}
void Aggro(Unit *who)
{ }
void JustSummoned(Creature *summoned)
{
if (summoned && summoned->GetEntry() == ENTRY_FOCUS_FIRE)
{
summoned->CastSpell(summoned,SPELL_FOCUS_FIRE_VISUAL,false);
summoned->setFaction(m_creature->getFaction());
summoned->SetLevel(m_creature->getLevel());
summoned->addUnitState(UNIT_STAT_ROOT);
if(focusedTarget)
summoned->AI()->AttackStart(focusedTarget);
}
}
void UpdateAI(const uint32 diff)
{
//Return since we have no target
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
return;
//Inhabitmagic_Timer
if (Inhabitmagic_Timer < diff)
{
DoCast(m_creature,SPELL_INHABITMAGIC);
Inhabitmagic_Timer = 2000+(rand()%2000);
}else Inhabitmagic_Timer -= diff;
//Attractmagic_Timer
if (Attractmagic_Timer < diff)
{
DoCast(m_creature,SPELL_ATTRACTMAGIC);
Attractmagic_Timer = 30000;
}else Attractmagic_Timer -= diff;
//Carnivorousbite_Timer
if (Carnivorousbite_Timer < diff)
{
DoCast(m_creature,SPELL_CARNIVOROUSBITE);
Carnivorousbite_Timer = 10000;
}else Carnivorousbite_Timer -= diff;
//FocusFire_Timer
if (FocusFire_Timer < diff)
{
// Summon Focus Fire & Emote
Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0);
if (target && target->GetTypeId() == TYPEID_PLAYER)
{
focusedTarget = target;
m_creature->SummonCreature(ENTRY_FOCUS_FIRE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,5500);
// Emote
std::string *emote = new std::string("focuses his energy on ");
emote->append(target->GetName());
DoTextEmote(emote->c_str(),NULL,true);
delete emote;
FocusFire_Timer = 15000+(rand()%5000);
}
}else FocusFire_Timer -= diff;
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_boss_shirrak_the_dead_watcher(Creature *_Creature)
{
return new boss_shirrak_the_dead_watcherAI (_Creature);
}
struct TRINITY_DLL_DECL mob_focus_fireAI : public ScriptedAI
{
mob_focus_fireAI(Creature *c) : ScriptedAI(c)
{
HeroicMode = m_creature->GetMap()->IsHeroic();
Reset();
}
bool HeroicMode;
uint32 FieryBlast_Timer;
bool fiery1, fiery2, fiery3;
void Reset()
{
FieryBlast_Timer = 3000+(rand()%1000);
fiery1 = fiery2 = true;
}
void Aggro(Unit *who)
{ }
void UpdateAI(const uint32 diff)
{
//Return since we have no target
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
return;
//FieryBlast_Timer
if (fiery2 && FieryBlast_Timer < diff)
{
DoCast(m_creature,SPELL_FIERY_BLAST);
if(fiery1) fiery1 = false;
else if(fiery2) fiery2 = false;
FieryBlast_Timer = 1000;
}else FieryBlast_Timer -= diff;
//DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI_mob_focus_fire(Creature *_Creature)
{
return new mob_focus_fireAI (_Creature);
}
void AddSC_boss_shirrak_the_dead_watcher()
{
Script *newscript;
newscript = new Script;
newscript->Name="boss_shirrak_the_dead_watcher";
newscript->GetAI = &GetAI_boss_shirrak_the_dead_watcher;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="mob_focus_fire";
newscript->GetAI = &GetAI_mob_focus_fire;
newscript->RegisterSelf();
}
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Boss_Darkweaver_Syth
SD%Complete: 85
SDComment: Shock spells/times need more work. Heroic not implemented.
SDComment: Shock spells/times need more work. Heroic partly implemented.
SDCategory: Auchindoun, Sethekk Halls
EndScriptData */
@@ -34,30 +34,31 @@ EndScriptData */
#define SAY_DEATH -1556006
#define SPELL_FROST_SHOCK 37865
#define SPELL_FROST_SHOCK 21401 //37865
#define SPELL_FLAME_SHOCK 34354
#define SPELL_SHADOW_SHOCK 30138
#define SPELL_ARCANE_SHOCK 37132
#define SPELL_CHAIN_LIGHTNING 39945
#define SPELL_CHAIN_LIGHTNING 15659 //15305
#define SPELL_SUMMON_SYTH_FIRE 33537 // Spawns 19203
#define SPELL_SUMMON_SYTH_ARCANE 33538 // Spawns 19205
#define SPELL_SUMMON_SYTH_FROST 33539 // Spawns 19204
#define SPELL_SUMMON_SYTH_SHADOW 33540 // Spawns 19206
#define SPELL_FLAME_BUFFET 33526
#define H_SPELL_FLAME_BUFFET 38141
#define SPELL_ARCANE_BUFFET 33527
#define H_SPELL_ARCANE_BUFFET 38138
#define SPELL_FROST_BUFFET 33528
#define H_SPELL_FROST_BUFFET 38142
#define SPELL_SHADOW_BUFFET 33529
#define H_SPELL_SHADOW_BUFFET 38143
#define SPELL_FLAME_BUFFET (HeroicMode?38141:33526)
#define SPELL_ARCANE_BUFFET (HeroicMode?38138:33527)
#define SPELL_FROST_BUFFET (HeroicMode?38142:33528)
#define SPELL_SHADOW_BUFFET (HeroicMode?38143:33529)
struct TRINITY_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI
{
boss_darkweaver_sythAI(Creature *c) : ScriptedAI(c) {Reset();}
boss_darkweaver_sythAI(Creature *c) : ScriptedAI(c)
{
HeroicMode = m_creature->GetMap()->IsHeroic();
Reset();
}
uint32 flameshock_timer;
uint32 arcaneshock_timer;
@@ -68,6 +69,7 @@ struct TRINITY_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI
bool summon90;
bool summon50;
bool summon10;
bool HeroicMode;
void Reset()
{
@@ -204,10 +206,16 @@ CreatureAI* GetAI_boss_darkweaver_syth(Creature *_Creature)
struct TRINITY_DLL_DECL mob_syth_fireAI : public ScriptedAI
{
mob_syth_fireAI(Creature *c) : ScriptedAI(c) {Reset();}
mob_syth_fireAI(Creature *c) : ScriptedAI(c)
{
HeroicMode = m_creature->GetMap()->IsHeroic();
Reset();
}
uint32 flameshock_timer;
uint32 flamebuffet_timer;
bool HeroicMode;
void Reset()
{
@@ -250,10 +258,16 @@ CreatureAI* GetAI_mob_syth_fire(Creature *_Creature)
struct TRINITY_DLL_DECL mob_syth_arcaneAI : public ScriptedAI
{
mob_syth_arcaneAI(Creature *c) : ScriptedAI(c) {Reset();}
mob_syth_arcaneAI(Creature *c) : ScriptedAI(c)
{
HeroicMode = m_creature->GetMap()->IsHeroic();
Reset();
}
uint32 arcaneshock_timer;
uint32 arcanebuffet_timer;
bool HeroicMode;
void Reset()
{
@@ -296,10 +310,16 @@ CreatureAI* GetAI_mob_syth_arcane(Creature *_Creature)
struct TRINITY_DLL_DECL mob_syth_frostAI : public ScriptedAI
{
mob_syth_frostAI(Creature *c) : ScriptedAI(c) {Reset();}
mob_syth_frostAI(Creature *c) : ScriptedAI(c)
{
HeroicMode = m_creature->GetMap()->IsHeroic();
Reset();
}
uint32 frostshock_timer;
uint32 frostbuffet_timer;
bool HeroicMode;
void Reset()
{
@@ -342,10 +362,16 @@ CreatureAI* GetAI_mob_syth_frost(Creature *_Creature)
struct TRINITY_DLL_DECL mob_syth_shadowAI : public ScriptedAI
{
mob_syth_shadowAI(Creature *c) : ScriptedAI(c) {Reset();}
mob_syth_shadowAI(Creature *c) : ScriptedAI(c)
{
HeroicMode = m_creature->GetMap()->IsHeroic();
Reset();
}
uint32 shadowshock_timer;
uint32 shadowbuffet_timer;
bool HeroicMode;
void Reset()
{