1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-22 12:47:46 +00:00

Fixed login not working, was due to packets that got queued not flushing. !!!Need to find solution!!! Added a optimization: Actors with 0 battle args are now concidered "static" and will not send their position updates. Removed some debug print statements.

This commit is contained in:
Filip Maj 2016-09-24 14:17:31 -04:00
parent d931f71b06
commit 5370f13b2b
8 changed files with 20 additions and 13 deletions

View file

@ -32,11 +32,8 @@ namespace FFXIVClassic_Map_Server
public void ProcessPacket(ZoneConnection client, SubPacket subpacket)
{
Session session = mServer.GetSession(subpacket.header.targetId);
subpacket.DebugPrintSubPacket();
//Normal Game Opcode
switch (subpacket.gameMessage.opcode)
{
@ -58,6 +55,8 @@ namespace FFXIVClassic_Map_Server
Server.GetWorldManager().DoLogin(session.GetActor());
client.FlushQueuedSendPackets();
break;
//Chat Received
case 0x0003:

View file

@ -36,6 +36,8 @@ namespace FFXIVClassic_Map_Server.Actors
public const int L_INDEXFINGER = 26;
public const int UNKNOWN = 27;
public bool isStatic = false;
public uint modelId;
public uint[] appearanceIds = new uint[28];

View file

@ -89,11 +89,15 @@ namespace FFXIVClassic_Map_Server.Actors
Player player = Server.GetWorldManager().GetPCInWorld(playerActorId);
lParams = DoActorInit(player);
if (lParams != null && lParams.Count >= 3 && lParams[2].typeID == 0 && (int)lParams[2].value == 0)
isStatic = true;
if (lParams == null)
{
string classPathFake = "/Chara/Npc/Populace/PopulaceStandard";
string classNameFake = "PopulaceStandard";
lParams = LuaUtils.CreateLuaParamList(classPathFake, false, false, false, false, false, 0xF47F6, false, false, 0, 0);
isStatic = true;
//ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, classNameFake, lParams).DebugPrintSubPacket();
return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, classNameFake, lParams);
}

View file

@ -104,6 +104,10 @@ namespace FFXIVClassic_Map_Server.dataobjects
if (actorInstanceList.Contains(actor))
{
//Don't send for static characters (npcs)
if (actor is Character && ((Character)actor).isStatic)
continue;
GetActor().QueuePacket(actor.CreatePositionUpdatePacket(playerActor.actorId));
}
else

View file

@ -37,8 +37,6 @@ namespace FFXIVClassic_World_Server
{
BasePacket packet = SendPacketQueue.Take();
packet.DebugPrintPacket();
byte[] packetBytes = packet.GetPacketBytes();
try

View file

@ -41,8 +41,6 @@ namespace FFXIVClassic_World_Server
List<SubPacket> subPackets = packet.GetSubpackets();
foreach (SubPacket subpacket in subPackets)
{
subpacket.DebugPrintSubPacket();
//Initial Connect Packet, Create session
if (subpacket.header.type == 0x01)
{

View file

@ -24,7 +24,7 @@ namespace FFXIVClassic_World_Server
if (System.Diagnostics.Debugger.IsAttached)
{
System.Threading.Thread.Sleep(5000);
System.Threading.Thread.Sleep(15000);
}
#endif

View file

@ -136,14 +136,16 @@ namespace FFXIVClassic_World_Server
public void OnReceiveSubPacketFromZone(ZoneServer zoneServer, SubPacket subpacket)
{
subpacket.DebugPrintSubPacket();
//subpacket.DebugPrintSubPacket();
uint sessionId = subpacket.header.targetId;
if (mZoneSessionList.ContainsKey(sessionId))
{
ClientConnection conn = mZoneSessionList[sessionId].clientConnection;
conn.QueuePacket(subpacket, true, false);
conn.FlushQueuedSendPackets();
}
}
public WorldManager GetWorldManager()