package game

import (
	"World/network"
	pb "World/pb"
)

func Init() {

	network.RegisterMessage(uint16(pb.MSGID_MsgID_Logon_Request), pb.RequestLogon{}, LoginHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_ConnClose_Notice), pb.NoticeConnectionClose{}, ConnCloseHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_CreateClub_Request), pb.RequestCreateClub{}, CreateClubHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_ClubSnapshotList_Request), pb.RequestClubSnapshotList{}, ClubSnapshotListHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_JoinClub_Request), pb.RequestJoinClub{}, JoinClubHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_JoinClub_Reply), pb.ReplyJoinClub{}, JoinClubReplyHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_LeaveClub_Request), pb.RequestLeaveClub{}, LeaveClubHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_ClubCurrentBoard_Request), pb.RequestClubCurrentBoard{}, ClubCurrentBoardHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_ClubMemberSnapshotList_Request), pb.RequestClubMemberSnapshotList{}, ClubMemberSnapshotListHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_ModifyClubMember_Request), pb.RequestModifyClubMember{}, ModifyClubMemberHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_ModifyClubInfo_Request), pb.RequestModifyClubInfo{}, ModifyClubInfoHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_SearchClubInfo_Request), pb.RequestSearchClubInfo{}, SearchClubInfoHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_ClubCreaterInfo_Request), pb.RequestClubCreaterInfo{}, ClubCreaterInfoHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_SendMsg_Request), pb.RequestSendMsg{}, SendMsgHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_GetUserData_Request), pb.RequestGetUserData{}, GetUserDataHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_GetJackpotData_Request), pb.RequestGetJackpotData{}, GetJackpotDataHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_JackpotSetting_Request), pb.RequestJackpotSetting{}, JackpotSettingHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_SetJackpot_Request), pb.RequestSetJackpot{}, SetJackpotHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_RecoverJackpotSetting_Request), pb.RequestRecoverJackpotSetting{}, RecoverJackpotSettingHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_CurrentRoomJackpot_Request), pb.RequestCurrentRoomJackpot{}, CurrentRoomJackpotHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_JackpotAwardRecord_Request), pb.RequestJackpotAwardRecord{}, JackpotAwardRecordHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_JackpotInjectAmount_Request), pb.RequestJackpotInjectAmount{}, JackpotInjectAmountHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_HeartBeat_Request), pb.RequestHeartBeat{}, HeartBeatHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_CreateAlliance_Request), pb.RequestCreateAlliance{}, CreateAllianceHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_LeaveAlliance_Request), pb.RequestLeaveAlliance{}, LeaveAllianceHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_SearchAlliance_Request), pb.RequestSearchAllianceInfo{}, SearchAllianceHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_KickoffAllianceMember_Request), pb.RequestKickoffAllianceMember{}, KickoffAllianceMemberHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_AllianceList_Request), pb.RequestAllianceList{}, AllianceListHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_JoinAlliance_Request), pb.RequestJoinAlliance{}, JoinAllianceHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_JoinAllianceReply_To_World), pb.ReplyJoinAllianceToWorld{}, JoinAllianceReplyHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_AddRemarks_Request), pb.RequestAddRemarks{}, AddRemarksHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_GetAllRemarks_Request), pb.RequestGetAllRemarks{}, GetAllRemarksHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_ClearAllianceMaxBuyinLimit_Request), pb.RequestClearAllianceMaxBuyinLimit{}, ClearAllianceMaxBuyinLimitHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_SetAllianceMaxBuyinLimit_Request), pb.RequestSetAllianceMaxBuyinLimit{}, SetAllianceMaxBuyinLimitHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_SetAllianceControlBuyin_Request), pb.RequestSetAllianceControlBuyin{}, SetAllianceControlBuyinHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_FairPlay_Report_Request), pb.RequestFairPlayReport{}, FairPlayReportHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_DeviceInfo_Report_Request), pb.RequestDeviceInfoReport{}, DeviceInfoReportHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_GetIncome_Request), pb.RequestGetIncome{}, GetIncomeHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_GetUserClubGrantInfo_Request), pb.RequestGetUserClubGrantInfo{}, GetUserClubGrantInfoHandler)

	network.RegisterMessage(uint16(pb.MSGID_MsgID_GetUserMailListInfo_Request), pb.RequestGetUserMailList{}, GetUserMailListHandler)
	network.RegisterMessage(uint16(pb.MSGID_MsgID_ReadAndFetchOneMail_Request), pb.RequestFetchOneMail{}, FetchOneMailHandler)
}
