mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-21 15:17:10 -04:00
*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (31224,41292,44007,44867);
|
||||
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
|
||||
(31224, -1543, 2, 'Cloak of Shadows - Flare'),
|
||||
(41292, 42017, 2, 'Aura of Suffering'),
|
||||
(44007, -43657, 2, 'Storm Eye Safe Zone Immune'),
|
||||
(44867, -46019, 2, 'Spectral Exhaustion - Teleport: Spectral Realm');
|
||||
@@ -0,0 +1,5 @@
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_effect` IN ('33686', '31705');
|
||||
INSERT INTO `spell_linked_spell`(`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
|
||||
('-33711','33686','0','Murmur\'s Shockwave (Normal)'),
|
||||
('-38794','33686','0','Murmur\'s Shockwave (Heroic)'),
|
||||
('33686','31705','0','Murmur\'s Shockwave Jump');
|
||||
@@ -0,0 +1 @@
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_the_black_stalker' WHERE `entry`='17882';
|
||||
@@ -24,4 +24,7 @@ INSTALL(FILES
|
||||
1207_world_scripts.sql
|
||||
1237_mangos_7230_01_world_spell_bonus_data
|
||||
1248_mangos_7235_01_world_command
|
||||
1018_world.sql
|
||||
1026_world.sql
|
||||
1028_world_scripts.sql
|
||||
DESTINATION share/trinity/sql/updates)
|
||||
@@ -140,6 +140,7 @@ SET(trinityscript_LIB_SRCS
|
||||
scripts/zone/coilfang_resevoir/steam_vault/def_steam_vault.h
|
||||
scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp
|
||||
scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp
|
||||
scripts/zone/coilfang_resevoir/underbog/boss_the_black_stalker.cpp
|
||||
scripts/zone/darkshore/darkshore.cpp
|
||||
scripts/zone/deadmines/def_deadmines.h
|
||||
scripts/zone/deadmines/deadmines.cpp
|
||||
|
||||
@@ -257,6 +257,7 @@ extern void AddSC_instance_steam_vault();
|
||||
|
||||
//--Underbog
|
||||
extern void AddSC_boss_hungarfen();
|
||||
extern void AddSC_boss_the_black_stalker();
|
||||
|
||||
//Darkshore
|
||||
//Darnassus
|
||||
@@ -1466,6 +1467,7 @@ void ScriptsInit()
|
||||
|
||||
//--Underbog
|
||||
AddSC_boss_hungarfen();
|
||||
AddSC_boss_the_black_stalker();
|
||||
|
||||
//Darkshore
|
||||
//Darnassus
|
||||
|
||||
@@ -1843,6 +1843,10 @@
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\underbog\boss_hungarfen.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\underbog\boss_the_black_stalker.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
|
||||
@@ -2109,6 +2109,10 @@
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\underbog\boss_hungarfen.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\underbog\boss_the_black_stalker.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
|
||||
@@ -2129,6 +2129,10 @@
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\underbog\boss_hungarfen.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\coilfang_resevoir\underbog\boss_the_black_stalker.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
|
||||
@@ -75,6 +75,7 @@ void npc_escortAI::JustRespawned()
|
||||
|
||||
//Re-Enable gossip
|
||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
|
||||
Reset();
|
||||
}
|
||||
@@ -299,4 +300,5 @@ void npc_escortAI::Start(bool bAttack, bool bDefend, bool bRun, uint64 pGUID)
|
||||
|
||||
//Disable gossip
|
||||
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Murmur
|
||||
SD%Complete: 75
|
||||
SDComment: Database should have `RegenHealth`=0 to prevent regen. Also, his shockwave triggered after magnetic pull may be incorrect. Murmur's Touch does not work properly.
|
||||
SD%Complete: 90
|
||||
SDComment: Timers may be incorrect
|
||||
SDCategory: Auchindoun, Shadow Labyrinth
|
||||
EndScriptData */
|
||||
|
||||
@@ -25,118 +25,148 @@ EndScriptData */
|
||||
|
||||
#define EMOTE_SONIC_BOOM -1555036
|
||||
|
||||
#define SPELL_MAGNETIC_PULL 33689
|
||||
#define SPELL_SONIC_BOOM_PRE 33923
|
||||
#define SPELL_SONIC_BOOM_CAST 38795
|
||||
#define SPELL_MURMURS_TOUCH 33711
|
||||
#define SPELL_SONIC_BOOM_CAST (HeroicMode?38796:33923)
|
||||
#define SPELL_SONIC_BOOM_EFFECT (HeroicMode?38795:33666)
|
||||
#define SPELL_RESONANCE 33657
|
||||
#define SPELL_SHOCKWAVE 33686
|
||||
#define SPELL_MURMURS_TOUCH (HeroicMode?38794:33711)
|
||||
#define SPELL_MAGNETIC_PULL 33689
|
||||
#define SPELL_SONIC_SHOCK 38797
|
||||
#define SPELL_THUNDERING_STORM 39365
|
||||
|
||||
struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI
|
||||
{
|
||||
boss_murmurAI(Creature *c) : Scripted_NoMovementAI(c) {Reset();}
|
||||
boss_murmurAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint32 SonicBoom_Timer;
|
||||
uint32 MurmursTouch_Timer;
|
||||
uint32 Resonance_Timer;
|
||||
uint32 MagneticPull_Timer;
|
||||
bool CanSonicBoom;
|
||||
bool CanShockWave;
|
||||
uint64 pTarget;
|
||||
uint32 SonicShock_Timer;
|
||||
uint32 ThunderingStorm_Timer;
|
||||
bool HeroicMode;
|
||||
bool SonicBoom;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SonicBoom_Timer = 30000;
|
||||
MurmursTouch_Timer = 20000;
|
||||
Resonance_Timer = 10000;
|
||||
MagneticPull_Timer = 45000;
|
||||
CanSonicBoom = false;
|
||||
CanShockWave = false;
|
||||
pTarget = 0;
|
||||
MagneticPull_Timer = 20000;
|
||||
ThunderingStorm_Timer = 15000;
|
||||
SonicShock_Timer = 10000;
|
||||
SonicBoom = false;
|
||||
|
||||
//database should have `RegenHealth`=0 to prevent regen
|
||||
uint32 hp = (m_creature->GetMaxHealth()*40)/100;
|
||||
if (hp)
|
||||
m_creature->SetHealth(hp);
|
||||
if (hp) m_creature->SetHealth(hp);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) { }
|
||||
|
||||
// Sonic Boom instant damage (needs core fix instead of this)
|
||||
void SpellHitTarget(Unit *target, const SpellEntry *spell)
|
||||
{
|
||||
if(target && target->isAlive() && spell && spell->Id == SPELL_SONIC_BOOM_EFFECT)
|
||||
m_creature->DealDamage(target,(target->GetHealth()*90)/100,NULL,SPELL_DIRECT_DAMAGE,SPELL_SCHOOL_MASK_NATURE,spell);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim() )
|
||||
//Return since we have no target or casting
|
||||
if (!UpdateVictim() || m_creature->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
//SonicBoom_Timer
|
||||
// Sonic Boom
|
||||
if(SonicBoom)
|
||||
{
|
||||
DoCast(m_creature, SPELL_SONIC_BOOM_EFFECT, true);
|
||||
SonicBoom = false;
|
||||
Resonance_Timer = 1500;
|
||||
}
|
||||
if (SonicBoom_Timer < diff)
|
||||
{
|
||||
if (CanSonicBoom)
|
||||
{
|
||||
DoCast(m_creature, SPELL_SONIC_BOOM_CAST,true);
|
||||
CanSonicBoom = false;
|
||||
SonicBoom_Timer = 30000;
|
||||
}
|
||||
else
|
||||
{
|
||||
DoScriptText(EMOTE_SONIC_BOOM, m_creature);
|
||||
DoCast(m_creature,SPELL_SONIC_BOOM_PRE);
|
||||
CanSonicBoom = true;
|
||||
SonicBoom_Timer = 5000;
|
||||
}
|
||||
DoScriptText(EMOTE_SONIC_BOOM, m_creature);
|
||||
DoCast(m_creature, SPELL_SONIC_BOOM_CAST);
|
||||
SonicBoom_Timer = 30000;
|
||||
SonicBoom = true;
|
||||
return;
|
||||
}else SonicBoom_Timer -= diff;
|
||||
|
||||
//MurmursTouch_Timer
|
||||
// Murmur's Touch
|
||||
if (MurmursTouch_Timer < diff)
|
||||
{
|
||||
/*Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||
if(target)
|
||||
DoCast(target, SPELL_MURMURS_TOUCH);*/
|
||||
DoCast(m_creature, SPELL_MURMURS_TOUCH);
|
||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0,80,true))
|
||||
DoCast(target, SPELL_MURMURS_TOUCH);
|
||||
MurmursTouch_Timer = 30000;
|
||||
}else MurmursTouch_Timer -= diff;
|
||||
|
||||
//Resonance_Timer
|
||||
// Resonance
|
||||
if (Resonance_Timer < diff)
|
||||
{
|
||||
if (!m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
DoCast(m_creature->getVictim(), SPELL_RESONANCE);
|
||||
if (!m_creature->IsWithinMeleeRange(SelectUnit(SELECT_TARGET_NEAREST,0,20,true)))
|
||||
DoCast(m_creature, SPELL_RESONANCE);
|
||||
Resonance_Timer = 5000;
|
||||
}else Resonance_Timer -= diff;
|
||||
|
||||
//MagneticPull_Timer
|
||||
// Magnetic Pull
|
||||
if (MagneticPull_Timer < diff)
|
||||
{
|
||||
if (!CanShockWave)
|
||||
{
|
||||
if (Unit* temp = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
if (target->GetTypeId() == TYPEID_PLAYER && target->isAlive())
|
||||
{
|
||||
if (temp->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoCast(temp, SPELL_MAGNETIC_PULL);
|
||||
pTarget = temp->GetGUID();
|
||||
CanShockWave = true;
|
||||
}
|
||||
MagneticPull_Timer = 2500;
|
||||
DoCast(target, SPELL_MAGNETIC_PULL);
|
||||
MagneticPull_Timer = 20000+rand()%15000;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Unit* target = Unit::GetUnit(*m_creature,pTarget))
|
||||
target->CastSpell(target,SPELL_SHOCKWAVE,true);
|
||||
|
||||
MagneticPull_Timer = 35000;
|
||||
CanShockWave = false;
|
||||
pTarget = 0;
|
||||
}
|
||||
MagneticPull_Timer = 500;
|
||||
}else MagneticPull_Timer -= diff;
|
||||
|
||||
//no meele if preparing for sonic boom
|
||||
if (!CanSonicBoom)
|
||||
DoMeleeAttackIfReady();
|
||||
if(HeroicMode)
|
||||
{
|
||||
// Thundering Storm
|
||||
if(ThunderingStorm_Timer < diff)
|
||||
{
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
for(std::list<HostilReference*>::iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
|
||||
if(Unit* target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()))
|
||||
if(target->isAlive() && m_creature->GetDistance2d(target) > 35)
|
||||
DoCast(target, SPELL_THUNDERING_STORM, true);
|
||||
ThunderingStorm_Timer = 15000;
|
||||
}else ThunderingStorm_Timer -= diff;
|
||||
|
||||
// Sonic Shock
|
||||
if(SonicShock_Timer < diff)
|
||||
{
|
||||
if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0,20,false))
|
||||
if(target->isAlive())
|
||||
DoCast(target, SPELL_SONIC_SHOCK);
|
||||
SonicShock_Timer = 10000+rand()%10000;
|
||||
}else SonicShock_Timer -= diff;
|
||||
}
|
||||
|
||||
// Select nearest most aggro target if top aggro too far
|
||||
if(!m_creature->isAttackReady())
|
||||
return;
|
||||
if(!m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
{
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
for(std::list<HostilReference*>::iterator i = m_threatlist.begin(); i != m_threatlist.end(); ++i)
|
||||
if(Unit* target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()))
|
||||
if(target->isAlive() && m_creature->IsWithinMeleeRange(target))
|
||||
{
|
||||
m_creature->TauntApply(target);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_murmur(Creature *_Creature)
|
||||
{
|
||||
return new boss_murmurAI (_Creature);
|
||||
|
||||
+9
-2
@@ -993,6 +993,15 @@ bool ItemUse_item_tainted_core(Player *player, Item* _Item, SpellCastTargets con
|
||||
|
||||
//remove this item
|
||||
player->DestroyItemCount(31088, 1, true);
|
||||
return true;
|
||||
}
|
||||
else if( targets.getUnitTarget()->GetTypeId() == TYPEID_UNIT )
|
||||
return false;
|
||||
else if(targets.getUnitTarget()->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
player->DestroyItemCount(31088, 1, true);
|
||||
player->CastSpell(targets.getUnitTarget(), 38134, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -1066,5 +1075,3 @@ void AddSC_boss_lady_vashj()
|
||||
newscript->pItemUse = &ItemUse_item_tainted_core;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
|
||||
|
||||
+39
-35
@@ -74,7 +74,7 @@ enum RotationType
|
||||
|
||||
struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
{
|
||||
boss_the_lurker_belowAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
boss_the_lurker_belowAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
@@ -88,14 +88,17 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
SummonList Summons;
|
||||
|
||||
bool Spawned;
|
||||
uint32 RotTimer;
|
||||
uint8 RotType;
|
||||
double SpoutAngle;
|
||||
uint32 SpoutAnimTimer;
|
||||
bool Submerged;
|
||||
bool Submerged;
|
||||
|
||||
double SpoutAngle;
|
||||
|
||||
uint8 RotType;
|
||||
|
||||
uint32 RotTimer;
|
||||
uint32 SpoutAnimTimer;
|
||||
uint32 WaterboltTimer;
|
||||
uint32 SpoutTimer;
|
||||
uint32 WhirlTimer;//after avery spout
|
||||
@@ -107,19 +110,23 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING + MOVEMENTFLAG_LEVITATING);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
m_creature->SetCorpseDelay(1000*60*60);
|
||||
SpoutAngle = 0;
|
||||
RotType = NOROTATE;
|
||||
SpoutAnimTimer = 1000;
|
||||
RotTimer = 20000;
|
||||
Submerged = false;
|
||||
Spawned = false;
|
||||
|
||||
RotType = NOROTATE;
|
||||
|
||||
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;
|
||||
|
||||
Summons.DespawnAll();
|
||||
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, NOT_STARTED);
|
||||
|
||||
@@ -131,7 +138,6 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
m_creature->SetVisibility(VISIBILITY_ON);
|
||||
m_creature->SetReactState(REACT_AGGRESSIVE);
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
@@ -167,6 +173,8 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
{
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_THELURKERBELOWEVENT, DONE);
|
||||
|
||||
Summons.DespawnAll();
|
||||
}
|
||||
|
||||
void Rotate(const uint32 diff)
|
||||
@@ -231,18 +239,15 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
{
|
||||
switch (rand()%2)
|
||||
{
|
||||
case 0:
|
||||
RotType = CLOCKWISE;
|
||||
break;
|
||||
case 1:
|
||||
RotType = COUNTERCLOCKWISE;
|
||||
break;
|
||||
case 0: RotType = CLOCKWISE; break;
|
||||
case 1: RotType = COUNTERCLOCKWISE; break;
|
||||
}
|
||||
RotTimer=20000;
|
||||
RotTimer=20000;
|
||||
|
||||
if(victim)
|
||||
if(victim)
|
||||
SpoutAngle = m_creature->GetAngle(victim);
|
||||
m_creature->MonsterTextEmote(EMOTE_SPOUT,0,true);
|
||||
|
||||
m_creature->MonsterTextEmote(EMOTE_SPOUT,0,true);
|
||||
//DoCast(m_creature,SPELL_SPOUT_BREATH);//take breath anim
|
||||
}
|
||||
|
||||
@@ -360,20 +365,19 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
{
|
||||
m_creature->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//spawn adds
|
||||
m_creature->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[0][0],AddPos[0][1],AddPos[0][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
m_creature->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[1][0],AddPos[1][1],AddPos[1][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
m_creature->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[2][0],AddPos[2][1],AddPos[2][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
m_creature->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[3][0],AddPos[3][1],AddPos[3][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
m_creature->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[4][0],AddPos[4][1],AddPos[4][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
m_creature->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[5][0],AddPos[5][1],AddPos[5][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
m_creature->SummonCreature(MOB_COILFANG_GUARDIAN,AddPos[6][0],AddPos[6][1],AddPos[6][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
m_creature->SummonCreature(MOB_COILFANG_GUARDIAN,AddPos[7][0],AddPos[7][1],AddPos[7][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
m_creature->SummonCreature(MOB_COILFANG_GUARDIAN,AddPos[8][0],AddPos[8][1],AddPos[8][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
Spawned = true;
|
||||
}
|
||||
}
|
||||
for (uint8 i = 0; i < 9; ++i)
|
||||
{
|
||||
Creature* Summoned;
|
||||
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);
|
||||
|
||||
}
|
||||
Summons.Summon(Summoned);
|
||||
Spawned = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_coilfang_guardian(Creature *_Creature)
|
||||
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_the_black_stalker
|
||||
SD%Complete: 95
|
||||
SDComment: Timers may be incorrect
|
||||
SDCategory: Coilfang Resevoir, Underbog
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SPELL_LEVITATE 31704
|
||||
#define SPELL_SUSPENSION 31719
|
||||
#define SPELL_LEVITATION_PULSE 31701
|
||||
#define SPELL_MAGNETIC_PULL 31705
|
||||
#define SPELL_CHAIN_LIGHTNING 31717
|
||||
#define SPELL_STATIC_CHARGE 31715
|
||||
#define SPELL_SUMMON_SPORE_STRIDER 38755
|
||||
|
||||
#define ENTRY_SPORE_STRIDER 22299
|
||||
|
||||
struct TRINITY_DLL_DECL boss_the_black_stalkerAI : public ScriptedAI
|
||||
{
|
||||
boss_the_black_stalkerAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool HeroicMode;
|
||||
uint32 SporeStriders_Timer;
|
||||
uint32 Levitate_Timer;
|
||||
uint32 ChainLightning_Timer;
|
||||
uint32 StaticCharge_Timer;
|
||||
uint64 LevitatedTarget;
|
||||
uint32 LevitatedTarget_Timer;
|
||||
bool InAir;
|
||||
uint32 check_Timer;
|
||||
std::list<uint64> Striders;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Levitate_Timer = 12000;
|
||||
ChainLightning_Timer = 6000;
|
||||
StaticCharge_Timer = 10000;
|
||||
SporeStriders_Timer = 10000+rand()%5000;
|
||||
check_Timer = 5000;
|
||||
LevitatedTarget = 0;
|
||||
LevitatedTarget_Timer = 0;
|
||||
Striders.clear();
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) {}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
if(summon && summon->GetEntry() == ENTRY_SPORE_STRIDER)
|
||||
{
|
||||
Striders.push_back(summon->GetGUID());
|
||||
if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
summon->AI()->AttackStart(target);
|
||||
else
|
||||
if(m_creature->getVictim())
|
||||
summon->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
for(std::list<uint64>::iterator i = Striders.begin(); i != Striders.end(); ++i)
|
||||
if(Creature *strider = (Creature*)Unit::GetUnit(*m_creature, *i))
|
||||
{
|
||||
strider->SetLootRecipient(NULL);
|
||||
strider->DealDamage(strider,strider->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
strider->RemoveCorpse();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
// Evade if too far
|
||||
if(check_Timer < diff)
|
||||
{
|
||||
float x,y,z,o;
|
||||
m_creature->GetHomePosition(x,y,z,o);
|
||||
if(m_creature->GetDistance(x,y,z) > 60)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
check_Timer = 1000;
|
||||
}else check_Timer -= diff;
|
||||
|
||||
// Spore Striders
|
||||
if(HeroicMode && SporeStriders_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_SUMMON_SPORE_STRIDER);
|
||||
SporeStriders_Timer = 10000+rand()%5000;
|
||||
}else SporeStriders_Timer -= diff;
|
||||
|
||||
// Levitate
|
||||
if(LevitatedTarget)
|
||||
{
|
||||
if(LevitatedTarget_Timer < diff)
|
||||
{
|
||||
if(Unit* target = (Unit*)Unit::GetUnit(*m_creature, LevitatedTarget))
|
||||
{
|
||||
if(!target->HasAura(SPELL_LEVITATE,0))
|
||||
{
|
||||
LevitatedTarget = 0;
|
||||
return;
|
||||
}
|
||||
if(InAir)
|
||||
{
|
||||
target->AddAura(SPELL_SUSPENSION, target);
|
||||
LevitatedTarget = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
target->CastSpell(target, SPELL_MAGNETIC_PULL, true);
|
||||
InAir = true;
|
||||
LevitatedTarget_Timer = 1500;
|
||||
}
|
||||
}
|
||||
else
|
||||
LevitatedTarget = 0;
|
||||
}else LevitatedTarget_Timer -= diff;
|
||||
}
|
||||
if(Levitate_Timer < diff)
|
||||
{
|
||||
if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
{
|
||||
DoCast(target, SPELL_LEVITATE);
|
||||
LevitatedTarget = target->GetGUID();
|
||||
LevitatedTarget_Timer = 2000;
|
||||
InAir = false;
|
||||
}
|
||||
Levitate_Timer = 12000+rand()%3000;
|
||||
}else Levitate_Timer -= diff;
|
||||
|
||||
// Chain Lightning
|
||||
if(ChainLightning_Timer < diff)
|
||||
{
|
||||
if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target, SPELL_CHAIN_LIGHTNING);
|
||||
ChainLightning_Timer = 7000;
|
||||
}else ChainLightning_Timer -= diff;
|
||||
|
||||
// Static Charge
|
||||
if(StaticCharge_Timer < diff)
|
||||
{
|
||||
if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0,30,true))
|
||||
DoCast(target, SPELL_STATIC_CHARGE);
|
||||
StaticCharge_Timer = 10000;
|
||||
}else StaticCharge_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_the_black_stalker(Creature *_Creature)
|
||||
{
|
||||
return new boss_the_black_stalkerAI (_Creature);
|
||||
}
|
||||
|
||||
void AddSC_boss_the_black_stalker()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="boss_the_black_stalker";
|
||||
newscript->GetAI = &GetAI_boss_the_black_stalker;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
@@ -56,15 +56,6 @@ float IntroWay[8][3] =
|
||||
{-11163 , -1903 ,91.473}
|
||||
};
|
||||
|
||||
//float IntroWay[5][3] =
|
||||
//{
|
||||
// {-11000.00, -1765.75, 140.40},
|
||||
// {-11000.00, -1765.75, 171.00},
|
||||
// {-11173.67, -1832.26, 117.76},
|
||||
// {-11142.75, -1916.78, 119.769},
|
||||
// {-11161.91, -1911.148, 91.473}
|
||||
//};
|
||||
|
||||
struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
{
|
||||
boss_nightbaneAI(Creature* c) : ScriptedAI(c)
|
||||
@@ -123,10 +114,12 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
m_creature->setActive(true);
|
||||
|
||||
if(pInstance->GetData(DATA_NIGHTBANE_EVENT) == DONE)
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
else
|
||||
pInstance->SetData(DATA_NIGHTBANE_EVENT, NOT_STARTED);
|
||||
pInstance->SetData(DATA_NIGHTBANE_EVENT, 6);
|
||||
if(pInstance->GetData(DATA_NIGHTBANE_EVENT) > 1)
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
m_creature->RemoveCorpse();
|
||||
}else pInstance->SetData(DATA_NIGHTBANE_EVENT, NOT_STARTED);
|
||||
|
||||
HandleTerraceDoors(true);
|
||||
|
||||
@@ -425,4 +418,4 @@ void AddSC_boss_nightbane()
|
||||
newscript->Name="boss_nightbane";
|
||||
newscript->GetAI = &GetAI_boss_nightbane;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
// Not in progress
|
||||
// Not in progress
|
||||
pInstance->SetData(DATA_SHADEOFARAN_EVENT, NOT_STARTED);
|
||||
|
||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||
@@ -164,6 +164,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_SHADEOFARAN_EVENT, DONE);
|
||||
|
||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
@@ -179,7 +180,11 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
||||
}
|
||||
|
||||
if(pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_SHADEOFARAN_EVENT, IN_PROGRESS);
|
||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||
Door->SetGoState(1);
|
||||
}
|
||||
}
|
||||
|
||||
void FlameWreathEffect()
|
||||
|
||||
@@ -40,6 +40,7 @@ EndScriptData */
|
||||
10 - Prince Malchezzar
|
||||
11 - Nightbane
|
||||
*/
|
||||
|
||||
struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
{
|
||||
instance_karazhan(Map* map) : ScriptedInstance(map) {Initialize();}
|
||||
@@ -63,7 +64,8 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
uint64 MastersTerraceDoor[2];
|
||||
uint64 ImageGUID;
|
||||
|
||||
bool NightbaneSummoned;
|
||||
uint8 Nightbane;
|
||||
bool CheckNightbane;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
@@ -90,7 +92,9 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
MastersTerraceDoor[1]= 0;
|
||||
ImageGUID = 0;
|
||||
|
||||
NightbaneSummoned = false;
|
||||
Nightbane = 0;
|
||||
|
||||
CheckNightbane = false;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
@@ -117,7 +121,12 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
case DATA_NETHERSPITE_EVENT: return Encounters[8];
|
||||
case DATA_CHESS_EVENT: return Encounters[9];
|
||||
case DATA_MALCHEZZAR_EVENT: return Encounters[10];
|
||||
case DATA_NIGHTBANE_EVENT: return Encounters[11];
|
||||
case DATA_NIGHTBANE_EVENT:
|
||||
if(CheckNightbane)
|
||||
{
|
||||
CheckNightbane = false;
|
||||
return Nightbane;
|
||||
}else return Encounters[11];
|
||||
case DATA_OPERA_PERFORMANCE: return OperaEvent;
|
||||
case DATA_OPERA_OZ_DEATHCOUNT: return OzDeathCount;
|
||||
case DATA_IMAGE_OF_MEDIVH: return ImageGUID;
|
||||
@@ -133,9 +142,6 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
case 17229: KilrekGUID = creature->GetGUID(); break;
|
||||
case 15688: TerestianGUID = creature->GetGUID(); break;
|
||||
case 15687: MoroesGUID = creature->GetGUID(); break;
|
||||
case 17225: if(NightbaneSummoned)creature->RemoveFromWorld();
|
||||
else NightbaneSummoned = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,8 +186,13 @@ 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: Encounters[11] = data; break;
|
||||
|
||||
case DATA_NIGHTBANE_EVENT:
|
||||
if(data == 6)
|
||||
{
|
||||
Nightbane;
|
||||
CheckNightbane = true;
|
||||
}else Encounters[11] = data;
|
||||
break;
|
||||
case DATA_OPERA_OZ_DEATHCOUNT: ++OzDeathCount; break;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +111,19 @@ struct TRINITY_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI
|
||||
pInstance->SetData(TYPE_HARBINGERSKYRISS,DONE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
if(!summon)
|
||||
return;
|
||||
if(IsImage66)
|
||||
summon->SetHealth((summon->GetMaxHealth()*33)/100);
|
||||
else
|
||||
summon->SetHealth((summon->GetMaxHealth()*66)/100);
|
||||
if(m_creature->getVictim())
|
||||
if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
//won't yell killing pet/other unit
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/* ScriptData
|
||||
SDName: Boss_Warp_Splinter
|
||||
SD%Complete: 80
|
||||
SDComment: Includes Sapling (need some better control with these). Spells for boss possibly need some rework.
|
||||
SDComment: Includes Sapling (need some better control with these).
|
||||
SDCategory: Tempest Keep, The Botanica
|
||||
EndScriptData */
|
||||
|
||||
@@ -27,6 +27,8 @@ EndScriptData */
|
||||
# mob_treant (Sapling)
|
||||
#####*/
|
||||
|
||||
#define SPELL_HEAL_FATHER 6262
|
||||
|
||||
struct TRINITY_DLL_DECL mob_treantAI : public ScriptedAI
|
||||
{
|
||||
mob_treantAI (Creature *c) : ScriptedAI(c)
|
||||
@@ -36,26 +38,38 @@ struct TRINITY_DLL_DECL mob_treantAI : public ScriptedAI
|
||||
}
|
||||
|
||||
uint64 WarpGuid;
|
||||
uint32 check_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetSpeed( MOVE_RUN, 0.5f, true);
|
||||
m_creature->SetUnitMovementFlags(0);
|
||||
check_Timer = 0;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
return;
|
||||
}
|
||||
void Aggro(Unit *who) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
}
|
||||
void MoveInLineOfSight(Unit*) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
{
|
||||
if(WarpGuid && check_Timer < diff)
|
||||
{
|
||||
if(Unit *Warp = (Unit*)Unit::GetUnit(*m_creature, WarpGuid))
|
||||
{
|
||||
if(m_creature->IsWithinMeleeRange(Warp,2.5f))
|
||||
{
|
||||
int32 CurrentHP_Treant = (int32)m_creature->GetHealth();
|
||||
Warp->CastCustomSpell(Warp,SPELL_HEAL_FATHER,&CurrentHP_Treant, 0, 0, true,0 ,0, m_creature->GetGUID());
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return;
|
||||
}
|
||||
m_creature->GetMotionMaster()->MoveFollow(Warp,0,0);
|
||||
}
|
||||
check_Timer = 1000;
|
||||
}else check_Timer -= diff;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_creature->getVictim()->GetGUID() != WarpGuid)
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -75,14 +89,13 @@ struct TRINITY_DLL_DECL mob_treantAI : public ScriptedAI
|
||||
|
||||
#define WAR_STOMP 34716
|
||||
#define SUMMON_TREANTS 34727 // DBC: 34727, 34731, 34733, 34734, 34736, 34739, 34741 (with Ancestral Life spell 34742) // won't work (guardian summon)
|
||||
#define ARCANE_VOLLEY 36705 //37078, 34785 //must additional script them (because Splinter eats them after 20 sec ^)
|
||||
#define SPELL_HEAL_FATHER 6262
|
||||
#define ARCANE_VOLLEY (HeroicMode?39133:36705)
|
||||
|
||||
#define CREATURE_TREANT 19949
|
||||
|
||||
#define TREANT_SPAWN_DIST 50 //50 yards from Warp Splinter's spawn point
|
||||
|
||||
float treant_pos[6][3] =
|
||||
float treant_pos[6][3] =
|
||||
{
|
||||
{24.301233, 427.221100, -27.060635},
|
||||
{16.795492, 359.678802, -27.355425},
|
||||
@@ -96,6 +109,7 @@ struct TRINITY_DLL_DECL boss_warp_splinterAI : public ScriptedAI
|
||||
{
|
||||
boss_warp_splinterAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
HeroicMode = c->GetMap()->IsHeroic();
|
||||
Treant_Spawn_Pos_X = c->GetPositionX();
|
||||
Treant_Spawn_Pos_Y = c->GetPositionY();
|
||||
Reset();
|
||||
@@ -104,9 +118,7 @@ struct TRINITY_DLL_DECL boss_warp_splinterAI : public ScriptedAI
|
||||
uint32 War_Stomp_Timer;
|
||||
uint32 Summon_Treants_Timer;
|
||||
uint32 Arcane_Volley_Timer;
|
||||
uint32 CheckTreantLOS_Timer;
|
||||
uint32 TreantLife_Timer;
|
||||
uint64 Treant_GUIDs[6];
|
||||
bool HeroicMode;
|
||||
|
||||
float Treant_Spawn_Pos_X;
|
||||
float Treant_Spawn_Pos_Y;
|
||||
@@ -116,11 +128,6 @@ struct TRINITY_DLL_DECL boss_warp_splinterAI : public ScriptedAI
|
||||
War_Stomp_Timer = 25000 + rand()%15000;
|
||||
Summon_Treants_Timer = 45000;
|
||||
Arcane_Volley_Timer = 8000 + rand()%12000;
|
||||
CheckTreantLOS_Timer = 1000;
|
||||
TreantLife_Timer = 999999;
|
||||
|
||||
for(int i = 0; i < 6; ++i)
|
||||
Treant_GUIDs[i] = 0;
|
||||
|
||||
m_creature->SetSpeed( MOVE_RUN, 0.7f, true);
|
||||
}
|
||||
@@ -147,53 +154,23 @@ struct TRINITY_DLL_DECL boss_warp_splinterAI : public ScriptedAI
|
||||
void SummonTreants()
|
||||
{
|
||||
for(int i = 0; i < 6; ++i)
|
||||
{
|
||||
{
|
||||
float angle = (M_PI / 3) * i;
|
||||
|
||||
float X = Treant_Spawn_Pos_X + TREANT_SPAWN_DIST * cos(angle);
|
||||
float Y = Treant_Spawn_Pos_Y + TREANT_SPAWN_DIST * sin(angle);
|
||||
//float Z = m_creature->GetMap()->GetHeight(X,Y, m_creature->GetPositionZ());
|
||||
//float Z = m_creature->GetPositionZ();
|
||||
float O = - m_creature->GetAngle(X,Y);
|
||||
|
||||
Creature* pTreant = m_creature->SummonCreature(CREATURE_TREANT,treant_pos[i][0],treant_pos[i][1],treant_pos[i][2],O,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,40000);
|
||||
if(pTreant)
|
||||
{
|
||||
//pTreant->GetMotionMaster()->Mutate(new TargetedMovementGenerator<Creature>(*m_creature));
|
||||
pTreant->AddThreat(m_creature, 0.1f);
|
||||
Treant_GUIDs[i] = pTreant->GetGUID();
|
||||
if(Creature *pTreant = m_creature->SummonCreature(CREATURE_TREANT,treant_pos[i][0],treant_pos[i][1],treant_pos[i][2],O,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,25000))
|
||||
((mob_treantAI*)pTreant->AI())->WarpGuid = m_creature->GetGUID();
|
||||
}
|
||||
}
|
||||
switch(rand()%2)
|
||||
{
|
||||
{
|
||||
case 0: DoScriptText(SAY_SUMMON_1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SUMMON_2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
// Warp Splinter eat treants if they are near him
|
||||
void EatTreant()
|
||||
{
|
||||
for( int i=0; i<6; ++i )
|
||||
{
|
||||
Unit *pTreant = Unit::GetUnit(*m_creature, Treant_GUIDs[i]);
|
||||
|
||||
if( pTreant )
|
||||
{
|
||||
if( m_creature->IsWithinDistInMap(pTreant, 5))
|
||||
{
|
||||
// 2) Heal Warp Splinter
|
||||
int32 CurrentHP_Treant = (int32)pTreant->GetHealth();
|
||||
m_creature->CastCustomSpell(m_creature,SPELL_HEAL_FATHER,&CurrentHP_Treant, 0, 0, true,0 ,0, m_creature->GetGUID());
|
||||
|
||||
// 3) Kill Treant
|
||||
pTreant->DealDamage(pTreant, pTreant->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
@@ -203,30 +180,23 @@ struct TRINITY_DLL_DECL boss_warp_splinterAI : public ScriptedAI
|
||||
if(War_Stomp_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),WAR_STOMP);
|
||||
War_Stomp_Timer = 25000 + rand()%15000;
|
||||
War_Stomp_Timer = 25000 + rand()%15000;
|
||||
}else War_Stomp_Timer -= diff;
|
||||
|
||||
//Check for Arcane Volley
|
||||
if(Arcane_Volley_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),ARCANE_VOLLEY);
|
||||
Arcane_Volley_Timer = 20000 + rand()%15000;
|
||||
Arcane_Volley_Timer = 20000 + rand()%15000;
|
||||
}else Arcane_Volley_Timer -= diff;
|
||||
|
||||
//Check for Summon Treants
|
||||
if(Summon_Treants_Timer < diff)
|
||||
{
|
||||
SummonTreants();
|
||||
Summon_Treants_Timer = 45000;
|
||||
Summon_Treants_Timer = 45000;
|
||||
}else Summon_Treants_Timer -= diff;
|
||||
|
||||
// I check if there is a Treant in Warp Splinter's LOS, so he can eat them
|
||||
if( CheckTreantLOS_Timer < diff)
|
||||
{
|
||||
EatTreant();
|
||||
CheckTreantLOS_Timer = 1000;
|
||||
}else CheckTreantLOS_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -338,6 +338,14 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
|
||||
switch(m_spellInfo->Id) // better way to check unknown
|
||||
{
|
||||
case 35354://hand of death
|
||||
{
|
||||
if(unitTarget && unitTarget->HasAura(38528,0))//protection of elune
|
||||
{
|
||||
damage = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// percent from health with min
|
||||
case 25599: // Thundercrash
|
||||
{
|
||||
|
||||
@@ -499,7 +499,8 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex)
|
||||
case 37675: // Chaos Blast
|
||||
case 41519: // Mark of Stormrage
|
||||
case 34877: // Custodian of Time
|
||||
case 34700:
|
||||
case 34700: // Allergic Reaction
|
||||
case 31719: // Suspension
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2268,7 +2269,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
case 41635: // Prayer of Mending
|
||||
case 44869: // Spectral Blast
|
||||
case 45027: // Revitalize
|
||||
case 45976: // Muru Portal Channel
|
||||
case 45976: // Muru Portal Channel
|
||||
spellInfo->MaxAffectedTargets = 1;
|
||||
break;
|
||||
case 41376: // Spite
|
||||
@@ -2300,6 +2301,10 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
case 12494: // Frostbite
|
||||
spellInfo->Attributes |= SPELL_ATTR_BREAKABLE_BY_DAMAGE;
|
||||
break;
|
||||
case 38794: case 33711: //Murmur's Touch
|
||||
spellInfo->MaxAffectedTargets = 1;
|
||||
spellInfo->EffectTriggerSpell[0] = 33760;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user