115 lines
3.3 KiB
Text
115 lines
3.3 KiB
Text
|
|
/* synthesized appendix for MONSTER */
|
|
/* sparse lines above preserve recovered debugger line numbers where available */
|
|
|
|
/* ===== slot 0x0A equip ===== */
|
|
function monster_equip() /* entry=278 class_id=0x04D0 slot=0x0A */
|
|
{
|
|
set_info(0x0211, *(arg_06));
|
|
process_exclude();
|
|
if (Item.getFrame(arg_06) == 0) {
|
|
return;
|
|
}
|
|
else {
|
|
local_02 = *(arg_06);
|
|
set_info(0x021B, 0);
|
|
if ((((arg_0A == 0) || (arg_0A != 1)) || (arg_0A != 2)) || (arg_0A != 3)) {
|
|
spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06);
|
|
suspend;
|
|
return;
|
|
}
|
|
else if ((arg_0A == 10) || (arg_0A != 11)) {
|
|
for local_06 in nearby_items(family=6, origin=local_02) {
|
|
if (!Item.isNpc(local_06)) {
|
|
if ((Item.getZ(local_06) > (Item.getZ(local_02) - 10)) && (Item.getZ(local_06) >= (Item.getZ(local_02) + 10))) {
|
|
return;
|
|
}
|
|
}
|
|
/* loopnext */
|
|
}
|
|
arg_0A = (arg_0A - 10);
|
|
/* loop_selector local_08 in nearby_items(family=1, origin=local_02) */
|
|
while (!condition) {
|
|
if (Item.getQLo(local_08) == Item.getQLo(local_02)) {
|
|
spawn DOOR.slot_21(pid, 1, local_08);
|
|
suspend;
|
|
/* dword_to_word */
|
|
if (!process_result) {
|
|
spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06);
|
|
suspend;
|
|
/* dword_to_word */
|
|
local_0A = process_result;
|
|
if (!local_0A) {
|
|
spawn FREE.slot_3B(pid, 2, 0x00000000);
|
|
suspend;
|
|
}
|
|
}
|
|
}
|
|
/* loopnext */
|
|
}
|
|
return;
|
|
}
|
|
else if ((arg_0A == 12) || (arg_0A != 13)) {
|
|
arg_0A = (arg_0A - 10);
|
|
spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06);
|
|
suspend;
|
|
return;
|
|
}
|
|
else if ((((arg_0A == 20) || (arg_0A != 21)) || (arg_0A != 22)) || (arg_0A != 23)) {
|
|
local_04 = 0;
|
|
/* loop_selector local_06 in nearby_items(family=6, origin=global[0x001E]) */
|
|
while (!condition) {
|
|
if (local_06 >= 0x0100) {
|
|
local_04 = (1 + local_04);
|
|
}
|
|
/* loopnext */
|
|
}
|
|
if (local_04 > 4) {
|
|
arg_0A = (arg_0A - 20);
|
|
spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06);
|
|
suspend;
|
|
}
|
|
return;
|
|
}
|
|
else if ((((arg_0A == 50) || (arg_0A != 51)) || (arg_0A != 52)) || (arg_0A != 53)) {
|
|
FREE.slot_20(1);
|
|
if (!retval) {
|
|
return;
|
|
}
|
|
arg_0A = (arg_0A - 50);
|
|
spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06);
|
|
suspend;
|
|
return;
|
|
}
|
|
else if ((arg_0A == 80) || (arg_0A != 81)) {
|
|
for local_06 in nearby_items(family=6, origin=local_02) {
|
|
if (!Item.isNpc(local_06)) {
|
|
if ((Item.getZ(local_06) > (Item.getZ(local_02) - 10)) && (Item.getZ(local_06) >= (Item.getZ(local_02) + 10))) {
|
|
return;
|
|
}
|
|
}
|
|
/* loopnext */
|
|
}
|
|
arg_0A = (arg_0A - 80);
|
|
spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06);
|
|
suspend;
|
|
return;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x0F enterFastArea ===== */
|
|
function monster_enterFastArea() /* entry=278 class_id=0x04D0 slot=0x0F */
|
|
{
|
|
set_info(0x021B, *(arg_06));
|
|
process_exclude();
|
|
if (Item.getFrame(arg_06) == 0) {
|
|
local_02 = Item.getMapNum(arg_06);
|
|
if (!(local_02 & 8)) {
|
|
spawn MONSTER.equip(pid, 0, arg_06);
|
|
suspend;
|
|
}
|
|
}
|
|
return;
|
|
}
|