mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 06:27:45 +00:00
Might as well refactor a bit more;
This commit is contained in:
parent
353f2a3cd0
commit
161d24f505
7 changed files with 21 additions and 21 deletions
|
@ -557,21 +557,21 @@ namespace Core {
|
|||
Unaspected = 7 // Doesn't imply magical unaspected damage - could be unaspected physical
|
||||
};
|
||||
|
||||
enum struct ActionModel : int8_t
|
||||
enum struct ActionType : int8_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
|
||||
WeaponOverride = -1, // Needs more investigation (takes the damage type of the equipped weapon)?
|
||||
Unknown_0 = 0,
|
||||
Slashing = 1,
|
||||
Piercing = 2,
|
||||
Blunt = 3,
|
||||
Unknown_4 = 4,
|
||||
Magical = 5,
|
||||
Unknown_6 = 6, // Possibly breath, eye & song attacks
|
||||
Darkness = 6,
|
||||
Unknown_7 = 7,
|
||||
LimitBreak = 8,
|
||||
};
|
||||
|
||||
enum ActionType : uint8_t
|
||||
enum HandleActionType : uint8_t
|
||||
{
|
||||
Event,
|
||||
Spell,
|
||||
|
|
|
@ -17,9 +17,9 @@ uint32_t Core::Action::Action::getId() const
|
|||
return m_id;
|
||||
}
|
||||
|
||||
Core::Common::ActionType Core::Action::Action::getActionType() const
|
||||
Core::Common::HandleActionType Core::Action::Action::getHandleActionType() const
|
||||
{
|
||||
return m_actionType;
|
||||
return m_handleActionType;
|
||||
}
|
||||
|
||||
Core::Entity::ActorPtr Core::Action::Action::getTargetActor() const
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Core { namespace Action {
|
|||
|
||||
uint32_t getId() const;
|
||||
|
||||
Common::ActionType getActionType() const;
|
||||
Common::HandleActionType getHandleActionType() const;
|
||||
|
||||
Entity::ActorPtr getTargetActor() const;
|
||||
|
||||
|
@ -42,7 +42,7 @@ namespace Core { namespace Action {
|
|||
|
||||
protected:
|
||||
uint32_t m_id;
|
||||
Common::ActionType m_actionType;
|
||||
Common::HandleActionType m_handleActionType;
|
||||
|
||||
uint64_t m_startTime;
|
||||
uint32_t m_castTime;
|
||||
|
|
|
@ -22,14 +22,14 @@ extern Core::Scripting::ScriptManager g_scriptMgr;
|
|||
|
||||
Core::Action::ActionCast::ActionCast()
|
||||
{
|
||||
m_actionType = Common::ActionType::Event;
|
||||
m_handleActionType = Common::HandleActionType::Event;
|
||||
}
|
||||
|
||||
Core::Action::ActionCast::ActionCast( Entity::ActorPtr pActor, Entity::ActorPtr pTarget, uint32_t actionId )
|
||||
{
|
||||
m_startTime = 0;
|
||||
m_id = actionId;
|
||||
m_actionType = ActionType::Spell;
|
||||
m_handleActionType = HandleActionType::Spell;
|
||||
m_castTime = g_exdData.m_actionInfoMap[actionId].cast_time; // TODO: Add security checks.
|
||||
m_pSource = pActor;
|
||||
m_pTarget = pTarget;
|
||||
|
|
|
@ -18,14 +18,14 @@ extern Core::Logger g_log;
|
|||
|
||||
Core::Action::ActionTeleport::ActionTeleport()
|
||||
{
|
||||
m_actionType = Common::ActionType::Event;
|
||||
m_handleActionType = Common::HandleActionType::Event;
|
||||
}
|
||||
|
||||
Core::Action::ActionTeleport::ActionTeleport( Entity::ActorPtr pActor, uint16_t targetZone, uint16_t cost )
|
||||
{
|
||||
m_startTime = 0;
|
||||
m_id = 5;
|
||||
m_actionType = ActionType::Teleport;
|
||||
m_handleActionType = HandleActionType::Teleport;
|
||||
m_castTime = g_exdData.m_actionInfoMap[5].cast_time; // TODO: Add security checks.
|
||||
m_pSource = pActor;
|
||||
m_bInterrupt = false;
|
||||
|
|
|
@ -18,14 +18,14 @@ using namespace Core::Network::Packets::Server;
|
|||
|
||||
Core::Action::EventAction::EventAction()
|
||||
{
|
||||
m_actionType = Common::ActionType::Event;
|
||||
m_handleActionType = Common::HandleActionType::Event;
|
||||
}
|
||||
|
||||
Core::Action::EventAction::EventAction( Entity::ActorPtr pActor, uint32_t eventId, uint16_t action,
|
||||
ActionCallback finishRef, ActionCallback interruptRef, uint64_t additional )
|
||||
{
|
||||
m_additional = additional;
|
||||
m_actionType = ActionType::Event;
|
||||
m_handleActionType = HandleActionType::Event;
|
||||
m_eventId = eventId;
|
||||
m_id = action;
|
||||
m_castTime = g_exdData.m_EventActionInfoMap[action].castTime; // TODO: Add security checks.
|
||||
|
|
|
@ -19,14 +19,14 @@ using namespace Core::Network::Packets::Server;
|
|||
|
||||
Core::Action::EventItemAction::EventItemAction()
|
||||
{
|
||||
m_actionType = Common::ActionType::Event;
|
||||
m_handleActionType = Common::HandleActionType::Event;
|
||||
}
|
||||
|
||||
Core::Action::EventItemAction::EventItemAction( Entity::ActorPtr pActor, uint32_t eventId, uint32_t action,
|
||||
ActionCallback finishRef, ActionCallback interruptRef, uint64_t additional )
|
||||
{
|
||||
m_additional = additional;
|
||||
m_actionType = ActionType::Event;
|
||||
m_handleActionType = HandleActionType::Event;
|
||||
m_eventId = eventId;
|
||||
m_id = action;
|
||||
// TODO: read the cast time from the action itself
|
||||
|
|
Loading…
Add table
Reference in a new issue