void OnAdventureBegin(C2G.AdventureBegin packet, C2G.AdventureBeginAck ack) { AdventureInfoManager.Instance.SetInfoDetail(ack.adventure_info); var team_data = TeamDataManager.Instance.GetTeam((pe_Team)m_Info.IDN); if (team_data != null) { team_data.Set(new TeamData(packet.team_data)); } else { TeamDataManager.Instance.AddTeam(new TeamData(packet.team_data), true); } TeamDataManager.Instance.UpdateAdventure(); parent.Close(true, true); }
void OnConfirm(bool is_confirm) { if (is_confirm) { pd_TeamData team_data = new pd_TeamData(); team_data.team_type = (pe_Team)m_Info.IDN; team_data.creature_infos = new List <pd_TeamCreature>(); team_data.no_duplicate = true; m_Selected.ForEach(c => team_data.creature_infos.Add(new pd_TeamCreature(c.Creature.Idx))); C2G.AdventureBegin packet = new C2G.AdventureBegin(); packet.map_id = m_Info.ID; packet.team_data = team_data; Network.GameServer.JsonAsync <C2G.AdventureBegin, C2G.AdventureBeginAck>(packet, OnAdventureBegin); return; } }