diff --git a/data/items/items.lua b/data/items/items.lua index 09fb5d9..22c7632 100644 --- a/data/items/items.lua +++ b/data/items/items.lua @@ -1,3 +1,4 @@ +---@type RegisterTableItems? local items = { {id = 1, name = "water"}, {id = 2, name = "lifefluid"}, @@ -236,7 +237,7 @@ local items = { name = "magic forcefield", article = "a", description = "You can see the other side through it.", - type = "teleport", + type = ITEM_TYPE_TELEPORT, effect = CONST_ME_TELEPORT }, {id = 1388, name = "ramp", article = "a", floorChange = TILESTATE_FLOORCHANGE_EAST}, @@ -253,7 +254,7 @@ local items = { name = "mystic flame", article = "a", description = "You feel drawn to the mesmerizing light.", - type = "teleport", + type = ITEM_TYPE_TELEPORT, effect = CONST_ME_TELEPORT }, {id = 1398, name = "ramp", article = "a", floorChange = TILESTATE_FLOORCHANGE_EAST}, @@ -1580,7 +1581,7 @@ local items = { id = 2265, name = "intense healing rune", article = "an", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adura gran", weight = 210, charges = 1 @@ -1599,7 +1600,7 @@ local items = { id = 2268, name = "sudden death rune", article = "a", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adori gran mort", weight = 70, charges = 3 @@ -1608,7 +1609,7 @@ local items = { id = 2269, name = "wild growth rune", article = "a", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adevo grav vita", weight = 105, charges = 2 @@ -1620,7 +1621,7 @@ local items = { id = 2273, name = "ultimate healing rune", article = "an", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adura vita", weight = 210, charges = 1 @@ -1639,7 +1640,7 @@ local items = { id = 2277, name = "energy field rune", article = "an", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adevo grav vis", weight = 70, charges = 3 @@ -1649,7 +1650,7 @@ local items = { id = 2279, name = "energy wall rune", article = "an", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adevo mas grav vis", weight = 52, charges = 4 @@ -1677,7 +1678,7 @@ local items = { id = 2287, name = "light magic missile rune", article = "a", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adori min vis", weight = 21, charges = 10 @@ -1695,7 +1696,7 @@ local items = { id = 2289, name = "poison wall rune", article = "a", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adevo mas grav pox", weight = 52, charges = 4 @@ -1704,7 +1705,7 @@ local items = { id = 2290, name = "convince creature rune", article = "a", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adeta sio", weight = 210, charges = 1 @@ -1761,7 +1762,7 @@ local items = { id = 2303, name = "fire wall rune", article = "a", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adevo mas grav flam", weight = 52, charges = 4 @@ -1770,7 +1771,7 @@ local items = { id = 2304, name = "great fireball rune", article = "a", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adori mas flam", weight = 52, charges = 4 @@ -1808,7 +1809,7 @@ local items = { id = 2311, name = "heavy magic missile rune", article = "a", - type = "rune", + type = ITEM_TYPE_RUNE, runeSpellName = "adori vis", weight = 21, charges = 10 @@ -5823,7 +5824,7 @@ local items = { toId = 5024, name = "magic forcefield", article = "a", - type = "teleport", + type = ITEM_TYPE_TELEPORT, description = "You can see the other side trough it.", effect = CONST_ME_TELEPORT }, @@ -11810,7 +11811,7 @@ local items = { name = "mystic flame", article = "a", description = "You feel drawn to the mesmerizing light.", - type = "teleport", + type = ITEM_TYPE_TELEPORT, effect = CONST_ME_TELEPORT }, {id = 8059, name = "sanctified grave", article = "a"}, diff --git a/src/connection.h b/src/connection.h index ef31fd3..445817c 100644 --- a/src/connection.h +++ b/src/connection.h @@ -8,8 +8,8 @@ #include -static constexpr int32_t CONNECTION_WRITE_TIMEOUT = 30; -static constexpr int32_t CONNECTION_READ_TIMEOUT = 30; +inline constexpr int32_t CONNECTION_WRITE_TIMEOUT = 30; +inline constexpr int32_t CONNECTION_READ_TIMEOUT = 30; class Protocol; using Protocol_ptr = std::shared_ptr; diff --git a/src/const.h b/src/const.h index 28ad217..d8d8fac 100644 --- a/src/const.h +++ b/src/const.h @@ -4,7 +4,7 @@ #ifndef FS_CONST_H #define FS_CONST_H -static constexpr int32_t NETWORKMESSAGE_MAXSIZE = 24590; +inline constexpr int32_t NETWORKMESSAGE_MAXSIZE = 24590; enum MagicEffectClasses : uint8_t { @@ -483,8 +483,8 @@ enum ReloadTypes_t : uint8_t RELOAD_TYPE_WEAPONS, }; -static constexpr int32_t CHANNEL_GUILD = 0x00; -static constexpr int32_t CHANNEL_PARTY = 0x01; -static constexpr int32_t CHANNEL_PRIVATE = 0xFFFF; +inline constexpr int32_t CHANNEL_GUILD = 0x00; +inline constexpr int32_t CHANNEL_PARTY = 0x01; +inline constexpr int32_t CHANNEL_PRIVATE = 0xFFFF; #endif diff --git a/src/creature.h b/src/creature.h index da249ed..978f264 100644 --- a/src/creature.h +++ b/src/creature.h @@ -53,9 +53,9 @@ class Npc; class Item; class Tile; -static constexpr int32_t EVENT_CREATURECOUNT = 10; -static constexpr int32_t EVENT_CREATURE_THINK_INTERVAL = 250; -static constexpr int32_t EVENT_CHECK_CREATURE_INTERVAL = (EVENT_CREATURE_THINK_INTERVAL / EVENT_CREATURECOUNT); +inline constexpr int32_t EVENT_CREATURECOUNT = 10; +inline constexpr int32_t EVENT_CREATURE_THINK_INTERVAL = 250; +inline constexpr int32_t EVENT_CHECK_CREATURE_INTERVAL = (EVENT_CREATURE_THINK_INTERVAL / EVENT_CREATURECOUNT); class FrozenPathingConditionCall { diff --git a/src/cylinder.h b/src/cylinder.h index 7844279..cb331b8 100644 --- a/src/cylinder.h +++ b/src/cylinder.h @@ -10,7 +10,7 @@ class Item; class Creature; -static constexpr int32_t INDEX_WHEREEVER = -1; +inline constexpr int32_t INDEX_WHEREEVER = -1; enum cylinderflags_t { diff --git a/src/definitions.h b/src/definitions.h index 7001a5d..bbcfb2a 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -4,17 +4,17 @@ #ifndef FS_DEFINITIONS_H #define FS_DEFINITIONS_H -static constexpr auto STATUS_SERVER_NAME = "TFS Nekiro Downgrade"; -static constexpr auto STATUS_SERVER_VERSION = "1.5+"; -static constexpr auto STATUS_SERVER_DEVELOPERS = "Mark Samman"; -static constexpr auto STATUS_SERVER_REPOSITORY = "https://github.com/MillhioreBT/forgottenserver-downgrade"; +inline constexpr auto STATUS_SERVER_NAME = "TFS Nekiro Downgrade"; +inline constexpr auto STATUS_SERVER_VERSION = "1.5+"; +inline constexpr auto STATUS_SERVER_DEVELOPERS = "Mark Samman"; +inline constexpr auto STATUS_SERVER_REPOSITORY = "https://github.com/MillhioreBT/forgottenserver-downgrade"; -static constexpr auto CLIENT_VERSION_MIN = 860; -static constexpr auto CLIENT_VERSION_MAX = 860; -static constexpr auto CLIENT_VERSION_STR = "8.60"; +inline constexpr auto CLIENT_VERSION_MIN = 860; +inline constexpr auto CLIENT_VERSION_MAX = 860; +inline constexpr auto CLIENT_VERSION_STR = "8.60"; -static constexpr auto AUTHENTICATOR_DIGITS = 6U; -static constexpr auto AUTHENTICATOR_PERIOD = 30U; +inline constexpr unsigned int AUTHENTICATOR_DIGITS = 6; +inline constexpr unsigned int AUTHENTICATOR_PERIOD = 30; #ifndef __FUNCTION__ #define __FUNCTION__ __func__ diff --git a/src/game.h b/src/game.h index 606644f..7ff9659 100644 --- a/src/game.h +++ b/src/game.h @@ -49,23 +49,23 @@ enum GameState_t GAME_STATE_MAINTAIN, }; -static constexpr int32_t PLAYER_NAME_LENGTH = 25; - -static constexpr int32_t EVENT_LIGHTINTERVAL = 10000; -static constexpr int32_t EVENT_WORLDTIMEINTERVAL = 2500; -static constexpr int32_t EVENT_DECAYINTERVAL = 250; -static constexpr int32_t EVENT_DECAY_BUCKETS = 4; - -static constexpr int32_t MOVE_CREATURE_INTERVAL = 1000; -static constexpr int32_t RANGE_MOVE_CREATURE_INTERVAL = 1500; -static constexpr int32_t RANGE_MOVE_ITEM_INTERVAL = 400; -static constexpr int32_t RANGE_USE_ITEM_INTERVAL = 400; -static constexpr int32_t RANGE_USE_ITEM_EX_INTERVAL = 400; -static constexpr int32_t RANGE_USE_WITH_CREATURE_INTERVAL = 400; -static constexpr int32_t RANGE_ROTATE_ITEM_INTERVAL = 400; -static constexpr int32_t RANGE_BROWSE_FIELD_INTERVAL = 400; -static constexpr int32_t RANGE_WRAP_ITEM_INTERVAL = 400; -static constexpr int32_t RANGE_REQUEST_TRADE_INTERVAL = 400; +inline constexpr int32_t PLAYER_NAME_LENGTH = 25; + +inline constexpr int32_t EVENT_LIGHTINTERVAL = 10000; +inline constexpr int32_t EVENT_WORLDTIMEINTERVAL = 2500; +inline constexpr int32_t EVENT_DECAYINTERVAL = 250; +inline constexpr int32_t EVENT_DECAY_BUCKETS = 4; + +inline constexpr int32_t MOVE_CREATURE_INTERVAL = 1000; +inline constexpr int32_t RANGE_MOVE_CREATURE_INTERVAL = 1500; +inline constexpr int32_t RANGE_MOVE_ITEM_INTERVAL = 400; +inline constexpr int32_t RANGE_USE_ITEM_INTERVAL = 400; +inline constexpr int32_t RANGE_USE_ITEM_EX_INTERVAL = 400; +inline constexpr int32_t RANGE_USE_WITH_CREATURE_INTERVAL = 400; +inline constexpr int32_t RANGE_ROTATE_ITEM_INTERVAL = 400; +inline constexpr int32_t RANGE_BROWSE_FIELD_INTERVAL = 400; +inline constexpr int32_t RANGE_WRAP_ITEM_INTERVAL = 400; +inline constexpr int32_t RANGE_REQUEST_TRADE_INTERVAL = 400; /** * Main Game class. diff --git a/src/items.h b/src/items.h index bcfc67c..1034675 100644 --- a/src/items.h +++ b/src/items.h @@ -45,125 +45,6 @@ enum ItemTypes_t ITEM_TYPE_LAST }; -enum ItemParseAttributes_t -{ - ITEM_PARSE_TYPE, - ITEM_PARSE_DESCRIPTION, - ITEM_PARSE_RUNESPELLNAME, - ITEM_PARSE_WEIGHT, - ITEM_PARSE_SHOWCOUNT, - ITEM_PARSE_ARMOR, - ITEM_PARSE_DEFENSE, - ITEM_PARSE_EXTRADEF, - ITEM_PARSE_ATTACK, - ITEM_PARSE_ATTACK_SPEED, - ITEM_PARSE_ROTATETO, - ITEM_PARSE_MOVEABLE, - ITEM_PARSE_BLOCKPROJECTILE, - ITEM_PARSE_PICKUPABLE, - ITEM_PARSE_IGNOREBLOCKING, - ITEM_PARSE_FORCESERIALIZE, - ITEM_PARSE_FLOORCHANGE, - ITEM_PARSE_CORPSETYPE, - ITEM_PARSE_CONTAINERSIZE, - ITEM_PARSE_FLUIDSOURCE, - ITEM_PARSE_FLUIDCONTAINER, - ITEM_PARSE_READABLE, - ITEM_PARSE_WRITEABLE, - ITEM_PARSE_MAXTEXTLEN, - ITEM_PARSE_WRITEONCEITEMID, - ITEM_PARSE_WEAPONTYPE, - ITEM_PARSE_SLOTTYPE, - ITEM_PARSE_AMMOTYPE, - ITEM_PARSE_SHOOTTYPE, - ITEM_PARSE_EFFECT, - ITEM_PARSE_RANGE, - ITEM_PARSE_STOPDURATION, - ITEM_PARSE_DECAYTO, - ITEM_PARSE_TRANSFORMEQUIPTO, - ITEM_PARSE_TRANSFORMDEEQUIPTO, - ITEM_PARSE_DURATION, - ITEM_PARSE_SHOWDURATION, - ITEM_PARSE_CHARGES, - ITEM_PARSE_SHOWCHARGES, - ITEM_PARSE_SHOWATTRIBUTES, - ITEM_PARSE_HITCHANCE, - ITEM_PARSE_MAXHITCHANCE, - ITEM_PARSE_INVISIBLE, - ITEM_PARSE_SPEED, - ITEM_PARSE_HEALTHGAIN, - ITEM_PARSE_HEALTHTICKS, - ITEM_PARSE_MANAGAIN, - ITEM_PARSE_MANATICKS, - ITEM_PARSE_MANASHIELD, - ITEM_PARSE_SKILLSWORD, - ITEM_PARSE_SKILLAXE, - ITEM_PARSE_SKILLCLUB, - ITEM_PARSE_SKILLDIST, - ITEM_PARSE_SKILLFISH, - ITEM_PARSE_SKILLSHIELD, - ITEM_PARSE_SKILLFIST, - ITEM_PARSE_MAXHITPOINTS, - ITEM_PARSE_MAXHITPOINTSPERCENT, - ITEM_PARSE_MAXMANAPOINTS, - ITEM_PARSE_MAXMANAPOINTSPERCENT, - ITEM_PARSE_MAGICPOINTS, - ITEM_PARSE_MAGICPOINTSPERCENT, - ITEM_PARSE_CRITICALHITCHANCE, - ITEM_PARSE_CRITICALHITAMOUNT, - ITEM_PARSE_LIFELEECHCHANCE, - ITEM_PARSE_LIFELEECHAMOUNT, - ITEM_PARSE_MANALEECHCHANCE, - ITEM_PARSE_MANALEECHAMOUNT, - ITEM_PARSE_FIELDABSORBPERCENTENERGY, - ITEM_PARSE_FIELDABSORBPERCENTFIRE, - ITEM_PARSE_FIELDABSORBPERCENTPOISON, - ITEM_PARSE_ABSORBPERCENTALL, - ITEM_PARSE_ABSORBPERCENTELEMENTS, - ITEM_PARSE_ABSORBPERCENTMAGIC, - ITEM_PARSE_ABSORBPERCENTENERGY, - ITEM_PARSE_ABSORBPERCENTFIRE, - ITEM_PARSE_ABSORBPERCENTPOISON, - ITEM_PARSE_ABSORBPERCENTICE, - ITEM_PARSE_ABSORBPERCENTHOLY, - ITEM_PARSE_ABSORBPERCENTDEATH, - ITEM_PARSE_ABSORBPERCENTLIFEDRAIN, - ITEM_PARSE_ABSORBPERCENTMANADRAIN, - ITEM_PARSE_ABSORBPERCENTDROWN, - ITEM_PARSE_ABSORBPERCENTPHYSICAL, - ITEM_PARSE_ABSORBPERCENTHEALING, - ITEM_PARSE_ABSORBPERCENTUNDEFINED, - ITEM_PARSE_SUPPRESSDRUNK, - ITEM_PARSE_SUPPRESSENERGY, - ITEM_PARSE_SUPPRESSFIRE, - ITEM_PARSE_SUPPRESSPOISON, - ITEM_PARSE_SUPPRESSDROWN, - ITEM_PARSE_SUPPRESSPHYSICAL, - ITEM_PARSE_SUPPRESSFREEZE, - ITEM_PARSE_SUPPRESSDAZZLE, - ITEM_PARSE_SUPPRESSCURSE, - ITEM_PARSE_FIELD, - ITEM_PARSE_REPLACEABLE, - ITEM_PARSE_PARTNERDIRECTION, - ITEM_PARSE_LEVELDOOR, - ITEM_PARSE_MALETRANSFORMTO, - ITEM_PARSE_FEMALETRANSFORMTO, - ITEM_PARSE_TRANSFORMTO, - ITEM_PARSE_DESTROYTO, - ITEM_PARSE_ELEMENTICE, - ITEM_PARSE_ELEMENTEARTH, - ITEM_PARSE_ELEMENTFIRE, - ITEM_PARSE_ELEMENTENERGY, - ITEM_PARSE_ELEMENTDEATH, - ITEM_PARSE_ELEMENTHOLY, - ITEM_PARSE_WALKSTACK, - ITEM_PARSE_BLOCKING, - ITEM_PARSE_ALLOWDISTREAD, - ITEM_PARSE_STOREITEM, - ITEM_PARSE_WORTH, - ITEM_PARSE_STACKSIZE, -}; - struct Abilities { uint32_t healthGain = 0; @@ -239,7 +120,7 @@ class ItemType return *abilities; } - std::string getPluralName() const + std::string_view getPluralName() const { if (showCount == 0) { return name; diff --git a/src/luascript.h b/src/luascript.h index 8faaf79..f5b30ca 100644 --- a/src/luascript.h +++ b/src/luascript.h @@ -36,11 +36,8 @@ struct Outfit; using Combat_ptr = std::shared_ptr; -enum -{ - EVENT_ID_LOADING = 1, - EVENT_ID_USER = 1000, -}; +inline constexpr int32_t EVENT_ID_LOADING = 1; +inline constexpr int32_t EVENT_ID_USER = 1000; enum LuaDataType { diff --git a/src/map.h b/src/map.h index 5680ed0..eab78b1 100644 --- a/src/map.h +++ b/src/map.h @@ -23,10 +23,10 @@ struct AStarNode uint16_t x, y; }; -static constexpr int32_t MAX_NODES = 512; +inline constexpr int32_t MAX_NODES = 512; -static constexpr int32_t MAP_NORMALWALKCOST = 10; -static constexpr int32_t MAP_DIAGONALWALKCOST = 25; +inline constexpr int32_t MAP_NORMALWALKCOST = 10; +inline constexpr int32_t MAP_DIAGONALWALKCOST = 25; class AStarNodes { @@ -53,9 +53,9 @@ class AStarNodes using SpectatorCache = std::map; -static constexpr int32_t FLOOR_BITS = 3; -static constexpr int32_t FLOOR_SIZE = (1 << FLOOR_BITS); -static constexpr int32_t FLOOR_MASK = (FLOOR_SIZE - 1); +inline constexpr int32_t FLOOR_BITS = 3; +inline constexpr int32_t FLOOR_SIZE = (1 << FLOOR_BITS); +inline constexpr int32_t FLOOR_MASK = (FLOOR_SIZE - 1); struct Floor { diff --git a/src/party.h b/src/party.h index d393a31..f5f2c39 100644 --- a/src/party.h +++ b/src/party.h @@ -12,8 +12,8 @@ class Party; using PlayerVector = std::vector; -static constexpr int32_t EXPERIENCE_SHARE_RANGE = 30; -static constexpr int32_t EXPERIENCE_SHARE_FLOORS = 1; +inline constexpr int32_t EXPERIENCE_SHARE_RANGE = 30; +inline constexpr int32_t EXPERIENCE_SHARE_FLOORS = 1; class Party { diff --git a/src/player.h b/src/player.h index 8eb2c8b..9f8e716 100644 --- a/src/player.h +++ b/src/player.h @@ -67,7 +67,7 @@ struct OpenContainer uint16_t index; }; -static constexpr int16_t MINIMUM_SKILL_LEVEL = 10; +inline constexpr int16_t MINIMUM_SKILL_LEVEL = 10; struct Skill { @@ -78,15 +78,15 @@ struct Skill using MuteCountMap = std::map; -static constexpr int32_t PLAYER_MAX_SPEED = 1500; -static constexpr int32_t PLAYER_MIN_SPEED = 10; -static constexpr int32_t PLAYER_MAX_BLESSINGS = 5; +inline constexpr int32_t PLAYER_MAX_SPEED = 1500; +inline constexpr int32_t PLAYER_MIN_SPEED = 10; +inline constexpr int32_t PLAYER_MAX_BLESSINGS = 5; -static constexpr auto ACCOUNT_MANAGER_PLAYER_NAME = "Account Manager"; -static constexpr auto ACCOUNT_MANAGER_PLAYER_ID = 1; -static constexpr auto ACCOUNT_MANAGER_ACCOUNT_ID = 1; -static constexpr auto ACCOUNT_MANAGER_ACCOUNT_NAME = "1"; -static constexpr auto ACCOUNT_MANAGER_ACCOUNT_PASSWORD = "1"; +inline constexpr auto ACCOUNT_MANAGER_PLAYER_NAME = "Account Manager"; +inline constexpr auto ACCOUNT_MANAGER_PLAYER_ID = 1; +inline constexpr auto ACCOUNT_MANAGER_ACCOUNT_ID = 1; +inline constexpr auto ACCOUNT_MANAGER_ACCOUNT_NAME = "1"; +inline constexpr auto ACCOUNT_MANAGER_ACCOUNT_PASSWORD = "1"; class Player final : public Creature, public Cylinder { diff --git a/src/raids.cpp b/src/raids.cpp index 480809e..18ca072 100644 --- a/src/raids.cpp +++ b/src/raids.cpp @@ -92,7 +92,7 @@ bool Raids::loadFromXml() return true; } -static constexpr int32_t MAX_RAND_RANGE = 10000000; +inline constexpr int32_t MAX_RAND_RANGE = 10000000; bool Raids::startup() { diff --git a/src/raids.h b/src/raids.h index 0e47385..629bbc6 100644 --- a/src/raids.h +++ b/src/raids.h @@ -16,8 +16,8 @@ enum RaidState_t struct MonsterSpawn { - MonsterSpawn(std::string name, uint32_t minAmount, uint32_t maxAmount) : - name(std::move(name)), minAmount(minAmount), maxAmount(maxAmount) + MonsterSpawn(std::string_view name, uint32_t minAmount, uint32_t maxAmount) : + name{name}, minAmount{minAmount}, maxAmount{maxAmount} {} std::string name; @@ -26,9 +26,9 @@ struct MonsterSpawn }; // How many times it will try to find a tile to add the monster to before giving up -static constexpr int32_t MAXIMUM_TRIES_PER_MONSTER = 10; -static constexpr int32_t CHECK_RAIDS_INTERVAL = 60; -static constexpr int32_t RAID_MINTICKS = 1000; +inline constexpr int32_t MAXIMUM_TRIES_PER_MONSTER = 10; +inline constexpr int32_t CHECK_RAIDS_INTERVAL = 60; +inline constexpr int32_t RAID_MINTICKS = 1000; class Raid; class RaidEvent; @@ -78,8 +78,8 @@ class Raids class Raid { public: - Raid(std::string name, uint32_t interval, uint32_t marginTime, bool repeat) : - name(std::move(name)), interval(interval), margin(marginTime), repeat(repeat) + Raid(std::string_view name, uint32_t interval, uint32_t marginTime, bool repeat) : + name{name}, interval{interval}, margin{marginTime}, repeat{repeat} {} ~Raid(); diff --git a/src/scheduler.h b/src/scheduler.h index 5237eed..e13ecfc 100644 --- a/src/scheduler.h +++ b/src/scheduler.h @@ -7,7 +7,7 @@ #include "tasks.h" #include "thread_holder_base.h" -static constexpr int32_t SCHEDULER_MINTICKS = 50; +inline constexpr int32_t SCHEDULER_MINTICKS = 50; class SchedulerTask : public Task { diff --git a/src/spawn.cpp b/src/spawn.cpp index 37376b3..0df7134 100644 --- a/src/spawn.cpp +++ b/src/spawn.cpp @@ -17,8 +17,8 @@ extern Monsters g_monsters; extern Game g_game; extern Events* g_events; -static constexpr int32_t MINSPAWN_INTERVAL = 10 * 1000; // 10 seconds to match RME -static constexpr int32_t MAXSPAWN_INTERVAL = 24 * 60 * 60 * 1000; // 1 day +inline constexpr int32_t MINSPAWN_INTERVAL = 10 * 1000; // 10 seconds to match RME +inline constexpr int32_t MAXSPAWN_INTERVAL = 24 * 60 * 60 * 1000; // 1 day bool Spawns::loadFromXml(std::string_view filename) { diff --git a/src/tile.h b/src/tile.h index 3673e03..57b25cd 100644 --- a/src/tile.h +++ b/src/tile.h @@ -20,7 +20,7 @@ class BedItem; using CreatureVector = std::vector; using ItemVector = std::vector; -static constexpr int32_t MAX_STACKPOS_THINGS = 10; +inline constexpr int32_t MAX_STACKPOS_THINGS = 10; enum tileflags_t : uint32_t {