Ticaret item gelme fix + 6 sorun fix

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 72

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Kemer Envanter Sorunları Fix, 5x+ Envanter Sorunları Fix İtem taşma Sorunları fix. Dragon soul Fix.
Aşşağıdaki Kodları Uyguladığımızda Kısaca Neler yapmış olduk.
1. Kemer Envanterinde Kullanılmayan Slotlar Kullanıma Açıldı.
2. Kemer Envanterinde İtem var iken Kemer Değişmez veya Çıkmaz.
3. 5x 8x 9x 12x 15x 18x Envanterli Oyun yapılabilir hale getirildi.
4. Ticaret Yaparken İtem Taşma Sorunu Fixlendi.
5. Dragon soul Sistem yuvaları Düzenli hale geldi.
6. Aklıma gelmeyen Daha bir çok Slot Envanter sorunları Çözülecektir.

Aşşağıdaki Anlatımları Kesinlikle en az 5x Envanter kullananların eklemesi gerekir. 4 envanter Kullanıcılarının eklemesine gerek yoktur. Çünki 4 envanter ile sınırı Aşmıyorsunuz.

Asıl sorun Game'lerde BYTE ve 255 olarak yapılandırılması ve bunları UINT ve 1000 yaparak tüm sorunlara elveda diyeceğiz.

Şimdi Başlayalım

common/tables.h Açılır ve Aratılır
Code:
typedef struct SQuickslot{
BYTE type;
BYTE pos;
} TQuickslot;
Değiştirilir.
Code:
typedef struct SQuickslot{
BYTE type;
UINT pos;
} TQuickslot;
game/src/char.h Açılır ve Aratılır
Code:
BYTE bItemGrid[INVENTORY_AND_EQUIP_SLOT_MAX];
Değiştirilir
Code:
UINT bItemGrid[INVENTORY_AND_EQUIP_SLOT_MAX];
1.Aratılır
Code:
void SyncQuickslot(BYTE bType, BYTE bOldPos, BYTE bNewPos);
1.Değiştirilir
Code:
void SyncQuickslot(BYTE bType, UINT bOldPos, UINT bNewPos);
2.Aratılır
Code:
bool GetQuickslot(BYTE pos, TQuickslot ** ppSlot);
2.Değiştirilir
Code:
bool GetQuickslot(UINT pos, TQuickslot ** ppSlot);
3.Aratılır
Code:
bool SetQuickslot(BYTE pos, TQuickslot & rSlot);
3.Değiştirilir
Code:
bool SetQuickslot(UINT pos, TQuickslot & rSlot);
4.Aratılır
Code:
bool DelQuickslot(BYTE pos);
4.Değiştirilir
Code:
bool DelQuickslot(UINT pos);
5.Aratılır
Code:
bool SwapQuickslot(BYTE a, BYTE b);
5.Değiştirilir
Code:
bool SwapQuickslot(UINT a, UINT b);
6.Aratılır
Code:
void ChainQuickslotItem(LPITEM pItem, BYTE bType, BYTE bOldPos);
6.Değiştirilir
Code:
void ChainQuickslotItem(LPITEM pItem, BYTE bType, UINT bOldPos);
7.Aratılır
Code:
void SetWear(BYTE bCell, LPITEM item);
7.Değiştirilir
Code:
void SetWear(UINT bCell, LPITEM item);
8.Aratılır
Code:
LPITEM GetWear(BYTE bCell) const;
8.Değiştirilir
Code:
LPITEM GetWear(UINT bCell) const;
9.Aratılır
Code:
bool RefineInformation(BYTE bCell, BYTE bType, int iAdditionalCell = -1);
9.Değiştirilir
Code:
bool RefineInformation(UINT bCell, BYTE bType, int iAdditionalCell = -1);
10.Aratılır
Code:
bool SwapItem(BYTE bCell, BYTE bDestCell);
10.Değiştirilir
Code:
bool SwapItem(UINT bCell, UINT bDestCell);

game/src/char_battle.cpp Açılır ve Aratılır 2x defa Aratın
Code:
SyncQuickslot(QUICKSLOT_TYPE_ITEM, vec_bSlots, 255);
Değiştirilir 2x
Code:
SyncQuickslot(QUICKSLOT_TYPE_ITEM, vec_bSlots, 1000);
Aratılır 2x defa Aratın
Code:
SyncQuickslot(QUICKSLOT_TYPE_ITEM, WEAR_UNIQUE1, 255);
Değiştirilir 2x
Code:
SyncQuickslot(QUICKSLOT_TYPE_ITEM, WEAR_UNIQUE1, 1000);

game/src/char_item.cpp Açılır ve Aratılır
Code:
LPITEM CHARACTER::GetWear(BYTE bCell) const
Değiştirilir
Code:
LPITEM CHARACTER::GetWear(UINT bCell) const
1.Aratılır
Code:
void CHARACTER::SetWear(BYTE bCell, LPITEM item)
1.Değiştirilir
Code:
void CHARACTER::SetWear(UINT bCell, LPITEM item)
2.Aratılır
Code:
SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 255);
2.Değiştirilir
Code:
SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 1000);
3.Aratılır
Code:
BYTE bCell = Cell.cell;
3.Değiştirilir
Code:
UINT bCell = Cell.cell;
4.Aratılır 2x Aratılır
Code:
if (m_pointsInstant.bItemGrid[bCell] == iExceptionCell)
4.Değiştirilir 2x
Code:
if (m_pointsInstant.bItemGrid[bCell] == (UINT)iExceptionCell)
5.Aratılır 2x Aratılır
Code:
BYTE p = bCell + (5 * j);
5.Değiştirilir 2x
Code:
UINT p = bCell + (5 * j);
6.Aratılır 3x Aratılır
Code:
BYTE bCell = item->GetCell();
6.Değiştirilir 3x
Code:
UINT bCell = item->GetCell();
7.Aratılır
Code:
bool CHARACTER::RefineInformation(BYTE bCell, BYTE bType, int iAdditionalCell)
7.Değiştirilir
Code:
bool CHARACTER::RefineInformation(UINT bCell, BYTE bType, int iAdditionalCell)
8.Aratılır
Code:
SyncQuickslot(QUICKSLOT_TYPE_ITEM, Cell.cell, 255);
8.Değiştirilir
Code:
SyncQuickslot(QUICKSLOT_TYPE_ITEM, Cell.cell, 1000);
9.Aratılır
Code:
bool CHARACTER::SwapItem(BYTE bCell, BYTE bDestCell)
9.Değiştirilir
Code:
bool CHARACTER::SwapItem(UINT bCell, UINT bDestCell)
10.Aratılır
Code:
BYTE bEquipCell = item2->GetCell() - INVENTORY_MAX_NUM;
10.Değiştirilir
Code:
INT bEquipCell = item2->GetCell() - INVENTORY_MAX_NUM;
11.Aratılır
Code:
BYTE bInvenCell = item1->GetCell();
11.Değiştirilir
Code:
UINT bInvenCell = item1->GetCell();
12.Aratılır
Code:
BYTE bCell1 = item1->GetCell();
12.Değiştirilir
Code:
UINT bCell1 = item1->GetCell();
13.Aratılır
Code:
BYTE bCell2 = item2->GetCell();
13.Değiştirilir
Code:
UINT bCell2 = item2->GetCell();
14.Aratılır
Code:
BYTE bOldCell = item->GetCell();
14.Değiştirilir
Code:
UINT bOldCell = item->GetCell();

game/src/char_quickslot.cpp Açılır ve Aratılır
Code:
void CHARACTER::SyncQuickslot(BYTE bType, BYTE bOldPos, BYTE bNewPos)
Değiştirilir
Code:
void CHARACTER::SyncQuickslot(BYTE bType, UINT bOldPos, UINT bNewPos)
1.Aratılır
Code:
if (bNewPos == 255)
1.Değiştirilir
Code:
if (bNewPos == 1000)
2.Aratılır
Code:
bool CHARACTER::GetQuickslot(BYTE pos, TQuickslot ** ppSlot)
2.Değiştirilir
Code:
bool CHARACTER::GetQuickslot(UINT pos, TQuickslot ** ppSlot)
3.Aratılır
Code:
bool CHARACTER::SetQuickslot(BYTE pos, TQuickslot & rSlot)
3.Değiştirilir
Code:
bool CHARACTER::SetQuickslot(UINT pos, TQuickslot & rSlot)
4.Aratılır
Code:
bool CHARACTER::DelQuickslot(BYTE pos)
4.Değiştirilir
Code:
bool CHARACTER::DelQuickslot(UINT pos)
5.Aratılır
Code:
bool CHARACTER::SwapQuickslot(BYTE a, BYTE b)
5.Değiştirilir
Code:
bool CHARACTER::SwapQuickslot(UINT a, UINT b)
6.Aratılır
Code:
void CHARACTER::ChainQuickslotItem(LPITEM pItem, BYTE bType, BYTE bOldPos)
6.Değiştirilir
Code:
void CHARACTER::ChainQuickslotItem(LPITEM pItem, BYTE bType, UINT bOldPos)

game/src/cmd_general.cpp Açın ve Aratın
Code:
for (BYTE i=0; i<INVENTORY_MAX_NUM; ++i)
Değiştirin
Code:
for (UINT i=0; i<INVENTORY_MAX_NUM; ++i)
game/src/cmd_gm.cpp Açın ve Aratın
Code:
ch->SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 255);
Değiştirin
Code:
ch->SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 1000);
Aratılır 3x Aratın
Code:
BYTE cell = 0;
Değiştirin 3x
Code:
UINT cell = 0;

game/src/exchange.cpp Açın ve Aratın
Code:
m_pOwner->SyncQuickslot(QUICKSLOT_TYPE_ITEM, item->GetCell(), 255);
Değiştirin
Code:
m_pOwner->SyncQuickslot(QUICKSLOT_TYPE_ITEM, item->GetCell(), 1000);

game/src/fishing.cpp Açın ve Aratın 2x Aratın
Code:
BYTE bCell = rod->GetCell();
Değiştirin
Code:
UINT bCell = rod->GetCell();

game/src/input_main.cpp Açın ve Aratın
Code:
if (uiBytes < sizeof(BYTE) + sizeof(BYTE))
Değiştirin
Code:
if (uiBytes < sizeof(UINT) + sizeof(BYTE))
1.Aratın
Code:
BYTE pos = *(c_pData++);
BYTE count = *(c_pData);
1.Değiştirin
Code:
UINT pos = *reinterpret_cast<const UINT*>(c_pData++);
BYTE count = *(c_pData);
2.Aratın
Code:
CShopManager::instance().Sell(ch, pos, count);
return sizeof(BYTE) + sizeof(BYTE);
2.Değiştirin
Code:
CShopManager::instance().Sell(ch, pos, count);
return sizeof(UINT) + sizeof(BYTE);
3.Aratın
Code:
ch->SyncQuickslot(QUICKSLOT_TYPE_ITEM, p->ItemPos.cell, 255);
3.Değiştirin
Code:
ch->SyncQuickslot(QUICKSLOT_TYPE_ITEM, p->ItemPos.cell, 1000);

game/src/item.cpp Açın ve Aratın
Code:
pOwner->SyncQuickslot(QUICKSLOT_TYPE_ITEM, wCell, 255);
Değiştirin
Code:
pOwner->SyncQuickslot(QUICKSLOT_TYPE_ITEM, wCell, 1000);
1.Aratın
Code:
m_pOwner->SyncQuickslot(QUICKSLOT_TYPE_ITEM, m_wCell, 255);
1.Değiştirin
Code:
m_pOwner->SyncQuickslot(QUICKSLOT_TYPE_ITEM, m_wCell, 1000);
2.Aratın
Code:
bool CItem::EquipTo(LPCHARACTER ch, BYTE bWearCell)
2.Değiştirin
Code:
bool CItem::EquipTo(LPCHARACTER ch, UINT bWearCell)
game/src/item.h Açın ve Aratın
Code:
bool EquipTo(LPCHARACTER ch, BYTE bWearCell);
Değiştirin
Code:
bool EquipTo(LPCHARACTER ch, UINT bWearCell);

game/src/item_manager.cpp Açın ve Aratın
Code:
o->SyncQuickslot(QUICKSLOT_TYPE_ITEM, item->GetCell(), 255);
Değiştirin
Code:
o->SyncQuickslot(QUICKSLOT_TYPE_ITEM, item->GetCell(), 1000);

game/src/minig.cpp Açın ve 2x Aratın
Code:
BYTE bCell = rkOldPick.GetCell();
Değiştirin 2.x
Code:
UINT bCell = rkOldPick.GetCell();
game/src/packet.h Açın ve Aratın
Code:
typedef struct command_quickslot_add{
BYTE header;
BYTE pos;
TQuickslot slot;
Değiştirin
Code:
typedef struct command_quickslot_add{
BYTE header;
UINT pos;
TQuickslot slot;
1.Aratın
Code:
typedef struct command_quickslot_del{
BYTE header;
BYTE pos;
} TPacketCGQuickslotDel;
1.Değiştirin
Code:
typedef struct command_quickslot_del{
BYTE header;
UINT pos;
} TPacketCGQuickslotDel;
2.Aratın
Code:
typedef struct command_quickslot_swap{
BYTE header;
BYTE pos;
BYTE change_pos;
} TPacketCGQuickslotSwap;
2.Değiştirin
Code:
typedef struct command_quickslot_swap{
BYTE header;
UINT pos;
UINT change_pos;
} TPacketCGQuickslotSwap;
3.Aratın
Code:
typedef struct packet_item_del{
BYTE header;
BYTE pos;
} TPacketGCItemDel;
3.Değiştirin
Code:
typedef struct packet_item_del{
BYTE header;
UINT pos;
} TPacketGCItemDel;
4.Aratın
Code:
struct packet_quickslot_add{
BYTE header;
BYTE pos;
TQuickslot slot;
};
4.Değiştirin
Code:
struct packet_quickslot_add{
BYTE header;
UINT pos;
TQuickslot slot;
};
5.Aratın
Code:
struct packet_quickslot_del{
BYTE header;
BYTE pos;
};
5.Değiştirin
Code:
struct packet_quickslot_del{
BYTE header;
UINT pos;
};
6.Aratın
Code:
struct packet_quickslot_swap{
BYTE header;
BYTE pos;
BYTE pos_to;
};
6.Değiştirin
Code:
struct packet_quickslot_swap{
BYTE header;
UINT pos;
UINT pos_to;
};
7.Aratın
Code:
typedef struct SPacketCGRefine{
BYTE header;
BYTE pos;
BYTE type;
} TPacketCGRefine;
7.Değiştirin
Code:
typedef struct SPacketCGRefine{
BYTE header;
UINT pos;
BYTE type;
} TPacketCGRefine;
8.Aratın
Code:
typedef struct SPacketCGRequestRefineInfo{
BYTE header;
BYTE pos;
} TPacketCGRequestRefineInfo;
8.Değiştirin
Code:
typedef struct SPacketCGRequestRefineInfo{
BYTE header;
UINT pos;
} TPacketCGRequestRefineInfo;
9.Aratın
Code:
typedef struct SPacketGCRefineInformaion{
BYTE header;
BYTE type;
BYTE pos;
DWORD src_vnum;
DWORD result_vnum;
BYTE material_count;
9.Değiştirin
Code:
typedef struct SPacketGCRefineInformaion{
BYTE header;
BYTE type;
UINT pos;
DWORD src_vnum;
DWORD result_vnum;
BYTE material_count;

game/src/questlua_global.cpp Açın ve 2x Aratın
Code:
BYTE bCell = (BYTE) lua_tonumber(L,-1);
Değiştirin 2x
Code:
UINT bCell = lua_tonumber(L, -1);

game/src/questlua_item.cpp Açın ve Aratın
Code:
BYTE bCell = pItem->GetCell();
Değiştirin
Code:
UINT bCell = pItem->GetCell();
game/src/questlua_pc.cpp Açın ve Aratın
Code:
BYTE bCell = (BYTE)lua_tonumber(L, 1);
Değiştirin
Code:
UINT bCell = lua_tonumber(L, 1);
game/src/safebox.cpp Açın ve Aratın
Code:
LPITEM CSafebox::GetItem(BYTE bCell)
Değiştirin
Code:
LPITEM CSafebox::GetItem(INT bCell)
Aratın
Code:
bool CSafebox::MoveItem(BYTE bCell, BYTE bDestCell, BYTE count)
Değiştirin
Code:
bool CSafebox::MoveItem(INT bCell, INT bDestCell, BYTE count)

game/src/safebox.h Açın ve Aratın
Code:
bool MoveItem(BYTE bCell, BYTE bDestCell, BYTE count);
Değiştirin
Code:
bool MoveItem(INT bCell, INT bDestCell, BYTE count);
Aratın
Code:
LPITEM GetItem(BYTE bCell);
Değiştirin
Code:
LPITEM GetItem(INT bCell);

game/src/shop.cpp Açın ve Aratın
Code:
m_pkPC->SyncQuickslot(QUICKSLOT_TYPE_ITEM, item->GetCell(), 255);
Değiştirin
Code:
m_pkPC->SyncQuickslot(QUICKSLOT_TYPE_ITEM, item->GetCell(), 1000);

game/src/shop_manager.cpp Açın ve Aratın
Code:
void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount)
Değiştirin
Code:
void CShopManager::Sell(LPCHARACTER ch, UINT bCell, BYTE bCount)
game/src/shop_manager.h Açın ve Aratın
Code:
void Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount=0);
Değiştirin
Code:
void Sell(LPCHARACTER ch, UINT bCell, BYTE bCount = 0);

Game SRC'de İşimiz Bitti

Client Source:

Client/UserInterface/AbstractPlayer.h Açalım ve Aratalım
Code:
virtual void AddQuickSlot(int QuickslotIndex, char IconType, char IconPosition) = 0;
Değiştirin
Code:
virtual void AddQuickSlot(int QuickslotIndex, char IconType, INT IconPosition) = 0;
Client/UserInterface/GameType.h Açalım ve Aratalım
Code:
typedef struct SQuickSlot {
BYTE Type;
BYTE Position;
} TQuickSlot;
Değiştirin
Code:
typedef struct SQuickSlot {
BYTE Type;
UINT Position;
} TQuickSlot;

Client/UserInterface/Packet.h Açalım ve Aratalım
Code:
typedef struct command_quickslot_add{
BYTE header;
BYTE pos;
TQuickSlot slot;
}TPacketCGQuickSlotAdd;
Değiştirin
Code:
typedef struct command_quickslot_add{
BYTE header;
UINT pos;
TQuickSlot slot;
}TPacketCGQuickSlotAdd;
1.Aratın
Code:
typedef struct command_quickslot_del{
BYTE header;
BYTE pos;
}TPacketCGQuickSlotDel;
1.Değiştirin
Code:
typedef struct command_quickslot_del{
BYTE header;
UINT pos;
}TPacketCGQuickSlotDel;
2.Aratın
Code:
typedef struct command_quickslot_swap{
BYTE header;
BYTE pos;
BYTE change_pos;
}TPacketCGQuickSlotSwap;
2.Değiştirin
Code:
typedef struct command_quickslot_swap{
BYTE header;
UINT pos;
UINT change_pos;
}TPacketCGQuickSlotSwap;
3.Aratın
Code:
typedef struct SPacketCGRefine{
BYTE header;
BYTE pos;
BYTE type;
} TPacketCGRefine;
3.Değiştirin
Code:
typedef struct SPacketCGRefine{
BYTE header;
UINT pos;
BYTE type;
} TPacketCGRefine;
4.Aratın 2 defa var ise 2 sinide değiştirin
Code:
typedef struct packet_item_del{
BYTE header;
BYTE pos;
} TPacketGCItemDel;
4.Değiştirin kaç tane varsa
Code:
typedef struct packet_item_del{
BYTE header;
UINT pos;
} TPacketGCItemDel;
5.Aratın
Code:
typedef struct packet_quickslot_add{
BYTE header;
BYTE pos;
TQuickSlot slot;
} TPacketGCQuickSlotAdd;
5.Değiştirin
Code:
typedef struct packet_quickslot_add{
BYTE header;
UINT pos;
TQuickSlot slot;
} TPacketGCQuickSlotAdd;
6.Aratın
Code:
typedef struct packet_quickslot_del{
BYTE header;
BYTE pos;
} TPacketGCQuickSlotDel;
6.Değiştirin
Code:
typedef struct packet_quickslot_del{
BYTE header;
UINT pos;
} TPacketGCQuickSlotDel;
7.Aratın
Code:
typedef struct packet_quickslot_swap{
BYTE header;
BYTE pos;
BYTE change_pos;
} TPacketGCQuickSlotSwap;
7.Değiştirin
Code:
typedef struct packet_quickslot_swap{
BYTE header;
UINT pos;
UINT change_pos;
} TPacketGCQuickSlotSwap;
8.Aratın
Code:
typedef struct SPacketGCRefineInformation{
BYTE header;
BYTE pos;
TRefineTable refine_table;
} TPacketGCRefineInformation;
8.Değiştirin
Code:
typedef struct SPacketGCRefineInformation{
BYTE header;
UINT pos;
TRefineTable refine_table;
} TPacketGCRefineInformation;
9.Aratın
Code:
typedef struct SPacketGCRefineInformationNew{
BYTE header;
BYTE type;
BYTE pos;
TRefineTable refine_table;
} TPacketGCRefineInformationNew;
9.Değiştirin
Code:
typedef struct SPacketGCRefineInformationNew{
BYTE header;
BYTE type;
UINT pos;
TRefineTable refine_table;
} TPacketGCRefineInformationNew;

Client/UserInterface/PythonNetworkStream.h Açın ve Aratın
Code:
bool SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos);
Değiştirin
Code:
bool SendQuickSlotAddPacket(UINT wpos, BYTE type, UINT pos);
1.Aratın
Code:
bool SendQuickSlotDelPacket(BYTE wpos);
1.Değiştirin
Code:
bool SendQuickSlotDelPacket(UINT wpos);
2.Aratın
Code:
bool SendQuickSlotMovePacket(BYTE wpos, BYTE change_pos);
2.Değiştirin
Code:
bool SendQuickSlotMovePacket(UINT wpos, UINT change_pos);
3.Aratın
Code:
bool SendShopSellPacketNew(BYTE bySlot, BYTE byCount);
3.Değiştirin
Code:
bool SendShopSellPacketNew(UINT bySlot, BYTE byCount);
4.Aratın
Code:
bool SendRefinePacket(BYTE byPos, BYTE byType);
4.Değiştirin
Code:
bool SendRefinePacket(UINT byPos, BYTE byType);

Client/UserInterface/PythonNetworkStreamPhaseGame.cpp Açın ve Aratın
Code:
bool CPythonNetworkStream::SendRefinePacket(BYTE byPos, BYTE byType)
Değiştirin
Code:
bool CPythonNetworkStream::SendRefinePacket(UINT byPos, BYTE byType)
Client/UserInterface/PythonNetworkStreamPhaseGameItem.cpp Açın ve Aratın
Code:
bool CPythonNetworkStream::SendShopSellPacketNew(BYTE bySlot, BYTE byCount)
Değiştirin
Code:
bool CPythonNetworkStream::SendShopSellPacketNew(UINT bySlot, BYTE byCount)
Üstteki Değiştirdiğimiz Kodun Hemen Altındaki Kod Bloğunu Tamamen Alttaki kod ile Değiştirin
Code:
{ if (!__CanActMainInstance())
return true;

if (__IsEquipItemInSlot(pos))
{
if (CPythonExchange::Instance().isTrading())
{
if (pos.IsEquipCell() || change_pos.IsEquipCell())
{
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_AppendNotifyMessage", Py_BuildValue("(s)", "CANNOT_EQUIP_EXCHANGE"));
return true;
}
}


if (CPythonShop::Instance().IsOpen())
{
if (pos.IsEquipCell() || change_pos.IsEquipCell())
{
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_AppendNotifyMessage", Py_BuildValue("(s)", "CANNOT_EQUIP_SHOP"));
return true;
}
}


if (__IsPlayerAttacking())
return true;
}


__PlayInventoryItemDropSound(pos);


TPacketCGItemMove itemMovePacket;
itemMovePacket.header = HEADER_CG_ITEM_MOVE;
itemMovePacket.pos = pos;
itemMovePacket.change_pos = change_pos;
itemMovePacket.num = num;


if (!Send(sizeof(TPacketCGItemMove), &itemMovePacket))
{
Tracen("SendItemMovePacket Error");
return false;
}


return SendSequence();
}
Örnk Resim:




L1bkrZ.png


Aratın
Code:
bool CPythonNetworkStream::SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos)
Değiştirin
Code:
bool CPythonNetworkStream::SendQuickSlotAddPacket(UINT wpos, BYTE type, UINT pos)
Aratın
Code:
bool CPythonNetworkStream::SendQuickSlotDelPacket(BYTE pos)
Değiştirin
Code:
bool CPythonNetworkStream::SendQuickSlotDelPacket(UINT pos)
Aratın
Code:
bool CPythonNetworkStream::SendQuickSlotMovePacket(BYTE pos, BYTE change_pos)
Değiştirin
Code:
bool CPythonNetworkStream::SendQuickSlotMovePacket(UINT pos, UINT change_pos)
Client/UserInterface/PythonPlayer.cpp Açılır ve Aratılır
Code:
for (BYTE i = 0; i < QUICKSLOT_MAX_NUM; ++i)
Değiştirin
Code:
for (UINT i = 0; i < QUICKSLOT_MAX_NUM; ++i)
1.Aratın
Code:
rkNetStream.SendQuickSlotMovePacket((BYTE) dwGlobalSrcSlotIndex, (BYTE)dwGlobalDstSlotIndex);
1.Değiştirin
Code:
rkNetStream.SendQuickSlotMovePacket((UINT) dwGlobalSrcSlotIndex, (UINT)dwGlobalDstSlotIndex);
2.Aratın
Code:
rkNetStream.SendQuickSlotAddPacket((BYTE)dwGlobalS lotIndex, (BYTE)dwWndType, (BYTE)dwWndItemPos);
2.Değiştirin
Code:
rkNetStream.SendQuickSlotAddPacket((UINT)dwGlobalS lotIndex, (BYTE)dwWndType, (UINT)dwWndItemPos);
3.Aratın
Code:
rkNetStream.SendQuickSlotDelPacket((BYTE)dwGlobalS lotIndex);
3.Değiştirin
Code:
rkNetStream.SendQuickSlotDelPacket((UINT)dwGlobalS lotIndex);
4.Aratın
Code:
void CPythonPlayer::AddQuickSlot(int QuickSlotIndex, char IconType, char IconPosition)
4.Değiştirin
Code:
void CPythonPlayer::AddQuickSlot(int QuickSlotIndex, char IconType, INT IconPosition)


Client/UserInterface/PythonPlayer.h Açılır ve Aratılır
Code:
void AddQuickSlot(int QuickslotIndex, char IconType, char IconPosition);
Değiştirin
Code:
void AddQuickSlot(int QuickslotIndex, char IconType, INT IconPosition);

İşlem Bitmiştir.

Sorun yaşayanlar konu altında belirsinler.


Ticaret Item Gelme Fix + 6 Sorun Fix

Metin2 özel sunucularında karşılaşılan en yaygın sorunlardan birisi ticaret sırasında item gelmemesi veya itemlerin beklemeden kaybolmasıdır. Bu durum hem oyuncuların deneyimini olumsuz etkiler hem de sunucu sahiplerinin oyun dengesini korumasını zorlaştırır. Bu yazıda, ticaret item gelme hatasını ve diğer 6 yaygın hatayı nasıl düzelteceğinizi detaylıca ele alacağız.

Ticaret Sistemi Nedir?
Metin2'de ticaret sistemi iki oyuncunun item ve altın alışveriş yapabilmesini sağlar. Bu sistem, PvP sunucularında item takası, guild içi destek alışverişi gibi birçok önemli amaca hizmet eder. Ancak, bazı durumlarda sistem düzgün çalışmaz ve oyuncular beklenmedik davranışlarla karşılaşabilir.

Ticaret Item Gelme Hatası
Bu hata genellikle game core kısmında meydana gelen eksik ya da hatalı bir kontrol nedeniyle oluşur. Oyuncu bir itemi ticarete koyduğunda, sistem onun doğruluğunu ve geçerliliğini kontrol etmelidir. Eğer bu kontrol sağlanmazsa, item görünebilir ancak diğer oyuncuya geçmeyebilir.

Fix Uygulama Adımları:
1. game/src/char_item.cpp dosyasını açın.
2. void CHARACTER::PointChange(BYTE type, int iVal, bool bSend, int iDirect, bool bNotSave) fonksiyonunda, POINT_ITEM] ile ilgili kontrolleri güncelleyin.
3. trade.py dosyasında, item gönderme fonksiyonunu kontrol edin. Burada eksik olan bir refresh komutu olabilir.

Diğer 6 Yaygın Hata ve Çözümleri:

1. Item Takasında Duplicate (Çoğalma) Hatası[/BR]Bu hata genellikle db core tarafında item silme kontrolü eksikliğinden kaynaklanır. Item transferi sırasında, eski itemin silinip silinmediği kontrol edilmelidir. Bu kontrol yoksa, aynı item birden fazla kişiye geçebilir.

2. Ticaret Esnasında Sunucuya Yeni Bağlanan Oyuncular İçin Bilgi Yansımasının Olmaması[/BR]Bu durumda, packet gönderme fonksiyonları düzgün çalışmayabilir. Ticaret başlatıldığında tüm ilgili paketlerin diğer oyunculara gönderilmesi sağlanmalıdır.

3. Altın Transferinde Hata[/BR]Oyuncuların altınlarını doğru şekilde kontrol eden ve transfer eden fonksiyonlar eksikse, bu hata oluşur. Özellikle py root tarafında money değişkeni üzerinde yapılan işlemler gözden geçirilmelidir.

4. Ticaret İptal Edildiğinde Item Kaybı[/BR]Bazı durumlarda, kullanıcı ticareti iptal ettiğinde itemi geri alamayabilir. Bu genellikle inventory kontrolünde bir hata nedeniyle olur. İptal işlemi sırasında itemin eski slotuna dönmesi sağlanmalıdır.

5. Trade Window Görsel Hatası[/BR]Bu durum genellikle uiscript dosyalarında bir hata ile ilişkilidir. UI dosyaları doğru şekilde item verilerini göndermiyor olabilir. TradeDialog.py ve uiTrade.py dosyaları kontrol edilmelidir.

6. Sunucu Yeniden Başlatıldığında Trade Verilerinin Silinmesi[/BR]Sunucu yeniden başlatıldığında aktif olan trade verileri korunmuyorsa, bu veritabanı bağlantısı veya auth-server ile game-server arasındaki senkronizasyon eksikliğinden kaynaklanıyor olabilir.

Sonuç
Metin2 özel sunucularında ticaret sistemini düzgün çalıştırmak, hem oyuncu memnuniyetini artırır hem de sunucu sahiplerinin daha profesyonel bir yapı kurmasını sağlar. Bu makalede anlatılan adımlar sayesinde, yaygın olarak karşılaşılan 7 temel hatayı çözerek güçlü ve stabil bir game core yapısına ulaşabilirsiniz. Daha fazla bilgi ve sistem önerisi için Metin2Lobby sitesini takip etmeyi unutmayın.


