|
Atrinik Server 2.5
|
#include <global.h>Go to the source code of this file.
Functions | |
| static sint64 | pay_from_container (object *op, object *pouch, sint64 to_pay) |
| sint64 | query_cost (object *tmp, object *who, int flag) |
| static archetype * | find_next_coin (sint64 c, int *cointype) |
| char * | cost_string_from_value (sint64 cost) |
| char * | query_cost_string (object *tmp, object *who, int flag) |
| sint64 | query_money (object *op) |
| int | pay_for_amount (sint64 to_pay, object *pl) |
| int | pay_for_item (object *op, object *pl) |
| int | get_payment (object *pl, object *op) |
| void | sell_item (object *op, object *pl, sint64 value) |
| int | get_money_from_string (const char *text, struct _money_block *money) |
| int | query_money_type (object *op, int value) |
| sint64 | remove_money_type (object *who, object *op, sint64 value, sint64 amount) |
| void | insert_money_in_player (object *pl, object *money, uint32 nrof) |
| object * | bank_get_info (object *op) |
| object * | bank_create_info (object *op) |
| object * | bank_get_create_info (object *op) |
| sint64 | bank_get_balance (object *op) |
| int | bank_deposit (object *op, const char *text, sint64 *value) |
| int | bank_withdraw (object *op, const char *text, sint64 *value) |
| sint64 | insert_coins (object *pl, sint64 value) |
Functions dealing with shop handling, bargaining, etc.
Definition in file shop.c.
| int bank_deposit | ( | object * | op, |
| const char * | text, | ||
| sint64 * | value | ||
| ) |
Deposit money to player's bank object.
| op | Player. | |
| text | What was said to trigger this. | |
| [out] | value | Will contain the deposited amount. |
| sint64 bank_get_balance | ( | object * | op | ) |
| int bank_withdraw | ( | object * | op, |
| const char * | text, | ||
| sint64 * | value | ||
| ) |
Withdraw money player previously stored in bank object.
| op | Player. | |
| bank | Bank object in player's inventory. | |
| text | What was said to trigger this. | |
| [out] | value | Will contain the withdrawn amount. |
| char* cost_string_from_value | ( | sint64 | cost | ) |
| static archetype* find_next_coin | ( | sint64 | c, |
| int * | cointype | ||
| ) | [static] |
| int get_money_from_string | ( | const char * | text, |
| struct _money_block * | money | ||
| ) |
Get money from a string.
| text | Text to get money from. |
| money | Money block structure. |
Descends containers looking for unpaid items, and pays for them.
| pl | Player buying the stuff. |
| op | Object we are examining. If op has and inventory, we examine that. Ii there are objects below op, we descend down. |
| 0 | Player still has unpaid items. |
| 1 | Player has paid for everything. |
| sint64 insert_coins | ( | object * | pl, |
| sint64 | value | ||
| ) |
| int pay_for_amount | ( | sint64 | to_pay, |
| object * | pl | ||
| ) |
Takes the amount of money from the the player inventory and from it's various pouches using the pay_from_container() function.
| to_pay | Amount to pay. |
| pl | Player paying. |
This is a wrapper for pay_from_container, which is called for the player, then for each active container that can hold money until op is paid for. Change will be left wherever the last of the price was paid from.
| op | Object to buy. |
| pl | Player buying. |
Query the cost of an object.
This is really a wrapper for cost_string_from_value() and query_cost().
| tmp | Object we're querying the price of. |
| who | Who is inquiring. Can be NULL, only meaningful if player. |
| flag | Combination of F_xxx flags. |
| sint64 query_money | ( | object * | op | ) |
| int query_money_type | ( | object * | op, |
| int | value | ||
| ) |
Player is selling an item. Give money, print appropriate messages.
| op | Object to sell. |
| pl | Player. Shouldn't be NULL or non player. |
| value | If op is NULL, this value is used instead of using query_cost(). |
1.7.4