/// <summary>
        ///     Removes the <see cref="AvatarEntry"/> instance.
        /// </summary>
        public AvatarEntry RemoveAvatarEntry()
        {
            AvatarEntry tmp = this._entry;

            this._entry = null;
            return(tmp);
        }
Exemple #2
0
        /// <summary>
        ///     Called when a message is received.
        /// </summary>
        internal void ReceiveMessage(AvatarEntry entry, string message)
        {
            if (!string.IsNullOrWhiteSpace(message))
            {
                message = ServiceChat.Regex.Replace(message, " ");

                GlobalChatLineMessage globalChatLineMessage = new GlobalChatLineMessage();

                globalChatLineMessage.SetMessage(message);
                globalChatLineMessage.SetAvatarId(entry.GetAvatarId());
                globalChatLineMessage.SetHomeId(entry.GetHomeId());
                globalChatLineMessage.SetAvatarName(entry.GetAvatarName());
                globalChatLineMessage.SetAvatarExpLevel(entry.GetAvatarExpLevel());
                globalChatLineMessage.SetAvatarLeagueType(entry.GetAvatarLeagueType());

                if (entry.GetAllianceId() != null)
                {
                    globalChatLineMessage.SetAllianceId(entry.GetAllianceId());
                    globalChatLineMessage.SetAllianceName(entry.GetAllianceName());
                    globalChatLineMessage.SetAllianceBadgeId(entry.GetAllianceBadgeId());
                }

                globalChatLineMessage.Encode();

                for (int i = 0; i < this._sessions.Count; i++)
                {
                    this._sessions[i].SendPiranhaMessage(NetUtils.SERVICE_NODE_TYPE_PROXY_CONTAINER, globalChatLineMessage);
                }

                globalChatLineMessage.Destruct();
            }
        }
 /// <summary>
 ///     Destructs this instance.
 /// </summary>
 public override void Destruct()
 {
     base.Destruct();
     this._entry = null;
 }
 /// <summary>
 ///     Sets the <see cref="AvatarEntry"/> instance.
 /// </summary>
 public void SetAvatarEntry(AvatarEntry entry)
 {
     this._entry = entry;
 }
 /// <summary>
 ///     Decodes this instance.
 /// </summary>
 public override void Decode()
 {
     base.Decode();
     this._entry = new AvatarEntry();
     this._entry.Decode(this.Stream);
 }
Exemple #6
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="AvatarAccount"/> class.
 /// </summary>
 internal AvatarAccount()
 {
     this.Id          = new LogicLong();
     this.AvatarEntry = new AvatarEntry();
 }