mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-07 11:17:46 +00:00
Definitions for Action type and aspect;
This commit is contained in:
parent
b8bf3fc8a9
commit
a9e3f2fc09
5 changed files with 71 additions and 38 deletions
|
@ -324,28 +324,33 @@ bool Core::Data::ExdData::loadActionInfo()
|
|||
continue;
|
||||
}
|
||||
|
||||
std::string name = getField< std::string >( fields, 0 );
|
||||
uint8_t category = getField< uint8_t >( fields, 3 );
|
||||
std::string name = getField< std::string >( fields, 0 ); // 0
|
||||
uint8_t category = getField< uint8_t >( fields, 3 ); // 3
|
||||
|
||||
int8_t class_job = getField< int8_t >( fields, 10 );//9
|
||||
uint8_t unlock_level = getField< uint8_t >( fields, 11 );//10
|
||||
int8_t range = getField< int8_t >( fields, 13 );//11
|
||||
bool can_target_self = getField< bool >( fields, 14 );//12
|
||||
bool can_target_party = getField< bool>( fields, 15 );//13
|
||||
bool can_target_friendly = getField< bool >( fields, 16 );//14
|
||||
bool can_target_enemy = getField< bool >( fields, 17 );//15
|
||||
int8_t class_job = getField< int8_t >( fields, 10 ); // 10
|
||||
uint8_t unlock_level = getField< uint8_t >( fields, 11 ); // 11
|
||||
int8_t range = getField< int8_t >( fields, 13 ); // 13
|
||||
bool can_target_self = getField< bool >( fields, 14 ); // 14
|
||||
bool can_target_party = getField< bool>( fields, 15 ); // 15
|
||||
bool can_target_friendly = getField< bool >( fields, 16 ); // 16
|
||||
bool can_target_enemy = getField< bool >( fields, 17 ); // 17
|
||||
|
||||
bool is_aoe = getField< bool >( fields, 20 );//18
|
||||
bool is_aoe = getField< bool >( fields, 20 ); // 20
|
||||
// Column 23: Seems to be related to raising skills (Raise, Resurrection, Reanimate)
|
||||
bool can_target_ko = getField< bool >( fields, 24 ); // 24
|
||||
|
||||
bool can_target_ko = getField< bool >( fields, 24 );//22
|
||||
uint8_t aoe_type = getField< uint8_t >( fields, 26 ); // 26
|
||||
uint8_t radius = getField< uint8_t >( fields, 27 ); // 27
|
||||
|
||||
uint8_t aoe_type = getField< uint8_t >( fields, 26 );//24
|
||||
uint8_t radius = getField< uint8_t >( fields, 27 );//25
|
||||
uint8_t points_type = getField< uint8_t >( fields, 30 ); // 30
|
||||
uint16_t points_cost = getField< uint16_t >( fields, 31 ); // 31
|
||||
|
||||
uint8_t points_type = getField< uint8_t >( fields, 30 );//28
|
||||
uint16_t points_cost = getField< uint16_t >( fields, 31 );//29
|
||||
uint32_t instantval = getField< bool >( fields, 35 ); // 35
|
||||
uint16_t cast_time = getField< uint16_t >(fields, 36); // 36
|
||||
uint16_t recast_time = getField< uint16_t >(fields, 37); // 37
|
||||
|
||||
uint32_t instantval = getField< bool >( fields, 35 );
|
||||
uint16_t type = getField< uint16_t >(fields, 39); // 39: Action type
|
||||
uint16_t aspect = getField< uint16_t >(fields, 40); // 40: Action aspect
|
||||
|
||||
uint8_t typeshift = 0x6;
|
||||
uint8_t mask = 1 << typeshift;
|
||||
|
@ -353,8 +358,7 @@ bool Core::Data::ExdData::loadActionInfo()
|
|||
bool final = ( instantval & mask ) == mask;
|
||||
bool is_instant = final;
|
||||
|
||||
uint16_t cast_time = getField< uint16_t >( fields, 36 );
|
||||
uint16_t recast_time = getField< uint16_t >( fields, 37 );
|
||||
|
||||
|
||||
info.id = id;
|
||||
info.name = name;
|
||||
|
|
|
@ -222,30 +222,33 @@ namespace Core {
|
|||
struct ActionInfo
|
||||
{
|
||||
uint32_t id;
|
||||
std::string name; //0
|
||||
uint16_t category;//3
|
||||
std::string name; // 0
|
||||
uint16_t category; // 3
|
||||
|
||||
int8_t class_job;//9
|
||||
uint8_t unlock_level;//10
|
||||
int8_t range;//11
|
||||
bool can_target_self;//12
|
||||
bool can_target_party;//13
|
||||
bool can_target_friendly;//14
|
||||
bool can_target_enemy;//15
|
||||
int8_t class_job; // 10
|
||||
uint8_t unlock_level; // 11
|
||||
int8_t range; // 13
|
||||
bool can_target_self; // 14
|
||||
bool can_target_party; // 15
|
||||
bool can_target_friendly; // 16
|
||||
bool can_target_enemy; // 17
|
||||
|
||||
bool is_aoe;//18
|
||||
bool is_aoe; // 20
|
||||
|
||||
bool can_target_ko;//22
|
||||
bool can_target_ko; // 24
|
||||
|
||||
uint8_t aoe_type;//24
|
||||
uint8_t radius;//25
|
||||
uint8_t aoe_type; // 26
|
||||
uint8_t radius; // 27
|
||||
|
||||
uint8_t points_type;//28
|
||||
uint16_t points_cost;//29
|
||||
uint8_t points_type; // 30
|
||||
uint16_t points_cost; // 31
|
||||
|
||||
bool is_instant;//33
|
||||
uint32_t cast_time;//34
|
||||
uint32_t recast_time;//35
|
||||
bool is_instant; // 35
|
||||
uint32_t cast_time; // 36
|
||||
uint32_t recast_time; // 37
|
||||
|
||||
uint8_t type; // 39
|
||||
uint8_t aspect; // 40
|
||||
};
|
||||
|
||||
struct EventItemInfo
|
||||
|
|
|
@ -6,6 +6,32 @@
|
|||
|
||||
namespace Core { namespace Action {
|
||||
|
||||
enum struct ActionAspect : uint32_t
|
||||
{
|
||||
None = 0, // Doesn't imply unaspected
|
||||
Fire = 1,
|
||||
Ice = 2,
|
||||
Wind = 3,
|
||||
Stone = 4,
|
||||
Lightning = 5,
|
||||
Water = 6,
|
||||
Unaspected = 7 // Doesn't imply magical unaspected damage - could be unaspected physical
|
||||
};
|
||||
|
||||
enum struct ActionType : int16_t
|
||||
{
|
||||
Physical = -1,
|
||||
Unknown_0 = 0, // Very likely actions that only deals with status effects and nothing else
|
||||
Unknown_1 = 1, // Related to actions that deal with player movement (knockbacks, gapclosers etc)
|
||||
Unknown_2 = 2, // Possibly attacks that bypass calculation (deal raw damage)
|
||||
Unknown_3 = 3, // Possibly AoEs without marker
|
||||
Unknown_4 = 4,
|
||||
Magical = 5,
|
||||
Unknown_6 = 6, // Possibly breath, eye & song attacks
|
||||
Unknown_7 = 7,
|
||||
LimitBreak = 8,
|
||||
};
|
||||
|
||||
class Action
|
||||
{
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ public:
|
|||
/*! equip a weapon, possibly forcing a job change */
|
||||
void equipWeapon( ItemPtr pItem );
|
||||
/*! get a const pointer to the inventory object */
|
||||
InventoryPtr getInvetory() const;
|
||||
InventoryPtr getInventory() const;
|
||||
/*! get the current main hand model */
|
||||
uint64_t getModelMainWeapon() const;
|
||||
/*! get the current off hand model */
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace Server {
|
|||
//m_data.tPMax = 3000;
|
||||
m_data.level = pPlayer->getLevel();
|
||||
memcpy( m_data.look, pPlayer->getLookArray(), 26 );
|
||||
auto item = pPlayer->getInvetory()->getItemAt( Inventory::GearSet0, 0 );
|
||||
auto item = pPlayer->getInventory()->getItemAt( Inventory::GearSet0, Inventory::EquipSlot::MainHand );
|
||||
if( item )
|
||||
m_data.mainWeaponModel = item->getModelId1();
|
||||
m_data.secWeaponModel = pPlayer->getModelSubWeapon();
|
||||
|
|
Loading…
Add table
Reference in a new issue