Guest User

Untitled

a guest
Jan 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
  2. index 94949e8..ea91a68 100644
  3. --- a/src/game/Unit.cpp
  4. +++ b/src/game/Unit.cpp
  5. @@ -7957,6 +7957,12 @@ uint32 Unit::MeleeDamageBonusDone(Unit *pVictim, uint32 pdamage,WeaponAttackType
  6. if (!pVictim || pdamage == 0 || (spellProto && spellProto->AttributesEx6 & SPELL_ATTR_EX6_NO_DMG_MODS))
  7. return pdamage;
  8.  
  9. + if (!pVictim->IsInWorld() || !pVictim->GetMap() || !GetMap())
  10. + return pdamage;
  11. +
  12. + MAPLOCK_READ(this,MAP_LOCK_TYPE_AURAS);
  13. + MAPLOCK_READ1(pVictim,MAP_LOCK_TYPE_AURAS);
  14. +
  15. // differentiate for weapon damage based spells
  16. bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || IsSpellHaveEffect(spellProto, SPELL_EFFECT_SCHOOL_DAMAGE)));
  17. Item* pWeapon = GetTypeId() == TYPEID_PLAYER ? ((Player*)this)->GetWeaponForAttack(attType,true,false) : NULL;
Add Comment
Please, Sign In to add comment