My Project
PetDBProvider.h
1 #pragma once
2 #include "ic/ParaDatabase.h"
3 #include ".\StringTable.h"
4 #include ".\PetAIDBProvider.h"
5 
6 #include <vector>
7 
8 namespace ParaEngine
9 {
11  {
13  __int64 ID;
14  stStringTableDbRecord PetName; // record in string table
15 
17  string AssetName;
18  bool IsGlobal;
19  bool IsSnapToTerrain;
20 
23  float PetModelScale;
24  float PetRadius;
25  float PetFacing;
26  float posX;
27  float posY;
28  float posZ;
29 
31  // NOTE: record in database FORMAT "ID,ID,ID,......,ID"
32  vector<__int64> PetAIIndexVector;
34  float SentientRadius;
35  string OnLoadScript;
36 
39 
41  string Reserved1;
42  string Reserved2;
43  string Reserved3;
44  string Reserved4;
45  string Reserved5;
46  };
47 
48  // Class CPetDBProvider: CPetDBProvider contains all functions to access the
49  // pet database and the user interface data of pet control.
50  // This is a singleton class. Call GetInstance() to use this class.
52  {
53  public:
54  CPetDBProvider(void);
56  ~CPetDBProvider(void);
57  protected:
58  private:
59 
61  ParaEngine::asset_ptr<ParaInfoCenter::DBEntity> m_pDataBase;
62 
63  public:
65  static CPetDBProvider & GetInstance();
67  ParaInfoCenter::DBEntity* GetDBEntity();
69  void SetDBEntity(ParaInfoCenter::DBEntity* pDb);
70 
71 //#define TEST_PET
72 #ifdef TEST_PET
73  public:
74  // TODO: only for test
75  void TestDB();
76 #endif
77 
78  public:
83  bool InsertPetRecord(stPetDbRecord& record);
84 
89  bool DeletePetRecordByID(int ID);
90  };
91 }
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: PetDBProvider.h:51
bool IsKeptinCage
Kids Game Related Attribute.
Definition: PetDBProvider.h:38
__int64 ID
Common Attribute.
Definition: PetDBProvider.h:13
string Reserved1
Reserved Attribute.
Definition: PetDBProvider.h:41
string AssetName
Engine Asset Management Attribute.
Definition: PetDBProvider.h:17
string PetModeFilePath
Appearance Related Attribute.
Definition: PetDBProvider.h:22
Definition: StringTable.h:7
a single database file.
Definition: ICDBManager.h:39
Definition: PetDBProvider.h:10
float PerceptiveRadius
index list into Pet AI entries
Definition: PetDBProvider.h:33
vector< __int64 > PetAIIndexVector
AI Related Attribute.
Definition: PetDBProvider.h:32