Advertisement
brumm

dancing rune weapon old?

Oct 13th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. // Dancing Rune Weapon
  2. if (dummySpell->Id == 49028)
  3. {
  4. // 1 dummy aura for dismiss rune blade
  5. if (effIndex != 1)
  6. return false;
  7.  
  8. Unit* pPet = NULL;
  9. for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) // Find Rune Weapon
  10. if ((*itr)->GetEntry() == 27893)
  11. {
  12. pPet = *itr;
  13. triggered_spell_id = 50707;
  14. break;
  15. }
  16. // special abilities damage
  17. if (pPet && pPet->GetVictim() && damage && procSpell)
  18. {
  19. pPet->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
  20. pPet->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
  21. uint32 procDmg = damage / 2;
  22. pPet->SendSpellNonMeleeDamageLog(pPet->GetVictim(), procSpell->Id, procDmg, procSpell->GetSchoolMask(), 0, 0, false, 0, false);
  23. pPet->DealDamage(pPet->GetVictim(), procDmg, NULL, SPELL_DIRECT_DAMAGE, procSpell->GetSchoolMask(), procSpell, true);
  24. break;
  25. }
  26. else // copy 50% melee damage
  27. if (pPet && pPet->GetVictim() && damage && !procSpell)
  28. {
  29. CalcDamageInfo damageInfo;
  30. CalculateMeleeDamage(pPet->GetVictim(), 0, &damageInfo, BASE_ATTACK);
  31. damageInfo.attacker = pPet;
  32. damageInfo.damage = damageInfo.damage / 2;
  33. // Send log damage message to client
  34. pPet->DealDamageMods(pPet->GetVictim(), damageInfo.damage, &damageInfo.absorb);
  35. pPet->SendAttackStateUpdate(&damageInfo);
  36. pPet->ProcDamageAndSpell(damageInfo.target, damageInfo.procAttacker, damageInfo.procVictim, damageInfo.procEx, damageInfo.damage, damageInfo.attackType);
  37. pPet->DealMeleeDamage(&damageInfo, true);
  38. }
  39. else
  40. return false;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement