Mana
Loading...
Searching...
No Matches
Namespaces | Enumerations | Functions | Variables
manaserv_protocol.h File Reference
#include "being.h"

Go to the source code of this file.

Namespaces

namespace  ManaServ
 

Enumerations

enum  { ManaServ::PROTOCOL_VERSION = 9 , ManaServ::MIN_PROTOCOL_VERSION = 9 , ManaServ::SUPPORTED_DB_VERSION = 27 }
 
enum  ManaServ::ValueType {
  ManaServ::Int8 , ManaServ::Int16 , ManaServ::Int32 , ManaServ::String ,
  ManaServ::Double
}
 The type of a value in a message. More...
 
enum  {
  ManaServ::PAMSG_REGISTER = 0x0000 , ManaServ::APMSG_REGISTER_RESPONSE = 0x0002 , ManaServ::PAMSG_UNREGISTER = 0x0003 , ManaServ::APMSG_UNREGISTER_RESPONSE = 0x0004 ,
  ManaServ::PAMSG_REQUEST_REGISTER_INFO = 0x0005 , ManaServ::APMSG_REGISTER_INFO_RESPONSE = 0x0006 , ManaServ::PAMSG_LOGIN = 0x0010 , ManaServ::APMSG_LOGIN_RESPONSE = 0x0012 ,
  ManaServ::PAMSG_LOGOUT = 0x0013 , ManaServ::APMSG_LOGOUT_RESPONSE = 0x0014 , ManaServ::PAMSG_LOGIN_RNDTRGR = 0x0015 , ManaServ::APMSG_LOGIN_RNDTRGR_RESPONSE = 0x0016 ,
  ManaServ::PAMSG_STELLAR_LOGIN = 0x0017 , ManaServ::APMSG_STELLAR_LOGIN_RESPONSE = 0x0018 , ManaServ::PAMSG_CHAR_CREATE = 0x0020 , ManaServ::APMSG_CHAR_CREATE_RESPONSE = 0x0021 ,
  ManaServ::PAMSG_CHAR_DELETE = 0x0022 , ManaServ::APMSG_CHAR_DELETE_RESPONSE = 0x0023 , ManaServ::APMSG_CHAR_INFO = 0x0024 , ManaServ::PAMSG_CHAR_SELECT = 0x0026 ,
  ManaServ::APMSG_CHAR_SELECT_RESPONSE = 0x0027 , ManaServ::PAMSG_EMAIL_CHANGE = 0x0030 , ManaServ::APMSG_EMAIL_CHANGE_RESPONSE = 0x0031 , ManaServ::PAMSG_PASSWORD_CHANGE = 0x0034 ,
  ManaServ::APMSG_PASSWORD_CHANGE_RESPONSE = 0x0035 , ManaServ::PGMSG_CONNECT = 0x0050 , ManaServ::GPMSG_CONNECT_RESPONSE = 0x0051 , ManaServ::PCMSG_CONNECT = 0x0053 ,
  ManaServ::CPMSG_CONNECT_RESPONSE = 0x0054 , ManaServ::PGMSG_DISCONNECT = 0x0060 , ManaServ::GPMSG_DISCONNECT_RESPONSE = 0x0061 , ManaServ::PCMSG_DISCONNECT = 0x0063 ,
  ManaServ::CPMSG_DISCONNECT_RESPONSE = 0x0064 , ManaServ::PAMSG_RECONNECT = 0x0065 , ManaServ::APMSG_RECONNECT_RESPONSE = 0x0066 , ManaServ::GPMSG_PLAYER_MAP_CHANGE = 0x0100 ,
  ManaServ::GPMSG_PLAYER_SERVER_CHANGE = 0x0101 , ManaServ::PGMSG_PICKUP = 0x0110 , ManaServ::PGMSG_DROP = 0x0111 , ManaServ::PGMSG_EQUIP = 0x0112 ,
  ManaServ::PGMSG_UNEQUIP = 0x0113 , ManaServ::GPMSG_INVENTORY = 0x0120 , ManaServ::GPMSG_INVENTORY_FULL = 0x0121 , ManaServ::GPMSG_EQUIP = 0x0122 ,
  ManaServ::GPMSG_EQUIP_RESPONSE = 0x0123 , ManaServ::GPMSG_UNEQUIP = 0x0124 , ManaServ::GPMSG_UNEQUIP_RESPONSE = 0x0125 , ManaServ::GPMSG_PLAYER_ATTRIBUTE_CHANGE = 0x0130 ,
  ManaServ::GPMSG_ATTRIBUTE_POINTS_STATUS = 0x0140 , ManaServ::PGMSG_RAISE_ATTRIBUTE = 0x0160 , ManaServ::GPMSG_RAISE_ATTRIBUTE_RESPONSE = 0x0161 , ManaServ::PGMSG_LOWER_ATTRIBUTE = 0x0170 ,
  ManaServ::GPMSG_LOWER_ATTRIBUTE_RESPONSE = 0x0171 , ManaServ::PGMSG_RESPAWN = 0x0180 , ManaServ::GPMSG_BEING_ENTER = 0x0200 , ManaServ::GPMSG_BEING_LEAVE = 0x0201 ,
  ManaServ::GPMSG_ITEM_APPEAR = 0x0202 , ManaServ::GPMSG_BEING_LOOKS_CHANGE = 0x0210 , ManaServ::GPMSG_BEING_EMOTE = 0x0211 , ManaServ::PGMSG_BEING_EMOTE = 0x0212 ,
  ManaServ::PGMSG_WALK = 0x0260 , ManaServ::PGMSG_ACTION_CHANGE = 0x0270 , ManaServ::GPMSG_BEING_ACTION_CHANGE = 0x0271 , ManaServ::PGMSG_DIRECTION_CHANGE = 0x0272 ,
  ManaServ::GPMSG_BEING_DIR_CHANGE = 0x0273 , ManaServ::GPMSG_BEING_HEALTH_CHANGE = 0x0274 , ManaServ::GPMSG_BEINGS_MOVE = 0x0280 , ManaServ::GPMSG_ITEMS = 0x0281 ,
  ManaServ::GPMSG_BEING_ABILITY_POINT = 0x0282 , ManaServ::GPMSG_BEING_ABILITY_BEING = 0x0283 , ManaServ::GPMSG_BEING_ABILITY_DIRECTION = 0x0284 , ManaServ::PGMSG_USE_ABILITY_ON_BEING = 0x0290 ,
  ManaServ::PGMSG_USE_ABILITY_ON_POINT = 0x0291 , ManaServ::PGMSG_USE_ABILITY_ON_DIRECTION = 0x0292 , ManaServ::GPMSG_ABILITY_STATUS = 0x02A0 , ManaServ::GPMSG_ABILITY_REMOVED = 0x02A1 ,
  ManaServ::GPMSG_ABILITY_COOLDOWN = 0x02A2 , ManaServ::PGMSG_SAY = 0x02B0 , ManaServ::GPMSG_SAY = 0x02B1 , ManaServ::GPMSG_NPC_CHOICE = 0x02C0 ,
  ManaServ::GPMSG_NPC_MESSAGE = 0x02C1 , ManaServ::PGMSG_NPC_TALK = 0x02C2 , ManaServ::PGMSG_NPC_TALK_NEXT = 0x02C3 , ManaServ::PGMSG_NPC_SELECT = 0x02C4 ,
  ManaServ::GPMSG_NPC_BUY = 0x02C5 , ManaServ::GPMSG_NPC_SELL = 0x02C6 , ManaServ::PGMSG_NPC_BUYSELL = 0x02C7 , ManaServ::GPMSG_NPC_ERROR = 0x02C8 ,
  ManaServ::GPMSG_NPC_CLOSE = 0x02C9 , ManaServ::GPMSG_NPC_POST = 0x02D0 , ManaServ::PGMSG_NPC_POST_SEND = 0x02D1 , ManaServ::GPMSG_NPC_POST_GET = 0x02D2 ,
  ManaServ::PGMSG_NPC_NUMBER = 0x02D3 , ManaServ::PGMSG_NPC_STRING = 0x02D4 , ManaServ::GPMSG_NPC_NUMBER = 0x02D5 , ManaServ::GPMSG_NPC_STRING = 0x02D6 ,
  ManaServ::GPMSG_NPC_BUYSELL_RESPONSE = 0x02D7 , ManaServ::PGMSG_TRADE_REQUEST = 0x02E0 , ManaServ::GPMSG_TRADE_REQUEST = 0x02E1 , ManaServ::GPMSG_TRADE_START = 0x02E2 ,
  ManaServ::GPMSG_TRADE_COMPLETE = 0x02E3 , ManaServ::PGMSG_TRADE_CANCEL = 0x02E4 , ManaServ::GPMSG_TRADE_CANCEL = 0x02E5 , ManaServ::PGMSG_TRADE_AGREED = 0x02E6 ,
  ManaServ::GPMSG_TRADE_AGREED = 0x02E7 , ManaServ::PGMSG_TRADE_CONFIRM = 0x02E8 , ManaServ::GPMSG_TRADE_CONFIRM = 0x02E9 , ManaServ::PGMSG_TRADE_ADD_ITEM = 0x02EA ,
  ManaServ::GPMSG_TRADE_ADD_ITEM = 0x02EB , ManaServ::PGMSG_TRADE_SET_MONEY = 0x02EC , ManaServ::GPMSG_TRADE_SET_MONEY = 0x02ED , ManaServ::GPMSG_TRADE_BOTH_CONFIRM = 0x02EE ,
  ManaServ::PGMSG_USE_ITEM = 0x0300 , ManaServ::GPMSG_USE_RESPONSE = 0x0301 , ManaServ::GPMSG_BEINGS_DAMAGE = 0x0310 , ManaServ::GPMSG_CREATE_EFFECT_POS = 0x0320 ,
  ManaServ::GPMSG_CREATE_EFFECT_BEING = 0x0321 , ManaServ::GPMSG_CREATE_TEXT_PARTICLE = 0x0322 , ManaServ::GPMSG_SHAKE = 0x0330 , ManaServ::PCMSG_GUILD_CREATE = 0x0350 ,
  ManaServ::CPMSG_GUILD_CREATE_RESPONSE = 0x0351 , ManaServ::PCMSG_GUILD_INVITE = 0x0352 , ManaServ::CPMSG_GUILD_INVITE_RESPONSE = 0x0353 , ManaServ::PCMSG_GUILD_ACCEPT = 0x0354 ,
  ManaServ::CPMSG_GUILD_ACCEPT_RESPONSE = 0x0355 , ManaServ::PCMSG_GUILD_GET_MEMBERS = 0x0356 , ManaServ::CPMSG_GUILD_GET_MEMBERS_RESPONSE = 0x0357 , ManaServ::CPMSG_GUILD_UPDATE_LIST = 0x0358 ,
  ManaServ::PCMSG_GUILD_QUIT = 0x0360 , ManaServ::CPMSG_GUILD_QUIT_RESPONSE = 0x0361 , ManaServ::PCMSG_GUILD_PROMOTE_MEMBER = 0x0365 , ManaServ::CPMSG_GUILD_PROMOTE_MEMBER_RESPONSE = 0x0366 ,
  ManaServ::PCMSG_GUILD_KICK_MEMBER = 0x0370 , ManaServ::CPMSG_GUILD_KICK_MEMBER_RESPONSE = 0x0371 , ManaServ::CPMSG_GUILD_KICK_NOTIFICATION = 0x0372 , ManaServ::CPMSG_GUILD_INVITED = 0x0388 ,
  ManaServ::CPMSG_GUILD_REJOIN = 0x0389 , ManaServ::PGMSG_PARTY_INVITE = 0x03A0 , ManaServ::GPMSG_PARTY_INVITE_ERROR = 0x03A1 , ManaServ::GCMSG_PARTY_INVITE = 0x03A2 ,
  ManaServ::CPMSG_PARTY_INVITED = 0x03A4 , ManaServ::PCMSG_PARTY_INVITE_ANSWER = 0x03A5 , ManaServ::CPMSG_PARTY_INVITE_ANSWER_RESPONSE = 0x03A6 , ManaServ::CPMSG_PARTY_REJECTED = 0x03A8 ,
  ManaServ::PCMSG_PARTY_QUIT = 0x03AA , ManaServ::CPMSG_PARTY_QUIT_RESPONSE = 0x03AB , ManaServ::CPMSG_PARTY_NEW_MEMBER = 0x03B0 , ManaServ::CPMSG_PARTY_MEMBER_LEFT = 0x03B1 ,
  ManaServ::CPMSG_ERROR = 0x0401 , ManaServ::CPMSG_ANNOUNCEMENT = 0x0402 , ManaServ::CPMSG_PRIVMSG = 0x0403 , ManaServ::CPMSG_PUBMSG = 0x0404 ,
  ManaServ::PCMSG_CHAT = 0x0410 , ManaServ::PCMSG_PRIVMSG = 0x0412 , ManaServ::PCMSG_WHO = 0x0415 , ManaServ::CPMSG_WHO_RESPONSE = 0x0416 ,
  ManaServ::CPMSG_CHANNEL_EVENT = 0x0430 , ManaServ::PCMSG_ENTER_CHANNEL = 0x0440 , ManaServ::CPMSG_ENTER_CHANNEL_RESPONSE = 0x0441 , ManaServ::PCMSG_QUIT_CHANNEL = 0x0443 ,
  ManaServ::CPMSG_QUIT_CHANNEL_RESPONSE = 0x0444 , ManaServ::PCMSG_LIST_CHANNELS = 0x0445 , ManaServ::CPMSG_LIST_CHANNELS_RESPONSE = 0x0446 , ManaServ::PCMSG_LIST_CHANNELUSERS = 0x0460 ,
  ManaServ::CPMSG_LIST_CHANNELUSERS_RESPONSE = 0x0461 , ManaServ::PCMSG_TOPIC_CHANGE = 0x0462 , ManaServ::PCMSG_USER_MODE = 0x0465 , ManaServ::PCMSG_KICK_USER = 0x0466 ,
  ManaServ::GPMSG_QUESTLOG_STATUS = 0x0470 , ManaServ::GAMSG_REGISTER = 0x0500 , ManaServ::AGMSG_REGISTER_RESPONSE = 0x0501 , ManaServ::AGMSG_ACTIVE_MAP = 0x0502 ,
  ManaServ::AGMSG_PLAYER_ENTER = 0x0510 , ManaServ::GAMSG_PLAYER_DATA = 0x0520 , ManaServ::GAMSG_REDIRECT = 0x0530 , ManaServ::AGMSG_REDIRECT_RESPONSE = 0x0531 ,
  ManaServ::GAMSG_PLAYER_RECONNECT = 0x0532 , ManaServ::GAMSG_PLAYER_SYNC = 0x0533 , ManaServ::GAMSG_SET_VAR_CHR = 0x0540 , ManaServ::GAMSG_GET_VAR_CHR = 0x0541 ,
  ManaServ::AGMSG_GET_VAR_CHR_RESPONSE = 0x0542 , ManaServ::GAMSG_SET_VAR_MAP = 0x0546 , ManaServ::GAMSG_SET_VAR_WORLD = 0x0547 , ManaServ::AGMSG_SET_VAR_WORLD = 0x0548 ,
  ManaServ::GAMSG_BAN_PLAYER = 0x0550 , ManaServ::GAMSG_CHANGE_ACCOUNT_LEVEL = 0x0556 , ManaServ::GAMSG_STATISTICS = 0x0560 , ManaServ::CGMSG_CHANGED_PARTY = 0x0590 ,
  ManaServ::GCMSG_REQUEST_POST = 0x05A0 , ManaServ::CGMSG_POST_RESPONSE = 0x05A1 , ManaServ::GCMSG_STORE_POST = 0x05A5 , ManaServ::CGMSG_STORE_POST_RESPONSE = 0x05A6 ,
  ManaServ::GAMSG_TRANSACTION = 0x0600 , ManaServ::GAMSG_CREATE_ITEM_ON_MAP = 0x0601 , ManaServ::GAMSG_REMOVE_ITEM_ON_MAP = 0x0602 , ManaServ::GAMSG_ANNOUNCE = 0x0603 ,
  ManaServ::XXMSG_DEBUG_FLAG = 0x8000 , ManaServ::XXMSG_INVALID = 0x7FFF
}
 Enumerated type for communicated messages: More...
 
