*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -29,7 +29,7 @@ struct StringTextData
|
||||
uint32 SoundId;
|
||||
uint8 Type;
|
||||
uint32 Language;
|
||||
uint32 Emote;
|
||||
uint32 Emote;
|
||||
};
|
||||
|
||||
// Enums used by StringTextData::Type
|
||||
@@ -685,7 +685,7 @@ void LoadDatabase()
|
||||
temp.SoundId = fields[1].GetInt32();
|
||||
temp.Type = fields[2].GetInt32();
|
||||
temp.Language = fields[3].GetInt32();
|
||||
temp.Emote = 0;//fields[4].GetInt32();
|
||||
temp.Emote = 0;//fields[4].GetInt32();
|
||||
|
||||
if (i >= 0)
|
||||
{
|
||||
@@ -750,7 +750,7 @@ void LoadDatabase()
|
||||
temp.SoundId = fields[1].GetInt32();
|
||||
temp.Type = fields[2].GetInt32();
|
||||
temp.Language = fields[3].GetInt32();
|
||||
temp.Emote = fields[4].GetInt32();
|
||||
temp.Emote = fields[4].GetInt32();
|
||||
|
||||
if (i >= 0)
|
||||
{
|
||||
@@ -815,7 +815,7 @@ void LoadDatabase()
|
||||
temp.SoundId = fields[1].GetInt32();
|
||||
temp.Type = fields[2].GetInt32();
|
||||
temp.Language = fields[3].GetInt32();
|
||||
temp.Emote = fields[4].GetInt32();
|
||||
temp.Emote = fields[4].GetInt32();
|
||||
|
||||
if (i >= 0)
|
||||
{
|
||||
@@ -1219,7 +1219,7 @@ void ScriptsFree()
|
||||
delete []SpellSummary;
|
||||
|
||||
// Free resources before library unload
|
||||
for(int i=0;i<num_sc_scripts;i++)
|
||||
for(int i=0;i<num_sc_scripts;i++)
|
||||
delete m_scripts[i];
|
||||
|
||||
num_sc_scripts = 0;
|
||||
@@ -1327,15 +1327,15 @@ void ScriptsInit()
|
||||
AddSC_alterac_mountains();
|
||||
|
||||
//Arathi Highlands
|
||||
AddSC_arathi_highlands();
|
||||
AddSC_arathi_highlands();
|
||||
|
||||
//Ashenvale Forest
|
||||
AddSC_ashenvale();
|
||||
AddSC_ashenvale();
|
||||
|
||||
//Aunchindoun
|
||||
//--Auchenai Crypts
|
||||
AddSC_boss_exarch_maladaar();
|
||||
AddSC_boss_shirrak_the_dead_watcher();
|
||||
AddSC_boss_shirrak_the_dead_watcher();
|
||||
|
||||
//--Mana Tombs
|
||||
AddSC_boss_nexusprince_shaffar();
|
||||
@@ -1380,17 +1380,17 @@ void ScriptsInit()
|
||||
//Blackfathom Depths
|
||||
//Blackrock Depths
|
||||
AddSC_blackrock_depths();
|
||||
AddSC_boss_ambassador_flamelash();
|
||||
AddSC_boss_anubshiah();
|
||||
AddSC_boss_draganthaurissan();
|
||||
AddSC_boss_general_angerforge();
|
||||
AddSC_boss_gorosh_the_dervish();
|
||||
AddSC_boss_grizzle();
|
||||
AddSC_boss_high_interrogator_gerstahn();
|
||||
AddSC_boss_magmus();
|
||||
AddSC_boss_moira_bronzebeard();
|
||||
AddSC_boss_tomb_of_seven();
|
||||
AddSC_instance_blackrock_depths();
|
||||
AddSC_boss_ambassador_flamelash();
|
||||
AddSC_boss_anubshiah();
|
||||
AddSC_boss_draganthaurissan();
|
||||
AddSC_boss_general_angerforge();
|
||||
AddSC_boss_gorosh_the_dervish();
|
||||
AddSC_boss_grizzle();
|
||||
AddSC_boss_high_interrogator_gerstahn();
|
||||
AddSC_boss_magmus();
|
||||
AddSC_boss_moira_bronzebeard();
|
||||
AddSC_boss_tomb_of_seven();
|
||||
AddSC_instance_blackrock_depths();
|
||||
|
||||
//Blackrock Spire
|
||||
AddSC_boss_drakkisath();
|
||||
@@ -1450,8 +1450,8 @@ void ScriptsInit()
|
||||
AddSC_boss_aeonus();
|
||||
AddSC_boss_chrono_lord_deja();
|
||||
AddSC_boss_temporus();
|
||||
AddSC_dark_portal();
|
||||
AddSC_instance_dark_portal();
|
||||
AddSC_dark_portal();
|
||||
AddSC_instance_dark_portal();
|
||||
|
||||
//Coilfang Resevoir
|
||||
//--Serpent Shrine Cavern
|
||||
@@ -1461,7 +1461,7 @@ void ScriptsInit()
|
||||
AddSC_boss_leotheras_the_blind();
|
||||
AddSC_boss_morogrim_tidewalker();
|
||||
AddSC_instance_serpentshrine_cavern();
|
||||
AddSC_boss_the_lurker_below();
|
||||
AddSC_boss_the_lurker_below();
|
||||
|
||||
//--Slave Pens
|
||||
//--Steam Vault
|
||||
@@ -1520,7 +1520,7 @@ void ScriptsInit()
|
||||
AddSC_boss_broggok();
|
||||
AddSC_boss_kelidan_the_breaker();
|
||||
AddSC_boss_the_maker();
|
||||
AddSC_instance_blood_furnace();
|
||||
AddSC_instance_blood_furnace();
|
||||
|
||||
//--Magtheridon's Lair
|
||||
AddSC_boss_magtheridon();
|
||||
@@ -1560,7 +1560,7 @@ void ScriptsInit()
|
||||
AddSC_bosses_opera();
|
||||
AddSC_instance_karazhan();
|
||||
AddSC_karazhan();
|
||||
AddSC_boss_nightbane();
|
||||
AddSC_boss_nightbane();
|
||||
|
||||
//Loch Modan
|
||||
AddSC_loch_modan();
|
||||
@@ -1615,7 +1615,7 @@ void ScriptsInit()
|
||||
AddSC_boss_noth();
|
||||
AddSC_boss_gluth();
|
||||
AddSC_boss_sapphiron();
|
||||
AddSC_boss_four_horsemen();
|
||||
AddSC_boss_four_horsemen();
|
||||
|
||||
//Netherstorm
|
||||
AddSC_netherstorm();
|
||||
@@ -1630,8 +1630,8 @@ void ScriptsInit()
|
||||
//Razorfen Downs
|
||||
AddSC_boss_amnennar_the_coldbringer();
|
||||
|
||||
//Razorfen Kraul
|
||||
AddSC_razorfen_kraul();
|
||||
//Razorfen Kraul
|
||||
AddSC_razorfen_kraul();
|
||||
|
||||
//Redridge Mountains
|
||||
//Ruins of Ahn'Qiraj
|
||||
@@ -1639,14 +1639,14 @@ void ScriptsInit()
|
||||
AddSC_boss_arcanist_doan();
|
||||
AddSC_boss_azshir_the_sleepless();
|
||||
AddSC_boss_bloodmage_thalnos();
|
||||
AddSC_boss_headless_horseman();
|
||||
AddSC_boss_headless_horseman();
|
||||
AddSC_boss_herod();
|
||||
AddSC_boss_high_inquisitor_fairbanks();
|
||||
AddSC_boss_houndmaster_loksey();
|
||||
AddSC_boss_interrogator_vishas();
|
||||
AddSC_boss_scorn();
|
||||
AddSC_instance_scarlet_monastery();
|
||||
AddSC_boss_mograine_and_whitemane();
|
||||
AddSC_instance_scarlet_monastery();
|
||||
AddSC_boss_mograine_and_whitemane();
|
||||
|
||||
//Scholomance
|
||||
AddSC_boss_darkmaster_gandling();
|
||||
@@ -1712,10 +1712,10 @@ void ScriptsInit()
|
||||
AddSC_stratholme();
|
||||
|
||||
//Sunken Temple
|
||||
//Sunwell Plateau
|
||||
//Sunwell Plateau
|
||||
AddSC_instance_sunwell_plateau();
|
||||
AddSC_boss_kalecgos();
|
||||
AddSC_boss_brutallus();
|
||||
AddSC_boss_brutallus();
|
||||
AddSC_boss_felmyst();
|
||||
AddSC_boss_eredar_twins();
|
||||
|
||||
@@ -1763,7 +1763,7 @@ void ScriptsInit()
|
||||
AddSC_terokkar_forest();
|
||||
|
||||
//Thousand Needles
|
||||
AddSC_thousand_needles();
|
||||
AddSC_thousand_needles();
|
||||
|
||||
//Thunder Bluff
|
||||
AddSC_thunder_bluff();
|
||||
@@ -1781,7 +1781,7 @@ void ScriptsInit()
|
||||
AddSC_undercity();
|
||||
|
||||
//Un'Goro Crater
|
||||
AddSC_ungoro_crater();
|
||||
AddSC_ungoro_crater();
|
||||
|
||||
//Upper blackrock spire
|
||||
|
||||
@@ -1805,7 +1805,7 @@ void ScriptsInit()
|
||||
AddSC_zangarmarsh();
|
||||
|
||||
//Zul'Farrak
|
||||
AddSC_zulfarrak();
|
||||
AddSC_zulfarrak();
|
||||
|
||||
//Zul'Gurub
|
||||
AddSC_boss_jeklik();
|
||||
@@ -1825,17 +1825,17 @@ void ScriptsInit()
|
||||
|
||||
//Zul'Aman
|
||||
AddSC_boss_akilzon();
|
||||
AddSC_boss_halazzi();
|
||||
AddSC_boss_hex_lord_malacrass();
|
||||
AddSC_boss_janalai();
|
||||
AddSC_boss_nalorakk();
|
||||
AddSC_boss_zuljin();
|
||||
AddSC_instance_zulaman();
|
||||
AddSC_zulaman();
|
||||
AddSC_boss_halazzi();
|
||||
AddSC_boss_hex_lord_malacrass();
|
||||
AddSC_boss_janalai();
|
||||
AddSC_boss_nalorakk();
|
||||
AddSC_boss_zuljin();
|
||||
AddSC_instance_zulaman();
|
||||
AddSC_zulaman();
|
||||
|
||||
// -------------------
|
||||
|
||||
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
|
||||
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
|
||||
|
||||
outstring_log(">> Load Overriden SQL Data.");
|
||||
LoadOverridenSQLData();
|
||||
@@ -1880,15 +1880,15 @@ void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target)
|
||||
error_log("TSCR: DoScriptText entry %i tried to process invalid sound id %u.",textEntry,(*i).second.SoundId);
|
||||
}
|
||||
|
||||
if((*i).second.Emote)
|
||||
{
|
||||
if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
((Unit*)pSource)->HandleEmoteCommand((*i).second.Emote);
|
||||
}
|
||||
else
|
||||
error_log("TSCR: DoScriptText entry %i tried to process emote for invalid TypeId (%u).",textEntry,pSource->GetTypeId());
|
||||
}
|
||||
if((*i).second.Emote)
|
||||
{
|
||||
if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
((Unit*)pSource)->HandleEmoteCommand((*i).second.Emote);
|
||||
}
|
||||
else
|
||||
error_log("TSCR: DoScriptText entry %i tried to process emote for invalid TypeId (%u).",textEntry,pSource->GetTypeId());
|
||||
}
|
||||
|
||||
switch((*i).second.Type)
|
||||
{
|
||||
@@ -1939,7 +1939,7 @@ void Script::RegisterSelf()
|
||||
TRINITY_DLL_EXPORT
|
||||
char const* ScriptsVersion()
|
||||
{
|
||||
return "Default Trinity scripting library";
|
||||
return "Default Trinity scripting library";
|
||||
}
|
||||
TRINITY_DLL_EXPORT
|
||||
bool GossipHello ( Player * player, Creature *_Creature )
|
||||
|
||||
@@ -221,12 +221,12 @@ void ScriptedAI::DoCastSpell(Unit* who,SpellEntry const *spellInfo, bool trigger
|
||||
|
||||
void ScriptedAI::DoSay(const char* text, uint32 language, Unit* target, bool SayEmote)
|
||||
{
|
||||
if (target)
|
||||
{
|
||||
m_creature->Say(text, language, target->GetGUID());
|
||||
if(SayEmote)
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
|
||||
}
|
||||
if (target)
|
||||
{
|
||||
m_creature->Say(text, language, target->GetGUID());
|
||||
if(SayEmote)
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
|
||||
}
|
||||
else m_creature->Say(text, language, 0);
|
||||
}
|
||||
|
||||
@@ -749,7 +749,7 @@ Unit* FindCreature(uint32 entry, float range, Unit* Finder)
|
||||
if(!Finder)
|
||||
return NULL;
|
||||
Creature* target = NULL;
|
||||
Trinity::AllCreaturesOfEntryInRange check(Finder, entry, range);
|
||||
Trinity::AllCreaturesOfEntryInRange check(Finder, entry, range);
|
||||
Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(Finder, target, check);
|
||||
Finder->VisitNearbyObject(range, searcher);
|
||||
return target;
|
||||
@@ -760,7 +760,7 @@ GameObject* FindGameObject(uint32 entry, float range, Unit* Finder)
|
||||
if(!Finder)
|
||||
return NULL;
|
||||
GameObject* target = NULL;
|
||||
Trinity::AllGameObjectsWithEntryInGrid go_check(entry);
|
||||
Trinity::AllGameObjectsWithEntryInGrid go_check(entry);
|
||||
Trinity::GameObjectSearcher<Trinity::AllGameObjectsWithEntryInGrid> searcher(Finder, target, go_check);
|
||||
Finder->VisitNearbyGridObject(range, searcher);
|
||||
return target;
|
||||
|
||||
@@ -14,7 +14,7 @@ enum EncounterState
|
||||
IN_PROGRESS = 1,
|
||||
FAIL = 2,
|
||||
DONE = 3,
|
||||
SPECIAL = 4
|
||||
SPECIAL = 4
|
||||
};
|
||||
|
||||
#define OUT_SAVE_INST_DATA debug_log("SD2: Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
|
||||
@@ -37,23 +37,23 @@ EndContentData */
|
||||
|
||||
bool AreaTrigger_at_legion_teleporter(Player *player, AreaTriggerEntry *at)
|
||||
{
|
||||
if (player->isAlive() && !player->isInCombat())
|
||||
{
|
||||
if (player->GetTeam()== ALLIANCE && player->GetQuestRewardStatus(10589))
|
||||
{
|
||||
player->CastSpell(player,SPELL_TELE_A_TO,false);
|
||||
return true;
|
||||
}
|
||||
if (player->isAlive() && !player->isInCombat())
|
||||
{
|
||||
if (player->GetTeam()== ALLIANCE && player->GetQuestRewardStatus(10589))
|
||||
{
|
||||
player->CastSpell(player,SPELL_TELE_A_TO,false);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (player->GetTeam()== HORDE && player->GetQuestRewardStatus(10604))
|
||||
{
|
||||
player->CastSpell(player,SPELL_TELE_H_TO,false);
|
||||
return true;
|
||||
}
|
||||
if (player->GetTeam()== HORDE && player->GetQuestRewardStatus(10604))
|
||||
{
|
||||
player->CastSpell(player,SPELL_TELE_H_TO,false);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ATtest(Player *player, AreaTriggerEntry *at)
|
||||
@@ -66,10 +66,10 @@ void AddSC_areatrigger_scripts()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "at_legion_teleporter";
|
||||
newscript->pAreaTrigger = &AreaTrigger_at_legion_teleporter;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name = "at_legion_teleporter";
|
||||
newscript->pAreaTrigger = &AreaTrigger_at_legion_teleporter;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="at_test";
|
||||
|
||||
@@ -36,24 +36,24 @@ void guardAI::Reset()
|
||||
|
||||
void guardAI::Aggro(Unit *who)
|
||||
{
|
||||
if (m_creature->GetEntry() == 15184)
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0:
|
||||
DoSay("Taste blade, mongrel!", LANG_UNIVERSAL,NULL);
|
||||
break;
|
||||
case 1:
|
||||
DoSay("Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you...", LANG_UNIVERSAL,NULL);
|
||||
break;
|
||||
case 2:
|
||||
DoSay("As if we don't have enough problems, you go and create more!", LANG_UNIVERSAL,NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (m_creature->GetEntry() == 15184)
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0:
|
||||
DoSay("Taste blade, mongrel!", LANG_UNIVERSAL,NULL);
|
||||
break;
|
||||
case 1:
|
||||
DoSay("Please tell me that you didn't just do what I think you just did. Please tell me that I'm not going to have to hurt you...", LANG_UNIVERSAL,NULL);
|
||||
break;
|
||||
case 2:
|
||||
DoSay("As if we don't have enough problems, you go and create more!", LANG_UNIVERSAL,NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (SpellEntry const *spell = m_creature->reachWithSpellAttack(who))
|
||||
DoCastSpell(who, spell);
|
||||
if (SpellEntry const *spell = m_creature->reachWithSpellAttack(who))
|
||||
DoCastSpell(who, spell);
|
||||
}
|
||||
|
||||
void guardAI::JustDied(Unit *Killer)
|
||||
|
||||
@@ -493,7 +493,7 @@ CreatureAI* GetAI_guard_bluffwatcher(Creature *_Creature)
|
||||
|
||||
CreatureAI* GetAI_guard_contested(Creature *_Creature)
|
||||
{
|
||||
return new guardAI (_Creature);
|
||||
return new guardAI (_Creature);
|
||||
}
|
||||
/*******************************************************
|
||||
* guard_contested end
|
||||
|
||||
@@ -41,7 +41,7 @@ item_voodoo_charm Provide proper error message and target(q256
|
||||
item_vorenthals_presence(i30259) Prevents abuse of this item
|
||||
item_yehkinyas_bramble(i10699) Allow cast spell on vale screecher only and remove corpse if cast sucessful (q3520)
|
||||
item_zezzak_shard(i31463) Quest The eyes of Grillok (q10813). Prevents abuse
|
||||
item_inoculating_crystal Quest Inoculating. Prevent abuse
|
||||
item_inoculating_crystal Quest Inoculating. Prevent abuse
|
||||
EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
@@ -105,11 +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() &&
|
||||
(player->GetQuestStatus(11524) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11525) == QUEST_STATUS_INCOMPLETE) )
|
||||
{
|
||||
((Creature*)targets.getUnitTarget())->RemoveCorpse();
|
||||
return false;
|
||||
}
|
||||
(player->GetQuestStatus(11524) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11525) == QUEST_STATUS_INCOMPLETE) )
|
||||
{
|
||||
((Creature*)targets.getUnitTarget())->RemoveCorpse();
|
||||
return false;
|
||||
}
|
||||
|
||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,_Item,NULL);
|
||||
return true;
|
||||
|
||||
@@ -40,19 +40,19 @@ void npc_escortAI::AttackStart(Unit *who)
|
||||
{
|
||||
InCombat = true;
|
||||
|
||||
if (IsBeingEscorted)
|
||||
{
|
||||
if (IsBeingEscorted)
|
||||
{
|
||||
//Store last position
|
||||
m_creature->GetPosition(LastPos.x, LastPos.y, LastPos.z);
|
||||
|
||||
debug_log("SD2: EscortAI has entered combat and stored last location.");
|
||||
}
|
||||
}
|
||||
|
||||
Aggro(who);
|
||||
}
|
||||
|
||||
m_creature->GetMotionMaster()->MovementExpired();
|
||||
m_creature->GetMotionMaster()->MoveChase(who);
|
||||
m_creature->GetMotionMaster()->MovementExpired();
|
||||
m_creature->GetMotionMaster()->MoveChase(who);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ void npc_escortAI::MoveInLineOfSight(Unit *who)
|
||||
if(m_creature->getVictim() || !m_creature->canStartAttack(who))
|
||||
return;
|
||||
|
||||
AttackStart(who);
|
||||
AttackStart(who);
|
||||
}
|
||||
|
||||
void npc_escortAI::JustRespawned()
|
||||
@@ -109,7 +109,7 @@ void npc_escortAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Waypoint Updating
|
||||
if (IsBeingEscorted && !InCombat && WaitTimer && !Returning)
|
||||
{
|
||||
{
|
||||
if (WaitTimer <= diff)
|
||||
{
|
||||
if (ReconnectWP)
|
||||
@@ -157,11 +157,11 @@ void npc_escortAI::UpdateAI(const uint32 diff)
|
||||
WaitTimer = 0;
|
||||
}
|
||||
}else WaitTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
//Check if player is within range
|
||||
if (IsBeingEscorted && !InCombat && PlayerGUID)
|
||||
{
|
||||
{
|
||||
if (PlayerTimer < diff)
|
||||
{
|
||||
Unit* p = Unit::GetUnit(*m_creature, PlayerGUID);
|
||||
@@ -186,7 +186,7 @@ void npc_escortAI::UpdateAI(const uint32 diff)
|
||||
|
||||
PlayerTimer = 1000;
|
||||
}else PlayerTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
//Check if we have a current target
|
||||
if( m_creature->isAlive() && UpdateVictim())
|
||||
|
||||
@@ -31,7 +31,7 @@ npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622
|
||||
npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy
|
||||
npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681
|
||||
npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given
|
||||
npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap
|
||||
npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap
|
||||
EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
@@ -132,44 +132,44 @@ bool QuestComplete_npc_chicken_cluck(Player *player, Creature *_Creature, const
|
||||
## npc_dancing_flames
|
||||
######*/
|
||||
|
||||
#define SPELL_BRAZIER 45423
|
||||
#define SPELL_SEDUCTION 47057
|
||||
#define SPELL_FIERY_AURA 45427
|
||||
#define SPELL_BRAZIER 45423
|
||||
#define SPELL_SEDUCTION 47057
|
||||
#define SPELL_FIERY_AURA 45427
|
||||
|
||||
struct TRINITY_DLL_DECL npc_dancing_flamesAI : public ScriptedAI
|
||||
{
|
||||
npc_dancing_flamesAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
bool active;
|
||||
uint32 can_iteract;
|
||||
bool active;
|
||||
uint32 can_iteract;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
active = true;
|
||||
can_iteract = 3500;
|
||||
DoCast(m_creature,SPELL_BRAZIER,true);
|
||||
DoCast(m_creature,SPELL_FIERY_AURA,false);
|
||||
float x, y, z;
|
||||
m_creature->GetPosition(x,y,z);
|
||||
m_creature->Relocate(x,y,z + 0.94f);
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT | MOVEMENTFLAG_LEVITATING);
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_DANCE);
|
||||
WorldPacket data; //send update position to client
|
||||
m_creature->BuildHeartBeatMsg(&data);
|
||||
m_creature->SendMessageToSet(&data,true);
|
||||
}
|
||||
{
|
||||
active = true;
|
||||
can_iteract = 3500;
|
||||
DoCast(m_creature,SPELL_BRAZIER,true);
|
||||
DoCast(m_creature,SPELL_FIERY_AURA,false);
|
||||
float x, y, z;
|
||||
m_creature->GetPosition(x,y,z);
|
||||
m_creature->Relocate(x,y,z + 0.94f);
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT | MOVEMENTFLAG_LEVITATING);
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_DANCE);
|
||||
WorldPacket data; //send update position to client
|
||||
m_creature->BuildHeartBeatMsg(&data);
|
||||
m_creature->SendMessageToSet(&data,true);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!active)
|
||||
{
|
||||
if(can_iteract <= diff){
|
||||
active = true;
|
||||
can_iteract = 3500;
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_DANCE);
|
||||
}else can_iteract -= diff;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (!active)
|
||||
{
|
||||
if(can_iteract <= diff){
|
||||
active = true;
|
||||
can_iteract = 3500;
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_DANCE);
|
||||
}else can_iteract -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit* who){}
|
||||
};
|
||||
@@ -181,30 +181,30 @@ CreatureAI* GetAI_npc_dancing_flames(Creature *_Creature)
|
||||
|
||||
bool ReceiveEmote_npc_dancing_flames( Player *player, Creature *flame, uint32 emote )
|
||||
{
|
||||
if ( ((npc_dancing_flamesAI*)flame->AI())->active &&
|
||||
flame->IsWithinLOS(player->GetPositionX(),player->GetPositionY(),player->GetPositionZ()) && flame->IsWithinDistInMap(player,30.0f))
|
||||
{
|
||||
flame->SetInFront(player);
|
||||
((npc_dancing_flamesAI*)flame->AI())->active = false;
|
||||
if ( ((npc_dancing_flamesAI*)flame->AI())->active &&
|
||||
flame->IsWithinLOS(player->GetPositionX(),player->GetPositionY(),player->GetPositionZ()) && flame->IsWithinDistInMap(player,30.0f))
|
||||
{
|
||||
flame->SetInFront(player);
|
||||
((npc_dancing_flamesAI*)flame->AI())->active = false;
|
||||
|
||||
WorldPacket data;
|
||||
flame->BuildHeartBeatMsg(&data);
|
||||
flame->SendMessageToSet(&data,true);
|
||||
switch(emote)
|
||||
{
|
||||
case TEXTEMOTE_KISS: flame->HandleEmoteCommand(EMOTE_ONESHOT_SHY); break;
|
||||
case TEXTEMOTE_WAVE: flame->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
|
||||
case TEXTEMOTE_BOW: flame->HandleEmoteCommand(EMOTE_ONESHOT_BOW); break;
|
||||
case TEXTEMOTE_JOKE: flame->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break;
|
||||
case TEXTEMOTE_DANCE:
|
||||
{
|
||||
if (!player->HasAura(SPELL_SEDUCTION,0))
|
||||
flame->CastSpell(player,SPELL_SEDUCTION,true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
WorldPacket data;
|
||||
flame->BuildHeartBeatMsg(&data);
|
||||
flame->SendMessageToSet(&data,true);
|
||||
switch(emote)
|
||||
{
|
||||
case TEXTEMOTE_KISS: flame->HandleEmoteCommand(EMOTE_ONESHOT_SHY); break;
|
||||
case TEXTEMOTE_WAVE: flame->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break;
|
||||
case TEXTEMOTE_BOW: flame->HandleEmoteCommand(EMOTE_ONESHOT_BOW); break;
|
||||
case TEXTEMOTE_JOKE: flame->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break;
|
||||
case TEXTEMOTE_DANCE:
|
||||
{
|
||||
if (!player->HasAura(SPELL_SEDUCTION,0))
|
||||
flame->CastSpell(player,SPELL_SEDUCTION,true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
@@ -964,22 +964,22 @@ CreatureAI* GetAI_npc_tonk_mine(Creature *_Creature)
|
||||
|
||||
bool ReceiveEmote_npc_winter_reveler( Player *player, Creature *_Creature, uint32 emote )
|
||||
{
|
||||
//TODO: check auralist.
|
||||
if(player->HasAura(26218, 0))
|
||||
return false;
|
||||
//TODO: check auralist.
|
||||
if(player->HasAura(26218, 0))
|
||||
return false;
|
||||
|
||||
if( emote == TEXTEMOTE_KISS )
|
||||
{
|
||||
_Creature->CastSpell(_Creature, 26218, false);
|
||||
player->CastSpell(player, 26218, false);
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: _Creature->CastSpell(player, 26207, false); break;
|
||||
case 1: _Creature->CastSpell(player, 26206, false); break;
|
||||
case 2: _Creature->CastSpell(player, 45036, false); break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
if( emote == TEXTEMOTE_KISS )
|
||||
{
|
||||
_Creature->CastSpell(_Creature, 26218, false);
|
||||
player->CastSpell(player, 26218, false);
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: _Creature->CastSpell(player, 26207, false); break;
|
||||
case 1: _Creature->CastSpell(player, 26206, false); break;
|
||||
case 2: _Creature->CastSpell(player, 45036, false); break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*####
|
||||
@@ -988,10 +988,10 @@ bool ReceiveEmote_npc_winter_reveler( Player *player, Creature *_Creature, uint3
|
||||
|
||||
bool ReceiveEmote_npc_brewfest_reveler( Player *player, Creature *_Creature, uint32 emote )
|
||||
{
|
||||
if( emote == TEXTEMOTE_DANCE )
|
||||
_Creature->CastSpell(player, 41586, false);
|
||||
if( emote == TEXTEMOTE_DANCE )
|
||||
_Creature->CastSpell(player, 41586, false);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*####
|
||||
@@ -1021,12 +1021,12 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Owner = m_creature->GetOwner();
|
||||
Owner = m_creature->GetOwner();
|
||||
|
||||
if (!m_creature->isPet() || !Owner)
|
||||
return;
|
||||
if (!m_creature->isPet() || !Owner)
|
||||
return;
|
||||
|
||||
CreatureInfo const *Info = m_creature->GetCreatureInfo();
|
||||
CreatureInfo const *Info = m_creature->GetCreatureInfo();
|
||||
|
||||
if(Info->Entry == C_VIPER)
|
||||
IsViper = true;
|
||||
@@ -1044,13 +1044,13 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
||||
|
||||
InCombat = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//Redefined for random target selection:
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!m_creature->isPet() || !Owner)
|
||||
return;
|
||||
return;
|
||||
|
||||
if( !m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature) && Owner->IsHostileTo(who))//don't attack not-pvp-flaged
|
||||
{
|
||||
@@ -1060,21 +1060,21 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
||||
float attackRadius = m_creature->GetAttackDistance(who);
|
||||
if( m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who) )
|
||||
{
|
||||
if (!(rand() % RAND) )
|
||||
if (!(rand() % RAND) )
|
||||
{
|
||||
m_creature->setAttackTimer(BASE_ATTACK, (rand() % 10) * 100);
|
||||
SpellTimer = (rand() % 10) * 100;
|
||||
AttackStart(who);
|
||||
InCombat = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->isPet() || !Owner)
|
||||
return;
|
||||
return;
|
||||
|
||||
//Follow if not in combat
|
||||
if (!m_creature->hasUnitState(UNIT_STAT_FOLLOW)&& !InCombat)
|
||||
@@ -1087,19 +1087,19 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
||||
if (!m_creature->getVictim())
|
||||
{
|
||||
if (InCombat)
|
||||
DoStopAttack();
|
||||
DoStopAttack();
|
||||
|
||||
InCombat = false;
|
||||
InCombat = false;
|
||||
|
||||
if(Owner->getAttackerForHelper())
|
||||
AttackStart(Owner->getAttackerForHelper());
|
||||
if(Owner->getAttackerForHelper())
|
||||
AttackStart(Owner->getAttackerForHelper());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (SpellTimer < diff)
|
||||
{
|
||||
if (IsViper) //Viper
|
||||
if (IsViper) //Viper
|
||||
{
|
||||
if (rand() % 3 == 0) //33% chance to cast
|
||||
{
|
||||
@@ -1112,7 +1112,7 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
||||
DoCast(m_creature->getVictim(),spell);
|
||||
}
|
||||
|
||||
SpellTimer = VIPER_TIMER;
|
||||
SpellTimer = VIPER_TIMER;
|
||||
}
|
||||
else //Venomous Snake
|
||||
{
|
||||
@@ -1121,7 +1121,7 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
|
||||
SpellTimer = VENOMOUS_SNAKE_TIMER + (rand() %5)*100;
|
||||
}
|
||||
}else SpellTimer-=diff;
|
||||
DoMeleeAttackIfReady();
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1144,7 +1144,7 @@ void AddSC_npcs_special()
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_dancing_flames";
|
||||
newscript->GetAI = &GetAI_npc_dancing_flames;
|
||||
newscript->GetAI = &GetAI_npc_dancing_flames;
|
||||
newscript->pReceiveEmote = &ReceiveEmote_npc_dancing_flames;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -1192,12 +1192,12 @@ void AddSC_npcs_special()
|
||||
newscript->GetAI = &GetAI_npc_tonk_mine;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_winter_reveler";
|
||||
newscript->pReceiveEmote = &ReceiveEmote_npc_winter_reveler;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_brewfest_reveler";
|
||||
newscript->pReceiveEmote = &ReceiveEmote_npc_brewfest_reveler;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -161,4 +161,4 @@ void AddSC_arathi_highlands()
|
||||
newscript->GetAI = &GetAI_npc_professor_phizzlethorpeAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_professor_phizzlethorpe;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,133 +51,133 @@ EndContentData */
|
||||
|
||||
struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
|
||||
{
|
||||
npc_torekAI(Creature *c) : npc_escortAI(c) {Reset();}
|
||||
npc_torekAI(Creature *c) : npc_escortAI(c) {Reset();}
|
||||
|
||||
uint32 Rend_Timer;
|
||||
uint32 Thunderclap_Timer;
|
||||
bool Completed;
|
||||
uint32 Rend_Timer;
|
||||
uint32 Thunderclap_Timer;
|
||||
bool Completed;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_MOVE, m_creature, player);
|
||||
break;
|
||||
case 8:
|
||||
DoScriptText(SAY_PREPARE, m_creature, player);
|
||||
break;
|
||||
case 19:
|
||||
//TODO: verify location and creatures amount.
|
||||
m_creature->SummonCreature(ENTRY_DURIEL,1776.73,-2049.06,109.83,1.54,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000);
|
||||
m_creature->SummonCreature(ENTRY_SILVERWING_SENTINEL,1774.64,-2049.41,109.83,1.40,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000);
|
||||
m_creature->SummonCreature(ENTRY_SILVERWING_WARRIOR,1778.73,-2049.50,109.83,1.67,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000);
|
||||
break;
|
||||
case 20:
|
||||
DoScriptText(SAY_WIN, m_creature, player);
|
||||
Completed = true;
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->GroupEventHappens(QUEST_TOREK_ASSULT,m_creature);
|
||||
break;
|
||||
case 21:
|
||||
DoScriptText(SAY_END, m_creature, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_MOVE, m_creature, player);
|
||||
break;
|
||||
case 8:
|
||||
DoScriptText(SAY_PREPARE, m_creature, player);
|
||||
break;
|
||||
case 19:
|
||||
//TODO: verify location and creatures amount.
|
||||
m_creature->SummonCreature(ENTRY_DURIEL,1776.73,-2049.06,109.83,1.54,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000);
|
||||
m_creature->SummonCreature(ENTRY_SILVERWING_SENTINEL,1774.64,-2049.41,109.83,1.40,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000);
|
||||
m_creature->SummonCreature(ENTRY_SILVERWING_WARRIOR,1778.73,-2049.50,109.83,1.67,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000);
|
||||
break;
|
||||
case 20:
|
||||
DoScriptText(SAY_WIN, m_creature, player);
|
||||
Completed = true;
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->GroupEventHappens(QUEST_TOREK_ASSULT,m_creature);
|
||||
break;
|
||||
case 21:
|
||||
DoScriptText(SAY_END, m_creature, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Rend_Timer = 5000;
|
||||
Thunderclap_Timer = 8000;
|
||||
Completed = false;
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
Rend_Timer = 5000;
|
||||
Thunderclap_Timer = 8000;
|
||||
Completed = false;
|
||||
}
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
}
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID && !Completed)
|
||||
{
|
||||
if (Unit* player = Unit::GetUnit((*m_creature), PlayerGUID))
|
||||
((Player*)player)->FailQuest(QUEST_TOREK_ASSULT);
|
||||
}
|
||||
}
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID && !Completed)
|
||||
{
|
||||
if (Unit* player = Unit::GetUnit((*m_creature), PlayerGUID))
|
||||
((Player*)player)->FailQuest(QUEST_TOREK_ASSULT);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Rend_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_REND);
|
||||
Rend_Timer = 20000;
|
||||
}else Rend_Timer -= diff;
|
||||
if (Rend_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_REND);
|
||||
Rend_Timer = 20000;
|
||||
}else Rend_Timer -= diff;
|
||||
|
||||
if (Thunderclap_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_THUNDERCLAP);
|
||||
Thunderclap_Timer = 30000;
|
||||
}else Thunderclap_Timer -= diff;
|
||||
}
|
||||
if (Thunderclap_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_THUNDERCLAP);
|
||||
Thunderclap_Timer = 30000;
|
||||
}else Thunderclap_Timer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_torek(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_TOREK_ASSULT)
|
||||
{
|
||||
//TODO: find companions, make them follow Torek, at any time (possibly done by mangos/database in future?)
|
||||
((npc_escortAI*)(creature->AI()))->Start(true, true, true, player->GetGUID());
|
||||
DoScriptText(SAY_READY, creature, player);
|
||||
creature->setFaction(113);
|
||||
}
|
||||
if (quest->GetQuestId() == QUEST_TOREK_ASSULT)
|
||||
{
|
||||
//TODO: find companions, make them follow Torek, at any time (possibly done by mangos/database in future?)
|
||||
((npc_escortAI*)(creature->AI()))->Start(true, true, true, player->GetGUID());
|
||||
DoScriptText(SAY_READY, creature, player);
|
||||
creature->setFaction(113);
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_npc_torek(Creature *_Creature)
|
||||
{
|
||||
npc_torekAI* thisAI = new npc_torekAI(_Creature);
|
||||
npc_torekAI* thisAI = new npc_torekAI(_Creature);
|
||||
|
||||
thisAI->AddWaypoint(0, 1782.63, -2241.11, 109.73, 5000);
|
||||
thisAI->AddWaypoint(1, 1788.88, -2240.17, 111.71);
|
||||
thisAI->AddWaypoint(2, 1797.49, -2238.11, 112.31);
|
||||
thisAI->AddWaypoint(3, 1803.83, -2232.77, 111.22);
|
||||
thisAI->AddWaypoint(4, 1806.65, -2217.83, 107.36);
|
||||
thisAI->AddWaypoint(5, 1811.81, -2208.01, 107.45);
|
||||
thisAI->AddWaypoint(6, 1820.85, -2190.82, 100.49);
|
||||
thisAI->AddWaypoint(7, 1829.60, -2177.49, 96.44);
|
||||
thisAI->AddWaypoint(8, 1837.98, -2164.19, 96.71); //prepare
|
||||
thisAI->AddWaypoint(9, 1839.99, -2149.29, 96.78);
|
||||
thisAI->AddWaypoint(10, 1835.14, -2134.98, 96.80);
|
||||
thisAI->AddWaypoint(11, 1823.57, -2118.27, 97.43);
|
||||
thisAI->AddWaypoint(12, 1814.99, -2110.35, 98.38);
|
||||
thisAI->AddWaypoint(13, 1806.60, -2103.09, 99.19);
|
||||
thisAI->AddWaypoint(14, 1798.27, -2095.77, 100.04);
|
||||
thisAI->AddWaypoint(15, 1783.59, -2079.92, 100.81);
|
||||
thisAI->AddWaypoint(16, 1776.79, -2069.48, 101.77);
|
||||
thisAI->AddWaypoint(17, 1776.82, -2054.59, 109.82);
|
||||
thisAI->AddWaypoint(18, 1776.88, -2047.56, 109.83);
|
||||
thisAI->AddWaypoint(19, 1776.86, -2036.55, 109.83);
|
||||
thisAI->AddWaypoint(20, 1776.90, -2024.56, 109.83); //win
|
||||
thisAI->AddWaypoint(21, 1776.87, -2028.31, 109.83,60000);//stay
|
||||
thisAI->AddWaypoint(22, 1776.90, -2028.30, 109.83);
|
||||
thisAI->AddWaypoint(0, 1782.63, -2241.11, 109.73, 5000);
|
||||
thisAI->AddWaypoint(1, 1788.88, -2240.17, 111.71);
|
||||
thisAI->AddWaypoint(2, 1797.49, -2238.11, 112.31);
|
||||
thisAI->AddWaypoint(3, 1803.83, -2232.77, 111.22);
|
||||
thisAI->AddWaypoint(4, 1806.65, -2217.83, 107.36);
|
||||
thisAI->AddWaypoint(5, 1811.81, -2208.01, 107.45);
|
||||
thisAI->AddWaypoint(6, 1820.85, -2190.82, 100.49);
|
||||
thisAI->AddWaypoint(7, 1829.60, -2177.49, 96.44);
|
||||
thisAI->AddWaypoint(8, 1837.98, -2164.19, 96.71); //prepare
|
||||
thisAI->AddWaypoint(9, 1839.99, -2149.29, 96.78);
|
||||
thisAI->AddWaypoint(10, 1835.14, -2134.98, 96.80);
|
||||
thisAI->AddWaypoint(11, 1823.57, -2118.27, 97.43);
|
||||
thisAI->AddWaypoint(12, 1814.99, -2110.35, 98.38);
|
||||
thisAI->AddWaypoint(13, 1806.60, -2103.09, 99.19);
|
||||
thisAI->AddWaypoint(14, 1798.27, -2095.77, 100.04);
|
||||
thisAI->AddWaypoint(15, 1783.59, -2079.92, 100.81);
|
||||
thisAI->AddWaypoint(16, 1776.79, -2069.48, 101.77);
|
||||
thisAI->AddWaypoint(17, 1776.82, -2054.59, 109.82);
|
||||
thisAI->AddWaypoint(18, 1776.88, -2047.56, 109.83);
|
||||
thisAI->AddWaypoint(19, 1776.86, -2036.55, 109.83);
|
||||
thisAI->AddWaypoint(20, 1776.90, -2024.56, 109.83); //win
|
||||
thisAI->AddWaypoint(21, 1776.87, -2028.31, 109.83,60000);//stay
|
||||
thisAI->AddWaypoint(22, 1776.90, -2028.30, 109.83);
|
||||
|
||||
return (CreatureAI*)thisAI;
|
||||
return (CreatureAI*)thisAI;
|
||||
}
|
||||
|
||||
/*####
|
||||
@@ -237,10 +237,10 @@ struct TRINITY_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI
|
||||
Cage->SetGoState(1);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
@@ -300,15 +300,15 @@ CreatureAI* GetAI_npc_ruul_snowhoofAI(Creature *_Creature)
|
||||
|
||||
void AddSC_ashenvale()
|
||||
{
|
||||
Script *newscript;
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_torek";
|
||||
newscript->GetAI = &GetAI_npc_torek;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_torek;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_torek";
|
||||
newscript->GetAI = &GetAI_npc_torek;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_torek;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_ruul_snowhoof";
|
||||
newscript->GetAI = &GetAI_npc_ruul_snowhoofAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_ruul_snowhoof;
|
||||
|
||||
+17
-17
@@ -143,11 +143,11 @@ CreatureAI* GetAI_mob_stolen_soul(Creature *_Creature)
|
||||
|
||||
struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
|
||||
{
|
||||
boss_exarch_maladaarAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
HasTaunted = false;
|
||||
Reset();
|
||||
}
|
||||
boss_exarch_maladaarAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
HasTaunted = false;
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 soulmodel;
|
||||
uint64 soulholder;
|
||||
@@ -175,14 +175,14 @@ struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!HasTaunted && m_creature->IsWithinDistInMap(who, 150.0))
|
||||
{
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
HasTaunted = true;
|
||||
}
|
||||
if (!HasTaunted && m_creature->IsWithinDistInMap(who, 150.0))
|
||||
{
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
HasTaunted = true;
|
||||
}
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
|
||||
void Aggro(Unit *who)
|
||||
@@ -201,15 +201,15 @@ struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
|
||||
{
|
||||
//SPELL_STOLEN_SOUL_VISUAL has shapeshift effect, but not implemented feature in Trinity for this spell.
|
||||
summoned->CastSpell(summoned,SPELL_STOLEN_SOUL_VISUAL,false);
|
||||
summoned->SetDisplayId(soulmodel);
|
||||
summoned->setFaction(m_creature->getFaction());
|
||||
summoned->SetDisplayId(soulmodel);
|
||||
summoned->setFaction(m_creature->getFaction());
|
||||
|
||||
if (Unit *target = Unit::GetUnit(*m_creature,soulholder))
|
||||
{
|
||||
{
|
||||
|
||||
((mob_stolen_soulAI*)summoned->AI())->SetMyClass(soulclass);
|
||||
summoned->AI()->AttackStart(target);
|
||||
}
|
||||
summoned->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -79,7 +79,7 @@ struct TRINITY_DLL_DECL boss_shirrak_the_dead_watcherAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Inhibitmagic_Timer
|
||||
//Inhibitmagic_Timer
|
||||
if (Inhibitmagic_Timer < diff)
|
||||
{
|
||||
float dist;
|
||||
@@ -110,7 +110,7 @@ struct TRINITY_DLL_DECL boss_shirrak_the_dead_watcherAI : public ScriptedAI
|
||||
{
|
||||
DoCast(m_creature,SPELL_ATTRACTMAGIC);
|
||||
Attractmagic_Timer = 30000;
|
||||
Carnivorousbite_Timer = 1500;
|
||||
Carnivorousbite_Timer = 1500;
|
||||
}else Attractmagic_Timer -= diff;
|
||||
|
||||
//Carnivorousbite_Timer
|
||||
@@ -133,11 +133,11 @@ struct TRINITY_DLL_DECL boss_shirrak_the_dead_watcherAI : public ScriptedAI
|
||||
// Emote
|
||||
std::string *emote = new std::string("focuses on ");
|
||||
emote->append(target->GetName());
|
||||
emote->append("!");
|
||||
emote->append("!");
|
||||
DoTextEmote(emote->c_str(),NULL,true);
|
||||
delete emote;
|
||||
}
|
||||
FocusFire_Timer = 15000+(rand()%5000);
|
||||
FocusFire_Timer = 15000+(rand()%5000);
|
||||
}else FocusFire_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
+3
-3
@@ -205,7 +205,7 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
CanEvade = false;
|
||||
CanEvade = false;
|
||||
}
|
||||
|
||||
bool HeroicMode;
|
||||
@@ -241,10 +241,10 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_ARCANE_BOLT);
|
||||
ArcaneBolt_Timer = 2000 + rand()%2500;
|
||||
Unit *shaffar = FindCreature(ENTRY_SHAFFAR, 100, m_creature);
|
||||
Unit *shaffar = FindCreature(ENTRY_SHAFFAR, 100, m_creature);
|
||||
if(!shaffar || shaffar->isDead())
|
||||
{
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
|
||||
+11
-11
@@ -55,7 +55,7 @@ struct TRINITY_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI
|
||||
{
|
||||
boss_darkweaver_sythAI(Creature *c) : ScriptedAI(c)
|
||||
|
||||
{
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
@@ -69,7 +69,7 @@ struct TRINITY_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI
|
||||
bool summon90;
|
||||
bool summon50;
|
||||
bool summon10;
|
||||
bool HeroicMode;
|
||||
bool HeroicMode;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -208,14 +208,14 @@ struct TRINITY_DLL_DECL mob_syth_fireAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_fireAI(Creature *c) : ScriptedAI(c)
|
||||
|
||||
{
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 flameshock_timer;
|
||||
uint32 flamebuffet_timer;
|
||||
bool HeroicMode;
|
||||
bool HeroicMode;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -260,14 +260,14 @@ struct TRINITY_DLL_DECL mob_syth_arcaneAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_arcaneAI(Creature *c) : ScriptedAI(c)
|
||||
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 arcaneshock_timer;
|
||||
uint32 arcanebuffet_timer;
|
||||
bool HeroicMode;
|
||||
bool HeroicMode;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -312,14 +312,14 @@ struct TRINITY_DLL_DECL mob_syth_frostAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_frostAI(Creature *c) : ScriptedAI(c)
|
||||
|
||||
{
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 frostshock_timer;
|
||||
uint32 frostbuffet_timer;
|
||||
bool HeroicMode;
|
||||
bool HeroicMode;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -364,14 +364,14 @@ struct TRINITY_DLL_DECL mob_syth_shadowAI : public ScriptedAI
|
||||
{
|
||||
mob_syth_shadowAI(Creature *c) : ScriptedAI(c)
|
||||
|
||||
{
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 shadowshock_timer;
|
||||
uint32 shadowbuffet_timer;
|
||||
bool HeroicMode;
|
||||
bool HeroicMode;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
||||
+7
-7
@@ -47,7 +47,7 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI
|
||||
boss_ambassador_hellmawAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -88,13 +88,13 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (m_creature->HasAura(SPELL_BANISH,0))
|
||||
return;
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (m_creature->HasAura(SPELL_BANISH,0))
|
||||
return;
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
|
||||
+64
-64
@@ -41,18 +41,18 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
instance_shadow_labyrinth(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
|
||||
uint32 Encounter[ENCOUNTERS];
|
||||
std::string str_data;
|
||||
std::string str_data;
|
||||
|
||||
uint64 RefectoryDoorGUID;
|
||||
uint64 ScreamingHallDoorGUID;
|
||||
uint64 ScreamingHallDoorGUID;
|
||||
|
||||
uint64 GrandmasterVorpil;
|
||||
uint32 FelOverseerCount;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
RefectoryDoorGUID = 0;
|
||||
ScreamingHallDoorGUID = 0;
|
||||
RefectoryDoorGUID = 0;
|
||||
ScreamingHallDoorGUID = 0;
|
||||
|
||||
GrandmasterVorpil = 0;
|
||||
FelOverseerCount = 0;
|
||||
@@ -73,8 +73,8 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
{
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case REFECTORY_DOOR: RefectoryDoorGUID = go->GetGUID(); break;
|
||||
case SCREAMING_HALL_DOOR: ScreamingHallDoorGUID = go->GetGUID(); break;
|
||||
case REFECTORY_DOOR: RefectoryDoorGUID = go->GetGUID(); break;
|
||||
case SCREAMING_HALL_DOOR: ScreamingHallDoorGUID = go->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,36 +92,36 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
}
|
||||
}
|
||||
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
|
||||
debug_log("SD2: Instance Shadow Labyrinth: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
}
|
||||
debug_log("SD2: Instance Shadow Labyrinth: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void HandleGameObject(uint64 guid, uint32 state)
|
||||
{
|
||||
Player *player = GetPlayerInMap();
|
||||
void HandleGameObject(uint64 guid, uint32 state)
|
||||
{
|
||||
Player *player = GetPlayerInMap();
|
||||
|
||||
if (!player || !guid)
|
||||
{
|
||||
debug_log("SD2: Shadow Labyrinth: HandleGameObject fail");
|
||||
return;
|
||||
}
|
||||
if (!player || !guid)
|
||||
{
|
||||
debug_log("SD2: Shadow Labyrinth: HandleGameObject fail");
|
||||
return;
|
||||
}
|
||||
|
||||
if (GameObject *go = GameObject::GetGameObject(*player,guid))
|
||||
go->SetGoState(state);
|
||||
}
|
||||
if (GameObject *go = GameObject::GetGameObject(*player,guid))
|
||||
go->SetGoState(state);
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
@@ -149,7 +149,7 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
case DATA_BLACKHEARTTHEINCITEREVENT:
|
||||
if( data == DONE )
|
||||
{
|
||||
HandleGameObject(RefectoryDoorGUID,0);
|
||||
HandleGameObject(RefectoryDoorGUID,0);
|
||||
}
|
||||
Encounter[2] = data;
|
||||
break;
|
||||
@@ -157,7 +157,7 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
case DATA_GRANDMASTERVORPILEVENT:
|
||||
if( data == DONE )
|
||||
{
|
||||
HandleGameObject(ScreamingHallDoorGUID,0);
|
||||
HandleGameObject(ScreamingHallDoorGUID,0);
|
||||
}
|
||||
Encounter[3] = data;
|
||||
break;
|
||||
@@ -167,22 +167,22 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
break;
|
||||
}
|
||||
|
||||
if (data == DONE)
|
||||
{
|
||||
if (type == TYPE_OVERSEER && FelOverseerCount != 0)
|
||||
return;
|
||||
if (data == DONE)
|
||||
{
|
||||
if (type == TYPE_OVERSEER && FelOverseerCount != 0)
|
||||
return;
|
||||
|
||||
OUT_SAVE_INST_DATA;
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << Encounter[0] << " " << Encounter[1] << " "
|
||||
<< Encounter[2] << " " << Encounter[3] << " " << Encounter[4];
|
||||
std::ostringstream saveStream;
|
||||
saveStream << Encounter[0] << " " << Encounter[1] << " "
|
||||
<< Encounter[2] << " " << Encounter[3] << " " << Encounter[4];
|
||||
|
||||
str_data = saveStream.str();
|
||||
str_data = saveStream.str();
|
||||
|
||||
SaveToDB();
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
}
|
||||
SaveToDB();
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
@@ -205,30 +205,30 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* Save()
|
||||
{
|
||||
return str_data.c_str();
|
||||
}
|
||||
const char* Save()
|
||||
{
|
||||
return str_data.c_str();
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2] >> Encounter[3] >> Encounter[4];
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2] >> Encounter[3] >> Encounter[4];
|
||||
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if (Encounter[i] == IN_PROGRESS)
|
||||
Encounter[i] = NOT_STARTED;
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if (Encounter[i] == IN_PROGRESS)
|
||||
Encounter[i] = NOT_STARTED;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_shadow_labyrinth(Map* map)
|
||||
|
||||
@@ -251,7 +251,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
bool Must_Die;
|
||||
bool Escape;
|
||||
bool ContinueWP;
|
||||
bool Reached;
|
||||
bool Reached;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -267,7 +267,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
Must_Die = false;
|
||||
Escape = false;
|
||||
ContinueWP = false;
|
||||
Reached = false;
|
||||
Reached = false;
|
||||
}
|
||||
|
||||
void Despawn()
|
||||
@@ -306,8 +306,8 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
m_creature->AI_SendMoveToPacket(3706.39, -3969.15, 35.9118, 0, 0, 0);
|
||||
}
|
||||
//begin swimming and summon depth charges
|
||||
Player* player = ((Player*)Unit::GetUnit((*m_creature), PlayerGUID));
|
||||
SendText(MSG_ESCAPE_NOTICE, player);
|
||||
Player* player = ((Player*)Unit::GetUnit((*m_creature), PlayerGUID));
|
||||
SendText(MSG_ESCAPE_NOTICE, player);
|
||||
DoCast(m_creature, SPELL_PERIODIC_DEPTH_CHARGE);
|
||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_FLYING2 | MOVEMENTFLAG_SWIMMING);
|
||||
m_creature->SetSpeed(MOVE_RUN, 0.85f, true);
|
||||
@@ -336,7 +336,7 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
Grenade_Timer = 30000;
|
||||
} else Grenade_Timer -= diff;
|
||||
|
||||
if(Check_Timer < diff)
|
||||
if(Check_Timer < diff)
|
||||
{
|
||||
Player *player = (Player *)Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if(!player)
|
||||
@@ -345,16 +345,16 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
return;
|
||||
}
|
||||
float dist = m_creature->GetDistance(player);
|
||||
if(dist < 10 && m_creature->GetPositionX() > player->GetPositionX() && !Reached)
|
||||
if(dist < 10 && m_creature->GetPositionX() > player->GetPositionX() && !Reached)
|
||||
{
|
||||
DoScriptText(SAY_RIZZLE_FINAL, m_creature);
|
||||
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 1);
|
||||
m_creature->setFaction(35);
|
||||
m_creature->setFaction(35);
|
||||
m_creature->StopMoving();
|
||||
m_creature->GetMotionMaster()->MovementExpired();
|
||||
m_creature->GetMotionMaster()->Clear(true);
|
||||
m_creature->GetMotionMaster()->Clear(true);
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_PERIODIC_DEPTH_CHARGE);
|
||||
Reached = true;
|
||||
Reached = true;
|
||||
}
|
||||
|
||||
Check_Timer = 1000;
|
||||
@@ -362,13 +362,13 @@ struct TRINITY_DLL_DECL mob_rizzle_sprysprocketAI : public ScriptedAI
|
||||
|
||||
}
|
||||
|
||||
void SendText(const char *text, Player* player)
|
||||
{
|
||||
WorldPacket data(SMSG_SERVER_MESSAGE, 0); // guess size
|
||||
data << text;
|
||||
if(player)
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
void SendText(const char *text, Player* player)
|
||||
{
|
||||
WorldPacket data(SMSG_SERVER_MESSAGE, 0); // guess size
|
||||
data << text;
|
||||
if(player)
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void AttackStart(Unit *who)
|
||||
{
|
||||
@@ -443,7 +443,7 @@ struct TRINITY_DLL_DECL mob_depth_chargeAI : public ScriptedAI
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_FLYING2 | MOVEMENTFLAG_SWIMMING);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
we_must_die = false;
|
||||
must_die_timer = 1000;
|
||||
}
|
||||
@@ -478,9 +478,9 @@ struct TRINITY_DLL_DECL mob_depth_chargeAI : public ScriptedAI
|
||||
}
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_depth_charge(Creature *_Creature)
|
||||
@@ -503,7 +503,7 @@ void AddSC_azshara()
|
||||
newscript->pGossipSelect = &GossipSelect_npc_loramus_thalipedes;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="mob_rizzle_sprysprocket";
|
||||
newscript->GetAI = &GetAI_mob_rizzle_sprysprocket;
|
||||
newscript->pGossipHello = &GossipHello_mob_rizzle_sprysprocket;
|
||||
|
||||
@@ -70,7 +70,7 @@ struct TRINITY_DLL_DECL boss_azuregosAI : public ScriptedAI
|
||||
|
||||
if(Teleport_Timer < diff)
|
||||
{
|
||||
DoScriptText(SAY_TELEPORT, m_creature);
|
||||
DoScriptText(SAY_TELEPORT, m_creature);
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
std::list<HostilReference*>::iterator i = m_threatlist.begin();
|
||||
for (i = m_threatlist.begin(); i!= m_threatlist.end();++i)
|
||||
@@ -110,7 +110,7 @@ struct TRINITY_DLL_DECL boss_azuregosAI : public ScriptedAI
|
||||
//ManaStorm_Timer
|
||||
if (ManaStorm_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_MANASTORM);
|
||||
ManaStorm_Timer = 7500 + rand()%5000;
|
||||
}else ManaStorm_Timer -= diff;
|
||||
|
||||
@@ -326,110 +326,110 @@ CreatureAI* GetAI_npc_injured_draenei(Creature *_Creature)
|
||||
|
||||
struct TRINITY_DLL_DECL npc_magwinAI : public npc_escortAI
|
||||
{
|
||||
npc_magwinAI(Creature *c) : npc_escortAI(c) {Reset();}
|
||||
npc_magwinAI(Creature *c) : npc_escortAI(c) {Reset();}
|
||||
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch(i)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_START, m_creature, player);
|
||||
break;
|
||||
case 17:
|
||||
DoScriptText(SAY_PROGRESS, m_creature, player);
|
||||
break;
|
||||
case 28:
|
||||
DoScriptText(SAY_END1, m_creature, player);
|
||||
break;
|
||||
case 29:
|
||||
DoScriptText(EMOTE_HUG, m_creature, player);
|
||||
DoScriptText(SAY_END2, m_creature, player);
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->GroupEventHappens(QUEST_A_CRY_FOR_HELP,m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch(i)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_START, m_creature, player);
|
||||
break;
|
||||
case 17:
|
||||
DoScriptText(SAY_PROGRESS, m_creature, player);
|
||||
break;
|
||||
case 28:
|
||||
DoScriptText(SAY_END1, m_creature, player);
|
||||
break;
|
||||
case 29:
|
||||
DoScriptText(EMOTE_HUG, m_creature, player);
|
||||
DoScriptText(SAY_END2, m_creature, player);
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->GroupEventHappens(QUEST_A_CRY_FOR_HELP,m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature, who);
|
||||
}
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature, who);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (!IsBeingEscorted)
|
||||
m_creature->setFaction(80);
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
if (!IsBeingEscorted)
|
||||
m_creature->setFaction(80);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player)
|
||||
((Player*)player)->FailQuest(QUEST_A_CRY_FOR_HELP);
|
||||
}
|
||||
}
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player)
|
||||
((Player*)player)->FailQuest(QUEST_A_CRY_FOR_HELP);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_magwin(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_A_CRY_FOR_HELP)
|
||||
{
|
||||
creature->setFaction(113);
|
||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||
}
|
||||
return true;
|
||||
if (quest->GetQuestId() == QUEST_A_CRY_FOR_HELP)
|
||||
{
|
||||
creature->setFaction(113);
|
||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_npc_magwinAI(Creature *_Creature)
|
||||
{
|
||||
npc_magwinAI* magwinAI = new npc_magwinAI(_Creature);
|
||||
npc_magwinAI* magwinAI = new npc_magwinAI(_Creature);
|
||||
|
||||
magwinAI->AddWaypoint(0, -4784.532227, -11051.060547, 3.484263);
|
||||
magwinAI->AddWaypoint(1, -4805.509277, -11037.293945, 3.043942);
|
||||
magwinAI->AddWaypoint(2, -4827.826172, -11034.398438, 1.741959);
|
||||
magwinAI->AddWaypoint(3, -4852.630859, -11033.695313, 2.208656);
|
||||
magwinAI->AddWaypoint(4, -4876.791992, -11034.517578, 3.175228);
|
||||
magwinAI->AddWaypoint(5, -4895.486816, -11038.306641, 9.390890);
|
||||
magwinAI->AddWaypoint(6, -4915.464844, -11048.402344, 12.369793);
|
||||
magwinAI->AddWaypoint(7, -4937.288086, -11067.041992, 13.857983);
|
||||
magwinAI->AddWaypoint(8, -4966.577637, -11067.507813, 15.754786);
|
||||
magwinAI->AddWaypoint(9, -4993.799805, -11056.544922, 19.175295);
|
||||
magwinAI->AddWaypoint(10, -5017.836426, -11052.569336, 22.476587);
|
||||
magwinAI->AddWaypoint(11, -5039.706543, -11058.459961, 25.831593);
|
||||
magwinAI->AddWaypoint(12, -5057.289063, -11045.474609, 26.972496);
|
||||
magwinAI->AddWaypoint(13, -5078.828125, -11037.601563, 29.053417);
|
||||
magwinAI->AddWaypoint(14, -5104.158691, -11039.195313, 29.440195);
|
||||
magwinAI->AddWaypoint(15, -5120.780273, -11039.518555, 30.142139);
|
||||
magwinAI->AddWaypoint(16, -5140.833008, -11039.810547, 28.788074);
|
||||
magwinAI->AddWaypoint(17, -5161.201660, -11040.050781, 27.879545, 4000);
|
||||
magwinAI->AddWaypoint(18, -5171.842285, -11046.803711, 27.183821);
|
||||
magwinAI->AddWaypoint(19, -5185.995117, -11056.359375, 20.234867);
|
||||
magwinAI->AddWaypoint(20, -5198.485840, -11065.065430, 18.872593);
|
||||
magwinAI->AddWaypoint(21, -5214.062500, -11074.653320, 19.215731);
|
||||
magwinAI->AddWaypoint(22, -5220.157227, -11088.377930, 19.818476);
|
||||
magwinAI->AddWaypoint(23, -5233.652832, -11098.846680, 18.349432);
|
||||
magwinAI->AddWaypoint(24, -5250.163086, -11111.653320, 16.438959);
|
||||
magwinAI->AddWaypoint(25, -5268.194336, -11125.639648, 12.668313);
|
||||
magwinAI->AddWaypoint(26, -5286.270508, -11130.669922, 6.912246);
|
||||
magwinAI->AddWaypoint(27, -5317.449707, -11137.392578, 4.963446);
|
||||
magwinAI->AddWaypoint(28, -5334.854492, -11154.384766, 6.742664);
|
||||
magwinAI->AddWaypoint(29, -5353.874512, -11171.595703, 6.903912, 20000);
|
||||
magwinAI->AddWaypoint(30, -5354.240000, -11171.940000, 6.890000);
|
||||
magwinAI->AddWaypoint(0, -4784.532227, -11051.060547, 3.484263);
|
||||
magwinAI->AddWaypoint(1, -4805.509277, -11037.293945, 3.043942);
|
||||
magwinAI->AddWaypoint(2, -4827.826172, -11034.398438, 1.741959);
|
||||
magwinAI->AddWaypoint(3, -4852.630859, -11033.695313, 2.208656);
|
||||
magwinAI->AddWaypoint(4, -4876.791992, -11034.517578, 3.175228);
|
||||
magwinAI->AddWaypoint(5, -4895.486816, -11038.306641, 9.390890);
|
||||
magwinAI->AddWaypoint(6, -4915.464844, -11048.402344, 12.369793);
|
||||
magwinAI->AddWaypoint(7, -4937.288086, -11067.041992, 13.857983);
|
||||
magwinAI->AddWaypoint(8, -4966.577637, -11067.507813, 15.754786);
|
||||
magwinAI->AddWaypoint(9, -4993.799805, -11056.544922, 19.175295);
|
||||
magwinAI->AddWaypoint(10, -5017.836426, -11052.569336, 22.476587);
|
||||
magwinAI->AddWaypoint(11, -5039.706543, -11058.459961, 25.831593);
|
||||
magwinAI->AddWaypoint(12, -5057.289063, -11045.474609, 26.972496);
|
||||
magwinAI->AddWaypoint(13, -5078.828125, -11037.601563, 29.053417);
|
||||
magwinAI->AddWaypoint(14, -5104.158691, -11039.195313, 29.440195);
|
||||
magwinAI->AddWaypoint(15, -5120.780273, -11039.518555, 30.142139);
|
||||
magwinAI->AddWaypoint(16, -5140.833008, -11039.810547, 28.788074);
|
||||
magwinAI->AddWaypoint(17, -5161.201660, -11040.050781, 27.879545, 4000);
|
||||
magwinAI->AddWaypoint(18, -5171.842285, -11046.803711, 27.183821);
|
||||
magwinAI->AddWaypoint(19, -5185.995117, -11056.359375, 20.234867);
|
||||
magwinAI->AddWaypoint(20, -5198.485840, -11065.065430, 18.872593);
|
||||
magwinAI->AddWaypoint(21, -5214.062500, -11074.653320, 19.215731);
|
||||
magwinAI->AddWaypoint(22, -5220.157227, -11088.377930, 19.818476);
|
||||
magwinAI->AddWaypoint(23, -5233.652832, -11098.846680, 18.349432);
|
||||
magwinAI->AddWaypoint(24, -5250.163086, -11111.653320, 16.438959);
|
||||
magwinAI->AddWaypoint(25, -5268.194336, -11125.639648, 12.668313);
|
||||
magwinAI->AddWaypoint(26, -5286.270508, -11130.669922, 6.912246);
|
||||
magwinAI->AddWaypoint(27, -5317.449707, -11137.392578, 4.963446);
|
||||
magwinAI->AddWaypoint(28, -5334.854492, -11154.384766, 6.742664);
|
||||
magwinAI->AddWaypoint(29, -5353.874512, -11171.595703, 6.903912, 20000);
|
||||
magwinAI->AddWaypoint(30, -5354.240000, -11171.940000, 6.890000);
|
||||
|
||||
return (CreatureAI*)magwinAI;
|
||||
return (CreatureAI*)magwinAI;
|
||||
}
|
||||
|
||||
/*######
|
||||
@@ -470,155 +470,155 @@ bool GossipSelect_npc_susurrus(Player *player, Creature *_Creature, uint32 sende
|
||||
## npc_geezle
|
||||
######*/
|
||||
|
||||
#define GEEZLE_SAY_1 -1000259
|
||||
#define SPARK_SAY_2 -1000260
|
||||
#define SPARK_SAY_3 -1000261
|
||||
#define GEEZLE_SAY_4 -1000262
|
||||
#define SPARK_SAY_5 -1000263
|
||||
#define SPARK_SAY_6 -1000264
|
||||
#define GEEZLE_SAY_7 -1000265
|
||||
#define GEEZLE_SAY_1 -1000259
|
||||
#define SPARK_SAY_2 -1000260
|
||||
#define SPARK_SAY_3 -1000261
|
||||
#define GEEZLE_SAY_4 -1000262
|
||||
#define SPARK_SAY_5 -1000263
|
||||
#define SPARK_SAY_6 -1000264
|
||||
#define GEEZLE_SAY_7 -1000265
|
||||
|
||||
#define EMOTE_SPARK -1000266
|
||||
#define EMOTE_SPARK -1000266
|
||||
|
||||
#define MOB_SPARK 17243
|
||||
#define GO_NAGA_FLAG 181694
|
||||
#define MOB_SPARK 17243
|
||||
#define GO_NAGA_FLAG 181694
|
||||
|
||||
static float SparkPos[4] = {-5030.95, -11291.99, 7.97};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
|
||||
{
|
||||
npc_geezleAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
npc_geezleAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
std::list<GameObject*> FlagList;
|
||||
std::list<GameObject*> FlagList;
|
||||
|
||||
uint64 SparkGUID;
|
||||
uint64 SparkGUID;
|
||||
|
||||
uint32 Step;
|
||||
uint32 SayTimer;
|
||||
uint32 Step;
|
||||
uint32 SayTimer;
|
||||
|
||||
bool EventStarted;
|
||||
bool EventStarted;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SparkGUID = 0;
|
||||
Step = 0;
|
||||
StartEvent();
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
SparkGUID = 0;
|
||||
Step = 0;
|
||||
StartEvent();
|
||||
}
|
||||
|
||||
void Aggro(Unit* who){}
|
||||
void Aggro(Unit* who){}
|
||||
|
||||
void StartEvent()
|
||||
{
|
||||
Step = 1;
|
||||
EventStarted = true;
|
||||
Creature* Spark = m_creature->SummonCreature(MOB_SPARK, SparkPos[0], SparkPos[1], SparkPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000);
|
||||
SparkGUID = Spark->GetGUID();
|
||||
Spark->setActive(true);
|
||||
Spark->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
m_creature->GetMotionMaster()->MovePoint(0, -5092.26, -11252, 0.71);
|
||||
Spark->GetMotionMaster()->MovePoint(0, -5080.70, -11253.61, 0.56);
|
||||
SayTimer = 23000;
|
||||
}
|
||||
void StartEvent()
|
||||
{
|
||||
Step = 1;
|
||||
EventStarted = true;
|
||||
Creature* Spark = m_creature->SummonCreature(MOB_SPARK, SparkPos[0], SparkPos[1], SparkPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000);
|
||||
SparkGUID = Spark->GetGUID();
|
||||
Spark->setActive(true);
|
||||
Spark->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
m_creature->GetMotionMaster()->MovePoint(0, -5092.26, -11252, 0.71);
|
||||
Spark->GetMotionMaster()->MovePoint(0, -5080.70, -11253.61, 0.56);
|
||||
SayTimer = 23000;
|
||||
}
|
||||
|
||||
uint32 NextStep(uint32 Step)
|
||||
{
|
||||
Unit* Spark = Unit::GetUnit((*m_creature), SparkGUID);
|
||||
uint32 NextStep(uint32 Step)
|
||||
{
|
||||
Unit* Spark = Unit::GetUnit((*m_creature), SparkGUID);
|
||||
|
||||
switch(Step)
|
||||
{
|
||||
case 0: return 99999;
|
||||
case 1:
|
||||
//DespawnNagaFlag(true);
|
||||
DoScriptText(EMOTE_SPARK, Spark);
|
||||
return 1000;
|
||||
case 2:
|
||||
DoScriptText(GEEZLE_SAY_1, m_creature, Spark);
|
||||
Spark->SetInFront(m_creature);
|
||||
m_creature->SetInFront(Spark);
|
||||
return 5000;
|
||||
case 3: DoScriptText(SPARK_SAY_2, Spark); return 7000;
|
||||
case 4: DoScriptText(SPARK_SAY_3, Spark); return 8000;
|
||||
case 5: DoScriptText(GEEZLE_SAY_4, m_creature, Spark); return 8000;
|
||||
case 6: DoScriptText(SPARK_SAY_5, Spark); return 9000;
|
||||
case 7: DoScriptText(SPARK_SAY_6, Spark); return 8000;
|
||||
case 8: DoScriptText(GEEZLE_SAY_7, m_creature, Spark); return 2000;
|
||||
case 9:
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
Spark->GetMotionMaster()->MovePoint(0, -5030.95, -11291.99, 7.97);
|
||||
return 20000;
|
||||
case 10:
|
||||
Spark->DealDamage(Spark,Spark->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
//DespawnNagaFlag(false);
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
default: return 99999999;
|
||||
}
|
||||
}
|
||||
switch(Step)
|
||||
{
|
||||
case 0: return 99999;
|
||||
case 1:
|
||||
//DespawnNagaFlag(true);
|
||||
DoScriptText(EMOTE_SPARK, Spark);
|
||||
return 1000;
|
||||
case 2:
|
||||
DoScriptText(GEEZLE_SAY_1, m_creature, Spark);
|
||||
Spark->SetInFront(m_creature);
|
||||
m_creature->SetInFront(Spark);
|
||||
return 5000;
|
||||
case 3: DoScriptText(SPARK_SAY_2, Spark); return 7000;
|
||||
case 4: DoScriptText(SPARK_SAY_3, Spark); return 8000;
|
||||
case 5: DoScriptText(GEEZLE_SAY_4, m_creature, Spark); return 8000;
|
||||
case 6: DoScriptText(SPARK_SAY_5, Spark); return 9000;
|
||||
case 7: DoScriptText(SPARK_SAY_6, Spark); return 8000;
|
||||
case 8: DoScriptText(GEEZLE_SAY_7, m_creature, Spark); return 2000;
|
||||
case 9:
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
Spark->GetMotionMaster()->MovePoint(0, -5030.95, -11291.99, 7.97);
|
||||
return 20000;
|
||||
case 10:
|
||||
Spark->DealDamage(Spark,Spark->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
//DespawnNagaFlag(false);
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
default: return 99999999;
|
||||
}
|
||||
}
|
||||
|
||||
void DespawnNagaFlag(bool despawn)
|
||||
{
|
||||
CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
Cell cell(pair);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
void DespawnNagaFlag(bool despawn)
|
||||
{
|
||||
CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
Cell cell(pair);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
Trinity::AllGameObjectsWithEntryInGrid go_check(GO_NAGA_FLAG);
|
||||
Trinity::AllGameObjectsWithEntryInGrid go_check(GO_NAGA_FLAG);
|
||||
Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid> go_search(m_creature, FlagList, go_check);
|
||||
TypeContainerVisitor
|
||||
<Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid>, GridTypeMapContainer> go_visit(go_search);
|
||||
CellLock<GridReadGuard> cell_lock(cell, pair);
|
||||
cell_lock->Visit(cell_lock, go_visit, *(m_creature->GetMap()));
|
||||
TypeContainerVisitor
|
||||
<Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid>, GridTypeMapContainer> go_visit(go_search);
|
||||
CellLock<GridReadGuard> cell_lock(cell, pair);
|
||||
cell_lock->Visit(cell_lock, go_visit, *(m_creature->GetMap()));
|
||||
|
||||
Player* player = NULL;
|
||||
if (!FlagList.empty())
|
||||
{
|
||||
for(std::list<GameObject*>::iterator itr = FlagList.begin(); itr != FlagList.end(); ++itr)
|
||||
{
|
||||
//TODO: Found how to despawn and respawn
|
||||
if(despawn)
|
||||
(*itr)->RemoveFromWorld();
|
||||
else
|
||||
(*itr)->Respawn();
|
||||
}
|
||||
} else error_log("SD2 ERROR: FlagList is empty!");
|
||||
}
|
||||
Player* player = NULL;
|
||||
if (!FlagList.empty())
|
||||
{
|
||||
for(std::list<GameObject*>::iterator itr = FlagList.begin(); itr != FlagList.end(); ++itr)
|
||||
{
|
||||
//TODO: Found how to despawn and respawn
|
||||
if(despawn)
|
||||
(*itr)->RemoveFromWorld();
|
||||
else
|
||||
(*itr)->Respawn();
|
||||
}
|
||||
} else error_log("SD2 ERROR: FlagList is empty!");
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(SayTimer < diff)
|
||||
{
|
||||
if(EventStarted)
|
||||
{
|
||||
SayTimer = NextStep(++Step);
|
||||
}
|
||||
}else SayTimer -= diff;
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(SayTimer < diff)
|
||||
{
|
||||
if(EventStarted)
|
||||
{
|
||||
SayTimer = NextStep(++Step);
|
||||
}
|
||||
}else SayTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_geezleAI(Creature *_Creature)
|
||||
{
|
||||
return new npc_geezleAI(_Creature);
|
||||
return new npc_geezleAI(_Creature);
|
||||
}
|
||||
|
||||
/*######
|
||||
## mob_nestlewood_owlkin
|
||||
######*/
|
||||
|
||||
#define INOCULATION_CHANNEL 29528
|
||||
#define INOCULATED_OWLKIN 16534
|
||||
#define INOCULATION_CHANNEL 29528
|
||||
#define INOCULATED_OWLKIN 16534
|
||||
|
||||
struct TRINITY_DLL_DECL mob_nestlewood_owlkinAI : public ScriptedAI
|
||||
{
|
||||
mob_nestlewood_owlkinAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 ChannelTimer;
|
||||
bool Channeled;
|
||||
bool Hitted;
|
||||
uint32 ChannelTimer;
|
||||
bool Channeled;
|
||||
bool Hitted;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ChannelTimer = 0;
|
||||
Channeled = false;
|
||||
Hitted = false;
|
||||
ChannelTimer = 0;
|
||||
Channeled = false;
|
||||
Hitted = false;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who){}
|
||||
@@ -629,23 +629,23 @@ struct TRINITY_DLL_DECL mob_nestlewood_owlkinAI : public ScriptedAI
|
||||
return;
|
||||
|
||||
if(caster->GetTypeId() == TYPEID_PLAYER && spell->Id == INOCULATION_CHANNEL)
|
||||
{
|
||||
ChannelTimer = 3000;
|
||||
Hitted = true;
|
||||
}
|
||||
{
|
||||
ChannelTimer = 3000;
|
||||
Hitted = true;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(ChannelTimer < diff && !Channeled && Hitted)
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->RemoveCorpse();
|
||||
m_creature->SummonCreature(INOCULATED_OWLKIN, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 180000);
|
||||
Channeled = true;
|
||||
}else ChannelTimer -= diff;
|
||||
if(ChannelTimer < diff && !Channeled && Hitted)
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->RemoveCorpse();
|
||||
m_creature->SummonCreature(INOCULATED_OWLKIN, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 180000);
|
||||
Channeled = true;
|
||||
}else ChannelTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -675,11 +675,11 @@ void AddSC_azuremyst_isle()
|
||||
newscript->GetAI = &GetAI_npc_injured_draenei;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_magwin";
|
||||
newscript->GetAI = &GetAI_npc_magwinAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_magwin;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_magwin";
|
||||
newscript->GetAI = &GetAI_npc_magwinAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_magwin;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_susurrus";
|
||||
@@ -687,14 +687,14 @@ void AddSC_azuremyst_isle()
|
||||
newscript->pGossipSelect = &GossipSelect_npc_susurrus;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_geezle";
|
||||
newscript->GetAI = &GetAI_npc_geezleAI;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_geezle";
|
||||
newscript->GetAI = &GetAI_npc_geezleAI;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="mob_nestlewood_owlkin";
|
||||
newscript->GetAI = &GetAI_mob_nestlewood_owlkinAI;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name="mob_nestlewood_owlkin";
|
||||
newscript->GetAI = &GetAI_mob_nestlewood_owlkinAI;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
}
|
||||
|
||||
@@ -391,87 +391,87 @@ CreatureAI* GetAI_npc_twiggy_flathead(Creature *_Creature)
|
||||
## npc_wizzlecrank_shredder
|
||||
#####*/
|
||||
|
||||
#define SAY_PROGRESS_1 -1000272
|
||||
#define SAY_PROGRESS_2 -1000273
|
||||
#define SAY_PROGRESS_3 -1000274
|
||||
#define SAY_PROGRESS_1 -1000272
|
||||
#define SAY_PROGRESS_2 -1000273
|
||||
#define SAY_PROGRESS_3 -1000274
|
||||
|
||||
#define SAY_MERCENARY_4 -1000275
|
||||
#define SAY_MERCENARY_4 -1000275
|
||||
|
||||
#define SAY_PROGRESS_5 -1000276
|
||||
#define SAY_PROGRESS_6 -1000277
|
||||
#define SAY_PROGRESS_7 -1000278
|
||||
#define SAY_PROGRESS_8 -1000279
|
||||
#define SAY_PROGRESS_5 -1000276
|
||||
#define SAY_PROGRESS_6 -1000277
|
||||
#define SAY_PROGRESS_7 -1000278
|
||||
#define SAY_PROGRESS_8 -1000279
|
||||
|
||||
#define QUEST_ESCAPE 863
|
||||
#define NPC_PILOT 3451
|
||||
#define MOB_MERCENARY 3282
|
||||
#define QUEST_ESCAPE 863
|
||||
#define NPC_PILOT 3451
|
||||
#define MOB_MERCENARY 3282
|
||||
|
||||
struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
|
||||
{
|
||||
npc_wizzlecrank_shredderAI(Creature* c) : npc_escortAI(c) {Reset();}
|
||||
npc_wizzlecrank_shredderAI(Creature* c) : npc_escortAI(c) {Reset();}
|
||||
|
||||
bool Completed;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
|
||||
if(!player)
|
||||
return;
|
||||
if(!player)
|
||||
return;
|
||||
|
||||
switch(i)
|
||||
{
|
||||
case 0: DoScriptText(SAY_PROGRESS_1, m_creature);
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 1: DoScriptText(SAY_PROGRESS_2, m_creature); break;
|
||||
case 10: DoScriptText(SAY_PROGRESS_3, m_creature, player);
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 20:{
|
||||
Unit* Mercenary = FindCreature(MOB_MERCENARY, 99, m_creature);
|
||||
if(Mercenary)
|
||||
{
|
||||
DoScriptText(SAY_MERCENARY_4, Mercenary);
|
||||
((Creature*)Mercenary)->AI()->AttackStart(m_creature);
|
||||
AttackStart(Mercenary);
|
||||
}
|
||||
}break;
|
||||
case 21: DoScriptText(SAY_PROGRESS_5, m_creature);
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 28: DoScriptText(SAY_PROGRESS_6, m_creature); break;
|
||||
case 29: DoScriptText(SAY_PROGRESS_7, m_creature); break;
|
||||
case 30: DoScriptText(SAY_PROGRESS_8, m_creature); break;
|
||||
case 31: m_creature->SummonCreature(NPC_PILOT, 1088.77, -2985.39, 91.84, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
switch(i)
|
||||
{
|
||||
case 0: DoScriptText(SAY_PROGRESS_1, m_creature);
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 1: DoScriptText(SAY_PROGRESS_2, m_creature); break;
|
||||
case 10: DoScriptText(SAY_PROGRESS_3, m_creature, player);
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 20:{
|
||||
Unit* Mercenary = FindCreature(MOB_MERCENARY, 99, m_creature);
|
||||
if(Mercenary)
|
||||
{
|
||||
DoScriptText(SAY_MERCENARY_4, Mercenary);
|
||||
((Creature*)Mercenary)->AI()->AttackStart(m_creature);
|
||||
AttackStart(Mercenary);
|
||||
}
|
||||
}break;
|
||||
case 21: DoScriptText(SAY_PROGRESS_5, m_creature);
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 28: DoScriptText(SAY_PROGRESS_6, m_creature); break;
|
||||
case 29: DoScriptText(SAY_PROGRESS_7, m_creature); break;
|
||||
case 30: DoScriptText(SAY_PROGRESS_8, m_creature); break;
|
||||
case 31: m_creature->SummonCreature(NPC_PILOT, 1088.77, -2985.39, 91.84, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
Completed = true;
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->GroupEventHappens(QUEST_ESCAPE, m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->setDeathState(ALIVE);
|
||||
void Reset()
|
||||
{
|
||||
m_creature->setDeathState(ALIVE);
|
||||
Completed = false;
|
||||
m_creature->setFaction(69);
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit* who){}
|
||||
void Aggro(Unit* who){}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID && !Completed)
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID && !Completed)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player)
|
||||
((Player*)player)->FailQuest(QUEST_ESCAPE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_wizzlecrank_shredder(Player* player, Creature* creature, Quest const* quest)
|
||||
@@ -479,49 +479,49 @@ bool QuestAccept_npc_wizzlecrank_shredder(Player* player, Creature* creature, Qu
|
||||
if (quest->GetQuestId() == QUEST_ESCAPE)
|
||||
{
|
||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||
creature->setFaction(113);
|
||||
creature->setFaction(113);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_npc_wizzlecrank_shredderAI(Creature *_Creature)
|
||||
{
|
||||
npc_wizzlecrank_shredderAI* thisAI = new npc_wizzlecrank_shredderAI(_Creature);
|
||||
npc_wizzlecrank_shredderAI* thisAI = new npc_wizzlecrank_shredderAI(_Creature);
|
||||
|
||||
thisAI->AddWaypoint(0, 1109.15, -3104.11, 82.41, 6000);
|
||||
thisAI->AddWaypoint(1, 1105.39, -3102.86, 82.74, 2000);
|
||||
thisAI->AddWaypoint(2, 1104.97, -3108.52, 83.10, 1000);
|
||||
thisAI->AddWaypoint(3, 1110.01, -3110.48, 82.81, 1000);
|
||||
thisAI->AddWaypoint(4, 1111.72, -3103.03, 82.21, 1000);
|
||||
thisAI->AddWaypoint(5, 1106.98, -3099.44, 82.18, 1000);
|
||||
thisAI->AddWaypoint(6, 1103.74, -3103.29, 83.05, 1000);
|
||||
thisAI->AddWaypoint(7, 1112.55, -3106.56, 82.31, 1000);
|
||||
thisAI->AddWaypoint(8, 1108.12, -3111.04, 82.99, 1000);
|
||||
thisAI->AddWaypoint(9, 1109.32, -3100.39, 82.08, 1000);
|
||||
thisAI->AddWaypoint(10, 1109.32, -3100.39, 82.08, 6000);
|
||||
thisAI->AddWaypoint(11, 1098.92, -3095.14, 82.97);
|
||||
thisAI->AddWaypoint(12, 1100.94, -3082.60, 82.83);
|
||||
thisAI->AddWaypoint(13, 1101.12, -3068.83, 82.53);
|
||||
thisAI->AddWaypoint(14, 1096.97, -3051.99, 82.50);
|
||||
thisAI->AddWaypoint(15, 1094.06, -3036.79, 82.70);
|
||||
thisAI->AddWaypoint(16, 1098.22, -3027.84, 83.79);
|
||||
thisAI->AddWaypoint(17, 1109.51, -3015.92, 85.73);
|
||||
thisAI->AddWaypoint(18, 1119.87, -3007.21, 87.08);
|
||||
thisAI->AddWaypoint(19, 1130.23, -3002.49, 91.27, 5000);
|
||||
thisAI->AddWaypoint(20, 1130.23, -3002.49, 91.27, 3000);
|
||||
thisAI->AddWaypoint(21, 1130.23, -3002.49, 91.27, 4000);
|
||||
thisAI->AddWaypoint(22, 1129.73, -2985.89, 92.46);
|
||||
thisAI->AddWaypoint(23, 1124.10, -2983.29, 92.81);
|
||||
thisAI->AddWaypoint(24, 1111.74, -2992.38, 91.59);
|
||||
thisAI->AddWaypoint(25, 1111.06, -2976.54, 91.81);
|
||||
thisAI->AddWaypoint(26, 1099.91, -2991.17, 91.67);
|
||||
thisAI->AddWaypoint(27, 1096.32, -2981.55, 91.73);
|
||||
thisAI->AddWaypoint(28, 1091.28, -2985.82, 91.74, 4000);
|
||||
thisAI->AddWaypoint(29, 1091.28, -2985.82, 91.74, 3000);
|
||||
thisAI->AddWaypoint(30, 1091.28, -2985.82, 91.74, 7000);
|
||||
thisAI->AddWaypoint(31, 1091.28, -2985.82, 91.74, 3000);
|
||||
thisAI->AddWaypoint(0, 1109.15, -3104.11, 82.41, 6000);
|
||||
thisAI->AddWaypoint(1, 1105.39, -3102.86, 82.74, 2000);
|
||||
thisAI->AddWaypoint(2, 1104.97, -3108.52, 83.10, 1000);
|
||||
thisAI->AddWaypoint(3, 1110.01, -3110.48, 82.81, 1000);
|
||||
thisAI->AddWaypoint(4, 1111.72, -3103.03, 82.21, 1000);
|
||||
thisAI->AddWaypoint(5, 1106.98, -3099.44, 82.18, 1000);
|
||||
thisAI->AddWaypoint(6, 1103.74, -3103.29, 83.05, 1000);
|
||||
thisAI->AddWaypoint(7, 1112.55, -3106.56, 82.31, 1000);
|
||||
thisAI->AddWaypoint(8, 1108.12, -3111.04, 82.99, 1000);
|
||||
thisAI->AddWaypoint(9, 1109.32, -3100.39, 82.08, 1000);
|
||||
thisAI->AddWaypoint(10, 1109.32, -3100.39, 82.08, 6000);
|
||||
thisAI->AddWaypoint(11, 1098.92, -3095.14, 82.97);
|
||||
thisAI->AddWaypoint(12, 1100.94, -3082.60, 82.83);
|
||||
thisAI->AddWaypoint(13, 1101.12, -3068.83, 82.53);
|
||||
thisAI->AddWaypoint(14, 1096.97, -3051.99, 82.50);
|
||||
thisAI->AddWaypoint(15, 1094.06, -3036.79, 82.70);
|
||||
thisAI->AddWaypoint(16, 1098.22, -3027.84, 83.79);
|
||||
thisAI->AddWaypoint(17, 1109.51, -3015.92, 85.73);
|
||||
thisAI->AddWaypoint(18, 1119.87, -3007.21, 87.08);
|
||||
thisAI->AddWaypoint(19, 1130.23, -3002.49, 91.27, 5000);
|
||||
thisAI->AddWaypoint(20, 1130.23, -3002.49, 91.27, 3000);
|
||||
thisAI->AddWaypoint(21, 1130.23, -3002.49, 91.27, 4000);
|
||||
thisAI->AddWaypoint(22, 1129.73, -2985.89, 92.46);
|
||||
thisAI->AddWaypoint(23, 1124.10, -2983.29, 92.81);
|
||||
thisAI->AddWaypoint(24, 1111.74, -2992.38, 91.59);
|
||||
thisAI->AddWaypoint(25, 1111.06, -2976.54, 91.81);
|
||||
thisAI->AddWaypoint(26, 1099.91, -2991.17, 91.67);
|
||||
thisAI->AddWaypoint(27, 1096.32, -2981.55, 91.73);
|
||||
thisAI->AddWaypoint(28, 1091.28, -2985.82, 91.74, 4000);
|
||||
thisAI->AddWaypoint(29, 1091.28, -2985.82, 91.74, 3000);
|
||||
thisAI->AddWaypoint(30, 1091.28, -2985.82, 91.74, 7000);
|
||||
thisAI->AddWaypoint(31, 1091.28, -2985.82, 91.74, 3000);
|
||||
|
||||
return (CreatureAI*)thisAI;
|
||||
return (CreatureAI*)thisAI;
|
||||
}
|
||||
|
||||
void AddSC_the_barrens()
|
||||
@@ -551,9 +551,9 @@ void AddSC_the_barrens()
|
||||
newscript->GetAI = &GetAI_npc_twiggy_flathead;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_wizzlecrank_shredder";
|
||||
newscript->GetAI = &GetAI_npc_wizzlecrank_shredderAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_wizzlecrank_shredder;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_wizzlecrank_shredder";
|
||||
newscript->GetAI = &GetAI_npc_wizzlecrank_shredderAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_wizzlecrank_shredder;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoZoneInCombat();
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_GURTOGGBLOODBOILEVENT, IN_PROGRESS);
|
||||
}
|
||||
@@ -125,8 +125,8 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
std::list<HostilReference *> m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
|
||||
if(!m_threatlist.size()) // He doesn't have anyone in his threatlist, useless to continue
|
||||
return;
|
||||
return;
|
||||
|
||||
std::list<Unit *> targets;
|
||||
std::list<HostilReference *>::iterator itr = m_threatlist.begin();
|
||||
@@ -214,17 +214,17 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
}else FelAcidTimer -= diff;
|
||||
|
||||
if(!m_creature->HasAura(SPELL_BERSERK, 0))
|
||||
{
|
||||
if(EnrageTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_ENRAGE1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_ENRAGE2, m_creature); break;
|
||||
}
|
||||
}else EnrageTimer -= diff;
|
||||
}
|
||||
{
|
||||
if(EnrageTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_ENRAGE1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_ENRAGE2, m_creature); break;
|
||||
}
|
||||
}else EnrageTimer -= diff;
|
||||
}
|
||||
|
||||
if(Phase1)
|
||||
{
|
||||
@@ -232,8 +232,8 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_BEWILDERING_STRIKE);
|
||||
float mt_threat = DoGetThreat(m_creature->getVictim());
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1))
|
||||
m_creature->AddThreat(target, mt_threat);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1))
|
||||
m_creature->AddThreat(target, mt_threat);
|
||||
BewilderingStrikeTimer = 20000;
|
||||
}else BewilderingStrikeTimer -= diff;
|
||||
|
||||
@@ -305,8 +305,8 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SPECIAL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPECIAL2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SPECIAL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPECIAL2, m_creature); break;
|
||||
}
|
||||
|
||||
AcidGeyserTimer = 1000;
|
||||
|
||||
@@ -94,7 +94,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
uint32 FatalAttractionTimer;
|
||||
uint32 FatalAttractionExplodeTimer;
|
||||
uint32 ShriekTimer;
|
||||
uint32 SaberTimer;
|
||||
uint32 SaberTimer;
|
||||
uint32 RandomYellTimer;
|
||||
uint32 EnrageTimer;
|
||||
uint32 ExplosionCount;
|
||||
@@ -116,7 +116,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
FatalAttractionTimer = 60000;
|
||||
FatalAttractionExplodeTimer = 70000;
|
||||
ShriekTimer = 30000;
|
||||
SaberTimer = 35000;
|
||||
SaberTimer = 35000;
|
||||
RandomYellTimer = 70000 + rand()%41 * 1000;
|
||||
EnrageTimer = 600000;
|
||||
ExplosionCount = 0;
|
||||
@@ -130,15 +130,15 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_MOTHERSHAHRAZEVENT, IN_PROGRESS);
|
||||
|
||||
DoZoneInCombat();
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,8 +230,8 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SPELL2, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPELL3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SPELL2, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPELL3, m_creature); break;
|
||||
}
|
||||
FatalAttractionExplodeTimer = 2000;
|
||||
FatalAttractionTimer = 40000 + rand()%31 * 1000;
|
||||
@@ -270,7 +270,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
ShriekTimer = 25000+rand()%10 * 1000;
|
||||
}else ShriekTimer -= diff;
|
||||
|
||||
if(SaberTimer < diff)
|
||||
if(SaberTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SABER_LASH);
|
||||
SaberTimer = 25000+rand()%10 * 1000;
|
||||
@@ -281,7 +281,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
if(EnrageTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
}else EnrageTimer -= diff;
|
||||
|
||||
//Random taunts
|
||||
@@ -289,9 +289,9 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_TAUNT1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TAUNT2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_TAUNT3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_TAUNT1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TAUNT2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_TAUNT3, m_creature); break;
|
||||
}
|
||||
RandomYellTimer = 60000 + rand()%91 * 1000;
|
||||
}else RandomYellTimer -= diff;
|
||||
|
||||
@@ -270,11 +270,11 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
case 5:
|
||||
if(Phase == 1)
|
||||
{
|
||||
DoScriptText(SUFF_SAY_AFTER, Essence);
|
||||
DoScriptText(SUFF_SAY_AFTER, Essence);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoScriptText(DESI_SAY_AFTER, Essence);
|
||||
DoScriptText(DESI_SAY_AFTER, Essence);
|
||||
}
|
||||
Essence->SetVisibility(VISIBILITY_OFF);
|
||||
Essence->setDeathState(DEAD);
|
||||
@@ -356,7 +356,7 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SUFF_SAY_FREED, m_creature);
|
||||
DoScriptText(SUFF_SAY_FREED, m_creature);
|
||||
DoZoneInCombat();
|
||||
m_creature->CastSpell(m_creature, AURA_OF_SUFFERING, true); // linked aura need core support
|
||||
m_creature->CastSpell(m_creature, ESSENCE_OF_SUFFERING_PASSIVE, true);
|
||||
@@ -367,9 +367,9 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SUFF_SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SUFF_SAY_SLAY2, m_creature); break;
|
||||
case 2: DoScriptText(SUFF_SAY_SLAY3, m_creature); break;
|
||||
case 0: DoScriptText(SUFF_SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SUFF_SAY_SLAY2, m_creature); break;
|
||||
case 2: DoScriptText(SUFF_SAY_SLAY3, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
||||
FixateTimer = 5000;
|
||||
if(!(rand()%16))
|
||||
{
|
||||
DoScriptText(SUFF_SAY_AGGRO, m_creature);
|
||||
DoScriptText(SUFF_SAY_AGGRO, m_creature);
|
||||
}
|
||||
}else FixateTimer -= diff;
|
||||
|
||||
@@ -415,7 +415,7 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
||||
{
|
||||
DoCast(m_creature, SPELL_ENRAGE);
|
||||
EnrageTimer = 60000;
|
||||
DoScriptText(SUFF_EMOTE_ENRAGE, m_creature);
|
||||
DoScriptText(SUFF_EMOTE_ENRAGE, m_creature);
|
||||
}else EnrageTimer -= diff;
|
||||
|
||||
if(SoulDrainTimer < diff)
|
||||
@@ -453,7 +453,7 @@ struct TRINITY_DLL_DECL boss_essence_of_desireAI : public ScriptedAI
|
||||
{
|
||||
damage = 0;
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoScriptText(SUFF_SAY_RECAP, m_creature);
|
||||
DoScriptText(SUFF_SAY_RECAP, m_creature);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -474,7 +474,7 @@ struct TRINITY_DLL_DECL boss_essence_of_desireAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(DESI_SAY_FREED, m_creature);
|
||||
DoScriptText(DESI_SAY_FREED, m_creature);
|
||||
DoZoneInCombat();
|
||||
DoCast(m_creature, AURA_OF_DESIRE, true);
|
||||
}
|
||||
@@ -516,7 +516,7 @@ struct TRINITY_DLL_DECL boss_essence_of_desireAI : public ScriptedAI
|
||||
DeadenTimer = 25000 + rand()%10000;
|
||||
if(!(rand()%2))
|
||||
{
|
||||
DoScriptText(DESI_SAY_SPEC, m_creature);
|
||||
DoScriptText(DESI_SAY_SPEC, m_creature);
|
||||
}
|
||||
}else DeadenTimer -= diff;
|
||||
|
||||
@@ -553,11 +553,11 @@ struct TRINITY_DLL_DECL boss_essence_of_angerAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(ANGER_SAY_FREED, m_creature); break;
|
||||
case 1: DoScriptText(ANGER_SAY_FREED2, m_creature); break;
|
||||
}
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(ANGER_SAY_FREED, m_creature); break;
|
||||
case 1: DoScriptText(ANGER_SAY_FREED2, m_creature); break;
|
||||
}
|
||||
|
||||
DoZoneInCombat();
|
||||
DoCast(m_creature, AURA_OF_ANGER, true);
|
||||
@@ -565,7 +565,7 @@ struct TRINITY_DLL_DECL boss_essence_of_angerAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(ANGER_SAY_DEATH, m_creature);
|
||||
DoScriptText(ANGER_SAY_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
@@ -593,7 +593,7 @@ struct TRINITY_DLL_DECL boss_essence_of_angerAI : public ScriptedAI
|
||||
{
|
||||
if(m_creature->getVictim()->GetGUID() != AggroTargetGUID)
|
||||
{
|
||||
DoScriptText(ANGER_SAY_BEFORE, m_creature);
|
||||
DoScriptText(ANGER_SAY_BEFORE, m_creature);
|
||||
DoCast(m_creature, SPELL_SELF_SEETHE, true);
|
||||
AggroTargetGUID = m_creature->getVictim()->GetGUID();
|
||||
}
|
||||
@@ -606,7 +606,7 @@ struct TRINITY_DLL_DECL boss_essence_of_angerAI : public ScriptedAI
|
||||
SoulScreamTimer = 9000 + rand()%2000;
|
||||
if(!(rand()%3))
|
||||
{
|
||||
DoScriptText(ANGER_SAY_SPEC, m_creature);
|
||||
DoScriptText(ANGER_SAY_SPEC, m_creature);
|
||||
}
|
||||
}else SoulScreamTimer -= diff;
|
||||
|
||||
@@ -614,7 +614,7 @@ struct TRINITY_DLL_DECL boss_essence_of_angerAI : public ScriptedAI
|
||||
{
|
||||
DoCast(m_creature, SPELL_SPITE_TARGET);
|
||||
SpiteTimer = 30000;
|
||||
DoScriptText(ANGER_SAY_SPEC, m_creature);
|
||||
DoScriptText(ANGER_SAY_SPEC, m_creature);
|
||||
}else SpiteTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -189,7 +189,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
bool IsBanished;
|
||||
bool HasKilledAkama;
|
||||
bool reseting;
|
||||
bool GridSearcherSucceeded;
|
||||
bool GridSearcherSucceeded;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -257,17 +257,17 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
{
|
||||
Channeler->RemoveCorpse();
|
||||
Channeler->Respawn();
|
||||
Channeler->InterruptNonMeleeSpells(true);
|
||||
Channeler->RemoveAurasDueToSpell(SPELL_SHADE_SOUL_CHANNEL);
|
||||
Channeler->InterruptNonMeleeSpells(true);
|
||||
Channeler->RemoveAurasDueToSpell(SPELL_SHADE_SOUL_CHANNEL);
|
||||
}
|
||||
|
||||
if (Channeler->isAlive())
|
||||
{
|
||||
if (Channeler->isAlive())
|
||||
{
|
||||
Channeler->CastSpell(m_creature, SPELL_SHADE_SOUL_CHANNEL, true);
|
||||
Channeler->CastSpell(m_creature, SPELL_SHADE_SOUL_CHANNEL_2, true);
|
||||
Channeler->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
GridSearcherSucceeded = true;
|
||||
}
|
||||
GridSearcherSucceeded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else error_log("SD2 ERROR: No Channelers are stored in the list. This encounter will not work properly");
|
||||
@@ -329,8 +329,8 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
||||
{
|
||||
Spawn->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
Spawn->GetMotionMaster()->MovePoint(0, AGGRO_X, AGGRO_Y, AGGRO_Z);
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
Spawn->AI()->AttackStart(target);
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
Spawn->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,11 +152,11 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
return;
|
||||
|
||||
if(!m_creature->HasAura(SPELL_BERSERK, 0))
|
||||
{
|
||||
{
|
||||
if(BerserkTimer < diff)
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
else BerserkTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if(SummonFlameTimer < diff)
|
||||
{
|
||||
@@ -184,7 +184,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
{
|
||||
DoResetThreat();
|
||||
m_creature->AddThreat(target, 5000000.0f);
|
||||
DoScriptText(EMOTE_NEW_TARGET, m_creature);
|
||||
DoScriptText(EMOTE_NEW_TARGET, m_creature);
|
||||
SwitchTargetTimer = 10000;
|
||||
}
|
||||
}else SwitchTargetTimer -= diff;
|
||||
@@ -193,11 +193,11 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
{
|
||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 999, true))
|
||||
{
|
||||
if(!target)
|
||||
target = m_creature->getVictim();
|
||||
if(!target)
|
||||
target = m_creature->getVictim();
|
||||
|
||||
DoCast(target, SPELL_VOLCANIC_SUMMON);
|
||||
DoScriptText(EMOTE_GROUND_CRACK, m_creature);
|
||||
DoScriptText(EMOTE_GROUND_CRACK, m_creature);
|
||||
SummonVolcanoTimer = 10000;
|
||||
}
|
||||
}else SummonVolcanoTimer -= diff;
|
||||
@@ -306,7 +306,7 @@ void AddSC_boss_supremus()
|
||||
newscript->GetAI = &GetAI_molten_flame;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_volcano";
|
||||
newscript->GetAI = &GetAI_npc_volcano;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -143,7 +143,7 @@ struct TRINITY_DLL_DECL mob_shadowy_constructAI : public ScriptedAI
|
||||
if(!who || (!who->isAlive()) || (who->GetGUID() == GhostGUID))
|
||||
return;
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
/* Comment it out for now. NOTE TO FUTURE DEV: UNCOMMENT THIS OUT ONLY AFTER MIND CONTROL IS IMPLEMENTED
|
||||
@@ -265,7 +265,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
|
||||
AggroTargetGUID = who->GetGUID();
|
||||
Intro = true;
|
||||
@@ -277,8 +277,8 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_TERONGOREFIENDEVENT, DONE);
|
||||
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
}
|
||||
|
||||
float CalculateRandomLocation(float Loc, uint32 radius)
|
||||
@@ -375,7 +375,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
Intro = false;
|
||||
if(AggroTargetGUID)
|
||||
@@ -417,7 +417,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
|
||||
if(SummonDoomBlossomTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
float X = CalculateRandomLocation(target->GetPositionX(), 20);
|
||||
float Y = CalculateRandomLocation(target->GetPositionY(), 20);
|
||||
@@ -445,8 +445,8 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SPECIAL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPECIAL2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SPECIAL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPECIAL2, m_creature); break;
|
||||
}
|
||||
DoCast(target, SPELL_INCINERATE);
|
||||
IncinerateTimer = 20000 + rand()%31 * 1000;
|
||||
@@ -482,20 +482,20 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SPELL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPELL2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SPELL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPELL2, m_creature); break;
|
||||
}
|
||||
RandomYellTimer = 50000 + rand()%51 * 1000;
|
||||
}else RandomYellTimer -= diff;
|
||||
|
||||
if(!m_creature->HasAura(SPELL_BERSERK, 0))
|
||||
{
|
||||
{
|
||||
if(EnrageTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
}else EnrageTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, DONE);
|
||||
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
@@ -143,7 +143,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
|
||||
if(EnrageTimer < diff)
|
||||
{
|
||||
DoScriptText(SAY_ENRAGE2, m_creature);
|
||||
DoScriptText(SAY_ENRAGE2, m_creature);
|
||||
m_creature->CastSpell(m_creature, SPELL_BERSERK, true);
|
||||
EnrageTimer = 600000;
|
||||
}else EnrageTimer -= diff;
|
||||
@@ -162,8 +162,8 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SPECIAL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPECIAL2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SPECIAL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPECIAL2, m_creature); break;
|
||||
}
|
||||
SpecialYellTimer = 25000 + (rand()%76)*1000;
|
||||
}else SpecialYellTimer -= diff;
|
||||
@@ -181,8 +181,8 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_NEEDLE1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_NEEDLE2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_NEEDLE1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_NEEDLE2, m_creature); break;
|
||||
}
|
||||
ImpalingSpineTimer = 21000;
|
||||
}
|
||||
|
||||
@@ -53,25 +53,25 @@ EndScriptData */
|
||||
|
||||
struct CouncilYells
|
||||
{
|
||||
int32 entry;
|
||||
uint32 timer;
|
||||
int32 entry;
|
||||
uint32 timer;
|
||||
};
|
||||
|
||||
static CouncilYells CouncilAggro[]=
|
||||
{
|
||||
{-1564069, 5000}, // Gathios
|
||||
{-1564070, 5500}, // Veras
|
||||
{-1564071, 5000}, // Malande
|
||||
{-1564072, 0}, // Zerevor
|
||||
{-1564069, 5000}, // Gathios
|
||||
{-1564070, 5500}, // Veras
|
||||
{-1564071, 5000}, // Malande
|
||||
{-1564072, 0}, // Zerevor
|
||||
};
|
||||
|
||||
// Need to get proper timers for this later
|
||||
static CouncilYells CouncilEnrage[]=
|
||||
{
|
||||
{-1564073, 2000}, // Gathios
|
||||
{-1564074, 6000}, // Veras
|
||||
{-1564075, 5000}, // Malande
|
||||
{-1564076, 0}, // Zerevor
|
||||
{-1564073, 2000}, // Gathios
|
||||
{-1564074, 6000}, // Veras
|
||||
{-1564075, 5000}, // Malande
|
||||
{-1564076, 0}, // Zerevor
|
||||
};
|
||||
|
||||
// High Nethermancer Zerevor's spells
|
||||
@@ -159,33 +159,33 @@ struct TRINITY_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedA
|
||||
return;
|
||||
|
||||
if(AggroYellTimer)
|
||||
{
|
||||
{
|
||||
if(AggroYellTimer <= diff)
|
||||
{
|
||||
if(Unit* pMember = Unit::GetUnit(*m_creature, Council[YellCounter]))
|
||||
{
|
||||
DoScriptText(CouncilAggro[YellCounter].entry, pMember);
|
||||
DoScriptText(CouncilAggro[YellCounter].entry, pMember);
|
||||
AggroYellTimer = CouncilAggro[YellCounter].timer;
|
||||
}
|
||||
++YellCounter;
|
||||
if(YellCounter > 3)
|
||||
YellCounter = 0; // Reuse for Enrage Yells
|
||||
}else AggroYellTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if(EnrageTimer)
|
||||
{
|
||||
{
|
||||
if(EnrageTimer <= diff)
|
||||
{
|
||||
if(Unit* pMember = Unit::GetUnit(*m_creature, Council[YellCounter]))
|
||||
{
|
||||
pMember->CastSpell(pMember, SPELL_BERSERK, true);
|
||||
DoScriptText(CouncilEnrage[YellCounter].entry, pMember);
|
||||
DoScriptText(CouncilEnrage[YellCounter].entry, pMember);
|
||||
EnrageTimer = CouncilEnrage[YellCounter].timer;
|
||||
}
|
||||
++YellCounter;
|
||||
}else EnrageTimer -= diff;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -451,12 +451,12 @@ struct TRINITY_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_coun
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_GATH_SLAY, m_creature);
|
||||
DoScriptText(SAY_GATH_SLAY, m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_GATH_DEATH, m_creature);
|
||||
DoScriptText(SAY_GATH_DEATH, m_creature);
|
||||
}
|
||||
|
||||
Unit* SelectCouncilMember()
|
||||
@@ -568,12 +568,12 @@ struct TRINITY_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_ZERE_SLAY, m_creature);
|
||||
DoScriptText(SAY_ZERE_SLAY, m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_ZERE_DEATH, m_creature);
|
||||
DoScriptText(SAY_ZERE_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -656,12 +656,12 @@ struct TRINITY_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_MALA_SLAY, m_creature);
|
||||
DoScriptText(SAY_MALA_SLAY, m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_MALA_DEATH, m_creature);
|
||||
DoScriptText(SAY_MALA_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -730,12 +730,12 @@ struct TRINITY_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_VERA_SLAY, m_creature);
|
||||
DoScriptText(SAY_VERA_SLAY, m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_VERA_DEATH, m_creature);
|
||||
DoScriptText(SAY_VERA_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -113,35 +113,35 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
|
||||
}
|
||||
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
|
||||
debug_log("TSCR: Instance Black Temple: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
}
|
||||
debug_log("TSCR: Instance Black Temple: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void HandleGameObject(uint64 guid, uint32 state)
|
||||
{
|
||||
Player *player = GetPlayerInMap();
|
||||
void HandleGameObject(uint64 guid, uint32 state)
|
||||
{
|
||||
Player *player = GetPlayerInMap();
|
||||
|
||||
if (!player || !guid)
|
||||
{
|
||||
debug_log("TSCR: Black Temple: HandleGameObject fail");
|
||||
return;
|
||||
}
|
||||
if (!player || !guid)
|
||||
{
|
||||
debug_log("TSCR: Black Temple: HandleGameObject fail");
|
||||
return;
|
||||
}
|
||||
|
||||
if (GameObject *go = GameObject::GetGameObject(*player,guid))
|
||||
go->SetGoState(state);
|
||||
}
|
||||
if (GameObject *go = GameObject::GetGameObject(*player,guid))
|
||||
go->SetGoState(state);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature *creature, uint32 creature_entry)
|
||||
{
|
||||
@@ -274,20 +274,20 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
|
||||
}
|
||||
|
||||
if (data == DONE)
|
||||
{
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << Encounters[0] << " " << Encounters[1] << " "
|
||||
<< Encounters[2] << " " << Encounters[3] << " " << Encounters[4]
|
||||
std::ostringstream saveStream;
|
||||
saveStream << Encounters[0] << " " << Encounters[1] << " "
|
||||
<< Encounters[2] << " " << Encounters[3] << " " << Encounters[4]
|
||||
<< " " << Encounters[5] << " " << Encounters[6] << " " << Encounters[7]
|
||||
<< " " << Encounters[8];
|
||||
|
||||
str_data = saveStream.str();
|
||||
str_data = saveStream.str();
|
||||
|
||||
SaveToDB();
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
}
|
||||
SaveToDB();
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
@@ -309,31 +309,31 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance
|
||||
}
|
||||
|
||||
const char* Save()
|
||||
{
|
||||
return str_data.c_str();
|
||||
}
|
||||
{
|
||||
return str_data.c_str();
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> Encounters[0] >> Encounters[1] >> Encounters[2]
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> Encounters[0] >> Encounters[1] >> Encounters[2]
|
||||
>> Encounters[3] >> Encounters[4] >> Encounters[5] >> Encounters[6]
|
||||
>> Encounters[7] >> Encounters[8];
|
||||
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if (Encounters[i] == IN_PROGRESS)
|
||||
Encounters[i] = NOT_STARTED;
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if (Encounters[i] == IN_PROGRESS)
|
||||
Encounters[i] = NOT_STARTED;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_black_temple(Map* map)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+205
-205
@@ -57,244 +57,244 @@ update `instance_template` set `script`='instance_blackrock_depths' where `map`=
|
||||
|
||||
struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
||||
{
|
||||
instance_blackrock_depths(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
instance_blackrock_depths(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
|
||||
uint32 Encounter[ENCOUNTERS];
|
||||
std::string str_data;
|
||||
uint32 Encounter[ENCOUNTERS];
|
||||
std::string str_data;
|
||||
|
||||
uint64 EmperorGUID;
|
||||
uint64 PhalanxGUID;
|
||||
uint64 EmperorGUID;
|
||||
uint64 PhalanxGUID;
|
||||
|
||||
uint64 GoArena1GUID;
|
||||
uint64 GoArena2GUID;
|
||||
uint64 GoArena3GUID;
|
||||
uint64 GoArena4GUID;
|
||||
uint64 GoShadowLockGUID;
|
||||
uint64 GoShadowMechGUID;
|
||||
uint64 GoShadowGiantGUID;
|
||||
uint64 GoShadowDummyGUID;
|
||||
uint64 GoBarKegGUID;
|
||||
uint64 GoBarKegTrapGUID;
|
||||
uint64 GoBarDoorGUID;
|
||||
uint64 GoTombEnterGUID;
|
||||
uint64 GoTombExitGUID;
|
||||
uint64 GoLyceumGUID;
|
||||
uint64 GoGolemNGUID;
|
||||
uint64 GoGolemSGUID;
|
||||
uint64 GoThoneGUID;
|
||||
uint64 GoArena1GUID;
|
||||
uint64 GoArena2GUID;
|
||||
uint64 GoArena3GUID;
|
||||
uint64 GoArena4GUID;
|
||||
uint64 GoShadowLockGUID;
|
||||
uint64 GoShadowMechGUID;
|
||||
uint64 GoShadowGiantGUID;
|
||||
uint64 GoShadowDummyGUID;
|
||||
uint64 GoBarKegGUID;
|
||||
uint64 GoBarKegTrapGUID;
|
||||
uint64 GoBarDoorGUID;
|
||||
uint64 GoTombEnterGUID;
|
||||
uint64 GoTombExitGUID;
|
||||
uint64 GoLyceumGUID;
|
||||
uint64 GoGolemNGUID;
|
||||
uint64 GoGolemSGUID;
|
||||
uint64 GoThoneGUID;
|
||||
|
||||
uint32 BarAleCount;
|
||||
uint32 BarAleCount;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
EmperorGUID = 0;
|
||||
PhalanxGUID = 0;
|
||||
void Initialize()
|
||||
{
|
||||
EmperorGUID = 0;
|
||||
PhalanxGUID = 0;
|
||||
|
||||
GoArena1GUID = 0;
|
||||
GoArena2GUID = 0;
|
||||
GoArena3GUID = 0;
|
||||
GoArena4GUID = 0;
|
||||
GoShadowLockGUID = 0;
|
||||
GoShadowMechGUID = 0;
|
||||
GoShadowGiantGUID = 0;
|
||||
GoShadowDummyGUID = 0;
|
||||
GoBarKegGUID = 0;
|
||||
GoBarKegTrapGUID = 0;
|
||||
GoBarDoorGUID = 0;
|
||||
GoTombEnterGUID = 0;
|
||||
GoTombExitGUID = 0;
|
||||
GoLyceumGUID = 0;
|
||||
GoGolemNGUID = 0;
|
||||
GoGolemSGUID = 0;
|
||||
GoThoneGUID = 0;
|
||||
GoArena1GUID = 0;
|
||||
GoArena2GUID = 0;
|
||||
GoArena3GUID = 0;
|
||||
GoArena4GUID = 0;
|
||||
GoShadowLockGUID = 0;
|
||||
GoShadowMechGUID = 0;
|
||||
GoShadowGiantGUID = 0;
|
||||
GoShadowDummyGUID = 0;
|
||||
GoBarKegGUID = 0;
|
||||
GoBarKegTrapGUID = 0;
|
||||
GoBarDoorGUID = 0;
|
||||
GoTombEnterGUID = 0;
|
||||
GoTombExitGUID = 0;
|
||||
GoLyceumGUID = 0;
|
||||
GoGolemNGUID = 0;
|
||||
GoGolemSGUID = 0;
|
||||
GoThoneGUID = 0;
|
||||
|
||||
BarAleCount = 0;
|
||||
BarAleCount = 0;
|
||||
|
||||
for(uint8 i = 0; i < ENCOUNTERS; i++)
|
||||
Encounter[i] = NOT_STARTED;
|
||||
}
|
||||
for(uint8 i = 0; i < ENCOUNTERS; i++)
|
||||
Encounter[i] = NOT_STARTED;
|
||||
}
|
||||
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
|
||||
debug_log("SD2: Instance Blackrock Depths: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
}
|
||||
debug_log("SD2: Instance Blackrock Depths: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature *creature, uint32 creature_entry)
|
||||
{
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case C_EMPEROR: EmperorGUID = creature->GetGUID(); break;
|
||||
case C_PHALANX: PhalanxGUID = creature->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
void OnCreatureCreate(Creature *creature, uint32 creature_entry)
|
||||
{
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case C_EMPEROR: EmperorGUID = creature->GetGUID(); break;
|
||||
case C_PHALANX: PhalanxGUID = creature->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case GO_ARENA1: GoArena1GUID = go->GetGUID(); break;
|
||||
case GO_ARENA2: GoArena2GUID = go->GetGUID(); break;
|
||||
case GO_ARENA3: GoArena3GUID = go->GetGUID(); break;
|
||||
case GO_ARENA4: GoArena4GUID = go->GetGUID(); break;
|
||||
case GO_SHADOW_LOCK: GoShadowLockGUID = go->GetGUID(); break;
|
||||
case GO_SHADOW_MECHANISM: GoShadowMechGUID = go->GetGUID(); break;
|
||||
case GO_SHADOW_GIANT_DOOR: GoShadowGiantGUID = go->GetGUID(); break;
|
||||
case GO_SHADOW_DUMMY: GoShadowDummyGUID = go->GetGUID(); break;
|
||||
case GO_BAR_KEG_SHOT: GoBarKegGUID = go->GetGUID(); break;
|
||||
case GO_BAR_KEG_TRAP: GoBarKegTrapGUID = go->GetGUID(); break;
|
||||
case GO_BAR_DOOR: GoBarDoorGUID = go->GetGUID(); break;
|
||||
case GO_TOMB_ENTER: GoTombEnterGUID = go->GetGUID(); break;
|
||||
case GO_TOMB_EXIT: GoTombExitGUID = go->GetGUID(); break;
|
||||
case GO_LYCEUM: GoLyceumGUID = go->GetGUID(); break;
|
||||
case GO_GOLEM_ROOM_N: GoGolemNGUID = go->GetGUID(); break;
|
||||
case GO_GOLEM_ROOM_S: GoGolemSGUID = go->GetGUID(); break;
|
||||
case GO_THONE_ROOM: GoThoneGUID = go->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
void OnObjectCreate(GameObject* go)
|
||||
{
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case GO_ARENA1: GoArena1GUID = go->GetGUID(); break;
|
||||
case GO_ARENA2: GoArena2GUID = go->GetGUID(); break;
|
||||
case GO_ARENA3: GoArena3GUID = go->GetGUID(); break;
|
||||
case GO_ARENA4: GoArena4GUID = go->GetGUID(); break;
|
||||
case GO_SHADOW_LOCK: GoShadowLockGUID = go->GetGUID(); break;
|
||||
case GO_SHADOW_MECHANISM: GoShadowMechGUID = go->GetGUID(); break;
|
||||
case GO_SHADOW_GIANT_DOOR: GoShadowGiantGUID = go->GetGUID(); break;
|
||||
case GO_SHADOW_DUMMY: GoShadowDummyGUID = go->GetGUID(); break;
|
||||
case GO_BAR_KEG_SHOT: GoBarKegGUID = go->GetGUID(); break;
|
||||
case GO_BAR_KEG_TRAP: GoBarKegTrapGUID = go->GetGUID(); break;
|
||||
case GO_BAR_DOOR: GoBarDoorGUID = go->GetGUID(); break;
|
||||
case GO_TOMB_ENTER: GoTombEnterGUID = go->GetGUID(); break;
|
||||
case GO_TOMB_EXIT: GoTombExitGUID = go->GetGUID(); break;
|
||||
case GO_LYCEUM: GoLyceumGUID = go->GetGUID(); break;
|
||||
case GO_GOLEM_ROOM_N: GoGolemNGUID = go->GetGUID(); break;
|
||||
case GO_GOLEM_ROOM_S: GoGolemSGUID = go->GetGUID(); break;
|
||||
case GO_THONE_ROOM: GoThoneGUID = go->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
Player *player = GetPlayerInMap();
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
Player *player = GetPlayerInMap();
|
||||
|
||||
if (!player)
|
||||
{
|
||||
debug_log("SD2: Instance Blackrock Depths: SetData (Type: %u Data %u) cannot find any player.", type, data);
|
||||
return;
|
||||
}
|
||||
if (!player)
|
||||
{
|
||||
debug_log("SD2: Instance Blackrock Depths: SetData (Type: %u Data %u) cannot find any player.", type, data);
|
||||
return;
|
||||
}
|
||||
|
||||
debug_log("SD2: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
|
||||
debug_log("SD2: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_RING_OF_LAW:
|
||||
Encounter[0] = data;
|
||||
break;
|
||||
case TYPE_VAULT:
|
||||
Encounter[1] = data;
|
||||
break;
|
||||
case TYPE_BAR:
|
||||
if (data == SPECIAL)
|
||||
++BarAleCount;
|
||||
else
|
||||
Encounter[2] = data;
|
||||
break;
|
||||
case TYPE_TOMB_OF_SEVEN:
|
||||
Encounter[3] = data;
|
||||
break;
|
||||
case TYPE_LYCEUM:
|
||||
Encounter[4] = data;
|
||||
break;
|
||||
case TYPE_IRON_HALL:
|
||||
Encounter[5] = data;
|
||||
break;
|
||||
}
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_RING_OF_LAW:
|
||||
Encounter[0] = data;
|
||||
break;
|
||||
case TYPE_VAULT:
|
||||
Encounter[1] = data;
|
||||
break;
|
||||
case TYPE_BAR:
|
||||
if (data == SPECIAL)
|
||||
++BarAleCount;
|
||||
else
|
||||
Encounter[2] = data;
|
||||
break;
|
||||
case TYPE_TOMB_OF_SEVEN:
|
||||
Encounter[3] = data;
|
||||
break;
|
||||
case TYPE_LYCEUM:
|
||||
Encounter[4] = data;
|
||||
break;
|
||||
case TYPE_IRON_HALL:
|
||||
Encounter[5] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
if (data == DONE)
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
if (data == DONE)
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << Encounter[0] << " " << Encounter[1] << " " << Encounter[2] << " "
|
||||
<< Encounter[3] << " " << Encounter[4] << " " << Encounter[5];
|
||||
std::ostringstream saveStream;
|
||||
saveStream << Encounter[0] << " " << Encounter[1] << " " << Encounter[2] << " "
|
||||
<< Encounter[3] << " " << Encounter[4] << " " << Encounter[5];
|
||||
|
||||
str_data = saveStream.str();
|
||||
str_data = saveStream.str();
|
||||
|
||||
SaveToDB();
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
}
|
||||
}
|
||||
SaveToDB();
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_RING_OF_LAW:
|
||||
return Encounter[0];
|
||||
case TYPE_VAULT:
|
||||
return Encounter[1];
|
||||
case TYPE_BAR:
|
||||
if (Encounter[2] == IN_PROGRESS && BarAleCount == 3)
|
||||
return SPECIAL;
|
||||
else
|
||||
return Encounter[2];
|
||||
case TYPE_TOMB_OF_SEVEN:
|
||||
return Encounter[3];
|
||||
case TYPE_LYCEUM:
|
||||
return Encounter[4];
|
||||
case TYPE_IRON_HALL:
|
||||
return Encounter[5];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_RING_OF_LAW:
|
||||
return Encounter[0];
|
||||
case TYPE_VAULT:
|
||||
return Encounter[1];
|
||||
case TYPE_BAR:
|
||||
if (Encounter[2] == IN_PROGRESS && BarAleCount == 3)
|
||||
return SPECIAL;
|
||||
else
|
||||
return Encounter[2];
|
||||
case TYPE_TOMB_OF_SEVEN:
|
||||
return Encounter[3];
|
||||
case TYPE_LYCEUM:
|
||||
return Encounter[4];
|
||||
case TYPE_IRON_HALL:
|
||||
return Encounter[5];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
{
|
||||
switch(data)
|
||||
{
|
||||
case DATA_EMPEROR:
|
||||
return EmperorGUID;
|
||||
case DATA_PHALANX:
|
||||
return PhalanxGUID;
|
||||
case DATA_ARENA1:
|
||||
return GoArena1GUID;
|
||||
case DATA_ARENA2:
|
||||
return GoArena2GUID;
|
||||
case DATA_ARENA3:
|
||||
return GoArena3GUID;
|
||||
case DATA_ARENA4:
|
||||
return GoArena4GUID;
|
||||
case DATA_GO_BAR_KEG:
|
||||
return GoBarKegGUID;
|
||||
case DATA_GO_BAR_KEG_TRAP:
|
||||
return GoBarKegTrapGUID;
|
||||
case DATA_GO_BAR_DOOR:
|
||||
return GoBarDoorGUID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
uint64 GetData64(uint32 data)
|
||||
{
|
||||
switch(data)
|
||||
{
|
||||
case DATA_EMPEROR:
|
||||
return EmperorGUID;
|
||||
case DATA_PHALANX:
|
||||
return PhalanxGUID;
|
||||
case DATA_ARENA1:
|
||||
return GoArena1GUID;
|
||||
case DATA_ARENA2:
|
||||
return GoArena2GUID;
|
||||
case DATA_ARENA3:
|
||||
return GoArena3GUID;
|
||||
case DATA_ARENA4:
|
||||
return GoArena4GUID;
|
||||
case DATA_GO_BAR_KEG:
|
||||
return GoBarKegGUID;
|
||||
case DATA_GO_BAR_KEG_TRAP:
|
||||
return GoBarKegTrapGUID;
|
||||
case DATA_GO_BAR_DOOR:
|
||||
return GoBarDoorGUID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* Save()
|
||||
{
|
||||
return str_data.c_str();
|
||||
}
|
||||
const char* Save()
|
||||
{
|
||||
return str_data.c_str();
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2] >> Encounter[3]
|
||||
>> Encounter[4] >> Encounter[5];
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2] >> Encounter[3]
|
||||
>> Encounter[4] >> Encounter[5];
|
||||
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if (Encounter[i] == IN_PROGRESS)
|
||||
Encounter[i] = NOT_STARTED;
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if (Encounter[i] == IN_PROGRESS)
|
||||
Encounter[i] = NOT_STARTED;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_blackrock_depths(Map* map)
|
||||
{
|
||||
return new instance_blackrock_depths(map);
|
||||
return new instance_blackrock_depths(map);
|
||||
}
|
||||
|
||||
void AddSC_instance_blackrock_depths()
|
||||
|
||||
@@ -74,7 +74,7 @@ struct TRINITY_DLL_DECL boss_flamegorAI : public ScriptedAI
|
||||
//Frenzy_Timer
|
||||
if (Frenzy_Timer < diff)
|
||||
{
|
||||
DoScriptText(EMOTE_FRENZY, m_creature);
|
||||
DoScriptText(EMOTE_FRENZY, m_creature);
|
||||
DoCast(m_creature,SPELL_FRENZY);
|
||||
Frenzy_Timer = 8000 + (rand()%2000);
|
||||
}else Frenzy_Timer -= diff;
|
||||
|
||||
@@ -40,15 +40,15 @@ EndScriptData */
|
||||
|
||||
struct TRINITY_DLL_DECL boss_aeonusAI : public ScriptedAI
|
||||
{
|
||||
boss_aeonusAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
boss_aeonusAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
bool HeroicMode;
|
||||
ScriptedInstance *pInstance;
|
||||
bool HeroicMode;
|
||||
|
||||
uint32 SandBreath_Timer;
|
||||
uint32 TimeStop_Timer;
|
||||
@@ -66,28 +66,28 @@ struct TRINITY_DLL_DECL boss_aeonusAI : public ScriptedAI
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
//Despawn Time Keeper
|
||||
if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == C_TIME_KEEPER)
|
||||
{
|
||||
if (m_creature->IsWithinDistInMap(who,20.0f))
|
||||
{
|
||||
DoScriptText(SAY_BANISH, m_creature);
|
||||
m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
}
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
//Despawn Time Keeper
|
||||
if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == C_TIME_KEEPER)
|
||||
{
|
||||
if (m_creature->IsWithinDistInMap(who,20.0f))
|
||||
{
|
||||
DoScriptText(SAY_BANISH, m_creature);
|
||||
m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
}
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if (pInstance)
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(TYPE_RIFT,DONE);
|
||||
pInstance->SetData(TYPE_RIFT,DONE);
|
||||
pInstance->SetData(TYPE_MEDIVH,DONE);//FIXME: later should be removed
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ struct TRINITY_DLL_DECL boss_aeonusAI : public ScriptedAI
|
||||
//Sand Breath
|
||||
if (SandBreath_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SAND_BREATH);
|
||||
DoCast(m_creature->getVictim(), SPELL_SAND_BREATH);
|
||||
SandBreath_Timer = 30000;
|
||||
}else SandBreath_Timer -= diff;
|
||||
|
||||
@@ -124,7 +124,7 @@ struct TRINITY_DLL_DECL boss_aeonusAI : public ScriptedAI
|
||||
//Frenzy
|
||||
if (Frenzy_Timer < diff)
|
||||
{
|
||||
DoScriptText(EMOTE_FRENZY, m_creature);
|
||||
DoScriptText(EMOTE_FRENZY, m_creature);
|
||||
DoCast(m_creature, SPELL_ENRAGE);
|
||||
Frenzy_Timer = 120000;
|
||||
}else Frenzy_Timer -= diff;
|
||||
|
||||
+22
-22
@@ -41,14 +41,14 @@ EndScriptData */
|
||||
struct TRINITY_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI
|
||||
{
|
||||
boss_chrono_lord_dejaAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
bool HeroicMode;
|
||||
ScriptedInstance *pInstance;
|
||||
bool HeroicMode;
|
||||
|
||||
uint32 ArcaneBlast_Timer;
|
||||
uint32 TimeLapse_Timer;
|
||||
@@ -64,20 +64,20 @@ struct TRINITY_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
//Despawn Time Keeper
|
||||
if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == C_TIME_KEEPER)
|
||||
{
|
||||
if (m_creature->IsWithinDistInMap(who,20.0f))
|
||||
{
|
||||
DoScriptText(SAY_BANISH, m_creature);
|
||||
m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
}
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
//Despawn Time Keeper
|
||||
if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == C_TIME_KEEPER)
|
||||
{
|
||||
if (m_creature->IsWithinDistInMap(who,20.0f))
|
||||
{
|
||||
DoScriptText(SAY_BANISH, m_creature);
|
||||
m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
}
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
@@ -92,8 +92,8 @@ struct TRINITY_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_RIFT,SPECIAL);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_RIFT,SPECIAL);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -39,15 +39,15 @@ EndScriptData */
|
||||
|
||||
struct TRINITY_DLL_DECL boss_temporusAI : public ScriptedAI
|
||||
{
|
||||
boss_temporusAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
boss_temporusAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
bool HeroicMode;
|
||||
ScriptedInstance *pInstance;
|
||||
bool HeroicMode;
|
||||
|
||||
uint32 Haste_Timer;
|
||||
uint32 SpellReflection_Timer;
|
||||
@@ -79,8 +79,8 @@ struct TRINITY_DLL_DECL boss_temporusAI : public ScriptedAI
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_RIFT,SPECIAL);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_RIFT,SPECIAL);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
@@ -88,9 +88,9 @@ struct TRINITY_DLL_DECL boss_temporusAI : public ScriptedAI
|
||||
//Despawn Time Keeper
|
||||
if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == C_TIME_KEEPER)
|
||||
{
|
||||
if (m_creature->IsWithinDistInMap(who,20.0f))
|
||||
if (m_creature->IsWithinDistInMap(who,20.0f))
|
||||
{
|
||||
DoScriptText(SAY_BANISH, m_creature);
|
||||
DoScriptText(SAY_BANISH, m_creature);
|
||||
|
||||
m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
|
||||
@@ -56,293 +56,293 @@ EndContentData */
|
||||
|
||||
struct TRINITY_DLL_DECL npc_medivh_bmAI : public ScriptedAI
|
||||
{
|
||||
npc_medivh_bmAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
npc_medivh_bmAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
uint32 SpellCorrupt_Timer;
|
||||
uint32 Check_Timer;
|
||||
uint32 SpellCorrupt_Timer;
|
||||
uint32 Check_Timer;
|
||||
|
||||
bool Life75;
|
||||
bool Life50;
|
||||
bool Life25;
|
||||
bool Life75;
|
||||
bool Life50;
|
||||
bool Life25;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SpellCorrupt_Timer = 0;
|
||||
void Reset()
|
||||
{
|
||||
SpellCorrupt_Timer = 0;
|
||||
|
||||
if (!pInstance)
|
||||
return;
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
m_creature->CastSpell(m_creature,SPELL_CHANNEL,true);
|
||||
else if (m_creature->HasAura(SPELL_CHANNEL,0))
|
||||
m_creature->RemoveAura(SPELL_CHANNEL,0);
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
m_creature->CastSpell(m_creature,SPELL_CHANNEL,true);
|
||||
else if (m_creature->HasAura(SPELL_CHANNEL,0))
|
||||
m_creature->RemoveAura(SPELL_CHANNEL,0);
|
||||
|
||||
m_creature->CastSpell(m_creature,SPELL_PORTAL_RUNE,true);
|
||||
}
|
||||
m_creature->CastSpell(m_creature,SPELL_PORTAL_RUNE,true);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
return;
|
||||
if (who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
return;
|
||||
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
pInstance->SetData(TYPE_MEDIVH,IN_PROGRESS);
|
||||
m_creature->CastSpell(m_creature,SPELL_CHANNEL,false);
|
||||
Check_Timer = 5000;
|
||||
}
|
||||
else if (who->GetTypeId() == TYPEID_UNIT && m_creature->IsWithinDistInMap(who, 15.0f))
|
||||
{
|
||||
if (pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
||||
return;
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
pInstance->SetData(TYPE_MEDIVH,IN_PROGRESS);
|
||||
m_creature->CastSpell(m_creature,SPELL_CHANNEL,false);
|
||||
Check_Timer = 5000;
|
||||
}
|
||||
else if (who->GetTypeId() == TYPEID_UNIT && m_creature->IsWithinDistInMap(who, 15.0f))
|
||||
{
|
||||
if (pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
||||
return;
|
||||
|
||||
uint32 entry = who->GetEntry();
|
||||
if (entry == C_ASSAS || entry == C_WHELP || entry == C_CHRON || entry == C_EXECU || entry == C_VANQU)
|
||||
{
|
||||
who->StopMoving();
|
||||
who->CastSpell(m_creature,SPELL_CORRUPT,false);
|
||||
}
|
||||
else if (entry == C_AEONUS)
|
||||
{
|
||||
who->StopMoving();
|
||||
who->CastSpell(m_creature,SPELL_CORRUPT_AEONUS,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
uint32 entry = who->GetEntry();
|
||||
if (entry == C_ASSAS || entry == C_WHELP || entry == C_CHRON || entry == C_EXECU || entry == C_VANQU)
|
||||
{
|
||||
who->StopMoving();
|
||||
who->CastSpell(m_creature,SPELL_CORRUPT,false);
|
||||
}
|
||||
else if (entry == C_AEONUS)
|
||||
{
|
||||
who->StopMoving();
|
||||
who->CastSpell(m_creature,SPELL_CORRUPT_AEONUS,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit *who)
|
||||
{
|
||||
//if (pInstance && pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
//return;
|
||||
void AttackStart(Unit *who)
|
||||
{
|
||||
//if (pInstance && pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
//return;
|
||||
|
||||
//ScriptedAI::AttackStart(who);
|
||||
}
|
||||
//ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) {}
|
||||
void Aggro(Unit *who) {}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellEntry* spell)
|
||||
{
|
||||
if (SpellCorrupt_Timer)
|
||||
return;
|
||||
void SpellHit(Unit* caster, const SpellEntry* spell)
|
||||
{
|
||||
if (SpellCorrupt_Timer)
|
||||
return;
|
||||
|
||||
if (spell->Id == SPELL_CORRUPT_AEONUS)
|
||||
SpellCorrupt_Timer = 1000;
|
||||
if (spell->Id == SPELL_CORRUPT_AEONUS)
|
||||
SpellCorrupt_Timer = 1000;
|
||||
|
||||
if (spell->Id == SPELL_CORRUPT)
|
||||
SpellCorrupt_Timer = 3000;
|
||||
}
|
||||
if (spell->Id == SPELL_CORRUPT)
|
||||
SpellCorrupt_Timer = 3000;
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if (Killer->GetEntry() == m_creature->GetEntry())
|
||||
return;
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if (Killer->GetEntry() == m_creature->GetEntry())
|
||||
return;
|
||||
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
}
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
if (SpellCorrupt_Timer)
|
||||
{
|
||||
if (SpellCorrupt_Timer < diff)
|
||||
{
|
||||
pInstance->SetData(TYPE_MEDIVH,SPECIAL);
|
||||
if (SpellCorrupt_Timer)
|
||||
{
|
||||
if (SpellCorrupt_Timer < diff)
|
||||
{
|
||||
pInstance->SetData(TYPE_MEDIVH,SPECIAL);
|
||||
|
||||
if (m_creature->HasAura(SPELL_CORRUPT_AEONUS,0))
|
||||
SpellCorrupt_Timer = 1000;
|
||||
else if (m_creature->HasAura(SPELL_CORRUPT,0))
|
||||
SpellCorrupt_Timer = 3000;
|
||||
else
|
||||
SpellCorrupt_Timer = 0;
|
||||
}else SpellCorrupt_Timer -= diff;
|
||||
}
|
||||
if (m_creature->HasAura(SPELL_CORRUPT_AEONUS,0))
|
||||
SpellCorrupt_Timer = 1000;
|
||||
else if (m_creature->HasAura(SPELL_CORRUPT,0))
|
||||
SpellCorrupt_Timer = 3000;
|
||||
else
|
||||
SpellCorrupt_Timer = 0;
|
||||
}else SpellCorrupt_Timer -= diff;
|
||||
}
|
||||
|
||||
if (Check_Timer)
|
||||
{
|
||||
if (Check_Timer < diff)
|
||||
{
|
||||
uint32 pct = pInstance->GetData(DATA_SHIELD);
|
||||
if (Check_Timer)
|
||||
{
|
||||
if (Check_Timer < diff)
|
||||
{
|
||||
uint32 pct = pInstance->GetData(DATA_SHIELD);
|
||||
|
||||
Check_Timer = 5000;
|
||||
Check_Timer = 5000;
|
||||
|
||||
if (Life25 && pct <= 25)
|
||||
{
|
||||
DoScriptText(SAY_WEAK25, m_creature);
|
||||
Life25 = false;
|
||||
Check_Timer = 0;
|
||||
}
|
||||
else if (Life50 && pct <= 50)
|
||||
{
|
||||
DoScriptText(SAY_WEAK50, m_creature);
|
||||
Life50 = false;
|
||||
}
|
||||
else if (Life75 && pct <= 75)
|
||||
{
|
||||
DoScriptText(SAY_WEAK75, m_creature);
|
||||
Life75 = false;
|
||||
}
|
||||
if (Life25 && pct <= 25)
|
||||
{
|
||||
DoScriptText(SAY_WEAK25, m_creature);
|
||||
Life25 = false;
|
||||
Check_Timer = 0;
|
||||
}
|
||||
else if (Life50 && pct <= 50)
|
||||
{
|
||||
DoScriptText(SAY_WEAK50, m_creature);
|
||||
Life50 = false;
|
||||
}
|
||||
else if (Life75 && pct <= 75)
|
||||
{
|
||||
DoScriptText(SAY_WEAK75, m_creature);
|
||||
Life75 = false;
|
||||
}
|
||||
|
||||
//if we reach this it means event was running but at some point reset.
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == NOT_STARTED)
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->RemoveCorpse();
|
||||
m_creature->Respawn();
|
||||
return;
|
||||
}
|
||||
//if we reach this it means event was running but at some point reset.
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == NOT_STARTED)
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->RemoveCorpse();
|
||||
m_creature->Respawn();
|
||||
return;
|
||||
}
|
||||
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == DONE)
|
||||
{
|
||||
DoScriptText(SAY_WIN, m_creature);
|
||||
Check_Timer = 0;
|
||||
//TODO: start the post-event here
|
||||
}
|
||||
}else Check_Timer -= diff;
|
||||
}
|
||||
if (pInstance->GetData(TYPE_MEDIVH) == DONE)
|
||||
{
|
||||
DoScriptText(SAY_WIN, m_creature);
|
||||
Check_Timer = 0;
|
||||
//TODO: start the post-event here
|
||||
}
|
||||
}else Check_Timer -= diff;
|
||||
}
|
||||
|
||||
//if (!UpdateVictim())
|
||||
//return;
|
||||
//if (!UpdateVictim())
|
||||
//return;
|
||||
|
||||
//DoMeleeAttackIfReady();
|
||||
}
|
||||
//DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_medivh_bm(Creature *_Creature)
|
||||
{
|
||||
return new npc_medivh_bmAI (_Creature);
|
||||
return new npc_medivh_bmAI (_Creature);
|
||||
}
|
||||
|
||||
struct Wave
|
||||
{
|
||||
uint32 PortalMob[4]; //spawns for portal waves (in order)
|
||||
uint32 PortalMob[4]; //spawns for portal waves (in order)
|
||||
};
|
||||
|
||||
static Wave PortalWaves[]=
|
||||
{
|
||||
{C_ASSAS, C_WHELP, C_CHRON, 0},
|
||||
{C_EXECU, C_CHRON, C_WHELP, C_ASSAS},
|
||||
{C_EXECU, C_VANQU, C_CHRON, C_ASSAS}
|
||||
{C_ASSAS, C_WHELP, C_CHRON, 0},
|
||||
{C_EXECU, C_CHRON, C_WHELP, C_ASSAS},
|
||||
{C_EXECU, C_VANQU, C_CHRON, C_ASSAS}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_time_riftAI : public ScriptedAI
|
||||
{
|
||||
npc_time_riftAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
npc_time_riftAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
uint32 TimeRiftWave_Timer;
|
||||
uint8 mRiftWaveCount;
|
||||
uint8 mPortalCount;
|
||||
uint8 mWaveId;
|
||||
uint32 TimeRiftWave_Timer;
|
||||
uint8 mRiftWaveCount;
|
||||
uint8 mPortalCount;
|
||||
uint8 mWaveId;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
void Reset()
|
||||
{
|
||||
|
||||
TimeRiftWave_Timer = 15000;
|
||||
mRiftWaveCount = 0;
|
||||
TimeRiftWave_Timer = 15000;
|
||||
mRiftWaveCount = 0;
|
||||
|
||||
if (!pInstance)
|
||||
return;
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
mPortalCount = pInstance->GetData(DATA_PORTAL_COUNT);
|
||||
mPortalCount = pInstance->GetData(DATA_PORTAL_COUNT);
|
||||
|
||||
if (mPortalCount < 6)
|
||||
mWaveId = 0;
|
||||
else if (mPortalCount > 12)
|
||||
mWaveId = 2;
|
||||
else mWaveId = 1;
|
||||
if (mPortalCount < 6)
|
||||
mWaveId = 0;
|
||||
else if (mPortalCount > 12)
|
||||
mWaveId = 2;
|
||||
else mWaveId = 1;
|
||||
|
||||
}
|
||||
void Aggro(Unit *who) {}
|
||||
}
|
||||
void Aggro(Unit *who) {}
|
||||
|
||||
void DoSummonAtRift(uint32 creature_entry)
|
||||
{
|
||||
if (!creature_entry)
|
||||
return;
|
||||
void DoSummonAtRift(uint32 creature_entry)
|
||||
{
|
||||
if (!creature_entry)
|
||||
return;
|
||||
|
||||
if (pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
m_creature->RemoveAllAuras();
|
||||
return;
|
||||
}
|
||||
if (pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
m_creature->RemoveAllAuras();
|
||||
return;
|
||||
}
|
||||
|
||||
float x,y,z;
|
||||
m_creature->GetRandomPoint(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),10.0f,x,y,z);
|
||||
float x,y,z;
|
||||
m_creature->GetRandomPoint(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),10.0f,x,y,z);
|
||||
|
||||
//normalize Z-level if we can, if rift is not at ground level.
|
||||
z = std::max(m_creature->GetMap()->GetHeight(x, y, MAX_HEIGHT), m_creature->GetMap()->GetWaterLevel(x, y));
|
||||
//normalize Z-level if we can, if rift is not at ground level.
|
||||
z = std::max(m_creature->GetMap()->GetHeight(x, y, MAX_HEIGHT), m_creature->GetMap()->GetWaterLevel(x, y));
|
||||
|
||||
Unit *Summon = m_creature->SummonCreature(creature_entry,x,y,z,m_creature->GetOrientation(),
|
||||
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000);
|
||||
Unit *Summon = m_creature->SummonCreature(creature_entry,x,y,z,m_creature->GetOrientation(),
|
||||
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000);
|
||||
|
||||
if (Summon)
|
||||
{
|
||||
if (Unit *temp = Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_MEDIVH)))
|
||||
Summon->AddThreat(temp,0.0f);
|
||||
}
|
||||
}
|
||||
if (Summon)
|
||||
{
|
||||
if (Unit *temp = Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_MEDIVH)))
|
||||
Summon->AddThreat(temp,0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void DoSelectSummon()
|
||||
{
|
||||
uint32 entry = 0;
|
||||
void DoSelectSummon()
|
||||
{
|
||||
uint32 entry = 0;
|
||||
|
||||
if ((mRiftWaveCount > 2 && mWaveId < 1) || mRiftWaveCount > 3)
|
||||
mRiftWaveCount = 0;
|
||||
if ((mRiftWaveCount > 2 && mWaveId < 1) || mRiftWaveCount > 3)
|
||||
mRiftWaveCount = 0;
|
||||
|
||||
entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount];
|
||||
debug_log("SD2: npc_time_rift: summoning wave creature (Wave %u, Entry %u).",mRiftWaveCount,entry);
|
||||
entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount];
|
||||
debug_log("SD2: npc_time_rift: summoning wave creature (Wave %u, Entry %u).",mRiftWaveCount,entry);
|
||||
|
||||
++mRiftWaveCount;
|
||||
++mRiftWaveCount;
|
||||
|
||||
if (entry == C_WHELP)
|
||||
{
|
||||
for(uint8 i = 0; i < 3; i++)
|
||||
DoSummonAtRift(entry);
|
||||
}else DoSummonAtRift(entry);
|
||||
}
|
||||
if (entry == C_WHELP)
|
||||
{
|
||||
for(uint8 i = 0; i < 3; i++)
|
||||
DoSummonAtRift(entry);
|
||||
}else DoSummonAtRift(entry);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
if (TimeRiftWave_Timer < diff)
|
||||
{
|
||||
DoSelectSummon();
|
||||
TimeRiftWave_Timer = 15000;
|
||||
}else TimeRiftWave_Timer -= diff;
|
||||
if (TimeRiftWave_Timer < diff)
|
||||
{
|
||||
DoSelectSummon();
|
||||
TimeRiftWave_Timer = 15000;
|
||||
}else TimeRiftWave_Timer -= diff;
|
||||
|
||||
if (m_creature->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
if (m_creature->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
debug_log("SD2: npc_time_rift: not casting anylonger, i need to die.");
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
debug_log("SD2: npc_time_rift: not casting anylonger, i need to die.");
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
|
||||
pInstance->SetData(TYPE_RIFT,SPECIAL);
|
||||
}
|
||||
pInstance->SetData(TYPE_RIFT,SPECIAL);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_time_rift(Creature *_Creature)
|
||||
{
|
||||
return new npc_time_riftAI (_Creature);
|
||||
return new npc_time_riftAI (_Creature);
|
||||
}
|
||||
|
||||
#define SAY_SAAT_WELCOME -1269019
|
||||
@@ -402,4 +402,4 @@ void AddSC_dark_portal()
|
||||
newscript->pGossipHello = &GossipHello_npc_saat;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_saat;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -379,4 +379,4 @@ void AddSC_instance_dark_portal()
|
||||
newscript->Name = "instance_dark_portal";
|
||||
newscript->GetInstanceData = &GetInstanceData_instance_dark_portal;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ struct TRINITY_DLL_DECL mob_doomfire_targettingAI : public ScriptedAI
|
||||
|| who->GetEntry() == CREATURE_DOOMFIRE || who->GetEntry() == CREATURE_DOOMFIRE_TARGETING || !who->isTargetableForAttack())
|
||||
return;
|
||||
|
||||
m_creature->AddThreat(who, 0.0f);
|
||||
m_creature->AddThreat(who, 0.0f);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit *done_by, uint32 &damage) { damage = 0; }
|
||||
@@ -397,9 +397,9 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_SLAY3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_SLAY3, m_creature); break;
|
||||
}
|
||||
|
||||
if(victim && (victim->GetTypeId() == TYPEID_PLAYER))
|
||||
@@ -433,7 +433,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_ARCHIMONDEEVENT, DONE);
|
||||
@@ -493,9 +493,9 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI
|
||||
Doomfire->AI()->AttackStart(target);
|
||||
|
||||
if(rand()%2 == 0)
|
||||
DoScriptText(SAY_DOOMFIRE1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_DOOMFIRE2, m_creature);
|
||||
DoScriptText(SAY_DOOMFIRE1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_DOOMFIRE2, m_creature);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,13 +589,13 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
Enraged = true;
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
}
|
||||
}else EnrageTimer -= diff;
|
||||
|
||||
if(CheckDistanceTimer < diff)
|
||||
{
|
||||
// To simplify the check, we simply summon a creature in the location and then check how far we are from the creature
|
||||
{
|
||||
// To simplify the check, we simply summon a creature in the location and then check how far we are from the creature
|
||||
Creature* Check = m_creature->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 2000);
|
||||
if(Check)
|
||||
{
|
||||
@@ -605,7 +605,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
Enraged = true;
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
}
|
||||
}
|
||||
CheckDistanceTimer = 5000;
|
||||
@@ -618,7 +618,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI
|
||||
{
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
//all members of raid must get this buff
|
||||
//all members of raid must get this buff
|
||||
DoCast(m_creature->getVictim(), SPELL_PROTECTION_OF_ELUNE);
|
||||
HasProtected = true;
|
||||
Enraged = true;
|
||||
@@ -666,9 +666,9 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI
|
||||
if(AirBurstTimer < diff)
|
||||
{
|
||||
if(rand()%2 == 0)
|
||||
DoScriptText(SAY_AIR_BURST1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_AIR_BURST2, m_creature);
|
||||
DoScriptText(SAY_AIR_BURST1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_AIR_BURST2, m_creature);
|
||||
|
||||
|
||||
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_AIR_BURST);
|
||||
|
||||
@@ -134,13 +134,13 @@ bool GossipHello_npc_thrall(Player *player, Creature *_Creature)
|
||||
{
|
||||
hyjalAI* ai = ((hyjalAI*)_Creature->AI());
|
||||
|
||||
if (ai->EventBegun)
|
||||
return false;
|
||||
if (ai->EventBegun)
|
||||
return false;
|
||||
|
||||
uint32 AnetheronEvent = ai->GetInstanceData(DATA_ANETHERONEVENT);
|
||||
|
||||
// Only let them start the Horde phases if Anetheron is dead.
|
||||
if (AnetheronEvent == DONE)
|
||||
// Only let them start the Horde phases if Anetheron is dead.
|
||||
if (AnetheronEvent == DONE)
|
||||
{
|
||||
uint32 KazrogalEvent = ai->GetInstanceData(DATA_KAZROGALEVENT);
|
||||
uint32 AzgalorEvent = ai->GetInstanceData(DATA_AZGALOREVENT);
|
||||
@@ -187,37 +187,37 @@ bool GossipSelect_npc_thrall(Player *player, Creature *_Creature, uint32 sender,
|
||||
|
||||
CreatureAI* GetAI_npc_tyrande_whisperwind(Creature *_Creature)
|
||||
{
|
||||
hyjalAI* ai = new hyjalAI(_Creature);
|
||||
ai->Reset();
|
||||
ai->EnterEvadeMode();
|
||||
hyjalAI* ai = new hyjalAI(_Creature);
|
||||
ai->Reset();
|
||||
ai->EnterEvadeMode();
|
||||
|
||||
return ai;
|
||||
return ai;
|
||||
}
|
||||
|
||||
bool GossipHello_npc_tyrande_whisperwind(Player* player, Creature* _Creature)
|
||||
{
|
||||
hyjalAI* ai = ((hyjalAI*)_Creature->AI());
|
||||
uint32 AzgalorEvent = ai->GetInstanceData(DATA_AZGALOREVENT);
|
||||
hyjalAI* ai = ((hyjalAI*)_Creature->AI());
|
||||
uint32 AzgalorEvent = ai->GetInstanceData(DATA_AZGALOREVENT);
|
||||
|
||||
// Only let them get item if Azgalor is dead.
|
||||
if (AzgalorEvent == DONE && !player->HasItemCount(ITEM_TEAR_OF_GODDESS,1))
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_TYRANDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
player->SEND_GOSSIP_MENU(907, _Creature->GetGUID());
|
||||
return true;
|
||||
// Only let them get item if Azgalor is dead.
|
||||
if (AzgalorEvent == DONE && !player->HasItemCount(ITEM_TEAR_OF_GODDESS,1))
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_TYRANDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
player->SEND_GOSSIP_MENU(907, _Creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_tyrande_whisperwind(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_TEAR_OF_GODDESS, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
player->StoreNewItem(dest, ITEM_TEAR_OF_GODDESS, true);
|
||||
}
|
||||
player->SEND_GOSSIP_MENU(907, _Creature->GetGUID());
|
||||
}
|
||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_TEAR_OF_GODDESS, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
player->StoreNewItem(dest, ITEM_TEAR_OF_GODDESS, true);
|
||||
}
|
||||
player->SEND_GOSSIP_MENU(907, _Creature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -244,6 +244,6 @@ void AddSC_hyjal()
|
||||
newscript->Name = "npc_tyrande_whisperwind";
|
||||
newscript->pGossipHello = &GossipHello_npc_tyrande_whisperwind;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_tyrande_whisperwind;
|
||||
newscript->GetAI = &GetAI_npc_tyrande_whisperwind;
|
||||
newscript->GetAI = &GetAI_npc_tyrande_whisperwind;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ float HordeBase[4][3]=
|
||||
float AttackArea[2][3]=
|
||||
{
|
||||
{5042.9189, -1776.2562, 1323.0621}, // Alliance
|
||||
{5510.4815, -2676.7112, 1480.4314} // Horde
|
||||
{5510.4815, -2676.7112, 1480.4314} // Horde
|
||||
};
|
||||
|
||||
hyjalAI::hyjalAI(Creature *c) : ScriptedAI(c)
|
||||
@@ -78,9 +78,9 @@ void hyjalAI::Reset()
|
||||
DoCast(m_creature, SPELL_BRILLIANCE_AURA, true);
|
||||
break;
|
||||
|
||||
case 17852:
|
||||
Faction = 1;
|
||||
break;
|
||||
case 17852:
|
||||
Faction = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
//Bools
|
||||
@@ -89,7 +89,7 @@ void hyjalAI::Reset()
|
||||
SecondBossDead = false;
|
||||
Summon = false;
|
||||
bRetreat = false;
|
||||
Debug = false;
|
||||
Debug = false;
|
||||
|
||||
//Flags
|
||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
@@ -132,7 +132,7 @@ void hyjalAI::EnterEvadeMode()
|
||||
if(m_creature->isAlive())
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
|
||||
InCombat = false;
|
||||
}
|
||||
@@ -161,12 +161,12 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
|
||||
Creature* pCreature = m_creature->SummonCreature(entry, SpawnLoc[0], SpawnLoc[1], SpawnLoc[2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
||||
if(pCreature)
|
||||
{
|
||||
// Increment Enemy Count to be used in World States and instance script
|
||||
++EnemyCount;
|
||||
// Increment Enemy Count to be used in World States and instance script
|
||||
++EnemyCount;
|
||||
|
||||
pCreature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
pCreature->GetMotionMaster()->MovePoint(0, AttackLoc[0],AttackLoc[1],AttackLoc[2]);
|
||||
pCreature->AddThreat(m_creature, 0.0f);
|
||||
pCreature->AddThreat(m_creature, 0.0f);
|
||||
DoZoneInCombat(pCreature);
|
||||
|
||||
// Check if creature is a boss.
|
||||
@@ -181,9 +181,9 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
|
||||
|
||||
void hyjalAI::SummonNextWave(Wave wave[18], uint32 Count, float Base[4][3])
|
||||
{
|
||||
// 1 in 4 chance we give a rally yell. Not sure if the chance is offilike.
|
||||
if (rand()%4 == 0)
|
||||
Talk(RALLY);
|
||||
// 1 in 4 chance we give a rally yell. Not sure if the chance is offilike.
|
||||
if (rand()%4 == 0)
|
||||
Talk(RALLY);
|
||||
|
||||
if(!pInstance)
|
||||
{
|
||||
@@ -278,18 +278,18 @@ void hyjalAI::Talk(uint32 id)
|
||||
|
||||
uint8 ind = *(index.begin()) + rand()%index.size();
|
||||
|
||||
int32 YellId = 0;
|
||||
int32 YellId = 0;
|
||||
if(Faction == 0) // Alliance
|
||||
{
|
||||
YellId = JainaQuotes[ind].textid;
|
||||
YellId = JainaQuotes[ind].textid;
|
||||
}
|
||||
else if(Faction == 1) // Horde
|
||||
{
|
||||
YellId = ThrallQuotes[ind].textid;
|
||||
YellId = ThrallQuotes[ind].textid;
|
||||
}
|
||||
|
||||
if (YellId)
|
||||
DoScriptText(YellId, m_creature);
|
||||
DoScriptText(YellId, m_creature);
|
||||
}
|
||||
|
||||
void hyjalAI::UpdateWorldState(uint32 id, uint32 state)
|
||||
@@ -366,20 +366,20 @@ void hyjalAI::Retreat()
|
||||
void hyjalAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(bRetreat)
|
||||
{
|
||||
{
|
||||
if(RetreatTimer < diff)
|
||||
{
|
||||
bRetreat = false;
|
||||
if(CreatureList.empty())
|
||||
return;
|
||||
{
|
||||
bRetreat = false;
|
||||
if(CreatureList.empty())
|
||||
return;
|
||||
|
||||
for(std::list<uint64>::iterator itr = CreatureList.begin(); itr != CreatureList.end(); ++itr)
|
||||
if(Unit* pUnit = Unit::GetUnit(*m_creature, *itr))
|
||||
pUnit->SetVisibility(VISIBILITY_OFF);
|
||||
for(std::list<uint64>::iterator itr = CreatureList.begin(); itr != CreatureList.end(); ++itr)
|
||||
if(Unit* pUnit = Unit::GetUnit(*m_creature, *itr))
|
||||
pUnit->SetVisibility(VISIBILITY_OFF);
|
||||
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
}else RetreatTimer -= diff;
|
||||
}
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
}else RetreatTimer -= diff;
|
||||
}
|
||||
|
||||
if(!EventBegun)
|
||||
return;
|
||||
|
||||
@@ -45,8 +45,8 @@ struct Wave
|
||||
};
|
||||
|
||||
static Wave AllianceWaves[]= // Waves that will be summoned in the Alliance Base
|
||||
{ // Rage Winterchill Wave 1-8
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, 0, 0, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{ // Rage Winterchill Wave 1-8
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, 0, 0, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
@@ -55,8 +55,8 @@ static Wave AllianceWaves[]= // Waves that will b
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 180000, false},
|
||||
// All 8 Waves are summoned, summon Rage Winterchill, next few waves are for Anetheron
|
||||
{RAGE_WINTERCHILL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true},
|
||||
// Anetheron Wave 1-8
|
||||
{RAGE_WINTERCHILL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true},
|
||||
// Anetheron Wave 1-8
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, 0, 0, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
@@ -66,11 +66,11 @@ static Wave AllianceWaves[]= // Waves that will b
|
||||
{CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, BANSHEE, BANSHEE, BANSHEE, BANSHEE, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 180000, false},
|
||||
// All 8 Waves are summoned, summon Anatheron
|
||||
{ANETHERON, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true}
|
||||
{ANETHERON, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true}
|
||||
};
|
||||
|
||||
static Wave HordeWaves[]= // Waves that are summoned in the Horde base
|
||||
{ // Kaz'Rogal Wave 1-8
|
||||
{ // Kaz'Rogal Wave 1-8
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 120000, false},
|
||||
@@ -80,8 +80,8 @@ static Wave HordeWaves[]= // Waves that are su
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, NECROMANCER, FROST_WYRM, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, BANSHEE, BANSHEE, 180000, false},
|
||||
// All 8 Waves are summoned, summon Kaz'Rogal, next few waves are for Azgalor
|
||||
{KAZROGAL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true},
|
||||
// Azgalor Wave 1-8
|
||||
{KAZROGAL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true},
|
||||
// Azgalor Wave 1-8
|
||||
{ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, FROST_WYRM, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, GARGOYLE, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GHOUL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, 0, 0, 0, 0, 120000, false},
|
||||
@@ -90,7 +90,7 @@ static Wave HordeWaves[]= // Waves that are su
|
||||
{NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, NECROMANCER, BANSHEE, BANSHEE, BANSHEE, BANSHEE, BANSHEE, BANSHEE, 0, 0, 0, 0, 120000, false},
|
||||
{GHOUL, GHOUL, CRYPT_FIEND, CRYPT_FIEND, FEL_STALKER, FEL_STALKER, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, GIANT_INFERNAL, 0, 0, 0, 0, 0, 0, 120000, false},
|
||||
{CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, CRYPT_FIEND, FEL_STALKER, FEL_STALKER, ABOMINATION, ABOMINATION, ABOMINATION, ABOMINATION, BANSHEE, BANSHEE, BANSHEE, BANSHEE, NECROMANCER, NECROMANCER, 0, 0, 180000, false},
|
||||
// All 8 Waves are summoned, summon Azgalor
|
||||
// All 8 Waves are summoned, summon Azgalor
|
||||
{AZGALOR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true}
|
||||
};
|
||||
|
||||
@@ -104,7 +104,7 @@ enum TargetType // Used in the spell
|
||||
struct Yells
|
||||
{
|
||||
uint32 id; // Used to determine the type of yell (attack, rally, etc)
|
||||
int32 textid; // The text id to be yelled
|
||||
int32 textid; // The text id to be yelled
|
||||
};
|
||||
|
||||
enum YellId
|
||||
@@ -120,28 +120,28 @@ enum YellId
|
||||
|
||||
static Yells JainaQuotes[]=
|
||||
{
|
||||
{ATTACKED, -1534000},
|
||||
{ATTACKED, -1534001},
|
||||
{INCOMING, -1534002},
|
||||
{BEGIN, -1534003},
|
||||
{RALLY, -1534004},
|
||||
{RALLY, -1534005},
|
||||
{FAILURE, -1534006},
|
||||
{SUCCESS, -1534007},
|
||||
{DEATH, -1534008},
|
||||
{ATTACKED, -1534000},
|
||||
{ATTACKED, -1534001},
|
||||
{INCOMING, -1534002},
|
||||
{BEGIN, -1534003},
|
||||
{RALLY, -1534004},
|
||||
{RALLY, -1534005},
|
||||
{FAILURE, -1534006},
|
||||
{SUCCESS, -1534007},
|
||||
{DEATH, -1534008},
|
||||
};
|
||||
|
||||
static Yells ThrallQuotes[]=
|
||||
{
|
||||
{ATTACKED, -1534009},
|
||||
{ATTACKED, -1534010},
|
||||
{INCOMING, -1534011},
|
||||
{BEGIN, -1534012},
|
||||
{RALLY, -1534013},
|
||||
{RALLY, -1534014},
|
||||
{FAILURE, -1534015},
|
||||
{SUCCESS, -1534016},
|
||||
{DEATH, -1534017},
|
||||
{ATTACKED, -1534009},
|
||||
{ATTACKED, -1534010},
|
||||
{INCOMING, -1534011},
|
||||
{BEGIN, -1534012},
|
||||
{RALLY, -1534013},
|
||||
{RALLY, -1534014},
|
||||
{FAILURE, -1534015},
|
||||
{SUCCESS, -1534016},
|
||||
{DEATH, -1534017},
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL hyjalAI : public ScriptedAI
|
||||
|
||||
@@ -124,7 +124,7 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance
|
||||
break;
|
||||
}
|
||||
|
||||
debug_log("SD2: Instance Hyjal: Instance data updated for event %u (Data=%u)",type,data);
|
||||
debug_log("SD2: Instance Hyjal: Instance data updated for event %u (Data=%u)",type,data);
|
||||
|
||||
if(data == DONE)
|
||||
SaveToDB();
|
||||
@@ -162,8 +162,8 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
std::ostringstream stream;
|
||||
stream << Encounters[0] << " " << Encounters[1] << " " << Encounters[2] << " "
|
||||
<< Encounters[3] << " " << Encounters[4];
|
||||
stream << Encounters[0] << " " << Encounters[1] << " " << Encounters[2] << " "
|
||||
<< Encounters[3] << " " << Encounters[4];
|
||||
char* out = new char[stream.str().length() + 1];
|
||||
strcpy(out, stream.str().c_str());
|
||||
if(out)
|
||||
@@ -183,11 +183,11 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
std::istringstream loadStream;
|
||||
loadStream.str(in);
|
||||
loadStream >> Encounters[0] >> Encounters[1] >> Encounters[2] >> Encounters[3] >> Encounters[4];
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
std::istringstream loadStream;
|
||||
loadStream.str(in);
|
||||
loadStream >> Encounters[0] >> Encounters[1] >> Encounters[2] >> Encounters[3] >> Encounters[4];
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if(Encounters[i] == IN_PROGRESS) // Do not load an encounter as IN_PROGRESS - reset it instead.
|
||||
Encounters[i] = NOT_STARTED;
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
|
||||
+6
-6
@@ -31,15 +31,15 @@ EndScriptData */
|
||||
|
||||
bool GOHello_go_barrel_old_hillsbrad(Player *player, GameObject* _GO)
|
||||
{
|
||||
ScriptedInstance* pInstance = (ScriptedInstance*)_GO->GetInstanceData();
|
||||
ScriptedInstance* pInstance = (ScriptedInstance*)_GO->GetInstanceData();
|
||||
|
||||
if (!pInstance)
|
||||
return false;
|
||||
if (!pInstance)
|
||||
return false;
|
||||
|
||||
if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE)
|
||||
return false;
|
||||
if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE)
|
||||
return false;
|
||||
|
||||
pInstance->SetData(TYPE_BARREL_DIVERSION, IN_PROGRESS);
|
||||
pInstance->SetData(TYPE_BARREL_DIVERSION, IN_PROGRESS);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
+51
-51
@@ -56,42 +56,42 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance
|
||||
Encounter[i] = NOT_STARTED;
|
||||
}
|
||||
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
|
||||
debug_log("SD2: Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
}
|
||||
debug_log("SD2: Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void UpdateOHWorldState()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
void UpdateOHWorldState()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* player = itr->getSource())
|
||||
{
|
||||
player->SendUpdateWorldState(WORLD_STATE_OH,mBarrelCount);
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* player = itr->getSource())
|
||||
{
|
||||
player->SendUpdateWorldState(WORLD_STATE_OH,mBarrelCount);
|
||||
|
||||
if (mBarrelCount == 5)
|
||||
player->KilledMonster(LODGE_QUEST_TRIGGER,0);
|
||||
}
|
||||
}
|
||||
}else
|
||||
debug_log("SD2: Instance Old Hillsbrad: UpdateOHWorldState, but PlayerList is empty!");
|
||||
}
|
||||
if (mBarrelCount == 5)
|
||||
player->KilledMonster(LODGE_QUEST_TRIGGER,0);
|
||||
}
|
||||
}
|
||||
}else
|
||||
debug_log("SD2: Instance Old Hillsbrad: UpdateOHWorldState, but PlayerList is empty!");
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature *creature, uint32 creature_entry)
|
||||
{
|
||||
@@ -108,36 +108,36 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
Player *player = GetPlayerInMap();
|
||||
Player *player = GetPlayerInMap();
|
||||
|
||||
if (!player)
|
||||
{
|
||||
debug_log("SD2: Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data);
|
||||
return;
|
||||
}
|
||||
if (!player)
|
||||
{
|
||||
debug_log("SD2: Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any player.", type, data);
|
||||
return;
|
||||
}
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_BARREL_DIVERSION:
|
||||
{
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (mBarrelCount >= 5)
|
||||
return;
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (mBarrelCount >= 5)
|
||||
return;
|
||||
|
||||
++mBarrelCount;
|
||||
UpdateOHWorldState();
|
||||
++mBarrelCount;
|
||||
UpdateOHWorldState();
|
||||
|
||||
debug_log("SD2: Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u",mBarrelCount);
|
||||
debug_log("SD2: Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u",mBarrelCount);
|
||||
|
||||
Encounter[0] = IN_PROGRESS;
|
||||
Encounter[0] = IN_PROGRESS;
|
||||
|
||||
if (mBarrelCount == 5)
|
||||
{
|
||||
player->SummonCreature(DRAKE_ENTRY,2128.43,71.01,64.42,1.74,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000);
|
||||
Encounter[0] = DONE;
|
||||
}
|
||||
}
|
||||
if (mBarrelCount == 5)
|
||||
{
|
||||
player->SummonCreature(DRAKE_ENTRY,2128.43,71.01,64.42,1.74,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000);
|
||||
Encounter[0] = DONE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TYPE_THRALL_EVENT:
|
||||
|
||||
@@ -214,7 +214,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
uint64 TarethaGUID;
|
||||
|
||||
@@ -223,10 +223,10 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
switch( i )
|
||||
switch( i )
|
||||
{
|
||||
case 8:
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
@@ -234,7 +234,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
break;
|
||||
case 9:
|
||||
DoScriptText(SAY_TH_ARMORY, m_creature);
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, THRALL_WEAPON_MODEL);
|
||||
//m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, THRALL_WEAPON_INFO);
|
||||
//m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+1, 781);
|
||||
@@ -297,7 +297,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
//make horsie run off
|
||||
IsOnHold = true;
|
||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
pInstance->SetData(TYPE_THRALL_PART2, DONE);
|
||||
pInstance->SetData(TYPE_THRALL_PART2, DONE);
|
||||
break;
|
||||
case 64:
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
@@ -325,7 +325,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
break;
|
||||
case 91:
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
break;
|
||||
break;
|
||||
case 93:
|
||||
m_creature->SummonCreature(MOB_ENTRY_INN_PROTECTOR,2652.71,660.31,61.93,1.67,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000);
|
||||
m_creature->SummonCreature(MOB_ENTRY_INN_LOOKOUT,2648.96,662.59,61.93,0.79,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000);
|
||||
@@ -334,58 +334,58 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
break;
|
||||
case 94:
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
if (uint64 TarethaGUID = pInstance->GetData64(DATA_TARETHA))
|
||||
{
|
||||
if (Unit* Taretha = Unit::GetUnit((*m_creature), TarethaGUID))
|
||||
DoScriptText(SAY_TA_ESCAPED, Taretha, m_creature);
|
||||
}
|
||||
if (uint64 TarethaGUID = pInstance->GetData64(DATA_TARETHA))
|
||||
{
|
||||
if (Unit* Taretha = Unit::GetUnit((*m_creature), TarethaGUID))
|
||||
DoScriptText(SAY_TA_ESCAPED, Taretha, m_creature);
|
||||
}
|
||||
break;
|
||||
case 95:
|
||||
DoScriptText(SAY_TH_MEET_TARETHA, m_creature);
|
||||
pInstance->SetData(TYPE_THRALL_PART3,DONE);
|
||||
pInstance->SetData(TYPE_THRALL_PART3,DONE);
|
||||
IsOnHold = true;
|
||||
break;
|
||||
case 96:
|
||||
DoScriptText(SAY_TH_EPOCH_WONDER, m_creature);
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
|
||||
break;
|
||||
case 97:
|
||||
DoScriptText(SAY_TH_EPOCH_KILL_TARETHA, m_creature);
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
break;
|
||||
case 98:
|
||||
//trigger epoch Yell("Thrall! Come outside and face your fate! ....")
|
||||
//from here, thrall should not never be allowed to move to point 106 which he currently does.
|
||||
//from here, thrall should not never be allowed to move to point 106 which he currently does.
|
||||
break;
|
||||
case 106:
|
||||
if (!PlayerGUID)
|
||||
break;
|
||||
if (!PlayerGUID)
|
||||
break;
|
||||
|
||||
//trigger taretha to run down outside
|
||||
if (uint64 TarethaGUID = pInstance->GetData64(DATA_TARETHA))
|
||||
{
|
||||
if (Creature* Taretha = ((Creature*)Unit::GetUnit(*m_creature, TarethaGUID)))
|
||||
((npc_escortAI*)(Taretha->AI()))->Start(false, false, true, PlayerGUID);
|
||||
}
|
||||
//trigger taretha to run down outside
|
||||
if (uint64 TarethaGUID = pInstance->GetData64(DATA_TARETHA))
|
||||
{
|
||||
if (Creature* Taretha = ((Creature*)Unit::GetUnit(*m_creature, TarethaGUID)))
|
||||
((npc_escortAI*)(Taretha->AI()))->Start(false, false, true, PlayerGUID);
|
||||
}
|
||||
|
||||
//kill credit creature for quest
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const& players = map->GetPlayers();
|
||||
if (!players.isEmpty() && map->IsDungeon())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* pPlayer = itr->getSource())
|
||||
pPlayer->KilledMonster(20156,m_creature->GetGUID());
|
||||
}
|
||||
}
|
||||
//kill credit creature for quest
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const& players = map->GetPlayers();
|
||||
if (!players.isEmpty() && map->IsDungeon())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* pPlayer = itr->getSource())
|
||||
pPlayer->KilledMonster(20156,m_creature->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
//alot will happen here, thrall and taretha talk, erozion appear at spot to explain
|
||||
m_creature->SummonCreature(EROZION_ENTRY,2646.47,680.416,55.38,4.16,TEMPSUMMON_TIMED_DESPAWN,120000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//alot will happen here, thrall and taretha talk, erozion appear at spot to explain
|
||||
m_creature->SummonCreature(EROZION_ENTRY,2646.47,680.416,55.38,4.16,TEMPSUMMON_TIMED_DESPAWN,120000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Reset()
|
||||
@@ -407,9 +407,9 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_TH_LEAVE_COMBAT1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TH_LEAVE_COMBAT2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_TH_LEAVE_COMBAT3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_TH_LEAVE_COMBAT1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TH_LEAVE_COMBAT2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_TH_LEAVE_COMBAT3, m_creature); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -433,10 +433,10 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
{
|
||||
switch(rand()%4)
|
||||
{
|
||||
case 0: DoScriptText(SAY_TH_RANDOM_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TH_RANDOM_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_TH_RANDOM_AGGRO3, m_creature); break;
|
||||
case 3: DoScriptText(SAY_TH_RANDOM_AGGRO4, m_creature); break;
|
||||
case 0: DoScriptText(SAY_TH_RANDOM_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TH_RANDOM_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_TH_RANDOM_AGGRO3, m_creature); break;
|
||||
case 3: DoScriptText(SAY_TH_RANDOM_AGGRO4, m_creature); break;
|
||||
}
|
||||
if( m_creature->IsMounted() )
|
||||
{
|
||||
@@ -445,45 +445,45 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
switch(summoned->GetEntry())
|
||||
{
|
||||
//TODO: make Scarloc start into event instead, and not start attack directly
|
||||
case MOB_ENTRY_BARN_GUARDSMAN:
|
||||
case MOB_ENTRY_BARN_PROTECTOR:
|
||||
case MOB_ENTRY_BARN_LOOKOUT:
|
||||
case SKARLOC_MOUNT:
|
||||
case EROZION_ENTRY:
|
||||
break;
|
||||
default:
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
switch(summoned->GetEntry())
|
||||
{
|
||||
//TODO: make Scarloc start into event instead, and not start attack directly
|
||||
case MOB_ENTRY_BARN_GUARDSMAN:
|
||||
case MOB_ENTRY_BARN_PROTECTOR:
|
||||
case MOB_ENTRY_BARN_LOOKOUT:
|
||||
case SKARLOC_MOUNT:
|
||||
case EROZION_ENTRY:
|
||||
break;
|
||||
default:
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_TH_RANDOM_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TH_RANDOM_KILL2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_TH_RANDOM_KILL3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_TH_RANDOM_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TH_RANDOM_KILL2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_TH_RANDOM_KILL3, m_creature); break;
|
||||
}
|
||||
}
|
||||
void JustDied(Unit *slayer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_THRALL_EVENT,FAIL);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_THRALL_EVENT,FAIL);
|
||||
|
||||
// Don't do a yell if he kills self (if player goes too far or at the end).
|
||||
// Don't do a yell if he kills self (if player goes too far or at the end).
|
||||
if(slayer == m_creature)
|
||||
return;
|
||||
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_TH_RANDOM_DIE1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TH_RANDOM_DIE2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_TH_RANDOM_DIE1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TH_RANDOM_DIE2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,16 +491,16 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//TODO: add his abilities'n-crap here
|
||||
if( !LowHp && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) )
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_TH_RANDOM_LOW_HP1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TH_RANDOM_LOW_HP2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_TH_RANDOM_LOW_HP1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TH_RANDOM_LOW_HP2, m_creature); break;
|
||||
}
|
||||
LowHp = true;
|
||||
}
|
||||
@@ -666,15 +666,15 @@ CreatureAI* GetAI_npc_thrall_old_hillsbrad(Creature *_Creature)
|
||||
bool GossipHello_npc_thrall_old_hillsbrad(Player *player, Creature *_Creature)
|
||||
{
|
||||
if( _Creature->isQuestGiver() )
|
||||
{
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
player->SendPreparedQuest(_Creature->GetGUID());
|
||||
}
|
||||
{
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
player->SendPreparedQuest(_Creature->GetGUID());
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance = ((ScriptedInstance*)_Creature->GetInstanceData());
|
||||
if( pInstance )
|
||||
{
|
||||
if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE && !pInstance->GetData(TYPE_THRALL_EVENT))
|
||||
if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE && !pInstance->GetData(TYPE_THRALL_EVENT))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM( 0, "[PH] Start walking.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_ID_START, _Creature->GetGUID());
|
||||
@@ -768,10 +768,10 @@ struct TRINITY_DLL_DECL npc_tarethaAI : public npc_escortAI
|
||||
void Reset() {}
|
||||
void Aggro(Unit* who) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_npc_taretha(Creature *_Creature)
|
||||
{
|
||||
@@ -817,15 +817,15 @@ bool GossipSelect_npc_taretha(Player *player, Creature *_Creature, uint32 sender
|
||||
pInstance->SetData(TYPE_THRALL_PART4,IN_PROGRESS);
|
||||
_Creature->SummonCreature(ENTRY_EPOCH,2639.13,698.55,65.43,4.59,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
|
||||
|
||||
if (uint64 ThrallGUID = pInstance->GetData64(DATA_THRALL))
|
||||
{
|
||||
Creature* Thrall = ((Creature*)Unit::GetUnit((*_Creature), ThrallGUID));
|
||||
if(Thrall)
|
||||
((npc_thrall_old_hillsbradAI*)Thrall->AI())->StartWP();
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
if (uint64 ThrallGUID = pInstance->GetData64(DATA_THRALL))
|
||||
{
|
||||
Creature* Thrall = ((Creature*)Unit::GetUnit((*_Creature), ThrallGUID));
|
||||
if(Thrall)
|
||||
((npc_thrall_old_hillsbradAI*)Thrall->AI())->StartWP();
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
@@ -859,6 +859,6 @@ void AddSC_old_hillsbrad()
|
||||
newscript->Name="npc_taretha";
|
||||
newscript->pGossipHello = &GossipHello_npc_taretha;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_taretha;
|
||||
newscript->GetAI = &GetAI_npc_taretha;
|
||||
newscript->GetAI = &GetAI_npc_taretha;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
+243
-243
@@ -42,38 +42,38 @@ EndScriptData */
|
||||
#define SPELL_POWER_OF_CARIBDIS 38451
|
||||
#define SPELL_ENRAGE 24318
|
||||
#define SPELL_SEAR_NOVA 38445
|
||||
#define SPELL_BLESSING_OF_THE_TIDES 38449
|
||||
#define SPELL_BLESSING_OF_THE_TIDES 38449
|
||||
|
||||
//Sharkkis spells
|
||||
#define SPELL_LEECHING_THROW 29436
|
||||
#define SPELL_THE_BEAST_WITHIN 38373
|
||||
#define SPELL_MULTISHOT 38366
|
||||
#define SPELL_SUMMON_FATHOM_LURKER 38433
|
||||
#define SPELL_SUMMON_FATHOM_SPOREBAT 38431
|
||||
#define SPELL_MULTISHOT 38366
|
||||
#define SPELL_SUMMON_FATHOM_LURKER 38433
|
||||
#define SPELL_SUMMON_FATHOM_SPOREBAT 38431
|
||||
#define SPELL_PET_ENRAGE 19574
|
||||
|
||||
//Tidalvess spells
|
||||
#define SPELL_FROST_SHOCK 38234
|
||||
#define SPELL_SPITFIRE_TOTEM 38236
|
||||
#define SPELL_POISON_CLEANSING_TOTEM 38306
|
||||
#define SPELL_POISON_CLEANSING_EFFECT 8167
|
||||
#define SPELL_EARTHBIND_TOTEM 38304
|
||||
#define SPELL_EARTHBIND_TOTEM_EFFECT 6474
|
||||
#define SPELL_WINDFURY_WEAPON 38184
|
||||
#define SPELL_FROST_SHOCK 38234
|
||||
#define SPELL_SPITFIRE_TOTEM 38236
|
||||
#define SPELL_POISON_CLEANSING_TOTEM 38306
|
||||
#define SPELL_POISON_CLEANSING_EFFECT 8167
|
||||
#define SPELL_EARTHBIND_TOTEM 38304
|
||||
#define SPELL_EARTHBIND_TOTEM_EFFECT 6474
|
||||
#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 38330
|
||||
#define SPELL_SUMMON_CYCLONE 38337
|
||||
#define SPELL_CYCLONE_CYCLONE 29538
|
||||
#define SPELL_WATER_BOLT_VOLLEY 38335
|
||||
#define SPELL_TIDAL_SURGE 38358
|
||||
#define SPELL_TIDAL_SURGE_FREEZE 38357
|
||||
#define SPELL_HEAL 38330
|
||||
#define SPELL_SUMMON_CYCLONE 38337
|
||||
#define SPELL_CYCLONE_CYCLONE 29538
|
||||
|
||||
//Yells and Quotes
|
||||
#define SAY_GAIN_BLESSING_OF_TIDES "Your overconfidence will be your undoing! Guards, lend me your strength!"
|
||||
#define SOUND_GAIN_BLESSING_OF_TIDES 11278
|
||||
#define SAY_MISC "Alana be'lendor!" //don't know what use this
|
||||
#define SOUND_MISC 11283
|
||||
#define SAY_GAIN_BLESSING_OF_TIDES "Your overconfidence will be your undoing! Guards, lend me your strength!"
|
||||
#define SOUND_GAIN_BLESSING_OF_TIDES 11278
|
||||
#define SAY_MISC "Alana be'lendor!" //don't know what use this
|
||||
#define SOUND_MISC 11283
|
||||
|
||||
//Summoned Unit GUIDs
|
||||
#define CREATURE_CYCLONE 22104
|
||||
@@ -106,9 +106,9 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
|
||||
|
||||
uint32 CataclysmicBolt_Timer;
|
||||
uint32 Enrage_Timer;
|
||||
uint32 SearNova_Timer;
|
||||
uint32 SearNova_Timer;
|
||||
|
||||
bool BlessingOfTides;
|
||||
bool BlessingOfTides;
|
||||
|
||||
uint64 Advisors[3];
|
||||
|
||||
@@ -116,38 +116,38 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
|
||||
{
|
||||
CataclysmicBolt_Timer = 10000;
|
||||
Enrage_Timer = 600000; //10 minutes
|
||||
SearNova_Timer = 20000+rand()%40000; // 20 - 60 seconds
|
||||
SearNova_Timer = 20000+rand()%40000; // 20 - 60 seconds
|
||||
|
||||
BlessingOfTides = false;
|
||||
BlessingOfTides = false;
|
||||
|
||||
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
uint64 RAdvisors[3];
|
||||
RAdvisors[0] = pInstance->GetData64(DATA_SHARKKIS);
|
||||
RAdvisors[1] = pInstance->GetData64(DATA_TIDALVESS);
|
||||
RAdvisors[2] = pInstance->GetData64(DATA_CARIBDIS);
|
||||
//Respawn of the 3 Advisors
|
||||
Creature* pAdvisor = NULL;
|
||||
for( int i=0; i<3; i++ )
|
||||
if(pInstance)
|
||||
{
|
||||
uint64 RAdvisors[3];
|
||||
RAdvisors[0] = pInstance->GetData64(DATA_SHARKKIS);
|
||||
RAdvisors[1] = pInstance->GetData64(DATA_TIDALVESS);
|
||||
RAdvisors[2] = pInstance->GetData64(DATA_CARIBDIS);
|
||||
//Respawn of the 3 Advisors
|
||||
Creature* pAdvisor = NULL;
|
||||
for( int i=0; i<3; i++ )
|
||||
|
||||
|
||||
if(RAdvisors[i])
|
||||
{
|
||||
pAdvisor = ((Creature*)Unit::GetUnit((*m_creature), RAdvisors[i]));
|
||||
if(pAdvisor && !pAdvisor->isAlive())
|
||||
{
|
||||
pAdvisor->Respawn();
|
||||
pAdvisor->AI()->EnterEvadeMode();
|
||||
pAdvisor->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
}
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
}
|
||||
if(RAdvisors[i])
|
||||
{
|
||||
pAdvisor = ((Creature*)Unit::GetUnit((*m_creature), RAdvisors[i]));
|
||||
if(pAdvisor && !pAdvisor->isAlive())
|
||||
{
|
||||
pAdvisor->Respawn();
|
||||
pAdvisor->AI()->EnterEvadeMode();
|
||||
pAdvisor->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
}
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void EventSharkkisDeath()
|
||||
{
|
||||
@@ -185,7 +185,7 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
|
||||
GetAdvisors();
|
||||
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
DoZoneInCombat();
|
||||
DoZoneInCombat();
|
||||
|
||||
pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
|
||||
@@ -237,10 +237,10 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
|
||||
|
||||
//someone evaded!
|
||||
if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//CataclysmicBolt_Timer
|
||||
if (CataclysmicBolt_Timer < diff)
|
||||
@@ -258,12 +258,12 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
|
||||
CataclysmicBolt_Timer = 10000;
|
||||
}else CataclysmicBolt_Timer -= diff;
|
||||
|
||||
//SearNova_Timer
|
||||
if(SearNova_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SEAR_NOVA);
|
||||
SearNova_Timer = 20000+rand()%40000;
|
||||
}else SearNova_Timer -= diff;
|
||||
//SearNova_Timer
|
||||
if(SearNova_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SEAR_NOVA);
|
||||
SearNova_Timer = 20000+rand()%40000;
|
||||
}else SearNova_Timer -= diff;
|
||||
|
||||
//Enrage_Timer
|
||||
if (Enrage_Timer < diff)
|
||||
@@ -272,32 +272,32 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
|
||||
Enrage_Timer = 90000;
|
||||
}else Enrage_Timer -= diff;
|
||||
|
||||
//Blessing of Tides Trigger
|
||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 75 && !BlessingOfTides)
|
||||
{
|
||||
BlessingOfTides = true;
|
||||
bool continueTriggering;
|
||||
Creature* Advisor;
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
if(Advisors[i])
|
||||
{
|
||||
Advisor = ((Creature*)Unit::GetUnit(*m_creature, Advisors[i]));
|
||||
if(Advisor)
|
||||
{
|
||||
if(Advisor->isAlive())
|
||||
{
|
||||
continueTriggering = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( continueTriggering )
|
||||
{
|
||||
DoCast(m_creature, SPELL_BLESSING_OF_THE_TIDES);
|
||||
DoYell(SAY_GAIN_BLESSING_OF_TIDES, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_GAIN_BLESSING_OF_TIDES);
|
||||
}
|
||||
}
|
||||
//Blessing of Tides Trigger
|
||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 75 && !BlessingOfTides)
|
||||
{
|
||||
BlessingOfTides = true;
|
||||
bool continueTriggering;
|
||||
Creature* Advisor;
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
if(Advisors[i])
|
||||
{
|
||||
Advisor = ((Creature*)Unit::GetUnit(*m_creature, Advisors[i]));
|
||||
if(Advisor)
|
||||
{
|
||||
if(Advisor->isAlive())
|
||||
{
|
||||
continueTriggering = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( continueTriggering )
|
||||
{
|
||||
DoCast(m_creature, SPELL_BLESSING_OF_THE_TIDES);
|
||||
DoYell(SAY_GAIN_BLESSING_OF_TIDES, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_GAIN_BLESSING_OF_TIDES);
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -316,30 +316,30 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
|
||||
|
||||
uint32 LeechingThrow_Timer;
|
||||
uint32 TheBeastWithin_Timer;
|
||||
uint32 Multishot_Timer;
|
||||
uint32 Pet_Timer;
|
||||
uint32 Multishot_Timer;
|
||||
uint32 Pet_Timer;
|
||||
|
||||
bool pet;
|
||||
bool pet;
|
||||
|
||||
uint64 SummonedPet;
|
||||
uint64 SummonedPet;
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
LeechingThrow_Timer = 20000;
|
||||
TheBeastWithin_Timer = 30000;
|
||||
Multishot_Timer = 15000;
|
||||
Pet_Timer = 10000;
|
||||
Multishot_Timer = 15000;
|
||||
Pet_Timer = 10000;
|
||||
|
||||
pet = false;
|
||||
pet = false;
|
||||
|
||||
Creature *Pet = (Creature*) Unit::GetUnit(*m_creature, SummonedPet);
|
||||
if( Pet && Pet->isAlive() )
|
||||
{
|
||||
Pet->DealDamage( Pet, Pet->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false );
|
||||
}
|
||||
Creature *Pet = (Creature*) Unit::GetUnit(*m_creature, SummonedPet);
|
||||
if( Pet && Pet->isAlive() )
|
||||
{
|
||||
Pet->DealDamage( Pet, Pet->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false );
|
||||
}
|
||||
|
||||
SummonedPet = 0;
|
||||
SummonedPet = 0;
|
||||
|
||||
if( pInstance )
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
@@ -354,7 +354,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
|
||||
|
||||
if (Karathress)
|
||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventSharkkisDeath();
|
||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventSharkkisDeath();
|
||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventSharkkisDeath();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -386,10 +386,10 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
|
||||
|
||||
//someone evaded!
|
||||
if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
//LeechingThrow_Timer
|
||||
if(LeechingThrow_Timer < diff)
|
||||
@@ -398,51 +398,51 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
|
||||
LeechingThrow_Timer = 20000;
|
||||
}else LeechingThrow_Timer -= diff;
|
||||
|
||||
//Multishot_Timer
|
||||
if(Multishot_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_MULTISHOT);
|
||||
Multishot_Timer = 20000;
|
||||
}else Multishot_Timer -= diff;
|
||||
//Multishot_Timer
|
||||
if(Multishot_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_MULTISHOT);
|
||||
Multishot_Timer = 20000;
|
||||
}else Multishot_Timer -= diff;
|
||||
|
||||
//TheBeastWithin_Timer
|
||||
if(TheBeastWithin_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_THE_BEAST_WITHIN);
|
||||
Creature *Pet = (Creature*) Unit::GetUnit(*m_creature, SummonedPet);
|
||||
if( Pet && Pet->isAlive() )
|
||||
{
|
||||
Pet->CastSpell( Pet, SPELL_PET_ENRAGE, true );
|
||||
}
|
||||
TheBeastWithin_Timer = 30000;
|
||||
}else TheBeastWithin_Timer -= diff;
|
||||
//TheBeastWithin_Timer
|
||||
if(TheBeastWithin_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_THE_BEAST_WITHIN);
|
||||
Creature *Pet = (Creature*) Unit::GetUnit(*m_creature, SummonedPet);
|
||||
if( Pet && Pet->isAlive() )
|
||||
{
|
||||
Pet->CastSpell( Pet, SPELL_PET_ENRAGE, true );
|
||||
}
|
||||
TheBeastWithin_Timer = 30000;
|
||||
}else TheBeastWithin_Timer -= diff;
|
||||
|
||||
//Pet_Timer
|
||||
if(Pet_Timer < diff && pet == false)
|
||||
{
|
||||
pet = true;
|
||||
//uint32 spell_id;
|
||||
uint32 pet_id;
|
||||
switch( rand()%2 )
|
||||
{
|
||||
case 0:
|
||||
//spell_id = SPELL_SUMMON_FATHOM_LURKER;
|
||||
pet_id = CREATURE_FATHOM_LURKER;
|
||||
break;
|
||||
case 1:
|
||||
//spell_id = SPELL_SUMMON_FATHOM_SPOREBAT;
|
||||
pet_id = CREATURE_FATHOM_SPOREBAT;
|
||||
break;
|
||||
}
|
||||
//DoCast( m_creature, spell_id, true );
|
||||
Creature *Pet = DoSpawnCreature(pet_id,0,0,0,0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000 );
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (Pet && target)
|
||||
{
|
||||
Pet->AI()->AttackStart(target);
|
||||
SummonedPet = Pet->GetGUID();
|
||||
}
|
||||
}else Pet_Timer -= diff;
|
||||
//Pet_Timer
|
||||
if(Pet_Timer < diff && pet == false)
|
||||
{
|
||||
pet = true;
|
||||
//uint32 spell_id;
|
||||
uint32 pet_id;
|
||||
switch( rand()%2 )
|
||||
{
|
||||
case 0:
|
||||
//spell_id = SPELL_SUMMON_FATHOM_LURKER;
|
||||
pet_id = CREATURE_FATHOM_LURKER;
|
||||
break;
|
||||
case 1:
|
||||
//spell_id = SPELL_SUMMON_FATHOM_SPOREBAT;
|
||||
pet_id = CREATURE_FATHOM_SPOREBAT;
|
||||
break;
|
||||
}
|
||||
//DoCast( m_creature, spell_id, true );
|
||||
Creature *Pet = DoSpawnCreature(pet_id,0,0,0,0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000 );
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (Pet && target)
|
||||
{
|
||||
Pet->AI()->AttackStart(target);
|
||||
SummonedPet = Pet->GetGUID();
|
||||
}
|
||||
}else Pet_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -460,16 +460,16 @@ struct TRINITY_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 FrostShock_Timer;
|
||||
uint32 Spitfire_Timer;
|
||||
uint32 PoisonCleansing_Timer;
|
||||
uint32 Earthbind_Timer;
|
||||
uint32 Spitfire_Timer;
|
||||
uint32 PoisonCleansing_Timer;
|
||||
uint32 Earthbind_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
FrostShock_Timer = 25000;
|
||||
Spitfire_Timer = 60000;
|
||||
PoisonCleansing_Timer = 30000;
|
||||
Earthbind_Timer = 45000;
|
||||
Spitfire_Timer = 60000;
|
||||
PoisonCleansing_Timer = 30000;
|
||||
Earthbind_Timer = 45000;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
@@ -483,8 +483,8 @@ struct TRINITY_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI
|
||||
Karathress = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
if(!m_creature->isAlive() && Karathress)
|
||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventTidalvessDeath();
|
||||
if(!m_creature->isAlive() && Karathress)
|
||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventTidalvessDeath();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI
|
||||
pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
|
||||
}
|
||||
DoCast(m_creature, SPELL_WINDFURY_WEAPON);
|
||||
DoCast(m_creature, SPELL_WINDFURY_WEAPON);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -517,15 +517,15 @@ struct TRINITY_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI
|
||||
|
||||
//someone evaded!
|
||||
if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if( !m_creature->HasAura(SPELL_WINDFURY_WEAPON, 0) )
|
||||
{
|
||||
DoCast(m_creature, SPELL_WINDFURY_WEAPON);
|
||||
}
|
||||
if( !m_creature->HasAura(SPELL_WINDFURY_WEAPON, 0) )
|
||||
{
|
||||
DoCast(m_creature, SPELL_WINDFURY_WEAPON);
|
||||
}
|
||||
|
||||
//FrostShock_Timer
|
||||
if (FrostShock_Timer < diff)
|
||||
@@ -534,31 +534,31 @@ struct TRINITY_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI
|
||||
FrostShock_Timer = 25000+rand()%5000;
|
||||
}else FrostShock_Timer -= diff;
|
||||
|
||||
//Spitfire_Timer
|
||||
if(Spitfire_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_SPITFIRE_TOTEM);
|
||||
Unit *SpitfireTotem = Unit::GetUnit( *m_creature, CREATURE_SPITFIRE_TOTEM );
|
||||
if( SpitfireTotem )
|
||||
{
|
||||
((Creature*)SpitfireTotem)->AI()->AttackStart( m_creature->getVictim() );
|
||||
}
|
||||
Spitfire_Timer = 60000;
|
||||
}else Spitfire_Timer -= diff;
|
||||
//Spitfire_Timer
|
||||
if(Spitfire_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_SPITFIRE_TOTEM);
|
||||
Unit *SpitfireTotem = Unit::GetUnit( *m_creature, CREATURE_SPITFIRE_TOTEM );
|
||||
if( SpitfireTotem )
|
||||
{
|
||||
((Creature*)SpitfireTotem)->AI()->AttackStart( m_creature->getVictim() );
|
||||
}
|
||||
Spitfire_Timer = 60000;
|
||||
}else Spitfire_Timer -= diff;
|
||||
|
||||
//PoisonCleansing_Timer
|
||||
if(PoisonCleansing_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_POISON_CLEANSING_TOTEM);
|
||||
PoisonCleansing_Timer = 30000;
|
||||
}else PoisonCleansing_Timer -= diff;
|
||||
//PoisonCleansing_Timer
|
||||
if(PoisonCleansing_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_POISON_CLEANSING_TOTEM);
|
||||
PoisonCleansing_Timer = 30000;
|
||||
}else PoisonCleansing_Timer -= diff;
|
||||
|
||||
//Earthbind_Timer
|
||||
if(Earthbind_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_EARTHBIND_TOTEM);
|
||||
Earthbind_Timer = 45000;
|
||||
}else Earthbind_Timer -= diff;
|
||||
//Earthbind_Timer
|
||||
if(Earthbind_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_EARTHBIND_TOTEM);
|
||||
Earthbind_Timer = 45000;
|
||||
}else Earthbind_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -578,14 +578,14 @@ struct TRINITY_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI
|
||||
uint32 WaterBoltVolley_Timer;
|
||||
uint32 TidalSurge_Timer;
|
||||
uint32 Heal_Timer;
|
||||
uint32 Cyclone_Timer;
|
||||
uint32 Cyclone_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
WaterBoltVolley_Timer = 35000;
|
||||
TidalSurge_Timer = 15000+rand()%5000;
|
||||
Heal_Timer = 55000;
|
||||
Cyclone_Timer = 30000+rand()%10000;
|
||||
Cyclone_Timer = 30000+rand()%10000;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
@@ -599,8 +599,8 @@ struct TRINITY_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI
|
||||
Karathress = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
|
||||
|
||||
if (Karathress)
|
||||
if(!m_creature->isAlive() && Karathress)
|
||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventCaribdisDeath();
|
||||
if(!m_creature->isAlive() && Karathress)
|
||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventCaribdisDeath();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -632,10 +632,10 @@ struct TRINITY_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI
|
||||
|
||||
//someone evaded!
|
||||
if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
|
||||
{
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//WaterBoltVolley_Timer
|
||||
if (WaterBoltVolley_Timer < diff)
|
||||
@@ -648,69 +648,69 @@ struct TRINITY_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI
|
||||
if (TidalSurge_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_TIDAL_SURGE);
|
||||
// Hacky way to do it - won't trigger elseways
|
||||
m_creature->getVictim()->CastSpell( m_creature->getVictim(), SPELL_TIDAL_SURGE_FREEZE, true );
|
||||
// Hacky way to do it - won't trigger elseways
|
||||
m_creature->getVictim()->CastSpell( m_creature->getVictim(), SPELL_TIDAL_SURGE_FREEZE, true );
|
||||
TidalSurge_Timer = 15000+rand()%5000;
|
||||
}else TidalSurge_Timer -= diff;
|
||||
|
||||
//Cyclone_Timer
|
||||
if(Cyclone_Timer < diff)
|
||||
{
|
||||
//DoCast(m_creature, SPELL_SUMMON_CYCLONE); // Doesn't work
|
||||
Cyclone_Timer = 30000+rand()%10000;
|
||||
Creature *Cyclone = m_creature->SummonCreature(CREATURE_CYCLONE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
if( Cyclone )
|
||||
{
|
||||
((Creature*)Cyclone)->SetFloatValue(OBJECT_FIELD_SCALE_X, 3.0f);
|
||||
Cyclone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Cyclone->setFaction(m_creature->getFaction());
|
||||
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_CYCLONE, true);
|
||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if( target )
|
||||
{
|
||||
Cyclone->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
}else Cyclone_Timer -= diff;
|
||||
//Cyclone_Timer
|
||||
if(Cyclone_Timer < diff)
|
||||
{
|
||||
//DoCast(m_creature, SPELL_SUMMON_CYCLONE); // Doesn't work
|
||||
Cyclone_Timer = 30000+rand()%10000;
|
||||
Creature *Cyclone = m_creature->SummonCreature(CREATURE_CYCLONE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
if( Cyclone )
|
||||
{
|
||||
((Creature*)Cyclone)->SetFloatValue(OBJECT_FIELD_SCALE_X, 3.0f);
|
||||
Cyclone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Cyclone->setFaction(m_creature->getFaction());
|
||||
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_CYCLONE, true);
|
||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if( target )
|
||||
{
|
||||
Cyclone->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
}else Cyclone_Timer -= diff;
|
||||
|
||||
//Heal_Timer
|
||||
if(Heal_Timer < diff)
|
||||
{
|
||||
// It can be cast on any of the mobs
|
||||
Unit *pUnit = NULL;
|
||||
//Heal_Timer
|
||||
if(Heal_Timer < diff)
|
||||
{
|
||||
// It can be cast on any of the mobs
|
||||
Unit *pUnit = NULL;
|
||||
|
||||
while( pUnit == NULL || !pUnit->isAlive() )
|
||||
{
|
||||
pUnit = selectAdvisorUnit();
|
||||
}
|
||||
while( pUnit == NULL || !pUnit->isAlive() )
|
||||
{
|
||||
pUnit = selectAdvisorUnit();
|
||||
}
|
||||
|
||||
if(pUnit && pUnit->isAlive())
|
||||
DoCast(pUnit, SPELL_HEAL);
|
||||
Heal_Timer = 60000;
|
||||
}else Heal_Timer -= diff;
|
||||
if(pUnit && pUnit->isAlive())
|
||||
DoCast(pUnit, SPELL_HEAL);
|
||||
Heal_Timer = 60000;
|
||||
}else Heal_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
Unit* selectAdvisorUnit()
|
||||
{
|
||||
Unit* pUnit;
|
||||
if(pInstance)
|
||||
{
|
||||
switch(rand()%4)
|
||||
{
|
||||
case 0:
|
||||
pUnit = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS));
|
||||
break;
|
||||
case 1:
|
||||
pUnit = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_SHARKKIS));
|
||||
break;
|
||||
case 2:
|
||||
pUnit = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_TIDALVESS));
|
||||
break;
|
||||
case 3:
|
||||
pUnit = m_creature;
|
||||
break;
|
||||
Unit* selectAdvisorUnit()
|
||||
{
|
||||
Unit* pUnit;
|
||||
if(pInstance)
|
||||
{
|
||||
switch(rand()%4)
|
||||
{
|
||||
case 0:
|
||||
pUnit = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS));
|
||||
break;
|
||||
case 1:
|
||||
pUnit = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_SHARKKIS));
|
||||
break;
|
||||
case 2:
|
||||
pUnit = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_TIDALVESS));
|
||||
break;
|
||||
case 3:
|
||||
pUnit = m_creature;
|
||||
break;
|
||||
}
|
||||
}else pUnit = m_creature;
|
||||
|
||||
|
||||
+57
-57
@@ -83,7 +83,7 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
uint64 beams[2];
|
||||
uint64 beams[2];
|
||||
uint32 PosCheck_Timer;
|
||||
uint32 MarkOfHydross_Timer;
|
||||
uint32 MarkOfCorruption_Timer;
|
||||
@@ -93,14 +93,14 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
uint32 MarkOfCorruption_Count;
|
||||
uint32 EnrageTimer;
|
||||
bool CorruptedForm;
|
||||
bool beam;
|
||||
SummonList Summons;
|
||||
bool beam;
|
||||
SummonList Summons;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
DeSummonBeams();
|
||||
beams[0] = 0;
|
||||
beams[1] = 0;
|
||||
DeSummonBeams();
|
||||
beams[0] = 0;
|
||||
beams[1] = 0;
|
||||
PosCheck_Timer = 2500;
|
||||
MarkOfHydross_Timer = 15000;
|
||||
MarkOfCorruption_Timer = 15000;
|
||||
@@ -119,41 +119,41 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
|
||||
beam = false;
|
||||
Summons.DespawnAll();
|
||||
beam = false;
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
|
||||
void SummonBeams()
|
||||
{
|
||||
Creature* beamer = m_creature->SummonCreature(ENTRY_BEAM_DUMMY,-258.333,-356.34,22.0499,5.90835,TEMPSUMMON_CORPSE_DESPAWN,0);
|
||||
if(beamer)
|
||||
{
|
||||
beamer->CastSpell(m_creature,SPELL_BLUE_BEAM,true);
|
||||
beamer->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
|
||||
beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
beams[0]=beamer->GetGUID();
|
||||
}
|
||||
beamer = beamer = m_creature->SummonCreature(ENTRY_BEAM_DUMMY,-219.918,-371.308,22.0042,2.73072,TEMPSUMMON_CORPSE_DESPAWN,0);
|
||||
if(beamer)
|
||||
{
|
||||
beamer->CastSpell(m_creature,SPELL_BLUE_BEAM,true);
|
||||
beamer->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
|
||||
beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
beams[1]=beamer->GetGUID();
|
||||
}
|
||||
}
|
||||
void DeSummonBeams()
|
||||
{
|
||||
for(uint8 i=0;i<2;i++)
|
||||
{
|
||||
Creature* mob = (Creature*)Unit::GetUnit(*m_creature,beams[i]);
|
||||
if(mob)
|
||||
{
|
||||
mob->setDeathState(DEAD);
|
||||
void SummonBeams()
|
||||
{
|
||||
Creature* beamer = m_creature->SummonCreature(ENTRY_BEAM_DUMMY,-258.333,-356.34,22.0499,5.90835,TEMPSUMMON_CORPSE_DESPAWN,0);
|
||||
if(beamer)
|
||||
{
|
||||
beamer->CastSpell(m_creature,SPELL_BLUE_BEAM,true);
|
||||
beamer->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
|
||||
beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
beams[0]=beamer->GetGUID();
|
||||
}
|
||||
beamer = beamer = m_creature->SummonCreature(ENTRY_BEAM_DUMMY,-219.918,-371.308,22.0042,2.73072,TEMPSUMMON_CORPSE_DESPAWN,0);
|
||||
if(beamer)
|
||||
{
|
||||
beamer->CastSpell(m_creature,SPELL_BLUE_BEAM,true);
|
||||
beamer->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
|
||||
beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
beams[1]=beamer->GetGUID();
|
||||
}
|
||||
}
|
||||
void DeSummonBeams()
|
||||
{
|
||||
for(uint8 i=0;i<2;i++)
|
||||
{
|
||||
Creature* mob = (Creature*)Unit::GetUnit(*m_creature,beams[i]);
|
||||
if(mob)
|
||||
{
|
||||
mob->setDeathState(DEAD);
|
||||
mob->RemoveCorpse();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
@@ -185,20 +185,20 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (summoned->GetEntry() == ENTRY_PURE_SPAWN)
|
||||
{
|
||||
summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||
summoned->CastSpell(summoned,SPELL_ELEMENTAL_SPAWNIN,true);
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
{
|
||||
summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||
summoned->CastSpell(summoned,SPELL_ELEMENTAL_SPAWNIN,true);
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
if (summoned->GetEntry() == ENTRY_TAINTED_SPAWN)
|
||||
{
|
||||
summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
||||
summoned->CastSpell(summoned,SPELL_ELEMENTAL_SPAWNIN,true);
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
{
|
||||
summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
||||
summoned->CastSpell(summoned,SPELL_ELEMENTAL_SPAWNIN,true);
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
void SummonedCreatureDespawn(Creature *summon)
|
||||
{
|
||||
Summons.Despawn(summon);
|
||||
}
|
||||
@@ -212,16 +212,16 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
|
||||
Summons.DespawnAll();
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!beam)
|
||||
{
|
||||
SummonBeams();
|
||||
beam=true;
|
||||
}
|
||||
if(!beam)
|
||||
{
|
||||
SummonBeams();
|
||||
beam=true;
|
||||
}
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
@@ -277,7 +277,7 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
|
||||
DoScriptText(SAY_SWITCH_TO_CLEAN, m_creature);
|
||||
DoResetThreat();
|
||||
SummonBeams();
|
||||
SummonBeams();
|
||||
|
||||
// spawn 4 adds
|
||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
@@ -344,7 +344,7 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
|
||||
DoScriptText(SAY_SWITCH_TO_CORRUPT, m_creature);
|
||||
DoResetThreat();
|
||||
DeSummonBeams();
|
||||
DeSummonBeams();
|
||||
|
||||
// spawn 4 adds
|
||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
|
||||
+154
-154
@@ -41,7 +41,7 @@ EndScriptData */
|
||||
#define SAY_SLAY3 -1548054
|
||||
#define SAY_DEATH -1548055
|
||||
|
||||
#define SPELL_SURGE 38044
|
||||
#define SPELL_SURGE 38044
|
||||
#define SPELL_MULTI_SHOT 38310
|
||||
#define SPELL_SHOCK_BLAST 38509
|
||||
#define SPELL_ENTANGLE 38316
|
||||
@@ -133,17 +133,17 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
boss_lady_vashjAI (Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = (c->GetInstanceData()) ? ((ScriptedInstance*)c->GetInstanceData()) : NULL;
|
||||
Intro = false;
|
||||
Reset();
|
||||
CanAttack = false;//must be after reset()
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //set it only once on creature create (no need do intro if wiped)
|
||||
Intro = false;
|
||||
Reset();
|
||||
CanAttack = false;//must be after reset()
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //set it only once on creature create (no need do intro if wiped)
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
uint64 ShieldGeneratorChannel[4];
|
||||
|
||||
uint32 AggroTimer;
|
||||
uint32 AggroTimer;
|
||||
uint32 ShockBlast_Timer;
|
||||
uint32 Entangle_Timer;
|
||||
uint32 StaticCharge_Timer;
|
||||
@@ -160,12 +160,12 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
|
||||
bool Entangle;
|
||||
bool InCombat;
|
||||
bool Intro;
|
||||
bool CanAttack;
|
||||
bool Intro;
|
||||
bool CanAttack;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
AggroTimer = 19000;
|
||||
AggroTimer = 19000;
|
||||
ShockBlast_Timer = 1+rand()%60000;
|
||||
Entangle_Timer = 30000;
|
||||
StaticCharge_Timer = 10000+rand()%15000;
|
||||
@@ -182,24 +182,24 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
|
||||
Entangle = false;
|
||||
InCombat = false;
|
||||
CanAttack = true;
|
||||
CanAttack = true;
|
||||
|
||||
Unit *remo;
|
||||
Unit *remo;
|
||||
for(uint8 i = 0; i < 4; i++)
|
||||
{
|
||||
remo = Unit::GetUnit(*m_creature, ShieldGeneratorChannel[i]);
|
||||
if (remo)
|
||||
remo->setDeathState(JUST_DIED);
|
||||
remo->setDeathState(JUST_DIED);
|
||||
}
|
||||
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_LADYVASHJEVENT, NOT_STARTED);
|
||||
pInstance->SetData(DATA_LADYVASHJEVENT, NOT_STARTED);
|
||||
ShieldGeneratorChannel[0] = 0;
|
||||
ShieldGeneratorChannel[1] = 0;
|
||||
ShieldGeneratorChannel[2] = 0;
|
||||
ShieldGeneratorChannel[3] = 0;
|
||||
|
||||
m_creature->SetCorpseDelay(1000*60*60);
|
||||
m_creature->SetCorpseDelay(1000*60*60);
|
||||
}
|
||||
|
||||
//Called when a tainted elemental dies
|
||||
@@ -246,19 +246,19 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
//remove old tainted cores to prevent cheating in phase 2
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i)
|
||||
if (pInstance)
|
||||
{
|
||||
//remove old tainted cores to prevent cheating in phase 2
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i)
|
||||
{
|
||||
if(Player* i_pl = i->getSource())
|
||||
{
|
||||
i_pl->DestroyItemCount(31088, 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Phase != 2)
|
||||
AttackStart(who);
|
||||
|
||||
@@ -268,13 +268,13 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!Intro)
|
||||
{
|
||||
Intro = true;
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
}
|
||||
if (!CanAttack)
|
||||
return;
|
||||
if (!Intro)
|
||||
{
|
||||
Intro = true;
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
}
|
||||
if (!CanAttack)
|
||||
return;
|
||||
if (!who || m_creature->getVictim())
|
||||
return;
|
||||
|
||||
@@ -322,25 +322,25 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!CanAttack && Intro)
|
||||
{
|
||||
if(AggroTimer < diff)
|
||||
{
|
||||
CanAttack = true;
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
AggroTimer=19000;
|
||||
}else
|
||||
{
|
||||
AggroTimer-=diff;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(!CanAttack && Intro)
|
||||
{
|
||||
if(AggroTimer < diff)
|
||||
{
|
||||
CanAttack = true;
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
AggroTimer=19000;
|
||||
}else
|
||||
{
|
||||
AggroTimer-=diff;
|
||||
return;
|
||||
}
|
||||
}
|
||||
//to prevent abuses during phase 2
|
||||
if(Phase == 2 && !m_creature->getVictim() && InCombat)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
@@ -438,7 +438,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
|
||||
SummonSporebat_Timer = SummonSporebat_StaticTimer;
|
||||
|
||||
if(SummonSporebat_Timer < 5000)
|
||||
if(SummonSporebat_Timer < 5000)
|
||||
SummonSporebat_Timer = 5000;
|
||||
|
||||
}else SummonSporebat_Timer -= diff;
|
||||
@@ -519,15 +519,15 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
{
|
||||
uint32 pos = rand()%3;
|
||||
Creature* CoilfangElite = NULL;
|
||||
CoilfangElite = m_creature->SummonCreature(COILFANG_ELITE, CoilfangElitePos[pos][0], CoilfangElitePos[pos][1], CoilfangElitePos[pos][2], CoilfangElitePos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
if(CoilfangElite)
|
||||
CoilfangElite = m_creature->SummonCreature(COILFANG_ELITE, CoilfangElitePos[pos][0], CoilfangElitePos[pos][1], CoilfangElitePos[pos][2], CoilfangElitePos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
if(CoilfangElite)
|
||||
{
|
||||
Unit *target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if(target)
|
||||
CoilfangElite->AI()->AttackStart(target);
|
||||
else if(m_creature->getVictim())
|
||||
CoilfangElite->AI()->AttackStart(m_creature->getVictim());
|
||||
else if(m_creature->getVictim())
|
||||
CoilfangElite->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
CoilfangElite_Timer = 45000+rand()%5000;
|
||||
}else CoilfangElite_Timer -= diff;
|
||||
@@ -536,16 +536,16 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
if(CoilfangStrider_Timer < diff)
|
||||
{
|
||||
uint32 pos = rand()%3;
|
||||
Creature* CoilfangStrider = NULL;
|
||||
CoilfangStrider = m_creature->SummonCreature(COILFANG_STRIDER, CoilfangStriderPos[pos][0], CoilfangStriderPos[pos][1], CoilfangStriderPos[pos][2], CoilfangStriderPos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
if(CoilfangStrider)
|
||||
Creature* CoilfangStrider = NULL;
|
||||
CoilfangStrider = m_creature->SummonCreature(COILFANG_STRIDER, CoilfangStriderPos[pos][0], CoilfangStriderPos[pos][1], CoilfangStriderPos[pos][2], CoilfangStriderPos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
if(CoilfangStrider)
|
||||
{
|
||||
Unit *target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if(target)
|
||||
CoilfangStrider->AI()->AttackStart(target);
|
||||
else if(m_creature->getVictim())
|
||||
CoilfangStrider->AI()->AttackStart(m_creature->getVictim());
|
||||
else if(m_creature->getVictim())
|
||||
CoilfangStrider->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
CoilfangStrider_Timer = 60000+rand()%10000;
|
||||
}else CoilfangStrider_Timer -= diff;
|
||||
@@ -590,39 +590,39 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
uint32 move;
|
||||
uint32 phase;
|
||||
float x, y, z;
|
||||
Unit *Vashj;
|
||||
uint32 move;
|
||||
uint32 phase;
|
||||
float x, y, z;
|
||||
Unit *Vashj;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetSpeed(MOVE_WALK,0.6);//walk
|
||||
m_creature->SetSpeed(MOVE_RUN,0.6);//run
|
||||
move = 0;
|
||||
phase = 1;
|
||||
Vashj = NULL;
|
||||
m_creature->SetSpeed(MOVE_WALK,0.6);//walk
|
||||
m_creature->SetSpeed(MOVE_RUN,0.6);//run
|
||||
move = 0;
|
||||
phase = 1;
|
||||
Vashj = NULL;
|
||||
|
||||
for (int i = 0;i<8;i++)//search for nearest waypoint (up on stairs)
|
||||
{
|
||||
if (!x || !y || !z)
|
||||
{
|
||||
x = ElementWPPos[i][0];
|
||||
y = ElementWPPos[i][1];
|
||||
z = ElementWPPos[i][2];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_creature->GetDistance(ElementWPPos[i][0],ElementWPPos[i][1],ElementWPPos[i][2]) < m_creature->GetDistance(x,y,z))
|
||||
{
|
||||
x = ElementWPPos[i][0];
|
||||
y = ElementWPPos[i][1];
|
||||
z = ElementWPPos[i][2];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ));
|
||||
for (int i = 0;i<8;i++)//search for nearest waypoint (up on stairs)
|
||||
{
|
||||
if (!x || !y || !z)
|
||||
{
|
||||
x = ElementWPPos[i][0];
|
||||
y = ElementWPPos[i][1];
|
||||
z = ElementWPPos[i][2];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_creature->GetDistance(ElementWPPos[i][0],ElementWPPos[i][1],ElementWPPos[i][2]) < m_creature->GetDistance(x,y,z))
|
||||
{
|
||||
x = ElementWPPos[i][0];
|
||||
y = ElementWPPos[i][1];
|
||||
z = ElementWPPos[i][2];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pInstance)
|
||||
Vashj = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ));
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) { return; }
|
||||
@@ -631,31 +631,31 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!pInstance)
|
||||
return;
|
||||
if(!pInstance)
|
||||
return;
|
||||
|
||||
if (!Vashj)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(move < diff)
|
||||
if (!Vashj)
|
||||
{
|
||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_WALK_MODE);
|
||||
if (phase == 1)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
}
|
||||
if (phase == 1 && m_creature->GetDistance(x,y,z) < 0.1)
|
||||
{
|
||||
phase = 2;
|
||||
}
|
||||
if (phase == 2)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MovePoint(0, MIDDLE_X, MIDDLE_Y, MIDDLE_Z);
|
||||
phase = 3;
|
||||
}
|
||||
if (phase == 3)
|
||||
return;
|
||||
}
|
||||
|
||||
if(move < diff)
|
||||
{
|
||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_WALK_MODE);
|
||||
if (phase == 1)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
}
|
||||
if (phase == 1 && m_creature->GetDistance(x,y,z) < 0.1)
|
||||
{
|
||||
phase = 2;
|
||||
}
|
||||
if (phase == 2)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MovePoint(0, MIDDLE_X, MIDDLE_Y, MIDDLE_Z);
|
||||
phase = 3;
|
||||
}
|
||||
if (phase == 3)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MovePoint(0, MIDDLE_X, MIDDLE_Y, MIDDLE_Z);
|
||||
if(m_creature->GetDistance(MIDDLE_X, MIDDLE_Y, MIDDLE_Z) < 3)
|
||||
@@ -674,13 +674,13 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
}
|
||||
if(((boss_lady_vashjAI*)((Creature*)Vashj)->AI())->InCombat == false || ((boss_lady_vashjAI*)((Creature*)Vashj)->AI())->Phase != 2 || Vashj->isDead())
|
||||
if(((boss_lady_vashjAI*)((Creature*)Vashj)->AI())->InCombat == false || ((boss_lady_vashjAI*)((Creature*)Vashj)->AI())->Phase != 2 || Vashj->isDead())
|
||||
{
|
||||
//call Unsummon()
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
move = 1000;
|
||||
}else move -= diff;
|
||||
move = 1000;
|
||||
}else move -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -719,7 +719,7 @@ struct TRINITY_DLL_DECL mob_tainted_elementalAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
m_creature->AddThreat(who, 0.1f);
|
||||
m_creature->AddThreat(who, 0.1f);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -760,18 +760,18 @@ struct TRINITY_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
uint32 movement_timer;
|
||||
uint32 movement_timer;
|
||||
uint32 ToxicSpore_Timer;
|
||||
uint32 bolt_timer;
|
||||
uint32 bolt_timer;
|
||||
uint32 Check_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->AddUnitMovementFlag(/*MOVEMENTFLAG_ONTRANSPORT + */MOVEMENTFLAG_LEVITATING);
|
||||
m_creature->AddUnitMovementFlag(/*MOVEMENTFLAG_ONTRANSPORT + */MOVEMENTFLAG_LEVITATING);
|
||||
m_creature->setFaction(14);
|
||||
movement_timer = 0;
|
||||
movement_timer = 0;
|
||||
ToxicSpore_Timer = 5000;
|
||||
bolt_timer = 5500;
|
||||
bolt_timer = 5500;
|
||||
Check_Timer = 1000;
|
||||
}
|
||||
|
||||
@@ -781,50 +781,50 @@ struct TRINITY_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if(type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if(id == 1)
|
||||
movement_timer = 0;
|
||||
}
|
||||
movement_timer = 0;
|
||||
}
|
||||
|
||||
void UpdateAI (const uint32 diff)
|
||||
{
|
||||
|
||||
/*if(!m_creature->isInCombat())
|
||||
m_creature->SetInCombatState(false);*/
|
||||
/*if(!m_creature->isInCombat())
|
||||
m_creature->SetInCombatState(false);*/
|
||||
|
||||
//Random movement
|
||||
//Random movement
|
||||
if (movement_timer < diff)
|
||||
{
|
||||
uint32 rndpos = rand()%8;
|
||||
m_creature->GetMotionMaster()->MovePoint(1,SporebatWPPos[rndpos][0], SporebatWPPos[rndpos][1], SporebatWPPos[rndpos][2]);
|
||||
movement_timer = 6000;
|
||||
}else movement_timer -= diff;
|
||||
uint32 rndpos = rand()%8;
|
||||
m_creature->GetMotionMaster()->MovePoint(1,SporebatWPPos[rndpos][0], SporebatWPPos[rndpos][1], SporebatWPPos[rndpos][2]);
|
||||
movement_timer = 6000;
|
||||
}else movement_timer -= diff;
|
||||
|
||||
//toxic spores
|
||||
if(bolt_timer < diff)
|
||||
{
|
||||
Unit *target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if(target)
|
||||
{
|
||||
Creature* trig = m_creature->SummonCreature(TOXIC_SPORES_TRIGGER,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,30000);
|
||||
if(trig)
|
||||
{
|
||||
trig->setFaction(14);
|
||||
trig->CastSpell(trig, SPELL_TOXIC_SPORES,true);
|
||||
}
|
||||
}
|
||||
bolt_timer = 10000+rand()%5000;
|
||||
}
|
||||
else bolt_timer -= diff;
|
||||
//toxic spores
|
||||
if(bolt_timer < diff)
|
||||
{
|
||||
Unit *target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if(target)
|
||||
{
|
||||
Creature* trig = m_creature->SummonCreature(TOXIC_SPORES_TRIGGER,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,30000);
|
||||
if(trig)
|
||||
{
|
||||
trig->setFaction(14);
|
||||
trig->CastSpell(trig, SPELL_TOXIC_SPORES,true);
|
||||
}
|
||||
}
|
||||
bolt_timer = 10000+rand()%5000;
|
||||
}
|
||||
else bolt_timer -= diff;
|
||||
|
||||
//Check_Timer
|
||||
if(Check_Timer < diff)
|
||||
@@ -845,7 +845,7 @@ struct TRINITY_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI
|
||||
|
||||
Check_Timer = 1000;
|
||||
}else Check_Timer -= diff;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//Coilfang Elite
|
||||
@@ -896,11 +896,11 @@ struct TRINITY_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
uint32 Check_Timer;
|
||||
bool Casted;
|
||||
bool Casted;
|
||||
void Reset()
|
||||
{
|
||||
Check_Timer = 0;
|
||||
Casted = false;
|
||||
Casted = false;
|
||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
|
||||
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -923,13 +923,13 @@ struct TRINITY_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI
|
||||
if(Vashj && Vashj->isAlive())
|
||||
{
|
||||
//start visual channel
|
||||
if (!Casted || !Vashj->HasAura(SPELL_MAGIC_BARRIER,0))
|
||||
{
|
||||
m_creature->CastSpell(Vashj,SPELL_MAGIC_BARRIER,true);
|
||||
Casted = true;
|
||||
}
|
||||
if (!Casted || !Vashj->HasAura(SPELL_MAGIC_BARRIER,0))
|
||||
{
|
||||
m_creature->CastSpell(Vashj,SPELL_MAGIC_BARRIER,true);
|
||||
Casted = true;
|
||||
}
|
||||
}
|
||||
Check_Timer = 1000;
|
||||
Check_Timer = 1000;
|
||||
}else Check_Timer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
+423
-423
File diff suppressed because it is too large
Load Diff
+287
-287
@@ -26,199 +26,199 @@ EndScriptData */
|
||||
#include "../../../creature/simple_ai.h"
|
||||
#include "Spell.h"
|
||||
|
||||
#define SPELL_SPOUT 37433
|
||||
#define SPELL_SPOUT_ANIM 42835
|
||||
#define SPELL_SPOUT_BREATH 37431
|
||||
#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 SPELL_SCALDINGWATER 37284
|
||||
#define SPELL_SPOUT 37433
|
||||
#define SPELL_SPOUT_ANIM 42835
|
||||
#define SPELL_SPOUT_BREATH 37431
|
||||
#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 SPELL_SCALDINGWATER 37284
|
||||
|
||||
#define EMOTE_SPOUT "takes a deep breath."
|
||||
#define EMOTE_SPOUT "takes a deep breath."
|
||||
|
||||
#define SPOUT_DIST 100
|
||||
#define SPOUT_DIST 100
|
||||
|
||||
#define MOB_COILFANG_GUARDIAN 21873
|
||||
#define MOB_COILFANG_AMBUSHER 21865
|
||||
|
||||
//Ambusher spells
|
||||
#define SPELL_SPREAD_SHOT 37790
|
||||
#define SPELL_SHOOT 37770
|
||||
#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
|
||||
#define SPELL_ARCINGSMASH 38761 // Wrong SpellId. Can't find the right one.
|
||||
#define SPELL_HAMSTRING 26211
|
||||
|
||||
float AddPos[9][3] =
|
||||
{
|
||||
{2.8553810, -459.823914, -19.182686}, //MOVE_AMBUSHER_1 X, Y, Z
|
||||
{12.400000, -466.042267, -19.182686}, //MOVE_AMBUSHER_2 X, Y, Z
|
||||
{51.366653, -460.836060, -19.182686}, //MOVE_AMBUSHER_3 X, Y, Z
|
||||
{62.597980, -457.433044, -19.182686}, //MOVE_AMBUSHER_4 X, Y, Z
|
||||
{77.607452, -384.302765, -19.182686}, //MOVE_AMBUSHER_5 X, Y, Z
|
||||
{63.897900, -378.984924, -19.182686}, //MOVE_AMBUSHER_6 X, Y, Z
|
||||
{34.447250, -387.333618, -19.182686}, //MOVE_GUARDIAN_1 X, Y, Z
|
||||
{14.388216, -423.468018, -19.625271}, //MOVE_GUARDIAN_2 X, Y, Z
|
||||
{42.471519, -445.115295, -19.769423} //MOVE_GUARDIAN_3 X, Y, Z
|
||||
{2.8553810, -459.823914, -19.182686}, //MOVE_AMBUSHER_1 X, Y, Z
|
||||
{12.400000, -466.042267, -19.182686}, //MOVE_AMBUSHER_2 X, Y, Z
|
||||
{51.366653, -460.836060, -19.182686}, //MOVE_AMBUSHER_3 X, Y, Z
|
||||
{62.597980, -457.433044, -19.182686}, //MOVE_AMBUSHER_4 X, Y, Z
|
||||
{77.607452, -384.302765, -19.182686}, //MOVE_AMBUSHER_5 X, Y, Z
|
||||
{63.897900, -378.984924, -19.182686}, //MOVE_AMBUSHER_6 X, Y, Z
|
||||
{34.447250, -387.333618, -19.182686}, //MOVE_GUARDIAN_1 X, Y, Z
|
||||
{14.388216, -423.468018, -19.625271}, //MOVE_GUARDIAN_2 X, Y, Z
|
||||
{42.471519, -445.115295, -19.769423} //MOVE_GUARDIAN_3 X, Y, Z
|
||||
};
|
||||
|
||||
enum RotationType
|
||||
{
|
||||
NOROTATE = 0,
|
||||
CLOCKWISE = 1,
|
||||
COUNTERCLOCKWISE = 2,
|
||||
NOROTATE = 0,
|
||||
CLOCKWISE = 1,
|
||||
COUNTERCLOCKWISE = 2,
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
{
|
||||
boss_the_lurker_belowAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SPOUT_ANIM);
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SPOUT_ANIM);
|
||||
if(TempSpell)
|
||||
{
|
||||
TempSpell->Effect[0] = 0;//remove all spell effect, only anim is needed
|
||||
TempSpell->Effect[1] = 0;
|
||||
TempSpell->Effect[2] = 0;
|
||||
}
|
||||
}
|
||||
{
|
||||
TempSpell->Effect[0] = 0;//remove all spell effect, only anim is needed
|
||||
TempSpell->Effect[1] = 0;
|
||||
TempSpell->Effect[2] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
ScriptedInstance* pInstance;
|
||||
SummonList Summons;
|
||||
|
||||
bool Spawned;
|
||||
bool Spawned;
|
||||
bool Submerged;
|
||||
|
||||
double SpoutAngle;
|
||||
|
||||
uint8 RotType;
|
||||
uint8 RotType;
|
||||
|
||||
uint32 RotTimer;
|
||||
uint32 SpoutAnimTimer;
|
||||
uint32 WaterboltTimer;
|
||||
uint32 SpoutTimer;
|
||||
uint32 WhirlTimer;//after avery spout
|
||||
uint32 PhaseTimer;
|
||||
uint32 GeyserTimer;
|
||||
uint32 RotTimer;
|
||||
uint32 SpoutAnimTimer;
|
||||
uint32 WaterboltTimer;
|
||||
uint32 SpoutTimer;
|
||||
uint32 WhirlTimer;//after avery spout
|
||||
uint32 PhaseTimer;
|
||||
uint32 GeyserTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING + MOVEMENTFLAG_LEVITATING);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->SetCorpseDelay(1000*60*60);
|
||||
void Reset()
|
||||
{
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING + MOVEMENTFLAG_LEVITATING);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->SetCorpseDelay(1000*60*60);
|
||||
|
||||
RotType = NOROTATE;
|
||||
|
||||
SpoutAngle = 0;
|
||||
SpoutAnimTimer = 1000;
|
||||
RotTimer = 20000;
|
||||
WaterboltTimer = 3000;
|
||||
SpoutTimer = 15000;
|
||||
WhirlTimer = 18000;//after avery spout
|
||||
PhaseTimer = 120000;
|
||||
GeyserTimer = rand()%5000 + 15000;
|
||||
SpoutAngle = 0;
|
||||
SpoutAnimTimer = 1000;
|
||||
RotTimer = 20000;
|
||||
WaterboltTimer = 3000;
|
||||
SpoutTimer = 15000;
|
||||
WhirlTimer = 18000;//after avery spout
|
||||
PhaseTimer = 120000;
|
||||
GeyserTimer = rand()%5000 + 15000;
|
||||
|
||||
Submerged = false;
|
||||
Spawned = false;
|
||||
Spawned = false;
|
||||
|
||||
Summons.DespawnAll();
|
||||
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, NOT_STARTED);
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, NOT_STARTED);
|
||||
|
||||
/*if(pInstance->GetData(DATA_STRANGE_POOL) != DONE)
|
||||
{
|
||||
m_creature->SetReactState(REACT_PASSIVE);
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
}else {
|
||||
m_creature->SetVisibility(VISIBILITY_ON);
|
||||
m_creature->SetReactState(REACT_AGGRESSIVE);
|
||||
}*/
|
||||
}
|
||||
/*if(pInstance->GetData(DATA_STRANGE_POOL) != DONE)
|
||||
{
|
||||
m_creature->SetReactState(REACT_PASSIVE);
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
}else {
|
||||
m_creature->SetVisibility(VISIBILITY_ON);
|
||||
m_creature->SetReactState(REACT_AGGRESSIVE);
|
||||
}*/
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!who || m_creature->getVictim())
|
||||
if (!who || m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
||||
if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
||||
{
|
||||
float attackRadius = m_creature->GetAttackDistance(who);
|
||||
if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
|
||||
AttackStart(who);
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, IN_PROGRESS);
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, IN_PROGRESS);
|
||||
|
||||
if (!who || m_creature->getVictim())
|
||||
return;
|
||||
if (!who || m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
||||
{
|
||||
float attackRadius = m_creature->GetAttackDistance(who);
|
||||
if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
||||
{
|
||||
float attackRadius = m_creature->GetAttackDistance(who);
|
||||
if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, DONE);
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, DONE);
|
||||
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
}
|
||||
|
||||
void Rotate(const uint32 diff)
|
||||
{
|
||||
bool Spout = false;
|
||||
switch (RotType)
|
||||
{
|
||||
case NOROTATE:
|
||||
return;
|
||||
case CLOCKWISE://20secs for 360turn
|
||||
//no target if rotating!
|
||||
m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
SpoutAngle += (double)diff/20000*(double)M_PI*2;
|
||||
if (SpoutAngle >= M_PI*2)SpoutAngle = 0;
|
||||
m_creature->SetOrientation(SpoutAngle);
|
||||
m_creature->StopMoving();
|
||||
Spout = true;
|
||||
break;
|
||||
case COUNTERCLOCKWISE://20secs for 360turn
|
||||
//no target if rotating!
|
||||
m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
SpoutAngle -= (double)diff/20000*(double)M_PI*2;
|
||||
if (SpoutAngle <= 0)SpoutAngle = M_PI*2;
|
||||
m_creature->SetOrientation(SpoutAngle);
|
||||
m_creature->StopMoving();
|
||||
Spout = true;
|
||||
break;
|
||||
}
|
||||
void Rotate(const uint32 diff)
|
||||
{
|
||||
bool Spout = false;
|
||||
switch (RotType)
|
||||
{
|
||||
case NOROTATE:
|
||||
return;
|
||||
case CLOCKWISE://20secs for 360turn
|
||||
//no target if rotating!
|
||||
m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
SpoutAngle += (double)diff/20000*(double)M_PI*2;
|
||||
if (SpoutAngle >= M_PI*2)SpoutAngle = 0;
|
||||
m_creature->SetOrientation(SpoutAngle);
|
||||
m_creature->StopMoving();
|
||||
Spout = true;
|
||||
break;
|
||||
case COUNTERCLOCKWISE://20secs for 360turn
|
||||
//no target if rotating!
|
||||
m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
SpoutAngle -= (double)diff/20000*(double)M_PI*2;
|
||||
if (SpoutAngle <= 0)SpoutAngle = M_PI*2;
|
||||
m_creature->SetOrientation(SpoutAngle);
|
||||
m_creature->StopMoving();
|
||||
Spout = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if(!Spout)
|
||||
return;
|
||||
if(!Spout)
|
||||
return;
|
||||
|
||||
if(RotTimer<diff)//end rotate
|
||||
{
|
||||
RotType = NOROTATE;//set norotate state
|
||||
RotTimer=20000;
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
WhirlTimer = 4000; //whirl directly after spout ends
|
||||
return;
|
||||
}else RotTimer-=diff;
|
||||
if(RotTimer<diff)//end rotate
|
||||
{
|
||||
RotType = NOROTATE;//set norotate state
|
||||
RotTimer=20000;
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
WhirlTimer = 4000; //whirl directly after spout ends
|
||||
return;
|
||||
}else RotTimer-=diff;
|
||||
|
||||
if(SpoutAnimTimer<diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_SPOUT_ANIM,true);
|
||||
if(SpoutAnimTimer<diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_SPOUT_ANIM,true);
|
||||
SpoutAnimTimer = 1000;
|
||||
}else SpoutAnimTimer-=diff;
|
||||
|
||||
@@ -230,145 +230,145 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
{
|
||||
Player *target = i->getSource();
|
||||
if(target->isAlive() && m_creature->HasInArc((double)diff/20000*(double)M_PI*2,target) && m_creature->GetDistance(target) <= SPOUT_DIST && !target->IsInWater())
|
||||
DoCast(target,SPELL_SPOUT,true);//only knock back palyers in arc, in 100yards, not in water
|
||||
}
|
||||
DoCast(target,SPELL_SPOUT,true);//only knock back palyers in arc, in 100yards, not in water
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StartRotate(Unit* victim)
|
||||
{
|
||||
switch (rand()%2)
|
||||
{
|
||||
case 0: RotType = CLOCKWISE; break;
|
||||
case 1: RotType = COUNTERCLOCKWISE; break;
|
||||
}
|
||||
void StartRotate(Unit* victim)
|
||||
{
|
||||
switch (rand()%2)
|
||||
{
|
||||
case 0: RotType = CLOCKWISE; break;
|
||||
case 1: RotType = COUNTERCLOCKWISE; break;
|
||||
}
|
||||
RotTimer=20000;
|
||||
|
||||
if(victim)
|
||||
SpoutAngle = m_creature->GetAngle(victim);
|
||||
SpoutAngle = m_creature->GetAngle(victim);
|
||||
|
||||
m_creature->MonsterTextEmote(EMOTE_SPOUT,0,true);
|
||||
//DoCast(m_creature,SPELL_SPOUT_BREATH);//take breath anim
|
||||
}
|
||||
//DoCast(m_creature,SPELL_SPOUT_BREATH);//take breath anim
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() /*|| !m_creature->getVictim()*/ )//rotate resets target
|
||||
return;
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() /*|| !m_creature->getVictim()*/ )//rotate resets target
|
||||
return;
|
||||
|
||||
//Check if players in water and if in water cast spell
|
||||
Map *map = m_creature->GetMap();
|
||||
if (map->IsDungeon() && pInstance->GetData(DATA_THELURKERBELOWEVENT) == IN_PROGRESS)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
//Check if players in water and if in water cast spell
|
||||
Map *map = m_creature->GetMap();
|
||||
if (map->IsDungeon() && pInstance->GetData(DATA_THELURKERBELOWEVENT) == IN_PROGRESS)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->getSource()->isAlive() && i->getSource()->IsInWater() && !i->getSource()->HasAura(SPELL_SCALDINGWATER, 0))
|
||||
i->getSource()->CastSpell(i->getSource(), SPELL_SCALDINGWATER, true);
|
||||
else if(!i->getSource()->IsInWater())
|
||||
i->getSource()->RemoveAurasDueToSpell(SPELL_SCALDINGWATER);
|
||||
}
|
||||
}
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->getSource()->isAlive() && i->getSource()->IsInWater() && !i->getSource()->HasAura(SPELL_SCALDINGWATER, 0))
|
||||
i->getSource()->CastSpell(i->getSource(), SPELL_SCALDINGWATER, true);
|
||||
else if(!i->getSource()->IsInWater())
|
||||
i->getSource()->RemoveAurasDueToSpell(SPELL_SCALDINGWATER);
|
||||
}
|
||||
}
|
||||
|
||||
Rotate(diff);//always check rotate things
|
||||
if(!Submerged)
|
||||
{
|
||||
if(PhaseTimer < diff)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(m_creature,SPELL_SUBMERGE);
|
||||
PhaseTimer = 60000;//60secs submerged
|
||||
Submerged = true;
|
||||
}else PhaseTimer-=diff;
|
||||
}
|
||||
Rotate(diff);//always check rotate things
|
||||
if(!Submerged)
|
||||
{
|
||||
if(PhaseTimer < diff)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(m_creature,SPELL_SUBMERGE);
|
||||
PhaseTimer = 60000;//60secs submerged
|
||||
Submerged = true;
|
||||
}else PhaseTimer-=diff;
|
||||
}
|
||||
|
||||
if(!Submerged && RotType == NOROTATE)//is not spouting and not submerged
|
||||
{
|
||||
if(SpoutTimer < diff)
|
||||
{
|
||||
if(m_creature->getVictim() && RotType == NOROTATE)
|
||||
StartRotate(m_creature->getVictim());//start spout and random rotate
|
||||
if(!Submerged && RotType == NOROTATE)//is not spouting and not submerged
|
||||
{
|
||||
if(SpoutTimer < diff)
|
||||
{
|
||||
if(m_creature->getVictim() && RotType == NOROTATE)
|
||||
StartRotate(m_creature->getVictim());//start spout and random rotate
|
||||
|
||||
SpoutTimer= 35000;
|
||||
return;
|
||||
}else SpoutTimer -= diff;
|
||||
SpoutTimer= 35000;
|
||||
return;
|
||||
}else SpoutTimer -= diff;
|
||||
|
||||
//Whirl directly after a Spout and at random times
|
||||
if(WhirlTimer < diff)
|
||||
{
|
||||
WhirlTimer = rand()%5000 + 15000;
|
||||
DoCast(m_creature,SPELL_WHIRL);
|
||||
WaterboltTimer += 5000;//add 5secs to waterbolt timer, to add some time to run back to boss
|
||||
}else WhirlTimer -= diff;
|
||||
//Whirl directly after a Spout and at random times
|
||||
if(WhirlTimer < diff)
|
||||
{
|
||||
WhirlTimer = rand()%5000 + 15000;
|
||||
DoCast(m_creature,SPELL_WHIRL);
|
||||
WaterboltTimer += 5000;//add 5secs to waterbolt timer, to add some time to run back to boss
|
||||
}else WhirlTimer -= diff;
|
||||
|
||||
if(GeyserTimer < diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
if(GeyserTimer < diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
|
||||
if(target)
|
||||
DoCast(target,SPELL_GEYSER,true);
|
||||
else
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if(target)
|
||||
DoCast(target,SPELL_GEYSER,true);
|
||||
if(target)
|
||||
DoCast(target,SPELL_GEYSER,true);
|
||||
else
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if(target)
|
||||
DoCast(target,SPELL_GEYSER,true);
|
||||
|
||||
GeyserTimer = rand()%5000 + 15000;
|
||||
}else GeyserTimer -= diff;
|
||||
GeyserTimer = rand()%5000 + 15000;
|
||||
}else GeyserTimer -= diff;
|
||||
|
||||
if(WaterboltTimer < diff)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_NEAREST,0,14,true);
|
||||
if(!target)
|
||||
{
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if(target)
|
||||
DoCast(target,SPELL_WATERBOLT);
|
||||
}
|
||||
WaterboltTimer = 3000;
|
||||
}else WaterboltTimer -= diff;
|
||||
if(WaterboltTimer < diff)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_NEAREST,0,14,true);
|
||||
if(!target)
|
||||
{
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if(target)
|
||||
DoCast(target,SPELL_WATERBOLT);
|
||||
}
|
||||
WaterboltTimer = 3000;
|
||||
}else WaterboltTimer -= diff;
|
||||
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
}else if(!Submerged)
|
||||
return;
|
||||
else if(Submerged)//phase 2, submerged
|
||||
{
|
||||
if(PhaseTimer < diff)
|
||||
{
|
||||
Submerged = false;
|
||||
m_creature->InterruptNonMeleeSpells(false);//shouldn't be any
|
||||
m_creature->RemoveAllAuras();
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->RemoveFlag(UNIT_NPC_EMOTESTATE,EMOTE_STATE_SUBMERGED);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_BYTES_1,9);
|
||||
DoCast(m_creature,SPELL_EMERGE);
|
||||
Spawned = false;
|
||||
SpoutTimer = 4000; // directly cast Spout after emerging!
|
||||
WhirlTimer = 26000;
|
||||
PhaseTimer = 120000;
|
||||
return;
|
||||
}else PhaseTimer-=diff;
|
||||
}else if(!Submerged)
|
||||
return;
|
||||
else if(Submerged)//phase 2, submerged
|
||||
{
|
||||
if(PhaseTimer < diff)
|
||||
{
|
||||
Submerged = false;
|
||||
m_creature->InterruptNonMeleeSpells(false);//shouldn't be any
|
||||
m_creature->RemoveAllAuras();
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->RemoveFlag(UNIT_NPC_EMOTESTATE,EMOTE_STATE_SUBMERGED);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_BYTES_1,9);
|
||||
DoCast(m_creature,SPELL_EMERGE);
|
||||
Spawned = false;
|
||||
SpoutTimer = 4000; // directly cast Spout after emerging!
|
||||
WhirlTimer = 26000;
|
||||
PhaseTimer = 120000;
|
||||
return;
|
||||
}else PhaseTimer-=diff;
|
||||
|
||||
if(!m_creature->isInCombat())
|
||||
m_creature->SetInCombatState(false);
|
||||
if(!m_creature->isInCombat())
|
||||
m_creature->SetInCombatState(false);
|
||||
|
||||
if(!Spawned)
|
||||
{
|
||||
m_creature->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//spawn adds
|
||||
if(!Spawned)
|
||||
{
|
||||
m_creature->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//spawn adds
|
||||
for (uint8 i = 0; i < 9; ++i)
|
||||
{
|
||||
Creature* Summoned;
|
||||
if(i < 7)
|
||||
if(i < 7)
|
||||
Summoned = m_creature->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[i][0],AddPos[i][1],AddPos[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
else Summoned = m_creature->SummonCreature(MOB_COILFANG_GUARDIAN,AddPos[i][0],AddPos[i][1],AddPos[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
|
||||
@@ -396,66 +396,66 @@ CreatureAI* GetAI_mob_coilfang_guardian(Creature *_Creature)
|
||||
ai->Spell[1].First_Cast = 2000;
|
||||
ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET;
|
||||
|
||||
return ai;
|
||||
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);
|
||||
{
|
||||
Reset();
|
||||
SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SHOOT);
|
||||
if(TempSpell)
|
||||
TempSpell->Effect[0] = 2;//change spell effect from weapon % dmg to simple phisical dmg
|
||||
}
|
||||
TempSpell->Effect[0] = 2;//change spell effect from weapon % dmg to simple phisical dmg
|
||||
}
|
||||
|
||||
uint32 MultiShotTimer;
|
||||
uint32 ShootBowTimer;
|
||||
uint32 MultiShotTimer;
|
||||
uint32 ShootBowTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
MultiShotTimer = 10000;
|
||||
ShootBowTimer = 4000;
|
||||
MultiShotTimer = 10000;
|
||||
ShootBowTimer = 4000;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!who || m_creature->getVictim()) return;
|
||||
|
||||
if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(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);
|
||||
if (!who || m_creature->getVictim()) return;
|
||||
|
||||
MultiShotTimer = 10000;
|
||||
ShootBowTimer += 1500;//add global cooldown
|
||||
}else MultiShotTimer -= diff;
|
||||
if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
||||
{
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
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)
|
||||
@@ -476,12 +476,12 @@ void AddSC_boss_the_lurker_below()
|
||||
newscript->GetAI = &GetAI_boss_the_lurker_below;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="mob_coilfang_guardian";
|
||||
newscript->GetAI = &GetAI_mob_coilfang_guardian;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="mob_coilfang_ambusher";
|
||||
newscript->GetAI = &GetAI_mob_coilfang_ambusher;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
+52
-52
@@ -55,27 +55,27 @@ EndScriptData */
|
||||
#define WATERY_GRAVE_Y4 -690.96
|
||||
#define WATERY_GRAVE_Z4 -14.44
|
||||
|
||||
#define SPELL_WATERY_GRAVE_1 38023
|
||||
#define SPELL_WATERY_GRAVE_2 38024
|
||||
#define SPELL_WATERY_GRAVE_3 38025
|
||||
#define SPELL_WATERY_GRAVE_4 37850
|
||||
#define SPELL_WATERY_GRAVE_1 38023
|
||||
#define SPELL_WATERY_GRAVE_2 38024
|
||||
#define SPELL_WATERY_GRAVE_3 38025
|
||||
#define SPELL_WATERY_GRAVE_4 37850
|
||||
|
||||
#define SPELL_SUMMON_WATER_GLOBULE_1 37854
|
||||
#define SPELL_SUMMON_WATER_GLOBULE_2 37858
|
||||
#define SPELL_SUMMON_WATER_GLOBULE_3 37860
|
||||
#define SPELL_SUMMON_WATER_GLOBULE_4 37861
|
||||
#define SPELL_SUMMON_WATER_GLOBULE_1 37854
|
||||
#define SPELL_SUMMON_WATER_GLOBULE_2 37858
|
||||
#define SPELL_SUMMON_WATER_GLOBULE_3 37860
|
||||
#define SPELL_SUMMON_WATER_GLOBULE_4 37861
|
||||
|
||||
/*#define SPELL_SUMMON_MURLOC_A6 39813
|
||||
#define SPELL_SUMMON_MURLOC_A7 39814
|
||||
#define SPELL_SUMMON_MURLOC_A8 39815
|
||||
#define SPELL_SUMMON_MURLOC_A9 39816
|
||||
#define SPELL_SUMMON_MURLOC_A10 39817
|
||||
/*#define SPELL_SUMMON_MURLOC_A6 39813
|
||||
#define SPELL_SUMMON_MURLOC_A7 39814
|
||||
#define SPELL_SUMMON_MURLOC_A8 39815
|
||||
#define SPELL_SUMMON_MURLOC_A9 39816
|
||||
#define SPELL_SUMMON_MURLOC_A10 39817
|
||||
|
||||
#define SPELL_SUMMON_MURLOC_B6 39818
|
||||
#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_B6 39818
|
||||
#define SPELL_SUMMON_MURLOC_B7 39819
|
||||
#define SPELL_SUMMON_MURLOC_B8 39820
|
||||
#define SPELL_SUMMON_MURLOC_B9 39821
|
||||
#define SPELL_SUMMON_MURLOC_B10 39822*/
|
||||
|
||||
float MurlocCords[10][5] =
|
||||
{
|
||||
@@ -105,7 +105,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
Map::PlayerList const *PlayerList;
|
||||
Map::PlayerList const *PlayerList;
|
||||
|
||||
uint32 TidalWave_Timer;
|
||||
uint32 WateryGrave_Timer;
|
||||
@@ -124,7 +124,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
WateryGrave_Timer = 30000;
|
||||
Earthquake_Timer = 40000;
|
||||
WateryGlobules_Timer = 0;
|
||||
globulespell[0] = SPELL_SUMMON_WATER_GLOBULE_1;
|
||||
globulespell[0] = SPELL_SUMMON_WATER_GLOBULE_1;
|
||||
globulespell[1] = SPELL_SUMMON_WATER_GLOBULE_2;
|
||||
globulespell[2] = SPELL_SUMMON_WATER_GLOBULE_3;
|
||||
globulespell[3] = SPELL_SUMMON_WATER_GLOBULE_4;
|
||||
@@ -148,9 +148,9 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_SLAY3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_SLAY3, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,18 +162,18 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
PlayerList = &((InstanceMap*)m_creature->GetMap())->GetPlayers();
|
||||
Playercount = PlayerList->getSize();
|
||||
StartEvent();
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyWateryGrave(Unit *player, uint8 i)
|
||||
{
|
||||
switch(i)
|
||||
switch(i)
|
||||
{
|
||||
case 0: player->CastSpell(player, SPELL_WATERY_GRAVE_1, true); break;
|
||||
case 0: player->CastSpell(player, SPELL_WATERY_GRAVE_1, true); break;
|
||||
case 1: player->CastSpell(player, SPELL_WATERY_GRAVE_2, true); break;
|
||||
case 2: player->CastSpell(player, SPELL_WATERY_GRAVE_3, true); break;
|
||||
case 3: player->CastSpell(player, SPELL_WATERY_GRAVE_4, true); break;
|
||||
@@ -203,17 +203,17 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
||||
}
|
||||
|
||||
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;
|
||||
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
|
||||
if (TidalWave_Timer < diff)
|
||||
@@ -229,21 +229,21 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
{
|
||||
//Teleport 4 players under the waterfalls
|
||||
Unit *target;
|
||||
using std::set;
|
||||
using std::set;
|
||||
set<int>list;
|
||||
set<int>::iterator itr;
|
||||
for(uint8 i = 0; i < 4; i++)
|
||||
{
|
||||
counter = 0;
|
||||
do{target = SelectUnit(SELECT_TARGET_RANDOM, 1, 50, true); //target players only
|
||||
if(counter < Playercount)
|
||||
break;
|
||||
if(target) itr = list.find(target->GetGUID());
|
||||
counter++;
|
||||
}while(itr != list.end());
|
||||
if(target){list.insert(target->GetGUID());
|
||||
ApplyWateryGrave(target, i);
|
||||
}
|
||||
counter = 0;
|
||||
do{target = SelectUnit(SELECT_TARGET_RANDOM, 1, 50, true); //target players only
|
||||
if(counter < Playercount)
|
||||
break;
|
||||
if(target) itr = list.find(target->GetGUID());
|
||||
counter++;
|
||||
}while(itr != list.end());
|
||||
if(target){list.insert(target->GetGUID());
|
||||
ApplyWateryGrave(target, i);
|
||||
}
|
||||
}
|
||||
|
||||
switch(rand()%2)
|
||||
@@ -265,7 +265,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
//WateryGlobules_Timer
|
||||
if (WateryGlobules_Timer < diff)
|
||||
{
|
||||
Unit* globuletarget;
|
||||
Unit* globuletarget;
|
||||
using std::set;
|
||||
set<int>globulelist;
|
||||
set<int>::iterator itr;
|
||||
@@ -333,7 +333,7 @@ struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI
|
||||
{
|
||||
if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5))
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_GLOBULE_EXPLOSION);
|
||||
DoCast(m_creature->getVictim(), SPELL_GLOBULE_EXPLOSION);
|
||||
|
||||
//despawn
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
|
||||
+105
-105
@@ -39,11 +39,11 @@ bool GOHello_go_bridge_console(Player *player, GameObject* go)
|
||||
{
|
||||
ScriptedInstance* pInstance = (ScriptedInstance*)go->GetInstanceData();
|
||||
|
||||
if(!pInstance)
|
||||
return false;
|
||||
if(!pInstance)
|
||||
return false;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_CONTROL_CONSOLE, DONE);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_CONTROL_CONSOLE, DONE);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -52,40 +52,40 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
{
|
||||
instance_serpentshrine_cavern(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
|
||||
uint64 LurkerBelow;
|
||||
uint64 LurkerBelow;
|
||||
uint64 Sharkkis;
|
||||
uint64 Tidalvess;
|
||||
uint64 Caribdis;
|
||||
uint64 LadyVashj;
|
||||
uint64 Karathress;
|
||||
uint64 KarathressEvent_Starter;
|
||||
uint64 LeotherasTheBlind;
|
||||
uint64 LeotherasEventStarter;
|
||||
uint64 LeotherasTheBlind;
|
||||
uint64 LeotherasEventStarter;
|
||||
|
||||
uint64 ControlConsole;
|
||||
uint64 BridgePart[3];
|
||||
uint64 StrangePool;
|
||||
uint64 ControlConsole;
|
||||
uint64 BridgePart[3];
|
||||
uint64 StrangePool;
|
||||
|
||||
bool ShieldGeneratorDeactivated[4];
|
||||
bool Encounters[ENCOUNTERS];
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
LurkerBelow = 0;
|
||||
LurkerBelow = 0;
|
||||
Sharkkis = 0;
|
||||
Tidalvess = 0;
|
||||
Caribdis = 0;
|
||||
LadyVashj = 0;
|
||||
Karathress = 0;
|
||||
KarathressEvent_Starter = 0;
|
||||
LeotherasTheBlind = 0;
|
||||
LeotherasEventStarter = 0;
|
||||
LeotherasTheBlind = 0;
|
||||
LeotherasEventStarter = 0;
|
||||
|
||||
ControlConsole = 0;
|
||||
BridgePart[0] = 0;
|
||||
BridgePart[1] = 0;
|
||||
BridgePart[2] = 0;
|
||||
StrangePool = 0;
|
||||
ControlConsole = 0;
|
||||
BridgePart[0] = 0;
|
||||
BridgePart[1] = 0;
|
||||
BridgePart[2] = 0;
|
||||
StrangePool = 0;
|
||||
|
||||
ShieldGeneratorDeactivated[0] = false;
|
||||
ShieldGeneratorDeactivated[1] = false;
|
||||
@@ -104,37 +104,37 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnObjectCreate(GameObject *go)
|
||||
void OnObjectCreate(GameObject *go)
|
||||
{
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 184568:
|
||||
ControlConsole = go->GetGUID();
|
||||
go->setActive(true);
|
||||
case 184568:
|
||||
ControlConsole = go->GetGUID();
|
||||
go->setActive(true);
|
||||
break;
|
||||
|
||||
case 184203:
|
||||
BridgePart[0] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
BridgePart[0] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
break;
|
||||
|
||||
case 184204:
|
||||
BridgePart[1] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
BridgePart[1] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
break;
|
||||
|
||||
case 184205:
|
||||
BridgePart[2] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
case 184205:
|
||||
BridgePart[2] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
break;
|
||||
case 184956:
|
||||
StrangePool = go->GetGUID();
|
||||
if(go->isActive())
|
||||
SetData(DATA_STRANGE_POOL, DONE);
|
||||
case 184956:
|
||||
StrangePool = go->GetGUID();
|
||||
if(go->isActive())
|
||||
SetData(DATA_STRANGE_POOL, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
void OpenDoor(uint64 DoorGUID, bool open)
|
||||
void OpenDoor(uint64 DoorGUID, bool open)
|
||||
{
|
||||
if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID))
|
||||
Door->SetGoState(open ? 0 : 1);
|
||||
@@ -144,36 +144,36 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
{
|
||||
switch(creature_entry)
|
||||
{
|
||||
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;}
|
||||
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;}
|
||||
}
|
||||
|
||||
void SetData64(uint32 type, uint64 data)
|
||||
{
|
||||
if(type == DATA_KARATHRESSEVENT_STARTER)
|
||||
KarathressEvent_Starter = data;
|
||||
if(type == DATA_LEOTHERAS_EVENT_STARTER)
|
||||
LeotherasEventStarter = data;
|
||||
KarathressEvent_Starter = data;
|
||||
if(type == DATA_LEOTHERAS_EVENT_STARTER)
|
||||
LeotherasEventStarter = data;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
{
|
||||
switch(identifier)
|
||||
{
|
||||
case DATA_THELURKERBELOW: return LurkerBelow;
|
||||
case DATA_SHARKKIS: return Sharkkis;
|
||||
case DATA_TIDALVESS: return Tidalvess;
|
||||
case DATA_CARIBDIS: return Caribdis;
|
||||
case DATA_LADYVASHJ: return LadyVashj;
|
||||
case DATA_KARATHRESS: return Karathress;
|
||||
case DATA_KARATHRESSEVENT_STARTER: return KarathressEvent_Starter;
|
||||
case DATA_LEOTHERAS: return LeotherasTheBlind;
|
||||
case DATA_LEOTHERAS_EVENT_STARTER: return LeotherasEventStarter;
|
||||
case DATA_THELURKERBELOW: return LurkerBelow;
|
||||
case DATA_SHARKKIS: return Sharkkis;
|
||||
case DATA_TIDALVESS: return Tidalvess;
|
||||
case DATA_CARIBDIS: return Caribdis;
|
||||
case DATA_LADYVASHJ: return LadyVashj;
|
||||
case DATA_KARATHRESS: return Karathress;
|
||||
case DATA_KARATHRESSEVENT_STARTER: return KarathressEvent_Starter;
|
||||
case DATA_LEOTHERAS: return LeotherasTheBlind;
|
||||
case DATA_LEOTHERAS_EVENT_STARTER: return LeotherasEventStarter;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -182,63 +182,63 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case DATA_STRANGE_POOL: StrangePool = data;
|
||||
case DATA_CONTROL_CONSOLE:
|
||||
if(data = DONE)
|
||||
{
|
||||
OpenDoor(BridgePart[0], true);
|
||||
OpenDoor(BridgePart[1], true);
|
||||
OpenDoor(BridgePart[2], true);
|
||||
}
|
||||
ControlConsole = data;
|
||||
case DATA_HYDROSSTHEUNSTABLEEVENT: Encounters[0] = data; break;
|
||||
case DATA_LEOTHERASTHEBLINDEVENT: Encounters[1] = data; break;
|
||||
case DATA_THELURKERBELOWEVENT: Encounters[2] = data; break;
|
||||
case DATA_KARATHRESSEVENT: Encounters[3] = data; break;
|
||||
case DATA_MOROGRIMTIDEWALKEREVENT: Encounters[4] = data; break;
|
||||
//Lady Vashj
|
||||
case DATA_LADYVASHJEVENT:
|
||||
if(data == NOT_STARTED)
|
||||
{
|
||||
ShieldGeneratorDeactivated[0] = false;
|
||||
ShieldGeneratorDeactivated[1] = false;
|
||||
ShieldGeneratorDeactivated[2] = false;
|
||||
ShieldGeneratorDeactivated[3] = false;
|
||||
}
|
||||
Encounters[5] = data; break;
|
||||
case DATA_SHIELDGENERATOR1:ShieldGeneratorDeactivated[0] = (data) ? true : false; break;
|
||||
case DATA_SHIELDGENERATOR2:ShieldGeneratorDeactivated[1] = (data) ? true : false; break;
|
||||
case DATA_SHIELDGENERATOR3:ShieldGeneratorDeactivated[2] = (data) ? true : false; break;
|
||||
case DATA_SHIELDGENERATOR4:ShieldGeneratorDeactivated[3] = (data) ? true : false; break;
|
||||
}
|
||||
case DATA_STRANGE_POOL: StrangePool = data;
|
||||
case DATA_CONTROL_CONSOLE:
|
||||
if(data = DONE)
|
||||
{
|
||||
OpenDoor(BridgePart[0], true);
|
||||
OpenDoor(BridgePart[1], true);
|
||||
OpenDoor(BridgePart[2], true);
|
||||
}
|
||||
ControlConsole = data;
|
||||
case DATA_HYDROSSTHEUNSTABLEEVENT: Encounters[0] = data; break;
|
||||
case DATA_LEOTHERASTHEBLINDEVENT: Encounters[1] = data; break;
|
||||
case DATA_THELURKERBELOWEVENT: Encounters[2] = data; break;
|
||||
case DATA_KARATHRESSEVENT: Encounters[3] = data; break;
|
||||
case DATA_MOROGRIMTIDEWALKEREVENT: Encounters[4] = data; break;
|
||||
//Lady Vashj
|
||||
case DATA_LADYVASHJEVENT:
|
||||
if(data == NOT_STARTED)
|
||||
{
|
||||
ShieldGeneratorDeactivated[0] = false;
|
||||
ShieldGeneratorDeactivated[1] = false;
|
||||
ShieldGeneratorDeactivated[2] = false;
|
||||
ShieldGeneratorDeactivated[3] = false;
|
||||
}
|
||||
Encounters[5] = data; break;
|
||||
case DATA_SHIELDGENERATOR1:ShieldGeneratorDeactivated[0] = (data) ? true : false; break;
|
||||
case DATA_SHIELDGENERATOR2:ShieldGeneratorDeactivated[1] = (data) ? true : false; break;
|
||||
case DATA_SHIELDGENERATOR3:ShieldGeneratorDeactivated[2] = (data) ? true : false; break;
|
||||
case DATA_SHIELDGENERATOR4:ShieldGeneratorDeactivated[3] = (data) ? true : false; break;
|
||||
}
|
||||
|
||||
if(data = DONE)
|
||||
SaveToDB();
|
||||
if(data = DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case DATA_HYDROSSTHEUNSTABLEEVENT: return Encounters[0];
|
||||
case DATA_LEOTHERASTHEBLINDEVENT: return Encounters[1];
|
||||
case DATA_THELURKERBELOWEVENT: return Encounters[2];
|
||||
case DATA_KARATHRESSEVENT: return Encounters[3];
|
||||
case DATA_MOROGRIMTIDEWALKEREVENT: return Encounters[4];
|
||||
case DATA_HYDROSSTHEUNSTABLEEVENT: return Encounters[0];
|
||||
case DATA_LEOTHERASTHEBLINDEVENT: return Encounters[1];
|
||||
case DATA_THELURKERBELOWEVENT: return Encounters[2];
|
||||
case DATA_KARATHRESSEVENT: return Encounters[3];
|
||||
case DATA_MOROGRIMTIDEWALKEREVENT: return Encounters[4];
|
||||
//Lady Vashj
|
||||
case DATA_LADYVASHJEVENT: return Encounters[5];
|
||||
case DATA_SHIELDGENERATOR1: return ShieldGeneratorDeactivated[0];
|
||||
case DATA_SHIELDGENERATOR2: return ShieldGeneratorDeactivated[1];
|
||||
case DATA_SHIELDGENERATOR3: return ShieldGeneratorDeactivated[2];
|
||||
case DATA_SHIELDGENERATOR4: return ShieldGeneratorDeactivated[3];
|
||||
case DATA_LADYVASHJEVENT: return Encounters[5];
|
||||
case DATA_SHIELDGENERATOR1: return ShieldGeneratorDeactivated[0];
|
||||
case DATA_SHIELDGENERATOR2: return ShieldGeneratorDeactivated[1];
|
||||
case DATA_SHIELDGENERATOR3: return ShieldGeneratorDeactivated[2];
|
||||
case DATA_SHIELDGENERATOR4: return ShieldGeneratorDeactivated[3];
|
||||
case DATA_CANSTARTPHASE3:
|
||||
if(ShieldGeneratorDeactivated[0] && ShieldGeneratorDeactivated[1] && ShieldGeneratorDeactivated[2] && ShieldGeneratorDeactivated[3])return 1;break;
|
||||
if(ShieldGeneratorDeactivated[0] && ShieldGeneratorDeactivated[1] && ShieldGeneratorDeactivated[2] && ShieldGeneratorDeactivated[3])return 1;break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
const char* Save()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
const char* Save()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
std::ostringstream stream;
|
||||
stream << Encounters[0] << " " << Encounters[1] << " " << Encounters[2] << " "
|
||||
<< Encounters[3] << " " << Encounters[4] << " " << Encounters[5];
|
||||
@@ -262,11 +262,11 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
std::istringstream stream(in);
|
||||
stream >> Encounters[0] >> Encounters[1] >> Encounters[2] >> Encounters[3]
|
||||
>> Encounters[4] >> Encounters[5];
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if(Encounters[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
|
||||
Encounters[i] = NOT_STARTED;
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
>> Encounters[4] >> Encounters[5];
|
||||
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if(Encounters[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
|
||||
Encounters[i] = NOT_STARTED;
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -284,8 +284,8 @@ void AddSC_instance_serpentshrine_cavern()
|
||||
newscript->GetInstanceData = &GetInstanceData_instance_serpentshrine_cavern;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="go_bridge_console";
|
||||
newscript->pGOHello = &GOHello_go_bridge_console;
|
||||
newscript->RegisterSelf();
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
+67
-67
@@ -38,33 +38,33 @@ EndScriptData */
|
||||
|
||||
bool GOHello_go_main_chambers_access_panel(Player *player, GameObject* _GO)
|
||||
{
|
||||
ScriptedInstance* pInstance = (ScriptedInstance*)_GO->GetInstanceData();
|
||||
ScriptedInstance* pInstance = (ScriptedInstance*)_GO->GetInstanceData();
|
||||
|
||||
if (!pInstance)
|
||||
return false;
|
||||
if (!pInstance)
|
||||
return false;
|
||||
|
||||
if (_GO->GetEntry() == ACCESS_PANEL_HYDRO && pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE)
|
||||
pInstance->SetData(TYPE_HYDROMANCER_THESPIA,SPECIAL);
|
||||
if (_GO->GetEntry() == ACCESS_PANEL_HYDRO && pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE)
|
||||
pInstance->SetData(TYPE_HYDROMANCER_THESPIA,SPECIAL);
|
||||
|
||||
if (_GO->GetEntry() == ACCESS_PANEL_MEK && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE)
|
||||
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER,SPECIAL);
|
||||
if (_GO->GetEntry() == ACCESS_PANEL_MEK && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE)
|
||||
pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER,SPECIAL);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
|
||||
{
|
||||
instance_steam_vault(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
|
||||
uint32 Encounter[ENCOUNTERS];
|
||||
uint32 Encounter[ENCOUNTERS];
|
||||
|
||||
uint64 ThespiaGUID;
|
||||
uint64 MekgineerGUID;
|
||||
uint64 KalithreshGUID;
|
||||
|
||||
uint64 MainChambersDoor;
|
||||
uint64 AccessPanelHydro;
|
||||
uint64 AccessPanelMek;
|
||||
uint64 MainChambersDoor;
|
||||
uint64 AccessPanelHydro;
|
||||
uint64 AccessPanelMek;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
@@ -72,46 +72,46 @@ struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
|
||||
MekgineerGUID = 0;
|
||||
KalithreshGUID = 0;
|
||||
MainChambersDoor = 0;
|
||||
AccessPanelHydro = 0;
|
||||
AccessPanelMek = 0;
|
||||
AccessPanelHydro = 0;
|
||||
AccessPanelMek = 0;
|
||||
|
||||
for(uint8 i = 0; i < ENCOUNTERS; i++)
|
||||
Encounter[i] = NOT_STARTED;
|
||||
Encounter[i] = NOT_STARTED;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for(uint8 i = 0; i < ENCOUNTERS; i++)
|
||||
if (Encounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
if (Player* plr = itr->getSource())
|
||||
return plr;
|
||||
}
|
||||
}
|
||||
|
||||
debug_log("SD2: Instance Steamvault: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
}
|
||||
debug_log("SD2: Instance Steamvault: GetPlayerInMap, but PlayerList is empty!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature *creature, uint32 creature_entry)
|
||||
{
|
||||
switch(creature->GetEntry())
|
||||
{
|
||||
case 17797: ThespiaGUID = creature->GetGUID(); break;
|
||||
case 17796: MekgineerGUID = creature->GetGUID(); break;
|
||||
case 17798: KalithreshGUID = creature->GetGUID(); break;
|
||||
case 17797: ThespiaGUID = creature->GetGUID(); break;
|
||||
case 17796: MekgineerGUID = creature->GetGUID(); break;
|
||||
case 17798: KalithreshGUID = creature->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,51 +119,51 @@ struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
|
||||
{
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case MAIN_CHAMBERS_DOOR: MainChambersDoor = go->GetGUID(); break;
|
||||
case ACCESS_PANEL_HYDRO: AccessPanelHydro = go->GetGUID(); break;
|
||||
case ACCESS_PANEL_MEK: AccessPanelMek = go->GetGUID(); break;
|
||||
case MAIN_CHAMBERS_DOOR: MainChambersDoor = go->GetGUID(); break;
|
||||
case ACCESS_PANEL_HYDRO: AccessPanelHydro = go->GetGUID(); break;
|
||||
case ACCESS_PANEL_MEK: AccessPanelMek = go->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
Player *player = GetPlayerInMap();
|
||||
Player *player = GetPlayerInMap();
|
||||
|
||||
if (!player)
|
||||
{
|
||||
debug_log("SD2: Instance Steamvault: SetData (Type: %u Data %u) cannot find any player.", type, data);
|
||||
return;
|
||||
}
|
||||
if (!player)
|
||||
{
|
||||
debug_log("SD2: Instance Steamvault: SetData (Type: %u Data %u) cannot find any player.", type, data);
|
||||
return;
|
||||
}
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_HYDROMANCER_THESPIA:
|
||||
if (data == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,AccessPanelHydro))
|
||||
_go->SetGoState(0);
|
||||
if (data == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,AccessPanelHydro))
|
||||
_go->SetGoState(0);
|
||||
|
||||
if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,MainChambersDoor))
|
||||
_go->SetGoState(0);
|
||||
}
|
||||
debug_log("SD2: Instance Steamvault: Access panel used.");
|
||||
}
|
||||
Encounter[0] = data;
|
||||
break;
|
||||
if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,MainChambersDoor))
|
||||
_go->SetGoState(0);
|
||||
}
|
||||
debug_log("SD2: Instance Steamvault: Access panel used.");
|
||||
}
|
||||
Encounter[0] = data;
|
||||
break;
|
||||
case TYPE_MEKGINEER_STEAMRIGGER:
|
||||
if (data == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,AccessPanelMek))
|
||||
_go->SetGoState(0);
|
||||
if (data == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,AccessPanelMek))
|
||||
_go->SetGoState(0);
|
||||
|
||||
if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL)
|
||||
{
|
||||
if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL)
|
||||
{
|
||||
if (GameObject *_go = GameObject::GetGameObject(*player,MainChambersDoor))
|
||||
_go->SetGoState(0);
|
||||
}
|
||||
debug_log("SD2: Instance Steamvault: Access panel used.");
|
||||
}
|
||||
debug_log("SD2: Instance Steamvault: Access panel used.");
|
||||
}
|
||||
Encounter[1] = data;
|
||||
break;
|
||||
@@ -216,10 +216,10 @@ void AddSC_instance_steam_vault()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "go_main_chambers_access_panel";
|
||||
newscript->pGOHello = &GOHello_go_main_chambers_access_panel;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name = "go_main_chambers_access_panel";
|
||||
newscript->pGOHello = &GOHello_go_main_chambers_access_panel;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "instance_steam_vault";
|
||||
|
||||
@@ -554,79 +554,79 @@ bool GOHello_go_second_trial(Player *player, GameObject* _GO)
|
||||
## npc_apprentice_mirveda
|
||||
######*/
|
||||
|
||||
#define QUEST_UNEXPECTED_RESULT 8488
|
||||
#define MOB_GHARZUL 15958
|
||||
#define MOB_ANGERSHADE 15656
|
||||
#define QUEST_UNEXPECTED_RESULT 8488
|
||||
#define MOB_GHARZUL 15958
|
||||
#define MOB_ANGERSHADE 15656
|
||||
|
||||
struct TRINITY_DLL_DECL npc_apprentice_mirvedaAI : public ScriptedAI
|
||||
{
|
||||
npc_apprentice_mirvedaAI(Creature* c) : ScriptedAI(c), Summons(m_creature) {Reset();}
|
||||
npc_apprentice_mirvedaAI(Creature* c) : ScriptedAI(c), Summons(m_creature) {Reset();}
|
||||
|
||||
uint32 KillCount;
|
||||
uint64 PlayerGUID;
|
||||
bool Summon;
|
||||
SummonList Summons;
|
||||
uint32 KillCount;
|
||||
uint64 PlayerGUID;
|
||||
bool Summon;
|
||||
SummonList Summons;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
KillCount = 0;
|
||||
PlayerGUID = 0;
|
||||
Summons.DespawnAll();
|
||||
Summon = false;
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
KillCount = 0;
|
||||
PlayerGUID = 0;
|
||||
Summons.DespawnAll();
|
||||
Summon = false;
|
||||
}
|
||||
|
||||
void Aggro(Unit* who){}
|
||||
void Aggro(Unit* who){}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summoned)
|
||||
{
|
||||
Summons.Despawn(summoned);
|
||||
++KillCount;
|
||||
}
|
||||
void SummonedCreatureDespawn(Creature* summoned)
|
||||
{
|
||||
Summons.Despawn(summoned);
|
||||
++KillCount;
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player)
|
||||
((Player*)player)->FailQuest(QUEST_UNEXPECTED_RESULT);
|
||||
}
|
||||
}
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player)
|
||||
((Player*)player)->FailQuest(QUEST_UNEXPECTED_RESULT);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(KillCount >= 3)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if(player)
|
||||
((Player*)player)->CompleteQuest(QUEST_UNEXPECTED_RESULT);
|
||||
}
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(KillCount >= 3)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if(player)
|
||||
((Player*)player)->CompleteQuest(QUEST_UNEXPECTED_RESULT);
|
||||
}
|
||||
}
|
||||
|
||||
if(Summon)
|
||||
{
|
||||
m_creature->SummonCreature(MOB_GHARZUL, 8745, -7134.32, 35.22, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
|
||||
m_creature->SummonCreature(MOB_ANGERSHADE, 8745, -7134.32, 35.22, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
|
||||
m_creature->SummonCreature(MOB_ANGERSHADE, 8745, -7134.32, 35.22, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
|
||||
Summon = false;
|
||||
}
|
||||
}
|
||||
if(Summon)
|
||||
{
|
||||
m_creature->SummonCreature(MOB_GHARZUL, 8745, -7134.32, 35.22, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
|
||||
m_creature->SummonCreature(MOB_ANGERSHADE, 8745, -7134.32, 35.22, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
|
||||
m_creature->SummonCreature(MOB_ANGERSHADE, 8745, -7134.32, 35.22, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
|
||||
Summon = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_apprentice_mirveda(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_UNEXPECTED_RESULT)
|
||||
{
|
||||
((npc_apprentice_mirvedaAI*)creature->AI())->Summon = true;
|
||||
((npc_apprentice_mirvedaAI*)creature->AI())->PlayerGUID = player->GetGUID();
|
||||
((npc_apprentice_mirvedaAI*)creature->AI())->Summon = true;
|
||||
((npc_apprentice_mirvedaAI*)creature->AI())->PlayerGUID = player->GetGUID();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -640,9 +640,9 @@ CreatureAI* GetAI_npc_apprentice_mirvedaAI(Creature *_Creature)
|
||||
## npc_infused_crystal
|
||||
######*/
|
||||
|
||||
#define MOB_ENRAGED_WRAITH 17086
|
||||
#define EMOTE -1000283
|
||||
#define QUEST_POWERING_OUR_DEFENSES 8490
|
||||
#define MOB_ENRAGED_WRAITH 17086
|
||||
#define EMOTE -1000283
|
||||
#define QUEST_POWERING_OUR_DEFENSES 8490
|
||||
|
||||
struct Location
|
||||
{
|
||||
@@ -651,97 +651,97 @@ struct Location
|
||||
|
||||
static Location SpawnLocations[]=
|
||||
{
|
||||
{8270.68, -7188.53, 139.619},
|
||||
{8284.27, -7187.78, 139.603},
|
||||
{8297.43, -7193.53, 139.603},
|
||||
{8303.5, -7201.96, 139.577},
|
||||
{8273.22, -7241.82, 139.382},
|
||||
{8254.89, -7222.12, 139.603},
|
||||
{8278.51, -7242.13, 139.162},
|
||||
{8267.97, -7239.17, 139.517}
|
||||
{8270.68, -7188.53, 139.619},
|
||||
{8284.27, -7187.78, 139.603},
|
||||
{8297.43, -7193.53, 139.603},
|
||||
{8303.5, -7201.96, 139.577},
|
||||
{8273.22, -7241.82, 139.382},
|
||||
{8254.89, -7222.12, 139.603},
|
||||
{8278.51, -7242.13, 139.162},
|
||||
{8267.97, -7239.17, 139.517}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_infused_crystalAI : public Scripted_NoMovementAI
|
||||
{
|
||||
npc_infused_crystalAI(Creature* c) : Scripted_NoMovementAI(c) {Reset();}
|
||||
npc_infused_crystalAI(Creature* c) : Scripted_NoMovementAI(c) {Reset();}
|
||||
|
||||
uint32 EndTimer;
|
||||
uint32 WaveTimer;
|
||||
bool Completed;
|
||||
bool Progress;
|
||||
uint64 PlayerGUID;
|
||||
uint32 EndTimer;
|
||||
uint32 WaveTimer;
|
||||
bool Completed;
|
||||
bool Progress;
|
||||
uint64 PlayerGUID;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
EndTimer = 0;
|
||||
Completed = false;
|
||||
Progress = false;
|
||||
PlayerGUID = 0;
|
||||
WaveTimer = 0;
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
EndTimer = 0;
|
||||
Completed = false;
|
||||
Progress = false;
|
||||
PlayerGUID = 0;
|
||||
WaveTimer = 0;
|
||||
}
|
||||
|
||||
void Aggro(Unit* who){}
|
||||
void Aggro(Unit* who){}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if( who->GetTypeId() == TYPEID_PLAYER && !m_creature->canStartAttack(who) && !Progress)
|
||||
{
|
||||
if( ((Player*)who)->GetQuestStatus(QUEST_POWERING_OUR_DEFENSES) == QUEST_STATUS_INCOMPLETE )
|
||||
{
|
||||
float Radius = 10.0;
|
||||
if( m_creature->IsWithinDistInMap(who, Radius) )
|
||||
{
|
||||
PlayerGUID = who->GetGUID();
|
||||
WaveTimer = 1000;
|
||||
EndTimer = 60000;
|
||||
Progress = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if( who->GetTypeId() == TYPEID_PLAYER && !m_creature->canStartAttack(who) && !Progress)
|
||||
{
|
||||
if( ((Player*)who)->GetQuestStatus(QUEST_POWERING_OUR_DEFENSES) == QUEST_STATUS_INCOMPLETE )
|
||||
{
|
||||
float Radius = 10.0;
|
||||
if( m_creature->IsWithinDistInMap(who, Radius) )
|
||||
{
|
||||
PlayerGUID = who->GetGUID();
|
||||
WaveTimer = 1000;
|
||||
EndTimer = 60000;
|
||||
Progress = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID && !Completed)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player)
|
||||
((Player*)player)->FailQuest(QUEST_POWERING_OUR_DEFENSES);
|
||||
}
|
||||
}
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID && !Completed)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player)
|
||||
((Player*)player)->FailQuest(QUEST_POWERING_OUR_DEFENSES);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(EndTimer < diff && Progress)
|
||||
{
|
||||
DoScriptText(EMOTE, m_creature);
|
||||
Completed = true;
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if(player)
|
||||
((Player*)player)->CompleteQuest(QUEST_POWERING_OUR_DEFENSES);
|
||||
}
|
||||
m_creature->DealDamage(m_creature,m_creature->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->RemoveCorpse();
|
||||
}else EndTimer -= diff;
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(EndTimer < diff && Progress)
|
||||
{
|
||||
DoScriptText(EMOTE, m_creature);
|
||||
Completed = true;
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if(player)
|
||||
((Player*)player)->CompleteQuest(QUEST_POWERING_OUR_DEFENSES);
|
||||
}
|
||||
m_creature->DealDamage(m_creature,m_creature->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->RemoveCorpse();
|
||||
}else EndTimer -= diff;
|
||||
|
||||
if(WaveTimer < diff && !Completed && Progress)
|
||||
{
|
||||
uint32 ran1 = rand()%8;
|
||||
uint32 ran2 = rand()%8;
|
||||
uint32 ran3 = rand()%8;
|
||||
m_creature->SummonCreature(MOB_ENRAGED_WRAITH, SpawnLocations[ran1].x, SpawnLocations[ran1].y, SpawnLocations[ran1].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
|
||||
m_creature->SummonCreature(MOB_ENRAGED_WRAITH, SpawnLocations[ran2].x, SpawnLocations[ran2].y, SpawnLocations[ran2].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
|
||||
m_creature->SummonCreature(MOB_ENRAGED_WRAITH, SpawnLocations[ran3].x, SpawnLocations[ran3].y, SpawnLocations[ran3].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
|
||||
WaveTimer = 30000;
|
||||
}else WaveTimer -= diff;
|
||||
}
|
||||
if(WaveTimer < diff && !Completed && Progress)
|
||||
{
|
||||
uint32 ran1 = rand()%8;
|
||||
uint32 ran2 = rand()%8;
|
||||
uint32 ran3 = rand()%8;
|
||||
m_creature->SummonCreature(MOB_ENRAGED_WRAITH, SpawnLocations[ran1].x, SpawnLocations[ran1].y, SpawnLocations[ran1].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
|
||||
m_creature->SummonCreature(MOB_ENRAGED_WRAITH, SpawnLocations[ran2].x, SpawnLocations[ran2].y, SpawnLocations[ran2].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
|
||||
m_creature->SummonCreature(MOB_ENRAGED_WRAITH, SpawnLocations[ran3].x, SpawnLocations[ran3].y, SpawnLocations[ran3].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
|
||||
WaveTimer = 30000;
|
||||
}else WaveTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_infused_crystalAI(Creature *_Creature)
|
||||
@@ -782,14 +782,14 @@ void AddSC_eversong_woods()
|
||||
newscript->pGOHello = &GOHello_go_second_trial;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_apprentice_mirveda";
|
||||
newscript->GetAI = &GetAI_npc_apprentice_mirvedaAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_apprentice_mirveda;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_apprentice_mirveda";
|
||||
newscript->GetAI = &GetAI_npc_apprentice_mirvedaAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_apprentice_mirveda;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_infused_crystal";
|
||||
newscript->GetAI = &GetAI_npc_infused_crystalAI;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_infused_crystal";
|
||||
newscript->GetAI = &GetAI_npc_infused_crystalAI;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -149,87 +149,87 @@ bool GOHello_gilded_brazier(Player *player, GameObject* _GO)
|
||||
|
||||
struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI
|
||||
{
|
||||
npc_ranger_lilathaAI(Creature *c) : npc_escortAI(c) {Reset();}
|
||||
npc_ranger_lilathaAI(Creature *c) : npc_escortAI(c) {Reset();}
|
||||
|
||||
std::list<GameObject*> CageList;
|
||||
std::list<GameObject*> CageList;
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
|
||||
if (!player)
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch(i)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
GameObject* Cage = FindGameObject(GO_CAGE, 20, m_creature);
|
||||
if(Cage)
|
||||
Cage->SetGoState(0);
|
||||
DoScriptText(SAY_START, m_creature, player);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
DoScriptText(SAY_PROGRESS1, m_creature, player);
|
||||
case 11:
|
||||
DoScriptText(SAY_PROGRESS2, m_creature, player);
|
||||
m_creature->SetOrientation(4.762841);
|
||||
break;
|
||||
case 18:
|
||||
{
|
||||
DoScriptText(SAY_PROGRESS3, m_creature, player);
|
||||
Creature* Summ1 = m_creature->SummonCreature(16342, 7627.083984, -7532.538086, 152.128616, 1.082733, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
Creature* Summ2 = m_creature->SummonCreature(16343, 7620.432129, -7532.550293, 152.454865, 0.827478, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
Summ1->Attack(m_creature, true);
|
||||
Summ2->Attack(player, true);
|
||||
m_creature->AI()->AttackStart(Summ1);
|
||||
break;
|
||||
}
|
||||
case 19: m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 25: m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 30:
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->GroupEventHappens(QUEST_ESCAPE_FROM_THE_CATACOMBS,m_creature);
|
||||
break;
|
||||
case 32:
|
||||
m_creature->SetOrientation(2.978281);
|
||||
DoScriptText(SAY_END1, m_creature, player);
|
||||
break;
|
||||
case 33:
|
||||
m_creature->SetOrientation(5.858011);
|
||||
DoScriptText(SAY_END2, m_creature, player);
|
||||
Unit* CaptainHelios = FindCreature(NPC_CAPTAIN_HELIOS, 50, m_creature);
|
||||
if(CaptainHelios)
|
||||
DoScriptText(SAY_CAPTAIN_ANSWER, CaptainHelios, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||
GameObject* Cage = FindGameObject(GO_CAGE, 20, m_creature);
|
||||
if(Cage)
|
||||
Cage->SetGoState(0);
|
||||
DoScriptText(SAY_START, m_creature, player);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
DoScriptText(SAY_PROGRESS1, m_creature, player);
|
||||
case 11:
|
||||
DoScriptText(SAY_PROGRESS2, m_creature, player);
|
||||
m_creature->SetOrientation(4.762841);
|
||||
break;
|
||||
case 18:
|
||||
{
|
||||
DoScriptText(SAY_PROGRESS3, m_creature, player);
|
||||
Creature* Summ1 = m_creature->SummonCreature(16342, 7627.083984, -7532.538086, 152.128616, 1.082733, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
Creature* Summ2 = m_creature->SummonCreature(16343, 7620.432129, -7532.550293, 152.454865, 0.827478, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
Summ1->Attack(m_creature, true);
|
||||
Summ2->Attack(player, true);
|
||||
m_creature->AI()->AttackStart(Summ1);
|
||||
break;
|
||||
}
|
||||
case 19: m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 25: m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break;
|
||||
case 30:
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->GroupEventHappens(QUEST_ESCAPE_FROM_THE_CATACOMBS,m_creature);
|
||||
break;
|
||||
case 32:
|
||||
m_creature->SetOrientation(2.978281);
|
||||
DoScriptText(SAY_END1, m_creature, player);
|
||||
break;
|
||||
case 33:
|
||||
m_creature->SetOrientation(5.858011);
|
||||
DoScriptText(SAY_END2, m_creature, player);
|
||||
Unit* CaptainHelios = FindCreature(NPC_CAPTAIN_HELIOS, 50, m_creature);
|
||||
if(CaptainHelios)
|
||||
DoScriptText(SAY_CAPTAIN_ANSWER, CaptainHelios, player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit* who) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (!IsBeingEscorted)
|
||||
m_creature->setFaction(1602);
|
||||
void Reset()
|
||||
{
|
||||
if (!IsBeingEscorted)
|
||||
m_creature->setFaction(1602);
|
||||
|
||||
GameObject* Cage = FindGameObject(GO_CAGE, 20, m_creature);
|
||||
if(Cage)
|
||||
Cage->SetGoState(1);
|
||||
}
|
||||
GameObject* Cage = FindGameObject(GO_CAGE, 20, m_creature);
|
||||
if(Cage)
|
||||
Cage->SetGoState(1);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player)
|
||||
((Player*)player)->FailQuest(QUEST_ESCAPE_FROM_THE_CATACOMBS);
|
||||
}
|
||||
}
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player)
|
||||
((Player*)player)->FailQuest(QUEST_ESCAPE_FROM_THE_CATACOMBS);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
@@ -249,43 +249,43 @@ CreatureAI* GetAI_npc_ranger_lilathaAI(Creature *_Creature)
|
||||
{
|
||||
npc_ranger_lilathaAI* ranger_lilathaAI = new npc_ranger_lilathaAI(_Creature);
|
||||
|
||||
ranger_lilathaAI->AddWaypoint(0, 7545.07, -7359.87, 162.354, 4000); // Say0
|
||||
ranger_lilathaAI->AddWaypoint(1, 7550.048340, -7362.237793, 162.235657);
|
||||
ranger_lilathaAI->AddWaypoint(2, 7566.976074, -7364.315430, 161.738770);
|
||||
ranger_lilathaAI->AddWaypoint(3, 7578.830566, -7361.677734, 161.738770);
|
||||
ranger_lilathaAI->AddWaypoint(4, 7590.969238, -7359.053711, 162.257660);
|
||||
ranger_lilathaAI->AddWaypoint(5, 7598.354004, -7362.815430, 162.256683, 4000); // Say1
|
||||
ranger_lilathaAI->AddWaypoint(6, 7605.861328, -7380.424316, 161.937073);
|
||||
ranger_lilathaAI->AddWaypoint(7, 7605.295410, -7387.382813, 157.253998);
|
||||
ranger_lilathaAI->AddWaypoint(8, 7606.131836, -7393.893555, 156.941925);
|
||||
ranger_lilathaAI->AddWaypoint(9, 7615.207520, -7400.187012, 157.142639);
|
||||
ranger_lilathaAI->AddWaypoint(10, 7618.956543, -7402.652832, 158.202042);
|
||||
ranger_lilathaAI->AddWaypoint(11, 7636.850586, -7401.756836, 162.144791);
|
||||
ranger_lilathaAI->AddWaypoint(12, 7637.058105, -7404.944824, 162.206970, 4000);// Say2
|
||||
ranger_lilathaAI->AddWaypoint(13, 7636.910645, -7412.585449, 162.366425);
|
||||
ranger_lilathaAI->AddWaypoint(14, 7637.607910, -7425.591797, 162.630661);
|
||||
ranger_lilathaAI->AddWaypoint(15, 7637.816895, -7459.057129, 163.302704);
|
||||
ranger_lilathaAI->AddWaypoint(16, 7638.859863, -7470.902344, 162.517059);
|
||||
ranger_lilathaAI->AddWaypoint(17, 7641.395996, -7488.217285, 157.381287);
|
||||
ranger_lilathaAI->AddWaypoint(18, 7634.455566, -7505.451660, 154.682159);
|
||||
ranger_lilathaAI->AddWaypoint(19, 7631.906738, -7516.948730, 153.597382); // say3
|
||||
ranger_lilathaAI->AddWaypoint(20, 7622.231445, -7537.037598, 151.587112);
|
||||
ranger_lilathaAI->AddWaypoint(21, 7610.921875, -7550.670410, 149.639374);
|
||||
ranger_lilathaAI->AddWaypoint(22, 7598.229004, -7562.551758, 145.953888);
|
||||
ranger_lilathaAI->AddWaypoint(23, 7588.509277, -7577.755371, 148.294479);
|
||||
ranger_lilathaAI->AddWaypoint(24, 7567.339355, -7608.456055, 146.006485);
|
||||
ranger_lilathaAI->AddWaypoint(25, 7562.547852, -7617.417969, 148.097504);
|
||||
ranger_lilathaAI->AddWaypoint(26, 7561.508789, -7645.064453, 151.245163);
|
||||
ranger_lilathaAI->AddWaypoint(27, 7563.337402, -7654.652344, 151.227158);
|
||||
ranger_lilathaAI->AddWaypoint(28, 7565.533691, -7658.296387, 151.248886);
|
||||
ranger_lilathaAI->AddWaypoint(29, 7571.155762, -7659.118652, 151.244568);
|
||||
ranger_lilathaAI->AddWaypoint(30, 7579.119629, -7662.213867, 151.651505);
|
||||
ranger_lilathaAI->AddWaypoint(31, 7603.768066, -7667.000488, 153.997726);
|
||||
ranger_lilathaAI->AddWaypoint(32, 7603.768066, -7667.000488, 153.997726, 4000); // Say4 & Set orientation
|
||||
ranger_lilathaAI->AddWaypoint(33, 7603.768066, -7667.000488, 153.997726, 8000); // Say5 & Set orientation
|
||||
ranger_lilathaAI->AddWaypoint(34, 7603.768066, -7667.000488, 153.997726);
|
||||
ranger_lilathaAI->AddWaypoint(0, 7545.07, -7359.87, 162.354, 4000); // Say0
|
||||
ranger_lilathaAI->AddWaypoint(1, 7550.048340, -7362.237793, 162.235657);
|
||||
ranger_lilathaAI->AddWaypoint(2, 7566.976074, -7364.315430, 161.738770);
|
||||
ranger_lilathaAI->AddWaypoint(3, 7578.830566, -7361.677734, 161.738770);
|
||||
ranger_lilathaAI->AddWaypoint(4, 7590.969238, -7359.053711, 162.257660);
|
||||
ranger_lilathaAI->AddWaypoint(5, 7598.354004, -7362.815430, 162.256683, 4000); // Say1
|
||||
ranger_lilathaAI->AddWaypoint(6, 7605.861328, -7380.424316, 161.937073);
|
||||
ranger_lilathaAI->AddWaypoint(7, 7605.295410, -7387.382813, 157.253998);
|
||||
ranger_lilathaAI->AddWaypoint(8, 7606.131836, -7393.893555, 156.941925);
|
||||
ranger_lilathaAI->AddWaypoint(9, 7615.207520, -7400.187012, 157.142639);
|
||||
ranger_lilathaAI->AddWaypoint(10, 7618.956543, -7402.652832, 158.202042);
|
||||
ranger_lilathaAI->AddWaypoint(11, 7636.850586, -7401.756836, 162.144791);
|
||||
ranger_lilathaAI->AddWaypoint(12, 7637.058105, -7404.944824, 162.206970, 4000);// Say2
|
||||
ranger_lilathaAI->AddWaypoint(13, 7636.910645, -7412.585449, 162.366425);
|
||||
ranger_lilathaAI->AddWaypoint(14, 7637.607910, -7425.591797, 162.630661);
|
||||
ranger_lilathaAI->AddWaypoint(15, 7637.816895, -7459.057129, 163.302704);
|
||||
ranger_lilathaAI->AddWaypoint(16, 7638.859863, -7470.902344, 162.517059);
|
||||
ranger_lilathaAI->AddWaypoint(17, 7641.395996, -7488.217285, 157.381287);
|
||||
ranger_lilathaAI->AddWaypoint(18, 7634.455566, -7505.451660, 154.682159);
|
||||
ranger_lilathaAI->AddWaypoint(19, 7631.906738, -7516.948730, 153.597382); // say3
|
||||
ranger_lilathaAI->AddWaypoint(20, 7622.231445, -7537.037598, 151.587112);
|
||||
ranger_lilathaAI->AddWaypoint(21, 7610.921875, -7550.670410, 149.639374);
|
||||
ranger_lilathaAI->AddWaypoint(22, 7598.229004, -7562.551758, 145.953888);
|
||||
ranger_lilathaAI->AddWaypoint(23, 7588.509277, -7577.755371, 148.294479);
|
||||
ranger_lilathaAI->AddWaypoint(24, 7567.339355, -7608.456055, 146.006485);
|
||||
ranger_lilathaAI->AddWaypoint(25, 7562.547852, -7617.417969, 148.097504);
|
||||
ranger_lilathaAI->AddWaypoint(26, 7561.508789, -7645.064453, 151.245163);
|
||||
ranger_lilathaAI->AddWaypoint(27, 7563.337402, -7654.652344, 151.227158);
|
||||
ranger_lilathaAI->AddWaypoint(28, 7565.533691, -7658.296387, 151.248886);
|
||||
ranger_lilathaAI->AddWaypoint(29, 7571.155762, -7659.118652, 151.244568);
|
||||
ranger_lilathaAI->AddWaypoint(30, 7579.119629, -7662.213867, 151.651505);
|
||||
ranger_lilathaAI->AddWaypoint(31, 7603.768066, -7667.000488, 153.997726);
|
||||
ranger_lilathaAI->AddWaypoint(32, 7603.768066, -7667.000488, 153.997726, 4000); // Say4 & Set orientation
|
||||
ranger_lilathaAI->AddWaypoint(33, 7603.768066, -7667.000488, 153.997726, 8000); // Say5 & Set orientation
|
||||
ranger_lilathaAI->AddWaypoint(34, 7603.768066, -7667.000488, 153.997726);
|
||||
|
||||
return (CreatureAI*)ranger_lilathaAI;
|
||||
return (CreatureAI*)ranger_lilathaAI;
|
||||
}
|
||||
|
||||
void AddSC_ghostlands()
|
||||
@@ -315,9 +315,9 @@ void AddSC_ghostlands()
|
||||
newscript->pGOHello = &GOHello_gilded_brazier;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_ranger_lilatha";
|
||||
newscript->GetAI = &GetAI_npc_ranger_lilathaAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_ranger_lilatha;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_ranger_lilatha";
|
||||
newscript->GetAI = &GetAI_npc_ranger_lilathaAI;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_ranger_lilatha;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ EndScriptData */
|
||||
struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
{
|
||||
boss_gruulAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
@@ -77,36 +77,36 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
HurtfulStrike_Timer= 8000;
|
||||
Reverberation_Timer= 60000+45000;
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_GRUULEVENT, NOT_STARTED);
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_GRUULEVENT, NOT_STARTED);
|
||||
|
||||
GameObject* Door = NULL;
|
||||
Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR));
|
||||
if(Door)
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
}
|
||||
GameObject* Door = NULL;
|
||||
Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR));
|
||||
if(Door)
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_GRUULEVENT, DONE);
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_GRUULEVENT, DONE);
|
||||
|
||||
GameObject* Door = NULL;
|
||||
Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR));
|
||||
if(Door)
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
}
|
||||
GameObject* Door = NULL;
|
||||
Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR));
|
||||
if(Door)
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
DoZoneInCombat();
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
DoZoneInCombat();
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
@@ -119,15 +119,15 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit()
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_SLAY3, m_creature); break;
|
||||
}
|
||||
}
|
||||
void KilledUnit()
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_SLAY3, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
@@ -184,7 +184,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
|
||||
GroundSlamTimer = 7000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
case 1:
|
||||
{
|
||||
@@ -205,7 +205,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
GroundSlamTimer = 5000;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
case 2:
|
||||
{
|
||||
@@ -215,7 +215,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
GroundSlamTimer = 1000;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
case 3:
|
||||
{
|
||||
@@ -253,7 +253,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
Reverberation_Timer += 10000;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GroundSlamStage++;
|
||||
@@ -280,14 +280,14 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
// Reverberation
|
||||
if (Reverberation_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_REVERBERATION, true);
|
||||
Reverberation_Timer = 30000;
|
||||
DoCast(m_creature->getVictim(), SPELL_REVERBERATION, true);
|
||||
Reverberation_Timer = 30000;
|
||||
}else Reverberation_Timer -= diff;
|
||||
|
||||
// Cave In
|
||||
if (CaveIn_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_CAVE_IN);
|
||||
|
||||
CaveIn_Timer = 20000;
|
||||
|
||||
@@ -42,7 +42,7 @@ EndScriptData */
|
||||
#define SPELL_BERSERKER_C 26561
|
||||
#define SPELL_ROAR 16508
|
||||
#define SPELL_FLURRY 33232
|
||||
#define SPELL_DUAL_WIELD 29651 //used in phase
|
||||
#define SPELL_DUAL_WIELD 29651 //used in phase
|
||||
|
||||
// Olm the Summoner
|
||||
#define SPELL_DARK_DECAY 33129
|
||||
@@ -50,14 +50,14 @@ EndScriptData */
|
||||
#define SPELL_SUMMON_WFH 33131
|
||||
|
||||
//Kiggler the Craed
|
||||
#define SPELL_GREATER_POLYMORPH 33173
|
||||
#define SPELL_LIGHTNING_BOLT 36152
|
||||
#define SPELL_ARCANE_SHOCK 33175
|
||||
#define SPELL_ARCANE_EXPLOSION 33237
|
||||
#define SPELL_GREATER_POLYMORPH 33173
|
||||
#define SPELL_LIGHTNING_BOLT 36152
|
||||
#define SPELL_ARCANE_SHOCK 33175
|
||||
#define SPELL_ARCANE_EXPLOSION 33237
|
||||
|
||||
//Blindeye the Seer
|
||||
#define SPELL_GREATER_PW_SHIELD 33147
|
||||
#define SPELL_HEAL 33144
|
||||
#define SPELL_GREATER_PW_SHIELD 33147
|
||||
#define SPELL_HEAL 33144
|
||||
#define SPELL_PRAYER_OH 33152
|
||||
|
||||
//Krosh Firehand
|
||||
@@ -94,9 +94,9 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
MightyBlow_Timer = 40000;
|
||||
Whirlwind_Timer = 30000;
|
||||
Charging_Timer = 0;
|
||||
Roar_Timer = 0;
|
||||
Roar_Timer = 0;
|
||||
|
||||
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, false);
|
||||
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, false);
|
||||
|
||||
Phase2 = false;
|
||||
|
||||
@@ -134,25 +134,25 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
||||
{
|
||||
pInstance->SetData(DATA_MAULGAREVENT, DONE);
|
||||
|
||||
GameObject* Door = NULL;
|
||||
Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_MAULGARDOOR));
|
||||
if(Door)
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
}
|
||||
GameObject* Door = NULL;
|
||||
Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_MAULGARDOOR));
|
||||
if(Door)
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
}
|
||||
|
||||
void AddDeath()
|
||||
{
|
||||
switch(rand()%4)
|
||||
{
|
||||
case 0: DoScriptText(SAY_OGRE_DEATH1, m_creature);break;
|
||||
case 1: DoScriptText(SAY_OGRE_DEATH2, m_creature);break;
|
||||
case 2: DoScriptText(SAY_OGRE_DEATH3, m_creature);break;
|
||||
case 3: DoScriptText(SAY_OGRE_DEATH4, m_creature);break;
|
||||
}
|
||||
{
|
||||
case 0: DoScriptText(SAY_OGRE_DEATH1, m_creature);break;
|
||||
case 1: DoScriptText(SAY_OGRE_DEATH2, m_creature);break;
|
||||
case 2: DoScriptText(SAY_OGRE_DEATH3, m_creature);break;
|
||||
case 3: DoScriptText(SAY_OGRE_DEATH4, m_creature);break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
pInstance->SetData64(DATA_MAULGAREVENT_TANK, who->GetGUID());
|
||||
pInstance->SetData(DATA_MAULGAREVENT, IN_PROGRESS);
|
||||
|
||||
DoZoneInCombat();
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -234,10 +234,10 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
//Entering Phase 2
|
||||
if(!Phase2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50)
|
||||
{
|
||||
Phase2 = true;
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
Phase2 = true;
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
|
||||
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
|
||||
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0);
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
||||
}
|
||||
|
||||
+28
-28
@@ -134,21 +134,21 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
for(int i=0; i<5; ++i)
|
||||
{
|
||||
Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
|
||||
if(who && channeler && !channeler->isInCombat())
|
||||
channeler->AI()->AttackStart(who);
|
||||
}
|
||||
{
|
||||
Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
|
||||
if(who && channeler && !channeler->isInCombat())
|
||||
channeler->AI()->AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelerDied(Unit* killer)
|
||||
{
|
||||
for(int i=0; i<5; ++i)
|
||||
{
|
||||
Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
|
||||
if(channeler && channeler->isAlive())
|
||||
return;
|
||||
}
|
||||
{
|
||||
Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
|
||||
if(channeler && channeler->isAlive())
|
||||
return;
|
||||
}
|
||||
|
||||
if(killer)
|
||||
m_creature->AI()->AttackStart(killer);
|
||||
@@ -160,30 +160,30 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
|
||||
if(!channeler1) return NULL;
|
||||
int i;
|
||||
for(i=0; i<5; ++i)
|
||||
{
|
||||
Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
|
||||
if(channeler && channeler->GetGUID()==channeler1->GetGUID())
|
||||
break;
|
||||
}
|
||||
{
|
||||
Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
|
||||
if(channeler && channeler->GetGUID()==channeler1->GetGUID())
|
||||
break;
|
||||
}
|
||||
return Channelers[(i+2)%5];
|
||||
}
|
||||
|
||||
void SummonChannelers()
|
||||
{
|
||||
for(int i=0; i<5; ++i)
|
||||
{
|
||||
Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
|
||||
if(!channeler || channeler->isDead())
|
||||
channeler = m_creature->SummonCreature(ENTRY_CHANNELER,ShadowmoonChannelers[i][0],ShadowmoonChannelers[i][1],ShadowmoonChannelers[i][2],ShadowmoonChannelers[i][3],TEMPSUMMON_CORPSE_TIMED_DESPAWN,300000);
|
||||
Channelers[i] = channeler->GetGUID();
|
||||
}
|
||||
for(int i=0; i<5; ++i)
|
||||
{
|
||||
Creature *channeler = (Creature*)Unit::GetUnit(*m_creature, Channelers[i]);
|
||||
if(!channeler || channeler->isDead())
|
||||
channeler = m_creature->SummonCreature(ENTRY_CHANNELER,ShadowmoonChannelers[i][0],ShadowmoonChannelers[i][1],ShadowmoonChannelers[i][2],ShadowmoonChannelers[i][3],TEMPSUMMON_CORPSE_TIMED_DESPAWN,300000);
|
||||
Channelers[i] = channeler->GetGUID();
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
DoScriptText(SAY_DIE, m_creature);
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_KELIDANEVENT, DONE);
|
||||
pInstance->SetData(DATA_KELIDANEVENT, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -315,11 +315,11 @@ struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI
|
||||
{
|
||||
if (!m_creature->IsNonMeleeSpellCasted(false))
|
||||
if(Creature *Kelidan = (Creature *)FindCreature(ENTRY_KELIDAN, 100, m_creature))
|
||||
{
|
||||
uint64 channeler = ((boss_kelidan_the_breakerAI*)Kelidan->AI())->GetChanneled(m_creature);
|
||||
if(Unit *channeled = Unit::GetUnit(*m_creature, channeler))
|
||||
DoCast(channeled,SPELL_CHANNELING);
|
||||
}
|
||||
{
|
||||
uint64 channeler = ((boss_kelidan_the_breakerAI*)Kelidan->AI())->GetChanneled(m_creature);
|
||||
if(Unit *channeled = Unit::GetUnit(*m_creature, channeler))
|
||||
DoCast(channeled,SPELL_CHANNELING);
|
||||
}
|
||||
check_Timer = 5000;
|
||||
}else check_Timer -= diff;
|
||||
return;
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ struct TRINITY_DLL_DECL boss_nazanAI : public ScriptedAI
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->RemoveCorpse();
|
||||
m_creature->RemoveCorpse();
|
||||
}else UnsummonCheck -= diff;
|
||||
return;
|
||||
}
|
||||
|
||||
+6
-6
@@ -62,15 +62,15 @@ static Yell RandomTaunt[]=
|
||||
#define SPELL_BLAZE_TARGET 30541 // core bug, does not support target 7
|
||||
#define SPELL_BLAZE_TRAP 30542
|
||||
#define SPELL_DEBRIS_KNOCKDOWN 36449
|
||||
#define SPELL_DEBRIS_VISUAL 30632
|
||||
#define SPELL_DEBRIS_DAMAGE 30631 // core bug, does not support target 8
|
||||
#define SPELL_DEBRIS_VISUAL 30632
|
||||
#define SPELL_DEBRIS_DAMAGE 30631 // core bug, does not support target 8
|
||||
#define SPELL_CAMERA_SHAKE 36455
|
||||
#define SPELL_BERSERK 27680
|
||||
|
||||
#define SPELL_SHADOW_CAGE 30168
|
||||
#define SPELL_SHADOW_GRASP 30410
|
||||
#define SPELL_SHADOW_GRASP_VISUAL 30166
|
||||
#define SPELL_MIND_EXHAUSTION 44032 //Casted by the cubes when channeling ends
|
||||
#define SPELL_MIND_EXHAUSTION 44032 //Casted by the cubes when channeling ends
|
||||
|
||||
#define SPELL_SHADOW_CAGE_C 30205
|
||||
#define SPELL_SHADOW_GRASP_C 30207
|
||||
@@ -81,10 +81,10 @@ static Yell RandomTaunt[]=
|
||||
#define SPELL_BURNING_ABYSSAL 30511
|
||||
#define SPELL_SOUL_TRANSFER 30531 // core bug, does not support target 7
|
||||
|
||||
#define SPELL_FIRE_BLAST 37110
|
||||
#define SPELL_FIRE_BLAST 37110
|
||||
|
||||
// count of clickers needed to interrupt blast nova
|
||||
#define CLICKERS_COUNT 5
|
||||
#define CLICKERS_COUNT 5
|
||||
|
||||
typedef std::map<uint64, uint64> CubeMap;
|
||||
|
||||
@@ -202,7 +202,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI
|
||||
uint32 BlastNova_Timer;
|
||||
uint32 Blaze_Timer;
|
||||
uint32 Debris_Timer;
|
||||
uint32 RandChat_Timer;
|
||||
uint32 RandChat_Timer;
|
||||
|
||||
bool Phase3;
|
||||
bool NeedCheckCube;
|
||||
|
||||
+3
-3
@@ -6,8 +6,8 @@
|
||||
#define DEF_MAGTHERIDONS_LAIR_H
|
||||
|
||||
#define DATA_MAGTHERIDON_EVENT 1
|
||||
#define DATA_MAGTHERIDON 3
|
||||
#define DATA_MAGTHERIDON 3
|
||||
#define DATA_CHANNELER_EVENT 2
|
||||
#define DATA_COLLAPSE 6
|
||||
#define DATA_CHANNELER 9
|
||||
#define DATA_COLLAPSE 6
|
||||
#define DATA_CHANNELER 9
|
||||
#endif
|
||||
|
||||
+4
-4
@@ -27,9 +27,9 @@ EndScriptData */
|
||||
#define SPELL_SOUL_TRANSFER 30531 // core bug, does not support target 7
|
||||
#define SPELL_BLAZE_TARGET 30541 // core bug, does not support target 7
|
||||
|
||||
#define CHAMBER_CENTER_X -15.14
|
||||
#define CHAMBER_CENTER_Y 1.8
|
||||
#define CHAMBER_CENTER_Z -0.4
|
||||
#define CHAMBER_CENTER_X -15.14
|
||||
#define CHAMBER_CENTER_Y 1.8
|
||||
#define CHAMBER_CENTER_Z -0.4
|
||||
|
||||
#define ENCOUNTERS 2
|
||||
|
||||
@@ -180,7 +180,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
|
||||
{
|
||||
//Channeler->CastSpell(Channeler, SPELL_SOUL_TRANSFER, true);
|
||||
data = IN_PROGRESS;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
|
||||
@@ -238,22 +238,22 @@ bool GossipHello_npc_wing_commander_brack(Player *player, Creature *_Creature)
|
||||
|
||||
bool GossipSelect_npc_wing_commander_brack(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
{
|
||||
switch(action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,33659,true); //TaxiPath 584 (Gateways Murket and Shaadraz)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,33825,true); //TaxiPath 587 (Aerial Assault Flight (Horde))
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,34578,true); //TaxiPath 604 (Taxi - Reaver's Fall to Spinebreaker Ridge)
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
switch(action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,33659,true); //TaxiPath 584 (Gateways Murket and Shaadraz)
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,33825,true); //TaxiPath 587 (Aerial Assault Flight (Horde))
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,34578,true); //TaxiPath 604 (Taxi - Reaver's Fall to Spinebreaker Ridge)
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
@@ -271,130 +271,130 @@ bool GossipSelect_npc_wing_commander_brack(Player *player, Creature *_Creature,
|
||||
|
||||
struct TRINITY_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI
|
||||
{
|
||||
npc_wounded_blood_elfAI(Creature *c) : npc_escortAI(c) {Reset();}
|
||||
npc_wounded_blood_elfAI(Creature *c) : npc_escortAI(c) {Reset();}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_ELF_START, m_creature, player);
|
||||
break;
|
||||
case 9:
|
||||
DoScriptText(SAY_ELF_SUMMON1, m_creature, player);
|
||||
// Spawn two Haal'eshi Talonguard
|
||||
DoSpawnCreature(16967, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(16967, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
break;
|
||||
case 13:
|
||||
DoScriptText(SAY_ELF_RESTING, m_creature, player);
|
||||
// make the NPC kneel
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
|
||||
break;
|
||||
case 14:
|
||||
DoScriptText(SAY_ELF_SUMMON2, m_creature, player);
|
||||
// Spawn two Haal'eshi Windwalker
|
||||
DoSpawnCreature(16966, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(16966, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
break;
|
||||
case 27:
|
||||
DoScriptText(SAY_ELF_COMPLETE, m_creature, player);
|
||||
// Award quest credit
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH,m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_ELF_START, m_creature, player);
|
||||
break;
|
||||
case 9:
|
||||
DoScriptText(SAY_ELF_SUMMON1, m_creature, player);
|
||||
// Spawn two Haal'eshi Talonguard
|
||||
DoSpawnCreature(16967, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(16967, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
break;
|
||||
case 13:
|
||||
DoScriptText(SAY_ELF_RESTING, m_creature, player);
|
||||
// make the NPC kneel
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
|
||||
break;
|
||||
case 14:
|
||||
DoScriptText(SAY_ELF_SUMMON2, m_creature, player);
|
||||
// Spawn two Haal'eshi Windwalker
|
||||
DoSpawnCreature(16966, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(16966, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
break;
|
||||
case 27:
|
||||
DoScriptText(SAY_ELF_COMPLETE, m_creature, player);
|
||||
// Award quest credit
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH,m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (!IsBeingEscorted)
|
||||
m_creature->setFaction(1604);
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
if (!IsBeingEscorted)
|
||||
m_creature->setFaction(1604);
|
||||
}
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
if (IsBeingEscorted)
|
||||
DoScriptText(SAY_ELF_AGGRO, m_creature);
|
||||
}
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
if (IsBeingEscorted)
|
||||
DoScriptText(SAY_ELF_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (!IsBeingEscorted)
|
||||
return;
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (!IsBeingEscorted)
|
||||
return;
|
||||
|
||||
if (PlayerGUID)
|
||||
{
|
||||
// If NPC dies, player fails the quest
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->FailQuest(QUEST_ROAD_TO_FALCON_WATCH);
|
||||
}
|
||||
}
|
||||
if (PlayerGUID)
|
||||
{
|
||||
// If NPC dies, player fails the quest
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->FailQuest(QUEST_ROAD_TO_FALCON_WATCH);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_wounded_blood_elf(Creature *_Creature)
|
||||
{
|
||||
npc_wounded_blood_elfAI* welfAI = new npc_wounded_blood_elfAI(_Creature);
|
||||
npc_wounded_blood_elfAI* welfAI = new npc_wounded_blood_elfAI(_Creature);
|
||||
|
||||
welfAI->AddWaypoint(0, -1137.72, 4272.10, 14.04, 5000);
|
||||
welfAI->AddWaypoint(1, -1141.34, 4232.42, 14.63);
|
||||
welfAI->AddWaypoint(2, -1133.47, 4220.88, 11.78);
|
||||
welfAI->AddWaypoint(3, -1126.18, 4213.26, 13.51);
|
||||
welfAI->AddWaypoint(4, -1100.12, 4204.32, 16.41);
|
||||
welfAI->AddWaypoint(5, -1063.68, 4197.92, 15.51);
|
||||
welfAI->AddWaypoint(6, -1027.28, 4194.36, 15.52);
|
||||
welfAI->AddWaypoint(7, -995.68, 4189.59, 19.84);
|
||||
welfAI->AddWaypoint(8, -970.90, 4188.60, 24.61);
|
||||
welfAI->AddWaypoint(9, -961.93, 4193.34, 26.11, 15000); // Summon 1
|
||||
welfAI->AddWaypoint(10, -935.52, 4210.99, 31.98);
|
||||
welfAI->AddWaypoint(11, -913.42, 4218.27, 37.29);
|
||||
welfAI->AddWaypoint(12, -896.53, 4207.73, 43.23);
|
||||
welfAI->AddWaypoint(13, -868.49, 4194.77, 46.75, 30000);// Kneel and Rest Here
|
||||
welfAI->AddWaypoint(14, -852.83, 4198.29, 47.28, 15000);// Summon 2
|
||||
welfAI->AddWaypoint(15, -819.85, 4200.50, 46.37);
|
||||
welfAI->AddWaypoint(16, -791.92, 4201.96, 44.19);
|
||||
welfAI->AddWaypoint(17, -774.42, 4202.46, 47.41);
|
||||
welfAI->AddWaypoint(18, -762.90, 4202.17, 48.81);
|
||||
welfAI->AddWaypoint(19, -728.25, 4195.35, 50.68);
|
||||
welfAI->AddWaypoint(20, -713.58, 4192.07, 53.98);
|
||||
welfAI->AddWaypoint(21, -703.09, 4189.74, 56.96);
|
||||
welfAI->AddWaypoint(22, -693.70, 4185.43, 57.06);
|
||||
welfAI->AddWaypoint(23, -686.38, 4159.81, 60.26);
|
||||
welfAI->AddWaypoint(24, -679.88, 4147.04, 64.20);
|
||||
welfAI->AddWaypoint(25, -656.74, 4147.72, 64.11);
|
||||
welfAI->AddWaypoint(26, -652.22, 4137.50, 64.58);
|
||||
welfAI->AddWaypoint(27, -649.99, 4136.38, 64.63, 30000);// Award Quest Credit
|
||||
welfAI->AddWaypoint(0, -1137.72, 4272.10, 14.04, 5000);
|
||||
welfAI->AddWaypoint(1, -1141.34, 4232.42, 14.63);
|
||||
welfAI->AddWaypoint(2, -1133.47, 4220.88, 11.78);
|
||||
welfAI->AddWaypoint(3, -1126.18, 4213.26, 13.51);
|
||||
welfAI->AddWaypoint(4, -1100.12, 4204.32, 16.41);
|
||||
welfAI->AddWaypoint(5, -1063.68, 4197.92, 15.51);
|
||||
welfAI->AddWaypoint(6, -1027.28, 4194.36, 15.52);
|
||||
welfAI->AddWaypoint(7, -995.68, 4189.59, 19.84);
|
||||
welfAI->AddWaypoint(8, -970.90, 4188.60, 24.61);
|
||||
welfAI->AddWaypoint(9, -961.93, 4193.34, 26.11, 15000); // Summon 1
|
||||
welfAI->AddWaypoint(10, -935.52, 4210.99, 31.98);
|
||||
welfAI->AddWaypoint(11, -913.42, 4218.27, 37.29);
|
||||
welfAI->AddWaypoint(12, -896.53, 4207.73, 43.23);
|
||||
welfAI->AddWaypoint(13, -868.49, 4194.77, 46.75, 30000);// Kneel and Rest Here
|
||||
welfAI->AddWaypoint(14, -852.83, 4198.29, 47.28, 15000);// Summon 2
|
||||
welfAI->AddWaypoint(15, -819.85, 4200.50, 46.37);
|
||||
welfAI->AddWaypoint(16, -791.92, 4201.96, 44.19);
|
||||
welfAI->AddWaypoint(17, -774.42, 4202.46, 47.41);
|
||||
welfAI->AddWaypoint(18, -762.90, 4202.17, 48.81);
|
||||
welfAI->AddWaypoint(19, -728.25, 4195.35, 50.68);
|
||||
welfAI->AddWaypoint(20, -713.58, 4192.07, 53.98);
|
||||
welfAI->AddWaypoint(21, -703.09, 4189.74, 56.96);
|
||||
welfAI->AddWaypoint(22, -693.70, 4185.43, 57.06);
|
||||
welfAI->AddWaypoint(23, -686.38, 4159.81, 60.26);
|
||||
welfAI->AddWaypoint(24, -679.88, 4147.04, 64.20);
|
||||
welfAI->AddWaypoint(25, -656.74, 4147.72, 64.11);
|
||||
welfAI->AddWaypoint(26, -652.22, 4137.50, 64.58);
|
||||
welfAI->AddWaypoint(27, -649.99, 4136.38, 64.63, 30000);// Award Quest Credit
|
||||
|
||||
return (CreatureAI*)welfAI;
|
||||
return (CreatureAI*)welfAI;
|
||||
}
|
||||
|
||||
bool QuestAccept_npc_wounded_blood_elf(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH)
|
||||
{
|
||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||
// Change faction so mobs attack
|
||||
creature->setFaction(775);
|
||||
}
|
||||
if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH)
|
||||
{
|
||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||
// Change faction so mobs attack
|
||||
creature->setFaction(775);
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
@@ -406,7 +406,7 @@ void AddSC_hellfire_peninsula()
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_aeranas";
|
||||
newscript->Name = "npc_aeranas";
|
||||
newscript->GetAI = &GetAI_npc_aeranas;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
|
||||
@@ -141,52 +141,52 @@ bool GossipSelect_npc_unrestrained_dragonhawk(Player *player, Creature *_Creatur
|
||||
## npc_greengill_slave
|
||||
######*/
|
||||
|
||||
#define ENRAGE 45111
|
||||
#define ORB 45109
|
||||
#define QUESTG 11541
|
||||
#define DM 25060
|
||||
#define ENRAGE 45111
|
||||
#define ORB 45109
|
||||
#define QUESTG 11541
|
||||
#define DM 25060
|
||||
|
||||
struct TRINITY_DLL_DECL npc_greengill_slaveAI : public ScriptedAI
|
||||
{
|
||||
npc_greengill_slaveAI(Creature* c) : ScriptedAI(c) {Reset();}
|
||||
npc_greengill_slaveAI(Creature* c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint64 PlayerGUID;
|
||||
uint64 PlayerGUID;
|
||||
|
||||
void Aggro(Unit* who){}
|
||||
void Aggro(Unit* who){}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
PlayerGUID = 0;
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
PlayerGUID = 0;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellEntry* spell)
|
||||
{
|
||||
if(!caster)
|
||||
void SpellHit(Unit* caster, const SpellEntry* spell)
|
||||
{
|
||||
if(!caster)
|
||||
return;
|
||||
|
||||
if(caster->GetTypeId() == TYPEID_PLAYER && spell->Id == ORB && !m_creature->HasAura(ENRAGE, 0))
|
||||
{
|
||||
PlayerGUID = caster->GetGUID();
|
||||
if(PlayerGUID)
|
||||
if(caster->GetTypeId() == TYPEID_PLAYER && spell->Id == ORB && !m_creature->HasAura(ENRAGE, 0))
|
||||
{
|
||||
PlayerGUID = caster->GetGUID();
|
||||
if(PlayerGUID)
|
||||
{
|
||||
Unit* plr = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
if(plr && ((Player*)plr)->GetQuestStatus(QUESTG) == QUEST_STATUS_INCOMPLETE)
|
||||
((Player*)plr)->KilledMonster(25086, m_creature->GetGUID());
|
||||
}
|
||||
DoCast(m_creature, ENRAGE);
|
||||
Unit* Myrmidon = FindCreature(DM, 70, m_creature);
|
||||
if(Myrmidon)
|
||||
{
|
||||
m_creature->AddThreat(Myrmidon, 100000.0f);
|
||||
((Player*)plr)->KilledMonster(25086, m_creature->GetGUID());
|
||||
}
|
||||
DoCast(m_creature, ENRAGE);
|
||||
Unit* Myrmidon = FindCreature(DM, 70, m_creature);
|
||||
if(Myrmidon)
|
||||
{
|
||||
m_creature->AddThreat(Myrmidon, 100000.0f);
|
||||
AttackStart(Myrmidon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_greengill_slaveAI(Creature* _Creature)
|
||||
@@ -215,8 +215,8 @@ void AddSC_isle_of_queldanas()
|
||||
newscript->pGossipSelect = &GossipSelect_npc_unrestrained_dragonhawk;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_greengill_slave";
|
||||
newscript->GetAI = &GetAI_npc_greengill_slaveAI;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_greengill_slave";
|
||||
newscript->GetAI = &GetAI_npc_greengill_slaveAI;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -69,9 +69,9 @@ struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL2, m_creature); break;
|
||||
}
|
||||
case 0: DoScriptText(SAY_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
|
||||
@@ -66,7 +66,7 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI
|
||||
void KilledUnit(Unit* Victim)
|
||||
{
|
||||
if(rand()%2)
|
||||
return;
|
||||
return;
|
||||
|
||||
switch(rand()%3)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI
|
||||
|
||||
if (Holyfire_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_HOLYFIRE);
|
||||
|
||||
Holyfire_Timer = 8000 + rand()%17000; //Anywhere from 8 to 25 seconds, good luck having several of those in a row!
|
||||
@@ -125,10 +125,10 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI
|
||||
|
||||
if (Holywrath_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_HOLYWRATH);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_HOLYWRATH);
|
||||
|
||||
Holywrath_Timer = 20000+(rand()%10000); //20-30 secs sounds nice
|
||||
Holywrath_Timer = 20000+(rand()%10000); //20-30 secs sounds nice
|
||||
|
||||
}else Holywrath_Timer -= diff;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ struct TRINITY_DLL_DECL boss_midnightAI : public ScriptedAI
|
||||
Attumen = 0;
|
||||
Mount_Timer = 0;
|
||||
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->SetVisibility(VISIBILITY_ON);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ struct TRINITY_DLL_DECL boss_midnightAI : public ScriptedAI
|
||||
if(Phase == 1 && (m_creature->GetHealth()*100)/m_creature->GetMaxHealth() < 95)
|
||||
{
|
||||
Phase = 2;
|
||||
Creature *pAttumen = DoSpawnCreature(SUMMON_ATTUMEN, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
|
||||
Creature *pAttumen = DoSpawnCreature(SUMMON_ATTUMEN, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
|
||||
if(pAttumen)
|
||||
{
|
||||
Attumen = pAttumen->GetGUID();
|
||||
@@ -89,9 +89,9 @@ struct TRINITY_DLL_DECL boss_midnightAI : public ScriptedAI
|
||||
SetMidnight(pAttumen, m_creature->GetGUID());
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_APPEAR1, pAttumen); break;
|
||||
case 1: DoScriptText(SAY_APPEAR2, pAttumen); break;
|
||||
case 2: DoScriptText(SAY_APPEAR3, pAttumen); break;
|
||||
case 0: DoScriptText(SAY_APPEAR1, pAttumen); break;
|
||||
case 1: DoScriptText(SAY_APPEAR2, pAttumen); break;
|
||||
case 2: DoScriptText(SAY_APPEAR3, pAttumen); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,27 +102,27 @@ struct TRINITY_DLL_DECL boss_midnightAI : public ScriptedAI
|
||||
}
|
||||
else if(Phase ==3)
|
||||
{
|
||||
if(Mount_Timer)
|
||||
{
|
||||
if(Mount_Timer <= diff)
|
||||
{
|
||||
Mount_Timer = 0;
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
if (Unit *pAttumen = Unit::GetUnit(*m_creature, Attumen))
|
||||
{
|
||||
pAttumen->SetUInt32Value(UNIT_FIELD_DISPLAYID, MOUNTED_DISPLAYID);
|
||||
pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
if(pAttumen->getVictim())
|
||||
{
|
||||
pAttumen->GetMotionMaster()->MoveChase(pAttumen->getVictim());
|
||||
pAttumen->SetUInt64Value(UNIT_FIELD_TARGET, pAttumen->getVictim()->GetGUID());
|
||||
}
|
||||
pAttumen->SetFloatValue(OBJECT_FIELD_SCALE_X,1);
|
||||
}
|
||||
} else Mount_Timer -= diff;
|
||||
}
|
||||
}
|
||||
if(Mount_Timer)
|
||||
{
|
||||
if(Mount_Timer <= diff)
|
||||
{
|
||||
Mount_Timer = 0;
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
if (Unit *pAttumen = Unit::GetUnit(*m_creature, Attumen))
|
||||
{
|
||||
pAttumen->SetUInt32Value(UNIT_FIELD_DISPLAYID, MOUNTED_DISPLAYID);
|
||||
pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
if(pAttumen->getVictim())
|
||||
{
|
||||
pAttumen->GetMotionMaster()->MoveChase(pAttumen->getVictim());
|
||||
pAttumen->SetUInt64Value(UNIT_FIELD_TARGET, pAttumen->getVictim()->GetGUID());
|
||||
}
|
||||
pAttumen->SetFloatValue(OBJECT_FIELD_SCALE_X,1);
|
||||
}
|
||||
} else Mount_Timer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if(Phase != 3)
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -130,7 +130,7 @@ struct TRINITY_DLL_DECL boss_midnightAI : public ScriptedAI
|
||||
|
||||
void Mount(Unit *pAttumen)
|
||||
{
|
||||
DoScriptText(SAY_MOUNT, pAttumen);
|
||||
DoScriptText(SAY_MOUNT, pAttumen);
|
||||
Phase = 3;
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pAttumen->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -194,36 +194,36 @@ struct TRINITY_DLL_DECL boss_attumenAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
if (Unit *pMidnight = Unit::GetUnit(*m_creature, Midnight))
|
||||
pMidnight->DealDamage(pMidnight, pMidnight->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
if (Unit *pMidnight = Unit::GetUnit(*m_creature, Midnight))
|
||||
pMidnight->DealDamage(pMidnight, pMidnight->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(ResetTimer)
|
||||
{
|
||||
if(ResetTimer <= diff)
|
||||
{
|
||||
ResetTimer = 0;
|
||||
Unit *pMidnight = Unit::GetUnit(*m_creature, Midnight);
|
||||
if(pMidnight)
|
||||
{
|
||||
pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pMidnight->SetVisibility(VISIBILITY_ON);
|
||||
}
|
||||
Midnight = 0;
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
} else ResetTimer -= diff;
|
||||
if(ResetTimer)
|
||||
{
|
||||
if(ResetTimer <= diff)
|
||||
{
|
||||
ResetTimer = 0;
|
||||
Unit *pMidnight = Unit::GetUnit(*m_creature, Midnight);
|
||||
if(pMidnight)
|
||||
{
|
||||
pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pMidnight->SetVisibility(VISIBILITY_ON);
|
||||
}
|
||||
Midnight = 0;
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
} else ResetTimer -= diff;
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
@@ -234,7 +234,7 @@ struct TRINITY_DLL_DECL boss_attumenAI : public ScriptedAI
|
||||
|
||||
if(CleaveTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SHADOWCLEAVE);
|
||||
DoCast(m_creature->getVictim(), SPELL_SHADOWCLEAVE);
|
||||
CleaveTimer = 10000 + (rand()%6)*1000;
|
||||
} else CleaveTimer -= diff;
|
||||
|
||||
@@ -248,8 +248,8 @@ struct TRINITY_DLL_DECL boss_attumenAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_RANDOM1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_RANDOM2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_RANDOM1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_RANDOM2, m_creature); break;
|
||||
}
|
||||
RandomYellTimer = 30000 + (rand()%31)*1000;
|
||||
} else RandomYellTimer -= diff;
|
||||
@@ -294,7 +294,7 @@ struct TRINITY_DLL_DECL boss_attumenAI : public ScriptedAI
|
||||
void SpellHit(Unit *source, const SpellEntry *spell)
|
||||
{
|
||||
if(spell->Mechanic == MECHANIC_DISARM)
|
||||
DoScriptText(SAY_DISARMED, m_creature);
|
||||
DoScriptText(SAY_DISARMED, m_creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -124,9 +124,9 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
|
||||
{
|
||||
switch (rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_KILL_1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL_2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_KILL_3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_KILL_1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL_2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_KILL_3, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,22 +139,22 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
|
||||
|
||||
DeSpawnAdds();
|
||||
|
||||
//remove aura from spell Garrote when Moroes dies
|
||||
Map *map = m_creature->GetMap();
|
||||
if (map->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
//remove aura from spell Garrote when Moroes dies
|
||||
Map *map = m_creature->GetMap();
|
||||
if (map->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
if (PlayerList.isEmpty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_GARROTE,0))
|
||||
i->getSource()->RemoveAurasDueToSpell(SPELL_GARROTE);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_GARROTE,0))
|
||||
i->getSource()->RemoveAurasDueToSpell(SPELL_GARROTE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint8 CheckAdd(uint64 guid)
|
||||
{
|
||||
@@ -308,8 +308,8 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SPECIAL_1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPECIAL_2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SPECIAL_1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SPECIAL_2, m_creature); break;
|
||||
}
|
||||
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
|
||||
@@ -35,7 +35,7 @@ EndScriptData */
|
||||
#define SPELL_SMOKING_BLAST 37057
|
||||
#define SPELL_FIREBALL_BARRAGE 30282
|
||||
#define SPELL_SEARING_CINDERS 30127
|
||||
#define SPELL_SUMMON_SKELETON 30170
|
||||
#define SPELL_SUMMON_SKELETON 30170
|
||||
|
||||
#define EMOTE_SUMMON "An ancient being awakens in the distance..."
|
||||
#define YELL_AGGRO "What fools! I shall bring a quick end to your suffering!"
|
||||
@@ -60,17 +60,17 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
{
|
||||
boss_nightbaneAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Intro = true;
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 Phase;
|
||||
|
||||
bool RainBones;
|
||||
bool Skeletons;
|
||||
bool Skeletons;
|
||||
|
||||
uint32 BellowingRoarTimer;
|
||||
uint32 CharredEarthTimer;
|
||||
@@ -87,7 +87,7 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
|
||||
bool Intro;
|
||||
bool Flying;
|
||||
bool Movement;
|
||||
bool Movement;
|
||||
|
||||
uint32 WaitTimer;
|
||||
uint32 MovePhase;
|
||||
@@ -103,16 +103,16 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
SmokingBlastTimer = 20000;
|
||||
FireballBarrageTimer = 13000;
|
||||
SearingCindersTimer = 14000;
|
||||
WaitTimer = 1000;
|
||||
WaitTimer = 1000;
|
||||
|
||||
Phase =1;
|
||||
Phase =1;
|
||||
FlyCount = 0;
|
||||
MovePhase = 0;
|
||||
MovePhase = 0;
|
||||
|
||||
m_creature->SetSpeed(MOVE_RUN, 2.0f);
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
m_creature->setActive(true);
|
||||
m_creature->setActive(true);
|
||||
|
||||
pInstance->SetData(DATA_NIGHTBANE_EVENT, 6);
|
||||
if(pInstance->GetData(DATA_NIGHTBANE_EVENT) > 1)
|
||||
@@ -121,10 +121,10 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
m_creature->RemoveCorpse();
|
||||
}else pInstance->SetData(DATA_NIGHTBANE_EVENT, NOT_STARTED);
|
||||
|
||||
HandleTerraceDoors(true);
|
||||
HandleTerraceDoors(true);
|
||||
|
||||
Flying = false;
|
||||
Movement = false;
|
||||
Movement = false;
|
||||
|
||||
if(!Intro)
|
||||
{
|
||||
@@ -133,22 +133,22 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void HandleTerraceDoors(bool open)
|
||||
void HandleTerraceDoors(bool open)
|
||||
{
|
||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1)))
|
||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1)))
|
||||
Door->SetGoState(open ? 0 : 1);
|
||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2)))
|
||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2)))
|
||||
Door->SetGoState(open ? 0 : 1);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_NIGHTBANE_EVENT, IN_PROGRESS);
|
||||
{
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_NIGHTBANE_EVENT, IN_PROGRESS);
|
||||
|
||||
HandleTerraceDoors(false);
|
||||
DoYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
}
|
||||
HandleTerraceDoors(false);
|
||||
DoYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
@@ -156,13 +156,13 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_NIGHTBANE_EVENT, DONE);
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_NIGHTBANE_EVENT, DONE);
|
||||
|
||||
HandleTerraceDoors(true);
|
||||
}
|
||||
HandleTerraceDoors(true);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
@@ -194,7 +194,7 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
{
|
||||
if(id == 0)
|
||||
{
|
||||
DoTextEmote(EMOTE_BREATH, NULL, true);
|
||||
DoTextEmote(EMOTE_BREATH, NULL, true);
|
||||
Flying = false;
|
||||
Phase = 2;
|
||||
return;
|
||||
@@ -211,7 +211,7 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
{
|
||||
Flying = false;
|
||||
Phase = 1;
|
||||
Movement = true;
|
||||
Movement = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -219,12 +219,12 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
|
||||
void TakeOff()
|
||||
void TakeOff()
|
||||
{
|
||||
DoYell(YELL_FLY_PHASE, LANG_UNIVERSAL, NULL);
|
||||
|
||||
@@ -234,14 +234,14 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
(*m_creature).GetMotionMaster()->Clear(false);
|
||||
(*m_creature).GetMotionMaster()->MovePoint(0,IntroWay[2][0],IntroWay[2][1],IntroWay[2][2]);
|
||||
|
||||
Flying = true;
|
||||
Flying = true;
|
||||
|
||||
FlyTimer = 45000+rand()%15000; //timer wrong between 45 and 60 seconds
|
||||
++FlyCount;
|
||||
|
||||
RainofBonesTimer = 5000; //timer wrong (maybe)
|
||||
RainBones = false;
|
||||
Skeletons = false;
|
||||
Skeletons = false;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -291,44 +291,44 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
// Phase 1 "GROUND FIGHT"
|
||||
if(Phase == 1)
|
||||
{
|
||||
if(Movement)
|
||||
{
|
||||
DoStartMovement(m_creature->getVictim());
|
||||
Movement = false;
|
||||
}
|
||||
if(Movement)
|
||||
{
|
||||
DoStartMovement(m_creature->getVictim());
|
||||
Movement = false;
|
||||
}
|
||||
|
||||
if (BellowingRoarTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_BELLOWING_ROAR);
|
||||
BellowingRoarTimer = 30000+rand()%10000 ; //Timer
|
||||
}else BellowingRoarTimer -= diff;
|
||||
if (BellowingRoarTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_BELLOWING_ROAR);
|
||||
BellowingRoarTimer = 30000+rand()%10000 ; //Timer
|
||||
}else BellowingRoarTimer -= diff;
|
||||
|
||||
if (SmolderingBreathTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_SMOLDERING_BREATH);
|
||||
SmolderingBreathTimer = 20000;//timer
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_SMOLDERING_BREATH);
|
||||
SmolderingBreathTimer = 20000;//timer
|
||||
}else SmolderingBreathTimer -= diff;
|
||||
|
||||
if (CharredEarthTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target,SPELL_CHARRED_EARTH);
|
||||
CharredEarthTimer = 20000; //timer
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target,SPELL_CHARRED_EARTH);
|
||||
CharredEarthTimer = 20000; //timer
|
||||
}else CharredEarthTimer -= diff;
|
||||
|
||||
if (TailSweepTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (!m_creature->HasInArc( M_PI, target))
|
||||
DoCast(target,SPELL_TAIL_SWEEP);
|
||||
TailSweepTimer = 15000;//timer
|
||||
}else TailSweepTimer -= diff;
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (!m_creature->HasInArc( M_PI, target))
|
||||
DoCast(target,SPELL_TAIL_SWEEP);
|
||||
TailSweepTimer = 15000;//timer
|
||||
}else TailSweepTimer -= diff;
|
||||
|
||||
if (SearingCindersTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target,SPELL_SEARING_CINDERS);
|
||||
SearingCindersTimer = 10000; //timer
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target,SPELL_SEARING_CINDERS);
|
||||
SearingCindersTimer = 10000; //timer
|
||||
}else SearingCindersTimer -= diff;
|
||||
|
||||
uint32 Prozent;
|
||||
@@ -338,10 +338,10 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
TakeOff();
|
||||
|
||||
if (Prozent < 50 && FlyCount == 1) // secound take off 50%
|
||||
TakeOff();
|
||||
TakeOff();
|
||||
|
||||
if (Prozent < 25 && FlyCount == 2) // third take off 25%
|
||||
TakeOff();
|
||||
TakeOff();
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -351,13 +351,13 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
{
|
||||
if (!RainBones)
|
||||
{
|
||||
if (!Skeletons)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SUMMON_SKELETON);
|
||||
DoCast(m_creature->getVictim(), SPELL_SUMMON_SKELETON);
|
||||
DoCast(m_creature->getVictim(), SPELL_SUMMON_SKELETON);
|
||||
Skeletons = true;
|
||||
}
|
||||
if (!Skeletons)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_SUMMON_SKELETON);
|
||||
DoCast(m_creature->getVictim(), SPELL_SUMMON_SKELETON);
|
||||
DoCast(m_creature->getVictim(), SPELL_SUMMON_SKELETON);
|
||||
Skeletons = true;
|
||||
}
|
||||
|
||||
if (RainofBonesTimer < diff && !RainBones) // only once at the beginning of phase 2
|
||||
{
|
||||
@@ -368,8 +368,8 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
|
||||
if (DistractingAshTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target,SPELL_DISTRACTING_ASH);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target,SPELL_DISTRACTING_ASH);
|
||||
DistractingAshTimer = 2000;//timer wrong
|
||||
}else DistractingAshTimer -= diff;
|
||||
}
|
||||
@@ -385,17 +385,17 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
|
||||
if (FireballBarrageTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_FARTHEST, 0))
|
||||
DoCast(target,SPELL_FIREBALL_BARRAGE);
|
||||
FireballBarrageTimer = 20000; //Timer
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_FARTHEST, 0))
|
||||
DoCast(target,SPELL_FIREBALL_BARRAGE);
|
||||
FireballBarrageTimer = 20000; //Timer
|
||||
}else FireballBarrageTimer -= diff;
|
||||
|
||||
if (FlyTimer < diff) //landing
|
||||
{
|
||||
if(rand()%2 == 0)
|
||||
DoYell(YELL_LAND_PHASE_1, LANG_UNIVERSAL, NULL);
|
||||
else
|
||||
DoYell(YELL_LAND_PHASE_2, LANG_UNIVERSAL, NULL);
|
||||
if(rand()%2 == 0)
|
||||
DoYell(YELL_LAND_PHASE_1, LANG_UNIVERSAL, NULL);
|
||||
else
|
||||
DoYell(YELL_LAND_PHASE_2, LANG_UNIVERSAL, NULL);
|
||||
|
||||
(*m_creature).GetMotionMaster()->Clear(false);
|
||||
m_creature->GetMotionMaster()->MovePoint(3,IntroWay[3][0],IntroWay[3][1],IntroWay[3][2]);
|
||||
@@ -416,6 +416,6 @@ void AddSC_boss_nightbane()
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name="boss_nightbane";
|
||||
newscript->GetAI = &GetAI_boss_nightbane;
|
||||
newscript->GetAI = &GetAI_boss_nightbane;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -219,15 +219,15 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_SLAY3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_SLAY3, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
AxesCleanup();
|
||||
ClearWeapons();
|
||||
@@ -249,7 +249,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
@@ -392,8 +392,8 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
||||
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SUMMON1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SUMMON1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
||||
m_creature->SetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE, cinfo->mindmg);
|
||||
m_creature->SetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE, cinfo->maxdmg);
|
||||
|
||||
m_creature->SetAttackTime(OFF_ATTACK, (m_creature->GetAttackTime(BASE_ATTACK)*150)/100);
|
||||
m_creature->SetAttackTime(OFF_ATTACK, (m_creature->GetAttackTime(BASE_ATTACK)*150)/100);
|
||||
}
|
||||
}
|
||||
else if(phase == 2)
|
||||
@@ -557,16 +557,16 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
||||
{
|
||||
if(SWPainTimer < diff)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
Unit* target = NULL;
|
||||
if(phase == 1)
|
||||
target = m_creature->getVictim(); // the tank
|
||||
else //anyone but the tank
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
if (target)
|
||||
DoCast(target, SPELL_SW_PAIN);
|
||||
if (target)
|
||||
DoCast(target, SPELL_SW_PAIN);
|
||||
|
||||
SWPainTimer = 20000;
|
||||
SWPainTimer = 20000;
|
||||
}else SWPainTimer -= diff;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,14 +152,14 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
@@ -174,9 +174,9 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
}
|
||||
|
||||
if(pInstance)
|
||||
@@ -228,39 +228,39 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
return;
|
||||
|
||||
if(CloseDoorTimer)
|
||||
{
|
||||
if(CloseDoorTimer <= diff)
|
||||
{
|
||||
if(pInstance)
|
||||
{
|
||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||
Door->SetGoState(1);
|
||||
CloseDoorTimer = 0;
|
||||
}
|
||||
}else CloseDoorTimer -= diff;
|
||||
}
|
||||
{
|
||||
if(CloseDoorTimer <= diff)
|
||||
{
|
||||
if(pInstance)
|
||||
{
|
||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||
Door->SetGoState(1);
|
||||
CloseDoorTimer = 0;
|
||||
}
|
||||
}else CloseDoorTimer -= diff;
|
||||
}
|
||||
|
||||
//Cooldowns for casts
|
||||
if (ArcaneCooldown)
|
||||
{
|
||||
{
|
||||
if (ArcaneCooldown >= diff)
|
||||
ArcaneCooldown -= diff;
|
||||
else ArcaneCooldown = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (FireCooldown)
|
||||
{
|
||||
{
|
||||
if (FireCooldown >= diff)
|
||||
FireCooldown -= diff;
|
||||
else FireCooldown = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (FrostCooldown)
|
||||
{
|
||||
if (FrostCooldown >= diff)
|
||||
{
|
||||
if (FrostCooldown >= diff)
|
||||
FrostCooldown -= diff;
|
||||
else FrostCooldown = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(!Drinking && m_creature->GetMaxPower(POWER_MANA) && (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA)) < 20)
|
||||
{
|
||||
@@ -356,8 +356,8 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
DoCast(m_creature, SPELL_AOE_CS);
|
||||
break;
|
||||
case 1:
|
||||
if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pUnit, SPELL_CHAINSOFICE);
|
||||
if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pUnit, SPELL_CHAINSOFICE);
|
||||
break;
|
||||
}
|
||||
SecondarySpellTimer = 5000 + (rand()%15000);
|
||||
@@ -390,9 +390,9 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
case SUPER_AE:
|
||||
|
||||
if (rand()%2)
|
||||
DoScriptText(SAY_EXPLOSION1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_EXPLOSION2, m_creature);
|
||||
DoScriptText(SAY_EXPLOSION1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_EXPLOSION2, m_creature);
|
||||
|
||||
m_creature->CastSpell(m_creature, SPELL_BLINK_CENTER, true);
|
||||
m_creature->CastSpell(m_creature, SPELL_PLAYERPULL, true);
|
||||
@@ -402,9 +402,9 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
|
||||
case SUPER_FLAME:
|
||||
if (rand()%2)
|
||||
DoScriptText(SAY_FLAMEWREATH1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_FLAMEWREATH2, m_creature);
|
||||
DoScriptText(SAY_FLAMEWREATH1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_FLAMEWREATH2, m_creature);
|
||||
|
||||
FlameWreathTimer = 20000;
|
||||
FlameWreathCheckTime = 500;
|
||||
@@ -419,9 +419,9 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
case SUPER_BLIZZARD:
|
||||
|
||||
if (rand()%2)
|
||||
DoScriptText(SAY_BLIZZARD1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_BLIZZARD2, m_creature);
|
||||
DoScriptText(SAY_BLIZZARD1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_BLIZZARD2, m_creature);
|
||||
|
||||
Creature* Spawn = NULL;
|
||||
Spawn = DoSpawnCreature(CREATURE_ARAN_BLIZZARD, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 25000);
|
||||
|
||||
@@ -230,8 +230,8 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,8 +298,8 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
|
||||
Chains->CastSpell(Chains, SPELL_DEMON_CHAINS, true);
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SACRIFICE1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SACRIFICE2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SACRIFICE1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SACRIFICE2, m_creature); break;
|
||||
}
|
||||
SacrificeTimer = 30000;
|
||||
}
|
||||
@@ -325,8 +325,8 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
|
||||
SummonedPortals = true;
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SUMMON1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SUMMON1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
||||
}
|
||||
}
|
||||
uint32 random = rand()%2;
|
||||
@@ -340,13 +340,13 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
|
||||
}else SummonTimer -= diff;
|
||||
|
||||
if(!Berserk)
|
||||
{
|
||||
if(BerserkTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
Berserk = true;
|
||||
}else BerserkTimer -= diff;
|
||||
}
|
||||
{
|
||||
if(BerserkTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
Berserk = true;
|
||||
}else BerserkTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ struct TRINITY_DLL_DECL boss_dorotheeAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_DOROTHEE_AGGRO, m_creature);
|
||||
DoScriptText(SAY_DOROTHEE_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void SummonTito(); // See below
|
||||
@@ -167,13 +167,13 @@ struct TRINITY_DLL_DECL boss_dorotheeAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(AggroTimer)
|
||||
{
|
||||
if(AggroTimer <= diff)
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
AggroTimer = 0;
|
||||
}else AggroTimer -= diff;
|
||||
}
|
||||
{
|
||||
if(AggroTimer <= diff)
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
AggroTimer = 0;
|
||||
}else AggroTimer -= diff;
|
||||
}
|
||||
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
@@ -229,7 +229,7 @@ struct TRINITY_DLL_DECL mob_titoAI : public ScriptedAI
|
||||
if(Dorothee && Dorothee->isAlive())
|
||||
{
|
||||
((boss_dorotheeAI*)Dorothee->AI())->TitoDied = true;
|
||||
DoScriptText(SAY_DOROTHEE_TITO_DEATH, Dorothee);
|
||||
DoScriptText(SAY_DOROTHEE_TITO_DEATH, Dorothee);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -254,7 +254,7 @@ void boss_dorotheeAI::SummonTito()
|
||||
Creature* Tito = DoSpawnCreature(CREATURE_TITO, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
|
||||
if(Tito)
|
||||
{
|
||||
DoScriptText(SAY_DOROTHEE_SUMMON, m_creature);
|
||||
DoScriptText(SAY_DOROTHEE_SUMMON, m_creature);
|
||||
((mob_titoAI*)Tito->AI())->DorotheeGUID = m_creature->GetGUID();
|
||||
Tito->AI()->AttackStart(m_creature->getVictim());
|
||||
SummonedTito = true;
|
||||
@@ -301,7 +301,7 @@ struct TRINITY_DLL_DECL boss_strawmanAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_STRAWMAN_AGGRO, m_creature);
|
||||
DoScriptText(SAY_STRAWMAN_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellEntry *Spell)
|
||||
@@ -312,7 +312,7 @@ struct TRINITY_DLL_DECL boss_strawmanAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_STRAWMAN_DEATH, m_creature);
|
||||
DoScriptText(SAY_STRAWMAN_DEATH, m_creature);
|
||||
|
||||
if(pInstance)
|
||||
SummonCroneIfReady(pInstance, m_creature);
|
||||
@@ -320,19 +320,19 @@ struct TRINITY_DLL_DECL boss_strawmanAI : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
DoScriptText(SAY_STRAWMAN_SLAY, m_creature);
|
||||
DoScriptText(SAY_STRAWMAN_SLAY, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(AggroTimer)
|
||||
{
|
||||
if(AggroTimer <= diff)
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
AggroTimer = 0;
|
||||
}else AggroTimer -= diff;
|
||||
}
|
||||
{
|
||||
if(AggroTimer <= diff)
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
AggroTimer = 0;
|
||||
}else AggroTimer -= diff;
|
||||
}
|
||||
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
@@ -380,7 +380,7 @@ struct TRINITY_DLL_DECL boss_tinheadAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_TINHEAD_AGGRO, m_creature);
|
||||
DoScriptText(SAY_TINHEAD_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
@@ -401,7 +401,7 @@ struct TRINITY_DLL_DECL boss_tinheadAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_TINHEAD_DEATH, m_creature);
|
||||
DoScriptText(SAY_TINHEAD_DEATH, m_creature);
|
||||
|
||||
if(pInstance)
|
||||
SummonCroneIfReady(pInstance, m_creature);
|
||||
@@ -409,19 +409,19 @@ struct TRINITY_DLL_DECL boss_tinheadAI : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
DoScriptText(SAY_TINHEAD_SLAY, m_creature);
|
||||
DoScriptText(SAY_TINHEAD_SLAY, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(AggroTimer)
|
||||
{
|
||||
{
|
||||
if(AggroTimer < diff)
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
AggroTimer = 0;
|
||||
}else AggroTimer -= diff;
|
||||
}
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
AggroTimer = 0;
|
||||
}else AggroTimer -= diff;
|
||||
}
|
||||
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
@@ -488,12 +488,12 @@ struct TRINITY_DLL_DECL boss_roarAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_ROAR_AGGRO, m_creature);
|
||||
DoScriptText(SAY_ROAR_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_ROAR_DEATH, m_creature);
|
||||
DoScriptText(SAY_ROAR_DEATH, m_creature);
|
||||
|
||||
if(pInstance)
|
||||
SummonCroneIfReady(pInstance, m_creature);
|
||||
@@ -501,19 +501,19 @@ struct TRINITY_DLL_DECL boss_roarAI : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
DoScriptText(SAY_ROAR_SLAY, m_creature);
|
||||
DoScriptText(SAY_ROAR_SLAY, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(AggroTimer)
|
||||
{
|
||||
{
|
||||
if(AggroTimer <= diff)
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
AggroTimer = 0;
|
||||
}else AggroTimer -= diff;
|
||||
}
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
AggroTimer = 0;
|
||||
}else AggroTimer -= diff;
|
||||
}
|
||||
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
@@ -563,11 +563,11 @@ struct TRINITY_DLL_DECL boss_croneAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_CRONE_AGGRO, m_creature); break;
|
||||
case 1: DoScriptText(SAY_CRONE_AGGRO2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_CRONE_AGGRO, m_creature); break;
|
||||
case 1: DoScriptText(SAY_CRONE_AGGRO2, m_creature); break;
|
||||
}
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
@@ -1088,12 +1088,12 @@ struct TRINITY_DLL_DECL boss_romuloAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_ROMULO_DEATH, m_creature);
|
||||
DoScriptText(SAY_ROMULO_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
DoScriptText(SAY_ROMULO_SLAY, m_creature);
|
||||
DoScriptText(SAY_ROMULO_SLAY, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff);
|
||||
@@ -1106,7 +1106,7 @@ void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage)
|
||||
|
||||
if(Phase == PHASE_JULIANNE)
|
||||
{
|
||||
DoScriptText(SAY_JULIANNE_DEATH01, m_creature);
|
||||
DoScriptText(SAY_JULIANNE_DEATH01, m_creature);
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
DoCast(m_creature, SPELL_DRINK_POISON);
|
||||
PretendToDie(m_creature);
|
||||
@@ -1200,23 +1200,23 @@ void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage)
|
||||
void boss_julianneAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(EntryYellTimer)
|
||||
{
|
||||
if(EntryYellTimer < diff)
|
||||
{
|
||||
DoScriptText(SAY_JULIANNE_ENTER, m_creature);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
EntryYellTimer = 0;
|
||||
}else EntryYellTimer -= diff;
|
||||
}
|
||||
{
|
||||
if(EntryYellTimer < diff)
|
||||
{
|
||||
DoScriptText(SAY_JULIANNE_ENTER, m_creature);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
EntryYellTimer = 0;
|
||||
}else EntryYellTimer -= diff;
|
||||
}
|
||||
|
||||
if(AggroYellTimer)
|
||||
{
|
||||
if(AggroYellTimer < diff)
|
||||
{
|
||||
DoScriptText(SAY_JULIANNE_AGGRO, m_creature);
|
||||
AggroYellTimer = 0;
|
||||
}else AggroYellTimer -= diff;
|
||||
}
|
||||
{
|
||||
if(AggroYellTimer < diff)
|
||||
{
|
||||
DoScriptText(SAY_JULIANNE_AGGRO, m_creature);
|
||||
AggroYellTimer = 0;
|
||||
}else AggroYellTimer -= diff;
|
||||
}
|
||||
|
||||
if(Phase == PHASE_ROMULO && !SummonedRomulo)
|
||||
{
|
||||
@@ -1243,20 +1243,20 @@ void boss_julianneAI::UpdateAI(const uint32 diff)
|
||||
return;
|
||||
|
||||
if(RomuloDead)
|
||||
{
|
||||
{
|
||||
if(ResurrectTimer < diff)
|
||||
{
|
||||
Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID));
|
||||
if(Romulo && ((boss_romuloAI*)Romulo->AI())->IsFakingDeath)
|
||||
{
|
||||
DoScriptText(SAY_JULIANNE_RESURRECT, m_creature);
|
||||
Resurrect(Romulo);
|
||||
((boss_romuloAI*)Romulo->AI())->IsFakingDeath = false;
|
||||
ResurrectTimer = 10000;
|
||||
}
|
||||
RomuloDead = false;
|
||||
}else ResurrectTimer -= diff;
|
||||
}
|
||||
{
|
||||
Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID));
|
||||
if(Romulo && ((boss_romuloAI*)Romulo->AI())->IsFakingDeath)
|
||||
{
|
||||
DoScriptText(SAY_JULIANNE_RESURRECT, m_creature);
|
||||
Resurrect(Romulo);
|
||||
((boss_romuloAI*)Romulo->AI())->IsFakingDeath = false;
|
||||
ResurrectTimer = 10000;
|
||||
}
|
||||
RomuloDead = false;
|
||||
}else ResurrectTimer -= diff;
|
||||
}
|
||||
|
||||
if(BlindingPassionTimer < diff)
|
||||
{
|
||||
@@ -1299,20 +1299,20 @@ void boss_romuloAI::UpdateAI(const uint32 diff)
|
||||
return;
|
||||
|
||||
if(JulianneDead)
|
||||
{
|
||||
{
|
||||
if(ResurrectTimer < diff)
|
||||
{
|
||||
Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID));
|
||||
if(Julianne && ((boss_julianneAI*)Julianne->AI())->IsFakingDeath)
|
||||
{
|
||||
DoScriptText(SAY_ROMULO_RESURRECT, m_creature);
|
||||
Resurrect(Julianne);
|
||||
((boss_julianneAI*)Julianne->AI())->IsFakingDeath = false;
|
||||
ResurrectTimer = 10000;
|
||||
}
|
||||
JulianneDead = false;
|
||||
}else ResurrectTimer -= diff;
|
||||
}
|
||||
{
|
||||
Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID));
|
||||
if(Julianne && ((boss_julianneAI*)Julianne->AI())->IsFakingDeath)
|
||||
{
|
||||
DoScriptText(SAY_ROMULO_RESURRECT, m_creature);
|
||||
Resurrect(Julianne);
|
||||
((boss_julianneAI*)Julianne->AI())->IsFakingDeath = false;
|
||||
ResurrectTimer = 10000;
|
||||
}
|
||||
JulianneDead = false;
|
||||
}else ResurrectTimer -= diff;
|
||||
}
|
||||
|
||||
if(BackwardLungeTimer < diff)
|
||||
{
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#define DATA_GAMEOBJECT_GAME_DOOR 24
|
||||
#define DATA_GAMEOBJECT_GAME_EXIT_DOOR 25
|
||||
#define DATA_IMAGE_OF_MEDIVH 26
|
||||
#define DATA_MASTERS_TERRACE_DOOR_1 27
|
||||
#define DATA_MASTERS_TERRACE_DOOR_2 28
|
||||
#define DATA_MASTERS_TERRACE_DOOR_1 27
|
||||
#define DATA_MASTERS_TERRACE_DOOR_2 28
|
||||
|
||||
// Opera Performances
|
||||
#define EVENT_OZ 1
|
||||
|
||||
@@ -60,9 +60,9 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
uint64 MassiveDoor; // Door at Netherspite
|
||||
uint64 GamesmansDoor; // Door before Chess
|
||||
uint64 GamesmansExitDoor; // Door after Chess
|
||||
uint64 NetherspaceDoor; // Door at Malchezaar
|
||||
uint64 MastersTerraceDoor[2];
|
||||
uint64 ImageGUID;
|
||||
uint64 NetherspaceDoor; // Door at Malchezaar
|
||||
uint64 MastersTerraceDoor[2];
|
||||
uint64 ImageGUID;
|
||||
|
||||
uint8 Nightbane;
|
||||
bool CheckNightbane;
|
||||
@@ -88,12 +88,12 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
GamesmansDoor = 0;
|
||||
GamesmansExitDoor = 0;
|
||||
NetherspaceDoor = 0;
|
||||
MastersTerraceDoor[0]= 0;
|
||||
MastersTerraceDoor[1]= 0;
|
||||
ImageGUID = 0;
|
||||
MastersTerraceDoor[0]= 0;
|
||||
MastersTerraceDoor[1]= 0;
|
||||
ImageGUID = 0;
|
||||
|
||||
Nightbane = 0;
|
||||
|
||||
|
||||
CheckNightbane = false;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
{
|
||||
for (uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||
if (Encounters[i] == IN_PROGRESS)
|
||||
return true;
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
}else return Encounters[11];
|
||||
case DATA_OPERA_PERFORMANCE: return OperaEvent;
|
||||
case DATA_OPERA_OZ_DEATHCOUNT: return OzDeathCount;
|
||||
case DATA_IMAGE_OF_MEDIVH: return ImageGUID;
|
||||
case DATA_IMAGE_OF_MEDIVH: return ImageGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -160,8 +160,8 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
case DATA_GAMEOBJECT_GAME_DOOR: return GamesmansDoor;
|
||||
case DATA_GAMEOBJECT_GAME_EXIT_DOOR: return GamesmansExitDoor;
|
||||
case DATA_GAMEOBJECT_NETHER_DOOR: return NetherspaceDoor;
|
||||
case DATA_MASTERS_TERRACE_DOOR_1: return MastersTerraceDoor[0];
|
||||
case DATA_MASTERS_TERRACE_DOOR_2: return MastersTerraceDoor[1];
|
||||
case DATA_MASTERS_TERRACE_DOOR_1: return MastersTerraceDoor[0];
|
||||
case DATA_MASTERS_TERRACE_DOOR_2: return MastersTerraceDoor[1];
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -172,11 +172,11 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
switch (type)
|
||||
{
|
||||
case DATA_ATTUMEN_EVENT: Encounters[0] = data; break;
|
||||
case DATA_MOROES_EVENT:
|
||||
if (Encounters[1] == DONE)
|
||||
break;
|
||||
Encounters[1] = data;
|
||||
break;
|
||||
case DATA_MOROES_EVENT:
|
||||
if (Encounters[1] == DONE)
|
||||
break;
|
||||
Encounters[1] = data;
|
||||
break;
|
||||
case DATA_MAIDENOFVIRTUE_EVENT: Encounters[2] = data; break;
|
||||
case DATA_OPTIONAL_BOSS_EVENT: Encounters[3] = data; break;
|
||||
case DATA_OPERA_EVENT: Encounters[4] = data; break;
|
||||
@@ -186,7 +186,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
case DATA_NETHERSPITE_EVENT: Encounters[8] = data; break;
|
||||
case DATA_CHESS_EVENT: Encounters[9] = data; break;
|
||||
case DATA_MALCHEZZAR_EVENT: Encounters[10] = data; break;
|
||||
case DATA_NIGHTBANE_EVENT:
|
||||
case DATA_NIGHTBANE_EVENT:
|
||||
if(data == 6)
|
||||
{
|
||||
Nightbane;
|
||||
@@ -200,13 +200,13 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
void SetData64(uint32 identifier, uint64 data)
|
||||
{
|
||||
switch(identifier)
|
||||
{
|
||||
case DATA_IMAGE_OF_MEDIVH: ImageGUID = data;
|
||||
}
|
||||
}
|
||||
void SetData64(uint32 identifier, uint64 data)
|
||||
{
|
||||
switch(identifier)
|
||||
{
|
||||
case DATA_IMAGE_OF_MEDIVH: ImageGUID = data;
|
||||
}
|
||||
}
|
||||
|
||||
void OnObjectCreate(GameObject* go)
|
||||
{
|
||||
@@ -220,8 +220,8 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
case 184276: GamesmansDoor = go->GetGUID(); break;
|
||||
case 184277: GamesmansExitDoor = go->GetGUID(); break;
|
||||
case 185134: NetherspaceDoor = go->GetGUID(); break;
|
||||
case 184274: MastersTerraceDoor[0] = go->GetGUID(); break;
|
||||
case 184280: MastersTerraceDoor[1] = go->GetGUID(); break;
|
||||
case 184274: MastersTerraceDoor[0] = go->GetGUID(); break;
|
||||
case 184280: MastersTerraceDoor[1] = go->GetGUID(); break;
|
||||
}
|
||||
|
||||
switch(OperaEvent)
|
||||
|
||||
@@ -49,31 +49,31 @@ EndContentData */
|
||||
struct Dialogue
|
||||
{
|
||||
int32 textid;
|
||||
uint32 timer;
|
||||
uint32 timer;
|
||||
};
|
||||
|
||||
static Dialogue OzDialogue[]=
|
||||
{
|
||||
{-1532103, 6000},
|
||||
{-1532104, 18000},
|
||||
{-1532105, 9000},
|
||||
{-1532106, 15000}
|
||||
{-1532103, 6000},
|
||||
{-1532104, 18000},
|
||||
{-1532105, 9000},
|
||||
{-1532106, 15000}
|
||||
};
|
||||
|
||||
static Dialogue HoodDialogue[]=
|
||||
{
|
||||
{-1532107, 6000},
|
||||
{-1532108, 10000},
|
||||
{-1532109, 14000},
|
||||
{-1532110, 15000}
|
||||
{-1532107, 6000},
|
||||
{-1532108, 10000},
|
||||
{-1532109, 14000},
|
||||
{-1532110, 15000}
|
||||
};
|
||||
|
||||
static Dialogue RAJDialogue[]=
|
||||
{
|
||||
{-1532111, 5000},
|
||||
{-1532112, 7000},
|
||||
{-1532113, 14000},
|
||||
{-1532114, 14000}
|
||||
{-1532111, 5000},
|
||||
{-1532112, 7000},
|
||||
{-1532113, 14000},
|
||||
{-1532114, 14000}
|
||||
};
|
||||
|
||||
// Entries and spawn locations for creatures in Oz event
|
||||
@@ -166,7 +166,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
|
||||
float x,y,z;
|
||||
m_creature->GetPosition(x, y, z);
|
||||
if (Creature* Spotlight = m_creature->SummonCreature(CREATURE_SPOTLIGHT, x, y, z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 50000))
|
||||
if (Creature* Spotlight = m_creature->SummonCreature(CREATURE_SPOTLIGHT, x, y, z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 50000))
|
||||
{
|
||||
Spotlight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Spotlight->CastSpell(Spotlight, SPELL_SPOTLIGHT, false);
|
||||
@@ -177,7 +177,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
case 5:
|
||||
if(pInstance)
|
||||
{
|
||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
Door->SetGoState(1);
|
||||
}
|
||||
IsBeingEscorted = false;
|
||||
@@ -194,21 +194,21 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
{
|
||||
case EVENT_OZ:
|
||||
if (OzDialogue[count].textid)
|
||||
text = OzDialogue[count].textid;
|
||||
text = OzDialogue[count].textid;
|
||||
if(OzDialogue[count].timer)
|
||||
TalkTimer = OzDialogue[count].timer;
|
||||
break;
|
||||
|
||||
case EVENT_HOOD:
|
||||
if (HoodDialogue[count].textid)
|
||||
text = HoodDialogue[count].textid;
|
||||
if (HoodDialogue[count].textid)
|
||||
text = HoodDialogue[count].textid;
|
||||
if(HoodDialogue[count].timer)
|
||||
TalkTimer = HoodDialogue[count].timer;
|
||||
break;
|
||||
|
||||
case EVENT_RAJ:
|
||||
if (RAJDialogue[count].textid)
|
||||
text = RAJDialogue[count].textid;
|
||||
text = RAJDialogue[count].textid;
|
||||
if(RAJDialogue[count].timer)
|
||||
TalkTimer = RAJDialogue[count].timer;
|
||||
break;
|
||||
@@ -249,7 +249,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
if(PerformanceReady)
|
||||
{
|
||||
if(CurtainTimer)
|
||||
{
|
||||
{
|
||||
if(CurtainTimer <= diff)
|
||||
{
|
||||
PrepareEncounter();
|
||||
@@ -257,12 +257,12 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
if(!pInstance)
|
||||
return;
|
||||
|
||||
if (GameObject* Curtain = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_CURTAINS)))
|
||||
if (GameObject* Curtain = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_CURTAINS)))
|
||||
Curtain->SetGoState(0);
|
||||
|
||||
CurtainTimer = 0;
|
||||
}else CurtainTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if(!RaidWiped)
|
||||
{
|
||||
@@ -310,7 +310,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
|
||||
pInstance->SetData(DATA_OPERA_EVENT, IN_PROGRESS);
|
||||
|
||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||
Door->SetGoState(0);
|
||||
|
||||
m_creature->CastSpell(m_creature, SPELL_TUXEDO, true);
|
||||
@@ -451,7 +451,7 @@ bool GossipSelect_npc_berthold(Player* player, Creature* _Creature, uint32 sende
|
||||
#define SPELL_FIRE_BALL 30967
|
||||
#define SPELL_UBER_FIREBALL 30971
|
||||
#define SPELL_CONFLAGRATION_BLAST 30977
|
||||
#define SPELL_MANA_SHIELD 31635
|
||||
#define SPELL_MANA_SHIELD 31635
|
||||
|
||||
static float MedivPos[4] = {-11161.49,-1902.24,91.48,1.94};
|
||||
static float ArcanagosPos[4] = {-11169.75,-1881.48,95.39,4.83};
|
||||
@@ -473,11 +473,11 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI
|
||||
uint32 FireMedivhTimer;
|
||||
uint32 FireArcanagosTimer;
|
||||
|
||||
bool EventStarted;
|
||||
bool EventStarted;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ArcanagosGUID = 0;
|
||||
ArcanagosGUID = 0;
|
||||
|
||||
if(pInstance && pInstance->GetData64(DATA_IMAGE_OF_MEDIVH) == 0)
|
||||
{
|
||||
@@ -551,7 +551,7 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI
|
||||
return 5000;
|
||||
case 8:
|
||||
FireMedivhTimer = 500;
|
||||
DoCast(m_creature, SPELL_MANA_SHIELD);
|
||||
DoCast(m_creature, SPELL_MANA_SHIELD);
|
||||
return 10000;
|
||||
case 9:
|
||||
m_creature->TextEmote(EMOTE_DIALOG_MEDIVH_7, 0, false);
|
||||
@@ -565,34 +565,34 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI
|
||||
((Creature*)arca)->Yell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL, NULL);
|
||||
return 5000;
|
||||
case 12:
|
||||
arca->GetMotionMaster()->MovePoint(0, -11010.82,-1761.18, 156.47);
|
||||
arca->setActive(true);
|
||||
arca->InterruptNonMeleeSpells(true);
|
||||
arca->SetSpeed(MOVE_FLIGHT, 2.0f);
|
||||
arca->GetMotionMaster()->MovePoint(0, -11010.82,-1761.18, 156.47);
|
||||
arca->setActive(true);
|
||||
arca->InterruptNonMeleeSpells(true);
|
||||
arca->SetSpeed(MOVE_FLIGHT, 2.0f);
|
||||
return 10000;
|
||||
case 13:
|
||||
m_creature->Yell(SAY_DIALOG_MEDIVH_9, LANG_UNIVERSAL, NULL);
|
||||
return 10000;
|
||||
case 14:
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->ClearInCombat();
|
||||
case 14:
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->ClearInCombat();
|
||||
|
||||
if(map->IsDungeon())
|
||||
{
|
||||
if(map->IsDungeon())
|
||||
{
|
||||
InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers();
|
||||
for (InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if(i->getSource()->isAlive())
|
||||
if(i->getSource()->isAlive())
|
||||
{
|
||||
if(i->getSource()->GetQuestStatus(9645) == QUEST_STATUS_INCOMPLETE)
|
||||
i->getSource()->CompleteQuest(9645);
|
||||
if(i->getSource()->GetQuestStatus(9645) == QUEST_STATUS_INCOMPLETE)
|
||||
i->getSource()->CompleteQuest(9645);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 50000;
|
||||
case 15:
|
||||
arca->DealDamage(arca,arca->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return 5000;
|
||||
return 50000;
|
||||
case 15:
|
||||
arca->DealDamage(arca,arca->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return 5000;
|
||||
default : return 9999999;
|
||||
}
|
||||
|
||||
@@ -653,7 +653,7 @@ void AddSC_karazhan()
|
||||
newscript->pGossipSelect = &GossipSelect_npc_berthold;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_image_of_medivh";
|
||||
newscript->GetAI = &GetAI_npc_image_of_medivh;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -42,7 +42,7 @@ EndScriptData */
|
||||
|
||||
#define SPELL_PHOENIX 44194 // Summons a phoenix (Doesn't work?)
|
||||
#define SPELL_PHOENIX_BURN 44198 // A spell Phoenix uses to damage everything around
|
||||
#define SPELL_PHOENIX_FIREBALL 44202 // Phoenix casts this in phase 2 and stops moving
|
||||
#define SPELL_PHOENIX_FIREBALL 44202 // Phoenix casts this in phase 2 and stops moving
|
||||
|
||||
#define SPELL_FLAMESTRIKE1_NORMAL 44190 // Damage part
|
||||
#define SPELL_FLAMESTRIKE1_HEROIC 46163 // Heroic damage part
|
||||
@@ -73,9 +73,9 @@ float KaelLocations[6][2]=
|
||||
{148.744659, 181.377426},//center
|
||||
{140.823883, 195.403046},//phoenixpos1
|
||||
{156.574188, 195.650482},//phoenixpos2
|
||||
{149.813, 160.917},//spherepos1
|
||||
{167.223, 173.594},//spherepos2
|
||||
{130.68, 173.007},//spherepos3
|
||||
{149.813, 160.917},//spherepos1
|
||||
{167.223, 173.594},//spherepos2
|
||||
{130.68, 173.007},//spherepos3
|
||||
};
|
||||
#define LOCATION_Z -16.727455
|
||||
|
||||
@@ -85,7 +85,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
Heroic = c->GetMap()->IsHeroic();
|
||||
Heroic = c->GetMap()->IsHeroic();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
@@ -132,15 +132,15 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
Phase = 0;
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
if(m_creature->isDead())
|
||||
pInstance->SetData(DATA_KAELTHAS_EVENT, DONE);
|
||||
else
|
||||
pInstance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED);
|
||||
}
|
||||
{
|
||||
if(m_creature->isDead())
|
||||
pInstance->SetData(DATA_KAELTHAS_EVENT, DONE);
|
||||
else
|
||||
pInstance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if(victim && (victim->GetTypeId() == TYPEID_PLAYER))
|
||||
{
|
||||
@@ -152,13 +152,13 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
data << uint32(0);
|
||||
victim->SendMessageToSet(&data, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
RemoveGravityLapse();
|
||||
RemoveGravityLapse();
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_KAELTHAS_EVENT, DONE);
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_KAELTHAS_EVENT, DONE);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* done_by, uint32 &damage)
|
||||
@@ -170,14 +170,14 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS);
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void SetThreatList(Creature* SummonedUnit)
|
||||
{
|
||||
if(!SummonedUnit)
|
||||
return;
|
||||
return;
|
||||
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
std::list<HostilReference*>::iterator i = m_threatlist.begin();
|
||||
@@ -192,53 +192,53 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
RemoveGravityLapse();
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
m_creature->RemoveAllAuras();
|
||||
m_creature->DeleteThreatList();
|
||||
m_creature->CombatStop();
|
||||
m_creature->LoadCreaturesAddon();
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
RemoveGravityLapse();
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
m_creature->RemoveAllAuras();
|
||||
m_creature->DeleteThreatList();
|
||||
m_creature->CombatStop();
|
||||
m_creature->LoadCreaturesAddon();
|
||||
|
||||
if( m_creature->isAlive() )
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
if( m_creature->isAlive() )
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
m_creature->SetLootRecipient(NULL);
|
||||
|
||||
InCombat = false;
|
||||
Reset();
|
||||
}
|
||||
InCombat = false;
|
||||
Reset();
|
||||
}
|
||||
|
||||
void TeleportPlayersToSelf()
|
||||
{
|
||||
float x,y,z;
|
||||
float x,y,z;
|
||||
m_creature->Relocate(KaelLocations[0][0], KaelLocations[0][1], LOCATION_Z, 0);
|
||||
Map *map = m_creature->GetMap();
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList::const_iterator i;
|
||||
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (Player* i_pl = i->getSource())
|
||||
if(i_pl->isAlive())
|
||||
{
|
||||
i_pl->CastSpell(i_pl, SPELL_TELEPORT_CENTER, true);
|
||||
m_creature->GetNearPoint(m_creature,x,y,z,5,5,0);
|
||||
i_pl->TeleportTo(m_creature->GetMapId(),x,y,LOCATION_Z,i_pl->GetOrientation());
|
||||
}
|
||||
Map::PlayerList::const_iterator i;
|
||||
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (Player* i_pl = i->getSource())
|
||||
if(i_pl->isAlive())
|
||||
{
|
||||
i_pl->CastSpell(i_pl, SPELL_TELEPORT_CENTER, true);
|
||||
m_creature->GetNearPoint(m_creature,x,y,z,5,5,0);
|
||||
i_pl->TeleportTo(m_creature->GetMapId(),x,y,LOCATION_Z,i_pl->GetOrientation());
|
||||
}
|
||||
}
|
||||
DoCast(m_creature, SPELL_TELEPORT_CENTER, true);
|
||||
}
|
||||
|
||||
void CastGravityLapseKnockUp()
|
||||
{
|
||||
Map *map = m_creature->GetMap();
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList::const_iterator i;
|
||||
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
Map::PlayerList::const_iterator i;
|
||||
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (Player* i_pl = i->getSource())
|
||||
if(i_pl->isAlive())
|
||||
if(i_pl->isAlive())
|
||||
// Knockback into the air
|
||||
i_pl->CastSpell(i_pl, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetGUID());
|
||||
}
|
||||
@@ -246,14 +246,14 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
|
||||
void CastGravityLapseFly() // Use Fly Packet hack for now as players can't cast "fly" spells unless in map 530. Has to be done a while after they get knocked into the air...
|
||||
{
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList::const_iterator i;
|
||||
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList::const_iterator i;
|
||||
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (Player* i_pl = i->getSource())
|
||||
{
|
||||
if(i_pl->isAlive())
|
||||
if(i_pl->isAlive())
|
||||
{
|
||||
// Also needs an exception in spell system.
|
||||
i_pl->CastSpell(i_pl, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, m_creature->GetGUID());
|
||||
@@ -263,7 +263,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
data.append(i_pl->GetPackGUID());
|
||||
data << uint32(0);
|
||||
i_pl->SendMessageToSet(&data, true);
|
||||
i_pl->SetSpeed(MOVE_FLIGHT, 2.0f);
|
||||
i_pl->SetSpeed(MOVE_FLIGHT, 2.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -271,11 +271,11 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
|
||||
void RemoveGravityLapse()
|
||||
{
|
||||
Map *map = m_creature->GetMap();
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
Map::PlayerList::const_iterator i;
|
||||
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
Map::PlayerList::const_iterator i;
|
||||
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if(Player* i_pl = i->getSource())
|
||||
{
|
||||
i_pl->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY);
|
||||
@@ -300,14 +300,14 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
{
|
||||
// *Heroic mode only:
|
||||
if(Heroic)
|
||||
{
|
||||
{
|
||||
if(PyroblastTimer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_SHOCK_BARRIER, true);
|
||||
DoCast(m_creature->getVictim(), SPELL_PYROBLAST);
|
||||
PyroblastTimer = 60000;
|
||||
}else PyroblastTimer -= diff;
|
||||
}
|
||||
{
|
||||
DoCast(m_creature, SPELL_SHOCK_BARRIER, true);
|
||||
DoCast(m_creature->getVictim(), SPELL_PYROBLAST);
|
||||
PyroblastTimer = 60000;
|
||||
}else PyroblastTimer -= diff;
|
||||
}
|
||||
|
||||
if(FireballTimer < diff)
|
||||
{
|
||||
@@ -325,19 +325,19 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
{
|
||||
Phoenix->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE);
|
||||
SetThreatList(Phoenix);
|
||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
if(target)
|
||||
{
|
||||
Phoenix->AddThreat(target,1000);
|
||||
Phoenix->Attack(target,true);
|
||||
Phoenix->GetMotionMaster()->MoveChase(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
Phoenix->AddThreat(m_creature->getVictim(),1000);
|
||||
Phoenix->Attack(m_creature->getVictim(),true);
|
||||
Phoenix->GetMotionMaster()->MoveChase(m_creature->getVictim());
|
||||
}
|
||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1);
|
||||
if(target)
|
||||
{
|
||||
Phoenix->AddThreat(target,1000);
|
||||
Phoenix->Attack(target,true);
|
||||
Phoenix->GetMotionMaster()->MoveChase(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
Phoenix->AddThreat(m_creature->getVictim(),1000);
|
||||
Phoenix->Attack(m_creature->getVictim(),true);
|
||||
Phoenix->GetMotionMaster()->MoveChase(m_creature->getVictim());
|
||||
}
|
||||
}
|
||||
|
||||
DoScriptText(SAY_PHOENIX, m_creature);
|
||||
@@ -347,13 +347,13 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
|
||||
if(FlameStrikeTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(target, SPELL_FLAMESTRIKE3, true);
|
||||
DoScriptText(SAY_FLAMESTRIKE, m_creature);
|
||||
DoScriptText(SAY_FLAMESTRIKE, m_creature);
|
||||
|
||||
FlameStrikeTimer = 20000 + rand()%5000;
|
||||
FlameStrikeTimer = 20000 + rand()%5000;
|
||||
}
|
||||
}else FlameStrikeTimer -= diff;
|
||||
|
||||
@@ -374,7 +374,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
|
||||
case 1:
|
||||
{
|
||||
m_creature->StopMoving();
|
||||
m_creature->StopMoving();
|
||||
if(GravityLapseTimer < diff)
|
||||
{
|
||||
switch(GravityLapsePhase)
|
||||
@@ -382,7 +382,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
case 0:
|
||||
if(FirstGravityLapse) // Different yells at 50%, and at every following Gravity Lapse
|
||||
{
|
||||
DoScriptText(SAY_GRAVITY_LAPSE, m_creature);
|
||||
DoScriptText(SAY_GRAVITY_LAPSE, m_creature);
|
||||
FirstGravityLapse = false;
|
||||
if(pInstance)
|
||||
{
|
||||
@@ -393,9 +393,9 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
}
|
||||
}else
|
||||
{
|
||||
DoScriptText(SAY_RECAST_GRAVITY, m_creature);
|
||||
DoScriptText(SAY_RECAST_GRAVITY, m_creature);
|
||||
}
|
||||
m_creature->StopMoving();
|
||||
m_creature->StopMoving();
|
||||
DoCast(m_creature, SPELL_GRAVITY_LAPSE_INITIAL);
|
||||
GravityLapseTimer = 2000 + diff;// Don't interrupt the visual spell
|
||||
GravityLapsePhase = 1;
|
||||
@@ -419,28 +419,28 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
||||
GravityLapsePhase = 4;
|
||||
for(uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Creature* Orb = m_creature->SummonCreature(CREATURE_ARCANE_SPHERE,KaelLocations[3+i][0],KaelLocations[3+i][1],LOCATION_Z,0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,30000);
|
||||
if(Orb)
|
||||
{
|
||||
SetThreatList(Orb);
|
||||
Unit *target = SelectUnit(SELECT_TARGET_BOTTOMAGGRO,i);
|
||||
if(target)
|
||||
{
|
||||
Orb->AddThreat(target,1000);
|
||||
Orb->Attack(target,true);
|
||||
Orb->GetMotionMaster()->MoveChase(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit *ntarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if(ntarget)
|
||||
{
|
||||
Orb->AddThreat(ntarget,1000);
|
||||
Orb->Attack(ntarget,true);
|
||||
Orb->GetMotionMaster()->MoveChase(ntarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
Creature* Orb = m_creature->SummonCreature(CREATURE_ARCANE_SPHERE,KaelLocations[3+i][0],KaelLocations[3+i][1],LOCATION_Z,0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,30000);
|
||||
if(Orb)
|
||||
{
|
||||
SetThreatList(Orb);
|
||||
Unit *target = SelectUnit(SELECT_TARGET_BOTTOMAGGRO,i);
|
||||
if(target)
|
||||
{
|
||||
Orb->AddThreat(target,1000);
|
||||
Orb->Attack(target,true);
|
||||
Orb->GetMotionMaster()->MoveChase(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit *ntarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if(ntarget)
|
||||
{
|
||||
Orb->AddThreat(ntarget,1000);
|
||||
Orb->Attack(ntarget,true);
|
||||
Orb->GetMotionMaster()->MoveChase(ntarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DoCast(m_creature, SPELL_GRAVITY_LAPSE_CHANNEL);
|
||||
break;
|
||||
@@ -497,73 +497,73 @@ struct TRINITY_DLL_DECL mob_felkael_flamestrikeAI : public ScriptedAI
|
||||
struct TRINITY_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI
|
||||
{
|
||||
mob_felkael_phoenixAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
uint32 BurnTimer;
|
||||
uint32 CheckTimer;
|
||||
uint8 phase;
|
||||
ScriptedInstance* pInstance;
|
||||
bool end;
|
||||
uint32 CheckTimer;
|
||||
uint8 phase;
|
||||
ScriptedInstance* pInstance;
|
||||
bool end;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetSpeed(MOVE_RUN, 0.5f);
|
||||
m_creature->SetSpeed(MOVE_WALK, 0.5f);
|
||||
m_creature->SetSpeed(MOVE_RUN, 0.5f);
|
||||
m_creature->SetSpeed(MOVE_WALK, 0.5f);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE);
|
||||
BurnTimer = 2000;
|
||||
CheckTimer = 1000;
|
||||
phase = 0;
|
||||
end = false;
|
||||
CheckTimer = 1000;
|
||||
phase = 0;
|
||||
end = false;
|
||||
}
|
||||
|
||||
void Aggro(Unit* who) {}
|
||||
|
||||
void JustDied(Unit* slayer)
|
||||
{
|
||||
if (end)
|
||||
return;
|
||||
if (end)
|
||||
return;
|
||||
DoSpawnCreature(CREATURE_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 45000);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(CheckTimer < diff)
|
||||
if(CheckTimer < diff)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature *boss = ((Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_KAEL)));
|
||||
if (boss)
|
||||
{
|
||||
phase = ((boss_felblood_kaelthasAI*)boss->AI())->Phase;
|
||||
if(boss->isDead() || !boss->isInCombat())
|
||||
{
|
||||
end = true;
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FIRE, NULL, false);//temphack, hellfire is not damaging self
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
Creature *boss = ((Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_KAEL)));
|
||||
if (boss)
|
||||
{
|
||||
phase = ((boss_felblood_kaelthasAI*)boss->AI())->Phase;
|
||||
if(boss->isDead() || !boss->isInCombat())
|
||||
{
|
||||
end = true;
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FIRE, NULL, false);//temphack, hellfire is not damaging self
|
||||
}
|
||||
}
|
||||
}
|
||||
CheckTimer = 1000;
|
||||
}else CheckTimer -= diff;
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (BurnTimer < diff)
|
||||
{
|
||||
if(!phase)
|
||||
{
|
||||
DoCast(m_creature, SPELL_PHOENIX_BURN);
|
||||
m_creature->DealDamage(m_creature, 1500, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FIRE, NULL, false);//temphack, hellfire is not damaging self
|
||||
}
|
||||
else
|
||||
{
|
||||
m_creature->StopMoving();
|
||||
DoCast(m_creature->getVictim(), SPELL_PHOENIX_FIREBALL);
|
||||
}
|
||||
BurnTimer = 2000;
|
||||
}else BurnTimer -= diff;
|
||||
if (BurnTimer < diff)
|
||||
{
|
||||
if(!phase)
|
||||
{
|
||||
DoCast(m_creature, SPELL_PHOENIX_BURN);
|
||||
m_creature->DealDamage(m_creature, 1500, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FIRE, NULL, false);//temphack, hellfire is not damaging self
|
||||
}
|
||||
else
|
||||
{
|
||||
m_creature->StopMoving();
|
||||
DoCast(m_creature->getVictim(), SPELL_PHOENIX_FIREBALL);
|
||||
}
|
||||
BurnTimer = 2000;
|
||||
}else BurnTimer -= diff;
|
||||
|
||||
//DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -572,13 +572,13 @@ struct TRINITY_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI
|
||||
struct TRINITY_DLL_DECL mob_felkael_phoenix_eggAI : public Scripted_NoMovementAI
|
||||
{
|
||||
mob_felkael_phoenix_eggAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 HatchTimer;
|
||||
ScriptedInstance* pInstance;
|
||||
ScriptedInstance* pInstance;
|
||||
void Reset() { HatchTimer = 15000; }
|
||||
|
||||
void Aggro(Unit* who) {}
|
||||
@@ -588,43 +588,43 @@ struct TRINITY_DLL_DECL mob_felkael_phoenix_eggAI : public Scripted_NoMovementAI
|
||||
|
||||
if(HatchTimer < diff)
|
||||
{
|
||||
Creature *bird = DoSpawnCreature(CREATURE_PHOENIX, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 60000);
|
||||
if (bird)
|
||||
{
|
||||
Unit *boss = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_KAEL));
|
||||
if (boss && boss->getVictim())
|
||||
{
|
||||
bird->AddThreat(boss->getVictim(),100);
|
||||
bird->Attack(boss->getVictim(),true);
|
||||
bird->GetMotionMaster()->MoveChase(boss->getVictim());
|
||||
}
|
||||
}
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}else HatchTimer -= diff;
|
||||
Creature *bird = DoSpawnCreature(CREATURE_PHOENIX, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 60000);
|
||||
if (bird)
|
||||
{
|
||||
Unit *boss = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_KAEL));
|
||||
if (boss && boss->getVictim())
|
||||
{
|
||||
bird->AddThreat(boss->getVictim(),100);
|
||||
bird->Attack(boss->getVictim(),true);
|
||||
bird->GetMotionMaster()->MoveChase(boss->getVictim());
|
||||
}
|
||||
}
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}else HatchTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL mob_arcane_sphereAI : public ScriptedAI
|
||||
{
|
||||
mob_arcane_sphereAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
uint32 DespawnTimer;
|
||||
uint32 ChangeTargetTimer;
|
||||
uint32 CheckTimer;
|
||||
uint32 CheckTimer;
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
|
||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
|
||||
DespawnTimer = 30000;
|
||||
ChangeTargetTimer = 5000;
|
||||
CheckTimer = 1000;
|
||||
m_creature->SetSpeed(MOVE_RUN, 0.5f);
|
||||
m_creature->SetSpeed(MOVE_WALK, 0.5f);
|
||||
CheckTimer = 1000;
|
||||
m_creature->SetSpeed(MOVE_RUN, 0.5f);
|
||||
m_creature->SetSpeed(MOVE_WALK, 0.5f);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->setFaction(14);
|
||||
DoCast(m_creature, SPELL_ARCANE_SPHERE_PASSIVE, true);
|
||||
@@ -636,9 +636,9 @@ struct TRINITY_DLL_DECL mob_arcane_sphereAI : public ScriptedAI
|
||||
{
|
||||
if(!target)
|
||||
return;
|
||||
m_creature->AddThreat(target,100000);
|
||||
m_creature->GetMotionMaster()->MoveChase(target);
|
||||
m_creature->Attack(target,true);
|
||||
m_creature->AddThreat(target,100000);
|
||||
m_creature->GetMotionMaster()->MoveChase(target);
|
||||
m_creature->Attack(target,true);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -648,28 +648,28 @@ struct TRINITY_DLL_DECL mob_arcane_sphereAI : public ScriptedAI
|
||||
else DespawnTimer -= diff;
|
||||
|
||||
if(!UpdateVictim())
|
||||
ChangeTargetTimer = 0;
|
||||
ChangeTargetTimer = 0;
|
||||
|
||||
if(ChangeTargetTimer < diff)
|
||||
{
|
||||
DoResetThreat();
|
||||
DoResetThreat();
|
||||
Unit *ntarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if (ntarget)
|
||||
StalkTarget(ntarget);
|
||||
if (ntarget)
|
||||
StalkTarget(ntarget);
|
||||
ChangeTargetTimer = 10000;
|
||||
}else ChangeTargetTimer -= diff;
|
||||
|
||||
if(CheckTimer < diff)
|
||||
if(CheckTimer < diff)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
Creature *boss = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_KAEL));
|
||||
if(boss)
|
||||
{
|
||||
if(!((boss_felblood_kaelthasAI*)boss->AI())->Phase || boss->isDead())
|
||||
DespawnTimer = 0;
|
||||
}else DespawnTimer = 0;
|
||||
}
|
||||
{
|
||||
Creature *boss = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_KAEL));
|
||||
if(boss)
|
||||
{
|
||||
if(!((boss_felblood_kaelthasAI*)boss->AI())->Phase || boss->isDead())
|
||||
DespawnTimer = 0;
|
||||
}else DespawnTimer = 0;
|
||||
}
|
||||
CheckTimer = 1000;
|
||||
}else CheckTimer -= diff;
|
||||
}
|
||||
@@ -678,30 +678,30 @@ struct TRINITY_DLL_DECL mob_arcane_sphereAI : public ScriptedAI
|
||||
bool GOHello_go_kael_orb(Player *player, GameObject* _GO)
|
||||
{
|
||||
ScriptedInstance* pInst = (ScriptedInstance*)_GO->GetInstanceData();
|
||||
if (pInst && player)
|
||||
{
|
||||
Unit *kael = Unit::GetUnit((*_GO),pInst->GetData64(DATA_KAEL));
|
||||
if (kael && kael->isDead())
|
||||
player->TeleportTo(530, 12888, -6876, 9, 0.3);
|
||||
}
|
||||
if (pInst && player)
|
||||
{
|
||||
Unit *kael = Unit::GetUnit((*_GO),pInst->GetData64(DATA_KAEL));
|
||||
if (kael && kael->isDead())
|
||||
player->TeleportTo(530, 12888, -6876, 9, 0.3);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GOHello_go_movie_orb(Player *player, GameObject* _GO)
|
||||
{
|
||||
if (player)
|
||||
{
|
||||
WorldPacket data(SMSG_TRIGGER_CINEMATIC, 4);
|
||||
if (player)
|
||||
{
|
||||
WorldPacket data(SMSG_TRIGGER_CINEMATIC, 4);
|
||||
data << (uint32)164;
|
||||
player->GetSession()->SendPacket(&data);
|
||||
|
||||
if (player->GetQuestStatus(11490) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
Unit *qUnit = player->SummonCreature(25042,player->GetPositionX(),player->GetPositionY(),player->GetPositionZ()-10,0,TEMPSUMMON_CORPSE_DESPAWN,0);
|
||||
if(qUnit)
|
||||
player->DealDamage(qUnit, qUnit->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
}
|
||||
if (player->GetQuestStatus(11490) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
Unit *qUnit = player->SummonCreature(25042,player->GetPositionX(),player->GetPositionY(),player->GetPositionZ()-10,0,TEMPSUMMON_CORPSE_DESPAWN,0);
|
||||
if(qUnit)
|
||||
player->DealDamage(qUnit, qUnit->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -759,12 +759,12 @@ void AddSC_boss_felblood_kaelthas()
|
||||
newscript->GetAI = &GetAI_mob_felkael_flamestrike;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="go_kael_orb";
|
||||
newscript->pGOHello = &GOHello_go_kael_orb;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="go_movie_orb";
|
||||
newscript->pGOHello = &GOHello_go_movie_orb;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -26,7 +26,7 @@ EndScriptData */
|
||||
|
||||
struct Speech
|
||||
{
|
||||
int32 id;
|
||||
int32 id;
|
||||
};
|
||||
|
||||
static Speech LackeyDeath[]=
|
||||
@@ -39,10 +39,10 @@ static Speech LackeyDeath[]=
|
||||
|
||||
static Speech PlayerDeath[]=
|
||||
{
|
||||
{-1585017},
|
||||
{-1585018},
|
||||
{-1585019},
|
||||
{-1585020},
|
||||
{-1585017},
|
||||
{-1585018},
|
||||
{-1585019},
|
||||
{-1585020},
|
||||
{-1585021},
|
||||
};
|
||||
|
||||
@@ -98,7 +98,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Adds.clear();
|
||||
//SummonAdds();
|
||||
//SummonAdds();
|
||||
Reset();
|
||||
Heroic = c->GetMap()->IsHeroic();
|
||||
}
|
||||
@@ -122,7 +122,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetCorpseDelay(60*60*1000);
|
||||
m_creature->SetCorpseDelay(60*60*1000);
|
||||
LackeysKilled = 0;
|
||||
PlayersKilled = 0;
|
||||
|
||||
@@ -136,18 +136,18 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
|
||||
|
||||
CheckAdds();
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, 0);
|
||||
if (m_creature->isDead())
|
||||
pInstance->SetData(DATA_DELRISSA_EVENT, DONE);
|
||||
else pInstance->SetData(DATA_DELRISSA_EVENT, NOT_STARTED);
|
||||
}else error_log(ERROR_INST_DATA);
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, 0);
|
||||
if (m_creature->isDead())
|
||||
pInstance->SetData(DATA_DELRISSA_EVENT, DONE);
|
||||
else pInstance->SetData(DATA_DELRISSA_EVENT, NOT_STARTED);
|
||||
}else error_log(ERROR_INST_DATA);
|
||||
}
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
for(uint8 i = 0; i < Adds.size(); ++i)
|
||||
if(Unit* pAdd = Unit::GetUnit(*m_creature, Adds[i]->guid))
|
||||
@@ -156,8 +156,8 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
|
||||
|
||||
void SummonAdds()
|
||||
{
|
||||
/*if (m_creature->isDead())
|
||||
return;*/
|
||||
/*if (m_creature->isDead())
|
||||
return;*/
|
||||
std::vector<uint32> AddList;
|
||||
for(uint8 i = 0; i < 8; ++i)
|
||||
AddList.push_back(AddEntry[i]);
|
||||
@@ -178,35 +178,35 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
|
||||
|
||||
void CheckAdds()
|
||||
{
|
||||
//if (m_creature->isDead())
|
||||
// return;
|
||||
//if (m_creature->isDead())
|
||||
// return;
|
||||
if(Adds.empty())
|
||||
{
|
||||
SummonAdds();
|
||||
{
|
||||
SummonAdds();
|
||||
return;
|
||||
}
|
||||
}
|
||||
for(uint8 i = 0; i < Adds.size(); ++i)
|
||||
{
|
||||
Creature* pAdd = ((Creature*)Unit::GetUnit(*m_creature, Adds[i]->guid));
|
||||
if(pAdd && pAdd->isAlive())
|
||||
{
|
||||
pAdd->AI()->EnterEvadeMode();
|
||||
pAdd->GetMotionMaster()->MovePoint(0,LackeyLocations[i][0], LackeyLocations[i][1], POS_Z);
|
||||
pAdd->AI()->EnterEvadeMode();
|
||||
pAdd->GetMotionMaster()->MovePoint(0,LackeyLocations[i][0], LackeyLocations[i][1], POS_Z);
|
||||
}
|
||||
if(!pAdd || (pAdd && pAdd->isDead()))
|
||||
if(!pAdd || (pAdd && pAdd->isDead()))
|
||||
{
|
||||
if(pAdd)
|
||||
pAdd->RemoveCorpse();//looks stupid if mob is alive but has a dead corpse in front of him :)
|
||||
Creature* pAdd = m_creature->SummonCreature(Adds[i]->entry, LackeyLocations[i][0], LackeyLocations[i][1], POS_Z, ORIENT, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
if(pAdd)
|
||||
Adds[i]->guid = pAdd->GetGUID();
|
||||
}
|
||||
if(pAdd)
|
||||
pAdd->RemoveCorpse();//looks stupid if mob is alive but has a dead corpse in front of him :)
|
||||
Creature* pAdd = m_creature->SummonCreature(Adds[i]->entry, LackeyLocations[i][0], LackeyLocations[i][1], POS_Z, ORIENT, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
if(pAdd)
|
||||
Adds[i]->guid = pAdd->GetGUID();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if(victim->GetTypeId() != TYPEID_PLAYER || m_creature->isDead())
|
||||
if(victim->GetTypeId() != TYPEID_PLAYER || m_creature->isDead())
|
||||
return;
|
||||
|
||||
DoScriptText(PlayerDeath[PlayersKilled].id, m_creature);
|
||||
@@ -216,18 +216,18 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
|
||||
|
||||
void KilledLackey()
|
||||
{
|
||||
if(m_creature->isDead())//no sense to talk if dead..
|
||||
return;
|
||||
if(m_creature->isDead())//no sense to talk if dead..
|
||||
return;
|
||||
DoScriptText(LackeyDeath[LackeysKilled].id, m_creature);
|
||||
if( LackeysKilled < 3 )
|
||||
++LackeysKilled;
|
||||
|
||||
CheckLootable();
|
||||
CheckLootable();
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
CheckLootable();
|
||||
|
||||
@@ -370,12 +370,12 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI
|
||||
void Reset()
|
||||
{
|
||||
UsedPotion = false;
|
||||
if(pInstance)
|
||||
{
|
||||
Creature *boss = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_DELRISSA)));
|
||||
if (boss && boss->isDead())
|
||||
boss->Respawn();
|
||||
}
|
||||
if(pInstance)
|
||||
{
|
||||
Creature *boss = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_DELRISSA)));
|
||||
if (boss && boss->isDead())
|
||||
boss->Respawn();
|
||||
}
|
||||
ResetThreatTimer = 5000 + rand()%15000; // These guys like to switch targets often, and are not meant to be tanked.
|
||||
}
|
||||
|
||||
@@ -646,8 +646,8 @@ struct TRINITY_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_guestAI
|
||||
Fear_Timer = 10000;
|
||||
}else Fear_Timer -= diff;
|
||||
|
||||
if (m_creature->GetDistance(m_creature->getVictim()) <= 10)
|
||||
m_creature->StopMoving();
|
||||
if (m_creature->GetDistance(m_creature->getVictim()) <= 10)
|
||||
m_creature->StopMoving();
|
||||
//DoMeleeAttackIfReady();//should not melee, she's a warlock
|
||||
}
|
||||
};
|
||||
@@ -755,7 +755,7 @@ struct TRINITY_DLL_DECL boss_yazzaiAI : public boss_priestess_guestAI
|
||||
|
||||
if(Polymorph_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoCast(target, SPELL_POLYMORPH);
|
||||
DoModifyThreatPercent(target,-100);
|
||||
@@ -802,27 +802,27 @@ struct TRINITY_DLL_DECL boss_yazzaiAI : public boss_priestess_guestAI
|
||||
if(Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()))
|
||||
//if in melee range
|
||||
if (target->IsWithinDistInMap(m_creature, 5))
|
||||
{
|
||||
InMeleeRange = true;
|
||||
break;
|
||||
}
|
||||
{
|
||||
InMeleeRange = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//if anybody is in melee range than escape by blink
|
||||
if(InMeleeRange)
|
||||
{
|
||||
//DoCast(m_creature, SPELL_BLINK); //blink does not work on npcs
|
||||
float x,y,z;
|
||||
m_creature->GetPosition(x,y,z);
|
||||
x = rand()%2 ? x+10+rand()%10 : x-10-rand()%10;
|
||||
y = rand()%2 ? y+10+rand()%10 : y-10-rand()%10;
|
||||
m_creature->Relocate(x,y,z);
|
||||
m_creature->SendMonsterMove(x, y, m_creature->GetPositionZ(), 0,0,0);
|
||||
}
|
||||
{
|
||||
//DoCast(m_creature, SPELL_BLINK); //blink does not work on npcs
|
||||
float x,y,z;
|
||||
m_creature->GetPosition(x,y,z);
|
||||
x = rand()%2 ? x+10+rand()%10 : x-10-rand()%10;
|
||||
y = rand()%2 ? y+10+rand()%10 : y-10-rand()%10;
|
||||
m_creature->Relocate(x,y,z);
|
||||
m_creature->SendMonsterMove(x, y, m_creature->GetPositionZ(), 0,0,0);
|
||||
}
|
||||
Blink_Timer = 8000;
|
||||
}else Blink_Timer -= diff;
|
||||
|
||||
if (m_creature->GetDistance(m_creature->getVictim()) <= 10)
|
||||
m_creature->StopMoving();
|
||||
if (m_creature->GetDistance(m_creature->getVictim()) <= 10)
|
||||
m_creature->StopMoving();
|
||||
|
||||
//DoMeleeAttackIfReady(); //mage type, no melee needed
|
||||
}
|
||||
@@ -968,8 +968,8 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI
|
||||
uint32 Multi_Shot_Timer;
|
||||
uint32 Wing_Clip_Timer;
|
||||
uint32 Freezing_Trap_Timer;
|
||||
uint32 StopMoving;
|
||||
bool Stopped;
|
||||
uint32 StopMoving;
|
||||
bool Stopped;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -982,8 +982,8 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI
|
||||
Multi_Shot_Timer = 10000;
|
||||
Wing_Clip_Timer = 4000;
|
||||
Freezing_Trap_Timer = 15000;
|
||||
StopMoving = 2000;
|
||||
Stopped = false;
|
||||
StopMoving = 2000;
|
||||
Stopped = false;
|
||||
|
||||
boss_priestess_guestAI::Reset();
|
||||
}
|
||||
@@ -1054,16 +1054,16 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI
|
||||
Shoot_Timer = 2500;
|
||||
}else Shoot_Timer -= diff;
|
||||
}
|
||||
if(StopMoving < diff)
|
||||
if(StopMoving < diff)
|
||||
{
|
||||
if(Stopped)
|
||||
Stopped = false;
|
||||
else
|
||||
Stopped = true;
|
||||
if(Stopped)
|
||||
Stopped = false;
|
||||
else
|
||||
Stopped = true;
|
||||
StopMoving = 2000+rand()%5000;
|
||||
}else StopMoving -= diff;
|
||||
if (Stopped)
|
||||
m_creature->StopMoving();
|
||||
if (Stopped)
|
||||
m_creature->StopMoving();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1207,11 +1207,11 @@ struct TRINITY_DLL_DECL boss_zelfanAI : public boss_priestess_guestAI
|
||||
|
||||
if(Goblin_Dragon_Gun_Timer < diff)
|
||||
{
|
||||
if (m_creature->GetDistance(m_creature->getVictim()) <= 5)
|
||||
{
|
||||
Goblin_Dragon_Gun_Timer = 10000;
|
||||
DoCast(m_creature->getVictim(), SPELL_GOBLIN_DRAGON_GUN);
|
||||
}else Goblin_Dragon_Gun_Timer = 2000;
|
||||
if (m_creature->GetDistance(m_creature->getVictim()) <= 5)
|
||||
{
|
||||
Goblin_Dragon_Gun_Timer = 10000;
|
||||
DoCast(m_creature->getVictim(), SPELL_GOBLIN_DRAGON_GUN);
|
||||
}else Goblin_Dragon_Gun_Timer = 2000;
|
||||
}else Goblin_Dragon_Gun_Timer -= diff;
|
||||
|
||||
if(Rocket_Launch_Timer < diff)
|
||||
|
||||
@@ -68,7 +68,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
Reset();
|
||||
Heroic = c->GetMap()->IsHeroic();
|
||||
Heroic = c->GetMap()->IsHeroic();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
@@ -109,9 +109,9 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
Door->SetGoState(0); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
|
||||
// Small door opened after event are expected to be closed by default
|
||||
// Set Inst data for encounter
|
||||
if (m_creature->isDead())
|
||||
pInstance->SetData(DATA_SELIN_EVENT, DONE);
|
||||
else pInstance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
|
||||
if (m_creature->isDead())
|
||||
pInstance->SetData(DATA_SELIN_EVENT, DONE);
|
||||
else pInstance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
|
||||
}else error_log(ERROR_INST_DATA);
|
||||
|
||||
DrainLifeTimer = 3000 + rand()%4000;
|
||||
@@ -154,7 +154,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
if( CrystalChosen )
|
||||
{
|
||||
DoScriptText(SAY_ENERGY, m_creature);
|
||||
DoScriptText(EMOTE_CRYSTAL, m_creature);
|
||||
DoScriptText(EMOTE_CRYSTAL, m_creature);
|
||||
|
||||
CrystalChosen->CastSpell(CrystalChosen, SPELL_FEL_CRYSTAL_COSMETIC, true);
|
||||
|
||||
@@ -184,7 +184,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
m_creature->SetPower(POWER_MANA, 0);
|
||||
m_creature->SetPower(POWER_MANA, 0);
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
if( pInstance )
|
||||
@@ -199,8 +199,8 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_KILL_1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL_2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_KILL_1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL_2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
if(!pInstance)
|
||||
{
|
||||
@@ -300,33 +300,33 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
||||
{
|
||||
if( IsDraining )
|
||||
{
|
||||
if (CheckTimer < diff)
|
||||
{
|
||||
Unit* CrystalChosen = Unit::GetUnit(*m_creature, CrystalGUID);
|
||||
if(CrystalChosen)
|
||||
{
|
||||
if(CrystalChosen->GetUInt32Value(UNIT_CHANNEL_SPELL) == SPELL_MANA_RAGE)
|
||||
{
|
||||
m_creature->StopMoving();
|
||||
}else{
|
||||
IsDraining = false;
|
||||
DrainingCrystal = false;
|
||||
if (CheckTimer < diff)
|
||||
{
|
||||
Unit* CrystalChosen = Unit::GetUnit(*m_creature, CrystalGUID);
|
||||
if(CrystalChosen)
|
||||
{
|
||||
if(CrystalChosen->GetUInt32Value(UNIT_CHANNEL_SPELL) == SPELL_MANA_RAGE)
|
||||
{
|
||||
m_creature->StopMoving();
|
||||
}else{
|
||||
IsDraining = false;
|
||||
DrainingCrystal = false;
|
||||
|
||||
DoScriptText(SAY_EMPOWERED, m_creature);
|
||||
DoScriptText(SAY_EMPOWERED, m_creature);
|
||||
|
||||
Unit* CrystalChosen = Unit::GetUnit(*m_creature, CrystalGUID);
|
||||
if( CrystalChosen && CrystalChosen->isAlive() )
|
||||
// Use Deal Damage to kill it, not setDeathState.
|
||||
CrystalChosen->DealDamage(CrystalChosen, CrystalChosen->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
CrystalGUID = 0;
|
||||
Unit* CrystalChosen = Unit::GetUnit(*m_creature, CrystalGUID);
|
||||
if( CrystalChosen && CrystalChosen->isAlive() )
|
||||
// Use Deal Damage to kill it, not setDeathState.
|
||||
CrystalChosen->DealDamage(CrystalChosen, CrystalChosen->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
CrystalGUID = 0;
|
||||
|
||||
m_creature->GetMotionMaster()->Clear();
|
||||
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
|
||||
}
|
||||
}
|
||||
CheckTimer = 1000;
|
||||
}else CheckTimer -= diff;
|
||||
}
|
||||
m_creature->GetMotionMaster()->Clear();
|
||||
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
|
||||
}
|
||||
}
|
||||
CheckTimer = 1000;
|
||||
}else CheckTimer -= diff;
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady(); // No need to check if we are draining crystal here, as the spell has a stun.
|
||||
}
|
||||
@@ -349,7 +349,7 @@ struct TRINITY_DLL_DECL mob_fel_crystalAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_MANA_RAGE);
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_MANA_RAGE);
|
||||
if(ScriptedInstance* pInstance = ((ScriptedInstance*)m_creature->GetInstanceData()))
|
||||
{
|
||||
Creature* Selin = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_SELIN)));
|
||||
@@ -360,7 +360,7 @@ struct TRINITY_DLL_DECL mob_fel_crystalAI : public ScriptedAI
|
||||
// Set this to false if we are the creature that Selin is draining so his AI flows properly
|
||||
((boss_selin_fireheartAI*)Selin->AI())->DrainingCrystal = false;
|
||||
((boss_selin_fireheartAI*)Selin->AI())->IsDraining = false;
|
||||
Selin->RemoveAurasDueToSpell(SPELL_MANA_RAGE);
|
||||
Selin->RemoveAurasDueToSpell(SPELL_MANA_RAGE);
|
||||
if(Selin->getVictim())
|
||||
{
|
||||
Selin->AI()->AttackStart(Selin->getVictim());
|
||||
|
||||
@@ -41,7 +41,7 @@ EndScriptData */
|
||||
#define SPELL_SUMMON_PURE_ENERGY 44322 //not-working, this script summon this creatures without this spell
|
||||
#define SPELL_OVERLOAD 44353
|
||||
#define SPELL_ARCANE_SHOCK 44319
|
||||
#define ASTRAL_FLARE_VISUAL 30237
|
||||
#define ASTRAL_FLARE_VISUAL 30237
|
||||
|
||||
//Creatures
|
||||
#define CREATURE_PURE_ENERGY 24745
|
||||
@@ -76,16 +76,16 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
||||
Enraged = false;
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
if (m_creature->isDead())
|
||||
pInstance->SetData(DATA_VEXALLUS_EVENT, DONE);
|
||||
else pInstance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED);
|
||||
}
|
||||
{
|
||||
if (m_creature->isDead())
|
||||
pInstance->SetData(DATA_VEXALLUS_EVENT, DONE);
|
||||
else pInstance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_KILL, m_creature);
|
||||
DoScriptText(SAY_KILL, m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
@@ -124,8 +124,8 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
||||
//used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25%
|
||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(SpawnAddInterval*(AlreadySpawnedAmount+1))))
|
||||
{
|
||||
DoScriptText(SAY_ENERGY, m_creature);
|
||||
DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature);
|
||||
DoScriptText(SAY_ENERGY, m_creature);
|
||||
DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature);
|
||||
Creature* PureEnergyCreature = NULL;
|
||||
PureEnergyCreature = DoSpawnCreature(CREATURE_PURE_ENERGY, 10, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
Unit* target = NULL;
|
||||
@@ -146,7 +146,7 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
||||
|
||||
if(ChainLightningTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CHAIN_LIGHTNING);
|
||||
ChainLightningTimer = 10000;
|
||||
}else ChainLightningTimer -= diff;
|
||||
@@ -162,7 +162,7 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
||||
{
|
||||
if(OverloadTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_OVERLOAD);
|
||||
OverloadTimer = 2200;
|
||||
}else OverloadTimer -= diff;
|
||||
@@ -181,14 +181,14 @@ struct TRINITY_DLL_DECL mob_pure_energyAI : public ScriptedAI
|
||||
mob_pure_energyAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 EnergyBoltTimer;
|
||||
uint32 VisualTimer;
|
||||
uint32 VisualTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
EnergyBoltTimer = 1700;
|
||||
VisualTimer = 1000;
|
||||
m_creature->SetSpeed(MOVE_RUN, 0.5f);
|
||||
m_creature->SetSpeed(MOVE_WALK, 0.5f);
|
||||
VisualTimer = 1000;
|
||||
m_creature->SetSpeed(MOVE_RUN, 0.5f);
|
||||
m_creature->SetSpeed(MOVE_WALK, 0.5f);
|
||||
}
|
||||
|
||||
void JustDied(Unit* slayer)
|
||||
@@ -208,7 +208,7 @@ struct TRINITY_DLL_DECL mob_pure_energyAI : public ScriptedAI
|
||||
DoCast(m_creature->getVictim(), SPELL_ENERGY_BOLT);
|
||||
EnergyBoltTimer = 1700;
|
||||
}else EnergyBoltTimer -= diff;
|
||||
if(VisualTimer < diff)
|
||||
if(VisualTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), ASTRAL_FLARE_VISUAL, true);
|
||||
VisualTimer = 1000;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#define DATA_DELRISSA_DEATH_COUNT 15
|
||||
|
||||
#define DATA_KAEL 16
|
||||
#define DATA_KAEL 16
|
||||
|
||||
#define ERROR_INST_DATA "SD2 Error: Instance Data not set properly for Magister's Terrace instance (map 585). Encounters will be buggy."
|
||||
#endif
|
||||
|
||||
+38
-38
@@ -37,14 +37,14 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
|
||||
{
|
||||
instance_magisters_terrace(Map* map) : ScriptedInstance(map) {Initialize();}
|
||||
|
||||
uint32 DoorState[3];//0seline, 1vexallus, 2derlissa
|
||||
uint32 DoorState[3];//0seline, 1vexallus, 2derlissa
|
||||
uint32 Encounters[NUMBER_OF_ENCOUNTERS];
|
||||
uint32 DelrissaDeathCount;
|
||||
|
||||
std::list<uint64> FelCrystals;
|
||||
std::list<uint64>::iterator CrystalItr;
|
||||
|
||||
uint64 KaelGUID;
|
||||
uint64 KaelGUID;
|
||||
uint64 SelinGUID;
|
||||
uint64 DelrissaGUID;
|
||||
uint64 VexallusDoorGUID;
|
||||
@@ -57,8 +57,8 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
for(uint8 i = 0; i < 3; i++)
|
||||
DoorState[i] = 1;//1 closed, 0 opened
|
||||
for(uint8 i = 0; i < 3; i++)
|
||||
DoorState[i] = 1;//1 closed, 0 opened
|
||||
|
||||
for(uint8 i = 0; i < NUMBER_OF_ENCOUNTERS; i++)
|
||||
Encounters[i] = NOT_STARTED;
|
||||
@@ -67,7 +67,7 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
|
||||
|
||||
DelrissaDeathCount = 0;
|
||||
|
||||
KaelGUID = 0;
|
||||
KaelGUID = 0;
|
||||
SelinGUID = 0;
|
||||
DelrissaGUID = 0;
|
||||
VexallusDoorGUID = 0;
|
||||
@@ -107,29 +107,29 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
|
||||
switch(identifier)
|
||||
{
|
||||
case DATA_SELIN_EVENT:
|
||||
Encounters[0] = data;
|
||||
if(data==DONE)
|
||||
{
|
||||
DoorState[0] = 0;
|
||||
SaveToDB();
|
||||
}
|
||||
break;
|
||||
Encounters[0] = data;
|
||||
if(data==DONE)
|
||||
{
|
||||
DoorState[0] = 0;
|
||||
SaveToDB();
|
||||
}
|
||||
break;
|
||||
case DATA_VEXALLUS_EVENT:
|
||||
Encounters[1] = data;
|
||||
if(data==DONE)
|
||||
{
|
||||
DoorState[1] = 0;
|
||||
SaveToDB();
|
||||
}
|
||||
break;
|
||||
Encounters[1] = data;
|
||||
if(data==DONE)
|
||||
{
|
||||
DoorState[1] = 0;
|
||||
SaveToDB();
|
||||
}
|
||||
break;
|
||||
case DATA_DELRISSA_EVENT:
|
||||
Encounters[2] = data;
|
||||
if(data==DONE)
|
||||
{
|
||||
DoorState[2] = 0;
|
||||
SaveToDB();
|
||||
}
|
||||
break;
|
||||
Encounters[2] = data;
|
||||
if(data==DONE)
|
||||
{
|
||||
DoorState[2] = 0;
|
||||
SaveToDB();
|
||||
}
|
||||
break;
|
||||
case DATA_KAELTHAS_EVENT: Encounters[3] = data; break;
|
||||
|
||||
case DATA_DELRISSA_DEATH_COUNT:
|
||||
@@ -138,7 +138,7 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
|
||||
}
|
||||
}
|
||||
|
||||
const char* Save()
|
||||
const char* Save()
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << "S " << DoorState[0] << " " << DoorState[1] << " " << DoorState[2];
|
||||
@@ -169,7 +169,7 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
|
||||
case 24723: SelinGUID = creature->GetGUID(); break;
|
||||
case 24560: DelrissaGUID = creature->GetGUID(); break;
|
||||
case 24722: FelCrystals.push_back(creature->GetGUID()); break;
|
||||
case 24664: KaelGUID = creature->GetGUID(); break;
|
||||
case 24664: KaelGUID = creature->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,20 +178,20 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 187896:
|
||||
VexallusDoorGUID = go->GetGUID();
|
||||
go->SetGoState(DoorState[1]);
|
||||
break;
|
||||
VexallusDoorGUID = go->GetGUID();
|
||||
go->SetGoState(DoorState[1]);
|
||||
break;
|
||||
//SunwellRaid Gate 02
|
||||
case 187979:
|
||||
SelinDoorGUID = go->GetGUID();
|
||||
go->SetGoState(DoorState[0]);
|
||||
break;
|
||||
SelinDoorGUID = go->GetGUID();
|
||||
go->SetGoState(DoorState[0]);
|
||||
break;
|
||||
//Assembly Chamber Door
|
||||
case 188065: SelinEncounterDoorGUID = go->GetGUID(); break;
|
||||
case 187770:
|
||||
DelrissaDoorGUID = go->GetGUID();
|
||||
go->SetGoState(DoorState[2]);
|
||||
break;
|
||||
DelrissaDoorGUID = go->GetGUID();
|
||||
go->SetGoState(DoorState[2]);
|
||||
break;
|
||||
case 188165: KaelStatue[0] = go->GetGUID(); break;
|
||||
case 188166: KaelStatue[1] = go->GetGUID(); break;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
|
||||
switch(identifier)
|
||||
{
|
||||
case DATA_SELIN: return SelinGUID;
|
||||
case DATA_KAEL: return KaelGUID;
|
||||
case DATA_KAEL: return KaelGUID;
|
||||
case DATA_DELRISSA: return DelrissaGUID;
|
||||
case DATA_VEXALLUS_DOOR: return VexallusDoorGUID;
|
||||
case DATA_SELIN_DOOR: return SelinDoorGUID;
|
||||
|
||||
@@ -57,9 +57,9 @@ struct TRINITY_DLL_DECL boss_baron_geddonAI : public ScriptedAI
|
||||
//If we are <2% hp cast Armageddom
|
||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 2)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
DoCast(m_creature,SPELL_ARMAGEDDOM);
|
||||
DoScriptText(EMOTE_SERVICE, m_creature);
|
||||
DoScriptText(EMOTE_SERVICE, m_creature);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ struct TRINITY_DLL_DECL boss_baron_geddonAI : public ScriptedAI
|
||||
if (IgniteMana_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_IGNITEMANA);
|
||||
DoCast(target,SPELL_IGNITEMANA);
|
||||
|
||||
IgniteMana_Timer = 30000;
|
||||
}else IgniteMana_Timer -= diff;
|
||||
@@ -83,7 +83,7 @@ struct TRINITY_DLL_DECL boss_baron_geddonAI : public ScriptedAI
|
||||
if (LivingBomb_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_LIVINGBOMB);
|
||||
DoCast(target,SPELL_LIVINGBOMB);
|
||||
|
||||
LivingBomb_Timer = 35000;
|
||||
}else LivingBomb_Timer -= diff;
|
||||
|
||||
@@ -43,7 +43,7 @@ struct TRINITY_DLL_DECL boss_golemaggAI : public ScriptedAI
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
ScriptedInstance *pInstance;
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
uint32 Pyroblast_Timer;
|
||||
uint32 EarthQuake_Timer;
|
||||
@@ -79,7 +79,7 @@ struct TRINITY_DLL_DECL boss_golemaggAI : public ScriptedAI
|
||||
if (Pyroblast_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_PYROBLAST);
|
||||
DoCast(target,SPELL_PYROBLAST);
|
||||
|
||||
Pyroblast_Timer = 7000;
|
||||
}else Pyroblast_Timer -= diff;
|
||||
@@ -153,7 +153,7 @@ struct TRINITY_DLL_DECL mob_core_ragerAI : public ScriptedAI
|
||||
if ( m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50 )
|
||||
{
|
||||
DoCast(m_creature,SPELL_AEGIS);
|
||||
DoScriptText(EMOTE_AEGIS, m_creature);
|
||||
DoScriptText(EMOTE_AEGIS, m_creature);
|
||||
}
|
||||
|
||||
//Check_Timer
|
||||
|
||||
@@ -54,12 +54,12 @@ EndScriptData */
|
||||
struct TRINITY_DLL_DECL boss_majordomoAI : public ScriptedAI
|
||||
{
|
||||
boss_majordomoAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 MagicReflection_Timer;
|
||||
uint32 DamageReflection_Timer;
|
||||
@@ -77,12 +77,12 @@ struct TRINITY_DLL_DECL boss_majordomoAI : public ScriptedAI
|
||||
if (rand()%5)
|
||||
return;
|
||||
|
||||
DoScriptText(SAY_SLAY, m_creature);
|
||||
DoScriptText(SAY_SLAY, m_creature);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
|
||||
@@ -124,7 +124,7 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI
|
||||
if (rand()%5)
|
||||
return;
|
||||
|
||||
DoScriptText(SAY_KILL, m_creature);
|
||||
DoScriptText(SAY_KILL, m_creature);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
@@ -158,7 +158,7 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI
|
||||
|
||||
if (rand()%2 == 0)
|
||||
{
|
||||
DoScriptText(SAY_WRATH, m_creature);
|
||||
DoScriptText(SAY_WRATH, m_creature);
|
||||
}
|
||||
|
||||
WrathOfRagnaros_Timer = 30000;
|
||||
@@ -171,7 +171,7 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI
|
||||
|
||||
if (rand()%2==0)
|
||||
{
|
||||
DoScriptText(SAY_HAND, m_creature);
|
||||
DoScriptText(SAY_HAND, m_creature);
|
||||
}
|
||||
|
||||
HandOfRagnaros_Timer = 25000;
|
||||
@@ -217,7 +217,7 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI
|
||||
|
||||
if (!HasSubmergedOnce)
|
||||
{
|
||||
DoScriptText(SAY_REINFORCEMENTS1, m_creature);
|
||||
DoScriptText(SAY_REINFORCEMENTS1, m_creature);
|
||||
|
||||
// summon 10 elementals
|
||||
Unit* target = NULL;
|
||||
@@ -235,7 +235,7 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI
|
||||
|
||||
}else
|
||||
{
|
||||
DoScriptText(SAY_REINFORCEMENTS2, m_creature);
|
||||
DoScriptText(SAY_REINFORCEMENTS2, m_creature);
|
||||
|
||||
Unit* target = NULL;
|
||||
for(int i = 0; i < 9;i++)
|
||||
@@ -272,7 +272,7 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI
|
||||
if (!HasYelledMagmaBurst)
|
||||
{
|
||||
//Say our dialog
|
||||
DoScriptText(SAY_MAGMABURST, m_creature);
|
||||
DoScriptText(SAY_MAGMABURST, m_creature);
|
||||
HasYelledMagmaBurst = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,15 +40,15 @@ EndScriptData */
|
||||
|
||||
struct TRINITY_DLL_DECL instance_molten_core : public ScriptedInstance
|
||||
{
|
||||
instance_molten_core(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
instance_molten_core(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||
|
||||
uint64 Lucifron, Magmadar, Gehennas, Garr, Geddon, Shazzrah, Sulfuron, Golemagg, Domo, Ragnaros, FlamewakerPriest;
|
||||
uint64 RuneKoro, RuneZeth, RuneMazj, RuneTheri, RuneBlaz, RuneKress, RuneMohn;
|
||||
uint64 RuneKoro, RuneZeth, RuneMazj, RuneTheri, RuneBlaz, RuneKress, RuneMohn;
|
||||
|
||||
//If all Bosses are dead.
|
||||
bool IsBossDied[9];
|
||||
|
||||
uint32 Encounter[ENCOUNTERS];
|
||||
uint32 Encounter[ENCOUNTERS];
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
@@ -64,13 +64,13 @@ struct TRINITY_DLL_DECL instance_molten_core : public ScriptedInstance
|
||||
Ragnaros = 0;
|
||||
FlamewakerPriest = 0;
|
||||
|
||||
RuneKoro = 0;
|
||||
RuneZeth = 0;
|
||||
RuneMazj = 0;
|
||||
RuneTheri = 0;
|
||||
RuneBlaz = 0;
|
||||
RuneKress = 0;
|
||||
RuneMohn = 0;
|
||||
RuneKoro = 0;
|
||||
RuneZeth = 0;
|
||||
RuneMazj = 0;
|
||||
RuneTheri = 0;
|
||||
RuneBlaz = 0;
|
||||
RuneKress = 0;
|
||||
RuneMohn = 0;
|
||||
|
||||
IsBossDied[0] = false;
|
||||
IsBossDied[1] = false;
|
||||
@@ -84,7 +84,7 @@ struct TRINITY_DLL_DECL instance_molten_core : public ScriptedInstance
|
||||
IsBossDied[8] = false;
|
||||
|
||||
for(uint8 i = 0; i < ENCOUNTERS; i++)
|
||||
Encounter[i] = NOT_STARTED;
|
||||
Encounter[i] = NOT_STARTED;
|
||||
|
||||
|
||||
}
|
||||
@@ -98,29 +98,29 @@ struct TRINITY_DLL_DECL instance_molten_core : public ScriptedInstance
|
||||
void OnObjectCreate(GameObject *go)
|
||||
{
|
||||
switch(go->GetEntry())
|
||||
{
|
||||
case 176951: //Sulfuron
|
||||
RuneKoro = go->GetGUID();
|
||||
break;
|
||||
case 176952: //Geddon
|
||||
RuneZeth = go->GetGUID();
|
||||
break;
|
||||
case 176953: //Shazzrah
|
||||
RuneMazj = go->GetGUID();
|
||||
break;
|
||||
case 176954: //Golemagg
|
||||
RuneTheri = go->GetGUID();
|
||||
break;
|
||||
case 176955: //Garr
|
||||
RuneBlaz = go->GetGUID();
|
||||
break;
|
||||
case 176956: //Magmadar
|
||||
RuneKress = go->GetGUID();
|
||||
break;
|
||||
case 176957: //Gehennas
|
||||
RuneMohn = go->GetGUID();
|
||||
break;
|
||||
}
|
||||
{
|
||||
case 176951: //Sulfuron
|
||||
RuneKoro = go->GetGUID();
|
||||
break;
|
||||
case 176952: //Geddon
|
||||
RuneZeth = go->GetGUID();
|
||||
break;
|
||||
case 176953: //Shazzrah
|
||||
RuneMazj = go->GetGUID();
|
||||
break;
|
||||
case 176954: //Golemagg
|
||||
RuneTheri = go->GetGUID();
|
||||
break;
|
||||
case 176955: //Garr
|
||||
RuneBlaz = go->GetGUID();
|
||||
break;
|
||||
case 176956: //Magmadar
|
||||
RuneKress = go->GetGUID();
|
||||
break;
|
||||
case 176957: //Gehennas
|
||||
RuneMohn = go->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -243,11 +243,11 @@ struct TRINITY_DLL_DECL instance_molten_core : public ScriptedInstance
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
if (type == DATA_GOLEMAGG_DEATH)
|
||||
IsBossDied[7] = true;
|
||||
}
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
if (type == DATA_GOLEMAGG_DEATH)
|
||||
IsBossDied[7] = true;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstance_instance_molten_core(Map *map)
|
||||
|
||||
@@ -275,9 +275,9 @@ public:
|
||||
uint32 Event_Timer;
|
||||
uint32 checkPlayer_Timer;
|
||||
|
||||
uint64 PlayerGUID;
|
||||
uint64 PlayerGUID;
|
||||
|
||||
bool Event_onWait;
|
||||
bool Event_onWait;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -481,7 +481,7 @@ public:
|
||||
case 0:
|
||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, 2);
|
||||
DoScriptText(CLINTAR_SPIRIT_SAY_GET_FINAL, m_creature, player);
|
||||
player->CompleteQuest(10965);
|
||||
player->CompleteQuest(10965);
|
||||
Event_Timer = 1500;
|
||||
Step = 1;
|
||||
break;
|
||||
@@ -563,7 +563,7 @@ void AddSC_moonglade()
|
||||
newscript->pGossipSelect = &GossipSelect_npc_silva_filnaveth;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_clintar_dreamwalker";
|
||||
newscript->pQuestAccept = &QuestAccept_npc_clintar_dreamwalker;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -61,96 +61,96 @@ bool GossipSelect_npc_skorn_whitecloud(Player *player, Creature *_Creature, uint
|
||||
|
||||
struct TRINITY_DLL_DECL npc_kyle_frenziedAI : public ScriptedAI
|
||||
{
|
||||
npc_kyle_frenziedAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
npc_kyle_frenziedAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
int STATE;
|
||||
uint32 wait;
|
||||
uint64 player;
|
||||
int STATE;
|
||||
uint32 wait;
|
||||
uint64 player;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
STATE = 0;
|
||||
m_creature->SetDefaultMovementType(WAYPOINT_MOTION_TYPE);
|
||||
m_creature->GetMotionMaster()->Initialize();
|
||||
}
|
||||
void Aggro(Unit* who){}
|
||||
void Reset()
|
||||
{
|
||||
STATE = 0;
|
||||
m_creature->SetDefaultMovementType(WAYPOINT_MOTION_TYPE);
|
||||
m_creature->GetMotionMaster()->Initialize();
|
||||
}
|
||||
void Aggro(Unit* who){}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry* spell)
|
||||
{ // we can feed him without any quest
|
||||
if(spell->Id == 42222 && caster->GetTypeId() == TYPEID_PLAYER && ((Player*)caster)->GetTeam() == HORDE)
|
||||
{
|
||||
STATE = 1;
|
||||
player = caster->GetGUID();
|
||||
float x, y, z, z2;
|
||||
caster->GetPosition(x, y, z);
|
||||
x = x + 3.7*cos(caster->GetOrientation());
|
||||
y = y + 3.7*sin(caster->GetOrientation());
|
||||
z2 = m_creature->GetBaseMap()->GetHeight(x,y,z,false);
|
||||
z = (z2 <= INVALID_HEIGHT) ? z : z2;
|
||||
m_creature->SetDefaultMovementType(IDLE_MOTION_TYPE); //there is other way to stop waypoint movement?
|
||||
m_creature->GetMotionMaster()->Initialize();
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
m_creature->GetMotionMaster()->MovePoint(0,x, y, z);
|
||||
}
|
||||
}
|
||||
void SpellHit(Unit *caster, const SpellEntry* spell)
|
||||
{ // we can feed him without any quest
|
||||
if(spell->Id == 42222 && caster->GetTypeId() == TYPEID_PLAYER && ((Player*)caster)->GetTeam() == HORDE)
|
||||
{
|
||||
STATE = 1;
|
||||
player = caster->GetGUID();
|
||||
float x, y, z, z2;
|
||||
caster->GetPosition(x, y, z);
|
||||
x = x + 3.7*cos(caster->GetOrientation());
|
||||
y = y + 3.7*sin(caster->GetOrientation());
|
||||
z2 = m_creature->GetBaseMap()->GetHeight(x,y,z,false);
|
||||
z = (z2 <= INVALID_HEIGHT) ? z : z2;
|
||||
m_creature->SetDefaultMovementType(IDLE_MOTION_TYPE); //there is other way to stop waypoint movement?
|
||||
m_creature->GetMotionMaster()->Initialize();
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
m_creature->GetMotionMaster()->MovePoint(0,x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if(type == POINT_MOTION_TYPE)
|
||||
{
|
||||
switch(STATE)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Unit *plr = Unit::GetUnit((*m_creature),player);
|
||||
if(plr)
|
||||
m_creature->SetOrientation(m_creature->GetAngle(plr));
|
||||
m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING); //eat
|
||||
WorldPacket data;
|
||||
m_creature->BuildHeartBeatMsg(&data);
|
||||
m_creature->SendMessageToSet(&data,true);
|
||||
wait = 3000;
|
||||
STATE = 2;
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
m_creature->Respawn();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
if(type == POINT_MOTION_TYPE)
|
||||
{
|
||||
switch(STATE)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Unit *plr = Unit::GetUnit((*m_creature),player);
|
||||
if(plr)
|
||||
m_creature->SetOrientation(m_creature->GetAngle(plr));
|
||||
m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING); //eat
|
||||
WorldPacket data;
|
||||
m_creature->BuildHeartBeatMsg(&data);
|
||||
m_creature->SendMessageToSet(&data,true);
|
||||
wait = 3000;
|
||||
STATE = 2;
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
m_creature->Respawn();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!STATE || STATE == 4)
|
||||
return;
|
||||
if(wait < diff)
|
||||
{
|
||||
switch(STATE)
|
||||
{
|
||||
case 2:
|
||||
STATE = 3; wait = 7000;
|
||||
m_creature->UpdateEntry(23622,HORDE);
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_DANCE);
|
||||
break;
|
||||
case 3:
|
||||
STATE = 4; //go home
|
||||
Unit *plr = Unit::GetUnit((*m_creature),player);
|
||||
if(plr && ((Player*)plr)->GetQuestStatus(11129) == QUEST_STATUS_INCOMPLETE)
|
||||
((Player*)plr)->CompleteQuest(11129);
|
||||
float x, y, z, z2, angle;
|
||||
angle = m_creature->GetAngle(-2146, -430);
|
||||
m_creature->GetPosition(x,y,z);
|
||||
x = x + 40*cos(angle);
|
||||
y = y + 40*sin(angle);
|
||||
z2 = m_creature->GetBaseMap()->GetHeight(x,y,MAX_HEIGHT,false);
|
||||
z = (z2 <= INVALID_HEIGHT) ? z : z2;
|
||||
m_creature->GetMotionMaster()->MovePoint(0,x,y,z);
|
||||
break;
|
||||
}
|
||||
}else wait -= diff;
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!STATE || STATE == 4)
|
||||
return;
|
||||
if(wait < diff)
|
||||
{
|
||||
switch(STATE)
|
||||
{
|
||||
case 2:
|
||||
STATE = 3; wait = 7000;
|
||||
m_creature->UpdateEntry(23622,HORDE);
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_DANCE);
|
||||
break;
|
||||
case 3:
|
||||
STATE = 4; //go home
|
||||
Unit *plr = Unit::GetUnit((*m_creature),player);
|
||||
if(plr && ((Player*)plr)->GetQuestStatus(11129) == QUEST_STATUS_INCOMPLETE)
|
||||
((Player*)plr)->CompleteQuest(11129);
|
||||
float x, y, z, z2, angle;
|
||||
angle = m_creature->GetAngle(-2146, -430);
|
||||
m_creature->GetPosition(x,y,z);
|
||||
x = x + 40*cos(angle);
|
||||
y = y + 40*sin(angle);
|
||||
z2 = m_creature->GetBaseMap()->GetHeight(x,y,MAX_HEIGHT,false);
|
||||
z = (z2 <= INVALID_HEIGHT) ? z : z2;
|
||||
m_creature->GetMotionMaster()->MovePoint(0,x,y,z);
|
||||
break;
|
||||
}
|
||||
}else wait -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_kyle_frenzied(Creature *_Creature)
|
||||
@@ -168,7 +168,7 @@ void AddSC_mulgore()
|
||||
newscript->pGossipSelect = &GossipSelect_npc_skorn_whitecloud;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_kyle_frenzied";
|
||||
newscript->GetAI = &GetAI_npc_kyle_frenzied;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -75,24 +75,24 @@ struct TRINITY_DLL_DECL boss_anubrekhanAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
|
||||
if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f))
|
||||
{
|
||||
if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f))
|
||||
{
|
||||
switch(rand()%5)
|
||||
{
|
||||
case 0: DoScriptText(SAY_GREET, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TAUNT1, m_creature); break;
|
||||
case 2: DoScriptText(SAY_TAUNT2, m_creature); break;
|
||||
case 3: DoScriptText(SAY_TAUNT3, m_creature); break;
|
||||
case 4: DoScriptText(SAY_TAUNT4, m_creature); break;
|
||||
case 0: DoScriptText(SAY_GREET, m_creature); break;
|
||||
case 1: DoScriptText(SAY_TAUNT1, m_creature); break;
|
||||
case 2: DoScriptText(SAY_TAUNT2, m_creature); break;
|
||||
case 3: DoScriptText(SAY_TAUNT3, m_creature); break;
|
||||
case 4: DoScriptText(SAY_TAUNT4, m_creature); break;
|
||||
}
|
||||
HasTaunted = true;
|
||||
}
|
||||
@@ -111,8 +111,8 @@ struct TRINITY_DLL_DECL boss_anubrekhanAI : public ScriptedAI
|
||||
//Do NOT cast it when we are afflicted by locust swarm
|
||||
if (!m_creature->HasAura(SPELL_LOCUSTSWARM,1))
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_IMPALE);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_IMPALE);
|
||||
}
|
||||
|
||||
Impale_Timer = 15000;
|
||||
|
||||
@@ -59,22 +59,22 @@ struct TRINITY_DLL_DECL boss_faerlinaAI : public ScriptedAI
|
||||
{
|
||||
switch (rand()%4)
|
||||
{
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
case 3: DoScriptText(SAY_AGGRO4, m_creature); break;
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
case 3: DoScriptText(SAY_AGGRO4, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f))
|
||||
{
|
||||
{
|
||||
DoScriptText(SAY_GREET, m_creature);
|
||||
HasTaunted = true;
|
||||
|
||||
}
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
@@ -88,7 +88,7 @@ struct TRINITY_DLL_DECL boss_faerlinaAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -106,8 +106,8 @@ struct TRINITY_DLL_DECL boss_faerlinaAI : public ScriptedAI
|
||||
//RainOfFire_Timer
|
||||
if (RainOfFire_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_RAINOFFIRE);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_RAINOFFIRE);
|
||||
RainOfFire_Timer = 16000;
|
||||
}else RainOfFire_Timer -= diff;
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
||||
GuardiansOfIcecrown_Timer = 5000; //5 seconds for summoning each Guardian of Icecrown in phase 3
|
||||
|
||||
for(int i=0; i<5; i++)
|
||||
{
|
||||
{
|
||||
if(GuardiansOfIcecrown[i])
|
||||
{
|
||||
//delete creature
|
||||
@@ -196,7 +196,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
||||
pUnit->DealDamage(pUnit, pUnit->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
GuardiansOfIcecrown[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Phase1_Timer = 310000; //Phase 1 lasts 5 minutes and 10 seconds
|
||||
Phase2 = false;
|
||||
@@ -205,10 +205,10 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
||||
|
||||
void KilledUnit()
|
||||
{
|
||||
if (rand()%2)
|
||||
DoScriptText(SAY_SLAY1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_SLAY2, m_creature);
|
||||
if (rand()%2)
|
||||
DoScriptText(SAY_SLAY1, m_creature);
|
||||
else
|
||||
DoScriptText(SAY_SLAY2, m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
@@ -266,9 +266,9 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
||||
{
|
||||
//DoCast(m_creature->getVictim(),SPELL_CHAINS_OF_KELTHUZAD);
|
||||
|
||||
//if(rand()%2 == 0)
|
||||
//if(rand()%2 == 0)
|
||||
//DoScriptText(SAY_CHAIN1, m_creature);
|
||||
//else
|
||||
//DoScriptText(SAY_CHAIN2, m_creature);
|
||||
@@ -313,7 +313,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
||||
DoCast(m_creature->getVictim(),SPELL_MANA_DETONATION);
|
||||
|
||||
if (rand()%2)
|
||||
DoScriptText(SAY_SPECIAL1_MANA_DET, m_creature);
|
||||
DoScriptText(SAY_SPECIAL1_MANA_DET, m_creature);
|
||||
ManaDetonation_Timer = 20000;
|
||||
}else ManaDetonation_Timer -= diff;
|
||||
|
||||
@@ -323,7 +323,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
||||
DoCast(m_creature->getVictim(),SPELL_SHADOW_FISURE);
|
||||
|
||||
if (rand()%2)
|
||||
DoScriptText(SAY_SPECIAL3_MANA_DET, m_creature);
|
||||
DoScriptText(SAY_SPECIAL3_MANA_DET, m_creature);
|
||||
ShadowFisure_Timer = 25000;
|
||||
}else ShadowFisure_Timer -= diff;
|
||||
|
||||
@@ -334,7 +334,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
||||
DoCast(m_creature->getVictim(),SPELL_FROST_BLAST);
|
||||
|
||||
if(rand()%2 == 0)
|
||||
DoScriptText(SAY_FROST_BLAST, m_creature);
|
||||
DoScriptText(SAY_FROST_BLAST, m_creature);
|
||||
FrostBlast_Timer = (rand()%30+30)*1000;
|
||||
}else FrostBlast_Timer -= diff;
|
||||
|
||||
@@ -342,7 +342,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
||||
if(!Phase3 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40)
|
||||
{
|
||||
Phase3 = true;
|
||||
DoScriptText(SAY_REQUEST_AID, m_creature);
|
||||
DoScriptText(SAY_REQUEST_AID, m_creature);
|
||||
//here Lich King should respond to KelThuzad but I don't know which creature to make talk
|
||||
//so for now just make Kelthuzad says it.
|
||||
DoScriptText(SAY_ANSWER_REQUEST, m_creature);
|
||||
|
||||
@@ -68,9 +68,9 @@ struct TRINITY_DLL_DECL boss_nothAI : public ScriptedAI
|
||||
{
|
||||
switch (rand()%3)
|
||||
{
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,16 +78,16 @@ struct TRINITY_DLL_DECL boss_nothAI : public ScriptedAI
|
||||
{
|
||||
switch (rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
summoned->AddThreat(target,0.0f);
|
||||
}
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
summoned->AddThreat(target,0.0f);
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
@@ -120,8 +120,8 @@ struct TRINITY_DLL_DECL boss_nothAI : public ScriptedAI
|
||||
{
|
||||
DoScriptText(SAY_SUMMON, m_creature);
|
||||
|
||||
for(uint8 i = 0; i < 6; i++)
|
||||
m_creature->SummonCreature(C_PLAGUED_WARRIOR,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
||||
for(uint8 i = 0; i < 6; i++)
|
||||
m_creature->SummonCreature(C_PLAGUED_WARRIOR,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
|
||||
|
||||
Summon_Timer = 30500;
|
||||
} else Summon_Timer -= diff;
|
||||
|
||||
@@ -88,15 +88,15 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
|
||||
|
||||
if(LifeDrain_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_LIFE_DRAIN);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_LIFE_DRAIN);
|
||||
LifeDrain_Timer = 24000;
|
||||
}else LifeDrain_Timer -= diff;
|
||||
|
||||
if(Blizzard_Timer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_BLIZZARD);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_BLIZZARD);
|
||||
Blizzard_Timer = 20000;
|
||||
}else Blizzard_Timer -= diff;
|
||||
|
||||
@@ -117,14 +117,14 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
|
||||
landoff = false;
|
||||
}else Fly_Timer -= diff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (phase == 2)
|
||||
{
|
||||
if(Icebolt_Timer < diff && Icebolt_Count < 5)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_ICEBOLT);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target,SPELL_ICEBOLT);
|
||||
Icebolt_Count ++;
|
||||
Icebolt_Timer = 4000;
|
||||
}else Icebolt_Timer -= diff;
|
||||
@@ -167,7 +167,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
|
||||
}
|
||||
|
||||
if (phase!=2)
|
||||
DoMeleeAttackIfReady();
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -356,323 +356,323 @@ bool GOHello_go_manaforge_control_console(Player *player, GameObject* _GO)
|
||||
// Entries of Arcanist Ardonis, Commander Dawnforge, Pathaleon the Curators Image
|
||||
int CreatureEntry[3][1] =
|
||||
{
|
||||
{19830}, // Ardonis
|
||||
{19831}, // Dawnforge
|
||||
{21504} // Pathaleon
|
||||
{19830}, // Ardonis
|
||||
{19831}, // Dawnforge
|
||||
{21504} // Pathaleon
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI
|
||||
{
|
||||
npc_commander_dawnforgeAI(Creature *c) : ScriptedAI(c) { Reset (); }
|
||||
npc_commander_dawnforgeAI(Creature *c) : ScriptedAI(c) { Reset (); }
|
||||
|
||||
|
||||
uint64 playerGUID;
|
||||
uint64 ardonisGUID;
|
||||
uint64 pathaleonGUID;
|
||||
uint64 playerGUID;
|
||||
uint64 ardonisGUID;
|
||||
uint64 pathaleonGUID;
|
||||
|
||||
|
||||
uint32 Phase;
|
||||
uint32 PhaseSubphase;
|
||||
uint32 Phase_Timer;
|
||||
bool isEvent;
|
||||
uint32 Phase;
|
||||
uint32 PhaseSubphase;
|
||||
uint32 Phase_Timer;
|
||||
bool isEvent;
|
||||
|
||||
float angle_dawnforge;
|
||||
float angle_ardonis;
|
||||
float angle_dawnforge;
|
||||
float angle_ardonis;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
playerGUID = 0;
|
||||
ardonisGUID = 0;
|
||||
pathaleonGUID = 0;
|
||||
void Reset()
|
||||
{
|
||||
playerGUID = 0;
|
||||
ardonisGUID = 0;
|
||||
pathaleonGUID = 0;
|
||||
|
||||
Phase = 1;
|
||||
PhaseSubphase = 0;
|
||||
Phase_Timer = 4000;
|
||||
isEvent = false;
|
||||
}
|
||||
Phase = 1;
|
||||
PhaseSubphase = 0;
|
||||
Phase_Timer = 4000;
|
||||
isEvent = false;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) { }
|
||||
void Aggro(Unit *who) { }
|
||||
|
||||
//Select any creature in a grid
|
||||
Creature* SelectCreatureInGrid(uint32 entry, float range)
|
||||
{
|
||||
Creature* pCreature = NULL;
|
||||
//Select any creature in a grid
|
||||
Creature* SelectCreatureInGrid(uint32 entry, float range)
|
||||
{
|
||||
Creature* pCreature = NULL;
|
||||
|
||||
CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
Cell cell(pair);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
Cell cell(pair);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*m_creature, entry, true, range);
|
||||
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*m_creature, entry, true, range);
|
||||
Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_creature, pCreature, creature_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, pair);
|
||||
cell_lock->Visit(cell_lock, creature_searcher,*(m_creature->GetMap()));
|
||||
CellLock<GridReadGuard> cell_lock(cell, pair);
|
||||
cell_lock->Visit(cell_lock, creature_searcher,*(m_creature->GetMap()));
|
||||
|
||||
return pCreature;
|
||||
}
|
||||
return pCreature;
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
pathaleonGUID = summoned->GetGUID();
|
||||
}
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
pathaleonGUID = summoned->GetGUID();
|
||||
}
|
||||
|
||||
// Emote Ardonis and Pathaleon
|
||||
void Turn_to_Pathaleons_Image()
|
||||
{
|
||||
Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID);
|
||||
Unit *pathaleon = Unit::GetUnit(*m_creature,pathaleonGUID);
|
||||
Player *player = (Player*)Unit::GetUnit(*m_creature,playerGUID);
|
||||
// Emote Ardonis and Pathaleon
|
||||
void Turn_to_Pathaleons_Image()
|
||||
{
|
||||
Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID);
|
||||
Unit *pathaleon = Unit::GetUnit(*m_creature,pathaleonGUID);
|
||||
Player *player = (Player*)Unit::GetUnit(*m_creature,playerGUID);
|
||||
|
||||
if (!ardonis || !pathaleon || !player)
|
||||
return;
|
||||
if (!ardonis || !pathaleon || !player)
|
||||
return;
|
||||
|
||||
//Calculate the angle to Pathaleon
|
||||
angle_dawnforge = m_creature->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY());
|
||||
angle_ardonis = ardonis->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY());
|
||||
//Calculate the angle to Pathaleon
|
||||
angle_dawnforge = m_creature->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY());
|
||||
angle_ardonis = ardonis->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY());
|
||||
|
||||
//Turn Dawnforge and update
|
||||
m_creature->SetOrientation(angle_dawnforge);
|
||||
m_creature->SendUpdateToPlayer(player);
|
||||
//Turn Ardonis and update
|
||||
ardonis->SetOrientation(angle_ardonis);
|
||||
ardonis->SendUpdateToPlayer(player);
|
||||
//Turn Dawnforge and update
|
||||
m_creature->SetOrientation(angle_dawnforge);
|
||||
m_creature->SendUpdateToPlayer(player);
|
||||
//Turn Ardonis and update
|
||||
ardonis->SetOrientation(angle_ardonis);
|
||||
ardonis->SendUpdateToPlayer(player);
|
||||
|
||||
//Set them to kneel
|
||||
//Set them to kneel
|
||||
m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
ardonis->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
}
|
||||
}
|
||||
|
||||
//Set them back to each other
|
||||
void Turn_to_eachother()
|
||||
{
|
||||
if (Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID))
|
||||
{
|
||||
Player *player = (Player*)Unit::GetUnit(*m_creature,playerGUID);
|
||||
//Set them back to each other
|
||||
void Turn_to_eachother()
|
||||
{
|
||||
if (Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID))
|
||||
{
|
||||
Player *player = (Player*)Unit::GetUnit(*m_creature,playerGUID);
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
angle_dawnforge = m_creature->GetAngle(ardonis->GetPositionX(), ardonis->GetPositionY());
|
||||
angle_ardonis = ardonis->GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY());
|
||||
angle_dawnforge = m_creature->GetAngle(ardonis->GetPositionX(), ardonis->GetPositionY());
|
||||
angle_ardonis = ardonis->GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY());
|
||||
|
||||
//Turn Dawnforge and update
|
||||
m_creature->SetOrientation(angle_dawnforge);
|
||||
m_creature->SendUpdateToPlayer(player);
|
||||
//Turn Ardonis and update
|
||||
ardonis->SetOrientation(angle_ardonis);
|
||||
ardonis->SendUpdateToPlayer(player);
|
||||
//Turn Dawnforge and update
|
||||
m_creature->SetOrientation(angle_dawnforge);
|
||||
m_creature->SendUpdateToPlayer(player);
|
||||
//Turn Ardonis and update
|
||||
ardonis->SetOrientation(angle_ardonis);
|
||||
ardonis->SendUpdateToPlayer(player);
|
||||
|
||||
//Set state
|
||||
//Set state
|
||||
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
ardonis->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CanStartEvent(Player *player)
|
||||
{
|
||||
if (!isEvent)
|
||||
{
|
||||
Creature *ardonis = SelectCreatureInGrid(CreatureEntry[0][0], 10.0f);
|
||||
if (!ardonis)
|
||||
return false;
|
||||
bool CanStartEvent(Player *player)
|
||||
{
|
||||
if (!isEvent)
|
||||
{
|
||||
Creature *ardonis = SelectCreatureInGrid(CreatureEntry[0][0], 10.0f);
|
||||
if (!ardonis)
|
||||
return false;
|
||||
|
||||
ardonisGUID = ardonis->GetGUID();
|
||||
playerGUID = player->GetGUID();
|
||||
ardonisGUID = ardonis->GetGUID();
|
||||
playerGUID = player->GetGUID();
|
||||
|
||||
isEvent = true;
|
||||
isEvent = true;
|
||||
|
||||
Turn_to_eachother();
|
||||
return true;
|
||||
}
|
||||
Turn_to_eachother();
|
||||
return true;
|
||||
}
|
||||
|
||||
debug_log("TSCR: npc_commander_dawnforge event already in progress, need to wait.");
|
||||
return false;
|
||||
}
|
||||
debug_log("TSCR: npc_commander_dawnforge event already in progress, need to wait.");
|
||||
return false;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Is event even running?
|
||||
if (!isEvent)
|
||||
return;
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Is event even running?
|
||||
if (!isEvent)
|
||||
return;
|
||||
|
||||
//Phase timing
|
||||
if (Phase_Timer >= diff)
|
||||
{
|
||||
Phase_Timer -= diff;
|
||||
return;
|
||||
}
|
||||
//Phase timing
|
||||
if (Phase_Timer >= diff)
|
||||
{
|
||||
Phase_Timer -= diff;
|
||||
return;
|
||||
}
|
||||
|
||||
Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID);
|
||||
Unit *pathaleon = Unit::GetUnit(*m_creature,pathaleonGUID);
|
||||
Player *player = (Player*)Unit::GetUnit(*m_creature,playerGUID);
|
||||
Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID);
|
||||
Unit *pathaleon = Unit::GetUnit(*m_creature,pathaleonGUID);
|
||||
Player *player = (Player*)Unit::GetUnit(*m_creature,playerGUID);
|
||||
|
||||
if (!ardonis || !player)
|
||||
{
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
if (!ardonis || !player)
|
||||
{
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Phase > 4 && !pathaleon)
|
||||
{
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
if (Phase > 4 && !pathaleon)
|
||||
{
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
|
||||
//Phase 1 Dawnforge say
|
||||
switch (Phase)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_COMMANDER_DAWNFORGE_1, m_creature);
|
||||
++Phase;
|
||||
Phase_Timer = 16000;
|
||||
break;
|
||||
//Phase 2 Ardonis say
|
||||
case 2:
|
||||
DoScriptText(SAY_ARCANIST_ARDONIS_1, ardonis);
|
||||
++Phase;
|
||||
Phase_Timer = 16000;
|
||||
break;
|
||||
//Phase 3 Dawnforge say
|
||||
case 3:
|
||||
DoScriptText(SAY_COMMANDER_DAWNFORGE_2, m_creature);
|
||||
++Phase;
|
||||
Phase_Timer = 16000;
|
||||
break;
|
||||
//Phase 4 Pathaleon spawns up to phase 9
|
||||
case 4:
|
||||
//spawn pathaleon's image
|
||||
m_creature->SummonCreature(CreatureEntry[2][0], 2325.851563, 2799.534668, 133.084229, 6.038996, TEMPSUMMON_TIMED_DESPAWN, 90000);
|
||||
++Phase;
|
||||
Phase_Timer = 500;
|
||||
break;
|
||||
//Phase 5 Pathaleon say
|
||||
case 5:
|
||||
DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_1, pathaleon);
|
||||
++Phase;
|
||||
Phase_Timer = 6000;
|
||||
break;
|
||||
//Phase 6
|
||||
case 6:
|
||||
switch(PhaseSubphase)
|
||||
{
|
||||
//Subphase 1: Turn Dawnforge and Ardonis
|
||||
case 0:
|
||||
Turn_to_Pathaleons_Image();
|
||||
++PhaseSubphase;
|
||||
Phase_Timer = 8000;
|
||||
break;
|
||||
//Subphase 2 Dawnforge say
|
||||
case 1:
|
||||
DoScriptText(SAY_COMMANDER_DAWNFORGE_3, m_creature);
|
||||
PhaseSubphase = 0;
|
||||
++Phase;
|
||||
Phase_Timer = 8000;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
//Phase 7 Pathaleons say 3 Sentence, every sentence need a subphase
|
||||
case 7:
|
||||
switch(PhaseSubphase)
|
||||
{
|
||||
//Subphase 1
|
||||
case 0:
|
||||
DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2, pathaleon);
|
||||
++PhaseSubphase;
|
||||
Phase_Timer = 12000;
|
||||
break;
|
||||
//Subphase 2
|
||||
case 1:
|
||||
DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_1, pathaleon);
|
||||
++PhaseSubphase;
|
||||
Phase_Timer = 16000;
|
||||
break;
|
||||
//Subphase 3
|
||||
case 2:
|
||||
DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_2, pathaleon);
|
||||
PhaseSubphase = 0;
|
||||
++Phase;
|
||||
Phase_Timer = 10000;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
//Phase 8 Dawnforge & Ardonis say
|
||||
case 8:
|
||||
DoScriptText(SAY_COMMANDER_DAWNFORGE_4, m_creature);
|
||||
DoScriptText(SAY_ARCANIST_ARDONIS_2, ardonis);
|
||||
++Phase;
|
||||
Phase_Timer = 4000;
|
||||
break;
|
||||
//Phase 9 Pathaleons Despawn, Reset Dawnforge & Ardonis angle
|
||||
case 9:
|
||||
Turn_to_eachother();
|
||||
//hide pathaleon, unit will despawn shortly
|
||||
pathaleon->SetVisibility(VISIBILITY_OFF);
|
||||
PhaseSubphase = 0;
|
||||
++Phase;
|
||||
Phase_Timer = 3000;
|
||||
break;
|
||||
//Phase 10 Dawnforge say
|
||||
case 10:
|
||||
DoScriptText(SAY_COMMANDER_DAWNFORGE_5, m_creature);
|
||||
player->AreaExploredOrEventHappens(QUEST_INFO_GATHERING);
|
||||
Reset();
|
||||
break;
|
||||
}
|
||||
}
|
||||
//Phase 1 Dawnforge say
|
||||
switch (Phase)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_COMMANDER_DAWNFORGE_1, m_creature);
|
||||
++Phase;
|
||||
Phase_Timer = 16000;
|
||||
break;
|
||||
//Phase 2 Ardonis say
|
||||
case 2:
|
||||
DoScriptText(SAY_ARCANIST_ARDONIS_1, ardonis);
|
||||
++Phase;
|
||||
Phase_Timer = 16000;
|
||||
break;
|
||||
//Phase 3 Dawnforge say
|
||||
case 3:
|
||||
DoScriptText(SAY_COMMANDER_DAWNFORGE_2, m_creature);
|
||||
++Phase;
|
||||
Phase_Timer = 16000;
|
||||
break;
|
||||
//Phase 4 Pathaleon spawns up to phase 9
|
||||
case 4:
|
||||
//spawn pathaleon's image
|
||||
m_creature->SummonCreature(CreatureEntry[2][0], 2325.851563, 2799.534668, 133.084229, 6.038996, TEMPSUMMON_TIMED_DESPAWN, 90000);
|
||||
++Phase;
|
||||
Phase_Timer = 500;
|
||||
break;
|
||||
//Phase 5 Pathaleon say
|
||||
case 5:
|
||||
DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_1, pathaleon);
|
||||
++Phase;
|
||||
Phase_Timer = 6000;
|
||||
break;
|
||||
//Phase 6
|
||||
case 6:
|
||||
switch(PhaseSubphase)
|
||||
{
|
||||
//Subphase 1: Turn Dawnforge and Ardonis
|
||||
case 0:
|
||||
Turn_to_Pathaleons_Image();
|
||||
++PhaseSubphase;
|
||||
Phase_Timer = 8000;
|
||||
break;
|
||||
//Subphase 2 Dawnforge say
|
||||
case 1:
|
||||
DoScriptText(SAY_COMMANDER_DAWNFORGE_3, m_creature);
|
||||
PhaseSubphase = 0;
|
||||
++Phase;
|
||||
Phase_Timer = 8000;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
//Phase 7 Pathaleons say 3 Sentence, every sentence need a subphase
|
||||
case 7:
|
||||
switch(PhaseSubphase)
|
||||
{
|
||||
//Subphase 1
|
||||
case 0:
|
||||
DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2, pathaleon);
|
||||
++PhaseSubphase;
|
||||
Phase_Timer = 12000;
|
||||
break;
|
||||
//Subphase 2
|
||||
case 1:
|
||||
DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_1, pathaleon);
|
||||
++PhaseSubphase;
|
||||
Phase_Timer = 16000;
|
||||
break;
|
||||
//Subphase 3
|
||||
case 2:
|
||||
DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_2, pathaleon);
|
||||
PhaseSubphase = 0;
|
||||
++Phase;
|
||||
Phase_Timer = 10000;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
//Phase 8 Dawnforge & Ardonis say
|
||||
case 8:
|
||||
DoScriptText(SAY_COMMANDER_DAWNFORGE_4, m_creature);
|
||||
DoScriptText(SAY_ARCANIST_ARDONIS_2, ardonis);
|
||||
++Phase;
|
||||
Phase_Timer = 4000;
|
||||
break;
|
||||
//Phase 9 Pathaleons Despawn, Reset Dawnforge & Ardonis angle
|
||||
case 9:
|
||||
Turn_to_eachother();
|
||||
//hide pathaleon, unit will despawn shortly
|
||||
pathaleon->SetVisibility(VISIBILITY_OFF);
|
||||
PhaseSubphase = 0;
|
||||
++Phase;
|
||||
Phase_Timer = 3000;
|
||||
break;
|
||||
//Phase 10 Dawnforge say
|
||||
case 10:
|
||||
DoScriptText(SAY_COMMANDER_DAWNFORGE_5, m_creature);
|
||||
player->AreaExploredOrEventHappens(QUEST_INFO_GATHERING);
|
||||
Reset();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_commander_dawnforge(Creature* _Creature)
|
||||
{
|
||||
return new npc_commander_dawnforgeAI(_Creature);
|
||||
return new npc_commander_dawnforgeAI(_Creature);
|
||||
}
|
||||
|
||||
Creature* SearchDawnforge(Player *source, uint32 entry, float range)
|
||||
{
|
||||
Creature* pCreature = NULL;
|
||||
Creature* pCreature = NULL;
|
||||
|
||||
CellPair pair(Trinity::ComputeCellPair(source->GetPositionX(), source->GetPositionY()));
|
||||
Cell cell(pair);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
CellPair pair(Trinity::ComputeCellPair(source->GetPositionX(), source->GetPositionY()));
|
||||
Cell cell(pair);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*source, entry, true, range);
|
||||
Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*source, entry, true, range);
|
||||
Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(source, pCreature, creature_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, pair);
|
||||
cell_lock->Visit(cell_lock, creature_searcher,*(source->GetMap()));
|
||||
CellLock<GridReadGuard> cell_lock(cell, pair);
|
||||
cell_lock->Visit(cell_lock, creature_searcher,*(source->GetMap()));
|
||||
|
||||
return pCreature;
|
||||
return pCreature;
|
||||
}
|
||||
|
||||
bool AreaTrigger_at_commander_dawnforge(Player *player, AreaTriggerEntry *at)
|
||||
{
|
||||
//if player lost aura or not have at all, we should not try start event.
|
||||
if (!player->HasAura(SPELL_SUNFURY_DISGUISE,0))
|
||||
return false;
|
||||
//if player lost aura or not have at all, we should not try start event.
|
||||
if (!player->HasAura(SPELL_SUNFURY_DISGUISE,0))
|
||||
return false;
|
||||
|
||||
if (player->isAlive() && player->GetQuestStatus(QUEST_INFO_GATHERING) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
Creature* Dawnforge = SearchDawnforge(player, CreatureEntry[1][0], 30.0f);
|
||||
if (player->isAlive() && player->GetQuestStatus(QUEST_INFO_GATHERING) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
Creature* Dawnforge = SearchDawnforge(player, CreatureEntry[1][0], 30.0f);
|
||||
|
||||
if (!Dawnforge)
|
||||
return false;
|
||||
if (!Dawnforge)
|
||||
return false;
|
||||
|
||||
if (((npc_commander_dawnforgeAI*)Dawnforge->AI())->CanStartEvent(player))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
if (((npc_commander_dawnforgeAI*)Dawnforge->AI())->CanStartEvent(player))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_protectorate_nether_drake
|
||||
######*/
|
||||
|
||||
#define GOSSIP_ITEM "I'm ready to fly! Take me up, dragon!"
|
||||
#define GOSSIP_ITEM "I'm ready to fly! Take me up, dragon!"
|
||||
|
||||
bool GossipHello_npc_protectorate_nether_drake(Player *player, Creature *_Creature)
|
||||
{
|
||||
@@ -705,43 +705,43 @@ bool GossipSelect_npc_protectorate_nether_drake(Player *player, Creature *_Creat
|
||||
## npc_professor_dabiri
|
||||
######*/
|
||||
|
||||
#define SPELL_PHASE_DISTRUPTOR 35780
|
||||
#define GOSSIP_ITEM "I need a new phase distruptor, Professor"
|
||||
#define SPELL_PHASE_DISTRUPTOR 35780
|
||||
#define GOSSIP_ITEM "I need a new phase distruptor, Professor"
|
||||
#define WHISPER_DABIRI -1000302
|
||||
|
||||
#define QUEST_DIMENSIUS 10439
|
||||
#define QUEST_DIMENSIUS 10439
|
||||
#define QUEST_ON_NETHERY_WINGS 10438
|
||||
|
||||
bool GossipHello_npc_professor_dabiri(Player *player, Creature *_Creature)
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
|
||||
if(player->GetQuestStatus(QUEST_ON_NETHERY_WINGS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(29778, 1))
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
if(player->GetQuestStatus(QUEST_ON_NETHERY_WINGS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(29778, 1))
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_professor_dabiri(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
_Creature->CastSpell(player, SPELL_PHASE_DISTRUPTOR, false);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
}
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
_Creature->CastSpell(player, SPELL_PHASE_DISTRUPTOR, false);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QuestAccept_npc_professor_dabiri(Player *player, Creature *creature, Quest const *quest )
|
||||
{
|
||||
if(quest->GetQuestId() == QUEST_DIMENSIUS)
|
||||
DoScriptText(WHISPER_DABIRI, creature, player);
|
||||
if(quest->GetQuestId() == QUEST_DIMENSIUS)
|
||||
DoScriptText(WHISPER_DABIRI, creature, player);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
@@ -911,7 +911,7 @@ struct TRINITY_DLL_DECL npc_bessyAI : public npc_escortAI
|
||||
|
||||
bool Completed;
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
@@ -928,12 +928,12 @@ struct TRINITY_DLL_DECL npc_bessyAI : public npc_escortAI
|
||||
return;
|
||||
|
||||
switch(i)
|
||||
{
|
||||
{
|
||||
case 3: //first spawn
|
||||
m_creature->SummonCreature(SPAWN_FIRST, 2449.67, 2183.11, 96.85, 6.20, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
m_creature->SummonCreature(SPAWN_FIRST, 2449.53, 2184.43, 96.36, 6.27, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
m_creature->SummonCreature(SPAWN_FIRST, 2449.85, 2186.34, 97.57, 6.08, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
m_creature->SummonCreature(SPAWN_SECOND, 2309.64, 2186.24, 92.25, 6.06, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
@@ -947,16 +947,16 @@ struct TRINITY_DLL_DECL npc_bessyAI : public npc_escortAI
|
||||
Completed = true;
|
||||
}
|
||||
{Unit* Thadell = FindCreature(N_THADELL, 30, m_creature);
|
||||
if(Thadell)
|
||||
if(Thadell)
|
||||
DoScriptText(SAY_THADELL_1, m_creature);}break;
|
||||
case 13:
|
||||
{Unit* Thadell = FindCreature(N_THADELL, 30, m_creature);
|
||||
if(Thadell)
|
||||
case 13:
|
||||
{Unit* Thadell = FindCreature(N_THADELL, 30, m_creature);
|
||||
if(Thadell)
|
||||
DoScriptText(SAY_THADELL_2, m_creature, player);}break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
@@ -980,8 +980,8 @@ bool QuestAccept_npc_bessy(Player* player, Creature* creature, Quest const* ques
|
||||
{
|
||||
if (quest->GetQuestId() == Q_ALMABTRIEB)
|
||||
{
|
||||
creature->setFaction(113);
|
||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->setFaction(113);
|
||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||
}
|
||||
return true;
|
||||
@@ -1004,7 +1004,7 @@ CreatureAI* GetAI_npc_bessy(Creature *_Creature)
|
||||
bessyAI->AddWaypoint(10, 2304.58, 2272.23, 96.67);
|
||||
bessyAI->AddWaypoint(11, 2297.09, 2271.40, 95.16);
|
||||
bessyAI->AddWaypoint(12, 2297.68, 2266.79, 95.07,4000);
|
||||
bessyAI->AddWaypoint(13, 2297.67, 2266.76, 95.07,4000);
|
||||
bessyAI->AddWaypoint(13, 2297.67, 2266.76, 95.07,4000);
|
||||
|
||||
return (CreatureAI*)bessyAI;
|
||||
}
|
||||
@@ -1027,15 +1027,15 @@ void AddSC_netherstorm()
|
||||
newscript->GetAI = &GetAI_npc_manaforge_control_console;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_commander_dawnforge";
|
||||
newscript->GetAI = &GetAI_npc_commander_dawnforge;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_commander_dawnforge";
|
||||
newscript->GetAI = &GetAI_npc_commander_dawnforge;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "at_commander_dawnforge";
|
||||
newscript->pAreaTrigger = &AreaTrigger_at_commander_dawnforge;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
newscript->Name = "at_commander_dawnforge";
|
||||
newscript->pAreaTrigger = &AreaTrigger_at_commander_dawnforge;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_protectorate_nether_drake";
|
||||
@@ -1043,12 +1043,12 @@ void AddSC_netherstorm()
|
||||
newscript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_professor_dabiri";
|
||||
newscript->pGossipHello = &GossipHello_npc_professor_dabiri;
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_professor_dabiri";
|
||||
newscript->pGossipHello = &GossipHello_npc_professor_dabiri;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_professor_dabiri;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_professor_dabiri;
|
||||
newscript->RegisterSelf();
|
||||
newscript->pQuestAccept = &QuestAccept_npc_professor_dabiri;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_veronia";
|
||||
@@ -1061,7 +1061,7 @@ void AddSC_netherstorm()
|
||||
newscript->GetAI = &GetAI_mob_phase_hunter;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_bessy";
|
||||
newscript->GetAI = &GetAI_npc_bessy;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_bessy;
|
||||
|
||||
@@ -40,7 +40,7 @@ EndScriptData */
|
||||
#define SPELL_FIREBALL 18392
|
||||
|
||||
#define SPELL_BELLOWINGROAR 18431
|
||||
#define SPELL_HEATED_GROUND 22191 //Wrong Spell
|
||||
#define SPELL_HEATED_GROUND 22191 //Wrong Spell
|
||||
|
||||
#define SPELL_SUMMONWHELP 17646
|
||||
|
||||
@@ -76,10 +76,10 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
||||
uint32 SummonWhelpsTimer;
|
||||
uint32 BellowingRoarTimer;
|
||||
uint32 WingBuffetTimer;
|
||||
uint32 KnockAwayTimer;
|
||||
uint32 FireballTimer;
|
||||
uint32 KnockAwayTimer;
|
||||
uint32 FireballTimer;
|
||||
|
||||
bool InitialSpawn;
|
||||
bool InitialSpawn;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -93,24 +93,24 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
||||
SummonWhelpsTimer = 45000;
|
||||
BellowingRoarTimer = 30000;
|
||||
WingBuffetTimer = 17000;
|
||||
KnockAwayTimer = 15000;
|
||||
FireballTimer = 18000;
|
||||
KnockAwayTimer = 15000;
|
||||
FireballTimer = 18000;
|
||||
|
||||
InitialSpawn = true;
|
||||
InitialSpawn = true;
|
||||
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||
m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||
m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
||||
}
|
||||
|
||||
void Aggro(Unit* who)
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
DoZoneInCombat();
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
@@ -122,30 +122,30 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 60) && (Phase == 1))
|
||||
if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 60) && (Phase == 1))
|
||||
{
|
||||
Phase = 2;
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
Phase = 2;
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT);
|
||||
m_creature->SetHover(true);
|
||||
m_creature->SetHover(true);
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
DoScriptText(SAY_PHASE_2_TRANS, m_creature);
|
||||
}
|
||||
DoScriptText(SAY_PHASE_2_TRANS, m_creature);
|
||||
}
|
||||
|
||||
if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) && (Phase == 2))
|
||||
if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) && (Phase == 2))
|
||||
{
|
||||
Phase = 3;
|
||||
Phase = 3;
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT);
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
||||
m_creature->SetHover(false);
|
||||
m_creature->GetMotionMaster()->MovePoint(0, -10.6155, -219.357, -87.7344);
|
||||
DoStartMovement(m_creature->getVictim());
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
m_creature->SetHover(false);
|
||||
m_creature->GetMotionMaster()->MovePoint(0, -10.6155, -219.357, -87.7344);
|
||||
DoStartMovement(m_creature->getVictim());
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
DoScriptText(SAY_PHASE_3_TRANS, m_creature);
|
||||
}
|
||||
}
|
||||
|
||||
if(Phase == 1 || Phase == 3)
|
||||
if(Phase == 1 || Phase == 3)
|
||||
{
|
||||
if(FlameBreathTimer < diff)
|
||||
{
|
||||
@@ -174,75 +174,75 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
||||
WingBuffetTimer = 7000 + ((rand()%8)*1000);
|
||||
}else WingBuffetTimer -= diff;
|
||||
|
||||
if(KnockAwayTimer < diff)
|
||||
{
|
||||
if(rand() <= 30)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_KNOCK_AWAY);
|
||||
}
|
||||
KnockAwayTimer = 15000;
|
||||
}else KnockAwayTimer -= diff;
|
||||
|
||||
if(Phase == 3)
|
||||
{
|
||||
if(BellowingRoarTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR);
|
||||
|
||||
BellowingRoarTimer = 30000;
|
||||
}else BellowingRoarTimer -= diff;
|
||||
|
||||
if(SummonWhelpsTimer < diff)
|
||||
{
|
||||
SummonWhelps(Phase);
|
||||
|
||||
SummonWhelpsTimer = 45000;
|
||||
}else SummonWhelpsTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
if(Phase == 2)
|
||||
{
|
||||
if(InitialSpawn)
|
||||
{
|
||||
InitialSpawn = false;
|
||||
|
||||
for(uint32 i = 0; i < 10; ++i)
|
||||
{
|
||||
uint32 random = rand()%4;
|
||||
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
if(Whelp)
|
||||
Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
||||
}
|
||||
}
|
||||
|
||||
if(EngulfingFlamesTimer < diff)
|
||||
{
|
||||
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_ENGULFINGFLAMES);
|
||||
m_creature->HandleEmoteCommand(ANIM_FLY);
|
||||
|
||||
EngulfingFlamesTimer = 10000;
|
||||
}
|
||||
else EngulfingFlamesTimer -= diff;
|
||||
|
||||
if(FireballTimer < diff)
|
||||
{
|
||||
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_FIREBALL);
|
||||
|
||||
FireballTimer = 18000;
|
||||
}
|
||||
else FireballTimer -= diff;
|
||||
|
||||
if(MovementTimer < diff)
|
||||
if(KnockAwayTimer < diff)
|
||||
{
|
||||
if(rand()%100 < 30)
|
||||
{
|
||||
DoScriptText(EMOTE_BREATH, m_creature);
|
||||
DoCast(m_creature->getVictim(), SPELL_DEEPBREATH);
|
||||
}
|
||||
else ChangePosition();
|
||||
if(rand() <= 30)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_KNOCK_AWAY);
|
||||
}
|
||||
KnockAwayTimer = 15000;
|
||||
}else KnockAwayTimer -= diff;
|
||||
|
||||
if(Phase == 3)
|
||||
{
|
||||
if(BellowingRoarTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR);
|
||||
|
||||
BellowingRoarTimer = 30000;
|
||||
}else BellowingRoarTimer -= diff;
|
||||
|
||||
if(SummonWhelpsTimer < diff)
|
||||
{
|
||||
SummonWhelps(Phase);
|
||||
|
||||
SummonWhelpsTimer = 45000;
|
||||
}else SummonWhelpsTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
if(Phase == 2)
|
||||
{
|
||||
if(InitialSpawn)
|
||||
{
|
||||
InitialSpawn = false;
|
||||
|
||||
for(uint32 i = 0; i < 10; ++i)
|
||||
{
|
||||
uint32 random = rand()%4;
|
||||
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
if(Whelp)
|
||||
Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
||||
}
|
||||
}
|
||||
|
||||
if(EngulfingFlamesTimer < diff)
|
||||
{
|
||||
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_ENGULFINGFLAMES);
|
||||
m_creature->HandleEmoteCommand(ANIM_FLY);
|
||||
|
||||
EngulfingFlamesTimer = 10000;
|
||||
}
|
||||
else EngulfingFlamesTimer -= diff;
|
||||
|
||||
if(FireballTimer < diff)
|
||||
{
|
||||
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_FIREBALL);
|
||||
|
||||
FireballTimer = 18000;
|
||||
}
|
||||
else FireballTimer -= diff;
|
||||
|
||||
if(MovementTimer < diff)
|
||||
{
|
||||
if(rand()%100 < 30)
|
||||
{
|
||||
DoScriptText(EMOTE_BREATH, m_creature);
|
||||
DoCast(m_creature->getVictim(), SPELL_DEEPBREATH);
|
||||
}
|
||||
else ChangePosition();
|
||||
|
||||
MovementTimer = 25000;
|
||||
}else MovementTimer -= diff;
|
||||
@@ -253,46 +253,46 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
|
||||
|
||||
SummonWhelpsTimer = 45000;
|
||||
}
|
||||
else SummonWhelpsTimer -= diff;
|
||||
}
|
||||
}
|
||||
else SummonWhelpsTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
void ChangePosition()
|
||||
{
|
||||
uint32 random = rand() % 4;
|
||||
if(random<4){
|
||||
m_creature->GetMotionMaster()->MovePoint(0, MovementLocations[random][0], MovementLocations[random][1], MovementLocations[random][2]);}
|
||||
}
|
||||
void ChangePosition()
|
||||
{
|
||||
uint32 random = rand() % 4;
|
||||
if(random<4){
|
||||
m_creature->GetMotionMaster()->MovePoint(0, MovementLocations[random][0], MovementLocations[random][1], MovementLocations[random][2]);}
|
||||
}
|
||||
|
||||
void SummonWhelps(uint32 Phase)
|
||||
{
|
||||
if(Phase == 2)
|
||||
{
|
||||
uint32 max = rand()%10;
|
||||
for(uint32 i = 0; i < max; ++i)
|
||||
{
|
||||
uint32 random = rand()%3;
|
||||
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
if(Whelp)
|
||||
Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
||||
}
|
||||
}
|
||||
void SummonWhelps(uint32 Phase)
|
||||
{
|
||||
if(Phase == 2)
|
||||
{
|
||||
uint32 max = rand()%10;
|
||||
for(uint32 i = 0; i < max; ++i)
|
||||
{
|
||||
uint32 random = rand()%3;
|
||||
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
if(Whelp)
|
||||
Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
||||
}
|
||||
}
|
||||
|
||||
if(Phase == 3)
|
||||
{
|
||||
uint32 max = rand() % 10 +1;
|
||||
if(max < 5)
|
||||
{
|
||||
for(uint32 i = 0; i < max; ++i)
|
||||
{
|
||||
uint32 random = rand()%4;
|
||||
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
if(Whelp)
|
||||
Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Phase == 3)
|
||||
{
|
||||
uint32 max = rand() % 10 +1;
|
||||
if(max < 5)
|
||||
{
|
||||
for(uint32 i = 0; i < max; ++i)
|
||||
{
|
||||
uint32 random = rand()%4;
|
||||
Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
if(Whelp)
|
||||
Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_onyxiaAI(Creature *_Creature)
|
||||
@@ -307,4 +307,4 @@ void AddSC_boss_onyxia()
|
||||
newscript->Name="boss_onyxia";
|
||||
newscript->GetAI = &GetAI_boss_onyxiaAI;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,4 +201,4 @@ void AddSC_razorfen_kraul()
|
||||
newscript->GetAI = &GetAI_npc_willix;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_willix;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ struct TRINITY_DLL_DECL boss_moamAI : public ScriptedAI
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(EMOTE_AGGRO, m_creature);
|
||||
DoScriptText(EMOTE_AGGRO, m_creature);
|
||||
pTarget = who;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ struct TRINITY_DLL_DECL boss_moamAI : public ScriptedAI
|
||||
//if (j==1 && m_creature->GetMana()*100 / m_creature->GetMaxMana() == 100 && !m_creature->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_ARCANEERUPTION);
|
||||
DoScriptText(EMOTE_MANA_FULL, m_creature);
|
||||
DoScriptText(EMOTE_MANA_FULL, m_creature);
|
||||
}
|
||||
|
||||
//If we are <50%HP cast MANA FIEND (Summon Mana) and Sleep
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user