Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Client::Damage(Mob* other, sint32 damage, int16 spell_id, SkillType attack_skill, bool avoidable, sint8 buffslot, bool iBuffTic)
- {
- if(dead || IsCorpse())
- return;
- if(spell_id==0)
- spell_id = SPELL_UNKNOWN;
- // cut all PVP spell damage to 2/3 -solar
- // Don't do PvP mitigation if the caster is damaging himself
- if(other && other->IsClient() && (other != this) && damage > 0 && spell_id > 0) {
- damage = (damage * 66) / 100;
- }
- if(!ClientFinishedLoading() && !IsLD())
- damage = -5;
- // Cancel Feign Death if damage is applied
- if((damage > 0) && GetFeigned()) {
- SetFeigned(false);
- }
- //do a majority of the work...
- CommonDamage(other, damage, spell_id, attack_skill, avoidable, buffslot, iBuffTic);
- if (damage > 0) {
- //if the other is not green, and this is not a spell
- if (other && other->IsNPC() && (spell_id == SPELL_UNKNOWN) && GetLevelCon(other->GetLevel()) != CON_GREEN )
- CheckIncreaseSkill(DEFENSE, -10);
- }
- }
- void Client::Death(Mob* killerMob, sint32 damage, int16 spell, SkillType attack_skill)
- {
- if(!ClientFinishedLoading())
- return;
- if(dead)
- return; //cant die more than once...
- int exploss;
- 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