added basic player buffs implementation

This commit is contained in:
kamilprzyb
2020-10-22 10:23:12 +02:00
committed by Gent
parent 2744ed64e3
commit f2ff4c7f4d
5 changed files with 79 additions and 3 deletions

View File

@@ -19,7 +19,8 @@ struct WarpLocation {
namespace NPCManager {
extern std::map<int32_t, BaseNPC*> NPCs;
extern std::map<int32_t, WarpLocation> Warps;
extern std::vector<WarpLocation> RespawnPoints;
extern std::vector<WarpLocation> RespawnPoints;
extern std::map<std::pair<int32_t, int32_t>, time_t> EggBuffs;
extern nlohmann::json NPCData;
extern int32_t nextId;
void init();
@@ -50,4 +51,7 @@ namespace NPCManager {
void handleWarp(CNSocket* sock, int32_t warpId);
BaseNPC* getNearestNPC(std::vector<Chunk*> chunks, int X, int Y, int Z);
/// returns -1 on fail
int eggBuffPlayer(CNSocket* sock, int skillId, int duration);
}