]> jfr.im git - irc/gameservirc.git/blob - gameserv-2.0/libgameservgldl/src/DataLayer/File/FileId.cpp
Consolidated all the individual level files into a single levels.dat file.
[irc/gameservirc.git] / gameserv-2.0 / libgameservgldl / src / DataLayer / File / FileId.cpp
1 #include <GameServ/DataLayer/File/FileId.h>
2 using GameServ::DataLayer::File::FileId;
3
4 #include <string>
5 using std::string;
6
7 #include <GameServ/Types.h>
8 using GameServ::Types::ItemTypes;
9
10 #include <GameServ/GameServException.h>
11 using GameServ::Exceptions::GameServException;
12
13 #include <boost/format.hpp>
14 #include <boost/algorithm/string.hpp>
15 #include <boost/lexical_cast.hpp>
16 using boost::str;
17 using boost::format;
18 using boost::lexical_cast;
19
20 FileId::FileId()
21 {
22 }
23
24 FileId::~FileId()
25 {
26 }
27
28 string FileId::CreatePlayerId(const string &Name)
29 {
30 return Name;
31 }
32
33 string FileId::GetNameFromPlayerId(const string &Id)
34 {
35 return Id;
36 }
37
38 string FileId::CreateItemId(const string &Number)
39 {
40 return Number;
41 }
42
43 string FileId::GetItemNumberFromId(const string &Id)
44 {
45 return Id;
46 }
47
48 string FileId::CreateMonsterId(const unsigned int &Level, const string &Name)
49 {
50 return str(format("%1%:%2%") % Level % Name);
51 }
52
53 string FileId::CreateLevelId(const unsigned int &Number)
54 {
55 return lexical_cast<string>(Number);
56 }
57
58 string FileId::CreateMasterId(const unsigned int &LevelNumber, const string &Name)
59 {
60 return str(format("%1%:%2%") % LevelNumber % Name);
61 }