Planeshift
psmerchantinfo.h
Go to the documentation of this file.
1 /*
2  * psmerchantinfo.h
3  *
4  * Copyright (C) 2001 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 #ifndef __PSMERCHANTINFO_H__
20 #define __PSMERCHANTINFO_H__
21 //=============================================================================
22 // Crystal Space Includes
23 //=============================================================================
24 #include <csutil/csstring.h>
25 #include <csutil/array.h>
26 #include <csutil/refcount.h>
27 
28 //=============================================================================
29 // Project Includes
30 //=============================================================================
31 
32 //=============================================================================
33 // Local Includes
34 //=============================================================================
35 
41 {
42 
43  unsigned int id;
44  csString name;
45  unsigned int repairToolStatId;
51 };
52 
53 
59 class psMerchantInfo : public csRefCount
60 {
61 public:
68  bool Load(PID pid);
69 
70  psItemCategory* FindCategory(int id);
71  psItemCategory* FindCategory(const csString &name);
72 
73  csArray<psItemCategory*> categories;
74 
75 };
76 
79 #endif
unsigned int id
Unique identifier for the category.
csString name
Human readable name of category.
unsigned int repairToolStatId
Item_stats id of item required to do a repair on this category.
int identifySkillId
ID of skill checked when item is examined by player.
int repairSkillId
ID of skill which is used to calculate result of repair.
bool repairToolConsumed
Flag to tell us whether the repair tool is consumed in the repair or not. (Kit or Tool) ...
int repairDifficultyPct
Difficulty level to repair this category of items.
This class retrieves the merchant categories for an NPC.
csArray< psItemCategory * > categories
int identifyMinSkill
Minimum skill level to allow player to identify details of examined item.