public static void UpdateProperties(int index, int serial, string name, Property[] properties, string propertyText)
        {
            ClientInfo ci;

            if (GetClient(index, out ci))
            {
                if (UOMath.IsMobile(serial))
                {
                    if (ci.Player.Serial == serial)
                    {
                        ci.Player.Name         = name;
                        ci.Player.Properties   = properties;
                        ci.Player.PropertyText = propertyText;
                        TreeViewUpdater.EditPlayerNode(index, ClientList[index].Player);
                    }
                    else
                    {
                        Mobile m;
                        if (ci.Mobiles.GetMobile(serial, out m))
                        {
                            m.Name         = name;
                            m.Properties   = properties;
                            m.PropertyText = propertyText;
                        }
                    }
                }
                else
                {
                    Item i;
                    if (ci.Items.GetItem(serial, out i))
                    {
                        i.Name         = Cliloc.GetLocalString(name);
                        i.Properties   = properties;
                        i.PropertyText = propertyText;
                    }
                }
            }
        }
Esempio n. 2
0
            private static void IncomingPackets_PlayerInitializedEvent(int client, PlayerMobile player)
            {
                ClientInfo ci;

                if (ClientInfoCollection.GetClient(client, out ci))
                {
                    if (ci.Player == null)
                    {
                        ci.Player = player;
                    }
                    else
                    {
                        ci.Player.ID        = player.ID;
                        ci.Player.Serial    = player.Serial;
                        ci.Player.X         = player.X;
                        ci.Player.Y         = player.Y;
                        ci.Player.Z         = player.Z;
                        ci.Player.Direction = player.Direction;
                        ci.Player.Client    = client;
                    }
                    TreeViewUpdater.EditPlayerNode(client, ci.Player);
                }
            }