mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Azjol Nerub, Ahn'Kahet: cleanup
--HG-- branch : trunk
This commit is contained in:
@@ -47,24 +47,24 @@ struct boss_amanitarAI : public ScriptedAI
|
||||
boss_amanitarAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
FirstTime = true;
|
||||
bFirstTime = true;
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 roottimer;
|
||||
uint32 bashtimer;
|
||||
uint32 bolttimer;
|
||||
uint32 spawntimer;
|
||||
uint32 uiRootTimer;
|
||||
uint32 uiBashTimer;
|
||||
uint32 uiBoltTimer;
|
||||
uint32 uiSpawnTimer;
|
||||
|
||||
bool FirstTime;
|
||||
bool bFirstTime;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
roottimer = urand(5000,9000);
|
||||
bashtimer = urand(10000,14000);
|
||||
bolttimer = urand(15000,30000);
|
||||
spawntimer = 0;
|
||||
uiRootTimer = urand(5*IN_MILISECONDS,9*IN_MILISECONDS);
|
||||
uiBashTimer = urand(10*IN_MILISECONDS,14*IN_MILISECONDS);
|
||||
uiBoltTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||
uiSpawnTimer = 0;
|
||||
|
||||
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
||||
@@ -72,11 +72,10 @@ struct boss_amanitarAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MINI);
|
||||
if (!FirstTime)
|
||||
{
|
||||
if (!bFirstTime)
|
||||
pInstance->SetData(DATA_AMANITAR_EVENT, FAIL);
|
||||
}
|
||||
else FirstTime = false;
|
||||
else
|
||||
bFirstTime = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,9 +107,9 @@ struct boss_amanitarAI : public ScriptedAI
|
||||
Position pos;
|
||||
victim->GetPosition(&pos);
|
||||
m_creature->GetRandomNearPosition(pos, float(urand(5,80)));
|
||||
m_creature->SummonCreature(NPC_POISONOUS_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
m_creature->SummonCreature(NPC_POISONOUS_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILISECONDS);
|
||||
m_creature->GetRandomNearPosition(pos, float(urand(5,80)));
|
||||
m_creature->SummonCreature(NPC_HEALTHY_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
m_creature->SummonCreature(NPC_HEALTHY_MUSHROOM, pos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30*IN_MILISECONDS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,31 +120,31 @@ struct boss_amanitarAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (spawntimer <= diff)
|
||||
if (uiSpawnTimer <= diff)
|
||||
{
|
||||
SpawnAdds();
|
||||
spawntimer = urand(35000,40000);
|
||||
} else spawntimer -= diff;
|
||||
uiSpawnTimer = urand(35*IN_MILISECONDS,40*IN_MILISECONDS);
|
||||
} else uiSpawnTimer -= diff;
|
||||
|
||||
if (roottimer <= diff)
|
||||
if (uiRootTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_ENTANGLING_ROOTS);
|
||||
roottimer = urand(15000,30000);
|
||||
}
|
||||
uiRootTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||
} else uiRootTimer -= diff;
|
||||
|
||||
if (bashtimer <= diff)
|
||||
if (uiBashTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_BASH);
|
||||
bashtimer = urand(15000,30000);
|
||||
} else bashtimer -= diff;
|
||||
uiBashTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||
} else uiBashTimer -= diff;
|
||||
|
||||
if (bolttimer <= diff)
|
||||
if (uiBoltTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_VENOM_BOLT_VOLLEY);
|
||||
bolttimer = urand(15000,30000);
|
||||
} else bolttimer -= diff;
|
||||
uiBoltTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||
} else uiBoltTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -153,13 +152,10 @@ struct boss_amanitarAI : public ScriptedAI
|
||||
|
||||
struct mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
|
||||
{
|
||||
mob_amanitar_mushroomsAI(Creature* c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
c->SetUInt32Value(UNIT_FIELD_DISPLAYID, 26981); // Unsichtbar...
|
||||
}
|
||||
mob_amanitar_mushroomsAI(Creature* c) : Scripted_NoMovementAI(c) {}
|
||||
|
||||
uint32 auratimer,
|
||||
deathtimer; // Without not all will despawn after 30000! :-(
|
||||
uint32 uiAuraTimer;
|
||||
uint32 uiDeathTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -168,8 +164,8 @@ struct mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
|
||||
if (m_creature->GetEntry() == NPC_POISONOUS_MUSHROOM)
|
||||
DoCast(m_creature, SPELL_POISONOUS_MUSHROOM_VISUAL_AURA, true);
|
||||
|
||||
auratimer = 0;
|
||||
deathtimer = 30000;
|
||||
uiAuraTimer = 0;
|
||||
uiDeathTimer = 30*IN_MILISECONDS;
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
@@ -191,17 +187,16 @@ struct mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
|
||||
{
|
||||
if (m_creature->GetEntry() == NPC_POISONOUS_MUSHROOM)
|
||||
{
|
||||
if (auratimer <= diff)
|
||||
if (uiAuraTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_POISONOUS_MUSHROOM_VISUAL_AREA, true);
|
||||
DoCast(m_creature, SPELL_POISONOUS_MUSHROOM_POISON_CLOUD, false);
|
||||
auratimer = 7000;
|
||||
} else auratimer -= diff;
|
||||
uiAuraTimer = 7*IN_MILISECONDS;
|
||||
} else uiAuraTimer -= diff;
|
||||
}
|
||||
if (deathtimer <= diff)
|
||||
{
|
||||
if (uiDeathTimer <= diff)
|
||||
m_creature->DisappearAndDie();
|
||||
} else deathtimer -= diff;
|
||||
else uiDeathTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -43,7 +43,9 @@ enum Spells
|
||||
SPELL_BROOD_PLAGUE = 56130,
|
||||
H_SPELL_BROOD_PLAGUE = 59467,
|
||||
H_SPELL_BROOD_RAGE = 59465,
|
||||
SPELL_ENRAGE = 26662 // Enraged if too far away from home
|
||||
SPELL_ENRAGE = 26662, // Enraged if too far away from home
|
||||
SPELL_SUMMON_SWARMERS = 56119, //2x 30178 -- 2x every 10secs
|
||||
SPELL_SUMMON_SWARM_GUARD = 56120, //1x 30176 -- every 25secs
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
@@ -52,13 +54,6 @@ enum Creatures
|
||||
MOB_AHNKAHAR_GUARDIAN_ENTRY = 30176
|
||||
};
|
||||
|
||||
enum CreatureSpells
|
||||
{
|
||||
SPELL_SUMMON_SWARMERS = 56119, //2x 30178 -- 2x every 10secs
|
||||
SPELL_SUMMON_SWARM_GUARD = 56120, //1x 30176 -- every 25secs
|
||||
SPELL_GUARDIAN_AURA = 56151
|
||||
};
|
||||
|
||||
#define EMOTE_HATCHES "An Ahn'kahar Guardian hatches!"
|
||||
|
||||
struct boss_elder_nadoxAI : public ScriptedAI
|
||||
@@ -68,29 +63,29 @@ struct boss_elder_nadoxAI : public ScriptedAI
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
uint32 plague_Timer;
|
||||
uint32 rage_Timer;
|
||||
uint32 uiPlagueTimer;
|
||||
uint32 uiRagueTimer;
|
||||
|
||||
uint32 swarmer_spawn_Timer;
|
||||
uint32 guard_spawn_Timer;
|
||||
uint32 enrage_Timer;
|
||||
uint32 uiSwarmerSpawnTimer;
|
||||
uint32 uiGuardSpawnTimer;
|
||||
uint32 uiEnragueTimer;
|
||||
|
||||
bool GuardSpawned;
|
||||
bool bGuardSpawned;
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
plague_Timer = 13000;
|
||||
rage_Timer = 20000;
|
||||
uiPlagueTimer = 13*IN_MILISECONDS;
|
||||
uiRagueTimer = 20*IN_MILISECONDS;
|
||||
|
||||
swarmer_spawn_Timer = 10000;
|
||||
guard_spawn_Timer = 25000;
|
||||
uiSwarmerSpawnTimer = 10*IN_MILISECONDS;
|
||||
uiGuardSpawnTimer = 25*IN_MILISECONDS;
|
||||
|
||||
enrage_Timer = 5000;
|
||||
uiEnragueTimer = 5*IN_MILISECONDS;
|
||||
|
||||
DeadAhnkaharGuardian = false;
|
||||
GuardSpawned = false;
|
||||
bGuardSpawned = false;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ELDER_NADOX_EVENT, NOT_STARTED);
|
||||
@@ -106,8 +101,6 @@ struct boss_elder_nadoxAI : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
if (victim == m_creature)
|
||||
return;
|
||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), m_creature);
|
||||
}
|
||||
|
||||
@@ -128,42 +121,40 @@ struct boss_elder_nadoxAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (plague_Timer <= diff)
|
||||
if (uiPlagueTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), DUNGEON_MODE(SPELL_BROOD_PLAGUE, H_SPELL_BROOD_PLAGUE));
|
||||
plague_Timer = 15000;
|
||||
} else plague_Timer -= diff;
|
||||
uiPlagueTimer = 15*IN_MILISECONDS;
|
||||
} else uiPlagueTimer -= diff;
|
||||
|
||||
if (IsHeroic())
|
||||
if (rage_Timer <= diff)
|
||||
if (uiRagueTimer <= diff)
|
||||
{
|
||||
Unit* Swarmer = m_creature->FindNearestCreature(MOB_AHNKAHAR_SWARMER, 35);
|
||||
|
||||
if (Swarmer)
|
||||
if (Creature *pSwarmer = m_creature->FindNearestCreature(MOB_AHNKAHAR_SWARMER, 35))
|
||||
{
|
||||
DoCast(Swarmer, H_SPELL_BROOD_RAGE, true);
|
||||
rage_Timer = 15000;
|
||||
DoCast(pSwarmer, H_SPELL_BROOD_RAGE, true);
|
||||
uiRagueTimer = 15*IN_MILISECONDS;
|
||||
}
|
||||
} else rage_Timer -= diff;
|
||||
} else uiRagueTimer -= diff;
|
||||
|
||||
if (swarmer_spawn_Timer <= diff)
|
||||
if (uiSwarmerSpawnTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_SUMMON_SWARMERS, true);
|
||||
DoCast(m_creature, SPELL_SUMMON_SWARMERS);
|
||||
if (urand(1,3) == 3) // 33% chance of dialog
|
||||
DoScriptText(RAND(SAY_EGG_SAC_1,SAY_EGG_SAC_2), m_creature);
|
||||
|
||||
swarmer_spawn_Timer = 10000;
|
||||
} else swarmer_spawn_Timer -= diff;
|
||||
uiSwarmerSpawnTimer = 10*IN_MILISECONDS;
|
||||
} else uiSwarmerSpawnTimer -= diff;
|
||||
|
||||
if (!GuardSpawned && guard_spawn_Timer <= diff)
|
||||
if (!bGuardSpawned && uiGuardSpawnTimer <= diff)
|
||||
{
|
||||
m_creature->MonsterTextEmote(EMOTE_HATCHES,m_creature->GetGUID(),true);
|
||||
DoCast(m_creature, SPELL_SUMMON_SWARM_GUARD);
|
||||
GuardSpawned = true;
|
||||
} else guard_spawn_Timer -= diff;
|
||||
bGuardSpawned = true;
|
||||
} else uiGuardSpawnTimer -= diff;
|
||||
|
||||
if (enrage_Timer <= diff)
|
||||
if (uiEnragueTimer <= diff)
|
||||
{
|
||||
if (m_creature->HasAura(SPELL_ENRAGE,0))
|
||||
return;
|
||||
@@ -174,8 +165,8 @@ struct boss_elder_nadoxAI : public ScriptedAI
|
||||
if (!m_creature->IsNonMeleeSpellCasted(false))
|
||||
DoCast(m_creature, SPELL_ENRAGE, true);
|
||||
|
||||
enrage_Timer = 5000;
|
||||
} else enrage_Timer -= diff;
|
||||
uiEnragueTimer = 5*IN_MILISECONDS;
|
||||
} else uiEnragueTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -186,7 +177,11 @@ CreatureAI* GetAI_boss_elder_nadox(Creature* pCreature)
|
||||
return new boss_elder_nadoxAI(pCreature);
|
||||
}
|
||||
|
||||
#define SPELL_SPRINT 56354
|
||||
enum AddSpells
|
||||
{
|
||||
SPELL_SPRINT = 56354,
|
||||
SPELL_GUARDIAN_AURA = 56151
|
||||
};
|
||||
|
||||
struct mob_ahnkahar_nerubianAI : public ScriptedAI
|
||||
{
|
||||
@@ -196,13 +191,13 @@ struct mob_ahnkahar_nerubianAI : public ScriptedAI
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
uint32 sprint_Timer;
|
||||
uint32 uiSprintTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (m_creature->GetEntry() == 30176) //magic numbers are bad!
|
||||
if (m_creature->GetEntry() == MOB_AHNKAHAR_GUARDIAN_ENTRY) //magic numbers are bad!
|
||||
DoCast(m_creature, SPELL_GUARDIAN_AURA, true);
|
||||
sprint_Timer = 10000;
|
||||
uiSprintTimer = 10*IN_MILISECONDS;
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
@@ -215,7 +210,10 @@ struct mob_ahnkahar_nerubianAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (m_creature->GetEntry() == 30176) //magic numbers are bad!
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_creature->GetEntry() == MOB_AHNKAHAR_GUARDIAN_ENTRY)
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_GUARDIAN_AURA);
|
||||
|
||||
if (pInstance)
|
||||
@@ -229,16 +227,17 @@ struct mob_ahnkahar_nerubianAI : public ScriptedAI
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (sprint_Timer <= diff)
|
||||
if (uiSprintTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_SPRINT);
|
||||
sprint_Timer = 25000;
|
||||
} else sprint_Timer -= diff;
|
||||
uiSprintTimer = 25*IN_MILISECONDS;
|
||||
} else uiSprintTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
//HACK: No, AI. Replace with proper db content?
|
||||
struct mob_nadox_eggsAI : public Scripted_NoMovementAI
|
||||
{
|
||||
mob_nadox_eggsAI(Creature* c) : Scripted_NoMovementAI(c)
|
||||
|
||||
@@ -33,7 +33,13 @@ enum Spells
|
||||
SPELL_SHADOW_BOLT_VOLLEY = 57942,
|
||||
H_SPELL_SHADOW_BOLT_VOLLEY = 59975,
|
||||
SPELL_SHIVER = 57949,
|
||||
H_SPELL_SHIVER = 59978
|
||||
H_SPELL_SHIVER = 59978,
|
||||
SPELL_CLONE_PLAYER = 57507, //casted on player during insanity
|
||||
SPELL_INSANITY_PHASING_1 = 57508,
|
||||
SPELL_INSANITY_PHASING_2 = 57509,
|
||||
SPELL_INSANITY_PHASING_3 = 57519,
|
||||
SPELL_INSANITY_PHASING_4 = 57511,
|
||||
SPELL_INSANITY_PHASING_5 = 57512
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
@@ -126,7 +132,7 @@ struct boss_volazjAI : public ScriptedAI
|
||||
// Fixme: allow mirror image query to send other guid to get rid of minion status
|
||||
summon->SetUInt64Value(UNIT_FIELD_CREATEDBY, plr->GetGUID());
|
||||
// clone
|
||||
plr->CastSpell(summon, 57507, true);
|
||||
plr->CastSpell(summon, SPELL_CLONE_PLAYER, true);
|
||||
// set phase
|
||||
summon->SetPhaseMask((1<<(4+insanityHandled)),true);
|
||||
}
|
||||
@@ -138,9 +144,9 @@ struct boss_volazjAI : public ScriptedAI
|
||||
void Reset()
|
||||
{
|
||||
uiEncounterTimer = 0;
|
||||
uiMindFlayTimer = 8000;
|
||||
uiShadowBoltVolleyTimer = 5000;
|
||||
uiShiverTimer = 15000;
|
||||
uiMindFlayTimer = 8*IN_MILISECONDS;
|
||||
uiShadowBoltVolleyTimer = 5*IN_MILISECONDS;
|
||||
uiShiverTimer = 15*IN_MILISECONDS;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HERALD_VOLAZJ, NOT_STARTED);
|
||||
@@ -174,19 +180,19 @@ struct boss_volazjAI : public ScriptedAI
|
||||
switch (phase)
|
||||
{
|
||||
case 16:
|
||||
spell = 57508;
|
||||
spell = SPELL_INSANITY_PHASING_1;
|
||||
break;
|
||||
case 32:
|
||||
spell = 57509;
|
||||
spell = SPELL_INSANITY_PHASING_2;
|
||||
break;
|
||||
case 64:
|
||||
spell = 57510;
|
||||
spell = SPELL_INSANITY_PHASING_3;
|
||||
break;
|
||||
case 128:
|
||||
spell = 57511;
|
||||
spell = SPELL_INSANITY_PHASING_4;
|
||||
break;
|
||||
case 256:
|
||||
spell = 57512;
|
||||
spell = SPELL_INSANITY_PHASING_5;
|
||||
break;
|
||||
}
|
||||
return spell;
|
||||
@@ -256,20 +262,20 @@ struct boss_volazjAI : public ScriptedAI
|
||||
if (uiMindFlayTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), DUNGEON_MODE(SPELL_MIND_FLAY, H_SPELL_MIND_FLAY));
|
||||
uiMindFlayTimer = 20000;
|
||||
uiMindFlayTimer = 20*IN_MILISECONDS;
|
||||
} else uiMindFlayTimer -= diff;
|
||||
|
||||
if (uiShadowBoltVolleyTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), DUNGEON_MODE(SPELL_SHADOW_BOLT_VOLLEY, H_SPELL_SHADOW_BOLT_VOLLEY));
|
||||
uiShadowBoltVolleyTimer = 5000;
|
||||
uiShadowBoltVolleyTimer = 5*IN_MILISECONDS;
|
||||
} else uiShadowBoltVolleyTimer -= diff;
|
||||
|
||||
if (uiShiverTimer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_SHIVER, H_SPELL_SHIVER));
|
||||
uiShiverTimer = 15000;
|
||||
uiShiverTimer = 15*IN_MILISECONDS;
|
||||
} else uiShiverTimer -= diff;
|
||||
|
||||
uiEncounterTimer += diff;
|
||||
@@ -283,7 +289,7 @@ struct boss_volazjAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_HERALD_VOLAZJ, DONE);
|
||||
if (IsHeroic() && uiEncounterTimer < 120000)
|
||||
if (IsHeroic() && uiEncounterTimer < 120*IN_MILISECONDS)
|
||||
pInstance->DoCompleteAchievement(ACHIEV_QUICK_DEMISE);
|
||||
}
|
||||
|
||||
@@ -292,9 +298,6 @@ struct boss_volazjAI : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
if (victim == m_creature)
|
||||
return;
|
||||
|
||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), m_creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -50,12 +50,17 @@ enum Spells
|
||||
SPELL_LIGHTNING_BOLT = 56891, // 40Y
|
||||
SPELL_LIGHTNING_BOLT_H = 60032, // 40Y
|
||||
SPELL_THUNDERSHOCK = 56926, // 30Y
|
||||
SPELL_THUNDERSHOCK_H = 60029 // 30Y
|
||||
SPELL_THUNDERSHOCK_H = 60029 // 30Y
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
{
|
||||
NPC_JEDOGA_CONTROLLER = 30181
|
||||
};
|
||||
|
||||
const Position JedogaPosition[2] =
|
||||
{
|
||||
{372.330994f, -705.278015f, -0.624178f, 5.427970f},
|
||||
{372.330994f, -705.278015f, -0.624178f, 5.427970f},
|
||||
{372.330994f, -705.278015f, -16.179716f, 5.427970f}
|
||||
};
|
||||
|
||||
@@ -64,8 +69,8 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
boss_jedoga_shadowseekerAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
FirstTime = true;
|
||||
predone = false;
|
||||
bFirstTime = true;
|
||||
bPreDone = false;
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
@@ -75,21 +80,21 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
uint32 uiBoltTimer;
|
||||
uint32 uiThunderTimer;
|
||||
|
||||
bool predone;
|
||||
bool bPreDone;
|
||||
bool bOpFerok;
|
||||
bool bOnGround;
|
||||
bool bOpFerokFail;
|
||||
bool bCanDown;
|
||||
|
||||
bool FirstTime;
|
||||
bool bFirstTime;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiOpFerTimer = urand(15000,20000);
|
||||
uiOpFerTimer = urand(15*IN_MILISECONDS,20*IN_MILISECONDS);
|
||||
|
||||
uiCycloneTimer = 3000;
|
||||
uiBoltTimer = 7000;
|
||||
uiThunderTimer = 12000;
|
||||
uiCycloneTimer = 3*IN_MILISECONDS;
|
||||
uiBoltTimer = 7*IN_MILISECONDS;
|
||||
uiThunderTimer = 12*IN_MILISECONDS;
|
||||
|
||||
bOpFerok = false;
|
||||
bOpFerokFail = false;
|
||||
@@ -98,7 +103,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (!FirstTime)
|
||||
if (!bFirstTime)
|
||||
pInstance->SetData(DATA_JEDOGA_SHADOWSEEKER_EVENT, FAIL);
|
||||
|
||||
pInstance->SetData64(DATA_PL_JEDOGA_TARGET, 0);
|
||||
@@ -107,12 +112,12 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
}
|
||||
MoveUp();
|
||||
|
||||
FirstTime = false;
|
||||
bFirstTime = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (!pInstance || (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == 30181))
|
||||
if (!pInstance || (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_JEDOGA_CONTROLLER))
|
||||
return;
|
||||
|
||||
DoScriptText(TEXT_AGGRO, m_creature);
|
||||
@@ -122,7 +127,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
{
|
||||
if (!who || (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == 30181))
|
||||
if (!who || (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_JEDOGA_CONTROLLER))
|
||||
return;
|
||||
|
||||
ScriptedAI::AttackStart(who);
|
||||
@@ -145,13 +150,13 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!pInstance || !who || (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == 30181))
|
||||
if (!pInstance || !who || (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_JEDOGA_CONTROLLER))
|
||||
return;
|
||||
|
||||
if (!predone && who->GetTypeId() == TYPEID_PLAYER && m_creature->GetDistance(who) < 100.0f)
|
||||
if (!bPreDone && who->GetTypeId() == TYPEID_PLAYER && m_creature->GetDistance(who) < 100.0f)
|
||||
{
|
||||
DoScriptText(RAND(TEXT_PREACHING_1, TEXT_PREACHING_2, TEXT_PREACHING_3, TEXT_PREACHING_4, TEXT_PREACHING_5), m_creature);
|
||||
predone = true;
|
||||
bPreDone = true;
|
||||
}
|
||||
|
||||
if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) != IN_PROGRESS || !bOnGround)
|
||||
@@ -243,7 +248,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) == IN_PROGRESS) OpferRufen();
|
||||
|
||||
bOnGround = false;
|
||||
uiOpFerTimer = urand(15000,30000);
|
||||
uiOpFerTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||
}
|
||||
|
||||
void OpferRufen()
|
||||
@@ -299,7 +304,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
if (uiCycloneTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature, DUNGEON_MODE(SPELL_CYCLONE_STRIKE, SPELL_CYCLONE_STRIKE_H), false);
|
||||
uiCycloneTimer = urand(15000,30000);
|
||||
uiCycloneTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||
} else uiCycloneTimer -= diff;
|
||||
|
||||
if (uiBoltTimer <= diff)
|
||||
@@ -307,7 +312,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
m_creature->CastSpell(pTarget, DUNGEON_MODE(SPELL_LIGHTNING_BOLT, SPELL_LIGHTNING_BOLT_H), false);
|
||||
|
||||
uiBoltTimer = urand(15000,30000);
|
||||
uiBoltTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||
} else uiBoltTimer -= diff;
|
||||
|
||||
if (uiThunderTimer <= diff)
|
||||
@@ -315,7 +320,7 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
m_creature->CastSpell(pTarget, DUNGEON_MODE(SPELL_THUNDERSHOCK, SPELL_THUNDERSHOCK_H), false);
|
||||
|
||||
uiThunderTimer = urand(15000,30000);
|
||||
uiThunderTimer = urand(15*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||
} else uiThunderTimer -= diff;
|
||||
|
||||
if (uiOpFerTimer <= diff)
|
||||
@@ -337,17 +342,17 @@ struct mob_jedoga_initiandAI : public ScriptedAI
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 checktimer;
|
||||
uint32 bCheckTimer;
|
||||
|
||||
bool walking;
|
||||
bool bWalking;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
walking = false;
|
||||
checktimer = 2000;
|
||||
bWalking = false;
|
||||
bCheckTimer = 2*IN_MILISECONDS;
|
||||
|
||||
if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) != IN_PROGRESS)
|
||||
{
|
||||
@@ -369,7 +374,7 @@ struct mob_jedoga_initiandAI : public ScriptedAI
|
||||
{
|
||||
if (!Killer || !pInstance) return;
|
||||
|
||||
if (walking)
|
||||
if (bWalking)
|
||||
{
|
||||
Creature* boss = m_creature->GetMap()->GetCreature(pInstance->GetData64(DATA_JEDOGA_SHADOWSEEKER));
|
||||
if (boss && !CAST_AI(boss_jedoga_shadowseekerAI, boss->AI())->bOpFerok) CAST_AI(boss_jedoga_shadowseekerAI, boss->AI())->bOpFerokFail = true;
|
||||
@@ -377,7 +382,7 @@ struct mob_jedoga_initiandAI : public ScriptedAI
|
||||
if (Killer->GetTypeId() == TYPEID_PLAYER) pInstance->SetData(DATA_INITIAND_KILLED, 1);
|
||||
pInstance->SetData64(DATA_ADD_JEDOGA_OPFER, 0);
|
||||
|
||||
walking = false;
|
||||
bWalking = false;
|
||||
}
|
||||
if (Killer->GetTypeId() == TYPEID_PLAYER) pInstance->SetData64(DATA_PL_JEDOGA_TARGET, Killer->GetGUID());
|
||||
}
|
||||
@@ -423,9 +428,9 @@ struct mob_jedoga_initiandAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (pInstance && checktimer <= diff)
|
||||
if (pInstance && bCheckTimer <= diff)
|
||||
{
|
||||
if (m_creature->GetGUID() == pInstance->GetData64(DATA_ADD_JEDOGA_OPFER) && !walking)
|
||||
if (m_creature->GetGUID() == pInstance->GetData64(DATA_ADD_JEDOGA_OPFER) && !bWalking)
|
||||
{
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL);
|
||||
m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, false);
|
||||
@@ -443,9 +448,9 @@ struct mob_jedoga_initiandAI : public ScriptedAI
|
||||
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
m_creature->GetMotionMaster()->MovePoint(1, JedogaPosition[1]);
|
||||
walking = true;
|
||||
bWalking = true;
|
||||
}
|
||||
if (!walking)
|
||||
if (!bWalking)
|
||||
{
|
||||
if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) != IN_PROGRESS && m_creature->HasAura(SPELL_SPHERE_VISUAL))
|
||||
{
|
||||
@@ -462,8 +467,8 @@ struct mob_jedoga_initiandAI : public ScriptedAI
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
}
|
||||
checktimer = 2000;
|
||||
} else checktimer -= diff;
|
||||
bCheckTimer = 2*IN_MILISECONDS;
|
||||
} else bCheckTimer -= diff;
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
@@ -487,20 +492,20 @@ struct npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI
|
||||
npc_jedogas_aufseher_triggerAI(Creature* c) : Scripted_NoMovementAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
c->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
|
||||
c->setFaction(35);
|
||||
removed = false;
|
||||
removed2 = false;
|
||||
casted = false;
|
||||
casted2 = false;
|
||||
// c->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
|
||||
// c->setFaction(35);
|
||||
bRemoved = false;
|
||||
bRemoved2 = false;
|
||||
bCasted = false;
|
||||
bCasted2 = false;
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
bool removed;
|
||||
bool removed2;
|
||||
bool casted;
|
||||
bool casted2;
|
||||
bool bRemoved;
|
||||
bool bRemoved2;
|
||||
bool bCasted;
|
||||
bool bCasted2;
|
||||
|
||||
void Reset() {}
|
||||
void EnterCombat(Unit* who) {}
|
||||
@@ -512,36 +517,36 @@ struct npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
if (!removed && m_creature->GetPositionX() > 440.0f)
|
||||
if (!bRemoved && m_creature->GetPositionX() > 440.0f)
|
||||
{
|
||||
if (pInstance->GetData(DATA_PRINCE_TALDARAM_EVENT) == DONE)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
removed = true;
|
||||
bRemoved = true;
|
||||
return;
|
||||
}
|
||||
if (!casted)
|
||||
if (!bCasted)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BEAM_VISUAL_JEDOGAS_AUFSEHER_1, false);
|
||||
casted = true;
|
||||
bCasted = true;
|
||||
}
|
||||
}
|
||||
if (!removed2 && m_creature->GetPositionX() < 440.0f)
|
||||
if (!bRemoved2 && m_creature->GetPositionX() < 440.0f)
|
||||
{
|
||||
if (!casted2 && pInstance->GetData(DATA_JEDOGA_TRIGGER_SWITCH))
|
||||
if (!bCasted2 && pInstance->GetData(DATA_JEDOGA_TRIGGER_SWITCH))
|
||||
{
|
||||
DoCast(m_creature, SPELL_BEAM_VISUAL_JEDOGAS_AUFSEHER_2, false);
|
||||
casted2 = true;
|
||||
bCasted2 = true;
|
||||
}
|
||||
if (casted2 && !pInstance->GetData(DATA_JEDOGA_TRIGGER_SWITCH))
|
||||
if (bCasted2 && !pInstance->GetData(DATA_JEDOGA_TRIGGER_SWITCH))
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
casted2 = false;
|
||||
bCasted2 = false;
|
||||
}
|
||||
if (!removed2 && pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) == DONE)
|
||||
if (!bRemoved2 && pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) == DONE)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
removed2 = true;
|
||||
bRemoved2 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* 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
|
||||
@@ -16,59 +16,51 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_prince_taldaram
|
||||
SDAuthor: Tartalo & tlexii
|
||||
SD%Complete: 0
|
||||
SDComment:
|
||||
SDCategory: Ahn'kahet
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptedPch.h"
|
||||
#include "ahnkahet.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_BLOODTHIRST = 55968, //Trigger Spell + add aura
|
||||
SPELL_CONJURE_FLAME_SPHERE = 55931,
|
||||
SPELL_FLAME_SPHERE_SUMMON_1 = 55895,// 1x 30106
|
||||
H_SPELL_FLAME_SPHERE_SUMMON_1 = 59511,// 1x 31686
|
||||
H_SPELL_FLAME_SPHERE_SUMMON_2 = 59512,// 1x 31687
|
||||
SPELL_FLAME_SPHERE_SPAWN_EFFECT = 55891,
|
||||
SPELL_FLAME_SPHERE_VISUAL = 55928,
|
||||
SPELL_FLAME_SPHERE_PERIODIC = 55926,
|
||||
H_SPELL_FLAME_SPHERE_PERIODIC = 59508,
|
||||
SPELL_FLAME_SPHERE_DEATH_EFFECT = 55947,
|
||||
SPELL_BEAM_VISUAL = 60342,
|
||||
SPELL_EMBRACE_OF_THE_VAMPYR = 55959,
|
||||
H_SPELL_EMBRACE_OF_THE_VAMPYR = 59513,
|
||||
SPELL_VANISH = 55964,
|
||||
CREATURE_FLAME_SPHERE = 30106,
|
||||
H_CREATURE_FLAME_SPHERE_1 = 31686,
|
||||
H_CREATURE_FLAME_SPHERE_2 = 31687
|
||||
SPELL_BLOODTHIRST = 55968, //Trigger Spell + add aura
|
||||
SPELL_CONJURE_FLAME_SPHERE = 55931,
|
||||
SPELL_FLAME_SPHERE_SUMMON_1 = 55895,// 1x 30106
|
||||
H_SPELL_FLAME_SPHERE_SUMMON_1 = 59511,// 1x 31686
|
||||
H_SPELL_FLAME_SPHERE_SUMMON_2 = 59512,// 1x 31687
|
||||
SPELL_FLAME_SPHERE_SPAWN_EFFECT = 55891,
|
||||
SPELL_FLAME_SPHERE_VISUAL = 55928,
|
||||
SPELL_FLAME_SPHERE_PERIODIC = 55926,
|
||||
H_SPELL_FLAME_SPHERE_PERIODIC = 59508,
|
||||
SPELL_FLAME_SPHERE_DEATH_EFFECT = 55947,
|
||||
SPELL_BEAM_VISUAL = 60342,
|
||||
SPELL_EMBRACE_OF_THE_VAMPYR = 55959,
|
||||
H_SPELL_EMBRACE_OF_THE_VAMPYR = 59513,
|
||||
SPELL_VANISH = 55964,
|
||||
CREATURE_FLAME_SPHERE = 30106,
|
||||
H_CREATURE_FLAME_SPHERE_1 = 31686,
|
||||
H_CREATURE_FLAME_SPHERE_2 = 31687
|
||||
};
|
||||
enum Misc
|
||||
{
|
||||
DATA_EMBRACE_DMG = 20000,
|
||||
H_DATA_EMBRACE_DMG = 40000,
|
||||
DATA_SPHERE_DISTANCE = 15
|
||||
DATA_EMBRACE_DMG = 20000,
|
||||
H_DATA_EMBRACE_DMG = 40000,
|
||||
DATA_SPHERE_DISTANCE = 15
|
||||
};
|
||||
#define DATA_SPHERE_ANGLE_OFFSET 0.7
|
||||
#define DATA_GROUND_POSITION_Z 11.4
|
||||
enum Achievements
|
||||
{
|
||||
ACHIEVEMENT_THE_PARTY_IS_OVER = 1861
|
||||
ACHIEV_THE_PARTY_IS_OVER = 1861
|
||||
};
|
||||
enum Yells
|
||||
{
|
||||
SAY_AGGRO = -1619021,
|
||||
SAY_SLAY_1 = -1619022,
|
||||
SAY_SLAY_2 = -1619023,
|
||||
SAY_DEATH = -1619024,
|
||||
SAY_FEED_1 = -1619025,
|
||||
SAY_FEED_2 = -1619026,
|
||||
SAY_VANISH_1 = -1619027,
|
||||
SAY_VANISH_2 = -1619028
|
||||
SAY_AGGRO = -1619021,
|
||||
SAY_SLAY_1 = -1619022,
|
||||
SAY_SLAY_2 = -1619023,
|
||||
SAY_DEATH = -1619024,
|
||||
SAY_FEED_1 = -1619025,
|
||||
SAY_FEED_2 = -1619026,
|
||||
SAY_VANISH_1 = -1619027,
|
||||
SAY_VANISH_2 = -1619028
|
||||
};
|
||||
enum CombatPhase
|
||||
{
|
||||
@@ -78,6 +70,11 @@ enum CombatPhase
|
||||
VANISHED,
|
||||
FEEDING
|
||||
};
|
||||
enum GameObjects
|
||||
{
|
||||
GO_SPHERE1 = 193093,
|
||||
GO_SPHERE2 = 193094
|
||||
};
|
||||
|
||||
struct boss_taldaramAI : public ScriptedAI
|
||||
{
|
||||
@@ -104,10 +101,10 @@ struct boss_taldaramAI : public ScriptedAI
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiBloodthirstTimer = 10000;
|
||||
uiVanishTimer = (25 + rand()%10)*1000;
|
||||
uiEmbraceTimer = 20000;
|
||||
uiFlamesphereTimer = 5000;
|
||||
uiBloodthirstTimer = 10*IN_MILISECONDS;
|
||||
uiVanishTimer = urand(25*IN_MILISECONDS,35*IN_MILISECONDS);
|
||||
uiEmbraceTimer = 20*IN_MILISECONDS;
|
||||
uiFlamesphereTimer = 5*IN_MILISECONDS;
|
||||
uiEmbraceTakenDamage = 0;
|
||||
Phase = NORMAL;
|
||||
uiPhaseTimer = 0;
|
||||
@@ -136,7 +133,7 @@ struct boss_taldaramAI : public ScriptedAI
|
||||
Creature* pSpheres[3];
|
||||
|
||||
//DoCast(m_creature, SPELL_FLAME_SPHERE_SUMMON_1);
|
||||
pSpheres[0] = DoSpawnCreature(CREATURE_FLAME_SPHERE, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
|
||||
pSpheres[0] = DoSpawnCreature(CREATURE_FLAME_SPHERE, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILISECONDS);
|
||||
Unit *pSphereTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (pSphereTarget && pSpheres[0])
|
||||
{
|
||||
@@ -149,9 +146,9 @@ struct boss_taldaramAI : public ScriptedAI
|
||||
if (IsHeroic())
|
||||
{
|
||||
//DoCast(m_creature, H_SPELL_FLAME_SPHERE_SUMMON_1);
|
||||
pSpheres[1] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_1, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
|
||||
pSpheres[1] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_1, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILISECONDS);
|
||||
//DoCast(m_creature, H_SPELL_FLAME_SPHERE_SUMMON_2);
|
||||
pSpheres[2] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_2, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000);
|
||||
pSpheres[2] = DoSpawnCreature(H_CREATURE_FLAME_SPHERE_2, 0, 0, 5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10*IN_MILISECONDS);
|
||||
if (pSphereTarget && pSpheres[1] && pSpheres[2])
|
||||
{
|
||||
float angle,x,y;
|
||||
@@ -187,7 +184,7 @@ struct boss_taldaramAI : public ScriptedAI
|
||||
m_creature->SetSpeed(MOVE_WALK, 1.0f, true);
|
||||
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
|
||||
Phase = FEEDING;
|
||||
uiPhaseTimer = 20000;
|
||||
uiPhaseTimer = 20*IN_MILISECONDS;
|
||||
break;
|
||||
case FEEDING:
|
||||
Phase = NORMAL;
|
||||
@@ -198,15 +195,15 @@ struct boss_taldaramAI : public ScriptedAI
|
||||
if (uiBloodthirstTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_BLOODTHIRST);
|
||||
uiBloodthirstTimer = 10000;
|
||||
uiBloodthirstTimer = 10*IN_MILISECONDS;
|
||||
} else uiBloodthirstTimer -= diff;
|
||||
|
||||
if (uiFlamesphereTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_CONJURE_FLAME_SPHERE);
|
||||
Phase = CASTING_FLAME_SPHERES;
|
||||
uiPhaseTimer = 3000 + diff;
|
||||
uiFlamesphereTimer = 15000;
|
||||
uiPhaseTimer = 3*IN_MILISECONDS + diff;
|
||||
uiFlamesphereTimer = 15*IN_MILISECONDS;
|
||||
} else uiFlamesphereTimer -= diff;
|
||||
|
||||
if (uiVanishTimer <= diff)
|
||||
@@ -234,7 +231,7 @@ struct boss_taldaramAI : public ScriptedAI
|
||||
uiEmbraceTarget = pEmbraceTarget->GetGUID();
|
||||
|
||||
}
|
||||
uiVanishTimer = urand(25000,35000);
|
||||
uiVanishTimer = urand(25*IN_MILISECONDS,35*IN_MILISECONDS);
|
||||
} else uiVanishTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -268,15 +265,11 @@ struct boss_taldaramAI : public ScriptedAI
|
||||
{
|
||||
pInstance->SetData(DATA_PRINCE_TALDARAM_EVENT, DONE);
|
||||
|
||||
//The Party's Over achievement:
|
||||
AchievementEntry const *AchievThePartyIsOver = GetAchievementStore()->LookupEntry(ACHIEVEMENT_THE_PARTY_IS_OVER);
|
||||
Map* pMap = m_creature->GetMap();
|
||||
if (pMap && pMap->IsDungeon() && IsHeroic() && AchievThePartyIsOver)
|
||||
if (IsHeroic())
|
||||
{
|
||||
Map::PlayerList const &players = pMap->GetPlayers();
|
||||
Map::PlayerList const &players = pInstance->instance->GetPlayers();
|
||||
if (players.getSize() < 5)
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
itr->getSource()->CompletedAchievement(AchievThePartyIsOver);
|
||||
pInstance->DoCompleteAchievement(ACHIEV_THE_PARTY_IS_OVER);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -358,7 +351,7 @@ struct mob_taldaram_flamesphereAI : public ScriptedAI
|
||||
DoCast(m_creature, SPELL_FLAME_SPHERE_VISUAL);
|
||||
DoCast(m_creature, SPELL_FLAME_SPHERE_SPAWN_EFFECT);
|
||||
DoCast(m_creature, DUNGEON_MODE(SPELL_FLAME_SPHERE_PERIODIC, H_SPELL_FLAME_SPHERE_PERIODIC));
|
||||
uiDespawnTimer = 10000;
|
||||
uiDespawnTimer = 10*IN_MILISECONDS;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who) {}
|
||||
@@ -401,8 +394,8 @@ bool GOHello_prince_taldaram_sphere(Player *pPlayer, GameObject *pGO)
|
||||
|
||||
switch(pGO->GetEntry())
|
||||
{
|
||||
case 193093: pInstance->SetData(DATA_SPHERE1_EVENT,IN_PROGRESS); break;
|
||||
case 193094: pInstance->SetData(DATA_SPHERE2_EVENT,IN_PROGRESS); break;
|
||||
case GO_SPHERE1: pInstance->SetData(DATA_SPHERE1_EVENT,IN_PROGRESS); break;
|
||||
case GO_SPHERE2: pInstance->SetData(DATA_SPHERE2_EVENT,IN_PROGRESS); break;
|
||||
}
|
||||
|
||||
CAST_AI(boss_taldaramAI, pPrinceTaldaram->AI())->CheckSpheres();
|
||||
|
||||
Reference in New Issue
Block a user