Moin,
wie entferne ich das Glas der Einsicht richtig?
Also so das man die funktion benutzt, aber das Glas einfach nicht mehr braucht.
Code
- int ProcessTextTag(LPCHARACTER ch, const char * c_pszText, size_t len)
- {
- /*
- 0: Normally used
- 1: Lack of sutras
- 2: There is a Golden Sutra, but it is being used in a private shop
- 3: Swapping
- 4: Error
- */
- int hyperlinks;
- bool colored;
- GetTextTagInfo(c_pszText, len, hyperlinks, colored);
- if (colored && hyperlinks == 0)
- return 4;
- if (ch->GetExchange())
- {
- return 3;
- }
- int nPrismCount;
- if (!g_bDisablePrismNeed)
- {
- nPrismCount = ch->CountSpecifyItem(ITEM_PRISM);
- if (nPrismCount < hyperlinks)
- return 1;
- }
- if (!ch->GetMyShop())
- {
- if(!g_bDisablePrismNeed)
- ch->RemoveSpecifyItem(ITEM_PRISM, hyperlinks);
- return 0;
- } else
- {
- if (!g_bDisablePrismNeed)
- {
- int sellingNumber = ch->GetMyShop()->GetNumberByVnum(ITEM_PRISM);
- if(nPrismCount - sellingNumber < hyperlinks)
- {
- return 2;
- } else
- {
- ch->RemoveSpecifyItem(ITEM_PRISM, hyperlinks);
- return 0;
- }
- }
- }
- return 4;
- }