146 lines
4.3 KiB
C#
146 lines
4.3 KiB
C#
|
//This code create by CodeEngine ,don't modify
|
||
|
|
||
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Collections;
|
||
|
using Module.Log;
|
||
|
|
||
|
namespace GCGame.Table
|
||
|
{
|
||
|
|
||
|
public class Tab_Weibo{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "Weibo";
|
||
|
private const int _varCount = 38;
|
||
|
|
||
|
public int GetId()
|
||
|
{
|
||
|
return Id;
|
||
|
}
|
||
|
|
||
|
public static bool Validate(string line)
|
||
|
{
|
||
|
var segments = 0;
|
||
|
foreach (char c in line)
|
||
|
if (c == '\t')
|
||
|
segments++;
|
||
|
// Note: skip the 2nd column as it's the description;
|
||
|
var result = segments == _varCount;
|
||
|
if (!result)
|
||
|
LogModule.ErrorLog(string.Format("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", TAB_FILE_DATA, _varCount, segments));
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
public Tab_Weibo()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_Weibo(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
BroadcastDataID[0] = int.Parse(segments[2]);
|
||
|
BroadcastDataID[1] = int.Parse(segments[5]);
|
||
|
BroadcastStrID[0] = int.Parse(segments[3]);
|
||
|
BroadcastStrID[1] = int.Parse(segments[6]);
|
||
|
EffectID[0] = int.Parse(segments[4]);
|
||
|
EffectID[1] = int.Parse(segments[7]);
|
||
|
GiftItemID[0] = int.Parse(segments[8]);
|
||
|
GiftItemID[1] = int.Parse(segments[9]);
|
||
|
GiftItemID[2] = int.Parse(segments[10]);
|
||
|
GiftItemID[3] = int.Parse(segments[11]);
|
||
|
GiftItemID[4] = int.Parse(segments[12]);
|
||
|
GiftItemID[5] = int.Parse(segments[13]);
|
||
|
GiftItemID[6] = int.Parse(segments[14]);
|
||
|
GiftItemID[7] = int.Parse(segments[15]);
|
||
|
GiftItemID[8] = int.Parse(segments[16]);
|
||
|
GiftItemID[9] = int.Parse(segments[17]);
|
||
|
GiftItemID[10] = int.Parse(segments[18]);
|
||
|
GiftItemID[11] = int.Parse(segments[19]);
|
||
|
GiftItemID[12] = int.Parse(segments[20]);
|
||
|
GiftItemID[13] = int.Parse(segments[21]);
|
||
|
GiftItemID[14] = int.Parse(segments[22]);
|
||
|
GiftItemID[15] = int.Parse(segments[23]);
|
||
|
GiftItemID[16] = int.Parse(segments[24]);
|
||
|
GiftItemID[17] = int.Parse(segments[25]);
|
||
|
GiftItemID[18] = int.Parse(segments[26]);
|
||
|
GiftItemID[19] = int.Parse(segments[27]);
|
||
|
FlowerItemID[0] = int.Parse(segments[28]);
|
||
|
FlowerItemID[1] = int.Parse(segments[30]);
|
||
|
FlowerItemID[2] = int.Parse(segments[32]);
|
||
|
FlowerItemID[3] = int.Parse(segments[34]);
|
||
|
FlowerFriendlyCount[0] = int.Parse(segments[29]);
|
||
|
FlowerFriendlyCount[1] = int.Parse(segments[31]);
|
||
|
FlowerFriendlyCount[2] = int.Parse(segments[33]);
|
||
|
FlowerFriendlyCount[3] = int.Parse(segments[35]);
|
||
|
GiftConsumeSubType = int.Parse(segments[36]);
|
||
|
GiftConsumeNum = int.Parse(segments[37]);
|
||
|
OpenLvl = int.Parse(segments[38]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public readonly int[] BroadcastDataID = new int[2];
|
||
|
public int getBroadcastDataIDCount() { return BroadcastDataID.Length; }
|
||
|
public int GetBroadcastDataIDbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < BroadcastDataID.Length)
|
||
|
return BroadcastDataID[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] BroadcastStrID = new int[2];
|
||
|
public int getBroadcastStrIDCount() { return BroadcastStrID.Length; }
|
||
|
public int GetBroadcastStrIDbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < BroadcastStrID.Length)
|
||
|
return BroadcastStrID[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] EffectID = new int[2];
|
||
|
public int getEffectIDCount() { return EffectID.Length; }
|
||
|
public int GetEffectIDbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < EffectID.Length)
|
||
|
return EffectID[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] GiftItemID = new int[20];
|
||
|
public int getGiftItemIDCount() { return GiftItemID.Length; }
|
||
|
public int GetGiftItemIDbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < GiftItemID.Length)
|
||
|
return GiftItemID[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] FlowerItemID = new int[4];
|
||
|
public int getFlowerItemIDCount() { return FlowerItemID.Length; }
|
||
|
public int GetFlowerItemIDbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < FlowerItemID.Length)
|
||
|
return FlowerItemID[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] FlowerFriendlyCount = new int[4];
|
||
|
public int getFlowerFriendlyCountCount() { return FlowerFriendlyCount.Length; }
|
||
|
public int GetFlowerFriendlyCountbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < FlowerFriendlyCount.Length)
|
||
|
return FlowerFriendlyCount[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public int GiftConsumeSubType { get; private set; }
|
||
|
|
||
|
public int GiftConsumeNum { get; private set; }
|
||
|
|
||
|
public int OpenLvl { get; private set; }
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|