Core/Entities: kill unused return value from Unit::HandleSpellClick
Port From (https://github.com/TrinityCore/TrinityCore/commit/a1a00f823e7e47e8cb652b71a839c1d0875a8f84)
This commit is contained in:
@@ -2900,12 +2900,12 @@ namespace Game.Entities
|
||||
if (!obj.HasNpcFlag(NPCFlags.SpellClick))
|
||||
continue;
|
||||
|
||||
var clickPair = Global.ObjectMgr.GetSpellClickInfoMapBounds(obj.GetEntry());
|
||||
foreach (var spell in clickPair)
|
||||
var clickBounds = Global.ObjectMgr.GetSpellClickInfoMapBounds(obj.GetEntry());
|
||||
foreach (var spellClickInfo in clickBounds)
|
||||
{
|
||||
//! This code doesn't look right, but it was logically converted to condition system to do the exact
|
||||
//! same thing it did before. It definitely needs to be overlooked for intended functionality.
|
||||
List<Condition> conds = Global.ConditionMgr.GetConditionsForSpellClickEvent(obj.GetEntry(), spell.spellId);
|
||||
List<Condition> conds = Global.ConditionMgr.GetConditionsForSpellClickEvent(obj.GetEntry(), spellClickInfo.spellId);
|
||||
if (conds != null)
|
||||
{
|
||||
bool buildUpdateBlock = false;
|
||||
|
||||
@@ -251,11 +251,11 @@ namespace Game.Entities
|
||||
if (!creature.HasNpcFlag(NPCFlags.SpellClick))
|
||||
return false;
|
||||
|
||||
var clickPair = Global.ObjectMgr.GetSpellClickInfoMapBounds(creature.GetEntry());
|
||||
if (clickPair.Empty())
|
||||
var clickBounds = Global.ObjectMgr.GetSpellClickInfoMapBounds(creature.GetEntry());
|
||||
if (clickBounds.Empty())
|
||||
return false;
|
||||
|
||||
foreach (var spellClickInfo in clickPair)
|
||||
foreach (var spellClickInfo in clickBounds)
|
||||
{
|
||||
if (!spellClickInfo.IsFitToRequirements(this, creature))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user