Показать сообщение отдельно
Непрочитано 25.12.2013, 17:58   #164
Аватар для Hint
Герой

По умолчанию Re: Работа над Goddess of Destruction (part 6)

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 := ReadH;
          IsValidClassId(C.ClassId);
        end;
      if Flags[8] then ReadC;
      if Flags[9] then C.VitalityPoints := ReadD;
      EndOfPacket;
 
      Party.Add(C);
    end;
end;
Code: Pascal
__________________
hLaPEx, Evermore, hAuthD, L2on, ...

Последний раз редактировалось Hint; 25.12.2013 в 19:46.
Hint вне форума
Сказали спасибо: