bool CCommandManager::CommandMake(LPOBJ lpObj,char* arg) // OK
{
int qtd=0,section,type,level,skill,luck,option,exc,set,socket,[color=red]time[/color];
BYTE ItemSocketOption[MAX_SOCKET_OPTION] = {0xFF,0xFF,0xFF,0xFF,0xFF};
section = this->GetNumber(arg,0);
if (section < 0)
{
qtd = section;
section = this->GetNumber(arg,1);
type = this->GetNumber(arg,2);
level = this->GetNumber(arg,3);
skill = this->GetNumber(arg,4);
luck = this->GetNumber(arg,5);
option = this->GetNumber(arg,6);
exc = this->GetNumber(arg,7);
set = this->GetNumber(arg,8);
socket = this->GetNumber(arg,9);
[color=red]time = this->GetNumber(arg,10)[/color];
}
else
{
type = this->GetNumber(arg,1);
level = this->GetNumber(arg,2);
skill = this->GetNumber(arg,3);
luck = this->GetNumber(arg,4);
option = this->GetNumber(arg,5);
exc = this->GetNumber(arg,6);
set = this->GetNumber(arg,7);
socket = this->GetNumber(arg,8);
[color=red]time = this->GetNumber(arg,9)[/color];
}
for(int n=0;n < socket && socket <= MAX_SOCKET_OPTION;n++)
{
ItemSocketOption[n] = 0xFE;
}
(qtd < 0) ? qtd -= qtd*2 : qtd;
if (qtd > 0)
{
for(int n=0;n < qtd;n++)
{
GDCreateItemSend(lpObj->Index,0xEB,0,0,GET_ITEM(section,type),level,0,skill,luck,option,-1,exc,set,0,0,ItemSocketOption,0xFF,[color=red]time[/color]);
}
}
else
{
GDCreateItemSend(lpObj->Index,0xEB,0,0,GET_ITEM(section,type),level,0,skill,luck,option,-1,exc,set,0,0,ItemSocketOption,0xFF,[color=red]time[/color]);
}
gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(107));
gLog.Output(LOG_COMMAND,"[CommandMake][%s][%s] - (Section: %d, Type: %d, Level: %d, Skill: %d, Luck: %d, Option: %d, Exc: %d, Set: %d, Sockets: %d, Expiration Time: %d, [Amount: %d])",lpObj->Account,lpObj->Name,section,type,level,skill,luck,option,exc,set,socket,[color=red]time[/color],(qtd>0)?qtd:1);
return 1;
}
Donde time es la variable de duracion.