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 | |
parent | 03d1a8d84cfa58882f5c1cc0f4bf9147faa5cfdf (diff) | |
parent | 883cd02304924f04e36306497cf0d36ab373d957 (diff) |
*Merge. Do not forget to apply TC1 sql!
--HG--
branch : trunk
-rw-r--r-- | sql/updates/TC1_1509_world_scripts.sql | 2 | ||||
-rw-r--r-- | sql/world_scripts_full.sql | 5 | ||||
-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 |
5 files changed, 36 insertions, 27 deletions
diff --git a/sql/updates/TC1_1509_world_scripts.sql b/sql/updates/TC1_1509_world_scripts.sql new file mode 100644 index 00000000000..d2adb3fb644 --- /dev/null +++ b/sql/updates/TC1_1509_world_scripts.sql @@ -0,0 +1,2 @@ +UPDATE `gameobject_template` SET `ScriptName` = 'kalecgos_teleporter' WHERE `entry` = 187055; +UPDATE `creature_template` SET `ScriptName` = 'boss_kalecgos_kj' WHERE `entry` = 25319; diff --git a/sql/world_scripts_full.sql b/sql/world_scripts_full.sql index 2b7ad26c8de..e539a1229f8 100644 --- a/sql/world_scripts_full.sql +++ b/sql/world_scripts_full.sql @@ -825,7 +825,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_sacrolash' WHERE `entry`=25165 UPDATE `creature_template` SET `ScriptName`='boss_alythess' WHERE `entry`=25166; UPDATE `creature_template` SET `ScriptName`='mob_shadow_image' WHERE `entry`=25214; UPDATE `creature_template` SET `ScriptName`='boss_kiljaeden' WHERE `entry`=25315; -UPDATE `creature_template` SET `ScriptName`='boss_kalecgosKJ' WHERE `entry`=25319; +UPDATE `creature_template` SET `ScriptName`='boss_kalecgos_kj' WHERE `entry`=25319; UPDATE `creature_template` SET `ScriptName`='mob_kiljaeden_controller' WHERE `entry`=25608; UPDATE `creature_template` SET `ScriptName`='mob_hand_of_the_deceiver' WHERE `entry`=25588; UPDATE `creature_template` SET `ScriptName`='mob_felfire_portal' WHERE `entry`=25603; @@ -833,6 +833,7 @@ UPDATE `creature_template` SET `ScriptName`='mob_volatile_felfire_fiend' WHERE ` UPDATE `creature_template` SET `ScriptName`='mob_armageddon' WHERE `entry`=25735; UPDATE `creature_template` SET `ScriptName`='mob_shield_orb' WHERE `entry`=25502; UPDATE `creature_template` SET `ScriptName`='mob_sinster_reflection' WHERE `entry`=25708; +UPDATE `gameobject_template` SET `ScriptName`='go_orb_of_the_blue_flight' WHERE `entry`=188415; UPDATE `creature_template` SET `ScriptName`='npc_void_sentinel' WHERE `entry`=25772; UPDATE `creature_template` SET `ScriptName`='npc_dark_fiend' WHERE `entry`=25744; UPDATE `creature_template` SET `ScriptName`='boss_muru' WHERE `entry`=25741; @@ -841,7 +842,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_muru_portal' WHERE `entry`=2577 UPDATE `creature_template` SET `ScriptName`='boss_kalecgos' WHERE `entry`=24850; UPDATE `creature_template` SET `ScriptName`='boss_sathrovarr' WHERE `entry`=24892; UPDATE `creature_template` SET `ScriptName`='boss_kalec' WHERE `entry`=24891; -UPDATE gameobject_template SET scriptname = 'kalocegos_teleporter' WHERE entry = 187055; +UPDATE `gameobject_template` SET `ScriptName`='kalecgos_teleporter' WHERE `entry`=187055; UPDATE `creature_template` SET `ScriptName`='npc_blackhole' WHERE `entry`=25855; /* SWAMP OF SORROWS */ 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; |