[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
This commit is contained in:
w12x
2008-10-26 11:50:07 -05:00
parent 55c25d894e
commit 6f2e0ee48a
10 changed files with 31 additions and 18 deletions

View File

@@ -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)