diff options
| author | Shauren <shauren.trinity@gmail.com> | 2013-10-26 17:06:50 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2013-10-26 17:06:50 +0200 |
| commit | 75a790ca475c6af31730d331a3ab185f8abdd6e2 (patch) | |
| tree | f961f8de614ac7e1dfc1f17c68e83c7d14feff20 /src/server/game/Spells/Spell.cpp | |
| parent | 8d6aec608f0cd323d291dc12efce32f630590a23 (diff) | |
| parent | b81bf7d0250939ee96b942f554c16d950f06c7b1 (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 549cd945e86..1ab396c69e5 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2660,7 +2660,9 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA m_diminishLevel = unit->GetDiminishing(m_diminishGroup); DiminishingReturnsType type = GetDiminishingReturnsGroupType(m_diminishGroup); // Increase Diminishing on unit, current informations for actually casts will use values above - if ((type == DRTYPE_PLAYER && unit->GetCharmerOrOwnerPlayerOrPlayerItself()) || type == DRTYPE_ALL) + if ((type == DRTYPE_PLAYER && + (unit->GetCharmerOrOwnerPlayerOrPlayerItself() || (unit->GetTypeId() == TYPEID_UNIT && unit->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_ALL_DIMINISH))) || + type == DRTYPE_ALL) unit->IncrDiminishing(m_diminishGroup); } @@ -3552,7 +3554,7 @@ void Spell::SendSpellCooldown() return; // mana/health/etc potions, disabled by client (until combat out as declarate) - if (m_CastItem && m_CastItem->IsPotion()) + if (m_CastItem && (m_CastItem->IsPotion() || m_spellInfo->IsCooldownStartedOnEvent())) { // need in some way provided data for Spell::finish SendCooldownEvent _player->SetLastPotionId(m_CastItem->GetEntry()); @@ -3560,7 +3562,7 @@ void Spell::SendSpellCooldown() } // have infinity cooldown but set at aura apply // do not set cooldown for triggered spells (needed by reincarnation) - if (m_spellInfo->Attributes & (SPELL_ATTR0_DISABLED_WHILE_ACTIVE | SPELL_ATTR0_PASSIVE) || (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD)) + if (m_spellInfo->IsCooldownStartedOnEvent() || m_spellInfo->IsPassive() || (_triggeredCastFlags & TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD)) return; _player->AddSpellAndCategoryCooldowns(m_spellInfo, m_CastItem ? m_CastItem->GetEntry() : 0, this); |
