新增json文件读取

This commit is contained in:
Longfeng Qin 2024-12-08 11:33:06 +08:00
parent 4a8c6b33d4
commit 01ba3e4b83
27 changed files with 227 additions and 111 deletions

View File

@ -22,7 +22,7 @@ namespace PSO2SERVER
private readonly string _configFile = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) +
Path.DirectorySeparatorChar + "config\\Server.cfg";
// Settings
// settings
[ConfigComment("服务器对外绑定的地址(支持域名或者IP,优先获取IPV4)")]
public IPAddress BindAddress = IPAddress.Loopback;

View File

@ -243,7 +243,7 @@ namespace PSO2SERVER
// Config
var config = new ConsoleCommand(Config, "config", "c");
config.Arguments.Add(new ConsoleCommandArgument("Save | Load | List | Option Name", false));
config.Arguments.Add(new ConsoleCommandArgument("Save | Load | List | Option name", false));
config.Arguments.Add(new ConsoleCommandArgument("Value", true));
config.Help = "Set a configuration variable to the specified value";
Commands.Add(config);
@ -277,7 +277,7 @@ namespace PSO2SERVER
// SpawnClone
var spawnClone = new ConsoleCommand(SpawnClone, "spawnclone");
spawnClone.Arguments.Add(new ConsoleCommandArgument("Username", false));
spawnClone.Arguments.Add(new ConsoleCommandArgument("Accounts Name", false));
spawnClone.Arguments.Add(new ConsoleCommandArgument("Accounts name", false));
spawnClone.Arguments.Add(new ConsoleCommandArgument("X", false));
spawnClone.Arguments.Add(new ConsoleCommandArgument("Y", false));
spawnClone.Arguments.Add(new ConsoleCommandArgument("Z", false));
@ -286,7 +286,7 @@ namespace PSO2SERVER
// SendPacket
var sendPacket = new ConsoleCommand(SendPacket, "sendpacket", "sendp");
sendPacket.Arguments.Add(new ConsoleCommandArgument("Name", false));
sendPacket.Arguments.Add(new ConsoleCommandArgument("name", false));
sendPacket.Arguments.Add(new ConsoleCommandArgument("Type", false));
sendPacket.Arguments.Add(new ConsoleCommandArgument("SubType", false));
sendPacket.Arguments.Add(new ConsoleCommandArgument("Flags", false));
@ -507,7 +507,7 @@ namespace PSO2SERVER
{
var help = string.Empty;
// Name
// name
help += command.Names[0];
// Arguments

View File

@ -166,7 +166,7 @@ namespace PSO2SERVER.Database
writer.Write((ushort)Unk2);
writer.Write(VoicePitch);
// 序列化 Name (假设固定长度字符串16个字节UTF-16 编码)
// 序列化 name (假设固定长度字符串16个字节UTF-16 编码)
writer.WriteFixedLengthUtf16(Name, 0x10);
// 序列化 Looks

View File

@ -1,13 +1,14 @@
using Newtonsoft.Json;
using Org.BouncyCastle.Asn1.Pkcs;
using PSO2SERVER.Protocol.Packets;
using PSO2SERVER.Zone;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PSO2SERVER.Zone
namespace PSO2SERVER.Json
{
public class MapData
{
@ -30,7 +31,7 @@ namespace PSO2SERVER.Zone
public Dictionary<string, string> Luas { get; set; }
[JsonProperty("init_map")]
public uint InitMap { get; set; }//ZoneId
public uint InitMap { get; set; }//zone_id
[JsonProperty("zones")]
public List<ZoneData> Zones { get; set; }
@ -52,30 +53,97 @@ namespace PSO2SERVER.Zone
public class ObjectData
{
[JsonProperty("zone_id")]
public uint zone_id { get; set; }
[JsonProperty("is_active")]
public bool is_active { get; set; }
[JsonProperty("data")]
public ObjectSpawnPacket data { get; set; }
[JsonProperty("lua_data")]
public string lua_data { get; set; }
}
public class EventData
{
[JsonProperty("zone_id")]
public uint zone_id { get; set; }
[JsonProperty("is_active")]
public bool is_active { get; set; }
[JsonProperty("data")]
public EventSpawnPacket data { get; set; }
[JsonProperty("lua_data")]
public string lua_data { get; set; }
}
public class NPCData
{
[JsonProperty("zone_id")]
public uint zone_id { get; set; }
[JsonProperty("is_active")]
public bool is_active { get; set; }
[JsonProperty("data")]
public NPCSpawnPacket data { get; set; }
[JsonProperty("lua_data")]
public string lua_data { get; set; }
}
public class TransporterData
{
[JsonProperty("zone_id")]
public uint zone_id { get; set; }
[JsonProperty("is_active")]
public bool is_active { get; set; }
[JsonProperty("data")]
public TransporterSpawnPacket data { get; set; }
[JsonProperty("lua_data")]
public string lua_data { get; set; }
}
public class EnemySpawn
{
public string EnemyName { get; set; }
public uint SpawnCategory { get; set; }
// 默认构造函数
public EnemySpawn()
{
EnemyName = string.Empty;
SpawnCategory = 0;
}
// 带参构造函数
public EnemySpawn(string enemyName, uint spawnCategory)
{
EnemyName = enemyName;
SpawnCategory = spawnCategory;
}
}
public class ZoneData
{
[JsonProperty("name")]
public string Name { get; set; }
public bool IsSpecialZone { get; set; }
public uint ZoneId { get; set; }
[JsonProperty("is_special_zone")]
public bool Is_special_zone { get; set; }
[JsonProperty("zone_id")]
public uint Zone_id { get; set; }
[JsonProperty("settings")]
public ZoneSettings Settings { get; set; }
public PSOLocation DefaultLocation { get; set; }
[JsonProperty("default_location")]
public PSOLocation Default_location { get; set; }
[JsonProperty("enemies")]
public List<EnemySpawn> Enemies { get; set; }
[JsonProperty("chunks")]
public List<ZoneChunk> Chunks { get; set; }
// 默认构造函数
public ZoneData()
{
Name = string.Empty;
IsSpecialZone = false;
ZoneId = new uint();
Is_special_zone = false;
Zone_id = new uint();
Settings = new ZoneSettings();
DefaultLocation = new PSOLocation();
Default_location = new PSOLocation();
Enemies = new List<EnemySpawn>();
Chunks = new List<ZoneChunk>();
}
@ -83,9 +151,13 @@ namespace PSO2SERVER.Zone
public class ZoneChunk
{
[JsonProperty("zone_id")]
public uint ZoneId { get; set; }
[JsonProperty("chunk_id")]
public uint ChunkId { get; set; }
[JsonProperty("enemy_spawn_type")]
public EnemySpawnType EnemySpawnType { get; set; }
[JsonProperty("enemy_spawn_points")]
public List<PSOLocation> EnemySpawnPoints { get; set; }
// 默认构造函数
@ -133,73 +205,4 @@ namespace PSO2SERVER.Zone
}
public class Manual : EnemySpawnType { }
public class EventData
{
public uint zone_id { get; set; }
public bool is_active { get; set; }
public EventSpawnPacket data { get; set; }
public string lua_data { get; set; }
}
public class NPCData
{
public uint zone_id { get; set; }
public bool is_active { get; set; }
public NPCSpawnPacket data { get; set; }
public string lua_data { get; set; }
}
public class TransporterData
{
public uint zone_id { get; set; }
public bool is_active { get; set; }
public TransporterSpawnPacket data { get; set; }
public string lua_data { get; set; }
}
public class EnemySpawn
{
public string EnemyName { get; set; }
public uint SpawnCategory { get; set; }
// 默认构造函数
public EnemySpawn()
{
EnemyName = string.Empty;
SpawnCategory = 0;
}
// 带参构造函数
public EnemySpawn(string enemyName, uint spawnCategory)
{
EnemyName = enemyName;
SpawnCategory = spawnCategory;
}
}
public class AutomaticEnemySpawn
{
public uint Min { get; set; }
public uint Max { get; set; }
public AutomaticEnemySpawn() { }
public AutomaticEnemySpawn(uint min, uint max)
{
Min = min;
Max = max;
}
}
public class AutomaticWithRespawnEnemySpawn : AutomaticEnemySpawn
{
public TimeSpan RespawnTime { get; set; }
public AutomaticWithRespawnEnemySpawn() { }
public AutomaticWithRespawnEnemySpawn(uint min, uint max, TimeSpan respawnTime)
: base(min, max)
{
RespawnTime = respawnTime;
}
}
}

46
Server/Json/QuestJson.cs Normal file
View File

@ -0,0 +1,46 @@
using Newtonsoft.Json;
using PSO2SERVER.Models;
using PSO2SERVER.Protocol.Packets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PSO2SERVER.Json
{
public class QuestData
{
[JsonProperty("definition")]
public QuestDefiniton QuestDefiniton { get; set; }
[JsonProperty("difficulties")]
public QuestDifficulty Difficulty { get; set; }
[JsonProperty("map")]
public MapData Mapdata { get; set; }
[JsonProperty("enemies")]
public List<EnemyData> Enemies { get; set; }
[JsonProperty("immediate_move")]
public bool ImmediateMove { get; set; }
public QuestData()
{
QuestDefiniton = new QuestDefiniton();
Difficulty = new QuestDifficulty();
Mapdata = new MapData();
Enemies = new List<EnemyData>();
ImmediateMove = false;
}
}
public class EnemyData
{
[JsonProperty("difficulty")]
public ushort Difficulty { get; set; }
[JsonProperty("mapid")]
public uint mapid { get; set; }
[JsonProperty("data")]
public EnemySpawnPacket data { get; set; }
[JsonProperty("lua_data")]
public string lua_data { get; set; }
}
}

View File

@ -51,7 +51,7 @@ namespace PSO2SERVER.Object
var newObject = PSOObject.FromDBObject(dbObject);
objects.Add(newObject.Header.ID, newObject);
allTheObjects.Add(newObject.Header.ID, newObject);
//Logger.WriteInternal("[OBJ] 从数据库中载入对象 {0} 所属区域 {1}.", newObject.Name, zone);
//Logger.WriteInternal("[OBJ] 从数据库中载入对象 {0} 所属区域 {1}.", newObject.name, zone);
}
}

View File

@ -9,7 +9,7 @@ namespace PSO2SERVER.Party
{
public static readonly PartyManager instance = new PartyManager();
public Dictionary<Party, string> parties = new Dictionary<Party, string>(); // Key: Party, Value: Name? (for now)
public Dictionary<Party, string> parties = new Dictionary<Party, string>(); // Key: Party, Value: name? (for now)
public static PartyManager Instance
{

View File

@ -16,6 +16,7 @@ using Newtonsoft.Json.Linq;
using Google.Protobuf.Compiler;
using Newtonsoft.Json;
using PSO2SERVER.Zone;
using PSO2SERVER.Json;
namespace PSO2SERVER
{
@ -101,7 +102,20 @@ namespace PSO2SERVER
// 输出结果
Logger.Write($"map_object ID: {map.Mapdata.map_object.ID}");
Logger.Write($"Zones[0].Name: {map.Zones[0].Name}");
Logger.Write($"Zones[0].IsSpecialZone: {map.Zones[0].IsSpecialZone}");
Logger.Write($"Zones[0].Is_special_zone: {map.Zones[0].Is_special_zone}");
string jsonFilePath2 = "data\\maps\\lobby\\events\\main_lobby_1\\all_events.json";
// 读取 JSON 文件
string json2 = File.ReadAllText(jsonFilePath2);
// 反序列化为 C# 对象
EventData map_event = JsonConvert.DeserializeObject<List<EventData>>(json2).FirstOrDefault();
// 输出结果
Logger.Write($"map_event zone_id: {map_event.zone_id}");
Logger.Write($"map_event is_active: {map_event.is_active}");
Logger.Write($"map_event objName: {map_event.data.objName}");
try
{

View File

@ -24,7 +24,7 @@ namespace PSO2SERVER.Protocol.Handlers
PackedData theFlags = (PackedData)dataFlags;
// Debug
//Logger.WriteInternal("[移动] Movement 数据包来自 {0} 包含 {1} 数据.", context.Character.Name, theFlags);
//Logger.WriteInternal("[移动] Movement 数据包来自 {0} 包含 {1} 数据.", context.Character.name, theFlags);
// TODO: Maybe do this better someday
MovementPacket.FullMovementData dstData = new MovementPacket.FullMovementData();
@ -129,7 +129,7 @@ namespace PSO2SERVER.Protocol.Handlers
}
//Logger.WriteInternal("[移动] 玩家 {0} 移动中 (坐标: X{1}, Y{2}, Z{3})", context.Character.Name, context.CurrentLocation.PosX,
//Logger.WriteInternal("[移动] 玩家 {0} 移动中 (坐标: X{1}, Y{2}, Z{3})", context.Character.name, context.CurrentLocation.PosX,
//context.CurrentLocation.PosY, context.CurrentLocation.PosZ);
foreach (var c in Server.Instance.Clients)

View File

@ -30,7 +30,7 @@ namespace PSO2SERVER.Protocol.Handlers
byte[] final = reader.ReadBytes(4);
//Logger.WriteInternal("[动作] {0} 发送动作 {1}", context.Character.Name, command);
//Logger.WriteInternal("[动作] {0} 发送动作 {1}", context.Character.name, command);
foreach (var c in Server.Instance.Clients)
{

View File

@ -40,7 +40,7 @@ namespace PSO2SERVER.Protocol.Handlers
srcObj = null;
}
//Logger.WriteInternal("[OBJ] {0} (ID {1}) <{2}> --> Ent {3} (ID {4})", srcObj.Name, srcObj.Header.ID, command, (ObjectType)dstObject.ObjectType, dstObject.ID);
//Logger.WriteInternal("[OBJ] {0} (ID {1}) <{2}> --> Ent {3} (ID {4})", srcObj.name, srcObj.Header.ID, command, (ObjectType)dstObject.ObjectType, dstObject.ID);
// TODO: Delete this code and do this COMPLETELY correctly!!!
if (command == "Transfer" && context.CurrentZone.Name == "lobby")

View File

@ -24,7 +24,7 @@ namespace PSO2SERVER.Protocol.Handlers
movData.timestamp = 0;
//Logger.WriteInternal("[移动] 玩家 {0} 停止移动 (坐标:{1}, {2}, {3})", context.Character.Name,
//Logger.WriteInternal("[移动] 玩家 {0} 停止移动 (坐标:{1}, {2}, {3})", context.Character.name,
// Helper.FloatFromHalfPrecision(movData.currentPos.x), Helper.FloatFromHalfPrecision(movData.currentPos.y),
// Helper.FloatFromHalfPrecision(movData.currentPos.z));

View File

@ -34,10 +34,10 @@ namespace PSO2SERVER.Protocol.Handlers
partyFlags = (PartyFlags)reader.ReadByte();
unk = reader.ReadUInt64();
// 打印输出
Logger.Write($"Name: {name}");
Logger.Write($"name: {name}");
Logger.Write($"Password: {password}");
Logger.Write($"Comments: {comments}");
Logger.Write($"Quest Name: {questname}");
Logger.Write($"Quest name: {questname}");
Logger.Write($"Min Level: {min_level}");
Logger.Write($"Max Level: {max_level}");
Logger.Write($"Playstyle: {playstyle}");

View File

@ -53,7 +53,7 @@ namespace PSO2SERVER.Protocol.Handlers
var packet = new SkitItemAddRequestPacket(Encoding.ASCII.GetString(skitNameBytes).TrimEnd('\0'), unk);
// 打印处理结果(仅作示例)
Console.WriteLine("Skit Name: " + packet.GetSkitName());
Console.WriteLine("Skit name: " + packet.GetSkitName());
Console.WriteLine("Unk Value: " + packet.unk);
context.SendPacket(new SkitItemAddResponsePacket(packet.GetSkitName(), packet.unk));

View File

@ -16,13 +16,13 @@ namespace PSO2SERVER.Protocol.Packets
public ObjectHeader map_object { get; set; } = new ObjectHeader();
/// Receiving player.
public ObjectHeader receiver { get; set; } = new ObjectHeader();
/// Settings for the initial zone (i.e. first zone that the player will appear in).
/// settings for the initial zone (i.e. first zone that the player will appear in).
public ZoneSettings settings { get; set; } = new ZoneSettings();
public byte[] unk4 { get; set; } = new byte[0x0C];
public byte[] unk5 { get; set; } = new byte[0x0C];
public byte[] unk6 { get; set; } = new byte[0x0C];
public string unk7 { get; set; } = string.Empty;//Ascii
/// Settings for other zones.
/// settings for other zones.
public List<ZoneSettings> other_settings { get; set; } = new List<ZoneSettings>();
public List<WarpInfo> warps { get; set; } = new List<WarpInfo>();
public List<LoadLevelThing3> unk10 { get; set; } = new List<LoadLevelThing3>();

View File

@ -1,4 +1,5 @@
using PSO2SERVER.Database;
using Newtonsoft.Json;
using PSO2SERVER.Database;
using PSO2SERVER.Models;
using PSO2SERVER.Zone;
using System.IO;
@ -28,10 +29,14 @@ namespace PSO2SERVER.Protocol.Packets
/// CharacterSpawnPacket Struct
/// </summary>
/// Spawned character's player object.
[JsonProperty("object")]
public ObjectHeader ObjHeader { get; set; } = new ObjectHeader();
[JsonProperty("position")]
public PSOLocation ObjPosition { get; set; } = new PSOLocation();
[JsonProperty("unk1")]
public ushort Unk1 { get; set; } = 0;
/// Always `Character`. (?)
/// Enemy name.
[JsonProperty("name")]
public string ObjName { get; set; } = "Character";//Ascii 0x20
public ushort Unk3 { get; set; } = 1;
public ushort Unk4 { get; set; }
@ -53,6 +58,10 @@ namespace PSO2SERVER.Protocol.Packets
//#[SeekAfter(0x60)]
public byte[] Unk12 { get; set; } = new byte[0x40];
public CharacterSpawnPacket()
{
}
public CharacterSpawnPacket(Character character, PSOLocation locatiion)
{
ObjHeader = new ObjectHeader((uint)character.Account.AccountId, ObjectType.Player);

View File

@ -1,4 +1,5 @@
using PSO2SERVER.Models;
using Newtonsoft.Json;
using PSO2SERVER.Models;
using PSO2SERVER.Zone;
using System;
using System.Collections.Generic;
@ -9,10 +10,13 @@ namespace PSO2SERVER.Protocol.Packets
{
public class TransporterSpawnPacket : Packet
{
[JsonProperty("object")]
public ObjectHeader objHeader { get; set; } = new ObjectHeader();
[JsonProperty("position")]
public PSOLocation objPosition { get; set; } = new PSOLocation();
public ushort unk1 { get; set; } = 0;
/// Enemy name.
[JsonProperty("name")]
public string objName { get; set; } = string.Empty;//0x20
public uint unk2 { get; set; } = 0;
public ushort unk3 { get; set; } = 0;
@ -30,6 +34,10 @@ namespace PSO2SERVER.Protocol.Packets
objName = obj.Name;
}
public TransporterSpawnPacket()
{
}
#region implemented abstract members of Packet
public override byte[] Build()

View File

@ -1,4 +1,5 @@
using PSO2SERVER.Models;
using Newtonsoft.Json;
using PSO2SERVER.Models;
using PSO2SERVER.Zone;
using System;
using System.Collections.Generic;
@ -11,10 +12,14 @@ namespace PSO2SERVER.Protocol.Packets
public class EventSpawnPacket : Packet
{
public readonly PSOObject _obj;
[JsonProperty("object")]
public ObjectHeader objHeader { get; set; } = new ObjectHeader();
[JsonProperty("position")]
public PSOLocation objPosition { get; set; } = new PSOLocation();
public ushort unk1 { get; set; } = 0;
public string objName { get; set; } = string.Empty;
/// Enemy name.
[JsonProperty("name")]
public string objName { get; set; } = string.Empty;//0x20
public uint unk3 { get; set; } = 0;
public byte[] unk4 { get; set; } = new byte[0x0C];
public ushort unk5 { get; set; } = 0;
@ -40,6 +45,10 @@ namespace PSO2SERVER.Protocol.Packets
_obj = obj;
}
public EventSpawnPacket()
{
}
#region implemented abstract members of Packet
public override byte[] Build()

View File

@ -1,4 +1,5 @@
using Org.BouncyCastle.Utilities;
using Newtonsoft.Json;
using Org.BouncyCastle.Utilities;
using PSO2SERVER.Models;
using PSO2SERVER.Zone;
using System;
@ -14,9 +15,13 @@ namespace PSO2SERVER.Protocol.Packets
public class ObjectSpawnPacket : Packet
{
public readonly PSOObject _obj;
[JsonProperty("object")]
public ObjectHeader objHeader { get; set; } = new ObjectHeader();
[JsonProperty("position")]
public PSOLocation objPosition { get; set; } = new PSOLocation();
public ushort unk1 { get; set; } = 0;
/// Enemy name.
[JsonProperty("name")]
public string objName { get; set; } = string.Empty;//0x20
public uint[] unk2 { get; set; } = new uint[0x05];
public uint flags { get; set; } = 0;
@ -31,6 +36,10 @@ namespace PSO2SERVER.Protocol.Packets
_obj = obj;
}
public ObjectSpawnPacket()
{
}
#region implemented abstract members of Packet
public override byte[] Build()

View File

@ -1,4 +1,5 @@
using Org.BouncyCastle.Utilities;
using Newtonsoft.Json;
using Org.BouncyCastle.Utilities;
using PSO2SERVER.Models;
using PSO2SERVER.Zone;
using System;
@ -13,10 +14,14 @@ namespace PSO2SERVER.Protocol.Packets
{
public class NPCSpawnPacket : Packet
{
[JsonProperty("object")]
public ObjectHeader objHeader { get; set; } = new ObjectHeader();
[JsonProperty("position")]
public PSOLocation objPosition { get; set; } = new PSOLocation();
public ushort unk1 { get; set; } = 0;
public string objName { get; set; } = string.Empty;
/// Enemy name.
[JsonProperty("name")]
public string objName { get; set; } = string.Empty;//0x20
public uint unk2 { get; set; } = 0;
public byte[] unk3 { get; set; } = new byte[0x0C];
public ushort unk4 { get; set; } = 0;
@ -39,6 +44,10 @@ namespace PSO2SERVER.Protocol.Packets
unk12 = 1;
}
public NPCSpawnPacket()
{
}
#region implemented abstract members of Packet
public override byte[] Build()

View File

@ -1,4 +1,5 @@
using PSO2SERVER.Models;
using Newtonsoft.Json;
using PSO2SERVER.Models;
using PSO2SERVER.Zone;
using System;
using System.Collections.Generic;
@ -9,10 +10,13 @@ namespace PSO2SERVER.Protocol.Packets
{
public class EnemySpawnPacket : Packet
{
[JsonProperty("object")]
public ObjectHeader objHeader { get; set; } = new ObjectHeader();
[JsonProperty("position")]
public PSOLocation objPosition { get; set; } = new PSOLocation();
public ushort unk1 { get; set; } = 0;
/// Enemy name.
[JsonProperty("name")]
public string objName { get; set; } = string.Empty;//0x20
public uint unk2 { get; set; } = 0;
/// Enemy HP.
@ -48,6 +52,10 @@ namespace PSO2SERVER.Protocol.Packets
unk12 = 255;
}
public EnemySpawnPacket()
{
}
#region implemented abstract members of Packet
public override byte[] Build()

View File

@ -34,7 +34,7 @@ namespace PSO2SERVER.Protocol.Packets
/*
[K873] What I've currently mapped out
24 -> Start
38 -> Quest Name/Type Index?
38 -> Quest name/Type Index?
100 -> Bitfield 1
102 -> Estimated Play Time
103 -> Party Type

View File

@ -151,7 +151,7 @@ namespace PSO2SERVER.Protocol.Packets
//{
// PartyEntry pe = new PartyEntry();
// writer.WriteStruct(new ObjectHeader((uint)players[i].Accounts.AccountId, ObjectType.Player)); // Header of player
// writer.WriteUtf16(players[i].Name, 0xD863, 0xA9);
// writer.WriteUtf16(players[i].name, 0xD863, 0xA9);
// writer.WriteUtf16(players[i].Accounts.Nickname, 0xD863, 0xA9);
// writer.Write((byte)players[i].Jobs.entries.hunter.level); // Active class level
// writer.Write((byte)players[i].Jobs.entries.hunter.level2); // idk

View File

@ -10,7 +10,7 @@ namespace PSO2SERVER.Protocol.Packets
public class SetQuestInfoPacket : Packet
{
/// <summary>
/// Name ID of the quest.
/// name ID of the quest.
/// </summary>
public uint Name { get; set; }

View File

@ -46,7 +46,7 @@ namespace PSO2SERVER.Protocol.Packets
for (var i = 0; i < 24; i++)
writer.Write((byte) 0);
// Team Name
// Team name
// We don't actually have team names anywhere, just dump a test here
writer.WriteFixedLengthUtf16("TEAMNAME", 16);

View File

@ -167,6 +167,7 @@
<Compile Include="Config.cs" />
<Compile Include="ConsoleSystem.cs" />
<Compile Include="Crypto\KeyLoader.cs" />
<Compile Include="Json\QuestJson.cs" />
<Compile Include="Logger.cs" />
<Compile Include="Models\BattleStats.cs" />
<Compile Include="Models\BlockInfo.cs" />
@ -448,7 +449,7 @@
<Compile Include="Protocol\Handlers\04-ObjectHandler\04-07-MovementHandlers.cs" />
<Compile Include="Protocol\Handlers\07-ChatHandler\07-00-ChatHandler.cs" />
<Compile Include="Zone\Map.cs" />
<Compile Include="Zone\MapJson.cs" />
<Compile Include="Json\MapJson.cs" />
<Compile Include="Zone\ZoneAdditional.cs" />
<Compile Include="Zone\ZoneManager.cs" />
</ItemGroup>

View File

@ -45,7 +45,7 @@ namespace PSO2SERVER.Zone
// 重写 ToString 方法(可选)
public override string ToString()
{
return $"WorldId: {WorldId}, ZoneId: {ZoneId}, MapId: {MapId}, SizeX: {SizeX}, SizeY: {SizeY}";
return $"WorldId: {WorldId}, zone_id: {ZoneId}, MapId: {MapId}, SizeX: {SizeX}, SizeY: {SizeY}";
}
}