示例#1
0
        public MyObjectBuilder_GlobalChatItem GetObjectBuilder()
        {
            var objectBuilder = new MyObjectBuilder_GlobalChatItem();

            objectBuilder.Text = Text;
            objectBuilder.IdentityIdUniqueNumber = MyEntityIdentifier.GetIdUniqueNumber(IdentityId);

            return(objectBuilder);
        }
示例#2
0
        public MyObjectBuilder_PlayerChatItem GetObjectBuilder()
        {
            var objectBuilder = new MyObjectBuilder_PlayerChatItem();

            objectBuilder.Text = Text;
            objectBuilder.IdentityIdUniqueNumber = MyEntityIdentifier.GetIdUniqueNumber(IdentityId);
            objectBuilder.TimestampMs            = (long)Timestamp.TotalMilliseconds;
            objectBuilder.Sent = Sent;

            return(objectBuilder);
        }
示例#3
0
        public MyObjectBuilder_FactionChatItem GetObjectBuilder()
        {
            var objectBuilder = new MyObjectBuilder_FactionChatItem();

            objectBuilder.Text = Text;
            objectBuilder.IdentityIdUniqueNumber = MyEntityIdentifier.GetIdUniqueNumber(IdentityId);
            objectBuilder.TimestampMs            = (long)Timestamp.TotalMilliseconds;
            if (PlayersToSendTo != null)
            {
                objectBuilder.PlayersToSendToUniqueNumber = PlayersToSendTo.Keys.ToList();
                for (int i = 0; i < objectBuilder.PlayersToSendToUniqueNumber.Count; i++)
                {
                    objectBuilder.PlayersToSendToUniqueNumber[i] = MyEntityIdentifier.GetIdUniqueNumber(objectBuilder.PlayersToSendToUniqueNumber[i]);
                }
                objectBuilder.IsAlreadySentTo = PlayersToSendTo.Values.ToList();
            }
            return(objectBuilder);
        }
示例#4
0
        public MyObjectBuilder_GlobalChatItem GetObjectBuilder()
        {
            var objectBuilder = new MyObjectBuilder_GlobalChatItem();

            objectBuilder.Text = Text;
            objectBuilder.Font = AuthorFont;
            if (IdentityId == 0)
            {
                objectBuilder.IdentityIdUniqueNumber = 0;
                objectBuilder.Author = Author;
            }
            else
            {
                objectBuilder.IdentityIdUniqueNumber = MyEntityIdentifier.GetIdUniqueNumber(IdentityId);
                objectBuilder.Author = "";
            }

            return(objectBuilder);
        }