* More UMapManagement

This commit is contained in:
Andreas Schneider 2013-11-27 20:15:33 +01:00
parent b9a45bf43b
commit d0557ab86f
1 changed files with 25 additions and 1 deletions

View File

@ -30,7 +30,7 @@ unit UMapManagement;
interface interface
uses uses
Classes, SysUtils, UPacket, UInterfaces, UXmlHelper, Classes, SysUtils, UPacket, UInterfaces, UXmlHelper, UEnhancedMemoryStream,
DOM, fgl; DOM, fgl;
type type
@ -43,6 +43,7 @@ type
FName: String; FName: String;
FPath: String; FPath: String;
FDescription: String; FDescription: String;
procedure WriteToStream(AStream: TEnhancedMemoryStream);
public public
constructor Create(AOwner: IInvalidate); constructor Create(AOwner: IInvalidate);
constructor Deserialize(AOwner: IInvalidate; AElement: TDOMElement); constructor Deserialize(AOwner: IInvalidate; AElement: TDOMElement);
@ -66,10 +67,25 @@ type
function Remove(const Item: TMapState): Integer; function Remove(const Item: TMapState): Integer;
end; end;
//Network
{ TMapStateListPacket }
TMapStateListPacket = class(TPacket)
constructor Create(AMapStates: TMapStates);
end;
implementation implementation
{ TMapState } { TMapState }
procedure TMapState.WriteToStream(AStream: TEnhancedMemoryStream);
begin
AStream.WriteStringNull(FName);
AStream.WriteStringNull(FPath);
AStream.WriteStringNull(FDescription);
end;
constructor TMapState.Create(AOwner: IInvalidate); constructor TMapState.Create(AOwner: IInvalidate);
begin begin
inherited Create; inherited Create;
@ -149,5 +165,13 @@ begin
Invalidate; Invalidate;
end; end;
{ TMapStateListPacket }
constructor TMapStateListPacket.Create(AMapStates: TMapStates);
begin
inherited Create($0F, 0);
FStream.WriteByte($01);
end;
end. end.