don't use $CG in any server announcements

This commit is contained in:
Martin Michelsen
2024-04-27 12:08:31 -07:00
parent 79fee4cec4
commit f5c2c930d8
3 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -72,7 +72,7 @@
// - - $C7: White (FFFFFF)
// - - $C8: Pink (FF8080)
// - - $C9: Violet (8080FF)
// - - $CG: Orange pulse (FFE000 + darkenings thereof)
// - - $CG: Orange pulse (FFE000 + darkenings thereof; v2 and later only)
// - - $Ca: Orange (F5A052; Episode 3 only)
// - Special character codes (Ep3 only)
// - - $B: Dash + small bullet
+6 -5
View File
@@ -217,13 +217,14 @@ std::string ItemNameIndex::describe_item(const ItemData& item, bool include_colo
if (!bonuses.is_filled_with(0)) {
bool should_include_hit = (bonuses[4] != 0);
bool should_highlight_hit = include_color_escapes && (bonuses[4] > 0);
const char* color_prefix = include_color_escapes ? "$C7" : "";
if (should_include_hit) {
ret_tokens.emplace_back(string_printf("%hhd/%hhd/%hhd/%hhd/%s%hhd",
bonuses[0], bonuses[1], bonuses[2], bonuses[3],
(should_highlight_hit ? "$CG" : ""), bonuses[4]));
ret_tokens.emplace_back(string_printf("%s%hhd/%hhd/%hhd/%hhd/%s%hhd",
color_prefix, bonuses[0], bonuses[1], bonuses[2], bonuses[3],
(should_highlight_hit ? "$C6" : ""), bonuses[4]));
} else {
ret_tokens.emplace_back(string_printf("%hhd/%hhd/%hhd/%hhd",
bonuses[0], bonuses[1], bonuses[2], bonuses[3]));
ret_tokens.emplace_back(string_printf("%s%hhd/%hhd/%hhd/%hhd",
color_prefix, bonuses[0], bonuses[1], bonuses[2], bonuses[3]));
}
}
}
+2 -2
View File
@@ -3175,9 +3175,9 @@ static void send_max_level_notification_if_needed(shared_ptr<Client> c) {
if (p->disp.stats.level == max_level) {
string name = p->disp.name.decode(c->language());
size_t level_for_str = max_level + 1;
string message = string_printf("$CG%s$C6\nGC: %" PRIu32 "\nhas reached Level $CG%zu",
string message = string_printf("$C6%s$C7\nGC: %" PRIu32 "\nhas reached Level $C6%zu",
name.c_str(), c->login->account->account_id, level_for_str);
string bb_message = string_printf("$CG%s$C6 (GC: %" PRIu32 ") has reached Level $CG%zu",
string bb_message = string_printf("$C6%s$C7 (GC: %" PRIu32 ") has reached Level $C6%zu",
name.c_str(), c->login->account->account_id, level_for_str);
for (auto& it : s->channel_to_client) {
if ((it.second != c) && it.second->login && !is_patch(it.second->version()) && it.second->lobby.lock()) {