├── vendor.yml
├── .gitmodules
├── src
├── ENetWrapper
│ ├── README.md
│ ├── PeersIterator.cpp
│ ├── ENetWrapper.hpp
│ ├── ENetServerRemote.hpp
│ ├── ENetServerRemote.cpp
│ ├── Peer.hpp
│ ├── ENetServer.hpp
│ ├── PeersIterator.hpp
│ ├── Peer.cpp
│ └── ENetServer.cpp
├── Packets
│ ├── PacketsEncoder
│ │ ├── README.md
│ │ ├── VariantList
│ │ │ ├── VariantList.hpp
│ │ │ └── VariantList.cpp
│ │ └── PacketsEncoder.hpp
│ ├── README.md
│ ├── PacketsCommon
│ │ └── PacketsCommon.hpp
│ └── PacketsDecoder
│ │ └── PacketsDecoder.hpp
├── main.cpp
├── Server.hpp
├── Events
│ ├── EventsHandler.cpp
│ ├── Event.cpp
│ ├── EventsHandler.h
│ └── Event.h
└── Server.cpp
├── .gitignore
├── README.md
├── CMakeLists.txt
├── appveyor.yml
├── libs
└── json
│ └── LICENSE.md
└── LICENSE
/vendor.yml:
--------------------------------------------------------------------------------
1 | - third_party/
2 | - *.vcxproj
3 | - .vcxproj.filters
4 | - json.hpp
5 | - libs/
6 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "libs/enet"]
2 | path = libs/enet
3 | url = https://github.com/GrowtopiaNoobs/enet
4 |
--------------------------------------------------------------------------------
/src/ENetWrapper/README.md:
--------------------------------------------------------------------------------
1 | # ENetWrapper
2 |
3 | This is abstraction layer for library ENet. ENet should be only included in those files and shouldn't be ever used directly in any others.
--------------------------------------------------------------------------------
/src/Packets/PacketsEncoder/README.md:
--------------------------------------------------------------------------------
1 | # PacketsEncoder
2 |
3 | This is the only one header (and subheaders), which should call `Peer->sendPacket()`. If there is need for `SomePacket->send(OtherClassThanPeer x)`, then please implement `Peer operator=(OtherClassThanPeer rhs)` for your class.
--------------------------------------------------------------------------------
/src/Packets/README.md:
--------------------------------------------------------------------------------
1 | # Packets
2 |
3 | This set of header implements functions, structures and classes for decoding, encoding and encoding of packets.
4 |
5 | Use of different files is described here:
6 | - `PacketsCommon` contains files, which should be included only by `PacketsEncoder` and `PacketsDeoder`. It is used for stuff which is needed for both of them.
7 | - `PacketsDecoder` contains files for decoding packet.
8 | - `PacketsEncoder` contains files for encoding packet and sending it to Peer.
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Compiled Object files
5 | *.slo
6 | *.lo
7 | *.o
8 | *.obj
9 |
10 | # Precompiled Headers
11 | *.gch
12 | *.pch
13 |
14 | # Compiled Dynamic libraries
15 | *.so
16 | *.dylib
17 | *.dll
18 |
19 | # Fortran module files
20 | *.mod
21 | *.smod
22 |
23 | # Compiled Static libraries
24 | *.lai
25 | *.la
26 | *.a
27 | *.lib
28 |
29 | # Executables
30 | *.exe
31 | *.out
32 | *.app
33 |
34 | # Directories
35 | .idea/
36 | bin/
37 | build/
38 | cmake-build-debug/
39 |
--------------------------------------------------------------------------------
/src/ENetWrapper/PeersIterator.cpp:
--------------------------------------------------------------------------------
1 | /**********************************************************************************
2 | New Growtopia Private Server
3 | Copyright (C) 2019 Growtopia Noobs
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Affero General Public License as published
6 | by the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU Affero General Public License for more details.
12 | You should have received a copy of the GNU Affero General Public License
13 | along with this program. If not, see .
14 | **********************************************************************************/
15 |
16 |
17 | #include "PeersIterator.hpp"
18 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Growtopia Server 2 [](https://ci.appveyor.com/project/GrowtopiaNoobs/growtopiaserver2)
2 |
3 | This code has been tested to compile under Ubuntu 18.04 with CLion 19.3. Windows build should work with Visual Studio, but it isn't tested.
4 |
5 | All functionality of server should be added via modules. Modules should be placed into directory `modules`, which should be placed into same directory as server. Modules should be created using [module API](https://github.com/GrowtopiaNoobs/GrowtopiaServer2-Module).
6 |
7 | This project has been published under GNU AFFERO GPL license, so you need to **publish whole source code and citate orginal authors name, even if you are using your server as service**!
8 |
9 | If you want to support development of this server, then make sure you contribute to this repo!
10 |
11 | Make that sure that you subscribe my channel https://www.youtube.com/channel/UCLXtuoBlrXFDRtFU8vPy35g and enjoy :+1:
12 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10.2)
2 |
3 | project(GrowtopiaServer CXX)
4 |
5 | set(CMAKE_CXX_STANDARD 14)
6 | set(LIBS ${CMAKE_SOURCE_DIR}/libs)
7 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
8 | set(INCLUDED_LIBS enet pthread)
9 |
10 | if (MSVC)
11 | set(INCLUDED_LIBS enet winmm ws2_32)
12 | endif()
13 |
14 | include_directories(GrowtopiaServer PRIVATE ${LIBS}/enet/include)
15 | include_directories(GrowtopiaServer PRIVATE ${LIBS}/json)
16 | add_subdirectory(${LIBS}/enet)
17 |
18 | file (GLOB srcfiles
19 | src/*.c* s/*.h*
20 | src/*/*.c* s/*/*.h*
21 | src/*/*/*.c* s/*/*/*.h*
22 | src/*/*/*/*.c* s/*/*/*/*.h*
23 | src/*/*/*/*/*.c* s/*/*/*/*/*.h*
24 | src/*/*/*/*/*/*.c* s/*/*/*/*/*/*.h*
25 | src/*/*/*/*/*/*/*.c* s/*/*/*/*/*/*/*.h*)
26 |
27 | list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/CMake)
28 |
29 | add_executable(GrowtopiaServer ${srcfiles})
30 |
31 | target_compile_options(GrowtopiaServer PRIVATE -shared-libgcc)
32 |
33 | target_link_libraries(GrowtopiaServer ${INCLUDED_LIBS} ${CMAKE_DL_LIBS})
34 |
--------------------------------------------------------------------------------
/src/ENetWrapper/ENetWrapper.hpp:
--------------------------------------------------------------------------------
1 | /**********************************************************************************
2 | New Growtopia Private Server
3 | Copyright (C) 2019 Growtopia Noobs
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Affero General Public License as published
6 | by the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU Affero General Public License for more details.
12 | You should have received a copy of the GNU Affero General Public License
13 | along with this program. If not, see .
14 | **********************************************************************************/
15 |
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 |
23 | #include "Peer.hpp"
24 | #include "ENetServer.hpp"
25 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: 1.0.{build}
2 | image:
3 | - ubuntu1804
4 | - Visual Studio 2015
5 | - Visual Studio 2017
6 | - Visual Studio 2019
7 |
8 | for:
9 | -
10 | matrix:
11 | only:
12 | - image: ubuntu1804
13 |
14 | build_script:
15 | - sh build.sh
16 |
17 | artifacts:
18 | - path: bin
19 | name: GrowtopiaServer-Ubuntu1804
20 |
21 | -
22 | matrix:
23 | only:
24 | - image: Visual Studio 2015
25 |
26 | build_script:
27 | - build.bat
28 |
29 | artifacts:
30 | - path: bin
31 | name: GrowtopiaServer-WIN-VS15
32 |
33 | -
34 | matrix:
35 | only:
36 | - image: Visual Studio 2017
37 |
38 | build_script:
39 | - build.bat
40 |
41 | artifacts:
42 | - path: bin
43 | name: GrowtopiaServer-WIN-VS17
44 |
45 | -
46 | matrix:
47 | only:
48 | - image: Visual Studio 2019
49 |
50 | build_script:
51 | - build.bat
52 |
53 | artifacts:
54 | - path: bin
55 | name: GrowtopiaServer-WIN-VS19
56 |
57 | deploy:
58 | - provider: GitHub
59 | description: GrowtopiaServer CI Build
60 | auth_token:
61 | secure: 5OeKL0BpXE39SdxcoJ6mZH7EcELGBCnKLHavhELhYtQxuVmt9ZnQu5GzsAOh1rM+
62 |
--------------------------------------------------------------------------------
/src/ENetWrapper/ENetServerRemote.hpp:
--------------------------------------------------------------------------------
1 | /**********************************************************************************
2 | New Growtopia Private Server
3 | Copyright (C) 2019 Growtopia Noobs
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Affero General Public License as published
6 | by the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU Affero General Public License for more details.
12 | You should have received a copy of the GNU Affero General Public License
13 | along with this program. If not, see .
14 | **********************************************************************************/
15 |
16 |
17 | #pragma once
18 |
19 | #include "Peer.hpp"
20 | #include "PeersIterator.hpp"
21 | #include
22 |
23 | class ENetServerRemote {
24 | std::string id;
25 | ENetHost* server;
26 |
27 | public:
28 | PeersIterator getPeers();
29 | Peer getPeer(std::string id);
30 | std::string getServerID();
31 | void* getPtr();
32 |
33 | ENetServerRemote(char* id, void* server) {
34 | this->id = id;
35 | this->server = (ENetHost*)server;
36 | }
37 | };
38 |
--------------------------------------------------------------------------------
/src/Packets/PacketsCommon/PacketsCommon.hpp:
--------------------------------------------------------------------------------
1 | /**********************************************************************************
2 | New Growtopia Private Server
3 | Copyright (C) 2019 Growtopia Noobs
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Affero General Public License as published
6 | by the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU Affero General Public License for more details.
12 | You should have received a copy of the GNU Affero General Public License
13 | along with this program. If not, see .
14 | **********************************************************************************/
15 |
16 |
17 | #pragma once
18 |
19 | struct TankPacketStruct {
20 | uint32_t packetType = 0;
21 | int32_t netID = 0;
22 | uint32_t padding1 = 0;
23 | uint32_t characterState = 0;
24 | uint32_t padding2 = 0;
25 | uint32_t plantingTree = 0;
26 | float x = 0;
27 | float y = 0;
28 | float XSpeed = 0;
29 | float YSpeed = 0;
30 | uint32_t padding3 = 0;
31 | uint32_t punchX = 0;
32 | uint32_t punchY = 0;
33 | uint32_t packetLenght = 0;
34 | };
35 |
36 | static_assert(sizeof(TankPacketStruct) == 56, "Ivalid size of TankPacketStruct, maybe your compiler isnt supported");
37 |
--------------------------------------------------------------------------------
/libs/json/LICENSE.md:
--------------------------------------------------------------------------------
1 | The class is licensed under the MIT License:
2 |
3 | Copyright © 2013-2019 Niels Lohmann
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
11 | The class contains the UTF-8 Decoder from Bjoern Hoehrmann which is licensed under the MIT License (see above). Copyright © 2008-2009 Björn Hoehrmann bjoern@hoehrmann.de
12 |
13 | The class contains a slightly modified version of the Grisu2 algorithm from Florian Loitsch which is licensed under the MIT License (see above). Copyright © 2009 Florian Loitsch
14 |
15 | The class contains a copy of Hedley from Evan Nemerson which is licensed as CC0-1.0.
16 |
--------------------------------------------------------------------------------
/src/ENetWrapper/ENetServerRemote.cpp:
--------------------------------------------------------------------------------
1 | /**********************************************************************************
2 | New Growtopia Private Server
3 | Copyright (C) 2019 Growtopia Noobs
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Affero General Public License as published
6 | by the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU Affero General Public License for more details.
12 | You should have received a copy of the GNU Affero General Public License
13 | along with this program. If not, see .
14 | **********************************************************************************/
15 |
16 |
17 | #include "ENetServerRemote.hpp"
18 |
19 | PeersIterator ENetServerRemote::getPeers() {
20 | PeersIterator it(this->server->peers, this->server->peerCount, id);
21 | return it;
22 | }
23 |
24 | Peer ENetServerRemote::getPeer(std::string peerID) {
25 | for(int i=0; iserver->peerCount; i++) {
26 | if(this->server->peers[i].state == ENET_PEER_STATE_CONNECTED) {
27 | if(peerID == Peer(&this->server->peers[i], id).getUID()) {
28 | return Peer(&this->server->peers[i], id);
29 | }
30 | }
31 | }
32 | return Peer(NULL, "");
33 | }
34 |
35 | std::string ENetServerRemote::getServerID() {
36 | return id;
37 | }
38 |
39 | void* ENetServerRemote::getPtr() {
40 | return (void*)this;
41 | }
42 |
--------------------------------------------------------------------------------
/src/ENetWrapper/Peer.hpp:
--------------------------------------------------------------------------------
1 | /**********************************************************************************
2 | New Growtopia Private Server
3 | Copyright (C) 2019 Growtopia Noobs
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Affero General Public License as published
6 | by the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU Affero General Public License for more details.
12 | You should have received a copy of the GNU Affero General Public License
13 | along with this program. If not, see .
14 | **********************************************************************************/
15 |
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 |
23 | class Peer {
24 | private:
25 | ENetPeer* peer;
26 | std::string serverID = "";
27 | public:
28 | std::string getIP();
29 | uint32_t getIPasInt();
30 | uint32_t getPing();
31 | std::string getUID();
32 | uint32_t getIncomingBandwidth();
33 | uint32_t getOutgoingBandwidth();
34 | void requestDisconnect();
35 | //void forceDisconnect();
36 | void sendPacket(int packetType, char* data, int dataLeght);
37 |
38 | operator std::string() {
39 | return getUID();
40 | }
41 |
42 | char* getData();
43 | void setData(char* data);
44 |
45 | bool exists();
46 |
47 | Peer(ENetPeer* peer, std::string serverID);
48 | Peer();
49 | };
50 |
--------------------------------------------------------------------------------
/src/Packets/PacketsEncoder/VariantList/VariantList.hpp:
--------------------------------------------------------------------------------
1 | /**********************************************************************************
2 | New Growtopia Private Server
3 | Copyright (C) 2019 Growtopia Noobs
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Affero General Public License as published
6 | by the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU Affero General Public License for more details.
12 | You should have received a copy of the GNU Affero General Public License
13 | along with this program. If not, see .
14 | **********************************************************************************/
15 |
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 |
24 | class VariantList
25 | {
26 | private:
27 | std::vector data;
28 | int indexes = 0;
29 |
30 | template
31 | void appendValue(t val);
32 | public:
33 | VariantList& appendFloat(float val);
34 | VariantList& appendFloat(float val1, float val2);
35 | VariantList& appendFloat(float val1, float val2, float val3);
36 | VariantList& appendInt(int val);
37 | VariantList& appendIntx(int val);
38 | VariantList& appendString(std::string str);
39 | std::vector getData();
40 |
41 | VariantList();
42 | VariantList(std::string packetName);
43 | ~VariantList();
44 | };
45 |
--------------------------------------------------------------------------------
/src/ENetWrapper/ENetServer.hpp:
--------------------------------------------------------------------------------
1 | /**********************************************************************************
2 | New Growtopia Private Server
3 | Copyright (C) 2019 Growtopia Noobs
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Affero General Public License as published
6 | by the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU Affero General Public License for more details.
12 | You should have received a copy of the GNU Affero General Public License
13 | along with this program. If not, see .
14 | **********************************************************************************/
15 |
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 |
24 | #include "Peer.hpp"
25 | #include "PeersIterator.hpp"
26 |
27 | void ENet_Init();
28 |
29 | class ENetServer {
30 | protected:
31 | std::thread& getThread();
32 | void init(int port, int maxPeers);
33 | void execute();
34 | ENetServer();
35 | ENetServer(int port, int maxPeers = 256);
36 | ~ENetServer();
37 | private:
38 | static short id_generator;
39 | std::thread t;
40 | ENetHost * server;
41 | std::string id;
42 |
43 | virtual void OnConnect(Peer peer);
44 | virtual void OnRecievedPacket(Peer peer, uint8_t* data, uint32_t dataLen);
45 | virtual void OnDisconnect(Peer peer);
46 | virtual void OnPeriodicEvent();
47 |
48 | void run();
49 | public:
50 | PeersIterator getPeers();
51 | Peer getPeer(std::string id);
52 | void* getServerPtr();
53 | std::string getServerID();
54 | void setServerData(uint8_t* data);
55 | uint8_t* getServerData();
56 | };
57 |
--------------------------------------------------------------------------------
/src/main.cpp:
--------------------------------------------------------------------------------
1 | /**********************************************************************************
2 | New Growtopia Private Server
3 | Copyright (C) 2019 Growtopia Noobs
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Affero General Public License as published
6 | by the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU Affero General Public License for more details.
12 | You should have received a copy of the GNU Affero General Public License
13 | along with this program. If not, see .
14 | **********************************************************************************/
15 |
16 |
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | #include "ENetWrapper/ENetServer.hpp"
23 | #include "Server.hpp"
24 |
25 | void sigint(int) {
26 | std::cout << "Caught SIGINT signal! Stopping server..." << std::endl;
27 | enet_deinitialize();
28 | exit(0);
29 | }
30 |
31 | void sigterm(int) {
32 | std::cout << "Caught SIGTERM signal! Stopping server..." << std::endl;
33 | enet_deinitialize();
34 | exit(0);
35 | }
36 |
37 | // TODO: catch other signals too and execute stop event, before server is terminated
38 |
39 | int main () {
40 | std::cout << "GrowServer v0.0.1 starting..." << std::endl;
41 | try {
42 | ENet_Init();
43 | } catch (...) {
44 | std::cout << "An error occurred while initializing ENet." << std::endl;
45 | return EXIT_FAILURE;
46 | }
47 | registerEventPools();
48 | modulesLoader.execute();
49 | registerServerEvents();
50 | std::vector servers;
51 | for(int i=0; i<4; i++) {
52 | Server* s = new Server();
53 | servers.push_back(s);
54 | }
55 | int serverOffset = 0;
56 | const int serverBeginPort = 17091;
57 | for(Server* server: servers) {
58 | try {
59 | server->init(serverBeginPort + serverOffset, 128, "127.0.0.1");
60 | serverOffset++;
61 | } catch(...) {
62 | std::cout << "Error while initializing server " << serverOffset << ", port " << serverBeginPort + serverOffset << " is busy..." << std::endl;
63 | return 1;
64 | }
65 | }
66 | for(Server* server: servers) {
67 | server->execute();
68 | }
69 | signal(SIGINT, sigint);
70 | signal(SIGTERM, sigterm);
71 | while (true) {
72 | std::this_thread::sleep_for(std::chrono::seconds(10));
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/Server.hpp:
--------------------------------------------------------------------------------
1 | /**********************************************************************************
2 | New Growtopia Private Server
3 | Copyright (C) 2019 Growtopia Noobs
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Affero General Public License as published
6 | by the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU Affero General Public License for more details.
12 | You should have received a copy of the GNU Affero General Public License
13 | along with this program. If not, see .
14 | **********************************************************************************/
15 |
16 |
17 | #pragma once
18 |
19 | #define _X_ (this->events.currentDataPtr)
20 |
21 | #include