Junior Spellweaver
- Joined
- Nov 20, 2017
- Messages
- 146
- Reaction score
- 19
Hi Ragezone,
i am trying to change all bounty items to "FREE"
I want you to show up at the shop, like:
I know this is where you edit this, but I don't know how to do it
i want something like
if cash (price, currency)
else (free)
Anyone who knows programming well, how do I do it?
i am trying to change all bounty items to "FREE"
I want you to show up at the shop, like:
I know this is where you edit this, but I don't know how to do it
i want something like
if cash (price, currency)
else (free)
PHP:
const char* szCurrency = bCash ? ZMsg(MSG_CHARINFO_CASH) : ZMsg(MSG_CHARINFO_BOUNTY);
sprintf(sz, "%d %s", nPrice, szCurrency); //how can i separate cash from free?
strcat(szBuf, sz);
return szBuf;
Anyone who knows programming well, how do I do it?
const char* IShopEquipItemHandle_Purchase::GetPriceText( char* szBuf )
{
szBuf[0]=0;
bool bCash;
int nRentHour;
int nPrice;
if (!GetPrice(bCash, nRentHour, nPrice))
return szBuf;
char sz[256];
if (nRentHour != 0)
{
sprintf(sz, "(%d%s) ", nRentHour / 24, ZMsg(MSG_CHARINFO_DAY));
strcat(szBuf, sz);
}
const char* szCurrency = bCash ? ZMsg(MSG_CHARINFO_CASH) : ZMsg(MSG_CHARINFO_BOUNTY);
sprintf(sz, "%d %s", nPrice, szCurrency);
strcat(szBuf, sz);
return szBuf;
}
{
szBuf[0]=0;
bool bCash;
int nRentHour;
int nPrice;
if (!GetPrice(bCash, nRentHour, nPrice))
return szBuf;
char sz[256];
if (nRentHour != 0)
{
sprintf(sz, "(%d%s) ", nRentHour / 24, ZMsg(MSG_CHARINFO_DAY));
strcat(szBuf, sz);
}
const char* szCurrency = bCash ? ZMsg(MSG_CHARINFO_CASH) : ZMsg(MSG_CHARINFO_BOUNTY);
sprintf(sz, "%d %s", nPrice, szCurrency);
strcat(szBuf, sz);
return szBuf;
}
Attachments
You must be registered for see attachments list