DeYaN. 29 Posted November 13, 2016 Share Posted November 13, 2016 Yeap , my players find a bug . In the past i solve that exploit with add item in shop offline with crafting/acce window open. But i never thought that this bug is working with first function of shopoffline "open a shop". So the exploit are : you add 2 acce for combination and before click ok , you open a offline shop with same acce, after the offlineshop it`s created, you click ok at window acce combination and if the combination is succesfull you win a acce with absorbtion and old 2 acce in shop offline :)) I try to make the function , from original: Spoiler LPOFFLINESHOP COfflineShopManager::CreateOfflineShop(LPCHARACTER npc, DWORD dwOwnerPID) { if (FindOfflineShop(npc->GetVID())) return NULL; } LPOFFLINESHOP pkOfflineShop = M2_NEW COfflineShop; pkOfflineShop->SetOfflineShopNPC(npc); m_map_pkOfflineShopByNPC.insert(TShopMap::value_type(npc->GetVID(), pkOfflineShop)); m_Map_pkOfflineShopByNPC2.insert(TOfflineShopMap::value_type(dwOwnerPID, npc->GetVID())); return pkOfflineShop; } in Spoiler LPOFFLINESHOP COfflineShopManager::CreateOfflineShop(LPCHARACTER ch, DWORD dwOwnerPID) { // verificari if (FindOfflineShop(ch->GetVID())) return NULL; if (!ch) return false; if ((ch->GetExchange() || ch->IsOpenSafebox() || ch->GetShopOwner()) || ch->IsCubeOpen() || ch->GetOfflineShopOwner() || ch->IsAcceOpen()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nu poti folosi aceasta optiune,ai fereastra magazinului offline deschisa!")); return false; } // LPOFFLINESHOP pkOfflineShop = M2_NEW COfflineShop; pkOfflineShop->SetOfflineShopNPC(ch); m_map_pkOfflineShopByNPC.insert(TShopMap::value_type(ch->GetVID(), pkOfflineShop)); m_Map_pkOfflineShopByNPC2.insert(TOfflineShopMap::value_type(dwOwnerPID, ch->GetVID())); return pkOfflineShop; } But is not working I copy that function from FIX of add item: Spoiler void COfflineShopManager::AddItem(LPCHARACTER ch, BYTE bDisplayPos, BYTE bPos, int iPrice) #endif { if (!ch) return; if ((ch->GetExchange() || ch->IsOpenSafebox() || ch->GetShopOwner()) || ch->IsCubeOpen() || ch->GetOfflineShopOwner() || ch->IsAcceOpen()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nu poti folosi aceasta optiune,ai fereastra magazinului offline deschisa!")); return; } 1 Link to comment Share on other sites More sharing options...
Premium Istny 79 Posted November 13, 2016 Premium Share Posted November 13, 2016 Is this the reason why some servers are now offline ? ^.^ Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1195 Posted November 13, 2016 Active+ Member Share Posted November 13, 2016 In input_main.cpp in function : int CInputMain::MyOfflineShop(LPCHARACTER ch, const char * c_pData, size_t uiBytes) add: if (ch->GetExchange() || ch->IsOpenSafebox() || ch->GetShopOwner() || ch->IsCubeOpen() || ch->GetOfflineShopOwner() || ch->IsAcceOpen()) { ch->ChatPacket(CHAT_TYPE_NOTICE, ("This nigga try to make a bug -> %s."), ch->GetName()); return (iExtraLen); } 1 Link to comment Share on other sites More sharing options...
DeYaN. 29 Posted November 14, 2016 Author Share Posted November 14, 2016 1 hour ago, Abel(Tiger) said: In input_main.cpp in function : int CInputMain::MyOfflineShop(LPCHARACTER ch, const char * c_pData, size_t uiBytes) add: if (ch->GetExchange() || ch->IsOpenSafebox() || ch->GetShopOwner() || ch->IsCubeOpen() || ch->GetOfflineShopOwner() || ch->IsAcceOpen()) { ch->ChatPacket(CHAT_TYPE_NOTICE, ("This nigga try to make a bug -> %s."), ch->GetName()); return (iExtraLen); } You are great , thank you ! I have that function but without "ch->IsAcceOpen" Link to comment Share on other sites More sharing options...
Endymion 319 Posted November 14, 2016 Share Posted November 14, 2016 16 hours ago, Istny said: Is this the reason why some servers are now offline ? ^.^ Nope. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now