Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.43 KB | None | 0 0
  1. Author: reeshack <richard.galis@gmail.com>  2011-02-18 18:51:21
  2. Committer: reeshack <richard.galis@gmail.com>  2011-02-18 18:51:21
  3. Parent: 78ee00e6d43a51b7c4b20cedd2ed7d2de3c7b6c8 (booooooooooooordel)
  4. Child:  280d562037f1d517efbe2ad63a167c903217eb50 ([pr1075] Do not split damage if pet is controlled)
  5. Branches: master, remotes/origin/master, remotes/origin/mmap_new
  6. Follows: 333a
  7. Precedes:
  8.  
  9.     [pr1074] Blood Gorged - remove/add aura at 75% of HP
  10.    
  11.     Signed-off-by: reeshack <richard.galis@gmail.com>
  12.  
  13. ------------------------------ src/game/Unit.cpp ------------------------------
  14. index 6257831..693afa6 100644
  15. @@ -12168,6 +12168,35 @@ int32 Unit::ModifyHealth(int32 dVal)
  16.          SetHealth(maxHealth);
  17.          gain = maxHealth - curHealth;
  18.      }
  19. +    // Blood Gorged - remove/add aura at 75% of HP
  20. +    if (GetTypeId() == TYPEID_PLAYER && (Player*)this->getClass() == CLASS_DEATH_KNIGHT)
  21. +    {
  22. +        SpellEntry const* bloodGorgedInfo = NULL;
  23. +        if ((Player*)this->HasSpell(61154))
  24. +            bloodGorgedInfo = sSpellStore.LookupEntry(61154);
  25. +        else if ((Player*)this->HasSpell(61155))
  26. +            bloodGorgedInfo = sSpellStore.LookupEntry(61155);
  27. +        else if ((Player*)this->HasSpell(61156))
  28. +            bloodGorgedInfo = sSpellStore.LookupEntry(61156);
  29. +        else if ((Player*)this->HasSpell(61157))
  30. +            bloodGorgedInfo = sSpellStore.LookupEntry(61157);
  31. +        else if ((Player*)this->HasSpell(61158))
  32. +            bloodGorgedInfo = sSpellStore.LookupEntry(61158);
  33. +
  34. +        if (bloodGorgedInfo)
  35. +        {
  36. +            if (GetHealthPercent() >= 75.0f)
  37. +            {
  38. +                if (!HasAura(bloodGorgedInfo->EffectTriggerSpell[EFFECT_INDEX_0]))
  39. +                    CastSpell(this,bloodGorgedInfo->EffectTriggerSpell[EFFECT_INDEX_0],true);
  40. +            }
  41. +            else
  42. +            {
  43. +                if (HasAura(bloodGorgedInfo->EffectTriggerSpell[EFFECT_INDEX_0]))
  44. +                    RemoveAurasDueToSpell(bloodGorgedInfo->EffectTriggerSpell[EFFECT_INDEX_0]);
  45. +            }
  46. +        }
  47. +    }
  48.  
  49.      return gain;
  50.  }
  51.  
  52. --------------------------- src/shared/revision_nr.h ---------------------------
  53. index 2de315b..62e3406 100644
  54. @@ -1,6 +1,6 @@
  55.  #ifndef __REVISION_NR_H__
  56.  #define __REVISION_NR_H__
  57.   #define REVISION_NR "11062"
  58. - #define REVISION_VP "pr1073"
  59. + #define REVISION_VP "pr1074"
  60.   #define REVISION_VP_DATE "10.2.2011"
  61.  #endif // __REVISION_NR_H__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement