public void RequestSendChat(ChatRule.CHAT_CHANNEL _eChannel, string _content) { var msg = NewChatMessage(_eChannel, _content); var ht = Johny.HashtablePool.Claim(); ht.Add("name", msg.name); ht.Add("uid", msg.uid); ht.Add("level", msg.level); ht.Add("vip_level", msg.vipLevel); ht.Add("head_icon", msg.icon); ht.Add("head_frame", msg.frame); ht.Add("quality", msg.quality); ht.Add("battle_rating", msg.battleRating); ht.Add("alliance_name", msg.allianceName); ht.Add("month_vip_type", msg.monthVipType); ht.Add("worldId", LoginManager.Instance.LocalUser.WorldId); ht.Add("server_name", LoginManager.Instance.GetDefaultGameWorld(LoginManager.Instance.LocalUser.WorldId).Name); SparxHub.Instance.ChatManager.SendText(msg.channel, msg.text, ht, delegate(string error, object param) { if (!string.IsNullOrEmpty(error)) { EB.Debug.LogError("RequestSendChat:{0}", error); } }); TaskSystem.RequestChatTaskFinish(_eChannel); }
public bool SetLock() { //判断当日是否开启 DateTime datetime = TaskSystem.TimeSpanToDateTime(EB.Time.Now); int weeknow = Convert.ToInt32(datetime.DayOfWeek); bool isLock = true; switch (AwakeningInstanceType) { case Hotfix_LT.Data.eRoleAttr.Feng: string goodsStr = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("WindOpenWeek"); string[] tempGoodsStrs = goodsStr.Split(','); isLock = !ContainWeek(tempGoodsStrs, weeknow); OpenTimeLabel.text = string.Format(EB.Localizer.GetString("ID_EVERY_WANTONLY_DAY_OPEN"), ConvertDay(tempGoodsStrs)); break; case Hotfix_LT.Data.eRoleAttr.Huo: string goodsStrH = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("FireOpenWeek"); string[] tempGoodsStrsH = goodsStrH.Split(','); isLock = !ContainWeek(tempGoodsStrsH, weeknow); OpenTimeLabel.text = string.Format(EB.Localizer.GetString("ID_EVERY_WANTONLY_DAY_OPEN"), ConvertDay(tempGoodsStrsH)); break; case Hotfix_LT.Data.eRoleAttr.Shui: string goodsStrS = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("WaterOpenWeek"); string[] tempGoodsStrsS = goodsStrS.Split(','); isLock = !ContainWeek(tempGoodsStrsS, weeknow); OpenTimeLabel.text = string.Format(EB.Localizer.GetString("ID_EVERY_WANTONLY_DAY_OPEN"), ConvertDay(tempGoodsStrsS)); break; } return(isLock); }
public static bool AwakeningIsLock(Hotfix_LT.Data.eRoleAttr type) { //判断当日是否开启 DateTime datetime = TaskSystem.TimeSpanToDateTime(EB.Time.Now); int weeknow = Convert.ToInt32(datetime.DayOfWeek); bool isLock = true; switch (type) { case Hotfix_LT.Data.eRoleAttr.Feng: string goodsStr = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("WindOpenWeek"); string[] tempGoodsStrs = goodsStr.Split(','); isLock = !ContainWeek(tempGoodsStrs, weeknow); break; case Hotfix_LT.Data.eRoleAttr.Huo: string goodsStrH = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("FireOpenWeek"); string[] tempGoodsStrsH = goodsStrH.Split(','); isLock = !ContainWeek(tempGoodsStrsH, weeknow); break; case Hotfix_LT.Data.eRoleAttr.Shui: string goodsStrS = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("WaterOpenWeek"); string[] tempGoodsStrsS = goodsStrS.Split(','); isLock = !ContainWeek(tempGoodsStrsS, weeknow); break; } return(isLock); }
private DateTime GetWeekFirstDayMon() { DateTime datetime = TaskSystem.TimeSpanToDateTime(EB.Time.Now); int weeknow = (int)datetime.DayOfWeek; int daydiff = (-1) * weeknow; string FirstDay = datetime.AddDays(daydiff).ToString("yyyy-MM-dd"); return(Convert.ToDateTime(FirstDay + " 00:00:00")); }
private static void InitTimeStamps() { LegionWarTimeStamps = new List <long>(); for (var i = 0; i < LegionWarTimeData.LegionWarTimes.Count; i++) { var time = LegionWarTimeData.LegionWarTimes[i]; DateTime date = Monday.AddDays((time.day < 0)?(int)EB.Time.LocalNow.DayOfWeek:time.day); date = date.AddHours(time.hour); date = date.AddMinutes(time.minute); date = date.AddSeconds(time.second); LegionWarTimeStamps.Add(TaskSystem.GetTimeSpan(date)); } }
public bool IsOpenWarTime() { var world = System.Array.Find(LoginManager.Instance.GameWorlds, w => w.Default); if (world.OpenTime > 0) { DateTime datetime = TaskSystem.TimeSpanToDateTime(world.OpenTime); int weeknow = (int)(datetime.DayOfWeek); int daydiff = 7 - weeknow; DateTime FirstDay = datetime.AddDays(daydiff); return(EB.Time.Now > EB.Time.ToPosixTime(FirstDay)); } return(true); }
public DateTime OpenWarTime() { var world = System.Array.Find(LoginManager.Instance.GameWorlds, w => w.Default); if (world.OpenTime > 0) { DateTime datetime = TaskSystem.TimeSpanToDateTime(world.OpenTime); int weeknow = (int)(datetime.DayOfWeek); int daydiff = 7 - weeknow; DateTime FirstDay = datetime.AddDays(daydiff); return(FirstDay); } return(Data.ZoneTimeDiff.GetServerTime()); }
private void OnGoBtnClick() { TaskSystem.ProcessTaskRunning(Data.TaskId.ToString()); }
public void OnGoBtnClick() { FusionAudio.PostEvent("UI/General/ButtonClick"); TaskSystem.ProcessTaskRunning(m_taskid.ToString()); }
private void OnGoButtonClicked() { FusionAudio.PostEvent("UI/General/ButtonClick"); TaskSystem.ProcessTaskRunning(_taskInfo.task_id.ToString()); }