aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/world_spell_full.sql2
-rw-r--r--src/game/Level3.cpp18
2 files changed, 15 insertions, 5 deletions
diff --git a/sql/world_spell_full.sql b/sql/world_spell_full.sql
index 451ca98fc2c..6a16528f43c 100644
--- a/sql/world_spell_full.sql
+++ b/sql/world_spell_full.sql
@@ -467,7 +467,7 @@ INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES
-- --------
-- POSITION
-- --------
-DELETE FROM spell_target_position WHERE `id` IN (46019, 46020);
+DELETE FROM spell_target_position WHERE `id` IN (46019, 46020, 53360);
INSERT INTO spell_target_position () VALUES (46019, 580, 1704.34, 928.17, -74.558, 0);
INSERT INTO spell_target_position () VALUES (46020, 580, 1704.34, 928.17, 53.079, 0);
INSERT INTO spell_target_position () VALUES (53360, 571, 5807.829, 587.960, 660.939, 1.663);
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index 0b222bb9741..c008a868994 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -3035,15 +3035,25 @@ bool ChatHandler::HandleGameObjectStateCommand(const char* args)
return false;
}
+ char* ctype = strtok(NULL, " ");
+ if(!ctype)
+ return false;
+
+ int32 type = atoi(ctype);
+ if(type < 0)
+ {
+ gobj->SendObjectDeSpawnAnim(gobj->GetGUID());
+ return true;
+ }
+
char* cstate = strtok(NULL, " ");
if(!cstate)
return false;
int32 state = atoi(cstate);
- if(state < 0)
- gobj->SendObjectDeSpawnAnim(gobj->GetGUID());
- else
- gobj->SetGoState((GOState)state);
+
+ gobj->SetByteValue(GAMEOBJECT_BYTES_1, type, state);
+ PSendSysMessage("Set gobject type %d state %d", type, state);
return true;
}