修改奖励模板GetDescription中的颜色

This commit is contained in:
尚美 2025-10-03 15:00:58 +08:00
parent 7b3683b839
commit 8d4a0a79d1

View File

@ -510,27 +510,27 @@ std::string Reward::GetDescription(uint32 rewId, bool quest)
std::ostringstream oss;
if (xp > 0)
oss << " |cFF0000FF[经验]|r x |cFF0000FF" << xp << "|r\n";
oss << " |cFFe9c500[经验]|r x |cFFe9c500" << xp << "|r\n";
if (goldCount > 0)
oss << " |cFF0000FF[金币]|r x |cFF0000FF" << goldCount / GOLD << "|r\n";
oss << " |cFFe9c500[金币]|r x |cFFe9c500" << goldCount / GOLD << "|r\n";
if (tokenCount > 0)
oss << " |cFF0000FF[" << sString->GetText(CORE_STR_TYPES(STR_TOKEN)) << "]|r x |cFF0000FF" << tokenCount << "|r\n";
oss << " |cFFe9c500[" << sString->GetText(CORE_STR_TYPES(STR_TOKEN)) << "]|r x |cFFe9c500" << tokenCount << "|r\n";
if (hrPoints > 0)
oss << " |cFF0000FF[荣誉]|r x |cFF0000FF" << hrPoints << "|r\n";
oss << " |cFFe9c500[荣誉]|r x |cFFe9c500" << hrPoints << "|r\n";
if (arenaPoints > 0)
oss << " |cFF0000FF[竞技点]|r x |cFF0000FF" << arenaPoints << "|r\n";
oss << " |cFFe9c500[竞技点]|r x |cFFe9c500" << arenaPoints << "|r\n";
if (statPoints > 0)
oss << " |cFF0000FF[斗气点]|r x |cFF0000FF" << statPoints << "|r\n";
oss << " |cFFe9c500[斗气点]|r x |cFFe9c500" << statPoints << "|r\n";
for (auto itr = iter->second.ItemDataVec.begin(); itr != iter->second.ItemDataVec.end(); itr++)
if (ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(itr->itemId))
oss << " |cFF0000FF[" << pProto->Name1 << "]|r x |cFF0000FF" << itr->itemCount << "|r\n";
oss << " |cFFe9c500[" << pProto->Name1 << "]|r x |cFFe9c500" << itr->itemCount << "|r\n";
for (auto itr = iter->second.SpellDataVec.begin(); itr != iter->second.SpellDataVec.end(); itr++)
{
@ -541,7 +541,7 @@ std::string Reward::GetDescription(uint32 rewId, bool quest)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (spellInfo)
oss << " |cFF0000FF[技能] [" << spellInfo->SpellName[4] << "]|r\n";
oss << " |cFFe9c500[技能] [" << spellInfo->SpellName[4] << "]|r\n";
}
for (auto itr = iter->second.SpellDataVec.begin(); itr != iter->second.SpellDataVec.end(); itr++)
@ -551,12 +551,12 @@ std::string Reward::GetDescription(uint32 rewId, bool quest)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(abs(*itr));
if (spellInfo)
oss << " |cFF0000FF[增益] [" << spellInfo->SpellName[4] << "]|r\n";
oss << " |cFFe9c500[增益] [" << spellInfo->SpellName[4] << "]|r\n";
}
for (auto itr = iter->second.CommandDataVec.begin(); itr != iter->second.CommandDataVec.end(); itr++)
if (!itr->command.empty())
oss << " |cFF0000FF[其他] " << itr->des << "\n";
oss << " |cFFe9c500[其他] " << itr->des << "\n";
return oss.str();
}