Began expanding network protocols for monsters
All big feature expansions have begun with SerialPacketType, and this is no exception.
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
typedef SerialPacketBase SerialPacket;
|
typedef SerialPacketBase SerialPacket;
|
||||||
|
|
||||||
//DOCS: NETWORK_VERSION is used to discern compatible servers and clients
|
//DOCS: NETWORK_VERSION is used to discern compatible servers and clients
|
||||||
constexpr int NETWORK_VERSION = 20141227;
|
constexpr int NETWORK_VERSION = -1;
|
||||||
|
|
||||||
union MaxPacket {
|
union MaxPacket {
|
||||||
CharacterPacket a;
|
CharacterPacket a;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
//TODO: This needs to be smoothed out
|
//TODO: This needs to be smoothed out
|
||||||
enum class SerialPacketType {
|
enum class SerialPacketType {
|
||||||
//default: there is something wrong
|
//default: there is something wrong
|
||||||
NONE = 0,
|
NONE,
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
//ServerPacket
|
//ServerPacket
|
||||||
@@ -38,12 +38,12 @@ enum class SerialPacketType {
|
|||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
//heartbeat
|
//heartbeat
|
||||||
PING = 1,
|
PING,
|
||||||
PONG = 2,
|
PONG,
|
||||||
|
|
||||||
//Used for finding available servers
|
//Used for finding available servers
|
||||||
BROADCAST_REQUEST = 3,
|
BROADCAST_REQUEST,
|
||||||
BROADCAST_RESPONSE = 4,
|
BROADCAST_RESPONSE,
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
//ClientPacket
|
//ClientPacket
|
||||||
@@ -51,24 +51,24 @@ enum class SerialPacketType {
|
|||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
//Connecting to a server as a client
|
//Connecting to a server as a client
|
||||||
JOIN_REQUEST = 5,
|
JOIN_REQUEST,
|
||||||
JOIN_RESPONSE = 6,
|
JOIN_RESPONSE,
|
||||||
|
|
||||||
//disconnect from the server
|
//disconnect from the server
|
||||||
DISCONNECT_REQUEST = 7,
|
DISCONNECT_REQUEST,
|
||||||
DISCONNECT_RESPONSE = 8,
|
DISCONNECT_RESPONSE,
|
||||||
DISCONNECT_FORCED = 9,
|
DISCONNECT_FORCED,
|
||||||
|
|
||||||
//load the account
|
//load the account
|
||||||
LOGIN_REQUEST = 10,
|
LOGIN_REQUEST,
|
||||||
LOGIN_RESPONSE = 11,
|
LOGIN_RESPONSE,
|
||||||
|
|
||||||
//unload the account
|
//unload the account
|
||||||
LOGOUT_REQUEST = 12,
|
LOGOUT_REQUEST,
|
||||||
LOGOUT_RESPONSE = 13,
|
LOGOUT_RESPONSE,
|
||||||
|
|
||||||
//shut down the server
|
//shut down the server
|
||||||
SHUTDOWN_REQUEST = 14,
|
SHUTDOWN_REQUEST,
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
//RegionPacket
|
//RegionPacket
|
||||||
@@ -76,8 +76,8 @@ enum class SerialPacketType {
|
|||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
//map data
|
//map data
|
||||||
REGION_REQUEST = 15, //NOTE: technically a query
|
REGION_REQUEST, //NOTE: technically a query
|
||||||
REGION_CONTENT = 16,
|
REGION_CONTENT,
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
//CharacterPacket
|
//CharacterPacket
|
||||||
@@ -89,22 +89,40 @@ enum class SerialPacketType {
|
|||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
//character management
|
//character management
|
||||||
CHARACTER_CREATE = 17,
|
CHARACTER_CREATE,
|
||||||
CHARACTER_DELETE = 18,
|
CHARACTER_DELETE,
|
||||||
CHARACTER_LOAD = 19,
|
CHARACTER_LOAD,
|
||||||
CHARACTER_UNLOAD = 20,
|
CHARACTER_UNLOAD,
|
||||||
|
|
||||||
//find out info from the server
|
//find out info from the server
|
||||||
QUERY_CHARACTER_EXISTS = 21,
|
QUERY_CHARACTER_EXISTS,
|
||||||
QUERY_CHARACTER_STATS = 22,
|
QUERY_CHARACTER_STATS,
|
||||||
QUERY_CHARACTER_LOCATION = 23,
|
QUERY_CHARACTER_LOCATION,
|
||||||
|
|
||||||
//set the info in the server
|
//set the info in the server
|
||||||
CHARACTER_SET_ROOM = 24,
|
CHARACTER_MOVEMENT,
|
||||||
CHARACTER_SET_ORIGIN = 25,
|
CHARACTER_ATTACK,
|
||||||
CHARACTER_SET_MOTION = 26,
|
|
||||||
|
|
||||||
//TODO: enemy management
|
//admin control
|
||||||
|
// ADMIN_SET_CHARACTER_ORIGIN,
|
||||||
|
|
||||||
|
//-------------------------
|
||||||
|
//MonsterPacket
|
||||||
|
// monster index,
|
||||||
|
// handle, avatar, hitbox?
|
||||||
|
// room index, origin, motion
|
||||||
|
// TODO: attack data
|
||||||
|
//-------------------------
|
||||||
|
|
||||||
|
MONSTER_CREATE,
|
||||||
|
MONSTER_DELETE,
|
||||||
|
|
||||||
|
QUERY_MONSTER_EXISTS, //a list of monsters in a room
|
||||||
|
QUERY_MONSTER_STATS, //statistics of a specific monster type or instance
|
||||||
|
QUERY_MONSTER_LOCATION, //umm...
|
||||||
|
|
||||||
|
MONSTER_MOVEMENT, //monster movement
|
||||||
|
MONSTER_ATTACK,
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
//TextPacket
|
//TextPacket
|
||||||
@@ -112,20 +130,21 @@ enum class SerialPacketType {
|
|||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
//general speech
|
//general speech
|
||||||
TEXT_BROADCAST = 27,
|
TEXT_BROADCAST,
|
||||||
|
|
||||||
//rejection/error messages
|
//rejection/error messages
|
||||||
JOIN_REJECTION = 28,
|
JOIN_REJECTION,
|
||||||
LOGIN_REJECTION = 29,
|
LOGIN_REJECTION,
|
||||||
REGION_REJECTION = 30,
|
REGION_REJECTION,
|
||||||
CHARACTER_REJECTION = 31,
|
CHARACTER_REJECTION,
|
||||||
SHUTDOWN_REJECTION = 32,
|
MONSTER_REJECTION,
|
||||||
|
SHUTDOWN_REJECTION,
|
||||||
|
|
||||||
//-------------------------
|
//-------------------------
|
||||||
//not used
|
//not used
|
||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
LAST = 33
|
LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
TODO: In need of script APIs (list)
|
TODO: In need of script APIs (list)
|
||||||
* Characters
|
* Characters
|
||||||
* Monsters
|
|
||||||
* Waypoints
|
|
||||||
|
|
||||||
TODO: Account passwords (list)
|
TODO: Account passwords (list)
|
||||||
* backbone account server OR
|
* backbone account server OR
|
||||||
@@ -9,7 +7,6 @@ TODO: Account passwords (list)
|
|||||||
* ...
|
* ...
|
||||||
* salts & hashes
|
* salts & hashes
|
||||||
|
|
||||||
TODO: Waypoints, with positions and trigger zones (collision areas) for doors, monster spawns, etc.
|
|
||||||
TODO: Fix shoddy movement
|
TODO: Fix shoddy movement
|
||||||
TODO: Periodic mass server saves
|
TODO: Periodic mass server saves
|
||||||
TODO: Remove the big "Shut Down" button (currently broken...)
|
TODO: Remove the big "Shut Down" button (currently broken...)
|
||||||
|
|||||||
Reference in New Issue
Block a user