* Rename InstanceData to InstanceScript
* Rename *mgr to their new names in scripts project * Mass convert all the scripts (NEEDS THOROUGH TESTING, because it was done automatically) Please, report bugs on issue tracker. --HG-- branch : trunk rename : src/server/game/Instances/InstanceData.cpp => src/server/game/Instances/InstanceScript.cpp rename : src/server/game/Instances/InstanceData.h => src/server/game/Instances/InstanceScript.h
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -29,65 +29,68 @@ enum Spells
|
||||
{
|
||||
SPELL_FIREBLAST = 15573
|
||||
};
|
||||
|
||||
struct boss_ambassador_flamelashAI : public ScriptedAI
|
||||
␍class boss_ambassador_flamelash : public CreatureScript
|
||||
{
|
||||
boss_ambassador_flamelashAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
boss_ambassador_flamelash() : CreatureScript("boss_ambassador_flamelash") { }
|
||||
|
||||
uint32 FireBlast_Timer;
|
||||
uint32 Spirit_Timer;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
FireBlast_Timer = 2000;
|
||||
Spirit_Timer = 24000;
|
||||
return new boss_ambassador_flamelashAI (pCreature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) {}
|
||||
|
||||
void SummonSpirits(Unit* victim)
|
||||
struct boss_ambassador_flamelashAI : public ScriptedAI
|
||||
{
|
||||
if (Creature *Spirit = DoSpawnCreature(9178, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
Spirit->AI()->AttackStart(victim);
|
||||
}
|
||||
boss_ambassador_flamelashAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
uint32 FireBlast_Timer;
|
||||
uint32 Spirit_Timer;
|
||||
|
||||
//FireBlast_Timer
|
||||
if (FireBlast_Timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FIREBLAST);
|
||||
FireBlast_Timer = 7000;
|
||||
} else FireBlast_Timer -= diff;
|
||||
FireBlast_Timer = 2000;
|
||||
Spirit_Timer = 24000;
|
||||
}
|
||||
|
||||
//Spirit_Timer
|
||||
if (Spirit_Timer <= diff)
|
||||
void EnterCombat(Unit * /*who*/) {}
|
||||
|
||||
void SummonSpirits(Unit* victim)
|
||||
{
|
||||
SummonSpirits(me->getVictim());
|
||||
SummonSpirits(me->getVictim());
|
||||
SummonSpirits(me->getVictim());
|
||||
SummonSpirits(me->getVictim());
|
||||
if (Creature *Spirit = DoSpawnCreature(9178, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
Spirit->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
Spirit_Timer = 30000;
|
||||
} else Spirit_Timer -= diff;
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//FireBlast_Timer
|
||||
if (FireBlast_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FIREBLAST);
|
||||
FireBlast_Timer = 7000;
|
||||
} else FireBlast_Timer -= diff;
|
||||
|
||||
//Spirit_Timer
|
||||
if (Spirit_Timer <= diff)
|
||||
{
|
||||
SummonSpirits(me->getVictim());
|
||||
SummonSpirits(me->getVictim());
|
||||
SummonSpirits(me->getVictim());
|
||||
SummonSpirits(me->getVictim());
|
||||
|
||||
Spirit_Timer = 30000;
|
||||
} else Spirit_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_ambassador_flamelash(Creature* pCreature)
|
||||
{
|
||||
return new boss_ambassador_flamelashAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_ambassador_flamelash()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_ambassador_flamelash";
|
||||
newscript->GetAI = &GetAI_boss_ambassador_flamelash;
|
||||
newscript->RegisterSelf();
|
||||
new boss_ambassador_flamelash();
|
||||
}
|
||||
|
||||
@@ -33,86 +33,89 @@ enum Spells
|
||||
SPELL_DEMONARMOR = 11735,
|
||||
SPELL_ENVELOPINGWEB = 15471
|
||||
};
|
||||
|
||||
struct boss_anubshiahAI : public ScriptedAI
|
||||
␍class boss_anubshiah : public CreatureScript
|
||||
{
|
||||
boss_anubshiahAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
boss_anubshiah() : CreatureScript("boss_anubshiah") { }
|
||||
|
||||
uint32 ShadowBolt_Timer;
|
||||
uint32 CurseOfTongues_Timer;
|
||||
uint32 CurseOfWeakness_Timer;
|
||||
uint32 DemonArmor_Timer;
|
||||
uint32 EnvelopingWeb_Timer;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
ShadowBolt_Timer = 7000;
|
||||
CurseOfTongues_Timer = 24000;
|
||||
CurseOfWeakness_Timer = 12000;
|
||||
DemonArmor_Timer = 3000;
|
||||
EnvelopingWeb_Timer = 16000;
|
||||
return new boss_anubshiahAI (pCreature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
struct boss_anubshiahAI : public ScriptedAI
|
||||
{
|
||||
}
|
||||
boss_anubshiahAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
uint32 ShadowBolt_Timer;
|
||||
uint32 CurseOfTongues_Timer;
|
||||
uint32 CurseOfWeakness_Timer;
|
||||
uint32 DemonArmor_Timer;
|
||||
uint32 EnvelopingWeb_Timer;
|
||||
|
||||
//ShadowBolt_Timer
|
||||
if (ShadowBolt_Timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWBOLT);
|
||||
ShadowBolt_Timer = 7000;
|
||||
} else ShadowBolt_Timer -= diff;
|
||||
CurseOfTongues_Timer = 24000;
|
||||
CurseOfWeakness_Timer = 12000;
|
||||
DemonArmor_Timer = 3000;
|
||||
EnvelopingWeb_Timer = 16000;
|
||||
}
|
||||
|
||||
//CurseOfTongues_Timer
|
||||
if (CurseOfTongues_Timer <= diff)
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_CURSEOFTONGUES);
|
||||
CurseOfTongues_Timer = 18000;
|
||||
} else CurseOfTongues_Timer -= diff;
|
||||
}
|
||||
|
||||
//CurseOfWeakness_Timer
|
||||
if (CurseOfWeakness_Timer <= diff)
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CURSEOFWEAKNESS);
|
||||
CurseOfWeakness_Timer = 45000;
|
||||
} else CurseOfWeakness_Timer -= diff;
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//DemonArmor_Timer
|
||||
if (DemonArmor_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_DEMONARMOR);
|
||||
DemonArmor_Timer = 300000;
|
||||
} else DemonArmor_Timer -= diff;
|
||||
//ShadowBolt_Timer
|
||||
if (ShadowBolt_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWBOLT);
|
||||
ShadowBolt_Timer = 7000;
|
||||
} else ShadowBolt_Timer -= diff;
|
||||
|
||||
//EnvelopingWeb_Timer
|
||||
if (EnvelopingWeb_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_ENVELOPINGWEB);
|
||||
EnvelopingWeb_Timer = 12000;
|
||||
} else EnvelopingWeb_Timer -= diff;
|
||||
//CurseOfTongues_Timer
|
||||
if (CurseOfTongues_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_CURSEOFTONGUES);
|
||||
CurseOfTongues_Timer = 18000;
|
||||
} else CurseOfTongues_Timer -= diff;
|
||||
|
||||
//CurseOfWeakness_Timer
|
||||
if (CurseOfWeakness_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CURSEOFWEAKNESS);
|
||||
CurseOfWeakness_Timer = 45000;
|
||||
} else CurseOfWeakness_Timer -= diff;
|
||||
|
||||
//DemonArmor_Timer
|
||||
if (DemonArmor_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_DEMONARMOR);
|
||||
DemonArmor_Timer = 300000;
|
||||
} else DemonArmor_Timer -= diff;
|
||||
|
||||
//EnvelopingWeb_Timer
|
||||
if (EnvelopingWeb_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_ENVELOPINGWEB);
|
||||
EnvelopingWeb_Timer = 12000;
|
||||
} else EnvelopingWeb_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_anubshiah(Creature* pCreature)
|
||||
{
|
||||
return new boss_anubshiahAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_anubshiah()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_anubshiah";
|
||||
newscript->GetAI = &GetAI_boss_anubshiah;
|
||||
newscript->RegisterSelf();
|
||||
new boss_anubshiah();
|
||||
}
|
||||
|
||||
+60
-57
@@ -36,78 +36,81 @@ enum Spells
|
||||
SPELL_HANDOFTHAURISSAN = 17492,
|
||||
SPELL_AVATAROFFLAME = 15636
|
||||
};
|
||||
|
||||
struct boss_draganthaurissanAI : public ScriptedAI
|
||||
␍class boss_emperor_dagran_thaurissan : public CreatureScript
|
||||
{
|
||||
boss_draganthaurissanAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
boss_emperor_dagran_thaurissan() : CreatureScript("boss_emperor_dagran_thaurissan") { }
|
||||
|
||||
uint32 HandOfThaurissan_Timer;
|
||||
uint32 AvatarOfFlame_Timer;
|
||||
//uint32 Counter;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
HandOfThaurissan_Timer = 4000;
|
||||
AvatarOfFlame_Timer = 25000;
|
||||
//Counter= 0;
|
||||
return new boss_draganthaurissanAI (pCreature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
struct boss_draganthaurissanAI : public ScriptedAI
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
me->CallForHelp(VISIBLE_RANGE);
|
||||
}
|
||||
boss_draganthaurissanAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(SAY_SLAY, me);
|
||||
}
|
||||
uint32 HandOfThaurissan_Timer;
|
||||
uint32 AvatarOfFlame_Timer;
|
||||
//uint32 Counter;
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (HandOfThaurissan_Timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_HANDOFTHAURISSAN);
|
||||
HandOfThaurissan_Timer = 4000;
|
||||
AvatarOfFlame_Timer = 25000;
|
||||
//Counter= 0;
|
||||
}
|
||||
|
||||
//3 Hands of Thaurissan will be casted
|
||||
//if (Counter < 3)
|
||||
//{
|
||||
// HandOfThaurissan_Timer = 1000;
|
||||
// ++Counter;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
HandOfThaurissan_Timer = 5000;
|
||||
//Counter = 0;
|
||||
//}
|
||||
} else HandOfThaurissan_Timer -= diff;
|
||||
|
||||
//AvatarOfFlame_Timer
|
||||
if (AvatarOfFlame_Timer <= diff)
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_AVATAROFFLAME);
|
||||
AvatarOfFlame_Timer = 18000;
|
||||
} else AvatarOfFlame_Timer -= diff;
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
me->CallForHelp(VISIBLE_RANGE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
DoScriptText(SAY_SLAY, me);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (HandOfThaurissan_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(pTarget, SPELL_HANDOFTHAURISSAN);
|
||||
|
||||
//3 Hands of Thaurissan will be casted
|
||||
//if (Counter < 3)
|
||||
//{
|
||||
// HandOfThaurissan_Timer = 1000;
|
||||
// ++Counter;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
HandOfThaurissan_Timer = 5000;
|
||||
//Counter = 0;
|
||||
//}
|
||||
} else HandOfThaurissan_Timer -= diff;
|
||||
|
||||
//AvatarOfFlame_Timer
|
||||
if (AvatarOfFlame_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_AVATAROFFLAME);
|
||||
AvatarOfFlame_Timer = 18000;
|
||||
} else AvatarOfFlame_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_draganthaurissan(Creature* pCreature)
|
||||
{
|
||||
return new boss_draganthaurissanAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_draganthaurissan()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_emperor_dagran_thaurissan";
|
||||
newscript->GetAI = &GetAI_boss_draganthaurissan;
|
||||
newscript->RegisterSelf();
|
||||
new boss_emperor_dagran_thaurissan();
|
||||
}
|
||||
|
||||
@@ -31,104 +31,107 @@ enum Spells
|
||||
SPELL_HAMSTRING = 9080,
|
||||
SPELL_CLEAVE = 20691
|
||||
};
|
||||
|
||||
struct boss_general_angerforgeAI : public ScriptedAI
|
||||
␍class boss_general_angerforge : public CreatureScript
|
||||
{
|
||||
boss_general_angerforgeAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
boss_general_angerforge() : CreatureScript("boss_general_angerforge") { }
|
||||
|
||||
uint32 MightyBlow_Timer;
|
||||
uint32 HamString_Timer;
|
||||
uint32 Cleave_Timer;
|
||||
uint32 Adds_Timer;
|
||||
bool Medics;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
MightyBlow_Timer = 8000;
|
||||
HamString_Timer = 12000;
|
||||
Cleave_Timer = 16000;
|
||||
Adds_Timer = 0;
|
||||
Medics = false;
|
||||
return new boss_general_angerforgeAI (pCreature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
struct boss_general_angerforgeAI : public ScriptedAI
|
||||
{
|
||||
}
|
||||
boss_general_angerforgeAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
void SummonAdds(Unit* victim)
|
||||
{
|
||||
if (Creature *SummonedAdd = DoSpawnCreature(8901, irand(-14,14), irand(-14,14), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedAdd->AI()->AttackStart(victim);
|
||||
}
|
||||
uint32 MightyBlow_Timer;
|
||||
uint32 HamString_Timer;
|
||||
uint32 Cleave_Timer;
|
||||
uint32 Adds_Timer;
|
||||
bool Medics;
|
||||
|
||||
void SummonMedics(Unit* victim)
|
||||
{
|
||||
if (Creature *SummonedMedic = DoSpawnCreature(8894, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedMedic->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//MightyBlow_Timer
|
||||
if (MightyBlow_Timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MIGHTYBLOW);
|
||||
MightyBlow_Timer = 18000;
|
||||
} else MightyBlow_Timer -= diff;
|
||||
MightyBlow_Timer = 8000;
|
||||
HamString_Timer = 12000;
|
||||
Cleave_Timer = 16000;
|
||||
Adds_Timer = 0;
|
||||
Medics = false;
|
||||
}
|
||||
|
||||
//HamString_Timer
|
||||
if (HamString_Timer <= diff)
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_HAMSTRING);
|
||||
HamString_Timer = 15000;
|
||||
} else HamString_Timer -= diff;
|
||||
}
|
||||
|
||||
//Cleave_Timer
|
||||
if (Cleave_Timer <= diff)
|
||||
void SummonAdds(Unit* victim)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
Cleave_Timer = 9000;
|
||||
} else Cleave_Timer -= diff;
|
||||
if (Creature *SummonedAdd = DoSpawnCreature(8901, irand(-14,14), irand(-14,14), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedAdd->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
//Adds_Timer
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 21)
|
||||
void SummonMedics(Unit* victim)
|
||||
{
|
||||
if (Adds_Timer <= diff)
|
||||
if (Creature *SummonedMedic = DoSpawnCreature(8894, irand(-9,9), irand(-9,9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedMedic->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//MightyBlow_Timer
|
||||
if (MightyBlow_Timer <= diff)
|
||||
{
|
||||
// summon 3 Adds every 25s
|
||||
SummonAdds(me->getVictim());
|
||||
SummonAdds(me->getVictim());
|
||||
SummonAdds(me->getVictim());
|
||||
DoCast(me->getVictim(), SPELL_MIGHTYBLOW);
|
||||
MightyBlow_Timer = 18000;
|
||||
} else MightyBlow_Timer -= diff;
|
||||
|
||||
Adds_Timer = 25000;
|
||||
} else Adds_Timer -= diff;
|
||||
//HamString_Timer
|
||||
if (HamString_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_HAMSTRING);
|
||||
HamString_Timer = 15000;
|
||||
} else HamString_Timer -= diff;
|
||||
|
||||
//Cleave_Timer
|
||||
if (Cleave_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
Cleave_Timer = 9000;
|
||||
} else Cleave_Timer -= diff;
|
||||
|
||||
//Adds_Timer
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 21)
|
||||
{
|
||||
if (Adds_Timer <= diff)
|
||||
{
|
||||
// summon 3 Adds every 25s
|
||||
SummonAdds(me->getVictim());
|
||||
SummonAdds(me->getVictim());
|
||||
SummonAdds(me->getVictim());
|
||||
|
||||
Adds_Timer = 25000;
|
||||
} else Adds_Timer -= diff;
|
||||
}
|
||||
|
||||
//Summon Medics
|
||||
if (!Medics && me->GetHealth()*100 / me->GetMaxHealth() < 21)
|
||||
{
|
||||
SummonMedics(me->getVictim());
|
||||
SummonMedics(me->getVictim());
|
||||
Medics = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
//Summon Medics
|
||||
if (!Medics && me->GetHealth()*100 / me->GetMaxHealth() < 21)
|
||||
{
|
||||
SummonMedics(me->getVictim());
|
||||
SummonMedics(me->getVictim());
|
||||
Medics = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_general_angerforge(Creature* pCreature)
|
||||
{
|
||||
return new boss_general_angerforgeAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_general_angerforge()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_general_angerforge";
|
||||
newscript->GetAI = &GetAI_boss_general_angerforge;
|
||||
newscript->RegisterSelf();
|
||||
new boss_general_angerforge();
|
||||
}
|
||||
|
||||
@@ -30,57 +30,60 @@ enum Spells
|
||||
SPELL_WHIRLWIND = 15589,
|
||||
SPELL_MORTALSTRIKE = 24573
|
||||
};
|
||||
|
||||
struct boss_gorosh_the_dervishAI : public ScriptedAI
|
||||
␍class boss_gorosh_the_dervish : public CreatureScript
|
||||
{
|
||||
boss_gorosh_the_dervishAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
boss_gorosh_the_dervish() : CreatureScript("boss_gorosh_the_dervish") { }
|
||||
|
||||
uint32 WhirlWind_Timer;
|
||||
uint32 MortalStrike_Timer;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
WhirlWind_Timer = 12000;
|
||||
MortalStrike_Timer = 22000;
|
||||
return new boss_gorosh_the_dervishAI (pCreature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
struct boss_gorosh_the_dervishAI : public ScriptedAI
|
||||
{
|
||||
}
|
||||
boss_gorosh_the_dervishAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
uint32 WhirlWind_Timer;
|
||||
uint32 MortalStrike_Timer;
|
||||
|
||||
//WhirlWind_Timer
|
||||
if (WhirlWind_Timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
DoCast(me, SPELL_WHIRLWIND);
|
||||
WhirlWind_Timer = 15000;
|
||||
} else WhirlWind_Timer -= diff;
|
||||
WhirlWind_Timer = 12000;
|
||||
MortalStrike_Timer = 22000;
|
||||
}
|
||||
|
||||
//MortalStrike_Timer
|
||||
if (MortalStrike_Timer <= diff)
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MORTALSTRIKE);
|
||||
MortalStrike_Timer = 15000;
|
||||
} else MortalStrike_Timer -= diff;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//WhirlWind_Timer
|
||||
if (WhirlWind_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_WHIRLWIND);
|
||||
WhirlWind_Timer = 15000;
|
||||
} else WhirlWind_Timer -= diff;
|
||||
|
||||
//MortalStrike_Timer
|
||||
if (MortalStrike_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MORTALSTRIKE);
|
||||
MortalStrike_Timer = 15000;
|
||||
} else MortalStrike_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_gorosh_the_dervish(Creature* pCreature)
|
||||
{
|
||||
return new boss_gorosh_the_dervishAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_gorosh_the_dervish()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_gorosh_the_dervish";
|
||||
newscript->GetAI = &GetAI_boss_gorosh_the_dervish;
|
||||
newscript->RegisterSelf();
|
||||
new boss_gorosh_the_dervish();
|
||||
}
|
||||
|
||||
@@ -35,62 +35,65 @@ enum Spells
|
||||
SPELL_GROUNDTREMOR = 6524,
|
||||
SPELL_FRENZY = 28371
|
||||
};
|
||||
|
||||
struct boss_grizzleAI : public ScriptedAI
|
||||
␍class boss_grizzle : public CreatureScript
|
||||
{
|
||||
boss_grizzleAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
boss_grizzle() : CreatureScript("boss_grizzle") { }
|
||||
|
||||
uint32 GroundTremor_Timer;
|
||||
uint32 Frenzy_Timer;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
GroundTremor_Timer = 12000;
|
||||
Frenzy_Timer =0;
|
||||
return new boss_grizzleAI (pCreature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
struct boss_grizzleAI : public ScriptedAI
|
||||
{
|
||||
}
|
||||
boss_grizzleAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
uint32 GroundTremor_Timer;
|
||||
uint32 Frenzy_Timer;
|
||||
|
||||
//GroundTremor_Timer
|
||||
if (GroundTremor_Timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_GROUNDTREMOR);
|
||||
GroundTremor_Timer = 8000;
|
||||
} else GroundTremor_Timer -= diff;
|
||||
|
||||
//Frenzy_Timer
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 51)
|
||||
{
|
||||
if (Frenzy_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_FRENZY);
|
||||
DoScriptText(EMOTE_GENERIC_FRENZY_KILL, me);
|
||||
|
||||
Frenzy_Timer = 15000;
|
||||
} else Frenzy_Timer -= diff;
|
||||
GroundTremor_Timer = 12000;
|
||||
Frenzy_Timer =0;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//GroundTremor_Timer
|
||||
if (GroundTremor_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_GROUNDTREMOR);
|
||||
GroundTremor_Timer = 8000;
|
||||
} else GroundTremor_Timer -= diff;
|
||||
|
||||
//Frenzy_Timer
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 51)
|
||||
{
|
||||
if (Frenzy_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_FRENZY);
|
||||
DoScriptText(EMOTE_GENERIC_FRENZY_KILL, me);
|
||||
|
||||
Frenzy_Timer = 15000;
|
||||
} else Frenzy_Timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
CreatureAI* GetAI_boss_grizzle(Creature* pCreature)
|
||||
{
|
||||
return new boss_grizzleAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_grizzle()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_grizzle";
|
||||
newscript->GetAI = &GetAI_boss_grizzle;
|
||||
newscript->RegisterSelf();
|
||||
new boss_grizzle();
|
||||
}
|
||||
|
||||
+57
-54
@@ -32,77 +32,80 @@ enum Spells
|
||||
SPELL_PSYCHICSCREAM = 8122,
|
||||
SPELL_SHADOWSHIELD = 22417
|
||||
};
|
||||
|
||||
struct boss_high_interrogator_gerstahnAI : public ScriptedAI
|
||||
␍class boss_high_interrogator_gerstahn : public CreatureScript
|
||||
{
|
||||
boss_high_interrogator_gerstahnAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
boss_high_interrogator_gerstahn() : CreatureScript("boss_high_interrogator_gerstahn") { }
|
||||
|
||||
uint32 ShadowWordPain_Timer;
|
||||
uint32 ManaBurn_Timer;
|
||||
uint32 PsychicScream_Timer;
|
||||
uint32 ShadowShield_Timer;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
ShadowWordPain_Timer = 4000;
|
||||
ManaBurn_Timer = 14000;
|
||||
PsychicScream_Timer = 32000;
|
||||
ShadowShield_Timer = 8000;
|
||||
return new boss_high_interrogator_gerstahnAI (pCreature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
struct boss_high_interrogator_gerstahnAI : public ScriptedAI
|
||||
{
|
||||
}
|
||||
boss_high_interrogator_gerstahnAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
uint32 ShadowWordPain_Timer;
|
||||
uint32 ManaBurn_Timer;
|
||||
uint32 PsychicScream_Timer;
|
||||
uint32 ShadowShield_Timer;
|
||||
|
||||
//ShadowWordPain_Timer
|
||||
if (ShadowWordPain_Timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_SHADOWWORDPAIN);
|
||||
ShadowWordPain_Timer = 7000;
|
||||
} else ShadowWordPain_Timer -= diff;
|
||||
ShadowWordPain_Timer = 4000;
|
||||
ManaBurn_Timer = 14000;
|
||||
PsychicScream_Timer = 32000;
|
||||
ShadowShield_Timer = 8000;
|
||||
}
|
||||
|
||||
//ManaBurn_Timer
|
||||
if (ManaBurn_Timer <= diff)
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_MANABURN);
|
||||
ManaBurn_Timer = 10000;
|
||||
} else ManaBurn_Timer -= diff;
|
||||
}
|
||||
|
||||
//PsychicScream_Timer
|
||||
if (PsychicScream_Timer <= diff)
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_PSYCHICSCREAM);
|
||||
PsychicScream_Timer = 30000;
|
||||
} else PsychicScream_Timer -= diff;
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowShield_Timer
|
||||
if (ShadowShield_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_SHADOWSHIELD);
|
||||
ShadowShield_Timer = 25000;
|
||||
} else ShadowShield_Timer -= diff;
|
||||
//ShadowWordPain_Timer
|
||||
if (ShadowWordPain_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_SHADOWWORDPAIN);
|
||||
ShadowWordPain_Timer = 7000;
|
||||
} else ShadowWordPain_Timer -= diff;
|
||||
|
||||
//ManaBurn_Timer
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_MANABURN);
|
||||
ManaBurn_Timer = 10000;
|
||||
} else ManaBurn_Timer -= diff;
|
||||
|
||||
//PsychicScream_Timer
|
||||
if (PsychicScream_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_PSYCHICSCREAM);
|
||||
PsychicScream_Timer = 30000;
|
||||
} else PsychicScream_Timer -= diff;
|
||||
|
||||
//ShadowShield_Timer
|
||||
if (ShadowShield_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_SHADOWSHIELD);
|
||||
ShadowShield_Timer = 25000;
|
||||
} else ShadowShield_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_high_interrogator_gerstahn(Creature* pCreature)
|
||||
{
|
||||
return new boss_high_interrogator_gerstahnAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_high_interrogator_gerstahn()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_high_interrogator_gerstahn";
|
||||
newscript->GetAI = &GetAI_boss_high_interrogator_gerstahn;
|
||||
newscript->RegisterSelf();
|
||||
new boss_high_interrogator_gerstahn();
|
||||
}
|
||||
|
||||
@@ -35,66 +35,69 @@ enum eEnums
|
||||
{
|
||||
DATA_THRONE_DOOR = 24 // not id or guid of doors but number of enum in blackrock_depths.h
|
||||
};
|
||||
|
||||
struct boss_magmusAI : public ScriptedAI
|
||||
␍class boss_magmus : public CreatureScript
|
||||
{
|
||||
boss_magmusAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
boss_magmus() : CreatureScript("boss_magmus") { }
|
||||
|
||||
uint32 FieryBurst_Timer;
|
||||
uint32 WarStomp_Timer;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
FieryBurst_Timer = 5000;
|
||||
WarStomp_Timer =0;
|
||||
return new boss_magmusAI (pCreature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
struct boss_magmusAI : public ScriptedAI
|
||||
{
|
||||
}
|
||||
boss_magmusAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
uint32 FieryBurst_Timer;
|
||||
uint32 WarStomp_Timer;
|
||||
|
||||
//FieryBurst_Timer
|
||||
if (FieryBurst_Timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FIERYBURST);
|
||||
FieryBurst_Timer = 6000;
|
||||
} else FieryBurst_Timer -= diff;
|
||||
|
||||
//WarStomp_Timer
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 51)
|
||||
{
|
||||
if (WarStomp_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WARSTOMP);
|
||||
WarStomp_Timer = 8000;
|
||||
} else WarStomp_Timer -= diff;
|
||||
FieryBurst_Timer = 5000;
|
||||
WarStomp_Timer =0;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
// When he die open door to last chamber
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
if (ScriptedInstance* pInstance = who->GetInstanceData())
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_THRONE_DOOR), true);
|
||||
}
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//FieryBurst_Timer
|
||||
if (FieryBurst_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FIERYBURST);
|
||||
FieryBurst_Timer = 6000;
|
||||
} else FieryBurst_Timer -= diff;
|
||||
|
||||
//WarStomp_Timer
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 51)
|
||||
{
|
||||
if (WarStomp_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_WARSTOMP);
|
||||
WarStomp_Timer = 8000;
|
||||
} else WarStomp_Timer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
// When he die open door to last chamber
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
if (InstanceScript* pInstance = who->GetInstanceScript())
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_THRONE_DOOR), true);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
CreatureAI* GetAI_boss_magmus(Creature* pCreature)
|
||||
{
|
||||
return new boss_magmusAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_magmus()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_magmus";
|
||||
newscript->GetAI = &GetAI_boss_magmus;
|
||||
newscript->RegisterSelf();
|
||||
new boss_magmus();
|
||||
}
|
||||
|
||||
@@ -34,67 +34,70 @@ enum Spells
|
||||
SPELL_SHADOWWORDPAIN = 10894,
|
||||
SPELL_SMITE = 10934
|
||||
};
|
||||
|
||||
struct boss_moira_bronzebeardAI : public ScriptedAI
|
||||
␍class boss_moira_bronzebeard : public CreatureScript
|
||||
{
|
||||
boss_moira_bronzebeardAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
boss_moira_bronzebeard() : CreatureScript("boss_moira_bronzebeard") { }
|
||||
|
||||
uint32 Heal_Timer;
|
||||
uint32 MindBlast_Timer;
|
||||
uint32 ShadowWordPain_Timer;
|
||||
uint32 Smite_Timer;
|
||||
|
||||
void Reset()
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
Heal_Timer = 12000; //These times are probably wrong
|
||||
MindBlast_Timer = 16000;
|
||||
ShadowWordPain_Timer = 2000;
|
||||
Smite_Timer = 8000;
|
||||
return new boss_moira_bronzebeardAI (pCreature);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
struct boss_moira_bronzebeardAI : public ScriptedAI
|
||||
{
|
||||
}
|
||||
boss_moira_bronzebeardAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
uint32 Heal_Timer;
|
||||
uint32 MindBlast_Timer;
|
||||
uint32 ShadowWordPain_Timer;
|
||||
uint32 Smite_Timer;
|
||||
|
||||
//MindBlast_Timer
|
||||
if (MindBlast_Timer <= diff)
|
||||
void Reset()
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MINDBLAST);
|
||||
MindBlast_Timer = 14000;
|
||||
} else MindBlast_Timer -= diff;
|
||||
Heal_Timer = 12000; //These times are probably wrong
|
||||
MindBlast_Timer = 16000;
|
||||
ShadowWordPain_Timer = 2000;
|
||||
Smite_Timer = 8000;
|
||||
}
|
||||
|
||||
//ShadowWordPain_Timer
|
||||
if (ShadowWordPain_Timer <= diff)
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWWORDPAIN);
|
||||
ShadowWordPain_Timer = 18000;
|
||||
} else ShadowWordPain_Timer -= diff;
|
||||
}
|
||||
|
||||
//Smite_Timer
|
||||
if (Smite_Timer <= diff)
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SMITE);
|
||||
Smite_Timer = 10000;
|
||||
} else Smite_Timer -= diff;
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//MindBlast_Timer
|
||||
if (MindBlast_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MINDBLAST);
|
||||
MindBlast_Timer = 14000;
|
||||
} else MindBlast_Timer -= diff;
|
||||
|
||||
//ShadowWordPain_Timer
|
||||
if (ShadowWordPain_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWWORDPAIN);
|
||||
ShadowWordPain_Timer = 18000;
|
||||
} else ShadowWordPain_Timer -= diff;
|
||||
|
||||
//Smite_Timer
|
||||
if (Smite_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SMITE);
|
||||
Smite_Timer = 10000;
|
||||
} else Smite_Timer -= diff;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_boss_moira_bronzebeard(Creature* pCreature)
|
||||
{
|
||||
return new boss_moira_bronzebeardAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_moira_bronzebeard()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_moira_bronzebeard";
|
||||
newscript->GetAI = &GetAI_boss_moira_bronzebeard;
|
||||
newscript->RegisterSelf();
|
||||
new boss_moira_bronzebeard();
|
||||
}
|
||||
|
||||
@@ -46,46 +46,53 @@ enum Misc
|
||||
#define GOSSIP_ITEM_TEACH_2 "Continue..."
|
||||
#define GOSSIP_ITEM_TEACH_3 "[PH] Continue..."
|
||||
#define GOSSIP_ITEM_TRIBUTE "I want to pay tribute"
|
||||
|
||||
bool GossipHello_boss_gloomrel(Player* pPlayer, Creature* pCreature)
|
||||
␍class boss_gloomrel : public CreatureScript
|
||||
{
|
||||
if (pPlayer->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 1 && pPlayer->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN && !pPlayer->HasSpell(SPELL_SMELT_DARK_IRON))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
public:
|
||||
boss_gloomrel() : CreatureScript("boss_gloomrel") { }
|
||||
|
||||
if (pPlayer->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 0 && pPlayer->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_boss_gloomrel(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
switch (uiAction)
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
pPlayer->SEND_GOSSIP_MENU(2606, pCreature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+11:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pCreature->CastSpell(pPlayer, SPELL_LEARN_SMELT, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
pPlayer->SEND_GOSSIP_MENU(2604, pCreature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+22:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
if (ScriptedInstance* pInstance = pCreature->GetInstanceData())
|
||||
{
|
||||
//are 5 minutes expected? go template may have data to despawn when used at quest
|
||||
pInstance->DoRespawnGameObject(pInstance->GetData64(DATA_GO_CHALICE),MINUTE*5);
|
||||
}
|
||||
break;
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
pPlayer->SEND_GOSSIP_MENU(2606, pCreature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+11:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pCreature->CastSpell(pPlayer, SPELL_LEARN_SMELT, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
|
||||
pPlayer->SEND_GOSSIP_MENU(2604, pCreature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+22:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
if (InstanceScript* pInstance = pCreature->GetInstanceScript())
|
||||
{
|
||||
//are 5 minutes expected? go template may have data to despawn when used at quest
|
||||
pInstance->DoRespawnGameObject(pInstance->GetData64(DATA_GO_CHALICE),MINUTE*5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
if (pPlayer->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 1 && pPlayer->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN && !pPlayer->HasSpell(SPELL_SMELT_DARK_IRON))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
if (pPlayer->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 0 && pPlayer->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
enum DoomrelSpells
|
||||
{
|
||||
@@ -96,161 +103,155 @@ enum DoomrelSpells
|
||||
SPELL_SUMMON_VOIDWALKERS = 15092
|
||||
};
|
||||
|
||||
struct boss_doomrelAI : public ScriptedAI
|
||||
{
|
||||
boss_doomrelAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
uint32 ShadowVolley_Timer;
|
||||
uint32 Immolate_Timer;
|
||||
uint32 CurseOfWeakness_Timer;
|
||||
uint32 DemonArmor_Timer;
|
||||
bool Voidwalkers;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ShadowVolley_Timer = 10000;
|
||||
Immolate_Timer = 18000;
|
||||
CurseOfWeakness_Timer = 5000;
|
||||
DemonArmor_Timer = 16000;
|
||||
Voidwalkers = false;
|
||||
|
||||
me->setFaction(FACTION_FRIEND);
|
||||
|
||||
// was set before event start, so set again
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(DATA_GHOSTKILL) >= 7)
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
else
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->DeleteThreatList();
|
||||
me->CombatStop(true);
|
||||
me->LoadCreaturesAddon();
|
||||
if (me->isAlive())
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
me->SetLootRecipient(NULL);
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GHOSTKILL, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowVolley_Timer
|
||||
if (ShadowVolley_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWBOLTVOLLEY);
|
||||
ShadowVolley_Timer = 12000;
|
||||
} else ShadowVolley_Timer -= diff;
|
||||
|
||||
//Immolate_Timer
|
||||
if (Immolate_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_IMMOLATE);
|
||||
|
||||
Immolate_Timer = 25000;
|
||||
} else Immolate_Timer -= diff;
|
||||
|
||||
//CurseOfWeakness_Timer
|
||||
if (CurseOfWeakness_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CURSEOFWEAKNESS);
|
||||
CurseOfWeakness_Timer = 45000;
|
||||
} else CurseOfWeakness_Timer -= diff;
|
||||
|
||||
//DemonArmor_Timer
|
||||
if (DemonArmor_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_DEMONARMOR);
|
||||
DemonArmor_Timer = 300000;
|
||||
} else DemonArmor_Timer -= diff;
|
||||
|
||||
//Summon Voidwalkers
|
||||
if (!Voidwalkers && me->GetHealth()*100 / me->GetMaxHealth() < 51)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SUMMON_VOIDWALKERS, true);
|
||||
Voidwalkers = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_doomrel(Creature* pCreature)
|
||||
{
|
||||
return new boss_doomrelAI (pCreature);
|
||||
}
|
||||
|
||||
#define GOSSIP_ITEM_CHALLENGE "Your bondage is at an end, Doom'rel. I challenge you!"
|
||||
#define GOSSIP_SELECT_DOOMREL "[PH] Continue..."
|
||||
|
||||
bool GossipHello_boss_doomrel(Player* pPlayer, Creature* pCreature)
|
||||
␍class boss_doomrel : public CreatureScript
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(2601, pCreature->GetGUID());
|
||||
public:
|
||||
boss_doomrel() : CreatureScript("boss_doomrel") { }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
switch (uiAction)
|
||||
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_DOOMREL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(2605, pCreature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
//start event here
|
||||
pCreature->setFaction(FACTION_HOSTILE);
|
||||
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
pCreature->AI()->AttackStart(pPlayer);
|
||||
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER,pPlayer->GetGUID());
|
||||
break;
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_DOOMREL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
pPlayer->SEND_GOSSIP_MENU(2605, pCreature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
//start event here
|
||||
pCreature->setFaction(FACTION_HOSTILE);
|
||||
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
pCreature->AI()->AttackStart(pPlayer);
|
||||
InstanceScript* pInstance = pCreature->GetInstanceScript();
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER,pPlayer->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(2601, pCreature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
{
|
||||
return new boss_doomrelAI (pCreature);
|
||||
}
|
||||
|
||||
struct boss_doomrelAI : public ScriptedAI
|
||||
{
|
||||
boss_doomrelAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* pInstance;
|
||||
uint32 ShadowVolley_Timer;
|
||||
uint32 Immolate_Timer;
|
||||
uint32 CurseOfWeakness_Timer;
|
||||
uint32 DemonArmor_Timer;
|
||||
bool Voidwalkers;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ShadowVolley_Timer = 10000;
|
||||
Immolate_Timer = 18000;
|
||||
CurseOfWeakness_Timer = 5000;
|
||||
DemonArmor_Timer = 16000;
|
||||
Voidwalkers = false;
|
||||
|
||||
me->setFaction(FACTION_FRIEND);
|
||||
|
||||
// was set before event start, so set again
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(DATA_GHOSTKILL) >= 7)
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
else
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->DeleteThreatList();
|
||||
me->CombatStop(true);
|
||||
me->LoadCreaturesAddon();
|
||||
if (me->isAlive())
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
me->SetLootRecipient(NULL);
|
||||
if (pInstance)
|
||||
pInstance->SetData64(DATA_EVENSTARTER, 0);
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*who*/)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GHOSTKILL, 1);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowVolley_Timer
|
||||
if (ShadowVolley_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SHADOWBOLTVOLLEY);
|
||||
ShadowVolley_Timer = 12000;
|
||||
} else ShadowVolley_Timer -= diff;
|
||||
|
||||
//Immolate_Timer
|
||||
if (Immolate_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(pTarget, SPELL_IMMOLATE);
|
||||
|
||||
Immolate_Timer = 25000;
|
||||
} else Immolate_Timer -= diff;
|
||||
|
||||
//CurseOfWeakness_Timer
|
||||
if (CurseOfWeakness_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CURSEOFWEAKNESS);
|
||||
CurseOfWeakness_Timer = 45000;
|
||||
} else CurseOfWeakness_Timer -= diff;
|
||||
|
||||
//DemonArmor_Timer
|
||||
if (DemonArmor_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_DEMONARMOR);
|
||||
DemonArmor_Timer = 300000;
|
||||
} else DemonArmor_Timer -= diff;
|
||||
|
||||
//Summon Voidwalkers
|
||||
if (!Voidwalkers && me->GetHealth()*100 / me->GetMaxHealth() < 51)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SUMMON_VOIDWALKERS, true);
|
||||
Voidwalkers = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_tomb_of_seven()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_gloomrel";
|
||||
newscript->pGossipHello = &GossipHello_boss_gloomrel;
|
||||
newscript->pGossipSelect = &GossipSelect_boss_gloomrel;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_doomrel";
|
||||
newscript->GetAI = &GetAI_boss_doomrel;
|
||||
newscript->pGossipHello = &GossipHello_boss_doomrel;
|
||||
newscript->pGossipSelect = &GossipSelect_boss_doomrel;
|
||||
newscript->RegisterSelf();
|
||||
new boss_gloomrel();
|
||||
new boss_doomrel();
|
||||
}
|
||||
|
||||
+366
-363
@@ -74,389 +74,392 @@ enum eEnums
|
||||
GO_SPECTRAL_CHALICE = 164869,
|
||||
GO_CHEST_SEVEN = 169243
|
||||
};
|
||||
|
||||
struct instance_blackrock_depths : public ScriptedInstance
|
||||
␍class instance_blackrock_depths : public InstanceMapScript
|
||||
{
|
||||
instance_blackrock_depths(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
public:
|
||||
instance_blackrock_depths() : InstanceMapScript("instance_blackrock_depths") { }
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
|
||||
uint64 EmperorGUID;
|
||||
uint64 PhalanxGUID;
|
||||
uint64 MagmusGUID;
|
||||
|
||||
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 GoSFSGUID;
|
||||
uint64 GoSFNGUID;
|
||||
uint64 GoGolemNGUID;
|
||||
uint64 GoGolemSGUID;
|
||||
uint64 GoThroneGUID;
|
||||
uint64 GoChestGUID;
|
||||
|
||||
uint32 BarAleCount;
|
||||
uint32 GhostKillCount;
|
||||
uint64 TombBossGUIDs[7];
|
||||
uint64 TombEventStarterGUID;
|
||||
uint32 TombTimer;
|
||||
uint32 TombEventCounter;
|
||||
|
||||
void Initialize()
|
||||
InstanceScript* GetInstanceData_InstanceMapScript(Map* pMap)
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
EmperorGUID = 0;
|
||||
PhalanxGUID = 0;
|
||||
MagmusGUID = 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;
|
||||
GoSFSGUID = 0;
|
||||
GoSFNGUID = 0;
|
||||
GoGolemNGUID = 0;
|
||||
GoGolemSGUID = 0;
|
||||
GoThroneGUID = 0;
|
||||
GoChestGUID = 0;
|
||||
|
||||
BarAleCount = 0;
|
||||
GhostKillCount = 0;
|
||||
TombEventStarterGUID = 0;
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
TombEventCounter = 0;
|
||||
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
TombBossGUIDs[i] = 0;
|
||||
return new instance_blackrock_depths_InstanceMapScript(pMap);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
struct instance_blackrock_depths_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
instance_blackrock_depths_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {Initialize();};
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
|
||||
uint64 EmperorGUID;
|
||||
uint64 PhalanxGUID;
|
||||
uint64 MagmusGUID;
|
||||
|
||||
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 GoSFSGUID;
|
||||
uint64 GoSFNGUID;
|
||||
uint64 GoGolemNGUID;
|
||||
uint64 GoGolemSGUID;
|
||||
uint64 GoThroneGUID;
|
||||
uint64 GoChestGUID;
|
||||
|
||||
uint32 BarAleCount;
|
||||
uint32 GhostKillCount;
|
||||
uint64 TombBossGUIDs[7];
|
||||
uint64 TombEventStarterGUID;
|
||||
uint32 TombTimer;
|
||||
uint32 TombEventCounter;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
case NPC_EMPEROR: EmperorGUID = pCreature->GetGUID(); break;
|
||||
case NPC_PHALANX: PhalanxGUID = pCreature->GetGUID(); break;
|
||||
case NPC_DOOMREL: TombBossGUIDs[0] = pCreature->GetGUID(); break;
|
||||
case NPC_DOPEREL: TombBossGUIDs[1] = pCreature->GetGUID(); break;
|
||||
case NPC_HATEREL: TombBossGUIDs[2] = pCreature->GetGUID(); break;
|
||||
case NPC_VILEREL: TombBossGUIDs[3] = pCreature->GetGUID(); break;
|
||||
case NPC_SEETHREL: TombBossGUIDs[4] = pCreature->GetGUID(); break;
|
||||
case NPC_GLOOMREL: TombBossGUIDs[5] = pCreature->GetGUID(); break;
|
||||
case NPC_ANGERREL: TombBossGUIDs[6] = pCreature->GetGUID(); break;
|
||||
case NPC_MAGMUS:
|
||||
MagmusGUID = pCreature->GetGUID();
|
||||
if (!pCreature->isAlive())
|
||||
HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
|
||||
break;
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
EmperorGUID = 0;
|
||||
PhalanxGUID = 0;
|
||||
MagmusGUID = 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;
|
||||
GoSFSGUID = 0;
|
||||
GoSFNGUID = 0;
|
||||
GoGolemNGUID = 0;
|
||||
GoGolemSGUID = 0;
|
||||
GoThroneGUID = 0;
|
||||
GoChestGUID = 0;
|
||||
|
||||
BarAleCount = 0;
|
||||
GhostKillCount = 0;
|
||||
TombEventStarterGUID = 0;
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
TombEventCounter = 0;
|
||||
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
TombBossGUIDs[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
{
|
||||
case GO_ARENA1: GoArena1GUID = pGo->GetGUID(); break;
|
||||
case GO_ARENA2: GoArena2GUID = pGo->GetGUID(); break;
|
||||
case GO_ARENA3: GoArena3GUID = pGo->GetGUID(); break;
|
||||
case GO_ARENA4: GoArena4GUID = pGo->GetGUID(); break;
|
||||
case GO_SHADOW_LOCK: GoShadowLockGUID = pGo->GetGUID(); break;
|
||||
case GO_SHADOW_MECHANISM: GoShadowMechGUID = pGo->GetGUID(); break;
|
||||
case GO_SHADOW_GIANT_DOOR: GoShadowGiantGUID = pGo->GetGUID(); break;
|
||||
case GO_SHADOW_DUMMY: GoShadowDummyGUID = pGo->GetGUID(); break;
|
||||
case GO_BAR_KEG_SHOT: GoBarKegGUID = pGo->GetGUID(); break;
|
||||
case GO_BAR_KEG_TRAP: GoBarKegTrapGUID = pGo->GetGUID(); break;
|
||||
case GO_BAR_DOOR: GoBarDoorGUID = pGo->GetGUID(); break;
|
||||
case GO_TOMB_ENTER: GoTombEnterGUID = pGo->GetGUID(); break;
|
||||
case GO_TOMB_EXIT:
|
||||
GoTombExitGUID = pGo->GetGUID();
|
||||
switch(pCreature->GetEntry())
|
||||
{
|
||||
case NPC_EMPEROR: EmperorGUID = pCreature->GetGUID(); break;
|
||||
case NPC_PHALANX: PhalanxGUID = pCreature->GetGUID(); break;
|
||||
case NPC_DOOMREL: TombBossGUIDs[0] = pCreature->GetGUID(); break;
|
||||
case NPC_DOPEREL: TombBossGUIDs[1] = pCreature->GetGUID(); break;
|
||||
case NPC_HATEREL: TombBossGUIDs[2] = pCreature->GetGUID(); break;
|
||||
case NPC_VILEREL: TombBossGUIDs[3] = pCreature->GetGUID(); break;
|
||||
case NPC_SEETHREL: TombBossGUIDs[4] = pCreature->GetGUID(); break;
|
||||
case NPC_GLOOMREL: TombBossGUIDs[5] = pCreature->GetGUID(); break;
|
||||
case NPC_ANGERREL: TombBossGUIDs[6] = pCreature->GetGUID(); break;
|
||||
case NPC_MAGMUS:
|
||||
MagmusGUID = pCreature->GetGUID();
|
||||
if (!pCreature->isAlive())
|
||||
HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
{
|
||||
case GO_ARENA1: GoArena1GUID = pGo->GetGUID(); break;
|
||||
case GO_ARENA2: GoArena2GUID = pGo->GetGUID(); break;
|
||||
case GO_ARENA3: GoArena3GUID = pGo->GetGUID(); break;
|
||||
case GO_ARENA4: GoArena4GUID = pGo->GetGUID(); break;
|
||||
case GO_SHADOW_LOCK: GoShadowLockGUID = pGo->GetGUID(); break;
|
||||
case GO_SHADOW_MECHANISM: GoShadowMechGUID = pGo->GetGUID(); break;
|
||||
case GO_SHADOW_GIANT_DOOR: GoShadowGiantGUID = pGo->GetGUID(); break;
|
||||
case GO_SHADOW_DUMMY: GoShadowDummyGUID = pGo->GetGUID(); break;
|
||||
case GO_BAR_KEG_SHOT: GoBarKegGUID = pGo->GetGUID(); break;
|
||||
case GO_BAR_KEG_TRAP: GoBarKegTrapGUID = pGo->GetGUID(); break;
|
||||
case GO_BAR_DOOR: GoBarDoorGUID = pGo->GetGUID(); break;
|
||||
case GO_TOMB_ENTER: GoTombEnterGUID = pGo->GetGUID(); break;
|
||||
case GO_TOMB_EXIT:
|
||||
GoTombExitGUID = pGo->GetGUID();
|
||||
if (GhostKillCount >= 7)
|
||||
HandleGameObject(0, true, pGo);
|
||||
else
|
||||
HandleGameObject(0, false, pGo);
|
||||
break;
|
||||
case GO_LYCEUM: GoLyceumGUID = pGo->GetGUID(); break;
|
||||
case GO_SF_S: GoSFSGUID = pGo->GetGUID(); break;
|
||||
case GO_SF_N: GoSFNGUID = pGo->GetGUID(); break;
|
||||
case GO_GOLEM_ROOM_N: GoGolemNGUID = pGo->GetGUID(); break;
|
||||
case GO_GOLEM_ROOM_S: GoGolemSGUID = pGo->GetGUID(); break;
|
||||
case GO_THRONE_ROOM: GoThroneGUID = pGo->GetGUID(); break;
|
||||
case GO_CHEST_SEVEN: GoChestGUID = pGo->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData64(uint32 type, uint64 data)
|
||||
{
|
||||
sLog.outDebug("TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data %u)", type, data);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case DATA_EVENSTARTER:
|
||||
TombEventStarterGUID = data;
|
||||
if (!TombEventStarterGUID)
|
||||
TombOfSevenReset();//reset
|
||||
else
|
||||
TombOfSevenStart();//start
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
sLog.outDebug("TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_RING_OF_LAW:
|
||||
m_auiEncounter[0] = data;
|
||||
break;
|
||||
case TYPE_VAULT:
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
case TYPE_BAR:
|
||||
if (data == SPECIAL)
|
||||
++BarAleCount;
|
||||
else
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
case TYPE_TOMB_OF_SEVEN:
|
||||
m_auiEncounter[3] = data;
|
||||
break;
|
||||
case TYPE_LYCEUM:
|
||||
m_auiEncounter[4] = data;
|
||||
break;
|
||||
case TYPE_IRON_HALL:
|
||||
m_auiEncounter[5] = data;
|
||||
break;
|
||||
case DATA_GHOSTKILL:
|
||||
GhostKillCount += data;
|
||||
break;
|
||||
}
|
||||
|
||||
if (data == DONE || GhostKillCount >= 7)
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " "
|
||||
<< m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << GhostKillCount;
|
||||
|
||||
str_data = saveStream.str();
|
||||
|
||||
SaveToDB();
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_RING_OF_LAW:
|
||||
return m_auiEncounter[0];
|
||||
case TYPE_VAULT:
|
||||
return m_auiEncounter[1];
|
||||
case TYPE_BAR:
|
||||
if (m_auiEncounter[2] == IN_PROGRESS && BarAleCount == 3)
|
||||
return SPECIAL;
|
||||
else
|
||||
return m_auiEncounter[2];
|
||||
case TYPE_TOMB_OF_SEVEN:
|
||||
return m_auiEncounter[3];
|
||||
case TYPE_LYCEUM:
|
||||
return m_auiEncounter[4];
|
||||
case TYPE_IRON_HALL:
|
||||
return m_auiEncounter[5];
|
||||
case DATA_GHOSTKILL:
|
||||
return GhostKillCount;
|
||||
}
|
||||
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;
|
||||
case DATA_EVENSTARTER:
|
||||
return TombEventStarterGUID;
|
||||
case DATA_SF_BRAZIER_N:
|
||||
return GoSFNGUID;
|
||||
case DATA_SF_BRAZIER_S:
|
||||
return GoSFSGUID;
|
||||
case DATA_THRONE_DOOR:
|
||||
return GoThroneGUID;
|
||||
case DATA_GOLEM_DOOR_N:
|
||||
return GoGolemNGUID;
|
||||
case DATA_GOLEM_DOOR_S:
|
||||
return GoGolemSGUID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
return str_data;
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
|
||||
>> m_auiEncounter[4] >> m_auiEncounter[5] >> GhostKillCount;
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
if (GhostKillCount > 0 && GhostKillCount < 7)
|
||||
GhostKillCount = 0;//reset tomb of seven event
|
||||
if (GhostKillCount >= 7)
|
||||
HandleGameObject(0, true, pGo);
|
||||
else
|
||||
HandleGameObject(0, false, pGo);
|
||||
break;
|
||||
case GO_LYCEUM: GoLyceumGUID = pGo->GetGUID(); break;
|
||||
case GO_SF_S: GoSFSGUID = pGo->GetGUID(); break;
|
||||
case GO_SF_N: GoSFNGUID = pGo->GetGUID(); break;
|
||||
case GO_GOLEM_ROOM_N: GoGolemNGUID = pGo->GetGUID(); break;
|
||||
case GO_GOLEM_ROOM_S: GoGolemSGUID = pGo->GetGUID(); break;
|
||||
case GO_THRONE_ROOM: GoThroneGUID = pGo->GetGUID(); break;
|
||||
case GO_CHEST_SEVEN: GoChestGUID = pGo->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
GhostKillCount = 7;
|
||||
|
||||
void SetData64(uint32 type, uint64 data)
|
||||
{
|
||||
sLog.outDebug("TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data %u)", type, data);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case DATA_EVENSTARTER:
|
||||
TombEventStarterGUID = data;
|
||||
if (!TombEventStarterGUID)
|
||||
TombOfSevenReset();//reset
|
||||
else
|
||||
TombOfSevenStart();//start
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
sLog.outDebug("TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_RING_OF_LAW:
|
||||
m_auiEncounter[0] = data;
|
||||
break;
|
||||
case TYPE_VAULT:
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
case TYPE_BAR:
|
||||
if (data == SPECIAL)
|
||||
++BarAleCount;
|
||||
else
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
case TYPE_TOMB_OF_SEVEN:
|
||||
m_auiEncounter[3] = data;
|
||||
break;
|
||||
case TYPE_LYCEUM:
|
||||
m_auiEncounter[4] = data;
|
||||
break;
|
||||
case TYPE_IRON_HALL:
|
||||
m_auiEncounter[5] = data;
|
||||
break;
|
||||
case DATA_GHOSTKILL:
|
||||
GhostKillCount += data;
|
||||
break;
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
if (data == DONE || GhostKillCount >= 7)
|
||||
void TombOfSevenEvent()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " "
|
||||
<< m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << GhostKillCount;
|
||||
|
||||
str_data = saveStream.str();
|
||||
|
||||
SaveToDB();
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case TYPE_RING_OF_LAW:
|
||||
return m_auiEncounter[0];
|
||||
case TYPE_VAULT:
|
||||
return m_auiEncounter[1];
|
||||
case TYPE_BAR:
|
||||
if (m_auiEncounter[2] == IN_PROGRESS && BarAleCount == 3)
|
||||
return SPECIAL;
|
||||
else
|
||||
return m_auiEncounter[2];
|
||||
case TYPE_TOMB_OF_SEVEN:
|
||||
return m_auiEncounter[3];
|
||||
case TYPE_LYCEUM:
|
||||
return m_auiEncounter[4];
|
||||
case TYPE_IRON_HALL:
|
||||
return m_auiEncounter[5];
|
||||
case DATA_GHOSTKILL:
|
||||
return GhostKillCount;
|
||||
}
|
||||
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;
|
||||
case DATA_EVENSTARTER:
|
||||
return TombEventStarterGUID;
|
||||
case DATA_SF_BRAZIER_N:
|
||||
return GoSFNGUID;
|
||||
case DATA_SF_BRAZIER_S:
|
||||
return GoSFSGUID;
|
||||
case DATA_THRONE_DOOR:
|
||||
return GoThroneGUID;
|
||||
case DATA_GOLEM_DOOR_N:
|
||||
return GoGolemNGUID;
|
||||
case DATA_GOLEM_DOOR_S:
|
||||
return GoGolemSGUID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
return str_data;
|
||||
}
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
|
||||
>> m_auiEncounter[4] >> m_auiEncounter[5] >> GhostKillCount;
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
if (GhostKillCount > 0 && GhostKillCount < 7)
|
||||
GhostKillCount = 0;//reset tomb of seven event
|
||||
if (GhostKillCount >= 7)
|
||||
GhostKillCount = 7;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
void TombOfSevenEvent()
|
||||
{
|
||||
if (GhostKillCount < 7 && TombBossGUIDs[TombEventCounter])
|
||||
{
|
||||
if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter]))
|
||||
if (GhostKillCount < 7 && TombBossGUIDs[TombEventCounter])
|
||||
{
|
||||
boss->setFaction(FACTION_HOSTILE);
|
||||
boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
if (Unit *pTarget = boss->SelectNearestTarget(500))
|
||||
boss->AI()->AttackStart(pTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TombOfSevenReset()
|
||||
{
|
||||
HandleGameObject(GoTombExitGUID,false);//event reseted, close exit door
|
||||
HandleGameObject(GoTombEnterGUID,true);//event reseted, open entrance door
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
{
|
||||
if (Creature* boss = instance->GetCreature(TombBossGUIDs[i]))
|
||||
{
|
||||
if (!boss->isAlive())
|
||||
{//do not call EnterEvadeMode(), it will create infinit loops
|
||||
boss->Respawn();
|
||||
boss->RemoveAllAuras();
|
||||
boss->DeleteThreatList();
|
||||
boss->CombatStop(true);
|
||||
boss->LoadCreaturesAddon();
|
||||
boss->GetMotionMaster()->MoveTargetedHome();
|
||||
boss->SetLootRecipient(NULL);
|
||||
}
|
||||
boss->setFaction(FACTION_FRIEND);
|
||||
}
|
||||
}
|
||||
GhostKillCount = 0;
|
||||
TombEventStarterGUID = 0;
|
||||
TombEventCounter = 0;
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
SetData(TYPE_TOMB_OF_SEVEN, NOT_STARTED);
|
||||
}
|
||||
|
||||
void TombOfSevenStart()
|
||||
{
|
||||
HandleGameObject(GoTombExitGUID,false);//event started, close exit door
|
||||
HandleGameObject(GoTombEnterGUID,false);//event started, close entrance door
|
||||
SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void TombOfSevenEnd()
|
||||
{
|
||||
DoRespawnGameObject(GoChestGUID,DAY);
|
||||
HandleGameObject(GoTombExitGUID,true);//event done, open exit door
|
||||
HandleGameObject(GoTombEnterGUID,true);//event done, open entrance door
|
||||
TombEventStarterGUID = 0;
|
||||
SetData(TYPE_TOMB_OF_SEVEN, DONE);
|
||||
}
|
||||
void Update(uint32 diff)
|
||||
{
|
||||
if (TombEventStarterGUID && GhostKillCount < 7)
|
||||
{
|
||||
if (TombTimer <= diff)
|
||||
{
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
++TombEventCounter;
|
||||
TombOfSevenEvent();
|
||||
// Check Killed bosses
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter]))
|
||||
{
|
||||
if (Creature* boss = instance->GetCreature(TombBossGUIDs[i]))
|
||||
{
|
||||
if (!boss->isAlive())
|
||||
{
|
||||
GhostKillCount = i+1;
|
||||
}
|
||||
}
|
||||
boss->setFaction(FACTION_HOSTILE);
|
||||
boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
if (Unit *pTarget = boss->SelectNearestTarget(500))
|
||||
boss->AI()->AttackStart(pTarget);
|
||||
}
|
||||
} else TombTimer -= diff;
|
||||
}
|
||||
}
|
||||
if (GhostKillCount >= 7 && TombEventStarterGUID)
|
||||
TombOfSevenEnd();
|
||||
}
|
||||
|
||||
void TombOfSevenReset()
|
||||
{
|
||||
HandleGameObject(GoTombExitGUID,false);//event reseted, close exit door
|
||||
HandleGameObject(GoTombEnterGUID,true);//event reseted, open entrance door
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
{
|
||||
if (Creature* boss = instance->GetCreature(TombBossGUIDs[i]))
|
||||
{
|
||||
if (!boss->isAlive())
|
||||
{//do not call EnterEvadeMode(), it will create infinit loops
|
||||
boss->Respawn();
|
||||
boss->RemoveAllAuras();
|
||||
boss->DeleteThreatList();
|
||||
boss->CombatStop(true);
|
||||
boss->LoadCreaturesAddon();
|
||||
boss->GetMotionMaster()->MoveTargetedHome();
|
||||
boss->SetLootRecipient(NULL);
|
||||
}
|
||||
boss->setFaction(FACTION_FRIEND);
|
||||
}
|
||||
}
|
||||
GhostKillCount = 0;
|
||||
TombEventStarterGUID = 0;
|
||||
TombEventCounter = 0;
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
SetData(TYPE_TOMB_OF_SEVEN, NOT_STARTED);
|
||||
}
|
||||
|
||||
void TombOfSevenStart()
|
||||
{
|
||||
HandleGameObject(GoTombExitGUID,false);//event started, close exit door
|
||||
HandleGameObject(GoTombEnterGUID,false);//event started, close entrance door
|
||||
SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void TombOfSevenEnd()
|
||||
{
|
||||
DoRespawnGameObject(GoChestGUID,DAY);
|
||||
HandleGameObject(GoTombExitGUID,true);//event done, open exit door
|
||||
HandleGameObject(GoTombEnterGUID,true);//event done, open entrance door
|
||||
TombEventStarterGUID = 0;
|
||||
SetData(TYPE_TOMB_OF_SEVEN, DONE);
|
||||
}
|
||||
void Update(uint32 diff)
|
||||
{
|
||||
if (TombEventStarterGUID && GhostKillCount < 7)
|
||||
{
|
||||
if (TombTimer <= diff)
|
||||
{
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
++TombEventCounter;
|
||||
TombOfSevenEvent();
|
||||
// Check Killed bosses
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
{
|
||||
if (Creature* boss = instance->GetCreature(TombBossGUIDs[i]))
|
||||
{
|
||||
if (!boss->isAlive())
|
||||
{
|
||||
GhostKillCount = i+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else TombTimer -= diff;
|
||||
}
|
||||
if (GhostKillCount >= 7 && TombEventStarterGUID)
|
||||
TombOfSevenEnd();
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_blackrock_depths(Map* pMap)
|
||||
{
|
||||
return new instance_blackrock_depths(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_blackrock_depths()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "instance_blackrock_depths";
|
||||
newscript->GetInstanceData = &GetInstanceData_instance_blackrock_depths;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
{
|
||||
new instance_blackrock_depths();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user