hasanmacit

dc: hasanmacit
Site yetkilisi
Moderatör
Premium Üye
Geliştirici
Yardımsever Üye
Mesaj
3.041
Çözümler
97
Beğeni
2.294
Puan
1.840
Ticaret Puanı
2
Selamlar değerli dostlarım. Forumumuzda böyle bir konu bulunmadığı için bu konuyu açmaya gerek duydum. Sistem sahip olduğunuz eşya sayısının maksimum sayısını arttırmaya yarıyor. Adımları dikkatli şekilde izleyin sıkıntı çıkmayacaktır. Fakat eklediğiniz sistemlere uyarlamazsanız aradaki geçişlerde sıkıntı yaşayabilirsiniz. Bu yüzden eklediğiniz sistemlere uyarlamayı unutmayın. Konuyu paylaşan Kastamonuluya ve Cengize teşekkürler.

Client Source:
Açın \UserInterface\AbstractPlayer.h


Aratın:
virtual void SetItemCount(TItemPos itemPos, BYTE byCount) = 0;
Değiştirin:
virtual void SetItemCount(TItemPos itemPos, short byCount) = 0;

*****************************************************************************************************************************

Açın \UserInterface\GameType.h


Dosya içerisinde aratın = packet_item

bu kodu aratın

BYTE count;

böyle değiştirin.

short count;

tekrar aynı dosya içerisinde aratın. packet_shop_item

bu kodu aratın

BYTE count;

böyle değiştirin.

short count;

*****************************************************************************************************************************

Açın \UserInterface\Packet.h


Dosya içerisinde command_item_drop2

bu kodu aratın

BYTE count;

böyle değiştirin.

short count;

tekrar aynı dosya içerisinde aratın command_item_move

bu kodu aratın

BYTE num;

böyle değiştirin.

short num;

tekrar aynı dosya içerisinde aratın command_shop

bu kodu aratın

BYTE subheader;

böyle değiştirin.

short subheader;

tekrar aynı dosya içerisinde aratın command_give_item

bu kodu aratın

BYTE byItemCount;

böyle değiştirin.

short byItemCount;

tekrar aynı dosya içerisinde aratın SShopItemTable

bu kodu aratın

BYTE count;

böyle değiştirin.

short count;

tekrar aynı dosya içerisinde aratın SPacketCGMyShop

bu kodu aratın

BYTE bCount;

böyle değiştirin.

short bCount;

tekrar aynı dosya içerisinde aratın TPacketGCItemDelDeprecate

bu kodu aratın

BYTE count;

böyle değiştirin.

short count;

tekrar aynı dosya içerisinde aratın 2 kez packet_set_item (TPacketGCItemSet)

bu kodu bulun 2 kez

BYTE count;

2 kez böyle değiştirin.

short count;

// eğer yukarda ki packet_set_item (TPacketGCItemSet) bulamassa
 sadece packet_set_item aratın //

tekrar aynı dosya içerisinde aratın packet_set_item2

bu kodu aratın

BYTE count;

böyle değiştirin.

short count;

tekrar aynı dosya içerisinde aratın packet_update_item

bu kodu aratın

BYTE count;

böyle değiştirin.

short count;

tekrar aynı dosya içerisinde aratın SRefineTable

bu kodu aratın

BYTE material_count;

böyle değiştirin.

short material_count;

tekrar aynı dosya içerisinde aratın SEquipmentItemSet

bu kodu aratın

BYTE count;

böyle değiştirin.

short count;

*****************************************************************************************************************************

Açın \UserInterface\PythonExchange.cpp


Aratın
void CPythonExchange::SetItemToTarget(DWORD pos, DWORD vnum, BYTE count)

Değiştirin
void CPythonExchange::SetItemToTarget(DWORD pos, DWORD vnum, short count)

Aratın
void CPythonExchange::SetItemToSelf(DWORD pos, DWORD vnum, BYTE count)

Değiştirin
void CPythonExchange::SetItemToSelf(DWORD pos, DWORD vnum, short count)

Aratın
BYTE CPythonExchange::GetItemCountFromTarget(BYTE pos)

Değiştirin
short CPythonExchange::GetItemCountFromTarget(BYTE pos)

Aratın
BYTE CPythonExchange::GetItemCountFromSelf(BYTE pos)

Değiştirin
short CPythonExchange::GetItemCountFromSelf(BYTE pos)

*****************************************************************************************************************************

Açın \UserInterface\PythonExchange.h


Aratın
BYTE item_count[EXCHANGE_ITEM_MAX_NUM];

Değiştirin
short item_count[EXCHANGE_ITEM_MAX_NUM];

Aratın
void SetItemToTarget(DWORD pos, DWORD vnum, BYTE count);
void SetItemToSelf(DWORD pos, DWORD vnum, BYTE count);

Değiştirin
void SetItemToTarget(DWORD pos, DWORD vnum, short count);
void SetItemToSelf(DWORD pos, DWORD vnum, short count);

Aratın
BYTE GetItemCountFromTarget(BYTE pos);
BYTE GetItemCountFromSelf(BYTE pos);

Değiştirin
short GetItemCountFromTarget(BYTE pos);
short GetItemCountFromSelf(BYTE pos);

*****************************************************************************************************************************

Açın \UserInterface\PythonNetworkStream.h


Aratın
bool SendItemMovePacket(TItemPos pos, TItemPos change_pos, BYTE num);

Değiştirin
bool SendItemMovePacket(TItemPos pos, TItemPos change_pos, short num);

Aratın
bool SendShopSellPacketNew(BYTE bySlot, BYTE byCount);

Değiştirin
bool SendShopSellPacketNew(BYTE bySlot, short byCount);

Aratın
bool SendSafeBoxItemMovePacket(BYTE bySourcePos, BYTE byTargetPos, BYTE byCount);

Değiştirin
bool SendSafeBoxItemMovePacket(BYTE bySourcePos, BYTE byTargetPos, short byCount);

*****************************************************************************************************************************

Açın \UserInterface\PythonNetworkStreamModule.cpp


Aratın
rkNetStream.SendItemMovePacket(Cell, ChangeCell, (BYTE) num);

Değiştirin
rkNetStream.SendItemMovePacket(Cell, ChangeCell, (short) num);

*****************************************************************************************************************************

Açın \UserInterface\PythonNetworkStreamPhaseGame.cpp


Aratın
CPythonExchange::Instance().SetItemToSelf(iSlotIndex, exchange_packet.arg1, (BYTE) exchange_packet.arg3);

Değiştirin
CPythonExchange::Instance().SetItemToSelf(iSlotIndex, exchange_packet.arg1, (short) exchange_packet.arg3);

Aratın
CPythonExchange::Instance().SetItemToTarget(iSlotIndex, exchange_packet.arg1, (BYTE) exchange_packet.arg3);

Değiştirin
CPythonExchange::Instance().SetItemToTarget(iSlotIndex, exchange_packet.arg1, (short) exchange_packet.arg3);

Aratın
CPythonExchange::Instance().DelItemOfSelf((BYTE) exchange_packet.arg1);

Değiştirin
CPythonExchange::Instance().DelItemOfSelf((short) exchange_packet.arg1);

Aratın
CPythonExchange::Instance().DelItemOfTarget((BYTE) exchange_packet.arg1);

Değiştirin
CPythonExchange::Instance().DelItemOfTarget((short) exchange_packet.arg1);

*****************************************************************************************************************************

Açın \UserInterface\PythonNetworkStreamPhaseGameItem.cpp


Aratın
bool CPythonNetworkStream::SendSafeBoxItemMovePacket(BYTE bySourcePos, BYTE byTargetPos, BYTE byCount)

Değiştirin
bool CPythonNetworkStream::SendSafeBoxItemMovePacket(BYTE bySourcePos, BYTE byTargetPos, short byCount)

Aratın
bool CPythonNetworkStream::SendShopSellPacketNew(BYTE bySlot, BYTE byCount)

Değiştirin
bool CPythonNetworkStream::SendShopSellPacketNew(BYTE bySlot, short byCount)

Aratın
if (!Send(sizeof(BYTE), &byCount))

Değiştirin
if (!Send(sizeof(short), &byCount))

Aratın
bool CPythonNetworkStream::SendItemMovePacket(TItemPos pos, TItemPos change_pos, BYTE num)

Değiştirin
bool CPythonNetworkStream::SendItemMovePacket(TItemPos pos, TItemPos change_pos, short num)

*****************************************************************************************************************************

Açın \UserInterface\PythonPlayer.cpp


Aratın
void CPythonPlayer::SetItemCount(TItemPos Cell, BYTE byCount)

Değiştirin
void CPythonPlayer::SetItemCount(TItemPos Cell, short byCount)

*****************************************************************************************************************************

Açın \UserInterface\PythonPlayer.h


Aratın
void SetItemCount(TItemPos Cell, BYTE byCount);

Değiştirin
void SetItemCount(TItemPos Cell, short byCount);

*****************************************************************************************************************************

Açın \UserInterface\PythonPlayerModule.cpp


Aratın 2 kere
BYTE bCount;

Değiştirin 2 kere
short bCount;

*****************************************************************************************************************************

Açın \ScriptLib\PythonUtils.cpp


Herhangi bir yere ekleyin

bool PyTuple_GetInteger(PyObject* poArgs, int pos, short* ret)
{
 int val;
 bool result = PyTuple_GetInteger(poArgs,pos,&val);
 *ret = short(val);
 return result;
}

*****************************************************************************************************************************

Açın \ScriptLib\PythonUtils.h


Herhangi bir yere ekleyin

bool PyTuple_GetInteger(PyObject* poArgs, int pos, short* ret);

*****************************************************************************************************************************

FİX OLARAK

shop_item.sql
`count` smallint(4)unsigned NOT NULL DEFAULT '1',

item.sql
`count` smallint(3)unsigned NOT NULL DEFAULT '0',

safebox.sql
`size` smallint(3)unsigned NOT NULL DEFAULT '0',

içlerini değiştirin.


Game Source:
Açın \common\item_length.h


Aratın
ITEM_MAX_COUNT = 200,

Değiştirin //istediğiniz kadar yapın// **OffShop olanlar en fazla 1000 yapsın** //Olmayanlar 1000000 kadar yapabilir//
ITEM_MAX_COUNT = 500,

*****************************************************************************************************************************

Açın \common\tables.h


bu kodu aratın SShopItemTable
BYTE count;

böyle değiştirin.
short count;

bu kodu aratın SShopTable
BYTE byItemCount;

böyle değiştirin.
short byItemCount;

bu kodu aratın SRefineTable
BYTE material_count;

böyle değiştirin.
short material_count;

*****************************************************************************************************************************

Açın \game\char.cpp


Aratın
void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE bItemCount)

Değiştirin
void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, short bItemCount)

Aratın
for (BYTE i = 0; i < bItemCount; ++i)

Değiştirin
for (short i = 0; i < bItemCount; ++i)

*****************************************************************************************************************************

Açın \game\char.h


Aratın
bool DropItem(TItemPos Cell, BYTE bCount=0);

Değiştirin
bool DropItem(TItemPos Cell, short bCount=0);

Aratın
bool MoveItem(TItemPos pos, TItemPos change_pos, BYTE num);

Değiştirin
bool MoveItem(TItemPos pos, TItemPos change_pos, short num);

Aratın
LPITEM AutoGiveItem(DWORD dwItemVnum, BYTE bCount=1, int iRarePct = -1, bool bMsg = true);
void AutoGiveItem(LPITEM item, bool longOwnerShip = false);

Değiştirin
LPITEM AutoGiveItem(DWORD dwItemVnum, short bCount=1, int iRarePct = -1, bool bMsg = true);
void AutoGiveItem(LPITEM item, bool longOwnerShip = false);

Aratın
void OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE bItemCount);

Değiştirin
void OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, short bItemCount);

*****************************************************************************************************************************

Açın \game\char_item.cpp


Aratın
bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount)

Değiştirin
bool CHARACTER::DropItem(TItemPos Cell, short bCount)

Aratın
bool CHARACTER::MoveItem(TItemPos Cell, TItemPos DestCell, BYTE count)

Değiştirin
bool CHARACTER::MoveItem(TItemPos Cell, TItemPos DestCell, short count)

Aratın
count = MIN(200 - item2->GetCount(), count);

Değiştirin
count = MIN(ITEM_MAX_COUNT - item2->GetCount(), count);

Aratın
BYTE bCount = item->GetCount();

Değiştirin
short bCount = item->GetCount();

Aratın
BYTE bCount2 = MIN(200 - item2->GetCount(), bCount);

Değiştirin
short bCount2 = MIN(ITEM_MAX_COUNT - item2->GetCount(), bCount);

Aratın
LPITEM CHARACTER::AutoGiveItem(DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg)

Değiştirin
LPITEM CHARACTER::AutoGiveItem(DWORD dwItemVnum, short bCount, int iRarePct, bool bMsg)

Aratın
BYTE bCount2 = MIN(200 - item->GetCount(), bCount);

Değiştirin
short bCount2 = MIN(ITEM_MAX_COUNT - item->GetCount(), bCount);

*****************************************************************************************************************************

Açın \game\input_main.cpp


Aratın
case SHOP_SUBHEADER_CG_SELL2:
 {
 if (uiBytes < sizeof(BYTE) + sizeof(BYTE))
 return -1;

 BYTE pos = *(c_pData++);
 BYTE count = *(c_pData);

 sys_log(0, "INPUT: %s SHOP: SELL2", ch->GetName());
 CShopManager::instance().Sell(ch, pos, count);
 return sizeof(BYTE) + sizeof(BYTE);
 }

Değiştirin
case SHOP_SUBHEADER_CG_SELL2:
 {
 if (uiBytes < sizeof(BYTE) + sizeof(short))
 return -1;

 BYTE pos = *(c_pData++);
 short count = *(c_pData);

 sys_log(0, "INPUT: %s SHOP: SELL2 pos: %d count: %d", ch->GetName(), pos, count);
 CShopManager::instance().Sell(ch, pos, count);
 return sizeof(BYTE) + sizeof(short);
 }

*****************************************************************************************************************************

Açın \game\item.cpp


Aratın
return MIN(m_dwCount, 200);

Değiştirin
return MIN(m_dwCount, ITEM_MAX_COUNT);

*****************************************************************************************************************************

Açın \game\OXEvent.cpp


Aratın
bool COXEventManager::GiveItemToAttender(DWORD dwItemVnum, BYTE count)

Değiştirin
bool COXEventManager::GiveItemToAttender(DWORD dwItemVnum, short count)

*****************************************************************************************************************************

Açın \game\OXEvent.h


Aratın
bool GiveItemToAttender(DWORD dwItemVnum, BYTE count);

Değiştirin
bool GiveItemToAttender(DWORD dwItemVnum, short count);

*****************************************************************************************************************************

Açın \game\packet.h


bu kodu aratın command_item_drop2
BYTE count;

böyle değiştirin.
short count;

bu kodu aratın command_item_move
BYTE count;

böyle değiştirin.
short count;

bu kodu aratın command_shop (TPacketCGShop)
BYTE subheader;

böyle değiştirin.
short subheader;

bu kodu aratın TPacketGCItemDelDeprecated
BYTE count;

böyle değiştirin.
short count;

bu kodu aratın packet_item_set
BYTE count;

böyle değiştirin.
short count;

bu kodu aratın packet_item_update
BYTE count;

böyle değiştirin.
short count;

bu kodu aratın packet_shop_item
BYTE count;

böyle değiştirin.
short count;

bu kodu aratın command_give_item
BYTE byItemCount;

böyle değiştirin.
short byItemCount;

bu kodu aratın SPacketCGMyShop
BYTE bCount;

böyle değiştirin.
short bCount;

bu kodu aratın SPacketGCRefineInformaion
BYTE material_count;

böyle değiştirin.
short material_count;

bu kodu aratın pakcet_view_equip
BYTE count;

böyle değiştirin.
short count;

*****************************************************************************************************************************

Açın \game\safebox.cpp


Aratın
bool CSafebox::MoveItem(BYTE bCell, BYTE bDestCell, BYTE count)

Değiştirin
bool CSafebox::MoveItem(BYTE bCell, BYTE bDestCell, short count)

Aratın
count = MIN(200 - item2->GetCount(), count);

Değiştirin
count = MIN(ITEM_MAX_COUNT - item2->GetCount(), count);

*****************************************************************************************************************************

Açın \game\safebox.h


Aratın
bool MoveItem(BYTE bCell, BYTE bDestCell, BYTE count);

Değiştirin
bool MoveItem(BYTE bCell, BYTE bDestCell, short count);

*****************************************************************************************************************************

Açın \game\shop.cpp


Aratın
BYTE bItemCount;

Değiştirin
short bItemCount;

Aratın
void CShop::SetShopItems(TShopItemTable * pTable, BYTE bItemCount)

Değiştirin
void CShop::SetShopItems(TShopItemTable * pTable, short bItemCount)

*****************************************************************************************************************************

Açın \game\shop.h


Aratın
BYTE count

Değiştirin
short count

Aratın
void SetShopItems(TShopItemTable * pItemTable, BYTE bItemCount);

Değiştirin
void SetShopItems(TShopItemTable * pItemTable, short bItemCount);

*****************************************************************************************************************************

Açın \game\shop_manager.cpp


Aratın
LPSHOP CShopManager::CreatePCShop(LPCHARACTER ch, TShopItemTable * pTable, BYTE bItemCount)

Değiştirin
LPSHOP CShopManager::CreatePCShop(LPCHARACTER ch, TShopItemTable * pTable, short bItemCount)

Aratın
void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount)

Değiştirin
void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, short bCount)

*****************************************************************************************************************************

Açın \game\shop_manager.h


Aratın
void Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount=0);

Değiştirin
void Sell(LPCHARACTER ch, BYTE bCell, short bCount=0);

Aratın
LPSHOP CreatePCShop(LPCHARACTER ch, TShopItemTable * pTable, BYTE bItemCount);

Değiştirin
LPSHOP CreatePCShop(LPCHARACTER ch, TShopItemTable * pTable, short bItemCount);

*****************************************************************************************************************************

FİX OLARAK

shop_item.sql
`count` smallint(4)unsigned NOT NULL DEFAULT '1',

item.sql
`count` smallint(3)unsigned NOT NULL DEFAULT '0',

safebox.sql
`size` smallint(3)unsigned NOT NULL DEFAULT '0',

içlerini değiştirin.


Ve 2018'den gelen bir kanıt :D

X6vyE5.png
 
paylaşım için teşekkürler short olduğu için en fazla 1m oluyo dimi long long yapsak ne olur 😂😂
 
Geri
Üst