Guest User

Untitled

a guest
Nov 15th, 2011
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. From 7947d09233653b5c0018b104af5561ef532ad419 Mon Sep 17 00:00:00 2001
  2. From: unknown <exra@.(none)>
  3. Date: Tue, 15 Nov 2011 13:57:04 -0500
  4. Subject: [PATCH] fix blood tap. will now work when both runes are on cd and will also use the rune with the lowest cd if both are on cd
  5.  
  6. ---
  7. src/server/game/Spells/SpellEffects.cpp | 26 ++++++++++++++++++++++++++
  8. 1 files changed, 26 insertions(+), 0 deletions(-)
  9.  
  10. diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
  11. index 3767b6b..8bde10f 100755
  12. --- a/src/server/game/Spells/SpellEffects.cpp
  13. +++ b/src/server/game/Spells/SpellEffects.cpp
  14. @@ -6970,10 +6970,36 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
  15. {
  16. if (player->GetRuneCooldown(j) && player->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue))
  17. {
  18. + if (m_spellInfo->Id == 45529)
  19. + if(player->GetBaseRune(j) != RuneType(m_spellInfo->Effects[effIndex].MiscValueB))
  20. + continue;
  21. player->SetRuneCooldown(j, 0);
  22. --count;
  23. }
  24. }
  25. +
  26. + // Blood Tap
  27. + if (m_spellInfo->Id == 45529 && count > 0) {
  28. + for (uint32 l = 0; l < MAX_RUNES && count > 0; ++l)
  29. + {
  30. + // Check if both runes are on cd as that is the only time when this needs to come into effect
  31. + if ((player->GetRuneCooldown(l) && player->GetCurrentRune(l) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) && (player->GetRuneCooldown(l+1) && player->GetCurrentRune(l+1) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)))
  32. + {
  33. + // Should always update the rune with the lowest cd
  34. + if (player->GetRuneCooldown(l) >= player->GetRuneCooldown(l+1))
  35. + l++;
  36. + player->SetRuneCooldown(l, 0);
  37. + --count;
  38. + // is needed to push through to the client that the rune is active
  39. + player->ResyncRunes(MAX_RUNES);
  40. + }
  41. + else
  42. + {
  43. + break;
  44. + }
  45. + }
  46. + }
  47. +
  48. // Empower rune weapon
  49. if (m_spellInfo->Id == 47568)
  50. {
  51. --
  52. 1.7.3.1.msysgit.0
  53.  
  54.  
Advertisement
Add Comment
Please, Sign In to add comment