mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Expeditions] Refactor expedition caching (#1315)
Add common expedition base class Use repository for zone and world expedition caching World now stores members and leader as Member objects instead of ids This improves readability of the caching methods and lets world cache expedition dzs and members like zone. World also now caches expeditions as unique_ptr which will be necessary for future dz callback lambdas that capture 'this' so addresses don't change on cache vector resizes.
This commit is contained in:
+3
-3
@@ -6900,20 +6900,20 @@ void command_dz(Client* c, const Seperator* sep)
|
||||
auto leader_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(fmt::format(
|
||||
"#goto {}", expedition->GetLeaderName()), false, expedition->GetLeaderName());
|
||||
auto zone_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(fmt::format(
|
||||
"#zoneinstance {}", expedition->GetInstanceID()), false, "zone");
|
||||
"#zoneinstance {}", expedition->GetDynamicZone().GetInstanceID()), false, "zone");
|
||||
|
||||
auto seconds = expedition->GetDynamicZone().GetSecondsRemaining();
|
||||
|
||||
c->Message(Chat::White, fmt::format(
|
||||
"expedition id: [{}] dz id: [{}] name: [{}] leader: [{}] {}: [{}]:[{}]:[{}]:[{}] members: [{}] remaining: [{:02}:{:02}:{:02}]",
|
||||
expedition->GetID(),
|
||||
expedition->GetDynamicZoneID(),
|
||||
expedition->GetDynamicZone().GetID(),
|
||||
expedition->GetName(),
|
||||
leader_saylink,
|
||||
zone_saylink,
|
||||
ZoneName(expedition->GetDynamicZone().GetZoneID()),
|
||||
expedition->GetDynamicZone().GetZoneID(),
|
||||
expedition->GetInstanceID(),
|
||||
expedition->GetDynamicZone().GetInstanceID(),
|
||||
expedition->GetDynamicZone().GetZoneVersion(),
|
||||
expedition->GetMemberCount(),
|
||||
seconds / 3600, // hours
|
||||
|
||||
Reference in New Issue
Block a user