Prevent NPE from missing symbol seal data.
This commit is contained in:
		| @@ -80,7 +80,16 @@ public class SymbolSealData implements IXmlReader | ||||
| 	 | ||||
| 	public Skill getSkill(int classId, int symbolId) | ||||
| 	{ | ||||
| 		return _data.get(classId).get(symbolId).getSkill(); | ||||
| 		final List<SymbolSealHolder> data = _data.get(classId); | ||||
| 		if (data != null) | ||||
| 		{ | ||||
| 			final SymbolSealHolder symbol = data.get(symbolId); | ||||
| 			if (symbol != null) | ||||
| 			{ | ||||
| 				return symbol.getSkill(); | ||||
| 			} | ||||
| 		} | ||||
| 		return null; | ||||
| 	} | ||||
| 	 | ||||
| 	public static SymbolSealData getInstance() | ||||
|   | ||||
| @@ -6963,7 +6963,11 @@ public class Player extends Playable | ||||
| 		{ | ||||
| 			for (int i = 0; i < 3; i++) | ||||
| 			{ | ||||
| 				removeSkill(SymbolSealData.getInstance().getSkill(classId, i)); | ||||
| 				final Skill skill = SymbolSealData.getInstance().getSkill(classId, i); | ||||
| 				if (skill != null) | ||||
| 				{ | ||||
| 					removeSkill(skill); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| @@ -6997,7 +7001,11 @@ public class Player extends Playable | ||||
| 				} | ||||
| 				for (int i = 0; i < usedSlots; i++) | ||||
| 				{ | ||||
| 					addSkill(SymbolSealData.getInstance().getSkill(classId, i)); | ||||
| 					final Skill skill = SymbolSealData.getInstance().getSkill(classId, i); | ||||
| 					if (skill != null) | ||||
| 					{ | ||||
| 						addSkill(skill); | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment