Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions utils/forms/profile_form.simba
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ The account management system that handles profile storage, validation, and UI.

F2PCheckbox, MembersCheckbox: TLazCheckBox;

GermanyCheckbox, UKCheckbox, USCheckbox, AustraliaCheckbox , BrazilCheckbox: TLazCheckBox;

GermanyCheckbox, UKCheckbox, USCheckbox, AustraliaCheckbox , BrazilCheckbox, SouthAfricaCheckbox, SingaporeCheckbox, JapanCheckbox: TLazCheckBox;
NormalCheckbox, DangerousCheckbox, RestrictedCheckbox, SkillTotalCheckbox: TLazCheckBox;

SelectAllActivitiesCheckbox: TLazCheckBox;
Expand Down Expand Up @@ -469,6 +468,12 @@ begin
Result.ExcludeLocations += [EWorldLocation.AUSTRALIA];
if not Self.BrazilCheckbox.Checked then
Result.ExcludeLocations += [EWorldLocation.BRAZIL];
if not Self.SouthAfricaCheckbox.Checked then
Result.ExcludeLocations += [EWorldLocation.SOUTH_AFRICA];
if not Self.SingaporeCheckbox.Checked then
Result.ExcludeLocations += [EWorldLocation.SINGAPORE];
if not Self.JapanCheckbox.Checked then
Result.ExcludeLocations += [EWorldLocation.JAPAN];

if not Self.NormalCheckbox.Checked then
Result.ExcludeActivities += [EWorldActivity.NORMAL];
Expand Down Expand Up @@ -560,8 +565,8 @@ Converts a world location enum to its display string.
function TProfileForm.GetLocationString(loc: EWorldLocation): String;
const
NAMES: array [EWorldLocation] of String = [
'Germany', 'UK', 'USA', 'Australia', 'Brazil'
];
'Germany', 'UK', 'USA', 'Australia', 'Brazil', 'South Africa', 'Singapore', 'Japan'
];
begin
Result := NAMES[loc];
end;
Expand Down Expand Up @@ -706,6 +711,9 @@ begin
EWorldLocation.UNITED_STATES: if not Self.USCheckbox.Checked then Continue;
EWorldLocation.AUSTRALIA: if not Self.AustraliaCheckbox.Checked then Continue;
EWorldLocation.BRAZIL: if not Self.BrazilCheckbox.Checked then Continue;
EWorldLocation.SOUTH_AFRICA: if not Self.SouthAfricaCheckbox.Checked then Continue;
EWorldLocation.SINGAPORE: if not Self.SingaporeCheckbox.Checked then Continue;
EWorldLocation.JAPAN: if not Self.JapanCheckbox.Checked then Continue;
end;
tempWorlds[j] := tempWorlds[i];
Inc(j);
Expand Down Expand Up @@ -1020,9 +1028,26 @@ begin
locY += checkboxHeight + 3;
Self.BrazilCheckbox := TLazCheckBox.CreateEx(
Self.LocationPanel, 'Brazil', '', 10, locY, 100, checkboxHeight

);
Self.BrazilCheckbox.Checked := True;

locY += checkboxHeight + 3;
Self.SouthAfricaCheckbox := TLazCheckBox.CreateEx(
Self.LocationPanel, 'South Africa', '', 10, locY, 100, checkboxHeight
);
Self.SouthAfricaCheckbox.Checked := True;

locY += checkboxHeight + 3;
Self.SingaporeCheckbox := TLazCheckBox.CreateEx(
Self.LocationPanel, 'Singapore', '', 10, locY, 100, checkboxHeight
);
Self.SingaporeCheckbox.Checked := True;

locY += checkboxHeight + 3;
Self.JapanCheckbox := TLazCheckBox.CreateEx(
Self.LocationPanel, 'Japan', '', 10, locY, 100, checkboxHeight
);
Self.JapanCheckbox.Checked := True;
end;

(*
Expand Down
8 changes: 4 additions & 4 deletions utils/worldfetcher.simba
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ EWorldLocation = enum(GERMANY, UNITED_KINGDOM, UNITED_STATES, AUSTRALIA, BRAZIL)
```
An enumeration representing the geographical location of world servers.
*)
EWorldLocation = enum(GERMANY, UNITED_KINGDOM, UNITED_STATES, AUSTRALIA, BRAZIL);

EWorldLocation = enum(GERMANY, UNITED_KINGDOM, UNITED_STATES, AUSTRALIA, BRAZIL, SOUTH_AFRICA, SINGAPORE, JAPAN);
(*
## type EWorldSort
```pascal
Expand Down Expand Up @@ -177,11 +176,12 @@ begin
end;

case LocationStr of
'GERMANY': Result := EWorldLocation.GERMANY;
'UNITED KINGDOM': Result := EWorldLocation.UNITED_KINGDOM;
'UNITED STATES': Result := EWorldLocation.UNITED_STATES;
'AUSTRALIA': Result := EWorldLocation.AUSTRALIA;
'BRAZIL': Result := EWorldLocation.BRAZIL;
'SOUTH AFRICA': Result := EWorldLocation.SOUTH_AFRICA;
'SINGAPORE': Result := EWorldLocation.SINGAPORE;
'JAPAN': Result := EWorldLocation.JAPAN;
else
begin
Result := EWorldLocation(Random(0, Ord(High(EWorldLocation))));
Expand Down
Loading