diff options
author | n0n4m3 <none@none> | 2009-12-18 07:36:30 +0100 |
---|---|---|
committer | n0n4m3 <none@none> | 2009-12-18 07:36:30 +0100 |
commit | 7ad293b4e70b043fb8eef22b4ecac3df05a08156 (patch) | |
tree | f2b6b110ec6542d2dcf55507968637bd8d973c7a | |
parent | e699949274ae6688bdb90787b6391933fb98fdc2 (diff) | |
parent | 274a9ee77cc1221857fc2ba391286bcaa0fb0df5 (diff) |
merge
--HG--
branch : trunk
-rw-r--r-- | sql/FULL/world_spell_full.sql | 4 | ||||
-rw-r--r-- | sql/updates/6549_world_spell_proc_event.sql | 4 | ||||
-rw-r--r-- | src/bindings/scripts/base/escort_ai.cpp | 2 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/northrend/borean_tundra.cpp | 54 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/world/npcs_special.cpp | 66 |
5 files changed, 72 insertions, 58 deletions
diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql index 5217f5cf19c..0202194ac69 100644 --- a/sql/FULL/world_spell_full.sql +++ b/sql/FULL/world_spell_full.sql @@ -687,8 +687,8 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell ( 15362, 0x00, 6, 0x10001E00, 0x00010004, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Inspiration (Rank 2) ( 15363, 0x00, 6, 0x10001E00, 0x00010004, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Inspiration (Rank 3) ( 15600, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 1, 0, 0), -- Hand of Justice -( 16086, 0x04, 11, 0x00000020, 0x00000000, 0x00000000, 0x00011000, 0x00000000, 0, 0, 0), -- Improved Fire Nova Totem (Rank 1) -( 16544, 0x04, 11, 0x00000020, 0x00000000, 0x00000000, 0x00011000, 0x00000000, 0, 100, 0), -- Improved Fire Nova Totem (Rank 2) +( 16086, 0x04, 11, 0x00000000, 0x00040000, 0x00000000, 0x00030000, 0x00000000, 0, 0, 0), -- Improved Fire Nova Totem (Rank 1) +( 16544, 0x04, 11, 0x00000000, 0x00040000, 0x00000000, 0x00030000, 0x00000000, 0, 0, 0), -- Improved Fire Nova Totem (Rank 2) ( 16176, 0x00, 11, 0x000001C0, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 0), -- Ancestral Healing (Rank 1) ( 16180, 0x00, 11, 0x000000C0, 0x00000000, 0x00000010, 0x00000000, 0x00000002, 0, 0, 0), -- Improved Water Shield (Rank 1) ( 16196, 0x00, 11, 0x000000C0, 0x00000000, 0x00000010, 0x00000000, 0x00000002, 0, 0, 0), -- Improved Water Shield (Rank 2) diff --git a/sql/updates/6549_world_spell_proc_event.sql b/sql/updates/6549_world_spell_proc_event.sql new file mode 100644 index 00000000000..a7cae2b1c09 --- /dev/null +++ b/sql/updates/6549_world_spell_proc_event.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN (16086,16544); +INSERT INTO `spell_proc_event` VALUES +( 16086, 0x04, 11, 0x00000000, 0x00040000, 0x00000000, 0x00030000, 0x00000000, 0, 0, 0), -- Improved Fire Nova Totem (Rank 1) +( 16544, 0x04, 11, 0x00000000, 0x00040000, 0x00000000, 0x00030000, 0x00000000, 0, 0, 0); -- Improved Fire Nova Totem (Rank 2) diff --git a/src/bindings/scripts/base/escort_ai.cpp b/src/bindings/scripts/base/escort_ai.cpp index 9b31d032a71..07f0778389e 100644 --- a/src/bindings/scripts/base/escort_ai.cpp +++ b/src/bindings/scripts/base/escort_ai.cpp @@ -456,7 +456,7 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID, { if (pQuest != NULL) { - error_db_log("TSCR: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).", m_pQuestForEscort->GetQuestId()); + error_db_log("TSCR: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).", pQuest->GetQuestId()); return; } else diff --git a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp index 1f23470c308..3a3f13d39e7 100644 --- a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp +++ b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp @@ -645,9 +645,10 @@ struct TRINITY_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI go_caribou->SetLootState(GO_JUST_DEACTIVATED); if (TempSummon *summon = (TempSummon*)m_creature) - if (Unit *pTemp = summon->GetSummoner()) - if (pTemp->GetTypeId() == TYPEID_PLAYER) - CAST_PLR(pTemp)->KilledMonsterCredit(m_creature->GetEntry(),0); + if (summon->isSummon()) + if (Unit *pTemp = summon->GetSummoner()) + if (pTemp->GetTypeId() == TYPEID_PLAYER) + CAST_PLR(pTemp)->KilledMonsterCredit(m_creature->GetEntry(),0); if (go_caribou && go_caribou->GetTypeId() == TYPEID_GAMEOBJECT) go_caribou->SetGoState(GO_STATE_READY); @@ -1307,8 +1308,9 @@ struct TRINITY_DLL_DECL npc_image_lich_kingAI : public ScriptedAI if (uiType != POINT_MOTION_TYPE) return; - if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) - CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bArthasInPosition = true; + if (m_creature->isSummon()) + if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) + CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bArthasInPosition = true; } }; @@ -1332,8 +1334,9 @@ struct TRINITY_DLL_DECL npc_general_arlosAI : public ScriptedAI m_creature->addUnitState(UNIT_STAT_STUNNED); m_creature->CastSpell(m_creature, SPELL_STUN, true); - if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) - CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bArlosInPosition = true; + if (m_creature->isSummon()) + if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) + CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bArlosInPosition = true; } }; @@ -1382,8 +1385,9 @@ struct TRINITY_DLL_DECL npc_counselor_talbotAI : public ScriptedAI if(uiType != POINT_MOTION_TYPE) return; - if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) - CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bTalbotInPosition = true; + if (m_creature->isSummon()) + if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) + CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bTalbotInPosition = true; } void UpdateAI(const uint32 uiDiff) @@ -1481,14 +1485,16 @@ struct TRINITY_DLL_DECL npc_leryssaAI : public ScriptedAI m_creature->addUnitState(UNIT_STAT_STUNNED); m_creature->CastSpell(m_creature, SPELL_STUN, true); - if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) - CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bLeryssaInPosition = true; + if (m_creature->isSummon()) + if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) + CAST_AI(npc_thassarianAI,CAST_CRE(pSummoner)->AI())->bLeryssaInPosition = true; bDone = true; } else { m_creature->SetStandState(UNIT_STAND_STATE_SIT); - if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) + if (m_creature->isSummon()) + if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner()) pSummoner->SetStandState(UNIT_STAND_STATE_SIT); Phase_Timer = 1500; Phase = 1; @@ -1504,8 +1510,9 @@ struct TRINITY_DLL_DECL npc_leryssaAI : public ScriptedAI switch (Phase) { case 1: - if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) - DoScriptText(SAY_THASSARIAN_4, pThassarian); + if (m_creature->isSummon()) + if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) + DoScriptText(SAY_THASSARIAN_4, pThassarian); Phase_Timer = 5000; ++Phase; break; @@ -1515,8 +1522,9 @@ struct TRINITY_DLL_DECL npc_leryssaAI : public ScriptedAI ++Phase; break; case 3: - if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) - DoScriptText(SAY_THASSARIAN_5, pThassarian); + if (m_creature->isSummon()) + if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) + DoScriptText(SAY_THASSARIAN_5, pThassarian); Phase_Timer = 5000; ++Phase; break; @@ -1526,7 +1534,8 @@ struct TRINITY_DLL_DECL npc_leryssaAI : public ScriptedAI ++Phase; break; case 5: - if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) + if (m_creature->isSummon()) + if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) DoScriptText(SAY_THASSARIAN_6, pThassarian); Phase_Timer = 5000; ++Phase; @@ -1538,11 +1547,12 @@ struct TRINITY_DLL_DECL npc_leryssaAI : public ScriptedAI ++Phase; break; case 7: - if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) - { - DoScriptText(SAY_THASSARIAN_7, pThassarian); - CAST_AI(npc_thassarianAI,CAST_CRE(pThassarian)->AI())->uiPhase = 16; - } + if (m_creature->isSummon()) + if (Unit* pThassarian = CAST_SUM(m_creature)->GetSummoner()) + { + DoScriptText(SAY_THASSARIAN_7, pThassarian); + CAST_AI(npc_thassarianAI,CAST_CRE(pThassarian)->AI())->uiPhase = 16; + } Phase_Timer = 5000; Phase = 0; break; diff --git a/src/bindings/scripts/scripts/world/npcs_special.cpp b/src/bindings/scripts/scripts/world/npcs_special.cpp index 3fad7034238..de62242e175 100644 --- a/src/bindings/scripts/scripts/world/npcs_special.cpp +++ b/src/bindings/scripts/scripts/world/npcs_special.cpp @@ -1494,22 +1494,22 @@ CreatureAI* GetAI_npc_tonk_mine(Creature* pCreature) ## npc_brewfest_reveler ####*/ -struct TRINITY_DLL_DECL npc_brewfest_revelerAI : public ScriptedAI
-{
- npc_brewfest_revelerAI(Creature* c) : ScriptedAI(c) {}
- void ReceiveEmote(Player* pPlayer, uint32 emote)
- {
- if (!IsHolidayActive(HOLIDAY_BREWFEST))
- return;
-
- if (emote == TEXTEMOTE_DANCE)
- m_creature->CastSpell(pPlayer, 41586, false);
- }
-};
-
-CreatureAI* GetAI_npc_brewfest_reveler(Creature* pCreature)
-{
- return new npc_brewfest_revelerAI(pCreature);
+struct TRINITY_DLL_DECL npc_brewfest_revelerAI : public ScriptedAI +{ + npc_brewfest_revelerAI(Creature* c) : ScriptedAI(c) {} + void ReceiveEmote(Player* pPlayer, uint32 emote) + { + if (!IsHolidayActive(HOLIDAY_BREWFEST)) + return; + + if (emote == TEXTEMOTE_DANCE) + m_creature->CastSpell(pPlayer, 41586, false); + } +}; + +CreatureAI* GetAI_npc_brewfest_reveler(Creature* pCreature) +{ + return new npc_brewfest_revelerAI(pCreature); } /*#### @@ -1519,31 +1519,31 @@ CreatureAI* GetAI_npc_brewfest_reveler(Creature* pCreature) struct TRINITY_DLL_DECL npc_winter_revelerAI : public ScriptedAI { npc_winter_revelerAI(Creature* c) : ScriptedAI(c) {} - void ReceiveEmote(Player* pPlayer, uint32 emote)
- {
- if (!IsHolidayActive(HOLIDAY_FEAST_OF_WINTER_VEIL))
+ void ReceiveEmote(Player* pPlayer, uint32 emote) + { + if (!IsHolidayActive(HOLIDAY_FEAST_OF_WINTER_VEIL)) + return; + //TODO: check auralist. + if (pPlayer->HasAura(26218)) return; - //TODO: check auralist.
- if (pPlayer->HasAura(26218))
- return;
-
+ if (emote == TEXTEMOTE_KISS) { - m_creature->CastSpell(m_creature, 26218, false);
- pPlayer->CastSpell(pPlayer, 26218, false);
- switch (urand(0,2))
- {
- case 0: m_creature->CastSpell(pPlayer, 26207, false); break;
- case 1: m_creature->CastSpell(pPlayer, 26206, false); break;
- case 2: m_creature->CastSpell(pPlayer, 45036, false); break;
+ m_creature->CastSpell(m_creature, 26218, false); + pPlayer->CastSpell(pPlayer, 26218, false); + switch (urand(0,2)) + { + case 0: m_creature->CastSpell(pPlayer, 26207, false); break; + case 1: m_creature->CastSpell(pPlayer, 26206, false); break; + case 2: m_creature->CastSpell(pPlayer, 45036, false); break; } } } }; -CreatureAI* GetAI_npc_winter_reveler(Creature* pCreature)
-{
- return new npc_winter_revelerAI(pCreature);
+CreatureAI* GetAI_npc_winter_reveler(Creature* pCreature) +{ + return new npc_winter_revelerAI(pCreature); } |