Exemple #1
0
        private void Event_Create(object sender, EventArgs e)
        {
            if (txtRemoveWormholeName.Text.Trim() == string.Empty)
            {
                MessageBoxLoader.Show(@"You need set name for route.", this);
                txtRemoveWormholeName.Focus();
                return;
            }

            if (gridWaypoints.Rows.Count < 1)
            {
                MessageBoxLoader.Show(@"Add waypoints to route.", this);
                return;
            }

            var data = new List <string>();

            foreach (DataGridViewRow row in gridWaypoints.Rows)
            {
                if (row.Cells["clmSolarSystemName"].Value != null)
                {
                    data.Add(row.Cells["clmSolarSystemName"].Value.ToString());
                }
            }

            _waypoints.Create(txtRemoveWormholeName.Text.Trim(), data);

            ShowContainerAllRoutes();
        }
Exemple #2
0
        public void Add(Mobile m)
        {
            PartyMemberInfo mi = this[m];

            if (mi == null)
            {
                m_Members.Add(new PartyMemberInfo(m));
                m.Party = this;

                Packet memberList = Packet.Acquire(new PartyMemberList(this));
                Packet attrs      = Packet.Acquire(new MobileAttributesN(m));

                for (int i = 0; i < m_Members.Count; ++i)
                {
                    Mobile f = ((PartyMemberInfo)m_Members[i]).Mobile;

                    f.Send(memberList);

                    if (f != m)
                    {
                        f.Send(new MobileStatusCompact(m.CanBeRenamedBy(f), m));
                        f.Send(attrs);

                        if (f.NetState != null && f.NetState.IsEnhancedClient)
                        {
                            Waypoints.Create(f, m, WaypointType.PartyMember);
                        }

                        m.Send(new MobileStatusCompact(f.CanBeRenamedBy(m), f));
                        m.Send(new MobileAttributesN(f));

                        if (m.NetState != null && m.NetState.IsEnhancedClient)
                        {
                            Waypoints.Create(m, f, WaypointType.PartyMember);
                        }
                    }
                }

                Packet.Release(memberList);
                Packet.Release(attrs);
            }
        }
Exemple #3
0
            protected override void OnTick()
            {
                Party p = Get(m_Mobile);

                if (p == null)
                {
                    return;
                }

                m_Mobile.SendLocalizedMessage(1005437); // You have rejoined the party.
                m_Mobile.Send(new PartyMemberList(p));

                Packet message = Packet.Acquire(new MessageLocalizedAffix(Serial.MinusOne, -1, MessageType.Label, 0x3B2, 3, 1008087, "", AffixType.Prepend | AffixType.System, m_Mobile.Name, ""));
                Packet attrs   = Packet.Acquire(new MobileAttributesN(m_Mobile));

                for (var index = 0; index < p.Members.Count; index++)
                {
                    PartyMemberInfo mi = p.Members[index];
                    Mobile          m  = mi.Mobile;

                    if (m != m_Mobile)
                    {
                        m.Send(message);
                        m.Send(new MobileStatusCompact(m_Mobile.CanBeRenamedBy(m), m_Mobile));
                        m.Send(attrs);
                        m_Mobile.Send(new MobileStatusCompact(m.CanBeRenamedBy(m_Mobile), m));
                        m_Mobile.Send(new MobileAttributesN(m));

                        if (m_Mobile.NetState != null && m_Mobile.NetState.IsEnhancedClient)
                        {
                            Waypoints.Create(m_Mobile, m, WaypointType.PartyMember);
                        }
                    }
                }

                Packet.Release(message);
                Packet.Release(attrs);
            }