enum  {
  ManaServ::ERRMSG_OK = 0 , ManaServ::ERRMSG_FAILURE , ManaServ::ERRMSG_NO_LOGIN , ManaServ::ERRMSG_NO_CHARACTER_SELECTED ,
  ManaServ::ERRMSG_INSUFFICIENT_RIGHTS , ManaServ::ERRMSG_INVALID_ARGUMENT , ManaServ::ERRMSG_EMAIL_ALREADY_EXISTS , ManaServ::ERRMSG_ALREADY_TAKEN ,
  ManaServ::ERRMSG_SERVER_FULL , ManaServ::ERRMSG_TIME_OUT , ManaServ::ERRMSG_LIMIT_REACHED , ManaServ::ERRMSG_ADMINISTRATIVE_LOGOFF ,
  ManaServ::ERRMSG_ALREADY_MEMBER , ManaServ::ERRMSG_LOGIN_WAS_TAKEN_OVER
}
 
enum  { ManaServ::DATA_VERSION_OK = 0x00 , ManaServ::DATA_VERSION_OUTDATED = 0x01 }
 
enum  { ManaServ::PASSWORD_OK = 0x00 , ManaServ::PASSWORD_BAD = 0x01 }
 
enum  { ManaServ::SYNC_CHARACTER_POINTS = 0x01 , ManaServ::SYNC_CHARACTER_ATTRIBUTE = 0x02 , ManaServ::SYNC_ONLINE_STATUS = 0x04 }
 
enum  { ManaServ::LOGIN_INVALID_VERSION = 0x40 , ManaServ::LOGIN_INVALID_TIME = 0x50 , ManaServ::LOGIN_BANNED }
 
enum  { ManaServ::REGISTER_INVALID_VERSION = 0x40 , ManaServ::REGISTER_EXISTS_USERNAME , ManaServ::REGISTER_EXISTS_EMAIL , ManaServ::REGISTER_CAPTCHA_WRONG }
 
enum  {
  ManaServ::CREATE_INVALID_HAIRSTYLE = 0x40 , ManaServ::CREATE_INVALID_HAIRCOLOR , ManaServ::CREATE_INVALID_GENDER , ManaServ::CREATE_ATTRIBUTES_TOO_HIGH ,
  ManaServ::CREATE_ATTRIBUTES_TOO_LOW , ManaServ::CREATE_ATTRIBUTES_OUT_OF_RANGE , ManaServ::CREATE_EXISTS_NAME , ManaServ::CREATE_TOO_MUCH_CHARACTERS ,
  ManaServ::CREATE_INVALID_SLOT
}
 
enum  ManaServ::AttribmodResponseCode { ManaServ::ATTRIBMOD_OK = ERRMSG_OK , ManaServ::ATTRIBMOD_INVALID_ATTRIBUTE = 0x40 , ManaServ::ATTRIBMOD_NO_POINTS_LEFT , ManaServ::ATTRIBMOD_DENIED }
 
