Planeshift
pstrainerinfo.h
Go to the documentation of this file.
1 /*
2  * pstrainerinfo.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 __PSTRAINERINFO_H__
20 #define __PSTRAINERINFO_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 #include "psskills.h"
36 
37 class psSkillInfo;
38 
40 {
42  int min_rank;
43  int max_rank;
44  float min_faction;
45 };
46 
50 class psTrainerInfo : public csRefCount
51 {
52 public:
53  bool Load(PID pid);
55  bool CanTrainSkill(PSSKILL skill, unsigned int rank, float faction);
56 
57 private:
58  csPDelArray<psTrainerSkill> skills;
59 
60  psSkillInfo* FindSkill(int id);
61  psSkillInfo* FindSkill(const csString &name);
62 };
63 
64 #endif
Represents a skill an NPC, player or pet can learn.
Definition: psskills.h:72
PSSKILL
Definition: psskills.h:44
Holds information about the skills a character (usually NPC) can teach.
Definition: pstrainerinfo.h:50
psSkillInfo * skill
Definition: pstrainerinfo.h:41