ReceiveEvent() public method

public ReceiveEvent ( VMChatEvent evt ) : void
evt VMChatEvent
return void
Beispiel #1
0
 private void SendMessage(string message)
 {
     if (GlobalSettings.Default.ChatOnlyEmoji && message != "")
     {
         message = GameFacade.Emojis.EmojiOnly(message);
         if (message == "")
         {
             HistoryDialog.ReceiveEvent
                 (new VMChatEvent(null, VMChatEventType.Generic,
                                  ":no_good_man: :keyboard: :no_entry_sign: :arrow_forward: :grinning: :ok_hand: "));
         }
     }
     message = message.Replace("\n", "");
     if (message != "" && Owner.ActiveEntity != null)
     {
         if (message[0] == '!')
         {
             Owner.Cheats.SubmitCommand(message);
         }
         else
         {
             if (message == "/trace")
             {
                 vm.UseSchedule = false;
                 vm.Trace       = new SimAntics.Engine.Debug.VMSyncTrace();
             }
             vm.SendCommand(new VMNetChatCmd
             {
                 ActorUID  = Owner.ActiveEntity.PersistID,
                 Message   = message,
                 ChannelID = (byte)ActiveChannel
             });
         }
     }
 }
Beispiel #2
0
 public void ReceiveEvent(VMChatEvent evt)
 {
     if (evt.Type == VMChatEventType.Arch)
     {
         PropertyLog.ReceiveEvent(evt);
     }
     else
     {
         HistoryDialog.ReceiveEvent(evt);
     }
 }
Beispiel #3
0
 public void ReceiveEvent(VMChatEvent evt)
 {
     if (evt.Type == VMChatEventType.Arch)
     {
         PropertyLog.ReceiveEvent(evt);
     }
     else
     {
         var myAvatar   = vm.GetAvatarByPersist(vm.MyUID);
         var myIgnoring = ((VMTSOAvatarState)myAvatar?.TSOState)?.IgnoredAvatars ?? new HashSet <uint>();
         if (!myIgnoring.Contains(evt.SenderUID))
         {
             HistoryDialog.ReceiveEvent(evt);
         }
     }
 }
Beispiel #4
0
 public void ReceiveEvent(VMChatEvent evt)
 {
     HistoryDialog.ReceiveEvent(evt);
 }