| | |
| | | public Dictionary<int, FairyJadeInvestmentClass> FairyJadeInvestmentDic = new Dictionary<int, FairyJadeInvestmentClass>();//等级(0-300级)
|
| | | public Dictionary<int, Dictionary<int, FairyJadeInvestmentClass>> FairyJadeInvestmentTypeDic = new Dictionary<int, Dictionary<int, FairyJadeInvestmentClass>>();//根据投资类型来存储奖励类型和金额(类型3,4,5);
|
| | | public Dictionary<int, int> InfoSeriors = new Dictionary<int, int>();//奖励领取信息//key为索引,Value(0,未领,其他值未领的钱数)等级(0-300级)
|
| | | public Dictionary<int, int> InfoSeriorsTwo = new Dictionary<int, int>();//奖励领取信息//key为索引,Value(0,未领,其他值未领的钱数)等级(301-400)
|
| | | public Dictionary<int, Dictionary<int, int>> InfoSeriorsTypeDic = new Dictionary<int, Dictionary<int, int>>();//根据类型存储奖励信息
|
| | | public Dictionary<int, Dictionary<int, int>> InvestmentAmountTypeDic = new Dictionary<int, Dictionary<int, int>>();//根据类型获得投资金额
|
| | | public Dictionary<int, int> InvestmentAmountDic = new Dictionary<int, int>();//投资金额
|
| | | public static Action FairyJadeInfoSeriorsUpdate;
|
| | | public int InvestGold = 0; // 投资额度
|
| | |
| | | FairyJadeInvestmentDic.Clear();
|
| | | InvestmentAmountDic.Clear();
|
| | | InfoSeriors.Clear();
|
| | | InfoSeriorsTwo.Clear();
|
| | | Assignment();
|
| | |
|
| | | }
|
| | |
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;
|
| | | FairyJadeInvestmentWin.FairyJadeInvestmentRedPointEvent -= FairyJadeInvestmentRedPoint;
|
| | | FairyJadeInvestmentWin.FairyJadeInvestmentRedPointEvent += FairyJadeInvestmentRedPoint;
|
| | | DebugEx.LogError(InfoSeriorsTypeDic);
|
| | | }
|
| | |
|
| | | private void FairyJadeInvestmentRedPoint()
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public void AssignmentType()
|
| | | private void AssignmentType()
|
| | | {
|
| | | //根据投资类型来存储奖励信息(类型3,4,5)
|
| | | if (FairyJadeInvestmentTypeDic.Count >= 3)
|
| | |
| | | {
|
| | | Dictionary<int, FairyJadeInvestmentClass> Dic = new Dictionary<int, FairyJadeInvestmentClass>();
|
| | | FairyJadeInvestmentClass fairyJadeInvestment = new FairyJadeInvestmentClass();
|
| | | if (value.id >= 310)
|
| | | {
|
| | | fairyJadeInvestment.ID = value.id % 100;
|
| | | }
|
| | | else
|
| | | {
|
| | | fairyJadeInvestment.ID = value.id % 10;
|
| | | }
|
| | | fairyJadeInvestment.ID = value.id % 100;
|
| | | fairyJadeInvestment.Type = value.type;
|
| | | fairyJadeInvestment.NeedDay = value.needDay;
|
| | | fairyJadeInvestment.NeedLv = value.needLV;
|
| | |
| | | {
|
| | | fairyJadeInvestment.ID = value.id % 10;
|
| | | }
|
| | | SetInfoSeriors(value.type, fairyJadeInvestment.ID);
|
| | | fairyJadeInvestment.Type = value.type;
|
| | | fairyJadeInvestment.NeedDay = value.needDay;
|
| | | fairyJadeInvestment.NeedLv = value.needLV;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | // DebugEx.LogError(FairyJadeInvestmentTypeDic);
|
| | | // DebugEx.LogError(FairyJadeInvestmentTypeDic);
|
| | | }
|
| | |
|
| | | private void SetInfoSeriors(int type, int id)
|
| | | {
|
| | | if (!InfoSeriorsTypeDic.ContainsKey(type))
|
| | | {
|
| | | Dictionary<int, int> dic = new Dictionary<int, int>();
|
| | | dic.Add(id, 0);
|
| | | InfoSeriorsTypeDic.Add(type, dic);
|
| | | }
|
| | | else
|
| | | {
|
| | | var dict = InfoSeriorsTypeDic[type];
|
| | | if (dict.ContainsKey(id))
|
| | | {
|
| | | dict.Add(id, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | dict[id] = 0;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | public void Assignment()
|
| | | {
|
| | | // AssignmentType();
|
| | | AssignmentType();
|
| | | var InvestConfig = Config.Instance.GetAllValues<InvestConfig>();
|
| | | if (FairyJadeInvestmentDic.Count > 0)
|
| | | {
|
| | |
| | | FairyJadeInvestmentDic.Add(value.needLV, fairyJadeInvestment);
|
| | | }
|
| | | }
|
| | | // DebugEx.LogError(FairyJadeInvestmentDic);
|
| | | // DebugEx.LogError(FairyJadeInvestmentDic);
|
| | | }
|
| | |
|
| | | public void GetInfoSeriors(HA337_tagMCGoldInvestInfo vNetData)//接受信息
|
| | |
| | | InvestmentRedPoint();
|
| | | }
|
| | | }
|
| | |
|
| | | if (vNetData.InvestType == 3 || vNetData.InvestType == 4 || vNetData.InvestType == 5)
|
| | | {
|
| | |
|
| | | if (InfoSeriorsTypeDic.ContainsKey(vNetData.InvestType))//奖励刷新赋值
|
| | | {
|
| | | var Dit = InfoSeriorsTypeDic[vNetData.InvestType];
|
| | | for (int i = 0; i < vNetData.RewardRecordCnt; i++)
|
| | | {
|
| | | if (Dit.ContainsKey((int)vNetData.InvestRewardList[i].RewardIndex))
|
| | | {
|
| | | Dit[(int)vNetData.InvestRewardList[i].RewardIndex] = (int)vNetData.InvestRewardList[i].RewardValue;
|
| | | }
|
| | | }
|
| | | InfoSeriorsTypeDic[vNetData.InvestType] = Dit;
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | public void SendInvestment(int InvestType, int RewardIndex)//领取奖励
|
| | |
| | |
|
| | | public void InvestmentAmount()
|
| | | {
|
| | | InvestmentAmountType();
|
| | | if (InvestmentAmountDic.Count <= 0)
|
| | | {
|
| | | InvestmentAmountDic.Add(VipInvestModel.GetInvestGold(3, 0), 1);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void InvestmentAmountType()
|
| | | {
|
| | | if (InvestmentAmountTypeDic.Count > 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | Dictionary<int, int> Dic = new Dictionary<int, int>();
|
| | | Dic.Add(VipInvestModel.GetInvestGold(3, 0), 1);
|
| | | Dic.Add(VipInvestModel.GetInvestGold(3, 1), 2);
|
| | | Dic.Add(VipInvestModel.GetInvestGold(3, 2), 3);
|
| | | Dic.Add(VipInvestModel.GetInvestGold(3, 3), 4);
|
| | | InvestmentAmountTypeDic.Add(3, Dic);
|
| | | InvestmentAmountTypeDic.Add(4, Dic);
|
| | | InvestmentAmountTypeDic.Add(5, Dic);
|
| | | }
|
| | | private const int Redpoint_key1 = 20910;
|
| | | public Redpoint redPointStre1 = new Redpoint(209, Redpoint_key1);//仙玉投资红点
|
| | | public int JumpInedx = 0;
|