Pelf

Pelf mushroom 1

May 31st, 2012
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.79 KB | None | 0 0
  1. diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
  2. index f0d0fc5..baf12a4 100644
  3. --- a/src/server/game/Spells/SpellEffects.cpp
  4. +++ b/src/server/game/Spells/SpellEffects.cpp
  5. @@ -2031,8 +2031,8 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
  6.                      m_caster->GetCreatureListWithEntryInGrid(summons, 47649, 50.f);
  7.                      for (std::list<Creature*>::iterator itr = summons.begin(); itr != summons.end(); ++itr)
  8.                      {
  9. -                        if (!(*itr) || !(*itr)->isAlive())
  10. -                            continue;
  11. +                        if (!(*itr) || !(*itr)->isAlive()
  12. +                            || (*itr)->GetOwnerGUID() != m_caster->GetGUID())
  13. +                            continue;
  14.                          (*itr)->SetVisible(true);
  15.                           m_caster->CastSpell((*itr), 78777, true);
  16.  
  17. @@ -4163,10 +4163,14 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
  18.                          {
  19.                              amount = 1;
  20.                              std::list<Creature*> summons;
  21. +                            uint32 num = 0;
  22.                              m_originalCaster->GetCreatureListWithEntryInGrid(summons, 47649, 50.f);
  23. -                            if (summons.size() >= 3)
  24. +                            if (summons.size() > 0)
  25. +                                for (std::list<Creature*>::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
  26. +                                    if ((*itr)->GetOwnerGUID() == m_originalCaster->GetGUID())
  27. +                                        num++;
  28. +                            if (num >= 3)
  29.                                  return;
  30. -
  31.                              break;
  32.                          }
  33.                      }
Advertisement
Add Comment
Please, Sign In to add comment