21 #ifndef PSCONST_HEADER 22 #define PSCONST_HEADER 26 #include <csutil/csstring.h> 27 #include <csutil/hash.h> 37 #define SOCKET_CLOSE_FORCED true 40 #define DEFAULT_ATTACKQUEUE_SIZE 5 44 #define MAX_COMBAT_EVENT_RANGE 30 46 #define DEFAULT_ATTACK_NAME "default" 47 #define DEF_PROX_DIST 100 48 #define DEF_UPDATE_DIST 5 49 #define PROX_LIST_ANY_RANGE 0.0 57 #define PROX_LIST_SHRINK_THRESHOLD 50 58 #define PROX_LIST_REGROW_THRESHOLD 30 59 #define PROX_LIST_STEP_SIZE 10 63 #define DEFAULT_INSTANCE 0 64 typedef uint32 InstanceID; 65 #define INSTANCE_ALL 0xffffffff 67 #define ASSIST_MAX_DIST 25 69 #define EXCHANGE_SLOT_COUNT 9 70 #define INVENTORY_BULK_COUNT 32 71 #define INVENTORY_EQUIP_COUNT 16 74 #define GLYPH_ASSEMBLER_SLOTS 4 76 #define MAX_NPC_DIALOG_DIST 10 77 #define RANGE_TO_SEE_ACTOR_LABELS 14 78 #define RANGE_TO_SEE_ITEM_LABELS 7 79 #define RANGE_TO_SELECT 5 80 #define RANGE_TO_LOOT 4 81 #define RANGE_TO_RECV_LOOT 100 82 #define RANGE_TO_USE 4 83 #define RANGE_TO_STACK 0.5 84 #define DROP_DISTANCE 0.55 85 #define MAX_DROP_DISTANCE 5 86 #define RANGE_TO_GUARD 6 89 #define SKILL_MAX_RANK 5000 92 #define LONG_RANGE_PERCEPTION 30 94 #define SHORT_RANGE_PERCEPTION 10 96 #define PERSONAL_RANGE_PERCEPTION 4 98 #define IS_CONTAINER true 100 #define GAME_MINUTE_IN_SECONDS 10 101 #define GAME_MINUTE_IN_TICKS (GAME_MINUTE_IN_SECONDS*1000) 106 #define GUILD_FEE 20000 107 #define GUILD_MIN_MEMBERS 1 108 #define GUILD_KICK_GRACE 5 110 #define GUILD_NAME_CHANGE_LIMIT 24 * 60 * 60000 111 #define MAX_GUILD_LEVEL 9 112 #define DEFAULT_MAX_GUILD_POINTS 100 113 #define MAX_GUILD_POINTS_LIMIT 99999 116 #define SIZET_NOT_FOUND ((size_t)-1) 123 #define WEATHER_MAX_RAIN_DROPS 8000 124 #define WEATHER_MAX_SNOW_FALKES 6000 136 #define MAKE_ID_TYPE(name) \ 141 name(uint32_t i) : id(i) {} \ 142 uint32_t Unbox() const { return id; } \ 143 bool IsValid() const { return id != 0; } \ 144 csString Show() const \ 146 csString str(#name":"); \ 147 str.Append((unsigned int) id); \ 150 bool operator==(const name & other) const { return id == other.id; } \ 151 bool operator!=(const name & other) const { return id != other.id; } \ 152 bool operator< (const name & other) const { return id < other.id; } \ 157 class csHashComputer<name> \ 160 static uint ComputeHash(name key) \ 162 return key.Unbox(); \ 171 #define ShowID(id) id.Show().GetData() 184 #define INFINITY_DISTANCE HUGE_VALF 186 #define INFINITY_DISTANCE 9999999.99f int32_t ContainerID
Container IDs are either EIDs (if > 100) or inventory slot IDs.
#define MAKE_ID_TYPE(name)
Make unique integer types for various types of IDs.