Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(df && opc) //dethunter12 affinity proc for points from mobs.
- {
- vec_affinityList_t::iterator it = df->m_proto->m_affinityList.begin();
- vec_affinityList_t::iterator endit = df->m_proto->m_affinityList.end();
- int point = 0;
- for(; it != endit; ++it)
- {
- CAffinityProto* proto = *(it);
- CAffinity* affinity = opc->m_affinityList.FindAffinity(proto->m_index);
- if(affinity) //all affinitys
- {
- point = proto->GetAffinityPointOfNPC(df->m_idNum); //find the mob and give the points of affinity
- int bonus = 0;
- if(opc->m_avPassiveAddition.affinity_monster > 0)
- {
- bonus += opc->m_avPassiveAddition.affinity_monster; //bonus = bonus + passive addition affinity monster
- }
- if(opc->m_avPassiveRate.affinity_monster > 0)
- {
- bonus = point * (opc->m_avPassiveRate.affinity_monster - 100) / SKILL_RATE_UNIT; //bonus = bonus + point * (passiverate - 100) / SKILL_RATE_UNIT
- }
- affinity->AddPoint( point, opc, bonus); // add the points to the affinity after bonus is determined.
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement