Пример #1
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);
                        m.Send(new MobileStatusCompact(f.CanBeRenamedBy(m), f));
                        m.Send(new MobileAttributesN(f));
                    }
                }

                Packet.Release(memberList);
                Packet.Release(attrs);
            }
        }
Пример #2
0
        public override void OnSetCanLoot(Mobile from, bool canLoot)
        {
            Party p = Party.Get(from);

            if (p == null)
            {
                from.SendLocalizedMessage(3000211);                 // You are not in a party.
            }
            else
            {
                PartyMemberInfo mi = p[from];

                if (mi != null)
                {
                    mi.CanLoot = canLoot;

                    if (canLoot)
                    {
                        from.SendLocalizedMessage(1005447);                         // You have chosen to allow your party to loot your corpse.
                    }
                    else
                    {
                        from.SendLocalizedMessage(1005448);                         // You have chosen to prevent your party from looting your corpse.
                    }
                }
            }
        }
Пример #3
0
        public void Add(Mobile m)
        {
            PartyMemberInfo mi = this[m];

            if (mi == null)
            {
                this.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 < this.m_Members.Count; ++i)
                {
                    Mobile f = ((PartyMemberInfo)this.m_Members[i]).Mobile;

                    f.Send(memberList);

                    if (f != m)
                    {
                        f.Send(new MobileStatusCompact(m.CanBeRenamedBy(f), m));
                        f.Send(attrs);
                        f.Send(new KRDisplayWaypoint(m, WaypointType.PartyMember, false, 1062613, m.Name));
                        m.Send(new MobileStatusCompact(f.CanBeRenamedBy(m), f));
                        m.Send(new MobileAttributesN(f));
                        m.Send(new KRDisplayWaypoint(f, WaypointType.PartyMember, false, 1062613, f.Name));
                    }
                }

                Packet.Release(memberList);
                Packet.Release(attrs);
            }
        }
Пример #4
0
        public void Add(Mobile m)
        {
            PartyMemberInfo mi = this[m];

            if (mi == null)
            {
                this.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 < this.m_Members.Count; ++i)
                {
                    Mobile f = ((PartyMemberInfo)this.m_Members[i]).Mobile;

                    f.Send(memberList);

                    if (f != m)
                    {
                        #region Enhance Client
                        f.Send(new MobileStatusCompact(m.CanBeRenamedBy(f), m));
                        f.Send(attrs);
                        f.Send(new KRDisplayWaypoint(m, WaypointType.PartyMember, false, 1062613, m.Name));
                        m.Send(new MobileStatusCompact(f.CanBeRenamedBy(m), f));
                        m.Send(new MobileAttributesN(f));
                        m.Send(new KRDisplayWaypoint(f, WaypointType.PartyMember, false, 1062613, f.Name));

                        /*
                         * for (int i2 = 0; i2 < m_Members.Count; ++i2)
                         * {
                         *  Mobile f2 = ((PartyMemberInfo)m_Members[i2]).Mobile;
                         *
                         *  if (f2.NetState != null && f2.NetState.IsKRClient)
                         *  {
                         *      f2.NetState.Send(new DisplayWaypoint(f.Serial, f.X, f.Y, f.Z, f.Map.MapID, WaypointType.PartyMember, f.Name));
                         *  }
                         * }
                         */
                        #endregion
                    }
                }

                Packet.Release(memberList);
                Packet.Release(attrs);
            }
        }
Пример #5
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);
            }
        }
Пример #6
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);
                        m.Send(new MobileStatusCompact(f.CanBeRenamedBy(m), f));
                        m.Send(new MobileAttributesN(f));
                        #region GeNova: KR Support
                        for (int i2 = 0; i2 < m_Members.Count; ++i2)
                        {
                            Mobile f2 = ((PartyMemberInfo)m_Members[i2]).Mobile;
                            if (f2.NetState != null && f2.NetState.IsKRClient)
                            {
                                f2.NetState.Send(new DisplayWaypoint(f.Serial, f.X, f.Y, f.Z, f.Map.MapID, 2, f.Name));
                            }
                        }
                        #endregion
                    }
                }

                Packet.Release(memberList);
                Packet.Release(attrs);
            }
        }
Пример #7
0
        public void Add(Mobile m)
        {
            PartyMemberInfo mi = this[m];

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

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

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

                    f.Send(memberList);

                    if (!f.HasGump(typeof(PartyRadarGump)))
                    {
                        PartyRadarGump pr = new PartyRadarGump(f, m);
                        f.SendGump(pr);                           // Custom Radar Gump

                        GumpTimer gumpTimer = new GumpTimer(f, m);
                        gumpTimer.Start();

                        GumpTimer gumpTimerT = new GumpTimer(m, f);
                        gumpTimerT.Start();
                    }

                    if (f != m)
                    {
                        f.Send(new MobileStatusCompact(m.CanBeRenamedBy(f), m));
                        f.Send(attrs);
                        m.Send(new MobileStatusCompact(f.CanBeRenamedBy(m), f));
                        m.Send(new MobileAttributesN(f));
                    }
                }
            }
        }
Пример #8
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);
            }