Player movie task to avoid client issues.
This commit is contained in:
@@ -166,6 +166,7 @@ import com.l2jmobius.gameserver.model.actor.tasks.player.DismountTask;
|
|||||||
import com.l2jmobius.gameserver.model.actor.tasks.player.FameTask;
|
import com.l2jmobius.gameserver.model.actor.tasks.player.FameTask;
|
||||||
import com.l2jmobius.gameserver.model.actor.tasks.player.GameGuardCheckTask;
|
import com.l2jmobius.gameserver.model.actor.tasks.player.GameGuardCheckTask;
|
||||||
import com.l2jmobius.gameserver.model.actor.tasks.player.InventoryEnableTask;
|
import com.l2jmobius.gameserver.model.actor.tasks.player.InventoryEnableTask;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.tasks.player.MovieTask;
|
||||||
import com.l2jmobius.gameserver.model.actor.tasks.player.PetFeedTask;
|
import com.l2jmobius.gameserver.model.actor.tasks.player.PetFeedTask;
|
||||||
import com.l2jmobius.gameserver.model.actor.tasks.player.PvPFlagTask;
|
import com.l2jmobius.gameserver.model.actor.tasks.player.PvPFlagTask;
|
||||||
import com.l2jmobius.gameserver.model.actor.tasks.player.RecoGiveTask;
|
import com.l2jmobius.gameserver.model.actor.tasks.player.RecoGiveTask;
|
||||||
@@ -280,7 +281,6 @@ import com.l2jmobius.gameserver.network.serverpackets.ExPledgeCount;
|
|||||||
import com.l2jmobius.gameserver.network.serverpackets.ExPrivateStoreSetWholeMsg;
|
import com.l2jmobius.gameserver.network.serverpackets.ExPrivateStoreSetWholeMsg;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExQuestItemList;
|
import com.l2jmobius.gameserver.network.serverpackets.ExQuestItemList;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExSetCompassZoneCode;
|
import com.l2jmobius.gameserver.network.serverpackets.ExSetCompassZoneCode;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExStartScenePlayer;
|
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExStopScenePlayer;
|
import com.l2jmobius.gameserver.network.serverpackets.ExStopScenePlayer;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExStorageMaxCount;
|
import com.l2jmobius.gameserver.network.serverpackets.ExStorageMaxCount;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo;
|
import com.l2jmobius.gameserver.network.serverpackets.ExSubjobInfo;
|
||||||
@@ -12089,7 +12089,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
// abortCast(); Confirmed in retail, playing a movie does not abort cast.
|
// abortCast(); Confirmed in retail, playing a movie does not abort cast.
|
||||||
stopMove(null);
|
stopMove(null);
|
||||||
setMovieHolder(holder);
|
setMovieHolder(holder);
|
||||||
sendPacket(new ExStartScenePlayer(holder.getMovie()));
|
ThreadPoolManager.getInstance().scheduleGeneral(new MovieTask(this, holder.getMovie()), 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stopMovie()
|
public void stopMovie()
|
||||||
|
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.l2jmobius.gameserver.model.actor.tasks.player;
|
||||||
|
|
||||||
|
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||||
|
import com.l2jmobius.gameserver.enums.Movie;
|
||||||
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.ExStartScenePlayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class MovieTask implements Runnable
|
||||||
|
{
|
||||||
|
private final L2PcInstance _player;
|
||||||
|
private final Movie _movie;
|
||||||
|
|
||||||
|
public MovieTask(L2PcInstance player, Movie movie)
|
||||||
|
{
|
||||||
|
_player = player;
|
||||||
|
_movie = movie;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
if (_player == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (_player.isTeleporting())
|
||||||
|
{
|
||||||
|
ThreadPoolManager.getInstance().scheduleGeneral(new MovieTask(_player, _movie), 300);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_player.sendPacket(new ExStartScenePlayer(_movie));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user