Core/Misc: some random changes after recent pull requests
This commit is contained in:
1 parent
88809359e7
commit
01380c66bf
14 files changed
+117
-173
No files matched your search
@@ -247,16 +247,12 @@ public:
|
||||
|
||||
static bool HandleGuildInfoCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint32 guildId;
|
||||
std::string guildName;
|
||||
std::string guildMasterName;
|
||||
Guild* guild;
|
||||
Guild* guild = nullptr;
|
||||
|
||||
if (!*args)
|
||||
{
|
||||
// Look for the guild of the selected player or ourselves
|
||||
if (target = handler->getSelectedPlayerOrSelf())
|
||||
if (Player* target = handler->getSelectedPlayerOrSelf())
|
||||
guild = target->GetGuild();
|
||||
else
|
||||
// getSelectedPlayerOrSelf will return null if there is no session
|
||||
@@ -264,7 +260,7 @@ public:
|
||||
// without specifying args.
|
||||
return false;
|
||||
}
|
||||
else if (guildId = atoi(args)) // Try searching by Id
|
||||
else if (uint32 guildId = atoi(args)) // Try searching by Id
|
||||
guild = sGuildMgr->GetGuildById(guildId);
|
||||
else
|
||||
{
|
||||
@@ -277,13 +273,15 @@ public:
|
||||
if (!guildStr)
|
||||
return false;
|
||||
|
||||
guildName = guildStr;
|
||||
std::string guildName = guildStr;
|
||||
guild = sGuildMgr->GetGuildByName(guildName);
|
||||
}
|
||||
|
||||
if (!guild)
|
||||
return false;
|
||||
|
||||
std::string guildMasterName;
|
||||
|
||||
// Display Guild Information
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_NAME, guild->GetName().c_str(), guild->GetId()); // Guild Id + Name
|
||||
if (sObjectMgr->GetPlayerNameByGUID(guild->GetLeaderGUID(), guildMasterName))
|
||||
|
||||
Reference in new issue
Block a user