*Allow gm command to set other types of state.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-29 17:48:32 -05:00
parent ba7bcb02b5
commit 6fbe69c2db
2 changed files with 15 additions and 5 deletions

View File

@@ -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);

View File

@@ -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;
}