diff options
| -rw-r--r-- | sql/updates/3808_world.sql | 1 | ||||
| -rw-r--r-- | sql/world_scripts_full.sql | 2 | ||||
| -rw-r--r-- | src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp | 28 |
3 files changed, 26 insertions, 5 deletions
diff --git a/sql/updates/3808_world.sql b/sql/updates/3808_world.sql new file mode 100644 index 00000000000..24ce276bd1e --- /dev/null +++ b/sql/updates/3808_world.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_salanar_the_horseman' WHERE `entry` = 28788; diff --git a/sql/world_scripts_full.sql b/sql/world_scripts_full.sql index efbb6bf5ae0..c6b0486456a 100644 --- a/sql/world_scripts_full.sql +++ b/sql/world_scripts_full.sql @@ -107,7 +107,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_unworthy_initiate_anchor' WHERE UPDATE `creature_template` SET `ScriptName`='npc_kingdom_of_dalaran_quests' WHERE `entry` IN (29169,23729,26673,27158,29158,29161,26471,29155,29159,29160,29162); 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_salanar_the_horseman' WHERE `entry` IN (28653, 28788); UPDATE `creature_template` SET `ScriptName`='npc_ros_dark_rider' WHERE `entry`=28768; /* */ 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 5ec53a0cdcb..0c08804b868 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 @@ -493,6 +493,11 @@ bool GossipSelect_npc_death_knight_initiate(Player *player, Creature *_Creature, ## npc_salanar_the_horseman ######*/ +enum +{ + REALM_OF_SHADOWS = 52693 +}; + struct TRINITY_DLL_DECL npc_salanar_the_horsemanAI : public ScriptedAI { npc_salanar_the_horsemanAI(Creature *c) : ScriptedAI(c) {} @@ -507,10 +512,25 @@ struct TRINITY_DLL_DECL npc_salanar_the_horsemanAI : public ScriptedAI { if( charmer->GetTypeId() == TYPEID_PLAYER ) { - if( CAST_PLR(charmer)->GetQuestStatus(12680) == QUEST_STATUS_INCOMPLETE ) - CAST_PLR(charmer)->KilledMonster(28767, me->GetGUID()); - else if( CAST_PLR(charmer)->GetQuestStatus(12687) == QUEST_STATUS_INCOMPLETE ) - CAST_PLR(charmer)->GroupEventHappens(12687, me); + switch(me->GetEntry()) + { + // for quest Grand Theft Palomino(12680) + case 28653: + if( CAST_PLR(charmer)->GetQuestStatus(12680) == QUEST_STATUS_INCOMPLETE ) + CAST_PLR(charmer)->KilledMonster(28767, me->GetGUID()); + break; + // for quest Into the Realm of Shadows(12687) + case 28788: + if( CAST_PLR(charmer)->GetQuestStatus(12687) == QUEST_STATUS_INCOMPLETE ) + { + if(CAST_PLR(charmer)->HasAura(REALM_OF_SHADOWS)) + charmer->RemoveAurasDueToSpell(REALM_OF_SHADOWS); + CAST_PLR(charmer)->GroupEventHappens(12687, me); + } + break; + default: + return; + } CAST_PLR(charmer)->ExitVehicle(); //without this we can see npc kill the horse who->setDeathState(DEAD); |
