Skip to content

Commit

Permalink
Clean craft container after synth finishes
Browse files Browse the repository at this point in the history
Co-authored-by: WinterSolstice8 <[email protected]>
  • Loading branch information
Xaver-DaRed and WinterSolstice8 committed Sep 3, 2024
1 parent 8e17a5d commit dcd61b0
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 dcd61b0

Please sign in to comment.