exiles reach class quest
This commit is contained in:
@@ -68,6 +68,8 @@ enum ExileReachHelpers
|
|||||||
QUEST_FINDING_THE_LOST_EXPEDITION = 54952,
|
QUEST_FINDING_THE_LOST_EXPEDITION = 54952,
|
||||||
QUEST_COOKING_MEAT = 55174,
|
QUEST_COOKING_MEAT = 55174,
|
||||||
QUEST_ENHANCED_COMBAT_TACTICS = 59254,
|
QUEST_ENHANCED_COMBAT_TACTICS = 59254,
|
||||||
|
QUEST_ENHANCED_COMBAT_TACTICS_MONK = 59339,
|
||||||
|
QUEST_TAMING_THE_WILDS = 59342,
|
||||||
QUEST_NORTHBOUND = 55173,
|
QUEST_NORTHBOUND = 55173,
|
||||||
QUEST_DOWN_WITH_THE_QUILBOAR = 55186,
|
QUEST_DOWN_WITH_THE_QUILBOAR = 55186,
|
||||||
QUEST_FORBIDDEN_QUILBOAR_NECROMANCY = 55184,
|
QUEST_FORBIDDEN_QUILBOAR_NECROMANCY = 55184,
|
||||||
@@ -101,6 +103,8 @@ enum ExileReachHelpers
|
|||||||
QUEST_H_FINDING_THE_LOST_EXPEDITION = 59931,
|
QUEST_H_FINDING_THE_LOST_EXPEDITION = 59931,
|
||||||
QUEST_H_COOKING_MEAT = 59932,
|
QUEST_H_COOKING_MEAT = 59932,
|
||||||
QUEST_H_ENHANCED_COMBAT_TACTICS = 59933,
|
QUEST_H_ENHANCED_COMBAT_TACTICS = 59933,
|
||||||
|
QUEST_H_ENHANCED_COMBAT_TACTICS_MONK = 59934,
|
||||||
|
QUEST_H_TAMING_THE_WILDS = 59937,
|
||||||
QUEST_H_NORTHBOUND = 59935,
|
QUEST_H_NORTHBOUND = 59935,
|
||||||
QUEST_H_DOWN_WITH_THE_QUILBOAR = 59938,
|
QUEST_H_DOWN_WITH_THE_QUILBOAR = 59938,
|
||||||
QUEST_H_FORBIDDEN_QUILBOAR_NECROMANCY = 59939,
|
QUEST_H_FORBIDDEN_QUILBOAR_NECROMANCY = 59939,
|
||||||
|
|||||||
@@ -191,6 +191,30 @@ private:
|
|||||||
bool talked, metBrekaOrGarrick;
|
bool talked, metBrekaOrGarrick;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static bool IsExileEnhancedCombatQuest(uint32 questId)
|
||||||
|
{
|
||||||
|
return questId == QUEST_ENHANCED_COMBAT_TACTICS
|
||||||
|
|| questId == QUEST_H_ENHANCED_COMBAT_TACTICS
|
||||||
|
|| questId == QUEST_ENHANCED_COMBAT_TACTICS_MONK
|
||||||
|
|| questId == QUEST_H_ENHANCED_COMBAT_TACTICS_MONK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool HasIncompleteExileEnhancedCombat(Player const* player)
|
||||||
|
{
|
||||||
|
return player->GetQuestStatus(QUEST_ENHANCED_COMBAT_TACTICS) == QUEST_STATUS_INCOMPLETE
|
||||||
|
|| player->GetQuestStatus(QUEST_H_ENHANCED_COMBAT_TACTICS) == QUEST_STATUS_INCOMPLETE
|
||||||
|
|| player->GetQuestStatus(QUEST_ENHANCED_COMBAT_TACTICS_MONK) == QUEST_STATUS_INCOMPLETE
|
||||||
|
|| player->GetQuestStatus(QUEST_H_ENHANCED_COMBAT_TACTICS_MONK) == QUEST_STATUS_INCOMPLETE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool HasCompleteExileEnhancedCombat(Player const* player)
|
||||||
|
{
|
||||||
|
return player->GetQuestStatus(QUEST_ENHANCED_COMBAT_TACTICS) == QUEST_STATUS_COMPLETE
|
||||||
|
|| player->GetQuestStatus(QUEST_H_ENHANCED_COMBAT_TACTICS) == QUEST_STATUS_COMPLETE
|
||||||
|
|| player->GetQuestStatus(QUEST_ENHANCED_COMBAT_TACTICS_MONK) == QUEST_STATUS_COMPLETE
|
||||||
|
|| player->GetQuestStatus(QUEST_H_ENHANCED_COMBAT_TACTICS_MONK) == QUEST_STATUS_COMPLETE;
|
||||||
|
}
|
||||||
|
|
||||||
// Warlord Breka Grimaxe, Captain Garrick (abandoned camp)
|
// Warlord Breka Grimaxe, Captain Garrick (abandoned camp)
|
||||||
struct npc_exiles_reach_abandoned_camp_166906_156651 : public ScriptedAI
|
struct npc_exiles_reach_abandoned_camp_166906_156651 : public ScriptedAI
|
||||||
{
|
{
|
||||||
@@ -242,7 +266,7 @@ struct npc_exiles_reach_abandoned_camp_166906_156651 : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quest->GetQuestId() == QUEST_H_ENHANCED_COMBAT_TACTICS || quest->GetQuestId() == QUEST_ENHANCED_COMBAT_TACTICS)
|
if (IsExileEnhancedCombatQuest(quest->GetQuestId()))
|
||||||
{
|
{
|
||||||
if (Creature* clone = player->SummonCreature(me->GetEntry(), me->GetPosition(), TEMPSUMMON_MANUAL_DESPAWN, 0s, 0U, 0U, player->GetGUID()))
|
if (Creature* clone = player->SummonCreature(me->GetEntry(), me->GetPosition(), TEMPSUMMON_MANUAL_DESPAWN, 0s, 0U, 0U, player->GetGUID()))
|
||||||
{
|
{
|
||||||
@@ -278,18 +302,25 @@ struct npc_exiles_reach_abandoned_camp_166906_156651 : public ScriptedAI
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
PlayEnhancedCombatConversation(player, spell->Id);
|
PlayEnhancedCombatConversation(player, spell->Id);
|
||||||
|
|
||||||
|
// Monk Enhanced Combat Tactics (59339 / 59934) credits Tiger Palm and Blackout Kick
|
||||||
|
// separately. Those are the two abilities the quest asks for.
|
||||||
|
if (player->GetClass() == CLASS_MONK && HasIncompleteExileEnhancedCombat(player))
|
||||||
|
{
|
||||||
|
if (spell->Id == 100780)
|
||||||
|
player->KilledMonsterCredit(164577);
|
||||||
|
else if (spell->Id == 100784)
|
||||||
|
player->KilledMonsterCredit(164775);
|
||||||
|
}
|
||||||
|
|
||||||
hitCounter++;
|
hitCounter++;
|
||||||
|
|
||||||
if (hitCounter == 3)
|
if (hitCounter == 3)
|
||||||
{
|
{
|
||||||
if (player->GetQuestStatus(QUEST_ENHANCED_COMBAT_TACTICS) == QUEST_STATUS_INCOMPLETE ||
|
if (HasIncompleteExileEnhancedCombat(player))
|
||||||
player->GetQuestStatus(QUEST_H_ENHANCED_COMBAT_TACTICS) == QUEST_STATUS_INCOMPLETE)
|
|
||||||
{
|
|
||||||
player->KilledMonsterCredit(164577);
|
player->KilledMonsterCredit(164577);
|
||||||
}
|
|
||||||
|
|
||||||
if (player->GetQuestStatus(QUEST_ENHANCED_COMBAT_TACTICS) == QUEST_STATUS_COMPLETE ||
|
if (HasCompleteExileEnhancedCombat(player))
|
||||||
player->GetQuestStatus(QUEST_H_ENHANCED_COMBAT_TACTICS) == QUEST_STATUS_COMPLETE)
|
|
||||||
{
|
{
|
||||||
BeFriendly();
|
BeFriendly();
|
||||||
trainingQuestDone = true;
|
trainingQuestDone = true;
|
||||||
@@ -341,8 +372,7 @@ struct npc_exiles_reach_abandoned_camp_166906_156651 : public ScriptedAI
|
|||||||
private:
|
private:
|
||||||
void PlayEnhancedCombatConversation(Player* player, uint32 spellId)
|
void PlayEnhancedCombatConversation(Player* player, uint32 spellId)
|
||||||
{
|
{
|
||||||
if (player->GetQuestStatus(QUEST_ENHANCED_COMBAT_TACTICS) != QUEST_STATUS_INCOMPLETE &&
|
if (!HasIncompleteExileEnhancedCombat(player))
|
||||||
player->GetQuestStatus(QUEST_H_ENHANCED_COMBAT_TACTICS) != QUEST_STATUS_INCOMPLETE)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 conversationId = 0;
|
uint32 conversationId = 0;
|
||||||
@@ -429,7 +459,15 @@ private:
|
|||||||
else if (spellId == 164812 || spellId == 8921)
|
else if (spellId == 164812 || spellId == 8921)
|
||||||
conversationId = _classCasts++ == 0 ? CONVERSATION_ENHANCED_MOONFIRE_PRE : CONVERSATION_ENHANCED_MOONFIRE_CREDIT;
|
conversationId = _classCasts++ == 0 ? CONVERSATION_ENHANCED_MOONFIRE_PRE : CONVERSATION_ENHANCED_MOONFIRE_CREDIT;
|
||||||
break;
|
break;
|
||||||
|
case CLASS_MONK:
|
||||||
|
// 59339 / 59934 credit Tiger Palm (100780) and Blackout Kick (100784) in SpellHit.
|
||||||
|
break;
|
||||||
|
case CLASS_HUNTER:
|
||||||
|
// Hunters take Taming the Wilds (59342 / 59937) instead of this spar.
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
|
// Death Knight, Demon Hunter and Evoker have no separate Exile's Reach class quest.
|
||||||
|
// The shared chain is open to them, and this spar still credits after three hits.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -131,8 +131,17 @@ struct npc_exiles_reach_quilboar_briarpatch_166996_154327 : public ScriptedAI
|
|||||||
{
|
{
|
||||||
npc_exiles_reach_quilboar_briarpatch_166996_154327(Creature* creature) : ScriptedAI(creature) {}
|
npc_exiles_reach_quilboar_briarpatch_166996_154327(Creature* creature) : ScriptedAI(creature) {}
|
||||||
|
|
||||||
void OnQuestAccept(Player* player, Quest const* /*quest*/) override
|
void OnQuestAccept(Player* player, Quest const* quest) override
|
||||||
{
|
{
|
||||||
|
// Taming the Wilds is the hunter quest in place of Enhanced Combat Tactics.
|
||||||
|
// Austin / Mithdran teach Tame Beast (320840) and Call Pet (320842).
|
||||||
|
if (quest->GetQuestId() == QUEST_TAMING_THE_WILDS || quest->GetQuestId() == QUEST_H_TAMING_THE_WILDS)
|
||||||
|
{
|
||||||
|
player->CastSpell(player, 320840, true);
|
||||||
|
player->CastSpell(player, 320842, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Fix the quest status check (operator precedence + correct status)
|
// Fix the quest status check (operator precedence + correct status)
|
||||||
bool hasQuests = false;
|
bool hasQuests = false;
|
||||||
if (player->IsInHorde())
|
if (player->IsInHorde())
|
||||||
|
|||||||
Reference in New Issue
Block a user