GOD引擎备份资料
超凡 11月前

procedure TFrmMain.Timer1Timer(Sender: TObject);
var
  I: Integer;
  nRow: LongWord;
  GateInfo: pTGateInfo;
  nCode: Byte;
  tTimeCount: Currency;
  Msg: string;
  pmc: PROCESS_MEMORY_COUNTERS_EX;
begin
  if boTimer1TimerBusy then Exit;
  boTimer1TimerBusy:= True;
  nCode:= 0;
  try
    g_boLogIt := FileExists('../开关/LogIt.txt');
    g_boMonNoMove := FileExists('../开关/MonNoMove.txt');
    g_boNoDmg := FileExists('../开关/NoDmg.txt');
    g_boAllGM := FileExists('../开关/AllGM.txt');
    g_boLogTime := True;//FileExists('../开关/消耗时间日志.txt');
    g_boKeepMapItem := FileExists('../开关/掉落不消失.txt');

    SendGameCenterMsg(SG_FORMHANDLE, IntToStr(Self.Handle));

    try
      if Assigned(g_GateSocket) and (g_GateSocket.Active = False) then begin
        g_GateSocket.Active := True; //打开网关端口
        MainOutMessage(Format('{日志} 游戏网关端口(%s:%d)打开成功', [g_GateSocket.Address, g_GateSocket.Port]));
      end;
    except
      on E: Exception do begin
        MainOutMessage(Format('{异常} 游戏网关端口(%s:%d)打开失败', [g_GateSocket.Address, g_GateSocket.Port]));
      end;
    end;
    Try
      ShowMainLogMsg();
      nCode:= 17;
      nRow := ((GetNowTickCount() - g_dwStartTick).val) div 1000;
      LbRunTime.Caption := '[引擎:' + IntToStr(nRow div 3600) + ':' + IntToStr((nRow div 60) mod 60) + ':' + IntToStr(nRow mod 60) + '秒]'{ + sCaption};
      LbUserCount.Caption := '[刷怪:' + IntToStr(UserEngine.MonsterCount) + ']';
      MemStatus.Caption := '[在线人数:' +
        IntToStr(UserEngine.OnlinePlayObject) + '/挂机人数' +
        IntToStr(UserEngine.AutoAddExpPlayCount) + '/加载总数' +
        IntToStr(UserEngine.LoadPlayCount) + '/释放总数' +
        IntToStr(UserEngine.m_PlayObjectFreeList.Count) + ']';
      nCode:= 18;
      if GetProcessMemoryInfo(GetCurrentProcess(), @pmc, SizeOf(pmc)) then
      begin

      end;
      Label1.Caption := Format('处理:%d/%d 传输:%d/%d 角色:%d/%d 内存:%f MB',
      [g_nRunTimeMin, g_nRunTimeMax, g_nSockCountMin, g_nSockCountMax, g_nUsrTimeMin, g_nUsrTimeMax,(pmc.WorkingSetSize / (1024 * 1024))]);
uses
  Windows, Messages, SysUtils, Graphics, Controls, Forms, Dialogs,  Buttons,
  StdCtrls, IniFiles, GSShare, Grobal, Grobal2, SDK, HUtil32, RunSock, Envir, ItmUnit,
  Magic, NoticeM, Guild, Event, Castle, FrnEngn, UsrEngn, Mudutil, Menus, ComCtrls, Grids,
  Common, Classes, JSocket, ExtCtrls, Winapi.PsApi,
  IdAntiFreezeBase, IdAntiFreeze, IdBaseComponent, IdComponent, IdUDPBase, IdUDPClient, IdGlobal,
  VMProtectSDK, System.Generics.Collections;


最新回复 (0)
返回