enum  ManaServ::EntityType {
  ManaServ::OBJECT_ITEM = 0 , ManaServ::OBJECT_NPC = 2 , ManaServ::OBJECT_MONSTER = 3 , ManaServ::OBJECT_CHARACTER = 4 ,
  ManaServ::OBJECT_EFFECT = 5 , ManaServ::OBJECT_OTHER = 6
}
 
enum  { ManaServ::MOVING_POSITION = 1 , ManaServ::MOVING_DESTINATION = 2 }
 
enum  { ManaServ::CHAT_USING_BAD_WORDS = 0x40 , ManaServ::CHAT_UNHANDLED_COMMAND }
 
enum  {
  ManaServ::CHAT_EVENT_NEW_PLAYER = 0 , ManaServ::CHAT_EVENT_LEAVING_PLAYER , ManaServ::CHAT_EVENT_TOPIC_CHANGE , ManaServ::CHAT_EVENT_MODE_CHANGE ,
  ManaServ::CHAT_EVENT_KICKED_PLAYER
}
 
enum  { ManaServ::GUILD_EVENT_NEW_PLAYER = 0 , ManaServ::GUILD_EVENT_LEAVING_PLAYER , ManaServ::GUILD_EVENT_ONLINE_PLAYER , ManaServ::GUILD_EVENT_OFFLINE_PLAYER }
 
enum  { ManaServ::QUESTLOG_UPDATE_STATE = 1 , ManaServ::QUESTLOG_UPDATE_TITLE = 2 , ManaServ::QUESTLOG_UPDATE_DESCRIPTION = 4 , ManaServ::QUESTLOG_SHOW_NOTIFICATION = 8 }
 
enum  ManaServ::BeingAction {
  ManaServ::STAND , ManaServ::WALK , ManaServ::SIT , ManaServ::DEAD ,
  ManaServ::HURT
}
 Moves enum for beings and actors for others players vision. More...
 
enum  ManaServ::BeingDirection { ManaServ::DOWN = 1 , ManaServ::LEFT = 2 , ManaServ::UP = 4 , ManaServ::RIGHT = 8 }
 Beings and actors directions WARNING: Has to be in sync with the same enum in the Being class of the client! More...
 
enum  ManaServ::BeingGender { ManaServ::GENDER_MALE = 0 , ManaServ::GENDER_FEMALE , ManaServ::GENDER_UNSPECIFIED }
 Beings Genders. More...
 
enum  ManaServ::QuestStatus { ManaServ::STATUS_OPEN = 0 , ManaServ::STATUS_STARTED , ManaServ::STATUS_FINISHED , ManaServ::STATUS_INVALID }
 Quest states. More...
 

Functions

Gender ManaServ::getGender (int gender)
 Helper function for getting gender by int.
 
ManaServ::QuestStatus ManaServ::getQuestStatus (int status)
 Helper function for getting quest status by id.
 

Variables

const int ManaServ::PICKUP_RANGE = 32 + 16
 The permited range to pick up an item.
 
const int ManaServ::NPC_TALK_RANGE = 32 * 7
 The permited range to to talk to a NPC.