diff --git a/Include/Core/Classes/GraphicsObject.hpp b/Include/Core/Classes/GraphicsObject.hpp index 788300b..00f188b 100644 --- a/Include/Core/Classes/GraphicsObject.hpp +++ b/Include/Core/Classes/GraphicsObject.hpp @@ -16,7 +16,6 @@ namespace Internal GraphicsObject(const GraphicsObject& G); static Class GetClass(); - Animation GetAnimation() const; std::int32_t GetAnimationFrame() const; bool GetFinished() const; std::int32_t GetHeight() const; diff --git a/Include/Core/Classes/Projectile.hpp b/Include/Core/Classes/Projectile.hpp new file mode 100644 index 0000000..5ef60bc --- /dev/null +++ b/Include/Core/Classes/Projectile.hpp @@ -0,0 +1,34 @@ +#ifndef PROJECTILE_HPP_INCLUDED +#define PROJECTILE_HPP_INCLUDED + +#include "Renderable.hpp" +#include "../JavaClass/Class.hpp" +#include + +namespace Internal +{ + class Projectile : public Renderable + { + public: + Projectile(); + Projectile(const void* Obj); + Projectile(const Projectile& P); + static Class GetClass(); + + std::int32_t GetAnimationFrame() const; + std::int32_t GetEndTick() const; + double GetHeight() const; + std::int32_t GetID() const; + std::int32_t GetInteractIndex() const; + bool GetMoving() const; + std::int32_t GetPlane() const; + std::int32_t GetRotationX() const; + std::int32_t GetRotationY() const; + std::int32_t GetStartTick() const; + double GetX() const; + double GetY() const; + }; +} + + +#endif // PROJECTILE_HPP_INCLUDED diff --git a/Include/Core/Internal.hpp b/Include/Core/Internal.hpp index 573d57f..bbb9109 100644 --- a/Include/Core/Internal.hpp +++ b/Include/Core/Internal.hpp @@ -81,6 +81,7 @@ #include "Classes/PlayerInfo.hpp" #include "Classes/PlayerManager.hpp" #include "Classes/Preferences.hpp" +#include "Classes/Projectile.hpp" #include "Classes/Queue.hpp" #include "Classes/Region.hpp" #include "Classes/Renderable.hpp" @@ -174,6 +175,7 @@ namespace Internal AttackOption GetPlayerAttackOption(); Cache GetPlayerModelCache(); std::vector GetPlayers(); + Deque GetProjectiles(); std::int32_t GetRunEnergy(); std::string GetSelectedItemName(); std::string GetSelectedSpellName(); @@ -221,6 +223,7 @@ namespace Internal Box GetWidgetBox(const Widget& W, const std::vector& Xs, const std::vector& Ys); ItemContainer GetItemContainer(std::int32_t ID); NPC GetNPC(std::int32_t Index); + Player GetPlayer(std::int32_t Index); std::vector ProjectModel(const Model& M, std::int32_t LocalX, std::int32_t LocalY, std::int32_t LocalZ, std::int32_t Angle); Model GetPlayerModel(std::int64_t ID); @@ -243,6 +246,7 @@ namespace Internal std::vector GetPlayerModel(const Player& P); std::vector GetNPCModel(const NPC& N); std::vector GetGraphicsObjectModel(const GraphicsObject& O); + std::vector GetProjectileModel(const Internal::Projectile& P); SceneTile GetSceneTile(std::int32_t X, std::int32_t Y, std::int32_t Plane); std::vector> GetSceneTiles(std::int32_t Plane); Point TileToMinimap(const Tile& T); diff --git a/Include/Game/Core.hpp b/Include/Game/Core.hpp index 68d30db..2a14956 100644 --- a/Include/Game/Core.hpp +++ b/Include/Game/Core.hpp @@ -44,6 +44,7 @@ #include "Models/GroundObjects.hpp" #include "Models/NPCs.hpp" #include "Models/Players.hpp" +#include "Models/Projectiles.hpp" #include "Models/WallObjects.hpp" #include "Interactable/DecorativeObject.hpp" @@ -53,6 +54,7 @@ #include "Interactable/Item.hpp" #include "Interactable/NPC.hpp" #include "Interactable/Player.hpp" +#include "Interactable/Projectile.hpp" #include "Interactable/WallObject.hpp" #include "Interactable/Widget.hpp" diff --git a/Include/Game/Interactable/GroundObject.hpp b/Include/Game/Interactable/GroundObject.hpp index 23f9d82..4cbadfb 100644 --- a/Include/Game/Interactable/GroundObject.hpp +++ b/Include/Game/Interactable/GroundObject.hpp @@ -41,7 +41,6 @@ namespace Interactable bool Interact(const std::string& Option, bool CheckTarget = true) const; bool Interact(const std::vector& Options, bool CheckTarget = true) const; - operator Internal::GroundObject() const; }; } diff --git a/Include/Game/Interactable/Projectile.hpp b/Include/Game/Interactable/Projectile.hpp new file mode 100644 index 0000000..5adff0c --- /dev/null +++ b/Include/Game/Interactable/Projectile.hpp @@ -0,0 +1,27 @@ +#ifndef INTERACTABLEPROJECTILE_HPP_INCLUDED +#define INTERACTABLEPROJECTILE_HPP_INCLUDED + +#include "../../Core/Classes/Projectile.hpp" +#include +#include "../../Core/Types/Point.hpp" +#include "../../Core/Types/Tile.hpp" +#include "../../Core/Classes/Character.hpp" + +namespace Interactable +{ + class Projectile : public Internal::Projectile + { + public: + Projectile(const Internal::Projectile& P); + Projectile(const Projectile& P); + + std::vector GetModel() const; + Tile GetTile() const; + Internal::Character GetInteracting() const; + bool Interacting() const; + bool Interacting(const Internal::Character& C) const; + + }; +} + +#endif // INTERACTABLEPROJECTILE_HPP_INCLUDED diff --git a/Include/Game/Models/Projectiles.hpp b/Include/Game/Models/Projectiles.hpp new file mode 100644 index 0000000..35d6af2 --- /dev/null +++ b/Include/Game/Models/Projectiles.hpp @@ -0,0 +1,29 @@ +#ifndef PROJECTILES_HPP_INCLUDED +#define PROJECTILES_HPP_INCLUDED + +#include "../../Game/Interactable/Projectile.hpp" +#include +#include +#include +#include + +class Projectiles +{ + public: + + static std::vector GetAllWithin(std::int32_t Distance); + static std::vector GetAll(); + + static std::vector GetAll(const Tile& T); + static std::vector GetAll(std::int32_t ID, std::int32_t Distance = -1); + static std::vector GetAll(const std::vector& IDs, std::int32_t Distance = -1); + static std::vector GetAll(const std::function& Filter, std::int32_t Distance = -1); + + static Interactable::Projectile Get(const Tile& T); + static Interactable::Projectile Get(std::int32_t ID, std::int32_t Distance = -1); + static Interactable::Projectile Get(const std::vector& IDs, std::int32_t Distance = -1); + static Interactable::Projectile Get(const std::function& Filter, std::int32_t Distance = -1); +}; + + +#endif // PROJECTILES_HPP_INCLUDED diff --git a/Library/libAlpacaLibrary.a b/Library/libAlpacaLibrary.a index 8a00ed8..ec41329 100644 Binary files a/Library/libAlpacaLibrary.a and b/Library/libAlpacaLibrary.a differ