Skip to content

Commit

Permalink
Unit/Spell: Fix AnyFriendlyUnitInObjectRangeCheck missing assistabili…
Browse files Browse the repository at this point in the history
…ty condition
  • Loading branch information
killerwife committed Sep 24, 2023
1 parent c061072 commit 5a5f091
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/game/Grids/GridNotifiers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ namespace MaNGOS
WorldObject const& GetFocusObject() const { return *i_obj; }
bool operator()(Unit* u)
{
return u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range, true, i_ignorePhase);
return u->IsAlive() && i_obj->IsWithinDistInMap(u, i_range, true, i_ignorePhase) && i_obj->CanAssistSpell(u);
}
private:
WorldObject const* i_obj;
Expand Down
27 changes: 1 addition & 26 deletions src/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7415,26 +7415,14 @@ void Spell::EffectActivateObject(SpellEffectIndex effIdx)
switch (m_spellInfo->Id)
{
case 17731: // Onyxia - Eruption
case 24731:
case 40964: // Fel Crystalforge: Create 1 Flask
case 40965: // Fel Crystalforge: Create 5 Flasks
case 40968: // Bash'ir Crystalforge: Create 1 Flask
case 40970: // Bash'ir Crystalforge: Create 5 Flasks
case 42868:
case 45222: // Zul'Aman Object Visual - This spell is a custom GO cast spell and similar to Ritual of Souls where only channel start should be sent
gameObjTarget->SendGameObjectCustomAnim(gameObjTarget->GetObjectGuid());
break;
case 36546: // no delay meant to happen - activate trap immediately
case 38054:
case 39844:
gameObjTarget->Use(m_caster, m_spellInfo);
break;
case 46638: // Brutallus SWP - closes door
gameObjTarget->ResetDoorOrButton();
break;
default:
if (m_caster)
gameObjTarget->Use(m_caster);
gameObjTarget->Use(m_caster, m_spellInfo);
break;
}
break;
Expand Down Expand Up @@ -7503,19 +7491,6 @@ void Spell::EffectActivateObject(SpellEffectIndex effIdx)
gameObjTarget->SetLootState(GO_JUST_DEACTIVATED);
break;
}
case 40176: // Simon Game pre-game Begin, blue
case 40177: // Simon Game pre-game Begin, green
case 40178: // Simon Game pre-game Begin, red
case 40179: // Simon Game pre-game Begin, yellow
case 40283: // Simon Game END, blue
case 40284: // Simon Game END, green
case 40285: // Simon Game END, red
case 40286: // Simon Game END, yellow
case 40494: // Simon Game, switched ON
case 40495: // Simon Game, switched OFF
case 40512: // Simon Game, switch...disable Off switch
gameObjTarget->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT);
break;
case 40632: // Summon Gezzarak the Huntress
case 40640: // Summon Karrog
case 40642: // Summon Darkscreecher Akkarai
Expand Down

0 comments on commit 5a5f091

Please sign in to comment.