*Update to trinity 921.
--HG-- branch : trunk
This commit is contained in:
@@ -67,25 +67,19 @@ SET(trinityscript_LIB_SRCS
|
||||
scripts/zone/black_temple/def_black_temple.h
|
||||
scripts/zone/black_temple/illidari_council.cpp
|
||||
scripts/zone/black_temple/instance_black_temple.cpp
|
||||
scripts/zone/blackrock_depths/blackrock_depths.cpp
|
||||
scripts/zone/blackrock_depths/instance_blackrock_depths.cpp
|
||||
scripts/zone/blackrock_depths/def_blackrock_depths.h
|
||||
scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp
|
||||
scripts/zone/blackrock_depths/boss_angerrel.cpp
|
||||
scripts/zone/blackrock_depths/boss_anubshiah.cpp
|
||||
scripts/zone/blackrock_depths/boss_doomrel.cpp
|
||||
scripts/zone/blackrock_depths/boss_doperel.cpp
|
||||
scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp
|
||||
scripts/zone/blackrock_depths/boss_general_angerforge.cpp
|
||||
scripts/zone/blackrock_depths/boss_gloomrel.cpp
|
||||
scripts/zone/blackrock_depths/blackrock_depths.cpp
|
||||
scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp
|
||||
scripts/zone/blackrock_depths/boss_anubshiah.cpp
|
||||
scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp
|
||||
scripts/zone/blackrock_depths/boss_general_angerforge.cpp
|
||||
scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp
|
||||
scripts/zone/blackrock_depths/boss_grizzle.cpp
|
||||
scripts/zone/blackrock_depths/boss_haterel.cpp
|
||||
scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp
|
||||
scripts/zone/blackrock_depths/boss_magmus.cpp
|
||||
scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp
|
||||
scripts/zone/blackrock_depths/boss_seethrel.cpp
|
||||
scripts/zone/blackrock_depths/boss_vilerel.cpp
|
||||
scripts/zone/blackrock_depths/boss_grizzle.cpp
|
||||
scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp
|
||||
scripts/zone/blackrock_depths/boss_magmus.cpp
|
||||
scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp
|
||||
scripts/zone/blackrock_depths/boss_tomb_of_seven.cpp
|
||||
scripts/zone/blackrock_depths/def_blackrock_depths.h
|
||||
scripts/zone/blackrock_depths/instance_blackrock_depths.cpp
|
||||
scripts/zone/blackrock_spire/boss_drakkisath.cpp
|
||||
scripts/zone/blackrock_spire/boss_gyth.cpp
|
||||
scripts/zone/blackrock_spire/boss_halycon.cpp
|
||||
@@ -347,6 +341,7 @@ SET(trinityscript_LIB_SRCS
|
||||
scripts/zone/uldaman/boss_ironaya.cpp
|
||||
scripts/zone/uldaman/uldaman.cpp
|
||||
scripts/zone/undercity/undercity.cpp
|
||||
scripts/zone/ungoro_crater/ungoro_crater.cpp
|
||||
scripts/zone/wailing_caverns/instance_wailing_caverns.cpp
|
||||
scripts/zone/western_plaguelands/western_plaguelands.cpp
|
||||
scripts/zone/westfall/westfall.cpp
|
||||
|
||||
@@ -630,7 +630,7 @@ void LoadDatabase()
|
||||
QueryResult *result;
|
||||
|
||||
//Get Version information
|
||||
result = TScriptDB.PQuery("SELECT version FROM script_db_version");
|
||||
result = TScriptDB.PQuery("SELECT script_version FROM version LIMIT 1");
|
||||
|
||||
if (result)
|
||||
{
|
||||
@@ -641,7 +641,7 @@ void LoadDatabase()
|
||||
|
||||
}else
|
||||
{
|
||||
error_log("TSCR: Missing `script_db_version` information.");
|
||||
error_log("TSCR: Missing `version.script_version` information.");
|
||||
outstring_log("");
|
||||
}
|
||||
|
||||
|
||||
@@ -105,8 +105,11 @@ bool ItemUse_item_attuned_crystal_cores(Player *player, Item* _Item, SpellCastTa
|
||||
{
|
||||
if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
|
||||
targets.getUnitTarget()->GetEntry() == 24972 && targets.getUnitTarget()->isDead() )
|
||||
return false;
|
||||
|
||||
{
|
||||
((Creature*)targets.getUnitTarget())->RemoveCorpse();
|
||||
return false;
|
||||
}
|
||||
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,_Item,NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,643 @@
|
||||
/* Copyright (C) 2006 - 2009 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_Tomb_Of_Seven
|
||||
SD%Complete: 50
|
||||
SDComment: Learning Smelt Dark Iron if tribute quest rewarded. Missing event and re-spawn GO Spectral Chalice
|
||||
SDCategory: Blackrock Depths
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_blackrock_depths.h"
|
||||
|
||||
#define FACTION_NEUTRAL 734
|
||||
#define FACTION_HOSTILE 754
|
||||
|
||||
#define SPELL_SUNDERARMOR 24317
|
||||
#define SPELL_SHIELDBLOCK 12169
|
||||
#define SPELL_STRIKE 15580
|
||||
|
||||
struct TRINITY_DLL_DECL boss_angerrelAI : public ScriptedAI
|
||||
{
|
||||
boss_angerrelAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 SunderArmor_Timer;
|
||||
uint32 ShieldBlock_Timer;
|
||||
uint32 Strike_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SunderArmor_Timer = 8000;
|
||||
ShieldBlock_Timer = 15000;
|
||||
Strike_Timer = 12000;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
//SunderArmor_Timer
|
||||
if (SunderArmor_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_SUNDERARMOR);
|
||||
SunderArmor_Timer = 28000;
|
||||
}else SunderArmor_Timer -= diff;
|
||||
|
||||
//ShieldBlock_Timer
|
||||
if (ShieldBlock_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_SHIELDBLOCK);
|
||||
ShieldBlock_Timer = 25000;
|
||||
}else ShieldBlock_Timer -= diff;
|
||||
|
||||
//Strike_Timer
|
||||
if (Strike_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_STRIKE);
|
||||
Strike_Timer = 10000;
|
||||
}else Strike_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_angerrel(Creature *_Creature)
|
||||
{
|
||||
return new boss_angerrelAI (_Creature);
|
||||
}
|
||||
|
||||
#define SPELL_SINISTERSTRIKE 15581
|
||||
#define SPELL_BACKSTAB 15582
|
||||
#define SPELL_GOUGE 13579
|
||||
|
||||
struct TRINITY_DLL_DECL boss_doperelAI : public ScriptedAI
|
||||
{
|
||||
boss_doperelAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 SinisterStrike_Timer;
|
||||
uint32 BackStab_Timer;
|
||||
uint32 Gouge_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SinisterStrike_Timer = 8000;
|
||||
BackStab_Timer = 12000;
|
||||
Gouge_Timer = 6000;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
//SinisterStrike_Timer
|
||||
if (SinisterStrike_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_SINISTERSTRIKE);
|
||||
SinisterStrike_Timer = 7000;
|
||||
}else SinisterStrike_Timer -= diff;
|
||||
|
||||
//BackStab_Timer
|
||||
if (BackStab_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_BACKSTAB);
|
||||
BackStab_Timer = 6000;
|
||||
}else BackStab_Timer -= diff;
|
||||
|
||||
//Gouge_Timer
|
||||
if (Gouge_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_GOUGE);
|
||||
Gouge_Timer = 8000;
|
||||
}else Gouge_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_doperel(Creature *_Creature)
|
||||
{
|
||||
return new boss_doperelAI (_Creature);
|
||||
}
|
||||
|
||||
#define SPELL_SHADOWBOLT 17483 //Not sure if right ID
|
||||
#define SPELL_MANABURN 10876
|
||||
#define SPELL_SHADOWSHIELD 22417
|
||||
|
||||
struct TRINITY_DLL_DECL boss_haterelAI : public ScriptedAI
|
||||
{
|
||||
boss_haterelAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 ShadowBolt_Timer;
|
||||
uint32 ManaBurn_Timer;
|
||||
uint32 ShadowShield_Timer;
|
||||
uint32 Strike_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ShadowBolt_Timer = 15000;
|
||||
ManaBurn_Timer = 3000;
|
||||
ShadowShield_Timer = 8000;
|
||||
Strike_Timer = 12000;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
//ShadowBolt_Timer
|
||||
if (ShadowBolt_Timer < diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (target) DoCast(target,SPELL_SHADOWBOLT);
|
||||
ShadowBolt_Timer = 7000;
|
||||
}else ShadowBolt_Timer -= diff;
|
||||
|
||||
//ManaBurn_Timer
|
||||
if (ManaBurn_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_MANABURN);
|
||||
|
||||
ManaBurn_Timer = 13000;
|
||||
}else ManaBurn_Timer -= diff;
|
||||
|
||||
//ShadowShield_Timer
|
||||
if (ShadowShield_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_SHADOWSHIELD);
|
||||
ShadowShield_Timer = 25000;
|
||||
}else ShadowShield_Timer -= diff;
|
||||
|
||||
//Strike_Timer
|
||||
if (Strike_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_STRIKE);
|
||||
Strike_Timer = 10000;
|
||||
}else Strike_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_haterel(Creature *_Creature)
|
||||
{
|
||||
return new boss_haterelAI (_Creature);
|
||||
}
|
||||
|
||||
#define SPELL_MINDBLAST 15587
|
||||
#define SPELL_HEAL 15586
|
||||
#define SPELL_PRAYEROFHEALING 15585
|
||||
#define SPELL_SHIELD 10901
|
||||
|
||||
struct TRINITY_DLL_DECL boss_vilerelAI : public ScriptedAI
|
||||
{
|
||||
boss_vilerelAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 MindBlast_Timer;
|
||||
uint32 Heal_Timer;
|
||||
uint32 PrayerOfHealing_Timer;
|
||||
uint32 Shield_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
MindBlast_Timer = 10000;
|
||||
Heal_Timer = 35000;
|
||||
PrayerOfHealing_Timer = 25000;
|
||||
Shield_Timer = 3000;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
//MindBlast_Timer
|
||||
if (MindBlast_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_MINDBLAST);
|
||||
MindBlast_Timer = 7000;
|
||||
}else MindBlast_Timer -= diff;
|
||||
|
||||
//Heal_Timer
|
||||
if (Heal_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_HEAL);
|
||||
Heal_Timer = 20000;
|
||||
}else Heal_Timer -= diff;
|
||||
|
||||
//PrayerOfHealing_Timer
|
||||
if (PrayerOfHealing_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_PRAYEROFHEALING);
|
||||
PrayerOfHealing_Timer = 30000;
|
||||
}else PrayerOfHealing_Timer -= diff;
|
||||
|
||||
//Shield_Timer
|
||||
if (Shield_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_SHIELD);
|
||||
Shield_Timer = 30000;
|
||||
}else Shield_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_vilerel(Creature *_Creature)
|
||||
{
|
||||
return new boss_vilerelAI (_Creature);
|
||||
}
|
||||
|
||||
#define SPELL_FROSTBOLT 16799
|
||||
#define SPELL_FROSTARMOR 15784 //This is actually a buff he gives himself
|
||||
#define SPELL_BLIZZARD 19099
|
||||
#define SPELL_FROSTNOVA 15063
|
||||
#define SPELL_FROSTWARD 15004
|
||||
|
||||
struct TRINITY_DLL_DECL boss_seethrelAI : public ScriptedAI
|
||||
{
|
||||
boss_seethrelAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 FrostArmor_Timer;
|
||||
uint32 Frostbolt_Timer;
|
||||
uint32 Blizzard_Timer;
|
||||
uint32 FrostNova_Timer;
|
||||
uint32 FrostWard_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
FrostArmor_Timer = 2000;
|
||||
Frostbolt_Timer = 6000;
|
||||
Blizzard_Timer = 18000;
|
||||
FrostNova_Timer = 12000;
|
||||
FrostWard_Timer = 25000;
|
||||
|
||||
m_creature->CastSpell(m_creature,SPELL_FROSTARMOR,true);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
//FrostArmor_Timer
|
||||
if (FrostArmor_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_FROSTARMOR);
|
||||
FrostArmor_Timer = 180000;
|
||||
}else FrostArmor_Timer -= diff;
|
||||
|
||||
//Frostbolt_Timer
|
||||
if (Frostbolt_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_FROSTBOLT);
|
||||
Frostbolt_Timer = 15000;
|
||||
}else Frostbolt_Timer -= diff;
|
||||
|
||||
//Blizzard_Timer
|
||||
if (Blizzard_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_BLIZZARD);
|
||||
|
||||
Blizzard_Timer = 22000;
|
||||
}else Blizzard_Timer -= diff;
|
||||
|
||||
//FrostNova_Timer
|
||||
if (FrostNova_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_FROSTNOVA);
|
||||
FrostNova_Timer = 14000;
|
||||
}else FrostNova_Timer -= diff;
|
||||
|
||||
//FrostWard_Timer
|
||||
if (FrostWard_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_FROSTWARD);
|
||||
FrostWard_Timer = 68000;
|
||||
}else FrostWard_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_seethrel(Creature *_Creature)
|
||||
{
|
||||
return new boss_seethrelAI (_Creature);
|
||||
}
|
||||
|
||||
#define SPELL_HAMSTRING 9080
|
||||
#define SPELL_CLEAVE 15579
|
||||
#define SPELL_MORTALSTRIKE 15708
|
||||
|
||||
struct TRINITY_DLL_DECL boss_gloomrelAI : public ScriptedAI
|
||||
{
|
||||
boss_gloomrelAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 Hamstring_Timer;
|
||||
uint32 Cleave_Timer;
|
||||
uint32 MortalStrike_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Hamstring_Timer = 19000;
|
||||
Cleave_Timer = 6000;
|
||||
MortalStrike_Timer = 10000;
|
||||
|
||||
m_creature->setFaction(FACTION_NEUTRAL);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
return;
|
||||
|
||||
//Hamstring_Timer
|
||||
if (Hamstring_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_HAMSTRING);
|
||||
Hamstring_Timer = 14000;
|
||||
}else Hamstring_Timer -= diff;
|
||||
|
||||
//Cleave_Timer
|
||||
if (Cleave_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_CLEAVE);
|
||||
Cleave_Timer = 8000;
|
||||
}else Cleave_Timer -= diff;
|
||||
|
||||
//MortalStrike_Timer
|
||||
if (MortalStrike_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_MORTALSTRIKE);
|
||||
MortalStrike_Timer = 12000;
|
||||
}else MortalStrike_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_gloomrel(Creature *_Creature)
|
||||
{
|
||||
return new boss_gloomrelAI (_Creature);
|
||||
}
|
||||
|
||||
#define GOSSIP_ITEM_TEACH_1 "Teach me the art of smelting dark iron"
|
||||
#define GOSSIP_ITEM_TEACH_2 "Continue..."
|
||||
#define GOSSIP_ITEM_TRIBUTE "I want to pay tribute"
|
||||
|
||||
bool GossipHello_boss_gloomrel(Player *player, Creature *_Creature)
|
||||
{
|
||||
if (player->GetQuestRewardStatus(4083) == 1 && player->GetSkillValue(SKILL_MINING) >= 230 && !player->HasSpell(14891) )
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
if (player->GetQuestRewardStatus(4083) == 0 && player->GetSkillValue(SKILL_MINING) >= 230)
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_boss_gloomrel(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
player->SEND_GOSSIP_MENU(2606, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+11:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
_Creature->CastSpell(player, 14894, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(0, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
player->SEND_GOSSIP_MENU(2604, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+22:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
//re-spawn object here
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#define SPELL_SHADOWBOLTVOLLEY 17228
|
||||
#define SPELL_IMMOLATE 15505
|
||||
#define SPELL_CURSEOFWEAKNESS 17227
|
||||
#define SPELL_DEMONARMOR 11735
|
||||
|
||||
struct TRINITY_DLL_DECL boss_doomrelAI : public ScriptedAI
|
||||
{
|
||||
boss_doomrelAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 ShadowVolley_Timer;
|
||||
uint32 Immolate_Timer;
|
||||
uint32 CurseOfWeakness_Timer;
|
||||
uint32 DemonArmor_Timer;
|
||||
bool Voidwalkers;
|
||||
int Rand;
|
||||
int RandX;
|
||||
int RandY;
|
||||
Creature* Summoned;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ShadowVolley_Timer = 10000;
|
||||
Immolate_Timer = 18000;
|
||||
CurseOfWeakness_Timer = 5000;
|
||||
DemonArmor_Timer = 16000;
|
||||
Voidwalkers = false;
|
||||
|
||||
m_creature->setFaction(FACTION_NEUTRAL);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
}
|
||||
|
||||
void SummonVoidwalkers(Unit* victim)
|
||||
{
|
||||
Rand = rand()%5;
|
||||
switch (rand()%2)
|
||||
{
|
||||
case 0: RandX = 0 - Rand; break;
|
||||
case 1: RandX = 0 + Rand; break;
|
||||
}
|
||||
Rand = 0;
|
||||
Rand = rand()%5;
|
||||
switch (rand()%2)
|
||||
{
|
||||
case 0: RandY = 0 - Rand; break;
|
||||
case 1: RandY = 0 + Rand; break;
|
||||
}
|
||||
Rand = 0;
|
||||
Summoned = DoSpawnCreature(16119, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000);
|
||||
if(Summoned)
|
||||
((CreatureAI*)Summoned->AI())->AttackStart(victim);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
return;
|
||||
|
||||
//ShadowVolley_Timer
|
||||
if (ShadowVolley_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_SHADOWBOLTVOLLEY);
|
||||
ShadowVolley_Timer = 12000;
|
||||
}else ShadowVolley_Timer -= diff;
|
||||
|
||||
//Immolate_Timer
|
||||
if (Immolate_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_IMMOLATE);
|
||||
|
||||
Immolate_Timer = 25000;
|
||||
}else Immolate_Timer -= diff;
|
||||
|
||||
//CurseOfWeakness_Timer
|
||||
if (CurseOfWeakness_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_CURSEOFWEAKNESS);
|
||||
CurseOfWeakness_Timer = 45000;
|
||||
}else CurseOfWeakness_Timer -= diff;
|
||||
|
||||
//DemonArmor_Timer
|
||||
if (DemonArmor_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_DEMONARMOR);
|
||||
DemonArmor_Timer = 300000;
|
||||
}else DemonArmor_Timer -= diff;
|
||||
|
||||
//Summon Voidwalkers
|
||||
if (!Voidwalkers && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51 )
|
||||
{
|
||||
SummonVoidwalkers(m_creature->getVictim());
|
||||
SummonVoidwalkers(m_creature->getVictim());
|
||||
SummonVoidwalkers(m_creature->getVictim());
|
||||
Voidwalkers = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_doomrel(Creature *_Creature)
|
||||
{
|
||||
return new boss_doomrelAI (_Creature);
|
||||
}
|
||||
|
||||
#define GOSSIP_ITEM_CHALLENGE "Your bondage is at an end, Doom'rel. I challenge you!"
|
||||
|
||||
bool GossipHello_boss_doomrel(Player *player, Creature *_Creature)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->SEND_GOSSIP_MENU(2601, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_boss_doomrel(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM( 0, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->SEND_GOSSIP_MENU(2605, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
//start event here, below code just temporary
|
||||
_Creature->setFaction(FACTION_HOSTILE);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddSC_boss_tomb_of_seven()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_angerrel";
|
||||
newscript->GetAI = &GetAI_boss_angerrel;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_doperel";
|
||||
newscript->GetAI = &GetAI_boss_doperel;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_haterel";
|
||||
newscript->GetAI = &GetAI_boss_haterel;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_vilerel";
|
||||
newscript->GetAI = &GetAI_boss_vilerel;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_seethrel";
|
||||
newscript->GetAI = &GetAI_boss_seethrel;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_gloomrel";
|
||||
newscript->GetAI = &GetAI_boss_gloomrel;
|
||||
newscript->pGossipHello = &GossipHello_boss_gloomrel;
|
||||
newscript->pGossipSelect = &GossipSelect_boss_gloomrel;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_doomrel";
|
||||
newscript->GetAI = &GetAI_boss_doomrel;
|
||||
newscript->pGossipHello = &GossipHello_boss_doomrel;
|
||||
newscript->pGossipSelect = &GossipSelect_boss_doomrel;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
+2
-2
@@ -59,13 +59,13 @@ EndScriptData */
|
||||
#define SPELL_POISON_CLEANSING_EFFECT 8167
|
||||
#define SPELL_EARTHBIND_TOTEM 38304
|
||||
#define SPELL_EARTHBIND_TOTEM_EFFECT 6474
|
||||
#define SPELL_WINDFURY_WEAPON 32911
|
||||
#define SPELL_WINDFURY_WEAPON 38184
|
||||
|
||||
//Caribdis Spells
|
||||
#define SPELL_WATER_BOLT_VOLLEY 38335
|
||||
#define SPELL_TIDAL_SURGE 38358
|
||||
#define SPELL_TIDAL_SURGE_FREEZE 38357
|
||||
#define SPELL_HEAL 41386
|
||||
#define SPELL_HEAL 38330
|
||||
#define SPELL_SUMMON_CYCLONE 38337
|
||||
#define SPELL_CYCLONE_CYCLONE 29538
|
||||
|
||||
|
||||
+26
-38
@@ -65,7 +65,7 @@ EndScriptData */
|
||||
#define SPELL_SUMMON_WATER_GLOBULE_3 37860
|
||||
#define SPELL_SUMMON_WATER_GLOBULE_4 37861
|
||||
|
||||
#define SPELL_SUMMON_MURLOC_A6 39813
|
||||
/*#define SPELL_SUMMON_MURLOC_A6 39813
|
||||
#define SPELL_SUMMON_MURLOC_A7 39814
|
||||
#define SPELL_SUMMON_MURLOC_A8 39815
|
||||
#define SPELL_SUMMON_MURLOC_A9 39816
|
||||
@@ -75,7 +75,21 @@ EndScriptData */
|
||||
#define SPELL_SUMMON_MURLOC_B7 39819
|
||||
#define SPELL_SUMMON_MURLOC_B8 39820
|
||||
#define SPELL_SUMMON_MURLOC_B9 39821
|
||||
#define SPELL_SUMMON_MURLOC_B10 39822
|
||||
#define SPELL_SUMMON_MURLOC_B10 39822*/
|
||||
|
||||
float MurlocCords[10][5] =
|
||||
{
|
||||
{21920, 424.36, -715.4, -7.14, 0.124},
|
||||
{21920, 425.13, -719.3, -7.14, 0.124},
|
||||
{21920, 425.05, -724.23, -7.14, 0.124},
|
||||
{21920, 424.91, -728.68, -7.14, 0.124},
|
||||
{21920, 424.84, -732.18, -7.14, 0.124},
|
||||
{21920, 321.05, -734.2, -13.15, 0.124},
|
||||
{21920, 321.05, -729.4, -13.15, 0.124},
|
||||
{21920, 321.05, -724.03, -13.15, 0.124},
|
||||
{21920, 321.05, -718.73, -13.15, 0.124},
|
||||
{21920, 321.05, -714.24, -13.15, 0.124}
|
||||
};
|
||||
|
||||
//Creatures
|
||||
#define WATER_GLOBULE 21913
|
||||
@@ -97,7 +111,6 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
uint32 WateryGrave_Timer;
|
||||
uint32 Earthquake_Timer;
|
||||
uint32 WateryGlobules_Timer;
|
||||
uint32 SummonSpell;
|
||||
uint32 globulespell[4];
|
||||
int8 Playercount;
|
||||
int8 counter;
|
||||
@@ -190,41 +203,16 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
||||
}
|
||||
|
||||
Unit* target;
|
||||
using std::set;
|
||||
set<int> SummonList;
|
||||
set<int>::iterator itr;
|
||||
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0, 50, true);
|
||||
m_creature->CastSpell(target, SummonSpell, false);
|
||||
SummonSpell++;
|
||||
|
||||
for (int8 i = 0; i < 9; i++) //bad hack
|
||||
{ //instead of casting 9 spell in one update
|
||||
counter = 0; // selecet 9 players which cast our spells
|
||||
do{target = SelectUnit(SELECT_TARGET_RANDOM, 0, 50, true); //check if player is already selected
|
||||
if(counter > Playercount)
|
||||
break;
|
||||
if(target) itr = SummonList.find(target->GetGUID());
|
||||
counter++;
|
||||
} while (itr != SummonList.end());
|
||||
|
||||
if(target){
|
||||
SummonList.insert(target->GetGUID());
|
||||
target->CastSpell(target, SummonSpell, false); //player cast on himself (this works)
|
||||
}
|
||||
SummonSpell++;
|
||||
|
||||
if(SummonSpell > SPELL_SUMMON_MURLOC_B10) //reset all variables for earthquake
|
||||
{
|
||||
SummonSpell = SPELL_SUMMON_MURLOC_A6;
|
||||
SummonList.clear();
|
||||
DoScriptText(EMOTE_EARTHQUAKE, m_creature);
|
||||
Earthquake = false;
|
||||
Earthquake_Timer = 40000+rand()%5000;
|
||||
}
|
||||
for(uint8 i = 0; i < 10; i++)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
Creature* Murloc = m_creature->SummonCreature(MurlocCords[i][0],MurlocCords[i][1],MurlocCords[i][2],MurlocCords[i][3],MurlocCords[i][4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||
Murloc->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
DoScriptText(EMOTE_EARTHQUAKE, m_creature);
|
||||
Earthquake = false;
|
||||
Earthquake_Timer = 40000+rand()%5000;
|
||||
}
|
||||
}else Earthquake_Timer -= diff;
|
||||
|
||||
//TidalWave_Timer
|
||||
@@ -303,7 +291,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
};
|
||||
|
||||
//Water Globule AI
|
||||
#define SPELL_GLOBULE_EXPLOSION 37852
|
||||
#define SPELL_GLOBULE_EXPLOSION 37871
|
||||
|
||||
struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI
|
||||
{
|
||||
|
||||
@@ -789,10 +789,10 @@ struct TRINITY_DLL_DECL mob_phase_hunterAI : public ScriptedAI
|
||||
{
|
||||
|
||||
mob_phase_hunterAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
|
||||
bool Weak;
|
||||
bool Materialize;
|
||||
bool Drained;
|
||||
bool Materialize;
|
||||
bool Drained;
|
||||
|
||||
int WeakPercent;
|
||||
uint64 PlayerGUID;
|
||||
@@ -804,8 +804,8 @@ struct TRINITY_DLL_DECL mob_phase_hunterAI : public ScriptedAI
|
||||
void Reset()
|
||||
{
|
||||
Weak = false;
|
||||
Materialize = false;
|
||||
Drained = false;
|
||||
Materialize = false;
|
||||
Drained = false;
|
||||
|
||||
WeakPercent = 25 + (rand()%16); // 25-40
|
||||
PlayerGUID = 0;
|
||||
@@ -814,42 +814,44 @@ struct TRINITY_DLL_DECL mob_phase_hunterAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
PlayerGUID = who->GetGUID();
|
||||
if(Player *player = who->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
PlayerGUID = player->GetGUID();
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
{
|
||||
DoCast(m_creature, SPELL_DE_MATERIALIZE);
|
||||
}
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
{
|
||||
DoCast(m_creature, SPELL_DE_MATERIALIZE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!Materialize)
|
||||
{
|
||||
DoCast(m_creature, SPELL_MATERIALIZE);
|
||||
Materialize = true;
|
||||
}
|
||||
if(!Materialize)
|
||||
{
|
||||
DoCast(m_creature, SPELL_MATERIALIZE);
|
||||
Materialize = true;
|
||||
}
|
||||
|
||||
if(m_creature->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || m_creature->hasUnitState(UNIT_STAT_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it
|
||||
DoCast(m_creature, SPELL_PHASE_SLIP);
|
||||
|
||||
if(m_creature->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || m_creature->hasUnitState(UNIT_STAT_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it
|
||||
DoCast(m_creature, SPELL_PHASE_SLIP);
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if(ManaBurnTimer < diff) // cast Mana Burn
|
||||
{
|
||||
|
||||
if(ManaBurnTimer < diff) // cast Mana Burn
|
||||
{
|
||||
if(m_creature->getVictim()->GetCreateMana() > 0)
|
||||
{
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_MANA_BURN);
|
||||
ManaBurnTimer = 8000 + (rand()%10 * 1000); // 8-18 sec cd
|
||||
}
|
||||
}else ManaBurnTimer -= diff;
|
||||
|
||||
ManaBurnTimer = 8000 + (rand()%10 * 1000); // 8-18 sec cd
|
||||
}
|
||||
}else ManaBurnTimer -= diff;
|
||||
|
||||
if(PlayerGUID) // start: support for quest 10190
|
||||
{
|
||||
{
|
||||
Unit* target = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
|
||||
if(target && !Weak && m_creature->GetHealth() < (m_creature->GetMaxHealth() / 100 * WeakPercent) && ((Player*)target)->GetQuestStatus(10190) == QUEST_STATUS_INCOMPLETE)
|
||||
|
||||
if(target && !Weak && m_creature->GetHealth() < (m_creature->GetMaxHealth() / 100 * WeakPercent)
|
||||
&& ((Player*)target)->GetQuestStatus(10190) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
DoTextEmote(EMOTE_WEAK, 0);
|
||||
Weak = true;
|
||||
@@ -857,30 +859,30 @@ struct TRINITY_DLL_DECL mob_phase_hunterAI : public ScriptedAI
|
||||
if(Weak && !Drained && m_creature->HasAura(34219, 0))
|
||||
{
|
||||
Drained = true;
|
||||
|
||||
|
||||
Health = m_creature->GetHealth(); // get the normal mob's data
|
||||
Level = m_creature->getLevel();
|
||||
|
||||
m_creature->AttackStop(); // delete the normal mob
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->RemoveCorpse();
|
||||
|
||||
Creature* DrainedPhaseHunter = NULL;
|
||||
|
||||
if(!DrainedPhaseHunter)
|
||||
DrainedPhaseHunter = m_creature->SummonCreature(SUMMONED_MOB, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); // summon the mob
|
||||
|
||||
if(DrainedPhaseHunter)
|
||||
{
|
||||
DrainedPhaseHunter->SetLevel(Level); // set the summoned mob's data
|
||||
DrainedPhaseHunter->SetHealth(Health);
|
||||
DrainedPhaseHunter->AddThreat(target, 10000.0f);
|
||||
DrainedPhaseHunter->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
}// end: support for quest 10190
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
m_creature->AttackStop(); // delete the normal mob
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->RemoveCorpse();
|
||||
|
||||
Creature* DrainedPhaseHunter = NULL;
|
||||
|
||||
if(!DrainedPhaseHunter)
|
||||
DrainedPhaseHunter = m_creature->SummonCreature(SUMMONED_MOB, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); // summon the mob
|
||||
|
||||
if(DrainedPhaseHunter)
|
||||
{
|
||||
DrainedPhaseHunter->SetLevel(Level); // set the summoned mob's data
|
||||
DrainedPhaseHunter->SetHealth(Health);
|
||||
DrainedPhaseHunter->AddThreat(target, 10000.0f);
|
||||
DrainedPhaseHunter->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
}// end: support for quest 10190
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ struct TRINITY_DLL_DECL npc_calvin_montagueAI : public ScriptedAI
|
||||
void Reset()
|
||||
{
|
||||
m_creature->setFaction(FACTION_FRIENDLY);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
}
|
||||
|
||||
void Aggro(Unit* who) { }
|
||||
@@ -73,6 +74,7 @@ bool QuestAccept_npc_calvin_montague(Player* player, Creature* creature, Quest c
|
||||
if( quest->GetQuestId() == QUEST_590 )
|
||||
{
|
||||
creature->setFaction(FACTION_HOSTILE);
|
||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
((npc_calvin_montagueAI*)creature->AI())->AttackStart(player);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user