Jump to content

thenecromancer

Members
  • Posts

    110
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by thenecromancer

  1. This patch is outdated ( already implemented in another ) Thanks to Vincex for pointing error though
  2. not true... Cleave and Whirlwind do not use Spell Damage ( they should be limited with AP normalization in some way, not Cleave though ) and Whirlwind is suitable on 1 enemy as well since it is instant attack dealing full weapon damage and not reseting weapon timer Anyway nice found, I was always wondering why these spells don't match wiki or drDamage while all others do
  3. Not much to do- these defenses shouldn't be active when casting spell or when stunned Still, due to wwiki it seems that you can dodge when incapacitated ( eg. Gouge ), and when your attack is Parried you won't loose any rage. As for first I'm not sure if it is true, and second cannot be done well with current spell system Index: game/Unit.cpp =================================================================== --- game/Unit.cpp (revision 5460) +++ game/Unit.cpp (working copy) @@ -3033,6 +3033,10 @@ float Unit::GetUnitParryChance() const { float chance = 0; + + if ( IsNonMeleeSpellCasted(false) || hasUnitState(UNIT_STAT_STUNDED)) + return 0; + if(GetTypeId() == TYPEID_PLAYER) { Player const* player = (Player const*)this; @@ -3061,6 +3065,10 @@ float Unit::GetUnitBlockChance() const { + + if ( IsNonMeleeSpellCasted(false) || hasUnitState(UNIT_STAT_STUNDED)) + return 0; + if(GetTypeId() == TYPEID_PLAYER) { Item *tmpitem = ((Player const*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); @@ -3455,7 +3463,7 @@ } } -bool Unit::IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled, bool skipAutorepeat) +bool Unit::IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled, bool skipAutorepeat) const { // We don't do loop here to explicitly show that melee spell is excluded. // Maybe later some special spells will be excluded too. Index: game/Unit.h =================================================================== --- game/Unit.h (revision 5460) +++ game/Unit.h (working copy) @@ -853,7 +853,7 @@ // set withDelayed to true to account delayed spells as casted // delayed+channeled spells are always accounted as casted // we can skip channeled or delayed checks using flags - bool IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled = false, bool skipAutorepeat = false); + bool IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled = false, bool skipAutorepeat = false) const; // set withDelayed to true to interrupt delayed spells too // delayed+channeled spells are always interrupted EDIT: sorry couldn't convert from const ..
  4. Berserker Rage should increase rage generation from taken damage, not from damage dealt Index: game/Player.cpp =================================================================== --- game/Player.cpp (revision 5456) +++ game/Player.cpp (working copy) @@ -1707,13 +1707,15 @@ // talent who gave more rage on attack addRage *= 1.0f + GetTotalAuraModifier(SPELL_AURA_MOD_RAGE_FROM_DAMAGE_DEALT) / 100.0f; + } + else + { + addRage = damage/rageconversion*2.5; // Berserker Rage effect if(GetAura(18499,0)) addRage *= 1.3; } - else - addRage = damage/rageconversion*2.5; addRage *= sWorld.getRate(RATE_POWER_RAGE_INCOME);
  5. I guess so, some more spells need to return false cancast even condition is clear ( eg Mana Burn effects should not be casted on targets that are not using mana - including shapeshifted druid )
  6. bump, this code still does not make any sense
  7. rev 5322 this code makes only little sense - first at all, vanish cannot free from disorient effect and also it is not channeled at all also root effects shouldn't iterrupt channeling, that makes no sense - don't know if it is related to ranged weapon failing when rooted.. probably not Index: game/Spell.cpp =================================================================== --- game/Spell.cpp (revision 5322) +++ game/Spell.cpp (working copy) @@ -1987,8 +1987,7 @@ // check for incapacitating player states //Player can use vanish even if he is incapacitated - if( m_caster->hasUnitState(UNIT_STAT_STUNDED | UNIT_STAT_ROOT | UNIT_STAT_CONFUSED) && - !(m_spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && m_spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_ROGUE_VANISH)) + if( m_caster->hasUnitState(UNIT_STAT_STUNDED | UNIT_STAT_CONFUSED)) cancel(); // check if player has turned if flag is set
  8. thx that's somewhat better and also works for the silence effects
  9. CC efects should interrupt casting as well, this should also get rid of casting effect staying on unit ( like burning hands ) when they were in stun while finishing the cast Index: game/SpellAuras.cpp =================================================================== --- game/SpellAuras.cpp (revision 4393) +++ game/SpellAuras.cpp (working copy) @@ -1885,6 +1885,16 @@ if ( caster && (GetSpellProto()->Mechanic == MECHANIC_CONFUSED) && (GetSpellProto()->SpellFamilyName == SPELLFAMILY_ROGUE)) caster->AttackStop(); // only at real add aura + + // Interrupt spellcasting + for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++) + { + if (m_target->m_currentSpells[i]) + { + m_target->InterruptSpell(i); + } + } + if(Real) { //This fixes blind so it doesn't continue to attack @@ -1929,6 +1939,15 @@ m_target->addUnitState(UNIT_STAT_FLEEING); m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_ROTATE | UNIT_FLAG_FLEEING); + // Interrupt spellcasting + for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++) + { + if (m_target->m_currentSpells[i]) + { + m_target->InterruptSpell(i); + } + } + // only at real add aura if(Real) { @@ -2046,6 +2065,15 @@ m_target->SetOrientation(m_target->GetAngle(caster)); } + // Interrupt spellcasting + for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++) + { + if (m_target->m_currentSpells[i]) + { + m_target->InterruptSpell(i); + } + } + // Creature specific if(m_target->GetTypeId() != TYPEID_PLAYER) {
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use