ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/item.C
(Generate patch)

Comparing deliantra/server/socket/item.C (file contents):
Revision 1.78 by root, Mon Apr 27 01:38:49 2009 UTC vs.
Revision 1.80 by root, Mon Oct 19 21:48:49 2009 UTC

3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * it under the terms of the GNU General Public License as published by 9 * the terms of the Affero GNU General Public License as published by the
10 * the Free Software Foundation, either version 3 of the License, or 10 * Free Software Foundation, either version 3 of the License, or (at your
11 * (at your option) any later version. 11 * option) any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the Affero GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 * and the GNU General Public License along with this program. If not, see
20 * <http://www.gnu.org/licenses/>.
20 * 21 *
21 * The authors can be reached via e-mail to <support@deliantra.net> 22 * The authors can be reached via e-mail to <support@deliantra.net>
22 */ 23 */
23 24
24/** 25/**
85 default: 86 default:
86 flags = a_applied; 87 flags = a_applied;
87 break; 88 break;
88 } 89 }
89 90
90 if (op->type == CONTAINER && ((op->env && op->env->container == op) || (!op->env && QUERY_FLAG (op, FLAG_APPLIED)))) 91 if (op->is_open_container ())
91 flags |= F_OPEN; 92 flags |= F_OPEN;
92 93
93 if (QUERY_FLAG (op, FLAG_KNOWN_CURSED)) 94 if (QUERY_FLAG (op, FLAG_KNOWN_CURSED))
94 { 95 {
95 if (QUERY_FLAG (op, FLAG_DAMNED)) 96 if (QUERY_FLAG (op, FLAG_DAMNED))
532 return pl; 533 return pl;
533 534
534 for (object *op = pl->inv; op; op = op->below) 535 for (object *op = pl->inv; op; op = op->below)
535 if (op->count == count) 536 if (op->count == count)
536 return op; 537 return op;
537 else if (op->type == CONTAINER && pl->container == op) 538 else if (op->type == CONTAINER && pl->container_ () == op)
538 for (object *tmp = op->inv; tmp; tmp = tmp->below) 539 for (object *tmp = op->inv; tmp; tmp = tmp->below)
539 if (tmp->count == count) 540 if (tmp->count == count)
540 return tmp; 541 return tmp;
541 542
542 for (object *op = GET_MAP_OB (pl->map, pl->x, pl->y); op; op = op->above) 543 for (object *op = GET_MAP_OB (pl->map, pl->x, pl->y); op; op = op->above)
543 if (op->head && op->head->count == count) 544 if (op->head && op->head->count == count)
544 return op; 545 return op;
545 else if (op->count == count) 546 else if (op->count == count)
546 return op; 547 return op;
547 else if (op->type == CONTAINER && pl->container == op) 548 else if (op->type == CONTAINER && pl->container_ () == op)
548 for (object *tmp = op->inv; tmp; tmp = tmp->below) 549 for (object *tmp = op->inv; tmp; tmp = tmp->below)
549 if (tmp->count == count) 550 if (tmp->count == count)
550 return tmp; 551 return tmp;
551 552
552#if 0 553#if 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines