本文整理汇总了C#中ItemData.GetSubType方法的典型用法代码示例。如果您正苦于以下问题:C# ItemData.GetSubType方法的具体用法?C# ItemData.GetSubType怎么用?C# ItemData.GetSubType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ItemData
的用法示例。
在下文中一共展示了ItemData.GetSubType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Open
public void Open( sITEM _sitem , ItemData _itemData )
{
if (null == _sitem)
{
Debug.LogError("TooltipGaugeDlg::SetSItem() [ null == _sitem ]");
return;
}
Item _item = ItemMgr.ItemManagement.GetItem( _sitem.nItemTableIdx );
if( null == _item )
{
Debug.LogError("TooltipGaugeDlg::SetSItem() [ null == _item ] item id : " + _sitem.nItemTableIdx );
return;
}
if( false == SetItem(_item) )
return;
txtTitle.Text = AsTableManager.Instance.GetTbl_String (2423);
Tbl_SynCosMix_Record recordCosMix = AsTableManager.Instance.GetSynCosMixRecord( _itemData.grade , (Item.eEQUIP)_itemData.GetSubType() );
Tbl_GlobalWeight_Record recordGlobal = AsTableManager.Instance.GetTbl_GlobalWeight_Record( "CosMixExpFactor" );
int needMaxExp = 0;
int currentExp = 0;
if( recordCosMix != null && recordGlobal != null )
{
// needMaxExp = (int)((float)recordCosMix.needExp * ( 1.0f - ( recordGlobal.Value * (float)_sitem.nStrengthenCount / 1000.0f ) ));
needMaxExp = (int)(((float)recordCosMix.needExp * ( 1000.0f - ( recordGlobal.Value * (float)_sitem.nStrengthenCount ) ))/1000.0f);
}
currentExp = _sitem.nAccreCount;
if( currentExp >= needMaxExp )
{
txtProgress.Text = AsTableManager.Instance.GetTbl_String(2414);
}
else
{
sbProgress.Remove( 0, sbProgress.Length);
sbProgress.AppendFormat( "RGBA( 1.0,1.0,1.0,1.0){0} / {1}", currentExp, needMaxExp);
txtProgress.Text = sbProgress.ToString();
}
float fRatioCurrent = (float)currentExp / (float)needMaxExp;
if( fRatioCurrent >= 1.0f ) fRatioCurrent = 1.0f;
progressGuage.Value = fRatioCurrent;
}
示例2: GetItemKind
public eStore_ItemKind GetItemKind(ItemData _itemData)
{
eStore_ItemKind storeItemKind = eStore_ItemKind.NONE;
Item.eITEM_TYPE type = _itemData.GetItemType();
if (type == Item.eITEM_TYPE.EquipItem)
{
Item.eEQUIP equipType = (Item.eEQUIP)_itemData.GetSubType();
if (equipType == Item.eEQUIP.Weapon)
storeItemKind = eStore_ItemKind.WEAPON;
else if (equipType == Item.eEQUIP.Armor || equipType == Item.eEQUIP.Gloves || equipType == Item.eEQUIP.Head || equipType == Item.eEQUIP.Point)
storeItemKind = eStore_ItemKind.ARMOR;
else if (equipType == Item.eEQUIP.Ring || equipType == Item.eEQUIP.Necklace || equipType == Item.eEQUIP.Earring)
storeItemKind = eStore_ItemKind.ACCESSORY;
else
storeItemKind = eStore_ItemKind.ETC;
}
else if (type == Item.eITEM_TYPE.EtcItem)
{
Item.eEtcItem etcType = (Item.eEtcItem)_itemData.GetSubType();
if (etcType == Item.eEtcItem.Material)
storeItemKind = eStore_ItemKind.MATERIAL;
else
storeItemKind = eStore_ItemKind.ETC;
}
else if (type == Item.eITEM_TYPE.ActionItem)
{
storeItemKind = eStore_ItemKind.CONSUME;
}
else if (type == Item.eITEM_TYPE.UseItem || type == Item.eITEM_TYPE.CosEquipItem)
{
storeItemKind = eStore_ItemKind.ETC;
}
return storeItemKind;
}