Kaynağa Gözat

Minor updates. thx Akis

JIV 15 yıl önce
ebeveyn
işleme
f24525caef

+ 1 - 2
L2_GameServer/java/com/l2jserver/gameserver/model/actor/L2Summon.java

@@ -778,8 +778,7 @@ public abstract class L2Summon extends L2Playable
         		&& !actingPlayer.getAccessLevel().allowPeaceAttack())
         {
             // Send a System Message to the L2PcInstance
-            actingPlayer.sendPacket(
-                    new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
+            actingPlayer.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
 
             // Send a Server->Client packet ActionFailed to the L2PcInstance
             actingPlayer.sendPacket(ActionFailed.STATIC_PACKET);

+ 6 - 0
L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2ManorManagerInstance.java

@@ -25,6 +25,12 @@ public class L2ManorManagerInstance extends L2MerchantInstance
 		setInstanceType(InstanceType.L2ManorManagerInstance);
 	}
 
+	@Override
+	public String getHtmlPath(int npcId, int val)
+	{
+		return "data/html/manormanager/manager.htm";
+	}
+
 	@Override
 	public void showChatWindow(L2PcInstance player)
 	{

+ 3 - 3
L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

@@ -8716,7 +8716,7 @@ public final class L2PcInstance extends L2Playable
 
         // Abnormal effects(ex : Stun, Sleep...) are checked in L2Character useMagic()
 
-      	if (isOutOfControl())
+      	if (isOutOfControl() || isParalyzed() || isStunned() || isSleeping())
 		{
 			sendPacket(ActionFailed.STATIC_PACKET);
 			return false;
@@ -9091,7 +9091,7 @@ public final class L2PcInstance extends L2Playable
 			if (!(target instanceof L2MonsterInstance))
 			{
 				// Send a System Message to the L2PcInstance
-				sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
+				sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
 
 				// Send a Server->Client packet ActionFailed to the L2PcInstance
 				sendPacket(ActionFailed.STATIC_PACKET);
@@ -9134,7 +9134,7 @@ public final class L2PcInstance extends L2Playable
 			if (!(target instanceof L2MonsterInstance))
 			{
 				// Send a System Message to the L2PcInstance
-				sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
+				sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
 
 				// Send a Server->Client packet ActionFailed to the L2PcInstance
 				sendPacket(ActionFailed.STATIC_PACKET);

+ 2 - 2
L2_GameServer/java/com/l2jserver/gameserver/network/SystemMessageId.java

@@ -1475,9 +1475,9 @@ public enum SystemMessageId
 
 	/**
 	 * ID: 242<br>
-	 * Message: You must select a target
+	 * Message: Select target.
 	 */
-	YOU_MUST_SELECT_A_TARGET(242),
+	SELECT_TARGET(242),
 
 	/**
 	 * ID: 243<br>

+ 1 - 1
L2_GameServer/java/com/l2jserver/gameserver/network/clientpackets/RequestActionUse.java

@@ -289,7 +289,7 @@ public final class RequestActionUse extends L2GameClientPacket
 				if( target != null && (target instanceof L2DoorInstance || target instanceof L2SiegeFlagInstance))
 					useSkill(4230);
 				else
-					activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
+					activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
 				break;
 			case 42: // Kai the Cat - Self Damage Shield
 				useSkill(4378, activeChar);

+ 61 - 70
L2_GameServer/java/com/l2jserver/gameserver/network/clientpackets/RequestEvaluate.java

@@ -23,99 +23,90 @@ import com.l2jserver.gameserver.network.serverpackets.UserInfo;
 public final class RequestEvaluate extends L2GameClientPacket
 {
 	private static final String _C__B9_REQUESTEVALUATE = "[C] B9 RequestEvaluate";
-
-	//private static Logger _log = Logger.getLogger(RequestEvaluate.class.getName());
-
+	
 	@SuppressWarnings("unused")
-    private int _targetId;
-
+	private int _targetId;
+	
 	@Override
 	protected void readImpl()
 	{
 		_targetId = readD();
 	}
-
+	
 	@Override
 	protected void runImpl()
 	{
-		SystemMessage sm;
 		L2PcInstance activeChar = getClient().getActiveChar();
 		if (activeChar == null)
-		    return;
-
-
-        if (!(activeChar.getTarget() instanceof L2PcInstance))
-        {
-            sm = new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT);
-            activeChar.sendPacket(sm);
-            sm =null;
-            return;
-        }
-
-        if (activeChar.getLevel() < 10)
-        {
-            sm = new SystemMessage(SystemMessageId.ONLY_LEVEL_SUP_10_CAN_RECOMMEND);
-            activeChar.sendPacket(sm);
-            sm =null;
-            return;
-        }
-
-        if (activeChar.getTarget() == activeChar)
-        {
-            sm = new SystemMessage(SystemMessageId.YOU_CANNOT_RECOMMEND_YOURSELF);
-            activeChar.sendPacket(sm);
-            sm =null;
-            return;
-        }
-
-        if (activeChar.getRecomLeft() <= 0)
-        {
-            sm = new SystemMessage(SystemMessageId.NO_MORE_RECOMMENDATIONS_TO_HAVE);
-            activeChar.sendPacket(sm);
-            sm =null;
-            return;
-        }
-
-        L2PcInstance target = (L2PcInstance)activeChar.getTarget();
-
-        if (target.getRecomHave() >= 255)
-        {
-            sm = new SystemMessage(SystemMessageId.YOUR_TARGET_NO_LONGER_RECEIVE_A_RECOMMENDATION);
-            activeChar.sendPacket(sm);
-            sm =null;
-            return;
-        }
-
-        if (!activeChar.canRecom(target))
-        {
-            sm = new SystemMessage(SystemMessageId.THAT_CHARACTER_IS_RECOMMENDED);
-            activeChar.sendPacket(sm);
-            sm =null;
-            return;
-        }
-
-        activeChar.giveRecom(target);
-
+			return;
+		
+		L2PcInstance target = (L2PcInstance) activeChar.getTarget();
+		if (target == null)
+		{
+			activeChar.sendPacket(new SystemMessage(SystemMessageId.SELECT_TARGET));
+			return;
+		}
+		
+		if (!(activeChar.getTarget() instanceof L2PcInstance))
+		{
+			activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
+			return;
+		}
+		
+		if (activeChar.getLevel() < 10)
+		{
+			activeChar.sendPacket(new SystemMessage(SystemMessageId.ONLY_LEVEL_SUP_10_CAN_RECOMMEND));
+			return;
+		}
+		
+		if (activeChar.getTarget() == activeChar)
+		{
+			activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_CANNOT_RECOMMEND_YOURSELF));
+			return;
+		}
+		
+		if (activeChar.getRecomLeft() <= 0)
+		{
+			activeChar.sendPacket(new SystemMessage(SystemMessageId.NO_MORE_RECOMMENDATIONS_TO_HAVE));
+			return;
+		}
+		
+		if (target.getRecomHave() >= 255)
+		{
+			activeChar.sendPacket(new SystemMessage(SystemMessageId.YOUR_TARGET_NO_LONGER_RECEIVE_A_RECOMMENDATION));
+			return;
+		}
+		
+		if (!activeChar.canRecom(target))
+		{
+			activeChar.sendPacket(new SystemMessage(SystemMessageId.THAT_CHARACTER_IS_RECOMMENDED));
+			return;
+		}
+		
+		activeChar.giveRecom(target);
+		
+		SystemMessage sm = null;
 		sm = new SystemMessage(SystemMessageId.YOU_HAVE_RECOMMENDED_C1_YOU_HAVE_S2_RECOMMENDATIONS_LEFT);
 		sm.addPcName(target);
-        sm.addNumber(activeChar.getRecomLeft());
+		sm.addNumber(activeChar.getRecomLeft());
 		activeChar.sendPacket(sm);
-
+		
 		sm = new SystemMessage(SystemMessageId.YOU_HAVE_BEEN_RECOMMENDED_BY_C1);
 		sm.addPcName(activeChar);
 		target.sendPacket(sm);
-		sm =null;
-
-        activeChar.sendPacket(new UserInfo(activeChar));
-        sendPacket(new ExBrExtraUserInfo(activeChar));
+		sm = null;
+		
+		activeChar.sendPacket(new UserInfo(activeChar));
+		sendPacket(new ExBrExtraUserInfo(activeChar));
 		target.broadcastUserInfo();
 	}
-
+	
 	/* (non-Javadoc)
 	 * @see com.l2jserver.gameserver.clientpackets.ClientBasePacket#getType()
 	 */
 	@Override
-	public String getType() {
+	public String getType()
+	{
 		return _C__B9_REQUESTEVALUATE;
 	}
 }

+ 2 - 2
L2_GameServer/java/com/l2jserver/gameserver/network/clientpackets/RequestJoinParty.java

@@ -63,7 +63,7 @@ public final class RequestJoinParty extends L2GameClientPacket
 		
 		if (target == null)
 		{
-			requestor.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
+			requestor.sendPacket(new SystemMessage(SystemMessageId.FIRST_SELECT_USER_TO_INVITE_TO_PARTY));
 			return;
 		}
 		
@@ -91,7 +91,7 @@ public final class RequestJoinParty extends L2GameClientPacket
 		
 		if (target == requestor)
 		{
-			requestor.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
+			requestor.sendPacket(new SystemMessage(SystemMessageId.YOU_HAVE_INVITED_THE_WRONG_TARGET));
 			return;
 		}
 		

+ 8 - 3
L2_GameServer/java/com/l2jserver/gameserver/network/clientpackets/TradeRequest.java

@@ -61,7 +61,13 @@ public final class TradeRequest extends L2GameClientPacket
 		}
 		
 		L2Object target = L2World.getInstance().findObject(_objectId);
-		if (target == null || !player.getKnownList().knowsObject(target) || !(target instanceof L2PcInstance) || (target.getObjectId() == player.getObjectId()))
+		if (target == null || !player.getKnownList().knowsObject(target) || !(target instanceof L2PcInstance))
+		{
+			player.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
+			return;
+		}
+		
+		if (target.getObjectId() == player.getObjectId())
 		{
 			player.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT));
 			return;
@@ -132,8 +138,7 @@ public final class TradeRequest extends L2GameClientPacket
 		
 		if (Util.calculateDistance(player, partner, true) > 150)
 		{
-			SystemMessage sm = new SystemMessage(SystemMessageId.TARGET_TOO_FAR);
-			player.sendPacket(sm);
+			player.sendPacket(new SystemMessage(SystemMessageId.TARGET_TOO_FAR));
 			return;
 		}
 		

+ 1 - 1
L2_GameServer/java/com/l2jserver/gameserver/skills/l2skills/L2SkillSummon.java

@@ -111,7 +111,7 @@ public class L2SkillSummon extends L2Skill
 					return false;
 				if (player.getPet() != null)
 				{
-					activeChar.sendMessage("You already have a pet.");
+					activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_ALREADY_HAVE_A_PET));
 					return false;
 				}
 			}