diff --git a/Include/Core/Internal.hpp b/Include/Core/Internal.hpp index c96c497..b70bebb 100644 --- a/Include/Core/Internal.hpp +++ b/Include/Core/Internal.hpp @@ -183,9 +183,11 @@ namespace Internal bool LoadWorlds(); void SetWorld(const World& W); + Node GetHashTableNode(const HashTable& Table, std::int32_t Index); ItemInfo GetItemInfo(std::int32_t ID); NPCInfo GetNPCInfo(std::int32_t ID); ObjectInfo GetObjectInfo(std::int32_t ID); + ObjectInfo GetObjectInfo(std::int32_t ID, const std::vector& Buckets); Widget GetWidget(std::int32_t Container, std::int32_t Component); Widget GetWidgetParent(const Widget& W); std::int32_t GetWidgetX(const Widget& W); diff --git a/Include/Game/Core.hpp b/Include/Game/Core.hpp index cd2bb52..df33983 100644 --- a/Include/Game/Core.hpp +++ b/Include/Game/Core.hpp @@ -36,6 +36,7 @@ #include "Models/GroundItems.hpp" #include "Models/NPCs.hpp" #include "Models/Players.hpp" +#include "Models/GameObjects.hpp" #include "Interactable/GameObject.hpp" diff --git a/Include/Game/Interfaces/GameTabs/Logout.hpp b/Include/Game/Interfaces/GameTabs/Logout.hpp index ca4e497..0e965f2 100644 --- a/Include/Game/Interfaces/GameTabs/Logout.hpp +++ b/Include/Game/Interfaces/GameTabs/Logout.hpp @@ -17,9 +17,7 @@ class Logout static bool LogoutPlayer(); static bool IsWorldSwitcherOpen(); - - static bool OpenWorldSwitcher(); - static bool OpenWorldSwitcher(bool OpenInventory); + static bool OpenWorldSwitcher(bool OpenInventory = false); static bool WorldSwitcherScrollTo(Internal::World World); static bool WorldSwitcherScrollTo(std::int32_t WorldID); @@ -27,10 +25,11 @@ class Logout static bool SwitchWorld(Internal::World World); static bool SwitchWorld(std::int32_t WorldID); - static std::vector GetFavoriteWorlds(); + static std::vector GetFavoriteWorlds(); static Internal::Widget GetWorldWidget(Internal::World World); static Internal::Widget GetWorldWidget(std::int32_t WorldID); + static Internal::Widget GetFavoriteWorldWidget(std::int32_t WorldID); }; /** @} */ diff --git a/Include/Game/Interfaces/Login.hpp b/Include/Game/Interfaces/Login.hpp index 70bfcc4..a83dcbb 100644 --- a/Include/Game/Interfaces/Login.hpp +++ b/Include/Game/Interfaces/Login.hpp @@ -24,6 +24,7 @@ class Login TEMP_BANNED, PERM_BANNED, ACCOUNT_LOCKED, + MEMBER_AREA, WORLD_SELECT, CONNECTING, LOADING, @@ -33,11 +34,10 @@ class Login static LOGIN_STATE GetState(); - static bool IsLoggedIn(); static bool IsWorldSelectOpen(); static bool CloseWorldSelect(); - static std::int32_t LoginPlayer(); + static bool LoginPlayer(); static bool EnterCredentials(); static bool SelectWorld(); diff --git a/Include/Game/Models/GameObjects.hpp b/Include/Game/Models/GameObjects.hpp new file mode 100644 index 0000000..66d3e80 --- /dev/null +++ b/Include/Game/Models/GameObjects.hpp @@ -0,0 +1,40 @@ +#ifndef GAMEOBJECTS_HPP_INCLUDED +#define GAMEOBJECTS_HPP_INCLUDED + +#include "../../Core/Classes/GameObject.hpp" +#include "../../Core/Classes/ObjectInfo.hpp" +#include "../../Core/Types/Tile.hpp" +#include "../../Core/Types/Convex.hpp" +#include +#include +#include +#include + +class GameObjects +{ + public: + + static Internal::ObjectInfo GetInfoOf(const Internal::GameObject& G); + static Tile GetTileOf(const Internal::GameObject& G); + static std::vector GetModelOf(const Internal::GameObject& G); + static Convex GetConvexOf(const Internal::GameObject& G); + + //consider changing to Interactable::GameObject + static Internal::GameObject Get(const Tile& T); + static Internal::GameObject Get(std::int32_t ID); + static Internal::GameObject Get(const std::string& Name); + static Internal::GameObject Get(const std::vector& PossibleIDs); + static Internal::GameObject Get(const std::vector& PossibleNames); + static Internal::GameObject Get(const std::function& Filter); + + static std::vector GetAll(); + static std::vector GetAll(const Tile& T); + static std::vector GetAll(std::int32_t ID); + static std::vector GetAll(const std::string& Name); + static std::vector GetAll(const std::vector& PossibleIDs); + static std::vector GetAll(const std::vector& PossibleNames); + static std::vector GetAll(const std::function& Filter); + +}; + +#endif // GAMEOBJECTS_HPP_INCLUDED diff --git a/Include/Game/Models/SceneObjects.hpp b/Include/Game/Models/SceneObjects.hpp index 042b4f6..c945c9b 100644 --- a/Include/Game/Models/SceneObjects.hpp +++ b/Include/Game/Models/SceneObjects.hpp @@ -19,7 +19,6 @@ class SceneObjects { public: - typedef enum OBJECT_TYPE { GAME_OBJECT = (1 << 1), @@ -35,22 +34,14 @@ class SceneObjects static std::vector GetAll(const std::string& Name, OBJECT_TYPE ObjectTypes = ALL); static std::vector GetAll(const std::vector& PossibleIDs, OBJECT_TYPE ObjectTypes = ALL); static std::vector GetAll(const std::vector& PossibleNames, OBJECT_TYPE ObjectTypes = ALL); - - static std::vector GetAll(const std::function& Filter); - static std::vector GetAll(const std::function& Filter); - static std::vector GetAll(const std::function& Filter); - static std::vector GetAll(const std::function& Filter); + static std::vector GetAll(const std::function& Filter, OBJECT_TYPE ObjectTypes = ALL); static Object Get(const Tile& T, OBJECT_TYPE ObjectTypes = ALL); static Object Get(std::int32_t ID, OBJECT_TYPE ObjectTypes = ALL); static Object Get(const std::string& Name, OBJECT_TYPE ObjectTypes = ALL); static Object Get(const std::vector& PossibleIDs, OBJECT_TYPE ObjectTypes = ALL); static Object Get(const std::vector& PossibleNames, OBJECT_TYPE ObjectTypes = ALL); - - static Internal::GameObject Get(const std::function& Filter); - static Internal::DecorativeObject Get(const std::function& Filter); - static Internal::GroundObject Get(const std::function& Filter); - static Internal::WallObject Get(const std::function& Filter); + static Object Get(const std::function& Filter, OBJECT_TYPE ObjectTypes = ALL); static Internal::ObjectInfo GetInfoOf(const Object& O); static Internal::ObjectInfo GetInfoOf(const Internal::GameObject& G); @@ -58,11 +49,13 @@ class SceneObjects static Internal::ObjectInfo GetInfoOf(const Internal::GroundObject& G); static Internal::ObjectInfo GetInfoOf(const Internal::WallObject& W); + static Tile GetTileOf(const Object& O); static Tile GetTileOf(const Internal::GameObject& G); static Tile GetTileOf(const Internal::DecorativeObject& D); static Tile GetTileOf(const Internal::GroundObject& G); static Tile GetTileOf(const Internal::WallObject& W); + static Convex GetConvexOf(const Object& O); static Convex GetConvexOf(const Internal::GameObject& G); static Convex GetConvexOf(const Internal::DecorativeObject& D); static Convex GetConvexOf(const Internal::GroundObject& G); diff --git a/Library/libAlpacaLibrary.a b/Library/libAlpacaLibrary.a index fe165d3..aa4142e 100644 Binary files a/Library/libAlpacaLibrary.a and b/Library/libAlpacaLibrary.a differ