aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2012-12-27 18:50:35 -0800
committerNay <dnpd.dd@gmail.com>2012-12-27 18:50:35 -0800
commit7ccef51c8c9510ec23c07d813eee9fbd86e103bd (patch)
tree55136e2bc1408e973ef68cd9497f30a5697e000d /src/server/scripts/Outland
parente04275984e4dfab5686bdaf388b6067b947eb348 (diff)
parent8f9ee58e633e0d886a9751f28cf788e17f00fb85 (diff)
Merge pull request #8518 from ille/goreset
scripts/gameobject: correct reset of gameobjects (cages/prisons), move command out of if statement
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/nagrand.cpp6
-rw-r--r--src/server/scripts/Outland/netherstorm.cpp4
2 files changed, 3 insertions, 7 deletions
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp
index 54565553e94..0dbf0326158 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());
diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp
index 7bec3674a84..beb1a4e1ce2 100644
--- a/src/server/scripts/Outland/netherstorm.cpp
+++ b/src/server/scripts/Outland/netherstorm.cpp
@@ -1052,12 +1052,10 @@ class go_captain_tyralius_prison : public GameObjectScript
bool OnGossipHello(Player* player, GameObject* go)
{
+ go->UseDoorOrButton();
if (Creature* tyralius = go->FindNearestCreature(NPC_CAPTAIN_TYRALIUS, 1.0f))
{
- go->UseDoorOrButton();
-
player->KilledMonsterCredit(NPC_CAPTAIN_TYRALIUS, 0);
-
tyralius->AI()->Talk(SAY_FREE);
tyralius->DespawnOrUnsummon(8000);
}