//指定版本
//注意proto3与proto2的写法有些不同
syntax = "proto3";

//包名，通过protoc生成时go文件时
package protocol;

enum MT {
    option allow_alias = true;
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 0 ~ 999, FROM CLIENT START
    CLIENT_START                    = 0;

    CLIENT_REDIRECT_TO_GS_START     = 0;
    CLIENT_SYNC_ENTITY_POS          = 0;
    CLIENT_SYNC_CREATE_ENTITY       = 1;
    CLIENT_SYNC_DELETE_ENTITY       = 2;
    CLIENT_SYNC_INPUT_STATE   	    = 3;
    CLIENT_SEND_CHAT_MSG            = 4;
    CLIENT_BROADCAST_NEAR_PLAYER    = 5;
    CLIENT_SEND_TO_SPEC_PLAYER      = 6;
    CLIENT_REDIRECT_TO_GS_END       = 199;

    CLIENT_CONNECTED = 200;
    CLIENT_DISCONNECTED = 201;
    CLIENT_HEARTBEAT = 202;
    CLIENT_PLAYER_LOGIN = 203;
    CLIENT_REQUEST_LOGIN_AUTH = 204;

    CLIENT_END = 899;
    // 0 ~ 899, FROM CLIENT END
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 900 ~ 999, FROM AUTHENTICATOR START
    AUTHENTICATOR_LOGIN_AUTH_RESP = 900;
    // 900 ~ 999, FROM AUTHENTICATOR END
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 1000 ~ 1999, FROM GAME START
    GS_START                  = 1000;
    GS_SET_GAME_ID            = 1000;
    GS_HEARTBEAT              = 1001;
    GS_LBC_INFO               = 1002;
    GS_CREATE_MAP_SUC         = 1003;
    GS_PLAYER_LOGIN_GAME_RESP = 1004;
    GS_KICKOUT_CLIENT         = 1005;

    GS_BROADCAST_TO_CLIENTS   = 1100;
    GS_BROADCAST_TO_ALL_CLIENTS   = 1101;

    GS_REDIRECT_TO_CLIENT_START = 1200;
    GS_SYNC_ENTITY_POS          = 1200;
    GS_SYNC_NEAR_ENTITY_ENTER   = 1201;
    GS_SYNC_NEAR_ENTITY_LEAVE   = 1202;
    GS_SYNC_NEAR_ENTITIES_ENTER = 1203;
    GS_SYNC_INPUT_STATE         = 1204;
    GS_SYNC_CHAT_MSG            = 1205;
    GS_SYNC_NEAR_ENTITIES_LEAVE = 1206;
    GS_CREATE_ENTITY_RESPONSE   = 1207;
    GS_TRANSMIT_MSG_FROM_OTHER_CLIENT = 1028;
    GS_REDIRECT_TO_CLIENT_END   = 1299;

    GS_REDIRECT_TO_GATE_START = 1300;
    GS_SET_CLIENTPROXY_FILTER_PROP = 1397;
    GS_CLEAR_CLIENTPROXY_FILTER_PROPS = 1398;
    GS_REDIRECT_TO_GATE_STOP = 1399;

    GS_CALL_FILTERED_CLIENTS = 1400;

    GS_END = 1999;
    // 1000 ~ 1999, FROM GAME END
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 2000 ~ 2999, FROM GATE START
    GATE_START = 2000;
    GATE_SET_GATE_ID = 2000;
    GATE_HEARTBEAT = 2001;
    GATE_NOTIFY_CLIENT_CONNECTED = 2002;
    GATE_NOTIFY_CLIENT_DISCONNECTED = 2003;

    GATE_END = 2999;
    // 2000 ~ 2999, FROM GATE END
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
      // 3000 ~ 3999, FROM DISPATCHER START
    DISPATCHER_START = 3000;
    //
    DISPATCHER_NOTIFY_GATE_DISCONNECTED = 3000;
    DISPATCHER_SET_GAME_ID_ACK          = 3001;
    DISPATCHER_NOTIFY_GAME_CONNECTED    = 3002;
    DISPATCHER_NOTIFY_GAME_DISCONNECTED = 3003;
    DISPATCHER_NOTIFY_DEPLOYMENT_READY  = 3004;
    DISPATCHER_NOTIFY_KICKOUT_CLIENT    = 3005;
    DISPATCHER_CREATE_MAP_IN_GS         = 3006;
    DISPATCHER_LOGIN_GAME               = 3007;
    DISPATCHER_LOGINOUT_GAME            = 3008;

    DISPATCHER_BROADCAST_TO_CLIENTS     = 1100;

    DISPATCHER_REDIRECT_TO_CLIENT_START = 3900;
	  DISPATCHER_LOGIN_GAME_RESP          = 3900;
    DISPATCHER_REDIRECT_TO_CLIENT_END = 3999;

	  DISPATCHER_END = 3999;
    // 3000 ~ 3999, FROM DISPATCHER END
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 4000 ~ 4099, FOR MIGRATE START
    MIGRATE_INVALID = 0;

    MIGRATE_REQUEST = 4000;
    REAL_MIGRATE = 4001;
    QUERY_SPACE_GAMEID_FOR_MIGRATE = 4002;
    CANCEL_MIGRATE = 4003;

    MIGRATE_REQUEST_ACK = 4004;
    QUERY_SPACE_GAMEID_FOR_MIGRATE_ACK = 4005;
    // 4000 ~ 4099, FOR MIGRATE END
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
