CDB is now part of NLMISC. However it still requires some work!

This commit is contained in:
dfighter1985 2012-04-16 06:08:12 +02:00
parent a2d398f759
commit 3a93d3ac6a
70 changed files with 481 additions and 399 deletions

View file

@ -20,18 +20,17 @@
#define CDB_H
// misc
#include "nel/misc/types_nl.h"
#include "nel/misc/smart_ptr.h"
#include "nel/misc/string_mapper.h"
#include "types_nl.h"
#include "smart_ptr.h"
#include "string_mapper.h"
#include "sstring.h"
#include <libxml/parser.h>
namespace NLMISC
{
class IProgressCallback;
class CBitMemStream;
}
class IProgressCallback;
class CBitMemStream;
class CCDBNodeLeaf;
class CCDBNodeBranch;
@ -48,7 +47,7 @@ extern bool VerboseDatabase;
* \date 2002
*/
class ICDBNode : public NLMISC::CRefCount
class ICDBNode : public CRefCount
{
//-----------------------------------------------------------------------
// end of IDBNode interface
@ -78,7 +77,7 @@ public:
* \author Nevrax France
* \date 2002
*/
class IPropertyObserver : public NLMISC::CRefCount
class IPropertyObserver : public CRefCount
{
public :
virtual ~IPropertyObserver() {}
@ -198,7 +197,7 @@ public :
* Build the structure of the database from a file
* \param f is the stream
*/
virtual void init( xmlNodePtr node, NLMISC::IProgressCallback &progressCallBack, bool mapBanks=false ) = 0;
virtual void init( xmlNodePtr node, IProgressCallback &progressCallBack, bool mapBanks=false ) = 0;
/**
* Save a backup of the database
@ -212,7 +211,7 @@ public :
* \param gc the server gameCycle of this update. Any outdated update are aborted
* \param f : the stream.
*/
virtual void readDelta( NLMISC::TGameCycle gc, NLMISC::CBitMemStream & f ) = 0;
virtual void readDelta( TGameCycle gc, CBitMemStream & f ) = 0;
/**
* Get a node . Create it if it does not exist yet
@ -252,7 +251,7 @@ public :
virtual bool setProp( CTextId& id, sint64 value ) = 0;
/// Reset all leaf data from this point
virtual void resetData(NLMISC::TGameCycle gc, bool forceReset=false) = 0;
virtual void resetData(TGameCycle gc, bool forceReset=false) = 0;
/**
* Clear the node and his children
@ -314,16 +313,16 @@ public :
virtual void display (const std::string &/* prefix */){}
/// Return the string id corresponding to the argument
static NLMISC::TStringId getStringId(const std::string& nodeName)
static TStringId getStringId(const std::string& nodeName)
{
if (_DBSM == NULL) _DBSM = NLMISC::CStringMapper::createLocalMapper();
if (_DBSM == NULL) _DBSM = CStringMapper::createLocalMapper();
return _DBSM->localMap(nodeName);
}
/// Return a pointer to the string corresponding to the argument
static const std::string *getStringFromId(NLMISC::TStringId nodeStringId)
static const std::string *getStringFromId(TStringId nodeStringId)
{
if (_DBSM == NULL) _DBSM = NLMISC::CStringMapper::createLocalMapper();
if (_DBSM == NULL) _DBSM = CStringMapper::createLocalMapper();
return &_DBSM->localUnmap(nodeStringId);
}
@ -335,32 +334,34 @@ protected:
/// Constructor
ICDBNode() : _AtomicFlag(false)
{
if (_DBSM == NULL) _DBSM = NLMISC::CStringMapper::createLocalMapper();
_Name = NLMISC::CStringMapper::emptyId();
if (_DBSM == NULL) _DBSM = CStringMapper::createLocalMapper();
_Name = CStringMapper::emptyId();
}
/// Constructor
ICDBNode (const std::string &name) : _AtomicFlag(false)
{
if (_DBSM == NULL) _DBSM = NLMISC::CStringMapper::createLocalMapper();
if (_DBSM == NULL) _DBSM = CStringMapper::createLocalMapper();
_Name = _DBSM->localMap(name);
//_NameDbg = name;
}
// utility to build full name efficiently (without reallocating the string at each parent level)
void _buildFullName(NLMISC::CSString &fullName);
void _buildFullName(CSString &fullName);
/// Atomic flag: is the branch an atomic group, or is the leaf a member of an atomic group
bool _AtomicFlag : 1;
/// Name of the node
NLMISC::TStringId _Name;
TStringId _Name;
//std::string _NameDbg;
static NLMISC::CStringMapper *_DBSM;
static CStringMapper *_DBSM;
};
}
#endif // CDB_H

View file

