Ejemplo n.º 1
0
        public void RequestSendChat(ChatRule.CHAT_CHANNEL _eChannel, AudioClip _audio, int samplePos, long privateUid, string privateName)
        {
            var msg = NewChatMessage(_eChannel, string.Empty);
            var ht  = Johny.HashtablePool.Claim();

            ht.Add("name", msg.name);
            ht.Add("uid", msg.uid);
            ht.Add("level", msg.level);
            ht.Add("vip_level", msg.vipLevel);
            ht.Add("head_icon", msg.icon);
            ht.Add("head_frame", msg.frame);
            ht.Add("quality", msg.quality);
            ht.Add("battle_rating", msg.battleRating);
            ht.Add("alliance_name", msg.allianceName);
            ht.Add("private_uid", privateUid);
            ht.Add("private_name", privateName);
            ht.Add("month_vip_type", msg.monthVipType);
            ht.Add("worldId", LoginManager.Instance.LocalUser.WorldId);
            ht.Add("server_name", LoginManager.Instance.GetDefaultGameWorld(LoginManager.Instance.LocalUser.WorldId).Name);

            SparxHub.Instance.ChatManager.SendAudio(msg.channel, _audio, samplePos, ht,
                                                    delegate(string error, object param)
            {
                if (!string.IsNullOrEmpty(error))
                {
                    //eResponseCodeUIExtensions.ShowErrorDialogue(EB.Localizer.GetString("ID_SPARX_NETWORK_ERROR"));
                    EB.Debug.LogError("RequestSendChat:{0}", error);
                }
            });
            TaskSystem.RequestChatTaskFinish(_eChannel);
        }
Ejemplo n.º 2
0
        public void RequestSendChat(ChatRule.CHAT_CHANNEL _eChannel, string _content)
        {
            var msg = NewChatMessage(_eChannel, _content);
            var ht  = Johny.HashtablePool.Claim();

            ht.Add("name", msg.name);
            ht.Add("uid", msg.uid);
            ht.Add("level", msg.level);
            ht.Add("vip_level", msg.vipLevel);
            ht.Add("head_icon", msg.icon);
            ht.Add("head_frame", msg.frame);
            ht.Add("quality", msg.quality);
            ht.Add("battle_rating", msg.battleRating);
            ht.Add("alliance_name", msg.allianceName);
            ht.Add("month_vip_type", msg.monthVipType);
            ht.Add("worldId", LoginManager.Instance.LocalUser.WorldId);
            ht.Add("server_name", LoginManager.Instance.GetDefaultGameWorld(LoginManager.Instance.LocalUser.WorldId).Name);

            SparxHub.Instance.ChatManager.SendText(msg.channel, msg.text, ht,
                                                   delegate(string error, object param)
            {
                if (!string.IsNullOrEmpty(error))
                {
                    EB.Debug.LogError("RequestSendChat:{0}", error);
                }
            });
            TaskSystem.RequestChatTaskFinish(_eChannel);
        }