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.23 by root, Thu Dec 14 22:45:41 2006 UTC vs.
Revision 1.25 by root, Wed Dec 20 09:14:22 2006 UTC

23 23
24#include <global.h> 24#include <global.h>
25#include <spells.h> 25#include <spells.h>
26#include <skills.h> 26#include <skills.h>
27#include <living.h> 27#include <living.h>
28#include <newclient.h>
29#ifndef __CEXTRACT__
30# include <sproto.h> 28#include <sproto.h>
31#endif
32#include <math.h> 29#include <math.h>
33 30
34/* this is a measure of how effective store specialisation is. A general store 31/* this is a measure of how effective store specialisation is. A general store
35 * will offer this proportion of the 'maximum' price, a specialised store will 32 * will offer this proportion of the 'maximum' price, a specialised store will
36 * offer a range of prices around it such that the maximum price is always one 33 * offer a range of prices around it such that the maximum price is always one
1228 if (nx < 0 || ny < 0 || nx > MAGIC_MAP_SIZE || ny > MAGIC_MAP_SIZE) 1225 if (nx < 0 || ny < 0 || nx > MAGIC_MAP_SIZE || ny > MAGIC_MAP_SIZE)
1229 continue; 1226 continue;
1230 1227
1231 if (map_mark[nx + MAGIC_MAP_SIZE * ny] & FACE_FLOOR) 1228 if (map_mark[nx + MAGIC_MAP_SIZE * ny] & FACE_FLOOR)
1232 { 1229 {
1233 stack = get_map_ob (op->map, i, j); 1230 stack = GET_MAP_OB (op->map, i, j);
1234 1231
1235 while (stack) 1232 while (stack)
1236 { 1233 {
1237 if (QUERY_FLAG (stack, FLAG_UNPAID)) 1234 if (QUERY_FLAG (stack, FLAG_UNPAID))
1238 { 1235 {
1292 1289
1293/* elmex: this function checks whether we are in a shop or not */ 1290/* elmex: this function checks whether we are in a shop or not */
1294bool 1291bool
1295is_in_shop (maptile *map, int x, int y) 1292is_in_shop (maptile *map, int x, int y)
1296{ 1293{
1297 for (object *floor = get_map_ob (map, x, y); floor; floor = floor->above) 1294 for (object *floor = GET_MAP_OB (map, x, y); floor; floor = floor->above)
1298 if (floor->type == SHOP_FLOOR) 1295 if (floor->type == SHOP_FLOOR)
1299 return true; 1296 return true;
1300 1297
1301 return false; 1298 return false;
1302} 1299}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines