Advertisement
Guest User

Untitled

a guest
May 29th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. void Client::Damage(Mob* other, sint32 damage, int16 spell_id, SkillType attack_skill, bool avoidable, sint8 buffslot, bool iBuffTic)
  2. {
  3. if(dead || IsCorpse())
  4. return;
  5.  
  6. if(spell_id==0)
  7. spell_id = SPELL_UNKNOWN;
  8.  
  9. // cut all PVP spell damage to 2/3 -solar
  10. // Don't do PvP mitigation if the caster is damaging himself
  11. if(other && other->IsClient() && (other != this) && damage > 0 && spell_id > 0) {
  12. damage = (damage * 66) / 100;
  13. }
  14.  
  15. if(!ClientFinishedLoading() && !IsLD())
  16. damage = -5;
  17.  
  18. // Cancel Feign Death if damage is applied
  19. if((damage > 0) && GetFeigned()) {
  20. SetFeigned(false);
  21. }
  22.  
  23. //do a majority of the work...
  24. CommonDamage(other, damage, spell_id, attack_skill, avoidable, buffslot, iBuffTic);
  25.  
  26. if (damage > 0) {
  27. //if the other is not green, and this is not a spell
  28. if (other && other->IsNPC() && (spell_id == SPELL_UNKNOWN) && GetLevelCon(other->GetLevel()) != CON_GREEN )
  29. CheckIncreaseSkill(DEFENSE, -10);
  30. }
  31. }
  32.  
  33. void Client::Death(Mob* killerMob, sint32 damage, int16 spell, SkillType attack_skill)
  34. {
  35.  
  36. if(!ClientFinishedLoading())
  37. return;
  38.  
  39. if(dead)
  40. return; //cant die more than once...
  41. int exploss;
  42.  
  43. mlog(COMBAT__HITS, "Fatal blow dealt by %s with %d damage, spell %d, skill %d", killerMob->GetName(), damage, spell, attack_skill);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement