Dropped FlyToLocation creature task.
Contributed by Sahar.
This commit is contained in:
parent
7d4c880e4f
commit
9b225db152
@ -78,7 +78,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.QuestGuardInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.stat.CreatureStat;
|
||||
import org.l2jmobius.gameserver.model.actor.status.CreatureStatus;
|
||||
import org.l2jmobius.gameserver.model.actor.tasks.creature.FlyToLocationTask;
|
||||
import org.l2jmobius.gameserver.model.actor.tasks.creature.HitTask;
|
||||
import org.l2jmobius.gameserver.model.actor.tasks.creature.MagicUseTask;
|
||||
import org.l2jmobius.gameserver.model.actor.tasks.creature.NotifyAITask;
|
||||
@ -143,6 +142,7 @@ import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ChangeMoveType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ChangeWaitType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.FakePlayerInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.FlyToLocation;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillCanceled;
|
||||
@ -1879,6 +1879,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
}
|
||||
|
||||
// Broadcast fly effect if needed.
|
||||
if (skill.getFlyType() != null)
|
||||
{
|
||||
broadcastPacket(new FlyToLocation(this, target, skill.getFlyType()));
|
||||
setXYZ(target.getX(), target.getY(), target.getZ());
|
||||
}
|
||||
|
||||
if (!skill.isToggle())
|
||||
{
|
||||
// Send a Server->Client packet MagicSkillUser with target, displayId, level, skillTime, reuseDelay
|
||||
@ -1919,12 +1926,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
skill.applyEffectScope(EffectScope.START, new BuffInfo(this, target, skill), true, false);
|
||||
}
|
||||
|
||||
// Before start AI Cast Broadcast Fly Effect is Need
|
||||
if (skill.getFlyType() != null)
|
||||
{
|
||||
ThreadPool.schedule(new FlyToLocationTask(this, target, skill), 50);
|
||||
}
|
||||
|
||||
final MagicUseTask mut = new MagicUseTask(this, targets, skill, skillTime, simultaneously);
|
||||
|
||||
// launch the magic in skillTime milliseconds
|
||||
|
@ -1,50 +0,0 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.model.actor.tasks.creature;
|
||||
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.FlyToLocation;
|
||||
|
||||
/**
|
||||
* Task dedicated to fly a player to the location
|
||||
* @author xban1x
|
||||
*/
|
||||
public class FlyToLocationTask implements Runnable
|
||||
{
|
||||
private final Creature _creature;
|
||||
private final WorldObject _target;
|
||||
private final Skill _skill;
|
||||
|
||||
public FlyToLocationTask(Creature creature, WorldObject target, Skill skill)
|
||||
{
|
||||
_creature = creature;
|
||||
_target = target;
|
||||
_skill = skill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
if (_creature != null)
|
||||
{
|
||||
_creature.broadcastPacket(new FlyToLocation(_creature, _target, _skill.getFlyType()));
|
||||
_creature.setXYZ(_target.getX(), _target.getY(), _target.getZ());
|
||||
}
|
||||
}
|
||||
}
|
@ -78,7 +78,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.QuestGuardInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.stat.CreatureStat;
|
||||
import org.l2jmobius.gameserver.model.actor.status.CreatureStatus;
|
||||
import org.l2jmobius.gameserver.model.actor.tasks.creature.FlyToLocationTask;
|
||||
import org.l2jmobius.gameserver.model.actor.tasks.creature.HitTask;
|
||||
import org.l2jmobius.gameserver.model.actor.tasks.creature.MagicUseTask;
|
||||
import org.l2jmobius.gameserver.model.actor.tasks.creature.NotifyAITask;
|
||||
@ -144,6 +143,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ChangeMoveType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ChangeWaitType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExRotation;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.FakePlayerInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.FlyToLocation;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.FlyToLocation.FlyType;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillCanceled;
|
||||
@ -1881,6 +1881,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
}
|
||||
}
|
||||
|
||||
// Broadcast fly effect if needed.
|
||||
if (skill.getFlyType() != null)
|
||||
{
|
||||
broadcastPacket(new FlyToLocation(this, target, skill.getFlyType()));
|
||||
setXYZ(target.getX(), target.getY(), target.getZ());
|
||||
}
|
||||
|
||||
if (!skill.isToggle())
|
||||
{
|
||||
// Send a Server->Client packet MagicSkillUser with target, displayId, level, skillTime, reuseDelay
|
||||
@ -1921,12 +1928,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
skill.applyEffectScope(EffectScope.START, new BuffInfo(this, target, skill), true, false);
|
||||
}
|
||||
|
||||
// Before start AI Cast Broadcast Fly Effect is Need
|
||||
if (skill.getFlyType() != null)
|
||||
{
|
||||
ThreadPool.schedule(new FlyToLocationTask(this, target, skill), 50);
|
||||
}
|
||||
|
||||
final MagicUseTask mut = new MagicUseTask(this, targets, skill, skillTime, simultaneously);
|
||||
|
||||
// launch the magic in skillTime milliseconds
|
||||
|
@ -1,50 +0,0 @@
|
||||
/*
|
||||
* 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 org.l2jmobius.gameserver.model.actor.tasks.creature;
|
||||
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.FlyToLocation;
|
||||
|
||||
/**
|
||||
* Task dedicated to fly a player to the location
|
||||
* @author xban1x
|
||||
*/
|
||||
public class FlyToLocationTask implements Runnable
|
||||
{
|
||||
private final Creature _creature;
|
||||
private final WorldObject _target;
|
||||
private final Skill _skill;
|
||||
|
||||
public FlyToLocationTask(Creature creature, WorldObject target, Skill skill)
|
||||
{
|
||||
_creature = creature;
|
||||
_target = target;
|
||||
_skill = skill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
if (_creature != null)
|
||||
{
|
||||
_creature.broadcastPacket(new FlyToLocation(_creature, _target, _skill.getFlyType()));
|
||||
_creature.setXYZ(_target.getX(), _target.getY(), _target.getZ());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user