PsychoGod/ImaginationArts-Julia-Addon — Issue #93: NPC Shop Sell system
Author: PsychoGod
Created: 2011-11-19 23:43:15+00:00
State: open
Labels: feature, GS, GS_CS

block items in .INI/.TXT so they cant be sold in NPCs.

int __cdecl CGSellRequestRecv2(PMSG_SELLREQUEST * lpMsg, int aIndex)
{
OBJECTSTRUCT gObj = (OBJECTSTRUCT)OBJECT_POINTER(aIndex);
PMSG_SELLRESULT pResult;
PHeadSetB((LPBYTE)&pResult, 0x33, sizeof(pResult));
pResult.Result = false;
pResult.Money = 0;

if (!CheckItemCanBeSold)
{
DataSend(aIndex, (LPBYTE)&pResult, sizeof(pResult));
Chat.Message(gObj->m_Index,"[SetBlockSell] You cant sell that item");

return 1;
}

return CGSellRequestRecv(lpMsg,aIndex);
}

thx BlueEyed