Scripts/Commands: Add guild info to .pinfo
Original patch by @secharles, modified Closes #8946
This commit is contained in:
1 parent
e591f886ff
commit
1b551cc157
5 files changed
+31
No files matched your search
@@ -1734,6 +1734,29 @@ public:
|
||||
else
|
||||
handler->PSendSysMessage(LANG_PINFO_MAP_OFFLINE, map->name[locale], areaName.c_str());
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER_EXTENDED);
|
||||
stmt->setUInt32(0, GUID_LOPART(targetGuid));
|
||||
|
||||
result = CharacterDatabase.Query(stmt);
|
||||
if (result)
|
||||
{
|
||||
uint32 guildId = 0;
|
||||
std::string guildName = "";
|
||||
std::string guildRank = "";
|
||||
std::string note = "";
|
||||
std::string officeNote = "";
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
guildId = fields[0].GetUInt32();
|
||||
guildName = fields[1].GetString();
|
||||
//rankId = fields[2].GetUInt8();
|
||||
guildRank = fields[3].GetString();
|
||||
note = fields[4].GetString();
|
||||
officeNote = fields[5].GetString();
|
||||
|
||||
handler->PSendSysMessage(LANG_PINFO_GUILD_INFO, guildName.c_str(), guildId, guildRank.c_str(), note.c_str(), officeNote.c_str());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user