Trade Item Not Appearing Fix + 6 Problem Fixes

One of the most common issues encountered in Metin2 private servers is items not appearing during trading or items disappearing unexpectedly. This situation negatively affects the player experience and makes it harder for server owners to maintain game balance. In this article, we will detail how to fix the trade item not appearing error and six other common errors.

What is the Trading System?
In Metin2, the trading system allows two players to exchange items and gold. This system serves important purposes such as item swapping in PvP servers, guild support exchanges, and more. However, sometimes the system does not function properly and players may encounter unexpected behaviors.

Trade Item Not Appearing Error
This error typically occurs due to a missing or incorrect check in the game core. When a player puts an item into trade, the system should validate its correctness and legitimacy. If this check is not performed, the item might appear but fail to transfer to the other player.

Steps to Apply the Fix:
1. Open game/src/char_item.cpp.
2. Update the checks related to POINT_ITEM within the void CHARACTER::PointChange(BYTE type, int iVal, bool bSend, int iDirect, bool bNotSave) function.
3. Check the item sending function in trade.py. There may be a missing refresh command here.

Six Other Common Issues and Their Solutions:

1. Item Duplication During Trade[/BR]This issue generally stems from missing item deletion checks in the db core. During item transfers, the system must verify that the old item has been deleted. Without this check, the same item can end up with multiple players.

2. Trade Information Not Reflecting to Players Who Reconnect During Trade[/BR]In this case, the packet sending functions may not work correctly. All relevant packets must be sent to all involved players when trading starts.

3. Gold Transfer Errors[/BR]If functions checking and transferring player gold are incomplete, this error occurs. Particularly, operations on the money variable in the py root should be reviewed carefully.

4. Item Loss When Trade Is Cancelled[/BR]Sometimes, when a user cancels a trade, they may not retrieve their item. This usually occurs due to an error in the inventory check. The item must return to its original slot upon cancellation.

5. Visual Error in Trade Window[/BR]This issue is often related to errors in the uiscript files. The UI files may not be sending item data correctly. Files like TradeDialog.py and uiTrade.py should be examined.

6. Trade Data Lost Upon Server Restart[/BR]If active trade data is lost upon server restart, it may be due to lack of synchronization between the auth-server and game-server or database connection issues.

Conclusion
Properly running the trading system in Metin2 private servers increases player satisfaction and helps server owners establish a more professional structure. With the steps outlined in this article, you can resolve seven common issues and achieve a robust and stable game core structure. For more information and system recommendations, do not forget to follow Metin2Lobby.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt