mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
Merge branch 'master' of github.com:azerothcore/azerothcore-wotlk into Playerbot
This commit is contained in:
@@ -25,13 +25,8 @@ EndScriptData */
|
||||
#include "Chat.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "Language.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
#if AC_COMPILER == AC_COMPILER_GNU
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
class guild_commandscript : public CommandScript
|
||||
@@ -43,50 +38,38 @@ public:
|
||||
{
|
||||
static ChatCommandTable guildCommandTable =
|
||||
{
|
||||
{ "create", SEC_GAMEMASTER, true, &HandleGuildCreateCommand, "" },
|
||||
{ "delete", SEC_GAMEMASTER, true, &HandleGuildDeleteCommand, "" },
|
||||
{ "invite", SEC_GAMEMASTER, true, &HandleGuildInviteCommand, "" },
|
||||
{ "uninvite", SEC_GAMEMASTER, true, &HandleGuildUninviteCommand, "" },
|
||||
{ "rank", SEC_GAMEMASTER, true, &HandleGuildRankCommand, "" },
|
||||
{ "rename", SEC_GAMEMASTER, true, &HandleGuildRenameCommand, "" },
|
||||
{ "info", SEC_GAMEMASTER, true, &HandleGuildInfoCommand, "" }
|
||||
{ "create", HandleGuildCreateCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "delete", HandleGuildDeleteCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "invite", HandleGuildInviteCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "uninvite", HandleGuildUninviteCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "rank", HandleGuildRankCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "rename", HandleGuildRenameCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "info", HandleGuildInfoCommand, SEC_GAMEMASTER, Console::Yes }
|
||||
};
|
||||
static ChatCommandTable commandTable =
|
||||
{
|
||||
{ "guild", SEC_GAMEMASTER, true, nullptr, "", guildCommandTable }
|
||||
{ "guild", guildCommandTable }
|
||||
};
|
||||
return commandTable;
|
||||
}
|
||||
|
||||
/** \brief GM command level 3 - Create a guild.
|
||||
*
|
||||
* This command allows a GM (level 3) to create a guild.
|
||||
*
|
||||
* The "args" parameter contains the name of the guild leader
|
||||
* and then the name of the guild.
|
||||
*
|
||||
*/
|
||||
static bool HandleGuildCreateCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGuildCreateCommand(ChatHandler* handler, Optional<PlayerIdentifier> target, std::string_view guildName)
|
||||
{
|
||||
if (!*args)
|
||||
if (!target)
|
||||
{
|
||||
target = PlayerIdentifier::FromTargetOrSelf(handler);
|
||||
}
|
||||
|
||||
if (!target || !target->IsConnected())
|
||||
{
|
||||
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
// if not guild name only (in "") then player name
|
||||
Player* target;
|
||||
if (!handler->extractPlayerTarget(*args != '"' ? (char*)args : nullptr, &target))
|
||||
return false;
|
||||
Player* playerTarget = target->GetConnectedPlayer();
|
||||
|
||||
char* tailStr = *args != '"' ? strtok(nullptr, "") : (char*)args;
|
||||
if (!tailStr)
|
||||
return false;
|
||||
|
||||
char* guildStr = handler->extractQuotedArg(tailStr);
|
||||
if (!guildStr)
|
||||
return false;
|
||||
|
||||
std::string guildName = guildStr;
|
||||
|
||||
if (target->GetGuildId())
|
||||
if (playerTarget->GetGuildId())
|
||||
{
|
||||
handler->SendSysMessage(LANG_PLAYER_IN_GUILD);
|
||||
handler->SetSentErrorMessage(true);
|
||||
@@ -108,7 +91,7 @@ public:
|
||||
}
|
||||
|
||||
Guild* guild = new Guild;
|
||||
if (!guild->Create(target, guildName))
|
||||
if (!guild->Create(playerTarget, guildName))
|
||||
{
|
||||
delete guild;
|
||||
handler->SendSysMessage(LANG_GUILD_NOT_CREATED);
|
||||
@@ -121,16 +104,12 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGuildDeleteCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGuildDeleteCommand(ChatHandler*, std::string_view guildName)
|
||||
{
|
||||
if (!*args)
|
||||
if (guildName.empty())
|
||||
{
|
||||
return false;
|
||||
|
||||
char* guildStr = handler->extractQuotedArg((char*)args);
|
||||
if (!guildStr)
|
||||
return false;
|
||||
|
||||
std::string guildName = guildStr;
|
||||
}
|
||||
|
||||
Guild* targetGuild = sGuildMgr->GetGuildByName(guildName);
|
||||
if (!targetGuild)
|
||||
@@ -142,41 +121,41 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGuildInviteCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGuildInviteCommand(ChatHandler* handler, Optional<PlayerIdentifier> target, std::string_view guildName)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
if (!target)
|
||||
{
|
||||
target = PlayerIdentifier::FromTargetOrSelf(handler);
|
||||
}
|
||||
|
||||
// if not guild name only (in "") then player name
|
||||
ObjectGuid targetGuid;
|
||||
if (!handler->extractPlayerTarget(*args != '"' ? (char*)args : nullptr, nullptr, &targetGuid))
|
||||
if (!target)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
char* tailStr = *args != '"' ? strtok(nullptr, "") : (char*)args;
|
||||
if (!tailStr)
|
||||
return false;
|
||||
|
||||
char* guildStr = handler->extractQuotedArg(tailStr);
|
||||
if (!guildStr)
|
||||
return false;
|
||||
|
||||
std::string guildName = guildStr;
|
||||
Guild* targetGuild = sGuildMgr->GetGuildByName(guildName);
|
||||
if (!targetGuild)
|
||||
return false;
|
||||
|
||||
// player's guild membership checked in AddMember before add
|
||||
return targetGuild->AddMember(targetGuid);
|
||||
return targetGuild->AddMember(target->GetGUID());
|
||||
}
|
||||
|
||||
static bool HandleGuildUninviteCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGuildUninviteCommand(ChatHandler* handler, Optional<PlayerIdentifier> target)
|
||||
{
|
||||
Player* target;
|
||||
ObjectGuid targetGuid;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid))
|
||||
return false;
|
||||
if (!target)
|
||||
{
|
||||
target = PlayerIdentifier::FromTargetOrSelf(handler);
|
||||
}
|
||||
|
||||
uint32 guildId = target ? target->GetGuildId() : sCharacterCache->GetCharacterGuildIdByGuid(targetGuid);
|
||||
if (!target)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Player* playerTarget = target->GetConnectedPlayer();
|
||||
|
||||
uint32 guildId = playerTarget ? playerTarget->GetGuildId() : sCharacterCache->GetCharacterGuildIdByGuid(target->GetGUID());
|
||||
if (!guildId)
|
||||
return false;
|
||||
|
||||
@@ -184,7 +163,7 @@ public:
|
||||
if (!targetGuild)
|
||||
return false;
|
||||
|
||||
targetGuild->DeleteMember(targetGuid, false, true, true);
|
||||
targetGuild->DeleteMember(target->GetGUID(), false, true, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -207,26 +186,15 @@ public:
|
||||
return targetGuild->ChangeMemberRank(player->GetGUID(), rank);
|
||||
}
|
||||
|
||||
static bool HandleGuildRenameCommand(ChatHandler* handler, char const* _args)
|
||||
static bool HandleGuildRenameCommand(ChatHandler* handler, std::string_view oldGuildStr, std::string_view newGuildStr)
|
||||
{
|
||||
if (!*_args)
|
||||
return false;
|
||||
|
||||
char *args = (char *)_args;
|
||||
|
||||
char const* oldGuildStr = handler->extractQuotedArg(args);
|
||||
if (!oldGuildStr)
|
||||
if (!oldGuildStr.empty())
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
char const* newGuildStr = handler->extractQuotedArg(strtok(nullptr, ""));
|
||||
if (!newGuildStr)
|
||||
if (newGuildStr.empty())
|
||||
{
|
||||
handler->SendSysMessage(LANG_INSERT_GUILD_NAME);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -256,35 +224,40 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGuildInfoCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGuildInfoCommand(ChatHandler* handler, Optional<Variant<ObjectGuid::LowType, std::string_view>> const& guildIdentifier)
|
||||
{
|
||||
Guild* guild = nullptr;
|
||||
|
||||
if (args && args[0] != '\0')
|
||||
if (guildIdentifier)
|
||||
{
|
||||
if (isNumeric(args))
|
||||
guild = sGuildMgr->GetGuildById(strtoull(args, nullptr, 10));
|
||||
if (ObjectGuid::LowType const* guid = std::get_if<ObjectGuid::LowType>(&*guildIdentifier))
|
||||
guild = sGuildMgr->GetGuildById(*guid);
|
||||
else
|
||||
guild = sGuildMgr->GetGuildByName(args);
|
||||
guild = sGuildMgr->GetGuildByName(guildIdentifier->get<std::string_view>());
|
||||
}
|
||||
else if (Player* target = handler->getSelectedPlayerOrSelf())
|
||||
guild = target->GetGuild();
|
||||
else if (Optional<PlayerIdentifier> target = PlayerIdentifier::FromTargetOrSelf(handler); target && target->IsConnected())
|
||||
guild = target->GetConnectedPlayer()->GetGuild();
|
||||
|
||||
if (!guild)
|
||||
return false;
|
||||
|
||||
// Display Guild Information
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_NAME, guild->GetName().c_str(), guild->GetId()); // Guild Id + Name
|
||||
|
||||
std::string guildMasterName;
|
||||
if (sCharacterCache->GetCharacterNameByGuid(guild->GetLeaderGUID(), guildMasterName))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName.c_str(), guild->GetLeaderGUID().GetCounter()); // Guild Master
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_CREATION_DATE, Acore::Time::TimeToHumanReadable(Seconds(guild->GetCreatedDate())).c_str()); // Creation Date
|
||||
// Format creation date
|
||||
char createdDateStr[20];
|
||||
time_t createdDate = guild->GetCreatedDate();
|
||||
tm localTm;
|
||||
strftime(createdDateStr, 20, "%Y-%m-%d %H:%M:%S", localtime_r(&createdDate, &localTm));
|
||||
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_CREATION_DATE, createdDateStr); // Creation Date
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_MEMBER_COUNT, guild->GetMemberCount()); // Number of Members
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_BANK_GOLD, guild->GetTotalBankMoney() / 100 / 100); // Bank Gold (in gold coins)
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD().c_str()); // Message of the day
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD().c_str()); // Message of the Day
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_EXTRA_INFO, guild->GetInfo().c_str()); // Extra Information
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ public:
|
||||
{
|
||||
static ChatCommandTable commandTable =
|
||||
{
|
||||
{ "commentator", HandleCommentatorCommand, SEC_MODERATOR, Console::No },
|
||||
{ "dev", HandleDevCommand, SEC_ADMINISTRATOR, Console::No },
|
||||
{ "gps", HandleGPSCommand, SEC_MODERATOR, Console::No },
|
||||
{ "aura", HandleAuraCommand, SEC_GAMEMASTER, Console::No },
|
||||
@@ -451,6 +452,51 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleCommentatorCommand(ChatHandler* handler, Optional<bool> enableArg)
|
||||
{
|
||||
WorldSession* session = handler->GetSession();
|
||||
|
||||
if (!session)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
auto SetCommentatorMod = [&](bool enable)
|
||||
{
|
||||
session->SendNotification(enable ? "Commentator mode on" : "Commentator mode off");
|
||||
session->GetPlayer()->SetCommentator(enable);
|
||||
};
|
||||
|
||||
if (!enableArg)
|
||||
{
|
||||
if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->IsCommentator())
|
||||
{
|
||||
SetCommentatorMod(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCommentatorMod(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*enableArg)
|
||||
{
|
||||
SetCommentatorMod(true);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCommentatorMod(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
handler->SendSysMessage(LANG_USE_BOL);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool HandleDevCommand(ChatHandler* handler, Optional<bool> enableArg)
|
||||
{
|
||||
WorldSession* session = handler->GetSession();
|
||||
@@ -467,32 +513,29 @@ public:
|
||||
sScriptMgr->OnHandleDevCommand(handler->GetSession()->GetPlayer(), enable);
|
||||
};
|
||||
|
||||
if (WorldSession* session = handler->GetSession())
|
||||
if (!enableArg)
|
||||
{
|
||||
if (!enableArg)
|
||||
{
|
||||
if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->IsDeveloper())
|
||||
{
|
||||
SetDevMod(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDevMod(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*enableArg)
|
||||
if (!AccountMgr::IsPlayerAccount(session->GetSecurity()) && session->GetPlayer()->IsDeveloper())
|
||||
{
|
||||
SetDevMod(true);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDevMod(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*enableArg)
|
||||
{
|
||||
SetDevMod(true);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDevMod(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
handler->SendSysMessage(LANG_USE_BOL);
|
||||
|
||||
@@ -30,10 +30,6 @@ EndScriptData */
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
#if AC_COMPILER == AC_COMPILER_GNU
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
class reset_commandscript : public CommandScript
|
||||
@@ -45,48 +41,53 @@ public:
|
||||
{
|
||||
static ChatCommandTable resetCommandTable =
|
||||
{
|
||||
{ "achievements", SEC_CONSOLE, true, &HandleResetAchievementsCommand, "" },
|
||||
{ "honor", SEC_ADMINISTRATOR, true, &HandleResetHonorCommand, "" },
|
||||
{ "level", SEC_ADMINISTRATOR, true, &HandleResetLevelCommand, "" },
|
||||
{ "spells", SEC_ADMINISTRATOR, true, &HandleResetSpellsCommand, "" },
|
||||
{ "stats", SEC_ADMINISTRATOR, true, &HandleResetStatsCommand, "" },
|
||||
{ "talents", SEC_ADMINISTRATOR, true, &HandleResetTalentsCommand, "" },
|
||||
{ "all", SEC_CONSOLE, true, &HandleResetAllCommand, "" }
|
||||
{ "achievements", HandleResetAchievementsCommand, SEC_CONSOLE, Console::Yes },
|
||||
{ "honor", HandleResetHonorCommand, SEC_ADMINISTRATOR, Console::Yes },
|
||||
{ "level", HandleResetLevelCommand, SEC_ADMINISTRATOR, Console::Yes },
|
||||
{ "spells", HandleResetSpellsCommand, SEC_ADMINISTRATOR, Console::Yes },
|
||||
{ "stats", HandleResetStatsCommand, SEC_ADMINISTRATOR, Console::Yes },
|
||||
{ "talents", HandleResetTalentsCommand, SEC_ADMINISTRATOR, Console::Yes },
|
||||
{ "all", HandleResetAllCommand, SEC_CONSOLE, Console::Yes }
|
||||
};
|
||||
static ChatCommandTable commandTable =
|
||||
{
|
||||
{ "reset", SEC_ADMINISTRATOR, true, nullptr, "", resetCommandTable }
|
||||
{ "reset", resetCommandTable }
|
||||
};
|
||||
return commandTable;
|
||||
}
|
||||
|
||||
static bool HandleResetAchievementsCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleResetAchievementsCommand(ChatHandler*, Optional<PlayerIdentifier> target)
|
||||
{
|
||||
Player* target;
|
||||
ObjectGuid targetGuid;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid))
|
||||
if (!target)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target)
|
||||
target->ResetAchievements();
|
||||
Player* playerTarget = target->GetConnectedPlayer();
|
||||
|
||||
if (playerTarget)
|
||||
playerTarget->ResetAchievements();
|
||||
else
|
||||
AchievementMgr::DeleteFromDB(targetGuid.GetCounter());
|
||||
AchievementMgr::DeleteFromDB(target->GetGUID().GetCounter());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleResetHonorCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleResetHonorCommand(ChatHandler*, Optional<PlayerIdentifier> target)
|
||||
{
|
||||
Player* target;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target))
|
||||
if (!target)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
target->SetHonorPoints(0);
|
||||
target->SetUInt32Value(PLAYER_FIELD_KILLS, 0);
|
||||
target->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0);
|
||||
target->SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, 0);
|
||||
target->SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0);
|
||||
target->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL);
|
||||
Player* playerTarget = target->GetConnectedPlayer();
|
||||
|
||||
playerTarget->SetHonorPoints(0);
|
||||
playerTarget->SetUInt32Value(PLAYER_FIELD_KILLS, 0);
|
||||
playerTarget->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0);
|
||||
playerTarget->SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, 0);
|
||||
playerTarget->SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0);
|
||||
playerTarget->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -123,156 +124,145 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleResetLevelCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleResetLevelCommand(ChatHandler*, Optional<PlayerIdentifier> target)
|
||||
{
|
||||
Player* target;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target))
|
||||
if (!target)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Player* playerTarget = target->GetConnectedPlayer();
|
||||
|
||||
if (!HandleResetStatsOrLevelHelper(playerTarget))
|
||||
return false;
|
||||
|
||||
if (!HandleResetStatsOrLevelHelper(target))
|
||||
return false;
|
||||
|
||||
uint8 oldLevel = target->GetLevel();
|
||||
uint8 oldLevel = playerTarget->GetLevel();
|
||||
|
||||
// set starting level
|
||||
uint32 startLevel = target->getClass() != CLASS_DEATH_KNIGHT
|
||||
uint32 startLevel = playerTarget->getClass() != CLASS_DEATH_KNIGHT
|
||||
? sWorld->getIntConfig(CONFIG_START_PLAYER_LEVEL)
|
||||
: sWorld->getIntConfig(CONFIG_START_HEROIC_PLAYER_LEVEL);
|
||||
|
||||
target->_ApplyAllLevelScaleItemMods(false);
|
||||
target->SetLevel(startLevel);
|
||||
target->InitRunes();
|
||||
target->InitStatsForLevel(true);
|
||||
target->InitTaxiNodesForLevel();
|
||||
target->InitGlyphsForLevel();
|
||||
target->InitTalentForLevel();
|
||||
target->SetUInt32Value(PLAYER_XP, 0);
|
||||
playerTarget->_ApplyAllLevelScaleItemMods(false);
|
||||
playerTarget->SetLevel(startLevel);
|
||||
playerTarget->InitRunes();
|
||||
playerTarget->InitStatsForLevel(true);
|
||||
playerTarget->InitTaxiNodesForLevel();
|
||||
playerTarget->InitGlyphsForLevel();
|
||||
playerTarget->InitTalentForLevel();
|
||||
playerTarget->SetUInt32Value(PLAYER_XP, 0);
|
||||
|
||||
target->_ApplyAllLevelScaleItemMods(true);
|
||||
playerTarget->_ApplyAllLevelScaleItemMods(true);
|
||||
|
||||
// reset level for pet
|
||||
if (Pet* pet = target->GetPet())
|
||||
if (Pet* pet = playerTarget->GetPet())
|
||||
pet->SynchronizeLevelWithOwner();
|
||||
|
||||
sScriptMgr->OnPlayerLevelChanged(target, oldLevel);
|
||||
sScriptMgr->OnPlayerLevelChanged(playerTarget, oldLevel);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleResetSpellsCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleResetSpellsCommand(ChatHandler* handler, Optional<PlayerIdentifier> target)
|
||||
{
|
||||
Player* target;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
if (!target)
|
||||
{
|
||||
target = PlayerIdentifier::FromTargetOrSelf(handler);
|
||||
}
|
||||
|
||||
if (!target)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Player* playerTarget = target->GetConnectedPlayer();
|
||||
|
||||
if (target)
|
||||
{
|
||||
target->resetSpells(/* bool myClassOnly */);
|
||||
playerTarget->resetSpells(/* bool myClassOnly */);
|
||||
|
||||
ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_SPELLS);
|
||||
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
|
||||
handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(target).c_str());
|
||||
ChatHandler(playerTarget->GetSession()).SendSysMessage(LANG_RESET_SPELLS);
|
||||
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != playerTarget)
|
||||
handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(playerTarget).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->SetData(0, uint16(AT_LOGIN_RESET_SPELLS));
|
||||
stmt->SetData(1, targetGuid.GetCounter());
|
||||
stmt->SetData(1, playerTarget->GetGUID().GetCounter());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage(LANG_RESET_SPELLS_OFFLINE, targetName.c_str());
|
||||
handler->PSendSysMessage(LANG_RESET_SPELLS_OFFLINE, target->GetName());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleResetStatsCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleResetStatsCommand(ChatHandler*, Optional<PlayerIdentifier> target)
|
||||
{
|
||||
Player* target;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target))
|
||||
if (!target)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Player* playerTarget = target->GetConnectedPlayer();
|
||||
|
||||
if (!HandleResetStatsOrLevelHelper(playerTarget))
|
||||
return false;
|
||||
|
||||
if (!HandleResetStatsOrLevelHelper(target))
|
||||
return false;
|
||||
|
||||
target->InitRunes();
|
||||
target->InitStatsForLevel(true);
|
||||
target->InitTaxiNodesForLevel();
|
||||
target->InitGlyphsForLevel();
|
||||
target->InitTalentForLevel();
|
||||
playerTarget->InitRunes();
|
||||
playerTarget->InitStatsForLevel(true);
|
||||
playerTarget->InitTaxiNodesForLevel();
|
||||
playerTarget->InitGlyphsForLevel();
|
||||
playerTarget->InitTalentForLevel();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleResetTalentsCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleResetTalentsCommand(ChatHandler* handler, Optional<PlayerIdentifier> target)
|
||||
{
|
||||
Player* target;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
Player* targetPlayer = nullptr;
|
||||
|
||||
if (target)
|
||||
{
|
||||
targetPlayer = target->GetConnectedPlayer();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Try reset talents as Hunter Pet
|
||||
Creature* creature = handler->getSelectedCreature();
|
||||
if (!*args && creature && creature->IsPet())
|
||||
{
|
||||
Unit* owner = creature->GetOwner();
|
||||
if (owner && owner->GetTypeId() == TYPEID_PLAYER && creature->ToPet()->IsPermanentPetFor(owner->ToPlayer()))
|
||||
{
|
||||
creature->ToPet()->resetTalents();
|
||||
owner->ToPlayer()->SendTalentsInfoData(true);
|
||||
|
||||
ChatHandler(owner->ToPlayer()->GetSession()).SendSysMessage(LANG_RESET_PET_TALENTS);
|
||||
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != owner->ToPlayer())
|
||||
handler->PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE, handler->GetNameLink(owner->ToPlayer()).c_str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target)
|
||||
if (targetPlayer)
|
||||
{
|
||||
target->resetTalents(true);
|
||||
target->SendTalentsInfoData(false);
|
||||
ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS);
|
||||
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
|
||||
handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(target).c_str());
|
||||
targetPlayer->resetTalents(true);
|
||||
targetPlayer->SendTalentsInfoData(false);
|
||||
ChatHandler(targetPlayer->GetSession()).SendSysMessage(LANG_RESET_TALENTS);
|
||||
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != targetPlayer)
|
||||
handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(targetPlayer).c_str());
|
||||
|
||||
Pet* pet = target->GetPet();
|
||||
Pet::resetTalentsForAllPetsOf(target, pet);
|
||||
Pet* pet = targetPlayer->GetPet();
|
||||
Pet::resetTalentsForAllPetsOf(targetPlayer, pet);
|
||||
if (pet)
|
||||
target->SendTalentsInfoData(true);
|
||||
targetPlayer->SendTalentsInfoData(true);
|
||||
return true;
|
||||
}
|
||||
else if (targetGuid)
|
||||
else
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->SetData(0, uint16(AT_LOGIN_RESET_TALENTS | AT_LOGIN_RESET_PET_TALENTS));
|
||||
stmt->SetData(1, targetGuid.GetCounter());
|
||||
stmt->SetData(1, target->GetGUID().GetCounter());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
std::string nameLink = handler->playerLink(targetName);
|
||||
std::string nameLink = handler->playerLink(target->GetName());
|
||||
handler->PSendSysMessage(LANG_RESET_TALENTS_OFFLINE, nameLink.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool HandleResetAllCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleResetAllCommand(ChatHandler* handler, std::string_view caseName)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
std::string caseName = args;
|
||||
|
||||
AtLoginFlags atLogin;
|
||||
|
||||
// Command specially created as single command to prevent using short case names
|
||||
@@ -292,7 +282,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_RESETALL_UNKNOWN_CASE, args);
|
||||
handler->PSendSysMessage(LANG_RESETALL_UNKNOWN_CASE, caseName);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
@@ -303,7 +293,7 @@ public:
|
||||
|
||||
std::shared_lock<std::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
|
||||
HashMapHolder<Player>::MapType const& plist = ObjectAccessor::GetPlayers();
|
||||
for (HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
|
||||
for (auto itr = plist.begin(); itr != plist.end(); ++itr)
|
||||
itr->second->SetAtLoginFlag(atLogin);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -24,7 +24,6 @@ EndScriptData */
|
||||
|
||||
#include "AccountMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "Language.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
@@ -32,10 +31,6 @@ EndScriptData */
|
||||
#include "ScriptMgr.h"
|
||||
#include "TicketMgr.h"
|
||||
|
||||
#if AC_COMPILER == AC_COMPILER_GNU
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
using namespace Acore::ChatCommands;
|
||||
|
||||
class ticket_commandscript : public CommandScript
|
||||
@@ -47,48 +42,38 @@ public:
|
||||
{
|
||||
static ChatCommandTable ticketResponseCommandTable =
|
||||
{
|
||||
{ "append", SEC_GAMEMASTER, true, &HandleGMTicketResponseAppendCommand, "" },
|
||||
{ "appendln", SEC_GAMEMASTER, true, &HandleGMTicketResponseAppendLnCommand, "" }
|
||||
{ "append", HandleGMTicketResponseAppendCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "appendln", HandleGMTicketResponseAppendLnCommand, SEC_GAMEMASTER, Console::Yes }
|
||||
};
|
||||
static ChatCommandTable ticketCommandTable =
|
||||
{
|
||||
{ "assign", SEC_GAMEMASTER, true, &HandleGMTicketAssignToCommand, "" },
|
||||
{ "close", SEC_GAMEMASTER, true, &HandleGMTicketCloseByIdCommand, "" },
|
||||
{ "closedlist", SEC_GAMEMASTER, true, &HandleGMTicketListClosedCommand, "" },
|
||||
{ "comment", SEC_GAMEMASTER, true, &HandleGMTicketCommentCommand, "" },
|
||||
{ "complete", SEC_GAMEMASTER, true, &HandleGMTicketCompleteCommand, "" },
|
||||
{ "delete", SEC_ADMINISTRATOR, true, &HandleGMTicketDeleteByIdCommand, "" },
|
||||
{ "escalate", SEC_GAMEMASTER, true, &HandleGMTicketEscalateCommand, "" },
|
||||
{ "escalatedlist", SEC_GAMEMASTER, true, &HandleGMTicketListEscalatedCommand, "" },
|
||||
{ "list", SEC_GAMEMASTER, true, &HandleGMTicketListCommand, "" },
|
||||
{ "onlinelist", SEC_GAMEMASTER, true, &HandleGMTicketListOnlineCommand, "" },
|
||||
{ "reset", SEC_CONSOLE, true, &HandleGMTicketResetCommand, "" },
|
||||
{ "response", SEC_GAMEMASTER, true, nullptr, "", ticketResponseCommandTable },
|
||||
{ "togglesystem", SEC_ADMINISTRATOR, true, &HandleToggleGMTicketSystem, "" },
|
||||
{ "unassign", SEC_GAMEMASTER, true, &HandleGMTicketUnAssignCommand, "" },
|
||||
{ "viewid", SEC_GAMEMASTER, true, &HandleGMTicketGetByIdCommand, "" },
|
||||
{ "viewname", SEC_GAMEMASTER, true, &HandleGMTicketGetByNameCommand, "" }
|
||||
{ "assign", HandleGMTicketAssignToCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "close", HandleGMTicketCloseByIdCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "closedlist", HandleGMTicketListClosedCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "comment", HandleGMTicketCommentCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "complete", HandleGMTicketCompleteCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "delete", HandleGMTicketDeleteByIdCommand, SEC_ADMINISTRATOR, Console::Yes },
|
||||
{ "escalate", HandleGMTicketEscalateCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "escalatedlist", HandleGMTicketListEscalatedCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "list", HandleGMTicketListCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "onlinelist", HandleGMTicketListOnlineCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "reset", HandleGMTicketResetCommand, SEC_CONSOLE, Console::Yes },
|
||||
|
||||
{ "response", ticketResponseCommandTable },
|
||||
{ "togglesystem", HandleToggleGMTicketSystem, SEC_ADMINISTRATOR, Console::Yes },
|
||||
{ "unassign", HandleGMTicketUnAssignCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "viewid", HandleGMTicketGetByIdCommand, SEC_GAMEMASTER, Console::Yes },
|
||||
{ "viewname", HandleGMTicketGetByNameCommand, SEC_GAMEMASTER, Console::Yes }
|
||||
};
|
||||
static ChatCommandTable commandTable =
|
||||
{
|
||||
{ "ticket", SEC_GAMEMASTER, false, nullptr, "", ticketCommandTable }
|
||||
{ "ticket", ticketCommandTable }
|
||||
};
|
||||
return commandTable;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketAssignToCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketAssignToCommand(ChatHandler* handler, uint32 ticketId, std::string target)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* ticketIdStr = strtok((char*)args, " ");
|
||||
uint32 ticketId = atoi(ticketIdStr);
|
||||
|
||||
char* targetStr = strtok(nullptr, " ");
|
||||
if (!targetStr)
|
||||
return false;
|
||||
|
||||
std::string target(targetStr);
|
||||
if (!normalizePlayerName(target))
|
||||
return false;
|
||||
|
||||
@@ -138,12 +123,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketCloseByIdCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketCloseByIdCommand(ChatHandler* handler, uint32 ticketId)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 ticketId = atoi(args);
|
||||
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
|
||||
if (!ticket || ticket->IsClosed() || ticket->IsCompleted())
|
||||
{
|
||||
@@ -177,14 +158,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketCommentCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketCommentCommand(ChatHandler* handler, uint32 ticketId)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* ticketIdStr = strtok((char*)args, " ");
|
||||
uint32 ticketId = atoi(ticketIdStr);
|
||||
|
||||
char* comment = strtok(nullptr, "\n");
|
||||
if (!comment)
|
||||
return false;
|
||||
@@ -218,20 +193,14 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketListClosedCommand(ChatHandler* handler, char const* /*args*/)
|
||||
static bool HandleGMTicketListClosedCommand(ChatHandler* handler)
|
||||
{
|
||||
sTicketMgr->ShowClosedList(*handler);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketCompleteCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketCompleteCommand(ChatHandler* handler, uint32 ticketId)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* ticketIdStr = strtok((char*)args, " ");
|
||||
uint32 ticketId = atoi(ticketIdStr);
|
||||
|
||||
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
|
||||
if (!ticket || ticket->IsClosed() || ticket->IsCompleted())
|
||||
{
|
||||
@@ -272,12 +241,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketDeleteByIdCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketDeleteByIdCommand(ChatHandler* handler, uint32 ticketId)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 ticketId = atoi(args);
|
||||
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
|
||||
if (!ticket)
|
||||
{
|
||||
@@ -308,12 +273,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketEscalateCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketEscalateCommand(ChatHandler* handler, uint32 ticketId)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 ticketId = atoi(args);
|
||||
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
|
||||
if (!ticket || ticket->IsClosed() || ticket->IsCompleted() || ticket->GetEscalatedStatus() != TICKET_UNASSIGNED)
|
||||
{
|
||||
@@ -330,25 +291,25 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketListEscalatedCommand(ChatHandler* handler, char const* /*args*/)
|
||||
static bool HandleGMTicketListEscalatedCommand(ChatHandler* handler)
|
||||
{
|
||||
sTicketMgr->ShowEscalatedList(*handler);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketListCommand(ChatHandler* handler, char const* /*args*/)
|
||||
static bool HandleGMTicketListCommand(ChatHandler* handler)
|
||||
{
|
||||
sTicketMgr->ShowList(*handler, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketListOnlineCommand(ChatHandler* handler, char const* /*args*/)
|
||||
static bool HandleGMTicketListOnlineCommand(ChatHandler* handler)
|
||||
{
|
||||
sTicketMgr->ShowList(*handler, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketResetCommand(ChatHandler* handler, char const* /*args*/)
|
||||
static bool HandleGMTicketResetCommand(ChatHandler* handler)
|
||||
{
|
||||
if (sTicketMgr->GetOpenTicketCount())
|
||||
{
|
||||
@@ -364,7 +325,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleToggleGMTicketSystem(ChatHandler* handler, char const* /*args*/)
|
||||
static bool HandleToggleGMTicketSystem(ChatHandler* handler)
|
||||
{
|
||||
bool status = !sTicketMgr->GetStatus();
|
||||
sTicketMgr->SetStatus(status);
|
||||
@@ -372,12 +333,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketUnAssignCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketUnAssignCommand(ChatHandler* handler, uint32 ticketId)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 ticketId = atoi(args);
|
||||
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
|
||||
if (!ticket || ticket->IsClosed())
|
||||
{
|
||||
@@ -425,12 +382,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketGetByIdCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketGetByIdCommand(ChatHandler* handler, uint32 ticketId)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 ticketId = atoi(args);
|
||||
GmTicket* ticket = sTicketMgr->GetTicket(ticketId);
|
||||
if (!ticket || ticket->IsClosed() || ticket->IsCompleted())
|
||||
{
|
||||
@@ -442,16 +395,12 @@ public:
|
||||
ticket->SetViewed();
|
||||
ticket->SaveToDB(trans);
|
||||
|
||||
handler->SendSysMessage(ticket->FormatMessageString(*handler, true).c_str());
|
||||
handler->SendSysMessage(ticket->FormatMessageString(*handler, true));
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketGetByNameCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketGetByNameCommand(ChatHandler* handler, std::string name)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
std::string name(args);
|
||||
if (!normalizePlayerName(name))
|
||||
return false;
|
||||
|
||||
@@ -485,18 +434,12 @@ public:
|
||||
ticket->SetViewed();
|
||||
ticket->SaveToDB(trans);
|
||||
|
||||
handler->SendSysMessage(ticket->FormatMessageString(*handler, true).c_str());
|
||||
handler->SendSysMessage(ticket->FormatMessageString(*handler, true));
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool _HandleGMTicketResponseAppendCommand(char const* args, bool newLine, ChatHandler* handler)
|
||||
static bool _HandleGMTicketResponseAppendCommand(uint32 ticketId, bool newLine, ChatHandler* handler)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* ticketIdStr = strtok((char*)args, " ");
|
||||
uint32 ticketId = atoi(ticketIdStr);
|
||||
|
||||
char* response = strtok(nullptr, "\n");
|
||||
if (!response)
|
||||
return false;
|
||||
@@ -526,14 +469,14 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleGMTicketResponseAppendCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketResponseAppendCommand(ChatHandler* handler, uint32 ticketId)
|
||||
{
|
||||
return _HandleGMTicketResponseAppendCommand(args, false, handler);
|
||||
return _HandleGMTicketResponseAppendCommand(ticketId, false, handler);
|
||||
}
|
||||
|
||||
static bool HandleGMTicketResponseAppendLnCommand(ChatHandler* handler, char const* args)
|
||||
static bool HandleGMTicketResponseAppendLnCommand(ChatHandler* handler, uint32 ticketId)
|
||||
{
|
||||
return _HandleGMTicketResponseAppendCommand(args, true, handler);
|
||||
return _HandleGMTicketResponseAppendCommand(ticketId, true, handler);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user