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

Monster Loot Dropping Position #8347

Merged
merged 6 commits into from
Jun 7, 2024
Merged

Monster Loot Dropping Position #8347

merged 6 commits into from
Jun 7, 2024

Conversation

Playtester
Copy link
Member

@Playtester Playtester commented May 20, 2024

  • Server Mode: Both

Description of Pull Request:

  • When a monster is killed, its first item will now always drop at the exact cell the monster was on
  • When a monster drops more than one item, the items will be deployed on 3 cells around the monster (looping): SE, W and N
  • Fixed item drop order (script-granted -> regular drops -> looted drops)
  • Fixed drop position of looted items (similar to regular drops but independent to it and starts north)
  • Fixed looted items showing special drop effects
  • Searching for a free cell to drop an item on now uses the official algorithm
  • When a monster drops an item, it will no longer drop on cells that are occupied by characters or pets
  • When a player drops an item, it will now drop in a 5x5 area around the player
  • Items dropped by players can now stack on the same cell unless the new "item_stacking" config is disabled
  • When an MVP drop drops to the floor because the player's inventory was full, it will now always drop on that player's cell
  • Fixes Item drop location when killing a monster #8345

- When a monster is killed, its first item will now always drop at the exact cell the monster was on
- When a monster drops more than one item, the items will be deployed on 3 cells around the monster (looping): SE, W and N
- Fixed monsters dropping items in reverse order
- Fixes #8345
- Fixed item drop order
- Fixed drop position of looted items
- Fixed looted items showing special drop effects
- Searching for a free cell to drop an item on now uses the official algorithm
- When a monster drops an item, it will no longer drop on cells that are occupied by characters or pets
- When a player drops an item, it will now drop in a 5x5 area around the player
- When an MVP drop drops to the floor because the player's inventory was full, it will now always drop on that player's cell

for (int16 i = -1; i <= 1; i++) {
for (int16 j = -1; j <= 1; j++) {
if (i || j)
Copy link
Contributor

Choose a reason for hiding this comment

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

Your range is -1, 0, and 1 so this check will skip i == 0 and j == 0, is that correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's the intention of this check. If both are 0, it would always result in the center cell rather than a cell between distmin and distmax.

src/map/map.cpp Outdated Show resolved Hide resolved
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
@Playtester Playtester merged commit ec9a5fa into master Jun 7, 2024
31 checks passed
@Playtester Playtester deleted the hotfix/issue8345 branch June 7, 2024 16:29
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.

Item drop location when killing a monster
2 participants