95 lines
4.0 KiB
C#
95 lines
4.0 KiB
C#
using CodeStage.AntiCheat.ObscuredTypes;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class OffLineReward : LobbyNonMenuBase
|
|
{
|
|
public static ObscuredInt m_Sec;
|
|
|
|
public UILabel label_time;
|
|
public GameObject go_btn;
|
|
|
|
public override void Set()
|
|
{
|
|
base.Set();
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
|
ObscuredInt min = m_Sec / 60;
|
|
if (min > 480) min = 480;
|
|
//if (min >= 480) min = 480 * 3 * 10; // 테스트 : 오프라인 보상 시간 조정
|
|
min.RandomizeCryptoKey();
|
|
label_time.text = DSUtil.Get_TimeText_HMS(true, min * 60);
|
|
|
|
//var maxChapter = sdata.Get_Common(eCommon.MaxMapID);
|
|
//var maxStage = Mathf.Max(1, sdata.Get_Common(eCommon.MaxStage));
|
|
|
|
//var mobstat = table_monsterstat.Ins.Get_DataList();
|
|
//ObscuredDouble GoldExpStone = 0d;
|
|
//for (int i = 0; i < mobstat.Count; i++)
|
|
//{
|
|
// var temp = mobstat[i];
|
|
// if (temp.Chapter < maxChapter || (temp.Chapter == maxChapter && temp.Stage <= maxStage))
|
|
// GoldExpStone = GoldExpStone > temp.dic_amount[eItem.Gold] ? GoldExpStone : temp.dic_amount[eItem.Gold];
|
|
//}
|
|
|
|
var actorinfo = MyValue.MakeorGet_ActorStatInfo(eRole.PC, sdata, null);
|
|
ObscuredDouble GoldExpStone = actorinfo.Get_Stat(eStat.GOLD_INCREASE);
|
|
|
|
ObscuredDouble Gold = GoldExpStone * min * 3.5d;
|
|
Gold += Gold * actorinfo.Get_Stat(eStat.GOLD_Multiplier);
|
|
Gold.RandomizeCryptoKey();
|
|
var itemlst = sdata.Add_Item(new ItemData(eItem.Gold, 0, Gold, "off", eUICardType.GetItem));
|
|
//itemlst.AddRange(sdata.Add_Item(new ItemData(eItem.Exp, 0, GoldExpStone * min * 2.5d, "off", eUICardType.GetItem)));
|
|
|
|
//ObscuredDouble Stone = GoldExpStone * min * 0.09d * Random.Range(0.9f, 1.1f);
|
|
//Stone += Stone * actorinfo.Get_Stat(eStat.WeaponStoneDrop);
|
|
//Stone.RandomizeCryptoKey();
|
|
//itemlst.AddRange(sdata.Add_Item(new ItemData(eItem.WeaponStone, 0, Stone, "off", eUICardType.GetItem)));
|
|
|
|
//Stone = GoldExpStone * min * 0.09d * Random.Range(0.9f, 1.1f);
|
|
//Stone += Stone * actorinfo.Get_Stat(eStat.RingStoneDrop);
|
|
//Stone.RandomizeCryptoKey();
|
|
//itemlst.AddRange(sdata.Add_Item(new ItemData(eItem.RingStone, 0, Stone, "off", eUICardType.GetItem)));
|
|
|
|
//Stone = GoldExpStone * min * 0.09d * Random.Range(0.9f, 1.1f);
|
|
//Stone += Stone * actorinfo.Get_Stat(eStat.NeckStoneDrop);
|
|
//Stone.RandomizeCryptoKey();
|
|
//itemlst.AddRange(sdata.Add_Item(new ItemData(eItem.NeckStone, 0, Stone, "off", eUICardType.GetItem)));
|
|
|
|
//Stone = GoldExpStone * min * 0.09d * Random.Range(0.9f, 1.1f);
|
|
//Stone += Stone * actorinfo.Get_Stat(eStat.BootsStoneDrop);
|
|
//Stone.RandomizeCryptoKey();
|
|
//itemlst.AddRange(sdata.Add_Item(new ItemData(eItem.BootsStone, 0, Stone, "off", eUICardType.GetItem)));
|
|
|
|
//Stone = GoldExpStone * min * 0.09d * Random.Range(0.9f, 1.1f);
|
|
//Stone += Stone * actorinfo.Get_Stat(eStat.FairyStoneDrop);
|
|
//Stone.RandomizeCryptoKey();
|
|
//itemlst.AddRange(sdata.Add_Item(new ItemData(eItem.FairyStone, 0, Stone, "off", eUICardType.GetItem)));
|
|
|
|
//if (maxChapter >= 15)
|
|
//{ // 씨앗 지급
|
|
// var seedAmount = min / 20;
|
|
// for (int i = 0; i < seedAmount; i++)
|
|
// {
|
|
// int seed_id = Random.Range(0, 100) < 50 ? Random.Range(101, 121) : Random.Range(201, 209);
|
|
// itemlst.AddRange(sdata.Add_Item(new ItemData(eItem.Seed, seed_id, 1, "off", eUICardType.GetItem)));
|
|
// }
|
|
//}
|
|
|
|
Set_ScrollView(DSUtil.CombineSameItem(itemlst), true);
|
|
|
|
m_Sec = 0;
|
|
m_Sec.RandomizeCryptoKey();
|
|
|
|
go_btn.SetActive(false);
|
|
Set_Coroutine(() => { go_btn.SetActive(true); }, 2f);
|
|
}
|
|
|
|
public override void OnClick_Back()
|
|
{
|
|
if (go_btn.activeInHierarchy)
|
|
{
|
|
base.OnClick_Back();
|
|
}
|
|
}
|
|
} |