-
-
Save Demonid/7f79bb197d8c8aa8d798 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp | |
index 27054b5..ca7afc7 100644 | |
--- a/src/server/scripts/Northrend/icecrown.cpp | |
+++ b/src/server/scripts/Northrend/icecrown.cpp | |
@@ -276,6 +276,149 @@ public: | |
}; | |
/*###### | |
+## npc_squire_danny | |
+######*/ | |
+ | |
+enum eSquireDanny | |
+{ | |
+ QUEST_THE_VALIANT_S_CHALLENGE_TH = 13727, | |
+ QUEST_THE_VALIANT_S_CHALLENGE_OH = 13726, | |
+ QUEST_THE_VALIANT_S_CHALLENGE_CH = 13728, | |
+ QUEST_THE_VALIANT_S_CHALLENGE_UH = 13729, | |
+ QUEST_THE_VALIANT_S_CHALLENGE_BH = 13731, | |
+ QUEST_THE_VALIANT_S_CHALLENGE_GA = 13723, | |
+ QUEST_THE_VALIANT_S_CHALLENGE_KA = 13724, | |
+ QUEST_THE_VALIANT_S_CHALLENGE_NA = 13725, | |
+ QUEST_THE_VALIANT_S_CHALLENGE_HA = 13699, | |
+ QUEST_THE_VALIANT_S_CHALLENGE_DA = 33312, | |
+ | |
+ NPC_ARGENT_CHAMPION = 33707, | |
+ | |
+ GOSSIP_TEXTID_DANNY = 14407 | |
+}; | |
+ | |
+#define GOSSIP_DANNY_ITEM "I am ready to fight!" | |
+ | |
+class npc_squire_danny : public CreatureScript | |
+{ | |
+public: | |
+ npc_squire_danny() : CreatureScript("npc_squire_danny") { } | |
+ | |
+ bool OnGossipHello(Player* player, Creature* creature) | |
+ { | |
+ if (player->GetQuestStatus(QUEST_THE_VALIANT_S_CHALLENGE_TH) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_VALIANT_S_CHALLENGE_OH) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_VALIANT_S_CHALLENGE_CH) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_VALIANT_S_CHALLENGE_UH) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_VALIANT_S_CHALLENGE_BH) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_VALIANT_S_CHALLENGE_GA) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_VALIANT_S_CHALLENGE_KA) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_VALIANT_S_CHALLENGE_NA) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_VALIANT_S_CHALLENGE_HA) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_VALIANT_S_CHALLENGE_DA) == QUEST_STATUS_INCOMPLETE)//We need more info about it. | |
+ { | |
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DANNY_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); | |
+ } | |
+ | |
+ player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DANNY, creature->GetGUID()); | |
+ return true; | |
+ } | |
+ | |
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) | |
+ { | |
+ player->PlayerTalkClass->ClearMenus(); | |
+ if (uiAction == GOSSIP_ACTION_INFO_DEF+1) | |
+ { | |
+ player->CLOSE_GOSSIP_MENU(); | |
+ creature->SummonCreature(NPC_ARGENT_CHAMPION, 8528.780f, 1057.373f, 548.805f, 1.12f); | |
+ } | |
+ return true; | |
+ } | |
+}; | |
+ | |
+/*###### | |
+## npc_argent_champion | |
+######*/ | |
+ | |
+enum eArgentChampion | |
+{ | |
+ SPELL_CHARGE1 = 63010, | |
+ SPELL_SHIELD_BREAKER1 = 65147, | |
+ | |
+ NPC_ARGENT_CHAMPION_CREDIT = 33708 | |
+}; | |
+ | |
+class npc_argent_champion : public CreatureScript | |
+{ | |
+public: | |
+ npc_argent_champion() : CreatureScript("npc_argent_champion") { } | |
+ | |
+ struct npc_argent_championAI : public ScriptedAI | |
+ { | |
+ npc_argent_championAI(Creature* creature) : ScriptedAI(creature) | |
+ { | |
+ creature->GetMotionMaster()->MovePoint(0, 8551.926f, 1101.852f, 556.787f); | |
+ creature->setFaction(35); //wrong faction in db? | |
+ } | |
+ | |
+ uint32 uiChargeTimer; | |
+ uint32 uiShieldBreakerTimer; | |
+ | |
+ void Reset() | |
+ { | |
+ uiChargeTimer = 7000; | |
+ uiShieldBreakerTimer = 10000; | |
+ } | |
+ | |
+ void MovementInform(uint32 uiType, uint32 /*uiId*/) | |
+ { | |
+ if (uiType != POINT_MOTION_TYPE) | |
+ return; | |
+ | |
+ me->setFaction(14); | |
+ } | |
+ | |
+ void DamageTaken(Unit* pDoneBy, uint32& uiDamage) | |
+ { | |
+ if (uiDamage > me->GetHealth() && pDoneBy->GetTypeId() == TYPEID_PLAYER) | |
+ { | |
+ uiDamage = 0; | |
+ CAST_PLR(pDoneBy)->KilledMonsterCredit(NPC_ARGENT_CHAMPION_CREDIT, 0); | |
+ me->setFaction(35); | |
+ me->DespawnOrUnsummon(5000); | |
+ me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation()); | |
+ EnterEvadeMode(); | |
+ } | |
+ } | |
+ | |
+ void UpdateAI(const uint32 uiDiff) | |
+ { | |
+ if (!UpdateVictim()) | |
+ return; | |
+ | |
+ if (uiChargeTimer <= uiDiff) | |
+ { | |
+ DoCastVictim(SPELL_CHARGE); | |
+ uiChargeTimer = 7000; | |
+ } else uiChargeTimer -= uiDiff; | |
+ | |
+ if (uiShieldBreakerTimer <= uiDiff) | |
+ { | |
+ DoCastVictim(SPELL_SHIELD_BREAKER); | |
+ uiShieldBreakerTimer = 10000; | |
+ } else uiShieldBreakerTimer -= uiDiff; | |
+ | |
+ DoMeleeAttackIfReady(); | |
+ } | |
+ }; | |
+ | |
+ CreatureAI* GetAI(Creature* creature) const | |
+ { | |
+ return new npc_argent_championAI(creature); | |
+ } | |
+}; | |
+ | |
+/*###### | |
## npc_alorah_and_grimmin | |
######*/ | |
@@ -426,13 +569,135 @@ public: | |
} | |
}; | |
+/*###### | |
+## npc_valiants | |
+######*/ | |
+ | |
+enum evaliants | |
+{ | |
+ QUEST_THE_GRAND_MELEE_TH = 13772, | |
+ QUEST_THE_GRAND_MELEE_OH = 13767, | |
+ QUEST_THE_GRAND_MELEE_CH = 13777, | |
+ QUEST_THE_GRAND_MELEE_UH = 13782, | |
+ QUEST_THE_GRAND_MELEE_BH = 13787, | |
+ QUEST_THE_GRAND_MELEE_GA = 13750, | |
+ QUEST_THE_GRAND_MELEE_KA = 13756, | |
+ QUEST_THE_GRAND_MELEE_NA = 13761, | |
+ QUEST_THE_GRAND_MELEE_HA = 13665, | |
+ QUEST_THE_GRAND_MELEE_DA = 13745, | |
+ | |
+ SPELL_CHARGE2 = 63010, | |
+ SPELL_SHIELD_BREAKER2 = 65147, | |
+ | |
+ SPELL_MELEE_VICTORY = 62770, | |
+ | |
+ GOSSIP_TEXTID_VALIANTS = 14407 | |
+}; | |
+ | |
+#define GOSSIP_VALIANTS_ITEM "I am ready to fight!" | |
+ | |
+class npc_valiants : public CreatureScript | |
+{ | |
+public: | |
+ npc_valiants() : CreatureScript("npc_valiants") { } | |
+ | |
+ bool OnGossipHello(Player* player, Creature* creature) | |
+ { | |
+ if (player->GetQuestStatus(QUEST_THE_GRAND_MELEE_TH) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_GRAND_MELEE_OH) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_GRAND_MELEE_CH) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_GRAND_MELEE_UH) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_GRAND_MELEE_BH) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_GRAND_MELEE_GA) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_GRAND_MELEE_KA) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_GRAND_MELEE_NA) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_GRAND_MELEE_HA) == QUEST_STATUS_INCOMPLETE || | |
+ player->GetQuestStatus(QUEST_THE_GRAND_MELEE_DA) == QUEST_STATUS_INCOMPLETE)//We need more info about it. | |
+ { | |
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VALIANTS_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); | |
+ } | |
+ | |
+ player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VALIANTS, creature->GetGUID()); | |
+ return true; | |
+ } | |
+ | |
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) | |
+ { | |
+ player->PlayerTalkClass->ClearMenus(); | |
+ if (uiAction == GOSSIP_ACTION_INFO_DEF+1) | |
+ { | |
+ player->CLOSE_GOSSIP_MENU(); | |
+ creature->setFaction(14); | |
+ } | |
+ return true; | |
+ } | |
+ | |
+ struct npc_valiantsAI : public ScriptedAI | |
+ { | |
+ npc_valiantsAI(Creature* creature) : ScriptedAI(creature) | |
+ | |
+ { | |
+ creature->setFaction(14); | |
+ } | |
+ | |
+ uint32 uiChargeTimer; | |
+ uint32 uiShieldBreakerTimer; | |
+ | |
+ void Reset() | |
+ { | |
+ uiChargeTimer = 7000; | |
+ uiShieldBreakerTimer = 10000; | |
+ } | |
+ | |
+ void DamageTaken(Unit* pDoneBy, uint32& uiDamage) | |
+ { | |
+ if (uiDamage > me->GetHealth() && pDoneBy->GetTypeId() == TYPEID_PLAYER) | |
+ { | |
+ uiDamage = 0; | |
+ CAST_PLR(pDoneBy)->AddItem(45127, 1); | |
+ me->setFaction(35); | |
+ | |
+ } | |
+ } | |
+ | |
+ void UpdateAI(const uint32 uiDiff) | |
+ { | |
+ if (!UpdateVictim()) | |
+ return; | |
+ | |
+ if (uiChargeTimer <= uiDiff) | |
+ { | |
+ DoCastVictim(SPELL_CHARGE); | |
+ uiChargeTimer = 7000; | |
+ } else uiChargeTimer -= uiDiff; | |
+ | |
+ if (uiShieldBreakerTimer <= uiDiff) | |
+ { | |
+ DoCastVictim(SPELL_SHIELD_BREAKER); | |
+ uiShieldBreakerTimer = 10000; | |
+ } else uiShieldBreakerTimer -= uiDiff; | |
+ | |
+ DoMeleeAttackIfReady(); | |
+ } | |
+ }; | |
+ | |
+ CreatureAI* GetAI(Creature* creature) const | |
+ { | |
+ return new npc_valiantsAI(creature); | |
+ } | |
+}; | |
+ | |
+ | |
void AddSC_icecrown() | |
{ | |
new npc_arete; | |
new npc_dame_evniki_kapsalis; | |
new npc_squire_david; | |
new npc_argent_valiant; | |
+ new npc_squire_danny; | |
+ new npc_argent_champion; | |
new npc_alorah_and_grimmin; | |
new npc_guardian_pavilion; | |
new npc_vereth_the_cunning; | |
+ new npc_valiants; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM creature_template_addon WHERE (entry=33707); | |
INSERT INTO creature_template_addon (entry, path_id, mount, bytes1, bytes2, emote, auras) | |
VALUES (33707, 0, 28919, 0, 0, 0, NULL); | |
UPDATE creature_template SET ScriptName = 'npc_argent_champion' WHERE entry = 33707; | |
UPDATE creature_template SET ScriptName = 'npc_squire_danny' WHERE entry = 33518; | |
UPDATE creature_template SET ScriptName = 'npc_valiants' WHERE entry in (33562, 33559, 33558, 33564, 33561, 33384, 33306, 33285, 33382, 33383); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment