1/* 2 * 3 * Copyright (C) 2006 The Exult Team 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 20void setExchangedItemFlags 0x92B () 21{ 22 var item_shapes = exchangedItemList(1); 23 var item_qualities = exchangedItemList(2); 24 var item_frames = exchangedItemList(3); 25 var item_flags = exchangedItemList(4); 26 var index = 1; 27 var count = (UI_get_array_size(item_shapes) + 1); 28 while (index < count) 29 { 30 // Iterate through the list of exchanged items and set the flag for 31 // each item possessed by the party: 32 if (hasItemCount(PARTY, 1, item_shapes[index], item_qualities[index], item_frames[index])) 33 if (item_flags[index] != -1) 34 gflags[item_flags[index]] = true; 35 index += 1; 36 } 37} 38 39var exchangedItemList 0x92C (var index) 40{ 41 var rr; 42 if (index == 1) 43 return [SHAPE_PINECONE, SHAPE_NEST_EGG, SHAPE_REAGENT, 44 SHAPE_ALCHEMY_APPARATUS, SHAPE_PUMICE, SHAPE_BRUSH, 45 SHAPE_RING, SHAPE_STOCKINGS, SHAPE_FOOD, SHAPE_LARGE_SKULL, 46 SHAPE_MONITOR_SHIELD, SHAPE_BOTTLE, SHAPE_URN, SHAPE_BOOTS, 47 SHAPE_FILARI, SHAPE_SEVERED_LIMB, SHAPE_LEATHER_HELM, 48 SHAPE_BREAST_PLATE]; 49 50 else if (index == 2) 51 return [false, false, false, false, false, false, false, false, false, 52 false, false, false, 255, false, QUALITY_ANY, false, false, 53 false]; 54 55 else if (index == 3) 56 return [0, 3, 15, 1, 0, 6, 0, 0, 21, 0, 0, 16, 0, 5, FRAME_ANY, 0, 4, 0]; 57 58 else if (index == 4) 59 return [STORM_PINECONE, STORM_BLUE_EGG, STORM_RUDDY_ROCK, 60 STORM_LAB_APPARATUS, STORM_PUMICE, STORM_GOBLIN_BRUSH, 61 STORM_WEDDING_RING, STORM_STOCKINGS, -1, STORM_BEAR_SKULL, 62 STORM_MONITOR_SHIELD, STORM_ICEWINE, STORM_URN, STORM_SLIPPERS, 63 STORM_FILARI, STORM_SEVERED_HAND, STORM_FUR_CAP, 64 STORM_BREAST_PLATE]; 65} 66