mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-16 21:20:01 -04:00
Core: ported headers cleanup from master branch
This commit is contained in:
@@ -27,9 +27,13 @@ EndScriptData */
|
||||
#include "Group.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "MapManager.h"
|
||||
#include "Player.h"
|
||||
#include "Language.h"
|
||||
#include "MapManager.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "RBAC.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
class instance_commandscript : public CommandScript
|
||||
{
|
||||
@@ -50,7 +54,7 @@ public:
|
||||
|
||||
static std::vector<ChatCommand> commandTable =
|
||||
{
|
||||
{ "instance", rbac::RBAC_PERM_COMMAND_INSTANCE, true, NULL, "", instanceCommandTable },
|
||||
{ "instance", rbac::RBAC_PERM_COMMAND_INSTANCE, true, nullptr, "", instanceCommandTable },
|
||||
};
|
||||
|
||||
return commandTable;
|
||||
@@ -81,7 +85,7 @@ public:
|
||||
for (Player::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr)
|
||||
{
|
||||
InstanceSave* save = itr->second.save;
|
||||
std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL));
|
||||
std::string timeleft = GetTimeString(save->GetResetTime() - time(nullptr));
|
||||
handler->PSendSysMessage(LANG_COMMAND_LIST_BIND_INFO, itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", itr->second.extendState == EXTEND_STATE_EXPIRED ? "expired" : itr->second.extendState == EXTEND_STATE_EXTENDED ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str());
|
||||
counter++;
|
||||
}
|
||||
@@ -97,7 +101,7 @@ public:
|
||||
for (Group::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr)
|
||||
{
|
||||
InstanceSave* save = itr->second.save;
|
||||
std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL));
|
||||
std::string timeleft = GetTimeString(save->GetResetTime() - time(nullptr));
|
||||
handler->PSendSysMessage(LANG_COMMAND_LIST_BIND_INFO, itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", "-", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str());
|
||||
counter++;
|
||||
}
|
||||
@@ -118,7 +122,7 @@ public:
|
||||
player = handler->GetSession()->GetPlayer();
|
||||
|
||||
char* map = strtok((char*)args, " ");
|
||||
char* pDiff = strtok(NULL, " ");
|
||||
char* pDiff = strtok(nullptr, " ");
|
||||
int8 diff = -1;
|
||||
if (pDiff)
|
||||
diff = atoi(pDiff);
|
||||
@@ -140,7 +144,7 @@ public:
|
||||
InstanceSave* save = itr->second.save;
|
||||
if (itr->first != player->GetMapId() && (!MapId || MapId == itr->first) && (diff == -1 || diff == save->GetDifficulty()))
|
||||
{
|
||||
std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL));
|
||||
std::string timeleft = GetTimeString(save->GetResetTime() - time(nullptr));
|
||||
handler->PSendSysMessage(LANG_COMMAND_INST_UNBIND_UNBINDING, itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str());
|
||||
player->UnbindInstance(itr, Difficulty(i));
|
||||
counter++;
|
||||
|
||||
Reference in New Issue
Block a user