*Problemă/Întrebare: Salutare , revin cu o problema in legatura cu switchbot-ul lui Sanii. L-am implementat dar nu imi ia schimbatoarele de niciunde , nici cand le am in inventar nici cand le am in Special Storage.
Tipologie server: PVM EASY
*Resursă folosită: Switchbot Sanii
*ServerFiles utilizat: Serverfiles clean
*Syserr: -
Poză: https://gyazo.com/59d48da58a2d5e2b5a81226e792113b0
*Detalii suplimentare: Multumesc!!
Problema switch Sanii cu special storage
- FALLEN1
-

- Mesaje: 585
- Membru din: 14 Noi 2015, 20:12
- Server: Dark-Fusion2
- Regat: Chunjo
- Aprecieri: 366
- Mulţumiri: 758
- Rezolvări prob.: 2
- Discord: Copiază ID
Trebuie sa ii faci legatura catre inventarul de schimbatoare.
Mergi in char_item.cpp si cauta
In functia de mai sus cauta
Si adauga sub
Unde NumeInventarSwitchere este numele inventarului cu switchere
Mergi in char_item.cpp si cauta
Cod: Selectaţi tot
LPITEM CHARACTER::FindSpecifyItem(DWORD vnum) constCod: Selectaţi tot
if (GetInventoryItem(i) && GetInventoryItem(i)->GetVnum() == vnum)
return GetInventoryItem(i);Cod: Selectaţi tot
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
if (NumeInventarSwitchere(i) && NumeInventarSwitchere(i)->GetVnum() == vnum)
return NumeInventarSwitchere(i); https://gyazo.com/fd91b08ca1f15d4845c1d082cdce91adFALLEN1 scrie: ↑25 Iun 2023, 16:50 Trebuie sa ii faci legatura catre inventarul de schimbatoare.
Mergi in char_item.cpp si cautaIn functia de mai sus cautaCod: Selectaţi tot
LPITEM CHARACTER::FindSpecifyItem(DWORD vnum) constSi adauga subCod: Selectaţi tot
if (GetInventoryItem(i) && GetInventoryItem(i)->GetVnum() == vnum) return GetInventoryItem(i);Unde NumeInventarSwitchere este numele inventarului cu switchereCod: Selectaţi tot
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i) if (NumeInventarSwitchere(i) && NumeInventarSwitchere(i)->GetVnum() == vnum) return NumeInventarSwitchere(i);
Am incercat deja asta.. din pacate fara succes..
- [HF]White
-

- Mesaje: 2684
- Membru din: 03 Iul 2018, 13:40
- Regat: Jinno
- Aprecieri: 338
- Mulţumiri: 5331
- Rezolvări prob.: 13
- Discord: Copiază ID
- Contact:
poate a fost scoasa acea functie din switchbot.cpp de -1 cand schimbi bonus
Cod: Selectaţi tot
if (SWITCHBOT_PRICE_TYPE == 1)
{
#if __cplusplus < 199711L
for (int i = 0; i < _countof(c_arSwitchingItems); ++i)
{
const DWORD& itemVnum = c_arSwitchingItems[i];
#else
for (const auto& itemVnum : c_arSwitchingItems)
{
#endif
//CHECK_LIMITED_ITEM START
if (itemVnum == 71151 || itemVnum == 76023)
{
if ((pkItem->GetType() == ITEM_WEAPON) || (pkItem->GetType() == ITEM_ARMOR && pkItem->GetSubType() == ARMOR_BODY))
{
bool bCanUse = true;
for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i)
{
if (pkItem->GetLimitType(i) == LIMIT_LEVEL && pkItem->GetLimitValue(i) > 40)
{
bCanUse = false;
break;
}
}
if (false == bCanUse)
{
continue;
}
}
else
{
continue;
}
}
//CHECK_LIMITED_ITEM END
if (pkOwner->CountSpecifyItem(itemVnum) >= SWITCHBOT_PRICE_AMOUNT)
{
stop = false;
}
}
}
else if (SWITCHBOT_PRICE_TYPE == 2)
{
if (pkOwner->GetGold() >= SWITCHBOT_PRICE_AMOUNT)
{
stop = false;
}
}
if (stop)
{
Stop();
if (SWITCHBOT_PRICE_TYPE == 1)
{
pkOwner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Switchbot stopped. Out of switchers."));
}
else
{
pkOwner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Switchbot stopped. Not enough money."));
}
return;
}
if (SWITCHBOT_PRICE_TYPE == 1)
{
#if __cplusplus < 199711L
for (int i = 0; i < _countof(c_arSwitchingItems); ++i)
{
const DWORD& itemVnum = c_arSwitchingItems[i];
#else
for (const auto& itemVnum : c_arSwitchingItems)
{
#endif
LPITEM pkItem = pkOwner->FindSpecifyItem(itemVnum);
if (pkItem)
{
pkItem->SetCount(pkItem->GetCount() - SWITCHBOT_PRICE_AMOUNT);
break;
}
}
}
else if (SWITCHBOT_PRICE_TYPE == 2)
{
pkOwner->PointChange(POINT_GOLD, -SWITCHBOT_PRICE_AMOUNT, false);
}
pkItem->ChangeAttribute();
SendItemUpdate(pkOwner, bSlot, pkItem);
}
}
}
pkItem->SetCount(pkItem->GetCount() - SWITCHBOT_PRICE_AMOUNT);
Acum încerc și revin cu reply.[HF]White scrie: ↑25 Iun 2023, 23:16 poate a fost scoasa acea functie din switchbot.cpp de -1 cand schimbi bonus
Cod: Selectaţi tot
if (SWITCHBOT_PRICE_TYPE == 1) { #if __cplusplus < 199711L for (int i = 0; i < _countof(c_arSwitchingItems); ++i) { const DWORD& itemVnum = c_arSwitchingItems[i]; #else for (const auto& itemVnum : c_arSwitchingItems) { #endif //CHECK_LIMITED_ITEM START if (itemVnum == 71151 || itemVnum == 76023) { if ((pkItem->GetType() == ITEM_WEAPON) || (pkItem->GetType() == ITEM_ARMOR && pkItem->GetSubType() == ARMOR_BODY)) { bool bCanUse = true; for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) { if (pkItem->GetLimitType(i) == LIMIT_LEVEL && pkItem->GetLimitValue(i) > 40) { bCanUse = false; break; } } if (false == bCanUse) { continue; } } else { continue; } } //CHECK_LIMITED_ITEM END if (pkOwner->CountSpecifyItem(itemVnum) >= SWITCHBOT_PRICE_AMOUNT) { stop = false; } } } else if (SWITCHBOT_PRICE_TYPE == 2) { if (pkOwner->GetGold() >= SWITCHBOT_PRICE_AMOUNT) { stop = false; } } if (stop) { Stop(); if (SWITCHBOT_PRICE_TYPE == 1) { pkOwner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Switchbot stopped. Out of switchers.")); } else { pkOwner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Switchbot stopped. Not enough money.")); } return; } if (SWITCHBOT_PRICE_TYPE == 1) { #if __cplusplus < 199711L for (int i = 0; i < _countof(c_arSwitchingItems); ++i) { const DWORD& itemVnum = c_arSwitchingItems[i]; #else for (const auto& itemVnum : c_arSwitchingItems) { #endif LPITEM pkItem = pkOwner->FindSpecifyItem(itemVnum); if (pkItem) { pkItem->SetCount(pkItem->GetCount() - SWITCHBOT_PRICE_AMOUNT); break; } } } else if (SWITCHBOT_PRICE_TYPE == 2) { pkOwner->PointChange(POINT_GOLD, -SWITCHBOT_PRICE_AMOUNT, false); } pkItem->ChangeAttribute(); SendItemUpdate(pkOwner, bSlot, pkItem); } } }pkItem->SetCount(pkItem->GetCount() - SWITCHBOT_PRICE_AMOUNT);
Nu lipseste nimic ... UP![HF]White scrie: ↑25 Iun 2023, 23:16 poate a fost scoasa acea functie din switchbot.cpp de -1 cand schimbi bonus
Cod: Selectaţi tot
if (SWITCHBOT_PRICE_TYPE == 1) { #if __cplusplus < 199711L for (int i = 0; i < _countof(c_arSwitchingItems); ++i) { const DWORD& itemVnum = c_arSwitchingItems[i]; #else for (const auto& itemVnum : c_arSwitchingItems) { #endif //CHECK_LIMITED_ITEM START if (itemVnum == 71151 || itemVnum == 76023) { if ((pkItem->GetType() == ITEM_WEAPON) || (pkItem->GetType() == ITEM_ARMOR && pkItem->GetSubType() == ARMOR_BODY)) { bool bCanUse = true; for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) { if (pkItem->GetLimitType(i) == LIMIT_LEVEL && pkItem->GetLimitValue(i) > 40) { bCanUse = false; break; } } if (false == bCanUse) { continue; } } else { continue; } } //CHECK_LIMITED_ITEM END if (pkOwner->CountSpecifyItem(itemVnum) >= SWITCHBOT_PRICE_AMOUNT) { stop = false; } } } else if (SWITCHBOT_PRICE_TYPE == 2) { if (pkOwner->GetGold() >= SWITCHBOT_PRICE_AMOUNT) { stop = false; } } if (stop) { Stop(); if (SWITCHBOT_PRICE_TYPE == 1) { pkOwner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Switchbot stopped. Out of switchers.")); } else { pkOwner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Switchbot stopped. Not enough money.")); } return; } if (SWITCHBOT_PRICE_TYPE == 1) { #if __cplusplus < 199711L for (int i = 0; i < _countof(c_arSwitchingItems); ++i) { const DWORD& itemVnum = c_arSwitchingItems[i]; #else for (const auto& itemVnum : c_arSwitchingItems) { #endif LPITEM pkItem = pkOwner->FindSpecifyItem(itemVnum); if (pkItem) { pkItem->SetCount(pkItem->GetCount() - SWITCHBOT_PRICE_AMOUNT); break; } } } else if (SWITCHBOT_PRICE_TYPE == 2) { pkOwner->PointChange(POINT_GOLD, -SWITCHBOT_PRICE_AMOUNT, false); } pkItem->ChangeAttribute(); SendItemUpdate(pkOwner, bSlot, pkItem); } } }pkItem->SetCount(pkItem->GetCount() - SWITCHBOT_PRICE_AMOUNT);
- [HF]White
-

- Mesaje: 2684
- Membru din: 03 Iul 2018, 13:40
- Regat: Jinno
- Aprecieri: 338
- Mulţumiri: 5331
- Rezolvări prob.: 13
- Discord: Copiază ID
- Contact:
ia un svfile care are switch sanii si special storage si compara tot ce tine de switch
- [HF]White
-

- Mesaje: 2684
- Membru din: 03 Iul 2018, 13:40
- Regat: Jinno
- Aprecieri: 338
- Mulţumiri: 5331
- Rezolvări prob.: 13
- Discord: Copiază ID
- Contact:
Inactiv, arhivat.
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Semrush [Bot] și 167 vizitatori


