diff options
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 562d7fee518..e580a3d0f2d 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -369,7 +369,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) case SPELLFAMILY_WARRIOR: { // Shield Slam - if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209) + if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->GetCategory() == 1209) { uint8 level = m_caster->getLevel(); uint32 block_value = m_caster->GetShieldBlockValue(uint32(float(level) * 24.5f), uint32(float(level) * 34.5f)); @@ -943,7 +943,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime - && m_spellInfo->Category == spellInfo->Category) + && m_spellInfo->GetCategory() == spellInfo->GetCategory()) m_caster->ToPlayer()->RemoveSpellCooldown(spellInfo->Id); // original caster guid only for GO cast @@ -996,7 +996,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->CategoryRecoveryTime && spellInfo->CategoryRecoveryTime - && m_spellInfo->Category == spellInfo->Category) + && m_spellInfo->GetCategory() == spellInfo->GetCategory()) m_caster->ToPlayer()->RemoveSpellCooldown(spellInfo->Id); // original caster guid only for GO cast @@ -1150,10 +1150,15 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) orientation = m_targets.GetUnitTarget()->GetOrientation(); TC_LOG_DEBUG(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation); - if (mapid == unitTarget->GetMapId()) - unitTarget->NearTeleportTo(x, y, z, orientation, unitTarget == m_caster); - else if (unitTarget->GetTypeId() == TYPEID_PLAYER) + if (unitTarget->GetTypeId() == TYPEID_PLAYER) unitTarget->ToPlayer()->TeleportTo(mapid, x, y, z, orientation, unitTarget == m_caster ? TELE_TO_SPELL : 0); + else if (mapid == unitTarget->GetMapId()) + unitTarget->NearTeleportTo(x, y, z, orientation, unitTarget == m_caster); + else + { + TC_LOG_ERROR(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id); + return; + } // post effects for TARGET_DEST_DB switch (m_spellInfo->Id) @@ -2516,7 +2521,7 @@ void Spell::EffectDispel(SpellEffIndex effIndex) // On success dispel // Devour Magic - if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->Category == SPELLCATEGORY_DEVOUR_MAGIC) + if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->GetCategory() == SPELLCATEGORY_DEVOUR_MAGIC) { int32 heal_amount = m_spellInfo->Effects[EFFECT_1].CalcValue(); m_caster->CastCustomSpell(m_caster, 19658, &heal_amount, NULL, NULL, true); @@ -4101,7 +4106,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) case SPELLFAMILY_PALADIN: { // Judgement (seal trigger) - if (m_spellInfo->Category == SPELLCATEGORY_JUDGEMENT) + if (m_spellInfo->GetCategory() == SPELLCATEGORY_JUDGEMENT) { if (!unitTarget || !unitTarget->IsAlive()) return; |
