Scripts/Nagrand: Fix creature text of Maghar Prisoner and remove useless RAND() in go_warmaul_prison.
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
-- Mag'har Prisoner
|
||||||
|
SET @ENTRY := 18428;
|
||||||
|
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
|
||||||
|
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||||
|
(@ENTRY,0,0,"Death to the ogres!",12,0,100,0,0,0,"Mag'har Prisoner"),
|
||||||
|
(@ENTRY,0,1,"Many thanks, hero!",12,0,100,0,0,0,"Mag'har Prisoner"),
|
||||||
|
(@ENTRY,0,2,"One day, a hero will rise and lift the orcs up to their former glory.",12,0,100,0,0,0,"Mag'har Prisoner"),
|
||||||
|
(@ENTRY,0,3,"Spirits watch over you, $r!",12,0,100,0,0,0,"Mag'har Prisoner"),
|
||||||
|
(@ENTRY,0,4,"Thank you, $r! Your service to the Mag'har will not be forgotten.",12,0,100,0,0,0,"Mag'har Prisoner");
|
||||||
@@ -670,16 +670,12 @@ enum FindingTheSurvivorsData
|
|||||||
QUEST_FINDING_THE_SURVIVORS = 9948,
|
QUEST_FINDING_THE_SURVIVORS = 9948,
|
||||||
NPC_MAGHAR_PRISONER = 18428,
|
NPC_MAGHAR_PRISONER = 18428,
|
||||||
|
|
||||||
SAY_FREE_0 = 0,
|
SAY_FREE = 0,
|
||||||
SAY_FREE_1 = 1,
|
|
||||||
SAY_FREE_2 = 2,
|
|
||||||
SAY_FREE_3 = 3,
|
|
||||||
SAY_FREE_4 = 4,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class go_warmaul_prison : public GameObjectScript
|
class go_warmaul_prison : public GameObjectScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
go_warmaul_prison() : GameObjectScript("go_warmaul_prison") { }
|
go_warmaul_prison() : GameObjectScript("go_warmaul_prison") { }
|
||||||
|
|
||||||
bool OnGossipHello(Player* player, GameObject* go)
|
bool OnGossipHello(Player* player, GameObject* go)
|
||||||
@@ -687,7 +683,7 @@ public:
|
|||||||
if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE)
|
if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Creature* prisoner = go->FindNearestCreature(NPC_MAGHAR_PRISONER, 1.0f))
|
if (Creature* prisoner = go->FindNearestCreature(NPC_MAGHAR_PRISONER, 5.0f))
|
||||||
{
|
{
|
||||||
if (prisoner)
|
if (prisoner)
|
||||||
{
|
{
|
||||||
@@ -695,7 +691,7 @@ public:
|
|||||||
if (player)
|
if (player)
|
||||||
player->KilledMonsterCredit(NPC_MAGHAR_PRISONER, 0);
|
player->KilledMonsterCredit(NPC_MAGHAR_PRISONER, 0);
|
||||||
|
|
||||||
prisoner->AI()->Talk(RAND(SAY_FREE_0, SAY_FREE_1, SAY_FREE_2, SAY_FREE_3, SAY_FREE_4), player->GetGUID());
|
prisoner->AI()->Talk(SAY_FREE, player->GetGUID());
|
||||||
prisoner->ForcedDespawn(6000);
|
prisoner->ForcedDespawn(6000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user