aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
4 files changed, 47 insertions, 62 deletions
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);
+ }
};
/*######