1
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
TLOSCheckType = (losSphere = 1, losSphereAdv = 2, losPOL = 3, losRunUO = 4);
TLOSCheckOption = (losSphereCheckCorners, losPolUseNoShoot, losPolLOSThroughWindow);
TLOSCheckOptions = set of TLOSCheckOption;
function Script_CheckLOS(xf, yf : Word; zf : ShortInt; xt, yt : Word; zt : ShortInt; WorldNum : Byte; LOSCheckType : Byte; LOSOptions : Cardinal) : Boolean; stdcall; external ConstScriptDLL name 'Script_CheckLOS';
function TMover.CheckLOS(xf, yf : Word; zf : ShortInt; xt, yt : Word; zt : ShortInt; WorldNum : Byte; LOSCheckType : TLOSCheckType; LOSCheckOptions : TLOSCheckOptions) : Boolean;
var LOSOptions : Cardinal;
begin
LOSOptions := 0;
if losSphereCheckCorners in LOSCheckOptions then
LOSOptions := $100;
if losPolUseNoShoot in LOSCheckOptions then
LOSOptions := LOSOptions OR $200;
if losPolLOSThroughWindow in LOSCheckOptions then
LOSOptions := LOSOptions OR $400;
Result := Script_CheckLOS(xf, yf, zf, xt, yt, zt, WorldNum,Byte(LOSCheckType),LOSOptions);
end;

When i press the Hotkey it doesn't work good.

):function GetBuffBarInfo : TBuffBarInfo
TBuffBarInfo = packed record
Count : Byte;
Buffs : array of TBuffIcon;
end;
TBuffIcon = packed record
Attribute_ID : Word;
TimeStart : TDateTime;
Seconds : Word;
ClilocID1 : Cardinal;
ClilocID2 : Cardinal;
end;
function TCharacter.GetInfoFromPacket_0xDF(PacketObj: PBArray;
PacketLen: Integer): Boolean;
var
Attribute_ID: Word;
ObjectInfo: PObjectInfo;
ID: Cardinal;
IsEnabled: Boolean;
begin
Result := True;
ID := PacketReader.ReadDword;
if ID <> PlayerID then
Exit;
Attribute_ID := PacketReader.ReadWord;
//really format change here. Before this was Enabled flag, now
//it's Items Count. But no matter.
IsEnabled := WordBool(PacketReader.ReadWord);
if Attribute_ID < 1000 then // 0x3E8 = 1000
Exit;
fObjects.LockObjects;
New(ObjectInfo);
if not fObjects.GetObjectInfo(ID, ObjectInfo) then
begin
Dispose(ObjectInfo);
fObjects.UnLockObjects;
Exit;
end;
case Attribute_ID of
1037:
if IsEnabled then
ObjectInfo^._MobileFlag := ObjectInfo^._MobileFlag or $20
else
if (ObjectInfo^._MobileFlag and $20) = $20 then
ObjectInfo^._MobileFlag := ObjectInfo^._MobileFlag - $20;// paralyze
1038:
begin // poison
ObjectInfo^._Poisoned := IsEnabled;
SetPoisonedStatus(IsEnabled);
end;
end;
fObjects.AddObject(ObjectInfo);
fObjects.UnLockObjects;
TryExecEventHandler(evBuff_DebuffSystem,[ID,Attribute_ID, IsEnabled]);
end;
end;
Quote of the Headdeveloper :Quote21 Oktober bei 7:58 :
because read&write of fixed-size records from binary file directly to structures is fastest))
