aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorw12x <none@none>2008-10-26 11:50:07 -0500
committerw12x <none@none>2008-10-26 11:50:07 -0500
commit6f2e0ee48a24dff1ac7acf441b1559e9d7c26657 (patch)
treebd28bea52660e6eb2425435ff0e1b0206a21cffe /src/game/Unit.cpp
parent55c25d894ed0eb53b7aac6b15bdddf0927565165 (diff)
[svn] * Fixed xp calculation for low level characters when grouped with a higher level player. Patch provided by Reiner030.
* Fixed positive spells being not resistable when cast on hostile units. Patch provided by QAston. * Fixed compile warnings in gcc. Patch provided by WarHead. --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 3b39fdefaf5..786ee62dafc 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2827,7 +2827,8 @@ SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool
// All positive spells can`t miss
// TODO: client not show miss log for this spells - so need find info for this in dbc and use it!
- if (IsPositiveSpell(spell->Id))
+ if (IsPositiveSpell(spell->Id)
+ &&(!IsHostileTo(pVictim))) //prevent from affecting enemy by "positive" spell
return SPELL_MISS_NONE;
// Check for immune (use charges)