mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-27 04:12:40 +01:00
Scripts/Misc: Some cleanups
This commit is contained in:
@@ -0,0 +1 @@
|
||||
UPDATE `creature_template` SET `ScriptName`= 'boss_gatewatcher_gyrokill' WHERE `entry`=19218;
|
||||
@@ -15,13 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
Name: Instance_Scholomance
|
||||
%Complete: 100
|
||||
Comment:
|
||||
Category: Scholomance
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Player.h"
|
||||
@@ -119,31 +112,22 @@ class instance_scholomance : public InstanceMapScript
|
||||
{
|
||||
case GO_GATE_KIRTONOS:
|
||||
return GateKirtonosGUID;
|
||||
break;
|
||||
case GO_GATE_GANDLING:
|
||||
return GateGandlingGUID;
|
||||
break;
|
||||
case GO_GATE_MALICIA:
|
||||
return GateMiliciaGUID;
|
||||
break;
|
||||
case GO_GATE_THEOLEN:
|
||||
return GateTheolenGUID;
|
||||
break;
|
||||
case GO_GATE_POLKELT:
|
||||
return GatePolkeltGUID;
|
||||
break;
|
||||
case GO_GATE_RAVENIAN:
|
||||
return GateRavenianGUID;
|
||||
break;
|
||||
case GO_GATE_BAROV:
|
||||
return GateBarovGUID;
|
||||
break;
|
||||
case GO_GATE_ILLUCIA:
|
||||
return GateIlluciaGUID;
|
||||
break;
|
||||
case GO_BRAZIER_OF_THE_HERALD:
|
||||
return BrazierOfTheHeraldGUID;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Gatewatcher_Gyrokill
|
||||
SDName: boss_gatewatcher_gyrokill
|
||||
SD%Complete: 99%
|
||||
SDComment:
|
||||
SDCategory: Tempest Keep, The Mechanar
|
||||
@@ -50,13 +50,13 @@ enum Events
|
||||
EVENT_SHADOW_POWER = 2
|
||||
};
|
||||
|
||||
class Boss_Gatewatcher_Gyrokill : public CreatureScript
|
||||
class boss_gatewatcher_gyrokill : public CreatureScript
|
||||
{
|
||||
public: Boss_Gatewatcher_Gyrokill() : CreatureScript("Boss_Gatewatcher_Gyrokill") { }
|
||||
public: boss_gatewatcher_gyrokill() : CreatureScript("boss_gatewatcher_gyrokill") { }
|
||||
|
||||
struct Boss_Gatewatcher_GyrokillAI : public BossAI
|
||||
struct boss_gatewatcher_gyrokillAI : public BossAI
|
||||
{
|
||||
Boss_Gatewatcher_GyrokillAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL) {}
|
||||
boss_gatewatcher_gyrokillAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL) {}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
@@ -116,11 +116,11 @@ class Boss_Gatewatcher_Gyrokill : public CreatureScript
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new Boss_Gatewatcher_GyrokillAI (creature);
|
||||
return new boss_gatewatcher_gyrokillAI (creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_Boss_Gatewatcher_Gyrokill()
|
||||
void AddSC_boss_gatewatcher_gyrokill()
|
||||
{
|
||||
new Boss_Gatewatcher_Gyrokill();
|
||||
}
|
||||
new boss_gatewatcher_gyrokill();
|
||||
}
|
||||
|
||||
@@ -145,10 +145,7 @@ class boss_nethermancer_sepethrea : public CreatureScript
|
||||
class mob_ragin_flames : public CreatureScript
|
||||
{
|
||||
public:
|
||||
mob_ragin_flames()
|
||||
: CreatureScript("mob_ragin_flames")
|
||||
{
|
||||
}
|
||||
mob_ragin_flames() : CreatureScript("mob_ragin_flames") { }
|
||||
|
||||
struct mob_ragin_flamesAI : public ScriptedAI
|
||||
{
|
||||
@@ -235,4 +232,3 @@ void AddSC_boss_nethermancer_sepethrea()
|
||||
new boss_nethermancer_sepethrea();
|
||||
new mob_ragin_flames();
|
||||
}
|
||||
|
||||
|
||||
@@ -61,25 +61,18 @@ enum Events
|
||||
EVENT_ARCANE_EXPLOSION = 4
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
{
|
||||
NPC_NETHER_WRAITH = 21062
|
||||
};
|
||||
|
||||
class boss_pathaleon_the_calculator : public CreatureScript
|
||||
{
|
||||
public: boss_pathaleon_the_calculator(): CreatureScript("boss_pathaleon_the_calculator") {}
|
||||
|
||||
struct boss_pathaleon_the_calculatorAI : public BossAI
|
||||
{
|
||||
boss_pathaleon_the_calculatorAI(Creature* creature) : BossAI(creature,DATA_PATHALEON_THE_CALCULATOR), summons(me) {}
|
||||
|
||||
SummonList summons;
|
||||
bool Enraged;
|
||||
uint32 Counter;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
Enraged = false;
|
||||
Counter = 0;
|
||||
summons.DespawnAll();
|
||||
}
|
||||
boss_pathaleon_the_calculatorAI(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR) { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
@@ -101,17 +94,15 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage)
|
||||
{
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
if (me->HealthBelowPctDamaged(20, damage) && !me->HasAura(SPELL_FRENZY))
|
||||
{
|
||||
DoCast(me, SPELL_FRENZY);
|
||||
Talk(SAY_ENRAGE);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
@@ -121,13 +112,6 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (!Enraged && HealthBelowPct(21))
|
||||
{
|
||||
DoCast(me, SPELL_FRENZY);
|
||||
Talk(SAY_ENRAGE);
|
||||
Enraged = true;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -138,10 +122,11 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
case EVENT_SUMMON:
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Creature* Wraith = me->SummonCreature(21062, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
if (target && Wraith)
|
||||
Wraith->AI()->AttackStart(target);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
if (Creature* Wraith = me->SummonCreature(NPC_NETHER_WRAITH, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000))
|
||||
Wraith->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
Talk(SAY_SUMMON);
|
||||
events.ScheduleEvent(EVENT_SUMMON, urand(30000, 45000));
|
||||
@@ -172,20 +157,17 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_pathaleon_the_calculatorAI (creature);
|
||||
}
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_pathaleon_the_calculatorAI (creature);
|
||||
}
|
||||
};
|
||||
|
||||
class mob_nether_wraith : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
mob_nether_wraith()
|
||||
: CreatureScript("mob_nether_wraith")
|
||||
{
|
||||
}
|
||||
mob_nether_wraith() : CreatureScript("mob_nether_wraith") { }
|
||||
|
||||
struct mob_nether_wraithAI : public ScriptedAI
|
||||
{
|
||||
|
||||
@@ -112,4 +112,3 @@ void AddSC_instance_mechanar()
|
||||
{
|
||||
new instance_mechanar();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user