Uncommented some utils functions for LFG

This commit is contained in:
Yehonal
2017-09-18 19:36:26 +02:00
parent 84d6011a3d
commit af6fc3d873
3 changed files with 55 additions and 55 deletions
+10 -9
View File
@@ -11,8 +11,8 @@
namespace lfg namespace lfg
{ {
/*std::string ConcatenateDungeons(LfgDungeonSet const& dungeons) std::string ConcatenateDungeons(LfgDungeonSet const& dungeons)
{ {
std::string dungeonstr = ""; std::string dungeonstr = "";
if (!dungeons.empty()) if (!dungeons.empty())
{ {
@@ -24,10 +24,10 @@ namespace lfg
dungeonstr = o.str(); dungeonstr = o.str();
} }
return dungeonstr; return dungeonstr;
} }
std::string GetRolesString(uint8 roles) std::string GetRolesString(uint8 roles)
{ {
std::string rolesstr = ""; std::string rolesstr = "";
if (roles & PLAYER_ROLE_TANK) if (roles & PLAYER_ROLE_TANK)
@@ -58,10 +58,10 @@ std::string GetRolesString(uint8 roles)
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_NONE)); rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_NONE));
return rolesstr; return rolesstr;
} }
std::string GetStateString(LfgState state) std::string GetStateString(LfgState state)
{ {
int32 entry = LANG_LFG_ERROR; int32 entry = LANG_LFG_ERROR;
switch (state) switch (state)
{ {
@@ -92,6 +92,7 @@ std::string GetStateString(LfgState state)
} }
return std::string(sObjectMgr->GetTrinityStringForDBCLocale(entry)); return std::string(sObjectMgr->GetTrinityStringForDBCLocale(entry));
}*/ }
} // namespace lfg } // namespace lfg
+1 -2
View File
@@ -191,11 +191,10 @@ public:
} }
}; };
/*
std::string ConcatenateDungeons(LfgDungeonSet const& dungeons); std::string ConcatenateDungeons(LfgDungeonSet const& dungeons);
std::string GetRolesString(uint8 roles); std::string GetRolesString(uint8 roles);
std::string GetStateString(LfgState state); std::string GetStateString(LfgState state);
*/
} // namespace lfg } // namespace lfg
+3 -3
View File
@@ -11,7 +11,7 @@
#include "Group.h" #include "Group.h"
#include "Player.h" #include "Player.h"
void GetPlayerInfo(ChatHandler* /*handler*/, Player* player) void GetPlayerInfo(ChatHandler* handler, Player* player)
{ {
if (!player) if (!player)
return; return;
@@ -19,10 +19,10 @@ void GetPlayerInfo(ChatHandler* /*handler*/, Player* player)
uint64 guid = player->GetGUID(); uint64 guid = player->GetGUID();
lfg::LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(guid); lfg::LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(guid);
/*std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid)); std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
handler->PSendSysMessage(LANG_LFG_PLAYER_INFO, player->GetName().c_str(), handler->PSendSysMessage(LANG_LFG_PLAYER_INFO, player->GetName().c_str(),
state.c_str(), uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons).c_str(), state.c_str(), uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons).c_str(),
lfg::GetRolesString(sLFGMgr->GetRoles(guid)).c_str(), sLFGMgr->GetComment(guid).c_str());*/ lfg::GetRolesString(sLFGMgr->GetRoles(guid)).c_str(), sLFGMgr->GetComment(guid).c_str());
} }
class lfg_commandscript : public CommandScript class lfg_commandscript : public CommandScript