| | |
| | | using UnityEngine;
|
| | | using System;
|
| | | using TableConfig;
|
| | | using LitJson;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
| | | FriendsModel friendsModel { get { return ModelCenter.Instance.GetModel<FriendsModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | | public bool autoAcceptApplication {
|
| | | public bool autoAcceptApplication
|
| | | {
|
| | | get { return (PlayerDatas.Instance.baseData.ExAttr2 / 10) % 10 == 0; }
|
| | | set {
|
| | | set
|
| | | {
|
| | | var sendInfo = new CB904_tagCMChangeTeamCheckState();
|
| | | sendInfo.JoinReqCheck = (byte)(value ? 0 : 1);
|
| | | sendInfo.InviteCheck = (byte)(autoAcceptInvitation ? 0 : 1);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool autoAcceptInvitation {
|
| | | public bool autoAcceptInvitation
|
| | | {
|
| | | get { return PlayerDatas.Instance.baseData.ExAttr2 % 10 == 0; }
|
| | | set {
|
| | | set
|
| | | {
|
| | | if ((PlayerDatas.Instance.baseData.ExAttr2 % 10 == 0) != value)
|
| | | {
|
| | | var sendInfo = new CB904_tagCMChangeTeamCheckState();
|
| | |
| | | public Dictionary<int, TeamTargetPreference> targetPreferences = new Dictionary<int, TeamTargetPreference>();
|
| | |
|
| | | MyTeam m_MyTeam = new MyTeam();
|
| | | public MyTeam myTeam {
|
| | | public MyTeam myTeam
|
| | | {
|
| | | get { return m_MyTeam; }
|
| | | private set { m_MyTeam = value; }
|
| | | }
|
| | |
|
| | | TeamMission m_CurrentMission;
|
| | | public TeamMission currentMission {
|
| | | public TeamMission currentMission
|
| | | {
|
| | | get { return m_CurrentMission; }
|
| | | set {
|
| | | set
|
| | | {
|
| | | if (m_CurrentMission != value)
|
| | | {
|
| | | m_CurrentMission = value;
|
| | |
| | | }
|
| | |
|
| | | TeamMission m_MissionBuf = new TeamMission(CURRENTMAP_MISSION, 0);
|
| | | public TeamMission missionBuf {
|
| | | public TeamMission missionBuf
|
| | | {
|
| | | get { return m_MissionBuf; }
|
| | | set {
|
| | | set
|
| | | {
|
| | | m_MissionBuf = value;
|
| | | if (missionLevelLimitChangeEvent != null)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | int m_LevelMinBuf = 1;
|
| | | public int levelMinBuf {
|
| | | public int levelMinBuf
|
| | | {
|
| | | get { return m_LevelMinBuf; }
|
| | | set { m_LevelMinBuf = value; }
|
| | | }
|
| | |
|
| | | int m_LevelMaxBuf = 1;
|
| | | public int levelMaxBuf {
|
| | | public int levelMaxBuf
|
| | | {
|
| | | get { return m_LevelMaxBuf; }
|
| | | set { m_LevelMaxBuf = value; }
|
| | | }
|
| | |
|
| | | TeamInviteType m_CurrentInviteType = TeamInviteType.Friend;
|
| | | public TeamInviteType currentInviteType {
|
| | | public TeamInviteType currentInviteType
|
| | | {
|
| | | get { return m_CurrentInviteType; }
|
| | | private set { m_CurrentInviteType = value; }
|
| | | }
|
| | |
|
| | | int m_CurrentSelectedInvitation = 0;
|
| | | public int currentSelectedInvitation {
|
| | | public int currentSelectedInvitation
|
| | | {
|
| | | get { return m_CurrentSelectedInvitation; }
|
| | | set {
|
| | | set
|
| | | {
|
| | | if (m_CurrentSelectedInvitation != value)
|
| | | {
|
| | | m_CurrentSelectedInvitation = value;
|
| | |
| | | public DateTime matchingEndTime { get; private set; }
|
| | |
|
| | | bool m_IsMatching = false;
|
| | | public bool isMatching {
|
| | | public bool isMatching
|
| | | {
|
| | | get { return m_IsMatching; }
|
| | | set {
|
| | | set
|
| | | {
|
| | | if (m_IsMatching != value)
|
| | | {
|
| | | m_IsMatching = value;
|
| | |
| | | }
|
| | |
|
| | | DateTime m_PrepareBeginTime;
|
| | | public DateTime prepareBeginTime {
|
| | | public DateTime prepareBeginTime
|
| | | {
|
| | | get { return m_PrepareBeginTime; }
|
| | | private set { m_PrepareBeginTime = value; }
|
| | | }
|
| | |
|
| | | TeamPrepare m_TeamPreapare = new TeamPrepare();
|
| | | public TeamPrepare teamPrepare {
|
| | | public TeamPrepare teamPrepare
|
| | | {
|
| | | get { return m_TeamPreapare; }
|
| | | private set { m_TeamPreapare = value; }
|
| | | }
|
| | |
| | | levelRequirement = StringUtility.Contact(levelMin, "--", levelMax);
|
| | | }
|
| | |
|
| | | if (dungeonId != 0)
|
| | | {
|
| | | try
|
| | | {
|
| | | var json = JsonMapper.ToObject(GeneralConfig.Instance.teamWorldCall);
|
| | | if (json.Keys.Contains(dungeonId.ToString()))
|
| | | {
|
| | | var invite = false;
|
| | | var level = 1;
|
| | | var count = GeneralConfig.Instance.teamWorldCallInviteCount;
|
| | |
|
| | | switch (dungeonId)
|
| | | {
|
| | | case 311101:
|
| | | if (Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel).IsBigRealm == 1)
|
| | | {
|
| | | var index = 0;
|
| | | foreach (var item in Config.Instance.GetAllValues<RealmConfig>())
|
| | | {
|
| | | if (item.IsBigRealm == 1)
|
| | | {
|
| | | index++;
|
| | | }
|
| | |
|
| | | if (item.Lv == PlayerDatas.Instance.baseData.realmLevel)
|
| | | {
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | if (index <= 2)
|
| | | {
|
| | | invite = true;
|
| | | int.TryParse(json["311101"][index - 1].ToString(), out level);
|
| | | }
|
| | | }
|
| | | break;
|
| | | default:
|
| | | invite = true;
|
| | | int.TryParse(json[dungeonId.ToString()][0].ToString(), out level);
|
| | | break;
|
| | | }
|
| | |
|
| | | if (invite)
|
| | | {
|
| | | var sendInfo = new CB90A_tagCGInvitePlayerJoinTeamByLV();
|
| | | sendInfo.LVLimit = (ushort)level;
|
| | | sendInfo.InviteCnt = (byte)count;
|
| | | GameNetSystem.Instance.SendInfo(sendInfo);
|
| | | }
|
| | | }
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | Debug.Log(ex);
|
| | | }
|
| | | }
|
| | |
|
| | | var content = Language.Get("WorldInvite", missionName, levelRequirement);
|
| | | ChatCtrl.Inst.SendInvite(content);
|
| | |
|
| | | SysNotifyMgr.Instance.ShowTip("SendWorldMessage");
|
| | | }
|
| | | }
|