diff options
Diffstat (limited to 'src/game/Spell.cpp')
| -rw-r--r-- | src/game/Spell.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index bcca1f2c873..88085bd99fe 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1734,7 +1734,7 @@ void Spell::SetTargetMap(uint32 i, uint32 cur) break; case TARGET_UNIT_CASTER_FISHING: { - AddUnitTarget(m_caster, i); + //AddUnitTarget(m_caster, i); float min_dis = GetSpellMinRange(m_spellInfo, true); float max_dis = GetSpellMaxRange(m_spellInfo, true); float dis = rand_norm() * (max_dis - min_dis) + min_dis; @@ -3018,6 +3018,10 @@ void Spell::finish(bool ok) if (m_caster->GetTypeId() == TYPEID_PLAYER) ((Player*)m_caster)->RemoveSpellMods(this); + // Okay to remove extra attacks + if(IsSpellHaveEffect(m_spellInfo, SPELL_EFFECT_ADD_EXTRA_ATTACKS)) + m_caster->m_extraAttacks = 0; + // Heal caster for all health leech from all targets if (m_healthLeech) m_caster->DealHeal(m_caster, uint32(m_healthLeech), m_spellInfo); @@ -3385,7 +3389,7 @@ void Spell::SendLogExecute() data.append(unit->GetPackGUID()); else data << uint8(0); - data << uint32(0); // count? + data << uint32(m_caster->m_extraAttacks); break; case SPELL_EFFECT_INTERRUPT_CAST: if(Unit *unit = m_targets.getUnitTarget()) @@ -4597,20 +4601,7 @@ SpellCastResult Spell::CheckCast(bool strict) case SPELL_EFFECT_LEAP: case SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER: { - float dis = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); - float fx = m_caster->GetPositionX() + dis * cos(m_caster->GetOrientation()); - float fy = m_caster->GetPositionY() + dis * sin(m_caster->GetOrientation()); - // teleport a bit above terrain level to avoid falling below it - float fz = MapManager::Instance().GetBaseMap(m_caster->GetMapId())->GetHeight(fx,fy,m_caster->GetPositionZ(),true); - if(fz <= INVALID_HEIGHT) // note: this also will prevent use effect in instances without vmaps height enabled - return SPELL_FAILED_TRY_AGAIN; - - float caster_pos_z = m_caster->GetPositionZ(); - // Control the caster to not climb or drop when +-fz > 8 - if(!(fz<=caster_pos_z+8 && fz>=caster_pos_z-8)) - return SPELL_FAILED_TRY_AGAIN; - - // not allow use this effect at battleground until battleground start + //Do not allow to cast it before BG starts. if(m_caster->GetTypeId()==TYPEID_PLAYER) if(BattleGround const *bg = ((Player*)m_caster)->GetBattleGround()) if(bg->GetStatus() != STATUS_IN_PROGRESS) |
