少年修仙传客户端代码仓库
lwb
2021-02-25 0d7482d5a0e8bf082abfb4b5bfbfee03597cdc3a
Utility/LanguageVerify.cs
@@ -1,28 +1,28 @@
using Snxxz.UI;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using UnityEngine;
[XLua.LuaCallCSharp]
using UnityEngine;
public class LanguageVerify : Singleton<LanguageVerify>
{
    const string Sercret = "c345a165b566d1c421afd8a748373d7f";
{
    const string Sercret = "c345a165b566d1c421afd8a748373d7f";
    bool requireVerify
    {
        get
        {
            return VersionUtility.Instance.IsMaoErGame();
        }
    }
    static StringBuilder sb = new StringBuilder();
    const string VerifyPlayerNameUrl = "https://api.maoergame.com/game/role/response";
    }
    static StringBuilder sb = new StringBuilder();
    const string VerifyPlayerNameUrl = "https://api.maoergame.com/game/role/response";
    /// <summary>
    /// 校验玩家名
    /// </summary>
@@ -31,7 +31,7 @@
    /// <param name="playerName">原来的角色名,创角传空</param>
    /// <param name="level">玩家等级</param>
    /// <param name="vipLv">玩家VIP等级</param>
    /// <param name="callback"></param>
    /// <param name="callback"></param>
    public void VerifyPlayerName(string verifyName, int playerId, string playerName, int level, int vipLv, Action<bool, string> callback)
    {
        if (!requireVerify)
@@ -79,9 +79,9 @@
                   }
                   NetLinkWin.Hide();
               });
    }
    const string VerifyFairyUrl = "https://api.maoergame.com/game/sociaty/response";
    }
    const string VerifyFairyUrl = "https://api.maoergame.com/game/sociaty/response";
    public void VerifyFairy(string verifyContent, int op_type, string fairyName, int title, Action<bool, string> callback)
    {
        if (!requireVerify)
@@ -143,12 +143,12 @@
                    }
                }
            });
    }
    public static uint toPlayer = 0;
    public static string toPlayerName = string.Empty;
    public static int toPlayerLevel = 0;
    const string VerifyChatUrl = "https://api.maoergame.com/game/chat/response";
    }
    public static uint toPlayer = 0;
    public static string toPlayerName = string.Empty;
    public static int toPlayerLevel = 0;
    const string VerifyChatUrl = "https://api.maoergame.com/game/chat/response";
    public void VerifyChat(string content, ChatInfoType channelType, Action<bool, string> callback)
    {
        int channel = 0;
@@ -228,19 +228,19 @@
                    }
                }
            });
    }
    }
    Dictionary<long, List<string>> transferContents = new Dictionary<long, List<string>>();
    Dictionary<long, List<int>> splitContents = new Dictionary<long, List<int>>();
    List<MatchString> matchs = new List<MatchString>();
    List<MatchString> matchs = new List<MatchString>();
    struct MatchString
    {
        public int index;
        public string value;
    }
    }
    void AddMathcs(MatchCollection _matchs)
    {
        if (_matchs.Count == 0)
@@ -255,8 +255,8 @@
                value = match.Value,
            });
        }
    }
    }
    string TransferContent(long tick, string content)
    {
        List<string> list;
@@ -305,8 +305,8 @@
        content = ChatCtrl.KillRegex.Replace(content, string.Empty);
        content = ChatCenter.s_VoiceRegex.Replace(content, string.Empty);
        return content;
    }
    }
    string DisTransfer(long tick, string content)
    {
        List<string> list;
@@ -334,8 +334,8 @@
        transferContents.Remove(tick);
        splitContents.Remove(tick);
        return sb.ToString();
    }
    }
    bool IsSystemChat(string content)
    {
        if (ChatCtrl.InviteRegex.IsMatch(content)
@@ -344,8 +344,8 @@
            return true;
        }
        return false;
    }
    }
    bool GetChannel(ChatInfoType type, out int channel)
    {
        channel = 0;
@@ -372,8 +372,8 @@
                return false;
        }
        return true;
    }
    }
    bool IsFairyFeast(ChatInfoType type)
    {
        var dailyQuestModel = ModelCenter.Instance.GetModel<DailyQuestModel>();
@@ -383,7 +383,7 @@
            return type == ChatInfoType.Fairy && dailyQuestOpenTime.InOpenTime();
        }
        return false;
    }
    }
    public class VerifyResponse
    {
@@ -391,4 +391,4 @@
        public int code;
        public string content;
    }
}
}