aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/3724_world.sql10
-rw-r--r--sql/world_scripts_full.sql1
-rw-r--r--sql/world_spell_full.sql8
-rw-r--r--src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp48
4 files changed, 65 insertions, 2 deletions
diff --git a/sql/updates/3724_world.sql b/sql/updates/3724_world.sql
new file mode 100644
index 00000000000..1269925e0ee
--- /dev/null
+++ b/sql/updates/3724_world.sql
@@ -0,0 +1,10 @@
+-- Vehicle and summon spell(summon npc 28788) for Acherus Deathcharger
+UPDATE creature_template SET `spell1`=52362, `VehicleId`=200 WHERE `entry`=28782;
+
+-- ScriptName for dark rider
+UPDATE creature_template SET `ScriptName`='npc_ros_dark_rider' WHERE `entry`=28768;
+
+-- Spellclick spell to mount deathcharger
+DELETE FROM npc_spellclick_spells WHERE `npc_entry`=28782;
+INSERT INTO npc_spellclick_spells (`npc_entry`, `spell_id`, `quest_id`, `quest_status`, `cast_flags`) VALUES
+(28782, 52280, 12687, 3, 1);
diff --git a/sql/world_scripts_full.sql b/sql/world_scripts_full.sql
index 69791270a41..efbb6bf5ae0 100644
--- a/sql/world_scripts_full.sql
+++ b/sql/world_scripts_full.sql
@@ -108,6 +108,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_kingdom_of_dalaran_quests' WHER
UPDATE `creature_template` SET `ScriptName`='npc_taxi' WHERE `entry` IN (17435, 23413, 18725, 19401, 19409, 20235, 25059, 25236, 20903, 20162, 29154, 23415, 27575, 26443, 26949, 23816);
UPDATE `creature_template` SET `ScriptName`='npc_death_knight_initiate' WHERE `entry`=28406;
UPDATE `creature_template` SET `ScriptName`='npc_salanar_the_horseman' WHERE `entry`=28653;
+UPDATE `creature_template` SET `ScriptName`='npc_ros_dark_rider' WHERE `entry`=28768;
/* */
/* ZONE */
diff --git a/sql/world_spell_full.sql b/sql/world_spell_full.sql
index 284072608ba..a9fecbb4e07 100644
--- a/sql/world_spell_full.sql
+++ b/sql/world_spell_full.sql
@@ -178,6 +178,11 @@ INSERT INTO npc_spellclick_spells (`npc_entry`, `spell_id`, `quest_id`, `quest_s
(28606, 52263, 12680, 3, 1),
(28607, 52263, 12680, 3, 1);
+-- Spellclick spell to mount deathcharger
+DELETE FROM npc_spellclick_spells WHERE `npc_entry`=28782;
+INSERT INTO npc_spellclick_spells (`npc_entry`, `spell_id`, `quest_id`, `quest_status`, `cast_flags`) VALUES
+(28782, 52280, 12687, 3, 1);
+
-- --------
-- TARGET
-- --------
@@ -1562,6 +1567,9 @@ UPDATE creature_template SET VehicleId = 312 WHERE entry IN (31857,31858,31861,3
-- Horses for quest 12680 / not sure if its offilike
UPDATE creature_template SET `VehicleId`=200 WHERE `entry` IN (28605,28606,28607);
+-- Vehicle and summon spell(summon npc 28788) for Acherus Deathcharger
+UPDATE creature_template SET `spell1`=52362, `VehicleId`=200 WHERE `entry`=28782;
+
-- --------
-- Death Knight
-- --------
diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
index 83d0ddffd40..d3de74831ea 100644
--- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
+++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
@@ -502,9 +502,12 @@ struct TRINITY_DLL_DECL npc_salanar_the_horsemanAI : public ScriptedAI
{
if( Unit *charmer = who->GetCharmer() )
{
- if( charmer->GetTypeId() == TYPEID_PLAYER && ((Player*)charmer)->GetQuestStatus(12680) == QUEST_STATUS_INCOMPLETE )
+ if( charmer->GetTypeId() == TYPEID_PLAYER )
{
- ((Player*)charmer)->KilledMonster(28767, me->GetGUID());
+ if( ((Player*)charmer)->GetQuestStatus(12680) == QUEST_STATUS_INCOMPLETE )
+ ((Player*)charmer)->KilledMonster(28767, me->GetGUID());
+ else if( ((Player*)charmer)->GetQuestStatus(12687) == QUEST_STATUS_INCOMPLETE )
+ ((Player*)charmer)->GroupEventHappens(12687, who);
((Player*)charmer)->ExitVehicle();
//without this we can see npc kill the horse
//who->setDeathState(DEAD);
@@ -520,6 +523,42 @@ CreatureAI* GetAI_npc_salanar_the_horseman(Creature *_Creature)
return new npc_salanar_the_horsemanAI(_Creature);
}
+/*######
+## npc_ros_dark_rider
+######*/
+
+struct TRINITY_DLL_DECL npc_ros_dark_riderAI : public ScriptedAI
+{
+ npc_ros_dark_riderAI(Creature *c) : ScriptedAI(c) {}
+
+ void Reset()
+ {
+ Creature* deathcharger = me->FindNearestCreature(28782, 30);
+ if(!deathcharger) return;
+ deathcharger->RestoreFaction();
+ deathcharger->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
+ deathcharger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ }
+
+ void JustDied(Unit *killer)
+ {
+ Creature* deathcharger = me->FindNearestCreature(28782, 30);
+ if(!deathcharger) return;
+ if( killer->GetTypeId() == TYPEID_PLAYER && deathcharger->GetTypeId() == TYPEID_UNIT && deathcharger->isVehicle() )
+ {
+ deathcharger->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
+ deathcharger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ deathcharger->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ deathcharger->setFaction(2096);
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_ros_dark_rider(Creature *_Creature)
+{
+ return new npc_ros_dark_riderAI(_Creature);
+}
+
void AddSC_the_scarlet_enclave()
{
Script *newscript;
@@ -550,4 +589,9 @@ void AddSC_the_scarlet_enclave()
newscript->Name="npc_salanar_the_horseman";
newscript->GetAI = &GetAI_npc_salanar_the_horseman;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_ros_dark_rider";
+ newscript->GetAI = &GetAI_npc_ros_dark_rider;
+ newscript->RegisterSelf();
} \ No newline at end of file