11-23-2021, 07:14 PM
This is the function that determines the exp factor
int CNPCProto::getExpForPremiumChar( int premium_type )
{
int ori_exp = m_exp;
int exp = 0;
switch (premium_type)
{
case PREMIUM_CHAR_TYPE_FIRST:
exp = (int)(ori_exp * 1.1f);
break;
default:
exp = ori_exp;
break;
}
// LOG_DEBUG("TEST (exp) : %d - %d", ori_exp, exp);
return exp;
}
you can create a similar function for affinity or whatever u want, then use it to calculate the given points like it is done for exp here:
bool DivisionExpSP(CNPC* npc, CPC* pPreferencePC, LONGLONG nTotalDamage)
{
#ifdef PREMIUM_CHAR
LONGLONG nExpNPC;
LONGLONG nSPNPC;
if(pPreferencePC != NULL)
{
nExpNPC = npc->m_proto->getExpForPremiumChar(pPreferencePC->m_premiumChar.getPremiumType()); // Áö±ÞµÉ °æÇèÄ¡
nSPNPC = npc->m_proto->getSkillPointForPremiumChar(pPreferencePC->m_premiumChar.getPremiumType()); // Áö±ÞµÉ SP
}
else
{
nExpNPC = npc->m_proto->getExp(); // Áö±ÞµÉ °æÇèÄ¡
nSPNPC = npc->m_proto->getSkillPoint(); // Áö±ÞµÉ SP
}
#else
LONGLONG nExpNPC = npc->m_proto->getExp(); // Áö±ÞµÉ °æÇèÄ¡
LONGLONG nSPNPC = npc->m_proto->getSkillPoint(); // Áö±ÞµÉ SP
#endif

