-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Utilize a shared list of
CustomNavigationPoint
objects instead of o…
…ne per bot Te only per-bot data was whether the bot could fire, and only one bot should be on a point at a time anyways
- Loading branch information
Showing
5 changed files
with
47 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Aki.Reflection.Patching; | ||
using System.Collections.Generic; | ||
using System.Reflection; | ||
|
||
namespace DrakiaXYZ.Waypoints.Patches | ||
{ | ||
public class GroupPointGetByIdPatch : ModulePatch | ||
{ | ||
protected override MethodBase GetTargetMethod() | ||
{ | ||
return typeof(GroupPoint).GetMethod(nameof(GroupPoint.GetById)); | ||
} | ||
|
||
[PatchPrefix] | ||
public static bool PatchPrefix(Dictionary<int, CustomNavigationPoint> ____childs, ref CustomNavigationPoint __result) | ||
{ | ||
__result = ____childs[0]; | ||
|
||
// Skip original | ||
return false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters