Autor Topic: Código Borrar inventario MuEmu  (Visto 266 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline KrizR on: September 30, 2017, 10:19:30 AM

  • Colaborador
  • *
  • *
  • Rank: Puto amo
  • Posts: 248
  • Gracias recibida: 2515
void CCommandManager::CommandClearInventory(LPOBJ lpObj,char* arg) // OK
{
   if(gServerInfo.m_CommandClearINVSwitch == 0)
   {
      return;
   }

   if(gServerInfo.m_CommandClearINVEnable[lpObj->AccountLevel] == 0)
   {
      gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,"You do not have permission to use this command");
      return;
   }

   if(lpObj->Money < ((DWORD)gServerInfo.m_CommandClearINVMoney[lpObj->AccountLevel]))
   {
      gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,"You must have at least %d Zen to use this command",gServerInfo.m_CommandPKClearMoney[lpObj->AccountLevel]);
      return;
   }

   lpObj->Money -= gServerInfo.m_CommandClearINVMoney[lpObj->AccountLevel];

   GCMoneySend(lpObj->Index,lpObj->Money);

   int MaxValue = gItemManager.GetInventoryMaxValue(lpObj);


   for (int i = INVENTORY_WEAR_SIZE; i < MaxValue; i++)
   {
      gItemManager.InventoryDelItem(lpObj->Index,i);
      gItemManager.GCItemDeleteSend(lpObj->Index,i,1);
   }

   gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,"Inventory Clear Succesfull");

   gLog.Output(LOG_COMMAND,"[Command Clear Iventory] Use for:[%s][%s]",lpObj->Account,lpObj->Name);

Gracias:


Offline sombe30 #1 on: September 30, 2017, 12:17:28 PM

  • *
  • Rank: Principiante
  • Posts: 27
  • Gracias recibida: 4
se agrega en el cCommand.cpp   y donde mas amigo

Offline seedmaker #2 on: October 17, 2017, 02:02:11 AM

  • *
  • Rank: Principiante
  • Posts: 26
  • Gracias recibida: 1
How to Fix this ? Error   1   error C2039: 'CommandClearInventory' : is not a member of 'CCommandManager'   D:\My MU Files\Server Files\[ Extra ] Source Files\Package [SOURCE] MuEmu\Package [SOURCE] MuEmu\eMU\GameServer\GameServer\CommandManager.cpp   1396   1   GameServer
Error   2   error C2039: 'm_CommandClearINVSwitch' : is not a member of 'CServerInfo'   D:\My MU Files\Server Files\[ Extra ] Source Files\Package [SOURCE] MuEmu\Package [SOURCE] MuEmu\eMU\GameServer\GameServer\CommandManager.cpp   1398   1   GameServer
Error   3   error C2039: 'm_CommandClearINVEnable' : is not a member of 'CServerInfo'   D:\My MU Files\Server Files\[ Extra ] Source Files\Package [SOURCE] MuEmu\Package [SOURCE] MuEmu\eMU\GameServer\GameServer\CommandManager.cpp   1403   1   GameServer
Error   4   error C2039: 'm_CommandClearINVMoney' : is not a member of 'CServerInfo'   D:\My MU Files\Server Files\[ Extra ] Source Files\Package [SOURCE] MuEmu\Package [SOURCE] MuEmu\eMU\GameServer\GameServer\CommandManager.cpp   1409   1   GameServer
Error   5   error C2039: 'm_CommandClearINVMoney' : is not a member of 'CServerInfo'   D:\My MU Files\Server Files\[ Extra ] Source Files\Package [SOURCE] MuEmu\Package [SOURCE] MuEmu\eMU\GameServer\GameServer\CommandManager.cpp   1415   1   GameServer
   6   IntelliSense: class "CCommandManager" has no member "CommandClearInventory"   d:\my mu files\server files\[ extra ] source files\package [source] muemu\package [source] muemu\emu\gameserver\gameserver\commandmanager.cpp   1396   23   GameServer
   7   IntelliSense: class "CServerInfo" has no member "m_CommandClearINVSwitch"   d:\my mu files\server files\[ extra ] source files\package [source] muemu\package [source] muemu\emu\gameserver\gameserver\commandmanager.cpp   1398   19   GameServer
   8   IntelliSense: class "CServerInfo" has no member "m_CommandClearINVEnable"   d:\my mu files\server files\[ extra ] source files\package [source] muemu\package [source] muemu\emu\gameserver\gameserver\commandmanager.cpp   1403   19   GameServer
   9   IntelliSense: class "CServerInfo" has no member "m_CommandClearINVMoney"   d:\my mu files\server files\[ extra ] source files\package [source] muemu\package [source] muemu\emu\gameserver\gameserver\commandmanager.cpp   1409   42   GameServer
   10   IntelliSense: class "CServerInfo" has no member "m_CommandClearINVMoney"   d:\my mu files\server files\[ extra ] source files\package [source] muemu\package [source] muemu\emu\gameserver\gameserver\commandmanager.cpp   1415   32   GameServer

Offline Lude #3 on: October 18, 2017, 08:47:50 PM

  • *
  • *
  • Rank: Puto amo
  • Posts: 699
  • Gracias recibida: 1910
Me gustaría aclarar que el código esta incompleto ya que solo está aportando el CommandManager.cpp, falta su respectiva declaración en h, también falta el ServerInfo.cpp y h, también falta agregarlo al Message.txt y al GameServer-Commands.dat


Los Niños, los Borrachos y los Logs siempre dicen la verdad.

Gracias:



 

Related Topics

  Subject / Started by Replies Last post
1 Replies
197 Views
Last post October 07, 2016, 01:18:55 AM
by nik2013
8 Replies
211 Views
Last post November 19, 2016, 11:56:20 PM
by jigokush
7 Replies
458 Views
Last post November 03, 2016, 12:25:00 AM
by ZabiinoOo
8 Replies
114 Views
Last post June 26, 2017, 09:46:49 PM
by Karuritoku
0 Replies
115 Views
Last post June 29, 2017, 03:23:39 PM
by Azzlaer