mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-14 02:10:06 +00:00
The great re-#include
Was getting frustrated by the inconsistency in our include statements, which were causing me problems. As a result, I went through and manually re-organized every include statement in non-core files. I'm just gonna copy my rant from Discord: FOR HEADER FILES (.hpp): - everything you use IN THE HEADER must be EXPLICITLY INCLUDED with the exception of things that fall under Core.hpp - you may NOT include ANYTHING ELSE FOR SOURCE FILES (.cpp): - you can #include whatever you want as long as the partner header is included first - anything that gets included by another include is fair game - redundant includes are ok because they'll be harmless AS LONG AS our header files stay lean. the point of this is NOT to optimize the number of includes used all around or make things more efficient necessarily. it's to improve readability & coherence and make it easier to avoid cyclical issues
This commit is contained in:
parent
13c009b448
commit
d32827b692
@ -1,10 +1,7 @@
|
|||||||
#include "Abilities.hpp"
|
#include "Abilities.hpp"
|
||||||
#include "PlayerManager.hpp"
|
|
||||||
#include "Player.hpp"
|
|
||||||
#include "NPCManager.hpp"
|
#include "NPCManager.hpp"
|
||||||
#include "Nanos.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "Groups.hpp"
|
|
||||||
#include "Eggs.hpp"
|
|
||||||
|
|
||||||
std::map<int32_t, SkillData> Abilities::SkillTable;
|
std::map<int32_t, SkillData> Abilities::SkillTable;
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "Entities.hpp"
|
||||||
#include "Combat.hpp"
|
|
||||||
|
#include <map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
enum class SkillEffectTarget {
|
enum class SkillEffectTarget {
|
||||||
POINT = 1,
|
POINT = 1,
|
||||||
|
@ -1,15 +1,10 @@
|
|||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
#include "Buddies.hpp"
|
#include "Buddies.hpp"
|
||||||
#include "PlayerManager.hpp"
|
|
||||||
#include "Buddies.hpp"
|
|
||||||
#include "db/Database.hpp"
|
|
||||||
#include "Items.hpp"
|
|
||||||
#include "db/Database.hpp"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include "db/Database.hpp"
|
||||||
#include <chrono>
|
#include "servers/CNShardServer.hpp"
|
||||||
#include <algorithm>
|
|
||||||
#include <thread>
|
#include "Player.hpp"
|
||||||
|
#include "PlayerManager.hpp"
|
||||||
|
|
||||||
using namespace Buddies;
|
using namespace Buddies;
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Player.hpp"
|
|
||||||
#include "core/Core.hpp"
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
|
|
||||||
namespace Buddies {
|
namespace Buddies {
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
#include "BuiltinCommands.hpp"
|
#include "BuiltinCommands.hpp"
|
||||||
|
|
||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
|
#include "Player.hpp"
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "Chat.hpp"
|
|
||||||
#include "Items.hpp"
|
#include "Items.hpp"
|
||||||
#include "Missions.hpp"
|
#include "Missions.hpp"
|
||||||
|
#include "Chat.hpp"
|
||||||
#include "Nanos.hpp"
|
#include "Nanos.hpp"
|
||||||
#include "Rand.hpp"
|
|
||||||
|
|
||||||
// helper function, not a packet handler
|
// helper function, not a packet handler
|
||||||
void BuiltinCommands::setSpecialState(CNSocket* sock, CNPacketData* data) {
|
void BuiltinCommands::setSpecialState(CNSocket* sock, CNPacketData* data) {
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#include "Chat.hpp"
|
#include "Chat.hpp"
|
||||||
|
|
||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
|
#include "Player.hpp"
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "Groups.hpp"
|
|
||||||
#include "CustomCommands.hpp"
|
#include "CustomCommands.hpp"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
#define CMD_PREFIX '/'
|
#define CMD_PREFIX '/'
|
||||||
|
|
||||||
#include "servers/CNShardServer.hpp"
|
#include "core/Core.hpp"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Chat {
|
namespace Chat {
|
||||||
extern std::vector<std::string> dump;
|
extern std::vector<std::string> dump;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "Chunking.hpp"
|
#include "Chunking.hpp"
|
||||||
#include "PlayerManager.hpp"
|
|
||||||
|
#include "MobAI.hpp"
|
||||||
#include "NPCManager.hpp"
|
#include "NPCManager.hpp"
|
||||||
#include "settings.hpp"
|
|
||||||
#include "Combat.hpp"
|
#include <assert.h>
|
||||||
#include "Eggs.hpp"
|
|
||||||
|
|
||||||
using namespace Chunking;
|
using namespace Chunking;
|
||||||
|
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "Entities.hpp"
|
||||||
|
|
||||||
#include <utility>
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <tuple>
|
#include <vector>
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
struct EntityRef;
|
struct EntityRef;
|
||||||
|
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
#include "Combat.hpp"
|
#include "Combat.hpp"
|
||||||
#include "PlayerManager.hpp"
|
|
||||||
#include "Nanos.hpp"
|
#include "servers/CNShardServer.hpp"
|
||||||
#include "NPCManager.hpp"
|
|
||||||
#include "Items.hpp"
|
|
||||||
#include "Missions.hpp"
|
|
||||||
#include "Groups.hpp"
|
|
||||||
#include "Transport.hpp"
|
|
||||||
#include "Racing.hpp"
|
|
||||||
#include "Abilities.hpp"
|
|
||||||
#include "Rand.hpp"
|
#include "Rand.hpp"
|
||||||
|
#include "Player.hpp"
|
||||||
|
#include "PlayerManager.hpp"
|
||||||
|
#include "NPCManager.hpp"
|
||||||
|
#include "Nanos.hpp"
|
||||||
|
#include "Abilities.hpp"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "Player.hpp"
|
||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
#include "MobAI.hpp"
|
#include "MobAI.hpp"
|
||||||
|
|
||||||
#include "JSON.hpp"
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <unordered_map>
|
#include <vector>
|
||||||
#include <queue>
|
|
||||||
|
|
||||||
struct Bullet {
|
struct Bullet {
|
||||||
int pointDamage;
|
int pointDamage;
|
||||||
@ -17,8 +13,6 @@ struct Bullet {
|
|||||||
int bulletType;
|
int bulletType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace Combat {
|
namespace Combat {
|
||||||
extern std::map<int32_t, std::map<int8_t, Bullet>> Bullets;
|
extern std::map<int32_t, std::map<int8_t, Bullet>> Bullets;
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#include "CustomCommands.hpp"
|
#include "CustomCommands.hpp"
|
||||||
#include "Chat.hpp"
|
|
||||||
|
#include "db/Database.hpp"
|
||||||
|
|
||||||
|
#include "Player.hpp"
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
|
#include "Chat.hpp"
|
||||||
#include "TableData.hpp"
|
#include "TableData.hpp"
|
||||||
#include "NPCManager.hpp"
|
#include "NPCManager.hpp"
|
||||||
#include "Eggs.hpp"
|
|
||||||
#include "MobAI.hpp"
|
#include "MobAI.hpp"
|
||||||
#include "Items.hpp"
|
|
||||||
#include "db/Database.hpp"
|
|
||||||
#include "Transport.hpp"
|
|
||||||
#include "Missions.hpp"
|
#include "Missions.hpp"
|
||||||
|
#include "Eggs.hpp"
|
||||||
|
#include "Items.hpp"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iterator>
|
|
||||||
#include <math.h>
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
typedef void (*CommandHandler)(std::string fullString, std::vector<std::string>& args, CNSocket* sock);
|
typedef void (*CommandHandler)(std::string fullString, std::vector<std::string>& args, CNSocket* sock);
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace CustomCommands {
|
namespace CustomCommands {
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
|
11
src/Eggs.cpp
11
src/Eggs.cpp
@ -1,10 +1,13 @@
|
|||||||
#include "core/Core.hpp"
|
|
||||||
#include "Eggs.hpp"
|
#include "Eggs.hpp"
|
||||||
|
|
||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
|
#include "Player.hpp"
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "Items.hpp"
|
|
||||||
#include "Nanos.hpp"
|
|
||||||
#include "Abilities.hpp"
|
#include "Abilities.hpp"
|
||||||
#include "Groups.hpp"
|
#include "NPCManager.hpp"
|
||||||
|
#include "Entities.hpp"
|
||||||
|
#include "Items.hpp"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
#include "Entities.hpp"
|
|
||||||
|
|
||||||
struct EggType {
|
struct EggType {
|
||||||
int dropCrateId;
|
int dropCrateId;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "Email.hpp"
|
#include "Email.hpp"
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
|
#include "db/Database.hpp"
|
||||||
#include "servers/CNShardServer.hpp"
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
#include "db/Database.hpp"
|
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "Items.hpp"
|
#include "Items.hpp"
|
||||||
#include "Chat.hpp"
|
#include "Chat.hpp"
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
#include "core/Core.hpp"
|
|
||||||
#include "Entities.hpp"
|
#include "Entities.hpp"
|
||||||
#include "Chunking.hpp"
|
|
||||||
#include "PlayerManager.hpp"
|
|
||||||
#include "NPCManager.hpp"
|
|
||||||
#include "Eggs.hpp"
|
|
||||||
#include "MobAI.hpp"
|
|
||||||
|
|
||||||
#include <type_traits>
|
#include "NPCManager.hpp"
|
||||||
|
#include "PlayerManager.hpp"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
static_assert(std::is_standard_layout<EntityRef>::value);
|
static_assert(std::is_standard_layout<EntityRef>::value);
|
||||||
static_assert(std::is_trivially_copyable<EntityRef>::value);
|
static_assert(std::is_trivially_copyable<EntityRef>::value);
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
#include "Chunking.hpp"
|
#include "Chunking.hpp"
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
enum EntityKind {
|
enum EntityKind {
|
||||||
INVALID,
|
INVALID,
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
#include "PlayerManager.hpp"
|
|
||||||
#include "Groups.hpp"
|
#include "Groups.hpp"
|
||||||
#include "Nanos.hpp"
|
|
||||||
#include "Abilities.hpp"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include "servers/CNShardServer.hpp"
|
||||||
#include <chrono>
|
|
||||||
#include <algorithm>
|
#include "Player.hpp"
|
||||||
#include <thread>
|
#include "PlayerManager.hpp"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: Variadic response packets that list group members are technically
|
* NOTE: Variadic response packets that list group members are technically
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
|
||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
#include "Entities.hpp"
|
#include "Entities.hpp"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
/* forward declaration(s) */
|
||||||
struct Player;
|
struct Player;
|
||||||
enum EntityKind;
|
|
||||||
|
|
||||||
struct Group {
|
struct Group {
|
||||||
std::vector<EntityRef> members;
|
std::vector<EntityRef> members;
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
#include "Items.hpp"
|
#include "Items.hpp"
|
||||||
|
|
||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
|
#include "Player.hpp"
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "Nanos.hpp"
|
#include "Nanos.hpp"
|
||||||
#include "NPCManager.hpp"
|
|
||||||
#include "Player.hpp"
|
|
||||||
#include "Abilities.hpp"
|
#include "Abilities.hpp"
|
||||||
#include "Missions.hpp"
|
|
||||||
#include "Eggs.hpp"
|
#include "Eggs.hpp"
|
||||||
#include "Rand.hpp"
|
#include "MobAI.hpp"
|
||||||
|
#include "Missions.hpp"
|
||||||
|
|
||||||
#include <string.h> // for memset()
|
#include <string.h> // for memset()
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <numeric>
|
||||||
|
|
||||||
using namespace Items;
|
using namespace Items;
|
||||||
|
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "servers/CNShardServer.hpp"
|
#include "core/Core.hpp"
|
||||||
|
|
||||||
#include "Player.hpp"
|
#include "Player.hpp"
|
||||||
#include "MobAI.hpp"
|
|
||||||
#include "Rand.hpp"
|
#include "Rand.hpp"
|
||||||
|
#include "MobAI.hpp"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
struct CrocPotEntry {
|
struct CrocPotEntry {
|
||||||
int multStats, multLooks;
|
int multStats, multLooks;
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
#include "Missions.hpp"
|
#include "Missions.hpp"
|
||||||
#include "PlayerManager.hpp"
|
|
||||||
#include "Nanos.hpp"
|
|
||||||
#include "Items.hpp"
|
|
||||||
#include "Transport.hpp"
|
|
||||||
|
|
||||||
#include "string.h"
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
|
#include "PlayerManager.hpp"
|
||||||
|
#include "Items.hpp"
|
||||||
|
#include "Nanos.hpp"
|
||||||
|
|
||||||
using namespace Missions;
|
using namespace Missions;
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "servers/CNShardServer.hpp"
|
#include "core/Core.hpp"
|
||||||
|
#include "JSON.hpp"
|
||||||
|
|
||||||
#include "Player.hpp"
|
#include "Player.hpp"
|
||||||
|
|
||||||
#include "JSON.hpp"
|
#include <map>
|
||||||
|
|
||||||
struct Reward {
|
struct Reward {
|
||||||
int32_t id;
|
int32_t id;
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
#include "MobAI.hpp"
|
#include "MobAI.hpp"
|
||||||
#include "Player.hpp"
|
|
||||||
|
#include "Chunking.hpp"
|
||||||
|
#include "NPCManager.hpp"
|
||||||
|
#include "Entities.hpp"
|
||||||
|
#include "PlayerManager.hpp"
|
||||||
#include "Racing.hpp"
|
#include "Racing.hpp"
|
||||||
#include "Transport.hpp"
|
|
||||||
#include "Nanos.hpp"
|
#include "Nanos.hpp"
|
||||||
#include "Combat.hpp"
|
|
||||||
#include "Abilities.hpp"
|
#include "Abilities.hpp"
|
||||||
#include "Rand.hpp"
|
#include "Combat.hpp"
|
||||||
#include "Items.hpp"
|
#include "Items.hpp"
|
||||||
#include "Missions.hpp"
|
#include "Missions.hpp"
|
||||||
|
#include "Rand.hpp"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
#include "NPCManager.hpp"
|
#include "JSON.hpp"
|
||||||
|
|
||||||
#include "Entities.hpp"
|
#include "Entities.hpp"
|
||||||
|
|
||||||
/* kill me */
|
#include <unordered_map>
|
||||||
struct Mob;
|
#include <string>
|
||||||
|
|
||||||
namespace MobAI {
|
namespace MobAI {
|
||||||
void deadStep(CombatNPC* self, time_t currTime);
|
void deadStep(CombatNPC* self, time_t currTime);
|
||||||
void combatStep(CombatNPC* self, time_t currTime);
|
void combatStep(CombatNPC* self, time_t currTime);
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
#include "NPCManager.hpp"
|
#include "NPCManager.hpp"
|
||||||
|
|
||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
|
#include "PlayerManager.hpp"
|
||||||
#include "Items.hpp"
|
#include "Items.hpp"
|
||||||
#include "settings.hpp"
|
#include "settings.hpp"
|
||||||
#include "Combat.hpp"
|
#include "Combat.hpp"
|
||||||
@ -20,8 +24,6 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "JSON.hpp"
|
|
||||||
|
|
||||||
using namespace NPCManager;
|
using namespace NPCManager;
|
||||||
|
|
||||||
std::unordered_map<int32_t, BaseNPC*> NPCManager::NPCs;
|
std::unordered_map<int32_t, BaseNPC*> NPCManager::NPCs;
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
#include "PlayerManager.hpp"
|
|
||||||
#include "Transport.hpp"
|
|
||||||
|
|
||||||
#include "JSON.hpp"
|
#include "JSON.hpp"
|
||||||
|
|
||||||
|
#include "Transport.hpp"
|
||||||
|
#include "Chunking.hpp"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
#define RESURRECT_HEIGHT 400
|
#define RESURRECT_HEIGHT 400
|
||||||
|
|
||||||
@ -28,8 +29,6 @@ struct NPCEvent {
|
|||||||
: npcType(t), trigger(tr), handler(hndlr) {}
|
: npcType(t), trigger(tr), handler(hndlr) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WarpLocation;
|
|
||||||
|
|
||||||
namespace NPCManager {
|
namespace NPCManager {
|
||||||
extern std::unordered_map<int32_t, BaseNPC*> NPCs;
|
extern std::unordered_map<int32_t, BaseNPC*> NPCs;
|
||||||
extern std::map<int32_t, WarpLocation> Warps;
|
extern std::map<int32_t, WarpLocation> Warps;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
#include "Nanos.hpp"
|
#include "Nanos.hpp"
|
||||||
|
|
||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "NPCManager.hpp"
|
|
||||||
#include "Combat.hpp"
|
|
||||||
#include "Missions.hpp"
|
#include "Missions.hpp"
|
||||||
#include "Groups.hpp"
|
|
||||||
#include "Abilities.hpp"
|
#include "Abilities.hpp"
|
||||||
|
#include "NPCManager.hpp"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <set>
|
#include "core/Core.hpp"
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "Player.hpp"
|
#include "Player.hpp"
|
||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
struct NanoData {
|
struct NanoData {
|
||||||
int style;
|
int style;
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
#include "Chunking.hpp"
|
|
||||||
#include "Entities.hpp"
|
#include "Entities.hpp"
|
||||||
#include "Groups.hpp"
|
#include "Groups.hpp"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#define ACTIVE_MISSION_COUNT 6
|
#define ACTIVE_MISSION_COUNT 6
|
||||||
|
|
||||||
#define PC_MAXHEALTH(level) (925 + 75 * (level))
|
#define PC_MAXHEALTH(level) (925 + 75 * (level))
|
||||||
|
@ -1,25 +1,20 @@
|
|||||||
#include "core/Core.hpp"
|
#include "PlayerManager.hpp"
|
||||||
|
|
||||||
|
#include "db/Database.hpp"
|
||||||
#include "core/CNShared.hpp"
|
#include "core/CNShared.hpp"
|
||||||
#include "servers/CNShardServer.hpp"
|
#include "servers/CNShardServer.hpp"
|
||||||
#include "db/Database.hpp"
|
|
||||||
#include "PlayerManager.hpp"
|
|
||||||
#include "NPCManager.hpp"
|
#include "NPCManager.hpp"
|
||||||
#include "Missions.hpp"
|
|
||||||
#include "Items.hpp"
|
|
||||||
#include "Nanos.hpp"
|
|
||||||
#include "Groups.hpp"
|
|
||||||
#include "Chat.hpp"
|
|
||||||
#include "Buddies.hpp"
|
|
||||||
#include "Combat.hpp"
|
#include "Combat.hpp"
|
||||||
#include "Racing.hpp"
|
#include "Racing.hpp"
|
||||||
#include "BuiltinCommands.hpp"
|
|
||||||
#include "Abilities.hpp"
|
|
||||||
#include "Eggs.hpp"
|
#include "Eggs.hpp"
|
||||||
|
#include "Missions.hpp"
|
||||||
#include "settings.hpp"
|
#include "Chat.hpp"
|
||||||
|
#include "Items.hpp"
|
||||||
|
#include "Buddies.hpp"
|
||||||
|
#include "BuiltinCommands.hpp"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Player.hpp"
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
#include "Chunking.hpp"
|
|
||||||
|
|
||||||
#include <utility>
|
#include "Player.hpp"
|
||||||
|
#include "Chunking.hpp"
|
||||||
|
#include "Transport.hpp"
|
||||||
|
#include "Entities.hpp"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
struct WarpLocation;
|
|
||||||
|
|
||||||
namespace PlayerManager {
|
namespace PlayerManager {
|
||||||
extern std::map<CNSocket*, Player*> players;
|
extern std::map<CNSocket*, Player*> players;
|
||||||
void init();
|
void init();
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#include "PlayerMovement.hpp"
|
#include "PlayerMovement.hpp"
|
||||||
|
|
||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "TableData.hpp"
|
#include "TableData.hpp"
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
#include "Racing.hpp"
|
#include "Racing.hpp"
|
||||||
|
|
||||||
|
#include "db/Database.hpp"
|
||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
|
#include "NPCManager.hpp"
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "Missions.hpp"
|
#include "Missions.hpp"
|
||||||
#include "Items.hpp"
|
#include "Items.hpp"
|
||||||
#include "db/Database.hpp"
|
|
||||||
#include "NPCManager.hpp"
|
|
||||||
|
|
||||||
using namespace Racing;
|
using namespace Racing;
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <set>
|
#include "core/Core.hpp"
|
||||||
|
|
||||||
#include "servers/CNShardServer.hpp"
|
#include <map>
|
||||||
|
#include <vector>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
struct EPInfo {
|
struct EPInfo {
|
||||||
int zoneX, zoneY, EPID, maxScore, maxTime;
|
int zoneX, zoneY, EPID, maxScore, maxTime;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Rand {
|
namespace Rand {
|
||||||
extern std::unique_ptr<std::mt19937> generator;
|
extern std::unique_ptr<std::mt19937> generator;
|
||||||
|
@ -1,18 +1,14 @@
|
|||||||
#include "TableData.hpp"
|
#include "TableData.hpp"
|
||||||
|
|
||||||
#include "NPCManager.hpp"
|
#include "NPCManager.hpp"
|
||||||
#include "Transport.hpp"
|
|
||||||
#include "Items.hpp"
|
|
||||||
#include "settings.hpp"
|
|
||||||
#include "Missions.hpp"
|
#include "Missions.hpp"
|
||||||
#include "Chunking.hpp"
|
#include "Items.hpp"
|
||||||
#include "Nanos.hpp"
|
|
||||||
#include "Racing.hpp"
|
|
||||||
#include "Vendors.hpp"
|
#include "Vendors.hpp"
|
||||||
|
#include "Racing.hpp"
|
||||||
|
#include "Nanos.hpp"
|
||||||
#include "Abilities.hpp"
|
#include "Abilities.hpp"
|
||||||
#include "Eggs.hpp"
|
#include "Eggs.hpp"
|
||||||
|
|
||||||
#include "JSON.hpp"
|
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <map>
|
#include "JSON.hpp"
|
||||||
|
|
||||||
#include "NPCManager.hpp"
|
#include "Entities.hpp"
|
||||||
|
#include "Transport.hpp"
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
// these are added to the NPC's static key to avoid collisions
|
// these are added to the NPC's static key to avoid collisions
|
||||||
const int NPC_ID_OFFSET = 1;
|
const int NPC_ID_OFFSET = 1;
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#include "Trading.hpp"
|
#include "Trading.hpp"
|
||||||
|
|
||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "db/Database.hpp"
|
#include "db/Database.hpp"
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Items.hpp"
|
|
||||||
|
|
||||||
namespace Trading {
|
namespace Trading {
|
||||||
void init();
|
void init();
|
||||||
}
|
}
|
@ -1,9 +1,12 @@
|
|||||||
|
#include "Transport.hpp"
|
||||||
|
|
||||||
#include "servers/CNShardServer.hpp"
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "Nanos.hpp"
|
#include "Nanos.hpp"
|
||||||
#include "Transport.hpp"
|
|
||||||
#include "TableData.hpp"
|
#include "TableData.hpp"
|
||||||
#include "Combat.hpp"
|
#include "Entities.hpp"
|
||||||
|
#include "NPCManager.hpp"
|
||||||
#include "MobAI.hpp"
|
#include "MobAI.hpp"
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "servers/CNShardServer.hpp"
|
#include "core/Core.hpp"
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include <map>
|
||||||
|
#include <vector>
|
||||||
|
#include <queue>
|
||||||
|
|
||||||
const int SLIDER_SPEED = 1200;
|
const int SLIDER_SPEED = 1200;
|
||||||
const int SLIDER_STOP_TICKS = 16;
|
const int SLIDER_STOP_TICKS = 16;
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
#include "Vendors.hpp"
|
#include "Vendors.hpp"
|
||||||
|
|
||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
|
#include "PlayerManager.hpp"
|
||||||
|
#include "Items.hpp"
|
||||||
#include "Rand.hpp"
|
#include "Rand.hpp"
|
||||||
|
|
||||||
// 7 days
|
// 7 days
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
|
|
||||||
#include "Items.hpp"
|
#include <vector>
|
||||||
#include "PlayerManager.hpp"
|
#include <map>
|
||||||
|
|
||||||
struct VendorListing {
|
struct VendorListing {
|
||||||
int sort, type, id;
|
int sort, type, id;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
// yes this is ugly, but this is needed to zero out the memory so we don't have random stackdata in our structs.
|
// yes this is ugly, but this is needed to zero out the memory so we don't have random stackdata in our structs.
|
||||||
#define INITSTRUCT(T, x) T x; \
|
#define INITSTRUCT(T, x) T x; \
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
#include "servers/CNLoginServer.hpp"
|
#include "servers/CNLoginServer.hpp"
|
||||||
|
|
||||||
#include "core/CNShared.hpp"
|
#include "core/CNShared.hpp"
|
||||||
#include "db/Database.hpp"
|
#include "db/Database.hpp"
|
||||||
#include "PlayerManager.hpp"
|
|
||||||
#include "Items.hpp"
|
|
||||||
#include <regex>
|
|
||||||
#include "bcrypt/BCrypt.hpp"
|
#include "bcrypt/BCrypt.hpp"
|
||||||
|
|
||||||
|
#include "PlayerManager.hpp"
|
||||||
|
#include "Items.hpp"
|
||||||
#include "settings.hpp"
|
#include "settings.hpp"
|
||||||
|
|
||||||
|
#include <regex>
|
||||||
|
|
||||||
std::map<CNSocket*, CNLoginData> CNLoginServer::loginSessions;
|
std::map<CNSocket*, CNLoginData> CNLoginServer::loginSessions;
|
||||||
|
|
||||||
CNLoginServer::CNLoginServer(uint16_t p) {
|
CNLoginServer::CNLoginServer(uint16_t p) {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
|
|
||||||
#include "Player.hpp"
|
#include "Player.hpp"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
|
#include "core/CNShared.hpp"
|
||||||
#include "db/Database.hpp"
|
#include "db/Database.hpp"
|
||||||
#include "servers/Monitor.hpp"
|
#include "servers/Monitor.hpp"
|
||||||
#include "servers/CNShardServer.hpp"
|
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "MobAI.hpp"
|
#include "MobAI.hpp"
|
||||||
#include "core/CNShared.hpp"
|
|
||||||
#include "settings.hpp"
|
#include "settings.hpp"
|
||||||
#include "TableData.hpp" // for flush()
|
#include "TableData.hpp" // for flush()
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <list>
|
||||||
|
|
||||||
#define REGISTER_SHARD_PACKET(pactype, handlr) CNShardServer::ShardPackets[pactype] = handlr;
|
#define REGISTER_SHARD_PACKET(pactype, handlr) CNShardServer::ShardPackets[pactype] = handlr;
|
||||||
#define REGISTER_SHARD_TIMER(handlr, delta) CNShardServer::Timers.push_back(TimerEvent(handlr, delta));
|
#define REGISTER_SHARD_TIMER(handlr, delta) CNShardServer::Timers.push_back(TimerEvent(handlr, delta));
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
#include "servers/Monitor.hpp"
|
||||||
|
|
||||||
#include "servers/CNShardServer.hpp"
|
#include "servers/CNShardServer.hpp"
|
||||||
|
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
#include "Chat.hpp"
|
#include "Chat.hpp"
|
||||||
#include "Email.hpp"
|
#include "Email.hpp"
|
||||||
#include "servers/Monitor.hpp"
|
|
||||||
#include "settings.hpp"
|
#include "settings.hpp"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
#include "core/Core.hpp"
|
#include "core/Core.hpp"
|
||||||
|
|
||||||
#include <list>
|
|
||||||
#include <mutex>
|
|
||||||
|
|
||||||
namespace Monitor {
|
namespace Monitor {
|
||||||
SOCKET init();
|
SOCKET init();
|
||||||
bool acceptConnection(SOCKET, uint16_t);
|
bool acceptConnection(SOCKET, uint16_t);
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#include <iostream>
|
|
||||||
#include "settings.hpp"
|
#include "settings.hpp"
|
||||||
|
|
||||||
|
#include "core/CNStructs.hpp" // so we get the ACADEMY definition
|
||||||
#include "INIReader.hpp"
|
#include "INIReader.hpp"
|
||||||
|
|
||||||
// so we get the ACADEMY definition
|
#include <iostream>
|
||||||
#include "core/CNStructs.hpp"
|
|
||||||
|
|
||||||
// defaults :)
|
// defaults :)
|
||||||
int settings::VERBOSITY = 1;
|
int settings::VERBOSITY = 1;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace settings {
|
namespace settings {
|
||||||
extern int VERBOSITY;
|
extern int VERBOSITY;
|
||||||
extern bool SANDBOX;
|
extern bool SANDBOX;
|
||||||
|
2
vendor/JSON.hpp
vendored
2
vendor/JSON.hpp
vendored
@ -27,6 +27,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#ifndef INCLUDE_NLOHMANN_JSON_HPP_
|
#ifndef INCLUDE_NLOHMANN_JSON_HPP_
|
||||||
#define INCLUDE_NLOHMANN_JSON_HPP_
|
#define INCLUDE_NLOHMANN_JSON_HPP_
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user