This isn't much but hopefully it helps some of you.
credits to Kiasti on GitHub for the original idea.
First, open up your versionCommon.h in Nuez and WorldServer OR your kCommon.h and add #define __CHEER_UPGRADE somewhere.
UPDATE: also, if you would like, add
#define __CHEER_UPGRADE_RATE 0.05f; // This lets you define the % of extra chance without changing all instances each time you change it.
If you add this, instead of the 0.05f you see lower in the code snippets, put __CHEER_UPGRADE_RATE
Next, open up ItemUpgrade.cpp
STEP ONE
Find the
CItemUpgrade::SmeltSafetyGeneral method.
find
int nPercent = GetGeneralEnchantProb( pItemMain->GetAbilityOption() );
Under that, add
Code:
#ifdef __CHEER_UPGRADE
if (pUser->HasBuff(BUFF_ITEM, II_CHEERUP))
{
float temp = static_cast<int>(nPercent * 0.05f);
if (temp < 1000)
nPercent += temp; // add 5% of original roll
}
#endif
STEP TWO
Find the
CItemUpgrade::SmeltSafetyAccessory method.
find
DWORD dwProbability = CAccessoryProperty::GetInstance()->GetProbability( pItemMain->GetAbilityOption() );
Under that, add
Code:
#ifdef __CHEER_UPGRADE
if (pUser->HasBuff(BUFF_ITEM, II_CHEERUP))
{
float temp = static_cast<int>(dwProbability * 0.05f);
if (temp < 1000)
dwProbability += temp; // add 5% of original roll
}
#endif
STEP THREE
Find the
CItemUpgrade::SmeltSafetyPiercingSize method
find
int nPercent = GetSizeProb( pItemMain );
Under that, add
Code:
#ifdef __CHEER_UPGRADE
if (pUser->HasBuff(BUFF_ITEM, II_CHEERUP))
{
float temp = static_cast<int>(nPercent * 0.05f);
if (temp < 1000)
nPercent += temp; // add 5% of original roll
}
#endif
STEP FOUR
Find the
CItemUpgrade::RefineAccessory method.
find
DWORD dwProbability = CAccessoryProperty::GetInstance()->GetProbability( pItemMain->GetAbilityOption() );
Under that, add
Code:
#ifdef __CHEER_UPGRADE
if (pUser->HasBuff(BUFF_ITEM, II_CHEERUP))
{
float temp = static_cast<int>(dwProbability * 0.05f);
if (temp < 1000)
dwProbability += temp; // add 5% of original roll
}
#endif
STEP FIVE
Find the
CItemUpgrade::RefineCollector method
find
int nProb = pProperty->GetEnchantProbability( pItemMain->GetAbilityOption() );
Under that, add
Code:
#ifdef __CHEER_UPGRADE
if (pUser->HasBuff(BUFF_ITEM, II_CHEERUP))
{
float temp = static_cast<int>(nProb * 0.05f);
if (temp < 1000)
nProb += temp; // add 5% of original roll
}
#endif
STEP SIX (FINAL STEP)
Find the
CItemUpgrade::SmeltSafetyAttribute method
find
int nPercent = GetAttributeEnchantProb( pItemMain->m_nResistAbilityOption );
Under that, add
Code:
#ifdef __CHEER_UPGRADE
if (pUser->HasBuff(BUFF_ITEM, II_CHEERUP))
{
float temp = static_cast<int>(nPercent * 0.05f);
if (temp < 1000)
nPercent += temp; // add 5% of original roll
}
#endif