mirror of
				https://github.com/simon987/Much-Assembly-Required.git
				synced 2025-11-04 10:06:54 +00:00 
			
		
		
		
	Fixes de-syncing problem with Factory and their NPCs
This commit is contained in:
		
							parent
							
								
									9bc3cbf4ce
								
							
						
					
					
						commit
						0dc4ddca0f
					
				@ -54,9 +54,12 @@ public class Factory extends GameObject implements Updatable {
 | 
				
			|||||||
            for (Object id : tmpNpcArray) {
 | 
					            for (Object id : tmpNpcArray) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                NonPlayerCharacter npc = (NonPlayerCharacter) GameServer.INSTANCE.getGameUniverse().getObject((int) (long) id);
 | 
					                NonPlayerCharacter npc = (NonPlayerCharacter) GameServer.INSTANCE.getGameUniverse().getObject((int) (long) id);
 | 
				
			||||||
                npc.setFactory(this);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                npcs.add(npc);
 | 
					                if (npc != null) {
 | 
				
			||||||
 | 
					                    npc.setFactory(this);
 | 
				
			||||||
 | 
					                    npcs.add(npc);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user