diff --git a/common/tasks.h b/common/tasks.h index 8f081daf56..8cf98335b7 100644 --- a/common/tasks.h +++ b/common/tasks.h @@ -83,7 +83,8 @@ struct ActivityInformation { if (zone_ids.empty()) { return true; } - bool found_zone = std::find(zone_ids.begin(), zone_ids.end(), zone_id) != zone_ids.end(); + bool found_zone = std::any_of(zone_ids.begin(), zone_ids.end(), + [zone_id](int id) { return id <= 0 || id == zone_id; }); return found_zone && (zone_version == version || zone_version == -1); } @@ -100,7 +101,7 @@ struct ActivityInformation { out.WriteInt32(activity_type == TaskActivityType::GiveCash ? 1 : goal_count); out.WriteLengthString(skill_list); // used in SkillOn objective type string, "-1" for none out.WriteLengthString(spell_list); // used in CastOn objective type string, "0" for none - out.WriteString(zones); // used in objective zone column and task select "begins in" (may have multiple, "0" for "unknown zone", empty for "ALL") + out.WriteString(zones); // used in ui zone columns and task select "begins in" (may have multiple, invalid id for "Unknown Zone", empty for "ALL") } else { @@ -114,7 +115,7 @@ struct ActivityInformation { out.WriteString(description_override); if (client_version >= EQ::versions::ClientVersion::RoF) { - out.WriteString(zones); // serialized again after description (seems unused) + out.WriteString(zones); // target zone version internal id (unused client side) } }