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

Comparing deliantra/server/server/shop.C (file contents):
Revision 1.6 by root, Tue Aug 29 08:01:38 2006 UTC vs.
Revision 1.7 by elmex, Tue Aug 29 10:51:43 2006 UTC

1/* 1/*
2 * static char *rcsid_shop_c = 2 * static char *rcsid_shop_c =
3 * "$Id: shop.C,v 1.6 2006/08/29 08:01:38 root Exp $"; 3 * "$Id: shop.C,v 1.7 2006/08/29 10:51:43 elmex Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
1179 free(items[i].item_real); 1179 free(items[i].item_real);
1180 } 1180 }
1181 } 1181 }
1182 free(items); 1182 free(items);
1183} 1183}
1184
1185/* elmex: this function checks whether the object is in a shop */
1186bool is_in_shop (object *o)
1187{
1188 if (!o->map)
1189 return false;
1190
1191 return is_in_shop (o->map, o->x, o->y);
1192}
1193
1194/* elmex: this function checks whether we are in a shop or not */
1195bool is_in_shop (mapstruct *map, int x, int y)
1196{
1197 for (object *floor = get_map_ob (map, x, y); floor; floor = floor->above)
1198 if (floor->type == SHOP_FLOOR)
1199 return true;
1200
1201 return false;
1202}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines