@@ -5595,14 +5595,23 @@ void ProtocolGame::parseForgeEnter(NetworkMessage &msg) {
5595
5595
}
5596
5596
5597
5597
// 0xBF -> 0 = fusion, 1 = transfer, 2 = dust to sliver, 3 = sliver to core, 4 = increase dust limit
5598
- auto actionType = static_cast <ForgeAction_t>(msg.getByte ());
5599
- bool convergence = msg.getByte ();
5600
- uint16_t firstItem = msg.get <uint16_t >();
5601
- uint8_t tier = msg.getByte ();
5602
- uint16_t secondItem = msg.get <uint16_t >();
5603
- bool usedCore = msg.getByte ();
5604
- bool reduceTierLoss = msg.getByte ();
5598
+ const auto actionType = static_cast <ForgeAction_t>(msg.getByte ());
5599
+
5600
+ bool convergence = false ;
5601
+ uint16_t firstItem = 0 ;
5602
+ uint8_t tier = 0 ;
5603
+ uint16_t secondItem = 0 ;
5604
+
5605
+ if (actionType == ForgeAction_t::FUSION || actionType == ForgeAction_t::TRANSFER) {
5606
+ convergence = msg.getByte ();
5607
+ firstItem = msg.get <uint16_t >();
5608
+ tier = msg.getByte ();
5609
+ secondItem = msg.get <uint16_t >();
5610
+ }
5611
+
5605
5612
if (actionType == ForgeAction_t::FUSION) {
5613
+ const bool usedCore = convergence ? false : msg.getByte ();
5614
+ const bool reduceTierLoss = convergence ? false : msg.getByte ();
5606
5615
g_game ().playerForgeFuseItems (player->getID (), actionType, firstItem, tier, secondItem, usedCore, reduceTierLoss, convergence);
5607
5616
} else if (actionType == ForgeAction_t::TRANSFER) {
5608
5617
g_game ().playerForgeTransferItemTier (player->getID (), actionType, firstItem, tier, secondItem, convergence);
0 commit comments