diff --git a/common/StackWalker/StackWalker.cpp b/common/StackWalker/StackWalker.cpp index 5360a3efa..befbfac62 100644 --- a/common/StackWalker/StackWalker.cpp +++ b/common/StackWalker/StackWalker.cpp @@ -359,7 +359,7 @@ public: BOOL Publics; // contains public symbols }; */ -typedef struct IMAGEHLP_MODULE64_V2 { +struct IMAGEHLP_MODULE64_V2 { DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64) DWORD64 BaseOfImage; // base load address of module DWORD ImageSize; // virtual size of the loaded module diff --git a/common/StackWalker/StackWalker.h b/common/StackWalker/StackWalker.h index a53c67328..d5f04e053 100644 --- a/common/StackWalker/StackWalker.h +++ b/common/StackWalker/StackWalker.h @@ -134,7 +134,7 @@ protected: CHAR loadedImageName[STACKWALK_MAX_NAMELEN]; } CallstackEntry; - typedef enum CallstackEntryType {firstEntry, nextEntry, lastEntry}; + enum CallstackEntryType {firstEntry, nextEntry, lastEntry}; virtual void OnSymInit(LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUserName); virtual void OnLoadModule(LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion); diff --git a/common/eq_stream_intf.h b/common/eq_stream_intf.h index 2c5faac55..6953f7a37 100644 --- a/common/eq_stream_intf.h +++ b/common/eq_stream_intf.h @@ -26,13 +26,13 @@ //this is the only part of an EQStream that is seen by the application. -typedef enum { +enum EQStreamState { ESTABLISHED, CLOSING, //waiting for pending data to flush. DISCONNECTING, //have sent disconnect, waiting for their disconnect reply. CLOSED, //received a disconnect from remote side. UNESTABLISHED -} EQStreamState; +}; class EQApplicationPacket; class OpcodeManager; diff --git a/common/guilds.h b/common/guilds.h index eb746a00a..7e786c776 100644 --- a/common/guilds.h +++ b/common/guilds.h @@ -46,7 +46,7 @@ #define GUILD_INITIATE 7 #define GUILD_RECRUIT 8 -typedef enum { +enum GuildAction { GUILD_ACTION_BANNER_CHANGE = 1, GUILD_ACTION_BANNER_PLANT = 2, GUILD_ACTION_BANNER_REMOVE = 3, @@ -77,6 +77,6 @@ typedef enum { GUILD_ACTION_REAL_ESTATE_GUILD_PLOT_SELL = 28, GUILD_ACTION_REAL_ESTATE_MODIFY_TROPHIES = 29, GUILD_ACTION_MEMBERS_DEMOTE_SELF = 30, -} GuildAction; +}; constexpr int format_as(GuildAction action) { return static_cast(action); } diff --git a/common/loot.h b/common/loot.h index 9830585b8..f1a7e329d 100644 --- a/common/loot.h +++ b/common/loot.h @@ -45,5 +45,4 @@ struct LootItem { uint32 lootdrop_id; // required for zone state referencing }; -typedef std::list LootItems; - +using LootItems = std::list; diff --git a/common/tasks.h b/common/tasks.h index ace848f4d..2776f6686 100644 --- a/common/tasks.h +++ b/common/tasks.h @@ -38,10 +38,10 @@ #define RELOADTASKS 0 #define RELOADTASKSETS 2 -typedef enum { +enum TaskMethodType { METHODSINGLEID = 0, METHODQUEST = 2 -} TaskMethodType; +}; enum class TaskActivityType : int32_t // task element/objective { diff --git a/world/cliententry.h b/world/cliententry.h index a94433b93..3da6cba84 100644 --- a/world/cliententry.h +++ b/world/cliententry.h @@ -24,14 +24,14 @@ #include -typedef enum { +enum CLE_Status { Never, Offline, Online, CharSelect, Zoning, InZone -} CLE_Status; +}; static const char *CLEStatusString[] = { "Never", diff --git a/world/eql_config.h b/world/eql_config.h index ca3ab3f73..13b9c0a62 100644 --- a/world/eql_config.h +++ b/world/eql_config.h @@ -25,10 +25,10 @@ class LauncherLink; -typedef struct { +struct LauncherZone{ std::string name; uint16 port; -} LauncherZone; +}; //a class exported to perl representing a launcher's in-DB config class EQLConfig { diff --git a/world/launcher_link.h b/world/launcher_link.h index 2e8e6bc20..d516ccc6b 100644 --- a/world/launcher_link.h +++ b/world/launcher_link.h @@ -69,10 +69,10 @@ protected: uint8 m_dynamicCount; - typedef struct { + struct ZoneState{ bool up; uint32 starts; //number of times this zone has started uint16 port; //the port this zone wants to use (0=pick one) - } ZoneState; + }; std::map m_states; }; diff --git a/zone/aa.h b/zone/aa.h index f5e015bc1..61ae79940 100644 --- a/zone/aa.h +++ b/zone/aa.h @@ -20,7 +20,7 @@ #define MAX_SWARM_PETS 12 //this can change as long as you make more coords (swarm_pet_x/swarm_pet_y) #define WAKE_THE_DEAD_NPCTYPEID 500 //We use first pet in pets table as a template -typedef enum { +enum aaNonspellAction { aaActionNone = 0, aaActionAETaunt = 1, aaActionMassBuff = 2, @@ -38,7 +38,7 @@ typedef enum { aaActionLeechTouch = 14, aaActionProjectIllusion = 15, aaActionFadingMemories = 16 -} aaNonspellAction; +}; enum { //leadership AA indexes groupAAMarkNPC = 0, @@ -116,7 +116,7 @@ static const uint8 LeadershipAACosts[_maxLeaderAA][MAX_LEADERSHIP_TIERS] = { { 0, 0, 0, 0, 0, 0 }, //raidAA15 }; -typedef enum { //AA IDs +enum aaID { //AA IDs aaNone =0, aaInnateStrength =2,//implemented as bonus aaInnateStamina =7,//implemented as bonus @@ -1525,7 +1525,7 @@ typedef enum { //AA IDs aaHighestID //this should always be last, and should always //follow the highest AA ID -} aaID; +}; //Structure representing the database's swarm pet configs struct SwarmPet_Struct { diff --git a/zone/cheat_manager.h b/zone/cheat_manager.h index 0c6432b5a..0b4f587cc 100644 --- a/zone/cheat_manager.h +++ b/zone/cheat_manager.h @@ -27,7 +27,7 @@ class CheatManager; class Client; -typedef enum { +enum UpdateMovementType { Collision = 1, TeleportB, TeleportA, @@ -37,18 +37,18 @@ typedef enum { SpellA, // Titanium - UF Unknown0x8, SpellB // Used in RoF+ -} UpdateMovementType; +}; -typedef enum { +enum ExemptionType { ShadowStep, KnockBack, Port, Assist, Sense, MAX_EXEMPTIONS -} ExemptionType; +}; -typedef enum { +enum CheatTypes { MQWarp, MQWarpShadowStep, MQWarpKnockBack, @@ -59,7 +59,7 @@ typedef enum { MQGhost, MQFastMem, MQWarpAbsolute -} CheatTypes; +}; class CheatManager { public: diff --git a/zone/client.h b/zone/client.h index 9dc5960e7..4e9b5e891 100644 --- a/zone/client.h +++ b/zone/client.h @@ -106,7 +106,7 @@ enum { //scribing argument to MemorizeSpell }; //Modes for the zoning state of the client. -typedef enum { +enum ZoneMode { ZoneToSafeCoords, // Always send ZonePlayerToBind_Struct to client: Succor/Evac GMSummon, // Always send ZonePlayerToBind_Struct to client: Only a GM Summon GMHiddenSummon, // Always send ZonePlayerToBind_Struct to client silently: Only a GM Summon @@ -117,7 +117,7 @@ typedef enum { SummonPC, // In-zone GMMove() always: Call of the Hero spell or some other type of in zone only summons Rewind, // Summon to /rewind location. EvacToSafeCoords -} ZoneMode; +}; // translate above enum to a string std::string GetZoneModeString(ZoneMode mode); @@ -130,13 +130,13 @@ enum { HideCorpseNPC = 5 }; -typedef enum +enum ShowSpellType { Disciplines, Spells -} ShowSpellType; +}; -typedef enum +enum XTargetType { Empty = 0, Auto = 1, @@ -165,8 +165,7 @@ typedef enum MyPetTarget = 24, MyMercenary = 25, MyMercenaryTarget = 26 - -} XTargetType; +}; struct XTarget_Struct { diff --git a/zone/command.h b/zone/command.h index 8fa473ba6..da80557c1 100644 --- a/zone/command.h +++ b/zone/command.h @@ -28,11 +28,11 @@ class Seperator; typedef void (*CmdFuncPtr)(Client *, const Seperator *); -typedef struct { +struct CommandRecord { uint8 admin; std::string description; CmdFuncPtr function; // null means perl function -} CommandRecord; +}; extern int (*command_dispatch)(Client *, std::string, bool); extern int command_count; // Commands Loaded Count diff --git a/zone/common.h b/zone/common.h index c1376bcd0..1ab8bf2d0 100644 --- a/zone/common.h +++ b/zone/common.h @@ -922,7 +922,7 @@ struct DataBucketCache enum eStandingPetOrder { SPO_Follow, SPO_Sit, SPO_Guard, SPO_FeignDeath }; -typedef enum { +enum PetTypeOld { petFamiliar, //only listens to /pet get lost petAnimation, //does not listen to any commands petOther, @@ -930,4 +930,4 @@ typedef enum { petNPCFollow, petTargetLock, //remain active as long something is on the hatelist. Don't listen to any commands petNone = 0xFF // not a pet -} PetTypeOld; +}; diff --git a/zone/event_codes.h b/zone/event_codes.h index e363c17de..c5210633f 100644 --- a/zone/event_codes.h +++ b/zone/event_codes.h @@ -17,7 +17,7 @@ */ #pragma once -typedef enum { +enum QuestEventID { EVENT_SAY = 0, EVENT_TRADE, //being given an item or money EVENT_DEATH, //being killed @@ -169,6 +169,6 @@ typedef enum { EVENT_SPELL_EFFECT_BOT, EVENT_SPELL_EFFECT_BUFF_TIC_BOT, _LargestEventID -} QuestEventID; +}; extern const char *QuestEventSubroutines[_LargestEventID]; diff --git a/zone/npc.h b/zone/npc.h index cd352833b..06ac7101e 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -32,7 +32,7 @@ #include #include -typedef struct { +struct NPCProximity { float min_x; float max_x; float min_y; @@ -41,7 +41,7 @@ typedef struct { float max_z; bool say; bool proximity_set; -} NPCProximity; +}; struct AISpells_Struct { uint32 type; // 0 = never, must be one (and only one) of the defined values diff --git a/zone/water_map_v1.h b/zone/water_map_v1.h index 0a3fc3298..04acf44f7 100644 --- a/zone/water_map_v1.h +++ b/zone/water_map_v1.h @@ -21,13 +21,14 @@ #pragma pack(push) #pragma pack(1) -typedef struct ZBSP_Node { + +struct ZBSP_Node { int32 node_number; float normal[3], splitdistance; int32 region; int32 special; int32 left, right; -} ZBSP_Node; +}; #pragma pack(pop)