wq fix
This commit is contained in:
@@ -154,10 +154,14 @@ void WorldQuestMgr::Update(uint32 diff)
|
||||
void WorldQuestMgr::FillActiveWorldQuests(std::vector<WorldPackets::Quest::WorldQuestUpdateInfo>& updates) const
|
||||
{
|
||||
updates.reserve(updates.size() + _active.size());
|
||||
time_t const now = GameTime::GetGameTime();
|
||||
for (auto const& [questId, active] : _active)
|
||||
{
|
||||
// Timer is the full active duration; the client derives remaining time from LastUpdate + Timer.
|
||||
updates.emplace_back(active.StartTime, active.QuestID,
|
||||
uint32(active.EndTime - active.StartTime), active.VariableID, active.Value);
|
||||
// Retail contract: the client derives remaining time from LastUpdate + Timer, so Timer must be
|
||||
// the REMAINING time (EndTime - now), not the full active duration. Sending EndTime - StartTime
|
||||
// pins the client countdown at full forever; the quest never visibly ticks toward expiry and
|
||||
// this file's own comment on SMSG_WORLD_QUEST_UPDATE_RESPONSE explicitly says the opposite.
|
||||
uint32 remaining = active.EndTime > now ? uint32(active.EndTime - now) : 0;
|
||||
updates.emplace_back(active.StartTime, active.QuestID, remaining, active.VariableID, active.Value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user