PSO2SERVER/Server/Models/CharacterAdditionalStruct.cs

181 lines
3.7 KiB
C#
Raw Normal View History

2024-12-06 23:40:36 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace PSO2SERVER.Models
{
2024-12-08 10:56:05 +08:00
public class CharacterAdditionalStruct
2024-12-06 23:40:36 +08:00
{
}
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,
}
// 每个枚举成员的值是通过位移操作计算的:
//Hunter1 << 0即 10x0001
//Ranger1 << 1即 20x0002
//Force1 << 2即 40x0004
//Fighter1 << 3即 80x0008
//Gunner1 << 4即 160x0010
//Techer1 << 5即 320x0020
//Braver1 << 6即 640x0040
//Bouncer1 << 7即 1280x0080
//Challenger1 << 8即 2560x0100
//Summoner1 << 9即 5120x0200
//BattleWarrior1 << 10即 10240x0400
//Hero1 << 11即 20480x0800
//Phantom1 << 12即 40960x1000
//Etole1 << 13即 81920x2000
//Luster1 << 14即 163840x4000
[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;
}
}