wangguan
2020-10-22 7a007a8d1e7cd712fa4571efdbc3f2eba7a7e4d0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
using Protobuf;
using UnityEngine;
 
namespace KTGMGemClient
{
    public class CommonDebugHelper
    {
        public static void Debug(object str)
        {
            if (GameConfig.OpenDebug)
            {
                UnityEngine.Debug.Log(str);
            }
        }
 
        public static void DebugLong(string str)
        {
            if (GameConfig.OpenDebug)
            {
                UnityEngine.Debug.Log("************** " + str + " **************");
            }
        }
 
        public static void DebugError(string str)
        {
            if (GameConfig.OpenDebug)
            {
                UnityEngine.Debug.LogError(str);
            }
        }
 
        public static void DebugSocket(int Errorcode)
        {
            string log = "";
            ErrorCode code = (ErrorCode)Errorcode;
            if (GameConfig.OpenDebug)
            {
                switch (code)
                {
                    case ErrorCode.Success:
                        log = "成功";
                        UnityEngine.Debug.Log("成功");
                        break;
                    case ErrorCode.ChannelIdNoExist:
                        log = "**************   渠道ID不存在  **************";
                        UnityEngine.Debug.LogWarning("**************   渠道ID不存在  **************");
                        break;
                    case ErrorCode.UserNameInvalid:
                        log = "**************   账号名太短  **************";
                        UnityEngine.Debug.LogWarning("**************   账号名太短  **************");
                        break;
                    case ErrorCode.UserPassWordInvalid:
                        log = "**************   账号密码不正确  **************";
                        UnityEngine.Debug.LogWarning("**************   账号密码不正确  **************");
                        break;
                    case ErrorCode.UnknowError:
                        log = "**************   内部错误  **************";
                        UnityEngine.Debug.LogWarning("**************   内部错误  **************");
                        break;
                    case ErrorCode.InputInvalid:
                        log = "**************   参数错误  **************";
                        UnityEngine.Debug.LogWarning("**************   参数错误  **************");
                        break;
                    case ErrorCode.Timeout:
                        log = "**************   超时  **************";
                        UnityEngine.Debug.LogWarning("**************   超时  **************");
                        break;
                    case ErrorCode.SessionKeyInvalid:
                        log = "**************   登陆失败,SessionKey错误  **************";
                        UnityEngine.Debug.LogWarning("**************   登陆失败,SessionKey错误  **************");
                        break;
                    case ErrorCode.LoginNoUser:
                        log = "**************   没有角色,请创建  **************";
                        UnityEngine.Debug.LogWarning("**************   没有角色,请创建  **************");
                        break;
                    case ErrorCode.NotEnoughMoney:
                        log = "**************   金币不足  **************";
                        UnityEngine.Debug.LogWarning("**************   金币不足  **************");
                        break;
                    case ErrorCode.NotEnoughGold:
                        log = "**************   钻石不足  **************";
                        UnityEngine.Debug.LogWarning("**************   钻石不足  **************");
                        break;
                    case ErrorCode.NotEnoughGem:
                        log = "**************   宝石不足  **************";
                        UnityEngine.Debug.LogWarning("**************   宝石不足  **************");
                        break;
                    case ErrorCode.NotFoundFriend:
                        log = "**************   好友没有找到  **************";
                        UnityEngine.Debug.LogWarning("**************   好友没有找到  **************");
                        break;
                    case ErrorCode.AlreadyFriend:
                        log = "**************   已经是好友了  **************";
                        UnityEngine.Debug.LogWarning("**************   已经是好友了  **************");
                        break;
                    case ErrorCode.InBlockFriend:
                        log = "**************   黑名单不能添加好友  **************";
                        UnityEngine.Debug.LogWarning("**************   黑名单不能添加好友  **************");
                        break;
                    case ErrorCode.MaxFriend:
                        log = "**************   好友已经达到上限  **************";
                        UnityEngine.Debug.LogWarning("**************   好友已经达到上限  **************");
                        break;
                    case ErrorCode.MaxNickName:
                        log = "**************   昵称大于最大长度  **************";
                        UnityEngine.Debug.LogWarning("**************   昵称大于最大长度  **************");
                        break;
                    case ErrorCode.InvalidNickName:
                        log = "**************   昵称有非法字符  **************";
                        UnityEngine.Debug.LogWarning("**************   昵称有非法字符  **************");
                        break;
                    case ErrorCode.MaxStoreLimit:
                        log = "**************   !购买失败,超过最大限制  **************";
                        UnityEngine.Debug.LogWarning("**************   !购买失败,超过最大限制  **************");
                        break;
                    case ErrorCode.NotEnoughStoreBuy:
                        log = "**************   !购买失败,货币不足  **************";
                        UnityEngine.Debug.LogWarning("**************   !购买失败,货币不足  **************");
                        break;
                    case ErrorCode.NotOpenPassPort:
                        log = "**************   !高级通行证购买失败,活动未开启  **************";
                        UnityEngine.Debug.LogWarning("**************   !高级通行证购买失败,活动未开启  **************");
                        break;
                    case ErrorCode.AlreadyPassPort:
                        log = "**************   !高级通行证购买失败,已经购买了  **************";
                        UnityEngine.Debug.LogWarning("**************   !高级通行证购买失败,已经购买了  **************");
                        break;
                    case ErrorCode.NeedVipPassPortTakeItem:
                        log = "**************   !领取通行证奖励失败,不是高级通行证  **************";
                        UnityEngine.Debug.LogWarning("**************   !领取通行证奖励失败,不是高级通行证  **************");
                        break;
                    case ErrorCode.NeedLevelPassPortTakeItem:
                        log = "**************   !领取通行证奖励失败,等级不足  **************";
                        UnityEngine.Debug.LogWarning("**************   !领取通行证奖励失败,等级不足  **************");
                        break;
                    case ErrorCode.AlreadyPassPortTakeItem:
                        log = "**************   !领取通行证奖励失败,已经领取了  **************";
                        UnityEngine.Debug.LogWarning("**************   !领取通行证奖励失败,已经领取了  **************");
                        break;
                    case ErrorCode.InvalidPassPortBuyLevel:
                        log = "**************   !购买通行证等级失败,购买等级小于当前等级  **************";
                        UnityEngine.Debug.LogWarning("**************   !购买通行证等级失败,购买等级小于当前等级  **************");
                        break;
                    case ErrorCode.HasUnlockArenaBox:
                        log = "**************   ! 解锁失败,已经解锁了 **************";
                        UnityEngine.Debug.LogWarning("**************   ! 解锁失败,已经解锁了  **************");
                        break;
                    case ErrorCode.OtherUnlockingArenaBox:
                        log = "**************   ! 解锁失败,另一个在解锁中 **************";
                        UnityEngine.Debug.LogWarning("**************   ! 解锁失败,另一个在解锁中  **************");
                        break;
                    case ErrorCode.NotTimeTakeArenaBox:
                        log = "**************   ! 开宝箱失败,时间没到 **************";
                        UnityEngine.Debug.LogWarning("**************   ! 开宝箱失败,时间没到  **************");
                        break;
                }
                //UIManager.Instance.ShowWarningWind(log);
 
            }
        }
    }
}