-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,tob_partylist_setsort].cs2
66 lines (66 loc) · 2.44 KB
/
[proc,tob_partylist_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
// 2341
[proc,tob_partylist_setsort]
~tob_partylist_sortbutton_draw(interface_364:11, 0, 1, "Sort by members");
~tob_partylist_sortbutton_draw(interface_364:12, 2, 3, "Sort by target size");
~tob_partylist_sortbutton_draw(interface_364:13, 4, 5, "Sort by leader name");
~tob_partylist_sortbutton_draw(interface_364:14, 6, 7, "Sort by preferred combat level");
~tob_partylist_sortbutton_draw(interface_364:15, 14, 15, "Sort by mode");
~tob_partylist_sortbutton_draw(interface_364:16, 12, 13, "Sort by age");
def_int $count0 = enum_getoutputcount(enum_1937);
def_int $intarray0($count0);
def_int $int1 = 0;
def_int $count2 = 0;
while ($count2 < $count0) {
if (cc_find(enum(int, component, enum_1937, $int1), 0) = ^true) {
$intarray0($int1) = $int1;
$int1 = calc($int1 + 1);
}
$count2 = calc($count2 + 1);
}
def_string $string0 = "";
if ($int1 >= 2) {
switch_int (%varcint180) {
case 2, 3 :
~raids_partylist_sort(intarray0, 0, calc($int1 - 1), 8, enum_1937);
case 4, 5 :
~raids_partylist_sort(intarray0, 0, calc($int1 - 1), 3, enum_1937);
case 6, 7 :
~raids_partylist_sort(intarray0, 0, calc($int1 - 1), 9, enum_1937);
case 14, 15 :
~raids_partylist_sort(intarray0, 0, calc($int1 - 1), 5, enum_1937);
case 12, 13 :
~raids_partylist_sort(intarray0, 0, calc($int1 - 1), 10, enum_1937);
case default :
~raids_partylist_sort(intarray0, 0, calc($int1 - 1), 7, enum_1937);
}
}
def_int $int3 = 0;
def_int $int4 = 0;
def_component $component5 = null;
def_string $string1 = "";
switch_int (%varcint180) {
case 1, 3, 5, 7, 13, 15 :
$int3 = $int1;
while ($int3 > 0) {
$int3 = calc($int3 - 1);
$component5 = enum(int, component, enum_1937, $intarray0($int3));
if ($component5 ! null) {
if_setposition(0, $int4, ^setpos_abs_centre, ^setpos_abs_top, $component5);
if (cc_find($component5, 0) = ^true & .cc_find($component5, 3) = ^true) {
~raids_partylist_entry_init($int3, $component5, $intarray0($int3), .cc_gettext, interface_364:17);
}
}
$int4 = calc($int4 + 18);
}
case default :
while ($int3 < $int1) {
$component5 = enum(int, component, enum_1937, $intarray0($int3));
if ($component5 ! null) {
if_setposition(0, $int4, ^setpos_abs_centre, ^setpos_abs_top, $component5);
if (cc_find($component5, 0) = ^true & .cc_find($component5, 3) = ^true) {
~raids_partylist_entry_init($int3, $component5, $intarray0($int3), .cc_gettext, interface_364:17);
}
}
$int4, $int3 = calc($int4 + 18), calc($int3 + 1);
}
}