45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
	
| using System;
 | |
| using System.Data;
 | |
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| using UnityEngine;
 | |
| 
 | |
| namespace MMO
 | |
| {
 | |
|     public class MMOTableSkin : MMOTableBase<MMOTableSkin, MMODataSkin, int>
 | |
|     {
 | |
|         public override MMODataSkin GetData(int pID)
 | |
|         {
 | |
|             return mDataList.Find(pItem => pItem.SkinID == pID);
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     [Serializable]
 | |
|     public class MMODataSkin : MMODataBase
 | |
|     {
 | |
|         public int SkinID;
 | |
|         public string SkinName;
 | |
|         public int TotalCount;
 | |
|         public int ReduceCount; 
 | |
|         public int MaxCount;
 | |
|         public float Ratio;
 | |
|         public int SortIndex;
 | |
| 
 | |
|         public override void ParseData(DataRow pCollection)
 | |
|         {
 | |
|             SkinID = 0;
 | |
|             int.TryParse(pCollection[0].ToString(), out SkinID);
 | |
|             SkinName = pCollection[1].ToString();
 | |
|             TotalCount = 0;
 | |
|             int.TryParse(pCollection[2].ToString(), out TotalCount);
 | |
|             ReduceCount = 0;
 | |
|             int.TryParse(pCollection[3].ToString(), out ReduceCount);
 | |
|             MaxCount = 0;
 | |
|             int.TryParse(pCollection[4].ToString(), out MaxCount);
 | |
|             Ratio = 0;
 | |
|             float.TryParse(pCollection[5].ToString(), out Ratio);
 | |
|             SortIndex = 0;
 | |
|             int.TryParse(pCollection[6].ToString(), out SortIndex);
 | |
|         }
 | |
|     }
 | |
| } |