Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Housing PlotIndex support - addresses #218 in the develop branch #296

Open
wants to merge 1 commit into
base: game_rework
Choose a base branch
from

Conversation

myyanf
Copy link
Contributor

@myyanf myyanf commented Jul 4, 2020

As mentioned in the commit message, the known issues are:

  1. Currently requires the plotIndex database default to be set
    to 0 in order to properly set the plotIndex when placing on PlotIndex=0
    from the vendor.
  2. When placing in PlotIndex=0, the Y value in the database is not what you
    see in game. The position as placed in game does persist as expected across
    server loads so long as the plotIndex in the database is properly set to 0
    (see 1). If the plotIndex is set to Int.MaxValue instead of 0, the item will
    raise from its intended location after a server restart.

Copy link
Member

@kirmmin kirmmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@Rawaho, I would say we need to look into this worldPosition thing. I noticed this when working on decor entities. The Z and X and flipped locally, so calculating world positions from a local decor position requires you to take the localZ and use that in the worldX calculation. It's kinda crazy. It might help to have some sort of converter function rather than hacking code to flip things around (like the IsValidPlotForPosition method does, currently).

@Rawaho Rawaho added this to the Pull Request Cleanup milestone Jan 16, 2023
@Rawaho Rawaho changed the base branch from develop to game_rework July 27, 2023 00:46
the vendor. Also corrects the IsValidPlotForPosition location
calculation (Plot coordinates X,Z do not map to World coordinates X,Z),
and the final return value.
Known issues:
1) Currently requires the plotIndex database default to be set
to 0 in order to properly set the plotIndex when placing on PlotIndex=0
from the vendor.
2) When placing in PlotIndex=0, the Y value in the database is not what you
see in game. The position as placed in game does persist as expected across
server loads so long as the plotIndex in the database is properly set to 0
(see 1). If the plotIndex is set to Int.MaxValue instead of 0, the item will
raise from its indended location after a server restart.

Fixed comment typo.

Update IDecor interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants