Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Fix WCOIN DUPE BUG PERSONAL SHOP  (Visto 2079 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline zurect Posteado: January 01, 2025, 02:39:26 AM | Modificado: January 01, 2025, 03:39:19 AM by zurect

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 38
  • Gracias recibida: 520
  • sg
customstore.cpp

find

bool CCustomStore::OnPShopBuyItemRecv(PMSG_PSHOP_BUY_ITEM_RECV* lpMsg,int aIndex) // OK




void CCustomStore::OnPShopBuyItemCallbackRecv(LPOBJ lpObj,LPOBJ lpTarget,DWORD slot,DWORD WCoinC,DWORD WCoinP,DWORD GoblinPoint) // OK




User.cpp add this:



User.h




Credits:
Narvulkan A.k.a Raivis Petersons (RIP)


Gracias:

emersonx13, ScottLy, GoldSun, football, kendy93, victorrz17, Malkom99, xtestx, LuciferXT, laulinh2, MADRUGA, webmonkey, ์Nightz, Nexus, grensoxd, manhcps, Nakamura, muphantom, pokimon, Smudevelop, armamor, candyvl, frenzo2009, Callejero, Lude, lstuan, DjGamer, UrbaNDraft, beecubin, jeffzkie69, crssbahr, vantruong, b0n3v, kaisudo, Greenland, 331515194, DannielMM, merad, Darki12345, networks1, jovial, mrtin, ukvayha, dahouzi, Pecan, dario, zodiacddos, gega, LTP Team, artem, fengyun52894, hoangtammedia, calibur, Genius05, coolgepds, icaycuoc, ndhieu8x, crgas1234, euthanoisocial, Hoangtu34, ashlay, hungngok94, MIHARU, hoanmaster, Androjd123, kingteamus, wagnii, realman, Matt1995, RifleMaN_, luckystar, 153426, Crowley, superrin, tuananh92, distuber1, marucho, nhanphu200, trungpv, k33n00, ductruong1, dedek1, samsunggon, vcore30, NghienMU, truongtienhp, zerg24, ta6akus7, lehuuducmjnh, tcbaoanh, lucasvieira, m1sterio, 183358, ntcong295810, 2str0kE, ItSoEasy, andreyzz, 1732313, GX_KYO, whisky123, samsung13, mu2020, Rindy, anonymousgh, mauri64, iSh4dow, Domedica, bigrealtk92, chipcoidj, phuongcuongmsqm, pedornela, manfromvn, AnDeR, Ebraim, tutu100, Sweng, nelson, Powe11, wildriff66, KenZ, Peluuca, dizzys, jhoancito, Kosh, Mathi, Hiếu Đại Ca, comelon666, Denis Alves, SaintZeus, joaovithor1, kayito, nic269, komandirbk, vnshell, KhongGianOL, Cartman, Ryzenn, spartacus, vipgale01, mugloves99, mustx1, rodrigoo22, npt.formu, beibei, z348870672, Orion88, mundomuc, zhujianhui, c4nhsatcodong, pirazok, azard, chuckhai, HaPKoTuK, zhangjianle865, BPhamvn, kasah, Watuyusei, redf0x, jeferson, nhantac, dakosmu, quyanxu, hoangbon, mantios, korron, dangnhapnee, MMOTOP100

Offline jhoancito #1 Posteado: January 01, 2025, 12:39:04 PM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 360
  • Gracias recibida: 782
  • bo
no entiendo tengo que remplazar este codigo por el otro como es puedes esplicar





bool CCustomStore::OnPShopBuyItemRecv(PMSG_PSHOP_BUY_ITEM_RECV* lpMsg,int aIndex) // OK
{
   LPOBJ lpObj = &gObj[aIndex];

   if(gObjIsConnectedGP(aIndex) == 0)
   {
      return 1;
   }

   int bIndex = MAKE_NUMBERW(lpMsg->index[0],lpMsg->index[1]);

   if(gObjIsConnectedGP(bIndex) == 0)
   {
      return 1;
   }

   LPOBJ lpTarget = &gObj[bIndex];

   if(lpObj->PShopActiveIBuy == 1) //By Narvu ( Anti wCoins Dupe in PersonalShop CustomStore )
   {
      gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,"Process Stopped, avoid spaming when buying an items.");
      gNotice.GCNoticeSend(lpTarget->Index,1,0,0,0,0,0,"Character [%s] was spaming item buy in your store",lpObj->Name);
      gLog.Output(LOG_TRADE,"[SellPesonalShopItem Process Stopped ] Item Seller: [%s][%s] -> Item Buyer: [%s][%s] Detected that user was spaming item buy in store.",lpTarget->Account,lpTarget->Name,lpObj->Account,lpObj->Name);
      lpObj->PShopActiveIBuy = 0;
      return 1;
   }

   lpObj->PShopActiveIBuy = 1;

   if(lpTarget->PShopOpen == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,3);
      return 1;
   }

   if(lpTarget->PShopCustom == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      return 0;
   }

   if(lpTarget->PShopTransaction != 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,4);
      return 1;
   }

   if(INVENTORY_SHOP_RANGE(lpMsg->slot) == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,5);
      return 1;
   }

   gObjFixInventoryPointer(aIndex);

   if(lpObj->Transaction == 1)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,6);
      return 1;
   }

   char name[11] = {0};

   memcpy(name,lpMsg->name,sizeof(lpMsg->name));
   
   if(strcmp(name,lpTarget->Name) != 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,6);
      return 1;
   }

   if(lpTarget->Inventory[lpMsg->slot].IsItem() == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,6);
      return 1;
   }

   if(lpTarget->Inventory[lpMsg->slot].m_PShopValue <= 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,6);
      return 1;
   }

   #if(GAMESERVER_UPDATE>=501)

   if(lpTarget->PShopCustomType == 3 || lpTarget->PShopCustomType == 4 || lpTarget->PShopCustomType == 5)
   {
      gCashShop.GDCashShopRecievePointSend(aIndex,(DWORD)&CCustomStore::OnPShopBuyItemCallbackRecv,(DWORD)&gObj[bIndex],lpMsg->slot);
      lpObj->PShopActiveIBuy = 0;
      return 1;
   }

   #else

   if(lpTarget->PShopCustomType == 3 || lpTarget->PShopCustomType == 4 || lpTarget->PShopCustomType == 5)
   {
      gPcPoint.GDPcPointRecievePointSend(aIndex,(DWORD)&CCustomStore::OnPShopBuyItemCallbackRecv,(DWORD)&gObj[bIndex],lpMsg->slot);
      lpObj->PShopActiveIBuy = 0;
      return 1;
   }

   #endif

   int PShopJoBValue = ((lpTarget->PShopCustomType==0)?lpTarget->Inventory[lpMsg->slot].m_PShopValue:0);

   int PShopJoSValue = ((lpTarget->PShopCustomType==1)?lpTarget->Inventory[lpMsg->slot].m_PShopValue:0);

   int PShopJoCValue = ((lpTarget->PShopCustomType==2)?lpTarget->Inventory[lpMsg->slot].m_PShopValue:0);

   int RequireJewelCount[3] = {0};

   int PaymentJewelCount[3] = {0};

   int RequireJewelTable[3][4] = {0};

   int PaymentJewelTable[3][4] = {0};

   gPersonalShop.GetRequireJewelCount(lpObj,&RequireJewelCount[0],RequireJewelTable[0],0,PShopJoBValue);

   gPersonalShop.GetRequireJewelCount(lpObj,&RequireJewelCount[1],RequireJewelTable[1],1,PShopJoSValue);

   gPersonalShop.GetRequireJewelCount(lpObj,&RequireJewelCount[2],RequireJewelTable[2],2,PShopJoCValue);

   gPersonalShop.GetPaymentJewelCount(lpTarget,&PaymentJewelCount[0],PaymentJewelTable[0],0,PShopJoBValue);

   gPersonalShop.GetPaymentJewelCount(lpTarget,&PaymentJewelCount[1],PaymentJewelTable[1],1,PShopJoSValue);

   gPersonalShop.GetPaymentJewelCount(lpTarget,&PaymentJewelCount[2],PaymentJewelTable[2],2,PShopJoCValue);

   if(RequireJewelCount[0] < PShopJoBValue)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(RequireJewelCount[1] < PShopJoSValue)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(RequireJewelCount[2] < PShopJoCValue)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(PShopJoBValue > 0 && RequireJewelTable[0][0] == 0 && RequireJewelTable[0][1] == 0 && RequireJewelTable[0][2] == 0 && RequireJewelTable[0][3] == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(PShopJoSValue > 0 && RequireJewelTable[1][0] == 0 && RequireJewelTable[1][1] == 0 && RequireJewelTable[1][2] == 0 && RequireJewelTable[1][3] == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(PShopJoCValue > 0 && RequireJewelTable[2][0] == 0 && RequireJewelTable[2][1] == 0 && RequireJewelTable[2][2] == 0 && RequireJewelTable[2][3] == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(gItemManager.GetInventoryEmptySlotCount(lpTarget) < (PaymentJewelCount[0]+PaymentJewelCount[1]+PaymentJewelCount[2]))
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   lpTarget->PShopTransaction = 1;

   BYTE result = gItemManager.InventoryInsertItem(aIndex,lpTarget->Inventory[lpMsg->slot]);

   if(result == 0xFF)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,8);
      return 1;
   }

   gLog.Output(LOG_TRADE,"[SellPesonalShopItem][%s][%s] - (Account: %s, Name: %s, Value: %d, JoBValue: %d, JoSValue: %d, JoCValue: %d, Index: %04d, Level: %02d, Serial: %08X, Option1: %01d, Option2: %01d, Option3: %01d, NewOption: %03d, JewelOfHarmonyOption: %03d, ItemOptionEx: %03d, SocketOption: %03d, %03d, %03d, %03d, %03d)",lpTarget->Account,lpTarget->Name,lpObj->Account,lpObj->Name,0,PShopJoBValue,PShopJoSValue,PShopJoCValue,lpTarget->Inventory[lpMsg->slot].m_Index,lpTarget->Inventory[lpMsg->slot].m_Level,lpTarget->Inventory[lpMsg->slot].m_Serial,lpTarget->Inventory[lpMsg->slot].m_Option1,lpTarget->Inventory[lpMsg->slot].m_Option2,lpTarget->Inventory[lpMsg->slot].m_Option3,lpTarget->Inventory[lpMsg->slot].m_NewOption,lpTarget->Inventory[lpMsg->slot].m_JewelOfHarmonyOption,lpTarget->Inventory[lpMsg->slot].m_ItemOptionEx,lpTarget->Inventory[lpMsg->slot].m_SocketOption[0],lpTarget->Inventory[lpMsg->slot].m_SocketOption[1],lpTarget->Inventory[lpMsg->slot].m_SocketOption[2],lpTarget->Inventory[lpMsg->slot].m_SocketOption[3],lpTarget->Inventory[lpMsg->slot].m_SocketOption[4]);

   gPersonalShop.SetRequireJewelCount(lpObj,RequireJewelTable[0],0);

   gPersonalShop.SetRequireJewelCount(lpObj,RequireJewelTable[1],1);

   gPersonalShop.SetRequireJewelCount(lpObj,RequireJewelTable[2],2);

   gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,result,1);

   GDCharacterInfoSaveSend(aIndex);

   gPersonalShop.SetPaymentJewelCount(lpTarget,PaymentJewelTable[0],0);

   gPersonalShop.SetPaymentJewelCount(lpTarget,PaymentJewelTable[1],1);

   gPersonalShop.SetPaymentJewelCount(lpTarget,PaymentJewelTable[2],2);

   gPersonalShop.GCPShopSellItemSend(bIndex,aIndex,lpMsg->slot);

   gItemManager.InventoryDelItem(bIndex,lpMsg->slot);
   gItemManager.GCItemDeleteSend(bIndex,lpMsg->slot,1);

   GDCharacterInfoSaveSend(bIndex);

   if(gPersonalShop.CheckPersonalShop(bIndex) == 0)
   {
      lpTarget->PShopItemChange = 1;
   }
   else
   {
      lpTarget->PShopOpen = 0;
      memset(lpTarget->PShopText,0,sizeof(lpTarget->PShopText));
      gPersonalShop.GCPShopCloseSend(bIndex,1);
      this->OnPShopClose(lpTarget);
   }

   lpTarget->PShopTransaction = 0;
   lpObj->PShopActiveIBuy = 0;
   return 1;
}


Offline Rindy #2 Posteado: January 02, 2025, 01:54:22 AM

  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 78
  • Gracias recibida: 1729
  • gb
no entiendo tengo que remplazar este codigo por el otro como es puedes esplicar





bool CCustomStore::OnPShopBuyItemRecv(PMSG_PSHOP_BUY_ITEM_RECV* lpMsg,int aIndex) // OK
{
   LPOBJ lpObj = &gObj[aIndex];

   if(gObjIsConnectedGP(aIndex) == 0)
   {
      return 1;
   }

   int bIndex = MAKE_NUMBERW(lpMsg->index[0],lpMsg->index[1]);

   if(gObjIsConnectedGP(bIndex) == 0)
   {
      return 1;
   }

   LPOBJ lpTarget = &gObj[bIndex];

   if(lpObj->PShopActiveIBuy == 1) //By Narvu ( Anti wCoins Dupe in PersonalShop CustomStore )
   {
      gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,"Process Stopped, avoid spaming when buying an items.");
      gNotice.GCNoticeSend(lpTarget->Index,1,0,0,0,0,0,"Character [%s] was spaming item buy in your store",lpObj->Name);
      gLog.Output(LOG_TRADE,"[SellPesonalShopItem Process Stopped ] Item Seller: [%s][%s] -> Item Buyer: [%s][%s] Detected that user was spaming item buy in store.",lpTarget->Account,lpTarget->Name,lpObj->Account,lpObj->Name);
      lpObj->PShopActiveIBuy = 0;
      return 1;
   }

   lpObj->PShopActiveIBuy = 1;

   if(lpTarget->PShopOpen == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,3);
      return 1;
   }

   if(lpTarget->PShopCustom == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      return 0;
   }

   if(lpTarget->PShopTransaction != 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,4);
      return 1;
   }

   if(INVENTORY_SHOP_RANGE(lpMsg->slot) == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,5);
      return 1;
   }

   gObjFixInventoryPointer(aIndex);

   if(lpObj->Transaction == 1)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,6);
      return 1;
   }

   char name[11] = {0};

   memcpy(name,lpMsg->name,sizeof(lpMsg->name));
   
   if(strcmp(name,lpTarget->Name) != 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,6);
      return 1;
   }

   if(lpTarget->Inventory[lpMsg->slot].IsItem() == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,6);
      return 1;
   }

   if(lpTarget->Inventory[lpMsg->slot].m_PShopValue <= 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,6);
      return 1;
   }

   #if(GAMESERVER_UPDATE>=501)

   if(lpTarget->PShopCustomType == 3 || lpTarget->PShopCustomType == 4 || lpTarget->PShopCustomType == 5)
   {
      gCashShop.GDCashShopRecievePointSend(aIndex,(DWORD)&CCustomStore::OnPShopBuyItemCallbackRecv,(DWORD)&gObj[bIndex],lpMsg->slot);
      lpObj->PShopActiveIBuy = 0;
      return 1;
   }

   #else

   if(lpTarget->PShopCustomType == 3 || lpTarget->PShopCustomType == 4 || lpTarget->PShopCustomType == 5)
   {
      gPcPoint.GDPcPointRecievePointSend(aIndex,(DWORD)&CCustomStore::OnPShopBuyItemCallbackRecv,(DWORD)&gObj[bIndex],lpMsg->slot);
      lpObj->PShopActiveIBuy = 0;
      return 1;
   }

   #endif

   int PShopJoBValue = ((lpTarget->PShopCustomType==0)?lpTarget->Inventory[lpMsg->slot].m_PShopValue:0);

   int PShopJoSValue = ((lpTarget->PShopCustomType==1)?lpTarget->Inventory[lpMsg->slot].m_PShopValue:0);

   int PShopJoCValue = ((lpTarget->PShopCustomType==2)?lpTarget->Inventory[lpMsg->slot].m_PShopValue:0);

   int RequireJewelCount[3] = {0};

   int PaymentJewelCount[3] = {0};

   int RequireJewelTable[3][4] = {0};

   int PaymentJewelTable[3][4] = {0};

   gPersonalShop.GetRequireJewelCount(lpObj,&RequireJewelCount[0],RequireJewelTable[0],0,PShopJoBValue);

   gPersonalShop.GetRequireJewelCount(lpObj,&RequireJewelCount[1],RequireJewelTable[1],1,PShopJoSValue);

   gPersonalShop.GetRequireJewelCount(lpObj,&RequireJewelCount[2],RequireJewelTable[2],2,PShopJoCValue);

   gPersonalShop.GetPaymentJewelCount(lpTarget,&PaymentJewelCount[0],PaymentJewelTable[0],0,PShopJoBValue);

   gPersonalShop.GetPaymentJewelCount(lpTarget,&PaymentJewelCount[1],PaymentJewelTable[1],1,PShopJoSValue);

   gPersonalShop.GetPaymentJewelCount(lpTarget,&PaymentJewelCount[2],PaymentJewelTable[2],2,PShopJoCValue);

   if(RequireJewelCount[0] < PShopJoBValue)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(RequireJewelCount[1] < PShopJoSValue)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(RequireJewelCount[2] < PShopJoCValue)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(PShopJoBValue > 0 && RequireJewelTable[0][0] == 0 && RequireJewelTable[0][1] == 0 && RequireJewelTable[0][2] == 0 && RequireJewelTable[0][3] == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(PShopJoSValue > 0 && RequireJewelTable[1][0] == 0 && RequireJewelTable[1][1] == 0 && RequireJewelTable[1][2] == 0 && RequireJewelTable[1][3] == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(PShopJoCValue > 0 && RequireJewelTable[2][0] == 0 && RequireJewelTable[2][1] == 0 && RequireJewelTable[2][2] == 0 && RequireJewelTable[2][3] == 0)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   if(gItemManager.GetInventoryEmptySlotCount(lpTarget) < (PaymentJewelCount[0]+PaymentJewelCount[1]+PaymentJewelCount[2]))
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,7);
      return 1;
   }

   lpTarget->PShopTransaction = 1;

   BYTE result = gItemManager.InventoryInsertItem(aIndex,lpTarget->Inventory[lpMsg->slot]);

   if(result == 0xFF)
   {
      lpObj->PShopActiveIBuy = 0;
      gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,0,8);
      return 1;
   }

   gLog.Output(LOG_TRADE,"[SellPesonalShopItem][%s][%s] - (Account: %s, Name: %s, Value: %d, JoBValue: %d, JoSValue: %d, JoCValue: %d, Index: %04d, Level: %02d, Serial: %08X, Option1: %01d, Option2: %01d, Option3: %01d, NewOption: %03d, JewelOfHarmonyOption: %03d, ItemOptionEx: %03d, SocketOption: %03d, %03d, %03d, %03d, %03d)",lpTarget->Account,lpTarget->Name,lpObj->Account,lpObj->Name,0,PShopJoBValue,PShopJoSValue,PShopJoCValue,lpTarget->Inventory[lpMsg->slot].m_Index,lpTarget->Inventory[lpMsg->slot].m_Level,lpTarget->Inventory[lpMsg->slot].m_Serial,lpTarget->Inventory[lpMsg->slot].m_Option1,lpTarget->Inventory[lpMsg->slot].m_Option2,lpTarget->Inventory[lpMsg->slot].m_Option3,lpTarget->Inventory[lpMsg->slot].m_NewOption,lpTarget->Inventory[lpMsg->slot].m_JewelOfHarmonyOption,lpTarget->Inventory[lpMsg->slot].m_ItemOptionEx,lpTarget->Inventory[lpMsg->slot].m_SocketOption[0],lpTarget->Inventory[lpMsg->slot].m_SocketOption[1],lpTarget->Inventory[lpMsg->slot].m_SocketOption[2],lpTarget->Inventory[lpMsg->slot].m_SocketOption[3],lpTarget->Inventory[lpMsg->slot].m_SocketOption[4]);

   gPersonalShop.SetRequireJewelCount(lpObj,RequireJewelTable[0],0);

   gPersonalShop.SetRequireJewelCount(lpObj,RequireJewelTable[1],1);

   gPersonalShop.SetRequireJewelCount(lpObj,RequireJewelTable[2],2);

   gPersonalShop.GCPShopBuyItemSend(aIndex,bIndex,result,1);

   GDCharacterInfoSaveSend(aIndex);

   gPersonalShop.SetPaymentJewelCount(lpTarget,PaymentJewelTable[0],0);

   gPersonalShop.SetPaymentJewelCount(lpTarget,PaymentJewelTable[1],1);

   gPersonalShop.SetPaymentJewelCount(lpTarget,PaymentJewelTable[2],2);

   gPersonalShop.GCPShopSellItemSend(bIndex,aIndex,lpMsg->slot);

   gItemManager.InventoryDelItem(bIndex,lpMsg->slot);
   gItemManager.GCItemDeleteSend(bIndex,lpMsg->slot,1);

   GDCharacterInfoSaveSend(bIndex);

   if(gPersonalShop.CheckPersonalShop(bIndex) == 0)
   {
      lpTarget->PShopItemChange = 1;
   }
   else
   {
      lpTarget->PShopOpen = 0;
      memset(lpTarget->PShopText,0,sizeof(lpTarget->PShopText));
      gPersonalShop.GCPShopCloseSend(bIndex,1);
      this->OnPShopClose(lpTarget);
   }

   lpTarget->PShopTransaction = 0;
   lpObj->PShopActiveIBuy = 0;
   return 1;
}

basically the dupe way is they do the quick action to rely on the slow response line

then this code is fixed in the direction that when buying an item it will set the value lpObj->PShopActiveIBuy = 1 to determine that it is buying 1 item, after completing it will set lpObj->PShopActiveIBuy = 0; to know that you are allowed to buy the next one

Gracias:


Offline Dode #3 Posteado: January 06, 2025, 12:20:41 AM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 35
  • Gracias recibida: 21
  • lt
thanks for share

RIP Narvulkan


Offline whisky123 #4 Posteado: January 06, 2025, 09:01:09 AM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 97
  • Gracias recibida: 31
  • tw
fix

Error   2   error C2660: 'CCashShop::GDCashShopAddPointSaveSend' : function does not take 5 arguments   GameServer\CustomStore.cpp   733   1   GameServer


Offline mauri64 #5 Posteado: February 13, 2025, 10:24:23 PM | Modificado: February 24, 2025, 10:32:21 PM by mauri64

  • 0 puntos por ventas
  • *
  • Rank: Experto
  • Posts: 155
  • Gracias recibida: 391
  • ar
tenia el mismo error:
1>CustomStore.cpp(708): error C2660: 'CCashShop::GDCashShopSubPointSaveSend' : la función no acepta 5 argumentos
1>CustomStore.cpp(734): error C2660: 'CCashShop::GDCashShopAddPointSaveSend' : la función no acepta 5 argumentos

y lo solucione de esta forma:



Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
0 Replies
978 Views
Last post June 12, 2017, 05:14:44 PM
by lusiffer99
5 Replies
2165 Views
Last post March 18, 2020, 09:27:19 PM
by EmmaDCG
0 Replies
375 Views
Last post May 11, 2023, 12:03:37 AM
by oxey.mu
4 Replies
1104 Views
Last post September 14, 2023, 02:14:26 AM
by Foxwares
8 Replies
2556 Views
Last post March 27, 2025, 01:16:43 PM
by lingerieshop