Skip to content

Commit

Permalink
Merge pull request #6211 from Xaver-DaRed/craft-container-clean
Browse files Browse the repository at this point in the history
[Synth] Clean craft container after synth finishes
  • Loading branch information
claywar authored Sep 3, 2024
2 parents 8e17a5d + dcd61b0 commit 38e60f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/map/packet_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6807,7 +6807,7 @@ void SmallPacket0x0EA(map_session_data_t* const PSession, CCharEntity* const PCh
TracyZoneScoped;

// Prevent sitting while crafting.
if (PChar->CraftContainer->getItemsCount() > 0 && PChar->animation == ANIMATION_SYNTH)
if (PChar->animation == ANIMATION_SYNTH || (PChar->CraftContainer && PChar->CraftContainer->getItemsCount() > 0))
{
return;
}
Expand Down
1 change: 1 addition & 0 deletions src/map/utils/synthutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ namespace synthutils
{
doSynthResult(PChar);

PChar->CraftContainer->Clean();
PChar->animation = ANIMATION_NONE;
PChar->updatemask |= UPDATE_HP;
PChar->pushPacket(new CCharUpdatePacket(PChar));
Expand Down

0 comments on commit 38e60f3

Please sign in to comment.