DB/Quest: The Missing Diplomat (Part 16)

Closes #22261
This commit is contained in:
ZenoX92
2018-08-15 20:14:16 +02:00
committed by Killyana
parent 25d7b7c819
commit cbacc72d93
2 changed files with 102 additions and 64 deletions

View File

@@ -25,7 +25,6 @@ EndScriptData */
/* ContentData
npc_nat_pagle
npc_private_hendel
npc_cassa_crimsonwing - handled by npc_taxi
EndContentData */
@@ -89,68 +88,6 @@ public:
}
};
/*######
## npc_private_hendel
######*/
enum Hendel
{
SAY_PROGRESS_1_TER = 0,
SAY_PROGRESS_2_HEN = 1,
SAY_PROGRESS_3_TER = 2,
SAY_PROGRESS_4_TER = 3,
EMOTE_SURRENDER = 4,
QUEST_MISSING_DIPLO_PT16 = 1324,
NPC_SENTRY = 5184, //helps hendel
NPC_JAINA = 4968, //appears once hendel gives up
NPC_TERVOSH = 4967
};
/// @todo develop this further, end event not created
class npc_private_hendel : public CreatureScript
{
public:
npc_private_hendel() : CreatureScript("npc_private_hendel") { }
struct npc_private_hendelAI : public ScriptedAI
{
npc_private_hendelAI(Creature* creature) : ScriptedAI(creature) { }
void Reset() override
{
me->RestoreFaction();
}
void DamageTaken(Unit* pDoneBy, uint32 &Damage) override
{
if (Damage > me->GetHealth() || me->HealthBelowPctDamaged(20, Damage))
{
Damage = 0;
if (pDoneBy)
if (Player* player = pDoneBy->GetCharmerOrOwnerPlayerOrPlayerItself())
player->GroupEventHappens(QUEST_MISSING_DIPLO_PT16, me);
Talk(EMOTE_SURRENDER);
EnterEvadeMode();
}
}
void QuestAccept(Player* /*player*/, Quest const* quest) override
{
if (quest->GetQuestId() == QUEST_MISSING_DIPLO_PT16)
me->SetFaction(FACTION_ENEMY);
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_private_hendelAI(creature);
}
};
enum SpellScripts
{
SPELL_OOZE_ZAP = 42489,
@@ -287,7 +224,6 @@ class spell_energize_aoe : public SpellScriptLoader
void AddSC_dustwallow_marsh()
{
new npc_nat_pagle();
new npc_private_hendel();
new spell_ooze_zap();
new spell_ooze_zap_channel_end();
new spell_energize_aoe();