public static bool OnPlayerStatChanged(int tag) { PlayerValueChangeEventArgs args = new PlayerValueChangeEventArgs { Tag = (PlayerChangeType) tag, Block = false }; PlayerValueChanged?.Invoke(null, args); return args.Block; }
public static bool OnPlayerStatChanged(int tag) { PlayerValueChangeEventArgs args = new PlayerValueChangeEventArgs { Tag = (PlayerChangeType)tag, Block = false }; PlayerValueChanged?.Invoke(null, args); return(args.Block); }
public static void OnPlayerStatChanged(int tag) { PlayerValueChangeEventArgs args = new PlayerValueChangeEventArgs {Tag = (PlayerChangeType) tag}; PlayerValueChanged?.Invoke(args); }
private void OnPlayerValueChanged(object sender, PlayerValueChangeEventArgs args) { if (Player.Player == null) { Debugger.WriteLine(LogLevel.Warning, "Player is NULL! Aborting!"); return; } Debugger.WriteLine(LogLevel.Info, $"Attempting to update value {args.Tag}"); if (Player.IsLocked(args.Tag)) { Debugger.WriteLine(LogLevel.Info, "Value locked! Aborting changes..."); args.Block = true; return; } if (!playerValueUpdateQueue.ContainsKey(args.Tag)) playerValueUpdateQueue.Add(args.Tag, () => Player.UpdateField(args.Tag)); }