mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-10-13 17:40:06 +00:00
Refactored passive nano powers.
This commit is contained in:
@@ -5,26 +5,16 @@
|
||||
|
||||
#include "CNShardServer.hpp"
|
||||
|
||||
enum class SkillType {
|
||||
DAMAGE = 1,
|
||||
HEAL = 2,
|
||||
DRAIN = 3,
|
||||
SLEEP = 4,
|
||||
SNARE = 5,
|
||||
STUN = 8,
|
||||
LEECH = 30, // ...what?
|
||||
};
|
||||
|
||||
typedef void (*ActivePowerHandler)(CNSocket*, CNPacketData*, int16_t, int16_t, SkillType, int32_t, int32_t);
|
||||
typedef void (*ActivePowerHandler)(CNSocket*, CNPacketData*, int16_t, int16_t, int16_t, int32_t, int32_t);
|
||||
|
||||
struct ActivePower {
|
||||
std::set<int> powers;
|
||||
ActivePowerHandler handler;
|
||||
SkillType eSkillType;
|
||||
int16_t eSkillType;
|
||||
int32_t flag;
|
||||
int32_t amount;
|
||||
|
||||
ActivePower(std::set<int> p, ActivePowerHandler h, SkillType t, int32_t f, int32_t a) : powers(p), handler(h), eSkillType(t), flag(f), amount(a) {}
|
||||
ActivePower(std::set<int> p, ActivePowerHandler h, int16_t t, int32_t f, int32_t a) : powers(p), handler(h), eSkillType(t), flag(f), amount(a) {}
|
||||
|
||||
void handle(CNSocket *sock, CNPacketData *data, int16_t nanoId, int16_t skillId) {
|
||||
if (handler == nullptr)
|
||||
@@ -34,8 +24,19 @@ struct ActivePower {
|
||||
}
|
||||
};
|
||||
|
||||
struct PassivePower {
|
||||
std::set<int> powers;
|
||||
int16_t eSkillType;
|
||||
int32_t iCBFlag;
|
||||
int16_t eCharStatusTimeBuffID;
|
||||
int16_t iValue;
|
||||
|
||||
PassivePower(std::set<int> p, int16_t t, int32_t f, int16_t b, int16_t a) : powers(p), eSkillType(t), iCBFlag(f), eCharStatusTimeBuffID(b), iValue(a) {}
|
||||
};
|
||||
|
||||
namespace NanoManager {
|
||||
extern std::vector<ActivePower> ActivePowers;
|
||||
extern std::vector<PassivePower> PassivePowers;
|
||||
void init();
|
||||
|
||||
void nanoSummonHandler(CNSocket* sock, CNPacketData* data);
|
||||
|
Reference in New Issue
Block a user