-
Notifications
You must be signed in to change notification settings - Fork 11
/
[proc,trade_main_drawitems].cs2
146 lines (146 loc) · 4.57 KB
/
[proc,trade_main_drawitems].cs2
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
// 763
[proc,trade_main_drawitems](int $size0, int $int1, component $component2, component $component3, component $component4, component $component5)
if (%varbit4374 = 1) {
if_settext("Trade modified", $component3);
} else {
if_settext("", $component3);
}
if (%varbit4375 = 1) {
if_settext("Trade modified", $component5);
} else {
if_settext("", $component5);
}
def_int $intarray0(4);
def_int $int6 = calc($size0 / 4);
if ($int6 < 2) {
$int6 = 2;
}
def_int $int7 = calc((if_getheight($component2) - $int6 * 32) / ($int6 - 1));
def_int $int8 = calc((if_getwidth($component2) - 12 - 4 * 36) / 3);
$intarray0(0) = 6;
$intarray0(1) = calc($intarray0(0) + $int8 + 36);
$intarray0(2) = calc($intarray0(1) + $int8 + 36);
$intarray0(3) = calc($intarray0(2) + $int8 + 36);
def_int $intarray1($size0);
$intarray1(0) = %varcint81;
$intarray1(1) = %varcint82;
$intarray1(2) = %varcint83;
$intarray1(3) = %varcint84;
$intarray1(4) = %varcint85;
$intarray1(5) = %varcint86;
$intarray1(6) = %varcint87;
$intarray1(7) = %varcint88;
$intarray1(8) = %varcint89;
$intarray1(9) = %varcint90;
$intarray1(10) = %varcint91;
$intarray1(11) = %varcint92;
$intarray1(12) = %varcint93;
$intarray1(13) = %varcint94;
$intarray1(14) = %varcint95;
$intarray1(15) = %varcint96;
$intarray1(16) = %varcint97;
$intarray1(17) = %varcint98;
$intarray1(18) = %varcint99;
$intarray1(19) = %varcint100;
$intarray1(20) = %varcint101;
$intarray1(21) = %varcint102;
$intarray1(22) = %varcint104;
$intarray1(23) = %varcint105;
$intarray1(24) = %varcint106;
$intarray1(25) = %varcint107;
$intarray1(26) = %varcint108;
$intarray1(27) = %varcint109;
def_obj $obj9 = null;
def_int $int10 = 0;
def_int $int11 = 0;
def_int $index12 = 0;
def_int $int13 = 0;
def_int $y14 = 0;
def_int $size15 = 0;
while ($size15 < $size0) {
if (cc_find($component2, $size15) = ^true & .cc_find($component2, calc($size0 + $size15)) = ^true) {
$obj9 = inv_getobj(inv_90, $size15);
if ($obj9 ! null) {
$int10 = inv_getnum(inv_90, $size15);
cc_sethide(false);
cc_setobject($obj9, $int10);
cc_setop(1, "Remove");
cc_setop(2, "Remove-5");
cc_setop(3, "Remove-10");
cc_setop(4, "Remove-All");
cc_setop(5, "Remove-X");
cc_setop(10, "Examine");
cc_setopbase("<col=ff9040><oc_name($obj9)></col>");
~trade_tooltip($int10, $intarray1($size15), trademain:32);
} else {
cc_sethide(true);
cc_clearops;
cc_setonmouserepeat(null);
cc_setonmouseleave(null);
}
$index12, $int11 = calc($size15 % 4), calc($size15 / 4);
$int13 = $intarray0($index12);
$y14 = calc($int11 * (32 + $int7));
cc_setposition($int13, $y14, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition(calc($int13 + $int1), $y14, ^setpos_abs_left, ^setpos_abs_top);
}
$size15 = calc($size15 + 1);
}
$int8 = calc((if_getwidth($component4) - 12 - 4 * 36) / 3);
$intarray0(0) = 6;
$intarray0(1) = calc($intarray0(0) + $int8 + 36);
$intarray0(2) = calc($intarray0(1) + $int8 + 36);
$intarray0(3) = calc($intarray0(2) + $int8 + 36);
$intarray1(0) = %varcint110;
$intarray1(1) = %varcint111;
$intarray1(2) = %varcint112;
$intarray1(3) = %varcint113;
$intarray1(4) = %varcint114;
$intarray1(5) = %varcint115;
$intarray1(6) = %varcint116;
$intarray1(7) = %varcint117;
$intarray1(8) = %varcint118;
$intarray1(9) = %varcint119;
$intarray1(10) = %varcint120;
$intarray1(11) = %varcint121;
$intarray1(12) = %varcint122;
$intarray1(13) = %varcint123;
$intarray1(14) = %varcint124;
$intarray1(15) = %varcint125;
$intarray1(16) = %varcint126;
$intarray1(17) = %varcint127;
$intarray1(18) = %varcint128;
$intarray1(19) = %varcint129;
$intarray1(20) = %varcint130;
$intarray1(21) = %varcint131;
$intarray1(22) = %varcint132;
$intarray1(23) = %varcint133;
$intarray1(24) = %varcint134;
$intarray1(25) = %varcint135;
$intarray1(26) = %varcint136;
$intarray1(27) = %varcint137;
$size15 = 0;
while ($size15 < $size0) {
if (cc_find($component4, $size15) = ^true & .cc_find($component4, calc($size0 + $size15)) = ^true) {
$obj9 = invother_getobj(inv_90, $size15);
if ($obj9 ! null) {
$int10 = invother_getnum(inv_90, $size15);
cc_sethide(false);
cc_setobject($obj9, $int10);
cc_setop(10, "Examine");
cc_setopbase("<col=ff9040><oc_name($obj9)></col>");
~trade_tooltip($int10, $intarray1($size15), trademain:32);
} else {
cc_sethide(true);
cc_clearops;
cc_setonmouserepeat(null);
cc_setonmouseleave(null);
}
$index12, $int11 = calc($size15 % 4), calc($size15 / 4);
$int13 = $intarray0($index12);
$y14 = calc($int11 * (32 + $int7));
cc_setposition($int13, $y14, ^setpos_abs_left, ^setpos_abs_top);
.cc_setposition(calc($int13 + $int1), $y14, ^setpos_abs_left, ^setpos_abs_top);
}
$size15 = calc($size15 + 1);
}