干掉了浩方查马甲代码 #1
@ -108,7 +108,7 @@ namespace AnotherReplayReader.Apm
 | 
				
			|||||||
                            playerLifes[playerIndex] = estimatedTime;
 | 
					                            playerLifes[playerIndex] = estimatedTime;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    else if (!IsUnknown(commandId) && !IsAuto(commandId))
 | 
					                    else if (!IsUnknown(commandId) && !IsAuto(commandId) && playerIndex >= 0)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        if (stricterLifes[playerIndex] < estimatedTime)
 | 
					                        if (stricterLifes[playerIndex] < estimatedTime)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
@ -138,7 +138,7 @@ namespace AnotherReplayReader.Apm
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
                foreach (var command in commands)
 | 
					                foreach (var command in commands)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    if (options.ShouldSkip(command.CommandId))
 | 
					                    if (options.ShouldSkip(command.CommandId) || command.PlayerIndex < 0)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        continue;
 | 
					                        continue;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
@ -164,7 +164,7 @@ namespace AnotherReplayReader.Apm
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                foreach (var command in commands)
 | 
					                foreach (var command in commands)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    if (options.ShouldSkip(command.CommandId))
 | 
					                    if (options.ShouldSkip(command.CommandId) || command.PlayerIndex < 0)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        continue;
 | 
					                        continue;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
@ -209,9 +209,12 @@ namespace AnotherReplayReader.Apm
 | 
				
			|||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        commandCount = playerCommands[command.CommandId] = new int[Players.Length];
 | 
					                        commandCount = playerCommands[command.CommandId] = new int[Players.Length];
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                    if (command.PlayerIndex >= 0 && command.PlayerIndex < Players.Length)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
                        commandCount[command.PlayerIndex] = commandCount[command.PlayerIndex] + 1;
 | 
					                        commandCount[command.PlayerIndex] = commandCount[command.PlayerIndex] + 1;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            return playerCommands;
 | 
					            return playerCommands;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -45,7 +45,7 @@ namespace AnotherReplayReader.ReplayFile
 | 
				
			|||||||
                    var lastByte = current.ReadBytes(size - 2).Last();
 | 
					                    var lastByte = current.ReadBytes(size - 2).Last();
 | 
				
			||||||
                    if (lastByte != 0xFF)
 | 
					                    if (lastByte != 0xFF)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        throw new InvalidDataException($"Failed to parse command {command:X}, last byte is {lastByte:X}");
 | 
					                        // throw new InvalidDataException($"Failed to parse command {command:X}, last byte is {lastByte:X}");
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                };
 | 
					                };
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user