mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Battlegrounds/Battleground.cpp src/server/game/Handlers/QuestHandler.cpp src/server/shared/DataStores/DBCFileLoader.h
This commit is contained in:
@@ -400,12 +400,12 @@ public:
|
||||
## go_shallow_grave
|
||||
######*/
|
||||
|
||||
enum
|
||||
enum ShallowGrave
|
||||
{
|
||||
ZOMBIE = 7286,
|
||||
DEAD_HERO = 7276,
|
||||
ZOMBIE_CHANCE = 65,
|
||||
DEAD_HERO_CHANCE = 10
|
||||
NPC_ZOMBIE = 7286,
|
||||
NPC_DEAD_HERO = 7276,
|
||||
CHANCE_ZOMBIE = 65,
|
||||
CHANCE_DEAD_HERO = 10
|
||||
};
|
||||
|
||||
class go_shallow_grave : public GameObjectScript
|
||||
@@ -419,11 +419,11 @@ public:
|
||||
if (go->GetUseCount() == 0)
|
||||
{
|
||||
uint32 randomchance = urand(0, 100);
|
||||
if (randomchance < ZOMBIE_CHANCE)
|
||||
go->SummonCreature(ZOMBIE, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
if (randomchance < CHANCE_ZOMBIE)
|
||||
go->SummonCreature(NPC_ZOMBIE, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
else
|
||||
if ((randomchance - ZOMBIE_CHANCE) < DEAD_HERO_CHANCE)
|
||||
go->SummonCreature(DEAD_HERO, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
if ((randomchance - CHANCE_ZOMBIE) < CHANCE_DEAD_HERO)
|
||||
go->SummonCreature(NPC_DEAD_HERO, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
}
|
||||
go->AddUse();
|
||||
return false;
|
||||
|
||||
@@ -52,7 +52,7 @@ enum Yells
|
||||
SAY_INTRO = 5
|
||||
};
|
||||
|
||||
enum
|
||||
enum Misc
|
||||
{
|
||||
ACHIEV_TIMED_START_EVENT = 20381,
|
||||
};
|
||||
|
||||
@@ -99,7 +99,7 @@ static _Messages _GossipMessage[]=
|
||||
{MSG_ANUBARAK, GOSSIP_ACTION_INFO_DEF + 6, true, BOSS_ANUBARAK}
|
||||
};
|
||||
|
||||
enum
|
||||
enum Messages
|
||||
{
|
||||
NUM_MESSAGES = 6
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef DEF_CRUSADER_H
|
||||
#define DEF_CRUSADER_H
|
||||
|
||||
enum
|
||||
enum DataTypes
|
||||
{
|
||||
BOSS_BEASTS = 0,
|
||||
BOSS_JARAXXUS = 1,
|
||||
@@ -28,12 +28,18 @@ enum
|
||||
|
||||
INCREASE = 501,
|
||||
DECREASE = 502,
|
||||
};
|
||||
|
||||
enum SpellIds
|
||||
{
|
||||
SPELL_WILFRED_PORTAL = 68424,
|
||||
SPELL_JARAXXUS_CHAINS = 67924,
|
||||
SPELL_CORPSE_TELEPORT = 69016,
|
||||
SPELL_DESTROY_FLOOR_KNOCKUP = 68193,
|
||||
};
|
||||
|
||||
enum MiscData
|
||||
{
|
||||
DESPAWN_TIME = 300000,
|
||||
|
||||
DISPLAYID_DESTROYED_FLOOR = 9060
|
||||
|
||||
@@ -198,7 +198,7 @@ enum Events
|
||||
EVENT_CLOSE_FROSTWORN_DOOR,
|
||||
};
|
||||
|
||||
enum Enum
|
||||
enum Misc
|
||||
{
|
||||
ACTION_START_INTRO,
|
||||
ACTION_SKIP_INTRO,
|
||||
@@ -744,7 +744,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*Killer*/) OVERRIDE
|
||||
{
|
||||
if (_instance)
|
||||
if (_instance)
|
||||
_instance->SetData(DATA_ESCAPE_EVENT, FAIL);
|
||||
}
|
||||
|
||||
@@ -893,7 +893,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
case EVENT_ESCAPE_13:
|
||||
if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
|
||||
{
|
||||
lichking->AI()->DoCast(lichking, SPELL_REMORSELESS_WINTER, true);
|
||||
lichking->AI()->DoCast(lichking, SPELL_REMORSELESS_WINTER, true);
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
lichking->GetMotionMaster()->MoveIdle();
|
||||
lichking->GetMotionMaster()->MoveChase(me);
|
||||
@@ -901,9 +901,9 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL,IceWalls[0].GetPositionX(), IceWalls[0].GetPositionY(), IceWalls[0].GetPositionZ(), IceWalls[0].GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 720000))
|
||||
{
|
||||
_walltargetGUID = walltarget->GetGUID();
|
||||
walltarget->AI()->DoCast(walltarget, SPELL_SUMMON_ICE_WALL);
|
||||
walltarget->AI()->DoCast(walltarget, SPELL_SUMMON_ICE_WALL);
|
||||
walltarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->Attack(walltarget,false);
|
||||
me->Attack(walltarget,false);
|
||||
}
|
||||
me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[3]);
|
||||
_events.ScheduleEvent(EVENT_ESCAPE_14, 8000);
|
||||
@@ -921,7 +921,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
else
|
||||
me->AI()->Talk(SAY_SYLVANAS_ESCAPE_2);
|
||||
}
|
||||
}
|
||||
}
|
||||
_events.ScheduleEvent(EVENT_ESCAPE_15, 1000);
|
||||
break;
|
||||
case EVENT_ESCAPE_15:
|
||||
@@ -966,7 +966,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
else
|
||||
me->RemoveAurasDueToSpell(SPELL_SYLVANAS_DESTROY_ICE_WALL);
|
||||
}
|
||||
if (_icewall && _icewall < 4)
|
||||
if (_icewall && _icewall < 4)
|
||||
me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[_icewall + 3]);
|
||||
_events.ScheduleEvent(EVENT_ESCAPE_18, 2000);
|
||||
break;
|
||||
@@ -991,7 +991,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL, IceWalls[_icewall].GetPositionX(), IceWalls[_icewall].GetPositionY(), IceWalls[_icewall].GetPositionZ(), IceWalls[_icewall].GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 720000))
|
||||
{
|
||||
_walltargetGUID = walltarget->GetGUID();
|
||||
walltarget->AI()->DoCast(walltarget, SPELL_SUMMON_ICE_WALL);
|
||||
walltarget->AI()->DoCast(walltarget, SPELL_SUMMON_ICE_WALL);
|
||||
walltarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->Attack(walltarget,false);
|
||||
}
|
||||
@@ -1028,9 +1028,9 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
|
||||
{
|
||||
if (_icewall && _icewall < 3)
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
else
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
|
||||
}
|
||||
if (_icewall == 3)
|
||||
_events.ScheduleEvent(EVENT_ESCAPE_21, 16000); // last wall, really far
|
||||
@@ -1826,20 +1826,20 @@ class npc_raging_ghoul : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_raging_ghoul() : CreatureScript("npc_raging_ghoul") { }
|
||||
|
||||
|
||||
struct npc_raging_ghoulAI : public ScriptedAI
|
||||
{
|
||||
npc_raging_ghoulAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = me->GetInstanceScript();
|
||||
_instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
|
||||
InstanceScript* _instance;
|
||||
uint32 _emergeTimer;
|
||||
bool _doEmerge;
|
||||
bool _doJump;
|
||||
uint64 _leaderGUID;
|
||||
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_emergeTimer = 4000;
|
||||
@@ -1847,47 +1847,47 @@ public:
|
||||
_doJump = false;
|
||||
if (_instance && _instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
|
||||
_instance->SetData(DATA_SUMMONS, 1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void IsSummonedBy(Unit*) OVERRIDE
|
||||
{
|
||||
DoCast(me, SPELL_EMERGE_VISUAL);
|
||||
DoZoneInCombat(me, 100.00f);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (_instance)
|
||||
_instance->SetData(DATA_SUMMONS, 0);
|
||||
}
|
||||
|
||||
|
||||
void AttackStart(Unit* who) OVERRIDE
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
|
||||
if (!_doEmerge)
|
||||
return;
|
||||
|
||||
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!_instance)
|
||||
return;
|
||||
|
||||
|
||||
if (_instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
_leaderGUID = _instance->GetData64(DATA_ESCAPE_LEADER);
|
||||
Creature* leader = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_ESCAPE_LEADER));
|
||||
|
||||
|
||||
if (_doEmerge != true)
|
||||
{
|
||||
if (_emergeTimer < diff)
|
||||
{
|
||||
_doEmerge = true;
|
||||
_doEmerge = true;
|
||||
if (leader)
|
||||
{
|
||||
DoResetThreat();
|
||||
@@ -1898,7 +1898,7 @@ public:
|
||||
else
|
||||
_emergeTimer -= diff;
|
||||
}
|
||||
|
||||
|
||||
if (me->Attack(leader,true))/*(Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150.0f))*/
|
||||
{
|
||||
if (!_doJump && me->IsWithinDistInMap(leader, 30.0f) && !me->IsWithinDistInMap(leader, 5.0f))
|
||||
@@ -1913,7 +1913,7 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_raging_ghoulAI(creature);
|
||||
@@ -1924,14 +1924,14 @@ class npc_risen_witch_doctor : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_risen_witch_doctor() : CreatureScript("npc_risen_witch_doctor") { }
|
||||
|
||||
|
||||
struct npc_risen_witch_doctorAI : public ScriptedAI
|
||||
{
|
||||
npc_risen_witch_doctorAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = me->GetInstanceScript();
|
||||
_instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
|
||||
InstanceScript* _instance;
|
||||
uint32 _emergeTimer;
|
||||
bool _doEmerge;
|
||||
@@ -1939,7 +1939,7 @@ public:
|
||||
uint32 _boltTimer;
|
||||
uint32 _boltVolleyTimer;
|
||||
uint32 _curseTimer;
|
||||
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_emergeTimer = 5000;
|
||||
@@ -1951,36 +1951,36 @@ public:
|
||||
if (_instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
|
||||
_instance->SetData(DATA_SUMMONS, 1);
|
||||
}
|
||||
|
||||
|
||||
void IsSummonedBy(Unit*) OVERRIDE
|
||||
{
|
||||
DoCast(me, SPELL_EMERGE_VISUAL);
|
||||
DoZoneInCombat(me, 100.00f);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (_instance)
|
||||
if (_instance)
|
||||
_instance->SetData(DATA_SUMMONS, 0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void AttackStart(Unit* who) OVERRIDE
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
|
||||
if (_doEmerge == false)
|
||||
return;
|
||||
|
||||
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!_instance)
|
||||
return;
|
||||
|
||||
|
||||
if (_instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
if (_doEmerge != true)
|
||||
@@ -1989,7 +1989,7 @@ public:
|
||||
{
|
||||
_doEmerge = true;
|
||||
_leaderGUID = _instance->GetData64(DATA_ESCAPE_LEADER);
|
||||
|
||||
|
||||
if (Creature* leader = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_ESCAPE_LEADER)))
|
||||
{
|
||||
DoResetThreat();
|
||||
@@ -2000,25 +2000,25 @@ public:
|
||||
else
|
||||
_emergeTimer -= diff;
|
||||
}
|
||||
|
||||
|
||||
if (_curseTimer < diff)
|
||||
{
|
||||
if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(target, SPELL_COURSE_OF_DOOM);
|
||||
_curseTimer = urand(10000, 15000);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
_curseTimer -= diff;
|
||||
|
||||
|
||||
if (_boltTimer < diff)
|
||||
{
|
||||
if (Unit *target = SelectTarget(SELECT_TARGET_TOPAGGRO))
|
||||
DoCast(target, SPELL_SHADOW_BOLT);
|
||||
_boltTimer = urand(2000, 3000);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
_boltTimer -= diff;
|
||||
|
||||
|
||||
if (_boltVolleyTimer < diff)
|
||||
{
|
||||
if (Unit *target = SelectTarget(SELECT_TARGET_TOPAGGRO))
|
||||
@@ -2033,7 +2033,7 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_risen_witch_doctorAI(creature);
|
||||
@@ -2045,20 +2045,20 @@ class npc_lumbering_abomination : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_lumbering_abomination() : CreatureScript("npc_lumbering_abomination") { }
|
||||
|
||||
|
||||
struct npc_lumbering_abominationAI : public ScriptedAI
|
||||
{
|
||||
npc_lumbering_abominationAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = me->GetInstanceScript();
|
||||
_instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
|
||||
InstanceScript* _instance;
|
||||
uint64 _leaderGUID;
|
||||
bool _doWalk;
|
||||
uint32 _strikeTimer;
|
||||
uint32 _vomitTimer;
|
||||
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_doWalk = false;
|
||||
@@ -2066,20 +2066,20 @@ public:
|
||||
_strikeTimer = 6000;
|
||||
if (_instance)
|
||||
if (_instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
|
||||
_instance->SetData(DATA_SUMMONS, 1);
|
||||
_instance->SetData(DATA_SUMMONS, 1);
|
||||
}
|
||||
|
||||
|
||||
void IsSummonedBy(Unit*) OVERRIDE
|
||||
{
|
||||
DoCast(me, SPELL_EMERGE_VISUAL);
|
||||
DoZoneInCombat(me, 100.00f);
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!_instance)
|
||||
return;
|
||||
|
||||
|
||||
if (_instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
if (_doWalk != true)
|
||||
@@ -2101,7 +2101,7 @@ public:
|
||||
}
|
||||
else
|
||||
_strikeTimer -= diff;
|
||||
|
||||
|
||||
if (_vomitTimer < diff)
|
||||
{
|
||||
if (Unit *target = SelectTarget(SELECT_TARGET_TOPAGGRO))
|
||||
@@ -2115,15 +2115,15 @@ public:
|
||||
me->DespawnOrUnsummon();
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (_instance)
|
||||
if (_instance)
|
||||
_instance->SetData(DATA_SUMMONS, 0);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_lumbering_abominationAI(creature);
|
||||
@@ -2145,7 +2145,7 @@ void AddSC_halls_of_reflection()
|
||||
new npc_tortured_rifleman();
|
||||
new npc_raging_ghoul();
|
||||
new npc_risen_witch_doctor();
|
||||
new npc_lumbering_abomination();
|
||||
new npc_lumbering_abomination();
|
||||
new npc_frostworn_general();
|
||||
new npc_spiritual_reflection();
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
HandleGameObject(0, true, go);
|
||||
else
|
||||
HandleGameObject(0, false, go);
|
||||
break;
|
||||
break;
|
||||
case GO_CAVE:
|
||||
_caveGUID = go->GetGUID();
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
|
||||
@@ -255,17 +255,17 @@ public:
|
||||
if (_teamInInstance == ALLIANCE)
|
||||
instance->SummonCreature(NPC_JAINA_PART2, JainaSpawnPos2);
|
||||
else
|
||||
instance->SummonCreature(NPC_SYLVANAS_PART2, SylvanasSpawnPos2);
|
||||
instance->SummonCreature(NPC_SYLVANAS_PART2, SylvanasSpawnPos2);
|
||||
}
|
||||
_frostwornGeneral = data;
|
||||
break;
|
||||
_frostwornGeneral = data;
|
||||
break;
|
||||
case DATA_ESCAPE_EVENT:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (!_escapeevent)
|
||||
if (Creature* jaina_or_sylvanas = instance->GetCreature(_jainaOrSylvanasPart2GUID))
|
||||
jaina_or_sylvanas->AI()->DoAction(ACTION_START_ESCAPING);
|
||||
}
|
||||
}
|
||||
else if (data == NOT_STARTED)
|
||||
{
|
||||
if (Creature* jaina_or_sylvanas = instance->GetCreature(_jainaOrSylvanasPart2GUID))
|
||||
@@ -287,7 +287,7 @@ public:
|
||||
if (Creature* jaina_or_sylvanas = instance->GetCreature(_jainaOrSylvanasPart2GUID))
|
||||
jaina_or_sylvanas->AI()->DoAction(ACTION_WALL_BROKEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (data == 1)
|
||||
_mobsaticewall++;
|
||||
break;
|
||||
@@ -489,9 +489,9 @@ public:
|
||||
case DATA_FROSTMOURNE:
|
||||
return _frostmourneGUID;
|
||||
case DATA_ESCAPE_LEADER:
|
||||
return _jainaOrSylvanasPart2GUID;
|
||||
return _jainaOrSylvanasPart2GUID;
|
||||
case DATA_CAVE_IN:
|
||||
return _caveGUID;
|
||||
return _caveGUID;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -19,24 +19,21 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "naxxramas.h"
|
||||
|
||||
enum Anubrekhan
|
||||
enum Says
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
SAY_GREET = 1,
|
||||
SAY_SLAY = 2,
|
||||
|
||||
NPC_CRYPT_GUARD = 16573
|
||||
SAY_SLAY = 2
|
||||
};
|
||||
|
||||
const Position GuardSummonPos = {3333.72f, -3476.30f, 287.1f, 6.2801f};
|
||||
Position const GuardSummonPos = {3333.72f, -3476.30f, 287.1f, 6.2801f};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_NONE,
|
||||
EVENT_IMPALE,
|
||||
EVENT_IMPALE = 1,
|
||||
EVENT_LOCUST,
|
||||
EVENT_SPAWN_GUARDIAN_NORMAL,
|
||||
EVENT_BERSERK,
|
||||
EVENT_BERSERK
|
||||
};
|
||||
|
||||
enum Spells
|
||||
@@ -47,12 +44,12 @@ enum Spells
|
||||
SPELL_LOCUST_SWARM_25 = 54021,
|
||||
SPELL_SUMMON_CORPSE_SCARABS_PLR = 29105, // This spawns 5 corpse scarabs on top of player
|
||||
SPELL_SUMMON_CORPSE_SCARABS_MOB = 28864, // This spawns 10 corpse scarabs on top of dead guards
|
||||
SPELL_BERSERK = 27680,
|
||||
SPELL_BERSERK = 27680
|
||||
};
|
||||
|
||||
enum
|
||||
enum Misc
|
||||
{
|
||||
ACHIEV_TIMED_START_EVENT = 9891,
|
||||
ACHIEV_TIMED_START_EVENT = 9891
|
||||
};
|
||||
|
||||
class boss_anubrekhan : public CreatureScript
|
||||
|
||||
@@ -25,7 +25,7 @@ enum Spells
|
||||
H_SPELL_HATEFUL_STRIKE = 59192,
|
||||
SPELL_FRENZY = 28131,
|
||||
SPELL_BERSERK = 26662,
|
||||
SPELL_SLIME_BOLT = 32309,
|
||||
SPELL_SLIME_BOLT = 32309
|
||||
};
|
||||
|
||||
enum Yells
|
||||
@@ -45,9 +45,9 @@ enum Events
|
||||
EVENT_SLIME
|
||||
};
|
||||
|
||||
enum
|
||||
enum Misc
|
||||
{
|
||||
ACHIEV_MAKE_QUICK_WERK_OF_HIM_STARTING_EVENT = 10286,
|
||||
ACHIEV_MAKE_QUICK_WERK_OF_HIM_STARTING_EVENT = 10286
|
||||
};
|
||||
|
||||
class boss_patchwerk : public CreatureScript
|
||||
|
||||
@@ -84,6 +84,7 @@ enum CreaturesIds
|
||||
NPC_STALAGG = 15929,
|
||||
NPC_SAPPHIRON = 15989,
|
||||
NPC_KEL_THUZAD = 15990,
|
||||
NPC_CRYPT_GUARD = 16573,
|
||||
NPC_NAXXRAMAS_FOLLOWER = 16505,
|
||||
NPC_FOLLOWER_WORSHIPPER = 16506,
|
||||
NPC_DK_UNDERSTUDY = 16803
|
||||
|
||||
@@ -936,10 +936,10 @@ public:
|
||||
## npc_maxx_a_million
|
||||
######*/
|
||||
|
||||
enum
|
||||
enum MaxxAMillion
|
||||
{
|
||||
QUEST_MARK_V_IS_ALIVE = 10191,
|
||||
GO_DRAENEI_MACHINE = 183771
|
||||
QUEST_MARK_V_IS_ALIVE = 10191,
|
||||
GO_DRAENEI_MACHINE = 183771
|
||||
};
|
||||
|
||||
class npc_maxx_a_million_escort : public CreatureScript
|
||||
|
||||
@@ -1785,6 +1785,40 @@ class spell_q12847_summon_soul_moveto_bunny : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_q13086_cannons_target : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_q13086_cannons_target() : SpellScriptLoader("spell_q13086_cannons_target") { }
|
||||
|
||||
class spell_q13086_cannons_target_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q13086_cannons_target_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].CalcValue()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleEffectDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (WorldLocation const* pos = GetExplTargetDest())
|
||||
GetCaster()->CastSpell(pos->GetPositionX(), pos->GetPositionY(), pos->GetPositionZ(), GetEffectValue(), true);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHit += SpellEffectFn(spell_q13086_cannons_target_SpellScript::HandleEffectDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_q13086_cannons_target_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_quest_spell_scripts()
|
||||
{
|
||||
new spell_q55_sacred_cleansing();
|
||||
@@ -1829,4 +1863,5 @@ void AddSC_quest_spell_scripts()
|
||||
new spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy();
|
||||
new spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon();
|
||||
new spell_q12847_summon_soul_moveto_bunny();
|
||||
new spell_q13086_cannons_target();
|
||||
}
|
||||
|
||||
@@ -16,12 +16,8 @@
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
#include "BattlegroundAB.h"
|
||||
#include "BattlegroundWS.h"
|
||||
#include "BattlegroundIC.h"
|
||||
#include "BattlegroundSA.h"
|
||||
#include "BattlegroundAV.h"
|
||||
#include "BattlegroundIC.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Player.h"
|
||||
#include "Creature.h"
|
||||
@@ -31,19 +27,12 @@ class achievement_resilient_victory : public AchievementCriteriaScript
|
||||
public:
|
||||
achievement_resilient_victory() : AchievementCriteriaScript("achievement_resilient_victory") { }
|
||||
|
||||
bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
|
||||
bool OnCheck(Player* source, Unit* target) OVERRIDE
|
||||
{
|
||||
Battleground* bg = source->GetBattleground();
|
||||
if (!bg)
|
||||
return false;
|
||||
if (Battleground* bg = source->GetBattleground())
|
||||
return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_RESILIENT_VICTORY, source, target);
|
||||
|
||||
if (bg->GetTypeID(true) != BATTLEGROUND_AB)
|
||||
return false;
|
||||
|
||||
if (!bg->ToBattlegroundAB()->IsTeamScores500Disadvantage(source->GetTeam()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -54,14 +43,10 @@ class achievement_bg_control_all_nodes : public AchievementCriteriaScript
|
||||
|
||||
bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
|
||||
{
|
||||
Battleground* bg = source->GetBattleground();
|
||||
if (!bg)
|
||||
return false;
|
||||
if (Battleground* bg = source->GetBattleground())
|
||||
return bg->IsAllNodesControlledByTeam(source->GetTeam());
|
||||
|
||||
if (!bg->IsAllNodesConrolledByTeam(source->GetTeam()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -72,21 +57,9 @@ class achievement_save_the_day : public AchievementCriteriaScript
|
||||
|
||||
bool OnCheck(Player* source, Unit* target) OVERRIDE
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
if (Battleground* bg = source->GetBattleground())
|
||||
return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_SAVE_THE_DAY, source, target);
|
||||
|
||||
if (Player const* player = target->ToPlayer())
|
||||
{
|
||||
Battleground* bg = source->GetBattleground();
|
||||
if (!bg)
|
||||
return false;
|
||||
|
||||
if (bg->GetTypeID(true) != BATTLEGROUND_WS)
|
||||
return false;
|
||||
|
||||
if (bg->ToBattlegroundWS()->GetFlagState(player->GetTeam()) == BG_WS_FLAG_STATE_ON_BASE)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -200,17 +173,10 @@ class achievement_everything_counts : public AchievementCriteriaScript
|
||||
public:
|
||||
achievement_everything_counts() : AchievementCriteriaScript("achievement_everything_counts") { }
|
||||
|
||||
bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
|
||||
bool OnCheck(Player* source, Unit* target) OVERRIDE
|
||||
{
|
||||
Battleground* bg = source->GetBattleground();
|
||||
if (!bg)
|
||||
return false;
|
||||
|
||||
if (bg->GetTypeID(true) != BATTLEGROUND_AV)
|
||||
return false;
|
||||
|
||||
if (bg->ToBattlegroundAV()->IsBothMinesControlledByTeam(source->GetTeam()))
|
||||
return true;
|
||||
if (Battleground* bg = source->GetBattleground())
|
||||
return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_EVERYTHING_COUNTS, source, target);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -221,17 +187,10 @@ class achievement_bg_av_perfection : public AchievementCriteriaScript
|
||||
public:
|
||||
achievement_bg_av_perfection() : AchievementCriteriaScript("achievement_bg_av_perfection") { }
|
||||
|
||||
bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
|
||||
bool OnCheck(Player* source, Unit* target) OVERRIDE
|
||||
{
|
||||
Battleground* bg = source->GetBattleground();
|
||||
if (!bg)
|
||||
return false;
|
||||
|
||||
if (bg->GetTypeID(true) != BATTLEGROUND_AV)
|
||||
return false;
|
||||
|
||||
if (bg->ToBattlegroundAV()->IsAllTowersControlledAndCaptainAlive(source->GetTeam()))
|
||||
return true;
|
||||
if (Battleground* bg = source->GetBattleground())
|
||||
return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_AV_PERFECTION, source, target);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -240,24 +199,12 @@ class achievement_bg_av_perfection : public AchievementCriteriaScript
|
||||
class achievement_bg_sa_defense_of_ancients : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_bg_sa_defense_of_ancients() : AchievementCriteriaScript("achievement_bg_sa_defense_of_ancients")
|
||||
achievement_bg_sa_defense_of_ancients() : AchievementCriteriaScript("achievement_bg_sa_defense_of_ancients") { }
|
||||
|
||||
bool OnCheck(Player* source, Unit* target) OVERRIDE
|
||||
{
|
||||
}
|
||||
|
||||
bool OnCheck(Player* player, Unit* /*target*/) OVERRIDE
|
||||
{
|
||||
if (!player)
|
||||
return false;
|
||||
|
||||
Battleground* battleground = player->GetBattleground();
|
||||
if (!battleground)
|
||||
return false;
|
||||
|
||||
if (player->GetTeamId() == battleground->ToBattlegroundSA()->Attackers)
|
||||
return false;
|
||||
|
||||
if (!battleground->ToBattlegroundSA()->gateDestroyed)
|
||||
return true;
|
||||
if (Battleground* bg = source->GetBattleground())
|
||||
return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_DEFENSE_OF_THE_ANCIENTS, source, target);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -299,17 +246,10 @@ class achievement_not_even_a_scratch : public AchievementCriteriaScript
|
||||
public:
|
||||
achievement_not_even_a_scratch() : AchievementCriteriaScript("achievement_not_even_a_scratch") { }
|
||||
|
||||
bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
|
||||
bool OnCheck(Player* source, Unit* target) OVERRIDE
|
||||
{
|
||||
if (!source)
|
||||
return false;
|
||||
|
||||
Battleground* battleground = source->GetBattleground();
|
||||
if (!battleground)
|
||||
return false;
|
||||
|
||||
if (battleground->ToBattlegroundSA()->notEvenAScratch(source->GetTeam()))
|
||||
return true;
|
||||
if (Battleground* bg = source->GetBattleground())
|
||||
return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_NOT_EVEN_A_SCRATCH, source, target);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
## npc_lunaclaw_spirit
|
||||
######*/
|
||||
|
||||
enum
|
||||
enum LunaclawSpirit
|
||||
{
|
||||
QUEST_BODY_HEART_A = 6001,
|
||||
QUEST_BODY_HEART_H = 6002,
|
||||
|
||||
Reference in New Issue
Block a user