mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 07:36:23 +00:00
refactor(Scripts/Kalimdor): code cleanup (part 10) (#7065)
* refactor(Scripts/Kalimdor): code cleanup (part 10) * chore(Core/zone_mulgore): delete file * chore(Core/zone_teldrassil): remove file * chore(Core/kalimdor_script_loader): remove mulgore and teldrassil zone Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
@@ -121,12 +121,16 @@ public:
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (SwarmTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
DoCast(target, SPELL_CARRION_SWARM);
|
||||
}
|
||||
|
||||
SwarmTimer = urand(45000, 60000);
|
||||
Talk(SAY_SWARM);
|
||||
@@ -209,7 +213,9 @@ public:
|
||||
|
||||
{
|
||||
if (me->IsWithinDist(who, 50) && !me->IsInCombat() && me->IsValidAttackTarget(who))
|
||||
{
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -219,7 +225,7 @@ public:
|
||||
if (AnetheronGUID)
|
||||
{
|
||||
Creature* boss = ObjectAccessor::GetCreature(*me, AnetheronGUID);
|
||||
if (!boss || (boss && boss->isDead()))
|
||||
if (!boss || boss->isDead())
|
||||
{
|
||||
me->setDeathState(JUST_DIED);
|
||||
me->RemoveCorpse();
|
||||
@@ -232,7 +238,9 @@ public:
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (ImmolationTimer <= diff)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@ SDComment: Doomfires not completely offlike due to core limitations for random m
|
||||
SDCategory: Caverns of Time, Mount Hyjal
|
||||
EndScriptData */
|
||||
|
||||
#include "hyjal_trash.h"
|
||||
#include "hyjal.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
if (AzgalorGUID)
|
||||
{
|
||||
Creature* boss = ObjectAccessor::GetCreature(*me, AzgalorGUID);
|
||||
if (!boss || (boss && boss->isDead()))
|
||||
if (!boss || boss->isDead())
|
||||
{
|
||||
me->setDeathState(JUST_DIED);
|
||||
me->RemoveCorpse();
|
||||
@@ -245,7 +245,9 @@ public:
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (WarstompTimer <= diff)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "CreatureAIImpl.h"
|
||||
|
||||
#define HyjalScriptName "instance_hyjal"
|
||||
#define ERROR_INST_DATA "TSCR: Instance data not set properly for Mount Hyjal. Encounters will be buggy."
|
||||
|
||||
uint32 const EncounterCount = 5;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ EndScriptData */
|
||||
#include "hyjalAI.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
enum Spawns
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "hyjal_trash.h"
|
||||
#include "hyjal.h"
|
||||
#include "hyjalAI.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
@@ -20,9 +19,9 @@ enum Spells
|
||||
SPELL_DISEASE_CLOUD = 31607,
|
||||
SPELL_KNOCKDOWN = 31610,
|
||||
SPELL_FRENZY = 31540,
|
||||
SPELL_RAISE_DEAD_1 = 31617,
|
||||
SPELL_RAISE_DEAD_2 = 31624,
|
||||
SPELL_RAISE_DEAD_3 = 31625,
|
||||
// SPELL_RAISE_DEAD_1 = 31617,
|
||||
// SPELL_RAISE_DEAD_2 = 31624,
|
||||
// SPELL_RAISE_DEAD_3 = 31625,
|
||||
SPELL_SHADOW_BOLT = 31627,
|
||||
SPELL_BANSHEE_CURSE = 31651,
|
||||
SPELL_BANSHEE_WAIL = 38183,
|
||||
|
||||
@@ -15,8 +15,6 @@ EndScriptData */
|
||||
#include "hyjal_trash.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
@@ -29,7 +27,6 @@ EndScriptData */
|
||||
*/
|
||||
|
||||
#define YELL_EFFORTS "All of your efforts have been in vain, for the draining of the World Tree has already begun. Soon the heart of your world will beat no more."
|
||||
#define YELL_EFFORTS_NAME "Archimonde"
|
||||
|
||||
class instance_hyjal : public InstanceMapScript
|
||||
{
|
||||
|
||||
@@ -434,13 +434,18 @@ public:
|
||||
SetEscortPaused(false);
|
||||
SetRun(false);
|
||||
|
||||
Creature* cr = nullptr;
|
||||
if ((cr = me->SummonCreature(NPC_CITY_MAN3, EventPos[EVENT_SRC_HALL_CITYMAN1])))
|
||||
if (Creature* cr = me->SummonCreature(NPC_CITY_MAN3, EventPos[EVENT_SRC_HALL_CITYMAN1]))
|
||||
{
|
||||
cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
|
||||
if ((cr = me->SummonCreature(NPC_CITY_MAN4, EventPos[EVENT_SRC_HALL_CITYMAN2])))
|
||||
}
|
||||
if (Creature* cr = me->SummonCreature(NPC_CITY_MAN4, EventPos[EVENT_SRC_HALL_CITYMAN2]))
|
||||
{
|
||||
cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
|
||||
if ((cr = me->SummonCreature(NPC_CITY_MAN, EventPos[EVENT_SRC_HALL_CITYMAN3])))
|
||||
}
|
||||
if (Creature* cr = me->SummonCreature(NPC_CITY_MAN, EventPos[EVENT_SRC_HALL_CITYMAN3]))
|
||||
{
|
||||
cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
|
||||
}
|
||||
}
|
||||
else if (param == ACTION_START_SECRET_PASSAGE)
|
||||
{
|
||||
@@ -1251,7 +1256,7 @@ void npc_arthas::npc_arthasAI::ReorderInstance(uint32 data)
|
||||
waveGroupId = 4;
|
||||
SendNextWave(NPC_MEATHOOK);
|
||||
}
|
||||
else if (data == COS_PROGRESS_KILLED_SALRAMM)
|
||||
else // if (data == COS_PROGRESS_KILLED_SALRAMM)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->DoUpdateWorldState(WORLDSTATE_WAVE_COUNT, 10);
|
||||
|
||||
@@ -40,9 +40,6 @@ enum NpcIds
|
||||
|
||||
NPC_CAPTAIN_SKARLOC = 17862,
|
||||
NPC_SKARLOC_MOUNT = 18798,
|
||||
|
||||
NPC_LORDAERON_SENTRY = 17815,
|
||||
NPC_LORDAERON_WATCHMAN = 17814,
|
||||
};
|
||||
|
||||
enum GobjectIds
|
||||
@@ -54,7 +51,6 @@ enum GobjectIds
|
||||
|
||||
enum MiscIds
|
||||
{
|
||||
QUEST_DIVERSION = 10283,
|
||||
WORLD_STATE_BARRELS_PLANTED = 2436,
|
||||
SKARLOC_MOUNT_MODEL = 18223,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user