|
传奇三1.45官方引擎源代码 - 小火炬源码
unit comman;
interface
uses Classes, SysConst, SysUtils, tList32, Windows, Hum_Unit_Wide;
var Player:TList_;
implementation
procedure OnLoginProc(PID:Cardinal);
var Hum:HumWide;
begin
if Player.IndexOf(PID)=-1 then
begin
Hum:=HumWide.Create;
Hum.ID:=PID;
Player.AddObject(Hum.ID,Hum);
end;
end;
procedure OnLogOutProc(PID:Cardinal);
var Hum:HumWide;
begin
if Player.IndexOf(PID)<>-1 then
begin
Hum:= Player.IndexOfObject(PID) as HumWide;
Hum.Free;
Player.Delete(Player.IndexOf(PID));
end;
end;
Initialization
Player:=TList_.Create;
end.
|
|