mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/Maps: Partially revert 0c69316714
Revert define to constexpr as this also broke some calculations
This commit is contained in:
@@ -31,29 +31,29 @@ class GameObject;
|
||||
class Pet;
|
||||
class Player;
|
||||
|
||||
constexpr uint32 MAX_NUMBER_OF_CELLS = 8;
|
||||
#define MAX_NUMBER_OF_CELLS 8
|
||||
|
||||
constexpr uint32 MAX_NUMBER_OF_GRIDS = 64;
|
||||
#define MAX_NUMBER_OF_GRIDS 64
|
||||
|
||||
constexpr float SIZE_OF_GRIDS = 533.3333f;
|
||||
constexpr uint32 CENTER_GRID_ID = (MAX_NUMBER_OF_GRIDS / 2);
|
||||
#define SIZE_OF_GRIDS 533.3333f
|
||||
#define CENTER_GRID_ID (MAX_NUMBER_OF_GRIDS/2)
|
||||
|
||||
constexpr float CENTER_GRID_OFFSET = (SIZE_OF_GRIDS / 2);
|
||||
#define CENTER_GRID_OFFSET (SIZE_OF_GRIDS/2)
|
||||
|
||||
#define MIN_GRID_DELAY (MINUTE*IN_MILLISECONDS)
|
||||
#define MIN_MAP_UPDATE_DELAY 50
|
||||
#define MIN_GRID_DELAY (MINUTE*IN_MILLISECONDS)
|
||||
#define MIN_MAP_UPDATE_DELAY 50
|
||||
|
||||
constexpr float SIZE_OF_GRID_CELL = (SIZE_OF_GRIDS / MAX_NUMBER_OF_CELLS);
|
||||
#define SIZE_OF_GRID_CELL (SIZE_OF_GRIDS/MAX_NUMBER_OF_CELLS)
|
||||
|
||||
constexpr uint32 CENTER_GRID_CELL_ID = (MAX_NUMBER_OF_CELLS * MAX_NUMBER_OF_GRIDS / 2);
|
||||
constexpr float CENTER_GRID_CELL_OFFSET = (SIZE_OF_GRID_CELL / 2);
|
||||
#define CENTER_GRID_CELL_ID (MAX_NUMBER_OF_CELLS*MAX_NUMBER_OF_GRIDS/2)
|
||||
#define CENTER_GRID_CELL_OFFSET (SIZE_OF_GRID_CELL/2)
|
||||
|
||||
constexpr uint32 TOTAL_NUMBER_OF_CELLS_PER_MAP = (MAX_NUMBER_OF_GRIDS * MAX_NUMBER_OF_CELLS);
|
||||
#define TOTAL_NUMBER_OF_CELLS_PER_MAP (MAX_NUMBER_OF_GRIDS*MAX_NUMBER_OF_CELLS)
|
||||
|
||||
constexpr uint32 MAP_RESOLUTION = 128;
|
||||
#define MAP_RESOLUTION 128
|
||||
|
||||
constexpr float MAP_SIZE = (SIZE_OF_GRIDS * MAX_NUMBER_OF_GRIDS);
|
||||
constexpr float MAP_HALFSIZE = (MAP_SIZE / 2);
|
||||
#define MAP_SIZE (SIZE_OF_GRIDS*MAX_NUMBER_OF_GRIDS)
|
||||
#define MAP_HALFSIZE (MAP_SIZE/2)
|
||||
|
||||
// Creature used instead pet to simplify *::Visit templates (not required duplicate code for Creature->Pet case)
|
||||
typedef TYPELIST_4(Player, Creature/*pets*/, Corpse/*resurrectable*/, DynamicObject/*farsight target*/) AllWorldObjectTypes;
|
||||
|
||||
Reference in New Issue
Block a user