summaryrefslogtreecommitdiff
path: root/src/server/game/Spells
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells')
-rw-r--r--src/server/game/Spells/Spell.cpp6
-rw-r--r--src/server/game/Spells/SpellEffects.cpp13
-rw-r--r--src/server/game/Spells/SpellInfoCorrections.cpp6
3 files changed, 19 insertions, 6 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 4ae8bfca43..644cce3b65 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2392,7 +2392,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
targetInfo.reflectResult = SPELL_MISS_PARRY;
// Increase time interval for reflected spells by 1.5
- m_caster->m_Events.AddEvent(new ReflectEvent(m_caster, targetInfo.targetGUID, m_spellInfo), m_caster->m_Events.CalculateTime(targetInfo.timeDelay));
+ m_caster->m_Events.AddEventAtOffset(new ReflectEvent(m_caster, targetInfo.targetGUID, m_spellInfo), Milliseconds(targetInfo.timeDelay));
targetInfo.timeDelay += targetInfo.timeDelay >> 1;
m_spellFlags |= SPELL_FLAG_REFLECTED;
@@ -3439,7 +3439,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
// create and add update event for this spell
_spellEvent = new SpellEvent(this);
- m_caster->m_Events.AddEvent(_spellEvent, m_caster->m_Events.CalculateTime(1));
+ m_caster->m_Events.AddEventAtOffset(_spellEvent, 1ms);
if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_SPELL, m_spellInfo->Id, m_caster))
{
@@ -8166,7 +8166,7 @@ bool SpellEvent::IsDeletable() const
return m_Spell->IsDeletable();
}
-bool ReflectEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
+bool ReflectEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
Unit* target = ObjectAccessor::GetUnit(*_caster, _targetGUID);
if (target && _caster->IsInMap(target))
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index d8dcba2d5b..7c0cd6c45e 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -2429,8 +2429,14 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
}
break;
}
- case SUMMON_TYPE_JEEVES:
case SUMMON_TYPE_MINIPET:
+ // For companions, recalculate the position to ensure they spawn at the intended π/4 angle.
+ destTarget->Relocate(m_originalCaster->GetNearPosition(
+ m_originalCaster->GetDistance2d(destTarget->GetPositionX(), destTarget->GetPositionY()),
+ MINI_PET_SUMMON_ANGLE
+ ));
+ [[fallthrough]];
+ case SUMMON_TYPE_JEEVES:
{
summon = m_caster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, m_originalCaster, m_spellInfo->Id, 0, personalSpawn);
if (!summon || !summon->HasUnitTypeMask(UNIT_MASK_MINION))
@@ -2446,8 +2452,9 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
//summon->AI()->EnterEvadeMode();
if (properties->Type != SUMMON_TYPE_JEEVES)
{
+ summon->SetFacingToObject(m_originalCaster);
summon->GetMotionMaster()->Clear(false);
- summon->GetMotionMaster()->MoveFollow(m_originalCaster, PET_FOLLOW_DIST, summon->GetFollowAngle(), MOTION_SLOT_ACTIVE);
+ summon->GetMotionMaster()->MoveFollow(m_originalCaster, PET_FOLLOW_DIST, MINI_PET_FOLLOW_ANGLE, MOTION_SLOT_ACTIVE);
}
break;
}
@@ -5206,7 +5213,7 @@ void Spell::EffectResurrectPet(SpellEffIndex /*effIndex*/)
{
// Position passed to SummonPet is irrelevant with current implementation,
// pet will be relocated without using these coords in Pet::LoadPetFromDB
- player->SummonPet(0, 0.0f, 0.0f, 0.0f, 0.0f, SUMMON_PET, 0s, damage);
+ player->SummonPet(0, 0.0f, 0.0f, 0.0f, 0.0f, SUMMON_PET, 0ms, damage);
return;
}
diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp
index 9873af3253..6712f11091 100644
--- a/src/server/game/Spells/SpellInfoCorrections.cpp
+++ b/src/server/game/Spells/SpellInfoCorrections.cpp
@@ -5151,6 +5151,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx3 |= SPELL_ATTR3_ALWAYS_HIT;
});
+ // Earth Shield
+ ApplySpellFix({ 55599, 58981 }, [](SpellInfo* spellInfo)
+ {
+ spellInfo->AttributesEx5 |= SPELL_ATTR5_LIMIT_N;
+ });
+
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];