mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 00:08:01 +00:00
Core/Quest : Fix he Missing Diplomat part 14 & 15
Author: @PolarCookie
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
INSERT INTO version_db_world (`sql_rev`) VALUES ('1494246194005123844');
|
||||||
|
|
||||||
|
DELETE FROM `areatrigger_involvedrelation` WHERE `id` in (302,1667);
|
||||||
|
INSERT INTO `areatrigger_involvedrelation` VALUES (1667,1265);
|
||||||
|
|
||||||
|
|
||||||
|
DELETE FROM `areatrigger_scripts` WHERE `entry` = 302;
|
||||||
|
INSERT INTO `areatrigger_scripts` VALUES (302,'at_sentry_point');
|
||||||
|
|
||||||
|
UPDATE `creature_template` SET `ScriptName` = 'npc_archmage_tervosh' WHERE `entry` = 4967;
|
||||||
|
|
||||||
|
DELETE FROM `creature_text` WHERE `entry` = 4967 AND `groupid` = 0 and `id` = 0;
|
||||||
|
INSERT INTO `creature_text` VALUES (4967, 0, 0, 'Go with grace, and may the Lady\'s magic protect you.', 12, 0, 100, 0, 0, 0, 1751, 0, 'SAY1');
|
||||||
@@ -187,6 +187,43 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*######
|
||||||
|
## npc_tervosh
|
||||||
|
######*/
|
||||||
|
|
||||||
|
enum Tervosh
|
||||||
|
{
|
||||||
|
QUEST_MISSING_DIPLO_PT14 = 1265,
|
||||||
|
SPELL_PROUDMOORE_DEFENSE = 7120,
|
||||||
|
SAY1 = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
class npc_archmage_tervosh : public CreatureScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
npc_archmage_tervosh() : CreatureScript("npc_archmage_tervosh") { }
|
||||||
|
|
||||||
|
bool OnQuestReward(Player* player, Creature* creature, const Quest* quest, uint32 /*opt*/)
|
||||||
|
{
|
||||||
|
if (quest->GetQuestId() == QUEST_MISSING_DIPLO_PT14)
|
||||||
|
{
|
||||||
|
creature->CastSpell(player, SPELL_PROUDMOORE_DEFENSE);
|
||||||
|
creature->AI()->Talk(SAY1);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
CreatureAI* GetAI(Creature* creature) const
|
||||||
|
{
|
||||||
|
return new npc_archmage_tervoshAI(creature);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct npc_archmage_tervoshAI : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_archmage_tervoshAI(Creature* creature) : ScriptedAI(creature) { }
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/*######
|
/*######
|
||||||
## npc_zelfrax
|
## npc_zelfrax
|
||||||
######*/
|
######*/
|
||||||
@@ -408,6 +445,7 @@ void AddSC_dustwallow_marsh()
|
|||||||
new npc_lady_jaina_proudmoore();
|
new npc_lady_jaina_proudmoore();
|
||||||
new npc_nat_pagle();
|
new npc_nat_pagle();
|
||||||
new npc_private_hendel();
|
new npc_private_hendel();
|
||||||
|
new npc_archmage_tervosh();
|
||||||
new npc_zelfrax();
|
new npc_zelfrax();
|
||||||
new spell_ooze_zap();
|
new spell_ooze_zap();
|
||||||
new spell_ooze_zap_channel_end();
|
new spell_ooze_zap_channel_end();
|
||||||
|
|||||||
@@ -319,6 +319,39 @@ class AreaTrigger_at_nats_landing : public AreaTriggerScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*######
|
||||||
|
## at_sentry_point
|
||||||
|
######*/
|
||||||
|
|
||||||
|
enum SentryPoint
|
||||||
|
{
|
||||||
|
SPELL_TELEPORT_VISUAL = 799, // TODO Find the correct spell
|
||||||
|
QUEST_MISSING_DIPLO_PT14 = 1265,
|
||||||
|
NPC_TERVOSH = 4967
|
||||||
|
};
|
||||||
|
|
||||||
|
class AreaTrigger_at_sentry_point : public AreaTriggerScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AreaTrigger_at_sentry_point() : AreaTriggerScript("at_sentry_point") { }
|
||||||
|
|
||||||
|
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
|
||||||
|
{
|
||||||
|
auto quest_status = player->GetQuestStatus(QUEST_MISSING_DIPLO_PT14);
|
||||||
|
if (!player->IsAlive() || quest_status == QUEST_STATUS_NONE || quest_status == QUEST_STATUS_REWARDED)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!player->FindNearestCreature(NPC_TERVOSH, 100.0f))
|
||||||
|
{
|
||||||
|
if(Creature* tervosh = player->SummonCreature(NPC_TERVOSH, -3476.51, -4105.94, 17.1, 5.3816f, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||||
|
tervosh->CastSpell(tervosh, SPELL_TELEPORT_VISUAL, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*######
|
/*######
|
||||||
## at_brewfest
|
## at_brewfest
|
||||||
######*/
|
######*/
|
||||||
@@ -456,6 +489,7 @@ void AddSC_areatrigger_scripts()
|
|||||||
new AreaTrigger_at_last_rites();
|
new AreaTrigger_at_last_rites();
|
||||||
new AreaTrigger_at_sholazar_waygate();
|
new AreaTrigger_at_sholazar_waygate();
|
||||||
new AreaTrigger_at_nats_landing();
|
new AreaTrigger_at_nats_landing();
|
||||||
|
new AreaTrigger_at_sentry_point();
|
||||||
new AreaTrigger_at_brewfest();
|
new AreaTrigger_at_brewfest();
|
||||||
new AreaTrigger_at_area_52_entrance();
|
new AreaTrigger_at_area_52_entrance();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user