Scripts: minimize duplicated enum names in header files (#19377)

* Scripts: Minimize duplicated enum names in header files

This reduces the number of cache resets with the Zapcc compiler

- Standard followed is instance/raid TLA + DataTypes/CreaturesIds/etc
- Partial cherry-pick of master commit 7eb4512eee
- Removed unused defines in sunken_temple.h (the core scripts using these have been moved to SAI)

(cherry picked from commit f6f36be004)
This commit is contained in:
tkrokli
2017-03-29 10:06:06 +02:00
committed by funjoker
parent cbcc4601ad
commit b259614778
5 changed files with 17 additions and 25 deletions

View File

@@ -20,17 +20,9 @@
#define DataHeader "ST"
#define TROLLBOSS1_DEATH 1
#define TROLLBOSS2_DEATH 2
#define TROLLBOSS3_DEATH 3
#define TROLLBOSS4_DEATH 4
#define TROLLBOSS5_DEATH 5
#define TROLLBOSS6_DEATH 6
#define JAMMALAN_DEATH 7
#define MORPHAZ_DEATH 8
#define HAZZAS_DEATH 9
#define ERANIKUS_DEATH 10
#define ATALALARION_DEATH 11 //optional
enum STEvents
{
EVENT_STATE = 1
};
#define EVENT_STATE 1
#endif

View File

@@ -23,7 +23,7 @@
#define EoEScriptName "instance_eye_of_eternity"
#define DataHeader "EOE"
enum InstanceData
enum EOEInstanceData
{
DATA_MALYGOS_EVENT,
MAX_ENCOUNTER,
@@ -33,7 +33,7 @@ enum InstanceData
DATA_RESPAWN_IRIS
};
enum InstanceData64
enum EOEInstanceData64
{
DATA_TRIGGER,
DATA_MALYGOS,
@@ -44,7 +44,7 @@ enum InstanceData64
DATA_GIFT_BOX_BUNNY_GUID
};
enum InstanceNpcs
enum EOEInstanceNpcs
{
NPC_MALYGOS = 28859,
NPC_VORTEX_TRIGGER = 30090,
@@ -60,7 +60,7 @@ enum InstanceNpcs
NPC_SURGE_OF_POWER = 30334
};
enum InstanceGameObjects
enum EOEInstanceGameObjects
{
GO_NEXUS_RAID_PLATFORM = 193070,
GO_EXIT_PORTAL = 193908,
@@ -72,12 +72,12 @@ enum InstanceGameObjects
GO_HEART_OF_MAGIC_25 = 194159
};
enum InstanceEvents
enum EOEInstanceEvents
{
EVENT_FOCUSING_IRIS = 20711
};
enum InstanceSpells
enum EOEInstanceSpells
{
SPELL_VORTEX_4 = 55853, // damage | used to enter to the vehicle
SPELL_VORTEX_5 = 56263, // damage | used to enter to the vehicle

View File

@@ -279,7 +279,7 @@ enum UlduarGameObjects
GO_GIFT_OF_THE_OBSERVER_25 = 194822,
};
enum EventIds
enum UUEventIds
{
EVENT_TOWER_OF_STORM_DESTROYED = 21031,
EVENT_TOWER_OF_FROST_DESTROYED = 21032,

View File

@@ -55,7 +55,7 @@ ObjectData const gameObjectData[] =
{ 0, 0 } //END
};
static DataTypes const collapseObjectDatas[] =
static MLDataTypes const collapseObjectDatas[] =
{
DATA_MAGTHERIDON_COLUMN_0,
DATA_MAGTHERIDON_COLUMN_1,
@@ -116,7 +116,7 @@ class instance_magtheridons_lair : public InstanceMapScript
HandleGameObject(ObjectGuid::Empty, value == ACTION_ENABLE ? true : false, hall);
break;
case DATA_COLLAPSE_2:
for (DataTypes data : collapseObjectDatas)
for (MLDataTypes data : collapseObjectDatas)
if (GameObject* go = GetGameObject(data))
HandleGameObject(ObjectGuid::Empty, value == ACTION_ENABLE ? true : false, go);
break;

View File

@@ -25,7 +25,7 @@
uint32 const EncounterCount = 1;
enum DataTypes
enum MLDataTypes
{
DATA_MAGTHERIDON = 0,
DATA_WORLD_TRIGGER = 1,
@@ -42,13 +42,13 @@ enum DataTypes
DATA_CALL_WARDERS = 12
};
enum Actions
enum MLActions
{
ACTION_ENABLE = 1,
ACTION_DISABLE = 2
};
enum CreatureIds
enum MLCreatureIds
{
NPC_MAGTHERIDON = 17257,
NPC_ABYSSAL = 17454,
@@ -61,7 +61,7 @@ enum CreatureIds
NPC_HELLFIRE_WARDER = 18829
};
enum GameObjectIds
enum MLGameObjectIds
{
GO_MAGTHERIDON_DOOR = 183847,
GO_MANTICRON_CUBE = 181713,