Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Dancing Rune Weapon
- IF (dummySpell->Id == 49028)
- {
- // 1 dummy aura FOR dismiss rune blade
- IF (effIndex != 1)
- RETURN FALSE;
- Unit* pPet = NULL;
- FOR (ControlList::const_iterator itr = m_Controlled.BEGIN(); itr != m_Controlled.END(); ++itr) // Find Rune Weapon
- IF ((*itr)->GetEntry() == 27893)
- {
- pPet = *itr;
- break;
- }
- // special abilities damage
- IF (pPet && pPet->getVictim() && damage && procSpell)
- {
- pPet->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pPet->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- uint32 procDmg = damage / 2;
- pPet->SendSpellNonMeleeDamageLog(pPet->getVictim(), procSpell->Id, procDmg, GetSpellSchoolMask(procSpell), 0, 0, FALSE, 0, FALSE);
- pPet->DealDamage(pPet->getVictim(), procDmg, NULL, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(procSpell), procSpell, TRUE);
- break;
- }
- ELSE // copy 50% melee damage
- IF (pPet && pPet->getVictim() && damage && !procSpell)
- {
- CalcDamageInfo damageInfo;
- CalculateMeleeDamage(pPet->getVictim(), 0, &damageInfo, BASE_ATTACK);
- damageInfo.attacker = pPet;
- damageInfo.damage = damageInfo.damage / 2;
- // Send log damage message TO client
- pPet->DealDamageMods(pPet->getVictim(),damageInfo.damage,&damageInfo.absorb);
- pPet->SendAttackStateUpdate(&damageInfo);
- pPet->ProcDamageAndSpell(damageInfo.target, damageInfo.procAttacker, damageInfo.procVictim, damageInfo.procEx, damageInfo.damage, damageInfo.attackType);
- pPet->DealMeleeDamage(&damageInfo,TRUE);
- }
- ELSE
- RETURN FALSE;
- }
Advertisement
Add Comment
Please, Sign In to add comment