Skip to content

Conversation

Erza
Copy link
Contributor

@Erza Erza commented Jan 31, 2022

…d into another stack

Pull Request Prelude

Changes Proposed

Followup to #3916
A crash would occur when moving, for example, a stack of a single gold coin into another stack of gold coins.
The crash would only occur when the last item of a stack was being moved, aka. the stack being destroyed.

Old output of this scenario:

New output of this scenario:

==========================
=== Player:onItemMoved ===
==========================
{
    ["toCylinder"] = userdata: 0x06b4fc80,
    ["fromCylinder"] = userdata: 0x06b4fc58,
    ["count"] = 5,
    ["toPosition"] = {
        ["y"] = 64,
        ["x"] = 65535,
        ["z"] = 0,
        ["stackpos"] = 0
    },
    ["item"] = {
        ["type"] = 100,
        ["itemid"] = 2148,
        ["uid"] = 65544,
        ["actionid"] = 0
    },
    ["fromPosition"] = {
        ["y"] = 66,
        ["x"] = 65535,
        ["z"] = 1,
        ["stackpos"] = 0
    }
}
==========================

Issues addressed:

@ghost ghost requested review from a team January 31, 2022 08:05
@ghost ghost added the bugfix label Jan 31, 2022
Copy link
Member

@Znote Znote left a comment

Choose a reason for hiding this comment

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

Reproduced crash:
itemcrash1

Applied this PR, crash fixed:
itemcrash2

Ohh yeah, I'm rocking OTClient with Protocol 12 😎

@Znote Znote merged commit b238500 into otland:master Jan 31, 2022
Znote pushed a commit to Znote/forgottenserver that referenced this pull request Feb 23, 2022
…d into another stack (otland#3918)

A crash would occur when moving, for example, a stack of a single gold coin into another stack of gold coins.
The crash would only occur when the last item of a stack was being moved, aka. the stack being destroyed.
DSpeichert pushed a commit that referenced this pull request May 9, 2022
…d into another stack (#3918)

A crash would occur when moving, for example, a stack of a single gold coin into another stack of gold coins.
The crash would only occur when the last item of a stack was being moved, aka. the stack being destroyed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants