diff options
author | megamage <none@none> | 2009-05-25 12:25:35 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-25 12:25:35 -0500 |
commit | 981ecfdc41f8e1155b9be46ab24582f7259ce91c (patch) | |
tree | 31eac833f5d5016c18b29fea68efab6de9560484 /src | |
parent | 03d1a8d84cfa58882f5c1cc0f4bf9147faa5cfdf (diff) | |
parent | 883cd02304924f04e36306497cf0d36ab373d957 (diff) |
*Merge. Do not forget to apply TC1 sql!
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp | 6 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kiljaeden.cpp | 18 | ||||
-rw-r--r-- | src/game/Unit.cpp | 32 |
3 files changed, 31 insertions, 25 deletions
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp index 044e62cff86..92e1991e50a 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp @@ -644,7 +644,7 @@ void boss_kalecgosAI::UpdateAI(const uint32 diff) } } -bool GOkalocegos_teleporter(Player *player, GameObject* _GO) +bool GOkalecgos_teleporter(Player *player, GameObject* _GO) { if(player->HasAura(AURA_SPECTRAL_EXHAUSTION)) player->GetSession()->SendNotification(GO_FAILED); @@ -687,7 +687,7 @@ void AddSC_boss_kalecgos() newscript->RegisterSelf(); newscript = new Script; - newscript->Name="kalocegos_teleporter"; - newscript->pGOHello = &GOkalocegos_teleporter; + newscript->Name="kalecgos_teleporter"; + newscript->pGOHello = &GOkalecgos_teleporter; newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kiljaeden.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kiljaeden.cpp index a0bd75cb156..066fffa3467 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kiljaeden.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kiljaeden.cpp @@ -293,9 +293,9 @@ bool GOHello_go_orb_of_the_blue_flight(Player *plr, GameObject* go) } //AI for Kalecgos -struct TRINITY_DLL_DECL boss_kalecgosKJAI : public ScriptedAI +struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI { - boss_kalecgosKJAI(Creature* c) : ScriptedAI(c){ + boss_kalecgos_kjAI(Creature* c) : ScriptedAI(c){ pInstance = ((ScriptedInstance*)c->GetInstanceData()); } @@ -402,9 +402,9 @@ struct TRINITY_DLL_DECL boss_kalecgosKJAI : public ScriptedAI } }; -CreatureAI* GetAI_boss_kalecgosKJ(Creature *_Creature) +CreatureAI* GetAI_boss_kalecgos_kj(Creature *_Creature) { - return new boss_kalecgosKJAI (_Creature); + return new boss_kalecgos_kjAI (_Creature); } //AI for Kil'jaeden @@ -649,8 +649,8 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI break; case TIMER_ORBS_EMPOWER: //Phase 3 if(Phase == PHASE_SACRIFICE){ - if(Kalec)((boss_kalecgosKJAI*)Kalec->AI())->EmpowerOrb(true); - }else if(Kalec)((boss_kalecgosKJAI*)Kalec->AI())->EmpowerOrb(false); + if(Kalec)((boss_kalecgos_kjAI*)Kalec->AI())->EmpowerOrb(true); + }else if(Kalec)((boss_kalecgos_kjAI*)Kalec->AI())->EmpowerOrb(false); Timer[TIMER_ORBS_EMPOWER]= (Phase == PHASE_SACRIFICE) ? 45000 : 35000; OrbActivated = true; TimerIsDeactiveted[TIMER_ORBS_EMPOWER] = true; @@ -749,7 +749,7 @@ struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementA void Reset(){ Phase = PHASE_DECEIVERS; - if(KalecKJ)((boss_kalecgosKJAI*)KalecKJ->AI())->ResetOrbs(); + if(KalecKJ)((boss_kalecgos_kjAI*)KalecKJ->AI())->ResetOrbs(); DeceiverDeathCount = 0; SummonedDeceivers = false; KiljaedenDeath = false; @@ -1270,8 +1270,8 @@ void AddSC_boss_kiljaeden() newscript->RegisterSelf(); newscript = new Script; - newscript->GetAI = &GetAI_boss_kalecgosKJ; - newscript->Name = "boss_kalecgosKJ"; + newscript->GetAI = &GetAI_boss_kalecgos_kj; + newscript->Name = "boss_kalecgos_kj"; newscript->RegisterSelf(); newscript = new Script; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ee91150d9d1..3f78f54900b 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6863,19 +6863,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig basepoints0 = triggerAmount; Item* castItem = triggeredByAura->GetParentAura()->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER - ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetParentAura()->GetCastItemGUID()) : NULL; - - // TODO: we need better rules here. Enrage should not overwrite death wish, but it should overwrite Wrecking Crew - // AuraMap::iterator i,next; - // for (i = m_Auras.begin(); i != m_Auras.end(); i = next) - // { - // next = i; - // ++next; - // if (!(*i).second) continue; - //if ( (*i).second->GetSpellProto()->Id == trigger_spell_id) continue; - // if (spellmgr.IsNoStackSpellDueToSpell(trigger_spell_id, (*i).second->GetSpellProto()->Id, (pVictim == this))) - // return false; - // } + ? ((Player*)this)->GetItemByGuid(triggeredByAura->GetParentAura()->GetCastItemGUID()) : NULL; // Try handle unknown trigger spells if (sSpellStore.LookupEntry(trigger_spell_id)==NULL) @@ -7377,6 +7365,24 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig return false; } + // check if triggering spell can stack with current target's auras (if not - don't proc) + // don't check if + // aura is passive (talent's aura) + // trigger_spell_id's aura is already active (allow to refresh triggered auras) + // trigger_spell_id's triggeredByAura is already active (for example shaman's shields) + AuraMap::iterator i,next; + uint32 aura_id = 0; + for (i = m_Auras.begin(); i != m_Auras.end(); i = next) + { + next = i; + ++next; + if (!(*i).second) continue; + aura_id = (*i).second->GetSpellProto()->Id; + if ( IsPassiveSpell(aura_id) || aura_id == trigger_spell_id || aura_id == triggeredByAura->GetSpellProto()->Id ) continue; + if (spellmgr.IsNoStackSpellDueToSpell(trigger_spell_id, (*i).second->GetSpellProto()->Id, ((*i).second->GetCasterGUID() == GetGUID()))) + return false; + } + // not allow proc extra attack spell at extra attack if( m_extraAttacks && IsSpellHaveEffect(triggerEntry, SPELL_EFFECT_ADD_EXTRA_ATTACKS) ) return false; |