This repository has been archived on 2024-05-15. You can view files and clone it, but cannot push or open issues or pull requests.
fugg/flyff-api/src/Action.h

114 lines
2.8 KiB
C++

//
// Created by main on 18-11-22.
//
#ifndef FUGG_ACTION_H
#define FUGG_ACTION_H
#include <cstdint>
namespace flyff {
enum class Action : uint32_t {
Move,
StopMove,
Jump,
Emote,
Target,
Skill,
MoveForward,
MoveBackward,
TurnLeft,
TurnRight,
StopTurn,
LookDown,
LookUp,
StopLook,
StopMoveFly,
FlyFreeMove,
Follow,
Interact,
ToggleWalk = 0x14,
// Charged attacks from bows and wands.
ReleaseChargedAttack,
// Send when your are being blocked from moving.
Correction = 0x18,
};
static std::ostream &operator<<(std::ostream &os, const Action &action) {
switch(action) {
case Action::Move:
os << "Move";
break;
case Action::StopMove:
os << "StopMove";
break;
case Action::Jump:
os << "Jump";
break;
case Action::Emote:
os << "Emote";
break;
case Action::Target:
os << "Target";
break;
case Action::Skill:
os << "Skill";
break;
case Action::MoveForward:
os << "MoveForward";
break;
case Action::MoveBackward:
os << "MoveBackward";
break;
case Action::TurnLeft:
os << "TurnLeft";
break;
case Action::TurnRight:
os << "TurnRight";
break;
case Action::StopTurn:
os << "StopTurn";
break;
case Action::LookDown:
os << "LookDown";
break;
case Action::LookUp:
os << "LookUp";
break;
case Action::StopLook:
os << "StopLook";
break;
case Action::StopMoveFly:
os << "StopMoveFly";
break;
case Action::FlyFreeMove:
os << "FlyFreeMove";
break;
case Action::Follow:
os << "Follow";
break;
case Action::Interact:
os << "Interact";
break;
case Action::ToggleWalk:
os << "ToggleWalk";
break;
case Action::ReleaseChargedAttack:
os << "ReleaseChargedAttack";
break;
case Action::Correction:
os << "Correction";
break;
default:
os << "Action(" << static_cast<unsigned>(action) << ")";
break;
}
return os;
}
};
#endif //FUGG_ACTION_H