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