aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWyreth <32145860+Wyreth@users.noreply.github.com>2017-11-02 05:36:27 +0100
committertkrokli <tkrokli@users.noreply.github.com>2017-11-02 05:36:27 +0100
commit8888e6d96d026597190190d8f5f554d52df61216 (patch)
tree3ff0f7480d86c9936c4da249b003556295860e16 /src
parentb135663dd9a7e866d647199cd64b4e50960e8978 (diff)
Scripts/Tanaris: move Aquementas to SAI & improve related event (#20464)
* Script/Tanaris: move Aquementas to SAI and improve related event Closes #11668
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Kalimdor/zone_tanaris.cpp123
1 files changed, 0 insertions, 123 deletions
diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp
index c3803d06022..1898b9406b0 100644
--- a/src/server/scripts/Kalimdor/zone_tanaris.cpp
+++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp
@@ -24,7 +24,6 @@ SDCategory: Tanaris
EndScriptData */
/* ContentData
-npc_aquementas
npc_custodian_of_time
npc_OOX17
npc_tooga
@@ -40,127 +39,6 @@ EndContentData */
#include "WorldSession.h"
/*######
-## npc_aquementas
-######*/
-
-enum Aquementas
-{
- AGGRO_YELL_AQUE = 0,
-
- SPELL_AQUA_JET = 13586,
- SPELL_FROST_SHOCK = 15089,
-
- ITEM_BOOK_OF_AQUOR = 11169,
- ITEM_SILVERY_CLAWS = 11172,
- ITEM_IRONTREE_HEART = 11173,
- ITEM_SILVER_TOTEM = 11522
-};
-
-class npc_aquementas : public CreatureScript
-{
-public:
- npc_aquementas() : CreatureScript("npc_aquementas") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_aquementasAI(creature);
- }
-
- struct npc_aquementasAI : public ScriptedAI
- {
- npc_aquementasAI(Creature* creature) : ScriptedAI(creature)
- {
- Initialize();
- }
-
- void Initialize()
- {
- SendItemTimer = 0;
- SwitchFactionTimer = 10000;
-
- isFriendly = true;
-
- AquaJetTimer = 5000;
- FrostShockTimer = 1000;
- }
-
- uint32 SendItemTimer;
- uint32 SwitchFactionTimer;
- bool isFriendly;
-
- uint32 FrostShockTimer;
- uint32 AquaJetTimer;
-
- void Reset() override
- {
- Initialize();
- me->SetFaction(FACTION_FRIENDLY);
- }
-
- void SendItem(Unit* receiver)
- {
- Player* player = receiver->ToPlayer();
-
- if (player && player->HasItemCount(ITEM_BOOK_OF_AQUOR, 1, false) &&
- player->HasItemCount(ITEM_SILVERY_CLAWS, 11, false) &&
- player->HasItemCount(ITEM_IRONTREE_HEART, 1, false) &&
- !player->HasItemCount(ITEM_SILVER_TOTEM, 1, true))
- {
- ItemPosCountVec dest;
- uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 11522, 1, nullptr);
- if (msg == EQUIP_ERR_OK)
- player->StoreNewItem(dest, ITEM_SILVER_TOTEM, true);
- }
- }
-
- void EnterCombat(Unit* who) override
- {
- Talk(AGGRO_YELL_AQUE, who);
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (isFriendly)
- {
- if (SwitchFactionTimer <= diff)
- {
- me->SetFaction(FACTION_ELEMENTAL);
- isFriendly = false;
- } else SwitchFactionTimer -= diff;
- }
-
- if (!UpdateVictim())
- return;
-
- if (!isFriendly)
- {
- if (SendItemTimer <= diff)
- {
- if (me->GetVictim() && me->EnsureVictim()->GetTypeId() == TYPEID_PLAYER)
- SendItem(me->GetVictim());
- SendItemTimer = 5000;
- } else SendItemTimer -= diff;
- }
-
- if (FrostShockTimer <= diff)
- {
- DoCastVictim(SPELL_FROST_SHOCK);
- FrostShockTimer = 15000;
- } else FrostShockTimer -= diff;
-
- if (AquaJetTimer <= diff)
- {
- DoCast(me, SPELL_AQUA_JET);
- AquaJetTimer = 15000;
- } else AquaJetTimer -= diff;
-
- DoMeleeAttackIfReady();
- }
- };
-
-};
-
-/*######
## npc_custodian_of_time
######*/
@@ -551,7 +429,6 @@ public:
void AddSC_tanaris()
{
- new npc_aquementas();
new npc_custodian_of_time();
new npc_OOX17();
new npc_tooga();