Skip to content
Open
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
2 changes: 1 addition & 1 deletion Application/OasisBot/Views/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ private void btnStartSetArea_Click(object sender, EventArgs e)
if (!Kernel.Bot.Running)
{
var pos = Game.Player.Position;
PlayerConfig.Set("RSBot.Area.Region", pos.Region);
PlayerConfig.Set("RSBot.Area.Region", pos.Region.Id);
PlayerConfig.Set("RSBot.Area.X", pos.XOffset);
PlayerConfig.Set("RSBot.Area.Y", pos.YOffset);
PlayerConfig.Set("RSBot.Area.Z", pos.ZOffset);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using RSBot.Core;
using RSBot.Core.Components.Scripting;
using RSBot.Core.Event;
Expand Down Expand Up @@ -59,7 +59,7 @@ public bool Execute(string[] arguments = null)
)
return false;

PlayerConfig.Set("RSBot.Area.Region", region);
PlayerConfig.Set("RSBot.Area.Region", region.Id);
PlayerConfig.Set("RSBot.Area.X", xPos);
PlayerConfig.Set("RSBot.Area.Y", yPos);
PlayerConfig.Set("RSBot.Area.Z", zPos);
Expand Down
4 changes: 2 additions & 2 deletions Botbases/RSBot.Training/TrainingManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Timers;
using System.Timers;
using RSBot.Core;
using RSBot.Core.Components;
using RSBot.Core.Event;
Expand All @@ -22,7 +22,7 @@ public static void ApplyTrainingArea(float x, float y, ushort region)
{
Position pos = new(x, y, region);

PlayerConfig.Set("RSBot.Area.Region", pos.Region);
PlayerConfig.Set("RSBot.Area.Region", pos.Region.Id);
PlayerConfig.Set("RSBot.Area.X", pos.XOffset);
PlayerConfig.Set("RSBot.Area.Y", pos.YOffset);
PlayerConfig.Set("RSBot.Area.Z", pos.ZOffset);
Expand Down
4 changes: 2 additions & 2 deletions Botbases/RSBot.Training/Views/Dialogs/TrainingAreasDialog.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using System.Windows.Forms;
using RSBot.Core;
Expand Down Expand Up @@ -35,7 +35,7 @@ private void buttonAccept_Click(object sender, EventArgs e)
return;
}

PlayerConfig.Set("RSBot.Area.Region", trainingArea.Position.Region);
PlayerConfig.Set("RSBot.Area.Region", trainingArea.Position.Region.Id);
PlayerConfig.Set("RSBot.Area.X", trainingArea.Position.XOffset);
PlayerConfig.Set("RSBot.Area.Y", trainingArea.Position.YOffset);
PlayerConfig.Set("RSBot.Area.Z", trainingArea.Position.ZOffset);
Expand Down
2 changes: 1 addition & 1 deletion Botbases/RSBot.Training/Views/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private void btnGetCurrent_Click(object sender, EventArgs e)
{
var pos = Game.Player.Position;

PlayerConfig.Set("RSBot.Area.Region", pos.Region);
PlayerConfig.Set("RSBot.Area.Region", pos.Region.Id);
PlayerConfig.Set("RSBot.Area.X", pos.XOffset);
PlayerConfig.Set("RSBot.Area.Y", pos.YOffset);
PlayerConfig.Set("RSBot.Area.Z", pos.ZOffset);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using RSBot.Core;
using RSBot.Core;
using RSBot.Core.Components.Command;
using RSBot.Core.Event;

Expand All @@ -17,7 +17,7 @@ public bool Execute(bool silent)
$"[RSBot] Setting training area to X={Game.Player.Position.X:0.00} Y={Game.Player.Position.Y:0.00} R=50"
);

PlayerConfig.Set("RSBot.Area.Region", Game.Player.Position.Region);
PlayerConfig.Set("RSBot.Area.Region", Game.Player.Position.Region.Id);
PlayerConfig.Set("RSBot.Area.X", Game.Player.Position.XOffset.ToString("0.0"));
PlayerConfig.Set("RSBot.Area.Y", Game.Player.Position.YOffset.ToString("0.0"));
PlayerConfig.Set("RSBot.Area.Z", Game.Player.Position.ZOffset.ToString("0.0"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using Python.Runtime;
using RSBot.Core;
using RSBot.Core.Event;
Expand Down Expand Up @@ -65,7 +65,7 @@ private bool SetTrainingPosition(float x, float y, ushort region, int radius)
var area = Kernel.Bot.Botbase.Area;
Position pos = new(x, y, region);

PlayerConfig.Set("RSBot.Area.Region", pos.Region);
PlayerConfig.Set("RSBot.Area.Region", pos.Region.Id);
PlayerConfig.Set("RSBot.Area.X", pos.XOffset);
PlayerConfig.Set("RSBot.Area.Y", pos.YOffset);
PlayerConfig.Set("RSBot.Area.Z", pos.ZOffset);
Expand Down
Loading