Record last "line guess" at the end of navigation link with segmentation#10
Conversation
- Silkroad-Developer-Community/Silkroad-NavLink#1 - Untested, don't have a client to work with 😅
|
Warning Review limit reached
More reviews will be available in 46 minutes and 18 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. 📝 WalkthroughWalkthrough
ChangesTarget-Based Movement Generation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Botbases/RSBot.Training/Bot/NavigationManager.cs`:
- Around line 259-265: Remove the forced full GC call after storing the new
path: inside the lock that updates _activePath and _targetPosition and clears
_linkage (protected by _linkageLock), delete the GC.Collect() invocation so the
runtime can perform collection naturally; leaving the existing assignment
_linkage = null is sufficient to allow reclamation without pausing the bot
thread.
- Around line 476-487: The generated interpolated waypoints always use
start.Region, so moves that cross regions end up targeting the wrong region;
update the waypoint region when building interpolatedPos in the loop (e.g.
choose end.Region for the final segment or determine the correct region based on
the interpolated coordinates) so the rbsLines.Add string uses the correct region
for each interpolatedPos (refer to Position, start, end, interpolatedPos,
segments, and rbsLines.Add to locate and change the code).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 48328f4f-546d-4c00-a8ae-913155fe90c9
📒 Files selected for processing (1)
Botbases/RSBot.Training/Bot/NavigationManager.cs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Plugins/RSBot.Skills/SkillsManager.cs`:
- Around line 73-83: The code dereferences mastery without checking for null;
before using mastery.Level or mastery.Record (in the block that calls
UpdateMastery), add a null-check for the lookup result (the variable mastery
obtained from Game.Player.Skills.Masteries.FirstOrDefault(...) using
selectedMasteryName) and return early (or log and return) if mastery is null so
OnSpUpdated cannot crash; specifically guard the usages in this method (where
mastery.Level and mastery.Record are read) to ensure UpdateMastery is only
called with a non-null mastery.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ae4271f9-807a-497a-a503-561fd2c61369
📒 Files selected for processing (132)
Application/OasisBot/OasisBot.csprojApplication/OasisBot/Program.csApplication/OasisBot/Views/Controls/Cos/CosControlBase.csApplication/OasisBot/Views/Main.csBotbases/RSBot.Alchemy/AlchemyBase.csBotbases/RSBot.Alchemy/AlchemyView.csBotbases/RSBot.Alchemy/RSBot.Alchemy.csprojBotbases/RSBot.Alchemy/Views/Main.csBotbases/RSBot.Lure/LureBotbase.csBotbases/RSBot.Lure/LureView.csBotbases/RSBot.Lure/RSBot.Lure.csprojBotbases/RSBot.Trade/RSBot.Trade.csprojBotbases/RSBot.Trade/TradeManager.csBotbases/RSBot.Trade/TradeView.csBotbases/RSBot.Training/Bot/NavigationManager.csBotbases/RSBot.Training/Bundle/PartyBuffing/PartyBuffingBundle.csBotbases/RSBot.Training/RSBot.Training.csprojBotbases/RSBot.Training/TrainingBase.csBotbases/RSBot.Training/TrainingManager.csBotbases/RSBot.Training/TrainingView.csBotbases/RSBot.Training/Views/Main.csLibrary/RSBot.Core/Bot.csLibrary/RSBot.Core/BotCL.csLibrary/RSBot.Core/Client/ReferenceManager.csLibrary/RSBot.Core/Components/ClientManager.csLibrary/RSBot.Core/Components/Command/CoreCLICommands.csLibrary/RSBot.Core/Components/PickupManager.csLibrary/RSBot.Core/Components/ShoppingManager.csLibrary/RSBot.Core/Config/GeneralConfig.csLibrary/RSBot.Core/Config/GlobalConfig.csLibrary/RSBot.Core/Kernel.csLibrary/RSBot.Core/Network/Handler/Agent/Entity/EntityUpdatePvpFlag.csLibrary/RSBot.Core/Network/Handler/Agent/Guild/GuildEntityUpdateResponse.csLibrary/RSBot.Core/Network/Handler/Agent/Inventory/InventoryUpdateItemResponse.csLibrary/RSBot.Core/Network/Handler/Agent/Party/PartyDistributionResponse.csLibrary/RSBot.Core/Network/NetworkUtilities.csLibrary/RSBot.Core/Network/Packet.csLibrary/RSBot.Core/Network/Socket/Server.csLibrary/RSBot.Core/Objects/CharacterInventory.csLibrary/RSBot.Core/Objects/Inventory/Item/ItemUpdateFlag.csLibrary/RSBot.Core/Objects/Inventory/Storage.csLibrary/RSBot.Core/Plugins/BotbaseManager.csLibrary/RSBot.Core/Plugins/IBotbase.csLibrary/RSBot.Core/Plugins/PluginManager.csLibrary/RSBot.Core/RSBot.Core.csprojPlugins/RSBot.Chat/Bundle/Chat.csPlugins/RSBot.Chat/Bundle/Network/ChatResponse.csPlugins/RSBot.Chat/Bundle/Network/LinkedItemResponseHandler.csPlugins/RSBot.Chat/ChatCLICommands.csPlugins/RSBot.Chat/ChatManager.csPlugins/RSBot.Chat/ChatPlugin.csPlugins/RSBot.Chat/ChatView.csPlugins/RSBot.Chat/RSBot.Chat.csprojPlugins/RSBot.Chat/Views/Main.csPlugins/RSBot.CommandCenter/RSBot.CommandCenter.csprojPlugins/RSBot.General/GeneralCLICommands.csPlugins/RSBot.General/GeneralManager.csPlugins/RSBot.General/GeneralPlugin.csPlugins/RSBot.General/GeneralView.csPlugins/RSBot.General/RSBot.General.csprojPlugins/RSBot.General/Views/Main.csPlugins/RSBot.Inventory/InventoryManager.csPlugins/RSBot.Inventory/InventoryPlugin.csPlugins/RSBot.Inventory/InventoryView.csPlugins/RSBot.Inventory/RSBot.Inventory.csprojPlugins/RSBot.Inventory/Views/Main.csPlugins/RSBot.Items/ItemsManager.csPlugins/RSBot.Items/ItemsPlugin.csPlugins/RSBot.Items/ItemsView.csPlugins/RSBot.Items/RSBot.Items.csprojPlugins/RSBot.Log/LogManager.csPlugins/RSBot.Log/LogPlugin.csPlugins/RSBot.Log/LogView.csPlugins/RSBot.Log/RSBot.Log.csprojPlugins/RSBot.Map/MapManager.csPlugins/RSBot.Map/MapPlugin.csPlugins/RSBot.Map/MapView.csPlugins/RSBot.Map/RSBot.Map.csprojPlugins/RSBot.Map/Views/Main.csPlugins/RSBot.Party/Bundle/AutoParty/AutoPartyBundle.csPlugins/RSBot.Party/PartyView.csPlugins/RSBot.Party/RSBot.Party.csprojPlugins/RSBot.Protection/ProtectionManager.csPlugins/RSBot.Protection/ProtectionPlugin.csPlugins/RSBot.Protection/ProtectionView.csPlugins/RSBot.Protection/RSBot.Protection.csprojPlugins/RSBot.Python/Components/API/Core/API.Core.csPlugins/RSBot.Python/Components/API/Core/Config/API.Config.csPlugins/RSBot.Python/Components/API/Core/Entity/API.Entity.csPlugins/RSBot.Python/Components/API/Core/Inventory/API.Inventory.csPlugins/RSBot.Python/Components/API/Core/Quests/API.Quests.csPlugins/RSBot.Python/Components/API/Core/Training/API.Training.csPlugins/RSBot.Python/Components/API/GUI/API.Gui.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ButtonWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.CheckboxWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ComboboxWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.LabelWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ListBoxWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.RadioButtonWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.TextboxWrapper.csPlugins/RSBot.Python/Components/API/GUI/Wrapper/API.Gui.Wrapper.csPlugins/RSBot.Python/Components/API/Handler/PythonErrorHandler.csPlugins/RSBot.Python/Components/API/Handler/PythonInfoHandler.csPlugins/RSBot.Python/Components/API/ModuleLoader/ModuleLoader.csPlugins/RSBot.Python/Components/API/ModuleLoader/PythonPlugin.csPlugins/RSBot.Python/Components/API/ModuleLoader/StubGenerator.csPlugins/RSBot.Python/Components/Loader/PythonRuntimeManager.csPlugins/RSBot.Python/Components/Manager/PythonPluginManager.csPlugins/RSBot.Python/PythonManager.csPlugins/RSBot.Python/PythonPlugin.csPlugins/RSBot.Python/PythonView.csPlugins/RSBot.Python/RSBot.Python.csprojPlugins/RSBot.Python/Views/Main.csPlugins/RSBot.Python/Views/View.csPlugins/RSBot.Quest/QuestPlugin.csPlugins/RSBot.Quest/QuestView.csPlugins/RSBot.Quest/RSBot.Quest.csprojPlugins/RSBot.Quest/Views/Main.csPlugins/RSBot.ServerInfo/RSBot.ServerInfo.csprojPlugins/RSBot.ServerInfo/ServerInfoManager.csPlugins/RSBot.ServerInfo/ServerInfoPlugin.csPlugins/RSBot.ServerInfo/ServerInfoView.csPlugins/RSBot.ServerInfo/Views/Main.csPlugins/RSBot.Skills/RSBot.Skills.csprojPlugins/RSBot.Skills/SkillsManager.csPlugins/RSBot.Skills/SkillsPlugin.csPlugins/RSBot.Skills/SkillsView.csPlugins/RSBot.Skills/Views/Main.csPlugins/RSBot.Statistics/RSBot.Statistics.csprojPlugins/RSBot.Statistics/StatisticsManager.csPlugins/RSBot.Statistics/StatisticsPlugin.csPlugins/RSBot.Statistics/StatisticsView.cs
💤 Files with no reviewable changes (3)
- Botbases/RSBot.Lure/LureBotbase.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ButtonWrapper.cs
- Library/RSBot.Core/Plugins/IBotbase.cs
✅ Files skipped from review due to trivial changes (120)
- Plugins/RSBot.Chat/ChatCLICommands.cs
- Plugins/RSBot.General/GeneralView.cs
- Library/RSBot.Core/Config/GlobalConfig.cs
- Plugins/RSBot.ServerInfo/ServerInfoPlugin.cs
- Plugins/RSBot.ServerInfo/ServerInfoManager.cs
- Plugins/RSBot.Log/LogPlugin.cs
- Plugins/RSBot.Chat/ChatView.cs
- Plugins/RSBot.Python/RSBot.Python.csproj
- Plugins/RSBot.Map/MapManager.cs
- Botbases/RSBot.Trade/TradeView.cs
- Plugins/RSBot.Chat/Bundle/Network/LinkedItemResponseHandler.cs
- Plugins/RSBot.Python/Components/API/Handler/PythonErrorHandler.cs
- Plugins/RSBot.Party/PartyView.cs
- Plugins/RSBot.Map/MapView.cs
- Plugins/RSBot.Protection/ProtectionManager.cs
- Plugins/RSBot.Quest/QuestView.cs
- Plugins/RSBot.Statistics/StatisticsManager.cs
- Botbases/RSBot.Training/TrainingBase.cs
- Library/RSBot.Core/Network/Handler/Agent/Party/PartyDistributionResponse.cs
- Library/RSBot.Core/Components/Command/CoreCLICommands.cs
- Plugins/RSBot.ServerInfo/ServerInfoView.cs
- Library/RSBot.Core/BotCL.cs
- Library/RSBot.Core/Plugins/BotbaseManager.cs
- Plugins/RSBot.Map/Views/Main.cs
- Plugins/RSBot.Statistics/RSBot.Statistics.csproj
- Plugins/RSBot.Items/ItemsView.cs
- Library/RSBot.Core/Network/Packet.cs
- Botbases/RSBot.Trade/TradeManager.cs
- Plugins/RSBot.Quest/QuestPlugin.cs
- Plugins/RSBot.Protection/ProtectionView.cs
- Plugins/RSBot.Statistics/StatisticsPlugin.cs
- Plugins/RSBot.Quest/Views/Main.cs
- Botbases/RSBot.Alchemy/AlchemyView.cs
- Library/RSBot.Core/Components/PickupManager.cs
- Plugins/RSBot.Log/LogView.cs
- Plugins/RSBot.General/GeneralCLICommands.cs
- Plugins/RSBot.Map/MapPlugin.cs
- Library/RSBot.Core/Objects/Inventory/Storage.cs
- Plugins/RSBot.Python/Components/API/Handler/PythonInfoHandler.cs
- Plugins/RSBot.Skills/SkillsView.cs
- Plugins/RSBot.Inventory/RSBot.Inventory.csproj
- Library/RSBot.Core/Bot.cs
- Plugins/RSBot.Chat/ChatManager.cs
- Botbases/RSBot.Trade/RSBot.Trade.csproj
- Library/RSBot.Core/Kernel.cs
- Botbases/RSBot.Training/Views/Main.cs
- Plugins/RSBot.Inventory/Views/Main.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.TextboxWrapper.cs
- Plugins/RSBot.Statistics/StatisticsView.cs
- Plugins/RSBot.Skills/SkillsPlugin.cs
- Library/RSBot.Core/Network/NetworkUtilities.cs
- Library/RSBot.Core/Objects/CharacterInventory.cs
- Plugins/RSBot.Inventory/InventoryView.cs
- Plugins/RSBot.Quest/RSBot.Quest.csproj
- Library/RSBot.Core/RSBot.Core.csproj
- Plugins/RSBot.Python/PythonView.cs
- Botbases/RSBot.Lure/LureView.cs
- Plugins/RSBot.Skills/RSBot.Skills.csproj
- Botbases/RSBot.Training/TrainingView.cs
- Application/OasisBot/OasisBot.csproj
- Plugins/RSBot.Python/PythonManager.cs
- Botbases/RSBot.Alchemy/Views/Main.cs
- Plugins/RSBot.Python/Components/Loader/PythonRuntimeManager.cs
- Plugins/RSBot.Party/RSBot.Party.csproj
- Plugins/RSBot.Map/RSBot.Map.csproj
- Plugins/RSBot.General/GeneralPlugin.cs
- Plugins/RSBot.Party/Bundle/AutoParty/AutoPartyBundle.cs
- Library/RSBot.Core/Client/ReferenceManager.cs
- Plugins/RSBot.Python/Views/View.cs
- Plugins/RSBot.CommandCenter/RSBot.CommandCenter.csproj
- Plugins/RSBot.Inventory/InventoryManager.cs
- Library/RSBot.Core/Network/Handler/Agent/Inventory/InventoryUpdateItemResponse.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.LabelWrapper.cs
- Plugins/RSBot.General/RSBot.General.csproj
- Botbases/RSBot.Training/TrainingManager.cs
- Plugins/RSBot.Items/RSBot.Items.csproj
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ComboboxWrapper.cs
- Botbases/RSBot.Alchemy/AlchemyBase.cs
- Botbases/RSBot.Training/Bundle/PartyBuffing/PartyBuffingBundle.cs
- Plugins/RSBot.ServerInfo/RSBot.ServerInfo.csproj
- Application/OasisBot/Views/Controls/Cos/CosControlBase.cs
- Plugins/RSBot.ServerInfo/Views/Main.cs
- Library/RSBot.Core/Config/GeneralConfig.cs
- Library/RSBot.Core/Network/Handler/Agent/Entity/EntityUpdatePvpFlag.cs
- Plugins/RSBot.Items/ItemsPlugin.cs
- Plugins/RSBot.Chat/Bundle/Network/ChatResponse.cs
- Plugins/RSBot.Chat/RSBot.Chat.csproj
- Library/RSBot.Core/Network/Socket/Server.cs
- Plugins/RSBot.Chat/Bundle/Chat.cs
- Plugins/RSBot.Inventory/InventoryPlugin.cs
- Plugins/RSBot.Chat/ChatPlugin.cs
- Botbases/RSBot.Lure/RSBot.Lure.csproj
- Plugins/RSBot.Python/Components/API/ModuleLoader/PythonPlugin.cs
- Botbases/RSBot.Training/RSBot.Training.csproj
- Plugins/RSBot.Log/LogManager.cs
- Library/RSBot.Core/Objects/Inventory/Item/ItemUpdateFlag.cs
- Plugins/RSBot.Log/RSBot.Log.csproj
- Plugins/RSBot.Python/PythonPlugin.cs
- Plugins/RSBot.Items/ItemsManager.cs
- Library/RSBot.Core/Components/ClientManager.cs
- Plugins/RSBot.Python/Components/Manager/PythonPluginManager.cs
- Application/OasisBot/Program.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.RadioButtonWrapper.cs
- Plugins/RSBot.Python/Components/API/Core/Training/API.Training.cs
- Application/OasisBot/Views/Main.cs
- Plugins/RSBot.Protection/ProtectionPlugin.cs
- Botbases/RSBot.Alchemy/RSBot.Alchemy.csproj
- Plugins/RSBot.Python/Components/API/GUI/Wrapper/API.Gui.Wrapper.cs
- Plugins/RSBot.Python/Components/API/ModuleLoader/StubGenerator.cs
- Plugins/RSBot.Protection/RSBot.Protection.csproj
- Library/RSBot.Core/Components/ShoppingManager.cs
- Plugins/RSBot.General/Views/Main.cs
- Plugins/RSBot.Python/Views/Main.cs
- Plugins/RSBot.Python/Components/API/Core/Quests/API.Quests.cs
- Plugins/RSBot.Python/Components/API/Core/Inventory/API.Inventory.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.CheckboxWrapper.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ListBoxWrapper.cs
- Plugins/RSBot.Chat/Views/Main.cs
- Plugins/RSBot.General/GeneralManager.cs
- Plugins/RSBot.Python/Components/API/GUI/API.Gui.cs
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Plugins/RSBot.Skills/SkillsManager.cs`:
- Around line 73-83: The code dereferences mastery without checking for null;
before using mastery.Level or mastery.Record (in the block that calls
UpdateMastery), add a null-check for the lookup result (the variable mastery
obtained from Game.Player.Skills.Masteries.FirstOrDefault(...) using
selectedMasteryName) and return early (or log and return) if mastery is null so
OnSpUpdated cannot crash; specifically guard the usages in this method (where
mastery.Level and mastery.Record are read) to ensure UpdateMastery is only
called with a non-null mastery.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ae4271f9-807a-497a-a503-561fd2c61369
📒 Files selected for processing (132)
Application/OasisBot/OasisBot.csprojApplication/OasisBot/Program.csApplication/OasisBot/Views/Controls/Cos/CosControlBase.csApplication/OasisBot/Views/Main.csBotbases/RSBot.Alchemy/AlchemyBase.csBotbases/RSBot.Alchemy/AlchemyView.csBotbases/RSBot.Alchemy/RSBot.Alchemy.csprojBotbases/RSBot.Alchemy/Views/Main.csBotbases/RSBot.Lure/LureBotbase.csBotbases/RSBot.Lure/LureView.csBotbases/RSBot.Lure/RSBot.Lure.csprojBotbases/RSBot.Trade/RSBot.Trade.csprojBotbases/RSBot.Trade/TradeManager.csBotbases/RSBot.Trade/TradeView.csBotbases/RSBot.Training/Bot/NavigationManager.csBotbases/RSBot.Training/Bundle/PartyBuffing/PartyBuffingBundle.csBotbases/RSBot.Training/RSBot.Training.csprojBotbases/RSBot.Training/TrainingBase.csBotbases/RSBot.Training/TrainingManager.csBotbases/RSBot.Training/TrainingView.csBotbases/RSBot.Training/Views/Main.csLibrary/RSBot.Core/Bot.csLibrary/RSBot.Core/BotCL.csLibrary/RSBot.Core/Client/ReferenceManager.csLibrary/RSBot.Core/Components/ClientManager.csLibrary/RSBot.Core/Components/Command/CoreCLICommands.csLibrary/RSBot.Core/Components/PickupManager.csLibrary/RSBot.Core/Components/ShoppingManager.csLibrary/RSBot.Core/Config/GeneralConfig.csLibrary/RSBot.Core/Config/GlobalConfig.csLibrary/RSBot.Core/Kernel.csLibrary/RSBot.Core/Network/Handler/Agent/Entity/EntityUpdatePvpFlag.csLibrary/RSBot.Core/Network/Handler/Agent/Guild/GuildEntityUpdateResponse.csLibrary/RSBot.Core/Network/Handler/Agent/Inventory/InventoryUpdateItemResponse.csLibrary/RSBot.Core/Network/Handler/Agent/Party/PartyDistributionResponse.csLibrary/RSBot.Core/Network/NetworkUtilities.csLibrary/RSBot.Core/Network/Packet.csLibrary/RSBot.Core/Network/Socket/Server.csLibrary/RSBot.Core/Objects/CharacterInventory.csLibrary/RSBot.Core/Objects/Inventory/Item/ItemUpdateFlag.csLibrary/RSBot.Core/Objects/Inventory/Storage.csLibrary/RSBot.Core/Plugins/BotbaseManager.csLibrary/RSBot.Core/Plugins/IBotbase.csLibrary/RSBot.Core/Plugins/PluginManager.csLibrary/RSBot.Core/RSBot.Core.csprojPlugins/RSBot.Chat/Bundle/Chat.csPlugins/RSBot.Chat/Bundle/Network/ChatResponse.csPlugins/RSBot.Chat/Bundle/Network/LinkedItemResponseHandler.csPlugins/RSBot.Chat/ChatCLICommands.csPlugins/RSBot.Chat/ChatManager.csPlugins/RSBot.Chat/ChatPlugin.csPlugins/RSBot.Chat/ChatView.csPlugins/RSBot.Chat/RSBot.Chat.csprojPlugins/RSBot.Chat/Views/Main.csPlugins/RSBot.CommandCenter/RSBot.CommandCenter.csprojPlugins/RSBot.General/GeneralCLICommands.csPlugins/RSBot.General/GeneralManager.csPlugins/RSBot.General/GeneralPlugin.csPlugins/RSBot.General/GeneralView.csPlugins/RSBot.General/RSBot.General.csprojPlugins/RSBot.General/Views/Main.csPlugins/RSBot.Inventory/InventoryManager.csPlugins/RSBot.Inventory/InventoryPlugin.csPlugins/RSBot.Inventory/InventoryView.csPlugins/RSBot.Inventory/RSBot.Inventory.csprojPlugins/RSBot.Inventory/Views/Main.csPlugins/RSBot.Items/ItemsManager.csPlugins/RSBot.Items/ItemsPlugin.csPlugins/RSBot.Items/ItemsView.csPlugins/RSBot.Items/RSBot.Items.csprojPlugins/RSBot.Log/LogManager.csPlugins/RSBot.Log/LogPlugin.csPlugins/RSBot.Log/LogView.csPlugins/RSBot.Log/RSBot.Log.csprojPlugins/RSBot.Map/MapManager.csPlugins/RSBot.Map/MapPlugin.csPlugins/RSBot.Map/MapView.csPlugins/RSBot.Map/RSBot.Map.csprojPlugins/RSBot.Map/Views/Main.csPlugins/RSBot.Party/Bundle/AutoParty/AutoPartyBundle.csPlugins/RSBot.Party/PartyView.csPlugins/RSBot.Party/RSBot.Party.csprojPlugins/RSBot.Protection/ProtectionManager.csPlugins/RSBot.Protection/ProtectionPlugin.csPlugins/RSBot.Protection/ProtectionView.csPlugins/RSBot.Protection/RSBot.Protection.csprojPlugins/RSBot.Python/Components/API/Core/API.Core.csPlugins/RSBot.Python/Components/API/Core/Config/API.Config.csPlugins/RSBot.Python/Components/API/Core/Entity/API.Entity.csPlugins/RSBot.Python/Components/API/Core/Inventory/API.Inventory.csPlugins/RSBot.Python/Components/API/Core/Quests/API.Quests.csPlugins/RSBot.Python/Components/API/Core/Training/API.Training.csPlugins/RSBot.Python/Components/API/GUI/API.Gui.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ButtonWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.CheckboxWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ComboboxWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.LabelWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ListBoxWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.RadioButtonWrapper.csPlugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.TextboxWrapper.csPlugins/RSBot.Python/Components/API/GUI/Wrapper/API.Gui.Wrapper.csPlugins/RSBot.Python/Components/API/Handler/PythonErrorHandler.csPlugins/RSBot.Python/Components/API/Handler/PythonInfoHandler.csPlugins/RSBot.Python/Components/API/ModuleLoader/ModuleLoader.csPlugins/RSBot.Python/Components/API/ModuleLoader/PythonPlugin.csPlugins/RSBot.Python/Components/API/ModuleLoader/StubGenerator.csPlugins/RSBot.Python/Components/Loader/PythonRuntimeManager.csPlugins/RSBot.Python/Components/Manager/PythonPluginManager.csPlugins/RSBot.Python/PythonManager.csPlugins/RSBot.Python/PythonPlugin.csPlugins/RSBot.Python/PythonView.csPlugins/RSBot.Python/RSBot.Python.csprojPlugins/RSBot.Python/Views/Main.csPlugins/RSBot.Python/Views/View.csPlugins/RSBot.Quest/QuestPlugin.csPlugins/RSBot.Quest/QuestView.csPlugins/RSBot.Quest/RSBot.Quest.csprojPlugins/RSBot.Quest/Views/Main.csPlugins/RSBot.ServerInfo/RSBot.ServerInfo.csprojPlugins/RSBot.ServerInfo/ServerInfoManager.csPlugins/RSBot.ServerInfo/ServerInfoPlugin.csPlugins/RSBot.ServerInfo/ServerInfoView.csPlugins/RSBot.ServerInfo/Views/Main.csPlugins/RSBot.Skills/RSBot.Skills.csprojPlugins/RSBot.Skills/SkillsManager.csPlugins/RSBot.Skills/SkillsPlugin.csPlugins/RSBot.Skills/SkillsView.csPlugins/RSBot.Skills/Views/Main.csPlugins/RSBot.Statistics/RSBot.Statistics.csprojPlugins/RSBot.Statistics/StatisticsManager.csPlugins/RSBot.Statistics/StatisticsPlugin.csPlugins/RSBot.Statistics/StatisticsView.cs
💤 Files with no reviewable changes (3)
- Botbases/RSBot.Lure/LureBotbase.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ButtonWrapper.cs
- Library/RSBot.Core/Plugins/IBotbase.cs
✅ Files skipped from review due to trivial changes (120)
- Plugins/RSBot.Chat/ChatCLICommands.cs
- Plugins/RSBot.General/GeneralView.cs
- Library/RSBot.Core/Config/GlobalConfig.cs
- Plugins/RSBot.ServerInfo/ServerInfoPlugin.cs
- Plugins/RSBot.ServerInfo/ServerInfoManager.cs
- Plugins/RSBot.Log/LogPlugin.cs
- Plugins/RSBot.Chat/ChatView.cs
- Plugins/RSBot.Python/RSBot.Python.csproj
- Plugins/RSBot.Map/MapManager.cs
- Botbases/RSBot.Trade/TradeView.cs
- Plugins/RSBot.Chat/Bundle/Network/LinkedItemResponseHandler.cs
- Plugins/RSBot.Python/Components/API/Handler/PythonErrorHandler.cs
- Plugins/RSBot.Party/PartyView.cs
- Plugins/RSBot.Map/MapView.cs
- Plugins/RSBot.Protection/ProtectionManager.cs
- Plugins/RSBot.Quest/QuestView.cs
- Plugins/RSBot.Statistics/StatisticsManager.cs
- Botbases/RSBot.Training/TrainingBase.cs
- Library/RSBot.Core/Network/Handler/Agent/Party/PartyDistributionResponse.cs
- Library/RSBot.Core/Components/Command/CoreCLICommands.cs
- Plugins/RSBot.ServerInfo/ServerInfoView.cs
- Library/RSBot.Core/BotCL.cs
- Library/RSBot.Core/Plugins/BotbaseManager.cs
- Plugins/RSBot.Map/Views/Main.cs
- Plugins/RSBot.Statistics/RSBot.Statistics.csproj
- Plugins/RSBot.Items/ItemsView.cs
- Library/RSBot.Core/Network/Packet.cs
- Botbases/RSBot.Trade/TradeManager.cs
- Plugins/RSBot.Quest/QuestPlugin.cs
- Plugins/RSBot.Protection/ProtectionView.cs
- Plugins/RSBot.Statistics/StatisticsPlugin.cs
- Plugins/RSBot.Quest/Views/Main.cs
- Botbases/RSBot.Alchemy/AlchemyView.cs
- Library/RSBot.Core/Components/PickupManager.cs
- Plugins/RSBot.Log/LogView.cs
- Plugins/RSBot.General/GeneralCLICommands.cs
- Plugins/RSBot.Map/MapPlugin.cs
- Library/RSBot.Core/Objects/Inventory/Storage.cs
- Plugins/RSBot.Python/Components/API/Handler/PythonInfoHandler.cs
- Plugins/RSBot.Skills/SkillsView.cs
- Plugins/RSBot.Inventory/RSBot.Inventory.csproj
- Library/RSBot.Core/Bot.cs
- Plugins/RSBot.Chat/ChatManager.cs
- Botbases/RSBot.Trade/RSBot.Trade.csproj
- Library/RSBot.Core/Kernel.cs
- Botbases/RSBot.Training/Views/Main.cs
- Plugins/RSBot.Inventory/Views/Main.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.TextboxWrapper.cs
- Plugins/RSBot.Statistics/StatisticsView.cs
- Plugins/RSBot.Skills/SkillsPlugin.cs
- Library/RSBot.Core/Network/NetworkUtilities.cs
- Library/RSBot.Core/Objects/CharacterInventory.cs
- Plugins/RSBot.Inventory/InventoryView.cs
- Plugins/RSBot.Quest/RSBot.Quest.csproj
- Library/RSBot.Core/RSBot.Core.csproj
- Plugins/RSBot.Python/PythonView.cs
- Botbases/RSBot.Lure/LureView.cs
- Plugins/RSBot.Skills/RSBot.Skills.csproj
- Botbases/RSBot.Training/TrainingView.cs
- Application/OasisBot/OasisBot.csproj
- Plugins/RSBot.Python/PythonManager.cs
- Botbases/RSBot.Alchemy/Views/Main.cs
- Plugins/RSBot.Python/Components/Loader/PythonRuntimeManager.cs
- Plugins/RSBot.Party/RSBot.Party.csproj
- Plugins/RSBot.Map/RSBot.Map.csproj
- Plugins/RSBot.General/GeneralPlugin.cs
- Plugins/RSBot.Party/Bundle/AutoParty/AutoPartyBundle.cs
- Library/RSBot.Core/Client/ReferenceManager.cs
- Plugins/RSBot.Python/Views/View.cs
- Plugins/RSBot.CommandCenter/RSBot.CommandCenter.csproj
- Plugins/RSBot.Inventory/InventoryManager.cs
- Library/RSBot.Core/Network/Handler/Agent/Inventory/InventoryUpdateItemResponse.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.LabelWrapper.cs
- Plugins/RSBot.General/RSBot.General.csproj
- Botbases/RSBot.Training/TrainingManager.cs
- Plugins/RSBot.Items/RSBot.Items.csproj
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ComboboxWrapper.cs
- Botbases/RSBot.Alchemy/AlchemyBase.cs
- Botbases/RSBot.Training/Bundle/PartyBuffing/PartyBuffingBundle.cs
- Plugins/RSBot.ServerInfo/RSBot.ServerInfo.csproj
- Application/OasisBot/Views/Controls/Cos/CosControlBase.cs
- Plugins/RSBot.ServerInfo/Views/Main.cs
- Library/RSBot.Core/Config/GeneralConfig.cs
- Library/RSBot.Core/Network/Handler/Agent/Entity/EntityUpdatePvpFlag.cs
- Plugins/RSBot.Items/ItemsPlugin.cs
- Plugins/RSBot.Chat/Bundle/Network/ChatResponse.cs
- Plugins/RSBot.Chat/RSBot.Chat.csproj
- Library/RSBot.Core/Network/Socket/Server.cs
- Plugins/RSBot.Chat/Bundle/Chat.cs
- Plugins/RSBot.Inventory/InventoryPlugin.cs
- Plugins/RSBot.Chat/ChatPlugin.cs
- Botbases/RSBot.Lure/RSBot.Lure.csproj
- Plugins/RSBot.Python/Components/API/ModuleLoader/PythonPlugin.cs
- Botbases/RSBot.Training/RSBot.Training.csproj
- Plugins/RSBot.Log/LogManager.cs
- Library/RSBot.Core/Objects/Inventory/Item/ItemUpdateFlag.cs
- Plugins/RSBot.Log/RSBot.Log.csproj
- Plugins/RSBot.Python/PythonPlugin.cs
- Plugins/RSBot.Items/ItemsManager.cs
- Library/RSBot.Core/Components/ClientManager.cs
- Plugins/RSBot.Python/Components/Manager/PythonPluginManager.cs
- Application/OasisBot/Program.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.RadioButtonWrapper.cs
- Plugins/RSBot.Python/Components/API/Core/Training/API.Training.cs
- Application/OasisBot/Views/Main.cs
- Plugins/RSBot.Protection/ProtectionPlugin.cs
- Botbases/RSBot.Alchemy/RSBot.Alchemy.csproj
- Plugins/RSBot.Python/Components/API/GUI/Wrapper/API.Gui.Wrapper.cs
- Plugins/RSBot.Python/Components/API/ModuleLoader/StubGenerator.cs
- Plugins/RSBot.Protection/RSBot.Protection.csproj
- Library/RSBot.Core/Components/ShoppingManager.cs
- Plugins/RSBot.General/Views/Main.cs
- Plugins/RSBot.Python/Views/Main.cs
- Plugins/RSBot.Python/Components/API/Core/Quests/API.Quests.cs
- Plugins/RSBot.Python/Components/API/Core/Inventory/API.Inventory.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.CheckboxWrapper.cs
- Plugins/RSBot.Python/Components/API/GUI/Controls/API.Gui.ListBoxWrapper.cs
- Plugins/RSBot.Chat/Views/Main.cs
- Plugins/RSBot.General/GeneralManager.cs
- Plugins/RSBot.Python/Components/API/GUI/API.Gui.cs
🛑 Comments failed to post (1)
Plugins/RSBot.Skills/SkillsManager.cs (1)
73-83:
⚠️ Potential issue | 🔴 Critical | ⚡ Quick winValidate selected mastery before dereferencing.
At Line 73,
masterycan be null whenRSBot.Skills.selectedMasteryno longer matches current masteries. Lines 80 and 82 then dereferencemastery, which can crashOnSpUpdatedat runtime.Suggested fix
private void OnSpUpdated() { var gap = PlayerConfig.Get<decimal>("RSBot.Skills.numMasteryGap"); var selectedMasteryName = PlayerConfig.Get<string>("RSBot.Skills.selectedMastery"); var mastery = Game.Player.Skills.Masteries.FirstOrDefault(m => m.Record.NameCode == selectedMasteryName); var checkLearnMastery = PlayerConfig.Get<bool>("RSBot.Skills.checkLearnMastery"); var checkLearnMasteryBotStopped = PlayerConfig.Get<bool>("RSBot.Skills.checkLearnMasteryBotStopped"); - if (selectedMasteryName == null || !checkLearnMastery) + if (string.IsNullOrEmpty(selectedMasteryName) || !checkLearnMastery) + return; + if (mastery == null) return; - if (!checkLearnMasteryBotStopped && !Kernel.Bot.Running) + if (!checkLearnMasteryBotStopped && !Kernel.Bot.Running) return; - if (mastery.Level + gap == Game.Player.Level) + if (mastery.Level + gap >= Game.Player.Level) return; UpdateMastery(mastery.Level, mastery.Record, gap); }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.var mastery = Game.Player.Skills.Masteries.FirstOrDefault(m => m.Record.NameCode == selectedMasteryName); var checkLearnMastery = PlayerConfig.Get<bool>("RSBot.Skills.checkLearnMastery"); var checkLearnMasteryBotStopped = PlayerConfig.Get<bool>("RSBot.Skills.checkLearnMasteryBotStopped"); if (string.IsNullOrEmpty(selectedMasteryName) || !checkLearnMastery) return; if (mastery == null) return; if (!checkLearnMasteryBotStopped && !Kernel.Bot.Running) return; if (mastery.Level + gap >= Game.Player.Level) return; UpdateMastery(mastery.Level, mastery.Record, gap);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Plugins/RSBot.Skills/SkillsManager.cs` around lines 73 - 83, The code dereferences mastery without checking for null; before using mastery.Level or mastery.Record (in the block that calls UpdateMastery), add a null-check for the lookup result (the variable mastery obtained from Game.Player.Skills.Masteries.FirstOrDefault(...) using selectedMasteryName) and return early (or log and return) if mastery is null so OnSpUpdated cannot crash; specifically guard the usages in this method (where mastery.Level and mastery.Record are read) to ensure UpdateMastery is only called with a non-null mastery.
Adresses Silkroad-Developer-Community/Silkroad-NavLink#1
Correctly creates a segmented path towards the final destination:

Summary by CodeRabbit