Переглянути джерело

BETA: Misc fixes:
* Fixed little typo within Nottingale addFirstTalk must be specified but onFirstTalk is overriden already in AbstractNpcAI.
* Reported by: St3eT
* Fixed ArrayIndexOutOfBoundsException within SummonCubic effect.
* Reported by: takhs7
* Little tweak in punishment reason reading function.

Rumen Nikiforov 12 роки тому
батько
коміт
87272188dc

+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Nottingale/Nottingale.java

@@ -57,6 +57,7 @@ public final class Nottingale extends AbstractNpcAI
 		super(name, descr);
 		addStartNpc(NOTTINGALE);
 		addTalkId(NOTTINGALE);
+		addFirstTalkId(NOTTINGALE);
 	}
 	
 	@Override

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminPunishment.java

@@ -181,14 +181,14 @@ public class AdminPunishment implements IAdminCommandHandler
 				String af = st.hasMoreTokens() ? st.nextToken() : null;
 				String t = st.hasMoreTokens() ? st.nextToken() : null;
 				String exp = st.hasMoreTokens() ? st.nextToken() : null;
-				String reason = st.hasMoreTokens() ? st.nextToken() + " " : null;
+				String reason = st.hasMoreTokens() ? st.nextToken() : null;
 				
 				// Let's grab the other part of the reason if there is..
 				if (reason != null)
 				{
 					while (st.hasMoreTokens())
 					{
-						reason += st.nextToken() + " ";
+						reason += " " + st.nextToken();
 					}
 					if (!reason.isEmpty())
 					{

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/SummonCubic.java

@@ -112,7 +112,7 @@ public class SummonCubic extends L2Effect
 			// If maximum amount is reached, random cubic is removed.
 			final L2Effect cubicMastery = player.getFirstPassiveEffect(L2EffectType.CUBIC_MASTERY);
 			final int cubicCount = (int) (cubicMastery != null ? cubicMastery.calc() : 0);
-			if (player.getCubics().size() >= cubicCount)
+			if (player.getCubics().size() > cubicCount)
 			{
 				player.getCubics().remove(Rnd.get(player.getCubics().size()));
 			}