mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Command): cheat explore (#2862)
Co-authored-by: P-Kito <p-kito@users.noreply.github.com>
This commit is contained in:
@@ -82,7 +82,6 @@ public:
|
||||
{ "unstuck", SEC_GAMEMASTER, true, &HandleUnstuckCommand, "" },
|
||||
{ "linkgrave", SEC_ADMINISTRATOR, false, &HandleLinkGraveCommand, "" },
|
||||
{ "neargrave", SEC_GAMEMASTER, false, &HandleNearGraveCommand, "" },
|
||||
{ "explorecheat", SEC_ADMINISTRATOR, false, &HandleExploreCheatCommand, "" },
|
||||
{ "showarea", SEC_GAMEMASTER, false, &HandleShowAreaCommand, "" },
|
||||
{ "hidearea", SEC_ADMINISTRATOR, false, &HandleHideAreaCommand, "" },
|
||||
{ "additem", SEC_GAMEMASTER, false, &HandleAddItemCommand, "" },
|
||||
@@ -1324,45 +1323,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleExploreCheatCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
int32 flag = int32(atoi((char*)args));
|
||||
|
||||
Player* playerTarget = handler->getSelectedPlayer();
|
||||
if (!playerTarget)
|
||||
{
|
||||
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (flag != 0)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_ALL, handler->GetNameLink(playerTarget).c_str());
|
||||
if (handler->needReportToTarget(playerTarget))
|
||||
ChatHandler(playerTarget->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_NOTHING, handler->GetNameLink(playerTarget).c_str());
|
||||
if (handler->needReportToTarget(playerTarget))
|
||||
ChatHandler(playerTarget->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str());
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i)
|
||||
{
|
||||
if (flag != 0)
|
||||
handler->GetSession()->GetPlayer()->SetFlag(PLAYER_EXPLORED_ZONES_1 + i, 0xFFFFFFFF);
|
||||
else
|
||||
handler->GetSession()->GetPlayer()->SetFlag(PLAYER_EXPLORED_ZONES_1 + i, 0);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleShowAreaCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
if (!*args)
|
||||
|
||||
Reference in New Issue
Block a user