/* sub_623FF */ internal static void remove_spell_from_scroll(int affect, Item item, Player player) { int affect_index = 0; for (int index = 1; index <= 3; index++) { if (((int)item.getAffect(index) & 0x7F) == affect) { affect_index = index; } } if (affect_index != 0) { item.setAffect(affect_index, 0); item.namenum2 -= 1; if (item.namenum2 < 0xd2) { ovr025.lose_item(item, player); } } }