mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7296] Fixed some GCC warnings.
This commit is contained in:
parent
0be9e35b7b
commit
6793f9256f
4 changed files with 8 additions and 10 deletions
|
|
@ -1882,18 +1882,14 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
char* FactionName;
|
||||
for(FactionStateList::const_iterator itr = target->m_factions.begin(); itr != target->m_factions.end(); ++itr)
|
||||
{
|
||||
FactionEntry const *factionEntry = sFactionStore.LookupEntry(itr->second.ID);
|
||||
if (factionEntry)
|
||||
FactionName = factionEntry->name[m_session->GetSessionDbcLocale()];
|
||||
else
|
||||
FactionName = "#Not found#";
|
||||
char const* factionName = factionEntry ? factionEntry->name[m_session->GetSessionDbcLocale()] : "#Not found#";
|
||||
ReputationRank rank = target->GetReputationRank(factionEntry);
|
||||
std::string rankName = GetMangosString(ReputationRankStrIndex[rank]);
|
||||
std::ostringstream ss;
|
||||
ss << itr->second.ID << ": |cffffffff|Hfaction:" << itr->second.ID << "|h[" << FactionName << "]|h|r " << rankName << "|h|r (" << target->GetReputation(factionEntry) << ")";
|
||||
ss << itr->second.ID << ": |cffffffff|Hfaction:" << itr->second.ID << "|h[" << factionName << "]|h|r " << rankName << "|h|r (" << target->GetReputation(factionEntry) << ")";
|
||||
|
||||
if(itr->second.Flags & FACTION_FLAG_VISIBLE)
|
||||
ss << GetMangosString(LANG_FACTION_VISIBLE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue