Quellcode durchsuchen

fix ClassCastException in EnterWorld at notifySponsorOrApprentice(), thx Gnacik

janiii vor 15 Jahren
Ursprung
Commit
f9c18f1386

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

@@ -565,7 +565,7 @@ public class EnterWorld extends L2GameClientPacket
 	{
 		if (activeChar.getSponsor() != 0)
 		{
-			L2PcInstance sponsor = (L2PcInstance)L2World.getInstance().findObject(activeChar.getSponsor());
+			L2PcInstance sponsor = (L2PcInstance)L2World.getInstance().getPlayer(activeChar.getSponsor());
 
 			if (sponsor != null)
 			{
@@ -576,7 +576,7 @@ public class EnterWorld extends L2GameClientPacket
 		}
 		else if (activeChar.getApprentice() != 0)
 		{
-			L2PcInstance apprentice = (L2PcInstance)L2World.getInstance().findObject(activeChar.getApprentice());
+			L2PcInstance apprentice = (L2PcInstance)L2World.getInstance().getPlayer(activeChar.getApprentice());
 
 			if (apprentice != null)
 			{