mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
*Allow gm command to set other types of state.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user