mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
fix(Core/DB): Missing Diplomat Quests Part 11,14,16 and Minor Guard Tower Fixes (#4719)
This commit is contained in:
@@ -14,7 +14,6 @@ EndScriptData */
|
||||
/* ContentData
|
||||
npc_lady_jaina_proudmoore
|
||||
npc_nat_pagle
|
||||
npc_private_hendel
|
||||
npc_cassa_crimsonwing - handled by npc_taxi
|
||||
EndContentData */
|
||||
|
||||
@@ -108,119 +107,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,
|
||||
FACTION_HOSTILE = 168, //guessed, may be different
|
||||
|
||||
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") { }
|
||||
|
||||
bool OnQuestAccept(Player* /*player*/, Creature* creature, const Quest* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_MISSING_DIPLO_PT16)
|
||||
creature->setFaction(FACTION_HOSTILE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_private_hendelAI(creature);
|
||||
}
|
||||
|
||||
struct npc_private_hendelAI : public ScriptedAI
|
||||
{
|
||||
npc_private_hendelAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
void AttackedBy(Unit* pAttacker) override
|
||||
{
|
||||
if (me->GetVictim())
|
||||
return;
|
||||
|
||||
if (me->IsFriendlyTo(pAttacker))
|
||||
return;
|
||||
|
||||
AttackStart(pAttacker);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* pDoneBy, uint32& Damage, DamageEffectType, SpellSchoolMask) 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();
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## 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*/) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_MISSING_DIPLO_PT14)
|
||||
{
|
||||
creature->CastSpell(player, SPELL_PROUDMOORE_DEFENSE);
|
||||
creature->AI()->Talk(SAY1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_archmage_tervoshAI(creature);
|
||||
}
|
||||
|
||||
struct npc_archmage_tervoshAI : public ScriptedAI
|
||||
{
|
||||
npc_archmage_tervoshAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_zelfrax
|
||||
######*/
|
||||
@@ -434,8 +320,6 @@ void AddSC_dustwallow_marsh()
|
||||
{
|
||||
new npc_lady_jaina_proudmoore();
|
||||
new npc_nat_pagle();
|
||||
new npc_private_hendel();
|
||||
new npc_archmage_tervosh();
|
||||
new npc_zelfrax();
|
||||
new spell_ooze_zap();
|
||||
new spell_ooze_zap_channel_end();
|
||||
|
||||
@@ -222,7 +222,7 @@ void AddSC_tirisfal_glades();
|
||||
void AddSC_undercity();
|
||||
void AddSC_western_plaguelands();
|
||||
void AddSC_westfall();
|
||||
void AddSC_wetlands();
|
||||
//void AddSC_wetlands();
|
||||
|
||||
//kalimdor
|
||||
void AddSC_instance_blackfathom_deeps(); //Blackfathom Depths
|
||||
@@ -812,7 +812,7 @@ void AddEasternKingdomsScripts()
|
||||
AddSC_undercity();
|
||||
AddSC_western_plaguelands();
|
||||
AddSC_westfall();
|
||||
AddSC_wetlands();
|
||||
//AddSC_wetlands();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user