Docurl
جستجوي سند
نوشته هاي اخير
firelands.h
  1. /*
  2.  * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
  3.  *
  4.  * This program is free software; you can redistribute it and/or modify it
  5.  * under the terms of the GNU General Public License as published by the
  6.  * Free Software Foundation; either version 2 of the License, or (at your
  7.  * option) any later version.
  8.  *
  9.  * This program is distributed in the hope that it will be useful, but WITHOUT
  10.  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11.  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12.  * more details.
  13.  *
  14.  * You should have received a copy of the GNU General Public License along
  15.  * with this program. If not, see <http://www.gnu.org/licenses/>.
  16.  */
  17.  
  18. #ifndef FIRELANDS_H_
  19. #define FIRELANDS_H_
  20.  
  21. #include "Map.h"
  22. #include "CreatureAI.h"
  23.  
  24. #define DataHeader "FL"
  25. #define FirelandsScriptName "instance_firelands"
  26.  
  27. uint32 const EncounterCount = 7;
  28.  
  29. enum DataTypes
  30. {
  31.     DATA_BETH_TILAC         = 0,
  32.     DATA_LORD_RHYOLITH      = 1,
  33.     DATA_SHANNOX            = 2,
  34.     DATA_ALYSRAZOR          = 3,
  35.     DATA_BALEROC            = 4,
  36.     DATA_MAJORDOMO_STAGHELM = 5,
  37.     DATA_RAGNAROS           = 6,
  38. };
  39.  
  40. enum CreatureIds
  41. {
  42.     NPC_BLAZING_MONSTROSITY_LEFT    = 53786,
  43.     NPC_BLAZING_MONSTROSITY_RIGHT   = 53791,
  44.     NPC_EGG_PILE                    = 53795,
  45.     NPC_HARBINGER_OF_FLAME          = 53793,
  46.     NPC_MOLTEN_EGG_TRASH            = 53914,
  47.     NPC_SMOULDERING_HATCHLING       = 53794,
  48. };
  49.  
  50. class DelayedAttackStartEvent : public BasicEvent
  51. {
  52.     public:
  53.         DelayedAttackStartEvent(Creature* owner) : _owner(owner) { }
  54.  
  55.         bool Execute(uint64 /*e_time*/, uint32 /*p_time*/)
  56.         {
  57.             _owner->AI()->DoZoneInCombat(_owner, 200.0f);
  58.             return true;
  59.         }
  60.  
  61.     private:
  62.         Creature* _owner;
  63. };
  64.  
  65. template<class AI>
  66. CreatureAI* GetFirelandsAI(Creature* creature)
  67. {
  68.     if (InstanceMap* instance = creature->GetMap()->ToInstanceMap())
  69.         if (instance->GetInstanceScript())
  70.             if (instance->GetScriptId() == sObjectMgr->GetScriptId(FirelandsScriptName))
  71.                 return new AI(creature);
  72.     return null;
  73. }
  74.  
  75. #endif // FIRELANDS_H_
  76.  
تجزیه شده در 0.009 ثانیه
محتویات سند

GoStats provides website analytics

اولین مرجع اشتراک گذاری متن و اسکریپت - قدرت گرفته از Docurl