Skip to content
Closed
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
26 changes: 20 additions & 6 deletions osrs/data/data.simba
Original file line number Diff line number Diff line change
Expand Up @@ -488,17 +488,31 @@ end;


function TWeaponData.GetArray(index: Integer): TJSONItem;
var
blankJSON : TJSONItem;
begin
Self.Setup();
Result := Self.Data.Item[index];
try
Self.Setup();
Result := Self.Data.Item[index];
finally
WriteLn GetDebugLn('Object Not Found In DataBase' , False);
Result := blankJSON;
end;
end;

function TWeaponData.GetArray(key: String): TJSONItem; overload;
var
blankJSON : TJSONItem;
begin
Self.Setup();
if key = 'secondary_ammo' then key := 'ammo';
Result := Self.Data.Item[key];
end;
try
Self.Setup();
if key = 'secondary_ammo' then key := 'ammo';
Result := Self.Data.Item[key];
finally
WriteLn GetDebugLn('Object Not Found In DataBase' , False);
Result := blankJSON;
end;
end;


function TWeaponData.GetItems(key: Integer): TRSItemArray;
Expand Down