Advertisement
Drakia

Untitled

Feb 29th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. int CWorldServer::GetExp(CCharacter* pATK, CCharacter* pDEF, dword iGiveDamage){
  2. int iEXP = 0;
  3. int iGAB = int(pATK->Stats->Level) - int(pDEF->Stats->Level);
  4. if(iGAB > 3) {
  5. float tempFloat = ((pDEF->GetMaxHP() / 15.0f) + iGiveDamage + 30) * pDEF->Get_GiveEXP() * (pDEF->Stats->Level + 3) * GetWorldEXP();
  6.  
  7. iEXP = ((tempFloat / pDEF->GetMaxHP()) / int(iGAB + 3)) / 60.0f;
  8. } else {
  9. float tempFloat = ((pDEF->GetMaxHP() / 15.0f) + iGiveDamage + 30) * pDEF->Get_GiveEXP() * (pDEF->Get_LEVEL() + 3) * GetWorldEXP();
  10.  
  11. iEXP = ((tempFloat / pDEF->GetMaxHP()) / 370.0f);
  12. }
  13. if(iEXP < 1) iEXP = 1;
  14. return iEXP;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement