public static void PointOperate(EPRPlayer player, int amount, PointOperateReason reason) { PointOperateArgs e = new PointOperateArgs(); e.Handled = false; e.Player = player; e.Amount = amount; e.Reason = reason; if (OnPointOperate != null) OnPointOperate(e); }
public static void PointOperate(EPRPlayer player, int amount, PointOperateReason reason) { PointOperateArgs e = new PointOperateArgs(); e.Handled = false; e.Player = player; e.Amount = amount; e.Reason = reason; if (OnPointOperate != null) { OnPointOperate(e); } }
public void OnPointOperate(PointOperateArgs e) { if(!e.Handled) { e.Player.Account += e.Amount; string[] EPRLog = new string[1]; EPRLog[0] = string.Format("{0}: {1} operation by {2} Reason: {3} Amount: {4}, {2} now has {5} {1}", DateTime.Now.ToString(), currname, e.Player.Username, e.Reason,e.Amount,e.Player.Account); File.AppendAllLines(EPRLogSavePath, EPRLog); //e.Player.TSPlayer.SendMessage(string.Format("{0}: {1} operation by {2} Reason: {3} Amount: {4}", DateTime.Now.ToString(), currname, e.Player.Username, e.Reason, e.Amount), Color.Yellow); e.Handled = true; } }