aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells
diff options
context:
space:
mode:
authorDDuarte <dnpd.dd@gmail.com>2014-01-10 18:32:05 +0000
committerDDuarte <dnpd.dd@gmail.com>2014-01-10 18:32:05 +0000
commit33c2bd5ce1f4f8d20981e9f7aea90e37de0abbda (patch)
tree823ad5570f27e923c77203660ee7cc12e26182ec /src/server/game/Spells
parent352a2682b1d531c83bd2b80704233677448e99de (diff)
parenta63780fd90701ed81a0a5f2030e82ab1f6927ab4 (diff)
Merge branch 'master' into 4.3.4
Conflicts: src/server/game/Entities/Creature/Creature.cpp src/server/game/Entities/Creature/Creature.h src/server/game/Entities/Creature/GossipDef.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Transport/Transport.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Globals/ObjectMgr.cpp src/server/game/Globals/ObjectMgr.h src/server/game/Handlers/QuestHandler.cpp src/server/game/Handlers/SpellHandler.cpp src/server/game/Handlers/TradeHandler.cpp src/server/game/Quests/QuestDef.h src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp src/server/scripts/EasternKingdoms/zone_ghostlands.cpp src/server/scripts/EasternKingdoms/zone_hinterlands.cpp src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp src/server/scripts/Kalimdor/zone_azshara.cpp src/server/scripts/Kalimdor/zone_darkshore.cpp src/server/scripts/Kalimdor/zone_desolace.cpp src/server/scripts/Northrend/zone_dalaran.cpp src/tools/CMakeLists.txt
Diffstat (limited to 'src/server/game/Spells')
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp4
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp14
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.h2
-rw-r--r--src/server/game/Spells/Spell.cpp73
-rw-r--r--src/server/game/Spells/Spell.h2
-rw-r--r--src/server/game/Spells/SpellEffects.cpp9
-rw-r--r--src/server/game/Spells/SpellInfo.cpp8
-rw-r--r--src/server/game/Spells/SpellMgr.cpp6
-rw-r--r--src/server/game/Spells/SpellScript.h6
9 files changed, 72 insertions, 52 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 4a9854333a5..53350f8328a 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -804,7 +804,7 @@ void AuraEffect::ApplySpellMod(Unit* target, bool apply)
{
Aura* aura = iter->second->GetBase();
// only passive and permament auras-active auras should have amount set on spellcast and not be affected
- // if aura is casted by others, it will not be affected
+ // if aura is cast by others, it will not be affected
if ((aura->IsPassive() || aura->IsPermanent()) && aura->GetCasterGUID() == guid && aura->GetSpellInfo()->IsAffectedBySpellMod(m_spellmod))
{
if (GetMiscValue() == SPELLMOD_ALL_EFFECTS)
@@ -4704,7 +4704,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
case 42783: // Wrath of the Astromancer
target->CastSpell(target, GetAmount(), true, NULL, this);
break;
- case 46308: // Burning Winds casted only at creatures at spawn
+ case 46308: // Burning Winds cast only at creatures at spawn
target->CastSpell(target, 47287, true, NULL, this);
break;
case 52172: // Coyote Spirit Despawn Aura
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index a984ee7b035..4a1eeed46b1 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -114,12 +114,12 @@ void AuraApplication::_Remove()
void AuraApplication::_InitFlags(Unit* caster, uint8 effMask)
{
- // mark as selfcasted if needed
+ // mark as selfcast if needed
_flags |= (GetBase()->GetCasterGUID() == GetTarget()->GetGUID()) ? AFLAG_CASTER : AFLAG_NONE;
- // aura is casted by self or an enemy
+ // aura is cast by self or an enemy
// one negative effect and we know aura is negative
- if (IsSelfcasted() || !caster || !caster->IsFriendlyTo(GetTarget()))
+ if (IsSelfcast() || !caster || !caster->IsFriendlyTo(GetTarget()))
{
bool negativeFound = false;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
@@ -132,7 +132,7 @@ void AuraApplication::_InitFlags(Unit* caster, uint8 effMask)
}
_flags |= negativeFound ? AFLAG_NEGATIVE : AFLAG_POSITIVE;
}
- // aura is casted by friend
+ // aura is cast by friend
// one positive effect and we know aura is positive
else
{
@@ -315,7 +315,7 @@ Aura* Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owne
// check if aura can be owned by owner
if (owner->isType(TYPEMASK_UNIT))
if (!owner->IsInWorld() || ((Unit*)owner)->IsDuringRemoveFromWorld())
- // owner not in world so don't allow to own not self casted single target auras
+ // owner not in world so don't allow to own not self cast single target auras
if (casterGUID != owner->GetGUID() && spellproto->IsSingleTarget())
return NULL;
@@ -1284,7 +1284,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
}
break;
case SPELLFAMILY_ROGUE:
- // Sprint (skip non player casted spells by category)
+ // Sprint (skip non player cast spells by category)
if (GetSpellInfo()->SpellFamilyFlags[0] & 0x40 && GetSpellInfo()->GetCategory() == 44)
// in official maybe there is only one icon?
if (target->HasAura(58039)) // Glyph of Blurred Speed
@@ -1500,7 +1500,7 @@ bool Aura::CanBeAppliedOn(Unit* target)
// area auras mustn't be applied
if (GetOwner() != target)
return false;
- // not selfcasted single target auras mustn't be applied
+ // do not apply non-selfcast single target auras
if (GetCasterGUID() != GetOwner()->GetGUID() && GetSpellInfo()->IsSingleTarget())
return false;
return true;
diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h
index 9e7d0cce82c..123ad9d5a8a 100644
--- a/src/server/game/Spells/Auras/SpellAuras.h
+++ b/src/server/game/Spells/Auras/SpellAuras.h
@@ -69,7 +69,7 @@ class AuraApplication
uint8 GetEffectMask() const { return _flags & (AFLAG_EFF_INDEX_0 | AFLAG_EFF_INDEX_1 | AFLAG_EFF_INDEX_2); }
bool HasEffect(uint8 effect) const { ASSERT(effect < MAX_SPELL_EFFECTS); return _flags & (1<<effect); }
bool IsPositive() const { return _flags & AFLAG_POSITIVE; }
- bool IsSelfcasted() const { return _flags & AFLAG_CASTER; }
+ bool IsSelfcast() const { return _flags & AFLAG_CASTER; }
uint8 GetEffectsToApply() const { return _effectsToApply; }
void SetRemoveMode(AuraRemoveMode mode) { _removeMode = mode; }
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 08d500ec666..a46f5cdaa9a 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2409,7 +2409,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
m_spellAura = NULL; // Set aura to null for every target-make sure that pointer is not used for unit without aura applied
- //Spells with this flag cannot trigger if effect is casted on self
+ //Spells with this flag cannot trigger if effect is cast on self
bool canEffectTrigger = !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_CANT_TRIGGER_PROC) && unitTarget->CanProc() && CanExecuteTriggersOnHit(mask);
Unit* spellHitTarget = NULL;
@@ -3000,7 +3000,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
m_caster->m_Events.AddEvent(Event, m_caster->m_Events.CalculateTime(1));
//Prevent casting at cast another spell (ServerSide check)
- if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS) && m_caster->IsNonMeleeSpellCasted(false, true, true) && m_cast_count)
+ if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS) && m_caster->IsNonMeleeSpellCast(false, true, true) && m_cast_count)
{
SendCastResult(SPELL_FAILED_SPELL_IN_PROGRESS);
finish(false);
@@ -3067,7 +3067,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
else
m_casttime = m_spellInfo->CalcCastTime(m_caster->getLevel(), this);
- // don't allow channeled spells / spells with cast time to be casted while moving
+ // don't allow channeled spells / spells with cast time to be cast while moving
// (even if they are interrupted on moving, spells with almost immediate effect get to have their effect processed before movement interrupter kicks in)
// don't cancel spells which are affected by a SPELL_AURA_CAST_WHILE_WALKING effect
if (((m_spellInfo->IsChanneled() || m_casttime) && m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->isMoving() &&
@@ -3084,7 +3084,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
TC_LOG_DEBUG("spells", "Spell::prepare: spell id %u source %u caster %d customCastFlags %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, _triggeredCastFlags, m_targets.GetTargetMask());
//Containers for channeled spells have to be set
- /// @todoApply this to all casted spells if needed
+ /// @todoApply this to all cast spells if needed
// Why check duration? 29350: channelled triggers channelled
if ((_triggeredCastFlags & TRIGGERED_CAST_DIRECTLY) && (!m_spellInfo->IsChanneled() || !m_spellInfo->GetMaxDuration()))
cast(true);
@@ -3103,7 +3103,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
}
}
- m_caster->SetCurrentCastedSpell(this);
+ m_caster->SetCurrentCastSpell(this);
SendSpellStart();
// set target for proper facing
@@ -3213,7 +3213,7 @@ void Spell::cast(bool skipCheck)
if (m_caster->GetTypeId() == TYPEID_PLAYER)
{
// Set spell which will drop charges for triggered cast spells
- // if not successfully casted, will be remove in finish(false)
+ // if not successfully cast, will be remove in finish(false)
m_caster->ToPlayer()->SetSpellModTakingSpell(this, true);
}
@@ -3250,7 +3250,7 @@ void Spell::cast(bool skipCheck)
{
if (!my_trade->IsInAcceptProcess())
{
- // Spell will be casted at completing the trade. Silently ignore at this place
+ // Spell will be cast after completing the trade. Silently ignore at this place
my_trade->SetSpell(m_spellInfo->Id, m_CastItem);
SendCastResult(SPELL_FAILED_DONT_REPORT);
SendInterrupted(0);
@@ -3340,7 +3340,7 @@ void Spell::cast(bool skipCheck)
m_spellState = SPELL_STATE_DELAYED;
SetDelayStart(0);
- if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true))
+ if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !m_caster->IsNonMeleeSpellCast(false, false, true))
m_caster->ClearUnitState(UNIT_STATE_CASTING);
}
else
@@ -3667,7 +3667,7 @@ void Spell::finish(bool ok)
if (m_spellInfo->IsChanneled())
m_caster->UpdateInterruptMask();
- if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !m_caster->IsNonMeleeSpellCasted(false, false, true))
+ if (m_caster->HasUnitState(UNIT_STATE_CASTING) && !m_caster->IsNonMeleeSpellCast(false, false, true))
m_caster->ClearUnitState(UNIT_STATE_CASTING);
// Unsummon summon as possessed creatures on spell cancel
@@ -4029,7 +4029,7 @@ void Spell::SendSpellGo()
if (castFlags & CAST_FLAG_RUNE_LIST) // rune cooldowns list
{
- /// @todo There is a crash caused by a spell with CAST_FLAG_RUNE_LIST casted by a creature
+ /// @todo There is a crash caused by a spell with CAST_FLAG_RUNE_LIST cast by a creature
//The creature is the mover of a player, so HandleCastSpellOpcode uses it as the caster
if (Player* player = m_caster->ToPlayer())
{
@@ -4975,7 +4975,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if ((m_spellInfo->AttributesCu & SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER) && !target->HasInArc(static_cast<float>(M_PI), m_caster))
return SPELL_FAILED_NOT_INFRONT;
- if (m_caster->GetEntry() != WORLD_TRIGGER) // Ignore LOS for gameobjects casts (wrongly casted by a trigger)
+ if (m_caster->GetEntry() != WORLD_TRIGGER) // Ignore LOS for gameobjects casts (wrongly cast by a trigger)
if (!(m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS) && !DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, m_spellInfo->Id, NULL, SPELL_DISABLE_LOS) && !m_caster->IsWithinLOSInMap(target))
return SPELL_FAILED_LINE_OF_SIGHT;
}
@@ -5007,7 +5007,7 @@ SpellCastResult Spell::CheckCast(bool strict)
}
}
- // Spell casted only on battleground
+ // Spell cast only in battleground
if ((m_spellInfo->AttributesEx3 & SPELL_ATTR3_BATTLEGROUND) && m_caster->GetTypeId() == TYPEID_PLAYER)
if (!m_caster->ToPlayer()->InBattleground())
return SPELL_FAILED_ONLY_BATTLEGROUNDS;
@@ -5230,7 +5230,6 @@ SpellCastResult Spell::CheckCast(bool strict)
target->GetContactPoint(m_caster, pos.m_positionX, pos.m_positionY, pos.m_positionZ);
target->GetFirstCollisionPosition(pos, CONTACT_DISTANCE, target->GetRelativeAngle(m_caster));
- m_preGeneratedPath.SetPathLengthLimit(m_spellInfo->GetMaxRange(true) * 1.5f);
bool result = m_preGeneratedPath.CalculatePath(pos.m_positionX, pos.m_positionY, pos.m_positionZ + target->GetObjectSize());
if (m_preGeneratedPath.GetPathType() & PATHFIND_SHORT)
return SPELL_FAILED_OUT_OF_RANGE;
@@ -5554,7 +5553,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (!m_targets.GetUnitTarget())
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
- // can be casted at non-friendly unit or own pet/charm
+ // can be cast at non-friendly unit or own pet/charm
if (m_caster->IsFriendlyTo(m_targets.GetUnitTarget()))
return SPELL_FAILED_TARGET_FRIENDLY;
@@ -5783,7 +5782,7 @@ SpellCastResult Spell::CheckCasterAuras() const
}
}
}
- // You are prevented from casting and the spell casted does not grant immunity. Return a failed error.
+ // You are prevented from casting and the spell cast does not grant immunity. Return a failed error.
else
return prevented_reason;
}
@@ -6190,19 +6189,39 @@ SpellCastResult Spell::CheckItems()
}
}
- SpellItemEnchantmentEntry const* pEnchant = sSpellItemEnchantmentStore.LookupEntry(m_spellInfo->Effects[i].MiscValue);
+ SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(m_spellInfo->Effects[i].MiscValue);
// do not allow adding usable enchantments to items that have use effect already
- if (pEnchant && isItemUsable)
+ if (enchantEntry)
+ {
for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s)
- if (pEnchant->type[s] == ITEM_ENCHANTMENT_TYPE_USE_SPELL)
- return SPELL_FAILED_ON_USE_ENCHANT;
+ {
+ switch (enchantEntry->type[s])
+ {
+ case ITEM_ENCHANTMENT_TYPE_USE_SPELL:
+ if (isItemUsable)
+ return SPELL_FAILED_ON_USE_ENCHANT;
+ break;
+ case ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET:
+ {
+ uint32 numSockets = 0;
+ for (uint32 socket = 0; socket < MAX_ITEM_PROTO_SOCKETS; ++socket)
+ if (targetItem->GetTemplate()->Socket[socket].Color)
+ ++numSockets;
+
+ if (numSockets == MAX_ITEM_PROTO_SOCKETS || targetItem->GetEnchantmentId(PRISMATIC_ENCHANTMENT_SLOT))
+ return SPELL_FAILED_MAX_SOCKETS;
+ break;
+ }
+ }
+ }
+ }
// Not allow enchant in trade slot for some enchant type
if (targetItem->GetOwner() != m_caster)
{
- if (!pEnchant)
+ if (!enchantEntry)
return SPELL_FAILED_ERROR;
- if (pEnchant->slot & ENCHANTMENT_CAN_SOULBOUND)
+ if (enchantEntry->slot & ENCHANTMENT_CAN_SOULBOUND)
return SPELL_FAILED_NOT_TRADEABLE;
}
break;
@@ -6671,11 +6690,11 @@ bool SpellEvent::Execute(uint64 e_time, uint32 p_time)
/*
if (m_Spell->m_spellInfo->IsChanneled())
{
- // evented channeled spell is processed separately, casted once after delay, and not destroyed till finish
+ // evented channeled spell is processed separately, cast once after delay, and not destroyed till finish
// check, if we have casting anything else except this channeled spell and autorepeat
- if (m_Spell->GetCaster()->IsNonMeleeSpellCasted(false, true, true))
+ if (m_Spell->GetCaster()->IsNonMeleeSpellCast(false, true, true))
{
- // another non-melee non-delayed spell is casted now, abort
+ // another non-melee non-delayed spell is cast now, abort
m_Spell->cancel();
}
else
@@ -6898,7 +6917,7 @@ SpellCastResult Spell::CanOpenLock(uint32 effIndex, uint32 lockId, SkillType& sk
0 : m_caster->ToPlayer()->GetSkillValue(skillId);
// skill bonus provided by casting spell (mostly item spells)
- // add the effect base points modifier from the spell casted (cheat lock / skeleton key etc.)
+ // add the effect base points modifier from the spell cast (cheat lock / skeleton key etc.)
if (m_spellInfo->Effects[effIndex].TargetA.GetTarget() == TARGET_GAMEOBJECT_ITEM_TARGET || m_spellInfo->Effects[effIndex].TargetB.GetTarget() == TARGET_GAMEOBJECT_ITEM_TARGET)
skillValue += m_spellInfo->Effects[effIndex].CalcValue();
@@ -7199,7 +7218,7 @@ bool Spell::CheckScriptEffectImplicitTargets(uint32 effIndex, uint32 effIndexToC
bool Spell::CanExecuteTriggersOnHit(uint8 effMask, SpellInfo const* triggeredByAura) const
{
bool only_on_caster = (triggeredByAura && (triggeredByAura->AttributesEx4 & SPELL_ATTR4_PROC_ONLY_ON_CASTER));
- // If triggeredByAura has SPELL_ATTR4_PROC_ONLY_ON_CASTER then it can only proc on a casted spell with TARGET_UNIT_CASTER
+ // If triggeredByAura has SPELL_ATTR4_PROC_ONLY_ON_CASTER then it can only proc on a cast spell with TARGET_UNIT_CASTER
for (uint8 i = 0;i < MAX_SPELL_EFFECTS; ++i)
{
if ((effMask & (1 << i)) && (!only_on_caster || (m_spellInfo->Effects[i].TargetA.GetTarget() == TARGET_UNIT_CASTER)))
@@ -7289,7 +7308,7 @@ void Spell::TriggerGlobalCooldown()
return;
// Global cooldown can't leave range 1..1.5 secs
- // There are some spells (mostly not casted directly by player) that have < 1 sec and > 1.5 sec global cooldowns
+ // There are some spells (mostly not cast directly by player) that have < 1 sec and > 1.5 sec global cooldowns
// but as tests show are not affected by any spell mods.
if (m_spellInfo->StartRecoveryTime >= MIN_GCD && m_spellInfo->StartRecoveryTime <= MAX_GCD)
{
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 37316e1d6bb..b6cf0a1f9b7 100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -209,7 +209,7 @@ enum SpellEffectHandleMode
class Spell
{
- friend void Unit::SetCurrentCastedSpell(Spell* pSpell);
+ friend void Unit::SetCurrentCastSpell(Spell* pSpell);
friend class SpellScript;
public:
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index a22e32abf82..922074970b2 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -4614,8 +4614,8 @@ void Spell::EffectKnockBack(SpellEffIndex effIndex)
if (unitTarget->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED))
return;
- // Instantly interrupt non melee spells being casted
- if (unitTarget->IsNonMeleeSpellCasted(true))
+ // Instantly interrupt non melee spells being cast
+ if (unitTarget->IsNonMeleeSpellCast(true))
unitTarget->InterruptNonMeleeSpells(true);
float ratio = 0.1f;
@@ -4716,8 +4716,6 @@ void Spell::EffectPullTowards(SpellEffIndex effIndex)
if (!unitTarget)
return;
- float speedZ = (float)(m_spellInfo->Effects[effIndex].CalcValue() / 10);
- float speedXY = (float)(m_spellInfo->Effects[effIndex].MiscValue/10);
Position pos;
if (m_spellInfo->Effects[effIndex].Effect == SPELL_EFFECT_PULL_TOWARDS_DEST)
{
@@ -4731,6 +4729,9 @@ void Spell::EffectPullTowards(SpellEffIndex effIndex)
pos.Relocate(m_caster);
}
+ float speedXY = float(m_spellInfo->Effects[effIndex].MiscValue) * 0.1f;
+ float speedZ = unitTarget->GetDistance(pos) / speedXY * 0.5f * Movement::gravity;
+
unitTarget->GetMotionMaster()->MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ);
}
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 79a8c54cdbb..9bf2059b618 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1478,10 +1478,10 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
uint32 stanceMask = (form ? 1 << (form - 1) : 0);
- if (stanceMask & StancesNot) // can explicitly not be casted in this stance
+ if (stanceMask & StancesNot) // can explicitly not be cast in this stance
return SPELL_FAILED_NOT_SHAPESHIFT;
- if (stanceMask & Stances) // can explicitly be casted in this stance
+ if (stanceMask & Stances) // can explicitly be cast in this stance
return SPELL_CAST_OK;
bool actAsShifted = false;
@@ -2711,12 +2711,12 @@ bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const
case SPELL_AURA_PREVENT_RESURRECTION:
return false;
case SPELL_AURA_PERIODIC_DAMAGE: // used in positive spells also.
- // part of negative spell if casted at self (prevent cancel)
+ // part of negative spell if cast at self (prevent cancel)
if (Effects[effIndex].TargetA.GetTarget() == TARGET_UNIT_CASTER)
return false;
break;
case SPELL_AURA_MOD_DECREASE_SPEED: // used in positive spells also
- // part of positive spell if casted at self
+ // part of positive spell if cast at self
if (Effects[effIndex].TargetA.GetTarget() != TARGET_UNIT_CASTER)
return false;
// but not this if this first effect (didn't find better check)
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 6d58da9095b..945f907f548 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1528,8 +1528,8 @@ void SpellMgr::LoadSpellLearnSpells()
if (!GetSpellInfo(dbc_node.spell))
continue;
- // talent or passive spells or skill-step spells auto-casted and not need dependent learning,
- // pet teaching spells must not be dependent learning (casted)
+ // talent or passive spells or skill-step spells auto-cast and not need dependent learning,
+ // pet teaching spells must not be dependent learning (cast)
// other required explicit dependent learning
dbc_node.autoLearned = entry->Effects[i].TargetA.GetTarget() == TARGET_UNIT_PET || GetTalentSpellCost(spell) > 0 || entry->IsPassive() || entry->HasEffect(SPELL_EFFECT_SKILL_STEP);
@@ -3725,7 +3725,7 @@ void SpellMgr::LoadSpellInfoCorrections()
break;
// This would never crit on retail and it has attribute for SPELL_ATTR3_NO_DONE_BONUS because is handled from player,
// until someone figures how to make scions not critting without hack and without making them main casters this should stay here.
- case 63934: // Arcane Barrage (casted by players and NONMELEEDAMAGELOG with caster Scion of Eternity (original caster)).
+ case 63934: // Arcane Barrage (cast by players and NONMELEEDAMAGELOG with caster Scion of Eternity (original caster)).
spellInfo->AttributesEx2 |= SPELL_ATTR2_CANT_CRIT;
break;
// ENDOF EYE OF ETERNITY SPELLS
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index 0d5643bc50c..4c25adb0476 100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -775,11 +775,11 @@ class AuraScript : public _SpellScript
// returns spellid of the spell
uint32 GetId() const;
- // returns guid of object which casted the aura (m_originalCaster of the Spell class)
+ // returns guid of object which cast the aura (m_originalCaster of the Spell class)
uint64 GetCasterGUID() const;
- // returns unit which casted the aura or NULL if not avalible (caster logged out for example)
+ // returns unit which cast the aura or NULL if not avalible (caster logged out for example)
Unit* GetCaster() const;
- // returns object on which aura was casted, target for non-area auras, area aura source for area auras
+ // returns object on which aura was cast, target for non-area auras, area aura source for area auras
WorldObject* GetOwner() const;
// returns owner if it's unit or unit derived object, NULL otherwise (only for persistent area auras NULL is returned)
Unit* GetUnitOwner() const;