diff options
author | QAston <none@none> | 2009-07-13 23:36:38 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-13 23:36:38 +0200 |
commit | 814f66db9125b0c91a57833c3abc2426eb2ca1c4 (patch) | |
tree | 6662a490ac69e78da12fa9eeea0964b9d406b77e /src | |
parent | 310f15e546c2525e2fbef2fbea57521e4cc8b78b (diff) |
*Fix Defensive Tactics.
*Correctly delete gameobject in BT_Najentus script.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp | 3 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 49 |
2 files changed, 30 insertions, 22 deletions
diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp index f70b82c0e3c..8b185318b8a 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp @@ -201,6 +201,9 @@ bool GOHello_go_najentus_spine(Player *player, GameObject* _GO) { player->CastSpell(player, SPELL_CREATE_NAJENTUS_SPINE, true); _GO->SetLootState(GO_NOT_READY); + if (_GO->GetOwnerGUID()) + if (Unit * owner = _GO->GetOwner()) + owner->RemoveGameObject(_GO, false); _GO->Delete(); } return true; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 2c88c4cec0d..1481c5205d3 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3261,28 +3261,6 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun } break; } - case FORM_BATTLESTANCE: - case FORM_DEFENSIVESTANCE: - case FORM_BERSERKERSTANCE: - { - uint32 Rage_val = 0; - // Stance mastery + Tactical mastery (both passive, and last have aura only in defense stance, but need apply at any stance switch) - if(m_target->GetTypeId() == TYPEID_PLAYER) - { - PlayerSpellMap const& sp_list = ((Player *)m_target)->GetSpellMap(); - for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr) - { - if(itr->second->state == PLAYERSPELL_REMOVED) continue; - SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); - if (spellInfo && spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR && spellInfo->SpellIconID == 139) - Rage_val += m_target->CalculateSpellDamage(spellInfo,0,spellInfo->EffectBasePoints[0],m_target) * 10; - } - } - - if (m_target->GetPower(POWER_RAGE) > Rage_val) - m_target->SetPower(POWER_RAGE,Rage_val); - break; - } default: break; } @@ -3315,6 +3293,33 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun if(AuraEffect* dummy = m_target->GetDummyAura(37324) ) m_target->CastSpell(m_target,37325,true,NULL,dummy); break; + case FORM_BATTLESTANCE: + case FORM_DEFENSIVESTANCE: + case FORM_BERSERKERSTANCE: + { + uint32 Rage_val = 0; + // Defensive Tactics + if (form == FORM_DEFENSIVESTANCE) + { + if (AuraEffect const * aurEff = m_target->IsScriptOverriden(m_spellProto,831)) + Rage_val += aurEff->GetAmount() * 10; + } + // Stance mastery + Tactical mastery (both passive, and last have aura only in defense stance, but need apply at any stance switch) + if(m_target->GetTypeId() == TYPEID_PLAYER) + { + PlayerSpellMap const& sp_list = ((Player *)m_target)->GetSpellMap(); + for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr) + { + if(itr->second->state == PLAYERSPELL_REMOVED) continue; + SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); + if (spellInfo && spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR && spellInfo->SpellIconID == 139) + Rage_val += m_target->CalculateSpellDamage(spellInfo,0,spellInfo->EffectBasePoints[0],m_target) * 10; + } + } + if (m_target->GetPower(POWER_RAGE) > Rage_val) + m_target->SetPower(POWER_RAGE,Rage_val); + break; + } default: break; } |