diff options
| author | Spp <spp@jorge.gr> | 2012-11-26 08:43:29 +0100 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2012-11-26 08:43:29 +0100 |
| commit | 8ae0f2332c9f3d34f602acdaeb5409d9cb56ab79 (patch) | |
| tree | 5afe17de42ae9399c730cccfaa876608f84b69ba /src/server/game/Spells | |
| parent | fdf0c32857c804701e7a25b27e59b11f2a306116 (diff) | |
| parent | 941be9cdc473713f97ad505114bcb32f7e3350ef (diff) | |
Merge branch 'master' into 4.3.4
Conflicts:
src/server/game/Battlefield/Zones/BattlefieldWG.cpp
src/server/game/Conditions/ConditionMgr.cpp
src/server/game/Entities/Unit/Unit.cpp
src/server/game/Server/WorldSession.cpp
src/server/game/Server/WorldSocket.cpp
src/server/game/Spells/SpellEffects.cpp
src/server/scripts/EasternKingdoms/stormwind_city.cpp
src/server/scripts/EasternKingdoms/swamp_of_sorrows.cpp
src/server/scripts/Kalimdor/azshara.cpp
Diffstat (limited to 'src/server/game/Spells')
| -rwxr-xr-x | src/server/game/Spells/Spell.cpp | 15 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 5 |
2 files changed, 7 insertions, 13 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 4c22328cd26..b38d5f085b6 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4884,17 +4884,12 @@ SpellCastResult Spell::CheckCast(bool strict) ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL, m_spellInfo->Id); if (!conditions.empty() && !sConditionMgr->IsObjectMeetToConditions(condInfo, conditions)) { - // send error msg to player if condition failed and text message available - // TODO: using WorldSession::SendNotification is not blizzlike - if (Player* playerCaster = m_caster->ToPlayer()) + // mLastFailedCondition can be NULL if there was an error processing the condition in Condition::Meets (i.e. wrong data for ConditionTarget or others) + if (condInfo.mLastFailedCondition && condInfo.mLastFailedCondition->ErrorType) { - // mLastFailedCondition can be NULL if there was an error processing the condition in Condition::Meets (i.e. wrong data for ConditionTarget or others) - if (playerCaster->GetSession() && condInfo.mLastFailedCondition - && condInfo.mLastFailedCondition->ErrorTextId) - { - playerCaster->GetSession()->SendNotification(condInfo.mLastFailedCondition->ErrorTextId); - return SPELL_FAILED_DONT_REPORT; - } + if (condInfo.mLastFailedCondition->ErrorType == SPELL_FAILED_CUSTOM_ERROR) + m_customError = SpellCustomErrors(condInfo.mLastFailedCondition->ErrorTextId); + return SpellCastResult(condInfo.mLastFailedCondition->ErrorType); } if (!condInfo.mLastFailedCondition || !condInfo.mLastFailedCondition->ConditionTarget) return SPELL_FAILED_CASTER_AURASTATE; diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 11368e990f5..94cd924681e 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -5123,12 +5123,11 @@ void Spell::EffectDurabilityDamage(SpellEffIndex effIndex) int32 slot = m_spellInfo->Effects[effIndex].MiscValue; - // FIXME: some spells effects have value -1/-2 - // Possibly its mean -1 all player equipped items and -2 all items + // -1 means all player equipped items and -2 all items if (slot < 0) { unitTarget->ToPlayer()->DurabilityPointsLossAll(damage, (slot < -1)); - ExecuteLogEffectDurabilityDamage(effIndex, unitTarget, -1, -1); // -1 -1 pair triggers SPELL_DURABILITY_DAMAGE_ALL event + ExecuteLogEffectDurabilityDamage(effIndex, unitTarget, -1, -1); return; } |
