Skip to content

Commit

Permalink
update: 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KobeBryant114514 authored Jan 18, 2024
2 parents 4ef9a51 + d2cc564 commit b1df6e7
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 24 deletions.
Binary file modified GMLIB/GMLIB.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion GMLIB/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"type": "native",
"author": "GroupMountain",
"description": "Group Mountain Library",
"version": "0.4.2"
"version": "0.5.0"
}
17 changes: 8 additions & 9 deletions include/GMLIB/Server/FloatingTextAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@ class FloatingText {
GMLIB_API static bool deleteFloatingText(int64 runtimeId);

public:
GMLIB_API virtual ~FloatingText();
virtual ~FloatingText();

GMLIB_API virtual int64_t getFloatingTextRuntimeId();

GMLIB_API virtual void sendToClient(Player* pl);
public:
GMLIB_API int64_t getFloatingTextRuntimeId();

GMLIB_API virtual void sendToAllClients();
GMLIB_API void sendToClient(Player* pl);

GMLIB_API virtual void removeFromClient(Player* pl);
GMLIB_API void sendToAllClients();

GMLIB_API virtual void removeFromAllClients();
GMLIB_API void removeFromClient(Player* pl);

GMLIB_API virtual void updateText(std::string newText);
GMLIB_API void removeFromAllClients();

GMLIB_API virtual void removeFromServer();
GMLIB_API void updateText(std::string newText);
};
6 changes: 6 additions & 0 deletions include/GMLIB/Server/FormAPI/ServerSettingForm.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
#pragma once
#include "GMLIB/GMLIB.h"

class GMLIB_ServerSettingForm {
public:
ll::form::CustomForm mForm;
};

2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"type": "native",
"author": "GroupMountain",
"description": "Group Mountain Library",
"version": "0.4.2"
"version": "0.5.0"
}
8 changes: 1 addition & 7 deletions src/Server/FloatingTextAPI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,10 @@ FloatingText* FloatingText::getFloatingText(int64 runtimeId) {
return nullptr;
}

void FloatingText::removeFromServer() {
removeFromAllClients();
RuntimeFloatingTextList.erase(mRuntimeId);
delete this;
}

bool FloatingText::deleteFloatingText(int64 runtimeId) {
auto ft = getFloatingText(runtimeId);
if (ft) {
ft->removeFromServer();
delete ft;
return true;
}
return false;
Expand Down
3 changes: 1 addition & 2 deletions src/Server/FormAPI/NpcDialogueForm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GMLIB_NpcDialogueForm::~GMLIB_NpcDialogueForm() {
mRuntimeNpcFormList.erase(mFormRuntimeId);
}

int GMLIB_NpcDialogueForm::addAction(std::string name, std::vector<std::string> cmds, NpcDialogueFormAction type) {
int GMLIB_NpcDialogueForm::addAction(std::string name, NpcDialogueFormAction type, std::vector<std::string> cmds) {
std::string text;
std::vector<nlohmann::ordered_json> data;
for (auto cmd : cmds) {
Expand Down Expand Up @@ -131,7 +131,6 @@ LL_AUTO_TYPE_INSTANCE_HOOK(
}
fm->mCallback(pl, (int)packet.mActionIndex, packet.mType);
if (type >= 0 && type <= 2) {
logger.warn("delete");
delete fm;
}
}
Expand Down
11 changes: 10 additions & 1 deletion src/Server/FormAPI/ServerSettingForm.cc
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
#include "Global.h"
#include <GMLIB/Server/FormAPI/ServerSettingForm.h>
#include <GMLIB/Server/FormAPI/ServerSettingForm.h>

/*
std::optional<ll::form::CustomForm> mSeverSettingForm;
void test() {
auto fm = ll::form::CustomForm("sv");
}
*/
4 changes: 2 additions & 2 deletions src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#define LIB_NAME "GMLIB"

#define LIB_VERSION_MAJOR 0
#define LIB_VERSION_MINOR 4
#define LIB_VERSION_REVISION 2
#define LIB_VERSION_MINOR 5
#define LIB_VERSION_REVISION 0
#define LIB_VERSION_PRERELEASE ""
#define LIB_VERSION_BUILD_META ""

Expand Down
2 changes: 1 addition & 1 deletion tooth.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "github.com/GroupMountain/GMLIB",
"version": "0.4.2",
"version": "0.5.0",
"info": {
"name": "GMLIB",
"description": "Group Mountain Library",
Expand Down

0 comments on commit b1df6e7

Please sign in to comment.