Browse Source

Fix catched NPE not allowing skill reuse times to be cleared on the start of oly fight.

_DS_ 15 years ago
parent
commit
a02b835d54

+ 5 - 2
L2_GameServer/java/com/l2jserver/gameserver/model/olympiad/OlympiadGame.java

@@ -281,8 +281,11 @@ class OlympiadGame
 				}
 				
 				// Discharge any active shots
-				player.getActiveWeaponInstance().setChargedSoulshot(L2ItemInstance.CHARGED_NONE);
-				player.getActiveWeaponInstance().setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
+				if (player.getActiveWeaponInstance() != null)
+				{
+					player.getActiveWeaponInstance().setChargedSoulshot(L2ItemInstance.CHARGED_NONE);
+					player.getActiveWeaponInstance().setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
+				}
 
 				// enable skills with cool time <= 15 minutes
 				for (L2Skill skill : player.getAllSkills())