| | |
| | | public const int WishRedKey = 20915;
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | | OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent;
|
| | | OperationTimeHepler.Instance.operationEndEvent += OperationEndEvent;
|
| | | OperationTimeHepler.Instance.operationAdvanceEvent += OperationAdvanceEvent;
|
| | | OpenServerActivityCenter.Instance.Register((int)OpenServerActivityCenter.OSActivityType.WishingPool, this);
|
| | | SetWishRedpoint();
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsBestItem()
|
| | | {
|
| | | foreach(var key in poolDataDict.Keys)
|
| | | {
|
| | | if(poolDataDict[key].isBest == 1)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public int handStartIndex { get; private set; }
|
| | | public int handEndIndex { get; private set;}
|
| | | public event Action UpdateHandMoveEvent;
|
| | | public void SetHandMovePos(int wishIndex)
|
| | | {
|
| | | foreach(var key in poolDataDict.Keys)
|
| | | {
|
| | | if(poolDataDict[key].itemId != 0)
|
| | | {
|
| | | handStartIndex = key;
|
| | | break;
|
| | | }
|
| | | }
|
| | | handEndIndex = wishIndex;
|
| | | if(UpdateHandMoveEvent != null)
|
| | | {
|
| | | UpdateHandMoveEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | #region 本地数据
|
| | | public bool isDraging { get; set; }
|
| | |
| | | for (int i = 0; i < wishInfo.LastAwardCnt; i++)
|
| | | {
|
| | | var itemInfo = wishInfo.LastAwardItemInfo[i];
|
| | | WishingWellItem wellItem = new WishingWellItem((int)itemInfo.ItemID, itemInfo.ItemCnt, itemInfo.IsBind, itemInfo.IsSpecial);
|
| | | SetWishingAwardData(i, wellItem);
|
| | | if(itemInfo.ItemID != 0)
|
| | | {
|
| | | WishingWellItem wellItem = new WishingWellItem((int)itemInfo.ItemID, itemInfo.ItemCnt, itemInfo.IsBind, itemInfo.IsSpecial);
|
| | | SetWishingAwardData(i, wellItem);
|
| | | }
|
| | | }
|
| | | UpdateRedpoint();
|
| | | if(UpdateWishAwardEvent != null)
|
| | |
| | | GameNetSystem.Instance.SendInfo(wishingRefresh);
|
| | | }
|
| | |
|
| | | public void SendGetAwardQuest()
|
| | | {
|
| | | CA504_tagCMPlayerGetReward getReward = new CA504_tagCMPlayerGetReward();
|
| | | getReward.RewardType = (byte)GotServerRewardType.Def_RewardType_WishingWell;
|
| | | getReward.DataEx = 0;
|
| | | getReward.DataExStrLen = 0;
|
| | | getReward.DataExStr = string.Empty;
|
| | | GameNetSystem.Instance.SendInfo(getReward);
|
| | | }
|
| | |
|
| | | public void SendRefreshWishInfo(int poolIndex,int wishIndex)
|
| | | {
|
| | | CAA06_tagCMActWishing actWishing = new CAA06_tagCMActWishing();
|