 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
106 "The shopkeeper gives you a friendly wave.");
107 else if (opinion > 0.75)
109 "The shopkeeper waves to you.");
110 else if (opinion > 0.5)
112 "The shopkeeper ignores you.");
115 "The shopkeeper glares at you with contempt.");
@ llevError
Error, serious thing.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
void esrv_map_scroll(socket_struct *ns, int dx, int dy)
object * inv
Pointer to the first object in the inventory.
uint16_t look_position
Start of drawing of look window.
#define QUERY_FLAG(xyz, p)
struct mapstruct * map
Pointer to the map in which this object is present.
void register_move_on(int ob_type, move_on_func method)
Registers the move_on method for the given type.
#define MSG_TYPE_SHOP_MISC
Random messages.
#define FLAG_NO_PICK
Object can't be picked up.
#define FLAG_ALIVE
Object can fight (or be fought)
uint32_t update_look
If true, we need to send the look window.
int16_t y
Position in the map for this object.
struct player * contr
Pointer to the player which control this object.
int teleport(object *teleporter, uint8_t tele_type, object *user)
Teleport an item around a nearby random teleporter of specified type.
short freearr_y[SIZEOFFREE]
Y offset when searching around a spot.
#define MSG_TYPE_APPLY_SUCCESS
Was able to apply object.
method_ret common_pre_ob_move_on(object *trap, object *victim, object *originator)
uint8_t type
PLAYER, BULLET, etc.
int shop_pay_unpaid(object *pl, object *op)
Pay for each unpaid item carried by a player, including those inside containers.
void leave(player *pl, int draw_exit)
Player logs out, or was disconnected.
#define FOR_INV_FINISH()
Finishes FOR_INV_PREPARE().
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Same as object_insert_in_map() except it handle separate coordinates and do a clean job preparing mul...
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
Move an object (even linked objects) to another spot on the same map.
char method_ret
Define some standard return values for callbacks which don't need to return any other results.
#define NDI_UNIQUE
Print immediately, don't buffer.
static method_ret shop_mat_type_move_on(object *trap, object *victim, object *originator)
Move on this Shop Mat object.
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
object_find_free_spot(object, map, x, y, start, stop) will search for a spot at the given map and coo...
bool shop_contains(object *ob)
Check if an object is in a shop.
sstring msg
If this is a book/sign/magic mouth/etc.
#define CLEAR_FLAG(xyz, p)
int can_pay(object *pl)
Checks all unpaid items in op's inventory, adds up all the money they have, and checks that they can ...
void object_remove(object *op)
This function removes the object op from the linked list of objects which it is currently tied to.
double shop_approval(const mapstruct *map, const object *player)
Return the approval ratio for a shop for a given player.
#define FLAG_UNPAID
Object hasn't been paid for yet.
void init_type_shop_mat(void)
Initializer for the SHOP_MAT object type.
socket_struct * socket
Socket information for this player.
short freearr_x[SIZEOFFREE]
X offset when searching around a spot.
#define MSG_TYPE_APPLY
Applying objects.
void common_post_ob_move_on(object *trap, object *victim, object *originator)
#define FOR_INV_PREPARE(op_, it_)
Constructs a loop iterating over the inventory of an object.
#define FLAG_NO_APPLY
Avoids step_on/fly_on to this object.