Repository navigation
Core/Player: Use the saved zone when loading the inventory - #500
Merged
Ovahlord merged 1 commit intoOct 16, 2026
Conversation
Items limited to a zone (AreaID) were deleted on login, because the zone was still 0 while the inventory is loaded.
Member
|
Will test and merge later when I find the time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Core/Player: Use the saved zone when loading the inventory
Problem
Items that are limited to a zone (
AreaIDinItemSparse) were deletedon every login. For example item 46856 (Keys to the Hot Rod,
AreaID4737 Kezan) was gone after each relog, although the character was
standing in Kezan.
log showed:
The value in brackets is the zone, and it was 0.
_LoadInventorytakesit from
GetZoneId(), which is only set once the player is placed inthe world, and that is after the inventory is loaded. So every item with
an
AreaIDfails theIsLimitedToAnotherMapOrZonecheck.Fix
Set
m_zoneIdfrom thezonecolumn of the characters table before_LoadInventory. The zone is updated again when the player is added tothe map.