Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | {
|
| | | RedPointMountDan();
|
| | | }
|
| | | if (PackSendQuestMgr.Instance.useItemModel != null)//跳轉選中
|
| | | {
|
| | | PackSendQuestMgr.Instance.useItemModel = null;
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetHorseID()
|
| | |
| | | int ItemId = PackSendQuestMgr.Instance.useItemModel.itemInfo.ItemID;
|
| | | if (ItemId == 181)
|
| | | {
|
| | | int MountID= mountModel.GetMinLvMount();
|
| | | int MountID= mountModel.GetMinExpMount();
|
| | | if (MountID != 0)
|
| | | {
|
| | | signHorseID = MountID;
|
| | |
| | | CA501_tagPlayerActivateHorse _tagA501 = new CA501_tagPlayerActivateHorse();
|
| | | _tagA501.HorseID = (uint)signHorseID;
|
| | | GameNetSystem.Instance.SendInfo(_tagA501);
|
| | | if (PackSendQuestMgr.Instance.useItemModel != null)//跳轉選中
|
| | | {
|
| | | PackSendQuestMgr.Instance.useItemModel = null;
|
| | | }
|
| | | |
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | m_AutoTrainBtn.gameObject.SetActive(true);
|
| | | m_StopDomesticateBtn.gameObject.SetActive(false);
|
| | | ScrollTip.ShowTip(Language.Get("HorseDan5_text"));
|
| | | //ScrollTip.ShowTip(Language.Get("HorseDan5_text"));
|
| | | yield break;
|
| | | }
|
| | | else if (WindowCenter.Instance.IsOpen<RidingAndPetActivationWin>())//打开骑宠激活界面结束方法
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public int GetMinLvMount()
|
| | | public int GetMinExpMount()
|
| | | {
|
| | | int GetMountID = 0;
|
| | | int GetMountLv = 0;
|
| | | int NeedExp = 99999999;
|
| | | for (int i = 0; i < SortMount.Count; i++)
|
| | | {
|
| | | int horseID = SortMount[i].HorseID;
|
| | | if (_DicHorse.ContainsKey(horseID))
|
| | | if (_DicHorse.ContainsKey(horseID) && _DicHorse[horseID].Lv < Config.Instance.Get<HorseConfig>(horseID).MaxLV)
|
| | | {
|
| | | var key = horseID;
|
| | | if (GetMountID == 0 && _DicHorse[key].Lv < GetMountSkillMaxLV(key))
|
| | | int _NeedExp = HorseUpConfig.GetHorseIDAndLV(horseID, (_DicHorse[horseID].Lv)).NeedExp;
|
| | | if (_NeedExp - _DicHorse[horseID].Exp < NeedExp)
|
| | | {
|
| | | GetMountID = key;
|
| | | GetMountLv = _DicHorse[key].Lv;
|
| | | }
|
| | | if (_DicHorse[key].Lv < GetMountLv && _DicHorse[key].Lv < GetMountSkillMaxLV(key))
|
| | | {
|
| | | GetMountID = key;
|
| | | GetMountLv = _DicHorse[key].Lv;
|
| | | NeedExp = _NeedExp - _DicHorse[horseID].Exp;
|
| | | GetMountID = horseID;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | switch (buyState)
|
| | | {
|
| | | case -1:
|
| | | this.gameObject.SetActive(true);
|
| | | string timeStr = operation.ToDisplayBuyTime(date.month, dayIndex + date.day, operationTime.startHour, operationTime.startMinute);
|
| | | remainText.text = Language.Get("FlashRushToBuy106", timeStr);
|
| | | string timeStr = "";
|
| | | if(seconds > 7200)
|
| | | {
|
| | | timeStr = operation.ToDisplayBuyTime(date.month, dayIndex + date.day, operationTime.startHour, operationTime.startMinute);
|
| | | remainText.text = Language.Get("FlashRushToBuy106", timeStr);
|
| | | }
|
| | | else
|
| | | {
|
| | | timeStr = TimeUtility.SecondsToHMS(seconds);
|
| | | remainText.text = Language.Get("FlashRushToBuy108", timeStr);
|
| | | }
|
| | | break;
|
| | | case 0:
|
| | | this.gameObject.SetActive(true);
|
| | | remainText.text = Language.Get("FlashRushToBuy105", TimeUtility.SecondsToHMS(seconds));
|
| | | break;
|
| | | case 1:
|
| | |
| | | {
|
| | | if(PlayerDatas.Instance.baseData.LV >= limitLv)
|
| | | {
|
| | | if(InAdvanceTime(TimeUtility.ServerNow) || InTime(TimeUtility.ServerNow))
|
| | | if(flashShops.Count > 0)
|
| | | {
|
| | | return true;
|
| | | int openSeconds = 0;
|
| | | int endSeconds = 0;
|
| | | var fristShop = flashShops[0];
|
| | | var lastShop = flashShops[flashShops.Count - 1];
|
| | | int OpenState = GetBuyTimeState(TimeUtility.ServerNow,fristShop.dayIndex,fristShop.timeIndex, out openSeconds);
|
| | | int endState = GetBuyTimeState(TimeUtility.ServerNow,lastShop.dayIndex, lastShop.timeIndex,out endSeconds);
|
| | | if(OpenState == -1 && openSeconds <= inAdvanceMinute*60)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | else if(endState != 1 && OpenState != -1)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | |
| | | var item = new FlashSaleItem();
|
| | | var saleItem = shop.GiftbagInfo[k];
|
| | | item.shopId = (int)saleItem.GiftID;
|
| | | item.shopGuid = shop.DayIndex*1000 + shop.TimeIndex*100 + k;
|
| | | item.shopGuid = shop.DayIndex*10000 + shop.TimeIndex*100 + k;
|
| | | item.limitNum = saleItem.BuyCountLimit;
|
| | | item.fullServerLimitNum = saleItem.ServerBuyCountLimit;
|
| | | item.moneyType = saleItem.MoneyType;
|
| | |
| | | {
|
| | | IsRedPointCultivate();
|
| | | }
|
| | |
|
| | | if (PackSendQuestMgr.Instance.useItemModel != null)
|
| | | {
|
| | | PackSendQuestMgr.Instance.useItemModel = null;
|
| | | }
|
| | | }
|
| | |
|
| | | private void AddPet()//灵宠添加
|
| | |
| | | int ItemId = PackSendQuestMgr.Instance.useItemModel.itemInfo.ItemID;
|
| | | if (ItemId == 4151)
|
| | | {
|
| | | int Pet = petmodel.GetMinPetLv();
|
| | | int Pet = petmodel.GetMinPetExp();
|
| | | if (Pet != 0)
|
| | | {
|
| | | TypePetID = Pet;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public int GetMinPetLv()
|
| | | public int GetMinPetExp()
|
| | | {
|
| | | int GetPetId = 0;
|
| | | int petLv = 0;
|
| | |
|
| | | int NeedExp = 99999999;
|
| | | for (int i = 0; i < Sortpet.Count; i++)
|
| | | {
|
| | | int petID = Sortpet[i].ID;
|
| | | if (_DicPetBack.ContainsKey(petID))
|
| | | if (_DicPetBack.ContainsKey(petID) && _DicPetBack[petID].PetClass < Config.Instance.Get<PetInfoConfig>(petID).MaxRank)
|
| | | {
|
| | | var key = petID;
|
| | | if (petLv == 0 && _DicPetBack[key].PetClass < GetPetSkillMaxLv(key))
|
| | | int _NeedExp = PetClassCostConfig.GetPetIdAndRank(petID, _DicPetBack[petID].PetClass).UpNeedExp;
|
| | | if (_NeedExp - _DicPetBack[petID].petExp < NeedExp)
|
| | | {
|
| | | petLv = _DicPetBack[key].PetClass;
|
| | | GetPetId = key;
|
| | | }
|
| | | if (_DicPetBack[key].PetClass < petLv && _DicPetBack[key].PetClass < GetPetSkillMaxLv(key))
|
| | | {
|
| | | petLv = _DicPetBack[key].PetClass;
|
| | | GetPetId = key;
|
| | | NeedExp = _NeedExp - _DicPetBack[petID].petExp;
|
| | | GetPetId = petID;
|
| | | }
|
| | | }
|
| | | }
|