This commit is contained in:
in1tiate 2021-04-15 14:10:53 -05:00
parent b1dfeec8f5
commit 38d73d9228

View File

@ -377,13 +377,14 @@ void AOClient::pktAnnounceCase(AreaData* area, int argc, QStringList argv, AOPac
if (needed_roles.isEmpty()) if (needed_roles.isEmpty())
return; return;
QString message = "=== Case Announcement ===\r\n" + ooc_name == "" ? current_char : ooc_name + " needs " + needed_roles.join(", ") + " for " + case_title == "" ? "a case" : case_title + "!"; QString message = "=== Case Announcement ===\r\n" + (ooc_name == "" ? current_char : ooc_name) + " needs " + needed_roles.join(", ") + " for " + (case_title == "" ? "a case" : case_title) + "!";
QList<AOClient*> clients_to_alert; QList<AOClient*> clients_to_alert;
// here lies morton, RIP // here lies morton, RIP
QSet<bool> needs_set = needs_list.toSet();
for (AOClient* client : server->clients) { for (AOClient* client : server->clients) {
QSet<bool> matches = client->casing_preferences.toSet().intersect(needs_list.toSet()); QSet<bool> matches = client->casing_preferences.toSet().intersect(needs_set);
if (matches.isEmpty() && !clients_to_alert.contains(client)) if (!matches.isEmpty() && !clients_to_alert.contains(client))
clients_to_alert.append(client); clients_to_alert.append(client);
} }