Pelf

Pelf transmute 1

May 31st, 2012
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.84 KB | None | 0 0
  1. diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
  2. index 9f066a8..f0d0fc5 100644
  3. --- a/src/server/game/Spells/SpellEffects.cpp
  4. +++ b/src/server/game/Spells/SpellEffects.cpp
  5. @@ -3486,14 +3486,44 @@ void Spell::EffectCreateItem2(SpellEffIndex effIndex)
  6.      if (m_caster->GetTypeId() != TYPEID_PLAYER)
  7.          return;
  8.      Player* player = (Player*)m_caster;
  9. +    bool custom = false;
  10.  
  11.      uint32 item_id = m_spellInfo->EffectItemType[effIndex];
  12.  
  13. +    switch (m_spellInfo->Id)
  14. +    {
  15. +        case 78866: // Transmute: Living Elements
  16. +            custom = true;
  17. +            uint32 zoneid = m_caster->GetZoneId();
  18. +            switch (zoneid)
  19. +            {
  20. +                case 5034: // Uldum
  21. +                    item_id = 52328; // Volatile Air
  22. +                    break;
  23. +                case 5052: // Deepholm
  24. +                    item_id = 52327; // Volatile Earth
  25. +                    break;
  26. +                case 4815: // Vashj'ir: Kelp'thar Forest
  27. +                case 5144: // Vashj'ir: Shimmering Expanse
  28. +                case 5145: // Vashj'ir: Abyssal Depths
  29. +                case 5146: // Vashj'ir
  30. +                    item_id = 52326; // Volatile Water
  31. +                    break;
  32. +                case 616: // Mount Hyjal
  33. +                    item_id = 52325; // Volatile Fire
  34. +                    break;
  35. +                default: // All other zones
  36. +                    item_id = 52325 + urand(0, 3); // Random item_id
  37. +                    break;
  38. +            }
  39. +            break;
  40. +    }
  41. +
  42.      if (item_id)
  43.          DoCreateItem(effIndex, item_id);
  44.  
  45.      // special case: fake item replaced by generate using spell_loot_template
  46. -    if (IsLootCraftingSpell(m_spellInfo))
  47. +    if (IsLootCraftingSpell(m_spellInfo) && !custom)
  48.      {
  49.          if (item_id)
  50.          {
Advertisement
Add Comment
Please, Sign In to add comment