diff options
| -rw-r--r-- | sql/updates/world/2012_03_04_01_world_areatrigger_scripts.sql | 7 | ||||
| -rw-r--r-- | src/server/scripts/World/areatrigger_scripts.cpp | 46 | 
2 files changed, 44 insertions, 9 deletions
diff --git a/sql/updates/world/2012_03_04_01_world_areatrigger_scripts.sql b/sql/updates/world/2012_03_04_01_world_areatrigger_scripts.sql new file mode 100644 index 00000000000..ae4a0bc1f77 --- /dev/null +++ b/sql/updates/world/2012_03_04_01_world_areatrigger_scripts.sql @@ -0,0 +1,7 @@ +-- Add Area trigger scripts +DELETE FROM `areatrigger_scripts` WHERE `entry` IN (4422,4466,4471,4472); +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES +(4422,'at_area_52_entrance'), +(4466,'at_area_52_entrance'), +(4471,'at_area_52_entrance'), +(4472,'at_area_52_entrance'); diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index 77f3a64a13f..d8a90b2ffd5 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -427,13 +427,14 @@ class AreaTrigger_at_brewfest : public AreaTriggerScript  enum Area52Entrance  { -    NPC_SPOTLIGHT       = 19913, -    SUMMON_COOLDOWN     = 5, - -    AT_AREA_52_SOUTH    = 4472, -    AT_AREA_52_NORTH    = 4466, -    AT_AREA_52_WEST     = 4471, -    AT_AREA_52_EAST     = 4422, +    SPELL_A52_NEURALYZER  = 34400, +    NPC_SPOTLIGHT         = 19913, +    SUMMON_COOLDOWN       = 5, + +    AT_AREA_52_SOUTH      = 4472, +    AT_AREA_52_NORTH      = 4466, +    AT_AREA_52_WEST       = 4471, +    AT_AREA_52_EAST       = 4422,  };  class AreaTrigger_at_area_52_entrance : public AreaTriggerScript @@ -446,14 +447,41 @@ class AreaTrigger_at_area_52_entrance : public AreaTriggerScript          bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)          { +            float x, y, z; +              if (!player->isAlive())                  return false; +            uint32 triggerId = trigger->id;              if (sWorld->GetGameTime() - _triggerTimes[trigger->id] < SUMMON_COOLDOWN)                  return false; -            player->SummonCreature(NPC_SPOTLIGHT, trigger->x, trigger->y, trigger->z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000); +            switch (triggerId) +            { +                case AT_AREA_52_EAST: +                    x = 3044.176f; +                    y = 3610.692f; +                    z = 143.61f; +                    break; +                case AT_AREA_52_NORTH: +                    x = 3114.87f; +                    y = 3687.619f; +                    z = 143.62f; +                    break; +                case AT_AREA_52_WEST: +                    x = 3017.79f; +                    y = 3746.806f; +                    z = 144.27f; +                    break; +                case AT_AREA_52_SOUTH: +                    x = 2950.63f; +                    y = 3719.905f; +                    z = 143.33f; +                    break; +            } +            player->SummonCreature(NPC_SPOTLIGHT, x, y, z, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 5000); +            player->AddAura(SPELL_A52_NEURALYZER, player);              _triggerTimes[trigger->id] = sWorld->GetGameTime();              return false;          } @@ -474,4 +502,4 @@ void AddSC_areatrigger_scripts()      new AreaTrigger_at_bring_your_orphan_to();      new AreaTrigger_at_brewfest();      new AreaTrigger_at_area_52_entrance(); -} +}
\ No newline at end of file  | 
