Skip to content

Commit

Permalink
fix: convergence fusion
Browse files Browse the repository at this point in the history
  • Loading branch information
murilo09 committed Aug 24, 2024
1 parent 65c58b0 commit a340f1b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5363,7 +5363,8 @@ void ProtocolGame::sendForgingData() {
void ProtocolGame::sendOpenForge() {
// We will use it when sending the bytes to send the item information to the client
std::map<uint16_t, std::map<uint8_t, uint16_t>> fusionItemsMap;
std::map<int32_t, std::map<uint16_t, std::map<uint8_t, uint16_t>>> convergenceItemsMap;
std::map<int32_t, std::map<uint16_t, std::map<uint8_t, uint16_t>>> convergenceFusionItemsMap;
std::map<int32_t, std::map<uint16_t, std::map<uint8_t, uint16_t>>> convergenceTransferItemsMap;
std::map<uint16_t, std::map<uint8_t, uint16_t>> donorTierItemMap;
std::map<uint16_t, std::map<uint8_t, uint16_t>> receiveTierItemMap;

Expand Down Expand Up @@ -5398,7 +5399,8 @@ void ProtocolGame::sendOpenForge() {
getForgeInfoMap(item, receiveTierItemMap);
}
if (itemClassification == 4) {
getForgeInfoMap(item, convergenceItemsMap[item->getClassification()]);
getForgeInfoMap(item, convergenceFusionItemsMap[item->getSlotPosition()]);
getForgeInfoMap(item, convergenceTransferItemsMap[item->getClassification()]);
}
}
}
Expand Down Expand Up @@ -5445,7 +5447,7 @@ void ProtocolGame::sendOpenForge() {
1 byte: tier
2 bytes: count
*/
for (const auto &[slot, itemMap] : convergenceItemsMap) {
for (const auto &[slot, itemMap] : convergenceFusionItemsMap) {
uint8_t totalItemsCount = 0;
auto totalItemsCountPosition = msg.getBufferPosition();
msg.skipBytes(1); // Total items count
Expand Down Expand Up @@ -5533,7 +5535,7 @@ void ProtocolGame::sendOpenForge() {
2 bytes: item id
2 bytes: count
*/
for (const auto &[slot, itemMap] : convergenceItemsMap) {
for (const auto &[slot, itemMap] : convergenceTransferItemsMap) {
uint16_t donorCount = 0;
uint16_t receiverCount = 0;
auto donorCountPosition = msg.getBufferPosition();
Expand Down

0 comments on commit a340f1b

Please sign in to comment.