fix(bridge): the raid frame's attackerId comes from userID
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 9s
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 9s
UserIDString is filled in only when a player connects, loads as a sleeper, or is an engine bot. A player another plugin spawned has none, and the phase-10 walk's raid arrived with attackerId null. The website skips the raid alert when the attacker is authorised on the cupboard, so a null would quietly defeat that exclusion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
@@ -1446,7 +1446,12 @@ namespace Oxide.Plugins
|
||||
frame["ownerId"] = entity.OwnerID.ToString();
|
||||
frame["prefab"] = entity.ShortPrefabName;
|
||||
frame["structure"] = structure;
|
||||
frame["attackerId"] = attacker.UserIDString;
|
||||
|
||||
// From `userID`, not `UserIDString`. The string is filled in when a player connects,
|
||||
// loads as a sleeper, or is an engine bot — and at no other time, so a player another
|
||||
// plugin spawned carries none. The website skips the raid alert when the attacker is
|
||||
// authorised on the cupboard (PLAN.md D59), and a null here would quietly defeat that.
|
||||
frame["attackerId"] = ((ulong)attacker.userID).ToString();
|
||||
frame["attackerName"] = attacker.displayName;
|
||||
|
||||
string grid = GridOf(entity);
|
||||
|
||||
Reference in New Issue
Block a user