using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace PSO2SERVER.Models { public class CharacterAddtionStruct { } public enum ShortLanguage : byte { Japanese, English, Unknown, } [StructLayout(LayoutKind.Sequential)] public unsafe struct CharParam { public int CharacterID; public int player_id; public uint unk1; public uint voice_type; public ushort unk2; public short voice_pitch; } public enum ClassType : byte { Unknown = 0xFF, Hunter = 0, Ranger, Force, Fighter, Gunner, Techer, Braver, Bouncer, Challenger, Summoner, BattleWarrior, Hero, Phantom, Etole, Luster, } // 每个枚举成员的值是通过位移操作计算的: //Hunter:1 << 0,即 1(0x0001) //Ranger:1 << 1,即 2(0x0002) //Force:1 << 2,即 4(0x0004) //Fighter:1 << 3,即 8(0x0008) //Gunner:1 << 4,即 16(0x0010) //Techer:1 << 5,即 32(0x0020) //Braver:1 << 6,即 64(0x0040) //Bouncer:1 << 7,即 128(0x0080) //Challenger:1 << 8,即 256(0x0100) //Summoner:1 << 9,即 512(0x0200) //BattleWarrior:1 << 10,即 1024(0x0400) //Hero:1 << 11,即 2048(0x0800) //Phantom:1 << 12,即 4096(0x1000) //Etole:1 << 13,即 8192(0x2000) //Luster:1 << 14,即 16384(0x4000) [Flags] public enum ClassTypeField : ushort { Hunter = 1 << 0, Ranger = 1 << 1, Force = 1 << 2, Fighter = 1 << 3, Gunner = 1 << 4, Techer = 1 << 5, Braver = 1 << 6, Bouncer = 1 << 7, Challenger = 1 << 8, Summoner = 1 << 9, BattleWarrior = 1 << 10, Hero = 1 << 11, Phantom = 1 << 12, Etole = 1 << 13, Luster = 1 << 14 } [StructLayout(LayoutKind.Sequential)] public struct JobEntry { /// Main level. public ushort level; public ushort level2; // SubClass level /// Current EXP. public uint exp; } [StructLayout(LayoutKind.Sequential)] public struct Entries { public JobEntry hunter , ranger , force , fighter , gunner , techer , braver , bouncer , Challenger , Summoner , BattleWarrior , Hero , Phantom , Etole , Luster , unk16 , unk17 , unk18 , unk19 , unk20 , unk21 , unk22 , unk23 , unk24 ; } public enum RunAnimation : ushort { Walking = 9, Hovering = 11 } public enum Race : ushort { Unknown = 0xFFFF, Human = 0, Newman, Cast, Dewman, } public enum Gender : ushort { Unknown = 0xFFFF, Male = 0, Female, } [StructLayout(LayoutKind.Sequential)] public struct Figure { public ushort x, y, z; // Great naming, SEGA } public struct AccessoryData { public sbyte Value1; public sbyte Value2; public sbyte Value3; } public enum SkinColor : byte { RaceDefined, Human, Deuman, Cast } [StructLayout(LayoutKind.Sequential)] public struct HSVColor { public ushort hue, saturation, value; } }