Skip to content

Commit

Permalink
Move data storage to WorldObject and add to Map
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Jan 14, 2024
1 parent 33ecb12 commit cfa7a98
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/server/game/Entities/Object/Object.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#include <list>
#include <set>
#include <unordered_map>
#ifdef ELUNA
#include "LuaValue.h"
#endif

class Corpse;
class Creature;
Expand Down Expand Up @@ -504,6 +507,8 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
ElunaEventProcessor* elunaEvents;

Eluna* GetEluna() const;

LuaVal lua_data = LuaVal({});
#endif

// Transports
Expand Down
3 changes: 0 additions & 3 deletions src/server/game/Entities/Player/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "PetDefines.h"
#include "PlayerTaxi.h"
#include "QuestDef.h"
#include "LuaValue.h"
#include <memory>
#include <queue>
#include <unordered_set>
Expand Down Expand Up @@ -2196,8 +2195,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>

std::string GetDebugInfo() const override;

LuaVal lua_data = LuaVal({});

protected:
// Gamemaster whisper whitelist
GuidList WhisperList;
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/LuaEngine
5 changes: 5 additions & 0 deletions src/server/game/Maps/Map.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
#include <list>
#include <memory>
#include <mutex>
#ifdef ELUNA
#include "LuaValue.h"
#endif

class Battleground;
class BattlegroundMap;
Expand Down Expand Up @@ -821,6 +824,8 @@ class TC_GAME_API Map : public GridRefManager<NGridType>
bool IsParentMap() const { return GetParent() == this; }
#ifdef ELUNA
Eluna* GetEluna() const { return eluna; }

LuaVal lua_data = LuaVal({});
#endif
private:
// Type specific code for add/remove to/from grid
Expand Down

0 comments on commit cfa7a98

Please sign in to comment.