mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 12:41:30 +00:00
[Tasks] Update tasks in all zones if invalid zone set (#4550)
This allows task elements to update in any zone when it has an invalid zone id <= 0. This has the same effect as leaving the zones field empty except "Unknown Zone" instead of "ALL" will be shown in task windows. Note that Titanium shows "ALL" for a zone id of 0 despite it being an invalid zone id. This could be manipulated server side to match newer clients but there isn't much benefit since any other invalid zone id below 0 can be used to do the same.
This commit is contained in:
parent
6bd758b3dd
commit
187ee10218
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user