diff options
| author | megamage <none@none> | 2009-04-27 18:42:35 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-04-27 18:42:35 -0500 |
| commit | 09af28301e646bf75b63113129996724550d7dd6 (patch) | |
| tree | a36f7bb0f369c13b71958f40e0247150417ba18e /src/game/Unit.cpp | |
| parent | 5ac67c27f71a7b53fbce92ffdab3adb62b6baf0c (diff) | |
[7716] Fixed some typos and possible crashes. Author: AlexDereka
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 90a2a228397..7f197c16ac9 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2418,12 +2418,12 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack if(pVictim->GetTypeId()==TYPEID_PLAYER || !(((Creature*)pVictim)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_PARRY) ) { - int32 tmp = int32(parry_chance); - if ( (tmp > 0) // check if unit _can_ parry - && ((tmp -= skillBonus) > 0) - && (roll < (sum += tmp))) + int32 tmp2 = int32(parry_chance); + if ( (tmp2 > 0) // check if unit _can_ parry + && ((tmp2 -= skillBonus) > 0) + && (roll < (sum += tmp2))) { - DEBUG_LOG ("RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp, sum); + DEBUG_LOG ("RollMeleeOutcomeAgainst: PARRY <%d, %d)", sum-tmp2, sum); return MELEE_HIT_PARRY; } } @@ -3327,7 +3327,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell ) { assert(pSpell); // NULL may be never passed here, use InterruptSpell or InterruptNonMeleeSpells - uint32 CSpellType = pSpell->GetCurrentContainer(); + CurrentSpellTypes CSpellType = pSpell->GetCurrentContainer(); if (pSpell == m_currentSpells[CSpellType]) return; // avoid breaking self |
