*Allow use gm command to set value for gobjects.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-21 09:59:49 -05:00
parent a77f9e2092
commit 40c58e5992
4 changed files with 34 additions and 16 deletions

View File

@@ -200,15 +200,10 @@ bool ChatHandler::HandleDebugSendOpcodeCommand(const char* /*args*/)
}
else if(type == "appgoguid")
{
uint32 lowguid;
ifs >> lowguid;
GameObject *obj = NULL;
if (GameObjectData const* go_data = objmgr.GetGOData(lowguid))
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
GameObject *obj = GetNearbyGameObject();
if(!obj)
{
PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, lowguid);
PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, 0);
SetSentErrorMessage(true);
ifs.close();
return false;
@@ -217,15 +212,10 @@ bool ChatHandler::HandleDebugSendOpcodeCommand(const char* /*args*/)
}
else if(type == "goguid")
{
uint32 lowguid;
ifs >> lowguid;
GameObject *obj = NULL;
if (GameObjectData const* go_data = objmgr.GetGOData(lowguid))
obj = GetObjectGlobalyWithGuidOrNearWithDbGuid(lowguid,go_data->id);
GameObject *obj = GetNearbyGameObject();
if(!obj)
{
PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, lowguid);
PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, 0);
SetSentErrorMessage(true);
ifs.close();
return false;