Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ptsEarned = (deadLevel+GetLevel())/2;
- // point variation depending on K/D ratios of the dead player
- if ( deadPlayerDeathCount < 1 )
- deadPlayerDeathCount = 1;
- if ( deadPlayerKillCount < 1 )
- deadPlayerKillCount = 1;
- double ratioDiff = (double)deadPlayerKillCount/(double)deadPlayerDeathCount;
- ratioDiff += ratioDiff * (((float)zone->IsPVPHotzone()/100.0f) * ((float)GetLevel()/((float)RuleI(PVPCombat, PCChanceLevelCap)+1.0f)));
- if ( ratioDiff > RuleR(PVPCombat,PVPPointRatioMaxCap) )
- ratioDiff = RuleR(PVPCombat,PVPPointRatioMaxCap);
- if ( ratioDiff < RuleR(PVPCombat,PVPPointRatioMinCap) )
- ratioDiff = RuleR(PVPCombat,PVPPointRatioMinCap);
- ptsEarned = (uint32)(double)ptsEarned * ratioDiff; // use ratio diff to make ultimate amount
- bool gaveGroupPts = false;
- bool isGrouped = false;
- if ( !RuleB(PVPCombat, PVPPoints) )
- ptsEarned = 0;
- else
- {
- if ( IsGrouped() && this->GetGroup() != NULL )
- {
- isGrouped = true;
- int8 groupCount = this->GetGroup()->GroupCount();
- if ( groupCount < 1 )
- groupCount = 1;
- ptsEarned = (uint32)(float)ptsEarned / groupCount;
- if ( ptsEarned < 1 )
- ptsEarned = RuleI(PVPCombat,DefaultGroupPointEarning);
- if ( legitKill )
- gaveGroupPts = GetGroup()->GivePVPPoints(this, ptsEarned, zoneID);
- }
- else
- {
- ptsEarned = (uint32)(float)ptsEarned * RuleR(PVPCombat,PVPPointReductionNonGroup);
- if ( ptsEarned < 1 )
- ptsEarned = RuleI(PVPCombat,DefaultNoGroupPointEarning);
- }
- if ( isGrouped && !gaveGroupPts && zoneID == zone->GetZoneID() )
- {
- ptsEarned = (uint32)(float)ptsEarned * RuleR(PVPCombat,PVPPointReductionNonGroup);
- if ( ptsEarned < 1 )
- ptsEarned = RuleI(PVPCombat,DefaultNoGroupPointEarning);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement