Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | public int pkState;//是否在pk中 175 1--进入状态 2--退出状态
|
| | | public int bossState;//Boss状态 176 1--进入状态 2--退出状态
|
| | | public int OnlyFinalHurt;
|
| | | public int forbidenTalk;
|
| | | public int NpcHurtAddPer;//对怪物伤害加成 188
|
| | | public int FunalHurtPer;//对怪物伤害加成 189
|
| | | } |
| | |
| | | case PlayerDataRefresh.FunalHurtPer:
|
| | | extersion.FunalHurtPer = (int)value;
|
| | | break;
|
| | | case PlayerDataRefresh.CDBPlayerRefresh_ForbidenTalk:
|
| | | extersion.forbidenTalk = (int)value;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | const string downloadUrl = "http://{0}.voice.2460web.com:53001/voice/download";
|
| | | private void SendSpeech(byte[] encode, long _tick)
|
| | | {
|
| | | if (IsChatBanned)
|
| | | {
|
| | | SaveSpeech((int)PlayerDatas.Instance.PlayerId, _tick, encode);
|
| | | return;
|
| | | }
|
| | | VoiceHttpRequest.Instance.Enqueue(encode, _tick, (int)PlayerDatas.Instance.PlayerId);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 聊天黑名单
|
| | |
|
| | | public string SetChatExtra()
|
| | | {
|
| | | var vipLevel = PlayerDatas.Instance.baseData.VIPLv;
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | return StringUtility.Contact(vipLevel.ToString().PadLeft(2, '0'), 0, job);
|
| | | }
|
| | |
|
| | | public void HandleChatBanned(ChatInfoType channel, string message, int toPlayer)
|
| | | {
|
| | | if (IsChatBanned)
|
| | | {
|
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | var playerName = UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName);
|
| | | switch (channel)
|
| | | {
|
| | | case ChatInfoType.World:
|
| | | ChatCtrl.Inst.RevChatInfo(new H0201_tagTalkGong()
|
| | | {
|
| | | Content = message,
|
| | | Extras = SetChatExtra(),
|
| | | PlayerID = playerId,
|
| | | Name = playerName,
|
| | | });
|
| | | break;
|
| | | case ChatInfoType.Area:
|
| | | ChatCtrl.Inst.RevChatInfo(new H0207_tagTalkArea()
|
| | | {
|
| | | Content = message,
|
| | | Extras = SetChatExtra(),
|
| | | PlayerID = playerId,
|
| | | SrcName = playerName,
|
| | | });
|
| | | break;
|
| | | case ChatInfoType.Team:
|
| | | ChatCtrl.Inst.RevChatInfo(new H0205_tagTalkDui()
|
| | | {
|
| | | PlayerID = playerId,
|
| | | Name = playerName,
|
| | | Content = message,
|
| | | Extras = SetChatExtra(),
|
| | | });
|
| | | break;
|
| | | case ChatInfoType.Fairy:
|
| | | ChatCtrl.Inst.RevChatInfo(new H0203_tagTalkBang()
|
| | | {
|
| | | PlayerID = playerId,
|
| | | Content = message,
|
| | | Extras = SetChatExtra(),
|
| | | Name = playerName,
|
| | | });
|
| | | break;
|
| | | case ChatInfoType.Friend:
|
| | | ChatCtrl.Inst.RevChatInfo(new H0206_tagTalkMi()
|
| | | {
|
| | | PlayerID = playerId,
|
| | | SrcName = playerName,
|
| | | Content = message,
|
| | | Extras = SetChatExtra(),
|
| | | ToPlayerID = (uint)toPlayer,
|
| | | ToName = string.Empty,
|
| | | TalkType = 1,
|
| | | });
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsChatBanned
|
| | | {
|
| | | get
|
| | | {
|
| | | var value = PlayerDatas.Instance.extersion.forbidenTalk;
|
| | | var serverBanned = value == 1;
|
| | | return serverBanned;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | try
|
| | | {
|
| | | if (chatCenter.IsChatBanned)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var channelName = string.Empty;
|
| | | switch (chatType)
|
| | | {
|
| | |
| | |
|
| | | public void SendChatInfo(ChatInfoType type, string msg, ChatExtraData? info = null)
|
| | | {
|
| | | bool _dirty = false;
|
| | | bool isDirty = false;
|
| | | bool isVoice = ChatCenter.s_VoiceRegex.IsMatch(msg);
|
| | |
|
| | | if (CheckEmptyChat(msg))
|
| | | {
|
| | |
| | |
|
| | | ChatReport(type, msg, PteChatName);
|
| | |
|
| | | if (!ChatCenter.s_VoiceRegex.IsMatch(msg)
|
| | | && !InviteRegex.IsMatch(msg))
|
| | | if (!isVoice && !InviteRegex.IsMatch(msg))
|
| | | {
|
| | | _dirty = DirtyWordConfig.IsDirtWord(msg);
|
| | | isDirty = DirtyWordConfig.IsDirtWord(msg);
|
| | | msg = DirtyWordConfig.IsDirtWord(msg, '*');
|
| | | var length = msg.Length;
|
| | | if (length > CHAT_INFO_CNT)
|
| | |
| | | if (ok)
|
| | | {
|
| | | ChatCenter.RecentlyChat _recentlyChat = null;
|
| | | if (!_dirty)
|
| | | if (!isDirty && !isVoice)
|
| | | {
|
| | | _recentlyChat = chatCenter.SaveRecentlyChat(result);
|
| | | }
|
| | | msg = CheckHasItem(result, _recentlyChat);
|
| | | chatCenter.recentlyChat = null;
|
| | |
|
| | | if (chatCenter.IsChatBanned)
|
| | | {
|
| | | var toPlayer = PteChatID;
|
| | | if (info.HasValue && info.Value.infoint1 == 0)
|
| | | {
|
| | | toPlayer = info.Value.infoint1;
|
| | | }
|
| | | chatCenter.HandleChatBanned(type, msg, toPlayer);
|
| | | return;
|
| | | }
|
| | |
|
| | | switch (type)
|
| | | {
|
| | | case ChatInfoType.World:
|
| | |
| | | _pak.Text = msg;
|
| | | GameNetSystem.Instance.SendInfo(_pak);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case ChatInfoType.Invite:
|
| | | {
|
| | | SendInvite(msg);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | ItemConfig cfg = Config.Instance.Get<ItemConfig>(itemID);
|
| | | if (cfg != null)
|
| | | {
|
| | | string append = string.Format("<a><Word info=item id={1} userdata={5} chatsend=1/>|showitem={1} isbind={2} itemcnt={3} stone={4} userdata={5} suitLv={6} suitCnt={7} place={8} equipwash={9}</a>",
|
| | | cfg.ItemColor, strarray[0], strarray[1], strarray[2], strarray[3], strarray[4], strarray[5], strarray[6], strarray[7], strarray[8]);
|
| | | append = UIHelper.GetTextColorByItemColor(cfg.ItemColor, append);
|
| | | data.richText.Append(append);
|
| | | try
|
| | | {
|
| | | string append = string.Format("<a><Word info=item id={0} userdata={4} chatsend=1/>|showitem={0} isbind={1} itemcnt={2} stone={3} userdata={4} suitLv={5} suitCnt={6} place={7} equipwash={8}</a>",
|
| | | strarray[0], strarray[1], strarray[2], strarray[3], strarray[4], strarray[5], strarray[6], strarray[7], strarray[8]);
|
| | | append = UIHelper.GetTextColorByItemColor(cfg.ItemColor, append);
|
| | | data.richText.Append(append);
|
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | data.richText.Append(cfg.ItemName);
|
| | | DebugEx.Log(e.Message);
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | SinglePackModel singlePack = _packModel.GetSinglePackModel(PackType.rptItem);
|
| | | if (ChatCtrl.Inst.presentChatType == ChatInfoType.Trumpet)
|
| | | {
|
| | | if (chatCenter.IsChatBanned)
|
| | | {
|
| | | return;
|
| | | }
|
| | | List<ItemModel> _list = null;
|
| | | var _count = singlePack.GetItemCountByID(chatCenter.bugleItem, out _list);
|
| | | if (_count < 1)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool CheckIsComposeByType(int firstType,int secondType,int thirdType)
|
| | | {
|
| | | ItemCompoundConfig itemCompound = GetThirdTypeModellist(firstType,secondType,thirdType)[0];
|
| | | if (itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("TicketComposeUnlock", itemCompound.levelNeed, itemCompound.secondTypeName);
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | | public int secondType { get; private set; }
|
| | | public int thirdType { get; private set;}
|
| | | public void SetJumpToModel(ComposeFuncType type,int secondType,int thirdType)
|
| | |
| | | {
|
| | | OperationFlashSale operation = operationBase as OperationFlashSale;
|
| | | m_OpreationTime.text = StringUtility.Contact(Language.Get("ExpActivity_Text1"), operation.ToDisplayTime());
|
| | | m_RefreshGiftTime.gameObject.SetActive(operation.allDay);
|
| | | m_RefreshGiftTime.gameObject.SetActive(operation.allDay && operation.dayReset);
|
| | | OperationFlashSale.FlashSale flashSale;
|
| | | if (operation.TryGetFlashSale(TimeUtility.ServerNow, out flashSale))
|
| | | {
|
| | |
| | |
|
| | | if (!isMax)
|
| | | {
|
| | | AutoSelectPotentialBook();
|
| | | DisplayUpgradeCost();
|
| | | DisplayGetSkill();
|
| | | DisplaySuccessRatio();
|
| | |
| | | var isMax = level >= config.SkillMaxLV;
|
| | | if (!isMax)
|
| | | {
|
| | | DisplayPotentialBook(0);
|
| | | AutoSelectPotentialBook();
|
| | | DisplayPotentialBook(model.selectedPotentialBook);
|
| | | }
|
| | |
|
| | | model.onPotentialLevelUpResultEvent -= OnPotentialLevelUp;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void AutoSelectPotentialBook()
|
| | | {
|
| | | var potential = m_Treasure.GetPotential(model.selectedPotential);
|
| | | if (potential == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var levelUpType = model.GetSkillLevelUpType(potential.id);
|
| | | var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
|
| | | var config = Config.Instance.Get<TreasureSkillConfig>(levelupId);
|
| | | if (config == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var itemId = config.Meterial2ID.Length > 0 ? config.Meterial2ID[0] : 0;
|
| | | if (itemId != 0)
|
| | | {
|
| | | var own = playerPack.GetItemCountByID(PackType.rptItem, itemId);
|
| | | var need = config.MeterialNum2[0];
|
| | | var rate = config.Rate[0];
|
| | | if (rate >= 60 && own >= need)
|
| | | {
|
| | | model.selectedPotentialBook = itemId;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayUpgradeCost()
|
| | | {
|
| | | var potential = m_Treasure.GetPotential(selectedPotential);
|
| | |
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | | TrialDungeonModel trialDungeonModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
|
| | | ImpactRankModel rankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } }
|
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
|
| | |
|
| | | public bool IsJumpState { get; private set; }
|
| | | private int jumpPhase = 0;
|
| | |
| | | break;
|
| | | case JumpUIType.OpenServerGift:
|
| | | return;
|
| | | case JumpUIType.EquipCompose1:
|
| | | case JumpUIType.EquipCompose2:
|
| | | case JumpUIType.EquipCompose3:
|
| | | case JumpUIType.EquipCompose4:
|
| | | case JumpUIType.ComposeTicketFairy:
|
| | | case JumpUIType.ComposeTicketGod:
|
| | | case JumpUIType.ComposeTicketIce:
|
| | | int[] types = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
|
| | | if (types.Length > 0)
|
| | | {
|
| | | if (!composeModel.CheckIsComposeByType(_tagWinSearchModel.TABID+1,types[0],types[1]))
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | DebugEx.Log("WindowJumpTo" + jumpType);
|
| | |
| | | case JumpUIType.StrengthFunc3:
|
| | | case JumpUIType.StrengthFunc4:
|
| | | case JumpUIType.StrengthFunc5:
|
| | | case JumpUIType.EquipWashType2:
|
| | | case JumpUIType.StrengthFunc1Type2:
|
| | | case JumpUIType.EquipSuitType2:
|
| | | SetJumpLogic<EquipReinforceWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.ComposeFunc1:
|
| | |
| | | case JumpUIType.TicketCompose1:
|
| | | case JumpUIType.TicketCompose2:
|
| | | SetJumpLogic<ComposeWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.EquipCompose1:
|
| | | case JumpUIType.EquipCompose2:
|
| | | case JumpUIType.EquipCompose3:
|
| | | case JumpUIType.EquipCompose4:
|
| | | int[] types = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
|
| | | if(types.Length > 0)
|
| | | {
|
| | | composeModel.SetJumpToModel((ComposeFuncType)_tagWinSearchModel.TABID + 1,types[0],types[1]);
|
| | | SetJumpLogic<ComposeWin>(_tagWinSearchModel.TABID);
|
| | | }
|
| | | break;
|
| | | case JumpUIType.RuneFunc1:
|
| | | case JumpUIType.RuneFunc2:
|
| | |
| | | break;
|
| | | case JumpUIType.PetFunc1:
|
| | | case JumpUIType.PetFunc2:
|
| | | case JumpUIType.MountType2:
|
| | | case JumpUIType.FairyGrabBoss:
|
| | | SetJumpLogic<PetWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | |
| | | case JumpUIType.ComposeTicketFairy:
|
| | | case JumpUIType.ComposeTicketGod:
|
| | | case JumpUIType.ComposeTicketIce:
|
| | | var composeModel = ModelCenter.Instance.GetModel<ComposeWinModel>();
|
| | | int[] composeTypelist = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
|
| | | composeModel.SetJumpToModel((ComposeFuncType)_tagWinSearchModel.TABID + 1, composeTypelist[0], composeTypelist[1]);
|
| | | SetJumpLogic<ComposeWin>(_tagWinSearchModel.TABID);
|
| | |
| | | StrengthFunc2 = 13,
|
| | | StrengthFunc3 = 14,
|
| | | StrengthFunc4 = 15,
|
| | | EquipSuitType2 = 241, //套装界面
|
| | | StrengthFunc5 = 16,
|
| | | EquipWashType2 = 239, //装备洗练界面
|
| | | ComposeFunc1 = 17,
|
| | | ComposeFunc2 = 18,
|
| | | ComposeFunc3 = 19,
|
| | |
| | | UnionFunc5 = 31,
|
| | | PetFunc1 = 32,
|
| | | PetFunc2 = 33,
|
| | | MountType2 = 240,//坐骑界面
|
| | | PetStone = 34,
|
| | | Treasure = 35,
|
| | | WorldChat = 38,
|
| | |
| | | Kylin5= 232,//麒麟之府的5层
|
| | | Kylin6 = 233,//麒麟之府的6层
|
| | | PrayforDrug = 234, //炼丹祈福(太上老君的馈赠)
|
| | | EquipCompose1 = 235, //装备合成-龙魂红二
|
| | | EquipCompose2 = 236, //装备合成-龙魂红三
|
| | | EquipCompose3 = 237, //装备合成-灵瑶红二
|
| | | EquipCompose4 = 238, //装备合成-灵瑶红三
|
| | | DhszTs = 1001,//定海神针功法提升界面
|
| | | HyqTs = 1002,//皓月枪功法提升界面
|
| | | GyzTs = 1003,//鬼牙刃功法提升界面
|
| | |
| | | BasicsScoreAHit = 181,//基础命中
|
| | | BasicsDodge = 182,//基础闪避
|
| | | OnlyFinalHurt = 183,// 额外伤害附加
|
| | | CDBPlayerRefresh_ForbidenTalk = 184,//禁言
|
| | | CDBPlayerRefresh_FuncDef = 185, // 功能层防御 185
|
| | | CDBPlayerRefresh_TreasureScore = 186, //寻宝商店积分
|
| | | CDBPlayerRefresh_Danjing = 187, // 丹精 187
|
| | |
| | | public void VerifyChat(string content, ChatInfoType channelType, Action<bool, string> callback)
|
| | | {
|
| | | int channel = 0;
|
| | | var chatCenter = ModelCenter.Instance.GetModel<ChatCenter>();
|
| | | if (!requireVerify || !GetChannel(channelType, out channel) || PlayerDatas.Instance.baseData.VIPLv >= 4
|
| | | || IsFairyFeast(channelType))
|
| | | || IsFairyFeast(channelType) || chatCenter.IsChatBanned)
|
| | | {
|
| | | if (callback != null)
|
| | | {
|