diff options
author | ille <ille@ille> | 2012-11-30 18:53:13 +0100 |
---|---|---|
committer | ille <ille@ille> | 2012-11-30 18:57:56 +0100 |
commit | 8f9ee58e633e0d886a9751f28cf788e17f00fb85 (patch) | |
tree | eff7fe93ccbbb4ef8c11b3410f31724963352381 /src/server/scripts/Outland/nagrand.cpp | |
parent | ddb6c95042b5fc5ca424f821a90bc370a977dc5e (diff) |
scripts/gameobject: correct reset of gameobjects (cages/prisons), move command out of if statement
Diffstat (limited to 'src/server/scripts/Outland/nagrand.cpp')
-rw-r--r-- | src/server/scripts/Outland/nagrand.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp index 0c9a60603f5..e2fbb457f35 100644 --- a/src/server/scripts/Outland/nagrand.cpp +++ b/src/server/scripts/Outland/nagrand.cpp @@ -388,11 +388,11 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->SetGoState(GO_STATE_READY); if (go->GetEntry() == GO_CORKIS_PRISON) { if (Creature* corki = go->FindNearestCreature(NPC_CORKI, 25, true)) { - go->SetGoState(GO_STATE_READY); corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()+5, go->GetPositionY(), go->GetPositionZ()); if (player) player->KilledMonsterCredit(NPC_CORKI_CREDIT_1, 0); @@ -403,7 +403,6 @@ public: { if (Creature* corki = go->FindNearestCreature(NPC_CORKI_2, 25, true)) { - go->SetGoState(GO_STATE_READY); corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()-5, go->GetPositionY(), go->GetPositionZ()); if (player) player->KilledMonsterCredit(NPC_CORKI_2, 0); @@ -414,7 +413,6 @@ public: { if (Creature* corki = go->FindNearestCreature(NPC_CORKI_3, 25, true)) { - go->SetGoState(GO_STATE_READY); corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()+4, go->GetPositionY(), go->GetPositionZ()); if (player) player->KilledMonsterCredit(NPC_CORKI_CREDIT_3, 0); @@ -683,12 +681,12 @@ class go_warmaul_prison : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE) return false; if (Creature* prisoner = go->FindNearestCreature(NPC_MAGHAR_PRISONER, 5.0f)) { - go->UseDoorOrButton(); player->KilledMonsterCredit(NPC_MAGHAR_PRISONER, 0); prisoner->AI()->Talk(SAY_FREE, player->GetGUID()); |