diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/SharedDefines.h | 2 | ||||
| -rw-r--r-- | src/game/Spell.cpp | 2 | ||||
| -rw-r--r-- | src/game/SpellAuras.cpp | 4 | ||||
| -rw-r--r-- | src/game/SpellAuras.h | 3 | ||||
| -rw-r--r-- | src/game/SpellEffects.cpp | 38 | ||||
| -rw-r--r-- | src/game/SpellMgr.cpp | 21 | ||||
| -rw-r--r-- | src/game/Unit.cpp | 6 | ||||
| -rw-r--r-- | src/shared/revision_nr.h | 2 |
8 files changed, 42 insertions, 36 deletions
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 0cf98fe33f9..34276c4810e 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -694,7 +694,7 @@ enum AuraState AURA_STATE_DEFENSE = 1, // C | AURA_STATE_HEALTHLESS_20_PERCENT = 2, // CcT | AURA_STATE_BERSERKING = 3, // C T | - //AURA_STATE_UNKNOWN4 = 4, // c t| some limitation to charge spells (?) and target test spells + AURA_STATE_FROZEN = 4, // c t| frozen target AURA_STATE_JUDGEMENT = 5, // C | //AURA_STATE_UNKNOWN6 = 6, // | not used AURA_STATE_HUNTER_PARRY = 7, // C | diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 1dd0c168329..af2580b5dc4 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -303,7 +303,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi break; default: // Wands - if (m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_REQ_WAND) + if (m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_AUTOREPEAT_FLAG) m_attackType = RANGED_ATTACK; else m_attackType = BASE_ATTACK; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 4b42c07f01c..4bce42b558f 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3479,6 +3479,10 @@ void Aura::HandleAuraModRoot(bool apply, bool Real) if(!Real) return; + // Frost root aura -> freeze/unfreeze target + if (GetSpellSchoolMask(m_spellProto) & SPELL_SCHOOL_MASK_FROST) + m_target->ModifyAuraState(AURA_STATE_FROZEN, apply); + m_target->SetControlled(apply, UNIT_STAT_ROOT); } diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 8a8c30df04b..2c490f5ae57 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -304,8 +304,6 @@ class TRINITY_DLL_SPEC Aura void _AddAura(); void _RemoveAura(); - void TriggerSpell(); - bool IsUpdated() { return m_updated; } void SetUpdated(bool val) { m_updated = val; } void SetRemoveMode(AuraRemoveMode mode) { m_removeMode = mode; } @@ -319,6 +317,7 @@ class TRINITY_DLL_SPEC Aura void setDiminishGroup(DiminishingGroup group) { m_AuraDRGroup = group; } DiminishingGroup getDiminishGroup() const { return m_AuraDRGroup; } + void TriggerSpell(); void PeriodicTick(); void PeriodicDummyTick(); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 9b3b35b7e99..0a73fd43514 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1731,6 +1731,8 @@ void Spell::EffectDummy(uint32 i) //Shaman Rockbiter Weapon if (m_spellInfo->SpellFamilyFlags == 0x400000) { + // TODO: use expect spell for enchant (if exist talent) + // In 3.0.3 no mods present for rockbiter uint32 spell_id = 0; switch(m_spellInfo->Id) { @@ -1738,11 +1740,6 @@ void Spell::EffectDummy(uint32 i) case 8018: spell_id = 36750; break; // Rank 2 case 8019: spell_id = 36755; break; // Rank 3 case 10399: spell_id = 36759; break; // Rank 4 - case 16314: spell_id = 36763; break; // Rank 5 - case 16315: spell_id = 36766; break; // Rank 6 - case 16316: spell_id = 36771; break; // Rank 7 - case 25479: spell_id = 36775; break; // Rank 8 - case 25485: spell_id = 36499; break; // Rank 9 default: sLog.outError("Spell::EffectDummy: Spell %u not handled in RW",m_spellInfo->Id); return; @@ -1791,7 +1788,29 @@ void Spell::EffectDummy(uint32 i) m_caster->CastCustomSpell(unitTarget,39609,&EffectBasePoints0,NULL,NULL,true,NULL,NULL,m_originalCasterGUID); return; } - + // Lava Lash + if (m_spellInfo->SpellFamilyFlags2 & 0x00000004) + { + if (m_caster->GetTypeId()!=TYPEID_PLAYER) + return; + Item *item = ((Player*)m_caster)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + if (item) + { + // Damage is increased if your off-hand weapon is enchanted with Flametongue. + Unit::AuraList const& auraDummy = m_caster->GetAurasByType(SPELL_AURA_DUMMY); + for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr) + { + if( (*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_SHAMAN && + (*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000000000200000LL && + (*itr)->GetCastItemGUID() == item->GetGUID()) + { + m_damage += m_damage * damage / 100; + return; + } + } + } + return; + } break; } @@ -2050,12 +2069,7 @@ void Spell::EffectTriggerMissileSpell(uint32 effect_idx) if (m_CastItem) DEBUG_LOG("WORLD: cast Item spellId - %i", spellInfo->Id); - Spell *spell = new Spell(m_caster, spellInfo, true, m_originalCasterGUID ); - - SpellCastTargets targets; - targets.setDestination(m_targets.m_destX,m_targets.m_destY,m_targets.m_destZ); - spell->m_CastItem = m_CastItem; - spell->prepare(&targets, NULL); + m_caster->CastSpell(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, spellInfo->Id, true, m_CastItem, 0, m_originalCasterGUID); } void Spell::EffectTeleportUnits(uint32 i) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index dd80acc2dc6..474bf8eae52 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -361,6 +361,13 @@ SpellSpecific GetSpellSpecific(uint32 spellId) if (spellInfo->Dispel == DISPEL_POISON) return SPELL_STING; + // only hunter aspects have this (but not all aspects in hunter family) + if( spellInfo->SpellFamilyFlags & 0x0044000000380000LL || spellInfo->SpellFamilyFlags2 & 0x00003010) + return SPELL_ASPECT; + + if( spellInfo->SpellFamilyFlags2 & 0x00000002 ) + return SPELL_TRACKER; + break; } case SPELLFAMILY_PALADIN: @@ -405,20 +412,6 @@ SpellSpecific GetSpellSpecific(uint32 spellId) return SPELL_WARLOCK_ARMOR; } - // only hunter aspects have this (but not all aspects in hunter family) - if( spellInfo->activeIconID == 122 && (GetSpellSchoolMask(spellInfo) & SPELL_SCHOOL_MASK_NATURE) && - (spellInfo->Attributes & 0x50000) != 0 && (spellInfo->Attributes & 0x9000010) == 0) - { - return SPELL_ASPECT; - } - - for(int i = 0; i < 3; i++) - if( spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA && ( - spellInfo->EffectApplyAuraName[i] == SPELL_AURA_TRACK_CREATURES || - spellInfo->EffectApplyAuraName[i] == SPELL_AURA_TRACK_RESOURCES || - spellInfo->EffectApplyAuraName[i] == SPELL_AURA_TRACK_STEALTHED ) ) - return SPELL_TRACKER; - // elixirs can have different families, but potion most ofc. if(SpellSpecific sp = spellmgr.GetSpellElixirSpecific(spellInfo->Id)) return sp; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 66aeafcf032..165a459649a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10114,11 +10114,7 @@ void CharmInfo::SetPetNumber(uint32 petnumber, bool statwindow) bool Unit::isFrozen() const { - AuraList const& mRoot = GetAurasByType(SPELL_AURA_MOD_ROOT); - for(AuraList::const_iterator i = mRoot.begin(); i != mRoot.end(); ++i) - if( GetSpellSchoolMask((*i)->GetSpellProto()) & SPELL_SCHOOL_MASK_FROST) - return true; - return false; + return HasAuraState(AURA_STATE_FROZEN); } struct ProcTriggeredData diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index db52acd82a6..f8037402772 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7072" + #define REVISION_NR "7076" #endif // __REVISION_NR_H__ |
