Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case SPELLFAMILY_ROGUE:
- {
- // Dėl šitos sąlygos palužta:
- if(m_CastItem->GetTypeId() == TYPEID_ITEM)
- // Envenom
- if (m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x800000000)))
- {
- // consume from stack dozes not more that have combo-points
- if(uint32 combo = ((Player*)m_caster)->GetComboPoints())
- {
- Aura *poison = 0;
- // Lookup for Deadly poison (only attacker applied)
- Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
- for(Unit::AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
- {
- // Deadly poison (only attacker applied)
- if ((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_ROGUE && ((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x10000)) &&
- (*itr)->GetSpellProto()->SpellVisual==5100 && (*itr)->GetCasterGuid() == m_caster->GetObjectGuid())
- {
- poison = *itr;
- break;
- }
- }
- // count consumed deadly poison doses at target
- if (poison)
- {
- uint32 spellId = poison->GetId();
- uint32 doses = poison->GetStackAmount();
- if (doses > combo)
- doses = combo;
- unitTarget->RemoveAuraHolderFromStack(spellId, doses, m_caster->GetObjectGuid());
- damage *= doses;
- damage += int32(((Player*)m_caster)->GetTotalAttackPowerValue(BASE_ATTACK) * 0.03f * doses);
- }
- // Eviscerate and Envenom Bonus Damage (item set effect)
- if (m_caster->GetDummyAura(37169))
- damage += ((Player*)m_caster)->GetComboPoints()*40;
- }
- }
- // Eviscerate
- else if ((m_spellInfo->SpellFamilyFlags & UI64LIT(0x00020000)) && m_caster->GetTypeId()==TYPEID_PLAYER)
- {
- if(uint32 combo = ((Player*)m_caster)->GetComboPoints())
- {
- damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * combo * 0.03f);
- // Eviscerate and Envenom Bonus Damage (item set effect)
- if(m_caster->GetDummyAura(37169))
- damage += combo*40;
- }
- }
- break;
- }
- case SPELLFAMILY_HUNTER:
- {
- // Steady Shot
- if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x100000000))
- {
- int32 base = irand((int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MINDAMAGE),(int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MAXDAMAGE));
- damage += int32(float(base)/m_caster->GetAttackTime(RANGED_ATTACK)*2800 + m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.2f);
- }
- break;
- }
Add Comment
Please, Sign In to add comment