aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_12_23_02_world_gossip.sql12
-rw-r--r--src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_ashenvale.cpp13
-rw-r--r--src/server/scripts/Kalimdor/zone_azshara.cpp36
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp54
5 files changed, 59 insertions, 62 deletions
diff --git a/sql/updates/world/2013_12_23_02_world_gossip.sql b/sql/updates/world/2013_12_23_02_world_gossip.sql
new file mode 100644
index 00000000000..63995655888
--- /dev/null
+++ b/sql/updates/world/2013_12_23_02_world_gossip.sql
@@ -0,0 +1,12 @@
+-- Add Missing gossip for Engineer "Spark" Overgrind
+UPDATE `creature_template` SET `gossip_menu_id`=7426 WHERE `entry`=17243;
+DELETE FROM `gossip_menu` WHERE (`entry`=7426 AND `text_id`=8978);
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (7426,8978);
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (7426);
+INSERT INTO `gossip_menu_option` (menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, action_menu_id, action_poi_id, box_coded, box_money, box_text) VALUES
+(7426,0,0, 'It''s over, Spark. The admiral knows it was you who betrayed the Alliance. Now you''re either going to cooperate with me and tell me everything that you know or we''re going to engage in some fisticuff.',1,1,0,0,0,0, '');
+
+-- Add Conditions for Engineer "Spark" Overgrind gossip
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=7426;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15,7426,0,0,0,9,0,9537,0,0,0,0,0, '', 'Gossip Option - Show Option if Quest 9537 is taken');
diff --git a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
index c3fe8823bc0..b8939f16c5d 100644
--- a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
@@ -60,11 +60,7 @@ enum ProfessorPhizzlethorpe
class npc_professor_phizzlethorpe : public CreatureScript
{
public:
-
- npc_professor_phizzlethorpe()
- : CreatureScript("npc_professor_phizzlethorpe")
- {
- }
+ npc_professor_phizzlethorpe() : CreatureScript("npc_professor_phizzlethorpe") { }
struct npc_professor_phizzlethorpeAI : public npc_escortAI
{
diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
index b4aeced5e9b..c278c12ee23 100644
--- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
@@ -65,10 +65,7 @@ enum TorekMisc
class npc_torek : public CreatureScript
{
public:
-
- npc_torek() : CreatureScript("npc_torek")
- {
- }
+ npc_torek() : CreatureScript("npc_torek") { }
struct npc_torekAI : public npc_escortAI
{
@@ -411,22 +408,22 @@ class npc_muglash : public CreatureScript
}
}
- void UpdateAI(uint32 uiDiff) OVERRIDE
+ void UpdateAI(uint32 diff) OVERRIDE
{
- npc_escortAI::UpdateAI(uiDiff);
+ npc_escortAI::UpdateAI(diff);
if (!me->GetVictim())
{
if (HasEscortState(STATE_ESCORT_PAUSED) && IsBrazierExtinguished)
{
- if (EventTimer < uiDiff)
+ if (EventTimer < diff)
{
++WaveId;
DoWaveSummon();
EventTimer = 10000;
}
else
- EventTimer -= uiDiff;
+ EventTimer -= diff;
}
return;
}
diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp
index 84f9df4ed60..2d7d2b3e8a9 100644
--- a/src/server/scripts/Kalimdor/zone_azshara.cpp
+++ b/src/server/scripts/Kalimdor/zone_azshara.cpp
@@ -40,16 +40,22 @@ EndContentData */
## npc_spitelashes
######*/
+enum Spitelashes
+{
+ SPELL_POLYMORPH_RANK1 = 118,
+ SPELL_POLYMORPH_RANK2 = 12824,
+ SPELL_POLYMORPH_RANK3 = 12825,
+ SPELL_POLYMORPH_RANK4 = 12826,
+ SPELL_POLYMORPH = 29124,
+ SPELL_POLYMORPH_BACKFIRE = 28406,
+ SPELL_REMOVE_POLYMORPH = 6924
+};
+
class npc_spitelashes : public CreatureScript
{
public:
npc_spitelashes() : CreatureScript("npc_spitelashes") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_spitelashesAI(creature);
- }
-
struct npc_spitelashesAI : public ScriptedAI
{
npc_spitelashesAI(Creature* creature) : ScriptedAI(creature) { }
@@ -72,15 +78,15 @@ public:
switch (spell->Id)
{
- case 118:
- case 12824:
- case 12825:
- case 12826:
+ case SPELL_POLYMORPH_RANK1:
+ case SPELL_POLYMORPH_RANK2:
+ case SPELL_POLYMORPH_RANK3:
+ case SPELL_POLYMORPH_RANK4:
if (Player* player = unit->ToPlayer())
if (player->GetQuestStatus(9364) == QUEST_STATUS_INCOMPLETE)
{
spellhit = true;
- DoCast(me, 29124);
+ DoCast(me, SPELL_POLYMORPH);
}
break;
default:
@@ -102,18 +108,22 @@ public:
morphtimer+=diff;
if (morphtimer >= 5000)
{
- DoCast(me, 28406); //summon copies
- DoCast(me, 6924); //visual explosion
+ DoCast(me, SPELL_POLYMORPH_BACKFIRE); // summon copies
+ DoCast(me, SPELL_REMOVE_POLYMORPH); // visual explosion
}
}
if (!UpdateVictim())
return;
- /// @todo add abilities for the different creatures
+ // @todo add abilities for the different creatures
DoMeleeAttackIfReady();
}
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_spitelashesAI(creature);
+ }
};
/*######
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index ddfe5307a3a..98ba62a0a57 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -187,39 +187,11 @@ enum Overgrind
SPELL_DYNAMITE = 7978
};
-#define GOSSIP_FIGHT "Traitor! You will be brought to justice!"
-
class npc_engineer_spark_overgrind : public CreatureScript
{
public:
npc_engineer_spark_overgrind() : CreatureScript("npc_engineer_spark_overgrind") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_INFO_DEF)
- {
- player->CLOSE_GOSSIP_MENU();
- creature->setFaction(FACTION_HOSTILE);
- CAST_AI(npc_engineer_spark_overgrind::npc_engineer_spark_overgrindAI, creature->AI())->AttackStart(player);
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
- {
- if (player->GetQuestStatus(QUEST_GNOMERCY) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
- return true;
- }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_engineer_spark_overgrindAI(creature);
- }
-
struct npc_engineer_spark_overgrindAI : public ScriptedAI
{
npc_engineer_spark_overgrindAI(Creature* creature) : ScriptedAI(creature)
@@ -231,14 +203,6 @@ public:
IsTreeEvent = true;
}
- uint32 NormFaction;
- uint32 NpcFlags;
-
- uint32 DynamiteTimer;
- uint32 EmoteTimer;
-
- bool IsTreeEvent;
-
void Reset() OVERRIDE
{
DynamiteTimer = 8000;
@@ -255,6 +219,13 @@ public:
Talk(ATTACK_YELL, who);
}
+ void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
+ {
+ player->CLOSE_GOSSIP_MENU();
+ me->setFaction(FACTION_HOSTILE);
+ me->Attack(player, true);
+ }
+
void UpdateAI(uint32 diff) OVERRIDE
{
if (!me->IsInCombat() && !IsTreeEvent)
@@ -280,8 +251,19 @@ public:
DoMeleeAttackIfReady();
}
+
+ private:
+ uint32 NormFaction;
+ uint32 NpcFlags;
+ uint32 DynamiteTimer;
+ uint32 EmoteTimer;
+ bool IsTreeEvent;
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_engineer_spark_overgrindAI(creature);
+ }
};
/*######