PTO_C2C_SIGNUP                              = enum_reset()
PTO_C2C_LOGIN                               = enum_next()
PTO_C2C_LOGOUT                              = enum_next()
PTO_C2C_MOVE_TO_POS                             = enum_next()
PTO_C2C_PLAYER_ENTER                                = enum_next()
PTO_C2C_ACTOR_ENTER                               = enum_next()
PTO_C2C_CHAT                                = enum_next()
PTO_C2C_SAVE_ACTORS                             = enum_next()
PTO_C2C_SAVE_ACCOUNT_DATABASE                               = enum_next()
PTO_C2S_COMBAT_START                                = enum_next()
PTO_S2C_COMBAT_START                                = enum_next()
PTO_S2C_COMBAT_EXECUTE                              = enum_next()
PTO_C2S_COMBAT_CMD                              = enum_next()
PTO_S2C_SYNC_PROPS                              = enum_next()
PTO_C2S_NPC_DIALOG                              = enum_next()
PTO_S2C_NPC_DIALOG                              = enum_next()
PTO_C2S_DOSTRING                                = enum_next()
PTO_C2S_PLAYER_DOSTRING                             = enum_next()
PTO_C2S_ACTOR_DOSTRING                              = enum_next()
PTO_C2S_CREATE_PLAYER                               = enum_next()
PTO_C2S_CLICK_NPC                               = enum_next()
PTO_S2C_CLICK_NPC                               = enum_next()
PTO_C2S_TEAM_CREATE                             = enum_next()
PTO_S2C_TEAM_CREATE                             = enum_next()
PTO_C2S_TEAM_ENTER_TEAM                             = enum_next()
PTO_C2S_TEAM_LEAVE_TEAM                             = enum_next()
PTO_C2S_TEAM_CHANGE_LEADER                              = enum_next()
PTO_C2S_TEAM_DISMISS                                = enum_next()
PTO_S2C_TEAM_DISMISS                                = enum_next()
PTO_C2S_TEAM_ADD_MEMBER                             = enum_next()
PTO_S2C_TEAM_ADD_MEMBER                             = enum_next()
PTO_C2S_TEAM_REMOVE_MEMBER                              = enum_next()
PTO_S2C_TEAM_REMOVE_MEMBER                              = enum_next()
PTO_C2S_FETCH_TEAM                              = enum_next()
PTO_S2C_FETCH_TEAM                              = enum_next()
PTO_C2S_COMBAT_LEAVE_BATTLE                             = enum_next()
PTO_S2C_COMBAT_LEAVE_BATTLE                             = enum_next()
PTO_C2S_COMBAT_END_BATTLE                               = enum_next()
PTO_S2C_COMBAT_END_BATTLE                               = enum_next()
PTO_C2S_CREATE_SUMMON                               = enum_next()
PTO_S2C_CREATE_SUMMON_RESP                              = enum_next()
PTO_C2S_FETCH_SUMMON                                = enum_next()
PTO_S2C_FETCH_SUMMON_RESP                               = enum_next()
PTO_C2S_GM                              = enum_next()
PTO_S2C_GM                              = enum_next()
PTO_C2S_SWITCH_SCENE                                = enum_next()
PTO_S2C_SWITCH_SCENE                                = enum_next()
PTO_C2S_FETCH_ACCOUNT_INFO                              = enum_next()
PTO_C2S_COMBAT_CREATE                               = enum_next()
PTO_S2C_COMBAT_CREATE                               = enum_next()
PTO_C2S_CREATE_ACTOR                                = enum_next()
PTO_S2C_CREATE_ACTOR                                = enum_next()
PTO_C2S_DELETE_ACTOR                                = enum_next()
PTO_S2C_DELETE_ACTOR                                = enum_next()
PTO_C2S_SAVE_ACTOR                              = enum_next()
PTO_S2C_SAVE_ACTOR                              = enum_next()
PTO_C2S_PVE_BATTLE_START                                = enum_next()
PTO_S2C_PVE_BATTLE_START                                = enum_next()

PTO_C2S_COMBAT_PVE_START                                = enum_next()
PTO_S2C_COMBAT_PVE_START                                = enum_next()

PTO_C2S_COMBAT_PVP_START                                = enum_next()
PTO_S2C_COMBAT_PVP_START                                = enum_next()



local proto_to_name = {
    [PTO_C2C_SIGNUP] = 'PTO_C2C_SIGNUP',
    [PTO_C2C_LOGIN] = 'PTO_C2C_LOGIN',
    [PTO_C2C_LOGOUT] = 'PTO_C2C_LOGOUT',
    [PTO_C2C_MOVE_TO_POS] = 'PTO_C2C_MOVE_TO_POS',
    [PTO_C2C_PLAYER_ENTER] = 'PTO_C2C_PLAYER_ENTER',
    [PTO_C2C_ACTOR_ENTER] = 'PTO_C2C_ACTOR_ENTER',
    [PTO_C2C_CHAT] = 'PTO_C2C_CHAT',
    [PTO_C2C_SAVE_ACTORS] = 'PTO_C2C_SAVE_ACTORS',
    [PTO_C2C_SAVE_ACCOUNT_DATABASE] = 'PTO_C2C_SAVE_ACCOUNT_DATABASE',
    [PTO_C2S_COMBAT_START] = 'PTO_C2S_COMBAT_START',
    [PTO_S2C_COMBAT_START] = 'PTO_S2C_COMBAT_START',
    [PTO_S2C_COMBAT_EXECUTE] = 'PTO_S2C_COMBAT_EXECUTE',
    [PTO_C2S_COMBAT_CMD] = 'PTO_C2S_COMBAT_CMD',
    [PTO_S2C_SYNC_PROPS] = 'PTO_S2C_SYNC_PROPS',
    [PTO_C2S_NPC_DIALOG] = 'PTO_C2S_NPC_DIALOG',
    [PTO_S2C_NPC_DIALOG] = 'PTO_S2C_NPC_DIALOG',
    [PTO_C2S_DOSTRING] = 'PTO_C2S_DOSTRING',
    [PTO_C2S_PLAYER_DOSTRING] = 'PTO_C2S_PLAYER_DOSTRING',
    [PTO_C2S_ACTOR_DOSTRING] = 'PTO_C2S_ACTOR_DOSTRING',
    [PTO_C2S_CREATE_PLAYER] = 'PTO_C2S_CREATE_PLAYER',
    [PTO_C2S_CLICK_NPC] = 'PTO_C2S_CLICK_NPC',
    [PTO_S2C_CLICK_NPC] = 'PTO_S2C_CLICK_NPC',
    [PTO_C2S_TEAM_CREATE] = 'PTO_C2S_TEAM_CREATE',
    [PTO_S2C_TEAM_CREATE] = 'PTO_S2C_TEAM_CREATE',
    [PTO_C2S_TEAM_ENTER_TEAM] = 'PTO_C2S_TEAM_ENTER_TEAM',
    [PTO_C2S_TEAM_LEAVE_TEAM] = 'PTO_C2S_TEAM_LEAVE_TEAM',
    [PTO_C2S_TEAM_CHANGE_LEADER] = 'PTO_C2S_TEAM_CHANGE_LEADER',
    [PTO_C2S_TEAM_DISMISS] = 'PTO_C2S_TEAM_DISMISS',
    [PTO_S2C_TEAM_DISMISS] = 'PTO_S2C_TEAM_DISMISS',
    [PTO_C2S_TEAM_ADD_MEMBER] = 'PTO_C2S_TEAM_ADD_MEMBER',
    [PTO_S2C_TEAM_ADD_MEMBER] = 'PTO_S2C_TEAM_ADD_MEMBER',
    [PTO_C2S_TEAM_REMOVE_MEMBER] = 'PTO_C2S_TEAM_REMOVE_MEMBER',
    [PTO_S2C_TEAM_REMOVE_MEMBER] = 'PTO_S2C_TEAM_REMOVE_MEMBER',
    [PTO_C2S_FETCH_TEAM] = 'PTO_C2S_FETCH_TEAM',
    [PTO_S2C_FETCH_TEAM] = 'PTO_S2C_FETCH_TEAM',
    [PTO_C2S_COMBAT_LEAVE_BATTLE] = 'PTO_C2S_COMBAT_LEAVE_BATTLE',
    [PTO_S2C_COMBAT_LEAVE_BATTLE] = 'PTO_S2C_COMBAT_LEAVE_BATTLE',
    [PTO_C2S_COMBAT_END_BATTLE] = 'PTO_C2S_COMBAT_END_BATTLE',
    [PTO_S2C_COMBAT_END_BATTLE] = 'PTO_S2C_COMBAT_END_BATTLE',
    [PTO_C2S_CREATE_SUMMON] = 'PTO_C2S_CREATE_SUMMON',
    [PTO_S2C_CREATE_SUMMON_RESP] = 'PTO_S2C_CREATE_SUMMON_RESP',
    [PTO_C2S_FETCH_SUMMON] = 'PTO_C2S_FETCH_SUMMON',
    [PTO_S2C_FETCH_SUMMON_RESP] = 'PTO_S2C_FETCH_SUMMON_RESP',
    [PTO_C2S_GM] = 'PTO_C2S_GM',
    [PTO_S2C_GM] = 'PTO_S2C_GM',
    [PTO_C2S_SWITCH_SCENE] = 'PTO_C2S_SWITCH_SCENE',
    [PTO_S2C_SWITCH_SCENE] = 'PTO_S2C_SWITCH_SCENE',
    [PTO_C2S_FETCH_ACCOUNT_INFO] = 'PTO_C2S_FETCH_ACCOUNT_INFO',
    [PTO_C2S_COMBAT_CREATE] = 'PTO_C2S_COMBAT_CREATE',
    [PTO_S2C_COMBAT_CREATE] = 'PTO_S2C_COMBAT_CREATE',
    [PTO_C2S_CREATE_ACTOR] = 'PTO_C2S_CREATE_ACTOR',
    [PTO_S2C_CREATE_ACTOR] = 'PTO_S2C_CREATE_ACTOR',
    [PTO_C2S_DELETE_ACTOR] = 'PTO_C2S_DELETE_ACTOR',
    [PTO_S2C_DELETE_ACTOR] = 'PTO_S2C_DELETE_ACTOR',
    [PTO_C2S_SAVE_ACTOR] = 'PTO_C2S_SAVE_ACTOR',
    [PTO_S2C_SAVE_ACTOR] = 'PTO_S2C_SAVE_ACTOR',
    [PTO_C2S_PVE_BATTLE_START] = 'PTO_C2S_PVE_BATTLE_START',
    [PTO_S2C_PVE_BATTLE_START] = 'PTO_S2C_PVE_BATTLE_START',
    [PTO_C2S_COMBAT_PVE_START] = 'PTO_C2S_COMBAT_PVE_START',
    [PTO_S2C_COMBAT_PVE_START] = 'PTO_S2C_COMBAT_PVE_START',
    [PTO_C2S_COMBAT_PVP_START] = 'PTO_C2S_COMBAT_PVP_START',
    [PTO_S2C_COMBAT_PVP_START] = 'PTO_S2C_COMBAT_PVP_START'
}

function proto_name(proto)
    return proto_to_name[proto] or proto
end