diff options
author | Xanadu <none@none> | 2010-06-27 20:40:41 +0200 |
---|---|---|
committer | Xanadu <none@none> | 2010-06-27 20:40:41 +0200 |
commit | ba2e5ec2a20dd069092a167a5ab3e68b66e1adf2 (patch) | |
tree | e51598b2080f1f37fd742922ac7d129fadfd7945 /src | |
parent | 0b063e189baf13889b28cb283a6c7d4f07e1da36 (diff) |
Fixed Shiv.
* Now it does weapon dmg and adds a combo point even without poison (yes, that's blizzlike).
* Poisons from Shiv cannot crit.
* No more double poison procs.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 7 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellEffects.cpp | 31 |
3 files changed, 12 insertions, 30 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 4100df480fe..37efe2a2aaa 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -7807,6 +7807,10 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 // Apply spell mods ApplySpellMod(pEnchant->spellid[s],SPELLMOD_CHANCE_OF_SUCCESS,chance); + + // Shiv has 100% chance to apply the poison + if (FindCurrentSpellBySpellId(5938)) + chance = 100.0f; if (roll_chance_f(chance)) { diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index c8715eedba0..c5a6e8440be 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -10445,7 +10445,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM } } // Custom crit by class - switch(spellProto->SpellFamilyName) + switch (spellProto->SpellFamilyName) { case SPELLFAMILY_DRUID: // Starfire @@ -10458,6 +10458,11 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM break; } break; + case SPELLFAMILY_ROGUE: + // Shiv-applied poisons can't crit + if (FindCurrentSpellBySpellId(5938)) + crit_chance = 0.0f; + break; case SPELLFAMILY_PALADIN: // Flash of light if (spellProto->SpellFamilyFlags[0] & 0x40000000) diff --git a/src/server/game/Spells/Auras/SpellEffects.cpp b/src/server/game/Spells/Auras/SpellEffects.cpp index 1279b738066..c64db1697a6 100644 --- a/src/server/game/Spells/Auras/SpellEffects.cpp +++ b/src/server/game/Spells/Auras/SpellEffects.cpp @@ -1738,41 +1738,14 @@ void Spell::EffectDummy(uint32 i) m_caster->CastSpell(m_caster, 63848, true); break; } - switch(m_spellInfo->Id) + switch (m_spellInfo->Id) { case 5938: // Shiv { if (m_caster->GetTypeId() != TYPEID_PLAYER) return; - Player *pCaster = m_caster->ToPlayer(); - - Item *item = pCaster->GetWeaponForAttack(OFF_ATTACK); - if (!item) - return; - - // all poison enchantments is temporary - uint32 enchant_id = item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT); - if (!enchant_id) - return; - - SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); - if (!pEnchant) - return; - - for (int s=0; s<3; s++) - { - if (pEnchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL) - continue; - - SpellEntry const* combatEntry = sSpellStore.LookupEntry(pEnchant->spellid[s]); - if (!combatEntry || combatEntry->Dispel != DISPEL_POISON) - continue; - - m_caster->CastSpell(unitTarget, combatEntry, true, item); - } - - m_caster->CastSpell(unitTarget, 5940, true); + m_caster->CastSpell(unitTarget, 5940, true); return; } case 14185: // Preparation |