Release 1.28

master
Kasi 2019-06-17 17:44:48 +01:00
parent fa12d77f44
commit 2689a14ea8
13 changed files with 150 additions and 15 deletions

View File

@ -0,0 +1,27 @@
#ifndef INTEGERNODE_HPP_INCLUDED
#define INTEGERNODE_HPP_INCLUDED
#include "Node.hpp"
#include "../JavaClass/Class.hpp"
#include <cstdint>
namespace Internal
{
class IntegerNode : public Node
{
public:
IntegerNode(const void* Obj);
IntegerNode() = default;
IntegerNode(IntegerNode&& Obj) = default;
IntegerNode(const IntegerNode& Obj) = default;
IntegerNode& operator=(IntegerNode&& Obj) = default;
IntegerNode& operator=(const IntegerNode& Obj) = default;
static Class GetClass();
std::int32_t GetInteger() const;
};
}
#endif // INTEGERNODE_HPP_INCLUDED

View File

@ -6,6 +6,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <cstdint> #include <cstdint>
#include "IterableHashTable.hpp"
namespace Internal namespace Internal
{ {
@ -28,6 +29,7 @@ namespace Internal
bool GetMembers() const; bool GetMembers() const;
std::string GetName() const; std::string GetName() const;
std::int32_t GetNoteID() const; std::int32_t GetNoteID() const;
IterableHashTable GetParameters() const;
std::int32_t GetPrice() const; std::int32_t GetPrice() const;
std::int32_t GetShiftClickIndex() const; std::int32_t GetShiftClickIndex() const;
std::int32_t GetSpriteID() const; std::int32_t GetSpriteID() const;

View File

@ -0,0 +1,33 @@
#ifndef ITERABLEHASHTABLE_HPP_INCLUDED
#define ITERABLEHASHTABLE_HPP_INCLUDED
#include "../JavaClass/Object.hpp"
#include "../JavaClass/Class.hpp"
#include <vector>
#include "Node.hpp"
#include <cstdint>
namespace Internal
{
class IterableHashTable : public Object
{
public:
IterableHashTable(const void* Obj);
IterableHashTable() = default;
IterableHashTable(IterableHashTable&& Obj) = default;
IterableHashTable(const IterableHashTable& Obj) = default;
IterableHashTable& operator=(IterableHashTable&& Obj) = default;
IterableHashTable& operator=(const IterableHashTable& Obj) = default;
static Class GetClass();
std::vector<Node> GetBuckets() const;
Node GetBuckets(std::int32_t I) const;
std::int32_t GetIndex() const;
std::int32_t GetSize() const;
};
}
#endif // ITERABLEHASHTABLE_HPP_INCLUDED

View File

@ -0,0 +1,27 @@
#ifndef OBJECTNODE_HPP_INCLUDED
#define OBJECTNODE_HPP_INCLUDED
#include "Node.hpp"
#include "../JavaClass/Class.hpp"
#include "../JavaClass/Object.hpp"
namespace Internal
{
class ObjectNode : public Node
{
public:
ObjectNode(const void* Obj);
ObjectNode() = default;
ObjectNode(ObjectNode&& Obj) = default;
ObjectNode(const ObjectNode& Obj) = default;
ObjectNode& operator=(ObjectNode&& Obj) = default;
ObjectNode& operator=(const ObjectNode& Obj) = default;
static Class GetClass();
Object GetObject() const;
};
}
#endif // OBJECTNODE_HPP_INCLUDED

View File

@ -0,0 +1,29 @@
#ifndef PARAMETERINFO_HPP_INCLUDED
#define PARAMETERINFO_HPP_INCLUDED
#include "CacheableNode.hpp"
#include "../JavaClass/Class.hpp"
#include <string>
namespace Internal
{
class ParameterInfo : public CacheableNode
{
public:
ParameterInfo(const void* Obj);
ParameterInfo() = default;
ParameterInfo(ParameterInfo&& Obj) = default;
ParameterInfo(const ParameterInfo& Obj) = default;
ParameterInfo& operator=(ParameterInfo&& Obj) = default;
ParameterInfo& operator=(const ParameterInfo& Obj) = default;
static Class GetClass();
std::int32_t GetInteger() const;
std::string GetString() const;
};
}
#endif // PARAMETERINFO_HPP_INCLUDED

View File

@ -81,21 +81,28 @@ namespace Globals
// grandchild 0 = proper widget bounds, grandchild 1 = text // grandchild 0 = proper widget bounds, grandchild 1 = text
//************ Chat.cpp ************// //************ Chat.cpp ************//
typedef struct ChatWidgetDef typedef struct ChatDialogWidgetDef
{ {
std::int32_t Parent = -1; std::int32_t Parent = -1;
std::int32_t TitleChild = -1; std::int32_t TitleChild = -1;
std::int32_t ContinueChild = -1; std::int32_t ContinueChild = -1;
std::int32_t ContentChild = -1; std::int32_t ContentChild = -1;
} ChatWidgetDef; } ChatDialogWidgetDef;
const ChatWidgetDef CHAT_NPC_CHAT_WIDGETS = { 231, 2, 3, 4 }; // Appears when a NPC is talking (NPC head is visible in dialogue) typedef struct SpriteChatDialogWidgetDef
const ChatWidgetDef CHAT_PLAYER_CHAT_WIDGETS = { 217, 2, 3, 4 }; // Appears when a Player is talking (Player head is visible in dialogue) {
const ChatWidgetDef CHAT_GAME_CHAT_WIDGETS = { 193, 2, 3, 4 }; // Unknown std::int32_t Parent = -1;
const ChatWidgetDef CHAT_LEVEL_UP_CHAT_WIDGETS = { 233, 1, 3, 2 }; // Appears when leveling up std::int32_t SpriteChild = -1;
const ChatWidgetDef CHAT_BANK_PIN_ERROR_WIDGETS = { 229, 1, 2 }; // Appears when entering the bank pin wrong std::int32_t ContentChild = -1;
const WidgetDef CHAT_QUEST_DIALOGUE_CONTINUE = { 193, 0, 2 }; // Quest dialogues std::int32_t OptionsContainerChild = -1; // Options are found via grandchildren of this widget
const WidgetDef CHAT_QUEST_DIALOGUE_CONTENT = { 193, 2 }; // Quest dialogues std::int32_t OptionsContainerChildStart = -1; // Child to add an Index to (193, 0, 2 + Index)
} SpriteChatDialogWidgetDef;
const ChatDialogWidgetDef CHAT_NPC_CHAT_WIDGETS = { 231, 2, 3, 4 }; // Appears when a NPC is talking (NPC head is visible in dialogue)
const ChatDialogWidgetDef CHAT_PLAYER_CHAT_WIDGETS = { 217, 2, 3, 4 }; // Appears when a Player is talking (Player head is visible in dialogue)
const SpriteChatDialogWidgetDef CHAT_SPRITE_WIDGETS = { 193, 1, 2, 0, 2 }; // Appears when a sprite is shown, mainly quest dialogues
const ChatDialogWidgetDef CHAT_LEVEL_UP_CHAT_WIDGETS = { 233, 1, 3, 2 }; // Appears when leveling up
const ChatDialogWidgetDef CHAT_BANK_PIN_ERROR_WIDGETS = { 229, 1, 2 }; // Appears when entering the bank pin wrong
const WidgetDef CHAT_SELECT_OPTION_CONTAINER = { 219, 1 }; // Container for all Select Option options const WidgetDef CHAT_SELECT_OPTION_CONTAINER = { 219, 1 }; // Container for all Select Option options
const WidgetDef CHAT_SELECT_OPTION_TITLE = { CHAT_SELECT_OPTION_CONTAINER.Parent, CHAT_SELECT_OPTION_CONTAINER.Child, 0 }; const WidgetDef CHAT_SELECT_OPTION_TITLE = { CHAT_SELECT_OPTION_CONTAINER.Parent, CHAT_SELECT_OPTION_CONTAINER.Child, 0 };

View File

@ -69,8 +69,10 @@
#include "Classes/Ignore.hpp" #include "Classes/Ignore.hpp"
#include "Classes/IgnoreList.hpp" #include "Classes/IgnoreList.hpp"
#include "Classes/IndexableData.hpp" #include "Classes/IndexableData.hpp"
#include "Classes/IntegerNode.hpp"
#include "Classes/ItemContainer.hpp" #include "Classes/ItemContainer.hpp"
#include "Classes/ItemInfo.hpp" #include "Classes/ItemInfo.hpp"
#include "Classes/IterableHashTable.hpp"
#include "Classes/LinkedList.hpp" #include "Classes/LinkedList.hpp"
#include "Classes/MessageNode.hpp" #include "Classes/MessageNode.hpp"
#include "Classes/Model.hpp" #include "Classes/Model.hpp"
@ -81,6 +83,8 @@
#include "Classes/NPC.hpp" #include "Classes/NPC.hpp"
#include "Classes/NPCInfo.hpp" #include "Classes/NPCInfo.hpp"
#include "Classes/ObjectInfo.hpp" #include "Classes/ObjectInfo.hpp"
#include "Classes/ObjectNode.hpp"
#include "Classes/ParameterInfo.hpp"
#include "Classes/Player.hpp" #include "Classes/Player.hpp"
#include "Classes/PlayerInfo.hpp" #include "Classes/PlayerInfo.hpp"
#include "Classes/PlayerManager.hpp" #include "Classes/PlayerManager.hpp"
@ -188,6 +192,7 @@ namespace Internal
std::vector<NPC> GetNPCs(); std::vector<NPC> GetNPCs();
IndexableData GetObjectIndexableData(); IndexableData GetObjectIndexableData();
Cache GetObjectInfoCache(); Cache GetObjectInfoCache();
Cache GetParameterInfoCache();
std::string GetPassword(); std::string GetPassword();
AttackOption GetPlayerAttackOption(); AttackOption GetPlayerAttackOption();
Cache GetPlayerModelCache(); Cache GetPlayerModelCache();

View File

@ -1,6 +1,8 @@
#ifndef OBJECT_HPP_INCLUDED #ifndef OBJECT_HPP_INCLUDED
#define OBJECT_HPP_INCLUDED #define OBJECT_HPP_INCLUDED
#include <string>
namespace Internal namespace Internal
{ {
class Class; class Class;
@ -22,6 +24,7 @@ namespace Internal
bool Equals(Object O) const; bool Equals(Object O) const;
bool InstanceOf(Class C) const; bool InstanceOf(Class C) const;
virtual ~Object(); virtual ~Object();
}; };
} }

View File

@ -26,6 +26,7 @@ namespace Interactable
bool IsHidden() const; bool IsHidden() const;
bool IsVisible() const; bool IsVisible() const;
std::vector<Interactable::Widget> GetInteractableChildren() const;
std::vector<std::int32_t> GetNormalizedItemIDs() const; std::vector<std::int32_t> GetNormalizedItemIDs() const;
Box GetBox() const; Box GetBox() const;
@ -37,7 +38,6 @@ namespace Interactable
bool Interact(const std::string& Option) const; bool Interact(const std::string& Option) const;
bool Interact(const std::vector<std::string>& Options) const; bool Interact(const std::vector<std::string>& Options) const;
bool Interact(const std::function<bool (const Box&)>& InteractMethod) const; bool Interact(const std::function<bool (const Box&)>& InteractMethod) const;
}; };
} }

View File

@ -15,7 +15,8 @@ namespace Chat
SELECT_OPTION, SELECT_OPTION,
PLEASE_WAIT, PLEASE_WAIT,
ENTER_AMOUNT, ENTER_AMOUNT,
LEVEL_UP LEVEL_UP,
SPRITE_SELECT_OPTION
} DIALOGUE_STATE; } DIALOGUE_STATE;
typedef enum CHAT_TYPE typedef enum CHAT_TYPE

View File

@ -205,6 +205,7 @@ namespace Magic
const SPELL GetSelectedSpell(); const SPELL GetSelectedSpell();
bool CastSpell(const SPELL& Spell); bool CastSpell(const SPELL& Spell);
bool CastSpell(const SPELL& Spell, const std::string& Option);
bool SelectSpell(const SPELL& Spell); bool SelectSpell(const SPELL& Spell);
} }

View File

@ -71,14 +71,14 @@ namespace Camera
* @param Angle or degree * @param Angle or degree
* @return true if it rotates within (+/-) 10 of the passed angle * @return true if it rotates within (+/-) 10 of the passed angle
*/ */
bool RotateTo(std::int32_t Angle); bool RotateTo(std::int32_t Angle, std::int32_t Tolerance = 10);
/** /**
* @brief Rotates the camera to the passed direction (Camera::NORTH/EAST/SOUTH/WEST) * @brief Rotates the camera to the passed direction (Camera::NORTH/EAST/SOUTH/WEST)
* *
* @param Direction Camera::NORTH / EAST / SOUTH / WEST * @param Direction Camera::NORTH / EAST / SOUTH / WEST
* @return true if it rotates within (+/-) 10 of the passed direction * @return true if it rotates within (+/-) 10 of the passed direction
*/ */
bool RotateTo(COMPASS_DIRECTION Direction); bool RotateTo(COMPASS_DIRECTION Direction, std::int32_t Tolerance = 10);
/** /**
* @brief Rotates the camera to the passed tile, with an optional desired Angle * @brief Rotates the camera to the passed tile, with an optional desired Angle
* *
@ -86,7 +86,7 @@ namespace Camera
* @param Angle optional desired angle of where the tile should be in relation to the player, defaulted to 0 or North * @param Angle optional desired angle of where the tile should be in relation to the player, defaulted to 0 or North
* @return true if it rotates within (+/-) 10 of the passed tile and angle * @return true if it rotates within (+/-) 10 of the passed tile and angle
*/ */
bool RotateTo(const Tile& T, std::int32_t Angle = 0); bool RotateTo(const Tile& T, std::int32_t Angle = 0, std::int32_t Tolerance = 10);
/** /**
* @brief Rotates the camera to the passed tile, with an optional desired direction * @brief Rotates the camera to the passed tile, with an optional desired direction
* *
@ -94,7 +94,7 @@ namespace Camera
* @param Direction optional desired angle of where the tile should be in relation to the player (NORTH/EAST/SOUTH/WEST), defaulted to North * @param Direction optional desired angle of where the tile should be in relation to the player (NORTH/EAST/SOUTH/WEST), defaulted to North
* @return true if it rotates within (+/-) 10 of the passed tile and direction * @return true if it rotates within (+/-) 10 of the passed tile and direction
*/ */
bool RotateTo(const Tile& T, COMPASS_DIRECTION Direction = NORTH); bool RotateTo(const Tile& T, COMPASS_DIRECTION Direction = NORTH, std::int32_t Tolerance = 10);
/** /**
* @brief Sets the pitch of the camera * @brief Sets the pitch of the camera

Binary file not shown.