mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
refactor(Scripts/EasternKingdoms): code cleanup (part 5) - also fix potential crash (#6923)
This commit is contained in:
@@ -204,4 +204,4 @@ void AddSC_boss_balinda()
|
||||
{
|
||||
new boss_balinda;
|
||||
new npc_water_elemental;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "blackrock_depths.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
#define TIMER_TOMBOFTHESEVEN 15000
|
||||
|
||||
@@ -11,7 +11,6 @@ SDComment: Place Holder
|
||||
SDCategory: Molten Core
|
||||
EndScriptData */
|
||||
|
||||
#include "CreatureAI.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "molten_core.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
* Rescripted By Lee (Talamortis)
|
||||
*/
|
||||
|
||||
#include "karazhan.h"
|
||||
@@ -285,7 +284,6 @@ public:
|
||||
|
||||
void SummonInfernal()
|
||||
{
|
||||
InfernalPoint* point = 0;
|
||||
Position pos;
|
||||
|
||||
if ((me->GetMapId() == 532))
|
||||
@@ -294,7 +292,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
point = Acore::Containers::SelectRandomContainerElement(positions);
|
||||
InfernalPoint* point = Acore::Containers::SelectRandomContainerElement(positions);
|
||||
pos.Relocate(point->x, point->y, INFERNAL_Z, frand(0.0f, float(M_PI * 2)));
|
||||
}
|
||||
|
||||
@@ -360,14 +358,16 @@ public:
|
||||
{
|
||||
if (SWPainTimer <= diff)
|
||||
{
|
||||
Unit* target = nullptr;
|
||||
if (phase == 1)
|
||||
target = me->GetVictim(); // Target the Tank
|
||||
else // anyone but the tank
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
|
||||
// if phase == 1 target the tank, otherwise anyone but the tank
|
||||
Unit* target = phase == 1
|
||||
? me->GetVictim()
|
||||
: SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
|
||||
if (target)
|
||||
{
|
||||
DoCast(target, SPELL_SW_PAIN);
|
||||
}
|
||||
|
||||
SWPainTimer = 20000;
|
||||
}
|
||||
@@ -411,8 +411,7 @@ public:
|
||||
{
|
||||
if (AmplifyDamageTimer <= diff)
|
||||
{
|
||||
Unit* target = nullptr;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
|
||||
if (target)
|
||||
{
|
||||
@@ -421,7 +420,9 @@ public:
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AmplifyDamageTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if (phase != 3)
|
||||
@@ -483,9 +484,11 @@ public:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
if (me->GetVictim())
|
||||
{
|
||||
DoModifyThreatPercent(me->GetVictim(), -100);
|
||||
if (target)
|
||||
me->AddThreat(target, 1000000.0f);
|
||||
}
|
||||
|
||||
me->AddThreat(target, 1000000.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -392,15 +392,10 @@ public:
|
||||
{
|
||||
ElementalsSpawned = true;
|
||||
|
||||
Creature* ElementalOne = nullptr;
|
||||
Creature* ElementalTwo = nullptr;
|
||||
Creature* ElementalThree = nullptr;
|
||||
Creature* ElementalFour = nullptr;
|
||||
|
||||
ElementalOne = me->SummonCreature(CREATURE_WATER_ELEMENTAL, -11168.1f, -1939.29f, 232.092f, 1.46f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
|
||||
ElementalTwo = me->SummonCreature(CREATURE_WATER_ELEMENTAL, -11138.2f, -1915.38f, 232.092f, 3.00f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
|
||||
ElementalThree = me->SummonCreature(CREATURE_WATER_ELEMENTAL, -11161.7f, -1885.36f, 232.092f, 4.59f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
|
||||
ElementalFour = me->SummonCreature(CREATURE_WATER_ELEMENTAL, -11192.4f, -1909.36f, 232.092f, 6.19f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
|
||||
Creature* ElementalOne = me->SummonCreature(CREATURE_WATER_ELEMENTAL, -11168.1f, -1939.29f, 232.092f, 1.46f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
|
||||
Creature* ElementalTwo = me->SummonCreature(CREATURE_WATER_ELEMENTAL, -11138.2f, -1915.38f, 232.092f, 3.00f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
|
||||
Creature* ElementalThree = me->SummonCreature(CREATURE_WATER_ELEMENTAL, -11161.7f, -1885.36f, 232.092f, 4.59f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
|
||||
Creature* ElementalFour = me->SummonCreature(CREATURE_WATER_ELEMENTAL, -11192.4f, -1909.36f, 232.092f, 6.19f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000);
|
||||
|
||||
if (ElementalOne)
|
||||
{
|
||||
|
||||
@@ -86,10 +86,10 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
ObjectGuid TerestianGUID = instance->GetGuidData(DATA_TERESTIAN);
|
||||
if (TerestianGUID)
|
||||
ObjectGuid TerestianGuid = instance->GetGuidData(DATA_TERESTIAN);
|
||||
if (TerestianGuid)
|
||||
{
|
||||
Unit* Terestian = ObjectAccessor::GetUnit(*me, TerestianGUID);
|
||||
Unit* Terestian = ObjectAccessor::GetUnit(*me, TerestianGuid);
|
||||
if (Terestian && Terestian->IsAlive())
|
||||
DoCast(Terestian, SPELL_BROKEN_PACT, true);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
*/
|
||||
|
||||
#include "Creature.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -474,9 +474,9 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override {}
|
||||
|
||||
uint32 NextStep(uint32 Step)
|
||||
uint32 NextStep(uint32 nextStep)
|
||||
{
|
||||
switch(Step)
|
||||
switch(nextStep)
|
||||
{
|
||||
case 1:
|
||||
me->MonsterYell(SAY_DIALOG_MEDIVH_1, LANG_UNIVERSAL, 0);
|
||||
|
||||
@@ -1,20 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* 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 the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*/
|
||||
|
||||
#ifndef DEF_KARAZHAN_H
|
||||
#define DEF_KARAZHAN_H
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "Opcodes.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
enum Says
|
||||
{
|
||||
|
||||
@@ -956,12 +956,12 @@ public:
|
||||
{
|
||||
boss_apokoAI(Creature* creature) : boss_priestess_lackey_commonAI(creature, AI_TYPE_MELEE) { }
|
||||
|
||||
uint32 Totem_Timer;
|
||||
// uint32 Totem_Timer;
|
||||
uint8 Totem_Amount;
|
||||
uint32 War_Stomp_Timer;
|
||||
uint32 Purge_Timer;
|
||||
// uint32 Purge_Timer;
|
||||
uint32 Healing_Wave_Timer;
|
||||
uint32 Frost_Shock_Timer;
|
||||
// uint32 Frost_Shock_Timer;
|
||||
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "PetAI.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
@@ -672,14 +671,14 @@ uint32 acherus_soul_prison[12] =
|
||||
191590
|
||||
};
|
||||
|
||||
uint32 acherus_unworthy_initiate[5] =
|
||||
{
|
||||
29519,
|
||||
29520,
|
||||
29565,
|
||||
29566,
|
||||
29567
|
||||
};
|
||||
//uint32 acherus_unworthy_initiate[5] =
|
||||
//{
|
||||
// 29519,
|
||||
// 29520,
|
||||
// 29565,
|
||||
// 29566,
|
||||
// 29567
|
||||
//};
|
||||
|
||||
class npc_unworthy_initiate : public CreatureScript
|
||||
{
|
||||
@@ -782,7 +781,7 @@ public:
|
||||
{
|
||||
if (GameObject* temp_prison = me->FindNearestGameObject(acherus_soul_prison[i], 100))
|
||||
{
|
||||
if (temp_prison && me->IsWithinDist(temp_prison, dist, false))
|
||||
if (me->IsWithinDist(temp_prison, dist, false))
|
||||
{
|
||||
dist = me->GetDistance2d(temp_prison);
|
||||
prison = temp_prison;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
@@ -64,11 +64,17 @@ public:
|
||||
{
|
||||
Player* player = nullptr;
|
||||
if (me->IsSummon())
|
||||
if (Unit* summoner = me->ToTempSummon()->GetSummoner())
|
||||
{
|
||||
if (Unit * summoner = me->ToTempSummon()->GetSummoner())
|
||||
{
|
||||
player = summoner->ToPlayer();
|
||||
}
|
||||
}
|
||||
|
||||
if (!player)
|
||||
{
|
||||
phase = 3;
|
||||
}
|
||||
|
||||
switch (phase)
|
||||
{
|
||||
@@ -78,17 +84,23 @@ public:
|
||||
FlyBackTimer = 500;
|
||||
break;
|
||||
case 1:
|
||||
player->GetClosePoint(x, y, z, me->GetObjectSize());
|
||||
if (player)
|
||||
{
|
||||
player->GetClosePoint(x, y, z, me->GetObjectSize());
|
||||
}
|
||||
z += 2.5f;
|
||||
x -= 2.0f;
|
||||
y -= 1.5f;
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
me->SetTarget(player->GetGUID());
|
||||
if (player)
|
||||
{
|
||||
me->SetTarget(player->GetGUID());
|
||||
}
|
||||
me->SetVisible(true);
|
||||
FlyBackTimer = 4500;
|
||||
break;
|
||||
case 2:
|
||||
if (!player->isResurrectRequested())
|
||||
if (player && !player->isResurrectRequested())
|
||||
{
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOM_SPELL_01);
|
||||
DoCast(player, SPELL_REVIVE, true);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* Originally written by Xinef - Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
|
||||
REWRITTEN BY XINEF
|
||||
*/
|
||||
|
||||
#include "scarletmonastery.h"
|
||||
|
||||
@@ -577,7 +577,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HealthBelowPct(30) && !(me->GetEntry() == DARK_SHADE_ENTRY))
|
||||
if (me->HealthBelowPct(30) && me->GetEntry() != DARK_SHADE_ENTRY)
|
||||
{
|
||||
events.Reset();
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
#include "shadowfang_keep.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
enum Creatures
|
||||
{
|
||||
NPC_ASH = 3850,
|
||||
NPC_ADA = 3849,
|
||||
NPC_ARCHMAGE_ARUGAL = 4275,
|
||||
NPC_ARUGAL_VOIDWALKER = 4627
|
||||
};
|
||||
//enum Creatures
|
||||
//{
|
||||
// NPC_ASH = 3850,
|
||||
// NPC_ADA = 3849,
|
||||
// NPC_ARCHMAGE_ARUGAL = 4275,
|
||||
// NPC_ARUGAL_VOIDWALKER = 4627
|
||||
//};
|
||||
|
||||
class instance_shadowfang_keep : public InstanceMapScript
|
||||
{
|
||||
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
if (Player* player = itr->GetSource())
|
||||
{
|
||||
// should pet also trigger the trap? could not find any source for it
|
||||
if (player && !player->IsGameMaster() && player->IsWithinDist2d(aGateTrap[i].m_positionX, aGateTrap[i].m_positionY, 5.5f))
|
||||
if (!player->IsGameMaster() && player->IsWithinDist2d(aGateTrap[i].m_positionX, aGateTrap[i].m_positionY, 5.5f))
|
||||
{
|
||||
// Check if timer was not already set by another player/pet a few milliseconds before
|
||||
if (_gateTrapsCooldown[i])
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "sunwell_plateau.h"
|
||||
|
||||
@@ -576,9 +576,14 @@ public:
|
||||
case EVENT_CHECK_HEALTH:
|
||||
if (me->HealthBelowPct(10))
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
if (Creature* kalecgos = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_KALECGOS)))
|
||||
if (InstanceScript* instanceScript = me->GetInstanceScript())
|
||||
{
|
||||
if (Creature *kalecgos = ObjectAccessor::GetCreature(*me, instanceScript->GetGuidData(
|
||||
NPC_KALECGOS)))
|
||||
{
|
||||
kalecgos->AI()->DoAction(ACTION_ENRAGE_OTHER);
|
||||
}
|
||||
}
|
||||
DoAction(ACTION_ENRAGE);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -46,14 +46,15 @@ enum Says
|
||||
SAY_DEATH = 5
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
NPC_SOARING_EAGLE = 24858,
|
||||
SE_LOC_X_MAX = 400,
|
||||
SE_LOC_X_MIN = 335,
|
||||
SE_LOC_Y_MAX = 1435,
|
||||
SE_LOC_Y_MIN = 1370
|
||||
};
|
||||
constexpr auto NPC_SOARING_EAGLE = 24858;
|
||||
|
||||
//enum Misc
|
||||
//{
|
||||
// SE_LOC_X_MAX = 400,
|
||||
// SE_LOC_X_MIN = 335,
|
||||
// SE_LOC_Y_MAX = 1435,
|
||||
// SE_LOC_Y_MIN = 1370
|
||||
//};
|
||||
|
||||
enum Events
|
||||
{
|
||||
|
||||
@@ -182,22 +182,20 @@ public:
|
||||
|
||||
void FireWall()
|
||||
{
|
||||
uint8 WallNum;
|
||||
Creature* wall = nullptr;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
if (i == 0 || i == 2)
|
||||
WallNum = 3;
|
||||
else
|
||||
WallNum = 2;
|
||||
uint8 WallNum = i == 0 || i == 2 ? 3 : 2;
|
||||
|
||||
for (uint8 j = 0; j < WallNum; j++)
|
||||
{
|
||||
if (WallNum == 3)
|
||||
wall = me->SummonCreature(NPC_FIRE_BOMB, FireWallCoords[i][0], FireWallCoords[i][1] + 5 * (j - 1), FireWallCoords[i][2], FireWallCoords[i][3], TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
else
|
||||
wall = me->SummonCreature(NPC_FIRE_BOMB, FireWallCoords[i][0] - 2 + 4 * j, FireWallCoords[i][1], FireWallCoords[i][2], FireWallCoords[i][3], TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
if (wall) wall->CastSpell(wall, SPELL_FIRE_WALL, true);
|
||||
Creature* wall = WallNum == 3
|
||||
? me->SummonCreature(NPC_FIRE_BOMB, FireWallCoords[i][0], FireWallCoords[i][1] + 5 * (j - 1), FireWallCoords[i][2], FireWallCoords[i][3], TEMPSUMMON_TIMED_DESPAWN, 15000)
|
||||
: me->SummonCreature(NPC_FIRE_BOMB, FireWallCoords[i][0] - 2 + 4 * j, FireWallCoords[i][1], FireWallCoords[i][2], FireWallCoords[i][3], TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
|
||||
if (wall)
|
||||
{
|
||||
wall->CastSpell(wall, SPELL_FIRE_WALL, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -534,7 +532,7 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!instance || !(instance->GetData(DATA_JANALAIEVENT) == IN_PROGRESS))
|
||||
if (!instance || instance->GetData(DATA_JANALAIEVENT) != IN_PROGRESS)
|
||||
{
|
||||
me->DisappearAndDie();
|
||||
return;
|
||||
@@ -614,7 +612,7 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!instance || !(instance->GetData(DATA_JANALAIEVENT) == IN_PROGRESS))
|
||||
if (!instance || instance->GetData(DATA_JANALAIEVENT) != IN_PROGRESS)
|
||||
{
|
||||
me->DisappearAndDie();
|
||||
return;
|
||||
|
||||
@@ -62,8 +62,8 @@ enum Talks
|
||||
SAY_KILL_ONE,
|
||||
SAY_KILL_TWO,
|
||||
SAY_DEATH,
|
||||
SAY_NALORAKK_EVENT1, // Unimplemented
|
||||
SAY_NALORAKK_EVENT2 // Unimplemented
|
||||
SAY_NALORAKK_EVENT1, // Not implemented
|
||||
SAY_NALORAKK_EVENT2 // Not implemented
|
||||
};
|
||||
|
||||
class boss_nalorakk : public CreatureScript
|
||||
|
||||
@@ -252,10 +252,9 @@ public:
|
||||
|
||||
void SpawnAdds()
|
||||
{
|
||||
Creature* creature = nullptr;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
creature = me->SummonCreature(SpiritInfo[i].entry, SpiritInfo[i].x, SpiritInfo[i].y, SpiritInfo[i].z, SpiritInfo[i].orient, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
Creature* creature = me->SummonCreature(SpiritInfo[i].entry, SpiritInfo[i].x, SpiritInfo[i].y, SpiritInfo[i].z, SpiritInfo[i].orient, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
if (creature)
|
||||
{
|
||||
creature->CastSpell(creature, SPELL_SPIRIT_AURA, true);
|
||||
|
||||
@@ -100,8 +100,7 @@ public:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
Talk(SAY_SPIDER_SPAWN);
|
||||
Creature* Spider = nullptr;
|
||||
Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Creature* Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
Spider->AI()->AttackStart(target);
|
||||
Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
|
||||
@@ -91,8 +91,7 @@ public:
|
||||
{
|
||||
if (Ambush_Timer <= diff)
|
||||
{
|
||||
Unit* target = nullptr;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
{
|
||||
me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), me->GetOrientation());
|
||||
@@ -127,14 +126,17 @@ public:
|
||||
{
|
||||
if (Aggro_Timer <= diff)
|
||||
{
|
||||
Unit* target = nullptr;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
|
||||
if (DoGetThreat(me->GetVictim()))
|
||||
{
|
||||
DoModifyThreatPercent(me->GetVictim(), -50);
|
||||
}
|
||||
|
||||
if (target)
|
||||
{
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
Aggro_Timer = urand(7000, 20000);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Spell.h"
|
||||
|
||||
@@ -102,22 +102,16 @@ public:
|
||||
{
|
||||
case DATA_LORKHAN:
|
||||
return _zealotLorkhanGUID;
|
||||
break;
|
||||
case DATA_ZATH:
|
||||
return _zealotZathGUID;
|
||||
break;
|
||||
case DATA_THEKAL:
|
||||
return _highPriestTekalGUID;
|
||||
break;
|
||||
case DATA_JINDO:
|
||||
return _jindoTheHexxerGUID;
|
||||
break;
|
||||
case NPC_ARLOKK:
|
||||
return _arlokkGUID;
|
||||
break;
|
||||
case GO_GONG_OF_BETHEKK:
|
||||
return _goGongOfBethekkGUID;
|
||||
break;
|
||||
}
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
|
||||
@@ -125,7 +125,7 @@ void AddSC_eastern_plaguelands();
|
||||
void AddSC_eversong_woods();
|
||||
void AddSC_ghostlands();
|
||||
void AddSC_hinterlands();
|
||||
void AddSC_ironforge();
|
||||
//void AddSC_ironforge();
|
||||
void AddSC_isle_of_queldanas();
|
||||
void AddSC_redridge_mountains();
|
||||
void AddSC_silverpine_forest();
|
||||
@@ -262,7 +262,7 @@ void AddEasternKingdomsScripts()
|
||||
AddSC_eversong_woods();
|
||||
AddSC_ghostlands();
|
||||
AddSC_hinterlands();
|
||||
AddSC_ironforge();
|
||||
// AddSC_ironforge();
|
||||
AddSC_isle_of_queldanas();
|
||||
AddSC_redridge_mountains();
|
||||
AddSC_silverpine_forest();
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
|
||||
@@ -12,7 +12,6 @@ Quest support: 3628. Teleporter to Rise of the Defiler.
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
|
||||
@@ -20,7 +20,6 @@ EndContentData */
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
/*######
|
||||
## npc_ranger_lilatha
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||
*/
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
void AddSC_ironforge() { }
|
||||
//void AddSC_ironforge() { }
|
||||
|
||||
@@ -1103,15 +1103,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
void JustSummoned(Creature* summonedCreature) override
|
||||
{
|
||||
switch (summoned->GetEntry())
|
||||
switch (summonedCreature->GetEntry())
|
||||
{
|
||||
case NPC_GENERATOR:
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
summoned->ApplySpellImmune(0, IMMUNITY_ID, SPELL_WRYNN_BUFF, true);
|
||||
summoned->ApplySpellImmune(0, IMMUNITY_ID, SPELL_THRALL_BUFF, true);
|
||||
summoned->ApplySpellImmune(0, IMMUNITY_ID, SPELL_SYLVANAS_BUFF, true);
|
||||
summonedCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
summonedCreature->ApplySpellImmune(0, IMMUNITY_ID, SPELL_WRYNN_BUFF, true);
|
||||
summonedCreature->ApplySpellImmune(0, IMMUNITY_ID, SPELL_THRALL_BUFF, true);
|
||||
summonedCreature->ApplySpellImmune(0, IMMUNITY_ID, SPELL_SYLVANAS_BUFF, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -20,7 +20,6 @@ EndContentData */
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
Reference in New Issue
Block a user