- Added client side visualization of area restrictions

- Added an icon to the "Region control" menu item
- Changed the former TAccessLevelChangedPacket and the TLoginResponsePacket to add informations about the writeable areas
- Changed OnModifyUserPacket to update clients according to new accesslevel/area restrictions
- Changed OnModifyRegionPacket to update clients using that particular region
- Fixed UPacketHandlers.ValidateAccess to check the region bounds according to the PtInRect function
This commit is contained in:
2008-08-26 22:48:48 +02:00
parent 91af86a294
commit 1c3d624949
10 changed files with 274 additions and 60 deletions
+6 -2
View File
@@ -162,7 +162,7 @@ end;
procedure TAccount.Serialize(AElement: TDOMElement);
var
i: Integer;
child: TDOMElement;
child, regionNode: TDOMElement;
begin
TXmlHelper.WriteString(AElement, 'Name', FName);
TXmlHelper.WriteString(AElement, 'PasswordHash', FPasswordHash);
@@ -171,7 +171,11 @@ begin
child := TXmlHelper.AssureElement(AElement, 'Regions');
for i := 0 to FRegions.Count -1 do
if Config.Regions.Find(FRegions[i]) <> nil then //Validate if the region (still) exists
TXmlHelper.WriteString(child, 'Region', FRegions[i]);
begin
regionNode := child.OwnerDocument.CreateElement('Region');
child.AppendChild(regionNode);
regionNode.AppendChild(regionNode.OwnerDocument.CreateTextNode(FRegions[i]));
end;
end;
{ TAccountList }