1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17
|
|
18
|
|
19
|
#ifndef RY_CMS_MIRRORS_H
|
20
|
#define RY_CMS_MIRRORS_H
|
21
|
|
22
|
|
23
|
#include "nel/misc/types_nl.h"
|
24
|
#include "nel/misc/entity_id.h"
|
25
|
#include "nel/misc/sheet_id.h"
|
26
|
#include "game_share/mode_and_behaviour.h"
|
27
|
#include "game_share/mirror.h"
|
28
|
#include "game_share/mirror_prop_value.h"
|
29
|
#include "game_share/ryzom_mirror_properties.h"
|
30
|
#include "game_share/player_visual_properties.h"
|
31
|
|
32
|
|
33
|
class CMirrors
|
34
|
{
|
35
|
public:
|
36
|
|
37
|
static void init( void (*cbUpdate)(), void (*cbSync)() = NULL, void (*cbRelease)() = NULL );
|
38
|
static void initMirror();
|
39
|
static void update() {}
|
40
|
static void processMirrorUpdates();
|
41
|
static void release();
|
42
|
|
43
|
static bool mirrorIsReady();
|
44
|
|
45
|
static TDataSetRow createEntity( NLMISC::CEntityId& entityId );
|
46
|
static void declareEntity( const TDataSetRow& entityIndex );
|
47
|
static void removeEntity( const NLMISC::CEntityId& entityId );
|
48
|
|
49
|
|
50
|
static bool exists( const TDataSetRow& entityIndex );
|
51
|
static const NLMISC::CEntityId& getEntityId( const TDataSetRow& entityIndex );
|
52
|
static TDataSetRow getDataSetRow( const NLMISC::CEntityId& entityId );
|
53
|
static uint16 getTeamId(const TDataSetRow& entityIndex);
|
54
|
|
55
|
static CAICoord x( const TDataSetRow& entityIndex );
|
56
|
static CAICoord y( const TDataSetRow& entityIndex );
|
57
|
static sint32 z( const TDataSetRow& entityIndex );
|
58
|
static float theta( const TDataSetRow& entityIndex );
|
59
|
static NLMISC::CSheetId sheet( const TDataSetRow& entityIndex );
|
60
|
static NLMISC::CSheetId sheetServer( const TDataSetRow& entityIndex );
|
61
|
static TDataSetRow target( const TDataSetRow& entityIndex );
|
62
|
|
63
|
static void initSheet( const TDataSetRow& entityIndex, const NLMISC::CSheetId& sheetId );
|
64
|
static void initSheetServer( const TDataSetRow& entityIndex, const NLMISC::CSheetId& sheetId );
|
65
|
static void initNPCAlias( const TDataSetRow& entityIndex, TAIAlias alias );
|
66
|
static void setPosAndTheta( const TDataSetRow& entityIndex, sint32 posX, sint32 posY, sint32 posZ, float angleRad );
|
67
|
static void setTheta( const TDataSetRow& entityIndex, float angleRad );
|
68
|
static void setBehaviour( const TDataSetRow& entityIndex, MBEHAV::EBehaviour b );
|
69
|
static void setTarget( const TDataSetRow& entityIndex, const TDataSetRow& target);
|
70
|
|
71
|
|
72
|
static void setVisualPropertyA( const TDataSetRow& entityIndex, const SPropVisualA &prop );
|
73
|
static void setVisualPropertyB( const TDataSetRow& entityIndex, const SPropVisualB &prop );
|
74
|
static void setVisualPropertyC( const TDataSetRow& entityIndex, const SPropVisualC &prop );
|
75
|
|
76
|
|
77
|
static void setVPA( const TDataSetRow& entityIndex, const SAltLookProp &prop );
|
78
|
|
79
|
static uint32 bestRoleLevel( const TDataSetRow& entityIndex );
|
80
|
|
81
|
static uint64 whoSeesMe( const TDataSetRow& entityIndex );
|
82
|
|
83
|
private:
|
84
|
|
85
|
CMirrors();
|
86
|
|
87
|
public:
|
88
|
static CMirror Mirror;
|
89
|
static CMirroredDataSet *DataSet;
|
90
|
static CMirroredDataSet *FameDataSet;
|
91
|
};
|
92
|
|
93
|
|
94
|
#define TheDataset (*CMirrors::DataSet)
|
95
|
|
96
|
|
97
|
#endif
|