Merge commit '999a5ffa642c27dc3566664cf0e5b44dffafb1b7' into 4.3.4
Conflicts: sql/updates/world/2015_03_01_00_world.sql src/server/game/Server/WorldSocket.cpp src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp
This commit is contained in:
commit
67d616c195
26 files changed
+219
-246
No files matched your search
@@ -78,8 +78,7 @@ set(scripts_STAT_SRCS
|
||||
Northrend/Nexus/Oculus/boss_urom.cpp
|
||||
Northrend/Nexus/Oculus/oculus.cpp
|
||||
Northrend/Nexus/Oculus/instance_oculus.cpp
|
||||
Northrend/Nexus/Nexus/boss_commander_kolurg.cpp
|
||||
Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp
|
||||
Northrend/Nexus/Nexus/boss_nexus_commanders.cpp
|
||||
Northrend/Nexus/Nexus/boss_ormorok.cpp
|
||||
Northrend/Nexus/Nexus/boss_magus_telestra.cpp
|
||||
Northrend/Nexus/Nexus/instance_nexus.cpp
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "icecrown_citadel.h"
|
||||
|
||||
@@ -213,7 +213,7 @@ class boss_rotface : public CreatureScript
|
||||
}
|
||||
break;
|
||||
case EVENT_MUTATED_INFECTION:
|
||||
me->CastCustomSpell(SPELL_MUTATED_INFECTION, SPELLVALUE_MAX_TARGETS, 1, NULL, false);
|
||||
DoCastAOE(SPELL_MUTATED_INFECTION);
|
||||
events.ScheduleEvent(EVENT_MUTATED_INFECTION, infectionCooldown);
|
||||
break;
|
||||
case EVENT_VILE_GAS:
|
||||
@@ -509,13 +509,6 @@ class spell_rotface_mutated_infection : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_rotface_mutated_infection_SpellScript);
|
||||
|
||||
public:
|
||||
spell_rotface_mutated_infection_SpellScript()
|
||||
{
|
||||
_target = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
// remove targets with this aura already
|
||||
@@ -527,14 +520,6 @@ class spell_rotface_mutated_infection : public SpellScriptLoader
|
||||
WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
|
||||
targets.clear();
|
||||
targets.push_back(target);
|
||||
_target = target;
|
||||
}
|
||||
|
||||
void ReplaceTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.clear();
|
||||
if (_target)
|
||||
targets.push_back(_target);
|
||||
}
|
||||
|
||||
void NotifyTargets()
|
||||
@@ -546,19 +531,43 @@ class spell_rotface_mutated_infection : public SpellScriptLoader
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rotface_mutated_infection_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rotface_mutated_infection_SpellScript::ReplaceTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rotface_mutated_infection_SpellScript::ReplaceTargets, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rotface_mutated_infection_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
AfterHit += SpellHitFn(spell_rotface_mutated_infection_SpellScript::NotifyTargets);
|
||||
}
|
||||
};
|
||||
|
||||
WorldObject* _target;
|
||||
class spell_rotface_mutated_infection_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_rotface_mutated_infection_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(uint32(spellInfo->Effects[EFFECT_2].CalcValue())))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleEffectRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->CastSpell(target, uint32(GetSpellInfo()->Effects[EFFECT_2].CalcValue()), true, nullptr, aurEff, GetCasterGUID());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_rotface_mutated_infection_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_rotface_mutated_infection_SpellScript();
|
||||
}
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_rotface_mutated_infection_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_rotface_little_ooze_combine : public SpellScriptLoader
|
||||
|
||||
@@ -2396,6 +2396,7 @@ class spell_the_lich_king_defile : public SpellScriptLoader
|
||||
void CorrectRange(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(ExactDistanceCheck(GetCaster(), 10.0f * GetCaster()->GetObjectScale()));
|
||||
targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_HARVEST_SOUL_VALKYR));
|
||||
}
|
||||
|
||||
void ChangeDamageAndGrow()
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* Script Data Start
|
||||
SDName: Boss Commander Kolurg
|
||||
SDAuthor: LordVanMartin
|
||||
SD%Complete:
|
||||
SDComment: Only Alliance Heroic
|
||||
SDCategory:
|
||||
Script Data End */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_BATTLE_SHOUT = 31403,
|
||||
SPELL_CHARGE = 60067,
|
||||
SPELL_FRIGHTENING_SHOUT = 19134,
|
||||
SPELL_WHIRLWIND_1 = 38619,
|
||||
SPELL_WHIRLWIND_2 = 38618
|
||||
|
||||
};
|
||||
|
||||
//not used
|
||||
//Yell
|
||||
#define SAY_AGGRO -1576024
|
||||
#define SAY_KILL -1576025
|
||||
#define SAY_DEATH -1576026
|
||||
|
||||
class boss_commander_kolurg : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_commander_kolurg() : CreatureScript("boss_commander_kolurg") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new boss_commander_kolurgAI(creature);
|
||||
}
|
||||
|
||||
struct boss_commander_kolurgAI : public ScriptedAI
|
||||
{
|
||||
boss_commander_kolurgAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override { }
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
void AttackStart(Unit* /*who*/) override { }
|
||||
void MoveInLineOfSight(Unit* /*who*/) override { }
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void JustDied(Unit* /*killer*/) override { }
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_commander_kolurg()
|
||||
{
|
||||
new boss_commander_kolurg();
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "nexus.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_BATTLE_SHOUT = 31403,
|
||||
SPELL_CHARGE = 60067,
|
||||
SPELL_FRIGHTENING_SHOUT = 19134,
|
||||
SPELL_WHIRLWIND = 38618,
|
||||
SPELL_FROZEN_PRISON = 47543
|
||||
};
|
||||
|
||||
enum Yells
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
SAY_KILL = 1,
|
||||
SAY_DEATH = 2
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_CHARGE_COMMANDER = 1,
|
||||
EVENT_WHIRLWIND,
|
||||
EVENT_FRIGHTENING_SHOUT
|
||||
};
|
||||
|
||||
class boss_nexus_commanders : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_nexus_commanders() : CreatureScript("boss_nexus_commanders") { }
|
||||
|
||||
struct boss_nexus_commandersAI : public BossAI
|
||||
{
|
||||
boss_nexus_commandersAI(Creature* creature) : BossAI(creature, DATA_COMMANDER) { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(SAY_AGGRO);
|
||||
me->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON);
|
||||
DoCast(me, SPELL_BATTLE_SHOUT);
|
||||
|
||||
events.ScheduleEvent(EVENT_CHARGE_COMMANDER, urand(3000, 4000));
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, urand(6000, 8000));
|
||||
events.ScheduleEvent(EVENT_FRIGHTENING_SHOUT, urand(13000, 15000));
|
||||
}
|
||||
|
||||
void ExecuteEvent(uint32 eventId) override
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CHARGE_COMMANDER:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
events.ScheduleEvent(EVENT_CHARGE_COMMANDER, urand(11000, 15000));
|
||||
break;
|
||||
case EVENT_WHIRLWIND:
|
||||
DoCast(me, SPELL_WHIRLWIND);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, urand(19500, 25000));
|
||||
break;
|
||||
case EVENT_FRIGHTENING_SHOUT:
|
||||
DoCastAOE(SPELL_FRIGHTENING_SHOUT);
|
||||
events.ScheduleEvent(EVENT_FRIGHTENING_SHOUT, urand(45000, 55000));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<boss_nexus_commandersAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_nexus_commanders()
|
||||
{
|
||||
new boss_nexus_commanders();
|
||||
}
|
||||
@@ -21,32 +21,33 @@
|
||||
#define NexusScriptName "instance_nexus"
|
||||
#define DataHeader "NEX"
|
||||
|
||||
uint32 const EncounterCount = 4;
|
||||
uint32 const EncounterCount = 5;
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
DATA_MAGUS_TELESTRA = 0,
|
||||
DATA_ANOMALUS = 1,
|
||||
DATA_ORMOROK = 2,
|
||||
DATA_KERISTRASZA = 3,
|
||||
DATA_COMMANDER = 0,
|
||||
DATA_MAGUS_TELESTRA = 1,
|
||||
DATA_ANOMALUS = 2,
|
||||
DATA_ORMOROK = 3,
|
||||
DATA_KERISTRASZA = 4,
|
||||
|
||||
ANOMALUS_CONTAINMET_SPHERE = 4,
|
||||
ORMOROKS_CONTAINMET_SPHERE = 5,
|
||||
TELESTRAS_CONTAINMET_SPHERE = 6
|
||||
ANOMALUS_CONTAINMET_SPHERE = 5,
|
||||
ORMOROKS_CONTAINMET_SPHERE = 6,
|
||||
TELESTRAS_CONTAINMET_SPHERE = 7
|
||||
};
|
||||
|
||||
enum CreatureIds
|
||||
{
|
||||
NPC_ANOMALUS = 26763,
|
||||
NPC_KERISTRASZA = 26723,
|
||||
|
||||
|
||||
// Alliance
|
||||
NPC_ALLIANCE_BERSERKER = 26800,
|
||||
NPC_ALLIANCE_RANGER = 26802,
|
||||
NPC_ALLIANCE_CLERIC = 26805,
|
||||
NPC_ALLIANCE_COMMANDER = 27949,
|
||||
NPC_COMMANDER_STOUTBEARD = 26796,
|
||||
|
||||
|
||||
// Horde
|
||||
NPC_HORDE_BERSERKER = 26799,
|
||||
NPC_HORDE_RANGER = 26801,
|
||||
@@ -59,7 +60,7 @@ enum GameObjectIds
|
||||
{
|
||||
GO_ANOMALUS_CONTAINMET_SPHERE = 188527,
|
||||
GO_ORMOROKS_CONTAINMET_SPHERE = 188528,
|
||||
GO_TELESTRAS_CONTAINMET_SPHERE = 188526
|
||||
GO_TELESTRAS_CONTAINMET_SPHERE = 188526
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -641,97 +641,6 @@ enum JokkumScriptcast
|
||||
EVENT_KROLMIR_9 = 24,
|
||||
};
|
||||
|
||||
class npc_king_jokkum_vehicle : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_king_jokkum_vehicle() : CreatureScript("npc_king_jokkum_vehicle") { }
|
||||
|
||||
struct npc_king_jokkum_vehicleAI : public VehicleAI
|
||||
{
|
||||
npc_king_jokkum_vehicleAI(Creature* creature) : VehicleAI(creature)
|
||||
{
|
||||
pathEnd = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
playerGUID.Clear();
|
||||
pathEnd = false;
|
||||
}
|
||||
|
||||
void OnCharmed(bool /*apply*/) override { }
|
||||
|
||||
void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) override
|
||||
{
|
||||
if (apply)
|
||||
{
|
||||
playerGUID = who->GetGUID();
|
||||
Talk(SAY_HOLD_ON, who);
|
||||
me->CastSpell(who, SPELL_JOKKUM_KILL_CREDIT, true);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->GetMotionMaster()->MovePath(PATH_JOKKUM, false);
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if (type != WAYPOINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if (pathEnd)
|
||||
{
|
||||
if (id == 4)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (id == 19)
|
||||
{
|
||||
pathEnd = true;
|
||||
me->SetFacingTo(0.418879f);
|
||||
Talk(SAY_JOKKUM_1);
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID))
|
||||
me->CastSpell(player, SPELL_PLAYER_CAST_VERANUS_SUMMON);
|
||||
me->CastSpell(me, SPELL_EJECT_ALL_PASSENGERS);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!pathEnd)
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_KROLMIR_1:
|
||||
Talk(SAY_JOKKUM_2);
|
||||
events.ScheduleEvent(EVENT_KROLMIR_2, 4000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
ObjectGuid playerGUID;
|
||||
bool pathEnd;
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_king_jokkum_vehicleAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_jokkum_scriptcast : public SpellScriptLoader
|
||||
{
|
||||
public: spell_jokkum_scriptcast() : SpellScriptLoader("spell_jokkum_scriptcast") { }
|
||||
@@ -855,7 +764,6 @@ void AddSC_storm_peaks()
|
||||
new npc_icefang();
|
||||
new npc_hyldsmeet_protodrake();
|
||||
new npc_brann_bronzebeard_keystone();
|
||||
new npc_king_jokkum_vehicle();
|
||||
new spell_jokkum_scriptcast();
|
||||
new spell_veranus_summon();
|
||||
new spell_close_rift();
|
||||
|
||||
@@ -283,7 +283,10 @@ class boss_harbinger_skyriss_illusion : public CreatureScript
|
||||
{
|
||||
boss_harbinger_skyriss_illusionAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override { }
|
||||
void Reset() override
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user