diff --git a/overlay/oxide/plugins/RunicGateway.cs b/overlay/oxide/plugins/RunicGateway.cs index d519035..e6641c3 100644 --- a/overlay/oxide/plugins/RunicGateway.cs +++ b/overlay/oxide/plugins/RunicGateway.cs @@ -1959,12 +1959,16 @@ namespace Oxide.Plugins tally.HeliKills++; } - /// No return behaviour. A crafted shirt, rifle or anything else, by its item category. + /// + /// No return behaviour. A crafted shirt, rifle or anything else, by its item category. + /// Who crafted it is the crafter's owner: the task no longer carries one (read off the + /// rig, 2026-09-29). + /// private void OnItemCraftFinished(ItemCraftTask task, Item item, ItemCrafter crafter) { MarkHook("OnItemCraftFinished"); - BasePlayer player = task != null ? task.owner : null; + BasePlayer player = crafter != null ? crafter.owner : null; if (player == null || player.IsNpc || item == null || item.info == null) return; @@ -1979,7 +1983,7 @@ namespace Oxide.Plugins BasePlayer player = planner != null ? planner.GetOwnerPlayer() : null; - if (player == null || player.IsNpc || go == null || !(go.ToBaseEntity() is BuildingBlock)) + if (player == null || player.IsNpc || go == null || go.GetComponent() == null) return; TallyFor(player).Built++; @@ -2019,13 +2023,21 @@ namespace Oxide.Plugins private int _reviveFrame = -1; /// - /// Void: a non-null return refuses the heal. is who is healed; + /// Void: a non-null return refuses the heal. is what is healed; /// the tool's owner is who heals. Healing yourself is not a heal (D174). + /// + /// + /// The target is taken as object: the game's `GiveEffectsTo` now takes an + /// `IMedicalToolTarget`, which is not always a player, and a parameter typed + /// `BasePlayer` would simply never be called for the hook's current shape. Only a + /// player healed counts. + /// /// - private void OnHealingItemUse(MedicalTool tool, BasePlayer player) + private void OnHealingItemUse(MedicalTool tool, object target) { MarkHook("OnHealingItemUse"); + BasePlayer player = target as BasePlayer; BasePlayer healer = tool != null ? tool.GetOwnerPlayer() : null; if (healer == null || healer.IsNpc || player == null || player.IsNpc @@ -2107,16 +2119,16 @@ namespace Oxide.Plugins /// No return behaviour. A mission one of the game's NPCs handed out, finished (D173). A /// failed or abandoned one raises a different hook, and is never counted. /// - private void OnMissionSucceeded(BaseMission mission, BaseMission.MissionInstance instance) + private void OnMissionSucceeded(BaseMission mission, BaseMission.MissionInstance instance, BasePlayer assignee) { MarkHook("OnMissionSucceeded"); - BasePlayer player = instance != null ? instance.GetAssignee() : null; - - if (player == null || player.IsNpc) + // The game hands the assignee over: `MissionSuccess(instance, assignee)`. The instance + // itself has no accessor for it (read off the rig, 2026-09-29). + if (assignee == null || assignee.IsNpc) return; - TallyFor(player).Missions++; + TallyFor(assignee).Missions++; } ///