Ports from (https://github.com/TrinityCore/TrinityCore)
Core/Unit: don't clear low health aura states on death Core/Gossip: Fix gossip bug on modify money Core/Spells: Change the radius of PBAoEs following the feedback received on Core/Player: update interaction checks, some info taken from client Core/Spell: abort channeling if no valid targets are found after searching Core/Creature: fix _DespawnAtEvade saving wrong respawn time Core/Spell: fixed some problems with per caster aura states Quickfix a bug introduced by 2f19d97 which prevented GTAoE from being cast. Core/SmartAI: allow SMART_ACTION_SEND_GOSSIP_MENU to override default gossip Core/Spell: in case of immunity, check all effects to choose correct procFlags, as none has technically hit Fix evade issues when a spell hits the target just before evading. Scripts/Command: implement .debug play music command Partial revert, Unit::getAttackerForHelper() shouldn't return units that we aren't in combat with (victim can be such a unit for players/player pets, which can startattack from a distance without entering combat). Fix an issue where CanSpawn would never get invoked on creatures without per-guid script. Core/Players: fix null dereference crash
This commit is contained in:
@@ -266,6 +266,14 @@ namespace Game.Spells
|
||||
|
||||
if (m_spellInfo.IsChanneled())
|
||||
{
|
||||
// maybe do this for all spells?
|
||||
if (m_UniqueTargetInfo.Empty() && m_UniqueGOTargetInfo.Empty() && m_UniqueItemInfo.Empty() && !m_targets.HasDst())
|
||||
{
|
||||
SendCastResult(SpellCastResult.BadImplicitTargets);
|
||||
Finish(false);
|
||||
return;
|
||||
}
|
||||
|
||||
uint mask = (1u << (int)effect.EffectIndex);
|
||||
foreach (var ihit in m_UniqueTargetInfo)
|
||||
{
|
||||
@@ -736,9 +744,6 @@ namespace Game.Spells
|
||||
return;
|
||||
|
||||
float radius = effect.CalcRadius(m_caster) * m_spellValue.RadiusMod;
|
||||
// if this is a proximity based aoe (Frost Nova, Psychic Scream, ...), include the caster's own combat reach
|
||||
if (targetType.IsProximityBasedAoe())
|
||||
radius += GetCaster().GetCombatReach();
|
||||
|
||||
SearchAreaTargets(targets, radius, center, referer, targetType.GetObjectType(), targetType.GetCheckType(), effect.ImplicitTargetConditions);
|
||||
|
||||
@@ -1816,7 +1821,8 @@ namespace Game.Spells
|
||||
{
|
||||
for (byte i = 0; i < SpellConst.MaxEffects; ++i)
|
||||
{
|
||||
if (!Convert.ToBoolean(target.effectMask & (1 << i)))
|
||||
// in case of immunity, check all effects to choose correct procFlags, as none has technically hit
|
||||
if (target.effectMask != 0 && !Convert.ToBoolean(target.effectMask & (1 << i)))
|
||||
continue;
|
||||
|
||||
if (!m_spellInfo.IsPositiveEffect(i))
|
||||
|
||||
@@ -2452,8 +2452,7 @@ namespace Game.Spells
|
||||
|
||||
// this effect use before aura Taunt apply for prevent taunt already attacking target
|
||||
// for spell as marked "non effective at already attacking target"
|
||||
if (unitTarget == null || !unitTarget.CanHaveThreatList()
|
||||
|| unitTarget.GetVictim() == m_caster)
|
||||
if (!unitTarget.CanHaveThreatList() || unitTarget.GetVictim() == m_caster)
|
||||
{
|
||||
SendCastResult(SpellCastResult.DontReport);
|
||||
return;
|
||||
|
||||
@@ -4398,34 +4398,6 @@ namespace Game.Spells
|
||||
return GetSelectionCategory() == SpellTargetSelectionCategories.Area || GetSelectionCategory() == SpellTargetSelectionCategories.Cone;
|
||||
}
|
||||
|
||||
public bool IsProximityBasedAoe()
|
||||
{
|
||||
switch (_target)
|
||||
{
|
||||
case Targets.UnitSrcAreaEntry:
|
||||
case Targets.UnitSrcAreaEnemy:
|
||||
case Targets.UnitCasterAreaParty:
|
||||
case Targets.UnitSrcAreaAlly:
|
||||
case Targets.UnitSrcAreaParty:
|
||||
case Targets.UnitLastTargetAreaParty:
|
||||
case Targets.GameobjectSrcArea:
|
||||
case Targets.UnitCasterAreaRaid:
|
||||
case Targets.CorpseSrcAreaEnemy:
|
||||
return true;
|
||||
|
||||
case Targets.UnitDestAreaEntry:
|
||||
case Targets.UnitDestAreaEnemy:
|
||||
case Targets.UnitDestAreaAlly:
|
||||
case Targets.UnitDestAreaParty:
|
||||
case Targets.GameobjectDestArea:
|
||||
case Targets.UnitAreaRaidClass:
|
||||
return false;
|
||||
|
||||
default:
|
||||
Log.outWarn(LogFilter.Spells, "SpellImplicitTargetInfo.IsProximityBasedAoe called a non-aoe spell");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public SpellTargetSelectionCategories GetSelectionCategory()
|
||||
{
|
||||
return _data[(int)_target].SelectionCategory;
|
||||
|
||||
Reference in New Issue
Block a user