Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | 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);
|
| | |
| | | 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();
|
| | | }
|
| | |
| | | if (friendModel.tempFriendData != null)
|
| | | {
|
| | | ChatCtrl.Inst.PteChatID = (int)friendModel.tempFriendData.PlayerID;
|
| | | ChatCtrl.Inst.PteChatName = friendModel.tempFriendData.PlayerName;
|
| | | ChatCtrl.Inst.SelectRecentlyChat(ChatCtrl.Inst.PteChatID);
|
| | | return;
|
| | | }
|
| | |
| | | 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);
|
| | | }
|
| | | }
|
| | |
| | | selectFriendObj.SetActive(false);
|
| | | unSelectFriendObj.SetActive(true);
|
| | | ChatCtrl.Inst.PteChatID = 0;
|
| | | ChatCtrl.Inst.PteChatName = string.Empty;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | 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);
|
| | |
| | | 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));
|
| | | });
|
| | |
| | |
|
| | |
|
| | | 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);
|
| | |
| | |
|
| | | }
|
| | |
|
| | | 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
|
| | | }
|
| | |
|
| | | }
|