mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04: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:
		| @@ -31,12 +31,9 @@ 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) | ||||
|                 { | ||||
| @@ -57,6 +54,8 @@ namespace FFXIVClassic_Map_Server | ||||
|                         client.QueuePacket(_0x2Packet.BuildPacket(session.id), true, false); | ||||
|  | ||||
|                         Server.GetWorldManager().DoLogin(session.GetActor()); | ||||
|  | ||||
|                         client.FlushQueuedSendPackets(); | ||||
|  | ||||
|                         break; | ||||
|                     //Chat Received | ||||
|   | ||||
| @@ -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]; | ||||
|  | ||||
|   | ||||
| @@ -87,13 +87,17 @@ namespace FFXIVClassic_Map_Server.Actors | ||||
|             List<LuaParam> lParams; | ||||
|  | ||||
|             Player player = Server.GetWorldManager().GetPCInWorld(playerActorId); | ||||
|             lParams = DoActorInit(player);             | ||||
|             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); | ||||
|             } | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user