Пример #1
0
 private void OnWhisper(BnetWhisper whisper, object userData)
 {
     if ((this.m_receiver != null) && whisper.IsSpeaker(this.m_receiver))
     {
         this.UpdateReceiver();
     }
 }
    private void AddWhisperMessage(BnetWhisper whisper)
    {
        string message = ChatUtils.GetMessage(whisper);
        MobileChatLogMessageFrame prefab = !whisper.IsSpeaker(this.receiver) ? this.prefabs.myMessage : this.prefabs.theirMessage;
        MobileChatLogMessageFrame item   = this.CreateMessage(prefab, message);

        this.messageFrames.Add(item);
    }
Пример #3
0
    private BnetWhisper FindLastWhisperFromReceiver()
    {
        List <BnetWhisper> whispersWithPlayer = BnetWhisperMgr.Get().GetWhispersWithPlayer(this.m_receiver);

        if (whispersWithPlayer != null)
        {
            for (int i = whispersWithPlayer.Count - 1; i >= 0; i--)
            {
                BnetWhisper whisper = whispersWithPlayer[i];
                if (whisper.IsSpeaker(this.m_receiver))
                {
                    return(whisper);
                }
            }
        }
        return(null);
    }