mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7716] Fixed some typos and possible crashes.
This commit is contained in:
parent
c2e6dd20dd
commit
c9d51a6dc7
25 changed files with 281 additions and 263 deletions
|
|
@ -2103,12 +2103,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;
|
||||
}
|
||||
}
|
||||
|
|
@ -2989,7 +2989,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue