Port native AVA2 itemshop with transactional purchases and verified catalogue

This commit is contained in:
shen
2026-10-19 07:08:51 -07:00
parent abda2c1cda
commit 32831010c0
21 changed files with 2676 additions and 8 deletions
File diff suppressed because it is too large Load Diff
+217
View File
@@ -0,0 +1,217 @@
1 3 0 71500 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
2 3 0 71501 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
3 3 0 71502 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
4 3 0 71503 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
5 3 0 71504 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
6 3 0 71505 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 7 0 0 -1
7 3 0 71506 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
8 3 0 71507 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
9 3 0 71508 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
10 3 0 71509 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
11 3 0 71510 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
12 3 0 71511 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
13 3 2 53002 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
14 3 2 53003 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
15 3 2 53004 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
16 3 2 53005 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
17 3 2 53006 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
18 3 2 53007 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
19 3 2 53008 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
20 3 2 53009 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
21 3 2 53010 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 9 0 0 -1
22 3 2 53011 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
23 3 2 53012 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
24 3 2 53013 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
25 7 0 54706 69 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
26 7 0 54707 69 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
27 7 0 54708 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 38 0 0 -1
28 7 0 54709 69 0 0000-00-00 00:00:00 0000-00-00 00:00:00 65 0 0 -1
29 7 0 54710 49 0 0000-00-00 00:00:00 0000-00-00 00:00:00 29 0 0 -1
30 7 0 54711 39 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
31 3 1 55402 140 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
32 3 1 55405 140 0 0000-00-00 00:00:00 0000-00-00 00:00:00 7 0 0 -1
33 3 1 55407 140 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
34 1 0 55001 15 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
35 1 0 55036 20 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
36 1 0 55034 39 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
37 1 0 55033 90 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
38 1 0 55009 10 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
39 4 0 25163 2 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
40 4 0 25164 4 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
41 4 0 25165 5 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
42 4 0 25166 6 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
43 4 0 25167 8 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
44 4 0 25168 8 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
45 4 0 25169 10 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
48 1 0 71035 4 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
49 1 0 30250 10 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
50 1 0 70028 90 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
51 2 1 41119 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
52 2 1 41120 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
53 2 1 41121 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
54 2 1 41122 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
55 2 2 45005 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
56 2 2 45006 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
57 2 2 45057 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
58 2 2 45058 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
59 2 0 40129 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
60 2 0 40130 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
61 2 0 40131 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
62 2 0 40132 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
63 2 0 40133 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
64 2 0 40134 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
65 2 0 40445 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 13 0 0 -1
66 2 0 40446 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
67 2 0 40447 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
68 2 0 40448 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
69 2 0 40449 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
70 2 0 40450 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
71 1 0 72319 4 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
72 1 0 72320 2 0 0000-00-00 00:00:00 0000-00-00 00:00:00 7 0 0 -1
73 1 0 53998 39 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
74 1 0 53999 69 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
75 6 0 71097 39 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
76 1 0 85009 40 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
77 1 0 71153 19 0 0000-00-00 00:00:00 0000-00-00 00:00:00 48 0 0 -1
78 5 1 54003 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 9 0 0 -1
79 5 1 54006 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
80 5 1 54009 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
81 5 1 54012 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
82 5 1 54015 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
83 5 1 54018 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
84 5 1 54021 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
85 5 1 54024 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 7 0 0 -1
86 5 1 54027 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
87 5 2 54030 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
88 5 2 54033 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
89 5 2 54036 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
90 5 2 54039 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
91 5 2 54042 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
92 5 2 54045 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
93 5 2 54048 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
94 5 2 54051 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
95 5 2 54054 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
96 5 2 54057 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
97 5 2 54060 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
98 5 2 54063 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
99 5 2 54066 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
100 5 2 54069 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
101 5 2 54072 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
102 5 2 54075 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
103 5 2 54078 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
104 5 0 54081 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
105 5 0 54084 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
106 5 0 54087 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
107 5 0 54090 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
108 5 0 54093 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
109 5 0 54096 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
110 5 0 54099 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
111 5 0 54102 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
112 5 0 54105 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
113 5 0 54108 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
114 5 0 54111 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
115 5 0 54114 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 17 0 0 -1
116 5 0 54117 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 33 0 0 -1
117 5 0 54120 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
118 5 0 54123 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 27 0 0 -1
123 0 1 54712 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
124 0 1 54713 120 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
125 0 1 54714 549 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
126 0 1 54715 49 0 0000-00-00 00:00:00 0000-00-00 00:00:00 19 0 0 -1
127 0 1 54716 79 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
128 0 1 54717 159 0 0000-00-00 00:00:00 0000-00-00 00:00:00 13 0 0 -1
129 2 3 86004 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
130 2 3 86008 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
131 2 3 86014 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
132 2 3 86018 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
133 2 3 86024 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
134 2 3 86028 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
135 2 3 86034 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
136 2 3 86038 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
137 2 3 86044 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
138 2 3 86048 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
139 2 3 86054 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
140 2 3 86058 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
141 1 0 71221 39 0 2022-05-27 23:59:00 0000-00-00 00:00:00 0 0 0 -1
142 1 0 55008 49 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
143 1 0 55035 9 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
144 6 0 100001 9 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
145 6 0 100002 17 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
146 6 0 77913 69 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
147 6 0 77914 299 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
148 6 0 77915 549 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
149 6 0 100500 4 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
150 1 0 6884 8 0 0000-00-00 00:00:00 0000-00-00 00:00:00 534 0 0 -1
153 1 0 70043 10 0 0000-00-00 00:00:00 0000-00-00 00:00:00 39 0 0 -1
154 1 0 72067 5 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
155 1 0 72068 49 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
170 1 0 70002 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
171 2 4 71233 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
172 2 4 71234 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
173 2 4 71235 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
174 2 4 71236 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
175 2 4 71249 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
176 2 4 71248 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
177 2 4 71254 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
178 2 4 71255 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
179 2 4 71246 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
180 2 4 71247 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
181 2 4 71252 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
182 2 4 71253 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
183 5 3 54126 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
184 5 3 54129 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
185 5 3 54132 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
186 5 3 54135 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
187 5 3 54138 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
188 5 3 54141 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
189 5 3 54144 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
190 5 3 54147 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
191 5 3 54150 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
192 5 3 54153 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
193 5 3 54156 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 13 0 0 -1
194 5 3 54159 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 16 0 0 -1
195 5 3 54162 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 19 0 0 -1
197 5 3 54168 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
198 5 3 54171 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
199 5 3 54174 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
200 0 2 71230 149 0 2022-09-30 23:59:00 0000-00-00 00:00:00 7 0 0 -1
201 0 2 55406 149 0 2022-09-30 23:59:00 0000-00-00 00:00:00 8 0 0 -1
202 5 4 54177 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
203 5 4 54180 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
204 5 4 54183 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 13 0 0 -1
205 5 4 54186 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
206 5 4 54189 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
207 5 4 54192 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
208 5 4 54195 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
209 5 4 54198 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
210 5 4 54201 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
211 5 4 54204 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
212 5 4 54207 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
213 5 4 54210 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
214 5 4 54213 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
215 5 4 54216 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 10 0 0 -1
216 5 4 54219 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
217 5 5 54222 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
218 5 5 54225 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
219 5 5 54228 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
220 5 5 54231 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
221 5 5 54234 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
222 5 5 54237 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
223 5 5 54240 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
224 5 5 54243 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
225 5 5 54246 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
226 5 5 54249 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
227 5 5 54252 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
228 5 5 54255 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
229 5 5 54258 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
230 5 5 54261 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
231 5 5 54264 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
232 5 5 54267 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
233 1 0 39063 19 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
234 1 0 39064 19 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
235 1 0 71136 29 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
236 0 0 25159 149 0 2022-10-25 23:59:59 0000-00-00 00:00:00 0 0 0 -1
237 0 0 20059 149 0 2022-10-31 23:59:59 0000-00-00 00:00:00 0 0 0 -1
240 1 0 77921 1 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
241 1 0 77922 2 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
242 1 0 77923 5 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
1 1 3 0 71500 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
2 2 3 0 71501 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
3 3 3 0 71502 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
4 4 3 0 71503 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
5 5 3 0 71504 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
6 6 3 0 71505 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 7 0 0 -1
7 7 3 0 71506 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
8 8 3 0 71507 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
9 9 3 0 71508 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
10 10 3 0 71509 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
11 11 3 0 71510 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
12 12 3 0 71511 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
13 13 3 2 53002 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
14 14 3 2 53003 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
15 15 3 2 53004 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
16 16 3 2 53005 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
17 17 3 2 53006 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
18 18 3 2 53007 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
19 19 3 2 53008 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
20 20 3 2 53009 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
21 21 3 2 53010 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 9 0 0 -1
22 22 3 2 53011 75 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
23 23 3 2 53012 149 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
24 24 3 2 53013 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
25 25 7 0 54706 69 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
26 26 7 0 54707 69 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
27 27 7 0 54708 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 38 0 0 -1
28 28 7 0 54709 69 0 0000-00-00 00:00:00 0000-00-00 00:00:00 65 0 0 -1
29 29 7 0 54710 49 0 0000-00-00 00:00:00 0000-00-00 00:00:00 29 0 0 -1
30 30 7 0 54711 39 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
31 31 3 1 55402 140 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
32 32 3 1 55405 140 0 0000-00-00 00:00:00 0000-00-00 00:00:00 7 0 0 -1
33 33 3 1 55407 140 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
34 34 1 0 55001 15 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
35 35 1 0 55036 20 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
36 36 1 0 55034 39 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
37 37 1 0 55033 90 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
38 38 1 0 55009 10 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
39 39 4 0 25163 2 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
40 40 4 0 25164 4 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
41 41 4 0 25165 5 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
42 42 4 0 25166 6 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
43 43 4 0 25167 8 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
44 44 4 0 25168 8 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
45 45 4 0 25169 10 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
46 48 1 0 71035 4 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
47 49 1 0 30250 10 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
48 50 1 0 70028 90 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
49 51 2 1 41119 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
50 52 2 1 41120 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
51 53 2 1 41121 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
52 54 2 1 41122 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
53 55 2 2 45005 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
54 56 2 2 45006 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
55 57 2 2 45057 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
56 58 2 2 45058 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
57 59 2 0 40129 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
58 60 2 0 40130 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
59 61 2 0 40131 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
60 62 2 0 40132 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
61 63 2 0 40133 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
62 64 2 0 40134 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
63 65 2 0 40445 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 13 0 0 -1
64 66 2 0 40446 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
65 67 2 0 40447 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
66 68 2 0 40448 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
67 69 2 0 40449 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
68 70 2 0 40450 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
69 71 1 0 72319 4 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
70 72 1 0 72320 2 0 0000-00-00 00:00:00 0000-00-00 00:00:00 7 0 0 -1
71 73 1 0 53998 39 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
72 74 1 0 53999 69 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
73 75 6 0 71097 39 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
74 76 1 0 85009 40 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
75 77 1 0 71153 19 0 0000-00-00 00:00:00 0000-00-00 00:00:00 48 0 0 -1
76 78 5 1 54003 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 9 0 0 -1
77 79 5 1 54006 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
78 80 5 1 54009 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
79 81 5 1 54012 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
80 82 5 1 54015 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
81 83 5 1 54018 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
82 84 5 1 54021 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
83 85 5 1 54024 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 7 0 0 -1
84 86 5 1 54027 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
85 87 5 2 54030 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
86 88 5 2 54033 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
87 89 5 2 54036 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
88 90 5 2 54039 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
89 91 5 2 54042 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
90 92 5 2 54045 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
91 93 5 2 54048 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
92 94 5 2 54051 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
93 95 5 2 54054 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
94 96 5 2 54057 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
95 97 5 2 54060 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
96 98 5 2 54063 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
97 99 5 2 54066 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
98 100 5 2 54069 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
99 101 5 2 54072 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
100 102 5 2 54075 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
101 103 5 2 54078 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
102 104 5 0 54081 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
103 105 5 0 54084 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
104 106 5 0 54087 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
105 107 5 0 54090 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
106 108 5 0 54093 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
107 109 5 0 54096 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
108 110 5 0 54099 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
109 111 5 0 54102 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
110 112 5 0 54105 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
111 113 5 0 54108 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
112 114 5 0 54111 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
113 115 5 0 54114 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 17 0 0 -1
114 116 5 0 54117 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 33 0 0 -1
115 117 5 0 54120 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
116 118 5 0 54123 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 27 0 0 -1
117 123 0 1 54712 349 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
118 124 0 1 54713 120 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
119 125 0 1 54714 549 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
120 126 0 1 54715 49 0 0000-00-00 00:00:00 0000-00-00 00:00:00 19 0 0 -1
121 127 0 1 54716 79 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
122 128 0 1 54717 159 0 0000-00-00 00:00:00 0000-00-00 00:00:00 13 0 0 -1
123 129 2 3 86004 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
124 130 2 3 86008 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
125 131 2 3 86014 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
126 132 2 3 86018 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
127 133 2 3 86024 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
128 134 2 3 86028 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
129 135 2 3 86034 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
130 136 2 3 86038 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
131 137 2 3 86044 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
132 138 2 3 86048 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
133 139 2 3 86054 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
134 140 2 3 86058 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
135 141 1 0 71221 39 0 2022-05-27 23:59:00 0000-00-00 00:00:00 0 0 0 -1
136 142 1 0 55008 49 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
137 143 1 0 55035 9 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
138 144 6 0 100001 9 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
139 145 6 0 100002 17 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
140 146 6 0 77913 69 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
141 147 6 0 77914 299 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
142 148 6 0 77915 549 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
143 149 6 0 100500 4 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
144 150 1 0 6884 8 0 0000-00-00 00:00:00 0000-00-00 00:00:00 534 0 0 -1
145 153 1 0 70043 10 0 0000-00-00 00:00:00 0000-00-00 00:00:00 39 0 0 -1
146 154 1 0 72067 5 0 0000-00-00 00:00:00 0000-00-00 00:00:00 6 0 0 -1
147 155 1 0 72068 49 0 0000-00-00 00:00:00 0000-00-00 00:00:00 5 0 0 -1
148 170 1 0 70002 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
149 171 2 4 71233 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
150 172 2 4 71234 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
151 173 2 4 71235 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
152 174 2 4 71236 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
153 175 2 4 71249 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
154 176 2 4 71248 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
155 177 2 4 71254 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
156 178 2 4 71255 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
157 179 2 4 71246 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
158 180 2 4 71247 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
159 181 2 4 71252 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
160 182 2 4 71253 99 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
161 183 5 3 54126 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
162 184 5 3 54129 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
163 185 5 3 54132 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
164 186 5 3 54135 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
165 187 5 3 54138 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
166 188 5 3 54141 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
167 189 5 3 54144 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
168 190 5 3 54147 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
169 191 5 3 54150 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
170 192 5 3 54153 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
171 193 5 3 54156 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 13 0 0 -1
172 194 5 3 54159 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 16 0 0 -1
173 195 5 3 54162 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 19 0 0 -1
174 197 5 3 54168 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
175 198 5 3 54171 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
176 199 5 3 54174 60 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
177 200 0 2 71230 149 0 2022-09-30 23:59:00 0000-00-00 00:00:00 7 0 0 -1
178 201 0 2 55406 149 0 2022-09-30 23:59:00 0000-00-00 00:00:00 8 0 0 -1
179 202 5 4 54177 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
180 203 5 4 54180 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 11 0 0 -1
181 204 5 4 54183 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 13 0 0 -1
182 205 5 4 54186 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
183 206 5 4 54189 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
184 207 5 4 54192 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
185 208 5 4 54195 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
186 209 5 4 54198 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
187 210 5 4 54201 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
188 211 5 4 54204 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
189 212 5 4 54207 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
190 213 5 4 54210 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
191 214 5 4 54213 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
192 215 5 4 54216 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 10 0 0 -1
193 216 5 4 54219 50 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
194 217 5 5 54222 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
195 218 5 5 54225 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
196 219 5 5 54228 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4 0 0 -1
197 220 5 5 54231 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
198 221 5 5 54234 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
199 222 5 5 54237 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
200 223 5 5 54240 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
201 224 5 5 54243 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 0 0 -1
202 225 5 5 54246 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
203 226 5 5 54249 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
204 227 5 5 54252 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 3 0 0 -1
205 228 5 5 54255 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
206 229 5 5 54258 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
207 230 5 5 54261 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
208 231 5 5 54264 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
209 232 5 5 54267 45 0 0000-00-00 00:00:00 0000-00-00 00:00:00 2 0 0 -1
210 233 1 0 39063 19 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
211 234 1 0 39064 19 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
212 235 1 0 71136 29 0 0000-00-00 00:00:00 0000-00-00 00:00:00 12 0 0 -1
213 236 0 0 25159 149 0 2022-10-25 23:59:59 0000-00-00 00:00:00 0 0 0 -1
214 237 0 0 20059 149 0 2022-10-31 23:59:59 0000-00-00 00:00:00 0 0 0 -1
215 240 1 0 77921 1 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
216 241 1 0 77922 2 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
217 242 1 0 77923 5 0 0000-00-00 00:00:00 0000-00-00 00:00:00 0 0 0 -1
+8
View File
@@ -0,0 +1,8 @@
{
"source_archive": "AVA2/2. Backup SF+SRC and SQL/MYSQL56.tgz",
"archive_sha256": "0a578f4036fff69c36d0ad0d4d6692d267284be10689105a173ac30337ec0787",
"source_table": "player.ishop_data",
"format": "native MyISAM recovered in isolated reference schema; sorted by id; dates preserved",
"rows": 217,
"tsv_sha256": "7e2fc0ccb630168b0466d097eaa9b41858df1ea0e67ab7b7fad2ba17fc975276"
}
+300
View File
@@ -0,0 +1,300 @@
{
"count": 49,
"scope": "Existing implemented item systems only. Does not authorize production deployment.",
"products": [
{
"id": 3,
"vnum": 71502,
"original_price": 349,
"basis": "ported mount costume and mount skin; game/src/port_mount.cpp, client MountScript and staged model resources"
},
{
"id": 6,
"vnum": 71505,
"original_price": 349,
"basis": "ported mount costume and mount skin; game/src/port_mount.cpp, client MountScript and staged model resources"
},
{
"id": 9,
"vnum": 71508,
"original_price": 349,
"basis": "ported mount costume and mount skin; game/src/port_mount.cpp, client MountScript and staged model resources"
},
{
"id": 12,
"vnum": 71511,
"original_price": 349,
"basis": "ported mount costume and mount skin; game/src/port_mount.cpp, client MountScript and staged model resources"
},
{
"id": 78,
"vnum": 54003,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 79,
"vnum": 54006,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 80,
"vnum": 54009,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 81,
"vnum": 54012,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 82,
"vnum": 54015,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 83,
"vnum": 54018,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 84,
"vnum": 54021,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 85,
"vnum": 54024,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 86,
"vnum": 54027,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 87,
"vnum": 54030,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 88,
"vnum": 54033,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 89,
"vnum": 54036,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 90,
"vnum": 54039,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 91,
"vnum": 54042,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 92,
"vnum": 54045,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 93,
"vnum": 54048,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 94,
"vnum": 54051,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 95,
"vnum": 54054,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 96,
"vnum": 54057,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 97,
"vnum": 54060,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 98,
"vnum": 54063,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 99,
"vnum": 54066,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 100,
"vnum": 54069,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 101,
"vnum": 54072,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 102,
"vnum": 54075,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 103,
"vnum": 54078,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 170,
"vnum": 70002,
"original_price": 99,
"basis": "AVA2 third-hand pickup status; docs/AVA2-CHEST-PICKUP.md in metin2-client"
},
{
"id": 172,
"vnum": 71234,
"original_price": 99,
"basis": "ported mount costume and mount skin; game/src/port_mount.cpp, client MountScript and staged model resources"
},
{
"id": 177,
"vnum": 71254,
"original_price": 99,
"basis": "ported mount costume and mount skin; game/src/port_mount.cpp, client MountScript and staged model resources"
},
{
"id": 183,
"vnum": 54126,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 184,
"vnum": 54129,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 185,
"vnum": 54132,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 186,
"vnum": 54135,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 187,
"vnum": 54138,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 188,
"vnum": 54141,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 189,
"vnum": 54144,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 190,
"vnum": 54147,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 191,
"vnum": 54150,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 192,
"vnum": 54153,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 193,
"vnum": 54156,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 194,
"vnum": 54159,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 195,
"vnum": 54162,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 197,
"vnum": 54168,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 198,
"vnum": 54171,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
},
{
"id": 199,
"vnum": 54174,
"original_price": 60,
"basis": "ported body/hair/mount-skin fixed enchants; game/src/port_costume_attr.cpp and make_items.ENCHANT_KEEP"
}
]
}
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include <stdint.h>
#pragma pack(push,1)
struct Ava2ShopRequest {
uint8_t operation; uint32_t account,player,product,count,expectedVnum; int64_t expectedTotal; char token[33],name[25],ip[16];
};
struct Ava2ShopReply { uint32_t account,player,size; };
struct Ava2ShopProduct {
uint32_t id,vnum; int64_t price; int32_t top; uint8_t discount;
int32_t expiry,added; int64_t sold; int32_t weekly,monthly,stock;
};
struct Ava2ShopLog {
uint32_t account; char name[25],date[21]; int32_t time; char ip[16];
uint32_t product,vnum; int32_t count; int64_t price;
};
#pragma pack(pop)
static_assert(sizeof(Ava2ShopRequest)==103,"itemshop request");
static_assert(sizeof(Ava2ShopProduct)==49,"native TIShopData");
static_assert(sizeof(Ava2ShopLog)==90,"native TIShopLogData");
inline bool Ava2ShopTotal(int64_t unit,uint32_t count,uint8_t discount,int64_t& total) {
if(unit<0 || unit>1000000000000LL || count<1 || count>20 || discount>100)return false;
total=unit*int64_t(count)*(100-discount)/100;return true;
}
+162
View File
@@ -0,0 +1,162 @@
// AVA2 GC93 catalogue with transactional, replay-safe purchases.
#include "stdafx.h"
#include "ClientManager.h"
#include "Config.h"
#include "DBManager.h"
#include "ItemAwardManager.h"
#include "../../common/ava2_itemshop.h"
#include <memory>
#include <sstream>
#include <cctype>
#include <algorithm>
namespace {
using Query=std::unique_ptr<SQLMsg>;
Query query(const std::string& sql) { return Query(CDBManager::instance().DirectQuery(sql.c_str(),SQL_PLAYER)); }
bool ok(const Query& q) { return q && !q->uiSQLErrno && q->Get(); }
bool run(const std::string& sql) { auto q=query(sql);return ok(q); }
std::string decimal(uint64_t n) { return std::to_string(n); }
std::string escape(const char* text) { char out[513];size_t n=strnlen(text,255);CDBManager::instance().EscapeString(out,text,n);return std::string(out); }
std::string accountDB() {
char a[257]={},p[257]={};
if (!CConfig::instance().GetValue("SQL_ACCOUNT",a,256) || !CConfig::instance().GetValue("SQL_PLAYER",p,256)) return "";
std::string ah,ad,au,ap,ph,pd,pu,pp;int aport=3306,pport=3306;
std::istringstream as(a),ps(p);as>>ah>>ad>>au>>ap>>aport;ps>>ph>>pd>>pu>>pp>>pport;
if (ah!=ph || aport!=pport || ad.empty()) return ""; // One MySQL connection must own the whole transaction.
for (auto c:ad) if (!std::isalnum(static_cast<unsigned char>(c)) && c!='_') return "";
return "`"+ad+"`";
}
bool transactional(const std::string& account) {
auto q=query("SELECT COUNT(*) FROM information_schema.tables WHERE ENGINE='InnoDB' AND ((TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('ishop_data','port_itemshop_orders','item_award')) OR (TABLE_SCHEMA='"+account.substr(1,account.size()-2)+"' AND TABLE_NAME='account'))");
if (!ok(q) || !q->Get()->uiNumRows)return false;
return atoi(mysql_fetch_row(q->Get()->pSQLResult)[0])==4;
}
struct Transaction {
bool active; MYSQL* connection; unsigned previousTimeout;
Transaction():active(false),connection(CDBManager::instance().DirectHandle(SQL_PLAYER)),previousTimeout(50) {
// A reconnect inside a transaction would silently resume subsequent statements in autocommit.
my_bool reconnect=false;mysql_options(connection,MYSQL_OPT_RECONNECT,&reconnect);
auto settings=query("SELECT @@session.innodb_lock_wait_timeout");
if(!ok(settings) || settings->Get()->uiNumRows!=1)return;
previousTimeout=strtoul(mysql_fetch_row(settings->Get()->pSQLResult)[0],0,10);
active=run("SET SESSION innodb_lock_wait_timeout=3") && run("START TRANSACTION");
}
~Transaction(){
if(mysql_errno(connection)!=CR_SERVER_LOST && mysql_errno(connection)!=CR_SERVER_GONE_ERROR) {
if(active)run("ROLLBACK");
if(mysql_errno(connection)!=CR_SERVER_LOST && mysql_errno(connection)!=CR_SERVER_GONE_ERROR)
run("SET SESSION innodb_lock_wait_timeout="+decimal(previousTimeout));
}
my_bool reconnect=true;mysql_options(connection,MYSQL_OPT_RECONNECT,&reconnect);
}
bool commit(){if(!active || !run("COMMIT"))return false;active=false;return true;}
};
template<class T>void append(std::vector<char>& out,const T& value){const char* p=reinterpret_cast<const char*>(&value);out.insert(out.end(),p,p+sizeof(value));}
void reply(CPeer* peer,DWORD handle,const Ava2ShopRequest& request,const std::vector<char>& out) {
if (out.empty() || out.size()>32763)return;
Ava2ShopReply h={request.account,request.player,uint32_t(out.size())};
peer->EncodeHeader(76,handle,sizeof(h)+out.size());peer->Encode(&h,sizeof(h));peer->Encode(out.data(),out.size());
}
Ava2ShopProduct product(MYSQL_ROW r) {
Ava2ShopProduct p={};p.id=strtoul(r[0],0,10);p.vnum=strtoul(r[1],0,10);p.price=strtoll(r[2],0,10);p.discount=atoi(r[3]);p.expiry=atoi(r[4]);p.added=atoi(r[5]);p.sold=strtoll(r[6],0,10);p.weekly=atoi(r[7]);p.monthly=atoi(r[8]);p.stock=atoi(r[9]);return p;
}
const char* fields="id,itemVnum,itemPrice,discount,IFNULL(UNIX_TIMESTAMP(offerTime),0),IFNULL(UNIX_TIMESTAMP(addedTime),0),sellCount,week_limit,month_limit,maxSellCount";
bool valid(const Ava2ShopProduct& p) {return p.id && p.vnum && p.price>=0 && p.price<=1000000000000LL && p.discount<=100 && p.weekly>=0 && p.monthly>=0 && p.stock>=-1;}
}
void CClientManager::Ava2ItemShop(CPeer* peer,DWORD handle,const char* data,DWORD length) {
if (length!=sizeof(Ava2ShopRequest))return;
Ava2ShopRequest r;memcpy(&r,data,sizeof(r));
if (r.operation>2 || !r.account || !r.player || r.token[32] || r.name[24] || r.ip[15])return;
auto login=GetLoginDataByAID(r.account);
if (!login || !login->IsPlay() || login->GetConnectedPeerHandle()!=peer->GetHandle())return;
bool owned=false;for (const auto& p:login->GetAccountRef().players)if(p.dwID==r.player)owned=true;
if(!owned)return;
std::vector<char> out;
const std::string adb=accountDB(),aid=decimal(r.account);
int64_t balance=0;
auto wallet=adb.empty()?Query():query("SELECT coins FROM "+adb+".account WHERE id="+aid);
if(!ok(wallet) || wallet->Get()->uiNumRows!=1) {
append(out,uint8_t(8));reply(peer,handle,r,out);return;
}
balance=strtoll(mysql_fetch_row(wallet->Get()->pSQLResult)[0],0,10);
if(r.operation==0) {
auto rows=query(std::string("SELECT ")+fields+",categoryType,categorySubType FROM ishop_data WHERE enabled=1 ORDER BY categoryType,categorySubType,id LIMIT 511");
if (!ok(rows) || rows->Get()->uiNumRows>510) {append(out,uint8_t(8));reply(peer,handle,r,out);return;}
std::map<uint8_t,std::map<uint8_t,std::vector<Ava2ShopProduct>>> catalogue;
MYSQL_ROW row;
while((row=mysql_fetch_row(rows->Get()->pSQLResult))) {
auto p=product(row);int cat=atoi(row[10]),sub=atoi(row[11]);
if(!valid(p) || cat<0 || cat>7 || sub<0 || sub>9 || (!m_map_itemTableByVnum.count(p.vnum) || m_map_itemTableByVnum.at(p.vnum)->bType==ITEM_NONE))continue;
catalogue[cat][sub].push_back(p);
}
std::vector<Ava2ShopProduct*> ranked;
for(auto& cat:catalogue)for(auto& sub:cat.second)for(auto& p:sub.second)ranked.push_back(&p);
std::sort(ranked.begin(),ranked.end(),[](const Ava2ShopProduct* a,const Ava2ShopProduct* b){return a->sold!=b->sold?a->sold>b->sold:a->id<b->id;});
for(size_t i=0;i<ranked.size();++i)ranked[i]->top=int32_t(i+1);
append(out,uint8_t(0));append(out,balance);append(out,int32_t(time(0)));append(out,int32_t(catalogue.size()));
for (auto& cat:catalogue) {
append(out,cat.first);append(out,uint8_t(cat.second.size()));
for(auto& sub:cat.second) {
if(sub.second.size()>255){out.clear();append(out,uint8_t(8));reply(peer,handle,r,out);return;}
append(out,sub.first);append(out,uint8_t(sub.second.size()));for(auto& p:sub.second)append(out,p);
}
}
} else if(r.operation==1) {
auto rows=query("SELECT player_name,created_at,UNIX_TIMESTAMP(created_at),ip,product,vnum,quantity,paid FROM port_itemshop_orders WHERE account_id="+aid+" ORDER BY id DESC LIMIT 100");
if(!ok(rows)){append(out,uint8_t(8));reply(peer,handle,r,out);return;}
append(out,uint8_t(1));append(out,int32_t(rows->Get()->uiNumRows));MYSQL_ROW row;
while((row=mysql_fetch_row(rows->Get()->pSQLResult))) {
Ava2ShopLog log={};log.account=r.account;strlcpy(log.name,row[0],sizeof(log.name));strlcpy(log.date,row[1],sizeof(log.date));log.time=atoi(row[2]);strlcpy(log.ip,row[3],sizeof(log.ip));log.product=strtoul(row[4],0,10);log.vnum=strtoul(row[5],0,10);log.count=atoi(row[6]);log.price=strtoll(row[7],0,10);append(out,log);
}
} else {
if (r.count<1 || r.count>20 || strlen(r.token)!=32)return;
for(char c:std::string(r.token))if(!std::isxdigit(static_cast<unsigned char>(c)))return;
uint8_t status=6; // unavailable; errors always leave balance/stock/awards untouched
if(transactional(adb)) {
Transaction tx;
if(tx.active) {
auto locked=query("SELECT coins FROM "+adb+".account WHERE id="+aid+" FOR UPDATE");
if(ok(locked) && locked->Get()->uiNumRows==1) {
balance=strtoll(mysql_fetch_row(locked->Get()->pSQLResult)[0],0,10);
auto previous=query("SELECT product,quantity,paid,vnum FROM port_itemshop_orders WHERE account_id="+aid+" AND token='"+r.token+"'");
if(ok(previous) && previous->Get()->uiNumRows) {
auto row=mysql_fetch_row(previous->Get()->pSQLResult);
status=(strtoul(row[0],0,10)==r.product && strtoul(row[1],0,10)==r.count && strtoll(row[2],0,10)==r.expectedTotal && strtoul(row[3],0,10)==r.expectedVnum)?0:7;
} else if(ok(previous)) {
auto rows=query(std::string("SELECT ")+fields+" FROM ishop_data WHERE enabled=1 AND id="+decimal(r.product)+" FOR UPDATE");
if(ok(rows) && rows->Get()->uiNumRows==1) {
auto p=product(mysql_fetch_row(rows->Get()->pSQLResult));
auto proto=m_map_itemTableByVnum.find(p.vnum);
if(valid(p) && proto!=m_map_itemTableByVnum.end() && proto->second->bType!=ITEM_NONE) {
int64_t price=0;Ava2ShopTotal(p.price,r.count,p.discount,price);
status=0;
if(price!=r.expectedTotal || p.vnum!=r.expectedVnum)status=9;
else if(balance<price || balance<0)status=1;
else if(p.stock>=0 && uint32_t(p.stock)<r.count)status=4;
else if(p.expiry && time(0)>p.expiry)status=5;
if(!status && (p.weekly || p.monthly)) {
auto limits=query("SELECT IFNULL(SUM(IF(created_at>=DATE_SUB(CURDATE(),INTERVAL WEEKDAY(CURDATE()) DAY),quantity,0)),0),IFNULL(SUM(quantity),0) FROM port_itemshop_orders WHERE account_id="+aid+" AND product="+decimal(p.id)+" AND created_at>=DATE_FORMAT(NOW(),'%Y-%m-01')-INTERVAL 7 DAY");
// Month and week are computed independently across month boundaries.
auto month=query("SELECT IFNULL(SUM(quantity),0) FROM port_itemshop_orders WHERE account_id="+aid+" AND product="+decimal(p.id)+" AND created_at>=DATE_FORMAT(NOW(),'%Y-%m-01')");
if(!ok(limits)||!ok(month))status=6;
else {auto a=mysql_fetch_row(limits->Get()->pSQLResult);auto b=mysql_fetch_row(month->Get()->pSQLResult);if(p.weekly && strtoull(a[0],0,10)+r.count>uint64_t(p.weekly))status=2;else if(p.monthly && strtoull(b[0],0,10)+r.count>uint64_t(p.monthly))status=3;}
}
if(!status) {
bool success=run("UPDATE "+adb+".account SET coins=coins-"+decimal(price)+" WHERE id="+aid) && run("UPDATE ishop_data SET sellCount=sellCount+"+decimal(r.count)+",maxSellCount=IF(maxSellCount<0,-1,maxSellCount-"+decimal(r.count)+") WHERE id="+decimal(p.id));
success=success && run("INSERT INTO port_itemshop_orders(account_id,token,product,vnum,quantity,paid,player_name,ip) VALUES("+aid+",'"+r.token+"',"+decimal(p.id)+","+decimal(p.vnum)+","+decimal(r.count)+","+decimal(price)+",'"+escape(r.name)+"','"+escape(login->GetIP())+"')");
const bool stackable=(proto->second->dwFlags&ITEM_FLAG_STACKABLE)!=0;
for(uint32_t left=r.count;success && left;) {
uint32_t count=stackable?left:1;left-=count;
success=run("INSERT INTO item_award(login,vnum,count,mall,why,given_time) VALUES('"+escape(login->GetAccountRef().login)+"',"+decimal(p.vnum)+","+decimal(count)+",1,'ISHOP:"+r.token+"',NOW())");
}
if(success){if(tx.commit())balance-=price;else status=8;}else status=6;
}
}
}
}
}
}
}
append(out,uint8_t(7));out.insert(out.end(),r.token,r.token+32);append(out,status);append(out,balance);
}
reply(peer,handle,r,out);
}
+3 -1
View File
@@ -2327,7 +2327,9 @@ void CClientManager::ProcessPackets(CPeer * peer)
switch (header) switch (header)
{ {
case HEADER_GD_BOOT: case 76:
Ava2ItemShop(peer,dwHandle,data,dwLength);break;
case HEADER_GD_BOOT:
QUERY_BOOT(peer, (TPacketGDBoot *) data); QUERY_BOOT(peer, (TPacketGDBoot *) data);
break; break;
+1
View File
@@ -200,6 +200,7 @@ class CClientManager : public CNetBase, public singleton<CClientManager>
int Process(); int Process();
void ProcessPackets(CPeer * peer); void ProcessPackets(CPeer * peer);
void Ava2ItemShop(CPeer* peer, DWORD handle, const char* data, DWORD length);
CLoginData * GetLoginData(DWORD dwKey); CLoginData * GetLoginData(DWORD dwKey);
CLoginData * GetLoginDataByLogin(const char * c_pszLogin); CLoginData * GetLoginDataByLogin(const char * c_pszLogin);
+2 -1
View File
@@ -815,6 +815,8 @@ bool CClientManager::InitializeItemTable()
// InitializeQuestItemTable(); // InitializeQuestItemTable();
// END_OF_QUEST_ITEM_PROTO_DISABLE // END_OF_QUEST_ITEM_PROTO_DISABLE
// Build pointers only after sorting; otherwise each key can point to another prototype.
sort(m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum());
m_map_itemTableByVnum.clear(); m_map_itemTableByVnum.clear();
itertype(m_vec_itemTable) it = m_vec_itemTable.begin(); itertype(m_vec_itemTable) it = m_vec_itemTable.begin();
@@ -842,7 +844,6 @@ bool CClientManager::InitializeItemTable()
m_map_itemTableByVnum.insert(std::map<DWORD, TItemTable *>::value_type(item_table->dwVnum, item_table)); m_map_itemTableByVnum.insert(std::map<DWORD, TItemTable *>::value_type(item_table->dwVnum, item_table));
} }
sort(m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum());
return true; return true;
} }
+1
View File
@@ -46,6 +46,7 @@ class CDBManager : public singleton<CDBManager>
void ReturnQuery(const char * c_pszQuery, int iType, DWORD dwIdent, void * pvData, int iSlot = SQL_PLAYER); void ReturnQuery(const char * c_pszQuery, int iType, DWORD dwIdent, void * pvData, int iSlot = SQL_PLAYER);
void AsyncQuery(const char * c_pszQuery, int iSlot = SQL_PLAYER); void AsyncQuery(const char * c_pszQuery, int iSlot = SQL_PLAYER);
MYSQL* DirectHandle(int slot=SQL_PLAYER) { return m_directSQL[slot]->GetSQLHandle(); }
SQLMsg * DirectQuery(const char * c_pszQuery, int iSlot = SQL_PLAYER); SQLMsg * DirectQuery(const char * c_pszQuery, int iSlot = SQL_PLAYER);
SQLMsg * PopResult(); SQLMsg * PopResult();
+1 -1
View File
@@ -39,7 +39,7 @@ SRCS = Config.cpp NetBase.cpp Peer.cpp PeerBase.cpp Main.cpp Lock.cpp DBManager.
ClientManagerBoot.cpp ClientManagerParty.cpp ClientManagerGuild.cpp GuildManager.cpp HB.cpp \ ClientManagerBoot.cpp ClientManagerParty.cpp ClientManagerGuild.cpp GuildManager.cpp HB.cpp \
PrivManager.cpp MoneyLog.cpp ItemAwardManager.cpp ClientManagerEventFlag.cpp Marriage.cpp \ PrivManager.cpp MoneyLog.cpp ItemAwardManager.cpp ClientManagerEventFlag.cpp Marriage.cpp \
Monarch.cpp BlockCountry.cpp ItemIDRangeManager.cpp ClientManagerHorseName.cpp version.cpp \ Monarch.cpp BlockCountry.cpp ItemIDRangeManager.cpp ClientManagerHorseName.cpp version.cpp \
AuctionManager.cpp ProtoReader.cpp CsvReader.cpp AuctionManager.cpp ProtoReader.cpp CsvReader.cpp Ava2ItemShop.cpp
OBJS = $(SRCS:%.cpp=$(OBJDIR)/%.o) OBJS = $(SRCS:%.cpp=$(OBJDIR)/%.o)
+1 -1
View File
@@ -61,7 +61,7 @@ CPPFILE = BattleArena.cpp FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp
desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\ desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\
entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\ entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\
guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\ guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\
input_login.cpp input_main.cpp input_p2p.cpp port_boss_track.cpp ava2_channel.cpp new_mob_timer.cpp ava2_track.cpp ava2_ticket_shop.cpp port_attr_lock.cpp port_sash.cpp port_mount.cpp port_costume_attr.cpp port_pendant.cpp port_rings.cpp port_switchbot.cpp port_ava2_dungeon.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\ input_login.cpp input_main.cpp input_p2p.cpp port_boss_track.cpp ava2_channel.cpp new_mob_timer.cpp ava2_track.cpp ava2_ticket_shop.cpp ava2_itemshop.cpp port_attr_lock.cpp port_sash.cpp port_mount.cpp port_costume_attr.cpp port_pendant.cpp port_rings.cpp port_switchbot.cpp port_ava2_dungeon.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\
item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\ item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\
locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\ locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\
messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\ messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\
+43
View File
@@ -0,0 +1,43 @@
#include "stdafx.h"
#include "utils.h"
#include "char.h"
#include "desc.h"
#include "desc_client.h"
#include "desc_manager.h"
#include "packet.h"
#include "cmd.h"
#include "ava2_itemshop.h"
#include "../../common/ava2_itemshop.h"
#include <sstream>
#include <cctype>
ACMD(do_ishop) {
if(!ch || !ch->IsPC() || !ch->GetDesc() || ch->IsWarping() || ch->IsDead())return;
const char* version=strstr(ch->GetDesc()->GetClientVersion(),"mt");
if(!version || atoi(version+2)<20261020) {ch->ChatPacket(CHAT_TYPE_INFO,"Please update your client to use the item shop.");return;}
std::istringstream input(argument);std::string op,extra;input>>op;
Ava2ShopRequest p={};p.account=ch->GetDesc()->GetAccountTable().id;p.player=ch->GetPlayerID();
strlcpy(p.name,ch->GetName(),sizeof(p.name));strlcpy(p.ip,ch->GetDesc()->GetHostName(),sizeof(p.ip));
if(op=="data") {p.operation=0;int revision=-1;if(!(input>>revision))return;}
else if(op=="log")p.operation=1;
else if(op=="buy") {
p.operation=2;std::string token;
if(!(input>>p.product>>p.count>>token>>p.expectedTotal>>p.expectedVnum) || !p.product || p.count<1 || p.count>20 || token.size()!=32 || p.expectedTotal<0 || p.expectedTotal>20000000000000LL || !p.expectedVnum)return;
for(char c:token)if(!std::isxdigit(static_cast<unsigned char>(c)))return;
strlcpy(p.token,token.c_str(),sizeof(p.token));
} else return;
if(input>>extra)return;
const std::string throttle="ishop."+op;
if(ch->GetProtectTime(throttle)>get_global_time())return;
ch->SetProtectTime(throttle,get_global_time()+1);
db_clientdesc->DBPacket(76,ch->GetDesc()->GetHandle(),&p,sizeof(p));
}
void Ava2ItemShopReply(unsigned long handle,const char* data) {
Ava2ShopReply r;memcpy(&r,data,sizeof(r));
auto d=DESC_MANAGER::instance().FindByHandle(handle);
if(!d || !d->IsPhase(PHASE_GAME) || !d->GetCharacter() || d->GetAccountTable().id!=r.account || d->GetCharacter()->GetPlayerID()!=r.player)return;
#pragma pack(push,1)
struct Header {uint8_t header;uint32_t size;};
#pragma pack(pop)
Header h={93,uint32_t(sizeof(Header)+r.size)};
d->BufferedPacket(&h,sizeof(h));d->Packet(data+sizeof(r),r.size);
}
+2
View File
@@ -0,0 +1,2 @@
#pragma once
void Ava2ItemShopReply(unsigned long handle,const char* data);
+2
View File
@@ -294,9 +294,11 @@ ACMD (do_dragon_soul);
ACMD (do_ds_list); ACMD (do_ds_list);
ACMD (do_clear_affect); ACMD (do_clear_affect);
ACMD(do_ishop);
struct command_info cmd_info[] = struct command_info cmd_info[] =
{ {
{ "!RESERVED!", NULL, 0, POS_DEAD, GM_IMPLEMENTOR }, /* 반드시 이 것이 처음이어야 한다. */ { "!RESERVED!", NULL, 0, POS_DEAD, GM_IMPLEMENTOR }, /* 반드시 이 것이 처음이어야 한다. */
{ "ishop", do_ishop, 0, POS_DEAD, GM_PLAYER },
{ "autohunt_pull", do_autohunt_pull, 0, POS_FIGHTING, GM_PLAYER }, { "autohunt_pull", do_autohunt_pull, 0, POS_FIGHTING, GM_PLAYER },
{ "bio", do_port_biolog, 0, POS_DEAD, GM_PLAYER }, { "bio", do_port_biolog, 0, POS_DEAD, GM_PLAYER },
{ "biolog", do_port_biolog, 0, POS_DEAD, GM_PLAYER }, { "biolog", do_port_biolog, 0, POS_DEAD, GM_PLAYER },
+8 -2
View File
@@ -1,4 +1,6 @@
#include "stdafx.h" #include "stdafx.h"
#include "ava2_itemshop.h"
#include "../../common/ava2_itemshop.h"
#include "new_mob_timer.h" #include "new_mob_timer.h"
#include "ava2_track.h" #include "ava2_track.h"
#include "constants.h" #include "constants.h"
@@ -2285,7 +2287,9 @@ int CInputDB::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
SafeboxChangePasswordAnswer(DESC_MANAGER::instance().FindByHandle(m_dwHandle), c_pData); SafeboxChangePasswordAnswer(DESC_MANAGER::instance().FindByHandle(m_dwHandle), c_pData);
break; break;
case HEADER_DG_MALL_LOAD: case 76:
Ava2ItemShopReply(m_dwHandle,c_pData);break;
case HEADER_DG_MALL_LOAD:
MallLoad(DESC_MANAGER::instance().FindByHandle(m_dwHandle), c_pData); MallLoad(DESC_MANAGER::instance().FindByHandle(m_dwHandle), c_pData);
break; break;
@@ -2599,7 +2603,9 @@ bool CInputDB::Process(LPDESC d, const void * orig, int bytes, int & r_iBytesPro
const char * pRealData = (c_pData + 9); const char * pRealData = (c_pData + 9);
if (Analyze(d, bHeader, pRealData) < 0) if (bHeader==76 && (iSize<int(sizeof(Ava2ShopReply))+1 || iSize>32775 || reinterpret_cast<const Ava2ShopReply*>(pRealData)->size!=iSize-sizeof(Ava2ShopReply))) { d->SetPhase(PHASE_CLOSE);return true; }
if (Analyze(d, bHeader, pRealData) < 0)
{ {
sys_err("in InputDB: UNKNOWN HEADER: %d, LAST HEADER: %d(%d), REMAIN BYTES: %d, DESC: %d", sys_err("in InputDB: UNKNOWN HEADER: %d, LAST HEADER: %d(%d), REMAIN BYTES: %d, DESC: %d",
bHeader, bLastHeader, iLastPacketLen, m_iBufferLeft, d->GetSocket()); bHeader, bLastHeader, iLastPacketLen, m_iBufferLeft, d->GetSocket());
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env python3
"""Compile the production wire and total-price helper, including malformed bounds."""
import subprocess,tempfile,unittest
from pathlib import Path
ROOT=Path(__file__).resolve().parents[2]
class ItemShop(unittest.TestCase):
def test_native_wire_and_integer_quantity_discount(self):
source=r'''
#include "src/server/common/ava2_itemshop.h"
#include <cassert>
#include <cstring>
int main(){
static_assert(sizeof(Ava2ShopRequest)==103,"request");
static_assert(sizeof(Ava2ShopProduct)==49,"native catalogue");
static_assert(sizeof(Ava2ShopLog)==90,"native log");
int64_t price=123;
assert(Ava2ShopTotal(99,2,25,price) && price==148);
assert(Ava2ShopTotal(1,1,99,price) && price==0);
assert(Ava2ShopTotal(1000000000000LL,20,0,price) && price==20000000000000LL);
assert(!Ava2ShopTotal(-1,1,0,price));assert(!Ava2ShopTotal(1000000000001LL,1,0,price));
assert(!Ava2ShopTotal(1,0,0,price));assert(!Ava2ShopTotal(1,21,0,price));assert(!Ava2ShopTotal(1,1,101,price));
Ava2ShopProduct p={};p.id=0x01020304;p.vnum=71084;p.price=99;p.discount=25;p.stock=-1;
const unsigned char* bytes=reinterpret_cast<const unsigned char*>(&p);
assert(bytes[0]==4 && bytes[3]==1 && bytes[20]==25 && bytes[45]==255);
}
'''
with tempfile.TemporaryDirectory() as d:
p=Path(d);(p/'test.cpp').write_text(source)
subprocess.run(['c++','-std=c++17','-I'+str(ROOT),str(p/'test.cpp'),'-o',str(p/'test')],check=True);subprocess.run([str(p/'test')],check=True)
def test_sorted_prototype_index_points_to_the_matching_item(self):
source=(ROOT/'src/server/db/src/ClientManagerBoot.cpp').read_bytes().decode('latin1')
body=source[source.index('bool CClientManager::InitializeItemTable()'):source.index('bool CClientManager::InitializeSkillTable()')]
start=body.rindex('// END_OF_QUEST_ITEM_PROTO_DISABLE')
tail=body[start:body.rfind('return true;')+len('return true;')]
harness=r"""
#include <vector>
#include <map>
#include <algorithm>
#include <cassert>
#define sys_log(...) ((void)0)
#define itertype(c) decltype(c)::iterator
using namespace std;
using DWORD=unsigned;
struct TItemTable { DWORD dwVnum;unsigned bType; };
struct FCompareVnum { bool operator()(const TItemTable& a,const TItemTable& b)const {return a.dwVnum<b.dwVnum;} };
struct Database {
vector<TItemTable> m_vec_itemTable={{71084,3},{54051,3},{1,0},{71502,28}};
map<DWORD,TItemTable*> m_map_itemTableByVnum;
bool Build() { BODY }
};
int main(){ Database db;assert(db.Build());for(auto& row:db.m_map_itemTableByVnum)assert(row.first==row.second->dwVnum);assert(db.m_map_itemTableByVnum[54051]->bType==3);assert(db.m_map_itemTableByVnum[71502]->bType==28); }
""".replace('BODY',tail)
with tempfile.TemporaryDirectory() as d:
p=Path(d);(p/'test.cpp').write_text(harness)
subprocess.run(['c++','-std=c++17',str(p/'test.cpp'),'-o',str(p/'test')],check=True)
subprocess.run([str(p/'test')],check=True)
if __name__=='__main__':unittest.main()
+4 -2
View File
@@ -103,8 +103,10 @@ if cpacket.is_file():
assert 'static_assert(sizeof(TPacketCGSwitchbot) == 7 && sizeof(TPacketGCSwitchbot) == 7,' in client assert 'static_assert(sizeof(TPacketCGSwitchbot) == 7 && sizeof(TPacketGCSwitchbot) == 7,' in client
stream=(CLIENT/'PythonNetworkStreamPhaseGame.cpp').read_bytes().decode('latin1') stream=(CLIENT/'PythonNetworkStreamPhaseGame.cpp').read_bytes().decode('latin1')
# the EU branch (the one every locale.cfg build takes) keeps 1215955205 first for the atoi version check # the EU branch (the one every locale.cfg build takes) keeps 1215955205 first for the atoi version check
assert 'strncpy(kVersionPacket.timestamp, "1215955205 mt20261019", sizeof(kVersionPacket.timestamp)-1);' in stream modern=re.search(r'strncpy\(kVersionPacket.timestamp, "1215955205 mt(\d{8})"',stream)
assert 'strncpy(kVersionPacket.timestamp, "mt20261019", sizeof(kVersionPacket.timestamp)-1);' in stream legacy=re.search(r'strncpy\(kVersionPacket.timestamp, "mt(\d{8})"',stream)
assert modern and legacy and modern.group(1)==legacy.group(1)
assert int(modern.group(1))>=20261016 # switchbot gate; newer features may advance this revision
pyswitch=(CLIENT/'PythonSwitchbot.h').read_bytes().decode('latin1') pyswitch=(CLIENT/'PythonSwitchbot.h').read_bytes().decode('latin1')
ctable=pyswitch[pyswitch.index('struct TSwitchbotTable'):];ctable=ctable[:ctable.index('};')] ctable=pyswitch[pyswitch.index('struct TSwitchbotTable'):];ctable=ctable[:ctable.index('};')]
assert re.findall(r'^\s*[A-Za-z_][\w:]*\s+(\w+)(?:\[[^;]*\])?;',ctable,re.M)==table,ctable assert re.findall(r'^\s*[A-Za-z_][\w:]*\s+(\w+)(?:\[[^;]*\])?;',ctable,re.M)==table,ctable
+35
View File
@@ -0,0 +1,35 @@
# Native AVA2 item shop
Active UI is `uiitemshopnew.py`. GC93 retains the native catalogue/log layouts;
GD/DG76 transports authenticated account/character requests to the DB coordinator.
Purchase requests add a durable random token and the confirmed item/total quote.
`data/ava2-itemshop/original-products.tsv` contains all 217 original offers recovered
from the supplied MySQL56 archive. `source.json` records hashes. No prices are invented.
`compatibility.json` records 55 absent prototypes, 55 ITEM_NONE placeholders and 107
actual types needing item-system verification. `verified-products.json` selects 49
existing implemented mount, mount-skin, fixed-enchant and third-hand products.
Generate migration SQL with explicit configured schema names, review it and back up
account/award data before executing it:
```
python3 tools/ava2-itemshop/migrate.py --player player_sb --account account_sb --output /tmp/itemshop.sql
python3 tools/ava2-itemshop/enable_verified.py --player player_sb --output /tmp/itemshop-enable.sql
```
The migration uses InnoDB for account, catalogue, orders and awards. Account/player SQL
configurations must target the same MySQL host and port. Purchase failures leave all
four unchanged. A transaction temporarily disables reconnect and caps lock waits at
three seconds, restoring the original connection options afterwards. Unknown COMMIT
outcomes retry the same order. Unique `(account_id,token)` orders survive process restarts.
The old prototype loader indexed vector pointers before sorting; it now sorts before building the index so lookup keys always match their templates.
Awards use the existing mall redemption path; non-stackable purchases create separate
award rows. New clients use revision mt20261020. Legacy clients cannot request GC93.
No web recharge service or wheel reward service is enabled.
Acceptance evidence: `metin2-client/docs/AVA2-ITEMSHOP.md` and
`metin2-client/audit/evidence/itemshop/`. Only sbtest was changed; production binaries,
prices, balances and catalogue activation were not deployed by this task.
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env python3
"""Emit SQL enabling original offers backed by implemented item systems. Never executes SQL."""
import argparse,json,re
from pathlib import Path
p=argparse.ArgumentParser();p.add_argument('--player',required=True);p.add_argument('--output',type=Path,required=True);a=p.parse_args()
if not re.fullmatch('[A-Za-z0-9_]+',a.player):p.error('invalid schema')
root=Path(__file__).resolve().parents[2];rows=json.loads((root/'data/ava2-itemshop/verified-products.json').read_text())['products']
sql='USE `'+a.player+'`;\n'
for row in rows:
sql+='UPDATE ishop_data s JOIN item_proto p ON p.vnum=s.itemVnum SET s.enabled=1 WHERE s.id=%d AND s.itemVnum=%d AND p.type<>0;\n'%(row['id'],row['vnum'])
sql+='SELECT categoryType,categorySubType,COUNT(*) FROM ishop_data WHERE enabled=1 GROUP BY categoryType,categorySubType;\n'
a.output.parent.mkdir(parents=True,exist_ok=True);a.output.write_text(sql);print('SQL generated for',len(rows),'verified original offers; original prices preserved')
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env python3
"""Emit a reviewable migration for explicitly named isolated or production schemas.
Run mysql separately after backup. Native products are disabled until compatibility review.
"""
import argparse,re
from pathlib import Path
p=argparse.ArgumentParser();p.add_argument('--player',required=True);p.add_argument('--account',required=True);p.add_argument('--output',type=Path,required=True);a=p.parse_args()
for name in (a.player,a.account):
if not re.fullmatch('[A-Za-z0-9_]+',name):p.error('invalid schema')
sql=f'''USE `{a.player}`;
CREATE TABLE IF NOT EXISTS ishop_data (
id INT UNSIGNED PRIMARY KEY, categoryType INT NOT NULL, categorySubType INT NOT NULL,
itemVnum INT UNSIGNED NOT NULL,itemPrice BIGINT UNSIGNED NOT NULL,discount INT NOT NULL DEFAULT 0,
offerTime DATETIME NULL,addedTime DATETIME NULL,sellCount BIGINT UNSIGNED NOT NULL DEFAULT 0,
week_limit INT NOT NULL DEFAULT 0,month_limit INT NOT NULL DEFAULT 0,maxSellCount INT NOT NULL DEFAULT -1,
enabled TINYINT NOT NULL DEFAULT 0
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS port_itemshop_orders (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,account_id INT UNSIGNED NOT NULL,
token CHAR(32) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,product INT UNSIGNED NOT NULL,vnum INT UNSIGNED NOT NULL,
quantity INT UNSIGNED NOT NULL,paid BIGINT UNSIGNED NOT NULL,player_name VARCHAR(24) NOT NULL,ip VARCHAR(45) NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY request_once(account_id,token), KEY limits_by_account(account_id,product,created_at)
) ENGINE=InnoDB;
ALTER TABLE ishop_data ENGINE=InnoDB;
ALTER TABLE item_award ENGINE=InnoDB;
ALTER TABLE `{a.account}`.account ENGINE=InnoDB;
'''
# Upgrade an existing native catalogue without replacing its products or sales history.
sql+="""SET @enabled_exists=(SELECT COUNT(*) FROM information_schema.columns WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='ishop_data' AND COLUMN_NAME='enabled');
SET @ddl=IF(@enabled_exists=0,'ALTER TABLE ishop_data ADD enabled TINYINT NOT NULL DEFAULT 0','SELECT 1');
PREPARE shop_ddl FROM @ddl; EXECUTE shop_ddl; DEALLOCATE PREPARE shop_ddl;
"""
# Coins are added by a separate conditional step, since MySQL 5.6 lacks ADD IF NOT EXISTS.
sql+=f'''SET @column_exists=(SELECT COUNT(*) FROM information_schema.columns WHERE TABLE_SCHEMA='{a.account}' AND TABLE_NAME='account' AND COLUMN_NAME='coins');
SET @ddl=IF(@column_exists=0,'ALTER TABLE `{a.account}`.account ADD coins BIGINT UNSIGNED NOT NULL DEFAULT 0','SELECT 1');
PREPARE shop_ddl FROM @ddl; EXECUTE shop_ddl; DEALLOCATE PREPARE shop_ddl;
'''
source=Path(__file__).resolve().parents[2]/'data/ava2-itemshop/original-products.tsv'
for line in source.read_text().splitlines():
row=line.split('\t');assert len(row)==12
values=[str(int(v)) if i not in (6,7) else ('NULL' if v.startswith('0000') else "'"+v+"'") for i,v in enumerate(row)]
sql+='INSERT IGNORE INTO ishop_data(id,categoryType,categorySubType,itemVnum,itemPrice,discount,offerTime,addedTime,sellCount,week_limit,month_limit,maxSellCount) VALUES('+','.join(values)+');\n'
a.output.parent.mkdir(parents=True,exist_ok=True);a.output.write_text(sql)
print('217 native products imported disabled; review compatibility before enabling')