2 #include "ic/ParaDatabase.h" 13 POSITION_FACING = 0x1<<0,
14 APPEARANCE_ATTRIBUTES = 0x1<<1,
15 MENTAL_STATE_0 = 0x1<<2,
16 MENTAL_STATE_1 = 0x1<<3,
17 MENTAL_STATE_2 = 0x1<<4,
18 MENTAL_STATE_3 = 0x1<<5,
19 RPG_ATTRIBUTES = 0x1<<6,
20 DND_ATTRIBUTES = 0x1<<7,
21 ALL_ATTRIBUTES = 0xffffffff
29 bool m_bSnapToTerrain;
44 DWORD m_MentalState[4];
68 float m_fDefense, m_fDefenseflat, m_fDefenseMental;
71 float m_fAttackMelee, m_fAttackRanged, m_fAttackMental;
79 float m_fPerceptiveRadius;
80 float m_fSentientRadius;
82 DWORD m_dwSentientField;
83 string m_sOnLoadScript;
84 vector<byte> m_binCustomAppearance;
88 void LoadDefaultValues();
90 typedef vector<CNpcDbItem> NPCDBItemList;
104 bool IsValid() {
return m_pDataBase.get() !=0;};
114 void SetDBEntity(
const string& sConnectionstring);
117 void ResetDatabase();
120 void ValidateDatabase();
135 bool SelectNPCByID(
int nNPCID,
CNpcDbItem& pOut);
142 bool SelectNPCByName(
const string& sName,
CNpcDbItem& pOut);
151 bool SelectNPCListByRegion(NPCDBItemList* pOut,
const Vector3& vMin,
const Vector3& vMax);
164 int GetNPCIDByName(
const string& name);
177 bool DeleteNPCByID(
int nNPCID);
183 bool DeleteNPCByName(
const string& sName);
192 bool UpdateNPC(
const CNpcDbItem& npc, DWORD dwFields);
196 ParaEngine::asset_ptr<DBEntity> m_pDataBase;
float m_fIntelligence
character Intelligence
Definition: NpcDatabase.h:65
int m_nCharacterType
Definition: NpcDatabase.h:41
float m_fHeight
the height of the character.
Definition: NpcDatabase.h:53
float m_fAge
the age of the character.
Definition: NpcDatabase.h:51
UPDATE_FIELDS
selectively update data fields.
Definition: NpcDatabase.h:11
different physics engine has different winding order.
Definition: EventBinding.h:32
float m_fMaxLifeLoad
the maximum load that a character can lift or carry
Definition: NpcDatabase.h:73
int m_nHeroPoints
levels can be deducted from this value.
Definition: NpcDatabase.h:75
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
float m_fStrength
character strength
Definition: NpcDatabase.h:61
NPC data provider.
Definition: NpcDatabase.h:93
float m_fWeight
the weight of the character.
Definition: NpcDatabase.h:55
float m_fLifePoint
the life or hit point of the character.
Definition: NpcDatabase.h:49
float m_fBaseDefense
character base defense
Definition: NpcDatabase.h:67
NPC database item (complete)
Definition: NpcDatabase.h:8
int m_nID
character ID in database.
Definition: NpcDatabase.h:38
float m_fBaseAttack
character base attack
Definition: NpcDatabase.h:70
DBEntity * GetDBEntity()
get the database object associated with this provider
Definition: NpcDatabase.h:109
a single database file.
Definition: ICDBManager.h:39
bool IsValid()
whether db is opened.
Definition: NpcDatabase.h:104
int m_nOccupation
the occupation of the character.
Definition: NpcDatabase.h:57
float m_fDexterity
character dexterity
Definition: NpcDatabase.h:63
CICRecordSet is both the result and wrapper of a sql statement(procedure).
Definition: ICRecordSet.h:90
int m_nRaceSex
the race and sex of the character.
Definition: NpcDatabase.h:59