Core/Unit: rename more methods
Port From (https://github.com/TrinityCore/TrinityCore/commit/a58881d6dac1975b77abf361c5dc5ffcd755d2be)
This commit is contained in:
@@ -1819,7 +1819,7 @@ namespace Game.Entities
|
||||
|
||||
SaveRespawnTime();
|
||||
|
||||
ReleaseFocus(null, false); // remove spellcast focus
|
||||
ReleaseSpellFocus(null, false); // remove spellcast focus
|
||||
DoNotReacquireTarget(); // cancel delayed re-target
|
||||
SetTarget(ObjectGuid.Empty); // drop target - dead mobs shouldn't ever target things
|
||||
|
||||
@@ -2925,7 +2925,7 @@ namespace Game.Entities
|
||||
SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.Target), guid);
|
||||
}
|
||||
|
||||
public void FocusTarget(Spell focusSpell, WorldObject target)
|
||||
public void SetSpellFocusTarget(Spell focusSpell, WorldObject target)
|
||||
{
|
||||
// already focused
|
||||
if (_focusSpell != null)
|
||||
@@ -3005,7 +3005,7 @@ namespace Game.Entities
|
||||
{
|
||||
if (!IsAlive()) // dead creatures cannot focus
|
||||
{
|
||||
ReleaseFocus(null, false);
|
||||
ReleaseSpellFocus(null, false);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3026,7 +3026,7 @@ namespace Game.Entities
|
||||
return true;
|
||||
}
|
||||
|
||||
public void ReleaseFocus(Spell focusSpell = null, bool withDelay = true)
|
||||
public void ReleaseSpellFocus(Spell focusSpell = null, bool withDelay = true)
|
||||
{
|
||||
if (_focusSpell == null)
|
||||
return;
|
||||
|
||||
@@ -2343,9 +2343,9 @@ namespace Game.Spells
|
||||
if (!(m_spellInfo.IsNextMeleeSwingSpell() || IsAutoRepeat()))
|
||||
{
|
||||
if (m_targets.GetObjectTarget() && m_caster != m_targets.GetObjectTarget())
|
||||
m_caster.ToCreature().FocusTarget(this, m_targets.GetObjectTarget());
|
||||
m_caster.ToCreature().SetSpellFocusTarget(this, m_targets.GetObjectTarget());
|
||||
else if (m_spellInfo.HasAttribute(SpellAttr5.DontTurnDuringCast))
|
||||
m_caster.ToCreature().FocusTarget(this, null);
|
||||
m_caster.ToCreature().SetSpellFocusTarget(this, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2693,7 +2693,7 @@ namespace Game.Spells
|
||||
{
|
||||
Creature creatureCaster = m_caster.ToCreature();
|
||||
if (creatureCaster != null)
|
||||
creatureCaster.ReleaseFocus(this);
|
||||
creatureCaster.ReleaseSpellFocus(this);
|
||||
}
|
||||
|
||||
// Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells
|
||||
@@ -3161,7 +3161,7 @@ namespace Game.Spells
|
||||
|
||||
Creature creatureCaster = unitCaster.ToCreature();
|
||||
if (creatureCaster != null)
|
||||
creatureCaster.ReleaseFocus(this);
|
||||
creatureCaster.ReleaseSpellFocus(this);
|
||||
|
||||
if (!ok)
|
||||
return;
|
||||
@@ -3999,7 +3999,7 @@ namespace Game.Spells
|
||||
Creature creatureCaster = unitCaster.ToCreature();
|
||||
if (creatureCaster != null)
|
||||
if (!creatureCaster.HandleSpellFocus(this))
|
||||
creatureCaster.FocusTarget(this, Global.ObjAccessor.GetWorldObject(creatureCaster, target.TargetGUID));
|
||||
creatureCaster.SetSpellFocusTarget(this, Global.ObjAccessor.GetWorldObject(creatureCaster, target.TargetGUID));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user