aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_01_24_00_world_misc.sql18
-rw-r--r--src/server/scripts/Northrend/icecrown.cpp93
2 files changed, 18 insertions, 93 deletions
diff --git a/sql/updates/world/2012_01_24_00_world_misc.sql b/sql/updates/world/2012_01_24_00_world_misc.sql
new file mode 100644
index 00000000000..b66a0bd91ca
--- /dev/null
+++ b/sql/updates/world/2012_01_24_00_world_misc.sql
@@ -0,0 +1,18 @@
+-- Make Dame Evniki Kapsalis show vendor gossip option only to players with Crusader title
+UPDATE `creature_template` SET `AIName` = 'SmartAI',`ScriptName` = '' WHERE `entry` = 34885;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10598;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`COMMENT`) VALUES
+(15,10598,0,0,17,2816,0,0,0,'',"Evniki Kapsalis should only sell to Crusaders"),
+(15,10598,0,1,17,2817,0,0,0,'',"Evniki Kapsalis should only sell to Crusaders");
+
+SET @SPELL_CHAIN = 68341;
+SET @NPC_FJOLA_LIGHTBANE = 36065;
+SET @NPC_EYDIS_DARKBANE = 36066;
+SET @NPC_PRIESTESS_ALORAH = 36101;
+SET @NPC_PRIEST_GRIMMIN = 36102;
+
+UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN(@NPC_PRIESTESS_ALORAH,@NPC_PRIEST_GRIMMIN);
+DELETE FROM `smart_scripts` WHERE (`entryorguid` IN(@NPC_PRIESTESS_ALORAH,@NPC_PRIEST_GRIMMIN) AND `source_type`=0);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@NPC_PRIESTESS_ALORAH,0,0,0,1,0,100,1,100,100,0,0,11,@SPELL_CHAIN,0,0,0,0,0,19,@NPC_EYDIS_DARKBANE,0,0,0,0,0,0,'Priestess Alorah - Cast chain on Eydis Darkbane'),
+(@NPC_PRIEST_GRIMMIN,0,0,0,1,0,100,1,100,100,0,0,11,@SPELL_CHAIN,0,0,0,0,0,19,@NPC_FJOLA_LIGHTBANE,0,0,0,0,0,0,'Priestess Grimmin - Cast chain on Fjola Lightbane'); \ No newline at end of file
diff --git a/src/server/scripts/Northrend/icecrown.cpp b/src/server/scripts/Northrend/icecrown.cpp
index 28384455616..91522503d65 100644
--- a/src/server/scripts/Northrend/icecrown.cpp
+++ b/src/server/scripts/Northrend/icecrown.cpp
@@ -115,38 +115,6 @@ public:
};
/*######
-## npc_dame_evniki_kapsalis
-######*/
-
-enum eDameEnvikiKapsalis
-{
- TITLE_CRUSADER = 123
-};
-
-class npc_dame_evniki_kapsalis : public CreatureScript
-{
-public:
- npc_dame_evniki_kapsalis() : CreatureScript("npc_dame_evniki_kapsalis") { }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (player->HasTitle(TITLE_CRUSADER))
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
- return true;
- }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- if (uiAction == GOSSIP_ACTION_TRADE)
- player->GetSession()->SendListInventory(creature->GetGUID());
- return true;
- }
-};
-
-/*######
## npc_squire_david
######*/
@@ -276,65 +244,6 @@ public:
};
/*######
-## npc_alorah_and_grimmin
-######*/
-
-enum ealorah_and_grimmin
-{
- SPELL_CHAIN = 68341,
- NPC_FJOLA_LIGHTBANE = 36065,
- NPC_EYDIS_DARKBANE = 36066,
- NPC_PRIESTESS_ALORAH = 36101,
- NPC_PRIEST_GRIMMIN = 36102
-};
-
-class npc_alorah_and_grimmin : public CreatureScript
-{
-public:
- npc_alorah_and_grimmin() : CreatureScript("npc_alorah_and_grimmin") { }
-
- struct npc_alorah_and_grimminAI : public ScriptedAI
- {
- npc_alorah_and_grimminAI(Creature* creature) : ScriptedAI(creature) {}
-
- bool uiCast;
-
- void Reset()
- {
- uiCast = false;
- }
-
- void UpdateAI(const uint32 /*uiDiff*/)
- {
- if (uiCast)
- return;
- uiCast = true;
- Creature* target = NULL;
-
- switch (me->GetEntry())
- {
- case NPC_PRIESTESS_ALORAH:
- target = me->FindNearestCreature(NPC_EYDIS_DARKBANE, 10.0f);
- break;
- case NPC_PRIEST_GRIMMIN:
- target = me->FindNearestCreature(NPC_FJOLA_LIGHTBANE, 10.0f);
- break;
- }
- if (target)
- DoCast(target, SPELL_CHAIN);
-
- if (!UpdateVictim())
- return;
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_alorah_and_grimminAI(creature);
- }
-};
-
-/*######
## npc_guardian_pavilion
######*/
@@ -429,10 +338,8 @@ public:
void AddSC_icecrown()
{
new npc_arete;
- new npc_dame_evniki_kapsalis;
new npc_squire_david;
new npc_argent_valiant;
- new npc_alorah_and_grimmin;
new npc_guardian_pavilion;
new npc_vereth_the_cunning;
}