//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Wednesday, July 18, 2018
|
//--------------------------------------------------------
|
using Snxxz.UI;
|
using System;
|
using System.Collections.Generic;
|
|
|
public class CZBMModel : Model
|
{
|
int m_SelectIndex = 0;
|
public int selectIndex
|
{
|
get { return m_SelectIndex; }
|
set
|
{
|
if (m_SelectIndex != value)
|
{
|
m_SelectIndex = value;
|
if (selectUpdate != null)
|
{
|
selectUpdate();
|
}
|
}
|
}
|
}
|
|
public event Action selectUpdate;
|
|
public override void Init()
|
{
|
m_SelectIndex = 0;
|
}
|
|
public override void UnInit()
|
{
|
|
}
|
|
public HAA31_tagMCActGrowupBuyInfo.tagMCActGrowupBuyCTGItem[] GetGiftsByCTGID(int ctgID)
|
{
|
OperationCZBM operation;
|
if (OperationTimeHepler.Instance.TryGetOperation(Operation.CZBMGift, out operation))
|
{
|
|
for (int i = 0; i < operation.CZBMGiftInfo.Count; i++)
|
{
|
for (int j = 0; j < operation.CZBMGiftInfo[i].BuyCTGIDList.Length; j++)
|
{
|
if (operation.CZBMGiftInfo[i].BuyCTGIDList[j].CTGID == ctgID)
|
{
|
return operation.CZBMGiftInfo[i].BuyCTGIDList[j].GainItemList;
|
}
|
}
|
}
|
}
|
|
return null;
|
}
|
}
|