diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-09-06 02:41:45 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-09-06 02:41:45 +0200 |
| commit | fe99efd6fa2ea879970d4984361edc6b29d949b5 (patch) | |
| tree | eb35a3453fcc88b88a7cf0c962d7b4b218bdd42d /src/server/scripts/Events | |
| parent | 9a4f062b266315c99d5d2f018abc5161b890f81f (diff) | |
| parent | 7f93e1e56e205c974b7644c6efa80fec11a6a78b (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
src/server/scripts/Commands/cs_misc.cpp
src/server/scripts/Events/childrens_week.cpp
src/server/scripts/Kalimdor/boss_azuregos.cpp
src/server/scripts/Kalimdor/zone_azshara.cpp
src/server/scripts/Kalimdor/zone_darkshore.cpp
src/server/scripts/Kalimdor/zone_durotar.cpp
src/server/scripts/Kalimdor/zone_moonglade.cpp
src/server/scripts/Kalimdor/zone_mulgore.cpp
src/server/scripts/Kalimdor/zone_orgrimmar.cpp
src/server/scripts/Kalimdor/zone_thousand_needles.cpp
src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
Diffstat (limited to 'src/server/scripts/Events')
| -rw-r--r-- | src/server/scripts/Events/childrens_week.cpp | 85 |
1 files changed, 68 insertions, 17 deletions
diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp index 25257848192..021714e3055 100644 --- a/src/server/scripts/Events/childrens_week.cpp +++ b/src/server/scripts/Events/childrens_week.cpp @@ -150,9 +150,12 @@ class npc_winterfin_playmate : public CreatureScript struct npc_winterfin_playmateAI : public ScriptedAI { - npc_winterfin_playmateAI(Creature* creature) : ScriptedAI(creature) { } + npc_winterfin_playmateAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } - void Reset() override + void Initialize() { timer = 0; phase = 0; @@ -160,6 +163,11 @@ class npc_winterfin_playmate : public CreatureScript orphanGUID = 0; } + void Reset() override + { + Initialize(); + } + void MoveInLineOfSight(Unit* who) override { @@ -249,9 +257,12 @@ class npc_snowfall_glade_playmate : public CreatureScript struct npc_snowfall_glade_playmateAI : public ScriptedAI { - npc_snowfall_glade_playmateAI(Creature* creature) : ScriptedAI(creature) { } + npc_snowfall_glade_playmateAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } - void Reset() override + void Initialize() { timer = 0; phase = 0; @@ -259,6 +270,11 @@ class npc_snowfall_glade_playmate : public CreatureScript orphanGUID = 0; } + void Reset() override + { + Initialize(); + } + void MoveInLineOfSight(Unit* who) override { @@ -349,10 +365,11 @@ class npc_the_biggest_tree : public CreatureScript { npc_the_biggest_treeAI(Creature* creature) : ScriptedAI(creature) { + Initialize(); me->SetDisplayId(DISPLAY_INVISIBLE); } - void Reset() override + void Initialize() { timer = 1000; phase = 0; @@ -360,8 +377,12 @@ class npc_the_biggest_tree : public CreatureScript orphanGUID = 0; } - void MoveInLineOfSight(Unit* who) override + void Reset() override + { + Initialize(); + } + void MoveInLineOfSight(Unit* who) override { if (!phase && who && who->GetDistance2d(me) < 10.0f) if (Player* player = who->ToPlayer()) @@ -437,9 +458,12 @@ class npc_high_oracle_soo_roo : public CreatureScript struct npc_high_oracle_soo_rooAI : public ScriptedAI { - npc_high_oracle_soo_rooAI(Creature* creature) : ScriptedAI(creature) { } + npc_high_oracle_soo_rooAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } - void Reset() override + void Initialize() { timer = 0; phase = 0; @@ -447,6 +471,11 @@ class npc_high_oracle_soo_roo : public CreatureScript orphanGUID = 0; } + void Reset() override + { + Initialize(); + } + void MoveInLineOfSight(Unit* who) override { @@ -526,9 +555,12 @@ class npc_elder_kekek : public CreatureScript struct npc_elder_kekekAI : public ScriptedAI { - npc_elder_kekekAI(Creature* creature) : ScriptedAI(creature) { } + npc_elder_kekekAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } - void Reset() override + void Initialize() { timer = 0; phase = 0; @@ -536,6 +568,11 @@ class npc_elder_kekek : public CreatureScript orphanGUID = 0; } + void Reset() override + { + Initialize(); + } + void MoveInLineOfSight(Unit* who) override { @@ -615,9 +652,12 @@ class npc_the_etymidian : public CreatureScript struct npc_the_etymidianAI : public ScriptedAI { - npc_the_etymidianAI(Creature* creature) : ScriptedAI(creature) { } + npc_the_etymidianAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } - void Reset() override + void Initialize() { timer = 0; phase = 0; @@ -625,8 +665,12 @@ class npc_the_etymidian : public CreatureScript orphanGUID = 0; } - void MoveInLineOfSight(Unit* who) override + void Reset() override + { + Initialize(); + } + void MoveInLineOfSight(Unit* who) override { if (!phase && who && who->GetDistance2d(me) < 10.0f) if (Player* player = who->ToPlayer()) @@ -711,9 +755,12 @@ class npc_alexstraza_the_lifebinder : public CreatureScript struct npc_alexstraza_the_lifebinderAI : public ScriptedAI { - npc_alexstraza_the_lifebinderAI(Creature* creature) : ScriptedAI(creature) { } + npc_alexstraza_the_lifebinderAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } - void Reset() override + void Initialize() { timer = 0; phase = 0; @@ -721,6 +768,11 @@ class npc_alexstraza_the_lifebinder : public CreatureScript orphanGUID = 0; } + void Reset() override + { + Initialize(); + } + void SetData(uint32 type, uint32 data) override { // Existing SmartAI @@ -871,7 +923,7 @@ class at_bring_your_orphan_to : public AreaTriggerScript public: at_bring_your_orphan_to() : AreaTriggerScript("at_bring_your_orphan_to") { } - bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) + bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) override { if (player->isDead() || !player->HasAura(SPELL_ORPHAN_OUT)) return false; @@ -934,7 +986,6 @@ class npc_cw_area_trigger : public CreatureScript } void MoveInLineOfSight(Unit* who) override - { if (who && me->GetDistance2d(who) < 20.0f) if (Player* player = who->ToPlayer()) |
