-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,raids_sidepanel_setsort].cs2
66 lines (66 loc) · 2.38 KB
/
[proc,raids_sidepanel_setsort].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
// 1554
[proc,raids_sidepanel_setsort](int $int0)
~raids_sidepanel_sortbutton_draw(interface_500:7, 0, 1, "Sort by name", $int0);
~raids_sidepanel_sortbutton_draw(interface_500:8, 2, 3, "Sort by combat level", $int0);
~raids_sidepanel_sortbutton_draw(interface_500:9, 4, 5, "Sort by skill total", $int0);
def_int $intarray0($int0);
def_int $int1 = 0;
def_int $int2 = 0;
while ($int2 = 0 & $int1 < $int0) {
if (cc_find(interface_500:10, calc($int1 * 7)) = ^true) {
$intarray0($int1) = $int1;
$int1 = calc($int1 + 1);
} else {
$int2 = 1;
}
}
def_string $string0 = "";
if ($int1 >= 2) {
if (%varcint181 = 2 | %varcint181 = 3) {
~raids_sidepanel_sort(intarray0, 0, calc($int1 - 1), 5);
} else if (%varcint181 = 4 | %varcint181 = 5) {
~raids_sidepanel_sort(intarray0, 0, calc($int1 - 1), 6);
} else {
~raids_sidepanel_sort(intarray0, 0, calc($int1 - 1), 4);
}
}
def_int $int3 = 0;
def_int $int4 = 0;
if (%varcint181 = 3 | %varcint181 = 5 | %varcint181 = 1) {
$int3 = $int1;
while ($int3 > 0) {
$int3 = calc($int3 - 1);
if (cc_find(interface_500:10, calc($intarray0($int3) * 7)) = ^true) {
cc_setposition(0, $int4, ^setpos_abs_centre, ^setpos_abs_top);
~raids_sidepanel_entry_init($int3, true);
}
if (cc_find(interface_500:10, calc($intarray0($int3) * 7 + 1)) = ^true) {
cc_setposition(cc_getx, $int4, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_500:10, calc($intarray0($int3) * 7 + 2)) = ^true) {
cc_setposition(cc_getx, $int4, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_500:10, calc($intarray0($int3) * 7 + 3)) = ^true) {
cc_setposition(cc_getx, $int4, ^setpos_abs_left, ^setpos_abs_top);
}
$int4 = calc($int4 + 13);
}
} else {
while ($int3 < $int1) {
if (cc_find(interface_500:10, calc($intarray0($int3) * 7)) = ^true) {
cc_setposition(0, $int4, ^setpos_abs_centre, ^setpos_abs_top);
~raids_sidepanel_entry_init($int3, true);
}
if (cc_find(interface_500:10, calc($intarray0($int3) * 7 + 1)) = ^true) {
cc_setposition(cc_getx, $int4, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_500:10, calc($intarray0($int3) * 7 + 2)) = ^true) {
cc_setposition(cc_getx, $int4, ^setpos_abs_left, ^setpos_abs_top);
}
if (cc_find(interface_500:10, calc($intarray0($int3) * 7 + 3)) = ^true) {
cc_setposition(cc_getx, $int4, ^setpos_abs_left, ^setpos_abs_top);
}
$int4 = calc($int4 + 13);
$int3 = calc($int3 + 1);
}
}