少年修仙传客户端代码仓库
hch
2025-03-03 28785d6ddf9c08e49527ede9405c7b6c93c6ed32
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
using System.Collections.Generic;
 
namespace vnxbqy.UI
{
    public class PhantasmPavilionChatBubbleHandler : IPhantasmPavilionTabHandler
    {
        PhantasmPavilionModel model { get { return ModelCenter.Instance.GetModel<PhantasmPavilionModel>(); } }
 
        public string GetDescriptive(int id)
        {
            return ChatBubbleBoxConfig.Get(id).Descriptive;
        }
 
        public int GetExpireMinutes(int id)
        {
            return ChatBubbleBoxConfig.Get(id).ExpireMinutes;
        }
 
        public string GetImage(int id)
        {
            return ChatBubbleBoxConfig.Get(id).Icon;
        }
 
        public string GetName(int id)
        {
            return ChatBubbleBoxConfig.Get(id).Name;
        }
 
        public int GetSortNum(int id)
        {
            return ChatBubbleBoxConfig.Get(id).SortNum;
        }
 
        public List<int> GetTableKeys()
        {
            return model.StringListToIntList(ChatBubbleBoxConfig.GetKeys());
        }
 
        public int GetUnlockDefault(int id)
        {
            return ChatBubbleBoxConfig.Get(id).UnlockDefault;
        }
 
        public bool Has(int id)
        {
            return ChatBubbleBoxConfig.Has(id);
        }
 
        public void SendStarUPPack(int id)
        {
            model.SendCA236ChatBubbleBoxStarUP(id);
        }
 
        public void SendUsePack(int id)
        {
            model.SendCA230SetChatBubbleBox(id);
        }
 
        public bool TryGetAddStarAttr(int id, int star, out int[] addStarAttrTypeArr, out int[] addStarAttrValueArr)
        {
            addStarAttrTypeArr = new int[0];
            addStarAttrValueArr = new int[0];
            if (!ChatBubbleBoxStarConfig.TryGetIndex(id, star, out int index) || !ChatBubbleBoxStarConfig.Has(index))
                return false;
            ChatBubbleBoxStarConfig config = ChatBubbleBoxStarConfig.Get(index);
            if (config.StarAttrType.IsNullOrEmpty() || config.StarAttrValue.IsNullOrEmpty() || config.StarAttrType.Length != config.StarAttrValue.Length)
                return false;
            addStarAttrTypeArr = config.StarAttrType;
            addStarAttrValueArr = config.StarAttrValue;
            return true;
        }
 
        public bool TryGetEffectID(int id, out int effectID)
        {
            effectID = 0;
            return false;
        }
 
        public bool TryGetMaxStarLV(int id, out int maxStarLV)
        {
            return ChatBubbleBoxStarConfig.TryGetMaxStarLV(id, out maxStarLV);
        }
 
        public bool TryGetStarUpNeedItem(int id, int star, out int itemId, out int count)
        {
            itemId = 0;
            count = 0;
            if (!ChatBubbleBoxStarConfig.TryGetIndex(id, star, out int index) || !ChatBubbleBoxStarConfig.Has(index))
                return false;
            ChatBubbleBoxStarConfig config = ChatBubbleBoxStarConfig.Get(index);
            if (config.StarUpNeedItemList.IsNullOrEmpty())
                return false;
            itemId = config.StarUpNeedItemList[0][0];
            count = config.StarUpNeedItemList[0][1];
            return true;
        }
 
        public bool TryGetUnLockAttr(int id, out int[] lightAttrTypeArr, out int[] lightAttrValueArr)
        {
            lightAttrTypeArr = new int[0];
            lightAttrValueArr = new int[0];
            if (!ChatBubbleBoxConfig.Has(id))
                return false;
            ChatBubbleBoxConfig config = ChatBubbleBoxConfig.Get(id);
            if (config.LightAttrType.IsNullOrEmpty() || config.LightAttrValue.IsNullOrEmpty() || config.LightAttrType.Length != config.LightAttrValue.Length)
                return false;
            lightAttrTypeArr = config.LightAttrType;
            lightAttrValueArr = config.LightAttrValue;
            return true;
        }
 
        public bool TryGetUnLockNeedItem(int id, out int itemId, out int count)
        {
            itemId = 0;
            count = 0;
            if (!ChatBubbleBoxConfig.Has(id))
                return false;
            ChatBubbleBoxConfig config = ChatBubbleBoxConfig.Get(id);
 
            if (config.UnlockNeedItemList.IsNullOrEmpty())
                return false;
            itemId = config.UnlockNeedItemList[0][0];
            count = config.UnlockNeedItemList[0][1];
            return true;
        }
    }
}