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.45 by elmex, Mon Nov 26 11:41:02 2007 UTC vs.
Revision 1.47 by root, Sun Apr 13 01:34:09 2008 UTC

42 42
43static void pay_from_container (object *pl, object *pouch, sint64 &to_pay); 43static void pay_from_container (object *pl, object *pouch, sint64 &to_pay);
44static sint64 value_limit (sint64 val, int quantity, const object *who, int isshop); 44static sint64 value_limit (sint64 val, int quantity, const object *who, int isshop);
45static double shop_specialisation_ratio (const object *item, const maptile *map); 45static double shop_specialisation_ratio (const object *item, const maptile *map);
46static double shop_greed (const maptile *map); 46static double shop_greed (const maptile *map);
47
48#define NUM_COINS 4 /* number of coin types */
49static 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 :( */
843sint64 840sint64
844pay_player_arch (object *pl, const char *arch, sint64 amount) 841pay_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 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines