Razuning üzerine kurulu ikarus burada ekleyen eleman won sistemini tam ekleyememiş sadece onu düzeltmeniz lazım
@CuRSED__
@Razuning
Razu V4 ikarus
Hazır Libconfig++
pack icon_sub hatası için indir root içine at
Buildle uğraşmak istemeyenler için derlenmiş dosyalar içinde not ekli
Akşam müsait olduğum için shopu ekledim ve gözüme çarpan sorunların çözümlerini burda paylaşıcam @CuRSED__ yorumumu konuya ekle ki hata alan insanlar için çözüm olsun.
![]()
(Dipnot: Legendy V2 Files üzerine eklenmiştir buton basmama, butonlara tıklanmama gibi saçma hatalar söz konusu değildir.)
(Dipnot 2: Files elimde mevcut değildir arkadaşım için ekledim özelden bana şu dosyayı atsana gibi mesajlar atmayın cevap vermeyeceğim.)
newofflineshop.h:arat [HASH=1]#define[/HASH] CASESEND(var) case var: ch->ChatInfoTrans((#var)); break; değiştir [HASH=2]#ifdef[/HASH] __ENABLE_MULTILANGUAGE__ [HASH=1]#define[/HASH] CASESEND(var) case var: ch->ChatPacket(CHAT_TYPE_INFO, [HASH=26033]#var[/HASH]); break; [HASH=2311]#else[/HASH] [HASH=1]#define[/HASH] CASESEND(var) case var: ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT(#var)); break; [HASH=3]#endif[/HASH]
cmd_gm.cpp:arat [HASH=2]#ifdef[/HASH] __ENABLE_NEW_OFFLINESHOP__ std::string GetNewShopName(const std::string& oldname, const std::string& newname) { auto nameindex = oldname.find('@'); if (nameindex == std::string::npos) { return newname; } else { auto playername = oldname.substr(0, nameindex); return playername + '@' + newname; } } ACMD(do_offshop_change_shop_name) { char arg1[50]; char arg2[256]; argument = one_argument(argument, arg1, sizeof(arg1)); argument = one_argument(argument, arg2, sizeof(arg2)); if (arg1[0] != 0 && isdigit(arg1[0]) && arg2[0] != 0) { DWORD id = 0; str_to_number(id, arg1); if (id == 0) { ch->ChatInfoTrans(("syntax: offshop_change_shop_name <player-id> <new-name>")); return; } else { offlineshop::CShop* pkShop = offlineshop::GetManager().GetShopByOwnerID(id); if (!pkShop) { ch->ChatInfoTrans(("Cannot find shop by id %u "), id); return; } else { std::string oldname = pkShop->GetName(); offlineshop::GetManager().SendShopChangeNameDBPacket(id, GetNewShopName(oldname, arg2).c_str()); ch->ChatInfoTrans(("shop's name changed.")); } } } else { ch->ChatInfoTrans(("syntax: offshop_change_shop_name <player-id> <new-name>")); return; } } ACMD(do_offshop_force_close_shop) { char arg1[50]; argument = one_argument(argument, arg1, sizeof(arg1)); if (arg1[0] != 0 && isdigit(arg1[0])) { DWORD id = 0; str_to_number(id, arg1); if (id == 0) { ch->ChatInfoTrans(("syntax: offshop_force_close_shop <player-id>")); return; } else { offlineshop::CShop* pkShop = offlineshop::GetManager().GetShopByOwnerID(id); if (!pkShop) { ch->ChatInfoTrans(("Cannot find shop by id %u"), id); return; } else { offlineshop::GetManager().SendShopForceCloseDBPacket(id); ch->ChatInfoTrans(("shop closed successfully.")); } } } else { ch->ChatInfoTrans(("syntax: offshop_force_close_shop <player-id>")); return; } } [HASH=3]#endif[/HASH] komple değiştir [HASH=2]#ifdef[/HASH] __ENABLE_NEW_OFFLINESHOP__ std::string GetNewShopName(const std::string& oldname, const std::string& newname) { auto nameindex = oldname.find('@'); if (nameindex == std::string::npos) { return newname; } else { auto playername = oldname.substr(0, nameindex); return playername + '@' + newname; } } ACMD(do_offshop_change_shop_name) { char arg1[50]; char arg2[256]; argument = one_argument(argument, arg1, sizeof(arg1)); argument = one_argument(argument, arg2, sizeof(arg2)); if (arg1[0] != 0 && isdigit(arg1[0]) && arg2[0] != 0) { DWORD id = 0; str_to_number(id, arg1); if (id == 0) { ch->ChatPacket(CHAT_TYPE_INFO, "syntax : offshop_change_shop_name <player-id> <new-name> "); return; } else { offlineshop::CShop* pkShop = offlineshop::GetManager().GetShopByOwnerID(id); if (!pkShop) { ch->ChatPacket(CHAT_TYPE_INFO, "Cannot find shop by id %u ", id); return; } else { std::string oldname = pkShop->GetName(); offlineshop::GetManager().SendShopChangeNameDBPacket(id, GetNewShopName(oldname, arg2).c_str()); ch->ChatPacket(CHAT_TYPE_INFO, "shop's name changed."); } } } else { ch->ChatPacket(CHAT_TYPE_INFO , "syntax : offshop_change_shop_name <player-id> <new-name> "); return; } } ACMD(do_offshop_force_close_shop) { char arg1[50]; argument = one_argument(argument, arg1, sizeof(arg1)); if (arg1[0] != 0 && isdigit(arg1[0])) { DWORD id = 0; str_to_number(id, arg1); if (id == 0) { ch->ChatPacket(CHAT_TYPE_INFO, "syntax : offshop_force_close_shop <player-id> "); return; } else { offlineshop::CShop* pkShop = offlineshop::GetManager().GetShopByOwnerID(id); if (!pkShop) { ch->ChatPacket(CHAT_TYPE_INFO, "Cannot find shop by id %u ", id); return; } else { offlineshop::GetManager().SendShopForceCloseDBPacket(id); ch->ChatPacket(CHAT_TYPE_INFO, "shop closed successfully."); } } } else { ch->ChatPacket(CHAT_TYPE_INFO, "syntax : offshop_force_close_shop <player-id> "); return; } } [HASH=3]#endif[/HASH]
char.cpp:arat void CHARACTER::SetShopSafebox(offlineshop::CShopSafebox* pk) üstüne ekle bool CHARACTER::CanTakeInventoryItem(LPITEM item, TItemPos* cell) { int iEmpty = -1; if (item->IsDragonSoul()) { cell->window_type = DRAGON_SOUL_INVENTORY; cell->cell = iEmpty = GetEmptyDragonSoulInventory(item); } [HASH=2]#ifdef[/HASH] ENABLE_SPECIAL_INVENTORY else if (item->IsBook()) { cell->window_type = BOOK_INVENTORY; cell->cell = iEmpty = GetEmptyBookInventory(item->GetSize()); } else if (item->IsUpgradeItem()) { cell->window_type = UPGRADE_INVENTORY; cell->cell = iEmpty = GetEmptyUpgradeInventory(item->GetSize()); } else if (item->IsStone()) { cell->window_type = STONE_INVENTORY; cell->cell = iEmpty = GetEmptyStoneInventory(item->GetSize()); } else if (item->IsAttr()) { cell->window_type = ATTR_INVENTORY; cell->cell = iEmpty = GetEmptyAttrInventory(item->GetSize()); } else if (item->IsFlower()) { cell->window_type = FLOWER_INVENTORY; cell->cell = iEmpty = GetEmptyFlowerInventory(item->GetSize()); } else if (item->IsBlendS()) { cell->window_type = BLEND_INVENTORY; cell->cell = iEmpty = GetEmptyBlendInventory(item->GetSize()); } [HASH=3]#endif[/HASH] else { cell->window_type = INVENTORY; cell->cell = iEmpty = GetEmptyInventory(item->GetSize()); } return iEmpty != -1; }
char.h:arat bool IsLookingOfflineshopOfferList() { return m_bIsLookingOfflineshopOfferList; } altına ekle bool CanTakeInventoryItem(LPITEM item, TItemPos* pos);
service.h / commondefines.h:arat [HASH=1]#define[/HASH] ENABLE_NEW_OFFLINESHOP_LOGS değiştir //#define ENABLE_NEW_OFFLINESHOP_LOGS
new_offlineshop_manager.cpp:arat yang_max değiştir GOLD_MAX
new_offlineshop_manager.cpp:en üstten aşağı sırayla teker teker arat changegold değiştir ch->PointChange(POINT_GOLD, -pPrice->illYang); arat changegold değiştir ch->PointChange(POINT_GOLD, -offer.price.illYang); arat changegold değiştir ch->PointChange(POINT_GOLD, valutes.illYang); arat changegold değiştir ch->PointChange(POINT_GOLD, -price.illYang);
Tekrardan bir katkı için geldim. Bu sorun bizde de çıktı. Arkadaş official karakter ekranı üzerinden çözmüş ben daha farklı bir şekilde çözdüm. Eğer ekleme yapmadıysanız kendi uiofflineshop.py nizi benim verdiğim ile değiştirin ve yanında verdiğim dosyayı rootun içine atın. İtemlere tıklanmama satıştan kaldıramama satın alamama gibi problemler kalmayacaktır. @CuRSED__ dün ki ve şuan attığım yorumu konuya sabitler misin ? Boş gurur yapmanın alemi yok. Herkese kolay gelsin.
Link
V.T
KANITLAR
*****************************
Ekli dosyayı görüntüle 61083
Ekli dosyayı görüntüle 61084
Ekli dosyayı görüntüle 61085
Ekli dosyayı görüntüle 61086
If u have special_storage need to extended the CanTakeInventoryItem function.
Example:
C++:bool CHARACTER::CanTakeInventoryItem(LPITEM item, TItemPos* cell) { int iEmpty = -1; if (item->IsDragonSoul()) { cell->window_type = DRAGON_SOUL_INVENTORY; cell->cell = iEmpty = GetEmptyDragonSoulInventory(item->GetVnum(), item->GetSubType(), item->GetSize()); } else if (item->IsType()) // Need to rewrite IsType to Isbook and etc { cell->window_type = common/lenght.h_INVENTORY_TYPE; //look window_type at common/lenght.h cell->cell = IEmpty = char_item_cpp_search_GetEmpyfunction(item->GetVnum(), item->GetSubType(), item->GetSize()); //Need to modifiy char_item_cpp_search_GetEmpyfunction // You can find GetEmptyfunction at char_item.cpp } else { cell->window_type = INVENTORY; cell->cell = iEmpty = GetEmptyInventory(item->GetSize()); }