aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDDuarte <dnpd.dd@gmail.com>2014-01-10 03:16:59 +0000
committerDDuarte <dnpd.dd@gmail.com>2014-01-10 03:16:59 +0000
commit86107a0296eedaa783fc8b8f7a2892c606626d0b (patch)
treeaa91d7be5b298465556ec24e1ef676bad77a4d13 /src
parent52a5213e462b754079475bad1f4d4edb22b04a2a (diff)
parent6402fa02ac4a4f1d731ed0b6d744328527e2a857 (diff)
Merge branch 'master' into 4.3.4
Diffstat (limited to 'src')
-rw-r--r--src/server/authserver/Server/AuthSocket.cpp2
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp3
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp15
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp12
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp4
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_storm_peaks.cpp306
-rw-r--r--src/server/scripts/Northrend/zone_wintergrasp.cpp36
-rw-r--r--src/server/scripts/Outland/zone_blades_edge_mountains.cpp344
-rw-r--r--src/server/scripts/World/npc_taxi.cpp20
-rw-r--r--src/server/shared/Database/Implementation/LoginDatabase.cpp2
11 files changed, 480 insertions, 266 deletions
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index 6595b6238b2..41bc9089987 100644
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -443,7 +443,7 @@ bool AuthSocket::_HandleLogonChallenge()
if (!locked)
{
//set expired bans to inactive
- LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS));
+ LoginDatabase.DirectExecute(LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS));
// If the account is banned, reject the logon attempt
stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_BANNED);
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
index a212a74df86..bcb68ae5ce3 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp
@@ -37,9 +37,6 @@ enum Enums
SAY_SARTHARION_SLAY = 8,
WHISPER_LAVA_CHURN = 9,
- WHISPER_SHADRON_DICIPLE = 7,
- WHISPER_VESPERON_DICIPLE = 7,
-
//Sartharion Spells
SPELL_BERSERK = 61632, // Increases the caster's attack speed by 150% and all damage it deals by 500% for 5 min.
SPELL_CLEAVE = 56909, // Inflicts 35% weapon damage to an enemy and its nearest allies, affecting up to 10 targets.
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
index 5fc4869c4af..be1c83e185f 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
@@ -25,9 +25,6 @@
enum Enums
{
- WHISPER_HATCH_EGGS = 6,
- WHISPER_OPEN_PORTAL = 6, // whisper, shared by two dragons
-
//Mini bosses common spells
SPELL_TWILIGHT_RESIDUE = 61885, // makes immune to shadow damage, applied when leave phase
@@ -155,7 +152,9 @@ enum SharedTextIDs
SAY_DEATH = 2,
SAY_BREATH = 3,
SAY_RESPOND = 4,
- SAY_SPECIAL = 5
+ SAY_SPECIAL = 5,
+ WHISPER_OPEN_PORTAL = 6,
+ WHISPER_OPENED_PORTAL = 7
};
enum DummyDragonEvents
@@ -256,8 +255,6 @@ struct dummy_dragonAI : public ScriptedAI
// "opens" the portal and does the "opening" whisper
void OpenPortal()
{
- int32 textId = 0;
-
// there are 4 portal spawn locations, each are expected to be spawned with negative spawntimesecs in database
// using a grid search here seem to be more efficient than caching all four guids
@@ -268,7 +265,6 @@ struct dummy_dragonAI : public ScriptedAI
{
case NPC_TENEBRON:
{
- textId = WHISPER_HATCH_EGGS;
if (instance && !instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
{
for (uint32 i = 0; i < 6; ++i)
@@ -283,7 +279,6 @@ struct dummy_dragonAI : public ScriptedAI
}
case NPC_SHADRON:
{
- textId = WHISPER_OPEN_PORTAL;
if (instance && !instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y, AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
else
@@ -293,7 +288,6 @@ struct dummy_dragonAI : public ScriptedAI
}
case NPC_VESPERON:
{
- textId = WHISPER_OPEN_PORTAL;
if (instance && !instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
{
if (Creature* acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y, AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
@@ -317,7 +311,8 @@ struct dummy_dragonAI : public ScriptedAI
}
}
- DoRaidWhisper(textId);
+ DoRaidWhisper(WHISPER_OPEN_PORTAL);
+ DoRaidWhisper(WHISPER_OPENED_PORTAL);
// By using SetRespawnTime() we will actually "spawn" the object with our defined time.
// Once time is up, portal will disappear again.
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
index fdc4927763e..f05d065ab34 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
@@ -25,9 +25,9 @@ enum Spells
SPELL_SPARK = 47751,
H_SPELL_SPARK = 57062,
SPELL_RIFT_SHIELD = 47748,
- SPELL_CHARGE_RIFT = 47747, //Works wrong (affect players, not rifts)
- SPELL_CREATE_RIFT = 47743, //Don't work, using WA
- SPELL_ARCANE_ATTRACTION = 57063, //No idea, when it's used
+ SPELL_CHARGE_RIFT = 47747, // Works wrong (affect players, not rifts)
+ SPELL_CREATE_RIFT = 47743, // Don't work, using WA
+ SPELL_ARCANE_ATTRACTION = 57063, // No idea, when it's used
};
enum Adds
@@ -41,14 +41,16 @@ enum Yells
SAY_AGGRO = 0,
SAY_DEATH = 1,
SAY_RIFT = 2,
- SAY_SHIELD = 3
+ SAY_SHIELD = 3,
+ SAY_RIFT_EMOTE = 4, // Needs to be added to script
+ SAY_SHIELD_EMOTE = 5 // Needs to be added to script
};
enum RiftSpells
{
SPELL_CHAOTIC_ENERGY_BURST = 47688,
SPELL_CHARGED_CHAOTIC_ENERGY_BURST = 47737,
- SPELL_ARCANEFORM = 48019, //Chaotic Rift visual
+ SPELL_ARCANEFORM = 48019, // Chaotic Rift visual
};
Position const RiftLocation[6] =
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index ef8f5c2d3c4..455653a136e 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -44,7 +44,8 @@ enum Yells
SAY_SLAY = 1,
SAY_ENRAGE = 2,
SAY_DEATH = 3,
- SAY_CRYSTAL_NOVA = 4
+ SAY_CRYSTAL_NOVA = 4,
+ SAY_FRENZY = 5
};
enum Misc
@@ -175,6 +176,7 @@ public:
if (!bEnrage && HealthBelowPct(25))
{
Talk(SAY_ENRAGE);
+ Talk(SAY_FRENZY);
DoCast(me, SPELL_ENRAGE);
bEnrage = true;
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
index 423937303b5..e2789995ec7 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp
@@ -36,6 +36,7 @@ enum Yells
SAY_REFLECT = 3,
SAY_CRYSTAL_SPIKES = 4,
SAY_KILL = 5,
+ SAY_FRENZY = 6
};
enum Events
@@ -89,6 +90,7 @@ public:
{
if (!frenzy && HealthBelowPct(25))
{
+ Talk(SAY_FRENZY);
DoCast(me, SPELL_FRENZY);
frenzy = true;
}
diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp
index c09c817a2bf..b1ece9b1aec 100644
--- a/src/server/scripts/Northrend/zone_storm_peaks.cpp
+++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp
@@ -339,17 +339,9 @@ public:
}
}
- void WaypointReached(uint32 /*waypointId*/) OVERRIDE
- {
- }
-
- void JustDied(Unit* /*killer*/) OVERRIDE
- {
- }
-
- void OnCharmed(bool /*apply*/) OVERRIDE
- {
- }
+ void WaypointReached(uint32 /*waypointId*/) OVERRIDE { }
+ void JustDied(Unit* /*killer*/) OVERRIDE { }
+ void OnCharmed(bool /*apply*/) OVERRIDE { }
void UpdateAI(uint32 diff) OVERRIDE
{
@@ -414,7 +406,6 @@ class npc_hyldsmeet_protodrake : public CreatureScript
}
};
-
/*#####
# npc_brann_bronzebeard for Quest 13285 "Forging the Keystone"
#####*/
@@ -438,19 +429,19 @@ enum BrannBronzebeard
SAY_VOICE_4 = 3,
SAY_VOICE_5 = 4,
- EVENT_SCRIPT_1 = 1,
- EVENT_SCRIPT_2 = 2,
- EVENT_SCRIPT_3 = 3,
- EVENT_SCRIPT_4 = 4,
- EVENT_SCRIPT_5 = 5,
- EVENT_SCRIPT_6 = 6,
- EVENT_SCRIPT_7 = 7,
- EVENT_SCRIPT_8 = 8,
- EVENT_SCRIPT_9 = 9,
- EVENT_SCRIPT_10 = 10,
- EVENT_SCRIPT_11 = 11,
- EVENT_SCRIPT_12 = 12,
- EVENT_SCRIPT_13 = 13
+ EVENT_SCRIPT_1 = 3,
+ EVENT_SCRIPT_2 = 4,
+ EVENT_SCRIPT_3 = 5,
+ EVENT_SCRIPT_4 = 6,
+ EVENT_SCRIPT_5 = 7,
+ EVENT_SCRIPT_6 = 8,
+ EVENT_SCRIPT_7 = 9,
+ EVENT_SCRIPT_8 = 10,
+ EVENT_SCRIPT_9 = 11,
+ EVENT_SCRIPT_10 = 12,
+ EVENT_SCRIPT_11 = 13,
+ EVENT_SCRIPT_12 = 14,
+ EVENT_SCRIPT_13 = 15
};
class npc_brann_bronzebeard_keystone : public CreatureScript
@@ -588,64 +579,131 @@ public:
}
};
-enum CloseRift
+/*#####
+# Quest 13010 Krolmir, Hammer of Storms
+#####*/
+
+enum JokkumScriptcast
{
- SPELL_DESPAWN_RIFT = 61665
+ NPC_KINGJOKKUM = 30331,
+ NPC_THORIM = 30390,
+ PATH_JOKKUM = 2072200,
+ PATH_JOKKUM_END = 2072201,
+ SAY_HOLD_ON = 0,
+ SAY_JOKKUM_1 = 1,
+ SAY_JOKKUM_2 = 2,
+ SAY_JOKKUM_3 = 3,
+ SAY_JOKKUM_4 = 4,
+ SAY_JOKKUM_5 = 5,
+ SAY_JOKKUM_6 = 6,
+ SAY_JOKKUM_7 = 7,
+ SAY_JOKKUM_8 = 8,
+ SAY_THORIM_1 = 0,
+ SAY_THORIM_2 = 1,
+ SAY_THORIM_3 = 2,
+ SAY_THORIM_4 = 3,
+ SPELL_JOKKUM_SUMMON = 56541,
+ SPELL_JOKKUM_KILL_CREDIT = 56545,
+ SPELL_EJECT_ALL_PASSENGERS = 50630,
+ SPELL_PLAYER_CAST_VERANUS_SUMMON = 56650,
+ SPELL_SUMMON_VERANUS_AND_THORIM = 56649,
+ EVENT_KROLMIR_1 = 16,
+ EVENT_KROLMIR_2 = 17,
+ EVENT_KROLMIR_3 = 18,
+ EVENT_KROLMIR_4 = 19,
+ EVENT_KROLMIR_5 = 20,
+ EVENT_KROLMIR_6 = 21,
+ EVENT_KROLMIR_7 = 22,
+ EVENT_KROLMIR_8 = 23,
+ EVENT_KROLMIR_9 = 24,
};
-class spell_close_rift : public SpellScriptLoader
+class npc_king_jokkum_vehicle : public CreatureScript
{
- public:
- spell_close_rift() : SpellScriptLoader("spell_close_rift") { }
+public:
+ npc_king_jokkum_vehicle() : CreatureScript("npc_king_jokkum_vehicle") { }
- class spell_close_rift_AuraScript : public AuraScript
+ struct npc_king_jokkum_vehicleAI : public VehicleAI
+ {
+ npc_king_jokkum_vehicleAI(Creature* creature) : VehicleAI(creature) { }
+
+ void Reset() OVERRIDE
{
- PrepareAuraScript(spell_close_rift_AuraScript);
+ playerGUID = 0;
+ pathEnd = false;
+ }
- bool Load() OVERRIDE
- {
- _counter = 0;
- return true;
- }
+ void OnCharmed(bool /*apply*/) OVERRIDE { }
- bool Validate(SpellInfo const* /*spell*/) OVERRIDE
+ void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) OVERRIDE
+ {
+ if (apply)
{
- return sSpellMgr->GetSpellInfo(SPELL_DESPAWN_RIFT);
+ playerGUID = who->GetGUID();
+ Talk(SAY_HOLD_ON, playerGUID);
+ 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 HandlePeriodic(AuraEffect const* /* aurEff */)
+ void MovementInform(uint32 type, uint32 id) OVERRIDE
+ {
+ if (type != WAYPOINT_MOTION_TYPE)
+ return;
+
+ if (pathEnd)
{
- if (++_counter == 5)
- GetTarget()->CastSpell((Unit*)NULL, SPELL_DESPAWN_RIFT, true);
- }
+ if (id == 4)
+ {
- void Register() OVERRIDE
+ }
+ }
+ else
{
- OnEffectPeriodic += AuraEffectPeriodicFn(spell_close_rift_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ 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);
+
+ }
}
+ }
- private:
- uint8 _counter;
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!pathEnd)
+ return;
- };
+ events.Update(diff);
- AuraScript* GetAuraScript() const OVERRIDE
- {
- return new spell_close_rift_AuraScript();
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_KROLMIR_1:
+ Talk(SAY_JOKKUM_2);
+ events.ScheduleEvent(EVENT_KROLMIR_2, 4000);
+ break;
+ }
+ }
}
-};
-/*#####
-# Krolmir, Hammer of Storms
-#####*/
+ private:
+ EventMap events;
+ uint64 playerGUID;
+ bool pathEnd;
-enum JokkumScriptcast
-{
- SPELL_JOKKUM_KILL_CREDIT = 56545,
- SPELL_JOKKUM_SUMMON = 56541,
- NPC_KINGJOKKUM = 30331,
- SAY_HOLD_ON = 0,
- PATH_JOKKUM = 2072200
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_king_jokkum_vehicleAI(creature);
+ }
};
class spell_jokkum_scriptcast : public SpellScriptLoader
@@ -665,8 +723,8 @@ class spell_jokkum_scriptcast : public SpellScriptLoader
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- Unit* target = GetTarget();
- target->CastSpell(target, SPELL_JOKKUM_SUMMON, true);
+ if (Unit* target = GetTarget())
+ target->CastSpell(target, SPELL_JOKKUM_SUMMON, true);
}
void Register() OVERRIDE
@@ -681,42 +739,114 @@ class spell_jokkum_scriptcast : public SpellScriptLoader
}
};
-class npc_king_jokkum_vehicle : public CreatureScript
+class spell_veranus_summon : public SpellScriptLoader
+{
+ public: spell_veranus_summon() : SpellScriptLoader("spell_veranus_summon") { }
+
+ class spell_veranus_summon_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_veranus_summon_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_VERANUS_AND_THORIM))
+ return false;
+ return true;
+ }
+
+ void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Unit* target = GetTarget())
+ target->CastSpell(target, SPELL_SUMMON_VERANUS_AND_THORIM, true);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectApply += AuraEffectApplyFn(spell_veranus_summon_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_veranus_summon_AuraScript();
+ }
+};
+
+/*#####
+# spell_jokkum_eject_all
+#####*/
+
+class spell_jokkum_eject_all : public SpellScriptLoader
+{
+ public: spell_jokkum_eject_all() : SpellScriptLoader("spell_jokkum_eject_all") { }
+
+ class spell_jokkum_eject_all_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_jokkum_eject_all_SpellScript);
+
+ void HandleScriptEffect(SpellEffIndex /* effIndex */)
+ {
+ if (Unit* caster = GetCaster())
+ if (caster->IsVehicle())
+ caster->GetVehicleKit()->RemoveAllPassengers();
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_jokkum_eject_all_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_jokkum_eject_all_SpellScript();
+ }
+};
+
+enum CloseRift
+{
+ SPELL_DESPAWN_RIFT = 61665
+};
+
+class spell_close_rift : public SpellScriptLoader
{
public:
- npc_king_jokkum_vehicle() : CreatureScript("npc_king_jokkum_vehicle") { }
+ spell_close_rift() : SpellScriptLoader("spell_close_rift") { }
- struct npc_king_jokkum_vehicleAI : public VehicleAI
+ class spell_close_rift_AuraScript : public AuraScript
{
- npc_king_jokkum_vehicleAI(Creature* creature) : VehicleAI(creature) { }
+ PrepareAuraScript(spell_close_rift_AuraScript);
- void OnCharmed(bool /*apply*/) OVERRIDE { }
+ bool Load() OVERRIDE
+ {
+ _counter = 0;
+ return true;
+ }
- void PassengerBoarded(Unit* who, int8 /*seat*/, bool apply) OVERRIDE
+ bool Validate(SpellInfo const* /*spell*/) OVERRIDE
{
- if (apply)
- {
- Talk(SAY_HOLD_ON, who->GetGUID());
- me->CastSpell(who, SPELL_JOKKUM_KILL_CREDIT, true);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
- me->GetMotionMaster()->MovePath(PATH_JOKKUM, false);
- }
+ return sSpellMgr->GetSpellInfo(SPELL_DESPAWN_RIFT);
}
- void MovementInform(uint32 type, uint32 id) OVERRIDE
+ void HandlePeriodic(AuraEffect const* /* aurEff */)
{
- if (type != WAYPOINT_MOTION_TYPE)
- return;
+ if (++_counter == 5)
+ GetTarget()->CastSpell((Unit*)NULL, SPELL_DESPAWN_RIFT, true);
+ }
- // PointId in WaypointMovementGenerator doesn't match with PointId in DB
- if (id == 19)
- me->GetVehicleKit()->RemoveAllPassengers();
+ void Register() OVERRIDE
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_close_rift_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
+
+ private:
+ uint8 _counter;
+
};
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ AuraScript* GetAuraScript() const OVERRIDE
{
- return new npc_king_jokkum_vehicleAI(creature);
+ return new spell_close_rift_AuraScript();
}
};
@@ -729,7 +859,9 @@ void AddSC_storm_peaks()
new npc_icefang();
new npc_hyldsmeet_protodrake();
new npc_brann_bronzebeard_keystone();
- new spell_close_rift();
- new spell_jokkum_scriptcast();
new npc_king_jokkum_vehicle();
+ new spell_jokkum_scriptcast();
+ new spell_veranus_summon();
+ new spell_jokkum_eject_all();
+ new spell_close_rift();
}
diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp
index a27ce0324ff..311b18524b2 100644
--- a/src/server/scripts/Northrend/zone_wintergrasp.cpp
+++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp
@@ -237,11 +237,47 @@ class npc_wg_spirit_guide : public CreatureScript
}
};
+enum WGQueue
+{
+ SPELL_FROST_ARMOR = 12544
+};
+
class npc_wg_queue : public CreatureScript
{
public:
npc_wg_queue() : CreatureScript("npc_wg_queue") { }
+ struct npc_wg_queueAI : public ScriptedAI
+ {
+ npc_wg_queueAI(Creature* creature) : ScriptedAI(creature) { }
+
+ uint32 FrostArmor_Timer;
+
+ void Reset() OVERRIDE
+ {
+ FrostArmor_Timer = 0;
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (FrostArmor_Timer <= diff)
+ {
+ DoCast(me, SPELL_FROST_ARMOR);
+ FrostArmor_Timer = 180000;
+ }
+ else FrostArmor_Timer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_wg_queueAI(creature);
+ }
+
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
index acc3317d7bd..31e4fd88cb5 100644
--- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
@@ -24,7 +24,8 @@ SDCategory: Blade's Edge Mountains
EndScriptData */
/* ContentData
-npc_bladespire_ogre
+npc_bloodmaul_brutebane
+npc_bloodmaul_brute
npc_nether_drake
npc_daranelle
npc_overseer_nuaar
@@ -45,14 +46,173 @@ EndContentData */
#include "SpellAuras.h"
#include "SpellAuraEffects.h"
-//Support for quest: You're Fired! (10821)
-bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
+/*######
+## npc_bloodmaul_brutebane
+######*/
+
+enum Bloodmaul
+{
+ NPC_OGRE_BRUTE = 19995,
+ NPC_QUEST_CREDIT = 21241,
+ GO_KEG = 184315,
+ QUEST_GETTING_THE_BLADESPIRE_TANKED = 10512,
+ QUEST_BLADESPIRE_KEGGER = 10545
+};
+
+class npc_bloodmaul_brutebane : public CreatureScript
+{
+public:
+ npc_bloodmaul_brutebane() : CreatureScript("npc_bloodmaul_brutebane") { }
+
+ struct npc_bloodmaul_brutebaneAI : public ScriptedAI
+ {
+ npc_bloodmaul_brutebaneAI(Creature* creature) : ScriptedAI(creature)
+ {
+ if (Creature* Ogre = me->FindNearestCreature(NPC_OGRE_BRUTE, 50, true))
+ {
+ Ogre->SetReactState(REACT_DEFENSIVE);
+ Ogre->GetMotionMaster()->MovePoint(1, me->GetPositionX()-1, me->GetPositionY()+1, me->GetPositionZ());
+ }
+ }
+
+ uint64 OgreGUID;
+
+ void Reset() OVERRIDE
+ {
+ OgreGUID = 0;
+ }
-#define LEGION_OBELISK_ONE 185193
-#define LEGION_OBELISK_TWO 185195
-#define LEGION_OBELISK_THREE 185196
-#define LEGION_OBELISK_FOUR 185197
-#define LEGION_OBELISK_FIVE 185198
+ void UpdateAI(uint32 /*diff*/) OVERRIDE { }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_bloodmaul_brutebaneAI(creature);
+ }
+};
+
+/*######
+## npc_bloodmaul_brute
+######*/
+
+enum BloodmaulBrute
+{
+ EVENT_CLEAVE = 1,
+ EVENT_DEBILITATING_STRIKE = 2,
+ SAY_AGGRO = 0,
+ SAY_DEATH = 1,
+ SAY_ENRAGE = 2,
+ SPELL_CLEAVE = 15496,
+ SPELL_DEBILITATING_STRIKE = 37577,
+ SPELL_ENRAGE = 8599,
+ QUEST_INTO_THE_SOULGRINDER = 11000
+};
+
+class npc_bloodmaul_brute : public CreatureScript
+{
+public:
+ npc_bloodmaul_brute() : CreatureScript("npc_bloodmaul_brute") { }
+
+ struct npc_bloodmaul_bruteAI : public ScriptedAI
+ {
+ npc_bloodmaul_bruteAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void Reset() OVERRIDE
+ {
+ PlayerGUID = 0;
+ hp30 = false;
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ if (urand (0, 100) < 35)
+ Talk(SAY_AGGRO);
+
+ events.ScheduleEvent(EVENT_CLEAVE, urand(9000,12000));
+ events.ScheduleEvent(EVENT_DEBILITATING_STRIKE, 15000);
+ }
+
+ void JustDied(Unit* killer) OVERRIDE
+ {
+ if (killer->ToPlayer()->GetQuestRewardStatus(QUEST_INTO_THE_SOULGRINDER))
+ Talk(SAY_DEATH);
+ }
+
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+ {
+ if (!who || (!who->IsAlive()))
+ return;
+
+ if (me->IsWithinDistInMap(who, 50.0f))
+ {
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ if (who->ToPlayer()->GetQuestStatus(QUEST_GETTING_THE_BLADESPIRE_TANKED) == QUEST_STATUS_INCOMPLETE
+ || who->ToPlayer()->GetQuestStatus(QUEST_BLADESPIRE_KEGGER) == QUEST_STATUS_INCOMPLETE)
+ PlayerGUID = who->GetGUID();
+ }
+ }
+
+ void MovementInform(uint32 /*type*/, uint32 id) OVERRIDE
+ {
+ if (id == 1)
+ {
+ if (GameObject* Keg = me->FindNearestGameObject(GO_KEG, 20))
+ Keg->Delete();
+
+ me->HandleEmoteCommand(7);
+ me->SetReactState(REACT_AGGRESSIVE);
+ me->GetMotionMaster()->MoveTargetedHome();
+
+ Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
+ Creature* Credit = me->FindNearestCreature(NPC_QUEST_CREDIT, 50, true);
+ if (player && Credit)
+ player->KilledMonster(Credit->GetCreatureTemplate(), Credit->GetGUID());
+ }
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_CLEAVE:
+ DoCast(me, SPELL_CLEAVE);
+ events.ScheduleEvent(EVENT_CLEAVE, urand(9000,12000));
+ break;
+ case EVENT_DEBILITATING_STRIKE:
+ DoCastVictim(SPELL_DEBILITATING_STRIKE);
+ events.ScheduleEvent(EVENT_DEBILITATING_STRIKE, urand(18000,22000));
+ break;
+ }
+ }
+
+ if (!hp30 && HealthBelowPct(30))
+ {
+ hp30 = true;
+ Talk(SAY_ENRAGE);
+ DoCast(me, SPELL_ENRAGE);
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ EventMap events;
+ uint64 PlayerGUID;
+ bool hp30;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_bloodmaul_bruteAI(creature);
+ }
+};
/*######
## npc_nether_drake
@@ -85,11 +245,6 @@ class npc_nether_drake : public CreatureScript
public:
npc_nether_drake() : CreatureScript("npc_nether_drake") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_nether_drakeAI(creature);
- }
-
struct npc_nether_drakeAI : public ScriptedAI
{
npc_nether_drakeAI(Creature* creature) : ScriptedAI(creature) { }
@@ -233,6 +388,11 @@ public:
DoMeleeAttackIfReady();
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_nether_drakeAI(creature);
+ }
};
/*######
@@ -250,11 +410,6 @@ class npc_daranelle : public CreatureScript
public:
npc_daranelle() : CreatureScript("npc_daranelle") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_daranelleAI(creature);
- }
-
struct npc_daranelleAI : public ScriptedAI
{
npc_daranelleAI(Creature* creature) : ScriptedAI(creature) { }
@@ -279,6 +434,11 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_daranelleAI(creature);
+ }
};
/*######
@@ -354,6 +514,20 @@ public:
}
};
+//Support for quest: You're Fired! (10821)
+bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
+
+enum LegionObelisk
+{
+ GO_LEGION_OBELISK_ONE = 185193,
+ GO_LEGION_OBELISK_TWO = 185195,
+ GO_LEGION_OBELISK_THREE = 185196,
+ GO_LEGION_OBELISK_FOUR = 185197,
+ GO_LEGION_OBELISK_FIVE = 185198,
+ NPC_DOOMCRYER = 19963,
+ QUEST_YOURE_FIRED = 10821
+};
+
/*######
## go_legion_obelisk
######*/
@@ -365,30 +539,30 @@ public:
bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
- if (player->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE)
+ if (player->GetQuestStatus(QUEST_YOURE_FIRED) == QUEST_STATUS_INCOMPLETE)
{
switch (go->GetEntry())
{
- case LEGION_OBELISK_ONE:
+ case GO_LEGION_OBELISK_ONE:
obelisk_one = true;
break;
- case LEGION_OBELISK_TWO:
+ case GO_LEGION_OBELISK_TWO:
obelisk_two = true;
break;
- case LEGION_OBELISK_THREE:
+ case GO_LEGION_OBELISK_THREE:
obelisk_three = true;
break;
- case LEGION_OBELISK_FOUR:
+ case GO_LEGION_OBELISK_FOUR:
obelisk_four = true;
break;
- case LEGION_OBELISK_FIVE:
+ case GO_LEGION_OBELISK_FIVE:
obelisk_five = true;
break;
}
if (obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true)
{
- go->SummonCreature(19963, 2943.40f, 4778.20f, 284.49f, 0.94f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
+ go->SummonCreature(NPC_DOOMCRYER, 2943.40f, 4778.20f, 284.49f, 0.94f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000);
//reset global var
obelisk_one = false;
obelisk_two = false;
@@ -403,117 +577,6 @@ public:
};
/*######
-## npc_bloodmaul_brutebane
-######*/
-
-enum Bloodmaul
-{
- NPC_OGRE_BRUTE = 19995,
- NPC_QUEST_CREDIT = 21241,
- GO_KEG = 184315,
- QUEST_GETTING_THE_BLADESPIRE_TANKED = 10512,
- QUEST_BLADESPIRE_KEGGER = 10545,
-};
-
-class npc_bloodmaul_brutebane : public CreatureScript
-{
-public:
- npc_bloodmaul_brutebane() : CreatureScript("npc_bloodmaul_brutebane") { }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_bloodmaul_brutebaneAI(creature);
- }
-
- struct npc_bloodmaul_brutebaneAI : public ScriptedAI
- {
- npc_bloodmaul_brutebaneAI(Creature* creature) : ScriptedAI(creature)
- {
- if (Creature* Ogre = me->FindNearestCreature(NPC_OGRE_BRUTE, 50, true))
- {
- Ogre->SetReactState(REACT_DEFENSIVE);
- Ogre->GetMotionMaster()->MovePoint(1, me->GetPositionX()-1, me->GetPositionY()+1, me->GetPositionZ());
- }
- }
-
- uint64 OgreGUID;
-
- void Reset() OVERRIDE
- {
- OgreGUID = 0;
- }
-
- void UpdateAI(uint32 /*uiDiff*/) OVERRIDE { }
- };
-};
-
-/*######
-## npc_ogre_brute
-######*/
-
-class npc_ogre_brute : public CreatureScript
-{
-public:
- npc_ogre_brute() : CreatureScript("npc_ogre_brute") { }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_ogre_bruteAI(creature);
- }
-
- struct npc_ogre_bruteAI : public ScriptedAI
- {
- npc_ogre_bruteAI(Creature* creature) : ScriptedAI(creature) { }
-
- uint64 PlayerGUID;
-
- void Reset() OVERRIDE
- {
- PlayerGUID = 0;
- }
-
- void MoveInLineOfSight(Unit* who) OVERRIDE
- {
- if (!who || (!who->IsAlive()))
- return;
-
- if (me->IsWithinDistInMap(who, 50.0f))
- {
- if (who->GetTypeId() == TYPEID_PLAYER)
- if (who->ToPlayer()->GetQuestStatus(QUEST_GETTING_THE_BLADESPIRE_TANKED) == QUEST_STATUS_INCOMPLETE
- || who->ToPlayer()->GetQuestStatus(QUEST_BLADESPIRE_KEGGER) == QUEST_STATUS_INCOMPLETE)
- PlayerGUID = who->GetGUID();
- }
- }
-
- void MovementInform(uint32 /*type*/, uint32 id) OVERRIDE
- {
- if (id == 1)
- {
- if (GameObject* Keg = me->FindNearestGameObject(GO_KEG, 20))
- Keg->Delete();
-
- me->HandleEmoteCommand(7);
- me->SetReactState(REACT_AGGRESSIVE);
- me->GetMotionMaster()->MoveTargetedHome();
-
- Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
- Creature* Credit = me->FindNearestCreature(NPC_QUEST_CREDIT, 50, true);
- if (player && Credit)
- player->KilledMonster(Credit->GetCreatureTemplate(), Credit->GetGUID());
- }
- }
-
- void UpdateAI(uint32 /*diff*/) OVERRIDE
- {
- if (!UpdateVictim())
- return;
- DoMeleeAttackIfReady();
- }
- };
-};
-
-/*######
## go_thunderspike
######*/
@@ -1123,6 +1186,7 @@ class go_apexis_relic : public GameObjectScript
enum ScannerMasterBunny
{
NPC_OSCILLATING_FREQUENCY_SCANNER_TOP_BUNNY = 21759,
+ GO_OSCILLATING_FREQUENCY_SCANNER = 184926,
SPELL_OSCILLATION_FIELD = 37408,
QUEST_GAUGING_THE_RESONANT_FREQUENCY = 10594
};
@@ -1143,8 +1207,8 @@ public:
else
{
// Spell 37392 does not exist in dbc, manually spawning
- me->SummonCreature(21759, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.5f, me->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 50000);
- me->SummonGameObject(184926, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), 0, 0, 0, 0, 50000);
+ me->SummonCreature(NPC_OSCILLATING_FREQUENCY_SCANNER_TOP_BUNNY, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.5f, me->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 50000);
+ me->SummonGameObject(GO_OSCILLATING_FREQUENCY_SCANNER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), 0, 0, 0, 0, 50000);
me->DespawnOrUnsummon(50000);
}
@@ -1211,13 +1275,13 @@ class spell_oscillating_field : public SpellScriptLoader
void AddSC_blades_edge_mountains()
{
+ new npc_bloodmaul_brutebane();
+ new npc_bloodmaul_brute();
new npc_nether_drake();
new npc_daranelle();
new npc_overseer_nuaar();
new npc_saikkal_the_elder();
new go_legion_obelisk();
- new npc_bloodmaul_brutebane();
- new npc_ogre_brute();
new go_thunderspike();
new npc_simon_bunny();
new go_simon_cluster();
diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp
index bf742d606f2..08be2595c0e 100644
--- a/src/server/scripts/World/npc_taxi.cpp
+++ b/src/server/scripts/World/npc_taxi.cpp
@@ -54,8 +54,6 @@ EndScriptData
#define GOSSIP_TORASTRASZA1 "I would like to see Lord Of Afrasastrasz, in the middle of the temple."
#define GOSSIP_TORASTRASZA2 "Yes, Please. I would like to return to the ground floor of the temple."
#define GOSSIP_CRIMSONWING "<Ride the gryphons to Survey Alcaz Island>"
-#define GOSSIP_THRICESTAR1 "Do you think I could take a ride on one of those flying machines?"
-#define GOSSIP_THRICESTAR2 "Kara, I need to be flown out the Dens of Dying to find Bixie."
#define GOSSIP_WILLIAMKEILAR1 "Take me to Northpass Tower."
#define GOSSIP_WILLIAMKEILAR2 "Take me to Eastwall Tower."
#define GOSSIP_WILLIAMKEILAR3 "Take me to Crown Guard Tower."
@@ -163,13 +161,6 @@ public:
if (player->GetQuestStatus(11142) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CRIMSONWING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+25);
break;
- case 26602:
- if (creature->IsTaxi())
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GOSSIP_THRICESTAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26);
-
- if (player->GetQuestStatus(11692) == QUEST_STATUS_COMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_THRICESTAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 27);
- break;
case 17209:
player->SetTaxiCheater(true);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 28);
@@ -299,21 +290,14 @@ public:
player->CastSpell(player, 42295, true);
break;
case GOSSIP_ACTION_INFO_DEF + 26:
- player->GetSession()->SendTaxiMenu(creature);
- break;
- case GOSSIP_ACTION_INFO_DEF + 27:
- player->CLOSE_GOSSIP_MENU();
- player->CastSpell(player, 51446, false);
- break;
- case GOSSIP_ACTION_INFO_DEF + 28:
player->CLOSE_GOSSIP_MENU();
player->ActivateTaxiPathTo(494);
break;
- case GOSSIP_ACTION_INFO_DEF + 29:
+ case GOSSIP_ACTION_INFO_DEF + 27:
player->CLOSE_GOSSIP_MENU();
player->ActivateTaxiPathTo(495);
break;
- case GOSSIP_ACTION_INFO_DEF + 30:
+ case GOSSIP_ACTION_INFO_DEF + 28:
player->CLOSE_GOSSIP_MENU();
player->ActivateTaxiPathTo(496);
break;
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp
index f6754629e38..4e876a8567b 100644
--- a/src/server/shared/Database/Implementation/LoginDatabase.cpp
+++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp
@@ -24,7 +24,7 @@ void LoginDatabaseConnection::DoPrepareStatements()
PrepareStatement(LOGIN_SEL_REALMLIST, "SELECT id, name, address, localAddress, localSubnetMask, port, icon, flag, timezone, allowedSecurityLevel, population, gamebuild FROM realmlist WHERE flag <> 3 ORDER BY name", CONNECTION_SYNCH);
PrepareStatement(LOGIN_DEL_EXPIRED_IP_BANS, "DELETE FROM ip_banned WHERE unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC);
- PrepareStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS, "UPDATE account_banned SET active = 0 WHERE active = 1 AND unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_ASYNC);
+ PrepareStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS, "UPDATE account_banned SET active = 0 WHERE active = 1 AND unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()", CONNECTION_SYNCH);
PrepareStatement(LOGIN_SEL_IP_BANNED, "SELECT * FROM ip_banned WHERE ip = ?", CONNECTION_SYNCH);
PrepareStatement(LOGIN_INS_IP_AUTO_BANNED, "INSERT INTO ip_banned (ip, bandate, unbandate, bannedby, banreason) VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, 'Trinity realmd', 'Failed login autoban')", CONNECTION_ASYNC);
PrepareStatement(LOGIN_SEL_IP_BANNED_ALL, "SELECT ip, bandate, unbandate, bannedby, banreason FROM ip_banned WHERE (bandate = unbandate OR unbandate > UNIX_TIMESTAMP()) ORDER BY unbandate", CONNECTION_SYNCH);