Projekt

Allgemein

Profil

Fehler #17235

Von Rushor vor fast 9 Jahren aktualisiert

https://db.rising-gods.de/?spell=50286 

 die periodic ticks treffen auch ziehe die nicht in los zum caster sein. 

 fix: 

 <pre> 
 diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp 
 index d6e5dc1..8c92a50 100644 
 --- a/src/server/scripts/Spells/spell_druid.cpp 
 +++ b/src/server/scripts/Spells/spell_druid.cpp 
 @@ -759,6 +759,20 @@ class spell_dru_starfall_aoe : public SpellScriptLoader 
          } 
  }; 
 
 +class druid_los_check 
 +{ 
 +      public: 
 +          explicit druid_los_check(Unit* caster) : _caster(caster) { } 
 + 
 +      bool operator()(WorldObject* target) const 
 +      { 
 +          return !target->IsWithinLOSInMap(_caster); 
 +      } 
 + 
 +      private: 
 +          Unit* _caster; 
 +}; 
 + 
  // -50286 - Starfall (Dummy) 
  class spell_dru_starfall_dummy : public SpellScriptLoader 
  { 
 @@ -771,6 +785,7 @@ class spell_dru_starfall_dummy : public SpellScriptLoader 
 
              void FilterTargets(std::list<WorldObject*>& targets) 
              { 
 +                  targets.remove_if(druid_los_check(GetCaster())); 
                  Trinity::Containers::RandomResizeList(targets, 2); 
              } 
 
 @@ -943,6 +958,11 @@ class spell_dru_typhoon : public SpellScriptLoader 
          { 
              PrepareSpellScript(spell_dru_typhoon_SpellScript); 
 
 +              void FilterTargets(std::list<WorldObject*>& targets) 
 +              { 
 +                  targets.remove_if(druid_los_check(GetCaster())); 
 +              } 
 + 
              void HandleKnockBack(SpellEffIndex effIndex) 
              { 
                  // Glyph of Typhoon 
 @@ -952,6 +972,9 @@ class spell_dru_typhoon : public SpellScriptLoader 
 
              void Register() override 
              { 
 +                  OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dru_typhoon_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CONE_ENEMY_104); 
 +                  OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dru_typhoon_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_CONE_ENEMY_104); 
 +                  OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dru_typhoon_SpellScript::FilterTargets, EFFECT_2, TARGET_UNIT_CONE_ENEMY_104); 
                  OnEffectHitTarget += SpellEffectFn(spell_dru_typhoon_SpellScript::HandleKnockBack, EFFECT_0, SPELL_EFFECT_KNOCK_BACK); 
              } 
          }; 

 </pre> 

Zurück