fix(Scripts/ZulGurub): Corrected Hakkar speeches at the very start of… (#12200)

fix(Scripts/ZulGurub): Corrected Hakkar speeches at the very start of the instance.

Fixes #12187
This commit is contained in:
UltraNix
2022-06-27 11:15:48 +02:00
committed by GitHub
parent 6c5e460e73
commit a9256dd7c3
2 changed files with 36 additions and 4 deletions

View File

@@ -0,0 +1,8 @@
--
DELETE FROM `areatrigger_scripts` WHERE `entry`=3956;
INSERT INTO `areatrigger_scripts` VALUES
(3956,'at_zulgurub_bridge_speech');
DELETE FROM `creature_text` WHERE `CreatureID`=14834 AND `GroupId`=4;
INSERT INTO `creature_text` VALUES
(14834,4,0,'Your callous disregard for the sovereign might of the Gurubashi Empire has been noted. The inhabitants of Zul\'Gurub have been alerted to your presence.',16,0,100,0,0,0,10550,3,'Hakkar SAY_PROTECT_GURUBASHI_EMPIRE');

View File

@@ -30,10 +30,11 @@ Category: Zul'Gurub
enum Says
{
SAY_AGGRO = 0,
SAY_FLEEING = 1,
SAY_MINION_DESTROY = 2,
SAY_PROTECT_ALTAR = 3
SAY_AGGRO = 0,
SAY_FLEEING = 1,
SAY_MINION_DESTROY = 2,
SAY_PROTECT_ALTAR = 3,
SAY_PROTECT_GURUBASHI_EMPIRE = 4
};
enum Spells
@@ -209,6 +210,28 @@ public:
if (Creature* hakkar = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_HAKKAR)))
{
hakkar->setActive(true);
if (hakkar->GetAI())
{
hakkar->AI()->Talk(SAY_PROTECT_GURUBASHI_EMPIRE);
}
}
return false;
}
return false;
}
};
class at_zulgurub_bridge_speech : public OnlyOnceAreaTriggerScript
{
public:
at_zulgurub_bridge_speech() : OnlyOnceAreaTriggerScript("at_zulgurub_bridge_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_PROTECT_ALTAR);
@@ -274,6 +297,7 @@ void AddSC_boss_hakkar()
{
new boss_hakkar();
new at_zulgurub_entrance_speech();
new at_zulgurub_bridge_speech();
new at_zulgurub_temple_speech();
RegisterSpellScript(spell_hakkar_blood_siphon);
}