Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
58 stars 47 forks source link

[Feature Request] Decreased amount of spell reagent #1143

Open canerksk opened 1 year ago

canerksk commented 1 year ago
        if ( Calc_GetRandVal(100) >= iLowerReagentCost)
        {
            CContainer* pCont = static_cast<CContainer*>(pCharCaster);
            const size_t iMissing = pCont->ResourceConsumePart(pReagents, 1, 100, fTest);
            if (iMissing != SCONT_BADINDEX)
                return iMissing;
        }
        const size_t iMissing = pCont->ResourceConsumePart(pReagents, PROPCH_LOWERREAGENTAMOUNT, 100, fTest);

Here, a fixed amount of spells is reduced for each spell, but this reduced number of spell materials may vary for additional features. For this, an additional feature can be added as PROPCH_LOWERREAGENTAMOUNT, rather than a feature that works as a percentage, such as PROPCH_LOWERREAGENTCOST.

The codes here are purely examples. Although many have been tested, some may need to be rewritten.