Цитата:
Сообщение от Hint
PartySmallWindowUpdate для Epeisodion (575):
procedure TGameStream.PartySmallWindowUpdatePacket(Packet: TGamePacket);
var
C: TChar;
Flags: array [0..15] of Boolean;
I, H: Integer;
begin
with Packet do
begin
C.ObjectId := ReadD;
Party.Get(C.ObjectId, C);
H := ReadH; // Flags
for I := 0 to High(Flags) do Flags[I] := (H shr I) and 1 = 1;
if Flags[0] then C.CP := ReadD;
if Flags[1] then C.MaxCP := ReadD;
if Flags[2] then C.HP := ReadD;
if Flags[3] then C.MaxHP := ReadD;
if Flags[4] then C.MP := ReadD;
if Flags[5] then C.MaxMP := ReadD;
if Flags[6] then
begin
C.Level := ReadC;
IsValidLevel(C.Level);
end;
if Flags[7] then
begin
C.ClassId := ReadC;
IsValidClassId(C.ClassId);
end;
if Flags[8] then ReadH;
if Flags[9] then C.VitalityPoints := ReadD;
EndOfPacket;
Party.Add(C);
end;
end;Code: Pascal
|
if Flags[7] then C.ClassId := ReadC; // не верно тут H
if Flags[8] then ReadH; // замена пати. не верно тут С