public static string GetName( eITEM_PRODUCT_TECHNIQUE_TYPE _eType ) { switch( _eType ) { #if OLD_PRODUCT case eITEM_PRODUCT_TECHNIQUE_TYPE.WEAPON: return AsTableManager.Instance.GetTbl_String(1006); case eITEM_PRODUCT_TECHNIQUE_TYPE.ARMOR: return AsTableManager.Instance.GetTbl_String(1007); case eITEM_PRODUCT_TECHNIQUE_TYPE.ACCESSORY: return AsTableManager.Instance.GetTbl_String(1008); #else case eITEM_PRODUCT_TECHNIQUE_TYPE.RING: return AsTableManager.Instance.GetTbl_String(2221); case eITEM_PRODUCT_TECHNIQUE_TYPE.NECKLACE: return AsTableManager.Instance.GetTbl_String(2222); case eITEM_PRODUCT_TECHNIQUE_TYPE.EARRING: return AsTableManager.Instance.GetTbl_String(2223); #endif case eITEM_PRODUCT_TECHNIQUE_TYPE.POTION: return AsTableManager.Instance.GetTbl_String(1009); case eITEM_PRODUCT_TECHNIQUE_TYPE.MINERAL: return AsTableManager.Instance.GetTbl_String(1010); case eITEM_PRODUCT_TECHNIQUE_TYPE.PLANTS: return AsTableManager.Instance.GetTbl_String(1011); case eITEM_PRODUCT_TECHNIQUE_TYPE.SPIRIT: return AsTableManager.Instance.GetTbl_String(1012); } return "error max index"; }
public virtual void Open( eITEM_PRODUCT_TECHNIQUE_TYPE _eType, sPRODUCT_INFO _info ) { m_info = _info; m_eType = _eType; //string strText = GetName(m_eType) + " "; if( null != _info ) { //strText += _info.nLevel; SetTechName( string.Format( "{0} {1:0}", GetName(m_eType), _info.nLevel ) ); } else { //strText = GetName(m_eType); SetTechName( GetName(m_eType) ); } if( null != btnListView ) btnListView.SetInputDelegate(ListViewBtnDelegate); }
public ConditionProductionMastery( eITEM_PRODUCT_TECHNIQUE_TYPE _productionSkillType, int _productionMastery) { ProductionMasteryType = _productionSkillType; ProductionMastery = _productionMastery; }
public AchProductionMastery( eITEM_PRODUCT_TECHNIQUE_TYPE _ProductionType, int _ProductionMastery) { ProductionType = _ProductionType; DestCount = ProductionMastery = _ProductionMastery; }
public bool IsEnableProductTechniqueType( eITEM_PRODUCT_TECHNIQUE_TYPE _type, int ilevel, bool isShowMsg = false) { if( null == m_itemProductionInfo) return false; if( eITEM_PRODUCT_TECHNIQUE_TYPE.QUEST == _type) return true; int iIndex = (int)_type; if( m_itemProductionInfo.sProductInfo.Length <= iIndex) { AsUtil.ShutDown( "m_itemProductionInfo.sProductInfo.Length >= iIndex [ index : " + iIndex); return false; } sPRODUCT_INFO _data = m_itemProductionInfo.sProductInfo[ iIndex ]; if( _data.nLevel == 0) { // AsChatManager.Instance.InsertChat( AsTableManager.Instance.GetTbl_String(281), eCHATTYPE.eCHATTYPE_SYSTEM); AsEventNotifyMgr.Instance.CenterNotify.AddTradeMessage( AsTableManager.Instance.GetTbl_String(281)); return false; } if( ilevel > _data.nLevel) { string strTemp = string.Format( AsTableManager.Instance.GetTbl_String(282), ilevel); // AsChatManager.Instance.InsertChat( strTemp, eCHATTYPE.eCHATTYPE_SYSTEM); AsEventNotifyMgr.Instance.CenterNotify.AddTradeMessage( strTemp); return false; } return true; }
public int GetProductTechniqueLv( eITEM_PRODUCT_TECHNIQUE_TYPE _type) { int type = (int)_type; if( m_itemProductionInfo.sProductInfo.Length <= type) { Debug.LogError( "m_itemProductionInfo.sProductInfo.Length >= iIndex [ index : " + _type.ToString()); return 0; } return m_itemProductionInfo.sProductInfo[(int)_type].nLevel; }
protected string GetTypeString( eITEM_PRODUCT_TECHNIQUE_TYPE _eType ) { switch( _eType ) { #if OLD_PRODUCT case eITEM_PRODUCT_TECHNIQUE_TYPE.WEAPON: return AsTableManager.Instance.GetTbl_String(1334); case eITEM_PRODUCT_TECHNIQUE_TYPE.ARMOR: return AsTableManager.Instance.GetTbl_String(1671); case eITEM_PRODUCT_TECHNIQUE_TYPE.ACCESSORY: return AsTableManager.Instance.GetTbl_String(1672); #else case eITEM_PRODUCT_TECHNIQUE_TYPE.RING: return AsTableManager.Instance.GetTbl_String(1334); case eITEM_PRODUCT_TECHNIQUE_TYPE.NECKLACE: return AsTableManager.Instance.GetTbl_String(1671); case eITEM_PRODUCT_TECHNIQUE_TYPE.EARRING: return AsTableManager.Instance.GetTbl_String(1672); #endif case eITEM_PRODUCT_TECHNIQUE_TYPE.POTION: return AsTableManager.Instance.GetTbl_String(1673); case eITEM_PRODUCT_TECHNIQUE_TYPE.MINERAL: return AsTableManager.Instance.GetTbl_String(1674); case eITEM_PRODUCT_TECHNIQUE_TYPE.PLANTS: return AsTableManager.Instance.GetTbl_String(1675); case eITEM_PRODUCT_TECHNIQUE_TYPE.SPIRIT: return AsTableManager.Instance.GetTbl_String(1676); } return "error max index"; }
public Tbl_Technic_Record GetRecord( eITEM_PRODUCT_TECHNIQUE_TYPE _eType, int iLevel ) { if(false == m_recordList.ContainsKey(_eType)) { //AsUtil.ShutDown("Tbl_technicTable::GetRecord()[ no exist type : " + _eType ); return null; } if(false == m_recordList[_eType].ContainsKey( iLevel ) ) { //AsUtil.ShutDown("Tbl_technicTable::GetRecord()[ no exist type : " + _eType + " level : " + iLevel ); return null; } return m_recordList[_eType][iLevel]; }
public override void Open( eITEM_PRODUCT_TECHNIQUE_TYPE _eType, sPRODUCT_INFO _info ) { if( null == _info ) { Debug.LogError("ProductionTechItemOpen::Open()[ null == sPRODUCT_INFO ]"); return; } base.Open( _eType, _info ); Tbl_Technic_Record record = AsTableManager.Instance.GetTechnicTable().GetRecord( getProductTechType, _info.nLevel ); if( null == record ) { Debug.LogError("ProductionTechItemOpen::Open()[ null == Tbl_Technic_Record ] type : " + getProductTechType + " level : " + _info.nLevel ); return; } int iCurExp = _info.nTotExp - record.getExp; int iCurMaxExp = record.getExp; m_SphereCost = 0; Tbl_Technic_Record nextLevelRecord = AsTableManager.Instance.GetTechnicTable().GetRecord( getProductTechType, _info.nLevel+1 ); if( null != nextLevelRecord ) { iCurMaxExp = nextLevelRecord.getExp - iCurMaxExp; if( nextLevelRecord.getMiracle == 0 ) { Debug.LogError("ProductionTechItemOpen::Open()[nextLevelRecord.getMiracle == 0]"); return; } int iTotalExp = _info.nTotExp; int iInfoExp = nextLevelRecord.getExp; m_SphereCost = (iInfoExp - iTotalExp) / nextLevelRecord.getMiracle + ((iInfoExp - iTotalExp)% nextLevelRecord.getMiracle == 0 ? 0 : 1 ); } else { Tbl_Technic_Record preLevelRecord = AsTableManager.Instance.GetTechnicTable().GetRecord( getProductTechType, _info.nLevel-1 ); if( null != preLevelRecord ) { iCurMaxExp = iCurMaxExp - preLevelRecord.getExp; iCurExp = _info.nTotExp - preLevelRecord.getExp; } } textCashCost.Text = m_SphereCost.ToString(); //textExpShow.Text = AsTableManager.Instance.GetTbl_String( 1014 ) + " " + iCurExp.ToString() + "/" + iCurMaxExp.ToString(); m_sbExpShow.Append( AsTableManager.Instance.GetTbl_String( 1014 ) ); m_sbExpShow.Append(" "); m_sbExpShow.Append(iCurExp); m_sbExpShow.Append("/"); m_sbExpShow.Append(iCurMaxExp); textExpShow.Text =m_sbExpShow.ToString(); if( 0 != iCurMaxExp ) gaugeBar.Value = (float)iCurExp / (float)iCurMaxExp; int iMaxLevel = AsTableManager.Instance.GetTechnicTable().GetMaxLevel( (int)_eType ); if( iMaxLevel <= _info.nLevel ) { btnCashUp.controlIsEnabled = false; btnCashLevelUp.controlIsEnabled = false; } }
public override void Open( eITEM_PRODUCT_TECHNIQUE_TYPE _eType, sPRODUCT_INFO _info) { base.Open( _eType, _info); SetTechName( GetName(_eType)); }
public void InsertItemCash( eITEM_PRODUCT_TECHNIQUE_TYPE eType, sPRODUCT_INFO _info) { UIListItem item = techList.CreateItem( goResTechnologyItemCash) as UIListItem; ProductionTechItemCash _techItem = item.gameObject.GetComponent<ProductionTechItemCash>(); _techItem.Open( eType, _info); }
private void SetItemListState( eITEM_PRODUCT_TECHNIQUE_TYPE _eType, bool isInit = true ) { if( null == m_InfoData ) { textNeedlearnShow.Text = string.Empty; return; } int iIndex = (int)_eType; if( m_InfoData.sProductInfo.Length <= iIndex ) { textNeedlearnShow.Text = string.Empty; return; } if( true == isInit ) listList.ClearList( true); m_listItemList.Clear(); m_eCurType = _eType; sPRODUCT_INFO _info = m_InfoData.sProductInfo[iIndex]; eCLASS tempClass = eCLASS.All; #if OLD_PRODUCT if( eITEM_PRODUCT_TECHNIQUE_TYPE.WEAPON == m_eCurType || eITEM_PRODUCT_TECHNIQUE_TYPE.ARMOR == m_eCurType ) { accessoryBtn.gameObject.SetActiveRecursively( true ); medicineBtn.gameObject.SetActiveRecursively( true ); materialBtn.gameObject.SetActiveRecursively( true ); hunterBtn.gameObject.SetActiveRecursively(true); accessoryBtn.SetState( 1 ); medicineBtn.SetState( 1 ); materialBtn.SetState( 1 ); hunterBtn.SetState ( 1 ); tempClass = AsHudDlgMgr.productRadioClassIndex; } else { accessoryBtn.gameObject.SetActiveRecursively( false ); medicineBtn.gameObject.SetActiveRecursively( false ); materialBtn.gameObject.SetActiveRecursively( false ); hunterBtn.gameObject.SetActiveRecursively( false ); } #else accessoryBtn.gameObject.SetActiveRecursively( false ); medicineBtn.gameObject.SetActiveRecursively( false ); materialBtn.gameObject.SetActiveRecursively( false ); hunterBtn.gameObject.SetActiveRecursively( false ); #endif for( int i=0; i<=_info.nLevel; ++i ) { List<Tbl_Production_Record> _recordlist = AsTableManager.Instance.GetProductionTable().GetRecordList( m_eCurType, i ); if( null == _recordlist ) continue; foreach( Tbl_Production_Record record in _recordlist ) { InsertItem( tempClass, record.getItemID, record ); } } if( 0 == _info.nLevel ) { textNeedlearnShow.Text = AsTableManager.Instance.GetTbl_String(1335); } else { textNeedlearnShow.Text = string.Empty; } switch( tempClass ) { case eCLASS.DIVINEKNIGHT: accessoryBtn.SetState( 0 ); textChangeName.Text = AsTableManager.Instance.GetTbl_String(306); break; case eCLASS.MAGICIAN: medicineBtn.SetState( 0 ); textChangeName.Text = AsTableManager.Instance.GetTbl_String(307); break; case eCLASS.CLERIC: materialBtn.SetState( 0 ); textChangeName.Text = AsTableManager.Instance.GetTbl_String(308); break; case eCLASS.HUNTER: hunterBtn.SetState( 0 ); textChangeName.Text = AsTableManager.Instance.GetTbl_String(309); break; case eCLASS.All: textChangeName.Text = AsTableManager.Instance.GetTbl_String(1679); break; default: textChangeName.Text =string.Empty; break; } listList.ScrollToItem( 0, 0.0f); }