少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-24 d4b711bcc9a9e71c5835276f8ac5130329707da5
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
5个文件已修改
84 ■■■■■ 已修改文件
System/Chat/ChatCtrl.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatRecently.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FriendSystem/New/FriendTips.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FriendSystem/New/FriendsModel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/OperationLogCollect.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatCtrl.cs
@@ -206,9 +206,51 @@
        ClearAllChatInfo();
    }
    void ChatReport(ChatInfoType chatType, string content, string toPlayer)
    {
        try
        {
            var channelName = string.Empty;
            switch (chatType)
            {
                case ChatInfoType.World:
                    channelName = Language.Get("ChatType_World");
                    break;
                case ChatInfoType.Area:
                    channelName = Language.Get("ChatType_Area");
                    break;
                case ChatInfoType.Team:
                    channelName = Language.Get("ChatType_Team");
                    break;
                case ChatInfoType.Invite:
                    channelName = Language.Get("ChatType_Invite");
                    break;
                case ChatInfoType.Trumpet:
                    channelName = Language.Get("ChatType_Trumpet");
                    break;
                case ChatInfoType.Fairy:
                    channelName = Language.Get("ChatType_Fairy");
                    break;
                case ChatInfoType.Friend:
                    channelName = Language.Get("PlayerDetail_PrivateChat");
                    break;
                default:
                    return;
            }
            OperationLogCollect.Instance.ChatReport(content, channelName, toPlayer);
        }
        catch (Exception e)
        {
            DebugEx.Log(e.Message);
        }
    }
    public void SendChatInfo(ChatInfoType type, string msg, ChatExtraData? info = null)
    {
        bool _dirty = false;
        ChatReport(type, msg, PteChatName);
        if (!ChatCenter.s_VoiceRegex.IsMatch(msg))
        {
            _dirty = DirtyWordConfig.IsDirtWord(msg);
System/Chat/ChatRecently.cs
@@ -59,6 +59,17 @@
            if(_cell.index!= ChatCtrl.Inst.PteChatID)
            {
                ChatCtrl.Inst.PteChatID = _cell.index;
                var _dict = friendModel.GetFriendInfoDict((byte)GroupType.RecentContact);
                if (friendModel.tempFriendData != null
                    && ChatCtrl.Inst.PteChatID == friendModel.tempFriendData.PlayerID)
                {
                    ChatCtrl.Inst.PteChatName = friendModel.tempFriendData.PlayerName;
                }
                else
                {
                    ChatCtrl.Inst.PteChatName = _dict != null && _dict.ContainsKey((uint)ChatCtrl.Inst.PteChatID) ?
                                    _dict[(uint)ChatCtrl.Inst.PteChatID].PlayerName : string.Empty;
                }
                ChatCtrl.Inst.SelectRecentlyChat(ChatCtrl.Inst.PteChatID);
                m_RecentlyControl.m_Scorller.RefreshActiveCellViews();
            }
@@ -77,6 +88,7 @@
            if (friendModel.tempFriendData != null)
            {
                ChatCtrl.Inst.PteChatID = (int)friendModel.tempFriendData.PlayerID;
                ChatCtrl.Inst.PteChatName = friendModel.tempFriendData.PlayerName;
                ChatCtrl.Inst.SelectRecentlyChat(ChatCtrl.Inst.PteChatID);
                return;
            }
@@ -84,6 +96,7 @@
            if (_dict != null && _dict.Count > 0)
            {
                ChatCtrl.Inst.PteChatID = (int)_dict.Keys.First();
                ChatCtrl.Inst.PteChatName = _dict[(uint)ChatCtrl.Inst.PteChatID].PlayerName;
                ChatCtrl.Inst.SelectRecentlyChat(ChatCtrl.Inst.PteChatID);
            }
        }
System/FriendSystem/New/FriendTips.cs
@@ -116,6 +116,7 @@
                selectFriendObj.SetActive(false);
                unSelectFriendObj.SetActive(true);
                ChatCtrl.Inst.PteChatID = 0;
                ChatCtrl.Inst.PteChatName = string.Empty;
            }
        }
@@ -167,6 +168,7 @@
            selectPlayerId = playerId;
            typeCtrl.m_Scorller.RefreshActiveCellViews();
            ChatCtrl.Inst.PteChatID = playerId;
            ChatCtrl.Inst.PteChatName = playerName;
            speakOtherNameText.text = Language.Get("Friend107", UIHelper.ServerStringTrim(playerName));
            friendsModel.RemoveFriendRed(lookGroupType,playerId);
@@ -237,6 +239,7 @@
                    selectFriendObj.SetActive(true);
                    unSelectFriendObj.SetActive(false);
                    ChatCtrl.Inst.PteChatID = playerId;
                    ChatCtrl.Inst.PteChatName = playerName;
                    playerInfoCell.Init(playerId, groupType,playerId);
                    speakOtherNameText.text = Language.Get("Friend107", UIHelper.ServerStringTrim(playerName));
                });
System/FriendSystem/New/FriendsModel.cs
@@ -130,6 +130,7 @@
        ChatCtrl.Inst.PteChatID = (int)id;
        ChatCtrl.Inst.PteChatName = name;
        MapConfig mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
        string msg = StringUtility.Contact(Language.Get("KillOthersDes", mapConfig.Name, UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName)),ChatCtrl.KILL_IDENTIFY);
        ChatCtrl.Inst.SendChatInfo(ChatInfoType.Friend,msg);
Utility/OperationLogCollect.cs
@@ -130,4 +130,29 @@
    }
    const string chatReportUrl = "http://monitor.secondworld.net.cn:12000/chat_receiver";
    public void ChatReport(string content, string channelName, string toPlayer)
    {
#if !UNITY_EDITOR
        var tables = new Dictionary<string, string>();
        tables["ProductID"] = "snxxz";
        tables["OperatorID"] = VersionConfig.Get().appId;
        tables["OperatorName"] = string.Empty;
        tables["RegionName"] = StringUtility.Contact("s", ServerListCenter.Instance.currentServer.region_flag);
        tables["RegionID"] = ServerListCenter.Instance.currentServer.region_flag.ToString();
        tables["EventID"] = 9003.ToString();
        tables["Time"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        tables["IP"] = DeviceUtility.GetIp();
        tables["ChatChannel"] = channelName;
        tables["AccountID"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
        tables["RoleID"] = PlayerDatas.Instance.baseData.PlayerName;
        tables["ToRoleID"] = toPlayer;
        tables["Level"] = PlayerDatas.Instance.baseData.LV.ToString();
        tables["VIPLevel"] = PlayerDatas.Instance.baseData.VIPLv.ToString();
        tables["Content"] = content;
        HttpRequest.Instance.RequestHttpGet(StringUtility.Contact(chatReportUrl, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType);
#endif
    }
}