bucur35

Rune

Oct 28th, 2012
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 2.01 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.                     break;
  14.                 }
  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, GetSpellSchoolMask(procSpell), 0, 0, FALSE, 0, FALSE);
  23.                 pPet->DealDamage(pPet->getVictim(), procDmg, NULL, SPELL_DIRECT_DAMAGE, GetSpellSchoolMask(procSpell), 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