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.42 by root, Sat Jul 21 19:18:02 2007 UTC vs.
Revision 1.44 by root, Thu Nov 8 19:43:28 2007 UTC

1/* 1/*
2 * This file is part of Crossfire TRT, the Roguelike Realtime MORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team 4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * Crossfire TRT is free software: you can redistribute it and/or modify 8 * Deliantra is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or 10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version. 11 * (at your 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,
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 GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * 20 *
21 * The authors can be reached via e-mail to <crossfire@schmorp.de> 21 * The authors can be reached via e-mail to <support@deliantra.net>
22 */ 22 */
23 23
24#include <global.h> 24#include <global.h>
25#include <spells.h> 25#include <spells.h>
26#include <skills.h> 26#include <skills.h>
786{ 786{
787 int count = 0; 787 int count = 0;
788 archetype *at = 0; 788 archetype *at = 0;
789 object *pouch = 0, *tmp = 0; 789 object *pouch = 0, *tmp = 0;
790 790
791 for (count = 0; coins[count] != NULL; count++) 791 for (count = 0; coins[count]; count++)
792 { 792 {
793 at = archetype::find (coins[count]); 793 at = archetype::find (coins[count]);
794 794
795 if (at == NULL) 795 if (at == NULL)
796 LOG (llevError, "Could not find %s archetype\n", coins[count]); 796 LOG (llevError, "Could not find %s archetype\n", coins[count]);
909 change_exp (pl, extra_gain / 10, "bargaining", SK_EXP_NONE); 909 change_exp (pl, extra_gain / 10, "bargaining", SK_EXP_NONE);
910 910
911 pay_player (pl, amount); 911 pay_player (pl, amount);
912 912
913 new_draw_info_format (NDI_UNIQUE, 0, pl, "You receive %s for %s.", query_cost_string (op, pl, F_SELL | F_SHOP), query_name (op)); 913 new_draw_info_format (NDI_UNIQUE, 0, pl, "You receive %s for %s.", query_cost_string (op, pl, F_SELL | F_SHOP), query_name (op));
914 pl->play_sound (sound_find ("shop_sell"));
914 915
915 SET_FLAG (op, FLAG_UNPAID); 916 SET_FLAG (op, FLAG_UNPAID);
916 identify (op); 917 identify (op);
917} 918}
918
919 919
920/* returns a double that is the ratio of the price that a shop will offer for 920/* returns a double that is the ratio of the price that a shop will offer for
921 * item based on the shops specialisation. Does not take account of greed, 921 * item based on the shops specialisation. Does not take account of greed,
922 * returned value is between SPECIALISATION_EFFECT and 1. 922 * returned value is between SPECIALISATION_EFFECT and 1.
923 */ 923 */
1278 if (floor->type == SHOP_FLOOR) 1278 if (floor->type == SHOP_FLOOR)
1279 return true; 1279 return true;
1280 1280
1281 return false; 1281 return false;
1282} 1282}
1283

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines