private static void ScoreEvent_Command(CommandEventArgs e) { BaseGame Game = ((PlayerMobile)e.Mobile).CurrentEvent; if (Game != null) { Game.AnnounceScore(e.Mobile); } else if (PvpCore.IsInDeathmatch(e.Mobile)) { PvpCore.TryShowScoreBoard(e.Mobile); } else { e.Mobile.SendAsciiMessage("You are not in an event."); } }
private static void ShowScore_Target(Mobile from, object o) { if (o is PlayerMobile) { PlayerMobile pm = o as PlayerMobile; BaseGame Game = pm.CurrentEvent; if (Game != null) { Game.AnnounceScore(from); } else if (PvpCore.IsInDeathmatch(pm)) { DMStone s = PvpCore.GetPlayerStone(pm); if (s != null) { s.ShowScore(from); } } else { from.BeginTarget(-1, false, TargetFlags.None, ShowScore_Target); from.SendMessage("Target a player in a game or a deathmatch stone"); } } else if (o is DMStone) { DMStone game = (DMStone)o; if (game.Started) { game.ShowScore(from); } else { from.SendAsciiMessage("This deathmatch is not running"); } } else { from.BeginTarget(-1, false, TargetFlags.None, ShowScore_Target); from.SendMessage("Target a player in a game or a deathmatch stone"); } }
private static void SendScore_Target(Mobile from, object o) { if (o is PlayerMobile) { PlayerMobile pm = o as PlayerMobile; BaseGame Game = pm.CurrentEvent; if (Game != null) { Game.AnnounceScore(); } else { from.BeginTarget(-1, false, TargetFlags.None, ShowScore_Target); from.SendMessage("Target a player in a game"); } } else { from.BeginTarget(-1, false, TargetFlags.None, ShowScore_Target); from.SendMessage("Target a player in a game"); } }
protected override void OnTick() { m_Game.AnnounceTimeLeft(); m_Game.AnnounceScore(); }