Преглед на файлове

BETA: Minor fix for Guards not handling last folk NPC on action, preventing the player to call multisells.
* Minor cleanup.

Reported by: Konstantinos

Zoey76 преди 11 години
родител
ревизия
398a24c455

+ 1 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/ClanTable.java

@@ -120,9 +120,7 @@ public class ClanTable
 	 */
 	public L2Clan getClan(int clanId)
 	{
-		L2Clan clan = _clans.get(Integer.valueOf(clanId));
-		
-		return clan;
+		return _clans.get(clanId);
 	}
 	
 	public L2Clan getClanByName(String clanName)

+ 3 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2GuardInstance.java

@@ -220,8 +220,9 @@ public class L2GuardInstance extends L2Attackable
 				{
 					// Send a Server->Client packet SocialAction to the all L2PcInstance on the _knownPlayer of the L2NpcInstance
 					// to display a social action of the L2GuardInstance on their client
-					SocialAction sa = new SocialAction(getObjectId(), Rnd.nextInt(8));
-					broadcastPacket(sa);
+					broadcastPacket(new SocialAction(getObjectId(), Rnd.nextInt(8)));
+					
+					player.setLastFolkNPC(this);
 					
 					// Open a chat window on client with the text of the L2GuardInstance
 					List<Quest> qlsa = getTemplate().getEventQuests(QuestEventType.QUEST_START);

+ 4 - 11
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/RequestPledgeInfo.java

@@ -26,10 +26,6 @@ import com.l2jserver.gameserver.model.L2Clan;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.network.serverpackets.PledgeInfo;
 
-/**
- * This class ...
- * @version $Revision: 1.5.4.3 $ $Date: 2005/03/27 15:29:30 $
- */
 public final class RequestPledgeInfo extends L2GameClientPacket
 {
 	private static final String _C__65_REQUESTPLEDGEINFO = "[C] 65 RequestPledgeInfo";
@@ -50,26 +46,23 @@ public final class RequestPledgeInfo extends L2GameClientPacket
 			_log.log(Level.FINE, "Info for clan " + _clanId + " requested");
 		}
 		
-		L2PcInstance activeChar = getClient().getActiveChar();
-		
+		final L2PcInstance activeChar = getClient().getActiveChar();
 		if (activeChar == null)
 		{
 			return;
 		}
 		
-		L2Clan clan = ClanTable.getInstance().getClan(_clanId);
+		final L2Clan clan = ClanTable.getInstance().getClan(_clanId);
 		if (clan == null)
 		{
 			if (Config.DEBUG)
 			{
-				_log.warning("Clan data for clanId " + _clanId + " is missing for player " + activeChar.getName());
+				_log.warning(getType() + ": Clan data for clanId " + _clanId + " is missing for player " + activeChar);
 			}
 			return; // we have no clan data ?!? should not happen
 		}
 		
-		PledgeInfo pc = new PledgeInfo(clan);
-		activeChar.sendPacket(pc);
-		
+		activeChar.sendPacket(new PledgeInfo(clan));
 	}
 	
 	@Override