diff options
| author | linencloth <none@none> | 2010-11-13 17:18:09 +0100 |
|---|---|---|
| committer | linencloth <none@none> | 2010-11-13 17:18:09 +0100 |
| commit | bf888285aab32ae2571002f23dd217396b2f12d8 (patch) | |
| tree | e13695f4909b7df4f218057126919321b4374f58 /src/server/game/Spells/Spell.cpp | |
| parent | 995408f0a9e6512af53e7719799d332d487f84eb (diff) | |
Core:
- Redesigned stealth and invisibility handling
- Implemented the handling of multiple stealth types
- Implemented fake inebriation
- The message deliverer no longer sends packets from a non-visible source
- The server won't send that much garbage which just takes bandwith
- It won't be possible to use cheats to detect invisible objects
- Removed a lot of checks for the Z-coord
- Fixes visibility problems happening while flying
- Limited the grid activation range of creatures to use less resources
- Implemented Shroud of Death
- Implemented increased visibility range for active objects
- Removed visibility check at spellhit (only sanctuary effects should prevent it)
(And a lot of other changes...)
Closes issue 4208
Closes issue 3049
Closes issue 2097
Closes issue 2198
Closes issue 2384
Closes issue 2197
Closes issue 2319
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rwxr-xr-x | src/server/game/Spells/Spell.cpp | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 53514bd622e..f912a6f20b5 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1396,18 +1396,6 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool if (!m_caster->IsFriendlyTo(unit)) { - // reset damage to 0 if target has Invisibility and isn't visible for caster - // I do not think this is a correct way to fix it. Sanctuary effect should make all delayed spells invalid - // for delayed spells ignore not visible explicit target - if (m_spellInfo->speed > 0.0f && unit == m_targets.getUnitTarget() - && (unit->m_invisibilityMask || m_caster->m_invisibilityMask) - && !m_caster->canSeeOrDetect(unit, true)) - { - // that was causing CombatLog errors - // return SPELL_MISS_EVADE; - return SPELL_MISS_MISS; // miss = do not send anything here - } - unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL); //TODO: This is a hack. But we do not know what types of stealth should be interrupted by CC if ((m_customAttr & SPELL_ATTR_CU_AURA_CC) && unit->IsControlledByPlayer()) @@ -1793,7 +1781,7 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin break; while ((m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE && !m_caster->isInFrontInMap(*next, max_range)) - || !m_caster->canSeeOrDetect(*next, false) + || !m_caster->canSeeOrDetect(*next) || !cur->IsWithinLOSInMap(*next)) { ++next; @@ -3118,9 +3106,7 @@ void Spell::cast(bool skipCheck) { // three check: prepare, cast (m_casttime > 0), hit (delayed) if (m_casttime && target->isAlive() - && (target->m_invisibilityMask || m_caster->m_invisibilityMask - || target->GetVisibility() == VISIBILITY_GROUP_STEALTH) - && !target->IsFriendlyTo(m_caster) && !m_caster->canSeeOrDetect(target, true)) + && !target->IsFriendlyTo(m_caster) && !m_caster->canSeeOrDetect(target)) { SendCastResult(SPELL_FAILED_BAD_TARGETS); SendInterrupted(0); @@ -4846,8 +4832,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (target->hasUnitState(UNIT_STAT_UNATTACKABLE)) return SPELL_FAILED_BAD_TARGETS; - if (!m_IsTriggeredSpell && (target->HasAuraType(SPELL_AURA_MOD_STEALTH) - || target->m_invisibilityMask) && !m_caster->canSeeOrDetect(target, true)) + if (!m_IsTriggeredSpell && !m_caster->canSeeOrDetect(target)) return SPELL_FAILED_BAD_TARGETS; if (m_caster->GetTypeId() == TYPEID_PLAYER) @@ -6014,7 +5999,7 @@ SpellCastResult Spell::CheckItems() TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker); Map& map = *m_caster->GetMap(); - cell.Visit(p, object_checker, map, *m_caster, map.GetVisibilityDistance()); + cell.Visit(p, object_checker, map, *m_caster, m_caster->GetVisibilityRange()); if (!ok) return SPELL_FAILED_REQUIRES_SPELL_FOCUS; |
