1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
25 RY_PDS::CPDSLib PDSLib
;
26 void init(uint32 overrideDbId
)
28 // Init CreateTeam log message and parameters
30 PDSLib
.initLogParam(0, 0, 8);
31 // Init DeleteTeam log message and parameters
33 PDSLib
.initLogParam(1, 0, 8);
34 // Init PlayerJoinsTeam log message and parameters
36 PDSLib
.initLogParam(2, 0, 8);
37 PDSLib
.initLogParam(2, 1, 8);
38 // Init PlayerLeavesTeam log message and parameters
40 PDSLib
.initLogParam(3, 0, 8);
41 PDSLib
.initLogParam(3, 1, 8);
42 std::string xmlDescription
;
43 xmlDescription
+= "<?xml version='1.0'?>\n";
44 xmlDescription
+= "<dbdescription version='0.0'>\n";
45 xmlDescription
+= "<db name='IOSPD' types='15' classes='0'>\n";
46 xmlDescription
+= "<typedef name='bool' id='0' size='1' storage='bool' type='type'/>\n";
47 xmlDescription
+= "<typedef name='char' id='1' size='1' storage='char' type='type'/>\n";
48 xmlDescription
+= "<typedef name='ucchar' id='2' size='2' storage='ucchar' type='type'/>\n";
49 xmlDescription
+= "<typedef name='uint8' id='3' size='1' storage='uint8' type='type'/>\n";
50 xmlDescription
+= "<typedef name='sint8' id='4' size='1' storage='sint8' type='type'/>\n";
51 xmlDescription
+= "<typedef name='uint16' id='5' size='2' storage='uint16' type='type'/>\n";
52 xmlDescription
+= "<typedef name='sint16' id='6' size='2' storage='sint16' type='type'/>\n";
53 xmlDescription
+= "<typedef name='uint32' id='7' size='4' storage='uint32' type='type'/>\n";
54 xmlDescription
+= "<typedef name='sint32' id='8' size='4' storage='sint32' type='type'/>\n";
55 xmlDescription
+= "<typedef name='uint64' id='9' size='8' storage='uint64' type='type'/>\n";
56 xmlDescription
+= "<typedef name='sint64' id='10' size='8' storage='sint64' type='type'/>\n";
57 xmlDescription
+= "<typedef name='float' id='11' size='4' storage='float' type='type'/>\n";
58 xmlDescription
+= "<typedef name='double' id='12' size='8' storage='double' type='type'/>\n";
59 xmlDescription
+= "<typedef name='CEntityId' id='13' size='8' storage='CEntityId' type='type'/>\n";
60 xmlDescription
+= "<typedef name='CSheetId' id='14' size='4' storage='CSheetId' type='type'/>\n";
61 xmlDescription
+= "<logmsg id='0' context='false'>\n";
62 xmlDescription
+= "<param id='0' typeid='13'/>\n";
63 xmlDescription
+= "<msg>Player team $0 created</msg>\n";
64 xmlDescription
+= "</logmsg>\n";
65 xmlDescription
+= "<logmsg id='1' context='false'>\n";
66 xmlDescription
+= "<param id='0' typeid='13'/>\n";
67 xmlDescription
+= "<msg>Player team $0 deleted</msg>\n";
68 xmlDescription
+= "</logmsg>\n";
69 xmlDescription
+= "<logmsg id='2' context='false'>\n";
70 xmlDescription
+= "<param id='0' typeid='13'/>\n";
71 xmlDescription
+= "<param id='1' typeid='13'/>\n";
72 xmlDescription
+= "<msg>Player $0 joins team $1</msg>\n";
73 xmlDescription
+= "</logmsg>\n";
74 xmlDescription
+= "<logmsg id='3' context='false'>\n";
75 xmlDescription
+= "<param id='0' typeid='13'/>\n";
76 xmlDescription
+= "<param id='1' typeid='13'/>\n";
77 xmlDescription
+= "<msg>Player $0 leaves team $1</msg>\n";
78 xmlDescription
+= "</logmsg>\n";
79 xmlDescription
+= "</db>\n";
80 xmlDescription
+= "</dbdescription>\n";
81 PDSLib
.init(xmlDescription
, overrideDbId
);
86 return PDSLib
.PDSReady();
94 void logChat(const ucstring
& sentence
, const NLMISC::CEntityId
& from
, const std::vector
<NLMISC::CEntityId
>& to
)
96 PDSLib
.logChat(sentence
, from
, to
);
99 void logTell(const ucstring
& sentence
, const NLMISC::CEntityId
& from
, const NLMISC::CEntityId
& to
)
101 std::vector
<NLMISC::CEntityId
> ids
;
103 PDSLib
.logChat(sentence
, from
, ids
);