131 lines
3.5 KiB
C#
131 lines
3.5 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_SceneClass{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "SceneClass";
|
||
|
private const int _varCount = 27;
|
||
|
|
||
|
public int GetId()
|
||
|
{
|
||
|
return SceneID;
|
||
|
}
|
||
|
|
||
|
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_SceneClass()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_SceneClass(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
SceneID = int.Parse(segments[0]);
|
||
|
Name = segments[2].Trim();
|
||
|
ResName = segments[3].Trim();
|
||
|
Type = int.Parse(segments[4]);
|
||
|
IsBanUseSkill = int.Parse(segments[5]);
|
||
|
OrgScene = int.Parse(segments[6]);
|
||
|
MapLevel = segments[7].Trim();
|
||
|
BGMusic = int.Parse(segments[8]);
|
||
|
CanChangePK = int.Parse(segments[9]);
|
||
|
PVPRule = int.Parse(segments[10]);
|
||
|
IsAutoFight = int.Parse(segments[11]);
|
||
|
ReliveID[0] = int.Parse(segments[12]);
|
||
|
ReliveID[1] = int.Parse(segments[13]);
|
||
|
ReliveID[2] = int.Parse(segments[14]);
|
||
|
SafeX = float.Parse(segments[15]);
|
||
|
SafeZ = float.Parse(segments[16]);
|
||
|
SceneMapTexture = segments[17].Trim();
|
||
|
ServerPoint = int.Parse(segments[18]);
|
||
|
EffectID = int.Parse(segments[19]);
|
||
|
ImpactId[0] = int.Parse(segments[20]);
|
||
|
ImpactId[1] = int.Parse(segments[21]);
|
||
|
ImpactId[2] = int.Parse(segments[22]);
|
||
|
ImpactId[3] = int.Parse(segments[23]);
|
||
|
CanUseMedic = int.Parse(segments[24]);
|
||
|
CanMount = int.Parse(segments[25]);
|
||
|
CanEnterSpecialActivity = int.Parse(segments[26]);
|
||
|
IsShowMission = int.Parse(segments[27]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int SceneID { get; private set; }
|
||
|
|
||
|
public string Name { get; private set; }
|
||
|
|
||
|
public string ResName { get; private set; }
|
||
|
|
||
|
public int Type { get; private set; }
|
||
|
|
||
|
public int IsBanUseSkill { get; private set; }
|
||
|
|
||
|
public int OrgScene { get; private set; }
|
||
|
|
||
|
public string MapLevel { get; private set; }
|
||
|
|
||
|
public int BGMusic { get; private set; }
|
||
|
|
||
|
public int CanChangePK { get; private set; }
|
||
|
|
||
|
public int PVPRule { get; private set; }
|
||
|
|
||
|
public int IsAutoFight { get; private set; }
|
||
|
|
||
|
public readonly int[] ReliveID = new int[3];
|
||
|
public int getReliveIDCount() { return ReliveID.Length; }
|
||
|
public int GetReliveIDbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ReliveID.Length)
|
||
|
return ReliveID[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public float SafeX { get; private set; }
|
||
|
|
||
|
public float SafeZ { get; private set; }
|
||
|
|
||
|
public string SceneMapTexture { get; private set; }
|
||
|
|
||
|
public int ServerPoint { get; private set; }
|
||
|
|
||
|
public int EffectID { get; private set; }
|
||
|
|
||
|
public readonly int[] ImpactId = new int[4];
|
||
|
public int getImpactIdCount() { return ImpactId.Length; }
|
||
|
public int GetImpactIdbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < ImpactId.Length)
|
||
|
return ImpactId[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public int CanUseMedic { get; private set; }
|
||
|
|
||
|
public int CanMount { get; private set; }
|
||
|
|
||
|
public int CanEnterSpecialActivity { get; private set; }
|
||
|
|
||
|
public int IsShowMission { get; private set; }
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|