Exemplo n.º 1
0
        public TelescopeGump(PlayerMobile pm, PersonalTelescope tele)
            : base(pm, 200, 200)
        {
            Tele = tele;

            pm.CloseGump(typeof(TelescopeGump));
        }
Exemplo n.º 2
0
        public void SendTarget(Mobile m)
        {
            m.SendLocalizedMessage(1158494); // Which telescope do you wish to create the star chart from?
            m.BeginTarget(10, false, TargetFlags.None, (from, targeted) =>
            {
                if (!Deleted && IsChildOf(from.Backpack) && targeted is PersonalTelescope)
                {
                    PersonalTelescope tele = (PersonalTelescope)targeted;

                    ConstellationInfo constellation = AstronomySystem.GetConstellation(tele.TimeCoordinate, tele.RA, tele.DEC);

                    if (constellation != null)
                    {
                        from.SendLocalizedMessage(1158496);     // You successfully map the time-coordinate of the constellation.

                        ChartedBy     = from;
                        ChartedOn     = DateTime.Now;
                        Constellation = constellation.Identifier;
                        from.PlaySound(0x249);
                    }
                    else
                    {
                        from.SendLocalizedMessage(1158495);     // There is nothing to chart at these coordinates at this time.
                    }
                }
            });
        }