Skip to content

Commit

Permalink
fix(Scripts/ZulGurub): implement mising Hakkar speech that fires when…
Browse files Browse the repository at this point in the history
… reaching his temple
  • Loading branch information
Nyeriah committed Mar 11, 2022
1 parent 1f90a18 commit 45c2297
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
5 changes: 5 additions & 0 deletions data/sql/updates/pending_db_world/rev_1646700419097300800.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1646700419097300800');

DELETE FROM `areatrigger_scripts` WHERE `entry` = 3960;
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
(3960, 'at_zulgurub_temple_speech');
27 changes: 25 additions & 2 deletions src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ enum Says
{
SAY_AGGRO = 0,
SAY_FLEEING = 1,
SAY_MINION_DESTROY = 2, // Where does it belong?
SAY_PROTECT_ALTAR = 3 // Where does it belong?
SAY_MINION_DESTROY = 2,
SAY_PROTECT_ALTAR = 3
};

enum Spells
Expand Down Expand Up @@ -203,8 +203,31 @@ class at_zulgurub_entrance_speech : public OnlyOnceAreaTriggerScript
}
};

class at_zulgurub_temple_speech : public OnlyOnceAreaTriggerScript
{
public:
at_zulgurub_temple_speech() : OnlyOnceAreaTriggerScript("at_zulgurub_temple_speech") {}

bool _OnTrigger(Player* player, const AreaTrigger* /*at*/) override
{
if (InstanceScript* instance = player->GetInstanceScript())
{
if (Creature* hakkar = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_HAKKAR)))
{
if (hakkar->GetAI())
{
hakkar->AI()->Talk(SAY_MINION_DESTROY);
}
}
return false;
}
return false;
}
};

void AddSC_boss_hakkar()
{
new boss_hakkar();
new at_zulgurub_entrance_speech();
new at_zulgurub_temple_speech();
}

0 comments on commit 45c2297

Please sign in to comment.