public static void ResetStats_OnTarget(CommandEventArgs e) { Mobile m = e.Mobile; m.BeginTarget(-1, false, Server.Targeting.TargetFlags.None, (fro, targeted) => { if (m is PlayerMobile && targeted is ArenaStone) { ArenaStone stone = (ArenaStone)targeted; if (stone.Arena != null) { PVPArena arena = stone.Arena; BaseGump.SendGump(new GenericConfirmCallbackGump <PVPArena>((PlayerMobile)m, String.Format("Reset {0} Statistics?", arena.Definition.Name), "By selecting yes, you will permanently wipe the stats associated to this arena.", arena, null, (from, a) => { ColUtility.Free(a.TeamRankings); ColUtility.Free(a.SurvivalRankings); from.SendMessage("Arena stats cleared."); })); } } }); }
public void ConfigureArena() { if (Manager == null) { Manager = new ArenaManager(this); Manager.MoveToWorld(Definition.ManagerLocation, Definition.Map); } if (Stone == null) { Stone = new ArenaStone(this); Stone.MoveToWorld(Definition.StoneLocation, Definition.Map); } if (Banner1 == null) { Banner1 = new ArenaExitBanner(Definition.BannerID1, this); Banner1.MoveToWorld(Definition.BannerLocation1, Definition.Map); } if (Banner2 == null) { Banner2 = new ArenaExitBanner(Definition.BannerID2, this); Banner2.MoveToWorld(Definition.BannerLocation2, Definition.Map); } if (Region == null) { Region = new ArenaRegion(this); Region.Register(); } if (GuardRegion == null) { GuardRegion = new GuardedArenaRegion(string.Format("{0}_Guarded", Definition.Name), Definition.Map, Definition.GuardBounds); GuardRegion.Register(); } }