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.89 by root, Sat Aug 13 23:22:46 2011 UTC vs.
Revision 1.92 by root, Mon Oct 29 23:55:55 2012 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992 Frank Tore Johansen 6 * Copyright (©) 1992 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the 9 * the terms of the Affero GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your 10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version. 11 * option) any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the Affero GNU General Public License 18 * You should have received a copy of the Affero GNU General Public License
19 * and the GNU General Public License along with this program. If not, see 19 * and the GNU General Public License along with this program. If not, see
20 * <http://www.gnu.org/licenses/>. 20 * <http://www.gnu.org/licenses/>.
21 * 21 *
22 * The authors can be reached via e-mail to <support@deliantra.net> 22 * The authors can be reached via e-mail to <support@deliantra.net>
23 */ 23 */
24 24
25#include <global.h> 25#include <global.h>
26#include <spells.h> 26#include <spells.h>
720void 720void
721pay_player (object *pl, sint64 amount) 721pay_player (object *pl, sint64 amount)
722{ 722{
723 int count = 0; 723 int count = 0;
724 archetype *at = 0; 724 archetype *at = 0;
725 object *pouch = 0, *tmp = 0; 725 object *pouch = 0;
726 726
727 for (count = 0; coins[count]; count++) 727 for (count = 0; coins[count]; count++)
728 { 728 {
729 at = archetype::find (coins[count]); 729 at = archetype::find (coins[count]);
730 730
908/* limit the value of items based on the wealth of the shop. If the item is close 908/* limit the value of items based on the wealth of the shop. If the item is close
909 * to the maximum value a shop will offer, we start to reduce it, if the item is 909 * to the maximum value a shop will offer, we start to reduce it, if the item is
910 * below the minimum value the shop is prepared to trade in, then we don't 910 * below the minimum value the shop is prepared to trade in, then we don't
911 * want it and offer nothing. If it isn't a shop, check whether we should do generic 911 * want it and offer nothing. If it isn't a shop, check whether we should do generic
912 * value reduction. 912 * value reduction.
913 * 913 *
914 */ 914 */
915static sint64 915static sint64
916value_limit (sint64 val, int quantity, const object *who, int isshop) 916value_limit (sint64 val, int quantity, const object *who, int isshop)
917{ 917{
918 sint64 newval, unit_price, tmpshopmax; 918 sint64 newval, unit_price, tmpshopmax;
958{ 958{
959 dynbuf_text buf; 959 dynbuf_text buf;
960 maptile *map = op->map; 960 maptile *map = op->map;
961 961
962 /*shopitems *items=map->shopitems; */ 962 /*shopitems *items=map->shopitems; */
963 int pos = 0, i; 963 int i;
964 double opinion = 0; 964 double opinion = 0;
965 965
966 if (op->type != PLAYER) 966 if (op->type != PLAYER)
967 return 0; 967 return 0;
968 968

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines