diff options
author | Discover- <amort11@hotmail.com> | 2011-10-25 23:52:55 +0100 |
---|---|---|
committer | kaelima <kaelima@live.se> | 2011-10-25 23:52:55 +0100 |
commit | 80720358f0c88b0333193c2dbd35d9b2e7feb3ea (patch) | |
tree | 439cdee709d94eeb874f2354f7f00aa71359cf05 /src | |
parent | f958fdf246b16b11103d0b8ce6a9d17909da42a9 (diff) |
Scripts/Nagrand: Fix creature text of Maghar Prisoner and remove useless RAND() in go_warmaul_prison.
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Outland/nagrand.cpp | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp index 726edb5efb2..c556253ecf1 100644 --- a/src/server/scripts/Outland/nagrand.cpp +++ b/src/server/scripts/Outland/nagrand.cpp @@ -670,37 +670,33 @@ enum FindingTheSurvivorsData QUEST_FINDING_THE_SURVIVORS = 9948, NPC_MAGHAR_PRISONER = 18428, - SAY_FREE_0 = 0, - SAY_FREE_1 = 1, - SAY_FREE_2 = 2, - SAY_FREE_3 = 3, - SAY_FREE_4 = 4, + SAY_FREE = 0, }; class go_warmaul_prison : public GameObjectScript { -public: - go_warmaul_prison() : GameObjectScript("go_warmaul_prison") { } + public: + go_warmaul_prison() : GameObjectScript("go_warmaul_prison") { } - bool OnGossipHello(Player* player, GameObject* go) - { - if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE) - return false; - - if (Creature* prisoner = go->FindNearestCreature(NPC_MAGHAR_PRISONER, 1.0f)) + bool OnGossipHello(Player* player, GameObject* go) { - if (prisoner) + if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE) + return false; + + if (Creature* prisoner = go->FindNearestCreature(NPC_MAGHAR_PRISONER, 5.0f)) { - go->UseDoorOrButton(); - if (player) - player->KilledMonsterCredit(NPC_MAGHAR_PRISONER, 0); + if (prisoner) + { + go->UseDoorOrButton(); + if (player) + 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->ForcedDespawn(6000); + prisoner->AI()->Talk(SAY_FREE, player->GetGUID()); + prisoner->ForcedDespawn(6000); + } } + return true; } - return true; - } }; void AddSC_nagrand() |