diff options
author | spp <none@none> | 2009-12-14 01:51:12 +0100 |
---|---|---|
committer | spp <none@none> | 2009-12-14 01:51:12 +0100 |
commit | 5d988a617f1530f5dda02632bf9de19d12fe17c3 (patch) | |
tree | 0519297c19f204dff8bab7d12d3f5353788b321c /src/game | |
parent | fa1467e9fe34e78751f984a10ffafc056863ec65 (diff) |
Fix Dancing Rune Weapon. By liberate, closes #365
--HG--
branch : trunk
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/Object.cpp | 1 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 4 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 14 | ||||
-rw-r--r-- | src/game/Unit.cpp | 19 |
4 files changed, 34 insertions, 4 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index cb459aca43a..6aa4b3949c5 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1697,6 +1697,7 @@ TempSummon *Map::SummonCreature(uint32 entry, const Position &pos, SummonPropert { case SUMMON_TYPE_MINION: case SUMMON_TYPE_GUARDIAN: + case SUMMON_TYPE_GUARDIAN2: mask = UNIT_MASK_GUARDIAN; break; case SUMMON_TYPE_TOTEM: mask = UNIT_MASK_TOTEM; break; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 2f533e8bfff..85126465edb 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2821,6 +2821,10 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount) } return; } + case 49028: + GetParentAura()->SetAuraDuration(GetParentAura()->GetAuraDuration() + (caster->GetPower(POWER_RUNIC_POWER) * 10)); + caster->SetPower(POWER_RUNIC_POWER, 0); + break; case 39850: // Rocket Blast if(roll_chance_i(20)) // backfire stun m_target->CastSpell(m_target, 51581, true, NULL, this); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index afbcf3f867b..3a7c7cc8c7d 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3581,6 +3581,7 @@ void Spell::EffectSummonType(uint32 i) { case SUMMON_TYPE_PET: case SUMMON_TYPE_GUARDIAN: + case SUMMON_TYPE_GUARDIAN2: case SUMMON_TYPE_MINION: SummonGuardian(i, entry, properties); break; @@ -7298,13 +7299,16 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const * //float radius = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); float radius = 5.0f; int32 amount = damage > 0 ? damage : 1; + int32 duration = GetSpellDuration(m_spellInfo); switch (m_spellInfo->Id) { case 1122: // Inferno amount = 1; break; + case 49028: // Dancing Rune Weapon + duration += m_originalCaster->GetPower(POWER_RUNIC_POWER) * 10; + break; } - int32 duration = GetSpellDuration(m_spellInfo); if(Player* modOwner = m_originalCaster->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration); @@ -7326,6 +7330,14 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const * if (summon->HasUnitTypeMask(UNIT_MASK_MINION) && m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION) ((Minion*)summon)->SetFollowAngle(m_caster->GetAngle(summon)); + if (summon->GetEntry() == 27893) + if (uint32 weapon = m_caster->GetUInt32Value(PLAYER_VISIBLE_ITEM_16_ENTRYID)) + { + summon->SetDisplayId(11686); + summon->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, weapon); + } + else + summon->SetDisplayId(1126); summon->AI()->EnterEvadeMode(); } } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 7cdc513535f..4b9d8f47dc7 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6852,9 +6852,22 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger // 1 dummy aura for dismiss rune blade if (effIndex != 2) return false; - // TODO: write script for this "fights on its own, doing the same attacks" - // NOTE: Trigger here on every attack and spell cast - return false; + uint64 PetGUID = NULL; + for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) //Find Rune Weapon + if ((*itr)->GetEntry() == 27893) + { + PetGUID = (*itr)->GetGUID(); + break; + } + + if (PetGUID && pVictim && damage && procSpell) + { + int32 procDmg = damage / 2; + CastCustomSpell(pVictim, procSpell->Id, &procDmg, NULL, NULL, true, NULL, NULL, PetGUID); + break; + } + else + return false; } // Mark of Blood if (dummySpell->Id == 49005) |