Merge pull request 'fix: player-anchored events never got zone-specific resources' (#6) from fix/player-anchored-site-missing-zone-resources into main
Reviewed-on: #6
This commit is contained in:
commit
fa79526eb6
1 changed files with 23 additions and 1 deletions
|
|
@ -487,7 +487,29 @@ private:
|
||||||
if (!IsEligibleAnchor(player))
|
if (!IsEligibleAnchor(player))
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
return BuildSiteFromAnchor(player);
|
GoldRushSite site = BuildSiteFromAnchor(player);
|
||||||
|
|
||||||
|
// BuildSiteFromAnchor only knows the player's live zone/area IDs -- it has
|
||||||
|
// no access to the per-zone NodeEntries/BonusEntries parsed from
|
||||||
|
// GoldRush.ZonePool into _sites. SelectSiteForPlayer() tries a player
|
||||||
|
// anchor FIRST and only falls back to picking randomly from _sites when no
|
||||||
|
// eligible player is available, so without this lookup, the common case
|
||||||
|
// (a live player standing in a configured zone) silently lost its
|
||||||
|
// zone-specific resources and fell back to the global pool every time --
|
||||||
|
// exactly the bug reported after the v2 zone-resources feature shipped:
|
||||||
|
// events kept spawning the default Northrend-flavored global pool
|
||||||
|
// regardless of which zone they were actually anchored in.
|
||||||
|
for (GoldRushSite const& configured : _sites)
|
||||||
|
{
|
||||||
|
if (configured.ZoneId == site.ZoneId)
|
||||||
|
{
|
||||||
|
site.NodeEntries = configured.NodeEntries;
|
||||||
|
site.BonusEntries = configured.BonusEntries;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return site;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<GoldRushSite> BuildSites(std::string const& zones) const
|
std::vector<GoldRushSite> BuildSites(std::string const& zones) const
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue