Sync with L2JServer Jan 24th 2015.
This commit is contained in:
@@ -42,15 +42,16 @@ import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.LoginServerThread;
|
||||
import com.l2jserver.gameserver.LoginServerThread.SessionKey;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.datatables.CharNameTable;
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.datatables.OfflineTradersTable;
|
||||
import com.l2jserver.gameserver.datatables.SecondaryAuthData;
|
||||
import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.OfflineTradersTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.SecondaryAuthData;
|
||||
import com.l2jserver.gameserver.instancemanager.AntiFeedManager;
|
||||
import com.l2jserver.gameserver.model.CharSelectInfoPackage;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.PcCondOverride;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.entity.L2Event;
|
||||
import com.l2jserver.gameserver.model.olympiad.OlympiadManager;
|
||||
@@ -782,18 +783,26 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>> i
|
||||
OlympiadManager.getInstance().unRegisterNoble(getActiveChar());
|
||||
|
||||
// If the L2PcInstance has Pet, unsummon it
|
||||
if (getActiveChar().hasSummon())
|
||||
L2Summon pet = getActiveChar().getPet();
|
||||
if (pet != null)
|
||||
{
|
||||
getActiveChar().getSummon().setRestoreSummon(true);
|
||||
pet.setRestoreSummon(true);
|
||||
|
||||
getActiveChar().getSummon().unSummon(getActiveChar());
|
||||
pet.unSummon(getActiveChar());
|
||||
pet = getActiveChar().getPet();
|
||||
// Dead pet wasn't unsummoned, broadcast npcinfo changes (pet will be without owner name - means owner offline)
|
||||
if (getActiveChar().getSummon() != null)
|
||||
if (pet != null)
|
||||
{
|
||||
getActiveChar().getSummon().broadcastNpcInfo(0);
|
||||
pet.broadcastNpcInfo(0);
|
||||
}
|
||||
}
|
||||
|
||||
getActiveChar().getServitors().values().forEach(s ->
|
||||
{
|
||||
s.setRestoreSummon(true);
|
||||
s.unSummon(getActiveChar());
|
||||
});
|
||||
|
||||
if (Config.OFFLINE_SET_NAME_COLOR)
|
||||
{
|
||||
getActiveChar().getAppearance().setNameColor(Config.OFFLINE_NAME_COLOR);
|
||||
@@ -948,10 +957,12 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>> i
|
||||
if ((player != null) && player.isOnline()) // safety precaution
|
||||
{
|
||||
saveCharToDisk();
|
||||
if (player.hasSummon())
|
||||
final L2Summon pet = player.getPet();
|
||||
if (pet != null)
|
||||
{
|
||||
player.getSummon().storeMe();
|
||||
pet.storeMe();
|
||||
}
|
||||
player.getServitors().values().forEach(L2Summon::storeMe);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user