Commit 34376c88 authored by Chen Bill's avatar Chen Bill

Revert "add DuelPlayer.player_id"

This reverts commit 04448d7b.
parent 771bd5d3
...@@ -12,16 +12,16 @@ ...@@ -12,16 +12,16 @@
namespace ygo { namespace ygo {
struct HostInfo { struct HostInfo {
unsigned int lflist{ 0 }; unsigned int lflist;
unsigned char rule{ 0 }; unsigned char rule;
unsigned char mode{ 0 }; unsigned char mode;
unsigned char duel_rule{ 0 }; unsigned char duel_rule;
bool no_check_deck{ false }; bool no_check_deck;
bool no_shuffle_deck{ false }; bool no_shuffle_deck;
unsigned int start_lp{ 0 }; unsigned int start_lp;
unsigned char start_hand{ 0 }; unsigned char start_hand;
unsigned char draw_count{ 0 }; unsigned char draw_count;
unsigned short time_limit{ 0 }; unsigned short time_limit;
}; };
struct HostPacket { struct HostPacket {
unsigned short identifier; unsigned short identifier;
...@@ -99,17 +99,22 @@ struct STOC_HS_WatchChange { ...@@ -99,17 +99,22 @@ struct STOC_HS_WatchChange {
class DuelMode; class DuelMode;
struct DuelPlayer { struct DuelPlayer {
unsigned short name[20]{ 0 }; unsigned short name[20];
DuelMode* game{ nullptr }; DuelMode* game;
unsigned char player_id{ 0xff }; unsigned char type;
unsigned char type{ 0 }; unsigned char state;
unsigned char state{ 0 }; bufferevent* bev;
bufferevent* bev{ 0 }; DuelPlayer() {
game = 0;
type = 0;
state = 0;
bev = 0;
}
}; };
class DuelMode { class DuelMode {
public: public:
DuelMode(): host_player(nullptr), pduel(0), duel_stage(0) {} DuelMode(): host_player(0), pduel(0), duel_stage(0) {}
virtual ~DuelMode() {} virtual ~DuelMode() {}
virtual void Chat(DuelPlayer* dp, void* pdata, int len) {} virtual void Chat(DuelPlayer* dp, void* pdata, int len) {}
virtual void JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) {} virtual void JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment