Skip to content

Items are out of containers boundaries when dropping them into a container  #793

Open
@a1exp

Description

@a1exp

This is not reroducible with Orion (I guess it has additional client-side checks), but reprodicible with the default client.

First issue.
When you drop an item to a bag (just drop on a bag witout opening a bag), or create an item inside container (e.g. add gold to player with gold += 5000000 and check gold piles in the bank). Items may be out of container boundaries. See screenshot.
image

Second issue.
If you update TDATA3 and TDATA4 of containers then creating items via scripts (e.g. same test with gold += 5000000) will always place items at minX,minY. Seems like GetRandContainerLoc() is not called in such cases.

I fuess this function is bugged

void CItemContainer::ContentAdd( CItem *pItem, CPointMap pt, bool bForceNoStack, uchar gridIndex )
since it only calls GetRandContainerLoc() when initial coordinates are invalid (e.g. = 0 which is the case for TDATA3 and TDATA4 not initialized).

Fixing the first issue is more important, imo.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions