Fix
[ryzomcore.git] / ryzom / server / src / entities_game_service / database_guild.h
blob4c51f81f724e2ee21b205fb7293cb07423a470c0
3 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
4 // Copyright (C) 2010 Winch Gate Property Limited
5 //
6 // This program is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU Affero General Public License as
8 // published by the Free Software Foundation, either version 3 of the
9 // License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU Affero General Public License for more details.
16 // You should have received a copy of the GNU Affero General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 /////////////////////////////////////////////////////////////////
20 // WARNING : this is a generated file, don't change it !
21 /////////////////////////////////////////////////////////////////
23 #ifndef INCLUDED_DATABASE_database_GUILD_H
24 #define INCLUDED_DATABASE_database_GUILD_H
26 #include "nel/misc/string_common.h"
27 #include "cdb_group.h"
28 #include "player_manager/cdb.h"
29 #include "player_manager/cdb_synchronised.h"
32 #include "game_share/far_position.h"
33 inline void _setProp(CCDBSynchronised &db,
34 ICDBStructNode *node, TCharConnectionState value, bool
35 forceSending = false) { db.x_setProp(node, uint64(value),
36 forceSending); } inline void _getProp(const CCDBSynchronised
37 &db, ICDBStructNode *node, TCharConnectionState
38 &value) { value =
39 (TCharConnectionState)db.x_getProp(node); }
42 #ifndef _SET_PROP_ACCESSOR_
43 #define _SET_PROP_ACCESSOR_
44 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, bool value, bool forceSending = false)
46 db.x_setProp(node, uint64(value), forceSending);
48 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, uint8 value, bool forceSending = false)
50 db.x_setProp(node, uint64(value), forceSending);
52 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, uint16 value, bool forceSending = false)
54 db.x_setProp(node, uint64(value), forceSending);
56 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, uint32 value, bool forceSending = false)
58 db.x_setProp(node, uint64(value), forceSending);
60 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, uint64 value, bool forceSending = false)
62 db.x_setProp(node, uint64(value), forceSending);
64 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, sint8 value, bool forceSending = false)
66 db.x_setProp(node, uint64(value), forceSending);
68 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, sint16 value, bool forceSending = false)
70 db.x_setProp(node, uint64(value), forceSending);
72 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, sint32 value, bool forceSending = false)
74 db.x_setProp(node, uint64(value), forceSending);
76 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, sint64 value, bool forceSending = false)
78 db.x_setProp(node, uint64(value), forceSending);
80 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, const std::string &value, bool forceSending = false)
82 db.x_setPropString(node, value, forceSending);
84 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, const ucstring &value, bool forceSending = false)
86 db.x_setPropString(node, value, forceSending);
88 inline void _setProp(CCDBSynchronised &db, ICDBStructNode *node, const NLMISC::CSheetId &value, bool forceSending = false)
90 db.x_setProp(node, uint64(value.asInt()), forceSending);
94 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, bool &value)
96 value = db.x_getProp(node) != 0;
98 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, uint8 &value)
100 value = uint8(db.x_getProp(node));
102 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, uint16 &value)
104 value = uint16(db.x_getProp(node));
106 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, uint32 &value)
108 value = uint32(db.x_getProp(node));
110 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, uint64 &value)
112 value = db.x_getProp(node);
114 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, sint8 &value)
116 value = uint8(db.x_getProp(node));
118 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, sint16 &value)
120 value = uint16(db.x_getProp(node));
122 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, sint32 &value)
124 value = uint32(db.x_getProp(node));
126 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, sint64 &value)
128 value = db.x_getProp(node);
130 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, std::string &value)
132 value = db.x_getPropString(node);
134 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, ucstring &value)
136 value = db.x_getPropUcstring(node);
138 inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::CSheetId &value)
140 value = uint32(db.x_getProp(node));
142 #endif // _SET_PROP_ACCESSOR_
146 class CBankAccessor_GUILD : public CCDBGroup
148 public:
149 static TCDBBank BankTag;
152 class TGUILD
154 public:
156 class TFAME
158 public:
160 class TArray
162 public:
165 private:
166 ICDBStructNode *_BranchNode;
168 ICDBStructNode *_VALUE;
169 ICDBStructNode *_THRESHOLD;
170 ICDBStructNode *_TREND;
173 public:
174 void init(ICDBStructNode *parent, uint index);
176 // accessor to branch node
177 ICDBStructNode *getCDBNode()
179 return _BranchNode;
183 void setVALUE(CCDBGroup &dbGroup, sint8 value, bool forceSending = false)
187 _setProp(dbGroup.Database, _VALUE, value, forceSending);
190 sint8 getVALUE(const CCDBGroup &dbGroup)
192 sint8 value;
193 _getProp(dbGroup.Database, _VALUE, value);
195 return value;
198 ICDBStructNode *getVALUECDBNode()
200 return _VALUE;
203 void setTHRESHOLD(CCDBGroup &dbGroup, sint8 value, bool forceSending = false)
207 _setProp(dbGroup.Database, _THRESHOLD, value, forceSending);
210 sint8 getTHRESHOLD(const CCDBGroup &dbGroup)
212 sint8 value;
213 _getProp(dbGroup.Database, _THRESHOLD, value);
215 return value;
218 ICDBStructNode *getTHRESHOLDCDBNode()
220 return _THRESHOLD;
223 void setTREND(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
227 _setProp(dbGroup.Database, _TREND, value, forceSending);
230 uint8 getTREND(const CCDBGroup &dbGroup)
232 uint8 value;
233 _getProp(dbGroup.Database, _TREND, value);
235 return value;
238 ICDBStructNode *getTRENDCDBNode()
240 return _TREND;
246 private:
247 ICDBStructNode *_BranchNode;
249 ICDBStructNode *_CULT_ALLEGIANCE;
250 ICDBStructNode *_CIV_ALLEGIANCE;
251 TArray _Array[7];
254 public:
255 void init(ICDBStructNode *parent);
257 // accessor to branch node
258 ICDBStructNode *getCDBNode()
260 return _BranchNode;
264 void setCULT_ALLEGIANCE(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
267 // Check that the value is not out of database precision
268 STOP_IF(value > (1<<3)-1, "setCULT_ALLEGIANCE : Value out of bound : trying to store "<<value<<" in a unsigned field limited to 3 bits");
271 _setProp(dbGroup.Database, _CULT_ALLEGIANCE, value, forceSending);
274 uint8 getCULT_ALLEGIANCE(const CCDBGroup &dbGroup)
276 uint8 value;
277 _getProp(dbGroup.Database, _CULT_ALLEGIANCE, value);
279 return value;
282 ICDBStructNode *getCULT_ALLEGIANCECDBNode()
284 return _CULT_ALLEGIANCE;
287 void setCIV_ALLEGIANCE(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
290 // Check that the value is not out of database precision
291 STOP_IF(value > (1<<3)-1, "setCIV_ALLEGIANCE : Value out of bound : trying to store "<<value<<" in a unsigned field limited to 3 bits");
294 _setProp(dbGroup.Database, _CIV_ALLEGIANCE, value, forceSending);
297 uint8 getCIV_ALLEGIANCE(const CCDBGroup &dbGroup)
299 uint8 value;
300 _getProp(dbGroup.Database, _CIV_ALLEGIANCE, value);
302 return value;
305 ICDBStructNode *getCIV_ALLEGIANCECDBNode()
307 return _CIV_ALLEGIANCE;
309 TArray &getArray(uint32 index)
311 nlassert(index < 7);
312 return _Array[index];
317 class TMEMBERS
319 public:
321 class TArray
323 public:
326 private:
327 ICDBStructNode *_BranchNode;
329 ICDBStructNode *_NAME;
330 ICDBStructNode *_GRADE;
331 ICDBStructNode *_ONLINE;
332 ICDBStructNode *_ENTER_DATE;
335 public:
336 void init(ICDBStructNode *parent, uint index);
338 // accessor to branch node
339 ICDBStructNode *getCDBNode()
341 return _BranchNode;
345 void setNAME(CCDBGroup &dbGroup, ucstring value, bool forceSending = false)
349 _setProp(dbGroup.Database, _NAME, value, forceSending);
352 ucstring getNAME(const CCDBGroup &dbGroup)
354 ucstring value;
355 _getProp(dbGroup.Database, _NAME, value);
357 return value;
360 void setNAME(CCDBGroup &dbGroup, uint32 stringId, bool forceSending = false)
362 _setProp(dbGroup.Database, _NAME, stringId, forceSending);
364 uint32 getNAME_id(const CCDBGroup &dbGroup)
366 uint32 value;
367 _getProp(dbGroup.Database, _NAME, value);
369 return value;
372 ICDBStructNode *getNAMECDBNode()
374 return _NAME;
377 void setGRADE(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
380 // Check that the value is not out of database precision
381 STOP_IF(value > (1<<3)-1, "setGRADE : Value out of bound : trying to store "<<value<<" in a unsigned field limited to 3 bits");
384 _setProp(dbGroup.Database, _GRADE, value, forceSending);
387 uint8 getGRADE(const CCDBGroup &dbGroup)
389 uint8 value;
390 _getProp(dbGroup.Database, _GRADE, value);
392 return value;
395 ICDBStructNode *getGRADECDBNode()
397 return _GRADE;
400 void setONLINE(CCDBGroup &dbGroup, TCharConnectionState value, bool forceSending = false)
404 _setProp(dbGroup.Database, _ONLINE, value, forceSending);
407 TCharConnectionState getONLINE(const CCDBGroup &dbGroup)
409 TCharConnectionState value;
410 _getProp(dbGroup.Database, _ONLINE, value);
412 return value;
415 ICDBStructNode *getONLINECDBNode()
417 return _ONLINE;
420 void setENTER_DATE(CCDBGroup &dbGroup, uint32 value, bool forceSending = false)
424 _setProp(dbGroup.Database, _ENTER_DATE, value, forceSending);
427 uint32 getENTER_DATE(const CCDBGroup &dbGroup)
429 uint32 value;
430 _getProp(dbGroup.Database, _ENTER_DATE, value);
432 return value;
435 ICDBStructNode *getENTER_DATECDBNode()
437 return _ENTER_DATE;
443 private:
444 ICDBStructNode *_BranchNode;
446 TArray _Array[256];
449 public:
450 void init(ICDBStructNode *parent);
452 // accessor to branch node
453 ICDBStructNode *getCDBNode()
455 return _BranchNode;
458 TArray &getArray(uint32 index)
460 nlassert(index < 256);
461 return _Array[index];
466 class TINVENTORY
468 public:
471 private:
472 ICDBStructNode *_BranchNode;
474 ICDBStructNode *_SESSION;
475 ICDBStructNode *_BULK_MAX;
476 ICDBStructNode *_MONEY;
479 public:
480 void init(ICDBStructNode *parent);
482 // accessor to branch node
483 ICDBStructNode *getCDBNode()
485 return _BranchNode;
489 void setSESSION(CCDBGroup &dbGroup, uint16 value, bool forceSending = false)
493 _setProp(dbGroup.Database, _SESSION, value, forceSending);
496 uint16 getSESSION(const CCDBGroup &dbGroup)
498 uint16 value;
499 _getProp(dbGroup.Database, _SESSION, value);
501 return value;
504 ICDBStructNode *getSESSIONCDBNode()
506 return _SESSION;
509 void setBULK_MAX(CCDBGroup &dbGroup, uint32 value, bool forceSending = false)
513 _setProp(dbGroup.Database, _BULK_MAX, value, forceSending);
516 uint32 getBULK_MAX(const CCDBGroup &dbGroup)
518 uint32 value;
519 _getProp(dbGroup.Database, _BULK_MAX, value);
521 return value;
524 ICDBStructNode *getBULK_MAXCDBNode()
526 return _BULK_MAX;
529 void setMONEY(CCDBGroup &dbGroup, uint64 value, bool forceSending = false)
533 _setProp(dbGroup.Database, _MONEY, value, forceSending);
536 uint64 getMONEY(const CCDBGroup &dbGroup)
538 uint64 value;
539 _getProp(dbGroup.Database, _MONEY, value);
541 return value;
544 ICDBStructNode *getMONEYCDBNode()
546 return _MONEY;
551 class TOUTPOST
553 public:
555 class TO
557 public:
559 class TGUILD
561 public:
564 private:
565 ICDBStructNode *_BranchNode;
567 ICDBStructNode *_NAME;
568 ICDBStructNode *_ICON;
569 ICDBStructNode *_TRIBE;
570 ICDBStructNode *_NAME_ATT;
573 public:
574 void init(ICDBStructNode *parent);
576 // accessor to branch node
577 ICDBStructNode *getCDBNode()
579 return _BranchNode;
583 void setNAME(CCDBGroup &dbGroup, ucstring value, bool forceSending = false)
587 _setProp(dbGroup.Database, _NAME, value, forceSending);
590 ucstring getNAME(const CCDBGroup &dbGroup)
592 ucstring value;
593 _getProp(dbGroup.Database, _NAME, value);
595 return value;
598 void setNAME(CCDBGroup &dbGroup, uint32 stringId, bool forceSending = false)
600 _setProp(dbGroup.Database, _NAME, stringId, forceSending);
602 uint32 getNAME_id(const CCDBGroup &dbGroup)
604 uint32 value;
605 _getProp(dbGroup.Database, _NAME, value);
607 return value;
610 ICDBStructNode *getNAMECDBNode()
612 return _NAME;
615 void setICON(CCDBGroup &dbGroup, uint64 value, bool forceSending = false)
619 _setProp(dbGroup.Database, _ICON, value, forceSending);
622 uint64 getICON(const CCDBGroup &dbGroup)
624 uint64 value;
625 _getProp(dbGroup.Database, _ICON, value);
627 return value;
630 ICDBStructNode *getICONCDBNode()
632 return _ICON;
635 void setTRIBE(CCDBGroup &dbGroup, bool value, bool forceSending = false)
639 _setProp(dbGroup.Database, _TRIBE, value, forceSending);
642 bool getTRIBE(const CCDBGroup &dbGroup)
644 bool value;
645 _getProp(dbGroup.Database, _TRIBE, value);
647 return value;
650 ICDBStructNode *getTRIBECDBNode()
652 return _TRIBE;
655 void setNAME_ATT(CCDBGroup &dbGroup, ucstring value, bool forceSending = false)
659 _setProp(dbGroup.Database, _NAME_ATT, value, forceSending);
662 ucstring getNAME_ATT(const CCDBGroup &dbGroup)
664 ucstring value;
665 _getProp(dbGroup.Database, _NAME_ATT, value);
667 return value;
670 void setNAME_ATT(CCDBGroup &dbGroup, uint32 stringId, bool forceSending = false)
672 _setProp(dbGroup.Database, _NAME_ATT, stringId, forceSending);
674 uint32 getNAME_ATT_id(const CCDBGroup &dbGroup)
676 uint32 value;
677 _getProp(dbGroup.Database, _NAME_ATT, value);
679 return value;
682 ICDBStructNode *getNAME_ATTCDBNode()
684 return _NAME_ATT;
689 class TSQUAD_SPAWN_ZONE
691 public:
693 class TArray
695 public:
698 private:
699 ICDBStructNode *_BranchNode;
701 ICDBStructNode *_X;
702 ICDBStructNode *_Y;
705 public:
706 void init(ICDBStructNode *parent, uint index);
708 // accessor to branch node
709 ICDBStructNode *getCDBNode()
711 return _BranchNode;
715 void setX(CCDBGroup &dbGroup, sint32 value, bool forceSending = false)
719 _setProp(dbGroup.Database, _X, value, forceSending);
722 sint32 getX(const CCDBGroup &dbGroup)
724 sint32 value;
725 _getProp(dbGroup.Database, _X, value);
727 return value;
730 ICDBStructNode *getXCDBNode()
732 return _X;
735 void setY(CCDBGroup &dbGroup, sint32 value, bool forceSending = false)
739 _setProp(dbGroup.Database, _Y, value, forceSending);
742 sint32 getY(const CCDBGroup &dbGroup)
744 sint32 value;
745 _getProp(dbGroup.Database, _Y, value);
747 return value;
750 ICDBStructNode *getYCDBNode()
752 return _Y;
758 private:
759 ICDBStructNode *_BranchNode;
761 TArray _Array[16];
764 public:
765 void init(ICDBStructNode *parent);
767 // accessor to branch node
768 ICDBStructNode *getCDBNode()
770 return _BranchNode;
773 TArray &getArray(uint32 index)
775 nlassert(index < 16);
776 return _Array[index];
781 class TSQUAD_SHOP
783 public:
785 class TArray
787 public:
790 private:
791 ICDBStructNode *_BranchNode;
793 ICDBStructNode *_SHEET;
796 public:
797 void init(ICDBStructNode *parent, uint index);
799 // accessor to branch node
800 ICDBStructNode *getCDBNode()
802 return _BranchNode;
806 void setSHEET(CCDBGroup &dbGroup, NLMISC::CSheetId value, bool forceSending = false)
810 _setProp(dbGroup.Database, _SHEET, value, forceSending);
813 NLMISC::CSheetId getSHEET(const CCDBGroup &dbGroup)
815 NLMISC::CSheetId value;
816 _getProp(dbGroup.Database, _SHEET, value);
818 return value;
821 ICDBStructNode *getSHEETCDBNode()
823 return _SHEET;
829 private:
830 ICDBStructNode *_BranchNode;
832 TArray _Array[16];
835 public:
836 void init(ICDBStructNode *parent);
838 // accessor to branch node
839 ICDBStructNode *getCDBNode()
841 return _BranchNode;
844 TArray &getArray(uint32 index)
846 nlassert(index < 16);
847 return _Array[index];
852 class TSQUADS
854 public:
856 class TSP
858 public:
861 private:
862 ICDBStructNode *_BranchNode;
864 ICDBStructNode *_SHEET;
867 public:
868 void init(ICDBStructNode *parent, uint index);
870 // accessor to branch node
871 ICDBStructNode *getCDBNode()
873 return _BranchNode;
877 void setSHEET(CCDBGroup &dbGroup, NLMISC::CSheetId value, bool forceSending = false)
881 _setProp(dbGroup.Database, _SHEET, value, forceSending);
884 NLMISC::CSheetId getSHEET(const CCDBGroup &dbGroup)
886 NLMISC::CSheetId value;
887 _getProp(dbGroup.Database, _SHEET, value);
889 return value;
892 ICDBStructNode *getSHEETCDBNode()
894 return _SHEET;
899 class TT
901 public:
904 private:
905 ICDBStructNode *_BranchNode;
907 ICDBStructNode *_SHEET;
908 ICDBStructNode *_SPAWN;
911 public:
912 void init(ICDBStructNode *parent, uint index);
914 // accessor to branch node
915 ICDBStructNode *getCDBNode()
917 return _BranchNode;
921 void setSHEET(CCDBGroup &dbGroup, NLMISC::CSheetId value, bool forceSending = false)
925 _setProp(dbGroup.Database, _SHEET, value, forceSending);
928 NLMISC::CSheetId getSHEET(const CCDBGroup &dbGroup)
930 NLMISC::CSheetId value;
931 _getProp(dbGroup.Database, _SHEET, value);
933 return value;
936 ICDBStructNode *getSHEETCDBNode()
938 return _SHEET;
941 void setSPAWN(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
944 // Check that the value is not out of database precision
945 STOP_IF(value > (1<<4)-1, "setSPAWN : Value out of bound : trying to store "<<value<<" in a unsigned field limited to 4 bits");
948 _setProp(dbGroup.Database, _SPAWN, value, forceSending);
951 uint8 getSPAWN(const CCDBGroup &dbGroup)
953 uint8 value;
954 _getProp(dbGroup.Database, _SPAWN, value);
956 return value;
959 ICDBStructNode *getSPAWNCDBNode()
961 return _SPAWN;
967 private:
968 ICDBStructNode *_BranchNode;
970 TSP _SP[24];
971 TT _T[24];
974 public:
975 void init(ICDBStructNode *parent);
977 // accessor to branch node
978 ICDBStructNode *getCDBNode()
980 return _BranchNode;
983 TSP &getSP(uint32 index)
985 nlassert(index < 24);
986 return _SP[index];
988 TT &getT(uint32 index)
990 nlassert(index < 24);
991 return _T[index];
996 class TBUILDINGS
998 public:
1000 class TArray
1002 public:
1005 private:
1006 ICDBStructNode *_BranchNode;
1008 ICDBStructNode *_SHEET;
1011 public:
1012 void init(ICDBStructNode *parent, uint index);
1014 // accessor to branch node
1015 ICDBStructNode *getCDBNode()
1017 return _BranchNode;
1021 void setSHEET(CCDBGroup &dbGroup, NLMISC::CSheetId value, bool forceSending = false)
1025 _setProp(dbGroup.Database, _SHEET, value, forceSending);
1028 NLMISC::CSheetId getSHEET(const CCDBGroup &dbGroup)
1030 NLMISC::CSheetId value;
1031 _getProp(dbGroup.Database, _SHEET, value);
1033 return value;
1036 ICDBStructNode *getSHEETCDBNode()
1038 return _SHEET;
1044 private:
1045 ICDBStructNode *_BranchNode;
1047 TArray _Array[4];
1050 public:
1051 void init(ICDBStructNode *parent);
1053 // accessor to branch node
1054 ICDBStructNode *getCDBNode()
1056 return _BranchNode;
1059 TArray &getArray(uint32 index)
1061 nlassert(index < 4);
1062 return _Array[index];
1068 private:
1069 ICDBStructNode *_BranchNode;
1071 ICDBStructNode *_OWNED;
1072 ICDBStructNode *_SHEET;
1073 ICDBStructNode *_LEVEL;
1074 ICDBStructNode *_STATUS;
1075 ICDBStructNode *_STATE_END_DATE;
1076 ICDBStructNode *_DISPLAY_CRASH;
1077 ICDBStructNode *_WARCOST;
1078 ICDBStructNode *_ROUND_LVL_THRESHOLD;
1079 ICDBStructNode *_ROUND_LVL_MAX_ATT;
1080 ICDBStructNode *_ROUND_LVL_MAX_DEF;
1081 ICDBStructNode *_ROUND_LVL_CUR;
1082 ICDBStructNode *_ROUND_ID_CUR;
1083 ICDBStructNode *_ROUND_ID_MAX;
1084 ICDBStructNode *_TIME_RANGE_DEF_WANTED;
1085 ICDBStructNode *_TIME_RANGE_DEF;
1086 ICDBStructNode *_TIME_RANGE_ATT;
1087 ICDBStructNode *_TIME_RANGE_LENGTH;
1088 ICDBStructNode *_SQUAD_CAPITAL;
1089 TGUILD _GUILD;
1090 TSQUAD_SPAWN_ZONE _SQUAD_SPAWN_ZONE;
1091 TSQUAD_SHOP _SQUAD_SHOP;
1092 TSQUADS _SQUADS;
1093 TBUILDINGS _BUILDINGS;
1096 public:
1097 void init(ICDBStructNode *parent, uint index);
1099 // accessor to branch node
1100 ICDBStructNode *getCDBNode()
1102 return _BranchNode;
1106 void setOWNED(CCDBGroup &dbGroup, bool value, bool forceSending = false)
1110 _setProp(dbGroup.Database, _OWNED, value, forceSending);
1113 bool getOWNED(const CCDBGroup &dbGroup)
1115 bool value;
1116 _getProp(dbGroup.Database, _OWNED, value);
1118 return value;
1121 ICDBStructNode *getOWNEDCDBNode()
1123 return _OWNED;
1126 void setSHEET(CCDBGroup &dbGroup, NLMISC::CSheetId value, bool forceSending = false)
1130 _setProp(dbGroup.Database, _SHEET, value, forceSending);
1133 NLMISC::CSheetId getSHEET(const CCDBGroup &dbGroup)
1135 NLMISC::CSheetId value;
1136 _getProp(dbGroup.Database, _SHEET, value);
1138 return value;
1141 ICDBStructNode *getSHEETCDBNode()
1143 return _SHEET;
1146 void setLEVEL(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1150 _setProp(dbGroup.Database, _LEVEL, value, forceSending);
1153 uint8 getLEVEL(const CCDBGroup &dbGroup)
1155 uint8 value;
1156 _getProp(dbGroup.Database, _LEVEL, value);
1158 return value;
1161 ICDBStructNode *getLEVELCDBNode()
1163 return _LEVEL;
1166 void setSTATUS(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1169 // Check that the value is not out of database precision
1170 STOP_IF(value > (1<<4)-1, "setSTATUS : Value out of bound : trying to store "<<value<<" in a unsigned field limited to 4 bits");
1173 _setProp(dbGroup.Database, _STATUS, value, forceSending);
1176 uint8 getSTATUS(const CCDBGroup &dbGroup)
1178 uint8 value;
1179 _getProp(dbGroup.Database, _STATUS, value);
1181 return value;
1184 ICDBStructNode *getSTATUSCDBNode()
1186 return _STATUS;
1189 void setSTATE_END_DATE(CCDBGroup &dbGroup, uint32 value, bool forceSending = false)
1193 _setProp(dbGroup.Database, _STATE_END_DATE, value, forceSending);
1196 uint32 getSTATE_END_DATE(const CCDBGroup &dbGroup)
1198 uint32 value;
1199 _getProp(dbGroup.Database, _STATE_END_DATE, value);
1201 return value;
1204 ICDBStructNode *getSTATE_END_DATECDBNode()
1206 return _STATE_END_DATE;
1209 void setDISPLAY_CRASH(CCDBGroup &dbGroup, bool value, bool forceSending = false)
1213 _setProp(dbGroup.Database, _DISPLAY_CRASH, value, forceSending);
1216 bool getDISPLAY_CRASH(const CCDBGroup &dbGroup)
1218 bool value;
1219 _getProp(dbGroup.Database, _DISPLAY_CRASH, value);
1221 return value;
1224 ICDBStructNode *getDISPLAY_CRASHCDBNode()
1226 return _DISPLAY_CRASH;
1229 void setWARCOST(CCDBGroup &dbGroup, uint32 value, bool forceSending = false)
1233 _setProp(dbGroup.Database, _WARCOST, value, forceSending);
1236 uint32 getWARCOST(const CCDBGroup &dbGroup)
1238 uint32 value;
1239 _getProp(dbGroup.Database, _WARCOST, value);
1241 return value;
1244 ICDBStructNode *getWARCOSTCDBNode()
1246 return _WARCOST;
1249 void setROUND_LVL_THRESHOLD(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1253 _setProp(dbGroup.Database, _ROUND_LVL_THRESHOLD, value, forceSending);
1256 uint8 getROUND_LVL_THRESHOLD(const CCDBGroup &dbGroup)
1258 uint8 value;
1259 _getProp(dbGroup.Database, _ROUND_LVL_THRESHOLD, value);
1261 return value;
1264 ICDBStructNode *getROUND_LVL_THRESHOLDCDBNode()
1266 return _ROUND_LVL_THRESHOLD;
1269 void setROUND_LVL_MAX_ATT(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1273 _setProp(dbGroup.Database, _ROUND_LVL_MAX_ATT, value, forceSending);
1276 uint8 getROUND_LVL_MAX_ATT(const CCDBGroup &dbGroup)
1278 uint8 value;
1279 _getProp(dbGroup.Database, _ROUND_LVL_MAX_ATT, value);
1281 return value;
1284 ICDBStructNode *getROUND_LVL_MAX_ATTCDBNode()
1286 return _ROUND_LVL_MAX_ATT;
1289 void setROUND_LVL_MAX_DEF(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1293 _setProp(dbGroup.Database, _ROUND_LVL_MAX_DEF, value, forceSending);
1296 uint8 getROUND_LVL_MAX_DEF(const CCDBGroup &dbGroup)
1298 uint8 value;
1299 _getProp(dbGroup.Database, _ROUND_LVL_MAX_DEF, value);
1301 return value;
1304 ICDBStructNode *getROUND_LVL_MAX_DEFCDBNode()
1306 return _ROUND_LVL_MAX_DEF;
1309 void setROUND_LVL_CUR(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1313 _setProp(dbGroup.Database, _ROUND_LVL_CUR, value, forceSending);
1316 uint8 getROUND_LVL_CUR(const CCDBGroup &dbGroup)
1318 uint8 value;
1319 _getProp(dbGroup.Database, _ROUND_LVL_CUR, value);
1321 return value;
1324 ICDBStructNode *getROUND_LVL_CURCDBNode()
1326 return _ROUND_LVL_CUR;
1329 void setROUND_ID_CUR(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1333 _setProp(dbGroup.Database, _ROUND_ID_CUR, value, forceSending);
1336 uint8 getROUND_ID_CUR(const CCDBGroup &dbGroup)
1338 uint8 value;
1339 _getProp(dbGroup.Database, _ROUND_ID_CUR, value);
1341 return value;
1344 ICDBStructNode *getROUND_ID_CURCDBNode()
1346 return _ROUND_ID_CUR;
1349 void setROUND_ID_MAX(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1353 _setProp(dbGroup.Database, _ROUND_ID_MAX, value, forceSending);
1356 uint8 getROUND_ID_MAX(const CCDBGroup &dbGroup)
1358 uint8 value;
1359 _getProp(dbGroup.Database, _ROUND_ID_MAX, value);
1361 return value;
1364 ICDBStructNode *getROUND_ID_MAXCDBNode()
1366 return _ROUND_ID_MAX;
1369 void setTIME_RANGE_DEF_WANTED(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1372 // Check that the value is not out of database precision
1373 STOP_IF(value > (1<<5)-1, "setTIME_RANGE_DEF_WANTED : Value out of bound : trying to store "<<value<<" in a unsigned field limited to 5 bits");
1376 _setProp(dbGroup.Database, _TIME_RANGE_DEF_WANTED, value, forceSending);
1379 uint8 getTIME_RANGE_DEF_WANTED(const CCDBGroup &dbGroup)
1381 uint8 value;
1382 _getProp(dbGroup.Database, _TIME_RANGE_DEF_WANTED, value);
1384 return value;
1387 ICDBStructNode *getTIME_RANGE_DEF_WANTEDCDBNode()
1389 return _TIME_RANGE_DEF_WANTED;
1392 void setTIME_RANGE_DEF(CCDBGroup &dbGroup, uint32 value, bool forceSending = false)
1396 _setProp(dbGroup.Database, _TIME_RANGE_DEF, value, forceSending);
1399 uint32 getTIME_RANGE_DEF(const CCDBGroup &dbGroup)
1401 uint32 value;
1402 _getProp(dbGroup.Database, _TIME_RANGE_DEF, value);
1404 return value;
1407 ICDBStructNode *getTIME_RANGE_DEFCDBNode()
1409 return _TIME_RANGE_DEF;
1412 void setTIME_RANGE_ATT(CCDBGroup &dbGroup, uint32 value, bool forceSending = false)
1416 _setProp(dbGroup.Database, _TIME_RANGE_ATT, value, forceSending);
1419 uint32 getTIME_RANGE_ATT(const CCDBGroup &dbGroup)
1421 uint32 value;
1422 _getProp(dbGroup.Database, _TIME_RANGE_ATT, value);
1424 return value;
1427 ICDBStructNode *getTIME_RANGE_ATTCDBNode()
1429 return _TIME_RANGE_ATT;
1432 void setTIME_RANGE_LENGTH(CCDBGroup &dbGroup, uint16 value, bool forceSending = false)
1436 _setProp(dbGroup.Database, _TIME_RANGE_LENGTH, value, forceSending);
1439 uint16 getTIME_RANGE_LENGTH(const CCDBGroup &dbGroup)
1441 uint16 value;
1442 _getProp(dbGroup.Database, _TIME_RANGE_LENGTH, value);
1444 return value;
1447 ICDBStructNode *getTIME_RANGE_LENGTHCDBNode()
1449 return _TIME_RANGE_LENGTH;
1452 void setSQUAD_CAPITAL(CCDBGroup &dbGroup, uint32 value, bool forceSending = false)
1456 _setProp(dbGroup.Database, _SQUAD_CAPITAL, value, forceSending);
1459 uint32 getSQUAD_CAPITAL(const CCDBGroup &dbGroup)
1461 uint32 value;
1462 _getProp(dbGroup.Database, _SQUAD_CAPITAL, value);
1464 return value;
1467 ICDBStructNode *getSQUAD_CAPITALCDBNode()
1469 return _SQUAD_CAPITAL;
1471 TGUILD &getGUILD()
1473 return _GUILD;
1475 TSQUAD_SPAWN_ZONE &getSQUAD_SPAWN_ZONE()
1477 return _SQUAD_SPAWN_ZONE;
1479 TSQUAD_SHOP &getSQUAD_SHOP()
1481 return _SQUAD_SHOP;
1483 TSQUADS &getSQUADS()
1485 return _SQUADS;
1487 TBUILDINGS &getBUILDINGS()
1489 return _BUILDINGS;
1495 private:
1496 ICDBStructNode *_BranchNode;
1498 ICDBStructNode *_CANDEL;
1499 TO _O[16];
1502 public:
1503 void init(ICDBStructNode *parent);
1505 // accessor to branch node
1506 ICDBStructNode *getCDBNode()
1508 return _BranchNode;
1512 void setCANDEL(CCDBGroup &dbGroup, bool value, bool forceSending = false)
1516 _setProp(dbGroup.Database, _CANDEL, value, forceSending);
1519 bool getCANDEL(const CCDBGroup &dbGroup)
1521 bool value;
1522 _getProp(dbGroup.Database, _CANDEL, value);
1524 return value;
1527 ICDBStructNode *getCANDELCDBNode()
1529 return _CANDEL;
1531 TO &getO(uint32 index)
1533 nlassert(index < 16);
1534 return _O[index];
1540 private:
1541 ICDBStructNode *_BranchNode;
1543 ICDBStructNode *_COUNTER;
1544 ICDBStructNode *_PROXY;
1545 ICDBStructNode *_NAME;
1546 ICDBStructNode *_DESCRIPTION;
1547 ICDBStructNode *_ICON;
1548 ICDBStructNode *_XP;
1549 ICDBStructNode *_CHARGE_POINTS;
1550 ICDBStructNode *_VILLAGE;
1551 ICDBStructNode *_PEOPLE;
1552 ICDBStructNode *_CREATION_DATE;
1553 TFAME _FAME;
1554 TMEMBERS _MEMBERS;
1555 TINVENTORY _INVENTORY;
1556 TOUTPOST _OUTPOST;
1559 public:
1560 void init(ICDBStructNode *parent);
1562 // accessor to branch node
1563 ICDBStructNode *getCDBNode()
1565 return _BranchNode;
1569 void setCOUNTER(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1573 _setProp(dbGroup.Database, _COUNTER, value, forceSending);
1576 uint8 getCOUNTER(const CCDBGroup &dbGroup)
1578 uint8 value;
1579 _getProp(dbGroup.Database, _COUNTER, value);
1581 return value;
1584 ICDBStructNode *getCOUNTERCDBNode()
1586 return _COUNTER;
1589 void setPROXY(CCDBGroup &dbGroup, bool value, bool forceSending = false)
1593 _setProp(dbGroup.Database, _PROXY, value, forceSending);
1596 bool getPROXY(const CCDBGroup &dbGroup)
1598 bool value;
1599 _getProp(dbGroup.Database, _PROXY, value);
1601 return value;
1604 ICDBStructNode *getPROXYCDBNode()
1606 return _PROXY;
1609 void setNAME(CCDBGroup &dbGroup, ucstring value, bool forceSending = false)
1613 _setProp(dbGroup.Database, _NAME, value, forceSending);
1616 ucstring getNAME(const CCDBGroup &dbGroup)
1618 ucstring value;
1619 _getProp(dbGroup.Database, _NAME, value);
1621 return value;
1624 void setNAME(CCDBGroup &dbGroup, uint32 stringId, bool forceSending = false)
1626 _setProp(dbGroup.Database, _NAME, stringId, forceSending);
1628 uint32 getNAME_id(const CCDBGroup &dbGroup)
1630 uint32 value;
1631 _getProp(dbGroup.Database, _NAME, value);
1633 return value;
1636 ICDBStructNode *getNAMECDBNode()
1638 return _NAME;
1641 void setDESCRIPTION(CCDBGroup &dbGroup, ucstring value, bool forceSending = false)
1645 _setProp(dbGroup.Database, _DESCRIPTION, value, forceSending);
1648 ucstring getDESCRIPTION(const CCDBGroup &dbGroup)
1650 ucstring value;
1651 _getProp(dbGroup.Database, _DESCRIPTION, value);
1653 return value;
1656 void setDESCRIPTION(CCDBGroup &dbGroup, uint32 stringId, bool forceSending = false)
1658 _setProp(dbGroup.Database, _DESCRIPTION, stringId, forceSending);
1660 uint32 getDESCRIPTION_id(const CCDBGroup &dbGroup)
1662 uint32 value;
1663 _getProp(dbGroup.Database, _DESCRIPTION, value);
1665 return value;
1668 ICDBStructNode *getDESCRIPTIONCDBNode()
1670 return _DESCRIPTION;
1673 void setICON(CCDBGroup &dbGroup, uint64 value, bool forceSending = false)
1677 _setProp(dbGroup.Database, _ICON, value, forceSending);
1680 uint64 getICON(const CCDBGroup &dbGroup)
1682 uint64 value;
1683 _getProp(dbGroup.Database, _ICON, value);
1685 return value;
1688 ICDBStructNode *getICONCDBNode()
1690 return _ICON;
1693 void setXP(CCDBGroup &dbGroup, uint32 value, bool forceSending = false)
1697 _setProp(dbGroup.Database, _XP, value, forceSending);
1700 uint32 getXP(const CCDBGroup &dbGroup)
1702 uint32 value;
1703 _getProp(dbGroup.Database, _XP, value);
1705 return value;
1708 ICDBStructNode *getXPCDBNode()
1710 return _XP;
1713 void setCHARGE_POINTS(CCDBGroup &dbGroup, uint32 value, bool forceSending = false)
1717 _setProp(dbGroup.Database, _CHARGE_POINTS, value, forceSending);
1720 uint32 getCHARGE_POINTS(const CCDBGroup &dbGroup)
1722 uint32 value;
1723 _getProp(dbGroup.Database, _CHARGE_POINTS, value);
1725 return value;
1728 ICDBStructNode *getCHARGE_POINTSCDBNode()
1730 return _CHARGE_POINTS;
1733 void setVILLAGE(CCDBGroup &dbGroup, ucstring value, bool forceSending = false)
1737 _setProp(dbGroup.Database, _VILLAGE, value, forceSending);
1740 ucstring getVILLAGE(const CCDBGroup &dbGroup)
1742 ucstring value;
1743 _getProp(dbGroup.Database, _VILLAGE, value);
1745 return value;
1748 void setVILLAGE(CCDBGroup &dbGroup, uint32 stringId, bool forceSending = false)
1750 _setProp(dbGroup.Database, _VILLAGE, stringId, forceSending);
1752 uint32 getVILLAGE_id(const CCDBGroup &dbGroup)
1754 uint32 value;
1755 _getProp(dbGroup.Database, _VILLAGE, value);
1757 return value;
1760 ICDBStructNode *getVILLAGECDBNode()
1762 return _VILLAGE;
1765 void setPEOPLE(CCDBGroup &dbGroup, uint8 value, bool forceSending = false)
1769 _setProp(dbGroup.Database, _PEOPLE, value, forceSending);
1772 uint8 getPEOPLE(const CCDBGroup &dbGroup)
1774 uint8 value;
1775 _getProp(dbGroup.Database, _PEOPLE, value);
1777 return value;
1780 ICDBStructNode *getPEOPLECDBNode()
1782 return _PEOPLE;
1785 void setCREATION_DATE(CCDBGroup &dbGroup, uint32 value, bool forceSending = false)
1789 _setProp(dbGroup.Database, _CREATION_DATE, value, forceSending);
1792 uint32 getCREATION_DATE(const CCDBGroup &dbGroup)
1794 uint32 value;
1795 _getProp(dbGroup.Database, _CREATION_DATE, value);
1797 return value;
1800 ICDBStructNode *getCREATION_DATECDBNode()
1802 return _CREATION_DATE;
1804 TFAME &getFAME()
1806 return _FAME;
1808 TMEMBERS &getMEMBERS()
1810 return _MEMBERS;
1812 TINVENTORY &getINVENTORY()
1814 return _INVENTORY;
1816 TOUTPOST &getOUTPOST()
1818 return _OUTPOST;
1823 static TGUILD _GUILD;
1826 public:
1828 // Constructor
1829 CBankAccessor_GUILD()
1831 // make sure the static tree is initialised (some kind of lazy initialisation)
1832 init();
1834 // init the base class
1835 CCDBGroup::init(BankTag);
1839 static void init();
1841 static TGUILD &getGUILD()
1843 return _GUILD;
1850 #endif // INCLUDED_DATABASE_database_GUILD_H