Konunun çözümleri gerçekten dağınıktı ve inceleyip bulmam ciddi vaktimi aldı. Forumdan çoğu konuda yararlandığım için ufak bir rehberle katkıda bulunmak istedim.
Öncelikle
Kullanmanız gereken dosya yolu hemen hemen şu şekilde olacak:
pack/
uishop.py
NPC ye sürükleyerek satmayı düzeltir.
Arat:
def SellAttachedItem(self):
İçerisinde Bul:
if (player.SLOT_TYPE_INVENTORY == attachedSlotType
Değiştir:
if (
player.SLOT_TYPE_INVENTORY == attachedSlotType or
player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType or
player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or
player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or
player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType or
player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or
player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or
player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType
):
uiinventory.py
def SelectItemSlot(self, itemSlotIndex): içerisinde bulunan app.SELL kısmını düzenleyerek NPC den iteme tıklayarak satmayı ayarlayabilirsiniz.
Client/UserInterface
PythonNetworkStream.h
Arat: bool SendShopSellPacketNew
Değiştir: bool SendShopSellPacketNew(WORD bySlot, BYTE byCount);
PythonNetworkStreamPhaseGameItem.cpp
Arat: bool CPythonNetworkStream::SendShopSellPacketNew
Değiştir: bool CPythonNetworkStream::SendShopSellPacketNew(WORD bySlot, BYTE byCount)
Aynı fonksiyon içerisinde bySlot olan if bloğunun içi WORD olacak: if (!Send(sizeof(WORD), &bySlot))
Server/
shop_manager.cpp
Arat: void CShopManager::Sell
Değiştir: void CShopManager::Sell(LPCHARACTER ch, WORD bCell, BYTE bCount)
shop_manager.h
Arat: void Sell
Değiştir: void Sell(LPCHARACTER ch, WORD bCell, BYTE bCount=0);
input_main.cpp
Arat: case SHOP_SUBHEADER_CG_SELL2:
İçini Komple Değiş:
if (uiBytes < sizeof(WORD) + sizeof(BYTE))
return -1;
WORD pos = *reinterpret_cast<const WORD*>(c_pData);
BYTE count = *(c_pData + sizeof(WORD));
sys_log(0, "INPUT: %s SHOP: SELL2", ch->GetName());
CShopManager::instance().Sell(ch, pos, count);
return sizeof(WORD) + sizeof(BYTE);
Server ve Client build alıp, packi tekrardan kapadıktan sonra Satıcıya gidip tekrar deneyebilirsiniz.
Öncelikle
Linkleri görebilmek için
giriş yap veya kayıt ol.
sistemini başarıyla kurmuş olmanız gerekiyor ki bu da biraz zahmetli.Kullanmanız gereken dosya yolu hemen hemen şu şekilde olacak:
pack/
uishop.py
NPC ye sürükleyerek satmayı düzeltir.
Arat:
def SellAttachedItem(self):
İçerisinde Bul:
if (player.SLOT_TYPE_INVENTORY == attachedSlotType
Değiştir:
if (
player.SLOT_TYPE_INVENTORY == attachedSlotType or
player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType or
player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or
player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or
player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType or
player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or
player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or
player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType
):
uiinventory.py
def SelectItemSlot(self, itemSlotIndex): içerisinde bulunan app.SELL kısmını düzenleyerek NPC den iteme tıklayarak satmayı ayarlayabilirsiniz.
Client/UserInterface
PythonNetworkStream.h
Arat: bool SendShopSellPacketNew
Değiştir: bool SendShopSellPacketNew(WORD bySlot, BYTE byCount);
PythonNetworkStreamPhaseGameItem.cpp
Arat: bool CPythonNetworkStream::SendShopSellPacketNew
Değiştir: bool CPythonNetworkStream::SendShopSellPacketNew(WORD bySlot, BYTE byCount)
Aynı fonksiyon içerisinde bySlot olan if bloğunun içi WORD olacak: if (!Send(sizeof(WORD), &bySlot))
Server/
shop_manager.cpp
Arat: void CShopManager::Sell
Değiştir: void CShopManager::Sell(LPCHARACTER ch, WORD bCell, BYTE bCount)
shop_manager.h
Arat: void Sell
Değiştir: void Sell(LPCHARACTER ch, WORD bCell, BYTE bCount=0);
input_main.cpp
Arat: case SHOP_SUBHEADER_CG_SELL2:
İçini Komple Değiş:
if (uiBytes < sizeof(WORD) + sizeof(BYTE))
return -1;
WORD pos = *reinterpret_cast<const WORD*>(c_pData);
BYTE count = *(c_pData + sizeof(WORD));
sys_log(0, "INPUT: %s SHOP: SELL2", ch->GetName());
CShopManager::instance().Sell(ch, pos, count);
return sizeof(WORD) + sizeof(BYTE);
Server ve Client build alıp, packi tekrardan kapadıktan sonra Satıcıya gidip tekrar deneyebilirsiniz.