修正03数据集
This commit is contained in:
parent
78dcc9c2df
commit
535dbfc12b
@ -4,17 +4,31 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using PSO2SERVER.Models;
|
||||
using PSO2SERVER.Zone;
|
||||
using static PSO2SERVER.Protocol.Handlers.TeleportCasinoToLobby;
|
||||
|
||||
namespace PSO2SERVER.Protocol.Handlers
|
||||
{
|
||||
[PacketHandlerAttr(0x03, 0x12)]
|
||||
public class CampshipTeleport : PacketHandler
|
||||
{
|
||||
public struct ToCampshipPacket
|
||||
{
|
||||
public uint unk1;
|
||||
public uint unk2;
|
||||
public uint unk3;
|
||||
public uint unk4;
|
||||
}
|
||||
|
||||
public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
|
||||
{
|
||||
if (context.currentParty.currentQuest == null)
|
||||
return;
|
||||
|
||||
var reader = new PacketReader(data, position, size);
|
||||
var pkt = reader.ReadStruct<ToCampshipPacket>();
|
||||
|
||||
Logger.Write($"unk1 {pkt.unk1} unk2 {pkt.unk2} unk3 {pkt.unk3} unk4 {pkt.unk4}");
|
||||
|
||||
var instanceName = String.Format("{0}-{1}", context.currentParty.currentQuest.name, context._account.Nickname);
|
||||
ZoneManager.Instance.NewInstance(instanceName, new Map("campship", 150, 0, Map.MapType.Campship, 0));
|
||||
// todo: add next map
|
||||
|
@ -4,17 +4,31 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using PSO2SERVER.Models;
|
||||
using PSO2SERVER.Zone;
|
||||
using static PSO2SERVER.Protocol.Handlers.TeleportCasinoToLobby;
|
||||
|
||||
namespace PSO2SERVER.Protocol.Handlers
|
||||
{
|
||||
[PacketHandlerAttr(0x03, 0x16)]
|
||||
public class CampshipTeleportDown : PacketHandler
|
||||
{
|
||||
public struct CampshipDownPacket
|
||||
{
|
||||
public uint zone_id;
|
||||
public uint unk2;
|
||||
public uint unk3;
|
||||
public uint unk4;
|
||||
}
|
||||
|
||||
public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
|
||||
{
|
||||
if (context.currentParty.currentQuest == null)
|
||||
return;
|
||||
|
||||
var reader = new PacketReader(data, position, size);
|
||||
var pkt = reader.ReadStruct<CampshipDownPacket>();
|
||||
|
||||
Logger.Write($"zone_id {pkt.zone_id} unk2 {pkt.unk2} unk3 {pkt.unk3} unk4 {pkt.unk4}");
|
||||
|
||||
// TODO: WTF terribad hax?
|
||||
if (context.CurrentLocation.PosZ >= 20)
|
||||
{
|
||||
|
@ -30,15 +30,13 @@ namespace PSO2SERVER.Protocol.Handlers
|
||||
|
||||
Logger.Write($"unk1 {pkt.unk1} unk2 {pkt.unk2} unk3 {pkt.unk3} unk4 {pkt.unk4}");
|
||||
|
||||
//reader.ReadUInt64(); // Skip 8 bytes
|
||||
if(pkt.unk3 != 0x10)
|
||||
{
|
||||
Logger.WriteWarning("[WRN] Packet 0x3 0x34's first value was not 0x10! Investigate.");
|
||||
}
|
||||
|
||||
uint partOfLobby = pkt.unk4;
|
||||
PSOLocation destination;
|
||||
if(partOfLobby == 0) // Gate area
|
||||
if(pkt.unk4 == 0) // Gate area
|
||||
{
|
||||
destination = new PSOLocation(0f, 1f, 0f, 0f, -0.22f, 2.4f, 198.75f);
|
||||
}
|
||||
|
@ -31,15 +31,13 @@ namespace PSO2SERVER.Protocol.Handlers
|
||||
|
||||
Logger.Write($"unk1 {pkt.unk1} unk2 {pkt.unk2} unk3 {pkt.unk3} zone_id {pkt.zone_id} unk4 {pkt.unk4}");
|
||||
|
||||
//reader.ReadUInt64(); // Skip 8 bytes
|
||||
if(pkt.unk3 != 0x10)
|
||||
{
|
||||
Logger.WriteWarning("[WRN] Packet 0x3 0x34's first value was not 0x10! Investigate.");
|
||||
}
|
||||
|
||||
uint partOfLobby = reader.ReadUInt32();
|
||||
PSOLocation destination;
|
||||
if(partOfLobby == 0) // Gate area
|
||||
if(pkt.zone_id == 0) // Gate area
|
||||
{
|
||||
destination = new PSOLocation(0f, 1f, 0f, 0f, -0.22f, 2.4f, 198.75f);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using static PSO2SERVER.Protocol.Handlers.TeleportCasinoToLobby;
|
||||
|
||||
namespace PSO2SERVER.Protocol.Handlers
|
||||
{
|
||||
@ -13,11 +14,23 @@ namespace PSO2SERVER.Protocol.Handlers
|
||||
public class TeleportLobbyToBridge : PacketHandler
|
||||
{
|
||||
/// (0x03, 0x39) Move Lobby -> Bridge.
|
||||
public struct BridgeTransportPacket
|
||||
{
|
||||
public uint unk1;
|
||||
public uint unk2;
|
||||
public uint unk3;
|
||||
}
|
||||
|
||||
public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
|
||||
{
|
||||
if (context._account == null)
|
||||
return;
|
||||
|
||||
var reader = new PacketReader(data, position, size);
|
||||
var pkt = reader.ReadStruct<BridgeTransportPacket>();
|
||||
|
||||
Logger.Write($"unk1 {pkt.unk1} unk2 {pkt.unk2} unk3 {pkt.unk3}");
|
||||
|
||||
// Dunno what these are yet.
|
||||
context.SendPacket(new Unk110APacket((uint)context._account.AccountId));
|
||||
context.SendPacket(new Unk1E0CPacket(101));
|
||||
|
@ -7,6 +7,7 @@ using PSO2SERVER.Models;
|
||||
using PSO2SERVER.Object;
|
||||
using PSO2SERVER.Protocol.Packets;
|
||||
using PSO2SERVER.Zone;
|
||||
using static PSO2SERVER.Protocol.Handlers.TeleportBridgeToLobby;
|
||||
|
||||
namespace PSO2SERVER.Protocol.Handlers
|
||||
{
|
||||
@ -14,19 +15,29 @@ namespace PSO2SERVER.Protocol.Handlers
|
||||
public class TeleportCafeToLobby : PacketHandler
|
||||
{
|
||||
/// (0x03, 0x3B) Move Cafe -> Lobby.
|
||||
public struct CafeToLobbyPacket
|
||||
{
|
||||
public uint unk1;
|
||||
public uint unk2;
|
||||
public uint unk3;
|
||||
public uint zone_id;
|
||||
public uint unk4;
|
||||
}
|
||||
|
||||
public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
|
||||
{
|
||||
PacketReader reader = new PacketReader(data);
|
||||
var reader = new PacketReader(data);
|
||||
var pkt = reader.ReadStruct<CafeToLobbyPacket>();
|
||||
|
||||
reader.ReadUInt64(); // Skip 8 bytes
|
||||
if(reader.ReadUInt32() != 0x10)
|
||||
Logger.Write($"unk1 {pkt.unk1} unk2 {pkt.unk2} unk3 {pkt.unk3} zone_id {pkt.zone_id} unk4 {pkt.unk4}");
|
||||
|
||||
if(pkt.unk3 != 0x10)
|
||||
{
|
||||
Logger.WriteWarning("[WRN] Packet 0x3 0x34's first value was not 0x10! Investigate.");
|
||||
}
|
||||
|
||||
uint partOfLobby = reader.ReadUInt32();
|
||||
PSOLocation destination;
|
||||
if(partOfLobby == 0) // Gate area
|
||||
if(pkt.zone_id == 0) // Gate area
|
||||
{
|
||||
destination = new PSOLocation(0f, 1f, 0f, 0f, -0.22f, 2.4f, 198.75f);
|
||||
}
|
||||
|
@ -195,6 +195,10 @@ namespace PSO2SERVER.Zone
|
||||
|
||||
public class GenParam
|
||||
{
|
||||
public uint seed { get; set; } = 0;
|
||||
public uint xsize { get; set; } = 0;
|
||||
public uint ysize { get; set; } = 0;
|
||||
|
||||
public GenParam()
|
||||
{
|
||||
}
|
||||
@ -205,7 +209,6 @@ namespace PSO2SERVER.Zone
|
||||
this.xsize = x;
|
||||
this.ysize = y;
|
||||
}
|
||||
public uint seed, xsize, ysize;
|
||||
}
|
||||
|
||||
public enum MapType : int
|
||||
|
Loading…
Reference in New Issue
Block a user