Merge commit '251a347190485d57c8e2e9d821f66a5063270f5f' into 4.3.4
Conflicts: sql/base/auth_database.sql src/server/game/Accounts/RBAC.h src/server/scripts/Commands/cs_modify.cpp
This commit is contained in:
commit
c0ee4ceac4
15 files changed
+125
-12
No files matched your search
@@ -78,6 +78,7 @@ public:
|
||||
{ "pinfo", rbac::RBAC_PERM_COMMAND_PINFO, true, &HandlePInfoCommand, "", NULL },
|
||||
{ "playall", rbac::RBAC_PERM_COMMAND_PLAYALL, false, &HandlePlayAllCommand, "", NULL },
|
||||
{ "possess", rbac::RBAC_PERM_COMMAND_POSSESS, false, &HandlePossessCommand, "", NULL },
|
||||
{ "pvpstats", rbac::RBAC_PERM_COMMAND_PVPSTATS, true, &HandlePvPstatsCommand, "", NULL },
|
||||
{ "recall", rbac::RBAC_PERM_COMMAND_RECALL, false, &HandleRecallCommand, "", NULL },
|
||||
{ "repairitems", rbac::RBAC_PERM_COMMAND_REPAIRITEMS, true, &HandleRepairitemsCommand, "", NULL },
|
||||
{ "respawn", rbac::RBAC_PERM_COMMAND_RESPAWN, false, &HandleRespawnCommand, "", NULL },
|
||||
@@ -100,6 +101,35 @@ public:
|
||||
return commandTable;
|
||||
}
|
||||
|
||||
static bool HandlePvPstatsCommand(ChatHandler * handler, char const* /*args*/)
|
||||
{
|
||||
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE))
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PVPSTATS_FACTIONS_OVERALL);
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
uint32 horde_victories = fields[1].GetUInt32();
|
||||
|
||||
if (!(result->NextRow()))
|
||||
return false;
|
||||
|
||||
fields = result->Fetch();
|
||||
uint32 alliance_victories = fields[1].GetUInt32();
|
||||
|
||||
handler->PSendSysMessage(LANG_PVPSTATS, alliance_victories, horde_victories);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
handler->PSendSysMessage(LANG_PVPSTATS_DISABLED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleDevCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
if (!*args)
|
||||
|
||||
Reference in new issue
Block a user