*Merge
--HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
DELETE FROM `spell_pet_auras` WHERE `spell` IN(56314, 56315, 56316, 56317, 56318);
|
||||||
|
INSERT INTO `spell_pet_auras` VALUES
|
||||||
|
(56314,0,57447),
|
||||||
|
(56315,0,57482),
|
||||||
|
(56316,0,57453),
|
||||||
|
(56317,0,57457),
|
||||||
|
(56318,0,57458);
|
||||||
|
|
||||||
|
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN(57447, 57482, 57453, 57457, 57458);
|
||||||
|
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
|
||||||
|
(57447,57485,2,'Kindred Spirits'),
|
||||||
|
(57482,57484,2,'Kindred Spirits'),
|
||||||
|
(57453,57483,2,'Kindred Spirits'),
|
||||||
|
(57457,57482,2,'Kindred Spirits'),
|
||||||
|
(57458,57475,2,'Kindred Spirits');
|
||||||
+6
-1
@@ -14318,7 +14318,12 @@ INSERT INTO `spell_pet_auras` VALUES
|
|||||||
(23822,17252,35703),
|
(23822,17252,35703),
|
||||||
(23823,17252,35704),
|
(23823,17252,35704),
|
||||||
(23824,17252,35705),
|
(23824,17252,35705),
|
||||||
(23825,17252,35706);
|
(23825,17252,35706),
|
||||||
|
(56314,0,57447),
|
||||||
|
(56315,0,57482),
|
||||||
|
(56316,0,57453),
|
||||||
|
(56317,0,57457),
|
||||||
|
(56318,0,57458);
|
||||||
/*!40000 ALTER TABLE `spell_pet_auras` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `spell_pet_auras` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
|
|||||||
(-49011, 49009, 0, 'Wyvern Sting'),
|
(-49011, 49009, 0, 'Wyvern Sting'),
|
||||||
(-49012, 49010, 0, 'Wyvern Sting'),
|
(-49012, 49010, 0, 'Wyvern Sting'),
|
||||||
( 47585, 60069, 0, 'Dispersion (transform/regen)'),
|
( 47585, 60069, 0, 'Dispersion (transform/regen)'),
|
||||||
(-47953, 60406, 0, 'Divine hymn buff to enemies'),
|
# (-47953, 60406, 0, 'Divine hymn buff to enemies'), removed in 313
|
||||||
( 48265, 49772, 2, 'Unholy Presence'),
|
( 48265, 49772, 2, 'Unholy Presence'),
|
||||||
( 49772, 55222, 2, 'Unholy Presence'),
|
( 49772, 55222, 2, 'Unholy Presence'),
|
||||||
( 48263, 61261, 2, 'Frost Presence'),
|
( 48263, 61261, 2, 'Frost Presence'),
|
||||||
@@ -50,11 +50,11 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
|
|||||||
( 17767, 54501, 2, 'Consume Shadows - Rank 1'),
|
( 17767, 54501, 2, 'Consume Shadows - Rank 1'),
|
||||||
( 53563, 53651, 2, 'Beacon of Light'),
|
( 53563, 53651, 2, 'Beacon of Light'),
|
||||||
( 16857, 60089, 0, 'Faerie Fire (Feral) Rank 1'),
|
( 16857, 60089, 0, 'Faerie Fire (Feral) Rank 1'),
|
||||||
( 17390, 60089, 0, 'Faerie Fire (Feral) Rank 2'),
|
# ( 17390, 60089, 0, 'Faerie Fire (Feral) Rank 2'), removed in 313
|
||||||
( 17391, 60089, 0, 'Faerie Fire (Feral) Rank 3'),
|
# ( 17391, 60089, 0, 'Faerie Fire (Feral) Rank 3'),
|
||||||
( 17392, 60089, 0, 'Faerie Fire (Feral) Rank 4'),
|
# ( 17392, 60089, 0, 'Faerie Fire (Feral) Rank 4'),
|
||||||
( 27011, 60089, 0, 'Faerie Fire (Feral) Rank 5'),
|
# ( 27011, 60089, 0, 'Faerie Fire (Feral) Rank 5'),
|
||||||
( 48475, 60089, 0, 'Faerie Fire (Feral) Rank 6'),
|
# ( 48475, 60089, 0, 'Faerie Fire (Feral) Rank 6'),
|
||||||
( 781, 56446, 0, 'Disengage'),
|
( 781, 56446, 0, 'Disengage'),
|
||||||
( 57635, 57636, 0, 'Disengage'),
|
( 57635, 57636, 0, 'Disengage'),
|
||||||
( 60932, 60934, 0, 'Disengage'),
|
( 60932, 60934, 0, 'Disengage'),
|
||||||
@@ -74,6 +74,11 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
|
|||||||
( -52610, -62071, 0, 'Savage Roar'),
|
( -52610, -62071, 0, 'Savage Roar'),
|
||||||
(51209, 55095, 1, 'Hungering cold - frost fever'),
|
(51209, 55095, 1, 'Hungering cold - frost fever'),
|
||||||
(50334, 58923, 2, 'Berserk - modify target number aura'),
|
(50334, 58923, 2, 'Berserk - modify target number aura'),
|
||||||
|
(57447,57485,2,'Kindred Spirits'),
|
||||||
|
(57482,57484,2,'Kindred Spirits'),
|
||||||
|
(57453,57483,2,'Kindred Spirits'),
|
||||||
|
(57457,57482,2,'Kindred Spirits'),
|
||||||
|
(57458,57475,2,'Kindred Spirits'),
|
||||||
|
|
||||||
-- Creature
|
-- Creature
|
||||||
( 36574, 36650, 0, 'Apply Phase Slip Vulnerability'),
|
( 36574, 36650, 0, 'Apply Phase Slip Vulnerability'),
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ void SummonList::DespawnAll()
|
|||||||
erase(begin());
|
erase(begin());
|
||||||
summon->SetVisibility(VISIBILITY_OFF);
|
summon->SetVisibility(VISIBILITY_OFF);
|
||||||
if(summon->isSummon() && !summon->isPet())
|
if(summon->isSummon() && !summon->isPet())
|
||||||
((TempSummon*)summon)->UnSummon();
|
CAST_SUM(summon)->UnSummon();
|
||||||
else
|
else
|
||||||
summon->setDeathState(JUST_DIED);
|
summon->setDeathState(JUST_DIED);
|
||||||
summon->RemoveCorpse();
|
summon->RemoveCorpse();
|
||||||
|
|||||||
@@ -13,18 +13,15 @@
|
|||||||
#include "CreatureAIImpl.h"
|
#include "CreatureAIImpl.h"
|
||||||
#include "InstanceData.h"
|
#include "InstanceData.h"
|
||||||
|
|
||||||
#define USE_DYNAMIC_CAST
|
#define SCRIPT_CAST_TYPE dynamic_cast
|
||||||
#ifdef USE_DYNAMIC_CAST
|
//#define SCRIPT_CAST_TYPE static_cast
|
||||||
#define CAST_PLR(a) (dynamic_cast<Player*>(a))
|
|
||||||
#define CAST_CRE(a) (dynamic_cast<Creature*>(a))
|
#define CAST_PLR(a) (SCRIPT_CAST_TYPE<Player*>(a))
|
||||||
#define CAST_VEH(a) (dynamic_cast<Vehicle*>(a))
|
#define CAST_CRE(a) (SCRIPT_CAST_TYPE<Creature*>(a))
|
||||||
#define CAST_AI(a,b) (dynamic_cast<a*>(b))
|
#define CAST_VEH(a) (SCRIPT_CAST_TYPE<Vehicle*>(a))
|
||||||
#else
|
#define CAST_SUM(a) (SCRIPT_CAST_TYPE<TempSummon*>(a))
|
||||||
#define CAST_PLR(a) (static_cast<Player*>(a))
|
#define CAST_PET(a) (SCRIPT_CAST_TYPE<Pet*>(a))
|
||||||
#define CAST_CRE(a) (static_cast<Creature*>(a))
|
#define CAST_AI(a,b) (SCRIPT_CAST_TYPE<a*>(b))
|
||||||
#define CAST_VEH(a) (static_cast<Vehicle*>(a))
|
|
||||||
#define CAST_AI(a,b) (static_cast<a*>(b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GET_SPELL(a) (const_cast<SpellEntry*>(GetSpellStore()->LookupEntry(a)))
|
#define GET_SPELL(a) (const_cast<SpellEntry*>(GetSpellStore()->LookupEntry(a)))
|
||||||
|
|
||||||
@@ -84,10 +81,10 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
|||||||
void SummonedCreatureDespawn(Creature* /*unit*/) {}
|
void SummonedCreatureDespawn(Creature* /*unit*/) {}
|
||||||
|
|
||||||
// Called when hit by a spell
|
// Called when hit by a spell
|
||||||
void SpellHit(Unit* caster, const SpellEntry*) {}
|
void SpellHit(Unit* caster, const SpellEntry *spell) {}
|
||||||
|
|
||||||
// Called when spell hits a target
|
// Called when spell hits a target
|
||||||
void SpellHitTarget(Unit* target, const SpellEntry*) {}
|
void SpellHitTarget(Unit* target, const SpellEntry *spell) {}
|
||||||
|
|
||||||
//Called at waypoint reached or PointMovement end
|
//Called at waypoint reached or PointMovement end
|
||||||
void MovementInform(uint32 type, uint32 id){}
|
void MovementInform(uint32 type, uint32 id){}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,223 +0,0 @@
|
|||||||
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
|
||||||
* This program is free software licensed under GPL version 2
|
|
||||||
* Please see the included DOCS/LICENSE.TXT for more information */
|
|
||||||
|
|
||||||
#ifndef SC_EVENTAI_H
|
|
||||||
#define SC_EVENTAI_H
|
|
||||||
|
|
||||||
#define MAX_ACTIONS 3
|
|
||||||
|
|
||||||
enum Event_Types
|
|
||||||
{
|
|
||||||
EVENT_T_TIMER = 0, //InitialMin, InitialMax, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_TIMER_OOC = 1, //InitialMin, InitialMax, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_HP = 2, //HPMax%, HPMin%, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_MANA = 3, //ManaMax%,ManaMin% RepeatMin, RepeatMax
|
|
||||||
EVENT_T_AGGRO = 4, //NONE
|
|
||||||
EVENT_T_KILL = 5, //RepeatMin, RepeatMax
|
|
||||||
EVENT_T_DEATH = 6, //NONE
|
|
||||||
EVENT_T_EVADE = 7, //NONE
|
|
||||||
EVENT_T_SPELLHIT = 8, //SpellID, School, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_RANGE = 9, //MinDist, MaxDist, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_OOC_LOS = 10, //NoHostile, NoFriendly, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_SPAWNED = 11, //NONE
|
|
||||||
EVENT_T_TARGET_HP = 12, //HPMax%, HPMin%, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_TARGET_CASTING = 13, //RepeatMin, RepeatMax
|
|
||||||
EVENT_T_FRIENDLY_HP = 14, //HPDeficit, Radius, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_FRIENDLY_IS_CC = 15, //DispelType, Radius, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_FRIENDLY_MISSING_BUFF = 16, //SpellId, Radius, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_SUMMONED_UNIT = 17, //CreatureId, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_TARGET_MANA = 18, //ManaMax%, ManaMin%, RepeatMin, RepeatMax
|
|
||||||
EVENT_T_QUEST_ACCEPT = 19, //QuestID
|
|
||||||
EVENT_T_QUEST_COMPLETE = 20, //
|
|
||||||
EVENT_T_REACHED_HOME = 21, //NONE
|
|
||||||
|
|
||||||
EVENT_T_END,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum Action_Types
|
|
||||||
{
|
|
||||||
ACTION_T_NONE = 0, //No action
|
|
||||||
ACTION_T_TEXT = 1, //-TextId1, optionally -TextId2, optionally -TextId3(if -TextId2 exist). If more than just -TextId1 is defined, randomize. Negative values.
|
|
||||||
ACTION_T_SET_FACTION = 2, //FactionId (or 0 for default)
|
|
||||||
ACTION_T_MORPH_TO_ENTRY_OR_MODEL = 3, //Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph)
|
|
||||||
ACTION_T_SOUND = 4, //SoundId
|
|
||||||
ACTION_T_EMOTE = 5, //EmoteId
|
|
||||||
ACTION_T_RANDOM_SAY = 6, //UNUSED
|
|
||||||
ACTION_T_RANDOM_YELL = 7, //UNUSED
|
|
||||||
ACTION_T_RANDOM_TEXTEMOTE = 8, //UNUSED
|
|
||||||
ACTION_T_RANDOM_SOUND = 9, //SoundId1, SoundId2, SoundId3 (-1 in any field means no output if randomed that field)
|
|
||||||
ACTION_T_RANDOM_EMOTE = 10, //EmoteId1, EmoteId2, EmoteId3 (-1 in any field means no output if randomed that field)
|
|
||||||
ACTION_T_CAST = 11, //SpellId, Target, CastFlags
|
|
||||||
ACTION_T_SUMMON = 12, //CreatureID, Target, Duration in ms
|
|
||||||
ACTION_T_THREAT_SINGLE_PCT = 13, //Threat%, Target
|
|
||||||
ACTION_T_THREAT_ALL_PCT = 14, //Threat%
|
|
||||||
ACTION_T_QUEST_EVENT = 15, //QuestID, Target
|
|
||||||
ACTION_T_CASTCREATUREGO = 16, //QuestID, SpellId, Target
|
|
||||||
ACTION_T_SET_UNIT_FIELD = 17, //Field_Number, Value, Target
|
|
||||||
ACTION_T_SET_UNIT_FLAG = 18, //Flags (may be more than one field OR'd together), Target
|
|
||||||
ACTION_T_REMOVE_UNIT_FLAG = 19, //Flags (may be more than one field OR'd together), Target
|
|
||||||
ACTION_T_AUTO_ATTACK = 20, //AllowAttackState (0 = stop attack, anything else means continue attacking)
|
|
||||||
ACTION_T_COMBAT_MOVEMENT = 21, //AllowCombatMovement (0 = stop combat based movement, anything else continue attacking)
|
|
||||||
ACTION_T_SET_PHASE = 22, //Phase
|
|
||||||
ACTION_T_INC_PHASE = 23, //Value (may be negative to decrement phase, should not be 0)
|
|
||||||
ACTION_T_EVADE = 24, //No Params
|
|
||||||
ACTION_T_FLEE = 25, //No Params
|
|
||||||
ACTION_T_QUEST_EVENT_ALL = 26, //QuestID
|
|
||||||
ACTION_T_CASTCREATUREGO_ALL = 27, //QuestId, SpellId
|
|
||||||
ACTION_T_REMOVEAURASFROMSPELL = 28, //Target, Spellid
|
|
||||||
ACTION_T_RANGED_MOVEMENT = 29, //Distance, Angle
|
|
||||||
ACTION_T_RANDOM_PHASE = 30, //PhaseId1, PhaseId2, PhaseId3
|
|
||||||
ACTION_T_RANDOM_PHASE_RANGE = 31, //PhaseMin, PhaseMax
|
|
||||||
ACTION_T_SUMMON_ID = 32, //CreatureId, Target, SpawnId
|
|
||||||
ACTION_T_KILLED_MONSTER = 33, //CreatureId, Target
|
|
||||||
ACTION_T_SET_INST_DATA = 34, //Field, Data
|
|
||||||
ACTION_T_SET_INST_DATA64 = 35, //Field, Target
|
|
||||||
ACTION_T_UPDATE_TEMPLATE = 36, //Entry, Team
|
|
||||||
ACTION_T_DIE = 37, //No Params
|
|
||||||
ACTION_T_ZONE_COMBAT_PULSE = 38, //No Params
|
|
||||||
|
|
||||||
ACTION_T_SET_ACTIVE = 101, //Apply
|
|
||||||
ACTION_T_SET_AGGRESSIVE = 102, //Apply
|
|
||||||
ACTION_T_ATTACK_START_PULSE = 103, //Distance
|
|
||||||
ACTION_T_SUMMON_GO = 104, //GameObjectID, DespawnTime in ms
|
|
||||||
|
|
||||||
ACTION_T_END,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum Target
|
|
||||||
{
|
|
||||||
//Self (m_creature)
|
|
||||||
TARGET_T_SELF = 0, //Self cast
|
|
||||||
|
|
||||||
//Hostile targets (if pet then returns pet owner)
|
|
||||||
TARGET_T_HOSTILE, //Our current target (ie: highest aggro)
|
|
||||||
TARGET_T_HOSTILE_SECOND_AGGRO, //Second highest aggro (generaly used for cleaves and some special attacks)
|
|
||||||
TARGET_T_HOSTILE_LAST_AGGRO, //Dead last on aggro (no idea what this could be used for)
|
|
||||||
TARGET_T_HOSTILE_RANDOM, //Just any random target on our threat list
|
|
||||||
TARGET_T_HOSTILE_RANDOM_NOT_TOP, //Any random target except top threat
|
|
||||||
|
|
||||||
//Invoker targets (if pet then returns pet owner)
|
|
||||||
TARGET_T_ACTION_INVOKER, //Unit who caused this Event to occur (only works for EVENT_T_AGGRO, EVENT_T_KILL, EVENT_T_DEATH, EVENT_T_SPELLHIT, EVENT_T_OOC_LOS, EVENT_T_FRIENDLY_HP, EVENT_T_FRIENDLY_IS_CC, EVENT_T_FRIENDLY_MISSING_BUFF)
|
|
||||||
|
|
||||||
//Hostile targets (including pets)
|
|
||||||
TARGET_T_HOSTILE_WPET, //Current target (can be a pet)
|
|
||||||
TARGET_T_HOSTILE_WPET_SECOND_AGGRO, //Second highest aggro (generaly used for cleaves and some special attacks)
|
|
||||||
TARGET_T_HOSTILE_WPET_LAST_AGGRO, //Dead last on aggro (no idea what this could be used for)
|
|
||||||
TARGET_T_HOSTILE_WPET_RANDOM, //Just any random target on our threat list
|
|
||||||
TARGET_T_HOSTILE_WPET_RANDOM_NOT_TOP, //Any random target except top threat
|
|
||||||
|
|
||||||
TARGET_T_ACTION_INVOKER_WPET,
|
|
||||||
|
|
||||||
TARGET_T_END
|
|
||||||
};
|
|
||||||
|
|
||||||
enum CastFlags
|
|
||||||
{
|
|
||||||
CAST_INTURRUPT_PREVIOUS = 0x01, //Interrupt any spell casting
|
|
||||||
CAST_TRIGGERED = 0x02, //Triggered (this makes spell cost zero mana and have no cast time)
|
|
||||||
CAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
|
|
||||||
CAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
|
|
||||||
CAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
|
|
||||||
CAST_AURA_NOT_PRESENT = 0x20, //Only casts the spell if the target does not have an aura from the spell
|
|
||||||
};
|
|
||||||
|
|
||||||
enum EventFlags
|
|
||||||
{
|
|
||||||
EFLAG_REPEATABLE = 0x01, //Event repeats
|
|
||||||
EFLAG_NORMAL = 0x02, //Event only occurs in Normal instance difficulty
|
|
||||||
EFLAG_HEROIC = 0x04, //Event only occurs in Heroic instance difficulty
|
|
||||||
EFLAG_RESERVED_3 = 0x08,
|
|
||||||
EFLAG_RESERVED_4 = 0x10,
|
|
||||||
EFLAG_RESERVED_5 = 0x20,
|
|
||||||
EFLAG_RESERVED_6 = 0x40,
|
|
||||||
EFLAG_DEBUG_ONLY = 0x80, //Event only occurs in debug build of SD2 only
|
|
||||||
};
|
|
||||||
|
|
||||||
struct EventAI_Event
|
|
||||||
{
|
|
||||||
uint32 event_id;
|
|
||||||
|
|
||||||
uint32 creature_id;
|
|
||||||
|
|
||||||
uint16 event_type;
|
|
||||||
uint32 event_inverse_phase_mask;
|
|
||||||
uint8 event_chance;
|
|
||||||
uint8 event_flags;
|
|
||||||
union
|
|
||||||
{
|
|
||||||
uint32 event_param1;
|
|
||||||
int32 event_param1_s;
|
|
||||||
};
|
|
||||||
union
|
|
||||||
{
|
|
||||||
uint32 event_param2;
|
|
||||||
int32 event_param2_s;
|
|
||||||
};
|
|
||||||
union
|
|
||||||
{
|
|
||||||
uint32 event_param3;
|
|
||||||
int32 event_param3_s;
|
|
||||||
};
|
|
||||||
union
|
|
||||||
{
|
|
||||||
uint32 event_param4;
|
|
||||||
int32 event_param4_s;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _action
|
|
||||||
{
|
|
||||||
uint16 type;
|
|
||||||
union
|
|
||||||
{
|
|
||||||
uint32 param1;
|
|
||||||
int32 param1_s;
|
|
||||||
};
|
|
||||||
union
|
|
||||||
{
|
|
||||||
uint32 param2;
|
|
||||||
int32 param2_s;
|
|
||||||
};
|
|
||||||
union
|
|
||||||
{
|
|
||||||
uint32 param3;
|
|
||||||
int32 param3_s;
|
|
||||||
};
|
|
||||||
}action[MAX_ACTIONS];
|
|
||||||
};
|
|
||||||
|
|
||||||
//Event_Map
|
|
||||||
extern UNORDERED_MAP<uint32, std::vector<EventAI_Event> > EventAI_Event_Map;
|
|
||||||
|
|
||||||
struct EventAI_Summon
|
|
||||||
{
|
|
||||||
uint32 id;
|
|
||||||
|
|
||||||
float position_x;
|
|
||||||
float position_y;
|
|
||||||
float position_z;
|
|
||||||
float orientation;
|
|
||||||
uint32 SpawnTimeSecs;
|
|
||||||
};
|
|
||||||
|
|
||||||
//EventSummon_Map
|
|
||||||
extern UNORDERED_MAP<uint32, EventAI_Summon> EventAI_Summon_Map;
|
|
||||||
|
|
||||||
//EventAI Error handling
|
|
||||||
extern uint32 EAI_ErrorLevel;
|
|
||||||
/*
|
|
||||||
|
|
||||||
struct EventAI_CreatureError
|
|
||||||
{
|
|
||||||
bool ListEmpty;
|
|
||||||
bool NoInstance;
|
|
||||||
};
|
|
||||||
|
|
||||||
//Error prevention list
|
|
||||||
extern UNORDERED_MAP<uint32, EventAI_CreatureError> EventAI_CreatureErrorPreventionList;
|
|
||||||
|
|
||||||
//Defines
|
|
||||||
#define EVENTAI_EMPTY_EVENTLIST "TSCR: Eventlist for Creature %i is empty but creature is using Mob_EventAI. Preventing EventAI on this creature."
|
|
||||||
*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ struct TRINITY_DLL_DECL npc_testAI : public npc_escortAI
|
|||||||
npc_escortAI::UpdateAI(diff);
|
npc_escortAI::UpdateAI(diff);
|
||||||
|
|
||||||
//Combat check
|
//Combat check
|
||||||
if (InCombat && m_creature->getVictim())
|
if (m_creature->isInCombat() && m_creature->getVictim())
|
||||||
{
|
{
|
||||||
if (DeathCoilTimer < diff)
|
if (DeathCoilTimer < diff)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,6 +33,18 @@ void npc_escortAI::AttackStart(Unit *who)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void npc_escortAI::EnterCombat(Unit* pEnemy)
|
||||||
|
{
|
||||||
|
if (!pEnemy)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Aggro(pEnemy);
|
||||||
|
}
|
||||||
|
|
||||||
|
void npc_escortAI::Aggro(Unit* pEnemy)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void npc_escortAI::MoveInLineOfSight(Unit *who)
|
void npc_escortAI::MoveInLineOfSight(Unit *who)
|
||||||
{
|
{
|
||||||
if (IsBeingEscorted && !Attack)
|
if (IsBeingEscorted && !Attack)
|
||||||
@@ -115,7 +127,7 @@ void npc_escortAI::UpdateAI(const uint32 diff)
|
|||||||
|
|
||||||
m_creature->setDeathState(JUST_DIED);
|
m_creature->setDeathState(JUST_DIED);
|
||||||
m_creature->SetHealth(0);
|
m_creature->SetHealth(0);
|
||||||
m_creature->CombatStop();
|
m_creature->CombatStop(true);
|
||||||
m_creature->DeleteThreatList();
|
m_creature->DeleteThreatList();
|
||||||
m_creature->Respawn();
|
m_creature->Respawn();
|
||||||
m_creature->GetMotionMaster()->Clear(true);
|
m_creature->GetMotionMaster()->Clear(true);
|
||||||
@@ -161,7 +173,7 @@ void npc_escortAI::UpdateAI(const uint32 diff)
|
|||||||
|
|
||||||
m_creature->setDeathState(JUST_DIED);
|
m_creature->setDeathState(JUST_DIED);
|
||||||
m_creature->SetHealth(0);
|
m_creature->SetHealth(0);
|
||||||
m_creature->CombatStop();
|
m_creature->CombatStop(true);
|
||||||
m_creature->DeleteThreatList();
|
m_creature->DeleteThreatList();
|
||||||
m_creature->Respawn();
|
m_creature->Respawn();
|
||||||
m_creature->GetMotionMaster()->Clear(true);
|
m_creature->GetMotionMaster()->Clear(true);
|
||||||
|
|||||||
@@ -34,12 +34,16 @@ struct TRINITY_DLL_DECL npc_escortAI : public ScriptedAI
|
|||||||
// Pure Virtual Functions
|
// Pure Virtual Functions
|
||||||
virtual void WaypointReached(uint32) = 0;
|
virtual void WaypointReached(uint32) = 0;
|
||||||
|
|
||||||
|
virtual void Aggro(Unit*);
|
||||||
|
|
||||||
// CreatureAI functions
|
// CreatureAI functions
|
||||||
npc_escortAI(Creature *c) : ScriptedAI(c), IsBeingEscorted(false), PlayerTimer(1000), MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE), CanMelee(true), DespawnAtEnd(true), DespawnAtFar(true)
|
npc_escortAI(Creature *c) : ScriptedAI(c), IsBeingEscorted(false), PlayerTimer(1000), MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE), CanMelee(true), DespawnAtEnd(true), DespawnAtFar(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void AttackStart(Unit* who);
|
void AttackStart(Unit* who);
|
||||||
|
|
||||||
|
void EnterCombat(Unit*);
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who);
|
void MoveInLineOfSight(Unit* who);
|
||||||
|
|
||||||
void JustRespawned();
|
void JustRespawned();
|
||||||
|
|||||||
@@ -43,12 +43,11 @@ EndContentData */
|
|||||||
# npc_chicken_cluck
|
# npc_chicken_cluck
|
||||||
#########*/
|
#########*/
|
||||||
|
|
||||||
#define EMOTE_A_HELLO -1070004
|
#define EMOTE_HELLO -1070004
|
||||||
#define EMOTE_H_HELLO -1070005
|
#define EMOTE_CLUCK_TEXT -1070006
|
||||||
#define EMOTE_CLUCK_TEXT2 -1070006
|
|
||||||
|
|
||||||
#define QUEST_CLUCK 3861
|
#define QUEST_CLUCK 3861
|
||||||
#define FACTION_FRIENDLY 84
|
#define FACTION_FRIENDLY 35
|
||||||
#define FACTION_CHICKEN 31
|
#define FACTION_CHICKEN 31
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
|
struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
|
||||||
@@ -60,7 +59,6 @@ struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
|
|||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
ResetFlagTimer = 120000;
|
ResetFlagTimer = 120000;
|
||||||
|
|
||||||
m_creature->setFaction(FACTION_CHICKEN);
|
m_creature->setFaction(FACTION_CHICKEN);
|
||||||
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||||
}
|
}
|
||||||
@@ -85,31 +83,24 @@ struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
|
|||||||
|
|
||||||
void ReceiveEmote( Player *player, uint32 emote )
|
void ReceiveEmote( Player *player, uint32 emote )
|
||||||
{
|
{
|
||||||
if( emote == TEXTEMOTE_CHICKEN )
|
switch( emote )
|
||||||
{
|
{
|
||||||
if( player->GetTeam() == ALLIANCE )
|
case TEXTEMOTE_CHICKEN:
|
||||||
{
|
if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE && rand()%30 == 1 )
|
||||||
if( rand()%30 == 1 )
|
|
||||||
{
|
{
|
||||||
if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE )
|
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||||
{
|
m_creature->setFaction(FACTION_FRIENDLY);
|
||||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
DoScriptText(EMOTE_HELLO, m_creature);
|
||||||
m_creature->setFaction(FACTION_FRIENDLY);
|
|
||||||
DoScriptText(EMOTE_A_HELLO, m_creature);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
else
|
case TEXTEMOTE_CHEER:
|
||||||
DoScriptText(EMOTE_H_HELLO,m_creature);
|
if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE )
|
||||||
}
|
{
|
||||||
if( emote == TEXTEMOTE_CHEER && player->GetTeam() == ALLIANCE )
|
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||||
{
|
m_creature->setFaction(FACTION_FRIENDLY);
|
||||||
if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE )
|
DoScriptText(EMOTE_CLUCK_TEXT, m_creature);
|
||||||
{
|
}
|
||||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
break;
|
||||||
m_creature->setFaction(FACTION_FRIENDLY);
|
|
||||||
DoScriptText(EMOTE_CLUCK_TEXT2, m_creature);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -350,8 +350,6 @@ struct TRINITY_DLL_DECL mob_ethereal_apprenticeAI : public ScriptedAI
|
|||||||
isFireboltTurn = true;
|
isFireboltTurn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who) {}
|
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if(!UpdateVictim())
|
if(!UpdateVictim())
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ struct TRINITY_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_talon_king_ikissAI(Creature *c) : ScriptedAI(c)
|
boss_talon_king_ikissAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
+7
-11
@@ -30,21 +30,17 @@ struct TRINITY_DLL_DECL instance_sethekk_halls : public ScriptedInstance
|
|||||||
{
|
{
|
||||||
instance_sethekk_halls(Map *map) : ScriptedInstance(map) {Initialize();};
|
instance_sethekk_halls(Map *map) : ScriptedInstance(map) {Initialize();};
|
||||||
|
|
||||||
GameObject *IkissDoor;
|
uint64 m_uiIkissDoorGUID;
|
||||||
|
|
||||||
void Initialize()
|
void Initialize()
|
||||||
{
|
{
|
||||||
IkissDoor = NULL;
|
m_uiIkissDoorGUID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnGameObjectCreate(GameObject *go, bool add)
|
void OnGameObjectCreate(GameObject *pGo, bool add)
|
||||||
{
|
{
|
||||||
switch(go->GetEntry())
|
if (pGo->GetEntry() == IKISS_DOOR)
|
||||||
{
|
m_uiIkissDoorGUID = pGo->GetGUID();
|
||||||
case IKISS_DOOR:
|
|
||||||
IkissDoor = go;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetData(uint32 type, uint32 data)
|
void SetData(uint32 type, uint32 data)
|
||||||
@@ -52,8 +48,8 @@ struct TRINITY_DLL_DECL instance_sethekk_halls : public ScriptedInstance
|
|||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case DATA_IKISSDOOREVENT:
|
case DATA_IKISSDOOREVENT:
|
||||||
if( IkissDoor )
|
if (data == DONE)
|
||||||
IkissDoor->SetGoState(GO_STATE_ACTIVE);
|
DoUseDoorOrButton(m_uiIkissDoorGUID,DAY*IN_MILISECONDS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_ambassador_hellmawAI(Creature *c) : ScriptedAI(c)
|
boss_ambassador_hellmawAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ struct TRINITY_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_blackheart_the_inciterAI(Creature *c) : ScriptedAI(c)
|
boss_blackheart_the_inciterAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
+1
-1
@@ -126,7 +126,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_grandmaster_vorpilAI(Creature *c) : ScriptedAI(c)
|
boss_grandmaster_vorpilAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
Intro = false;
|
Intro = false;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-25
@@ -73,8 +73,16 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
|||||||
{
|
{
|
||||||
switch(go->GetEntry())
|
switch(go->GetEntry())
|
||||||
{
|
{
|
||||||
case REFECTORY_DOOR: RefectoryDoorGUID = go->GetGUID(); break;
|
case REFECTORY_DOOR:
|
||||||
case SCREAMING_HALL_DOOR: ScreamingHallDoorGUID = go->GetGUID(); break;
|
RefectoryDoorGUID = go->GetGUID();
|
||||||
|
if (Encounter[2] == DONE)
|
||||||
|
DoUseDoorOrButton(RefectoryDoorGUID);
|
||||||
|
break;
|
||||||
|
case SCREAMING_HALL_DOOR:
|
||||||
|
ScreamingHallDoorGUID = go->GetGUID();
|
||||||
|
if (Encounter[3] == DONE)
|
||||||
|
DoUseDoorOrButton(ScreamingHallDoorGUID);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,23 +100,6 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Player* GetPlayerInMap()
|
|
||||||
{
|
|
||||||
Map::PlayerList const& players = instance->GetPlayers();
|
|
||||||
|
|
||||||
if (!players.isEmpty())
|
|
||||||
{
|
|
||||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
|
||||||
{
|
|
||||||
if (Player* plr = itr->getSource())
|
|
||||||
return plr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
debug_log("TSCR: Instance Shadow Labyrinth: GetPlayerInMap, but PlayerList is empty!");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetData(uint32 type, uint32 data)
|
void SetData(uint32 type, uint32 data)
|
||||||
{
|
{
|
||||||
switch(type)
|
switch(type)
|
||||||
@@ -134,17 +125,13 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance
|
|||||||
|
|
||||||
case DATA_BLACKHEARTTHEINCITEREVENT:
|
case DATA_BLACKHEARTTHEINCITEREVENT:
|
||||||
if( data == DONE )
|
if( data == DONE )
|
||||||
{
|
DoUseDoorOrButton(RefectoryDoorGUID);
|
||||||
HandleGameObject(RefectoryDoorGUID, true);
|
|
||||||
}
|
|
||||||
Encounter[2] = data;
|
Encounter[2] = data;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DATA_GRANDMASTERVORPILEVENT:
|
case DATA_GRANDMASTERVORPILEVENT:
|
||||||
if( data == DONE )
|
if( data == DONE )
|
||||||
{
|
DoUseDoorOrButton(ScreamingHallDoorGUID);
|
||||||
HandleGameObject(ScreamingHallDoorGUID, true);
|
|
||||||
}
|
|
||||||
Encounter[3] = data;
|
Encounter[3] = data;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ struct TRINITY_DLL_DECL boss_elder_nadoxAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_elder_nadoxAI(Creature *c) : ScriptedAI(c)
|
boss_elder_nadoxAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = c->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ struct TRINITY_DLL_DECL mob_ahnkahar_nerubianAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_ahnkahar_nerubianAI(Creature *c) : ScriptedAI(c)
|
mob_ahnkahar_nerubianAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ struct TRINITY_DLL_DECL npc_draenei_survivorAI : public ScriptedAI
|
|||||||
m_creature->GetMotionMaster()->MoveIdle();
|
m_creature->GetMotionMaster()->MoveIdle();
|
||||||
m_creature->setDeathState(JUST_DIED);
|
m_creature->setDeathState(JUST_DIED);
|
||||||
m_creature->SetHealth(0);
|
m_creature->SetHealth(0);
|
||||||
m_creature->CombatStop();
|
m_creature->CombatStop(true);
|
||||||
m_creature->DeleteThreatList();
|
m_creature->DeleteThreatList();
|
||||||
m_creature->RemoveCorpse();
|
m_creature->RemoveCorpse();
|
||||||
}else RunAwayTimer -= diff;
|
}else RunAwayTimer -= diff;
|
||||||
@@ -582,8 +582,6 @@ struct TRINITY_DLL_DECL npc_nestlewood_owlkinAI : public ScriptedAI
|
|||||||
m_creature->SetVisibility(VISIBILITY_ON);
|
m_creature->SetVisibility(VISIBILITY_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit *who) {}
|
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
//timer gets adjusted by the triggered aura effect
|
//timer gets adjusted by the triggered aura effect
|
||||||
@@ -595,7 +593,7 @@ struct TRINITY_DLL_DECL npc_nestlewood_owlkinAI : public ScriptedAI
|
|||||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||||
m_creature->setDeathState(JUST_DIED);
|
m_creature->setDeathState(JUST_DIED);
|
||||||
m_creature->SetHealth(0);
|
m_creature->SetHealth(0);
|
||||||
m_creature->CombatStop();
|
m_creature->CombatStop(true);
|
||||||
m_creature->DeleteThreatList();
|
m_creature->DeleteThreatList();
|
||||||
m_creature->RemoveCorpse();
|
m_creature->RemoveCorpse();
|
||||||
}else DespawnTimer -= diff;
|
}else DespawnTimer -= diff;
|
||||||
@@ -624,7 +622,7 @@ bool EffectDummyCreature_npc_nestlewood_owlkin(Unit *pCaster, uint32 spellId, ui
|
|||||||
pCreatureTarget->UpdateEntry(ENTRY_OWLKIN_INOC);
|
pCreatureTarget->UpdateEntry(ENTRY_OWLKIN_INOC);
|
||||||
|
|
||||||
//set despawn timer, since we want to remove creature after a short time
|
//set despawn timer, since we want to remove creature after a short time
|
||||||
((npc_nestlewood_owlkinAI*)pCreatureTarget->AI())->DespawnTimer = 15000;
|
CAST_AI(npc_nestlewood_owlkinAI, pCreatureTarget->AI())->DespawnTimer = 15000;
|
||||||
|
|
||||||
//always return true when we are handling this spell and effect
|
//always return true when we are handling this spell and effect
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ struct TRINITY_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
m_creature->RemoveAllAuras();
|
m_creature->RemoveAllAuras();
|
||||||
m_creature->DeleteThreatList();
|
m_creature->DeleteThreatList();
|
||||||
m_creature->CombatStop();
|
m_creature->CombatStop(true);
|
||||||
|
|
||||||
m_creature->StopMoving();
|
m_creature->StopMoving();
|
||||||
m_creature->GetMotionMaster()->MoveIdle();
|
m_creature->GetMotionMaster()->MoveIdle();
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ struct TRINITY_DLL_DECL mob_doom_blossomAI : public ScriptedAI
|
|||||||
CheckTeronTimer = 5000;
|
CheckTeronTimer = 5000;
|
||||||
}else CheckTeronTimer -= diff;
|
}else CheckTeronTimer -= diff;
|
||||||
|
|
||||||
if(ShadowBoltTimer < diff && InCombat)
|
if(ShadowBoltTimer < diff && m_creature->isInCombat())
|
||||||
{
|
{
|
||||||
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_SHADOWBOLT);
|
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_SHADOWBOLT);
|
||||||
ShadowBoltTimer = 10000;
|
ShadowBoltTimer = 10000;
|
||||||
@@ -255,7 +255,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
|||||||
m_creature->AddThreat(who, 1.0f);
|
m_creature->AddThreat(who, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!InCombat && !Intro && m_creature->IsWithinDistInMap(who, 60.0f) && (who->GetTypeId() == TYPEID_PLAYER))
|
if(!m_creature->isInCombat() && !Intro && m_creature->IsWithinDistInMap(who, 60.0f) && (who->GetTypeId() == TYPEID_PLAYER))
|
||||||
{
|
{
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_TERONGOREFIENDEVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_TERONGOREFIENDEVENT, IN_PROGRESS);
|
||||||
@@ -427,7 +427,6 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
|||||||
DoomBlossom->setFaction(m_creature->getFaction());
|
DoomBlossom->setFaction(m_creature->getFaction());
|
||||||
DoomBlossom->AddThreat(target, 1.0f);
|
DoomBlossom->AddThreat(target, 1.0f);
|
||||||
((mob_doom_blossomAI*)DoomBlossom->AI())->SetTeronGUID(m_creature->GetGUID());
|
((mob_doom_blossomAI*)DoomBlossom->AI())->SetTeronGUID(m_creature->GetGUID());
|
||||||
((mob_doom_blossomAI*)DoomBlossom->AI())->InCombat = true;
|
|
||||||
SetThreatList(DoomBlossom);
|
SetThreatList(DoomBlossom);
|
||||||
SummonDoomBlossomTimer = 35000;
|
SummonDoomBlossomTimer = 35000;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_gurtogg_bloodboilAI(Creature *c) : ScriptedAI(c)
|
boss_gurtogg_bloodboilAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ EndScriptData */
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
#include "def_black_temple.h"
|
#include "def_black_temple.h"
|
||||||
|
|
||||||
#define GETGO(obj, guid) GameObject* obj = GameObject::GetGameObject(*m_creature, guid)
|
#define GETGO(obj, guid) GameObject* obj = pInstance->instance->GetGameObject(pInstance->GetData64(guid))
|
||||||
#define GETUNIT(unit, guid) Unit* unit = Unit::GetUnit(*m_creature, guid)
|
#define GETUNIT(unit, guid) Unit* unit = Unit::GetUnit(*m_creature, guid)
|
||||||
#define GETCRE(cre, guid) Creature* cre = Unit::GetCreature(*m_creature, guid)
|
#define GETCRE(cre, guid) Creature* cre = Unit::GetCreature(*m_creature, guid)
|
||||||
#define HPPCT(unit) unit->GetHealth()*100 / unit->GetMaxHealth()
|
#define HPPCT(unit) unit->GetHealth()*100 / unit->GetMaxHealth()
|
||||||
@@ -366,7 +366,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_illidan_stormrageAI(Creature* c) : ScriptedAI(c), Summons(m_creature)
|
boss_illidan_stormrageAI(Creature* c) : ScriptedAI(c), Summons(m_creature)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
|
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
|
||||||
|
|
||||||
SpellEntry *TempSpell = GET_SPELL(SPELL_SHADOWFIEND_PASSIVE);
|
SpellEntry *TempSpell = GET_SPELL(SPELL_SHADOWFIEND_PASSIVE);
|
||||||
@@ -459,9 +459,8 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
|||||||
|
|
||||||
for(uint8 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L + 1; ++i)
|
for(uint8 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L + 1; ++i)
|
||||||
{
|
{
|
||||||
GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(i));
|
if (GameObject* pDoor = pInstance->instance->GetGameObject(pInstance->GetData64(i)))
|
||||||
if(Door)
|
pDoor->SetGoState(GO_STATE_ACTIVE); // Open Doors
|
||||||
Door->SetGoState(GO_STATE_ACTIVE); // Open Doors
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,7 +565,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
GlaiveGUID[i] = Glaive->GetGUID();
|
GlaiveGUID[i] = Glaive->GetGUID();
|
||||||
Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
Glaive->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
|
Glaive->SetDisplayId(11686);
|
||||||
Glaive->setFaction(m_creature->getFaction());
|
Glaive->setFaction(m_creature->getFaction());
|
||||||
DoCast(Glaive, SPELL_THROW_GLAIVE2);
|
DoCast(Glaive, SPELL_THROW_GLAIVE2);
|
||||||
}
|
}
|
||||||
@@ -582,7 +581,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
GlaiveGUID[i] = Glaive->GetGUID();
|
GlaiveGUID[i] = Glaive->GetGUID();
|
||||||
Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
Glaive->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
|
Glaive->SetDisplayId(11686);
|
||||||
Glaive->setFaction(m_creature->getFaction());
|
Glaive->setFaction(m_creature->getFaction());
|
||||||
DoCast(Glaive, SPELL_THROW_GLAIVE, true);
|
DoCast(Glaive, SPELL_THROW_GLAIVE, true);
|
||||||
}
|
}
|
||||||
@@ -610,7 +609,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
|||||||
if(Glaive)
|
if(Glaive)
|
||||||
{
|
{
|
||||||
Glaive->CastSpell(m_creature, SPELL_GLAIVE_RETURNS, false); // Make it look like the Glaive flies back up to us
|
Glaive->CastSpell(m_creature, SPELL_GLAIVE_RETURNS, false); // Make it look like the Glaive flies back up to us
|
||||||
Glaive->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686); // disappear but not die for now
|
Glaive->SetDisplayId(11686); // disappear but not die for now
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -655,7 +654,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
|||||||
DoCast(m_creature, DemonTransformation[TransformCount].aura, true);
|
DoCast(m_creature, DemonTransformation[TransformCount].aura, true);
|
||||||
|
|
||||||
if(DemonTransformation[TransformCount].displayid)
|
if(DemonTransformation[TransformCount].displayid)
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, DemonTransformation[TransformCount].displayid); // It's morphin time!
|
m_creature->SetDisplayId(DemonTransformation[TransformCount].displayid); // It's morphin time!
|
||||||
|
|
||||||
if(DemonTransformation[TransformCount].equip)
|
if(DemonTransformation[TransformCount].equip)
|
||||||
{
|
{
|
||||||
@@ -973,7 +972,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
npc_akama_illidanAI(Creature* c) : ScriptedAI(c)
|
npc_akama_illidanAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -1038,10 +1037,9 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
|||||||
// Do not call reset in Akama's evade mode, as this will stop him from summoning minions after he kills the first bit
|
// Do not call reset in Akama's evade mode, as this will stop him from summoning minions after he kills the first bit
|
||||||
void EnterEvadeMode()
|
void EnterEvadeMode()
|
||||||
{
|
{
|
||||||
m_creature->InterruptNonMeleeSpells(true);
|
|
||||||
m_creature->RemoveAllAuras();
|
m_creature->RemoveAllAuras();
|
||||||
m_creature->DeleteThreatList();
|
m_creature->DeleteThreatList();
|
||||||
m_creature->CombatStop();
|
m_creature->CombatStop(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who) {}
|
void EnterCombat(Unit *who) {}
|
||||||
@@ -1102,7 +1100,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
|||||||
if(Creature* Channel = m_creature->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000))
|
if(Creature* Channel = m_creature->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000))
|
||||||
{
|
{
|
||||||
ChannelGUID = Channel->GetGUID();
|
ChannelGUID = Channel->GetGUID();
|
||||||
Channel->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686); // Invisible but spell visuals can still be seen.
|
Channel->SetDisplayId(11686); // Invisible but spell visuals can still be seen.
|
||||||
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||||
DoCast(Channel, SPELL_AKAMA_DOOR_FAIL);
|
DoCast(Channel, SPELL_AKAMA_DOOR_FAIL);
|
||||||
}
|
}
|
||||||
@@ -1630,7 +1628,7 @@ struct TRINITY_DLL_DECL cage_trap_triggerAI : public ScriptedAI
|
|||||||
DespawnTimer = 5000;
|
DespawnTimer = 5000;
|
||||||
if(who->HasAura(SPELL_ENRAGE))
|
if(who->HasAura(SPELL_ENRAGE))
|
||||||
who->RemoveAurasDueToSpell(SPELL_ENRAGE); // Dispel his enrage
|
who->RemoveAurasDueToSpell(SPELL_ENRAGE); // Dispel his enrage
|
||||||
//if(GameObject* CageTrap = GameObject::GetGameObject(*m_creature, CageTrapGUID))
|
//if(GameObject* CageTrap = pInstance->instance->GetGameObject(pInstance->GetData64(CageTrapGUID)))
|
||||||
// CageTrap->SetLootState(GO_JUST_DEACTIVATED);
|
// CageTrap->SetLootState(GO_JUST_DEACTIVATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1725,7 +1723,7 @@ struct TRINITY_DLL_DECL mob_parasitic_shadowfiendAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_parasitic_shadowfiendAI(Creature* c) : ScriptedAI(c)
|
mob_parasitic_shadowfiendAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -1795,7 +1793,7 @@ struct TRINITY_DLL_DECL blade_of_azzinothAI : public NullCreatureAI
|
|||||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||||
{
|
{
|
||||||
if(spell->Id == SPELL_THROW_GLAIVE2 || spell->Id == SPELL_THROW_GLAIVE)
|
if(spell->Id == SPELL_THROW_GLAIVE2 || spell->Id == SPELL_THROW_GLAIVE)
|
||||||
me->SetUInt32Value(UNIT_FIELD_DISPLAYID, 21431);//appear when hit by Illidan's glaive
|
me->SetDisplayId(21431);//appear when hit by Illidan's glaive
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1836,7 +1834,7 @@ void boss_illidan_stormrageAI::Reset()
|
|||||||
FlightCount = 0;
|
FlightCount = 0;
|
||||||
TransformCount = 0;
|
TransformCount = 0;
|
||||||
|
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 21135);
|
m_creature->SetDisplayId(21135);
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_shahrazAI(Creature *c) : ScriptedAI(c)
|
boss_shahrazAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_reliquary_of_soulsAI(Creature *c) : ScriptedAI(c)
|
boss_reliquary_of_soulsAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
EssenceGUID = 0;
|
EssenceGUID = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_shade_of_akamaAI(Creature* c) : ScriptedAI(c), summons(m_creature)
|
boss_shade_of_akamaAI(Creature* c) : ScriptedAI(c), summons(m_creature)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
AkamaGUID = pInstance ? pInstance->GetData64(DATA_AKAMA_SHADE) : 0;
|
AkamaGUID = pInstance ? pInstance->GetData64(DATA_AKAMA_SHADE) : 0;
|
||||||
m_creature->setActive(true);//if view distance is too low
|
m_creature->setActive(true);//if view distance is too low
|
||||||
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||||
@@ -257,17 +257,12 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Channeler->RemoveCorpse();
|
Channeler->RemoveCorpse();
|
||||||
Channeler->Respawn();
|
Channeler->Respawn();
|
||||||
Channeler->InterruptNonMeleeSpells(true);
|
|
||||||
Channeler->RemoveAurasDueToSpell(SPELL_SHADE_SOUL_CHANNEL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Channeler->isAlive())
|
Channeler->CastSpell(m_creature, SPELL_SHADE_SOUL_CHANNEL, true);
|
||||||
{
|
Channeler->CastSpell(m_creature, SPELL_SHADE_SOUL_CHANNEL_2, true);
|
||||||
Channeler->CastSpell(m_creature, SPELL_SHADE_SOUL_CHANNEL, true);
|
Channeler->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
Channeler->CastSpell(m_creature, SPELL_SHADE_SOUL_CHANNEL_2, true);
|
GridSearcherSucceeded = true;
|
||||||
Channeler->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
|
||||||
GridSearcherSucceeded = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else error_log("SD2 ERROR: No Channelers are stored in the list. This encounter will not work properly");
|
}else error_log("SD2 ERROR: No Channelers are stored in the list. This encounter will not work properly");
|
||||||
@@ -507,7 +502,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
ShadeHasDied = false;
|
ShadeHasDied = false;
|
||||||
StartCombat = false;
|
StartCombat = false;
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
ShadeGUID = pInstance ? pInstance->GetData64(DATA_SHADEOFAKAMA) : NOT_STARTED;
|
ShadeGUID = pInstance ? pInstance->GetData64(DATA_SHADEOFAKAMA) : NOT_STARTED;
|
||||||
m_creature->setActive(true);
|
m_creature->setActive(true);
|
||||||
EventBegun = false;
|
EventBegun = false;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_supremusAI(Creature *c) : ScriptedAI(c), summons(m_creature)
|
boss_supremusAI(Creature *c) : ScriptedAI(c), summons(m_creature)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -105,10 +105,12 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
|||||||
|
|
||||||
void ToggleDoors(bool close)
|
void ToggleDoors(bool close)
|
||||||
{
|
{
|
||||||
if(GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_SUPREMUS_DOORS)))
|
if(GameObject* Doors = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_SUPREMUS_DOORS)))
|
||||||
{
|
{
|
||||||
if(close) Doors->SetGoState(GO_STATE_READY); // Closed
|
if(close)
|
||||||
else Doors->SetGoState(GO_STATE_ACTIVE); // Open
|
Doors->SetGoState(GO_STATE_READY); // Closed
|
||||||
|
else
|
||||||
|
Doors->SetGoState(GO_STATE_ACTIVE); // Open
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_teron_gorefiendAI(Creature *c) : ScriptedAI(c)
|
boss_teron_gorefiendAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_najentusAI(Creature *c) : ScriptedAI(c)
|
boss_najentusAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_illidari_councilAI(Creature *c) : ScriptedAI(c)
|
mob_illidari_councilAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
for(uint8 i = 0; i < 4; ++i)
|
for(uint8 i = 0; i < 4; ++i)
|
||||||
Council[i] = 0;
|
Council[i] = 0;
|
||||||
}
|
}
|
||||||
@@ -240,7 +240,7 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
|||||||
|
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
|
m_creature->SetDisplayId(11686);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who) {}
|
void EnterCombat(Unit *who) {}
|
||||||
@@ -348,7 +348,7 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_illidari_councilAI(Creature* c) : ScriptedAI(c)
|
boss_illidari_councilAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
for(uint8 i = 0; i < 4; ++i)
|
for(uint8 i = 0; i < 4; ++i)
|
||||||
Council[i] = 0;
|
Council[i] = 0;
|
||||||
LoadedGUIDs = false;
|
LoadedGUIDs = false;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ struct TRINITY_DLL_DECL npc_grimstoneAI : public npc_escortAI
|
|||||||
{
|
{
|
||||||
npc_grimstoneAI(Creature *c) : npc_escortAI(c)
|
npc_grimstoneAI(Creature *c) : npc_escortAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
MobSpawnId = rand()%6;
|
MobSpawnId = rand()%6;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -622,7 +622,7 @@ struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI
|
|||||||
{
|
{
|
||||||
npc_marshal_windsorAI(Creature *c) : npc_escortAI(c)
|
npc_marshal_windsorAI(Creature *c) : npc_escortAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaypointReached(uint32 i)
|
void WaypointReached(uint32 i)
|
||||||
@@ -1079,7 +1079,7 @@ struct TRINITY_DLL_DECL npc_rocknotAI : public npc_escortAI
|
|||||||
{
|
{
|
||||||
npc_rocknotAI(Creature *c) : npc_escortAI(c)
|
npc_rocknotAI(Creature *c) : npc_escortAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -1098,7 +1098,7 @@ struct TRINITY_DLL_DECL npc_rocknotAI : public npc_escortAI
|
|||||||
|
|
||||||
void DoGo(uint32 id, uint32 state)
|
void DoGo(uint32 id, uint32 state)
|
||||||
{
|
{
|
||||||
if (GameObject *go = GameObject::GetGameObject(*m_creature,pInstance->GetData64(id)))
|
if (GameObject *go = pInstance->instance->GetGameObject(pInstance->GetData64(id)))
|
||||||
go->SetGoState((GOState)state);
|
go->SetGoState((GOState)state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,23 +114,6 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
|||||||
Encounter[i] = NOT_STARTED;
|
Encounter[i] = NOT_STARTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player* GetPlayerInMap()
|
|
||||||
{
|
|
||||||
Map::PlayerList const& players = instance->GetPlayers();
|
|
||||||
|
|
||||||
if (!players.isEmpty())
|
|
||||||
{
|
|
||||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
|
||||||
{
|
|
||||||
if (Player* plr = itr->getSource())
|
|
||||||
return plr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
debug_log("TSCR: Instance Blackrock Depths: GetPlayerInMap, but PlayerList is empty!");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnCreatureCreate(Creature *creature, bool add)
|
void OnCreatureCreate(Creature *creature, bool add)
|
||||||
{
|
{
|
||||||
switch(creature->GetEntry())
|
switch(creature->GetEntry())
|
||||||
@@ -166,14 +149,6 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
|||||||
|
|
||||||
void SetData(uint32 type, uint32 data)
|
void SetData(uint32 type, uint32 data)
|
||||||
{
|
{
|
||||||
Player *player = GetPlayerInMap();
|
|
||||||
|
|
||||||
if (!player)
|
|
||||||
{
|
|
||||||
debug_log("TSCR: Instance Blackrock Depths: SetData (Type: %u Data %u) cannot find any player.", type, data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
debug_log("TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
|
debug_log("TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ struct TRINITY_DLL_DECL boss_gythAI : public ScriptedAI
|
|||||||
Line2Count = 2;
|
Line2Count = 2;
|
||||||
|
|
||||||
//Invisible for event start
|
//Invisible for event start
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
|
m_creature->SetDisplayId(11686);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ struct TRINITY_DLL_DECL boss_gythAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
bAggro = true;
|
bAggro = true;
|
||||||
// Visible now!
|
// Visible now!
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 9723);
|
m_creature->SetDisplayId(9723);
|
||||||
m_creature->setFaction(14);
|
m_creature->setFaction(14);
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
} else Aggro_Timer -= diff;
|
} else Aggro_Timer -= diff;
|
||||||
@@ -180,7 +180,7 @@ struct TRINITY_DLL_DECL boss_gythAI : public ScriptedAI
|
|||||||
//Inturrupt any spell casting
|
//Inturrupt any spell casting
|
||||||
m_creature->InterruptNonMeleeSpells(false);
|
m_creature->InterruptNonMeleeSpells(false);
|
||||||
//Gyth model
|
//Gyth model
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, 9806);
|
m_creature->SetDisplayId(9806);
|
||||||
m_creature->SummonCreature(10429, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000);
|
m_creature->SummonCreature(10429, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000);
|
||||||
SummonedRend = true;
|
SummonedRend = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ struct TRINITY_DLL_DECL boss_aeonusAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_aeonusAI(Creature *c) : ScriptedAI(c)
|
boss_aeonusAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ struct TRINITY_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_chrono_lord_dejaAI(Creature *c) : ScriptedAI(c)
|
boss_chrono_lord_dejaAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ struct TRINITY_DLL_DECL boss_temporusAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_temporusAI(Creature *c) : ScriptedAI(c)
|
boss_temporusAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ struct TRINITY_DLL_DECL npc_medivh_bmAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
npc_medivh_bmAI(Creature *c) : ScriptedAI(c)
|
npc_medivh_bmAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -244,7 +244,7 @@ struct TRINITY_DLL_DECL npc_time_riftAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
npc_time_riftAI(Creature *c) : ScriptedAI(c)
|
npc_time_riftAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
+35
-52
@@ -95,23 +95,6 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
|
|||||||
NextPortal_Timer = 0;
|
NextPortal_Timer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player* GetPlayerInMap()
|
|
||||||
{
|
|
||||||
Map::PlayerList const& players = instance->GetPlayers();
|
|
||||||
|
|
||||||
if (!players.isEmpty())
|
|
||||||
{
|
|
||||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
|
||||||
{
|
|
||||||
if (Player* plr = itr->getSource())
|
|
||||||
return plr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
debug_log("TSCR: Instance Black Portal: GetPlayerInMap, but PlayerList is empty!");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateBMWorldState(uint32 id, uint32 state)
|
void UpdateBMWorldState(uint32 id, uint32 state)
|
||||||
{
|
{
|
||||||
Map::PlayerList const& players = instance->GetPlayers();
|
Map::PlayerList const& players = instance->GetPlayers();
|
||||||
@@ -158,7 +141,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
|
|||||||
//what other conditions to check?
|
//what other conditions to check?
|
||||||
bool CanProgressEvent()
|
bool CanProgressEvent()
|
||||||
{
|
{
|
||||||
if (!GetPlayerInMap())
|
if (instance->GetPlayers().isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -183,14 +166,6 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
|
|||||||
|
|
||||||
void SetData(uint32 type, uint32 data)
|
void SetData(uint32 type, uint32 data)
|
||||||
{
|
{
|
||||||
Player *player = GetPlayerInMap();
|
|
||||||
|
|
||||||
if (!player)
|
|
||||||
{
|
|
||||||
debug_log("TSCR: Instance Black Portal: SetData (Type: %u Data %u) cannot find any player.", type, data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case TYPE_MEDIVH:
|
case TYPE_MEDIVH:
|
||||||
@@ -201,11 +176,11 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
|
|||||||
|
|
||||||
if (!mShieldPercent)
|
if (!mShieldPercent)
|
||||||
{
|
{
|
||||||
if (Unit *medivh = Unit::GetUnit(*player,MedivhGUID))
|
if (Creature* pMedivh = instance->GetCreature(MedivhGUID))
|
||||||
{
|
{
|
||||||
if (medivh->isAlive())
|
if (pMedivh->isAlive())
|
||||||
{
|
{
|
||||||
medivh->DealDamage(medivh, medivh->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
pMedivh->DealDamage(pMedivh, pMedivh->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
Encounter[0] = FAIL;
|
Encounter[0] = FAIL;
|
||||||
Encounter[1] = NOT_STARTED;
|
Encounter[1] = NOT_STARTED;
|
||||||
}
|
}
|
||||||
@@ -225,11 +200,22 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
|
|||||||
if (data == DONE)
|
if (data == DONE)
|
||||||
{
|
{
|
||||||
//this may be completed further out in the post-event
|
//this may be completed further out in the post-event
|
||||||
if (Unit *medivh = Unit::GetUnit(*player,MedivhGUID))
|
debug_log("TSCR: Instance Dark Portal: Event completed.");
|
||||||
|
Map::PlayerList const& players = instance->GetPlayers();
|
||||||
|
|
||||||
|
if (!players.isEmpty())
|
||||||
{
|
{
|
||||||
debug_log("TSCR: Instance Dark Portal: Event completed.");
|
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||||
player->GroupEventHappens(QUEST_OPENING_PORTAL,medivh);
|
{
|
||||||
player->GroupEventHappens(QUEST_MASTER_TOUCH,medivh);
|
if (Player* pPlayer = itr->getSource())
|
||||||
|
{
|
||||||
|
if (pPlayer->GetQuestStatus(QUEST_OPENING_PORTAL) == QUEST_STATUS_INCOMPLETE)
|
||||||
|
pPlayer->AreaExploredOrEventHappens(QUEST_OPENING_PORTAL);
|
||||||
|
|
||||||
|
if (pPlayer->GetQuestStatus(QUEST_MASTER_TOUCH) == QUEST_STATUS_INCOMPLETE)
|
||||||
|
pPlayer->AreaExploredOrEventHappens(QUEST_MASTER_TOUCH);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,24 +258,25 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Unit* SummonedPortalBoss(Unit* source)
|
Creature* SummonedPortalBoss(Creature* pSource)
|
||||||
{
|
{
|
||||||
uint32 entry = RiftWaves[GetRiftWaveId()].PortalBoss;
|
uint32 entry = RiftWaves[GetRiftWaveId()].PortalBoss;
|
||||||
|
|
||||||
if (entry == RIFT_BOSS)
|
if (entry == RIFT_BOSS)
|
||||||
entry = RandRiftBoss();
|
entry = RandRiftBoss();
|
||||||
|
|
||||||
float x,y,z;
|
float x,y,z;
|
||||||
source->GetRandomPoint(source->GetPositionX(),source->GetPositionY(),source->GetPositionZ(),10.0f,x,y,z);
|
pSource->GetRandomPoint(pSource->GetPositionX(),pSource->GetPositionY(),pSource->GetPositionZ(),10.0f,x,y,z);
|
||||||
//normalize Z-level if we can, if rift is not at ground level.
|
//normalize Z-level if we can, if rift is not at ground level.
|
||||||
z = std::max(instance->GetHeight(x, y, MAX_HEIGHT), instance->GetWaterLevel(x, y));
|
z = std::max(instance->GetHeight(x, y, MAX_HEIGHT), instance->GetWaterLevel(x, y));
|
||||||
|
|
||||||
debug_log("TSCR: Instance Dark Portal: Summoning rift boss entry %u.",entry);
|
debug_log("TSCR: Instance Dark Portal: Summoning rift boss entry %u.",entry);
|
||||||
|
|
||||||
Unit *Summon = source->SummonCreature(entry,x,y,z,source->GetOrientation(),
|
Creature* pSummoned = pSource->SummonCreature(entry,x,y,z,pSource->GetOrientation(),
|
||||||
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||||
|
|
||||||
if (Summon)
|
if (pSummoned)
|
||||||
return Summon;
|
return pSummoned;
|
||||||
|
|
||||||
debug_log("TSCR: Instance Dark Portal: what just happened there? No boss, no loot, no fun...");
|
debug_log("TSCR: Instance Dark Portal: what just happened there? No boss, no loot, no fun...");
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -297,11 +284,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
|
|||||||
|
|
||||||
void DoSpawnPortal()
|
void DoSpawnPortal()
|
||||||
{
|
{
|
||||||
Player *player = GetPlayerInMap();
|
if (Creature* pMedivh = instance->GetCreature(MedivhGUID))
|
||||||
if (!player)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (Unit *medivh = Unit::GetUnit(*player,MedivhGUID))
|
|
||||||
{
|
{
|
||||||
int tmp = rand()%(4-1);
|
int tmp = rand()%(4-1);
|
||||||
|
|
||||||
@@ -311,26 +294,26 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
|
|||||||
|
|
||||||
CurrentRiftId = tmp;
|
CurrentRiftId = tmp;
|
||||||
|
|
||||||
Unit *temp = medivh->SummonCreature(C_TIME_RIFT,
|
Creature* pTemp = pMedivh->SummonCreature(C_TIME_RIFT,
|
||||||
PortalLocation[tmp][0],PortalLocation[tmp][1],PortalLocation[tmp][2],PortalLocation[tmp][3],
|
PortalLocation[tmp][0],PortalLocation[tmp][1],PortalLocation[tmp][2],PortalLocation[tmp][3],
|
||||||
TEMPSUMMON_CORPSE_DESPAWN,0);
|
TEMPSUMMON_CORPSE_DESPAWN,0);
|
||||||
if (temp)
|
if (pTemp)
|
||||||
{
|
{
|
||||||
|
|
||||||
temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
|
|
||||||
|
|
||||||
if (Unit* boss = SummonedPortalBoss(temp))
|
if (Creature* pBoss = SummonedPortalBoss(pTemp))
|
||||||
{
|
{
|
||||||
if (boss->GetEntry() == C_AEONUS)
|
if (pBoss->GetEntry() == C_AEONUS)
|
||||||
{
|
{
|
||||||
boss->AddThreat(medivh,0.0f);
|
pBoss->AddThreat(pMedivh,0.0f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
boss->AddThreat(temp,0.0f);
|
pBoss->AddThreat(pTemp,0.0f);
|
||||||
temp->CastSpell(boss,SPELL_RIFT_CHANNEL,false);
|
pTemp->CastSpell(pBoss,SPELL_RIFT_CHANNEL,false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
boss_anetheronAI(Creature *c) : hyjal_trashAI(c)
|
boss_anetheronAI(Creature *c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
SpellEntry *TempSpell = GET_SPELL(SPELL_SLEEP);
|
SpellEntry *TempSpell = GET_SPELL(SPELL_SLEEP);
|
||||||
@@ -225,7 +225,7 @@ struct TRINITY_DLL_DECL mob_towering_infernalAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_towering_infernalAI(Creature *c) : ScriptedAI(c)
|
mob_towering_infernalAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
AnetheronGUID = pInstance->GetData64(DATA_ANETHERON);
|
AnetheronGUID = pInstance->GetData64(DATA_ANETHERON);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ struct mob_ancient_wispAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_ancient_wispAI(Creature* c) : ScriptedAI(c)
|
mob_ancient_wispAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -206,7 +206,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
boss_archimondeAI(Creature *c) : hyjal_trashAI(c)
|
boss_archimondeAI(Creature *c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -458,7 +458,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public hyjal_trashAI
|
|||||||
if (Unit *Nordrassil = Unit::GetUnit(*m_creature, WorldTreeGUID))
|
if (Unit *Nordrassil = Unit::GetUnit(*m_creature, WorldTreeGUID))
|
||||||
{
|
{
|
||||||
Nordrassil->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
Nordrassil->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
Nordrassil->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
|
Nordrassil->SetDisplayId(11686);
|
||||||
DoCast(Nordrassil, SPELL_DRAIN_WORLD_TREE);
|
DoCast(Nordrassil, SPELL_DRAIN_WORLD_TREE);
|
||||||
IsChanneling = true;
|
IsChanneling = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ struct TRINITY_DLL_DECL boss_azgalorAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
boss_azgalorAI(Creature *c) : hyjal_trashAI(c)
|
boss_azgalorAI(Creature *c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
SpellEntry *TempSpell = GET_SPELL(SPELL_HOWL_OF_AZGALOR);
|
SpellEntry *TempSpell = GET_SPELL(SPELL_HOWL_OF_AZGALOR);
|
||||||
@@ -187,7 +187,7 @@ struct TRINITY_DLL_DECL mob_lesser_doomguardAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
mob_lesser_doomguardAI(Creature *c) : hyjal_trashAI(c)
|
mob_lesser_doomguardAI(Creature *c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
AzgalorGUID = pInstance->GetData64(DATA_AZGALOR);
|
AzgalorGUID = pInstance->GetData64(DATA_AZGALOR);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
boss_kazrogalAI(Creature *c) : hyjal_trashAI(c)
|
boss_kazrogalAI(Creature *c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
SpellEntry *TempSpell = GET_SPELL(SPELL_MARK);
|
SpellEntry *TempSpell = GET_SPELL(SPELL_MARK);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ struct TRINITY_DLL_DECL boss_rage_winterchillAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
boss_rage_winterchillAI(Creature *c) : hyjal_trashAI(c)
|
boss_rage_winterchillAI(Creature *c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ float HordeFirePos[65][8]=//spawn points for the fire visuals (GO) in the horde
|
|||||||
|
|
||||||
hyjalAI::hyjalAI(Creature *c) : npc_escortAI(c), Summons(m_creature)
|
hyjalAI::hyjalAI(Creature *c) : npc_escortAI(c), Summons(m_creature)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
VeinsSpawned[0] = false;
|
VeinsSpawned[0] = false;
|
||||||
VeinsSpawned[1] = false;
|
VeinsSpawned[1] = false;
|
||||||
for(uint8 i=0;i<14;i++)
|
for(uint8 i=0;i<14;i++)
|
||||||
@@ -409,11 +409,10 @@ void hyjalAI::Reset()
|
|||||||
|
|
||||||
void hyjalAI::EnterEvadeMode()
|
void hyjalAI::EnterEvadeMode()
|
||||||
{
|
{
|
||||||
m_creature->InterruptNonMeleeSpells(true);
|
|
||||||
if(m_creature->GetEntry() != JAINA)
|
if(m_creature->GetEntry() != JAINA)
|
||||||
m_creature->RemoveAllAuras();
|
m_creature->RemoveAllAuras();
|
||||||
m_creature->DeleteThreatList();
|
m_creature->DeleteThreatList();
|
||||||
m_creature->CombatStop();
|
m_creature->CombatStop(true);
|
||||||
m_creature->LoadCreaturesAddon();
|
m_creature->LoadCreaturesAddon();
|
||||||
|
|
||||||
if(m_creature->isAlive())
|
if(m_creature->isAlive())
|
||||||
@@ -728,8 +727,7 @@ void hyjalAI::DeSpawnVeins()
|
|||||||
if(!ai)return;
|
if(!ai)return;
|
||||||
for (uint8 i = 0; i<7; i++)
|
for (uint8 i = 0; i<7; i++)
|
||||||
{
|
{
|
||||||
GameObject* gem = GameObject::GetGameObject((*m_creature), ai->VeinGUID[i]);
|
if (GameObject* gem = pInstance->instance->GetGameObject(pInstance->GetData64(ai->VeinGUID[i])))
|
||||||
if(gem)
|
|
||||||
gem->RemoveFromWorld();
|
gem->RemoveFromWorld();
|
||||||
}
|
}
|
||||||
}else if (Faction)
|
}else if (Faction)
|
||||||
@@ -740,8 +738,7 @@ void hyjalAI::DeSpawnVeins()
|
|||||||
if(!ai)return;
|
if(!ai)return;
|
||||||
for (uint8 i = 7; i<14; i++)
|
for (uint8 i = 7; i<14; i++)
|
||||||
{
|
{
|
||||||
GameObject* gem = GameObject::GetGameObject((*m_creature), ai->VeinGUID[i]);
|
if(GameObject* gem = pInstance->instance->GetGameObject(pInstance->GetData64(ai->VeinGUID[i])))
|
||||||
if(gem)
|
|
||||||
gem->RemoveFromWorld();
|
gem->RemoveFromWorld();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ float HordeOverrunWP[21][3]=//waypoints in the horde base used in the end in the
|
|||||||
|
|
||||||
hyjal_trashAI::hyjal_trashAI(Creature *c) : npc_escortAI(c)
|
hyjal_trashAI::hyjal_trashAI(Creature *c) : npc_escortAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
IsEvent = false;
|
IsEvent = false;
|
||||||
Delay = 0;
|
Delay = 0;
|
||||||
LastOverronPos = 0;
|
LastOverronPos = 0;
|
||||||
@@ -375,13 +375,13 @@ struct mob_giant_infernalAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
mob_giant_infernalAI(Creature* c) : hyjal_trashAI(c)
|
mob_giant_infernalAI(Creature* c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
meteor = false;//call once!
|
meteor = false;//call once!
|
||||||
CanMove = false;
|
CanMove = false;
|
||||||
Delay = rand()%30000;
|
Delay = rand()%30000;
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_INVIS);
|
m_creature->SetDisplayId(MODEL_INVIS);
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
Reset();
|
Reset();
|
||||||
@@ -447,7 +447,7 @@ struct mob_giant_infernalAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
|
m_creature->SetDisplayId(m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
|
||||||
CanMove = true;
|
CanMove = true;
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
@@ -509,7 +509,7 @@ struct mob_abominationAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
mob_abominationAI(Creature* c) : hyjal_trashAI(c)
|
mob_abominationAI(Creature* c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
Reset();
|
Reset();
|
||||||
@@ -604,7 +604,7 @@ struct mob_ghoulAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
mob_ghoulAI(Creature* c) : hyjal_trashAI(c)
|
mob_ghoulAI(Creature* c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
Reset();
|
Reset();
|
||||||
@@ -707,7 +707,7 @@ struct mob_necromancerAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
mob_necromancerAI(Creature* c) : hyjal_trashAI(c), summons(m_creature)
|
mob_necromancerAI(Creature* c) : hyjal_trashAI(c), summons(m_creature)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
Reset();
|
Reset();
|
||||||
@@ -825,7 +825,7 @@ struct mob_bansheeAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
mob_bansheeAI(Creature* c) : hyjal_trashAI(c)
|
mob_bansheeAI(Creature* c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
Reset();
|
Reset();
|
||||||
@@ -924,7 +924,7 @@ struct mob_crypt_fiendAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
mob_crypt_fiendAI(Creature* c) : hyjal_trashAI(c)
|
mob_crypt_fiendAI(Creature* c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
Reset();
|
Reset();
|
||||||
@@ -1010,7 +1010,7 @@ struct mob_fel_stalkerAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
mob_fel_stalkerAI(Creature* c) : hyjal_trashAI(c)
|
mob_fel_stalkerAI(Creature* c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
Reset();
|
Reset();
|
||||||
@@ -1096,7 +1096,7 @@ struct mob_frost_wyrmAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
mob_frost_wyrmAI(Creature* c) : hyjal_trashAI(c)
|
mob_frost_wyrmAI(Creature* c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
Reset();
|
Reset();
|
||||||
@@ -1207,7 +1207,7 @@ struct mob_gargoyleAI : public hyjal_trashAI
|
|||||||
{
|
{
|
||||||
mob_gargoyleAI(Creature* c) : hyjal_trashAI(c)
|
mob_gargoyleAI(Creature* c) : hyjal_trashAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
go = false;
|
go = false;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
DummyTarget[0] = 0;DummyTarget[1] = 0;DummyTarget[2] = 0;
|
DummyTarget[0] = 0;DummyTarget[1] = 0;DummyTarget[2] = 0;
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ struct TRINITY_DLL_DECL boss_captain_skarlocAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_captain_skarlocAI(Creature *c) : ScriptedAI(c)
|
boss_captain_skarlocAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ struct TRINITY_DLL_DECL boss_epoch_hunterAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_epoch_hunterAI(Creature *c) : ScriptedAI(c)
|
boss_epoch_hunterAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
|||||||
{
|
{
|
||||||
npc_thrall_old_hillsbradAI(Creature *c) : npc_escortAI(c)
|
npc_thrall_old_hillsbradAI(Creature *c) : npc_escortAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
m_creature->setActive(true);
|
m_creature->setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
|||||||
//m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+3, 1038);
|
//m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+3, 1038);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, THRALL_MODEL_EQUIPPED);
|
m_creature->SetDisplayId(THRALL_MODEL_EQUIPPED);
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
SetRun();
|
SetRun();
|
||||||
@@ -375,7 +375,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
|||||||
HadMount = false;
|
HadMount = false;
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0);
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, THRALL_MODEL_UNEQUIPPED);
|
m_creature->SetDisplayId(THRALL_MODEL_UNEQUIPPED);
|
||||||
}
|
}
|
||||||
if( IsBeingEscorted )
|
if( IsBeingEscorted )
|
||||||
{
|
{
|
||||||
@@ -581,7 +581,7 @@ struct TRINITY_DLL_DECL npc_tarethaAI : public npc_escortAI
|
|||||||
{
|
{
|
||||||
npc_tarethaAI(Creature *c) : npc_escortAI(c)
|
npc_tarethaAI(Creature *c) : npc_escortAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
+4
-4
@@ -95,7 +95,7 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_fathomlord_karathressAI(Creature *c) : ScriptedAI(c)
|
boss_fathomlord_karathressAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
Advisors[0] = 0;
|
Advisors[0] = 0;
|
||||||
Advisors[1] = 0;
|
Advisors[1] = 0;
|
||||||
Advisors[2] = 0;
|
Advisors[2] = 0;
|
||||||
@@ -305,7 +305,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_fathomguard_sharkkisAI(Creature *c) : ScriptedAI(c)
|
boss_fathomguard_sharkkisAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -449,7 +449,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_fathomguard_tidalvessAI(Creature *c) : ScriptedAI(c)
|
boss_fathomguard_tidalvessAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -564,7 +564,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_fathomguard_caribdisAI(Creature *c) : ScriptedAI(c)
|
boss_fathomguard_caribdisAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
+176
-236
@@ -6,381 +6,321 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ScriptData
|
/* ScriptData
|
||||||
SDName: Boss_Hydross_The_Unstable
|
SDName: Boss_Hydross_The_Unstable
|
||||||
SD%Complete: 90
|
SD%Complete: 90
|
||||||
SDComment: Some details and adjustments left to do, probably nothing major. Spawns may be spawned in different way/location.
|
SDComment: Some details and adjustments left to do, probably nothing major. Spawns may be spawned in different way/location. code cleanup needed
|
||||||
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
|
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
|
||||||
EndScriptData */
|
EndScriptData */
|
||||||
|
|
||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
#include "def_serpent_shrine.h"
|
#include "def_serpent_shrine.h"
|
||||||
|
|
||||||
#define SAY_AGGRO -1548000
|
enum
|
||||||
#define SAY_SWITCH_TO_CLEAN -1548001
|
{
|
||||||
#define SAY_CLEAN_SLAY1 -1548002
|
SAY_AGGRO = -1548000,
|
||||||
#define SAY_CLEAN_SLAY2 -1548003
|
SAY_SWITCH_TO_CLEAN = -1548001,
|
||||||
#define SAY_CLEAN_DEATH -1548004
|
SAY_CLEAN_SLAY1 = -1548002,
|
||||||
#define SAY_SWITCH_TO_CORRUPT -1548005
|
SAY_CLEAN_SLAY2 = -1548003,
|
||||||
#define SAY_CORRUPT_SLAY1 -1548006
|
SAY_CLEAN_DEATH = -1548004,
|
||||||
#define SAY_CORRUPT_SLAY2 -1548007
|
SAY_SWITCH_TO_CORRUPT = -1548005,
|
||||||
#define SAY_CORRUPT_DEATH -1548008
|
SAY_CORRUPT_SLAY1 = -1548006,
|
||||||
|
SAY_CORRUPT_SLAY2 = -1548007,
|
||||||
|
SAY_CORRUPT_DEATH = -1548008,
|
||||||
|
|
||||||
#define SWITCH_RADIUS 18
|
SWITCH_RADIUS = 18,
|
||||||
|
|
||||||
#define MODEL_CORRUPT 20609
|
MODEL_CORRUPT = 20609,
|
||||||
#define MODEL_CLEAN 20162
|
MODEL_CLEAN = 20162,
|
||||||
|
|
||||||
#define SPELL_WATER_TOMB 38235
|
SPELL_WATER_TOMB = 38235,
|
||||||
#define SPELL_MARK_OF_HYDROSS1 38215
|
SPELL_MARK_OF_HYDROSS1 = 38215,
|
||||||
#define SPELL_MARK_OF_HYDROSS2 38216
|
SPELL_MARK_OF_HYDROSS2 = 38216,
|
||||||
#define SPELL_MARK_OF_HYDROSS3 38217
|
SPELL_MARK_OF_HYDROSS3 = 38217,
|
||||||
#define SPELL_MARK_OF_HYDROSS4 38218
|
SPELL_MARK_OF_HYDROSS4 = 38218,
|
||||||
#define SPELL_MARK_OF_HYDROSS5 38231
|
SPELL_MARK_OF_HYDROSS5 = 38231,
|
||||||
#define SPELL_MARK_OF_HYDROSS6 40584
|
SPELL_MARK_OF_HYDROSS6 = 40584,
|
||||||
#define SPELL_MARK_OF_CORRUPTION1 38219
|
SPELL_MARK_OF_CORRUPTION1 = 38219,
|
||||||
#define SPELL_MARK_OF_CORRUPTION2 38220
|
SPELL_MARK_OF_CORRUPTION2 = 38220,
|
||||||
#define SPELL_MARK_OF_CORRUPTION3 38221
|
SPELL_MARK_OF_CORRUPTION3 = 38221,
|
||||||
#define SPELL_MARK_OF_CORRUPTION4 38222
|
SPELL_MARK_OF_CORRUPTION4 = 38222,
|
||||||
#define SPELL_MARK_OF_CORRUPTION5 38230
|
SPELL_MARK_OF_CORRUPTION5 = 38230,
|
||||||
#define SPELL_MARK_OF_CORRUPTION6 40583
|
SPELL_MARK_OF_CORRUPTION6 = 40583,
|
||||||
#define SPELL_VILE_SLUDGE 38246
|
SPELL_VILE_SLUDGE = 38246,
|
||||||
#define SPELL_ENRAGE 27680 //this spell need verification
|
SPELL_ENRAGE = 27680, //this spell need verification
|
||||||
#define SPELL_SUMMON_WATER_ELEMENT 36459 //not in use yet(in use ever?)
|
SPELL_SUMMON_WATER_ELEMENT = 36459, //not in use yet(in use ever?)
|
||||||
#define SPELL_ELEMENTAL_SPAWNIN 25035
|
SPELL_ELEMENTAL_SPAWNIN = 25035,
|
||||||
#define SPELL_BLUE_BEAM /*40227*/40227 //channeled Hydross Beam Helper (not in use yet)
|
SPELL_BLUE_BEAM = 38015, //channeled Hydross Beam Helper (not in use yet)
|
||||||
|
|
||||||
#define ENTRY_PURE_SPAWN 22035
|
NPC_PURE_SPAWN = 22035,
|
||||||
#define ENTRY_TAINTED_SPAWN 22036
|
NPC_TAINTED_SPAWN = 22036
|
||||||
#define ENTRY_BEAM_DUMMY 21934
|
};
|
||||||
|
|
||||||
#define HYDROSS_X -239.439
|
const float afSpawnDiffs[4][2] =
|
||||||
#define HYDROSS_Y -363.481
|
{
|
||||||
|
{6.934003f , -11.255012f}, // diff 1
|
||||||
#define SPAWN_X_DIFF1 6.934003
|
{-6.934003f , 11.255012f }, // diff 2
|
||||||
#define SPAWN_Y_DIFF1 -11.255012
|
{-12.577011f, -4.72702f }, // diff 3
|
||||||
#define SPAWN_X_DIFF2 -6.934003
|
{12.577011f , 4.72702f } // diff 4
|
||||||
#define SPAWN_Y_DIFF2 11.255012
|
};
|
||||||
#define SPAWN_X_DIFF3 -12.577011
|
|
||||||
#define SPAWN_Y_DIFF3 -4.72702
|
|
||||||
#define SPAWN_X_DIFF4 12.577011
|
|
||||||
#define SPAWN_Y_DIFF4 4.72702
|
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_hydross_the_unstableAI(Creature *c) : ScriptedAI(c), Summons(m_creature)
|
boss_hydross_the_unstableAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
m_pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* m_pInstance; // the instance
|
||||||
uint64 beams[2];
|
|
||||||
uint32 PosCheck_Timer;
|
uint32 m_uiPosCheck_Timer;
|
||||||
uint32 MarkOfHydross_Timer;
|
uint32 m_uiMarkOfHydross_Timer;
|
||||||
uint32 MarkOfCorruption_Timer;
|
uint32 m_uiMarkOfCorruption_Timer;
|
||||||
uint32 WaterTomb_Timer;
|
uint32 m_uiWaterTomb_Timer;
|
||||||
uint32 VileSludge_Timer;
|
uint32 m_uiVileSludge_Timer;
|
||||||
uint32 MarkOfHydross_Count;
|
uint32 m_uiMarkOfHydross_Count;
|
||||||
uint32 MarkOfCorruption_Count;
|
uint32 m_uiMarkOfCorruption_Count;
|
||||||
uint32 EnrageTimer;
|
uint32 m_uiEnrageTimer;
|
||||||
bool CorruptedForm;
|
bool m_bCorruptedForm;
|
||||||
bool beam;
|
|
||||||
SummonList Summons;
|
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
DeSummonBeams();
|
m_uiPosCheck_Timer = 2500;
|
||||||
beams[0] = 0;
|
m_uiMarkOfHydross_Timer = 15000;
|
||||||
beams[1] = 0;
|
m_uiMarkOfCorruption_Timer = 15000;
|
||||||
PosCheck_Timer = 2500;
|
m_uiWaterTomb_Timer = 7000;
|
||||||
MarkOfHydross_Timer = 15000;
|
m_uiVileSludge_Timer = 7000;
|
||||||
MarkOfCorruption_Timer = 15000;
|
m_uiMarkOfHydross_Count = 0;
|
||||||
WaterTomb_Timer = 7000;
|
m_uiMarkOfCorruption_Count = 0;
|
||||||
VileSludge_Timer = 7000;
|
m_uiEnrageTimer = 600000;
|
||||||
MarkOfHydross_Count = 0;
|
|
||||||
MarkOfCorruption_Count = 0;
|
m_bCorruptedForm = false;
|
||||||
EnrageTimer = 600000;
|
|
||||||
|
|
||||||
CorruptedForm = false;
|
|
||||||
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
|
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
|
||||||
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||||
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
|
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
|
||||||
|
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_CLEAN);
|
m_creature->SetDisplayId(MODEL_CLEAN);
|
||||||
|
|
||||||
if (pInstance)
|
if (m_pInstance)
|
||||||
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
|
m_pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
|
||||||
beam = false;
|
|
||||||
Summons.DespawnAll();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonBeams()
|
void Aggro(Unit* pWho)
|
||||||
{
|
|
||||||
Creature* beamer = m_creature->SummonCreature(ENTRY_BEAM_DUMMY,-258.333,-356.34,22.0499,5.90835,TEMPSUMMON_CORPSE_DESPAWN,0);
|
|
||||||
if(beamer)
|
|
||||||
{
|
|
||||||
beamer->CastSpell(m_creature,SPELL_BLUE_BEAM,true);
|
|
||||||
beamer->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
|
|
||||||
beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
|
||||||
beams[0]=beamer->GetGUID();
|
|
||||||
}
|
|
||||||
beamer = beamer = m_creature->SummonCreature(ENTRY_BEAM_DUMMY,-219.918,-371.308,22.0042,2.73072,TEMPSUMMON_CORPSE_DESPAWN,0);
|
|
||||||
if(beamer)
|
|
||||||
{
|
|
||||||
beamer->CastSpell(m_creature,SPELL_BLUE_BEAM,true);
|
|
||||||
beamer->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
|
|
||||||
beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
|
||||||
beams[1]=beamer->GetGUID();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void DeSummonBeams()
|
|
||||||
{
|
|
||||||
for(uint8 i=0;i<2;i++)
|
|
||||||
{
|
|
||||||
Creature* mob = Unit::GetCreature(*m_creature,beams[i]);
|
|
||||||
if(mob)
|
|
||||||
{
|
|
||||||
mob->setDeathState(DEAD);
|
|
||||||
mob->RemoveCorpse();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void EnterCombat(Unit *who)
|
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
|
|
||||||
if (pInstance)
|
if (m_pInstance)
|
||||||
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
|
m_pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit *victim)
|
void KilledUnit(Unit* pVictim)
|
||||||
{
|
{
|
||||||
if (CorruptedForm)
|
if (m_bCorruptedForm)
|
||||||
{
|
DoScriptText(urand(0,1) ? SAY_CORRUPT_SLAY1 : SAY_CORRUPT_SLAY2, m_creature);
|
||||||
switch(rand()%2)
|
|
||||||
{
|
|
||||||
case 0: DoScriptText(SAY_CORRUPT_SLAY1, m_creature); break;
|
|
||||||
case 1: DoScriptText(SAY_CORRUPT_SLAY2, m_creature); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
DoScriptText(urand(0,1) ? SAY_CLEAN_SLAY1 : SAY_CLEAN_SLAY2, m_creature);
|
||||||
switch(rand()%2)
|
|
||||||
{
|
|
||||||
case 0: DoScriptText(SAY_CLEAN_SLAY1, m_creature); break;
|
|
||||||
case 1: DoScriptText(SAY_CLEAN_SLAY2, m_creature); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summoned)
|
void JustSummoned(Creature* pSummoned)
|
||||||
{
|
{
|
||||||
if (summoned->GetEntry() == ENTRY_PURE_SPAWN)
|
if (pSummoned->GetEntry() == NPC_PURE_SPAWN)
|
||||||
{
|
pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||||
summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
else if (pSummoned->GetEntry() == NPC_TAINTED_SPAWN)
|
||||||
summoned->CastSpell(summoned,SPELL_ELEMENTAL_SPAWNIN,true);
|
pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
||||||
Summons.Summon(summoned);
|
|
||||||
}
|
pSummoned->CastSpell(pSummoned, SPELL_ELEMENTAL_SPAWNIN, true);
|
||||||
if (summoned->GetEntry() == ENTRY_TAINTED_SPAWN)
|
|
||||||
{
|
|
||||||
summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
|
||||||
summoned->CastSpell(summoned,SPELL_ELEMENTAL_SPAWNIN,true);
|
|
||||||
Summons.Summon(summoned);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonedCreatureDespawn(Creature *summon)
|
void JustDied(Unit* pVictim)
|
||||||
{
|
{
|
||||||
Summons.Despawn(summon);
|
DoScriptText(m_bCorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH, m_creature);
|
||||||
|
|
||||||
|
if (m_pInstance)
|
||||||
|
m_pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit *victim)
|
void SpawnAdds()
|
||||||
{
|
{
|
||||||
if (CorruptedForm)
|
uint32 uiAdd = 0;
|
||||||
DoScriptText(SAY_CORRUPT_DEATH, m_creature);
|
|
||||||
|
if (m_bCorruptedForm)
|
||||||
|
uiAdd = NPC_TAINTED_SPAWN;
|
||||||
else
|
else
|
||||||
DoScriptText(SAY_CLEAN_DEATH, m_creature);
|
uiAdd = NPC_PURE_SPAWN;
|
||||||
|
|
||||||
if (pInstance)
|
for(uint8 i = 0; i < 4; i++)
|
||||||
pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, DONE);
|
DoSpawnCreature(uiAdd, afSpawnDiffs[i][0], afSpawnDiffs[i][1], 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
Summons.DespawnAll();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 uiDiff)
|
||||||
{
|
{
|
||||||
if(!beam)
|
|
||||||
{
|
|
||||||
SummonBeams();
|
|
||||||
beam=true;
|
|
||||||
}
|
|
||||||
//Return since we have no target
|
//Return since we have no target
|
||||||
if (!UpdateVictim() )
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// corrupted form
|
// corrupted form
|
||||||
if (CorruptedForm)
|
if (m_bCorruptedForm)
|
||||||
{
|
{
|
||||||
//MarkOfCorruption_Timer
|
//MarkOfCorruption_Timer
|
||||||
if (MarkOfCorruption_Timer < diff)
|
if (m_uiMarkOfCorruption_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
if (MarkOfCorruption_Count <= 5)
|
if (m_uiMarkOfCorruption_Count <= 5)
|
||||||
{
|
{
|
||||||
uint32 mark_spell;
|
uint32 uiMarkSpell = 0;
|
||||||
|
|
||||||
switch(MarkOfCorruption_Count)
|
switch(m_uiMarkOfCorruption_Count)
|
||||||
{
|
{
|
||||||
case 0: mark_spell = SPELL_MARK_OF_CORRUPTION1; break;
|
case 0: uiMarkSpell = SPELL_MARK_OF_CORRUPTION1; break;
|
||||||
case 1: mark_spell = SPELL_MARK_OF_CORRUPTION2; break;
|
case 1: uiMarkSpell = SPELL_MARK_OF_CORRUPTION2; break;
|
||||||
case 2: mark_spell = SPELL_MARK_OF_CORRUPTION3; break;
|
case 2: uiMarkSpell = SPELL_MARK_OF_CORRUPTION3; break;
|
||||||
case 3: mark_spell = SPELL_MARK_OF_CORRUPTION4; break;
|
case 3: uiMarkSpell = SPELL_MARK_OF_CORRUPTION4; break;
|
||||||
case 4: mark_spell = SPELL_MARK_OF_CORRUPTION5; break;
|
case 4: uiMarkSpell = SPELL_MARK_OF_CORRUPTION5; break;
|
||||||
case 5: mark_spell = SPELL_MARK_OF_CORRUPTION6; break;
|
case 5: uiMarkSpell = SPELL_MARK_OF_CORRUPTION6; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoCast(m_creature->getVictim(), mark_spell);
|
DoCast(m_creature->getVictim(), uiMarkSpell);
|
||||||
|
|
||||||
if (MarkOfCorruption_Count < 5)
|
if (m_uiMarkOfCorruption_Count < 5)
|
||||||
MarkOfCorruption_Count++;
|
++m_uiMarkOfCorruption_Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
MarkOfCorruption_Timer = 15000;
|
m_uiMarkOfCorruption_Timer = 15000;
|
||||||
}else MarkOfCorruption_Timer -= diff;
|
}else m_uiMarkOfCorruption_Timer -= uiDiff;
|
||||||
|
|
||||||
//VileSludge_Timer
|
//VileSludge_Timer
|
||||||
if (VileSludge_Timer < diff)
|
if (m_uiVileSludge_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
if (target)
|
DoCast(pTarget, SPELL_VILE_SLUDGE);
|
||||||
DoCast(target, SPELL_VILE_SLUDGE);
|
|
||||||
|
|
||||||
VileSludge_Timer = 15000;
|
m_uiVileSludge_Timer = 15000;
|
||||||
}else VileSludge_Timer -= diff;
|
}else m_uiVileSludge_Timer -= uiDiff;
|
||||||
|
|
||||||
//PosCheck_Timer
|
//PosCheck_Timer
|
||||||
if (PosCheck_Timer < diff)
|
if (m_uiPosCheck_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
if (m_creature->GetDistance2d(HYDROSS_X, HYDROSS_Y) < SWITCH_RADIUS)
|
float fPosX, fPosY, fPosZ, fPosO;
|
||||||
{
|
m_creature->GetHomePosition(fPosX, fPosY, fPosZ, fPosO);
|
||||||
// switch to clean form
|
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_CLEAN);
|
|
||||||
CorruptedForm = false;
|
|
||||||
MarkOfHydross_Count = 0;
|
|
||||||
|
|
||||||
|
if (m_creature->GetDistance2d(fPosX, fPosY) < SWITCH_RADIUS)
|
||||||
|
{
|
||||||
DoScriptText(SAY_SWITCH_TO_CLEAN, m_creature);
|
DoScriptText(SAY_SWITCH_TO_CLEAN, m_creature);
|
||||||
|
|
||||||
|
// switch to clean form
|
||||||
|
m_creature->SetDisplayId(MODEL_CLEAN);
|
||||||
|
m_uiMarkOfHydross_Count = 0;
|
||||||
DoResetThreat();
|
DoResetThreat();
|
||||||
SummonBeams();
|
|
||||||
|
|
||||||
// spawn 4 adds
|
// spawn 4 adds
|
||||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
SpawnAdds();
|
||||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF2, SPAWN_Y_DIFF2, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
|
||||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
|
||||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
|
||||||
|
|
||||||
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
|
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
|
||||||
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||||
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
|
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false);
|
||||||
|
|
||||||
|
m_bCorruptedForm = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PosCheck_Timer = 2500;
|
m_uiPosCheck_Timer = 2500;
|
||||||
}else PosCheck_Timer -=diff;
|
}else m_uiPosCheck_Timer -=uiDiff;
|
||||||
}
|
}
|
||||||
// clean form
|
// clean form
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//MarkOfHydross_Timer
|
//MarkOfHydross_Timer
|
||||||
if (MarkOfHydross_Timer < diff)
|
if (m_uiMarkOfHydross_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
if (MarkOfHydross_Count <= 5)
|
if (m_uiMarkOfHydross_Count <= 5)
|
||||||
{
|
{
|
||||||
uint32 mark_spell;
|
uint32 uiMarkSpell;
|
||||||
|
|
||||||
switch(MarkOfHydross_Count)
|
switch(m_uiMarkOfHydross_Count)
|
||||||
{
|
{
|
||||||
case 0: mark_spell = SPELL_MARK_OF_HYDROSS1; break;
|
case 0: uiMarkSpell = SPELL_MARK_OF_HYDROSS1; break;
|
||||||
case 1: mark_spell = SPELL_MARK_OF_HYDROSS2; break;
|
case 1: uiMarkSpell = SPELL_MARK_OF_HYDROSS2; break;
|
||||||
case 2: mark_spell = SPELL_MARK_OF_HYDROSS3; break;
|
case 2: uiMarkSpell = SPELL_MARK_OF_HYDROSS3; break;
|
||||||
case 3: mark_spell = SPELL_MARK_OF_HYDROSS4; break;
|
case 3: uiMarkSpell = SPELL_MARK_OF_HYDROSS4; break;
|
||||||
case 4: mark_spell = SPELL_MARK_OF_HYDROSS5; break;
|
case 4: uiMarkSpell = SPELL_MARK_OF_HYDROSS5; break;
|
||||||
case 5: mark_spell = SPELL_MARK_OF_HYDROSS6; break;
|
case 5: uiMarkSpell = SPELL_MARK_OF_HYDROSS6; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoCast(m_creature->getVictim(), mark_spell);
|
DoCast(m_creature->getVictim(), uiMarkSpell);
|
||||||
|
|
||||||
if (MarkOfHydross_Count < 5)
|
if (m_uiMarkOfHydross_Count < 5)
|
||||||
MarkOfHydross_Count++;
|
++m_uiMarkOfHydross_Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
MarkOfHydross_Timer = 15000;
|
m_uiMarkOfHydross_Timer = 15000;
|
||||||
}else MarkOfHydross_Timer -= diff;
|
}else m_uiMarkOfHydross_Timer -= uiDiff;
|
||||||
|
|
||||||
//WaterTomb_Timer
|
//WaterTomb_Timer
|
||||||
if (WaterTomb_Timer < diff)
|
if (m_uiWaterTomb_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
if (target)
|
DoCast(pTarget, SPELL_WATER_TOMB);
|
||||||
DoCast(target, SPELL_WATER_TOMB);
|
|
||||||
|
|
||||||
WaterTomb_Timer = 7000;
|
m_uiWaterTomb_Timer = 7000;
|
||||||
}else WaterTomb_Timer -= diff;
|
}else m_uiWaterTomb_Timer -= uiDiff;
|
||||||
|
|
||||||
//PosCheck_Timer
|
//PosCheck_Timer
|
||||||
if (PosCheck_Timer < diff)
|
if (m_uiPosCheck_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
if (m_creature->GetDistance2d(HYDROSS_X, HYDROSS_Y) >= SWITCH_RADIUS)
|
float fPosX, fPosY, fPosZ, fPosO;
|
||||||
{
|
m_creature->GetHomePosition(fPosX, fPosY, fPosZ, fPosO);
|
||||||
// switch to corrupted form
|
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_CORRUPT);
|
|
||||||
MarkOfCorruption_Count = 0;
|
|
||||||
CorruptedForm = true;
|
|
||||||
|
|
||||||
|
if (m_creature->GetDistance2d(fPosX, fPosY) >= SWITCH_RADIUS)
|
||||||
|
{
|
||||||
DoScriptText(SAY_SWITCH_TO_CORRUPT, m_creature);
|
DoScriptText(SAY_SWITCH_TO_CORRUPT, m_creature);
|
||||||
|
|
||||||
|
// switch to corrupted form
|
||||||
|
m_creature->SetDisplayId(MODEL_CORRUPT);
|
||||||
|
m_uiMarkOfCorruption_Count = 0;
|
||||||
DoResetThreat();
|
DoResetThreat();
|
||||||
DeSummonBeams();
|
|
||||||
|
|
||||||
// spawn 4 adds
|
// spawn 4 adds
|
||||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
SpawnAdds();
|
||||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF2, SPAWN_Y_DIFF2, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
|
||||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
|
||||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
|
||||||
|
|
||||||
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
|
m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
|
||||||
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
||||||
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
|
m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false);
|
||||||
|
|
||||||
|
m_bCorruptedForm = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PosCheck_Timer = 2500;
|
m_uiPosCheck_Timer = 2500;
|
||||||
}else PosCheck_Timer -=diff;
|
}else m_uiPosCheck_Timer -=uiDiff;
|
||||||
}
|
}
|
||||||
|
|
||||||
//EnrageTimer
|
//EnrageTimer
|
||||||
if (EnrageTimer < diff)
|
if (m_uiEnrageTimer < uiDiff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature, SPELL_ENRAGE);
|
DoCast(m_creature, SPELL_ENRAGE);
|
||||||
EnrageTimer = 60000;
|
m_uiEnrageTimer = 60000;
|
||||||
}else EnrageTimer -= diff;
|
}else m_uiEnrageTimer -= uiDiff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
CreatureAI* GetAI_boss_hydross_the_unstable(Creature *_Creature)
|
|
||||||
|
CreatureAI* GetAI_boss_hydross_the_unstable(Creature* pCreature)
|
||||||
{
|
{
|
||||||
return new boss_hydross_the_unstableAI (_Creature);
|
return new boss_hydross_the_unstableAI(pCreature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddSC_boss_hydross_the_unstable()
|
void AddSC_boss_hydross_the_unstable()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name="boss_hydross_the_unstable";
|
newscript->Name = "boss_hydross_the_unstable";
|
||||||
newscript->GetAI = &GetAI_boss_hydross_the_unstable;
|
newscript->GetAI = &GetAI_boss_hydross_the_unstable;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-13
@@ -132,7 +132,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_lady_vashjAI (Creature *c) : ScriptedAI(c)
|
boss_lady_vashjAI (Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
Intro = false;
|
Intro = false;
|
||||||
JustCreated = true;
|
JustCreated = true;
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //set it only once on creature create (no need do intro if wiped)
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); //set it only once on creature create (no need do intro if wiped)
|
||||||
@@ -158,7 +158,6 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
|||||||
uint8 Phase;
|
uint8 Phase;
|
||||||
|
|
||||||
bool Entangle;
|
bool Entangle;
|
||||||
bool InCombat;
|
|
||||||
bool Intro;
|
bool Intro;
|
||||||
bool CanAttack;
|
bool CanAttack;
|
||||||
bool JustCreated;
|
bool JustCreated;
|
||||||
@@ -181,7 +180,6 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
|||||||
Phase = 0;
|
Phase = 0;
|
||||||
|
|
||||||
Entangle = false;
|
Entangle = false;
|
||||||
InCombat = false;
|
|
||||||
if(JustCreated)
|
if(JustCreated)
|
||||||
{
|
{
|
||||||
CanAttack = false;
|
CanAttack = false;
|
||||||
@@ -241,7 +239,6 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
|||||||
case 3: DoScriptText(SAY_AGGRO4, m_creature); break;
|
case 3: DoScriptText(SAY_AGGRO4, m_creature); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
InCombat = true;
|
|
||||||
Phase = 1;
|
Phase = 1;
|
||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
@@ -266,7 +263,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
|||||||
if(Phase != 2)
|
if(Phase != 2)
|
||||||
AttackStart(who);
|
AttackStart(who);
|
||||||
|
|
||||||
if(!InCombat)
|
if(!m_creature->isInCombat())
|
||||||
StartEvent();
|
StartEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +290,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
|||||||
if(Phase != 2)
|
if(Phase != 2)
|
||||||
AttackStart(who);
|
AttackStart(who);
|
||||||
|
|
||||||
if(!InCombat)
|
if(!m_creature->isInCombat())
|
||||||
StartEvent();
|
StartEvent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -340,7 +337,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//to prevent abuses during phase 2
|
//to prevent abuses during phase 2
|
||||||
if(Phase == 2 && !m_creature->getVictim() && InCombat)
|
if(Phase == 2 && !m_creature->getVictim() && m_creature->isInCombat())
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
return;
|
return;
|
||||||
@@ -583,7 +580,7 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_enchanted_elementalAI(Creature *c) : ScriptedAI(c)
|
mob_enchanted_elementalAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -672,7 +669,7 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI
|
|||||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(CAST_AI(boss_lady_vashjAI, Vashj->AI())->InCombat == false || CAST_AI(boss_lady_vashjAI, Vashj->AI())->Phase != 2 || Vashj->isDead())
|
if(!Vashj->isInCombat() || CAST_AI(boss_lady_vashjAI, Vashj->AI())->Phase != 2 || Vashj->isDead())
|
||||||
{
|
{
|
||||||
//call Unsummon()
|
//call Unsummon()
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
@@ -688,7 +685,7 @@ struct TRINITY_DLL_DECL mob_tainted_elementalAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_tainted_elementalAI(Creature *c) : ScriptedAI(c)
|
mob_tainted_elementalAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -751,7 +748,7 @@ struct TRINITY_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_toxic_sporebatAI(Creature *c) : ScriptedAI(c)
|
mob_toxic_sporebatAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -883,7 +880,7 @@ struct TRINITY_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_shield_generator_channelAI(Creature *c) : ScriptedAI(c)
|
mob_shield_generator_channelAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -893,7 +890,7 @@ struct TRINITY_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Check_Timer = 0;
|
Check_Timer = 0;
|
||||||
Casted = false;
|
Casted = false;
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID , 11686); //invisible
|
m_creature->SetDisplayId(11686); //invisible
|
||||||
|
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-8
@@ -140,7 +140,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
boss_leotheras_the_blindAI(Creature *c) : ScriptedAI(c)
|
boss_leotheras_the_blindAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
m_creature->GetPosition(x,y,z);
|
m_creature->GetPosition(x,y,z);
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
Demon = 0;
|
Demon = 0;
|
||||||
|
|
||||||
for(uint8 i = 0; i < 3; i++)//clear guids
|
for(uint8 i = 0; i < 3; i++)//clear guids
|
||||||
@@ -187,7 +187,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
EnrageUsed = false;
|
EnrageUsed = false;
|
||||||
InnderDemon_Count = 0;
|
InnderDemon_Count = 0;
|
||||||
m_creature->SetSpeed( MOVE_RUN, 2.0f, true);
|
m_creature->SetSpeed( MOVE_RUN, 2.0f, true);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
|
m_creature->SetDisplayId(MODEL_NIGHTELF);
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
||||||
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
|
m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true);
|
||||||
@@ -270,7 +270,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, MECHANIC_BANISH, true);
|
m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, MECHANIC_BANISH, true);
|
||||||
|
|
||||||
// changing model to bloodelf
|
// changing model to bloodelf
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
|
m_creature->SetDisplayId(MODEL_NIGHTELF);
|
||||||
|
|
||||||
// and reseting equipment
|
// and reseting equipment
|
||||||
m_creature->LoadEquipment(m_creature->GetEquipmentId());
|
m_creature->LoadEquipment(m_creature->GetEquipmentId());
|
||||||
@@ -292,7 +292,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
DoCast(m_creature, AURA_BANISH);
|
DoCast(m_creature, AURA_BANISH);
|
||||||
|
|
||||||
// changing model
|
// changing model
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_DEMON);
|
m_creature->SetDisplayId(MODEL_DEMON);
|
||||||
|
|
||||||
// and removing weapons
|
// and removing weapons
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
||||||
@@ -457,7 +457,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
//switch to demon form
|
//switch to demon form
|
||||||
m_creature->RemoveAurasDueToSpell(SPELL_WHIRLWIND,0);
|
m_creature->RemoveAurasDueToSpell(SPELL_WHIRLWIND,0);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_DEMON);
|
m_creature->SetDisplayId(MODEL_DEMON);
|
||||||
DoScriptText(SAY_SWITCH_TO_DEMON, m_creature);
|
DoScriptText(SAY_SWITCH_TO_DEMON, m_creature);
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
|
||||||
@@ -534,7 +534,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
if(SwitchToHuman_Timer < diff)
|
if(SwitchToHuman_Timer < diff)
|
||||||
{
|
{
|
||||||
//switch to nightelf form
|
//switch to nightelf form
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
|
m_creature->SetDisplayId(MODEL_NIGHTELF);
|
||||||
m_creature->LoadEquipment(m_creature->GetEquipmentId());
|
m_creature->LoadEquipment(m_creature->GetEquipmentId());
|
||||||
|
|
||||||
CastConsumingMadness();
|
CastConsumingMadness();
|
||||||
@@ -563,7 +563,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
|||||||
DemonForm = false;
|
DemonForm = false;
|
||||||
|
|
||||||
DoScriptText(SAY_FINAL_FORM, m_creature);
|
DoScriptText(SAY_FINAL_FORM, m_creature);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
|
m_creature->SetDisplayId(MODEL_NIGHTELF);
|
||||||
m_creature->LoadEquipment(m_creature->GetEquipmentId());
|
m_creature->LoadEquipment(m_creature->GetEquipmentId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -640,7 +640,7 @@ struct TRINITY_DLL_DECL mob_greyheart_spellbinderAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_greyheart_spellbinderAI(Creature *c) : ScriptedAI(c)
|
mob_greyheart_spellbinderAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());;
|
pInstance = c->GetInstanceData();;
|
||||||
leotherasGUID = 0;
|
leotherasGUID = 0;
|
||||||
AddedBanish = false;
|
AddedBanish = false;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -76,7 +76,7 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
|||||||
{
|
{
|
||||||
boss_the_lurker_belowAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature)
|
boss_the_lurker_belowAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
SpellEntry *TempSpell = GET_SPELL(SPELL_SPOUT_ANIM);
|
SpellEntry *TempSpell = GET_SPELL(SPELL_SPOUT_ANIM);
|
||||||
if(TempSpell)
|
if(TempSpell)
|
||||||
{
|
{
|
||||||
|
|||||||
+178
-232
@@ -1,289 +1,240 @@
|
|||||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ScriptData
|
/* ScriptData
|
||||||
SDName: Boss_Morogrim_Tidewalker
|
SDName: Boss_Morogrim_Tidewalker
|
||||||
SD%Complete: 90
|
SD%Complete: 90
|
||||||
SDComment: Water globules don't explode properly, remove hacks
|
SDComment:
|
||||||
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
|
SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
|
||||||
EndScriptData */
|
EndScriptData */
|
||||||
|
|
||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
#include "def_serpent_shrine.h"
|
#include "def_serpent_shrine.h"
|
||||||
|
|
||||||
#define SAY_AGGRO -1548030
|
enum
|
||||||
#define SAY_SUMMON1 -1548031
|
|
||||||
#define SAY_SUMMON2 -1548032
|
|
||||||
#define SAY_SUMMON_BUBL1 -1548033
|
|
||||||
#define SAY_SUMMON_BUBL2 -1548034
|
|
||||||
#define SAY_SLAY1 -1548035
|
|
||||||
#define SAY_SLAY2 -1548036
|
|
||||||
#define SAY_SLAY3 -1548037
|
|
||||||
#define SAY_DEATH -1548038
|
|
||||||
#define EMOTE_WATERY_GRAVE -1548039
|
|
||||||
#define EMOTE_EARTHQUAKE -1548040
|
|
||||||
#define EMOTE_WATERY_GLOBULES -1548041
|
|
||||||
|
|
||||||
#define SPELL_TIDAL_WAVE 37730
|
|
||||||
#define SPELL_WATERY_GRAVE 38049
|
|
||||||
#define SPELL_EARTHQUAKE 37764
|
|
||||||
#define SPELL_WATERY_GRAVE_EXPLOSION 37852
|
|
||||||
|
|
||||||
#define WATERY_GRAVE_X1 334.64
|
|
||||||
#define WATERY_GRAVE_Y1 -728.89
|
|
||||||
#define WATERY_GRAVE_Z1 -14.42
|
|
||||||
#define WATERY_GRAVE_X2 365.51
|
|
||||||
#define WATERY_GRAVE_Y2 -737.14
|
|
||||||
#define WATERY_GRAVE_Z2 -14.44
|
|
||||||
#define WATERY_GRAVE_X3 366.19
|
|
||||||
#define WATERY_GRAVE_Y3 -709.59
|
|
||||||
#define WATERY_GRAVE_Z3 -14.36
|
|
||||||
#define WATERY_GRAVE_X4 372.93
|
|
||||||
#define WATERY_GRAVE_Y4 -690.96
|
|
||||||
#define WATERY_GRAVE_Z4 -14.44
|
|
||||||
|
|
||||||
#define SPELL_WATERY_GRAVE_1 38023
|
|
||||||
#define SPELL_WATERY_GRAVE_2 38024
|
|
||||||
#define SPELL_WATERY_GRAVE_3 38025
|
|
||||||
#define SPELL_WATERY_GRAVE_4 37850
|
|
||||||
|
|
||||||
#define SPELL_SUMMON_WATER_GLOBULE_1 37854
|
|
||||||
#define SPELL_SUMMON_WATER_GLOBULE_2 37858
|
|
||||||
#define SPELL_SUMMON_WATER_GLOBULE_3 37860
|
|
||||||
#define SPELL_SUMMON_WATER_GLOBULE_4 37861
|
|
||||||
|
|
||||||
/*#define SPELL_SUMMON_MURLOC_A6 39813
|
|
||||||
#define SPELL_SUMMON_MURLOC_A7 39814
|
|
||||||
#define SPELL_SUMMON_MURLOC_A8 39815
|
|
||||||
#define SPELL_SUMMON_MURLOC_A9 39816
|
|
||||||
#define SPELL_SUMMON_MURLOC_A10 39817
|
|
||||||
|
|
||||||
#define SPELL_SUMMON_MURLOC_B6 39818
|
|
||||||
#define SPELL_SUMMON_MURLOC_B7 39819
|
|
||||||
#define SPELL_SUMMON_MURLOC_B8 39820
|
|
||||||
#define SPELL_SUMMON_MURLOC_B9 39821
|
|
||||||
#define SPELL_SUMMON_MURLOC_B10 39822*/
|
|
||||||
|
|
||||||
float MurlocCords[10][5] =
|
|
||||||
{
|
{
|
||||||
{21920, 424.36, -715.4, -7.14, 0.124},
|
SAY_AGGRO = -1548030,
|
||||||
{21920, 425.13, -719.3, -7.14, 0.124},
|
SAY_SUMMON1 = -1548031,
|
||||||
{21920, 425.05, -724.23, -7.14, 0.124},
|
SAY_SUMMON2 = -1548032,
|
||||||
{21920, 424.91, -728.68, -7.14, 0.124},
|
SAY_SUMMON_BUBL1 = -1548033,
|
||||||
{21920, 424.84, -732.18, -7.14, 0.124},
|
SAY_SUMMON_BUBL2 = -1548034,
|
||||||
{21920, 321.05, -734.2, -13.15, 0.124},
|
SAY_SLAY1 = -1548035,
|
||||||
{21920, 321.05, -729.4, -13.15, 0.124},
|
SAY_SLAY2 = -1548036,
|
||||||
{21920, 321.05, -724.03, -13.15, 0.124},
|
SAY_SLAY3 = -1548037,
|
||||||
{21920, 321.05, -718.73, -13.15, 0.124},
|
SAY_DEATH = -1548038,
|
||||||
{21920, 321.05, -714.24, -13.15, 0.124}
|
EMOTE_WATERY_GRAVE = -1548039,
|
||||||
};
|
EMOTE_EARTHQUAKE = -1548040,
|
||||||
|
EMOTE_WATERY_GLOBULES = -1548041,
|
||||||
|
|
||||||
//Creatures
|
SPELL_TIDAL_WAVE = 37730,
|
||||||
#define WATER_GLOBULE 21913
|
SPELL_EARTHQUAKE = 37764,
|
||||||
#define TIDEWALKER_LURKER 21920
|
|
||||||
|
SPELL_WATERY_GRAVE_1 = 37850,
|
||||||
|
SPELL_WATERY_GRAVE_2 = 38023,
|
||||||
|
SPELL_WATERY_GRAVE_3 = 38024,
|
||||||
|
SPELL_WATERY_GRAVE_4 = 38025,
|
||||||
|
|
||||||
|
SPELL_SUMMON_MURLOC_A6 = 39813,
|
||||||
|
SPELL_SUMMON_MURLOC_A7 = 39814,
|
||||||
|
SPELL_SUMMON_MURLOC_A8 = 39815,
|
||||||
|
SPELL_SUMMON_MURLOC_A9 = 39816,
|
||||||
|
SPELL_SUMMON_MURLOC_A10 = 39817,
|
||||||
|
|
||||||
|
SPELL_SUMMON_MURLOC_B6 = 39818,
|
||||||
|
SPELL_SUMMON_MURLOC_B7 = 39819,
|
||||||
|
SPELL_SUMMON_MURLOC_B8 = 39820,
|
||||||
|
SPELL_SUMMON_MURLOC_B9 = 39821,
|
||||||
|
SPELL_SUMMON_MURLOC_B10 = 39822,
|
||||||
|
|
||||||
|
SPELL_SUMMON_GLOBULE_1 = 37854,
|
||||||
|
SPELL_SUMMON_GLOBULE_2 = 37858,
|
||||||
|
SPELL_SUMMON_GLOBULE_3 = 37860,
|
||||||
|
SPELL_SUMMON_GLOBULE_4 = 37861,
|
||||||
|
|
||||||
|
NPC_WATER_GLOBULE = 21913,
|
||||||
|
NPC_TIDEWALKER_LURKER = 21920
|
||||||
|
};
|
||||||
|
|
||||||
//Morogrim Tidewalker AI
|
//Morogrim Tidewalker AI
|
||||||
struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_morogrim_tidewalkerAI(Creature *c) : ScriptedAI(c)
|
boss_morogrim_tidewalkerAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData());
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* m_pInstance; // the instance
|
||||||
Map::PlayerList const *PlayerList;
|
|
||||||
|
|
||||||
uint32 TidalWave_Timer;
|
// timers
|
||||||
uint32 WateryGrave_Timer;
|
uint32 m_uiTidalWave_Timer;
|
||||||
uint32 Earthquake_Timer;
|
uint32 m_uiWateryGrave_Timer;
|
||||||
uint32 WateryGlobules_Timer;
|
uint32 m_uiEarthquake_Timer;
|
||||||
uint32 globulespell[4];
|
uint32 m_uiWateryGlobules_Timer;
|
||||||
int8 Playercount;
|
|
||||||
int8 counter;
|
|
||||||
|
|
||||||
bool Earthquake;
|
bool m_bEarthquake;
|
||||||
bool Phase2;
|
bool m_bPhase2;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
TidalWave_Timer = 10000;
|
m_uiTidalWave_Timer = 10000;
|
||||||
WateryGrave_Timer = 30000;
|
m_uiWateryGrave_Timer = 30000;
|
||||||
Earthquake_Timer = 40000;
|
m_uiEarthquake_Timer = 40000;
|
||||||
WateryGlobules_Timer = 0;
|
m_uiWateryGlobules_Timer = 0;
|
||||||
globulespell[0] = SPELL_SUMMON_WATER_GLOBULE_1;
|
|
||||||
globulespell[1] = SPELL_SUMMON_WATER_GLOBULE_2;
|
|
||||||
globulespell[2] = SPELL_SUMMON_WATER_GLOBULE_3;
|
|
||||||
globulespell[3] = SPELL_SUMMON_WATER_GLOBULE_4;
|
|
||||||
|
|
||||||
Earthquake = false;
|
m_bEarthquake = false;
|
||||||
Phase2 = false;
|
m_bPhase2 = false;
|
||||||
|
|
||||||
if (pInstance)
|
if (m_pInstance)
|
||||||
pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
|
m_pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartEvent()
|
void KilledUnit(Unit* pVictim)
|
||||||
{
|
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
|
||||||
|
|
||||||
if (pInstance)
|
|
||||||
pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KilledUnit(Unit *victim)
|
|
||||||
{
|
{
|
||||||
switch(rand()%3)
|
switch(rand()%3)
|
||||||
{
|
{
|
||||||
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
case 0: DoScriptText(SAY_SLAY1, m_creature); break;
|
||||||
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
case 1: DoScriptText(SAY_SLAY2, m_creature); break;
|
||||||
case 2: DoScriptText(SAY_SLAY3, m_creature); break;
|
case 2: DoScriptText(SAY_SLAY3, m_creature); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit *victim)
|
void JustDied(Unit* pVictim)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DEATH, m_creature);
|
DoScriptText(SAY_DEATH, m_creature);
|
||||||
|
|
||||||
if (pInstance)
|
if (m_pInstance)
|
||||||
pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, DONE);
|
m_pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who)
|
void Aggro(Unit* pWho)
|
||||||
{
|
{
|
||||||
PlayerList = &m_creature->GetMap()->GetPlayers();
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
Playercount = PlayerList->getSize();
|
|
||||||
StartEvent();
|
if (m_pInstance)
|
||||||
|
m_pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplyWateryGrave(Unit *player, uint8 i)
|
void JustSummoned(Creature* pSummoned)
|
||||||
{
|
{
|
||||||
switch(i)
|
if (pSummoned->GetEntry() == NPC_TIDEWALKER_LURKER)
|
||||||
{
|
{
|
||||||
case 0: player->CastSpell(player, SPELL_WATERY_GRAVE_1, true); break;
|
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
case 1: player->CastSpell(player, SPELL_WATERY_GRAVE_2, true); break;
|
pSummoned->AI()->AttackStart(pTarget);
|
||||||
case 2: player->CastSpell(player, SPELL_WATERY_GRAVE_3, true); break;
|
}
|
||||||
case 3: player->CastSpell(player, SPELL_WATERY_GRAVE_4, true); break;
|
|
||||||
|
if (pSummoned->GetEntry() == NPC_WATER_GLOBULE)
|
||||||
|
{
|
||||||
|
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
|
pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0.0f, 0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 uiDiff)
|
||||||
{
|
{
|
||||||
//Return since we have no target
|
//Return since we have no target
|
||||||
if (!UpdateVictim() )
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//Earthquake_Timer
|
//m_uiEarthquake_Timer
|
||||||
if (Earthquake_Timer < diff)
|
if (m_uiEarthquake_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
if (!Earthquake)
|
if (!m_bEarthquake)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_EARTHQUAKE);
|
DoCast(m_creature->getVictim(), SPELL_EARTHQUAKE);
|
||||||
Earthquake = true;
|
m_bEarthquake = true;
|
||||||
Earthquake_Timer = 10000;
|
m_uiEarthquake_Timer = 5000;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch(rand()%2)
|
DoScriptText(urand(0,1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature);
|
||||||
{
|
|
||||||
case 0: DoScriptText(SAY_SUMMON1, m_creature); break;
|
//north
|
||||||
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A6,true);
|
||||||
}
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A7,true);
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A8,true);
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A9,true);
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A10,true);
|
||||||
|
|
||||||
|
//south
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B6,true);
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B7,true);
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B8,true);
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B9,true);
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B10,true);
|
||||||
|
|
||||||
for(uint8 i = 0; i < 10; i++)
|
|
||||||
{
|
|
||||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
|
||||||
Creature* Murloc = m_creature->SummonCreature(MurlocCords[i][0],MurlocCords[i][1],MurlocCords[i][2],MurlocCords[i][3],MurlocCords[i][4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
|
||||||
if(target && Murloc)
|
|
||||||
Murloc->AI()->AttackStart(target);
|
|
||||||
}
|
|
||||||
DoScriptText(EMOTE_EARTHQUAKE, m_creature);
|
DoScriptText(EMOTE_EARTHQUAKE, m_creature);
|
||||||
Earthquake = false;
|
|
||||||
Earthquake_Timer = 40000+rand()%5000;
|
|
||||||
}
|
|
||||||
}else Earthquake_Timer -= diff;
|
|
||||||
|
|
||||||
//TidalWave_Timer
|
m_bEarthquake = false;
|
||||||
if (TidalWave_Timer < diff)
|
m_uiEarthquake_Timer = 40000+rand()%5000;
|
||||||
|
}
|
||||||
|
}else m_uiEarthquake_Timer -= uiDiff;
|
||||||
|
|
||||||
|
//m_uiTidalWave_Timer
|
||||||
|
if (m_uiTidalWave_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_TIDAL_WAVE);
|
DoCast(m_creature->getVictim(), SPELL_TIDAL_WAVE);
|
||||||
TidalWave_Timer = 20000;
|
m_uiTidalWave_Timer = 20000;
|
||||||
}else TidalWave_Timer -= diff;
|
}else m_uiTidalWave_Timer -= uiDiff;
|
||||||
|
|
||||||
if (!Phase2)
|
if (!m_bPhase2)
|
||||||
{
|
{
|
||||||
//WateryGrave_Timer
|
//m_uiWateryGrave_Timer
|
||||||
if (WateryGrave_Timer < diff)
|
if (m_uiWateryGrave_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
//Teleport 4 players under the waterfalls
|
//Teleport 4 players under the waterfalls
|
||||||
Unit *target;
|
|
||||||
using std::set;
|
|
||||||
set<int>list;
|
|
||||||
set<int>::iterator itr;
|
|
||||||
for(uint8 i = 0; i < 4; i++)
|
for(uint8 i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
counter = 0;
|
Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||||
do{target = SelectTarget(SELECT_TARGET_RANDOM, 1, 50, true); //target players only
|
|
||||||
if(counter < Playercount)
|
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && !pTarget->HasAuraType(SPELL_AURA_MOD_STUN) && pTarget->IsWithinDistInMap(m_creature, 45.0f))
|
||||||
break;
|
{
|
||||||
if(target) itr = list.find(target->GetGUID());
|
switch(i)
|
||||||
counter++;
|
{
|
||||||
}while(itr != list.end());
|
case 0: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_1,false); break;
|
||||||
if(target){list.insert(target->GetGUID());
|
case 1: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_2,false); break;
|
||||||
ApplyWateryGrave(target, i);
|
case 2: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_3,false); break;
|
||||||
|
case 3: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_4,false); break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(rand()%2)
|
DoScriptText(urand(0,1) ? SAY_SUMMON_BUBL1 : SAY_SUMMON_BUBL2, m_creature);
|
||||||
{
|
|
||||||
case 0: DoScriptText(SAY_SUMMON_BUBL1, m_creature); break;
|
|
||||||
case 1: DoScriptText(SAY_SUMMON_BUBL2, m_creature); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
DoScriptText(EMOTE_WATERY_GRAVE, m_creature);
|
DoScriptText(EMOTE_WATERY_GRAVE, m_creature);
|
||||||
WateryGrave_Timer = 30000;
|
|
||||||
}else WateryGrave_Timer -= diff;
|
m_uiWateryGrave_Timer = 30000;
|
||||||
|
}else m_uiWateryGrave_Timer -= uiDiff;
|
||||||
|
|
||||||
//Start Phase2
|
//Start Phase2
|
||||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)
|
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)
|
||||||
Phase2 = true;
|
m_bPhase2 = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//WateryGlobules_Timer
|
//m_uiWateryGlobules_Timer
|
||||||
if (WateryGlobules_Timer < diff)
|
if (m_uiWateryGlobules_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
Unit* globuletarget;
|
|
||||||
using std::set;
|
|
||||||
set<int>globulelist;
|
|
||||||
set<int>::iterator itr;
|
|
||||||
for (int8 g = 0; g < 4; g++) //one unit cant cast more than one spell per update, so some players have to cast for us XD
|
|
||||||
{
|
|
||||||
counter = 0;
|
|
||||||
do {globuletarget = SelectTarget(SELECT_TARGET_RANDOM, 0,50,true);
|
|
||||||
if(globuletarget) itr = globulelist.find(globuletarget->GetGUID());
|
|
||||||
if (counter > Playercount)
|
|
||||||
break;
|
|
||||||
counter++;
|
|
||||||
} while (itr != globulelist.end());
|
|
||||||
if(globuletarget)globulelist.insert(globuletarget->GetGUID());
|
|
||||||
globuletarget->CastSpell(globuletarget, globulespell[g], true);
|
|
||||||
}
|
|
||||||
DoScriptText(EMOTE_WATERY_GLOBULES, m_creature);
|
DoScriptText(EMOTE_WATERY_GLOBULES, m_creature);
|
||||||
WateryGlobules_Timer = 25000;
|
|
||||||
}else WateryGlobules_Timer -= diff;
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_1,true);
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_2,true);
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_3,true);
|
||||||
|
m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_4,false);
|
||||||
|
|
||||||
|
m_uiWateryGlobules_Timer = 25000;
|
||||||
|
}else m_uiWateryGlobules_Timer -= uiDiff;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
@@ -291,67 +242,63 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Water Globule AI
|
//Water Globule AI
|
||||||
#define SPELL_GLOBULE_EXPLOSION 37871
|
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI
|
struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_water_globuleAI(Creature *c) : ScriptedAI(c) {}
|
mob_water_globuleAI(Creature* c) : ScriptedAI(c) { }
|
||||||
|
|
||||||
uint32 Check_Timer;
|
// timers
|
||||||
|
uint32 m_uiCheck_Timer;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
Check_Timer = 1000;
|
m_uiCheck_Timer = 1000;
|
||||||
|
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
m_creature->setFaction(14);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who) {}
|
void Aggro(Unit* pWho) {}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit *who)
|
void MoveInLineOfSight(Unit* pWho)
|
||||||
{
|
{
|
||||||
if (!who || m_creature->getVictim())
|
if (!pWho || m_creature->getVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
if (pWho->isTargetableForAttack() && pWho->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(pWho))
|
||||||
{
|
{
|
||||||
//no attack radius check - it attacks the first target that moves in his los
|
//no attack radius check - it attacks the first target that moves in his los
|
||||||
//who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
//pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||||
AttackStart(who);
|
AttackStart(pWho);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 uiDiff)
|
||||||
{
|
{
|
||||||
//Return since we have no target
|
//Return since we have no target
|
||||||
if (!UpdateVictim() )
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Check_Timer < diff)
|
if (m_uiCheck_Timer < uiDiff)
|
||||||
{
|
{
|
||||||
if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5))
|
if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5))
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_GLOBULE_EXPLOSION);
|
m_creature->DealDamage(m_creature->getVictim(), 4000+rand()%2000, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FROST, NULL, false);
|
||||||
|
|
||||||
//despawn
|
//despawn
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
}
|
}
|
||||||
Check_Timer = 500;
|
m_uiCheck_Timer = 500;
|
||||||
}else Check_Timer -= diff;
|
}else m_uiCheck_Timer -= uiDiff;
|
||||||
|
|
||||||
//do NOT deal any melee damage to the target.
|
//do NOT deal any melee damage to the target.
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_boss_morogrim_tidewalker(Creature *_Creature)
|
CreatureAI* GetAI_boss_morogrim_tidewalker(Creature* pCreature)
|
||||||
{
|
{
|
||||||
return new boss_morogrim_tidewalkerAI (_Creature);
|
return new boss_morogrim_tidewalkerAI (pCreature);
|
||||||
}
|
}
|
||||||
CreatureAI* GetAI_mob_water_globule(Creature *_Creature)
|
CreatureAI* GetAI_mob_water_globule(Creature* pCreature)
|
||||||
{
|
{
|
||||||
return new mob_water_globuleAI (_Creature);
|
return new mob_water_globuleAI (pCreature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddSC_boss_morogrim_tidewalker()
|
void AddSC_boss_morogrim_tidewalker()
|
||||||
@@ -359,13 +306,12 @@ void AddSC_boss_morogrim_tidewalker()
|
|||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name="boss_morogrim_tidewalker";
|
newscript->Name = "boss_morogrim_tidewalker";
|
||||||
newscript->GetAI = &GetAI_boss_morogrim_tidewalker;
|
newscript->GetAI = &GetAI_boss_morogrim_tidewalker;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name="mob_water_globule";
|
newscript->Name = "mob_water_globule";
|
||||||
newscript->GetAI = &GetAI_mob_water_globule;
|
newscript->GetAI = &GetAI_mob_water_globule;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ struct TRINITY_DLL_DECL boss_thespiaAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_thespiaAI(Creature *c) : ScriptedAI(c)
|
boss_thespiaAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -50,7 +50,7 @@ struct TRINITY_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_mekgineer_steamriggerAI(Creature *c) : ScriptedAI(c)
|
boss_mekgineer_steamriggerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ struct TRINITY_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_steamrigger_mechanicAI(Creature *c) : ScriptedAI(c)
|
mob_steamrigger_mechanicAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -44,7 +44,7 @@ struct TRINITY_DLL_DECL mob_naga_distillerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_naga_distillerAI(Creature *c) : ScriptedAI(c)
|
mob_naga_distillerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -90,7 +90,7 @@ struct TRINITY_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_warlord_kalithreshAI(Creature *c) : ScriptedAI(c)
|
boss_warlord_kalithreshAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
+4
-29
@@ -88,23 +88,6 @@ struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player* GetPlayerInMap()
|
|
||||||
{
|
|
||||||
Map::PlayerList const& players = instance->GetPlayers();
|
|
||||||
|
|
||||||
if (!players.isEmpty())
|
|
||||||
{
|
|
||||||
for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
|
||||||
{
|
|
||||||
if (Player* plr = itr->getSource())
|
|
||||||
return plr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
debug_log("TSCR: Instance Steamvault: GetPlayerInMap, but PlayerList is empty!");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnCreatureCreate(Creature *creature, bool add)
|
void OnCreatureCreate(Creature *creature, bool add)
|
||||||
{
|
{
|
||||||
switch(creature->GetEntry())
|
switch(creature->GetEntry())
|
||||||
@@ -127,25 +110,17 @@ struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
|
|||||||
|
|
||||||
void SetData(uint32 type, uint32 data)
|
void SetData(uint32 type, uint32 data)
|
||||||
{
|
{
|
||||||
Player *player = GetPlayerInMap();
|
|
||||||
|
|
||||||
if (!player)
|
|
||||||
{
|
|
||||||
debug_log("TSCR: Instance Steamvault: SetData (Type: %u Data %u) cannot find any player.", type, data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case TYPE_HYDROMANCER_THESPIA:
|
case TYPE_HYDROMANCER_THESPIA:
|
||||||
if (data == SPECIAL)
|
if (data == SPECIAL)
|
||||||
{
|
{
|
||||||
if (GameObject *_go = GameObject::GetGameObject(*player,AccessPanelHydro))
|
if (GameObject *_go = instance->GetGameObject(AccessPanelHydro))
|
||||||
_go->SetGoState(GO_STATE_ACTIVE);
|
_go->SetGoState(GO_STATE_ACTIVE);
|
||||||
|
|
||||||
if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL)
|
if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL)
|
||||||
{
|
{
|
||||||
if (GameObject *_go = GameObject::GetGameObject(*player,MainChambersDoor))
|
if (GameObject *_go = instance->GetGameObject(MainChambersDoor))
|
||||||
_go->SetGoState(GO_STATE_ACTIVE);
|
_go->SetGoState(GO_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
debug_log("TSCR: Instance Steamvault: Access panel used.");
|
debug_log("TSCR: Instance Steamvault: Access panel used.");
|
||||||
@@ -155,12 +130,12 @@ struct TRINITY_DLL_DECL instance_steam_vault : public ScriptedInstance
|
|||||||
case TYPE_MEKGINEER_STEAMRIGGER:
|
case TYPE_MEKGINEER_STEAMRIGGER:
|
||||||
if (data == SPECIAL)
|
if (data == SPECIAL)
|
||||||
{
|
{
|
||||||
if (GameObject *_go = GameObject::GetGameObject(*player,AccessPanelMek))
|
if (GameObject *_go = instance->GetGameObject(AccessPanelMek))
|
||||||
_go->SetGoState(GO_STATE_ACTIVE);
|
_go->SetGoState(GO_STATE_ACTIVE);
|
||||||
|
|
||||||
if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL)
|
if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL)
|
||||||
{
|
{
|
||||||
if (GameObject *_go = GameObject::GetGameObject(*player,MainChambersDoor))
|
if (GameObject *_go = instance->GetGameObject(MainChambersDoor))
|
||||||
_go->SetGoState(GO_STATE_ACTIVE);
|
_go->SetGoState(GO_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
debug_log("TSCR: Instance Steamvault: Access panel used.");
|
debug_log("TSCR: Instance Steamvault: Access panel used.");
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ struct TRINITY_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI
|
|||||||
m_creature->setFaction(7);
|
m_creature->setFaction(7);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 8);
|
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 8);
|
||||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, m_creature->GetNativeDisplayId());
|
m_creature->SetDisplayId(m_creature->GetNativeDisplayId());
|
||||||
event_starter = 0;
|
event_starter = 0;
|
||||||
event_startet = false;
|
event_startet = false;
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ struct TRINITY_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, modelid_dk_armor[model_counter]);
|
m_creature->SetDisplayId(modelid_dk_armor[model_counter]);
|
||||||
m_creature->LoadEquipment(m_creature->GetEquipmentId());
|
m_creature->LoadEquipment(m_creature->GetEquipmentId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,8 +281,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
|
|||||||
Creature* trigger = m_creature->SummonCreature(29521,x,y,z,0,TEMPSUMMON_MANUAL_DESPAWN,100);
|
Creature* trigger = m_creature->SummonCreature(29521,x,y,z,0,TEMPSUMMON_MANUAL_DESPAWN,100);
|
||||||
if(trigger)
|
if(trigger)
|
||||||
{
|
{
|
||||||
GameObject* go_prison = GameObject::GetGameObject((*m_creature),nearest_prison);
|
if(GameObject* go_prison = GameObject::GetGameObject((*m_creature),nearest_prison))
|
||||||
if(go_prison)
|
|
||||||
go_prison->ResetDoorOrButton();
|
go_prison->ResetDoorOrButton();
|
||||||
|
|
||||||
CAST_AI(npc_unworthy_initiate_anchorAI, trigger->AI())->SetTarget(m_creature->GetGUID());
|
CAST_AI(npc_unworthy_initiate_anchorAI, trigger->AI())->SetTarget(m_creature->GetGUID());
|
||||||
@@ -533,9 +532,7 @@ struct TRINITY_DLL_DECL npc_salanar_the_horsemanAI : public ScriptedAI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CAST_PLR(charmer)->ExitVehicle();
|
CAST_PLR(charmer)->ExitVehicle();
|
||||||
//without this we can see npc kill the horse
|
CAST_CRE(who)->Respawn(true);
|
||||||
who->setDeathState(DEAD);
|
|
||||||
CAST_CRE(who)->Respawn();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -555,18 +552,6 @@ struct TRINITY_DLL_DECL npc_ros_dark_riderAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
npc_ros_dark_riderAI(Creature *c) : ScriptedAI(c) {}
|
npc_ros_dark_riderAI(Creature *c) : ScriptedAI(c) {}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit *who)
|
|
||||||
{
|
|
||||||
if(me->getVictim())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// this should be before next one otherwise he may enter vehicle again
|
|
||||||
if(!me->m_Vehicle && who->GetEntry() == 28782 && CAST_CRE(who)->isVehicle() && CAST_VEH(who)->HasEmptySeat(0))
|
|
||||||
me->EnterVehicle((Vehicle*)who);
|
|
||||||
|
|
||||||
ScriptedAI::MoveInLineOfSight(who);
|
|
||||||
}
|
|
||||||
|
|
||||||
void EnterCombat(Unit *who)
|
void EnterCombat(Unit *who)
|
||||||
{
|
{
|
||||||
me->ExitVehicle();
|
me->ExitVehicle();
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_gruulAI(Creature *c) : ScriptedAI(c)
|
boss_gruulAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -111,8 +111,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
pInstance->SetData(DATA_GRUULEVENT, DONE);
|
pInstance->SetData(DATA_GRUULEVENT, DONE);
|
||||||
|
|
||||||
GameObject* EncounterDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR));
|
if (GameObject* EncounterDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GRUULDOOR)))
|
||||||
if (EncounterDoor)
|
|
||||||
EncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door
|
EncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_high_king_maulgarAI(Creature *c) : ScriptedAI(c)
|
boss_high_king_maulgarAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
for(uint8 i = 0; i < 4; ++i)
|
for(uint8 i = 0; i < 4; ++i)
|
||||||
Council[i] = 0;
|
Council[i] = 0;
|
||||||
}
|
}
|
||||||
@@ -304,7 +304,7 @@ struct TRINITY_DLL_DECL boss_olm_the_summonerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_olm_the_summonerAI(Creature *c) : ScriptedAI(c)
|
boss_olm_the_summonerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 DarkDecay_Timer;
|
uint32 DarkDecay_Timer;
|
||||||
@@ -406,7 +406,7 @@ struct TRINITY_DLL_DECL boss_kiggler_the_crazedAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_kiggler_the_crazedAI(Creature *c) : ScriptedAI(c)
|
boss_kiggler_the_crazedAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 GreaterPolymorph_Timer;
|
uint32 GreaterPolymorph_Timer;
|
||||||
@@ -516,7 +516,7 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_blindeye_the_seerAI(Creature *c) : ScriptedAI(c)
|
boss_blindeye_the_seerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 GreaterPowerWordShield_Timer;
|
uint32 GreaterPowerWordShield_Timer;
|
||||||
@@ -614,7 +614,7 @@ struct TRINITY_DLL_DECL boss_krosh_firehandAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_krosh_firehandAI(Creature *c) : ScriptedAI(c)
|
boss_krosh_firehandAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 GreaterFireball_Timer;
|
uint32 GreaterFireball_Timer;
|
||||||
|
|||||||
@@ -24,21 +24,22 @@ EndScriptData */
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
#include "def_blood_furnace.h"
|
#include "def_blood_furnace.h"
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SAY_AGGRO = -1542008,
|
||||||
|
|
||||||
#define SAY_AGGRO -1542008
|
SPELL_SLIME_SPRAY = 30913,
|
||||||
|
SPELL_POISON_CLOUD = 30916,
|
||||||
|
SPELL_POISON_BOLT = 30917,
|
||||||
|
|
||||||
#define SPELL_SLIME_SPRAY 30913
|
SPELL_POISON = 30914
|
||||||
#define SPELL_POISON_CLOUD 30916
|
};
|
||||||
#define SPELL_POISON_BOLT 30917
|
|
||||||
|
|
||||||
#define SPELL_POISON 30914
|
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_broggokAI(Creature *c) : ScriptedAI(c)
|
boss_broggokAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
Reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -111,7 +112,7 @@ struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
if (GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DOOR)))
|
if (GameObject* Doors = pInstance->instance->GetGameObject(pInstance->GetData64(DOOR)))
|
||||||
{
|
{
|
||||||
if (close == 1)
|
if (close == 1)
|
||||||
Doors->SetGoState(GO_STATE_READY); // Closed
|
Doors->SetGoState(GO_STATE_READY); // Closed
|
||||||
|
|||||||
+33
-27
@@ -29,29 +29,32 @@ EndContentData */
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
#include "def_blood_furnace.h"
|
#include "def_blood_furnace.h"
|
||||||
|
|
||||||
#define SAY_WAKE -1542000
|
enum
|
||||||
|
{
|
||||||
|
SAY_WAKE = -1542000,
|
||||||
|
SAY_ADD_AGGRO_1 = -1542001,
|
||||||
|
SAY_ADD_AGGRO_2 = -1542002,
|
||||||
|
SAY_ADD_AGGRO_3 = -1542003,
|
||||||
|
SAY_KILL_1 = -1542004,
|
||||||
|
SAY_KILL_2 = -1542005,
|
||||||
|
SAY_NOVA = -1542006,
|
||||||
|
SAY_DIE = -1542007,
|
||||||
|
|
||||||
#define SAY_ADD_AGGRO_1 -1542001
|
SPELL_CORRUPTION = 30938,
|
||||||
#define SAY_ADD_AGGRO_2 -1542002
|
SPELL_EVOCATION = 30935,
|
||||||
#define SAY_ADD_AGGRO_3 -1542003
|
|
||||||
|
|
||||||
#define SAY_KILL_1 -1542004
|
SPELL_FIRE_NOVA = 33132,
|
||||||
#define SAY_KILL_2 -1542005
|
H_SPELL_FIRE_NOVA = 37371,
|
||||||
#define SAY_NOVA -1542006
|
|
||||||
#define SAY_DIE -1542007
|
|
||||||
|
|
||||||
#define SPELL_CORRUPTION 30938
|
SPELL_SHADOW_BOLT_VOLLEY = 28599,
|
||||||
#define SPELL_EVOCATION 30935
|
H_SPELL_SHADOW_BOLT_VOLLEY = 40070,
|
||||||
#define SPELL_BURNING_NOVA 30940
|
|
||||||
|
|
||||||
#define SPELL_FIRE_NOVA 33132
|
SPELL_BURNING_NOVA = 30940,
|
||||||
#define H_SPELL_FIRE_NOVA 37371
|
SPELL_VORTEX = 37370,
|
||||||
|
|
||||||
#define SPELL_SHADOW_BOLT_VOLLEY 28599
|
ENTRY_KELIDAN = 17377,
|
||||||
#define H_SPELL_SHADOW_BOLT_VOLLEY 40070
|
ENTRY_CHANNELER = 17653
|
||||||
|
};
|
||||||
#define ENTRY_KELIDAN 17377
|
|
||||||
#define ENTRY_CHANNELER 17653
|
|
||||||
|
|
||||||
const float ShadowmoonChannelers[5][4]=
|
const float ShadowmoonChannelers[5][4]=
|
||||||
{
|
{
|
||||||
@@ -66,8 +69,8 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_kelidan_the_breakerAI(Creature *c) : ScriptedAI(c)
|
boss_kelidan_the_breakerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
for(int i=0; i<5; ++i)
|
for(int i=0; i<5; ++i)
|
||||||
Channelers[i] = 0;
|
Channelers[i] = 0;
|
||||||
}
|
}
|
||||||
@@ -261,7 +264,7 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
if (GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DOOR)))
|
if (GameObject* Doors = pInstance->instance->GetGameObject(pInstance->GetData64(DOOR)))
|
||||||
{
|
{
|
||||||
if (close == 1)
|
if (close == 1)
|
||||||
Doors->SetGoState(GO_STATE_READY); // Closed
|
Doors->SetGoState(GO_STATE_READY); // Closed
|
||||||
@@ -281,18 +284,21 @@ CreatureAI* GetAI_boss_kelidan_the_breaker(Creature *_Creature)
|
|||||||
## mob_shadowmoon_channeler
|
## mob_shadowmoon_channeler
|
||||||
######*/
|
######*/
|
||||||
|
|
||||||
#define SPELL_SHADOW_BOLT 12739
|
enum
|
||||||
#define H_SPELL_SHADOW_BOLT 15472
|
{
|
||||||
|
SPELL_SHADOW_BOLT = 12739,
|
||||||
|
H_SPELL_SHADOW_BOLT = 15472,
|
||||||
|
|
||||||
#define SPELL_MARK_OF_SHADOW 30937
|
SPELL_MARK_OF_SHADOW = 30937,
|
||||||
#define SPELL_CHANNELING 39123
|
SPELL_CHANNELING = 39123
|
||||||
|
};
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI
|
struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_shadowmoon_channelerAI(Creature *c) : ScriptedAI(c)
|
mob_shadowmoon_channelerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
+15
-13
@@ -24,24 +24,26 @@ EndScriptData */
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
#include "def_blood_furnace.h"
|
#include "def_blood_furnace.h"
|
||||||
|
|
||||||
#define SAY_AGGRO_1 -1542009
|
enum
|
||||||
#define SAY_AGGRO_2 -1542010
|
{
|
||||||
#define SAY_AGGRO_3 -1542011
|
SAY_AGGRO_1 = -1542009,
|
||||||
#define SAY_KILL_1 -1542012
|
SAY_AGGRO_2 = -1542010,
|
||||||
#define SAY_KILL_2 -1542013
|
SAY_AGGRO_3 = -1542011,
|
||||||
#define SAY_DIE -1542014
|
SAY_KILL_1 = -1542012,
|
||||||
|
SAY_KILL_2 = -1542013,
|
||||||
|
SAY_DIE = -1542014,
|
||||||
|
|
||||||
#define SPELL_ACID_SPRAY 38153 // heroic 38973 ??? 38153
|
SPELL_ACID_SPRAY = 38153, // heroic 38973 ??? 38153
|
||||||
#define SPELL_EXPLODING_BREAKER 30925
|
SPELL_EXPLODING_BREAKER = 30925,
|
||||||
#define SPELL_KNOCKDOWN 20276
|
SPELL_KNOCKDOWN = 20276,
|
||||||
#define SPELL_DOMINATION 25772 // ???
|
SPELL_DOMINATION = 25772 // ???
|
||||||
|
};
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_the_makerAI(Creature *c) : ScriptedAI(c)
|
boss_the_makerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
Reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -139,7 +141,7 @@ struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
if (GameObject* Doors = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DOOR)))
|
if (GameObject* Doors = pInstance->instance->GetGameObject(pInstance->GetData64(DOOR)))
|
||||||
{
|
{
|
||||||
if (close == 1)
|
if (close == 1)
|
||||||
Doors->SetGoState(GO_STATE_READY); // Closed
|
Doors->SetGoState(GO_STATE_READY); // Closed
|
||||||
|
|||||||
+38
@@ -53,6 +53,7 @@ struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
|
|||||||
uint64 PrisonCell8GUID;
|
uint64 PrisonCell8GUID;
|
||||||
|
|
||||||
uint32 Encounter[ENCOUNTERS];
|
uint32 Encounter[ENCOUNTERS];
|
||||||
|
std::string str_data;
|
||||||
|
|
||||||
void Initialize()
|
void Initialize()
|
||||||
{
|
{
|
||||||
@@ -158,6 +159,19 @@ struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
|
|||||||
case TYPE_BROGGOK_EVENT: Encounter[1] = data; break;
|
case TYPE_BROGGOK_EVENT: Encounter[1] = data; break;
|
||||||
case TYPE_KELIDAN_THE_BREAKER_EVENT: Encounter[2] = data; break;
|
case TYPE_KELIDAN_THE_BREAKER_EVENT: Encounter[2] = data; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data == DONE)
|
||||||
|
{
|
||||||
|
OUT_SAVE_INST_DATA;
|
||||||
|
|
||||||
|
std::ostringstream saveStream;
|
||||||
|
saveStream << Encounter[0] << " " << Encounter[1] << " " << Encounter[2];
|
||||||
|
|
||||||
|
str_data = saveStream.str();
|
||||||
|
|
||||||
|
SaveToDB();
|
||||||
|
OUT_SAVE_INST_DATA_COMPLETE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 GetData(uint32 data)
|
uint32 GetData(uint32 data)
|
||||||
@@ -172,6 +186,30 @@ struct TRINITY_DLL_DECL instance_blood_furnace : public ScriptedInstance
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* Save()
|
||||||
|
{
|
||||||
|
return str_data.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Load(const char* in)
|
||||||
|
{
|
||||||
|
if (!in)
|
||||||
|
{
|
||||||
|
OUT_LOAD_INST_DATA_FAIL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
OUT_LOAD_INST_DATA(in);
|
||||||
|
|
||||||
|
std::istringstream loadStream(in);
|
||||||
|
loadStream >> Encounter[0] >> Encounter[1] >> Encounter[2];
|
||||||
|
|
||||||
|
for(uint8 i = 0; i < ENCOUNTERS; ++i)
|
||||||
|
if (Encounter[i] == IN_PROGRESS || Encounter[i] == FAIL)
|
||||||
|
Encounter[i] = NOT_STARTED;
|
||||||
|
|
||||||
|
OUT_LOAD_INST_DATA_COMPLETE;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+11
-31
@@ -51,41 +51,21 @@ struct TRINITY_DLL_DECL instance_ramparts : public ScriptedInstance
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Player* GetFirstPlayerInInstance()
|
|
||||||
{
|
|
||||||
Map::PlayerList const& pPlayers = instance->GetPlayers();
|
|
||||||
|
|
||||||
if (!pPlayers.isEmpty())
|
|
||||||
{
|
|
||||||
for(Map::PlayerList::const_iterator itr = pPlayers.begin(); itr != pPlayers.end(); ++itr)
|
|
||||||
{
|
|
||||||
if (Player* pPlr = itr->getSource())
|
|
||||||
return pPlr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
debug_log("TSCR: Instance Ramparts: GetFirstPlayerInInstance, but PlayerList is empty.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DoRespawnChest()
|
void DoRespawnChest()
|
||||||
{
|
{
|
||||||
if (Player* pPlayer = GetFirstPlayerInInstance())
|
uint64 uiChest;
|
||||||
|
|
||||||
|
if (instance->IsHeroic())
|
||||||
|
uiChest = m_uiChestHGUID;
|
||||||
|
else
|
||||||
|
uiChest = m_uiChestNGUID;
|
||||||
|
|
||||||
|
if (GameObject* pGo = instance->GetGameObject(uiChest))
|
||||||
{
|
{
|
||||||
uint64 uiChest;
|
if (pGo->isSpawned())
|
||||||
|
return;
|
||||||
|
|
||||||
if (instance->IsHeroic())
|
pGo->SetRespawnTime(HOUR*IN_MILISECONDS);
|
||||||
uiChest = m_uiChestHGUID;
|
|
||||||
else
|
|
||||||
uiChest = m_uiChestNGUID;
|
|
||||||
|
|
||||||
if (GameObject* pGo = GameObject::GetGameObject(*pPlayer,uiChest))
|
|
||||||
{
|
|
||||||
if (pGo->isSpawned())
|
|
||||||
return;
|
|
||||||
|
|
||||||
pGo->SetRespawnTime(HOUR*IN_MILISECONDS);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -189,7 +189,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
|
|||||||
case DATA_COLLAPSE:
|
case DATA_COLLAPSE:
|
||||||
// true - collapse / false - reset
|
// true - collapse / false - reset
|
||||||
for(std::set<uint64>::iterator i = ColumnGUID.begin(); i != ColumnGUID.end(); ++i)
|
for(std::set<uint64>::iterator i = ColumnGUID.begin(); i != ColumnGUID.end(); ++i)
|
||||||
HandleGameObject(*i, data);
|
DoUseDoorOrButton(*i);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
+3
-4
@@ -77,7 +77,7 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_grand_warlock_nethekurseAI(Creature *c) : ScriptedAI(c)
|
boss_grand_warlock_nethekurseAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI
|
|||||||
|
|
||||||
if (pInstance->GetData64(DATA_NETHEKURSE_DOOR))
|
if (pInstance->GetData64(DATA_NETHEKURSE_DOOR))
|
||||||
{
|
{
|
||||||
if (GameObject *Door = GameObject::GetGameObject(*m_creature,pInstance->GetData64(DATA_NETHEKURSE_DOOR)))
|
if (GameObject *Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_NETHEKURSE_DOOR)))
|
||||||
Door->SetGoState(GO_STATE_ACTIVE);
|
Door->SetGoState(GO_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -304,7 +304,7 @@ struct TRINITY_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_fel_orc_convertAI(Creature *c) : ScriptedAI(c)
|
mob_fel_orc_convertAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -318,7 +318,6 @@ struct TRINITY_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI
|
|||||||
|
|
||||||
void MoveInLineOfSight(Unit *who)
|
void MoveInLineOfSight(Unit *who)
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
|
|||||||
+1
-1
@@ -128,7 +128,7 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_warbringer_omroggAI(Creature *c) : ScriptedAI(c)
|
boss_warbringer_omroggAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_warchief_kargath_bladefistAI(Creature *c) : ScriptedAI(c)
|
boss_warchief_kargath_bladefistAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ struct TRINITY_DLL_DECL npc_aeranasAI : public ScriptedAI
|
|||||||
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||||
m_creature->RemoveAllAuras();
|
m_creature->RemoveAllAuras();
|
||||||
m_creature->DeleteThreatList();
|
m_creature->DeleteThreatList();
|
||||||
m_creature->CombatStop();
|
m_creature->CombatStop(true);
|
||||||
DoScriptText(SAY_FREE, m_creature);
|
DoScriptText(SAY_FREE, m_creature);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ struct TRINITY_DLL_DECL npc_converted_sentryAI : public ScriptedAI
|
|||||||
|
|
||||||
DoCast(m_creature, SPELL_CONVERT_CREDIT);
|
DoCast(m_creature, SPELL_CONVERT_CREDIT);
|
||||||
if(m_creature->isPet())
|
if(m_creature->isPet())
|
||||||
((Pet*)m_creature)->SetDuration(7500);
|
CAST_PET(m_creature)->SetDuration(7500);
|
||||||
Credit = true;
|
Credit = true;
|
||||||
}else Timer -= diff;
|
}else Timer -= diff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ struct TRINITY_DLL_DECL boss_midnightAI : public ScriptedAI
|
|||||||
m_creature->GetMotionMaster()->MoveIdle();
|
m_creature->GetMotionMaster()->MoveIdle();
|
||||||
if (Unit *pAttumen = Unit::GetUnit(*m_creature, Attumen))
|
if (Unit *pAttumen = Unit::GetUnit(*m_creature, Attumen))
|
||||||
{
|
{
|
||||||
pAttumen->SetUInt32Value(UNIT_FIELD_DISPLAYID, MOUNTED_DISPLAYID);
|
pAttumen->SetDisplayId(MOUNTED_DISPLAYID);
|
||||||
pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
if(pAttumen->getVictim())
|
if(pAttumen->getVictim())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
AddId[i] = 0;
|
AddId[i] = 0;
|
||||||
}
|
}
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -340,7 +340,7 @@ struct TRINITY_DLL_DECL boss_moroes_guestAI : public ScriptedAI
|
|||||||
for(uint8 i = 0; i < 4; ++i)
|
for(uint8 i = 0; i < 4; ++i)
|
||||||
GuestGUID[i] = 0;
|
GuestGUID[i] = 0;
|
||||||
|
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_nightbaneAI(Creature* c) : ScriptedAI(c)
|
boss_nightbaneAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
Intro = true;
|
Intro = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,9 +138,9 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
|||||||
|
|
||||||
void HandleTerraceDoors(bool open)
|
void HandleTerraceDoors(bool open)
|
||||||
{
|
{
|
||||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1)))
|
if(GameObject *Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1)))
|
||||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||||
if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2)))
|
if(GameObject *Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2)))
|
||||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ struct TRINITY_DLL_DECL netherspite_infernalAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(spell->Id == SPELL_INFERNAL_RELAY)
|
if(spell->Id == SPELL_INFERNAL_RELAY)
|
||||||
{
|
{
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
|
m_creature->SetDisplayId(m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID));
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
HellfireTimer = 4000;
|
HellfireTimer = 4000;
|
||||||
CleanupTimer = 170000;
|
CleanupTimer = 170000;
|
||||||
@@ -157,7 +157,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_malchezaarAI(Creature *c) : ScriptedAI(c)
|
boss_malchezaarAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
@@ -208,11 +208,8 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
|||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
GameObject* Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_GAMEOBJECT_NETHER_DOOR));
|
if(GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_NETHER_DOOR)))
|
||||||
if(Door)
|
|
||||||
{
|
|
||||||
Door->SetGoState(GO_STATE_ACTIVE);
|
Door->SetGoState(GO_STATE_ACTIVE);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,11 +237,8 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
|||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
GameObject* Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_GAMEOBJECT_NETHER_DOOR));
|
if(GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_NETHER_DOOR)))
|
||||||
if(Door)
|
|
||||||
{
|
|
||||||
Door->SetGoState(GO_STATE_ACTIVE);
|
Door->SetGoState(GO_STATE_ACTIVE);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,11 +248,8 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
|||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
GameObject* Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_GAMEOBJECT_NETHER_DOOR));
|
if(GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_NETHER_DOOR)))
|
||||||
if(Door)
|
|
||||||
{
|
|
||||||
Door->SetGoState(GO_STATE_READY);
|
Door->SetGoState(GO_STATE_READY);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,7 +368,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
|||||||
|
|
||||||
if (Infernal)
|
if (Infernal)
|
||||||
{
|
{
|
||||||
Infernal->SetUInt32Value(UNIT_FIELD_DISPLAYID, INFERNAL_MODEL_INVISIBLE);
|
Infernal->SetDisplayId(INFERNAL_MODEL_INVISIBLE);
|
||||||
Infernal->setFaction(m_creature->getFaction());
|
Infernal->setFaction(m_creature->getFaction());
|
||||||
if(point)
|
if(point)
|
||||||
CAST_AI(netherspite_infernalAI, Infernal->AI())->point=point;
|
CAST_AI(netherspite_infernalAI, Infernal->AI())->point=point;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_aranAI(Creature *c) : ScriptedAI(c)
|
boss_aranAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -142,7 +142,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
|||||||
// Not in progress
|
// Not in progress
|
||||||
pInstance->SetData(DATA_SHADEOFARAN_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_SHADEOFARAN_EVENT, NOT_STARTED);
|
||||||
|
|
||||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
if(GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||||
Door->SetGoState(GO_STATE_ACTIVE);
|
Door->SetGoState(GO_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -164,7 +164,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
pInstance->SetData(DATA_SHADEOFARAN_EVENT, DONE);
|
pInstance->SetData(DATA_SHADEOFARAN_EVENT, DONE);
|
||||||
|
|
||||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
if(GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||||
Door->SetGoState(GO_STATE_ACTIVE);
|
Door->SetGoState(GO_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -181,7 +181,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
|||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
pInstance->SetData(DATA_SHADEOFARAN_EVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_SHADEOFARAN_EVENT, IN_PROGRESS);
|
||||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
if(GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||||
Door->SetGoState(GO_STATE_READY);
|
Door->SetGoState(GO_STATE_READY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -232,7 +232,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
if(GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_LIBRARY_DOOR)))
|
||||||
Door->SetGoState(GO_STATE_READY);
|
Door->SetGoState(GO_STATE_READY);
|
||||||
CloseDoorTimer = 0;
|
CloseDoorTimer = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ struct TRINITY_DLL_DECL mob_kilrekAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_kilrekAI(Creature *c) : ScriptedAI(c)
|
mob_kilrekAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -157,7 +157,7 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
for(uint8 i = 0; i < 2; ++i)
|
for(uint8 i = 0; i < 2; ++i)
|
||||||
PortalGUID[i] = 0;
|
PortalGUID[i] = 0;
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ struct TRINITY_DLL_DECL boss_dorotheeAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_dorotheeAI(Creature* c) : ScriptedAI(c)
|
boss_dorotheeAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -258,7 +258,7 @@ struct TRINITY_DLL_DECL boss_strawmanAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_strawmanAI(Creature* c) : ScriptedAI(c)
|
boss_strawmanAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -355,7 +355,7 @@ struct TRINITY_DLL_DECL boss_tinheadAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_tinheadAI(Creature* c) : ScriptedAI(c)
|
boss_tinheadAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -448,7 +448,7 @@ struct TRINITY_DLL_DECL boss_roarAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_roarAI(Creature* c) : ScriptedAI(c)
|
boss_roarAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -540,7 +540,7 @@ struct TRINITY_DLL_DECL boss_croneAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_croneAI(Creature* c) : ScriptedAI(c)
|
boss_croneAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -573,11 +573,11 @@ struct TRINITY_DLL_DECL boss_croneAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
||||||
|
|
||||||
if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
if (GameObject* lDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||||
lDoor->SetGoState(GO_STATE_ACTIVE);
|
lDoor->SetGoState(GO_STATE_ACTIVE);
|
||||||
if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
if (GameObject* rDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
||||||
rDoor->SetGoState(GO_STATE_ACTIVE);
|
rDoor->SetGoState(GO_STATE_ACTIVE);
|
||||||
if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
if (GameObject* pSideEntrance = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -729,7 +729,7 @@ struct TRINITY_DLL_DECL boss_bigbadwolfAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_bigbadwolfAI(Creature* c) : ScriptedAI(c)
|
boss_bigbadwolfAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -768,11 +768,11 @@ struct TRINITY_DLL_DECL boss_bigbadwolfAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
||||||
|
|
||||||
if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
if (GameObject* lDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||||
lDoor->SetGoState(GO_STATE_ACTIVE);
|
lDoor->SetGoState(GO_STATE_ACTIVE);
|
||||||
if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
if (GameObject* rDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
||||||
rDoor->SetGoState(GO_STATE_ACTIVE);
|
rDoor->SetGoState(GO_STATE_ACTIVE);
|
||||||
if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
if (GameObject* pSideEntrance = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -920,7 +920,7 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_julianneAI(Creature* c) : ScriptedAI(c)
|
boss_julianneAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
EntryYellTimer = 1000;
|
EntryYellTimer = 1000;
|
||||||
AggroYellTimer = 10000;
|
AggroYellTimer = 10000;
|
||||||
}
|
}
|
||||||
@@ -1015,11 +1015,11 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
||||||
|
|
||||||
if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
if (GameObject* lDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||||
lDoor->SetGoState(GO_STATE_ACTIVE);
|
lDoor->SetGoState(GO_STATE_ACTIVE);
|
||||||
if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
if (GameObject* rDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
||||||
rDoor->SetGoState(GO_STATE_ACTIVE);
|
rDoor->SetGoState(GO_STATE_ACTIVE);
|
||||||
if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
if (GameObject* pSideEntrance = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1036,7 +1036,7 @@ struct TRINITY_DLL_DECL boss_romuloAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_romuloAI(Creature* c) : ScriptedAI(c)
|
boss_romuloAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
EntryYellTimer = 8000;
|
EntryYellTimer = 8000;
|
||||||
AggroYellTimer = 15000;
|
AggroYellTimer = 15000;
|
||||||
}
|
}
|
||||||
@@ -1104,11 +1104,11 @@ struct TRINITY_DLL_DECL boss_romuloAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
pInstance->SetData(DATA_OPERA_EVENT, DONE);
|
||||||
|
|
||||||
if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
if (GameObject* lDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||||
lDoor->SetGoState(GO_STATE_ACTIVE);
|
lDoor->SetGoState(GO_STATE_ACTIVE);
|
||||||
if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
if (GameObject* rDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)))
|
||||||
rDoor->SetGoState(GO_STATE_ACTIVE);
|
rDoor->SetGoState(GO_STATE_ACTIVE);
|
||||||
if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
if (GameObject* pSideEntrance = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1161,7 +1161,7 @@ void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
Romulo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
Romulo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
Romulo->GetMotionMaster()->Clear();
|
Romulo->GetMotionMaster()->Clear();
|
||||||
Romulo->setDeathState(JUST_DIED);
|
Romulo->setDeathState(JUST_DIED);
|
||||||
Romulo->CombatStop();
|
Romulo->CombatStop(true);
|
||||||
Romulo->DeleteThreatList();
|
Romulo->DeleteThreatList();
|
||||||
Romulo->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
Romulo->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||||
}
|
}
|
||||||
@@ -1216,7 +1216,7 @@ void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
Julianne->GetMotionMaster()->Clear();
|
Julianne->GetMotionMaster()->Clear();
|
||||||
Julianne->setDeathState(JUST_DIED);
|
Julianne->setDeathState(JUST_DIED);
|
||||||
Julianne->CombatStop();
|
Julianne->CombatStop(true);
|
||||||
Julianne->DeleteThreatList();
|
Julianne->DeleteThreatList();
|
||||||
Julianne->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
Julianne->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
|||||||
npc_barnesAI(Creature* c) : npc_escortAI(c)
|
npc_barnesAI(Creature* c) : npc_escortAI(c)
|
||||||
{
|
{
|
||||||
RaidWiped = false;
|
RaidWiped = false;
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -148,10 +148,10 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
|||||||
|
|
||||||
Event = pInstance->GetData(DATA_OPERA_PERFORMANCE);
|
Event = pInstance->GetData(DATA_OPERA_PERFORMANCE);
|
||||||
|
|
||||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
if (GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||||
Door->SetGoState(GO_STATE_READY);
|
Door->SetGoState(GO_STATE_READY);
|
||||||
|
|
||||||
if (GameObject* Curtain = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_CURTAINS)))
|
if (GameObject* Curtain = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_CURTAINS)))
|
||||||
Curtain->SetGoState(GO_STATE_READY);
|
Curtain->SetGoState(GO_STATE_READY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -180,7 +180,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
|||||||
case 5:
|
case 5:
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
if (GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||||
Door->SetGoState(GO_STATE_READY);
|
Door->SetGoState(GO_STATE_READY);
|
||||||
}
|
}
|
||||||
IsBeingEscorted = false;
|
IsBeingEscorted = false;
|
||||||
@@ -261,7 +261,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
|||||||
if(!pInstance)
|
if(!pInstance)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (GameObject* Curtain = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_CURTAINS)))
|
if (GameObject* Curtain = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_CURTAINS)))
|
||||||
Curtain->SetGoState(GO_STATE_ACTIVE);
|
Curtain->SetGoState(GO_STATE_ACTIVE);
|
||||||
|
|
||||||
CurtainTimer = 0;
|
CurtainTimer = 0;
|
||||||
@@ -315,7 +315,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
|||||||
|
|
||||||
pInstance->SetData(DATA_OPERA_EVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_OPERA_EVENT, IN_PROGRESS);
|
||||||
|
|
||||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
if (GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT)))
|
||||||
Door->SetGoState(GO_STATE_ACTIVE);
|
Door->SetGoState(GO_STATE_ACTIVE);
|
||||||
|
|
||||||
m_creature->CastSpell(m_creature, SPELL_TUXEDO, true);
|
m_creature->CastSpell(m_creature, SPELL_TUXEDO, true);
|
||||||
@@ -486,7 +486,7 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
npc_image_of_medivhAI(Creature* c) : ScriptedAI(c)
|
npc_image_of_medivhAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_felblood_kaelthasAI(Creature* c) : ScriptedAI(c)
|
boss_felblood_kaelthasAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData()); Heroic = c->GetMap()->IsHeroic();
|
pInstance = c->GetInstanceData(); Heroic = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
@@ -130,8 +130,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
|||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_KAELTHAS_EVENT, 0);
|
pInstance->SetData(DATA_KAELTHAS_EVENT, 0);
|
||||||
|
|
||||||
GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_DOOR));
|
if (GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_KAEL_DOOR)))
|
||||||
if (Door)
|
|
||||||
Door->SetGoState(GO_STATE_ACTIVE); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
|
Door->SetGoState(GO_STATE_ACTIVE); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
|
||||||
// Small door opened after event are expected to be closed by default
|
// Small door opened after event are expected to be closed by default
|
||||||
}
|
}
|
||||||
@@ -139,8 +138,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
|||||||
void JustDied(Unit *killer)
|
void JustDied(Unit *killer)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DEATH, m_creature);
|
DoScriptText(SAY_DEATH, m_creature);
|
||||||
GameObject* EncounterDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_KAEL_DOOR));
|
if (GameObject* EncounterDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_KAEL_DOOR)))
|
||||||
if (EncounterDoor)
|
|
||||||
EncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door
|
EncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,8 +152,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
GameObject* EncounterDoor = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_DOOR));
|
if (GameObject* EncounterDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_KAEL_DOOR)))
|
||||||
if (EncounterDoor)
|
|
||||||
EncounterDoor->SetGoState(GO_STATE_READY); //Close the encounter door, open it in JustDied/Reset
|
EncounterDoor->SetGoState(GO_STATE_READY); //Close the encounter door, open it in JustDied/Reset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -347,10 +344,10 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI
|
|||||||
|
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
GameObject* KaelLeft = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_STATUE_LEFT));
|
if (GameObject* KaelLeft = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_KAEL_STATUE_LEFT)))
|
||||||
if (KaelLeft) KaelLeft->SetGoState(GO_STATE_ACTIVE);
|
KaelLeft->SetGoState(GO_STATE_ACTIVE);
|
||||||
GameObject* KaelRight = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_STATUE_RIGHT));
|
if (GameObject* KaelRight = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_KAEL_STATUE_RIGHT)))
|
||||||
if (KaelRight) KaelRight->SetGoState(GO_STATE_ACTIVE);
|
KaelRight->SetGoState(GO_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
@@ -450,7 +447,7 @@ struct TRINITY_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_felkael_phoenixAI(Creature* c) : ScriptedAI(c)
|
mob_felkael_phoenixAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_priestess_delrissaAI(Creature* c) : ScriptedAI(c)
|
boss_priestess_delrissaAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
Heroic = c->GetMap()->IsHeroic();
|
Heroic = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
|
|||||||
|
|
||||||
pInstance->SetData(DATA_DELRISSA_EVENT, DONE);
|
pInstance->SetData(DATA_DELRISSA_EVENT, DONE);
|
||||||
|
|
||||||
if (GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_DELRISSA_DOOR)))
|
if (GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_DELRISSA_DOOR)))
|
||||||
Door->SetGoState(GO_STATE_ACTIVE);
|
Door->SetGoState(GO_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,7 +358,7 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI
|
|||||||
boss_priestess_guestAI(Creature* c) : ScriptedAI(c)
|
boss_priestess_guestAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
Group.clear();
|
Group.clear();
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
AcquireGUIDs();
|
AcquireGUIDs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_selin_fireheartAI(Creature* c) : ScriptedAI(c)
|
boss_selin_fireheartAI(Creature* c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
|
|
||||||
Crystals.clear();
|
Crystals.clear();
|
||||||
//GUIDs per instance is static, so we only need to load them once.
|
//GUIDs per instance is static, so we only need to load them once.
|
||||||
@@ -105,8 +105,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR));
|
if (GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR)))
|
||||||
if (Door)
|
|
||||||
Door->SetGoState(GO_STATE_ACTIVE); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
|
Door->SetGoState(GO_STATE_ACTIVE); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
|
||||||
// Small door opened after event are expected to be closed by default
|
// Small door opened after event are expected to be closed by default
|
||||||
// Set Inst data for encounter
|
// Set Inst data for encounter
|
||||||
@@ -187,8 +186,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
|||||||
|
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
GameObject* EncounterDoor = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR));
|
if (GameObject* EncounterDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR)))
|
||||||
if (EncounterDoor)
|
|
||||||
EncounterDoor->SetGoState(GO_STATE_READY); //Close the encounter door, open it in JustDied/Reset
|
EncounterDoor->SetGoState(GO_STATE_READY); //Close the encounter door, open it in JustDied/Reset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -236,12 +234,10 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI
|
|||||||
|
|
||||||
pInstance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete!
|
pInstance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete!
|
||||||
|
|
||||||
GameObject* EncounterDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR));
|
if (GameObject* EncounterDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR)))
|
||||||
if (EncounterDoor)
|
|
||||||
EncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door
|
EncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door
|
||||||
|
|
||||||
GameObject* ContinueDoor = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_SELIN_DOOR));
|
if (GameObject* ContinueDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_SELIN_DOOR)))
|
||||||
if (ContinueDoor)
|
|
||||||
ContinueDoor->SetGoState(GO_STATE_ACTIVE); // Open the door leading further in
|
ContinueDoor->SetGoState(GO_STATE_ACTIVE); // Open the door leading further in
|
||||||
|
|
||||||
ShatterRemainingCrystals();
|
ShatterRemainingCrystals();
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_vexallusAI(Creature *c) : ScriptedAI(c)
|
boss_vexallusAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData()); Heroic = c->GetMap()->IsHeroic();
|
pInstance = c->GetInstanceData(); Heroic = c->GetMap()->IsHeroic();
|
||||||
Heroic = c->GetMap()->IsHeroic();
|
Heroic = c->GetMap()->IsHeroic();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
pInstance->SetData(DATA_VEXALLUS_EVENT, DONE);
|
pInstance->SetData(DATA_VEXALLUS_EVENT, DONE);
|
||||||
|
|
||||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_VEXALLUS_DOOR)))
|
if (GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_VEXALLUS_DOOR)))
|
||||||
Door->SetGoState(GO_STATE_ACTIVE);
|
Door->SetGoState(GO_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ struct TRINITY_DLL_DECL boss_noxxionAI : public ScriptedAI
|
|||||||
m_creature->setFaction(14);
|
m_creature->setFaction(14);
|
||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
//Noxxion model
|
//Noxxion model
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11172);
|
m_creature->SetDisplayId(11172);
|
||||||
Invisible = false;
|
Invisible = false;
|
||||||
//m_creature->m_canMove = true;
|
//m_creature->m_canMove = true;
|
||||||
} else if (Invisible)
|
} else if (Invisible)
|
||||||
@@ -119,7 +119,7 @@ struct TRINITY_DLL_DECL boss_noxxionAI : public ScriptedAI
|
|||||||
m_creature->setFaction(35);
|
m_creature->setFaction(35);
|
||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
// Invisible Model
|
// Invisible Model
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11686);
|
m_creature->SetDisplayId(11686);
|
||||||
SummonAdds(m_creature->getVictim());
|
SummonAdds(m_creature->getVictim());
|
||||||
SummonAdds(m_creature->getVictim());
|
SummonAdds(m_creature->getVictim());
|
||||||
SummonAdds(m_creature->getVictim());
|
SummonAdds(m_creature->getVictim());
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ struct TRINITY_DLL_DECL boss_golemaggAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_golemaggAI(Creature *c) : ScriptedAI(c)
|
boss_golemaggAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
ScriptedInstance *pInstance;
|
ScriptedInstance *pInstance;
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ struct TRINITY_DLL_DECL mob_core_ragerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_core_ragerAI(Creature *c) : ScriptedAI(c)
|
mob_core_ragerAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Mangle_Timer;
|
uint32 Mangle_Timer;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ struct TRINITY_DLL_DECL boss_majordomoAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_majordomoAI(Creature *c) : ScriptedAI(c)
|
boss_majordomoAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ struct TRINITY_DLL_DECL boss_sulfuronAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
boss_sulfuronAI(Creature *c) : ScriptedAI(c)
|
boss_sulfuronAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Darkstrike_Timer;
|
uint32 Darkstrike_Timer;
|
||||||
@@ -126,7 +126,7 @@ struct TRINITY_DLL_DECL mob_flamewaker_priestAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
mob_flamewaker_priestAI(Creature *c) : ScriptedAI(c)
|
mob_flamewaker_priestAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = (c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Heal_Timer;
|
uint32 Heal_Timer;
|
||||||
|
|||||||
@@ -93,8 +93,6 @@ struct TRINITY_DLL_DECL npc_kyle_frenziedAI : public ScriptedAI
|
|||||||
m_creature->UpdateEntry(NPC_KYLE_FRENZIED);
|
m_creature->UpdateEntry(NPC_KYLE_FRENZIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who) { }
|
|
||||||
|
|
||||||
void SpellHit(Unit* pCaster, SpellEntry const* pSpell)
|
void SpellHit(Unit* pCaster, SpellEntry const* pSpell)
|
||||||
{
|
{
|
||||||
if (!m_creature->isInCombat() && !bEvent && pSpell->Id == SPELL_LUNCH)
|
if (!m_creature->isInCombat() && !bEvent && pSpell->Id == SPELL_LUNCH)
|
||||||
@@ -152,8 +150,8 @@ struct TRINITY_DLL_DECL npc_kyle_frenziedAI : public ScriptedAI
|
|||||||
case 3:
|
case 3:
|
||||||
uiEventTimer = 5000;
|
uiEventTimer = 5000;
|
||||||
|
|
||||||
if (Unit* pUnit = Unit::GetUnit(*m_creature,uiPlayerGUID))
|
if (Player* pUnit = Unit::GetPlayer(uiPlayerGUID))
|
||||||
((Player*)pUnit)->TalkedToCreature(m_creature->GetEntry(), m_creature->GetGUID());
|
pUnit->TalkedToCreature(m_creature->GetEntry(), m_creature->GetGUID());
|
||||||
|
|
||||||
m_creature->UpdateEntry(NPC_KYLE_FRIENDLY);
|
m_creature->UpdateEntry(NPC_KYLE_FRIENDLY);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -109,6 +109,17 @@ struct TRINITY_DLL_DECL mob_lumpAI : public ScriptedAI
|
|||||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AttackedBy(Unit* pAttacker)
|
||||||
|
{
|
||||||
|
if (m_creature->getVictim())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_creature->IsFriendlyTo(pAttacker))
|
||||||
|
return;
|
||||||
|
|
||||||
|
AttackStart(pAttacker);
|
||||||
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit *done_by, uint32 & damage)
|
void DamageTaken(Unit *done_by, uint32 & damage)
|
||||||
{
|
{
|
||||||
if (done_by->GetTypeId() == TYPEID_PLAYER && (m_creature->GetHealth() - damage)*100 / m_creature->GetMaxHealth() < 30)
|
if (done_by->GetTypeId() == TYPEID_PLAYER && (m_creature->GetHealth() - damage)*100 / m_creature->GetMaxHealth() < 30)
|
||||||
@@ -122,7 +133,7 @@ struct TRINITY_DLL_DECL mob_lumpAI : public ScriptedAI
|
|||||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
m_creature->RemoveAllAuras();
|
m_creature->RemoveAllAuras();
|
||||||
m_creature->DeleteThreatList();
|
m_creature->DeleteThreatList();
|
||||||
m_creature->CombatStop();
|
m_creature->CombatStop(true);
|
||||||
m_creature->setFaction(1080); //friendly
|
m_creature->setFaction(1080); //friendly
|
||||||
m_creature->SetStandState(UNIT_STAND_STATE_SIT);
|
m_creature->SetStandState(UNIT_STAND_STATE_SIT);
|
||||||
DoScriptText(LUMP_DEFEAT, m_creature);
|
DoScriptText(LUMP_DEFEAT, m_creature);
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ struct TRINITY_DLL_DECL mob_gothik_minionAI : public SpellAI
|
|||||||
{
|
{
|
||||||
if(me->isSummon())
|
if(me->isSummon())
|
||||||
{
|
{
|
||||||
if(Unit *owner = ((TempSummon*)me)->GetSummoner())
|
if(Unit *owner = CAST_SUM(me)->GetSummoner())
|
||||||
SpellAI::JustDied(owner);
|
SpellAI::JustDied(owner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ struct TRINITY_DLL_DECL boss_highlord_mograineAI : public ScriptedAI
|
|||||||
|
|
||||||
void InitialYell()
|
void InitialYell()
|
||||||
{
|
{
|
||||||
if(!InCombat)
|
if(!m_creature->isInCombat())
|
||||||
{
|
{
|
||||||
switch(rand()%3)
|
switch(rand()%3)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ struct TRINITY_DLL_DECL boss_anomalusAI : public ScriptedAI
|
|||||||
pInstance->SetData(DATA_ANOMALUS_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_ANOMALUS_EVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ struct TRINITY_DLL_DECL boss_keristraszaAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
DoCast(m_creature, SPELL_INTENSE_COLD);
|
DoCast(m_creature, SPELL_INTENSE_COLD);
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
|
|||||||
pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ struct TRINITY_DLL_DECL boss_ormorokAI : public ScriptedAI
|
|||||||
pInstance->SetData(DATA_ORMOROK_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_ORMOROK_EVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ struct TRINITY_DLL_DECL npc_shenthulAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (Reset_Timer < diff)
|
if (Reset_Timer < diff)
|
||||||
{
|
{
|
||||||
if (Player* pPlayer = (Player*)Unit::GetUnit((*m_creature),playerGUID))
|
if (Player* pPlayer = Unit::GetPlayer(playerGUID))
|
||||||
{
|
{
|
||||||
if (pPlayer->GetTypeId() == TYPEID_PLAYER && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE)
|
if (pPlayer->GetTypeId() == TYPEID_PLAYER && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE)
|
||||||
pPlayer->FailQuest(QUEST_SHATTERED_SALUTE);
|
pPlayer->FailQuest(QUEST_SHATTERED_SALUTE);
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ struct TRINITY_DLL_DECL instance_razorfen_kraul : public ScriptedInstance
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameObject *go = GameObject::GetGameObject(*player,guid))
|
if (GameObject *go = instance->GetGameObject(guid))
|
||||||
go->SetGoState(GOState(state));
|
go->SetGoState(GOState(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ struct TRINITY_DLL_DECL npc_deaths_head_ward_keeperAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
npc_deaths_head_ward_keeperAI(Creature *c) : ScriptedAI(c)
|
npc_deaths_head_ward_keeperAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
pInstance = c->GetInstanceData();
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,10 +155,6 @@ struct TRINITY_DLL_DECL npc_deaths_head_ward_keeperAI : public ScriptedAI
|
|||||||
QuillboarChanneling_Timer = 1500;
|
QuillboarChanneling_Timer = 1500;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit *who)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!m_creature->isAlive())
|
if (!m_creature->isAlive())
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user