… | |
… | |
42 | |
42 | |
43 | static void pay_from_container (object *pl, object *pouch, sint64 &to_pay); |
43 | static void pay_from_container (object *pl, object *pouch, sint64 &to_pay); |
44 | static sint64 value_limit (sint64 val, int quantity, const object *who, int isshop); |
44 | static sint64 value_limit (sint64 val, int quantity, const object *who, int isshop); |
45 | static double shop_specialisation_ratio (const object *item, const maptile *map); |
45 | static double shop_specialisation_ratio (const object *item, const maptile *map); |
46 | static double shop_greed (const maptile *map); |
46 | static double shop_greed (const maptile *map); |
47 | |
|
|
48 | #define NUM_COINS 4 /* number of coin types */ |
|
|
49 | static const char *const coins[] = { "royalty", "platinacoin", "goldcoin", "silvercoin", NULL }; |
|
|
50 | |
47 | |
51 | /* Added F_TRUE flag to define.h to mean that the price should not |
48 | /* Added F_TRUE flag to define.h to mean that the price should not |
52 | * be adjusted by players charisma. With F_TRUE, it returns the amount |
49 | * be adjusted by players charisma. With F_TRUE, it returns the amount |
53 | * that the item is worth, if it was sold, but unadjusted by charisma. |
50 | * that the item is worth, if it was sold, but unadjusted by charisma. |
54 | * This is needed for alchemy, to to determine what value of gold nuggets |
51 | * This is needed for alchemy, to to determine what value of gold nuggets |
… | |
… | |
842 | /* elmex: this is for the bank plugin :( */ |
839 | /* elmex: this is for the bank plugin :( */ |
843 | sint64 |
840 | sint64 |
844 | pay_player_arch (object *pl, const char *arch, sint64 amount) |
841 | pay_player_arch (object *pl, const char *arch, sint64 amount) |
845 | { |
842 | { |
846 | archetype *at = archetype::find (arch); |
843 | archetype *at = archetype::find (arch); |
847 | object *tmp = NULL; |
|
|
848 | |
844 | |
849 | if (at == NULL) |
845 | if (!at) |
850 | return 0; |
846 | return 0; |
851 | |
847 | |
852 | if (amount > 0) |
848 | if (amount > 0) |
853 | { |
849 | { |
854 | tmp = arch_to_object (at); |
850 | object *tmp = arch_to_object (at); |
855 | tmp->nrof = amount; |
851 | tmp->nrof = amount; |
856 | tmp = insert_ob_in_ob (tmp, pl); |
852 | tmp = insert_ob_in_ob (tmp, pl); |
857 | esrv_send_item (pl, tmp); |
853 | esrv_send_item (pl, tmp); |
858 | esrv_send_item (pl, pl); |
854 | esrv_send_item (pl, pl); |
859 | } |
855 | } |