]>
Commit | Line | Data |
---|---|---|
f4f0d89d | 1 | #include <GameServ/DataLayer/File/FileId.h>\r |
2 | using GameServ::DataLayer::File::FileId;\r | |
3 | \r | |
4 | #include <string>\r | |
5 | using std::string;\r | |
6 | \r | |
cce88913 | 7 | #include <GameServ/Types.h>\r |
8 | using GameServ::Types::ItemTypes;\r | |
9 | \r | |
10 | #include <GameServ/GameServException.h>\r | |
11 | using GameServ::Exceptions::GameServException;\r | |
12 | \r | |
13 | #include <boost/format.hpp>\r | |
14 | #include <boost/algorithm/string.hpp>\r | |
15 | #include <boost/lexical_cast.hpp>\r | |
16 | using boost::str;\r | |
17 | using boost::format;\r | |
18 | using boost::lexical_cast;\r | |
19 | \r | |
f4f0d89d | 20 | FileId::FileId()\r |
21 | {\r | |
22 | }\r | |
23 | \r | |
24 | FileId::~FileId()\r | |
25 | {\r | |
26 | }\r | |
27 | \r | |
28 | string FileId::CreatePlayerId(const string &Name)\r | |
29 | {\r | |
30 | return Name;\r | |
31 | }\r | |
32 | \r | |
33 | string FileId::GetNameFromPlayerId(const string &Id)\r | |
34 | {\r | |
35 | return Id;\r | |
36 | }\r | |
cce88913 | 37 | \r |
e0306362 | 38 | string FileId::CreateItemId(const string &Number)\r |
cce88913 | 39 | {\r |
e0306362 | 40 | return Number;\r |
cce88913 | 41 | }\r |
42 | \r | |
cce88913 | 43 | string FileId::GetItemNumberFromId(const string &Id)\r |
44 | {\r | |
e823e42a | 45 | return Id;\r |
c7b7180e | 46 | }\r |
04a66a14 | 47 | \r |
fd2ef47d | 48 | string FileId::CreateMonsterId(const string &LevelId, const string &Name)\r |
04a66a14 | 49 | {\r |
fd2ef47d | 50 | return str(format("%1%:%2%") % LevelId % Name);\r |
142e3ca5 | 51 | }\r |
52 | \r | |
53 | string FileId::CreateLevelId(const unsigned int &Number)\r | |
54 | {\r | |
55 | return lexical_cast<string>(Number);\r | |
56 | }\r | |
57 | \r | |
fd2ef47d | 58 | unsigned int FileId::GetLevelNumberFromId(const string &Id)\r |
59 | {\r | |
60 | return lexical_cast<unsigned int>(Id);\r | |
61 | }\r | |
62 | \r | |
656c03e5 | 63 | string FileId::CreateMasterId(const string &LevelId, const string &Name)\r |
142e3ca5 | 64 | {\r |
656c03e5 | 65 | return str(format("%1%:%2%") % LevelId % Name);\r |
04a66a14 | 66 | } |