Skip to content

Commit

Permalink
OHF: Handle areatrigger for Ashbringer event
Browse files Browse the repository at this point in the history
  • Loading branch information
MantisLord committed Feb 11, 2024
1 parent c179e70 commit 8c88bcf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ INSERT INTO scripted_areatrigger VALUES
(4501,'at_bartolo_ginsetti'),
(4502,'at_beggar'),
(4503,'at_beggar'),
(4504,'at_beggar');
(4504,'at_beggar'),
(4498,'at_southshore_inn');

/* THE DARK PORTAL */
UPDATE creature_template SET ScriptName='boss_chrono_lord_deja' WHERE entry=17879;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ void instance_old_hillsbrad::OnCreatureCreate(Creature* pCreature)
case NPC_SKARLOC:
case NPC_EPOCH:
case NPC_BARTOLO:
case NPC_COMMANDER_MOGRAINE:
m_npcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid();
break;
case NPC_ORC_PRISONER:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ enum
// RP scripts
NPC_BARTOLO = 20365,
NPC_BEGGAR = 20432,
NPC_COMMANDER_MOGRAINE = 20345,
};

static const float afInstanceLoc[][4] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,14 @@ bool AreaTrigger_at_beggar(Player* player, AreaTriggerEntry const* /*pAt*/)
return true;
}

bool AreaTrigger_at_southshore_inn(Player* player, AreaTriggerEntry const* /*pAt*/)
{
instance_old_hillsbrad* instance = (instance_old_hillsbrad*)player->GetInstanceData();
if (Creature* mograine = instance->GetSingleCreatureFromStorage(NPC_COMMANDER_MOGRAINE))
mograine->AI()->SendAIEvent(AI_EVENT_CUSTOM_EVENTAI_A, player, mograine);
return true;
}

void AddSC_old_hillsbrad()
{
Script* pNewScript = new Script;
Expand Down Expand Up @@ -1453,4 +1461,9 @@ void AddSC_old_hillsbrad()
pNewScript->Name = "at_beggar";
pNewScript->pAreaTrigger = &AreaTrigger_at_beggar;
pNewScript->RegisterSelf();

pNewScript = new Script;
pNewScript->Name = "at_southshore_inn";
pNewScript->pAreaTrigger = &AreaTrigger_at_southshore_inn;
pNewScript->RegisterSelf();
}

0 comments on commit 8c88bcf

Please sign in to comment.