@ -21,6 +21,8 @@
#include "cdb.h"
namespace NLMISC{
enum{
CDB_BANKS_MAX = 3,
CDB_BANK_INVALID
@ -36,7 +38,7 @@ class CCDBNodeBranch : public ICDBNode
{
public:
/// Triggered when the branch observers are updated
class IBranchObserverCallFlushObserver : public NLMISC::CRefCount{
class IBranchObserverCallFlushObserver : public CRefCount{
public:
virtual ~IBranchObserverCallFlushObserver(){}
virtual void onObserverCallFlush() = 0;
@ -54,7 +56,7 @@ public:
* Build the structure of the database from a file
* \param f is the stream
*/
void init( xmlNodePtr node, class NLMISC::IProgressCallback &progressCallBack, bool mapBanks=false );
void init( xmlNodePtr node, class IProgressCallback &progressCallBack, bool mapBanks=false );
/**
* Add a new sub node
@ -103,10 +105,10 @@ public:
void write( CTextId& id, FILE * f);
/// Update the database from the delta, but map the first level with the bank mapping (see _CDBBankToUnifiedIndexMapping)
void readAndMapDelta( NLMISC::TGameCycle gc, NLMISC::CBitMemStream& s, uint bank );
void readAndMapDelta( TGameCycle gc, CBitMemStream& s, uint bank );
/// Update the database from a stream coming from the FE
void readDelta( NLMISC::TGameCycle gc, NLMISC::CBitMemStream & f );
void readDelta( TGameCycle gc, CBitMemStream & f );
/**
* Return the value of a property (the update flag is set to false)
@ -129,7 +131,7 @@ public:
void clear();
/// Reset the data corresponding to the bank (works only on top level node)
void resetBank( NLMISC::TGameCycle gc, uint bank)
void resetBank( TGameCycle gc, uint bank)
{
//nlassert( getParent() == NULL );
for ( uint i=0; i!=_Nodes.size(); ++i )
@ -140,7 +142,7 @@ public:
}
/// Reset all leaf data from this point
void resetData(NLMISC::TGameCycle gc, bool forceReset=false)
void resetData(TGameCycle gc, bool forceReset=false)
{
for ( uint i=0; i!=_Nodes.size(); ++i )
{
@ -230,7 +232,7 @@ public:
static void removeFlushObserver( IBranchObserverCallFlushObserver *observer );
// mark this branch and parent branch as 'modified'. This is usually called by sub-leaves
void linkInModifiedNodeList(NLMISC::TStringId modifiedLeafName);
void linkInModifiedNodeList(TStringId modifiedLeafName);
/// Find a subnode at this level
ICDBNode * find (const std::string &nodeName);
@ -254,7 +256,7 @@ protected:
class CDBBranchObsInfo
{
public:
NLMISC::CRefPtr<IPropertyObserver> Observer;
CRefPtr<IPropertyObserver> Observer;
// 2 linked list are required : while the observer is notified, it can triger one other observer, so we must link it in another list
bool Touched[2];
CDBBranchObsInfo *PrevNotifiedObserver[2]; // NULL means this is the head
@ -265,7 +267,7 @@ protected:
// This is equivalent to creating a sub-branch containing only the specified leaves
// and setting a branch observer on it, except you don't need to change your database paths
// and update large amounts of code and script!
std::vector<NLMISC::TStringId> PositiveLeafNameFilter;
std::vector<TStringId> PositiveLeafNameFilter;
public:
@ -294,7 +296,7 @@ protected:
}
// Unlink from the given list. This also clear the '_Touched' flag
void unlink(uint list);
void link(uint list, NLMISC::TStringId modifiedLeafName);
void link(uint list, TStringId modifiedLeafName);
};
typedef std::list<CDBBranchObsInfo> TObsList; // must use a list because pointers on CDBObserverInfo instances must remains valids
@ -348,6 +350,7 @@ private:
};
}
#endif // CDB_BRANCH_H

View file

@ -19,8 +19,9 @@
#ifndef NL_CDB_CHECK_SUM_H
#define NL_CDB_CHECK_SUM_H
#include "nel/misc/types_nl.h"
#include "types_nl.h"
namespace NLMISC{
/**
* class implementing check sum for the client database
@ -81,6 +82,7 @@ private:
};
}
#endif // NL_CDB_CHECK_SUM_H

View file

@ -21,7 +21,10 @@
#include "cdb.h"
#include "cdb_branch.h"
#include "nel/misc/time_nl.h"
#include "time_nl.h"
#include "rgba.h"
namespace NLMISC{
/**
* Database node which contains a unique property
@ -50,16 +53,16 @@ public:
void setValue8 (sint8 prop);
inline bool getValueBool() { return (_Property!=(sint64)0 ); }
void setValueBool (bool prop);
inline NLMISC::CRGBA getValueRGBA()
inline CRGBA getValueRGBA()
{
NLMISC::CRGBA col;
CRGBA col;
col.R = (uint8)(_Property&0xff);
col.G = (uint8)((_Property>>8)&0xff);
col.B = (uint8)((_Property>>16)&0xff);
col.A = (uint8)((_Property>>24)&0xff);
return col;
}
void setValueRGBA (const NLMISC::CRGBA &color);
void setValueRGBA (const CRGBA &color);
/// Return the value of the property before the database change
inline sint64 getOldValue64() { return _oldProperty; }
@ -98,7 +101,7 @@ public:
* Build the structure of the database from a file
* \param f is the stream
*/
void init( xmlNodePtr node, NLMISC::IProgressCallback &progressCallBack, bool mapBanks=false );
void init( xmlNodePtr node, IProgressCallback &progressCallBack, bool mapBanks=false );
/**
* Get a node
@ -132,7 +135,7 @@ public:
* Update the database from a stream coming from the FE
* \param f : the stream.
*/
void readDelta(NLMISC::TGameCycle gc, NLMISC::CBitMemStream & f );
void readDelta(TGameCycle gc, CBitMemStream & f );
/**
* Return the value of a property (the update flag is set to false)
@ -154,10 +157,10 @@ public:
/**
* Set the value of a property, only if gc>=_LastChangeGC
*/
bool setPropCheckGC(NLMISC::TGameCycle gc, sint64 value);
bool setPropCheckGC(TGameCycle gc, sint64 value);
/// Reset all leaf data from this point
void resetData(NLMISC::TGameCycle gc, bool forceReset=false);
void resetData(TGameCycle gc, bool forceReset=false);
/**
* Clear the node and his children
@ -215,7 +218,7 @@ public:
/// get the last change GameCycle (server tick) for this value
NLMISC::TGameCycle getLastChangeGC() const {return _LastChangeGC;}
TGameCycle getLastChangeGC() const {return _LastChangeGC;}
private:
@ -234,7 +237,7 @@ private:
/// gamecycle (servertick) of the last change for this value.
/// change are made in readDelta only for change >= _LastChangeGC
NLMISC::TGameCycle _LastChangeGC;
TGameCycle _LastChangeGC;
/// observers to call when the value really change
std::vector<IPropertyObserver*> _Observers;
@ -249,7 +252,7 @@ private:
////////////////////
}
#endif // CDB_LEAF_H

View file

@ -16,21 +16,19 @@
#include "stdpch.h"
//////////////
// Includes //
//////////////
#include "cdb.h"
#include "cdb_branch.h"
#include <nel/misc/bit_mem_stream.h>
#include "nel/misc/cdb.h"
#include "nel/misc/cdb_branch.h"
#include "nel/misc/bit_mem_stream.h"
////////////////
// Namespaces //
////////////////
using namespace NLMISC;
using namespace std;
namespace NLMISC{
CStringMapper *ICDBNode::_DBSM = NULL;
@ -82,3 +80,6 @@ void ICDBNode::releaseStringMapper()
delete _DBSM;
_DBSM = NULL;
}
}

View file

@ -26,15 +26,14 @@
//////////////
// Includes //
//////////////
#include "cdb_branch.h"
#include "cdb_leaf.h"
#include "nel/misc/cdb_branch.h"
#include "nel/misc/cdb_leaf.h"
#include "nel/misc/xml_auto_ptr.h"
//#include <iostream.h>
////////////////
// Namespaces //
////////////////
using namespace NLMISC;
using namespace std;
@ -43,6 +42,8 @@ using namespace std;
#include "nel/misc/file.h"
#include "nel/misc/i_xml.h"
#include "nel/misc/progress_callback.h"
#include "nel/misc/bit_mem_stream.h"
#include "nel/misc/bit_set.h"
#include <libxml/parser.h>
//#include <io.h>
@ -53,7 +54,9 @@ using namespace std;
using namespace std;
using namespace NLMISC;
namespace NLMISC{
/////////////
// GLOBALS //
@ -134,7 +137,7 @@ static /*inline*/ void addNode( ICDBNode *newNode, std::string newName, CCDBNode
std::vector<ICDBNode *> &nodes, std::vector<ICDBNode *> &nodesSorted,
xmlNodePtr &child, const string& bankName,
bool atomBranch, bool clientOnly,
NLMISC::IProgressCallback &progressCallBack,
IProgressCallback &progressCallBack,
bool mapBanks )
{
nodesSorted.push_back(newNode);
@ -158,7 +161,7 @@ static /*inline*/ void addNode( ICDBNode *newNode, std::string newName, CCDBNode
}
}
void CCDBNodeBranch::init( xmlNodePtr node, NLMISC::IProgressCallback &progressCallBack, bool mapBanks )
void CCDBNodeBranch::init( xmlNodePtr node, IProgressCallback &progressCallBack, bool mapBanks )
{
xmlNodePtr child;
@ -459,7 +462,7 @@ bool CCDBNodeBranch::setProp( CTextId& id, sint64 value )
/*
* Update the database from the delta, but map the first level with the bank mapping (see _CDBBankToUnifiedIndexMapping)
*/
void CCDBNodeBranch::readAndMapDelta( NLMISC::TGameCycle gc, NLMISC::CBitMemStream& s, uint bank )
void CCDBNodeBranch::readAndMapDelta( TGameCycle gc, CBitMemStream& s, uint bank )
{
nlassert( ! isAtomic() ); // root node mustn't be atomic
@ -491,7 +494,7 @@ void CCDBNodeBranch::readAndMapDelta( NLMISC::TGameCycle gc, NLMISC::CBitMemStre
// readDelta
//
//-----------------------------------------------
void CCDBNodeBranch::readDelta( NLMISC::TGameCycle gc, CBitMemStream & f )
void CCDBNodeBranch::readDelta( TGameCycle gc, CBitMemStream & f )
{
if ( isAtomic() )
{
@ -679,8 +682,6 @@ void CCDBNodeBranch::removeNode (const CTextId& id)
//-----------------------------------------------
void CCDBNodeBranch::flushObserversCalls()
{
H_AUTO ( RZ_Interface_flushObserversCalls )
// nlassert(_CrtCheckMemory());
_CurrNotifiedObs = _FirstNotifiedObs[_CurrNotifiedObsList];
while (_CurrNotifiedObs)
@ -743,7 +744,7 @@ void CCDBNodeBranch::removeFlushObserver( CCDBNodeBranch::IBranchObserverCallFlu
}
//-----------------------------------------------
void CCDBNodeBranch::CDBBranchObsInfo::link(uint list, NLMISC::TStringId modifiedLeafName)
void CCDBNodeBranch::CDBBranchObsInfo::link(uint list, TStringId modifiedLeafName)
{
// If there a filter set?
if (!PositiveLeafNameFilter.empty())
@ -810,7 +811,7 @@ void CCDBNodeBranch::CDBBranchObsInfo::unlink(uint list)
}
//-----------------------------------------------
void CCDBNodeBranch::linkInModifiedNodeList(NLMISC::TStringId modifiedLeafName)
void CCDBNodeBranch::linkInModifiedNodeList(TStringId modifiedLeafName)
{
// nlassert(_CrtCheckMemory());
CCDBNodeBranch *curr = this;
@ -913,7 +914,15 @@ void CCDBNodeBranch::addBranchObserver(const char *dbPathFromThisNode, ICDBNode:
else
{
branchNode = safe_cast<CCDBNodeBranch*>(getNode(ICDBNode::CTextId(dbPathFromThisNode), false));
BOMB_IF (!branchNode, (*getName()) << ":" << dbPathFromThisNode << " branch missing in DB", return);
if( branchNode == NULL ){
std::string msg = *getName();
msg += ":";
msg += dbPathFromThisNode;
msg += " branch missing in DB";
nlerror( msg.c_str() );
return;
}
}
std::vector<std::string> leavesToMonitor(positiveLeafNameFilterSize);
for (uint i=0; i!=positiveLeafNameFilterSize; ++i)
@ -927,7 +936,14 @@ void CCDBNodeBranch::addBranchObserver(const char *dbPathFromThisNode, ICDBNode:
void CCDBNodeBranch::removeBranchObserver(const char *dbPathFromThisNode, ICDBNode::IPropertyObserver& observer)
{
CCDBNodeBranch *branchNode = safe_cast<CCDBNodeBranch*>(getNode(ICDBNode::CTextId(dbPathFromThisNode), false));
BOMB_IF (!branchNode, (*getName()) << ":" << dbPathFromThisNode << " branch missing in DB", return);
if( branchNode == NULL ){
std::string msg = *getName();
msg += ":";
msg += dbPathFromThisNode;
msg += " branch missing in DB";
nlerror( msg.c_str() );
return;
}
branchNode->removeBranchObserver(&observer);
}
@ -1043,3 +1059,5 @@ ICDBNode *CCDBNodeBranch::find(const std::string &nodeName)
#undef TRACE_SET_VALUE
#endif
}

View file

@ -16,10 +16,11 @@
#include "stdpch.h"
#include "cdb_check_sum.h"
#include "nel/misc/cdb_check_sum.h"
namespace NLMISC{
/*
* Constructor
*/
@ -40,3 +41,6 @@ void CCDBCheckSum::add(uint8 el)
_Factor = (cipher + _Factor) * _Const1 + _Const2;
_Sum += cipher;
}
}

View file

@ -25,21 +25,23 @@
//////////////
// Includes //
//////////////
#include "cdb_leaf.h"
#include "nel/misc/cdb_leaf.h"
#include "nel/misc/xml_auto_ptr.h"
#include "nel/misc/bit_mem_stream.h"
//#include <iostream.h>
////////////////
// Namespaces //
////////////////
using namespace NLMISC;
using namespace std;
namespace NLMISC{
//-----------------------------------------------
// init
//-----------------------------------------------
void CCDBNodeLeaf::init( xmlNodePtr node, NLMISC::IProgressCallback &/* progressCallBack */, bool /* mapBanks */ )
void CCDBNodeLeaf::init( xmlNodePtr node, IProgressCallback &/* progressCallBack */, bool /* mapBanks */ )
{
CXMLAutoPtr type((const char*)xmlGetProp (node, (xmlChar*)"type"));
nlassert((const char *) type != NULL);
@ -124,7 +126,7 @@ void CCDBNodeLeaf::write( CTextId& id, FILE * f)
//-----------------------------------------------
// readDelta
//-----------------------------------------------
void CCDBNodeLeaf::readDelta(NLMISC::TGameCycle gc, CBitMemStream & f )
void CCDBNodeLeaf::readDelta(TGameCycle gc, CBitMemStream & f )
{
// If the property Type is valid.
if(_Type > UNKNOWN && _Type < Nb_Prop_Type)
@ -180,7 +182,7 @@ void CCDBNodeLeaf::readDelta(NLMISC::TGameCycle gc, CBitMemStream & f )
//-----------------------------------------------
// resetData
//-----------------------------------------------
void CCDBNodeLeaf::resetData(NLMISC::TGameCycle gc, bool forceReset)
void CCDBNodeLeaf::resetData(TGameCycle gc, bool forceReset)
{
if(forceReset)
{
@ -247,7 +249,7 @@ bool CCDBNodeLeaf::setProp( CTextId& id, sint64 value )
//-----------------------------------------------
// setPropCheckGC
//-----------------------------------------------
bool CCDBNodeLeaf::setPropCheckGC(NLMISC::TGameCycle gc, sint64 value)
bool CCDBNodeLeaf::setPropCheckGC(TGameCycle gc, sint64 value)
{
// Apply only if happens after the DB change
if(gc>=_LastChangeGC)
@ -318,7 +320,7 @@ void CCDBNodeLeaf::setValueBool(bool prop)
setValue64(newVal);
}
void CCDBNodeLeaf::setValueRGBA (const NLMISC::CRGBA &color)
void CCDBNodeLeaf::setValueRGBA (const CRGBA &color)
{
sint64 newVal = (uint32)(color.R+(color.G<<8)+(color.B<<16)+(color.A<<24));
setValue64(newVal);
@ -386,3 +388,5 @@ void CCDBNodeLeaf::notifyObservers()
#endif
//#############################################################################################
}

View file

@ -48,7 +48,7 @@ using namespace NLMISC;
using namespace std;
bool VerboseDatabase = false;
bool NLMISC::VerboseDatabase = false;
uint32 NbDatabaseChanges = 0;

View file

@ -20,8 +20,8 @@
#define CDB_SYNCHRONISED_H
#include "cdb.h"
#include "cdb_branch.h"
#include "nel/misc/cdb.h"
#include "nel/misc/cdb_branch.h"
/**
* Class to manage a database of properties
@ -32,7 +32,7 @@
class CCDBSynchronised
{
/// database
NLMISC::CRefPtr<CCDBNodeBranch> _Database;
NLMISC::CRefPtr<NLMISC::CCDBNodeBranch> _Database;
/// string associations
std::map<uint32,std::string> _Strings;
@ -60,7 +60,7 @@ public:
* Return a ptr on the node
* \return ptr on the node
*/
CCDBNodeBranch * getNodePtr() { return _Database; }
NLMISC::CCDBNodeBranch * getNodePtr() { return _Database; }
/**
* Build the structure of the database from a file

View file

@ -76,7 +76,7 @@
#include "user_entity.h"
#include "projectile_manager.h"
#include "init_main_loop.h"
#include "cdb_branch.h"
#include "nel/misc/cdb_branch.h"
#include "animation_fx_misc.h"
#include "attack_list.h"
#include "animation_fx_id_array.h"

View file

@ -32,6 +32,10 @@
#include <map>
#include <string>
namespace NLMISC{
class CCDBNodeLeaf;
}
//#define OLD_STRING_SYSTEM
@ -338,8 +342,8 @@ private :
/// \name Dynamic Chat channel mgt
// @{
TChanID _ChatDynamicChannelId;
class CCDBNodeLeaf *_DynamicChannelNameLeaf[CChatGroup::MaxDynChanPerPlayer];
class CCDBNodeLeaf *_DynamicChannelIdLeaf[CChatGroup::MaxDynChanPerPlayer];
NLMISC::CCDBNodeLeaf *_DynamicChannelNameLeaf[CChatGroup::MaxDynChanPerPlayer];
NLMISC::CCDBNodeLeaf *_DynamicChannelIdLeaf[CChatGroup::MaxDynChanPerPlayer];
// Id cached. If different from precedent, then the channel must be flushed
enum {DynamicChannelEmptyId=-1};
uint32 _DynamicChannelIdCache[CChatGroup::MaxDynChanPerPlayer];

View file

@ -74,7 +74,7 @@
#include "commands.h"
#include "entities.h"
#include "teleport.h"
#include "cdb_leaf.h"
#include "nel/misc/cdb_leaf.h"
#include "view.h"
#include "misc.h"
#include "demo.h"

View file

@ -91,7 +91,10 @@ class CItemSheet;
class CPhysicalDamage;
namespace NLMISC{
class CCDBNodeLeaf;
class CCDBNodeBranch;
}
extern CLFECOMMON::TCLEntityId SlotUnderCursor;
@ -809,7 +812,7 @@ public:
virtual void setDiffuse(bool onOff, NLMISC::CRGBA diffuse);
static CCDBNodeLeaf *getOpacityDBNode();
static NLMISC::CCDBNodeLeaf *getOpacityDBNode();
static uint32 getOpacityMin();
static void setOpacityMin(uint32 value);
@ -884,7 +887,7 @@ protected:
// Persistent NPC Alias of the entity
uint32 _NPCAlias;
// Local DB Branch for this entity
class CCDBNodeBranch *_DBEntry;
class NLMISC::CCDBNodeBranch *_DBEntry;
// Playlist
NL3D::UPlayList *_PlayList;
NL3D::UPlayList *_FacePlayList;
@ -1108,7 +1111,7 @@ protected:
// for localSelectBox() computing
sint64 _LastLocalSelectBoxComputeTime;
static NLMISC::CRefPtr<CCDBNodeLeaf> _OpacityMinNodeLeaf;
static NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _OpacityMinNodeLeaf;
protected:
/**

View file

@ -30,7 +30,9 @@
// ***************************************************************************
class CGroupMenu;
class CViewTextMenu;
namespace NLMISC{
class CCDBNodeLeaf;
}
// ***************************************************************************
/**
@ -77,21 +79,21 @@ private:
// MilkoPad
CInterfaceGroupPtr _GroupMilkoPad;
CCDBNodeLeaf *_MilkoAttackDisengage;
NLMISC::CCDBNodeLeaf *_MilkoAttackDisengage;
CCtrlTextButtonPtr _MilkoAttDisBut1;
CCtrlTextButtonPtr _MilkoAttDisBut2;
CGroupMenu *_GroupMenu;
CCDBNodeLeaf *_ContextVal;
CCDBNodeLeaf *_AvailablePrograms;
CCDBNodeLeaf *_ServerTeamPresent;
CCDBNodeLeaf *_MissionOption[NUM_MISSION_OPTIONS];
CCDBNodeLeaf *_ServerInDuel;
CCDBNodeLeaf *_ServerInPvpChallenge;
CCDBNodeLeaf *_WebPageTitle;
CCDBNodeLeaf *_OutpostSheet;
CCDBNodeLeaf *_OutpostRightToBannish;
CCDBNodeLeaf *_MissionRing[BOTCHATTYPE::MaxR2MissionEntryDatabase];
NLMISC::CCDBNodeLeaf *_ContextVal;
NLMISC::CCDBNodeLeaf *_AvailablePrograms;
NLMISC::CCDBNodeLeaf *_ServerTeamPresent;
NLMISC::CCDBNodeLeaf *_MissionOption[NUM_MISSION_OPTIONS];
NLMISC::CCDBNodeLeaf *_ServerInDuel;
NLMISC::CCDBNodeLeaf *_ServerInPvpChallenge;
NLMISC::CCDBNodeLeaf *_WebPageTitle;
NLMISC::CCDBNodeLeaf *_OutpostSheet;
NLMISC::CCDBNodeLeaf *_OutpostRightToBannish;
NLMISC::CCDBNodeLeaf *_MissionRing[BOTCHATTYPE::MaxR2MissionEntryDatabase];
CViewTextMenuPtr _TextLootAction;

View file

@ -27,9 +27,9 @@
// Misc.
#include "nel/misc/types_nl.h"
// Game share.
#include "cdb.h"
#include "cdb_leaf.h"
#include "cdb_branch.h"
#include "nel/misc/cdb.h"
#include "nel/misc/cdb_leaf.h"
#include "nel/misc/cdb_branch.h"
#include "cdb_synchronised.h"

View file

@ -141,10 +141,10 @@ private:
};
// update the brick help window when weight of hands has changed
class CFittedWeaponWeightObserver : public ICDBNode::IPropertyObserver
class CFittedWeaponWeightObserver : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};

View file

@ -143,18 +143,18 @@ private:
// The Inventory manipulated.
std::vector<CItem> _InventoryMirror;
bool _InventoryObsSetup;
class CDBInventoryObs : public ICDBNode::IPropertyObserver
class CDBInventoryObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
CDBInventoryObs _DBInventoryObs;
friend class CDBInventoryObs;
// The animals Status
class CDBAnimalObs : public ICDBNode::IPropertyObserver
class CDBAnimalObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
CDBAnimalObs _DBAnimalObs;
friend class CDBAnimalObs;

View file

@ -24,6 +24,8 @@
#include "group_compas.h"
#include "game_share/animal_status.h"
using NLMISC::CCDBNodeLeaf;
// ***************************************************************************
// CPositionState
// ***************************************************************************

View file

@ -26,7 +26,9 @@
// ***************************************************************************
namespace NLMISC{
class CCDBNodeLeaf;
}
// ***************************************************************************
/**
@ -58,7 +60,7 @@ protected:
virtual bool getDbPos(sint32 &px, sint32 &py) = 0;
// helper to serial a CDBNodeLeaf, based on itsname
void serialNodeLeaf(NLMISC::IStream &f, CCDBNodeLeaf *&dbNode);
void serialNodeLeaf(NLMISC::IStream &f, NLMISC::CCDBNodeLeaf *&dbNode);
};
@ -82,8 +84,8 @@ public:
virtual void serial(NLMISC::IStream &f);
protected:
// Database infos
CCDBNodeLeaf *_DBPos;
CCDBNodeLeaf *_Uid;
NLMISC::CCDBNodeLeaf *_DBPos;
NLMISC::CCDBNodeLeaf *_Uid;
// The slot of the entity that may be used to get more precise position
CLFECOMMON::TCLEntityId _EntitySlot;
virtual CEntityCL *getEntity();
@ -103,18 +105,18 @@ class CNamedEntityPositionState : public CPositionState
public:
NLMISC_DECLARE_CLASS(CNamedEntityPositionState)
virtual bool dbOk() {return _Name && _X && _Y;}
void build(CCDBNodeLeaf *name, CCDBNodeLeaf *x, CCDBNodeLeaf *y);
CCDBNodeLeaf *getNameNode() const { return _Name; }
CCDBNodeLeaf *getXNode() const { return _X; }
CCDBNodeLeaf *getYNode() const { return _X; }
void build(NLMISC::CCDBNodeLeaf *name, NLMISC::CCDBNodeLeaf *x, NLMISC::CCDBNodeLeaf *y);
NLMISC::CCDBNodeLeaf *getNameNode() const { return _Name; }
NLMISC::CCDBNodeLeaf *getXNode() const { return _X; }
NLMISC::CCDBNodeLeaf *getYNode() const { return _X; }
//
virtual bool canSave() const { return true; }
virtual void serial(NLMISC::IStream &f);
protected:
// Database infos
CCDBNodeLeaf *_Name;
CCDBNodeLeaf *_X;
CCDBNodeLeaf *_Y;
NLMISC::CCDBNodeLeaf *_Name;
NLMISC::CCDBNodeLeaf *_X;
NLMISC::CCDBNodeLeaf *_Y;
virtual CEntityCL *getEntity();
virtual bool getDbPos(sint32 &px, sint32 &py);
};
@ -148,7 +150,7 @@ public:
virtual void serial(NLMISC::IStream &/* f */) { nlassert(0); /* notsavable */ }
protected:
// Database infos
CCDBNodeLeaf *_Present;
NLMISC::CCDBNodeLeaf *_Present;
// DB ok.
bool dbOk() {return _DBPos && _Present && _Uid;}
@ -182,7 +184,7 @@ public:
private:
// Animal Database infos
CCDBNodeLeaf *_Status;
NLMISC::CCDBNodeLeaf *_Status;
// DB ok.
bool dbOk() {return _DBPos && _Status && _Uid;}

View file

@ -23,6 +23,10 @@
#include "game_share/inventories.h"
#include "game_share/scores.h"
namespace NLMISC{
class CCDBNodeLeaf;
}
// ***************************************************************************
/**
@ -214,12 +218,12 @@ private:
CBarInfo BarInfo;
// Connection input (used only for TargetType, TeamMemberType and AnimalType)
class CCDBNodeLeaf *UIDIn;
class CCDBNodeLeaf *PresentIn; // if not NULL, this is an additional test: if(PresentIn->getValue()==0) => not present
class CCDBNodeLeaf *ScoreIn[SCORES::NUM_SCORES];
NLMISC::CCDBNodeLeaf *UIDIn;
NLMISC::CCDBNodeLeaf *PresentIn; // if not NULL, this is an additional test: if(PresentIn->getValue()==0) => not present
NLMISC::CCDBNodeLeaf *ScoreIn[SCORES::NUM_SCORES];
// Connection output
class CCDBNodeLeaf *ScoreOut[SCORES::NUM_SCORES];
NLMISC::CCDBNodeLeaf *ScoreOut[SCORES::NUM_SCORES];
public:
CBarDataEntry();
@ -258,11 +262,11 @@ private:
// last score get from impulse USER:BARS
sint32 Score;
// input DB value, to get the current MAX
class CCDBNodeLeaf *DBInMax;
NLMISC::CCDBNodeLeaf *DBInMax;
// output DB to store the real value, but clamped to 0
class CCDBNodeLeaf *DBOutVal;
NLMISC::CCDBNodeLeaf *DBOutVal;
// output DB to store the ratio -1024,1024 value
class CCDBNodeLeaf *DBOutRatio;
NLMISC::CCDBNodeLeaf *DBOutRatio;
CUserScore()
{
Score= 0;

View file

@ -29,6 +29,8 @@
static const char *WIN_BOT_CHAT_PAGE_PLAYER_GIFT = "ui:interface:bot_chat_player_gift";
using NLMISC::CCDBNodeLeaf;
// *************************************************************************************
void CBotChatPagePlayerGift::begin()
{

View file

@ -142,7 +142,7 @@ private:
uint32 _FilterBuyDlgMaxValue;
// keep pointer on leaf for fame price factor
CCDBNodeLeaf * _FamePriceFactorLeaf;
NLMISC::CCDBNodeLeaf * _FamePriceFactorLeaf;
bool _DownloadComplete;
private:

View file

@ -23,6 +23,9 @@
class CViewBase;
class ucstring;
namespace NLMISC{
class CCDBNodeLeaf;
}
/** Class to get chat text parameters, and to build new text lines
* \author Nicolas Vizerie
@ -56,9 +59,9 @@ public:
private:
static CChatTextManager *_Instance;
mutable class CCDBNodeLeaf *_TextFontSize;
mutable CCDBNodeLeaf *_TextMultilineSpace;
mutable CCDBNodeLeaf *_TextShadowed;
mutable NLMISC::CCDBNodeLeaf *_TextFontSize;
mutable NLMISC::CCDBNodeLeaf *_TextMultilineSpace;
mutable NLMISC::CCDBNodeLeaf *_TextShadowed;
// ctor, private because of singleton
CChatTextManager();

View file

@ -28,7 +28,7 @@
* \author Nevrax France
* \date 2002
*/
class CCtrlScroll : public CCtrlBase, public ICDBNode::IPropertyObserver
class CCtrlScroll : public CCtrlBase, public NLMISC::ICDBNode::IPropertyObserver
{
public:
@ -183,7 +183,7 @@ protected:
void computeTargetOfsFromPos();
// from IPropertyObserver
virtual void update(ICDBNode *node);
virtual void update(NLMISC::ICDBNode *node);
// step the value, and clamp it
void normalizeValue(sint32 &value);

View file

@ -318,7 +318,7 @@ public:
static void setCurrSelection(CDBCtrlSheet *selected);
// get the root branch containing the properties for that sheet
CCDBNodeBranch *getRootBranch() const;
NLMISC::CCDBNodeBranch *getRootBranch() const;
/** If the branch in setSheet(branch) is of the form ...:# (where # is a number), return this number.
* The value is hence modified by setSheet(). return 0 if not of this form.
@ -443,7 +443,7 @@ public:
sint getIndexInParent() const;
// get the 'LOCKED' field in the db
CCDBNodeLeaf *getLockValuePtr() { return _GrayedLink; }
NLMISC::CCDBNodeLeaf *getLockValuePtr() { return _GrayedLink; }
/// \name Macro
// @{
@ -483,35 +483,35 @@ public:
void initSheetSize();
// @}
CCDBNodeLeaf *getSlotType() const { return _TradeSlotType.getNodePtr(); }
NLMISC::CCDBNodeLeaf *getSlotType() const { return _TradeSlotType.getNodePtr(); }
// get item weight
uint16 getItemWeight() const;
CCDBNodeLeaf *getItemWeightPtr() const;
NLMISC::CCDBNodeLeaf *getItemWeightPtr() const;
// set item weight
void setItemWeight(uint16 weight);
// get item info version
uint8 getItemInfoVersion() const;
CCDBNodeLeaf *getItemInfoVersionPtr() const;
NLMISC::CCDBNodeLeaf *getItemInfoVersionPtr() const;
// set item info version
void setItemInfoVersion(uint8 infoVersion);
// get item Locked state
uint16 getItemLocked() const;
CCDBNodeLeaf *getItemLockedPtr() const;
NLMISC::CCDBNodeLeaf *getItemLockedPtr() const;
// set item locked state
void setItemLocked(uint16 lock);
// get item PRICE. 0 if no DB
sint32 getItemPrice() const;
CCDBNodeLeaf *getItemPricePtr() const;
NLMISC::CCDBNodeLeaf *getItemPricePtr() const;
// set item PRICE
void setItemPrice(sint32 price);
// get item RESALE_FLAG. 0 if no DB
sint32 getItemResaleFlag() const;
CCDBNodeLeaf *getItemResaleFlagPtr() const;
NLMISC::CCDBNodeLeaf *getItemResaleFlagPtr() const;
// set item RESALE_FLAG
void setItemResaleFlag(sint32 rf);
@ -523,25 +523,25 @@ public:
// get item SELLER_TYPE. 0 if no DB
sint32 getItemSellerType() const;
CCDBNodeLeaf *getItemSellerTypePtr() const;
NLMISC::CCDBNodeLeaf *getItemSellerTypePtr() const;
// set item SELLER_TYPE
void setItemSellerType(sint32 rf);
// get item FABER_QUALITY. 0 if no DB
RM_CLASS_TYPE::TRMClassType getItemRMClassType() const;
CCDBNodeLeaf *getItemRMClassTypePtr() const {return _ItemRMClassType;}
NLMISC::CCDBNodeLeaf *getItemRMClassTypePtr() const {return _ItemRMClassType;}
// set item FABER_QUALITY
void setItemRMClassType(sint32 fq);
// get item FABER_STAT_TYPE. 0 if no DB
RM_FABER_STAT_TYPE::TRMStatType getItemRMFaberStatType() const;
CCDBNodeLeaf *getItemRMFaberStatTypePtr() const {return _ItemRMFaberStatType;}
NLMISC::CCDBNodeLeaf *getItemRMFaberStatTypePtr() const {return _ItemRMFaberStatType;}
// set item FABER_STAT_TYPE
void setItemRMFaberStatType(sint32 fss);
// get item PREREQUISIT_VALID. true of no DB
bool getItemPrerequisitValid() const;
CCDBNodeLeaf *getItemPrerequisitValidPtr() const;
NLMISC::CCDBNodeLeaf *getItemPrerequisitValidPtr() const;
// set item PREREQUISIT_VALID
void setItemPrerequisitValid(bool prv);
@ -610,8 +610,8 @@ protected:
CInterfaceProperty _Worned; // if true means that item is worned (red cross, no longer usable unless it's a tool)
// As node leaf for backward compatibilities
CCDBNodeLeaf *_ItemRMClassType;
CCDBNodeLeaf *_ItemRMFaberStatType;
NLMISC::CCDBNodeLeaf *_ItemRMClassType;
NLMISC::CCDBNodeLeaf *_ItemRMFaberStatType;
mutable sint32 _LastSheetId;
@ -703,7 +703,7 @@ protected:
// This String is optional and usage dependent for Item, Macro, or Sentence
std::string _OptString;
CCDBNodeLeaf *_GrayedLink;
NLMISC::CCDBNodeLeaf *_GrayedLink;
// Macro or sentence String compiled as texture Ids and positions, from the _OptString.
struct CCharBitmap
@ -734,7 +734,7 @@ protected:
sint32 _ItemCaracReqValue;
// Special for Armour
CCDBNodeLeaf *_UserColor;
NLMISC::CCDBNodeLeaf *_UserColor;
// keep pointer on item sheet
const CItemSheet *_ItemSheet;

View file

@ -141,14 +141,14 @@ protected:
// branch of the DB
CCDBNodeBranch *_DbBranch;
NLMISC::CCDBNodeBranch *_DbBranch;
std::string _DbBranchName;
// Branch observer
class CDBObs : public ICDBNode::IPropertyObserver
class CDBObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
CDBGroupListSheet *Owner;
virtual void update(ICDBNode* /* node */) {Owner->_BranchModified= true;}
virtual void update(NLMISC::ICDBNode* /* node */) {Owner->_BranchModified= true;}
};
friend class CDBObs;
CDBObs _DbBranchObs;
@ -192,7 +192,7 @@ protected:
}
// For animals only
CCDBNodeLeaf *_AnimalStatus;
NLMISC::CCDBNodeLeaf *_AnimalStatus;
sint32 _CacheAnimalStatus;
// For sectionnable purpose

View file

@ -44,7 +44,7 @@ public:
private:
sint32 _TextId;
std::vector<CCDBNodeLeaf*> _DisableStates;
std::vector<NLMISC::CCDBNodeLeaf*> _DisableStates;
};

View file

@ -45,7 +45,7 @@ public:
virtual bool isInvalidated(CDBGroupListSheet *pFather);
virtual void update(CDBGroupListSheet *pFather);
virtual sint getSectionId() const;
CCDBNodeLeaf *LevelDB;
NLMISC::CCDBNodeLeaf *LevelDB;
uint LevelCache;
};

View file

@ -20,7 +20,7 @@
#include "dbgroup_list_sheet_mission.h"
#include "view_text_id_formated.h"
#include "../cdb_leaf.h"
#include "nel/misc/cdb_leaf.h"
#include "interface_manager.h"
using namespace std;

View file

@ -203,14 +203,14 @@ protected:
// branch of the DB
CCDBNodeBranch *_DbBranch;
NLMISC::CCDBNodeBranch *_DbBranch;
std::string _DbBranchName;
// Branch observer
class CDBObs : public ICDBNode::IPropertyObserver
class CDBObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
CDBGroupListSheetText *Owner;
virtual void update(ICDBNode* /* node */) {Owner->_BranchModified= true;}
virtual void update(NLMISC::ICDBNode* /* node */) {Owner->_BranchModified= true;}
};
friend class CDBObs;
CDBObs _DbBranchObs;
@ -269,7 +269,7 @@ protected:
sint getIndexOf(const CCtrlButton *button) const;
// For animals only
CCDBNodeLeaf *_AnimalStatus;
NLMISC::CCDBNodeLeaf *_AnimalStatus;
sint32 _CacheAnimalStatus;
// For items only (requirement color)

View file

@ -46,7 +46,7 @@ public:
virtual void update(CDBGroupListSheetText *pFather);
virtual void updateViewText(CDBGroupListSheetText *pFather);
virtual sint getSectionId() const;
CCDBNodeLeaf *LevelDB;
NLMISC::CCDBNodeLeaf *LevelDB;
uint LevelCache;
};

View file

@ -140,7 +140,7 @@ protected:
bool _ApplyFamePriceFactor;
// keep pointer on leaf for fame price factor
CCDBNodeLeaf * _FamePriceFactorLeaf;
NLMISC::CCDBNodeLeaf * _FamePriceFactorLeaf;
sint16 _LastFamePriceFactor;
TSellerTypeFilter _SellerTypeFilter;

View file

@ -110,7 +110,7 @@ private:
CCompassTarget _SavedTarget;
bool _SavedTargetValid;
CCDBNodeLeaf *_DynamicTargetPos;
NLMISC::CCDBNodeLeaf *_DynamicTargetPos;
uint32 _LastDynamicTargetPos;
// Color for each type of target

View file

@ -93,9 +93,9 @@ protected:
static NLMISC::CRGBA BarColorHPNegative;
// Node user leaf
static CCDBNodeLeaf *_Value;
static CCDBNodeLeaf *_ValueBegin;
static CCDBNodeLeaf *_ValueEnd;
static NLMISC::CCDBNodeLeaf *_Value;
static NLMISC::CCDBNodeLeaf *_ValueBegin;
static NLMISC::CCDBNodeLeaf *_ValueEnd;
// Special guild
bool _NeedGuildNameId;

View file

@ -35,7 +35,9 @@
class CContinent;
namespace NLMISC{
class CCDBNodeLeaf;
}
class CWorldSheet;
class CCtrlQuad;
struct SMap;
@ -425,8 +427,8 @@ private:
// have the texts been received for mission targets ?
std::vector<bool> _MissionTargetTextReceived;
// ptr on db leaf for coordinates of special landmarks
CCDBNodeLeaf *_TargetPos;
CCDBNodeLeaf *_HomePos;
NLMISC::CCDBNodeLeaf *_TargetPos;
NLMISC::CCDBNodeLeaf *_HomePos;
// Animals State for landMarks
std::vector<NLMISC::CSmartPtr<CAnimalPositionState> > _AnimalPosStates;
// Teammate State for landMarks

View file

@ -53,12 +53,12 @@ private:
private:
// observer to know that brick family are modified
struct CBrickFamilyObs : public ICDBNode::IPropertyObserver
struct CBrickFamilyObs : public NLMISC::ICDBNode::IPropertyObserver
{
CGroupPhraseSkillFilter *Owner;
BRICK_FAMILIES::TBrickFamily BrickFamily;
virtual void update (ICDBNode *node);
virtual void update (NLMISC::ICDBNode *node);
};
friend struct CBrickFamilyObs;
CBrickFamilyObs _BrickFamilyObs[BRICK_FAMILIES::NbFamilies];

View file

@ -51,10 +51,10 @@ private:
private:
// observer to know that skills are modified
struct CSkillsObs : public ICDBNode::IPropertyObserver
struct CSkillsObs : public NLMISC::ICDBNode::IPropertyObserver
{
CGroupSkills *Owner;
virtual void update (ICDBNode *node);
virtual void update (NLMISC::ICDBNode *node);
} _SkillsObs;
friend struct CSkillsObs;

View file

@ -22,7 +22,7 @@
#include "nel/misc/types_nl.h"
#include "obs_huge_list.h"
#include "dbgroup_list_sheet_text.h"
#include "../cdb.h"
#include "nel/misc/cdb.h"
#include "game_share/guild_grade.h"
#include "game_share/misc_const.h"
@ -209,15 +209,15 @@ private:
// Database management stuff
class CDBObs : public ICDBNode::IPropertyObserver
class CDBObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
class CDBObsMembers : public ICDBNode::IPropertyObserver
class CDBObsMembers : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
CDBObs _DBObs;

View file

@ -22,7 +22,9 @@
#include "nel/misc/stream.h"
class CGroupContainer;
namespace NLMISC{
class CCDBNodeLeaf;
}
/**
* interface config
@ -111,8 +113,8 @@ public:
// ------------------------------
void serial (NLMISC::IStream &f);
// ------------------------------
void setFrom (CCDBNodeLeaf *pNL);
void setTo (CCDBNodeLeaf *pNL);
void setFrom (NLMISC::CCDBNodeLeaf *pNL);
void setTo (NLMISC::CCDBNodeLeaf *pNL);
};
void dataBaseToStream (NLMISC::IStream &f);

View file

@ -52,7 +52,7 @@ public:
void updateRealtime(CCtrlBase *pSB, bool updateOnScrollEnd);
// Update all parameters to obey their preset (no op if no preset or if preset is Custom)
void updateParamPreset(CCDBNodeLeaf *presetChanged);
void updateParamPreset(NLMISC::CCDBNodeLeaf *presetChanged);
// set apply button can be pushed
void validateApplyButton();
@ -90,7 +90,7 @@ private:
sint32 RTBackupValue; // When canceling
// For ConfigFile widget only
CCDBNodeLeaf *PresetDB;
NLMISC::CCDBNodeLeaf *PresetDB;
// -----------------------
CParam()
@ -128,16 +128,16 @@ private:
std::vector<CParam> _Parameters;
// For preset change
class CPresetObs : public ICDBNode::IPropertyObserver
class CPresetObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
CInterfaceDDX *Owner;
CPresetObs() : Owner(NULL) {}
};
CPresetObs _PresetObs;
std::set<CCDBNodeLeaf*> _PresetNodes;
std::set<NLMISC::CCDBNodeLeaf*> _PresetNodes;
// reset the preset values according to parameters values
void resetPreSet();

View file

@ -26,8 +26,11 @@
#include "nel/misc/ucstring.h"
#include "nel/misc/rgba.h"
namespace NLMISC{
class ICDBNode;
class CCDBNodeLeaf;
class CCDBNodeBranch;
}
struct CInterfaceExprUserType;
@ -166,7 +169,7 @@ public:
* Node will only be inserted once, so we end up with a set of node (not ordered)
* \param noFctCalls when set to true, the terminal function calls will not be made, so the evaluation is only used to see which database entries the expression depends on.
*/
static bool eval(const std::string &expr, CInterfaceExprValue &result, std::vector<ICDBNode *> *nodes = NULL, bool noFctCalls = false);
static bool eval(const std::string &expr, CInterfaceExprValue &result, std::vector<NLMISC::ICDBNode *> *nodes = NULL, bool noFctCalls = false);
/** Build a tree from the given expression so that it can be evaluated quickly.
* This is useful for a fixed expression that must be evaluated often
@ -193,11 +196,11 @@ private:
/** eval the value of a single expression
* \return position to the next valid character
*/
static const char *evalExpr(const char *expr, CInterfaceExprValue &result, std::vector<ICDBNode *> *nodes, bool noFctCalls);
static const char *evalFct(const char *expr,CInterfaceExprValue &result,std::vector<ICDBNode *> *nodes, bool noFctCalls);
static const char *evalDBEntry(const char *expr,CInterfaceExprValue &result,std::vector<ICDBNode *> *nodes);
static const char *evalExpr(const char *expr, CInterfaceExprValue &result, std::vector<NLMISC::ICDBNode *> *nodes, bool noFctCalls);
static const char *evalFct(const char *expr,CInterfaceExprValue &result,std::vector<NLMISC::ICDBNode *> *nodes, bool noFctCalls);
static const char *evalDBEntry(const char *expr,CInterfaceExprValue &result,std::vector<NLMISC::ICDBNode *> *nodes);
public:
static const char *unpackDBentry(const char *expr, std::vector<ICDBNode *> *nodes, std::string &dest, bool *hasIndirections = NULL);
static const char *unpackDBentry(const char *expr, std::vector<NLMISC::ICDBNode *> *nodes, std::string &dest, bool *hasIndirections = NULL);
/** Build tree of a single expression
* \return position to the next valid character

View file

@ -18,8 +18,12 @@
#include "stdpch.h"
#include "interface_expr_node.h"
#include "../cdb_leaf.h"
#include "../cdb_branch.h"
#include "nel/misc/cdb_leaf.h"
#include "nel/misc/cdb_branch.h"
using NLMISC::ICDBNode;
using NLMISC::CCDBNodeBranch;
using NLMISC::CCDBNodeLeaf;
// *******************************************************************************************************
void CInterfaceExprNodeValue::eval(CInterfaceExprValue &result)

View file

@ -33,9 +33,9 @@ public:
// eval result of expression, and eventually get the nodes the epression depends on
virtual void eval(CInterfaceExprValue &result) = 0;
// The same, but get db nodes the expression depends on (appended to vector)
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<ICDBNode *> &nodes) = 0;
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<NLMISC::ICDBNode *> &nodes) = 0;
// Get dependencies of the node (appended to vector)
virtual void getDepends(std::vector<ICDBNode *> &nodes) = 0;
virtual void getDepends(std::vector<NLMISC::ICDBNode *> &nodes) = 0;
};
@ -48,8 +48,8 @@ public:
CInterfaceExprValue Value;
public:
virtual void eval(CInterfaceExprValue &result);
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<ICDBNode *> &nodes);
virtual void getDepends(std::vector<ICDBNode *> &nodes);
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<NLMISC::ICDBNode *> &nodes);
virtual void getDepends(std::vector<NLMISC::ICDBNode *> &nodes);
};
// *******************************************************************************************************
@ -63,8 +63,8 @@ public:
std::vector<CInterfaceExprNode *> Params;
public:
virtual void eval(CInterfaceExprValue &result);
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<ICDBNode *> &nodes);
virtual void getDepends(std::vector<ICDBNode *> &nodes);
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<NLMISC::ICDBNode *> &nodes);
virtual void getDepends(std::vector<NLMISC::ICDBNode *> &nodes);
virtual ~CInterfaceExprNodeValueFnCall();
};
@ -74,11 +74,11 @@ public:
class CInterfaceExprNodeDBLeaf : public CInterfaceExprNode
{
public:
class CCDBNodeLeaf *Leaf;
class NLMISC::CCDBNodeLeaf *Leaf;
public:
virtual void eval(CInterfaceExprValue &result);
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<ICDBNode *> &nodes);
virtual void getDepends(std::vector<ICDBNode *> &nodes);
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<NLMISC::ICDBNode *> &nodes);
virtual void getDepends(std::vector<NLMISC::ICDBNode *> &nodes);
};
// *******************************************************************************************************
@ -87,11 +87,11 @@ public:
class CInterfaceExprNodeDBBranch : public CInterfaceExprNode
{
public:
class CCDBNodeBranch *Branch;
class NLMISC::CCDBNodeBranch *Branch;
public:
virtual void eval(CInterfaceExprValue &result);
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<ICDBNode *> &nodes);
virtual void getDepends(std::vector<ICDBNode *> &nodes);
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<NLMISC::ICDBNode *> &nodes);
virtual void getDepends(std::vector<NLMISC::ICDBNode *> &nodes);
};
// *******************************************************************************************************
@ -104,8 +104,8 @@ public:
std::string Expr;
public:
virtual void eval(CInterfaceExprValue &result);
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<ICDBNode *> &nodes);
virtual void getDepends(std::vector<ICDBNode *> &nodes);
virtual void evalWithDepends(CInterfaceExprValue &result, std::vector<NLMISC::ICDBNode *> &nodes);
virtual void getDepends(std::vector<NLMISC::ICDBNode *> &nodes);
};

View file

@ -24,7 +24,7 @@
#include "interface_manager.h"
#include "interface_expr_node.h"
#include "reflect.h"
#include "../cdb_branch.h"
#include "nel/misc/cdb_branch.h"
using namespace std;
using namespace NLMISC;

View file

@ -19,7 +19,7 @@
#ifndef CL_INTERFACE_LINK_H
#define CL_INTERFACE_LINK_H
#include "../cdb_branch.h"
#include "nel/misc/cdb_branch.h"
class CInterfaceElement;
class CReflectedProperty;
@ -45,7 +45,7 @@ class CInterfaceExprNode;
* \author Nevrax France
* \date 2002
*/
class CInterfaceLink : public ICDBNode::IPropertyObserver
class CInterfaceLink : public NLMISC::ICDBNode::IPropertyObserver
{
public:
#ifdef NL_DEBUG
@ -66,7 +66,7 @@ public:
/// Updates triggered interface links when triggered by the observed branch
class CInterfaceLinkUpdater : public CCDBNodeBranch::IBranchObserverCallFlushObserver
class CInterfaceLinkUpdater : public NLMISC::CCDBNodeBranch::IBranchObserverCallFlushObserver
{
public:
CInterfaceLinkUpdater();
@ -119,7 +119,7 @@ private:
typedef std::list<CInterfaceLink *> TLinkList;
typedef NLMISC::CSmartPtr<CInterfaceLink> TLinkSmartPtr;
typedef std::vector<TLinkSmartPtr> TLinkVect;
typedef std::vector<ICDBNode *> TNodeVect;
typedef std::vector<NLMISC::ICDBNode *> TNodeVect;
private:
std::vector<CTarget> _Targets;
TNodeVect _ObservedNodes;
@ -161,7 +161,7 @@ private:
* This doesn't update the node directly, but mark it as 'triggered'
* The node is really updated during the call to 'updateTrigeredLinks()'
*/
virtual void update(ICDBNode *node);
virtual void update(NLMISC::ICDBNode *node);
void createObservers(const TNodeVect &nodes);
void removeObservers(const TNodeVect &nodes);
// debug : check that there are as many targets as reference to a link

View file

@ -229,12 +229,12 @@ public:
/// Get the root of the database
CCDBNodeBranch *getDB() const { return _DbRootNode; }
NLMISC::CCDBNodeBranch *getDB() const { return _DbRootNode; }
// yoyo: should avoid to try creating DbPropr with this system... very dangerous
CCDBNodeLeaf* getDbProp (const std::string & name, bool bCreate=true);
NLMISC::CCDBNodeLeaf* getDbProp (const std::string & name, bool bCreate=true);
void delDbProp(const std::string & name);
// get a Db Branch by its name. NULL if don't exist or not a branch (never try to create it)
CCDBNodeBranch *getDbBranch(const std::string &name);
NLMISC::CCDBNodeBranch *getDbBranch(const std::string &name);
// return the DB as an int32. return 0 if the DB does not exist (never create)
sint32 getDbValue32 (const std::string & name);
@ -448,7 +448,7 @@ public:
* \param id : the text id of the element to observe
* \return true if success
*/
bool addDBObserver (ICDBNode::IPropertyObserver* observer, ICDBNode::CTextId id);
bool addDBObserver (NLMISC::ICDBNode::IPropertyObserver* observer, NLMISC::ICDBNode::CTextId id);
/**
* add an observer to a database entry
@ -456,17 +456,17 @@ public:
* \param id : the text id of the element to observe
* \return true if success
*/
bool addDBObserver (ICDBNode::IPropertyObserver* observer, const std::string& id)
bool addDBObserver (NLMISC::ICDBNode::IPropertyObserver* observer, const std::string& id)
{
return addDBObserver(observer, ICDBNode::CTextId(id));
return addDBObserver(observer, NLMISC::ICDBNode::CTextId(id));
}
/** remove the observer from the dataBase
*/
bool removeDBObserver (ICDBNode::IPropertyObserver* observer, ICDBNode::CTextId id);
bool removeDBObserver (ICDBNode::IPropertyObserver* observer, const std::string& id)
bool removeDBObserver (NLMISC::ICDBNode::IPropertyObserver* observer, NLMISC::ICDBNode::CTextId id);
bool removeDBObserver (NLMISC::ICDBNode::IPropertyObserver* observer, const std::string& id)
{
return removeDBObserver(observer, ICDBNode::CTextId(id));
return removeDBObserver(observer, NLMISC::ICDBNode::CTextId(id));
}
/// \name Global Interface Options
@ -658,7 +658,7 @@ public:
uint8 getLocalSyncActionCounter() const {return _LocalSyncActionCounter;}
uint8 getLocalSyncActionCounterMask() const {return _LocalSyncActionCounterMask;}
bool localActionCounterSynchronizedWith(CCDBNodeLeaf *leaf)
bool localActionCounterSynchronizedWith(NLMISC::CCDBNodeLeaf *leaf)
{
if (!leaf) return false;
uint srvVal= leaf->getValue32();
@ -737,31 +737,31 @@ private:
void release();
// When something in the SERVER DB changes
void onServerChange(ICDBNode *serverNode);
void onServerChange(NLMISC::ICDBNode *serverNode);
// When something in the LOCAL DB changes
void onLocalChange(ICDBNode *localNode);
void onLocalChange(NLMISC::ICDBNode *localNode);
private:
class CLocalDBObserver : public ICDBNode::IPropertyObserver
class CLocalDBObserver : public NLMISC::ICDBNode::IPropertyObserver
{
public:
CServerToLocalAutoCopy &_Owner;
CLocalDBObserver(CServerToLocalAutoCopy &owner) : _Owner(owner) {}
virtual void update(ICDBNode *node) {_Owner.onLocalChange(node);}
virtual void update(NLMISC::ICDBNode *node) {_Owner.onLocalChange(node);}
};
class CServerDBObserver : public ICDBNode::IPropertyObserver
class CServerDBObserver : public NLMISC::ICDBNode::IPropertyObserver
{
public:
CServerToLocalAutoCopy &_Owner;
CServerDBObserver(CServerToLocalAutoCopy &owner) : _Owner(owner) {}
virtual void update(ICDBNode *node) {_Owner.onServerChange(node);}
virtual void update(NLMISC::ICDBNode *node) {_Owner.onServerChange(node);}
};
// A node here is a pair Server<->Local
struct CNode
{
CCDBNodeLeaf *ServerNode;
CCDBNodeLeaf *LocalNode;
NLMISC::CCDBNodeLeaf *ServerNode;
NLMISC::CCDBNodeLeaf *LocalNode;
bool InsertedInUpdateList;
CNode()
{
@ -786,7 +786,7 @@ private:
private:
// Counter Node
CCDBNodeLeaf *_ServerCounter;
NLMISC::CCDBNodeLeaf *_ServerCounter;
// updaters
CLocalDBObserver _LocalObserver;
CServerDBObserver _ServerObserver;
@ -802,7 +802,7 @@ private:
// List of nodes to update until next synchonized client-server counter
std::vector<CNode*> _UpdateList;
void buildRecursLocalLeaves(CCDBNodeBranch *branch, std::vector<CCDBNodeLeaf*> &leaves);
void buildRecursLocalLeaves(NLMISC::CCDBNodeBranch *branch, std::vector<NLMISC::CCDBNodeLeaf*> &leaves);
};
// Infos about a modal window.
@ -833,10 +833,10 @@ private:
// Database management stuff
class CDBLandmarkObs : public ICDBNode::IPropertyObserver
class CDBLandmarkObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode *node);
virtual void update(NLMISC::ICDBNode *node);
};
// EMOTES
@ -858,22 +858,22 @@ private:
// ------------------------------------------------------------------------------------------------
public:
// cache and expose some commonly used db nodes
CCDBNodeBranch *_DBB_UI_DUMMY;
CCDBNodeLeaf *_DB_UI_DUMMY_QUANTITY;
CCDBNodeLeaf *_DB_UI_DUMMY_QUALITY;
CCDBNodeLeaf *_DB_UI_DUMMY_SHEET;
CCDBNodeLeaf *_DB_UI_DUMMY_NAMEID;
CCDBNodeLeaf *_DB_UI_DUMMY_ENCHANT;
CCDBNodeLeaf *_DB_UI_DUMMY_SLOT_TYPE;
CCDBNodeLeaf *_DB_UI_DUMMY_PHRASE;
CCDBNodeLeaf *_DB_UI_DUMMY_WORNED;
CCDBNodeLeaf *_DB_UI_DUMMY_PREREQUISIT_VALID;
CCDBNodeLeaf *_DB_UI_DUMMY_FACTION_TYPE;
NLMISC::CCDBNodeBranch *_DBB_UI_DUMMY;
NLMISC::CCDBNodeLeaf *_DB_UI_DUMMY_QUANTITY;
NLMISC::CCDBNodeLeaf *_DB_UI_DUMMY_QUALITY;
NLMISC::CCDBNodeLeaf *_DB_UI_DUMMY_SHEET;
NLMISC::CCDBNodeLeaf *_DB_UI_DUMMY_NAMEID;
NLMISC::CCDBNodeLeaf *_DB_UI_DUMMY_ENCHANT;
NLMISC::CCDBNodeLeaf *_DB_UI_DUMMY_SLOT_TYPE;
NLMISC::CCDBNodeLeaf *_DB_UI_DUMMY_PHRASE;
NLMISC::CCDBNodeLeaf *_DB_UI_DUMMY_WORNED;
NLMISC::CCDBNodeLeaf *_DB_UI_DUMMY_PREREQUISIT_VALID;
NLMISC::CCDBNodeLeaf *_DB_UI_DUMMY_FACTION_TYPE;
private:
CCDBNodeLeaf *_CheckMailNode;
CCDBNodeLeaf *_CheckForumNode;
NLMISC::CCDBNodeLeaf *_CheckMailNode;
NLMISC::CCDBNodeLeaf *_CheckForumNode;
sint64 _UpdateWeatherTime;
// @}
@ -908,7 +908,7 @@ private:
///the singleton's instance
static CInterfaceManager* _Instance;
CCDBNodeLeaf *_DescTextTarget;
NLMISC::CCDBNodeLeaf *_DescTextTarget;
// Capture
NLMISC::CRefPtr<CCtrlBase> _CaptureKeyboard;
@ -960,7 +960,7 @@ private:
sint32 _LastInGameScreenW, _LastInGameScreenH; // Resolution used for last InGame interface
// root node for interfaces properties in the databases
CCDBNodeBranch *_DbRootNode;
NLMISC::CCDBNodeBranch *_DbRootNode;
// List of active Anims
std::vector<CInterfaceAnim*> _ActiveAnims;
@ -998,14 +998,14 @@ private:
void restoreAllContainersBackupPosition();
// Some Node leaf
CCDBNodeLeaf *_NeutralColor;
CCDBNodeLeaf *_WarningColor;
CCDBNodeLeaf *_ErrorColor;
CCDBNodeLeaf *_RProp;
CCDBNodeLeaf *_GProp;
CCDBNodeLeaf *_BProp;
CCDBNodeLeaf *_AProp;
CCDBNodeLeaf *_AlphaRolloverSpeedDB;
NLMISC::CCDBNodeLeaf *_NeutralColor;
NLMISC::CCDBNodeLeaf *_WarningColor;
NLMISC::CCDBNodeLeaf *_ErrorColor;
NLMISC::CCDBNodeLeaf *_RProp;
NLMISC::CCDBNodeLeaf *_GProp;
NLMISC::CCDBNodeLeaf *_BProp;
NLMISC::CCDBNodeLeaf *_AProp;
NLMISC::CCDBNodeLeaf *_AlphaRolloverSpeedDB;
// The next ViewText to draw for Over
NLMISC::CRefPtr<CInterfaceElement> _OverExtendViewText;

View file

@ -30,7 +30,7 @@
* \author Nevrax France
* \date 2002
*/
class IInterfaceObserver : public ICDBNode::IPropertyObserver
class IInterfaceObserver : public NLMISC::ICDBNode::IPropertyObserver
{
public:
@ -45,7 +45,7 @@ public:
/**
* observer update
*/
virtual void update (CCDBNodeLeaf* leaf)=0;
virtual void update (NLMISC::CCDBNodeLeaf* leaf)=0;
};
@ -160,7 +160,7 @@ public:
return NULL;
}
}
if ( ! iMngr->addDBObserver(obs,ICDBNode::CTextId (data) ) )
if ( ! iMngr->addDBObserver(obs,NLMISC::ICDBNode::CTextId (data) ) )
{
return NULL;
}

View file

@ -22,9 +22,9 @@
#include "nel/misc/types_nl.h"
#include "nel/misc/rgba.h"
#include "../cdb.h"
#include "../cdb_leaf.h"
#include "../cdb_branch.h"
#include "nel/misc/cdb.h"
#include "nel/misc/cdb_leaf.h"
#include "nel/misc/cdb_branch.h"
#include "../cdb_synchronised.h"
@ -50,20 +50,20 @@ public:
_VolatileValue = NULL;
}
CCDBNodeLeaf* getNodePtr() const
NLMISC::CCDBNodeLeaf* getNodePtr() const
{
return _VolatileValue;
}
void setNodePtr(CCDBNodeLeaf *ptr)
void setNodePtr(NLMISC::CCDBNodeLeaf *ptr)
{
_VolatileValue = ptr;
}
bool link (const char *DBProp);
bool link( CCDBNodeLeaf *dbNode );
bool link( CCDBNodeBranch *dbNode, const std::string &leafId, CCDBNodeLeaf *defaultLeaf = NULL );
bool link( NLMISC::CCDBNodeLeaf *dbNode );
bool link( NLMISC::CCDBNodeBranch *dbNode, const std::string &leafId, NLMISC::CCDBNodeLeaf *defaultLeaf = NULL );
/// float operations
void setDouble (double value) {setSInt64((sint64&) value);}
@ -99,7 +99,7 @@ public:
private:
/// volatile value of the property (pointer to a leaf of the database)
CCDBNodeLeaf* _VolatileValue;
NLMISC::CCDBNodeLeaf* _VolatileValue;
};
#endif // NL_INTERFACE_PROPERTY_H

View file

@ -17,16 +17,16 @@
#include "stdpch.h"
#include "../cdb_leaf.h"
#include "../cdb_branch.h"
#include "nel/misc/cdb_leaf.h"
#include "nel/misc/cdb_branch.h"
#include "inventory_manager.h"
#include "interface_manager.h"
#include "bot_chat_page_trade.h"
#include "bot_chat_page_all.h"
#include "group_container.h"
#include "group_menu.h"
#include "../cdb_leaf.h"
#include "../cdb_branch.h"
#include "nel/misc/cdb_leaf.h"
#include "nel/misc/cdb_branch.h"
#include "list_sheet_base.h"
#include "../net_manager.h"
#include "../user_entity.h"

View file

@ -19,7 +19,7 @@
#ifndef RY_INVENTORY_MANAGER_H
#define RY_INVENTORY_MANAGER_H
#include "../cdb_leaf.h"
#include "nel/misc/cdb_leaf.h"
#include "dbgroup_list_sheet_text.h"
#include "dbgroup_list_sheet.h"
#include "game_share/item_infos.h"
@ -27,7 +27,9 @@
#include "game_share/inventories.h"
#include "game_share/bot_chat_types.h"
namespace NLMISC{
class CCDBNodeBranch;
}
class CDBCtrlSheet;
@ -55,21 +57,21 @@ const uint MAX_PLAYER_INV_ENTRIES = std::max(MAX_BAGINV_ENTRIES, MAX_ANIMALINV_E
class CItemImage
{
public:
CCDBNodeLeaf *Sheet;
CCDBNodeLeaf *Quality;
CCDBNodeLeaf *Quantity;
CCDBNodeLeaf *UserColor;
CCDBNodeLeaf *Price;
CCDBNodeLeaf *Weight;
CCDBNodeLeaf *NameId;
CCDBNodeLeaf *InfoVersion;
CCDBNodeLeaf *ResaleFlag;
NLMISC::CCDBNodeLeaf *Sheet;
NLMISC::CCDBNodeLeaf *Quality;
NLMISC::CCDBNodeLeaf *Quantity;
NLMISC::CCDBNodeLeaf *UserColor;
NLMISC::CCDBNodeLeaf *Price;
NLMISC::CCDBNodeLeaf *Weight;
NLMISC::CCDBNodeLeaf *NameId;
NLMISC::CCDBNodeLeaf *InfoVersion;
NLMISC::CCDBNodeLeaf *ResaleFlag;
public:
// ctor
CItemImage();
// build from a branch
void build(CCDBNodeBranch *branch);
void build(NLMISC::CCDBNodeBranch *branch);
// shortcuts to avoid NULL pointer tests
uint32 getSheetID() const { return (uint32) (Sheet ? Sheet->getValue32() : 0); }
uint16 getQuality() const { return (uint16) (Quality ? Quality->getValue16() : 0); }
@ -302,14 +304,14 @@ private:
sint32 Equip[MAX_EQUIPINV_ENTRIES];
CDBCtrlSheet *UIEquip[MAX_EQUIPINV_ENTRIES];
CDBCtrlSheet *UIEquip2[MAX_EQUIPINV_ENTRIES];
CCDBNodeLeaf *Money;
NLMISC::CCDBNodeLeaf *Money;
CItemImage PAInv[MAX_INVENTORY_ANIMAL][MAX_ANIMALINV_ENTRIES];
// SERVER INVENTORY
CItemImage ServerBag[MAX_BAGINV_ENTRIES];
CItemImage ServerTempInv[MAX_TEMPINV_ENTRIES];
sint32 ServerHands[MAX_HANDINV_ENTRIES];
sint32 ServerEquip[MAX_EQUIPINV_ENTRIES];
CCDBNodeLeaf *ServerMoney;
NLMISC::CCDBNodeLeaf *ServerMoney;
CItemImage ServerPAInv[MAX_INVENTORY_ANIMAL][MAX_ANIMALINV_ENTRIES];
// Drag'n'Drop
TFrom DNDFrom;
@ -343,24 +345,24 @@ private:
// ItemExtraInfo management.
void onTradeChangeSession();
void onReceiveItemSheet(ICDBNode* node);
void onReceiveItemInfoSlotVersion(ICDBNode* node);
void onReceiveItemSheet(NLMISC::ICDBNode* node);
void onReceiveItemInfoSlotVersion(NLMISC::ICDBNode* node);
void updateItemInfoQueue();
void updateItemInfoWaiters(uint slotId);
class CItemInfoSlotVersionObs : public ICDBNode::IPropertyObserver
class CItemInfoSlotVersionObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
class CItemSheetObs : public ICDBNode::IPropertyObserver
class CItemSheetObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
class CItemInfoTradeObs : public ICDBNode::IPropertyObserver
class CItemInfoTradeObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
CItemInfoTradeObs _DBTradeInfoObs;
CItemInfoSlotVersionObs _DBInfoSlotVersionObs;
@ -370,19 +372,19 @@ private:
friend class CItemSheetObs;
// Equipment observer
class CDBEquipObs : public ICDBNode::IPropertyObserver
class CDBEquipObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
CDBEquipObs _DBEquipObs;
friend class CDBEquipObs;
// Bag observer for auto equipment (put only on the sheet leaf)
class CDBBagObs : public ICDBNode::IPropertyObserver
class CDBBagObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
CDBBagObs _DBBagObs;
};
@ -441,24 +443,24 @@ private:
CTempInvManager();
// Database management stuff
class CDBObs : public ICDBNode::IPropertyObserver
class CDBObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
class CDBObsType : public ICDBNode::IPropertyObserver
class CDBObsType : public NLMISC::ICDBNode::IPropertyObserver
{
public:
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
// Database management stuff, specialized for forage progress
class CDBForageQQObs : public ICDBNode::IPropertyObserver
class CDBForageQQObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
CDBForageQQObs() : ICDBNode::IPropertyObserver(), WhichOne(~0), FullValue(0.0f) {}
virtual void update(ICDBNode *node);
CDBForageQQObs() : NLMISC::ICDBNode::IPropertyObserver(), WhichOne(~0), FullValue(0.0f) {}
virtual void update(NLMISC::ICDBNode *node);
uint WhichOne;
float FullValue;
};
@ -504,12 +506,12 @@ struct SBagOptions
{
CInventoryManager::TInvType InvType;
CCDBNodeLeaf *DbFilterArmor;
CCDBNodeLeaf *DbFilterWeapon;
CCDBNodeLeaf *DbFilterTool;
CCDBNodeLeaf *DbFilterMP;
CCDBNodeLeaf *DbFilterMissMP;
CCDBNodeLeaf *DbFilterTP;
NLMISC::CCDBNodeLeaf *DbFilterArmor;
NLMISC::CCDBNodeLeaf *DbFilterWeapon;
NLMISC::CCDBNodeLeaf *DbFilterTool;
NLMISC::CCDBNodeLeaf *DbFilterMP;
NLMISC::CCDBNodeLeaf *DbFilterMissMP;
NLMISC::CCDBNodeLeaf *DbFilterTP;
bool LastDbFilterArmor;
bool LastDbFilterWeapon;

View file

@ -76,7 +76,7 @@
* \author Nevrax France
* \date August 2003
*/
class CHugeListObs : public ICDBNode::IPropertyObserver
class CHugeListObs : public NLMISC::ICDBNode::IPropertyObserver
{
public:
@ -119,39 +119,39 @@ private:
class CItemDBLeaves
{
public:
CCDBNodeLeaf *GuildIcon; // valid only for ascensor
CCDBNodeLeaf *GuildName; // valid only for ascensor
NLMISC::CCDBNodeLeaf *GuildIcon; // valid only for ascensor
NLMISC::CCDBNodeLeaf *GuildName; // valid only for ascensor
//
CCDBNodeLeaf *SlotType;
CCDBNodeLeaf *Quality;
CCDBNodeLeaf *SheetIDOrSkill;
NLMISC::CCDBNodeLeaf *SlotType;
NLMISC::CCDBNodeLeaf *Quality;
NLMISC::CCDBNodeLeaf *SheetIDOrSkill;
//
CCDBNodeLeaf *LogicTextID; // valid if the item is to be obtained for a mission
CCDBNodeLeaf *DescTextID; // valid if the item is to be obtained for a mission
NLMISC::CCDBNodeLeaf *LogicTextID; // valid if the item is to be obtained for a mission
NLMISC::CCDBNodeLeaf *DescTextID; // valid if the item is to be obtained for a mission
//
CCDBNodeLeaf *Price; // valid if the item is to be obtained with money
NLMISC::CCDBNodeLeaf *Price; // valid if the item is to be obtained with money
//
CCDBNodeLeaf *MissionText;
CCDBNodeLeaf *MissionDetailText;
CCDBNodeLeaf *MissionIcon;
CCDBNodeLeaf *MissionPreReqState;
NLMISC::CCDBNodeLeaf *MissionText;
NLMISC::CCDBNodeLeaf *MissionDetailText;
NLMISC::CCDBNodeLeaf *MissionIcon;
NLMISC::CCDBNodeLeaf *MissionPreReqState;
// items only
CCDBNodeLeaf *Weight;
CCDBNodeLeaf *NameId;
CCDBNodeLeaf *InfoVersion;
CCDBNodeLeaf *UserColor;
CCDBNodeLeaf *Enchant;
CCDBNodeLeaf *RMClassType;
CCDBNodeLeaf *RMFaberStatType;
CCDBNodeLeaf *PrerequisitValid;
NLMISC::CCDBNodeLeaf *Weight;
NLMISC::CCDBNodeLeaf *NameId;
NLMISC::CCDBNodeLeaf *InfoVersion;
NLMISC::CCDBNodeLeaf *UserColor;
NLMISC::CCDBNodeLeaf *Enchant;
NLMISC::CCDBNodeLeaf *RMClassType;
NLMISC::CCDBNodeLeaf *RMFaberStatType;
NLMISC::CCDBNodeLeaf *PrerequisitValid;
// items Resale only
CCDBNodeLeaf *Quantity;
CCDBNodeLeaf *PriceRetire;
CCDBNodeLeaf *ResaleTimeLeft;
CCDBNodeLeaf *VendorNameId;
CCDBNodeLeaf *FactionType;
CCDBNodeLeaf *FactionPointPrice;
CCDBNodeLeaf *SellerType;
NLMISC::CCDBNodeLeaf *Quantity;
NLMISC::CCDBNodeLeaf *PriceRetire;
NLMISC::CCDBNodeLeaf *ResaleTimeLeft;
NLMISC::CCDBNodeLeaf *VendorNameId;
NLMISC::CCDBNodeLeaf *FactionType;
NLMISC::CCDBNodeLeaf *FactionPointPrice;
NLMISC::CCDBNodeLeaf *SellerType;
public:
CItemDBLeaves() : GuildIcon(NULL),
GuildName(NULL),
@ -182,7 +182,7 @@ private:
{}
};
//
virtual void update(ICDBNode *node);
virtual void update(NLMISC::ICDBNode *node);
void updateUIItemPage(uint index);
@ -199,9 +199,9 @@ private:
bool _Init;
CItemDBLeaves _Items[TRADE_PAGE_NUM_ITEMS];
sint16 _CurrentSessionNb;
CCDBNodeLeaf *_Session;
CCDBNodeLeaf *_PageID;
CCDBNodeLeaf *_HasNext;
NLMISC::CCDBNodeLeaf *_Session;
NLMISC::CCDBNodeLeaf *_PageID;
NLMISC::CCDBNodeLeaf *_HasNext;
bool _DownloadComplete;
@ -272,8 +272,8 @@ private:
uint32 _PhraseClientFillFlags;
uint32 _PhraseClientFillRace;
uint32 _PhraseClientFillNumPhrase;
CCDBNodeLeaf *_RoleMasterFlagDB;
CCDBNodeLeaf *_RoleMasterRaceDB;
NLMISC::CCDBNodeLeaf *_RoleMasterFlagDB;
NLMISC::CCDBNodeLeaf *_RoleMasterRaceDB;
};
#endif

View file

@ -23,7 +23,7 @@
#include "../client_sheets/sbrick_sheet.h"
#include "game_share/sabrina_com.h"
#include "game_share/skills.h"
#include "../cdb.h"
#include "nel/misc/cdb.h"
#include "brick_learned_callback.h"
@ -83,7 +83,7 @@ public:
/**
* \return the DB pointing on the BitField for this family.
*/
class CCDBNodeLeaf* getKnownBrickBitFieldDB(uint family) const;
class NLMISC::CCDBNodeLeaf* getKnownBrickBitFieldDB(uint family) const;
/**
* \return true if the brick is learn by the player.
@ -159,7 +159,7 @@ protected:
std::vector <std::vector<NLMISC::CSheetId> > _SheetsByFamilies;
///vector of bit fields describing the known bricks of each family
std::vector<CCDBNodeLeaf*> _FamiliesBits;
std::vector<NLMISC::CCDBNodeLeaf*> _FamiliesBits;
/// list of roots only
std::vector <NLMISC::CSheetId> _Roots;
@ -195,11 +195,11 @@ protected:
NLMISC::CSheetId _InterfaceRemoveBrick;
// Observer when a brick is learned
struct CBrickFamilyObs : public ICDBNode::IPropertyObserver
struct CBrickFamilyObs : public NLMISC::ICDBNode::IPropertyObserver
{
CSBrickManager *Owner;
virtual void update (ICDBNode *node);
virtual void update (NLMISC::ICDBNode *node);
};
friend struct CBrickFamilyObs;
CBrickFamilyObs _BrickFamilyObs;

View file

@ -24,7 +24,7 @@
#include "game_share/character_title.h"
#include "game_share/fame.h"
#include "../sheet_manager.h"
#include "../cdb_leaf.h"
#include "nel/misc/cdb_leaf.h"
#include "action_handler.h"
#include "sbrick_manager.h"
#include "dbgroup_combo_box.h"

View file

@ -23,7 +23,7 @@
#include "game_share/skills.h"
//#include "game_share/jobs.h"
#include "game_share/roles.h"
#include "../cdb.h"
#include "nel/misc/cdb.h"
#include "brick_learned_callback.h"
#include "skill_change_callback.h"
@ -189,16 +189,16 @@ private:
uint32 _MinSkillValue[SKILLS::NUM_SKILLS];
/// Nodes on skill values and base values
CCDBNodeLeaf *_SkillValues[SKILLS::NUM_SKILLS];
CCDBNodeLeaf *_SkillBaseValues[SKILLS::NUM_SKILLS];
NLMISC::CCDBNodeLeaf *_SkillValues[SKILLS::NUM_SKILLS];
NLMISC::CCDBNodeLeaf *_SkillBaseValues[SKILLS::NUM_SKILLS];
// Max child baseskill value (used when checking requirements)
uint32 _MaxChildBaseSkillValue[SKILLS::NUM_SKILLS];
// CallBack set for skill changes
struct CSkillChangeObs : public ICDBNode::IPropertyObserver
struct CSkillChangeObs : public NLMISC::ICDBNode::IPropertyObserver
{
virtual void update (ICDBNode * /* node */)
virtual void update (NLMISC::ICDBNode * /* node */)
{
CSkillManager *pSM= CSkillManager::getInstance();
pSM->onSkillChange();
@ -214,7 +214,7 @@ private:
sint32 _CacheSkillBaseValues[SKILLS::NUM_SKILLS];
// A node incremented at each change of skill (the number is not relevant)
CCDBNodeLeaf *_TrackSkillChange;
NLMISC::CCDBNodeLeaf *_TrackSkillChange;
// "Title of the player" Management
// -----------------------------------------------------------------------------

View file

@ -54,7 +54,9 @@ const std::string PHRASE_DB_COUNTER_CYCLE="SERVER:EXECUTE_PHRASE:CYCLE_COUNTER"
// TODO_OPTIM: too big test for the list_sheet* each frame with 512 entries!!!
class CSuccessTableSheet;
namespace NLMISC{
class CCDBNodeLeaf;
}
/** Special helper class for lua export : enclose a phrase into an object accessible to lua
@ -457,11 +459,11 @@ private:
CTickRange _BrickRegenRange[64];
// Shortcut To Phrases Leaves
std::vector<CCDBNodeLeaf*> _BookDbLeaves;
std::vector<CCDBNodeLeaf*> _MemoryDbLeaves;
std::vector<CCDBNodeLeaf*> _MemoryAltDbLeaves;
CCDBNodeLeaf *_NextExecuteLeaf;
CCDBNodeLeaf *_NextExecuteIsCyclicLeaf;
std::vector<NLMISC::CCDBNodeLeaf*> _BookDbLeaves;
std::vector<NLMISC::CCDBNodeLeaf*> _MemoryDbLeaves;
std::vector<NLMISC::CCDBNodeLeaf*> _MemoryAltDbLeaves;
NLMISC::CCDBNodeLeaf *_NextExecuteLeaf;
NLMISC::CCDBNodeLeaf *_NextExecuteIsCyclicLeaf;
// extra client data
struct CPhraseClient
@ -582,8 +584,8 @@ private:
void updateMemoryCtrlState(uint memorySlot);
// Shortcut To PhraseSheets Leaves in BotChat
std::vector<CCDBNodeLeaf*> _BotChatPhraseSheetLeaves;
std::vector<CCDBNodeLeaf*> _BotChatPhrasePriceLeaves;
std::vector<NLMISC::CCDBNodeLeaf*> _BotChatPhraseSheetLeaves;
std::vector<NLMISC::CCDBNodeLeaf*> _BotChatPhrasePriceLeaves;
// For phrase compatibility with enchant weapon special power
NLMISC::CSheetId _EnchantWeaponMainBrick;
@ -597,9 +599,9 @@ private:
NumProgressType
};
std::vector<CCDBNodeLeaf*> _ProgressionDbSheets[NumProgressType];
std::vector<CCDBNodeLeaf*> _ProgressionDbLevels[NumProgressType];
std::vector<CCDBNodeLeaf*> _ProgressionDbLocks[NumProgressType];
std::vector<NLMISC::CCDBNodeLeaf*> _ProgressionDbSheets[NumProgressType];
std::vector<NLMISC::CCDBNodeLeaf*> _ProgressionDbLevels[NumProgressType];
std::vector<NLMISC::CCDBNodeLeaf*> _ProgressionDbLocks[NumProgressType];
// For each skill, which phrase are learned when the skill is gained
class CPhraseProgressInfo
@ -704,7 +706,7 @@ private:
CTickRange getRegenTickRange(const CSPhraseCom &phrase) const;
CCDBNodeLeaf *getRegenTickRangeDbLeaf(uint powerIndex) const;
NLMISC::CCDBNodeLeaf *getRegenTickRangeDbLeaf(uint powerIndex) const;
// get regen tick range for a specific power, from the database
CTickRange getRegenTickRange(uint powerIndex) const;
public:

View file

@ -20,7 +20,7 @@
#ifndef NL_VIEW_BITMAP_COMBO_H
#define NL_VIEW_BITMAP_COMBO_H
#include "../cdb.h"
#include "nel/misc/cdb.h"
#include "view_base.h"
#include "nel/3d/u_texture.h"
#include <string>
@ -67,7 +67,7 @@
struct CComboBoxDesc
{
bool parse(xmlNodePtr cur, CInterfaceElement *owner);
void addObserver(ICDBNode::IPropertyObserver *obs);
void addObserver(NLMISC::ICDBNode::IPropertyObserver *obs);
void getGridSize(uint &numRow,uint &numCol) const;
void getDimensions(uint &width, uint &height) const;
CInterfaceProperty NumRow;
@ -94,7 +94,7 @@ struct CComboBoxDesc
* \author Nevrax France
* \date 2002
*/
class CViewBitmapCombo : public CViewBase, public ICDBNode::IPropertyObserver
class CViewBitmapCombo : public CViewBase, public NLMISC::ICDBNode::IPropertyObserver
{
public:
typedef std::vector<sint32> TIdArray;
@ -160,7 +160,7 @@ private:
void setupSize();
void getDimensions(uint &numRow, uint &numCol);
// From ICDBNode::IPropertyObserver
void update(ICDBNode *leaf);
void update(NLMISC::ICDBNode *leaf);
// Return a color from the array, or white if it is empty
static NLMISC::CRGBA getCol(const TColorArray &array, uint index);
static const std::string *getTex(const TStringArray &array, uint index);

View file

@ -28,6 +28,7 @@
using namespace std;
using namespace STRING_MANAGER;
using NLMISC::CCDBNodeLeaf;
NLMISC_REGISTER_OBJECT(CViewBase, CViewTextID, std::string, "text_id");

View file

@ -22,8 +22,9 @@
#include "nel/misc/types_nl.h"
#include "view_text.h"
namespace NLMISC{
class CCDBNodeLeaf;
}
// ***************************************************************************
class IOnReceiveTextId
@ -91,7 +92,7 @@ public:
*/
bool setDBTextID(const std::string &dbPath);
// set a text from a db leaf
void setDBLeaf(CCDBNodeLeaf *leaf);
void setDBLeaf(NLMISC::CCDBNodeLeaf *leaf);
std::string getTextIdDbLink() const;
void setTextIdDbLink(const std::string &link);

View file

@ -141,7 +141,9 @@ extern bool CharNameValid;
bool IsInRingSession = false;
TSessionId HighestMainlandSessionId; // highest in the position stack
namespace NLMISC{
extern const char *CDBBankNames[INVALID_CDB_BANK+1];
}
void cbImpulsionGatewayOpen(NLMISC::CBitMemStream &bms);
void cbImpulsionGatewayMessage(NLMISC::CBitMemStream &bms);
@ -220,7 +222,7 @@ void impulseDatabaseUpdateBank(NLMISC::CBitMemStream &impulse)
}
catch (const Exception &e)
{
BOMB( NLMISC::toString( "Problem while decoding a DB_GROUP:UPDATE_BANK %s msg, skipped: %s", CDBBankNames[bank], e.what() ), return );
BOMB( NLMISC::toString( "Problem while decoding a DB_GROUP:UPDATE_BANK %s msg, skipped: %s", NLMISC::CDBBankNames[bank], e.what() ), return );
}
}
@ -240,7 +242,7 @@ void impulseDatabaseInitBank(NLMISC::CBitMemStream &impulse)
// read delta
IngameDbMngr.readDelta( serverTick, impulse, (TCDBBank)bank );
nldebug( "CDB: DB_GROUP:INIT_BANK %s", CDBBankNames[bank] );
nldebug( "CDB: DB_GROUP:INIT_BANK %s", NLMISC::CDBBankNames[bank] );
// read guild inventory update
if ( bank == CDBGuild )
@ -250,7 +252,7 @@ void impulseDatabaseInitBank(NLMISC::CBitMemStream &impulse)
}
catch (const Exception &e)
{
BOMB( NLMISC::toString( "Problem while decoding a DB_GROUP:INIT_BANK %s msg, skipped: %s", CDBBankNames[bank], e.what() ), return );
BOMB( NLMISC::toString( "Problem while decoding a DB_GROUP:INIT_BANK %s msg, skipped: %s", NLMISC::CDBBankNames[bank], e.what() ), return );
}
}
@ -270,11 +272,11 @@ void impulseDatabaseResetBank(NLMISC::CBitMemStream &impulse)
// reset the bank
IngameDbMngr.getNodePtr()->resetBank( serverTick, (TCDBBank)bank );
nldebug( "CDB: DB_GROUP:RESET_BANK %s", CDBBankNames[bank] );
nldebug( "CDB: DB_GROUP:RESET_BANK %s", NLMISC::CDBBankNames[bank] );
}
catch (const Exception &e)
{
BOMB( NLMISC::toString( "Problem while decoding a DB_GROUP:RESET_BANK %s msg, skipped: %s", CDBBankNames[bank], e.what() ), return );
BOMB( NLMISC::toString( "Problem while decoding a DB_GROUP:RESET_BANK %s msg, skipped: %s", NLMISC::CDBBankNames[bank], e.what() ), return );
}
}

View file

@ -244,7 +244,7 @@ public:
//void clearChanges() { ALL_MANAGERS->clearChanges(); }
void setImpulseCallback(CNetworkConnection::TImpulseCallback callback, void *argument = NULL) { FIRST_MANAGER->setImpulseCallback( callback, argument ); }
void setDataBase(CCDBNodeBranch *database) { ALL_MANAGERS->setDataBase( database ); }
void setDataBase(NLMISC::CCDBNodeBranch *database) { ALL_MANAGERS->setDataBase( database ); }
bool connect(std::string &result) { bool res = false; std::vector<CNetManager*>::iterator inm; for( inm=_NetManagers.begin(); inm!=_NetManagers.end(); ++inm ) if ( (*inm)->connect( result ) ) res = true; return res; }
CNetworkConnection::TConnectionState getConnectionState() const { return FIRST_MANAGER->getConnectionState(); }

View file

@ -41,9 +41,9 @@
#include "game_share/simlag.h"
#include "cdb.h"
#include "cdb_leaf.h"
#include "cdb_branch.h"
#include "nel/misc/cdb.h"
#include "nel/misc/cdb_leaf.h"
#include "nel/misc/cdb_branch.h"
#include "cdb_synchronised.h"
#include "nel/misc/variable.h"

View file

@ -60,7 +60,9 @@ const uint PropertiesPerEntity = 16;
const uint EntitiesPerClient = 256;
*/
namespace NLMISC{
class CCDBNodeBranch;
}
namespace CLFECOMMON
{
@ -364,7 +366,7 @@ public:
/**
* Set database entry point
*/
void setDataBase(CCDBNodeBranch *database);
void setDataBase(NLMISC::CCDBNodeBranch *database);
//@}
@ -669,7 +671,7 @@ protected:
CPropertyDecoder _PropertyDecoder;
/// The database entry
CCDBNodeBranch *_DataBase;
NLMISC::CCDBNodeBranch *_DataBase;
/// @name Header message decoding

View file

@ -21,7 +21,7 @@
#include "nel/misc/types_nl.h"
#include "game_share/entity_types.h"
#include "game_share/msg_client_server.h"
#include "cdb.h"
#include "nel/misc/cdb.h"
#include "entity_cl.h"
#include "interface_v3/view_radar.h"
#include <string>
@ -51,6 +51,7 @@ namespace NPC_ICON
};
};
using NLMISC::ICDBNode;
/**
* Description of a mission giver NPC.

View file

@ -27,7 +27,7 @@
#include "../misc.h"
#include "../entities.h"
#include "../pacs_client.h"
#include "../cdb_leaf.h"
#include "nel/misc/cdb_leaf.h"
#include "../interface_v3/interface_manager.h"
#include "entity_sorter.h"
//

View file

@ -887,7 +887,7 @@ private:
public:
static uint getMaxNumPlotItems();
static CCDBNodeLeaf *getPlotItemSheetDBLeaf(uint index);
static NLMISC::CCDBNodeLeaf *getPlotItemSheetDBLeaf(uint index);
static bool getIsStartingScenario() { return _IsStartingScenario; }
bool isClearingContent() const { return _ClearingContent; }
@ -897,7 +897,7 @@ private:
static void initDummyPlotItems();
void resetPlotItems();
static void setReferencePlotItemSheet(uint index, uint32 sheetId);
static CCDBNodeLeaf *getRefPlotItemSheetDBLeaf(uint index);
static NLMISC::CCDBNodeLeaf *getRefPlotItemSheetDBLeaf(uint index);
//////////
// MISC //

View file

@ -28,7 +28,7 @@
#include "../player_r2_cl.h"
#include "../sheet_manager.h"
#include "../interface_v3/lua_ihm.h"
#include "../cdb_leaf.h"
#include "nel/misc/cdb_leaf.h"
#include "../interface_v3/interface_manager.h"
#include "dmc/palette.h"
#include "displayer_visual.h"

View file

@ -29,7 +29,7 @@
// 3D Interface.
#include "nel/3d/u_visual_collision_entity.h"
// Client DB
#include "cdb.h"
#include "nel/misc/cdb.h"
// Client
#include "player_cl.h"
#include "client_cfg.h"
@ -163,7 +163,7 @@ public:
CEntityCL* getMountEntity();
/// Return the DB entry for the specified user's animal (NULL if not found)
CCDBNodeBranch *getBeastDBEntry( CLFECOMMON::TClientDataSetIndex uid );
NLMISC::CCDBNodeBranch *getBeastDBEntry( CLFECOMMON::TClientDataSetIndex uid );
/** To Inform about an entity removed (to remove from selection for example).
* This will remove the entity from the target.
@ -486,7 +486,7 @@ public:
}
protected:
class CSpeedFactor : public ICDBNode::IPropertyObserver
class CSpeedFactor : public NLMISC::ICDBNode::IPropertyObserver
{
public:
/// Initialize
@ -498,7 +498,7 @@ protected:
virtual void serial(class NLMISC::IStream &f) throw(NLMISC::EStream) {f.serial(_Value);}
protected:
/// Method called when the ping message is back.
virtual void update(ICDBNode* leaf);
virtual void update(NLMISC::ICDBNode* leaf);
private:
float _Value;
};
@ -515,7 +515,7 @@ protected:
virtual void serial(class NLMISC::IStream &/* f */) throw(NLMISC::EStream) {}
};
class CMountSpeeds : public ICDBNode::IPropertyObserver
class CMountSpeeds : public NLMISC::ICDBNode::IPropertyObserver
{
public:
/// Initialize
@ -528,7 +528,7 @@ protected:
float getRunSpeed() const { return _RunSpeed; }
protected:
/// Method called when the value is changed
virtual void update(ICDBNode* leaf);
virtual void update(NLMISC::ICDBNode* leaf);
private:
float _WalkSpeed;
float _RunSpeed;
@ -587,31 +587,31 @@ protected:
/// CSkill points observer
class CSkillPointsObserver : public ICDBNode::IPropertyObserver
class CSkillPointsObserver : public NLMISC::ICDBNode::IPropertyObserver
{
public :
uint SpType;
/// From ICDBNode::IPropertyObserver
virtual void update(ICDBNode* node );
virtual void update(NLMISC::ICDBNode* node );
};
CSkillPointsObserver _SkillPointObs[EGSPD::CSPType::EndSPType];
class CInvisibleObserver : public ICDBNode::IPropertyObserver
class CInvisibleObserver : public NLMISC::ICDBNode::IPropertyObserver
{
public :
virtual void update(ICDBNode* node);
virtual void update(NLMISC::ICDBNode* node);
};
CInvisibleObserver _InvisibleObs;
/// Fame observer
class CFameObserver : public ICDBNode::IPropertyObserver
class CFameObserver : public NLMISC::ICDBNode::IPropertyObserver
{
public :
uint32 FactionIndex;
/// From ICDBNode::IPropertyObserver
virtual void update(ICDBNode* node );
virtual void update(NLMISC::ICDBNode* node );
};
std::vector<CFameObserver *> _FamesObs;

View file

@ -25,7 +25,7 @@
#include "nel/misc/types_nl.h"
#include "streamable_ig.h"
#include "cdb.h"
#include "nel/misc/cdb.h"
#include "client_sheets/continent_sheet.h"
#include "game_share/misc_const.h"
#include <vector>

View file

@ -17,7 +17,9 @@
#include "stdpch.h"
#include "ryzom_database_banks.h"
namespace NLMISC{
const char *CDBBankNames[INVALID_CDB_BANK+1] = { "PLR", "GUILD", /* "CONTINENT", */ "OUTPOST", /* "GLOBAL", */ "<NB>", "INVALID" };
}
// leave not static else this workaround don't work