Merge remote-tracking branch 'origin/master' into Cross_Server
| | |
| | | public class BattleEffectPlayRule : Singleton<BattleEffectPlayRule> |
| | | { |
| | | public readonly List<uint> sortPlayerList = new List<uint>(); |
| | | public readonly List<uint> showPlayerList = new List<uint>(); |
| | | |
| | | public void AddPlayer(uint id) |
| | | { |
| | |
| | | } |
| | | sortPlayerList.Add(id); |
| | | SortList(); |
| | | |
| | | // 是否已经达到数量显示上限 |
| | | if (showPlayerList.Count < limit) |
| | | { |
| | | showPlayerList.Add(id); |
| | | } |
| | | } |
| | | |
| | | public void RemovePlayer(uint id) |
| | |
| | | sortPlayerList.Remove(id); |
| | | } |
| | | SortList(); |
| | | |
| | | if(showPlayerList.Contains(id)) |
| | | { |
| | | showPlayerList.Remove(id); |
| | | |
| | | for(int i = 0;i < sortPlayerList.Count;++i) |
| | | { |
| | | if(showPlayerList.Contains(sortPlayerList[i])) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | showPlayerList.Add(sortPlayerList[i]); |
| | | |
| | | break; |
| | | } |
| | | |
| | | GAMgr.Instance.OnPlayerSyncCountChange(); |
| | | } |
| | | } |
| | | |
| | | private int limit |
| | |
| | | }); |
| | | } |
| | | |
| | | public void Update() |
| | | { |
| | | if (Time.realtimeSinceStartup - timeEscape > .5f) |
| | | { |
| | | SortList(); |
| | | timeEscape = Time.realtimeSinceStartup; |
| | | } |
| | | } |
| | | public void Update() { } |
| | | |
| | | public int GetIndex(uint sid) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | if(!showPlayerList.Contains(sid)) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | // 获取传入的玩家在排序后的队列中的索引 |
| | | int _index = sortPlayerList.IndexOf(sid); |
| | | |
| | |
| | | GA_Player _player = null;
|
| | | for (int i = 0; i < m_ContaintList.Count; ++i)
|
| | | {
|
| | | _player = GAMgr.Instance.GetBySID(m_ContaintList[i]) as GA_Player;
|
| | | _player = GetBySID(m_ContaintList[i]) as GA_Player;
|
| | | if (_player == null)
|
| | | {
|
| | | continue;
|
| | |
| | | }
|
| | |
|
| | | UpdateOffLinePlayer();
|
| | |
|
| | | BattleEffectPlayRule.Instance.Update();
|
| | | }
|
| | |
|
| | | public void DoLateUpdate()
|
| | |
| | | // 读取配置表 |
| | | if (_playerId >= 1 && _playerId <= 100) |
| | | { |
| | | if (cacheMapDataId <= 0) |
| | | if (PlayerDatas.Instance.baseData.MapID == 31110) |
| | | { |
| | | cacheMapDataId = PlayerDatas.Instance.baseData.MapID * 10 + PlayerDatas.Instance.baseData.dungeonLineId; |
| | | cacheMapDataId = PlayerDatas.Instance.baseData.MapID * 10 + PlayerDatas.Instance.baseData.realmLevel; |
| | | } |
| | | else |
| | | { |
| | | if (cacheMapDataId <= 0) |
| | | { |
| | | cacheMapDataId = PlayerDatas.Instance.baseData.MapID * 10 + PlayerDatas.Instance.baseData.dungeonLineId; |
| | | } |
| | | } |
| | | var _config = Config.Instance.Get<TableConfig.DungeonHelpBattleConfig>(cacheMapDataId); |
| | | |
| | |
| | | ShowOrHideModel(_showOrHide);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | ShowEffect();
|
| | | }
|
| | | }
|
| | |
|
| | | public sealed override void ShowOrHideModel(bool showOrHide)
|
| | |
| | | { |
| | | _dict[_bones[i]] = int.Parse(_effects[i]); |
| | | |
| | | // Debug.LogFormat("设置特效配置: {0} => {1}", _bones[i], _dict[_bones[i]]); |
| | | // Debug.LogFormat("设置特效配置: {0} => {1}", _bones[i], _dict[_bones[i]]); |
| | | } |
| | | |
| | | effectDict[ResourcesName] = _dict; |
| | |
| | | {
|
| | | _result = string.Empty;
|
| | | }
|
| | | if (_chat.chatType == ChatInfoType.Fairy)
|
| | | {
|
| | | var model = ModelCenter.Instance.GetModel<DailyQuestModel>();
|
| | | if (model.GetQuestState((int)DailyQuestType.FairyFeast) == DailyQuestModel.DailyQuestState.Normal
|
| | | && PlayerDatas.Instance.baseData.MapID == 31230)
|
| | | {
|
| | | _result = Regex.Replace(_result, "[\x00-\x2F]|[\x3A-\x40]|[\x5B-\x60]|[\x7B-\x7E]", string.Empty);
|
| | | _result = _result.Replace("。", string.Empty);
|
| | | _result = _result.Replace(",", string.Empty);
|
| | | _result = _result.Replace(";", string.Empty);
|
| | | _result = _result.Replace("、", string.Empty);
|
| | | _result = _result.Replace("?", string.Empty);
|
| | | }
|
| | | }
|
| | | if (DirtyWordConfig.IsDirtWord(_result))
|
| | | {
|
| | | _result = DirtyWordConfig.IsDirtWord(_result, '*');
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | FriendsModel friendModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<FriendsModel>(); }
|
| | | }
|
| | |
|
| | | public Dictionary<ChatInfoType, List<string>> achievementRandoms = new Dictionary<ChatInfoType, List<string>>();
|
| | |
|
| | | private ChatCtrl()
|
| | |
| | | /// <param name="vNetData"></param>
|
| | | public void RevChatInfo(H0201_tagTalkGong vNetData)
|
| | | {
|
| | | if (friendModel.GetFirendInfo(vNetData.PlayerID, (byte)GroupType.Balcklist) != null)//黑名单拦截
|
| | | {
|
| | | return;
|
| | | }
|
| | | ChatData chatData = null;
|
| | | var content = vNetData.Content;
|
| | | if (IsInviteChat(vNetData.Content))
|
| | |
| | | /// <param name="vNetData"></param>
|
| | | public void RevChatInfo(H0207_tagTalkArea vNetData)
|
| | | {
|
| | | if (friendModel.GetFirendInfo(vNetData.PlayerID, (byte)GroupType.Balcklist) != null)//黑名单拦截
|
| | | {
|
| | | return;
|
| | | }
|
| | | ChatData chatData = new ChatAreaData(vNetData.Content, (int)vNetData.PlayerID, vNetData.SrcName, vNetData.Extras);
|
| | | LocalChatHistory.Save(chatData as ChatUeseData);
|
| | | KeepChatInfo(chatData);
|
| | |
| | | string fbName = string.Empty;
|
| | | if(mapId == 31110)
|
| | | {
|
| | | RealmConfig realmConfig = Config.Instance.Get<RealmConfig>(funcLineId);
|
| | | int realmLv = PlayerDatas.Instance.baseData.realmLevel;
|
| | | RealmConfig realmConfig = Config.Instance.Get<RealmConfig>(realmLv);
|
| | | string realmName = realmConfig != null ? realmConfig.Name : string.Empty;
|
| | | if(!string.IsNullOrEmpty(realmName))
|
| | | {
|
| | |
| | | Name = nPCConfig.charName;
|
| | | relatedToPlayer = RelatedToPlayer.None;
|
| | | int mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | int lineId = PlayerDatas.Instance.baseData.dungeonLineId;
|
| | | int lineId = 0;
|
| | | if(mapId != 31110)
|
| | | {
|
| | | lineId = PlayerDatas.Instance.baseData.dungeonLineId;
|
| | | }
|
| | | else
|
| | | {
|
| | | lineId = PlayerDatas.Instance.baseData.realmLevel;
|
| | | } |
| | | var battleConfig = assistModel.GetHelpBattleConfig(mapId,lineId);
|
| | | if(battleConfig != null)
|
| | | {
|
| | |
| | | private void CheckHelpPointExchange()
|
| | | {
|
| | | int pushId = exchageModel.currentShopId;
|
| | | m_HelpPointExchangeNotify.gameObject.SetActive(pushId != 0);
|
| | | if (pushId != 0)
|
| | | StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(pushId);
|
| | | if (pushId != 0 && storeConfig != null)
|
| | | {
|
| | | m_HelpPointExchangeNotify.gameObject.SetActive(true);
|
| | | m_HelpPointExchangeNotify.SetDisplay();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_HelpPointExchangeNotify.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | private void CheckRealmBetterEquip()
|
| | |
| | | GameObject Skillimage2;
|
| | | [SerializeField]
|
| | | GameObject Skillimage3;
|
| | | [SerializeField]
|
| | | GameObject Skillimage4;
|
| | | [SerializeField]
|
| | | GameObject Skillimage5;
|
| | | private float timePlay = 0;//坐骑动作播放时间
|
| | | List<GameObject> Skillimage = new List<GameObject>();
|
| | |
|
| | |
| | | private int pitchOnHorseID = 0;
|
| | | private void Start()
|
| | | {
|
| | | Skillimage.Clear();
|
| | | Skillimage.Add(Skillimage1);
|
| | | Skillimage.Add(Skillimage2);
|
| | | Skillimage.Add(Skillimage3);
|
| | | |
| | | m_NotUnlockButton.AddListener(OnClickNotUnlockButton);
|
| | | }
|
| | | private void OnEnable()
|
| | |
| | | }
|
| | | public void PanelAssignment(int mountID)
|
| | | {
|
| | | SetSkillimage();
|
| | | pitchOnHorseID = mountID;
|
| | | MountAttribute(mountID);
|
| | | PanelClassify(mountID);
|
| | |
| | | }
|
| | | return fightNum;
|
| | | }
|
| | |
|
| | | private void SetSkillimage()
|
| | | {
|
| | | if (Skillimage.Count <= 0)
|
| | | {
|
| | | Skillimage.Clear();
|
| | | Skillimage.Add(Skillimage1);
|
| | | Skillimage.Add(Skillimage2);
|
| | | Skillimage.Add(Skillimage3);
|
| | | Skillimage.Add(Skillimage4);
|
| | | Skillimage.Add(Skillimage5);
|
| | | }
|
| | | } |
| | | }
|
| | |
|
| | | }
|
| | |
| | | case FlashRushToBuyModel.FlashRushToBuySate.NoOpen:
|
| | | break;
|
| | | case FlashRushToBuyModel.FlashRushToBuySate.InAdvance:
|
| | |
|
| | | int saleDay = operation.startDate.day + saleShop.dayIndex;
|
| | | int offsetDay = saleDay - TimeUtility.ServerNow.Day;
|
| | | var operationDate = operation.startDate.AddDays(saleShop.dayIndex);
|
| | | DateTime openTime = new DateTime(operationDate.year,operationDate.month,operationDate.day);
|
| | | int offsetDay = Mathf.CeilToInt((float)(openTime - TimeUtility.ServerNow).TotalDays);
|
| | | if(offsetDay > 1)
|
| | | {
|
| | | string saleDate = StringUtility.Contact(operation.startDate.month, Language.Get("Month"),saleDay,Language.Get("Day"));
|
| | | string saleDate = StringUtility.Contact(operationDate.month, Language.Get("Month"), operationDate.day,Language.Get("Day"));
|
| | | timeText.text = saleDate;
|
| | | }
|
| | | else if(offsetDay == 1)
|
| | |
| | |
|
| | | int seconds = 0;
|
| | | OperationTime operationTime = operation.times[timeIndex];
|
| | | var date = operation.startDate;
|
| | | int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, dayIndex, timeIndex, out seconds);
|
| | | var operationDate = operation.startDate.AddDays(dayIndex);
|
| | | switch (buyState)
|
| | | {
|
| | | case -1:
|
| | | string timeStr = "";
|
| | | if(seconds > 7200)
|
| | | {
|
| | | timeStr = operation.ToDisplayBuyTime(date.month, dayIndex + date.day, operationTime.startHour, operationTime.startMinute);
|
| | | timeStr = operation.ToDisplayBuyTime(operationDate.month, operationDate.day, operationTime.startHour, operationTime.startMinute);
|
| | | remainText.text = Language.Get("FlashRushToBuy106", timeStr);
|
| | | }
|
| | | else
|
| | |
| | | public int GetBuyTimeState(DateTime time,int dayIndex,int timeIndex,out int seconds)
|
| | | {
|
| | | seconds = 0;
|
| | | int day = startDate.day + dayIndex;
|
| | | var operationDate = startDate.AddDays(dayIndex);
|
| | | OperationTime operationTime = times[timeIndex];
|
| | | var startTime = new DateTime(startDate.year, startDate.month,day, operationTime.startHour, operationTime.startMinute,0);
|
| | | var endTime = new DateTime(startDate.year, startDate.month,day, operationTime.endHour, operationTime.endMinute, 0);
|
| | | var startTime = new DateTime(operationDate.year, operationDate.month, operationDate.day, operationTime.startHour, operationTime.startMinute,0);
|
| | | var endTime = new DateTime(operationDate.year, operationDate.month, operationDate.day, operationTime.endHour, operationTime.endMinute, 0);
|
| | | int advanceSec = Mathf.CeilToInt((float)(startTime - time).TotalSeconds);
|
| | | int endSec = Mathf.CeilToInt((float)(endTime - time).TotalSeconds);
|
| | | if (advanceSec > 0)
|
| | |
| | | GameObject Skillimage2;
|
| | | [SerializeField]
|
| | | GameObject Skillimage3;
|
| | |
|
| | | [SerializeField]
|
| | | GameObject Skillimage4;
|
| | | [SerializeField]
|
| | | GameObject Skillimage5;
|
| | | [SerializeField] UIEffect m_UIeffect2;//经验条特效
|
| | | private int typePetID = 0;
|
| | | private float timePlay = 0;//灵宠动作播放时间
|
| | |
| | | private void OnEnable()
|
| | | {
|
| | | timePlay = 0;
|
| | | Skillimage.Clear();
|
| | | Skillimage.Add(Skillimage1);
|
| | | Skillimage.Add(Skillimage2);
|
| | | Skillimage.Add(Skillimage3);
|
| | | |
| | | isAutoTrain = false;
|
| | | breakLockBtn.AddListener(ClickBreakBtn);
|
| | | petAutoTrainBtn.AddListener(ClickPetAutoTrainBtn);
|
| | |
| | |
|
| | | public void ModelShow(int PetID)
|
| | | {
|
| | | SetSkillimage();
|
| | | petmodel.curPetId = PetID;
|
| | | isAutoTrain = false;
|
| | | petInfoConfig = Config.Instance.Get<PetInfoConfig>(PetID);
|
| | |
| | | FragmentUnlockTip.SetActive(false);
|
| | | FullAttTip.SetActive(true);
|
| | | }
|
| | | private void SetSkillimage()
|
| | | {
|
| | | if (Skillimage.Count <= 0)
|
| | | {
|
| | | Skillimage.Add(Skillimage1);
|
| | | Skillimage.Add(Skillimage2);
|
| | | Skillimage.Add(Skillimage3);
|
| | | Skillimage.Add(Skillimage4);
|
| | | Skillimage.Add(Skillimage5);
|
| | | } |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | var skinnedMeshRenderer = clothesModel.GetComponentInChildren<SkinnedMeshRenderer>(true);
|
| | |
|
| | | var mat = MaterialLoader.LoadClothesMaterial(resID, false, IsSuit(job, resID));
|
| | | skinnedMeshRenderer.material = mat;
|
| | | if (mat)
|
| | | {
|
| | | skinnedMeshRenderer.material = mat;
|
| | | }
|
| | |
|
| | | LayerUtility.SetLayer(skinnedMeshRenderer.gameObject, LayerUtility.Player, false);
|
| | | clothesModel.SetActive(true);
|
| | |
| | | int m_NPCId = 0;
|
| | | GameObject npcModel = null;
|
| | | SFXController m_NpcEffect;
|
| | | readonly List<SFXController> m_BindEffectList = new List<SFXController>();
|
| | | public GameObject NpcModelPet
|
| | | {
|
| | | get { return npcModel; }
|
| | |
| | | }
|
| | |
|
| | | instance.SetActive(true);
|
| | |
|
| | | if (npcModel)
|
| | | {
|
| | | ShowNpcEffect(npcModel.transform, config.MODE);
|
| | | }
|
| | |
|
| | | ResetCameraColor(_gray);
|
| | | m_CameraColor.saturation = _gray ? 0.08f : 1f;
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void ShowNpcEffect(Transform parent, string modelName)
|
| | | {
|
| | | HideNpcEffect();
|
| | |
|
| | | var _dict = ModelResConfig.GetEffectDict(modelName);
|
| | | if (_dict != null)
|
| | | {
|
| | | foreach (var _bone in _dict.Keys)
|
| | | {
|
| | | var _ctrl = SFXPlayUtility.Instance.PlayBattleEffect(_dict[_bone], parent.GetChildTransformDeeply(_bone));
|
| | | m_BindEffectList.Add(_ctrl);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void HideNpcEffect()
|
| | | {
|
| | | foreach (var _ctrl in m_BindEffectList)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(_ctrl);
|
| | | }
|
| | | m_BindEffectList.Clear();
|
| | | }
|
| | | }
|
| | |
|
| | | public struct UI3DPlayerExhibitionData
|