mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-08 03:37:45 +00:00
47 lines
922 B
C++
47 lines
922 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <unordered_map>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace Sapphire::World::Action
|
|
{
|
|
using StatusModifier = std::unordered_map< std::string, uint16_t >;
|
|
|
|
struct StatusEntry
|
|
{
|
|
uint16_t id;
|
|
StatusModifier modifiers;
|
|
};
|
|
|
|
struct StatusEffect
|
|
{
|
|
std::vector< StatusEntry > caster;
|
|
std::vector< StatusEntry > target;
|
|
};
|
|
|
|
struct ActionEntry
|
|
{
|
|
uint16_t potency;
|
|
uint16_t comboPotency;
|
|
uint16_t flankPotency;
|
|
uint16_t frontPotency;
|
|
uint16_t rearPotency;
|
|
uint16_t curePotency;
|
|
uint16_t restoreMPPercentage;
|
|
std::vector< uint32_t > nextCombo;
|
|
StatusEffect statuses;
|
|
};
|
|
|
|
class ActionLut
|
|
{
|
|
public:
|
|
using Lut = std::unordered_map< uint16_t, ActionEntry >;
|
|
|
|
static bool validEntryExists( uint16_t actionId );
|
|
static const ActionEntry& getEntry( uint16_t actionId );
|
|
|
|
static Lut m_actionLut;
|
|
};
|
|
}
|