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:
Francesco Borzì
2021-08-06 15:45:17 +02:00
committed by GitHub
parent cc02724200
commit 7bddd69c95
26 changed files with 55 additions and 103 deletions

View File

@@ -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)
{

View File

@@ -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"

View File

@@ -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)
{

View File

@@ -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;

View File

@@ -19,7 +19,6 @@ EndScriptData */
#include "hyjalAI.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "ScriptMgr.h"
enum Spawns
{

View File

@@ -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,

View File

@@ -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
{

View File

@@ -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);

View File

@@ -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,