mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Cleaned up the code and fixed a bunch of bugs. Map server will no longer worry about base packets.
This commit is contained in:
parent
08477780f8
commit
3370309dd0
@ -241,7 +241,6 @@
|
|||||||
<Compile Include="packets\send\actor\MoveActorToPositionPacket.cs" />
|
<Compile Include="packets\send\actor\MoveActorToPositionPacket.cs" />
|
||||||
<Compile Include="packets\send\actor\SetActorAppearancePacket.cs" />
|
<Compile Include="packets\send\actor\SetActorAppearancePacket.cs" />
|
||||||
<Compile Include="packets\send\actor\SetActorPositionPacket.cs" />
|
<Compile Include="packets\send\actor\SetActorPositionPacket.cs" />
|
||||||
<Compile Include="packets\send\login\0x7ResponsePacket.cs" />
|
|
||||||
<Compile Include="packets\send\LogoutPacket.cs" />
|
<Compile Include="packets\send\LogoutPacket.cs" />
|
||||||
<Compile Include="packets\send\player\SetCompletedAchievementsPacket.cs" />
|
<Compile Include="packets\send\player\SetCompletedAchievementsPacket.cs" />
|
||||||
<Compile Include="packets\send\player\AchievementEarnedPacket.cs" />
|
<Compile Include="packets\send\player\AchievementEarnedPacket.cs" />
|
||||||
@ -336,8 +335,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>xcopy "$(SolutionDir)data\map_config.ini" "$(SolutionDir)$(ProjectName)\$(OutDir)" /d
|
<PostBuildEvent>
|
||||||
xcopy "$(SolutionDir)data\scripts" "$(SolutionDir)$(ProjectName)\$(OutDir)scripts\" /e /d /y /s</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
|
@ -35,7 +35,7 @@ namespace FFXIVClassic_Map_Server
|
|||||||
|
|
||||||
public void ProcessPacket(ZoneConnection client, SubPacket subpacket)
|
public void ProcessPacket(ZoneConnection client, SubPacket subpacket)
|
||||||
{
|
{
|
||||||
Session session = mServer.GetSession(subpacket.header.targetId);
|
Session session = mServer.GetSession(subpacket.header.sourceId);
|
||||||
|
|
||||||
if (session == null && subpacket.gameMessage.opcode != 0x1000)
|
if (session == null && subpacket.gameMessage.opcode != 0x1000)
|
||||||
return;
|
return;
|
||||||
@ -59,7 +59,7 @@ namespace FFXIVClassic_Map_Server
|
|||||||
|
|
||||||
SessionBeginPacket beginSessionPacket = new SessionBeginPacket(subpacket.data);
|
SessionBeginPacket beginSessionPacket = new SessionBeginPacket(subpacket.data);
|
||||||
|
|
||||||
session = mServer.AddSession(subpacket.header.targetId);
|
session = mServer.AddSession(subpacket.header.sourceId);
|
||||||
|
|
||||||
if (!beginSessionPacket.isLogin)
|
if (!beginSessionPacket.isLogin)
|
||||||
Server.GetWorldManager().DoZoneIn(session.GetActor(), false, session.GetActor().destinationSpawnType);
|
Server.GetWorldManager().DoZoneIn(session.GetActor(), false, session.GetActor().destinationSpawnType);
|
||||||
@ -80,7 +80,7 @@ namespace FFXIVClassic_Map_Server
|
|||||||
Server.GetServer().RemoveSession(session.id);
|
Server.GetServer().RemoveSession(session.id);
|
||||||
Program.Log.Info("{0} has been removed from the session list.", session.GetActor().customDisplayName);
|
Program.Log.Info("{0} has been removed from the session list.", session.GetActor().customDisplayName);
|
||||||
|
|
||||||
client.QueuePacket(SessionEndConfirmPacket.BuildPacket(session, endSessionPacket.destinationZoneId), true, false);
|
session.QueuePacket(SessionEndConfirmPacket.BuildPacket(session, endSessionPacket.destinationZoneId));
|
||||||
client.FlushQueuedSendPackets();
|
client.FlushQueuedSendPackets();
|
||||||
break;
|
break;
|
||||||
//World Server - Party Synch
|
//World Server - Party Synch
|
||||||
@ -92,14 +92,14 @@ namespace FFXIVClassic_Map_Server
|
|||||||
case 0x0001:
|
case 0x0001:
|
||||||
//subpacket.DebugPrintSubPacket();
|
//subpacket.DebugPrintSubPacket();
|
||||||
PingPacket pingPacket = new PingPacket(subpacket.data);
|
PingPacket pingPacket = new PingPacket(subpacket.data);
|
||||||
client.QueuePacket(BasePacket.CreatePacket(PongPacket.BuildPacket(session.id, pingPacket.time), true, false));
|
session.QueuePacket(PongPacket.BuildPacket(session.id, pingPacket.time));
|
||||||
session.Ping();
|
session.Ping();
|
||||||
break;
|
break;
|
||||||
//Unknown
|
//Unknown
|
||||||
case 0x0002:
|
case 0x0002:
|
||||||
|
|
||||||
subpacket.DebugPrintSubPacket();
|
subpacket.DebugPrintSubPacket();
|
||||||
client.QueuePacket(_0x2Packet.BuildPacket(session.id), true, false);
|
session.QueuePacket(_0x2Packet.BuildPacket(session.id));
|
||||||
client.FlushQueuedSendPackets();
|
client.FlushQueuedSendPackets();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -121,8 +121,6 @@ namespace FFXIVClassic_Map_Server
|
|||||||
//Langauge Code (Client safe to send packets to now)
|
//Langauge Code (Client safe to send packets to now)
|
||||||
case 0x0006:
|
case 0x0006:
|
||||||
LangaugeCodePacket langCode = new LangaugeCodePacket(subpacket.data);
|
LangaugeCodePacket langCode = new LangaugeCodePacket(subpacket.data);
|
||||||
session = mServer.GetSession(subpacket.header.targetId);
|
|
||||||
|
|
||||||
LuaEngine.GetInstance().CallLuaFunction(session.GetActor(), session.GetActor(), "onBeginLogin", true);
|
LuaEngine.GetInstance().CallLuaFunction(session.GetActor(), session.GetActor(), "onBeginLogin", true);
|
||||||
Server.GetWorldManager().DoZoneIn(session.GetActor(), true, 0x1);
|
Server.GetWorldManager().DoZoneIn(session.GetActor(), true, 0x1);
|
||||||
LuaEngine.GetInstance().CallLuaFunction(session.GetActor(), session.GetActor(), "onLogin", true);
|
LuaEngine.GetInstance().CallLuaFunction(session.GetActor(), session.GetActor(), "onLogin", true);
|
||||||
@ -247,15 +245,15 @@ namespace FFXIVClassic_Map_Server
|
|||||||
//Start Recruiting
|
//Start Recruiting
|
||||||
case 0x01C3:
|
case 0x01C3:
|
||||||
StartRecruitingRequestPacket recruitRequestPacket = new StartRecruitingRequestPacket(subpacket.data);
|
StartRecruitingRequestPacket recruitRequestPacket = new StartRecruitingRequestPacket(subpacket.data);
|
||||||
client.QueuePacket(BasePacket.CreatePacket(StartRecruitingResponse.BuildPacket(session.id, true), true, false));
|
session.QueuePacket(StartRecruitingResponse.BuildPacket(session.id, true));
|
||||||
break;
|
break;
|
||||||
//End Recruiting
|
//End Recruiting
|
||||||
case 0x01C4:
|
case 0x01C4:
|
||||||
client.QueuePacket(BasePacket.CreatePacket(EndRecruitmentPacket.BuildPacket(session.id), true, false));
|
session.QueuePacket(EndRecruitmentPacket.BuildPacket(session.id));
|
||||||
break;
|
break;
|
||||||
//Party Window Opened, Request State
|
//Party Window Opened, Request State
|
||||||
case 0x01C5:
|
case 0x01C5:
|
||||||
client.QueuePacket(BasePacket.CreatePacket(RecruiterStatePacket.BuildPacket(session.id, false, false, 0), true, false));
|
session.QueuePacket(RecruiterStatePacket.BuildPacket(session.id, false, false, 0));
|
||||||
break;
|
break;
|
||||||
//Search Recruiting
|
//Search Recruiting
|
||||||
case 0x01C7:
|
case 0x01C7:
|
||||||
@ -271,7 +269,7 @@ namespace FFXIVClassic_Map_Server
|
|||||||
details.subTaskId = 1;
|
details.subTaskId = 1;
|
||||||
details.comment = "This is a test details packet sent by the server. No implementation has been Created yet...";
|
details.comment = "This is a test details packet sent by the server. No implementation has been Created yet...";
|
||||||
details.num[0] = 1;
|
details.num[0] = 1;
|
||||||
client.QueuePacket(BasePacket.CreatePacket(CurrentRecruitmentDetailsPacket.BuildPacket(session.id, details), true, false));
|
session.QueuePacket(CurrentRecruitmentDetailsPacket.BuildPacket(session.id, details));
|
||||||
break;
|
break;
|
||||||
//Accepted Recruiting
|
//Accepted Recruiting
|
||||||
case 0x01C6:
|
case 0x01C6:
|
||||||
@ -280,64 +278,64 @@ namespace FFXIVClassic_Map_Server
|
|||||||
/* SOCIAL STUFF */
|
/* SOCIAL STUFF */
|
||||||
case 0x01C9:
|
case 0x01C9:
|
||||||
AddRemoveSocialPacket addBlackList = new AddRemoveSocialPacket(subpacket.data);
|
AddRemoveSocialPacket addBlackList = new AddRemoveSocialPacket(subpacket.data);
|
||||||
client.QueuePacket(BasePacket.CreatePacket(BlacklistAddedPacket.BuildPacket(session.id, true, addBlackList.name), true, false));
|
session.QueuePacket(BlacklistAddedPacket.BuildPacket(session.id, true, addBlackList.name));
|
||||||
break;
|
break;
|
||||||
case 0x01CA:
|
case 0x01CA:
|
||||||
AddRemoveSocialPacket RemoveBlackList = new AddRemoveSocialPacket(subpacket.data);
|
AddRemoveSocialPacket RemoveBlackList = new AddRemoveSocialPacket(subpacket.data);
|
||||||
client.QueuePacket(BasePacket.CreatePacket(BlacklistRemovedPacket.BuildPacket(session.id, true, RemoveBlackList.name), true, false));
|
session.QueuePacket(BlacklistRemovedPacket.BuildPacket(session.id, true, RemoveBlackList.name));
|
||||||
break;
|
break;
|
||||||
case 0x01CB:
|
case 0x01CB:
|
||||||
int offset1 = 0;
|
int offset1 = 0;
|
||||||
client.QueuePacket(BasePacket.CreatePacket(SendBlacklistPacket.BuildPacket(session.id, new String[] { "Test" }, ref offset1), true, false));
|
session.QueuePacket(SendBlacklistPacket.BuildPacket(session.id, new String[] { "Test" }, ref offset1));
|
||||||
break;
|
break;
|
||||||
case 0x01CC:
|
case 0x01CC:
|
||||||
AddRemoveSocialPacket addFriendList = new AddRemoveSocialPacket(subpacket.data);
|
AddRemoveSocialPacket addFriendList = new AddRemoveSocialPacket(subpacket.data);
|
||||||
client.QueuePacket(BasePacket.CreatePacket(FriendlistAddedPacket.BuildPacket(session.id, true, (uint)addFriendList.name.GetHashCode(), true, addFriendList.name), true, false));
|
session.QueuePacket(FriendlistAddedPacket.BuildPacket(session.id, true, (uint)addFriendList.name.GetHashCode(), true, addFriendList.name));
|
||||||
break;
|
break;
|
||||||
case 0x01CD:
|
case 0x01CD:
|
||||||
AddRemoveSocialPacket RemoveFriendList = new AddRemoveSocialPacket(subpacket.data);
|
AddRemoveSocialPacket RemoveFriendList = new AddRemoveSocialPacket(subpacket.data);
|
||||||
client.QueuePacket(BasePacket.CreatePacket(FriendlistRemovedPacket.BuildPacket(session.id, true, RemoveFriendList.name), true, false));
|
session.QueuePacket(FriendlistRemovedPacket.BuildPacket(session.id, true, RemoveFriendList.name));
|
||||||
break;
|
break;
|
||||||
case 0x01CE:
|
case 0x01CE:
|
||||||
int offset2 = 0;
|
int offset2 = 0;
|
||||||
client.QueuePacket(BasePacket.CreatePacket(SendFriendlistPacket.BuildPacket(session.id, new Tuple<long, string>[] { new Tuple<long, string>(01, "Test2") }, ref offset2), true, false));
|
session.QueuePacket(SendFriendlistPacket.BuildPacket(session.id, new Tuple<long, string>[] { new Tuple<long, string>(01, "Test2") }, ref offset2));
|
||||||
break;
|
break;
|
||||||
case 0x01CF:
|
case 0x01CF:
|
||||||
client.QueuePacket(BasePacket.CreatePacket(FriendStatusPacket.BuildPacket(session.id, null), true, false));
|
session.QueuePacket(FriendStatusPacket.BuildPacket(session.id, null));
|
||||||
break;
|
break;
|
||||||
/* SUPPORT DESK STUFF */
|
/* SUPPORT DESK STUFF */
|
||||||
//Request for FAQ/Info List
|
//Request for FAQ/Info List
|
||||||
case 0x01D0:
|
case 0x01D0:
|
||||||
FaqListRequestPacket faqRequest = new FaqListRequestPacket(subpacket.data);
|
FaqListRequestPacket faqRequest = new FaqListRequestPacket(subpacket.data);
|
||||||
client.QueuePacket(BasePacket.CreatePacket(FaqListResponsePacket.BuildPacket(session.id, new string[] { "Testing FAQ1", "Coded style!" }), true, false));
|
session.QueuePacket(FaqListResponsePacket.BuildPacket(session.id, new string[] { "Testing FAQ1", "Coded style!" }));
|
||||||
break;
|
break;
|
||||||
//Request for body of a faq/info selection
|
//Request for body of a faq/info selection
|
||||||
case 0x01D1:
|
case 0x01D1:
|
||||||
FaqBodyRequestPacket faqBodyRequest = new FaqBodyRequestPacket(subpacket.data);
|
FaqBodyRequestPacket faqBodyRequest = new FaqBodyRequestPacket(subpacket.data);
|
||||||
client.QueuePacket(BasePacket.CreatePacket(FaqBodyResponsePacket.BuildPacket(session.id, "HERE IS A GIANT BODY. Nothing else to say!"), true, false));
|
session.QueuePacket(FaqBodyResponsePacket.BuildPacket(session.id, "HERE IS A GIANT BODY. Nothing else to say!"));
|
||||||
break;
|
break;
|
||||||
//Request issue list
|
//Request issue list
|
||||||
case 0x01D2:
|
case 0x01D2:
|
||||||
GMTicketIssuesRequestPacket issuesRequest = new GMTicketIssuesRequestPacket(subpacket.data);
|
GMTicketIssuesRequestPacket issuesRequest = new GMTicketIssuesRequestPacket(subpacket.data);
|
||||||
client.QueuePacket(BasePacket.CreatePacket(IssueListResponsePacket.BuildPacket(session.id, new string[] { "Test1", "Test2", "Test3", "Test4", "Test5" }), true, false));
|
session.QueuePacket(IssueListResponsePacket.BuildPacket(session.id, new string[] { "Test1", "Test2", "Test3", "Test4", "Test5" }));
|
||||||
break;
|
break;
|
||||||
//Request if GM ticket exists
|
//Request if GM ticket exists
|
||||||
case 0x01D3:
|
case 0x01D3:
|
||||||
client.QueuePacket(BasePacket.CreatePacket(StartGMTicketPacket.BuildPacket(session.id, false), true, false));
|
session.QueuePacket(StartGMTicketPacket.BuildPacket(session.id, false));
|
||||||
break;
|
break;
|
||||||
//Request for GM response message
|
//Request for GM response message
|
||||||
case 0x01D4:
|
case 0x01D4:
|
||||||
client.QueuePacket(BasePacket.CreatePacket(GMTicketPacket.BuildPacket(session.id, "This is a GM Ticket Title", "This is a GM Ticket Body."), true, false));
|
session.QueuePacket(GMTicketPacket.BuildPacket(session.id, "This is a GM Ticket Title", "This is a GM Ticket Body."));
|
||||||
break;
|
break;
|
||||||
//GM Ticket Sent
|
//GM Ticket Sent
|
||||||
case 0x01D5:
|
case 0x01D5:
|
||||||
GMSupportTicketPacket gmTicket = new GMSupportTicketPacket(subpacket.data);
|
GMSupportTicketPacket gmTicket = new GMSupportTicketPacket(subpacket.data);
|
||||||
Program.Log.Info("Got GM Ticket: \n" + gmTicket.ticketTitle + "\n" + gmTicket.ticketBody);
|
Program.Log.Info("Got GM Ticket: \n" + gmTicket.ticketTitle + "\n" + gmTicket.ticketBody);
|
||||||
client.QueuePacket(BasePacket.CreatePacket(GMTicketSentResponsePacket.BuildPacket(session.id, true), true, false));
|
session.QueuePacket(GMTicketSentResponsePacket.BuildPacket(session.id, true));
|
||||||
break;
|
break;
|
||||||
//Request to end ticket
|
//Request to end ticket
|
||||||
case 0x01D6:
|
case 0x01D6:
|
||||||
client.QueuePacket(BasePacket.CreatePacket(EndGMTicketPacket.BuildPacket(session.id), true, false));
|
session.QueuePacket(EndGMTicketPacket.BuildPacket(session.id));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Program.Log.Debug("Unknown command 0x{0:X} received.", subpacket.gameMessage.opcode);
|
Program.Log.Debug("Unknown command 0x{0:X} received.", subpacket.gameMessage.opcode);
|
||||||
|
@ -876,55 +876,55 @@ namespace FFXIVClassic_Map_Server
|
|||||||
public void RequestWorldLinkshellCreate(Player player, string name, ushort crest)
|
public void RequestWorldLinkshellCreate(Player player, string name, ushort crest)
|
||||||
{
|
{
|
||||||
SubPacket packet = CreateLinkshellPacket.BuildPacket(player.playerSession, name, crest, player.actorId);
|
SubPacket packet = CreateLinkshellPacket.BuildPacket(player.playerSession, name, crest, player.actorId);
|
||||||
Server.GetWorldConnection().QueuePacket(packet, true, false);
|
player.QueuePacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RequestWorldLinkshellCrestModify(Player player, string name, ushort crest)
|
public void RequestWorldLinkshellCrestModify(Player player, string name, ushort crest)
|
||||||
{
|
{
|
||||||
SubPacket packet = ModifyLinkshellPacket.BuildPacket(player.playerSession, 1, name, null, crest, 0);
|
SubPacket packet = ModifyLinkshellPacket.BuildPacket(player.playerSession, 1, name, null, crest, 0);
|
||||||
Server.GetWorldConnection().QueuePacket(packet, true, false);
|
player.QueuePacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RequestWorldLinkshellDelete(Player player, string name)
|
public void RequestWorldLinkshellDelete(Player player, string name)
|
||||||
{
|
{
|
||||||
SubPacket packet = DeleteLinkshellPacket.BuildPacket(player.playerSession, name);
|
SubPacket packet = DeleteLinkshellPacket.BuildPacket(player.playerSession, name);
|
||||||
Server.GetWorldConnection().QueuePacket(packet, true, false);
|
player.QueuePacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RequestWorldLinkshellRankChange(Player player, string lsname, string memberName, byte newRank)
|
public void RequestWorldLinkshellRankChange(Player player, string lsname, string memberName, byte newRank)
|
||||||
{
|
{
|
||||||
SubPacket packet = LinkshellRankChangePacket.BuildPacket(player.playerSession, memberName, lsname, newRank);
|
SubPacket packet = LinkshellRankChangePacket.BuildPacket(player.playerSession, memberName, lsname, newRank);
|
||||||
Server.GetWorldConnection().QueuePacket(packet, true, false);
|
player.QueuePacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RequestWorldLinkshellInviteMember(Player player, string lsname, uint invitedActorId)
|
public void RequestWorldLinkshellInviteMember(Player player, string lsname, uint invitedActorId)
|
||||||
{
|
{
|
||||||
SubPacket packet = LinkshellInvitePacket.BuildPacket(player.playerSession, invitedActorId, lsname);
|
SubPacket packet = LinkshellInvitePacket.BuildPacket(player.playerSession, invitedActorId, lsname);
|
||||||
Server.GetWorldConnection().QueuePacket(packet, true, false);
|
player.QueuePacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RequestWorldLinkshellCancelInvite(Player player)
|
public void RequestWorldLinkshellCancelInvite(Player player)
|
||||||
{
|
{
|
||||||
SubPacket packet = LinkshellInviteCancelPacket.BuildPacket(player.playerSession);
|
SubPacket packet = LinkshellInviteCancelPacket.BuildPacket(player.playerSession);
|
||||||
Server.GetWorldConnection().QueuePacket(packet, true, false);
|
player.QueuePacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RequestWorldLinkshellLeave(Player player, string lsname)
|
public void RequestWorldLinkshellLeave(Player player, string lsname)
|
||||||
{
|
{
|
||||||
SubPacket packet = LinkshellLeavePacket.BuildPacket(player.playerSession, lsname, null, false);
|
SubPacket packet = LinkshellLeavePacket.BuildPacket(player.playerSession, lsname, null, false);
|
||||||
Server.GetWorldConnection().QueuePacket(packet, true, false);
|
player.QueuePacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RequestWorldLinkshellKick(Player player, string lsname, string kickedName)
|
public void RequestWorldLinkshellKick(Player player, string lsname, string kickedName)
|
||||||
{
|
{
|
||||||
SubPacket packet = LinkshellLeavePacket.BuildPacket(player.playerSession, lsname, kickedName, true);
|
SubPacket packet = LinkshellLeavePacket.BuildPacket(player.playerSession, lsname, kickedName, true);
|
||||||
Server.GetWorldConnection().QueuePacket(packet, true, false);
|
player.QueuePacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RequestWorldLinkshellChangeActive(Player player, string lsname)
|
public void RequestWorldLinkshellChangeActive(Player player, string lsname)
|
||||||
{
|
{
|
||||||
SubPacket packet = LinkshellChangePacket.BuildPacket(player.playerSession, lsname);
|
SubPacket packet = LinkshellChangePacket.BuildPacket(player.playerSession, lsname);
|
||||||
Server.GetWorldConnection().QueuePacket(packet, true, false);
|
player.QueuePacket(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RequestWorldServerZoneChange(Player player, uint destinationZoneId, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
private void RequestWorldServerZoneChange(Player player, uint destinationZoneId, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
||||||
|
@ -184,13 +184,13 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
return subpackets;
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BasePacket GetSetEventStatusPackets()
|
public List<SubPacket> GetSetEventStatusPackets()
|
||||||
{
|
{
|
||||||
List<SubPacket> subpackets = new List<SubPacket>();
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
|
|
||||||
//Return empty list
|
//Return empty list
|
||||||
if (eventConditions == null)
|
if (eventConditions == null)
|
||||||
return BasePacket.CreatePacket(subpackets, true, false);
|
return subpackets;
|
||||||
|
|
||||||
if (eventConditions.talkEventConditions != null)
|
if (eventConditions.talkEventConditions != null)
|
||||||
{
|
{
|
||||||
@ -228,7 +228,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
subpackets.Add(SetEventStatus.BuildPacket(actorId, true, 2, condition.conditionName));
|
subpackets.Add(SetEventStatus.BuildPacket(actorId, true, 2, condition.conditionName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return BasePacket.CreatePacket(subpackets, true, false);
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SubPacket CreateIsZoneingPacket()
|
public SubPacket CreateIsZoneingPacket()
|
||||||
@ -246,7 +246,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, classParams);
|
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, classParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual BasePacket GetSpawnPackets(Player player, ushort spawnType)
|
public virtual List<SubPacket> GetSpawnPackets(Player player, ushort spawnType)
|
||||||
{
|
{
|
||||||
List<SubPacket> subpackets = new List<SubPacket>();
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
subpackets.Add(CreateAddActorPacket(8));
|
subpackets.Add(CreateAddActorPacket(8));
|
||||||
@ -257,15 +257,15 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
subpackets.Add(CreateStatePacket());
|
subpackets.Add(CreateStatePacket());
|
||||||
subpackets.Add(CreateIsZoneingPacket());
|
subpackets.Add(CreateIsZoneingPacket());
|
||||||
subpackets.Add(CreateScriptBindPacket(player));
|
subpackets.Add(CreateScriptBindPacket(player));
|
||||||
return BasePacket.CreatePacket(subpackets, true, false);
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual BasePacket GetSpawnPackets()
|
public virtual List<SubPacket> GetSpawnPackets()
|
||||||
{
|
{
|
||||||
return GetSpawnPackets(0x1);
|
return GetSpawnPackets(0x1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual BasePacket GetSpawnPackets(ushort spawnType)
|
public virtual List<SubPacket> GetSpawnPackets(ushort spawnType)
|
||||||
{
|
{
|
||||||
List<SubPacket> subpackets = new List<SubPacket>();
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
subpackets.Add(CreateAddActorPacket(8));
|
subpackets.Add(CreateAddActorPacket(8));
|
||||||
@ -276,17 +276,19 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
subpackets.Add(CreateStatePacket());
|
subpackets.Add(CreateStatePacket());
|
||||||
subpackets.Add(CreateIsZoneingPacket());
|
subpackets.Add(CreateIsZoneingPacket());
|
||||||
subpackets.Add(CreateScriptBindPacket());
|
subpackets.Add(CreateScriptBindPacket());
|
||||||
return BasePacket.CreatePacket(subpackets, true, false);
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual BasePacket GetInitPackets()
|
public virtual List<SubPacket> GetInitPackets()
|
||||||
{
|
{
|
||||||
|
List<SubPacket> packets = new List<SubPacket>();
|
||||||
SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init");
|
SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init");
|
||||||
initProperties.AddByte(0xE14B0CA8, 1);
|
initProperties.AddByte(0xE14B0CA8, 1);
|
||||||
initProperties.AddByte(0x2138FD71, 1);
|
initProperties.AddByte(0x2138FD71, 1);
|
||||||
initProperties.AddByte(0xFBFBCFB1, 1);
|
initProperties.AddByte(0xFBFBCFB1, 1);
|
||||||
initProperties.AddTarget();
|
initProperties.AddTarget();
|
||||||
return BasePacket.CreatePacket(initProperties.BuildPacket(actorId), true, false);
|
packets.Add(initProperties.BuildPacket(actorId));
|
||||||
|
return packets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Equals(Object obj)
|
public override bool Equals(Object obj)
|
||||||
|
@ -91,7 +91,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
return ActorInstantiatePacket.BuildPacket(actorId, actorName, "ZoneDefault", lParams);
|
return ActorInstantiatePacket.BuildPacket(actorId, actorName, "ZoneDefault", lParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BasePacket GetSpawnPackets()
|
public override List<SubPacket> GetSpawnPackets()
|
||||||
{
|
{
|
||||||
List<SubPacket> subpackets = new List<SubPacket>();
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
subpackets.Add(CreateAddActorPacket(0));
|
subpackets.Add(CreateAddActorPacket(0));
|
||||||
@ -101,7 +101,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
subpackets.Add(CreateStatePacket());
|
subpackets.Add(CreateStatePacket());
|
||||||
subpackets.Add(CreateIsZoneingPacket());
|
subpackets.Add(CreateIsZoneingPacket());
|
||||||
subpackets.Add(CreateScriptBindPacket());
|
subpackets.Add(CreateScriptBindPacket());
|
||||||
return BasePacket.CreatePacket(subpackets, true, false);
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Actor Management
|
#region Actor Management
|
||||||
@ -483,7 +483,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
|
|
||||||
if (player != null && !zoneWide)
|
if (player != null && !zoneWide)
|
||||||
{
|
{
|
||||||
player.QueuePacket(BasePacket.CreatePacket(SetWeatherPacket.BuildPacket(player.actorId, weather, transitionTime), true, false));
|
player.QueuePacket(SetWeatherPacket.BuildPacket(player.actorId, weather, transitionTime));
|
||||||
}
|
}
|
||||||
if (zoneWide)
|
if (zoneWide)
|
||||||
{
|
{
|
||||||
@ -494,7 +494,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
if (actor.Value is Player)
|
if (actor.Value is Player)
|
||||||
{
|
{
|
||||||
player = ((Player)actor.Value);
|
player = ((Player)actor.Value);
|
||||||
player.QueuePacket(BasePacket.CreatePacket(SetWeatherPacket.BuildPacket(player.actorId, weather, transitionTime), true, false));
|
player.QueuePacket(SetWeatherPacket.BuildPacket(player.actorId, weather, transitionTime));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,8 +177,8 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
//ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams).DebugPrintSubPacket();
|
//ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams).DebugPrintSubPacket();
|
||||||
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
|
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BasePacket GetSpawnPackets(Player player, ushort spawnType)
|
public override List<SubPacket> GetSpawnPackets(Player player, ushort spawnType)
|
||||||
{
|
{
|
||||||
List<SubPacket> subpackets = new List<SubPacket>();
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
subpackets.Add(CreateAddActorPacket());
|
subpackets.Add(CreateAddActorPacket());
|
||||||
@ -199,10 +199,10 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
subpackets.Add(CreateIsZoneingPacket());
|
subpackets.Add(CreateIsZoneingPacket());
|
||||||
subpackets.Add(CreateScriptBindPacket(player));
|
subpackets.Add(CreateScriptBindPacket(player));
|
||||||
|
|
||||||
return BasePacket.CreatePacket(subpackets, true, false);
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BasePacket GetInitPackets()
|
public override List<SubPacket> GetInitPackets()
|
||||||
{
|
{
|
||||||
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("/_init", this);
|
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("/_init", this);
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
propPacketUtil.AddProperty("npcWork.pushCommandPriority");
|
propPacketUtil.AddProperty("npcWork.pushCommandPriority");
|
||||||
}
|
}
|
||||||
|
|
||||||
return BasePacket.CreatePacket(propPacketUtil.Done(), true, false);
|
return propPacketUtil.Done();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetUniqueId()
|
public string GetUniqueId()
|
||||||
|
@ -292,7 +292,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
|
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BasePacket GetSpawnPackets(Player requestPlayer, ushort spawnType)
|
public override List<SubPacket> GetSpawnPackets(Player requestPlayer, ushort spawnType)
|
||||||
{
|
{
|
||||||
List<SubPacket> subpackets = new List<SubPacket>();
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
subpackets.Add(CreateAddActorPacket(8));
|
subpackets.Add(CreateAddActorPacket(8));
|
||||||
@ -310,7 +310,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
subpackets.Add(CreateIsZoneingPacket());
|
subpackets.Add(CreateIsZoneingPacket());
|
||||||
subpackets.AddRange(CreatePlayerRelatedPackets(requestPlayer.actorId));
|
subpackets.AddRange(CreatePlayerRelatedPackets(requestPlayer.actorId));
|
||||||
subpackets.Add(CreateScriptBindPacket(requestPlayer));
|
subpackets.Add(CreateScriptBindPacket(requestPlayer));
|
||||||
return BasePacket.CreatePacket(subpackets, true, false);
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SubPacket> CreatePlayerRelatedPackets(uint requestingPlayerActorId)
|
public List<SubPacket> CreatePlayerRelatedPackets(uint requestingPlayerActorId)
|
||||||
@ -347,7 +347,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
return subpackets;
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BasePacket GetInitPackets()
|
public override List<SubPacket> GetInitPackets()
|
||||||
{
|
{
|
||||||
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("/_init", this);
|
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("/_init", this);
|
||||||
|
|
||||||
@ -494,7 +494,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
propPacketUtil.AddProperty("playerWork.birthdayDay");
|
propPacketUtil.AddProperty("playerWork.birthdayDay");
|
||||||
propPacketUtil.AddProperty("playerWork.initialTown");
|
propPacketUtil.AddProperty("playerWork.initialTown");
|
||||||
|
|
||||||
return BasePacket.CreatePacket(propPacketUtil.Done(), true, false);
|
return propPacketUtil.Done();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendSeamlessZoneInPackets()
|
public void SendSeamlessZoneInPackets()
|
||||||
@ -529,9 +529,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
|
|
||||||
playerSession.QueuePacket(GetInitPackets());
|
playerSession.QueuePacket(GetInitPackets());
|
||||||
|
|
||||||
BasePacket areaMasterSpawn = zone.GetSpawnPackets();
|
List<SubPacket> areaMasterSpawn = zone.GetSpawnPackets();
|
||||||
BasePacket debugSpawn = world.GetDebugActor().GetSpawnPackets();
|
List<SubPacket> debugSpawn = world.GetDebugActor().GetSpawnPackets();
|
||||||
BasePacket worldMasterSpawn = world.GetActor().GetSpawnPackets();
|
List<SubPacket> worldMasterSpawn = world.GetActor().GetSpawnPackets();
|
||||||
|
|
||||||
playerSession.QueuePacket(areaMasterSpawn);
|
playerSession.QueuePacket(areaMasterSpawn);
|
||||||
playerSession.QueuePacket(debugSpawn);
|
playerSession.QueuePacket(debugSpawn);
|
||||||
@ -552,14 +552,12 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
|
|
||||||
if (zone.GetWeatherDirector() != null)
|
if (zone.GetWeatherDirector() != null)
|
||||||
{
|
{
|
||||||
BasePacket weatherDirectorSpawn = zone.GetWeatherDirector().GetSpawnPackets();
|
playerSession.QueuePacket(zone.GetWeatherDirector().GetSpawnPackets());
|
||||||
playerSession.QueuePacket(weatherDirectorSpawn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (Director director in ownedDirectors)
|
foreach (Director director in ownedDirectors)
|
||||||
{
|
{
|
||||||
director.GetSpawnPackets().DebugPrintPacket();
|
|
||||||
QueuePacket(director.GetSpawnPackets());
|
QueuePacket(director.GetSpawnPackets());
|
||||||
QueuePacket(director.GetInitPackets());
|
QueuePacket(director.GetInitPackets());
|
||||||
}
|
}
|
||||||
@ -596,9 +594,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
return actorId == otherActorId;
|
return actorId == otherActorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void QueuePacket(BasePacket packet)
|
public void QueuePacket(List<SubPacket> packets)
|
||||||
{
|
{
|
||||||
playerSession.QueuePacket(packet);
|
playerSession.QueuePacket(packets);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void QueuePacket(SubPacket packet)
|
public void QueuePacket(SubPacket packet)
|
||||||
@ -616,10 +614,10 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
BasePacket packet = new BasePacket(path);
|
// BasePacket packet = new BasePacket(path);
|
||||||
|
|
||||||
packet.ReplaceActorID(actorId);
|
//packet.ReplaceActorID(actorId);
|
||||||
QueuePacket(packet);
|
//QueuePacket(packet);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -1449,7 +1447,6 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
|
|
||||||
public void SendDirectorPackets(Director director)
|
public void SendDirectorPackets(Director director)
|
||||||
{
|
{
|
||||||
director.GetSpawnPackets().DebugPrintPacket();
|
|
||||||
QueuePacket(director.GetSpawnPackets());
|
QueuePacket(director.GetSpawnPackets());
|
||||||
QueuePacket(director.GetInitPackets());
|
QueuePacket(director.GetInitPackets());
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
|
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BasePacket GetSpawnPackets()
|
public override List<SubPacket> GetSpawnPackets()
|
||||||
{
|
{
|
||||||
List<SubPacket> subpackets = new List<SubPacket>();
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
subpackets.Add(CreateAddActorPacket(0));
|
subpackets.Add(CreateAddActorPacket(0));
|
||||||
@ -35,7 +35,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
subpackets.Add(CreateStatePacket());
|
subpackets.Add(CreateStatePacket());
|
||||||
subpackets.Add(CreateIsZoneingPacket());
|
subpackets.Add(CreateIsZoneingPacket());
|
||||||
subpackets.Add(CreateScriptBindPacket());
|
subpackets.Add(CreateScriptBindPacket());
|
||||||
return BasePacket.CreatePacket(subpackets, true, false);
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ namespace FFXIVClassic_Map_Server.actors.director
|
|||||||
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, actualLParams);
|
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, actualLParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BasePacket GetSpawnPackets(ushort spawnType = 1)
|
public override List<SubPacket> GetSpawnPackets(ushort spawnType = 1)
|
||||||
{
|
{
|
||||||
List<SubPacket> subpackets = new List<SubPacket>();
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
subpackets.Add(CreateAddActorPacket(0));
|
subpackets.Add(CreateAddActorPacket(0));
|
||||||
@ -68,14 +68,16 @@ namespace FFXIVClassic_Map_Server.actors.director
|
|||||||
subpackets.Add(CreateStatePacket());
|
subpackets.Add(CreateStatePacket());
|
||||||
subpackets.Add(CreateIsZoneingPacket());
|
subpackets.Add(CreateIsZoneingPacket());
|
||||||
subpackets.Add(CreateScriptBindPacket());
|
subpackets.Add(CreateScriptBindPacket());
|
||||||
return BasePacket.CreatePacket(subpackets, true, false);
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BasePacket GetInitPackets()
|
public override List<SubPacket> GetInitPackets()
|
||||||
{
|
{
|
||||||
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init");
|
SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init");
|
||||||
initProperties.AddTarget();
|
initProperties.AddTarget();
|
||||||
return BasePacket.CreatePacket(initProperties.BuildPacket(actorId), true, false);
|
subpackets.Add(initProperties.BuildPacket(actorId));
|
||||||
|
return subpackets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnTalkEvent(Player player, Npc npc)
|
public void OnTalkEvent(Player player, Npc npc)
|
||||||
@ -108,7 +110,6 @@ namespace FFXIVClassic_Map_Server.actors.director
|
|||||||
{
|
{
|
||||||
foreach (Player p in GetPlayerMembers())
|
foreach (Player p in GetPlayerMembers())
|
||||||
{
|
{
|
||||||
GetSpawnPackets().DebugPrintPacket();
|
|
||||||
p.QueuePacket(GetSpawnPackets());
|
p.QueuePacket(GetSpawnPackets());
|
||||||
p.QueuePacket(GetInitPackets());
|
p.QueuePacket(GetInitPackets());
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
|
return ActorInstantiatePacket.BuildPacket(actorId, actorName, className, lParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override BasePacket GetSpawnPackets()
|
public override List<SubPacket> GetSpawnPackets()
|
||||||
{
|
{
|
||||||
List<SubPacket> subpackets = new List<SubPacket>();
|
List<SubPacket> subpackets = new List<SubPacket>();
|
||||||
subpackets.Add(CreateAddActorPacket(0));
|
subpackets.Add(CreateAddActorPacket(0));
|
||||||
@ -34,7 +34,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
subpackets.Add(CreateStatePacket());
|
subpackets.Add(CreateStatePacket());
|
||||||
subpackets.Add(CreateIsZoneingPacket());
|
subpackets.Add(CreateIsZoneingPacket());
|
||||||
subpackets.Add(CreateScriptBindPacket());
|
subpackets.Add(CreateScriptBindPacket());
|
||||||
return BasePacket.CreatePacket(subpackets, true, false);
|
return subpackets;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,15 +31,16 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||||||
actorInstanceList.Add(playerActor);
|
actorInstanceList.Add(playerActor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void QueuePacket(BasePacket basePacket)
|
public void QueuePacket(List<SubPacket> packets)
|
||||||
{
|
{
|
||||||
Server.GetWorldConnection().QueuePacket(basePacket);
|
foreach (SubPacket s in packets)
|
||||||
|
QueuePacket(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void QueuePacket(SubPacket subPacket)
|
public void QueuePacket(SubPacket subPacket)
|
||||||
{
|
{
|
||||||
subPacket.SetTargetId(id);
|
subPacket.SetTargetId(id);
|
||||||
Server.GetWorldConnection().QueuePacket(subPacket, true, false);
|
Server.GetWorldConnection().QueuePacket(subPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Player GetActor()
|
public Player GetActor()
|
||||||
|
@ -17,14 +17,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||||||
private BlockingCollection<SubPacket> SendPacketQueue = new BlockingCollection<SubPacket>(1000);
|
private BlockingCollection<SubPacket> SendPacketQueue = new BlockingCollection<SubPacket>(1000);
|
||||||
public int lastPartialSize = 0;
|
public int lastPartialSize = 0;
|
||||||
|
|
||||||
public void QueuePacket(BasePacket packet)
|
public void QueuePacket(SubPacket subpacket)
|
||||||
{
|
|
||||||
List<SubPacket> subPackets = packet.GetSubpackets();
|
|
||||||
foreach (SubPacket s in subPackets)
|
|
||||||
SendPacketQueue.Add(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void QueuePacket(SubPacket subpacket, bool isAuthed, bool isEncrypted)
|
|
||||||
{
|
{
|
||||||
SendPacketQueue.Add(subpacket);
|
SendPacketQueue.Add(subpacket);
|
||||||
}
|
}
|
||||||
@ -68,7 +61,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||||||
public void RequestZoneChange(uint sessionId, uint destinationZoneId, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
public void RequestZoneChange(uint sessionId, uint destinationZoneId, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
||||||
{
|
{
|
||||||
WorldRequestZoneChangePacket.BuildPacket(sessionId, destinationZoneId, spawnType, spawnX, spawnY, spawnZ, spawnRotation).DebugPrintSubPacket();
|
WorldRequestZoneChangePacket.BuildPacket(sessionId, destinationZoneId, spawnType, spawnX, spawnY, spawnZ, spawnRotation).DebugPrintSubPacket();
|
||||||
QueuePacket(WorldRequestZoneChangePacket.BuildPacket(sessionId, destinationZoneId, spawnType, spawnX, spawnY, spawnZ, spawnRotation), true, false);
|
QueuePacket(WorldRequestZoneChangePacket.BuildPacket(sessionId, destinationZoneId, spawnType, spawnX, spawnY, spawnZ, spawnRotation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -607,7 +607,7 @@ namespace FFXIVClassic_Map_Server.lua
|
|||||||
List<SubPacket> SendError = new List<SubPacket>();
|
List<SubPacket> SendError = new List<SubPacket>();
|
||||||
SendError.Add(EndEventPacket.BuildPacket(player.actorId, player.currentEventOwner, player.currentEventName));
|
SendError.Add(EndEventPacket.BuildPacket(player.actorId, player.currentEventOwner, player.currentEventName));
|
||||||
player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM_ERROR, "", message);
|
player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM_ERROR, "", message);
|
||||||
player.playerSession.QueuePacket(BasePacket.CreatePacket(SendError, true, false));
|
player.playerSession.QueuePacket(SendError);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
using FFXIVClassic.Common;
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
using FFXIVClassic.Common;
|
|
||||||
|
|
||||||
namespace FFXIVClassic_Map_Server.packets.send.login
|
|
||||||
{
|
|
||||||
class Login0x7ResponsePacket
|
|
||||||
{
|
|
||||||
public static BasePacket BuildPacket(uint sourceActorId, uint time, uint type)
|
|
||||||
{
|
|
||||||
byte[] data = new byte[0x18];
|
|
||||||
|
|
||||||
using (MemoryStream mem = new MemoryStream(data))
|
|
||||||
{
|
|
||||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
binWriter.Write((short)0x18);
|
|
||||||
binWriter.Write((short)type);
|
|
||||||
binWriter.Write((uint)0);
|
|
||||||
binWriter.Write((uint)0);
|
|
||||||
binWriter.Write((uint)0xFFFFFD7F);
|
|
||||||
|
|
||||||
binWriter.Write((uint)sourceActorId);
|
|
||||||
binWriter.Write((uint)time);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return BasePacket.CreatePacket(data, false, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -190,7 +190,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>xcopy "$(SolutionDir)data\world_config.ini" "$(SolutionDir)$(ProjectName)\$(OutDir)" /d</PostBuildEvent>
|
<PostBuildEvent></PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
@ -31,7 +31,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SubPacket(true, OPCODE, 0, data);
|
return new SubPacket(true, OPCODE, session.sessionId, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send.Group
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SubPacket(true, OPCODE, 0, data);
|
return new SubPacket(true, OPCODE, session.sessionId, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SubPacket(true, OPCODE, 0, data);
|
return new SubPacket(true, OPCODE, session.sessionId, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SubPacket(true, OPCODE, 0, data);
|
return new SubPacket(true, OPCODE, session.sessionId, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SubPacket BuildPacket(Session session, uint destinationZoneId, string destinationPrivateArea, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
public static SubPacket BuildPacket(Session session, uint destinationZoneId, string destinationPrivateArea, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
||||||
@ -57,7 +57,7 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SubPacket(true, OPCODE, 0, data);
|
return new SubPacket(true, OPCODE, session.sessionId, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,10 +169,10 @@ namespace FFXIVClassic_World_Server
|
|||||||
{
|
{
|
||||||
uint sessionId = subpacket.header.targetId;
|
uint sessionId = subpacket.header.targetId;
|
||||||
Session session = GetSession(sessionId);
|
Session session = GetSession(sessionId);
|
||||||
|
subpacket.DebugPrintSubPacket();
|
||||||
if (subpacket.gameMessage.opcode >= 0x1000)
|
if (subpacket.gameMessage.opcode >= 0x1000)
|
||||||
{
|
{
|
||||||
subpacket.DebugPrintSubPacket();
|
//subpacket.DebugPrintSubPacket();
|
||||||
|
|
||||||
switch (subpacket.gameMessage.opcode)
|
switch (subpacket.gameMessage.opcode)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user