Minor code cleanup.
This commit is contained in:
parent
dd5bb3f959
commit
dcc2fd58f1
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -1,26 +1,49 @@
|
||||
/*
|
||||
* 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.holders;
|
||||
|
||||
/**
|
||||
* Written by Berezkin Nikolay, on 04.05.2021
|
||||
*/
|
||||
public class PlayerCollectionData {
|
||||
public int getCollectionId() {
|
||||
return collectionId;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
private final int collectionId, itemId, index;
|
||||
|
||||
public PlayerCollectionData(int collectionId, int itemId, int index) {
|
||||
this.collectionId = collectionId;
|
||||
this.itemId = itemId;
|
||||
this.index = index;
|
||||
}
|
||||
public class PlayerCollectionData
|
||||
{
|
||||
private final int _collectionId;
|
||||
private final int _itemId;
|
||||
private final int _index;
|
||||
|
||||
public PlayerCollectionData(int collectionId, int itemId, int index)
|
||||
{
|
||||
_collectionId = collectionId;
|
||||
_itemId = itemId;
|
||||
_index = index;
|
||||
}
|
||||
|
||||
public int getCollectionId()
|
||||
{
|
||||
return _collectionId;
|
||||
}
|
||||
|
||||
public int getItemId()
|
||||
{
|
||||
return _itemId;
|
||||
}
|
||||
|
||||
public int getIndex()
|
||||
{
|
||||
return _index;
|
||||
}
|
||||
}
|
@ -41,7 +41,7 @@ public class MoveToPawn implements IClientOutgoingPacket
|
||||
private final int _tx;
|
||||
private final int _ty;
|
||||
private final int _tz;
|
||||
|
||||
|
||||
public MoveToPawn(Creature creature, Creature target, int distance)
|
||||
{
|
||||
_objectId = creature.getObjectId();
|
||||
|
@ -491,7 +491,7 @@ public class EffectList
|
||||
{
|
||||
return hasDances() ? _dances.size() : 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the hidden buff count.
|
||||
* @return the number of hidden buffs
|
||||
|
@ -1861,15 +1861,15 @@ public class Formulas
|
||||
public static List<BuffInfo> calcStealEffects(Creature target, int amount)
|
||||
{
|
||||
final List<BuffInfo> canceled = new ArrayList<>(amount);
|
||||
|
||||
|
||||
// Prevent initialization.
|
||||
final List<BuffInfo> buffs = target.getEffectList().hasBuffs() ? new ArrayList<>(target.getEffectList().getBuffs()) : new ArrayList<>(1);
|
||||
if (target.getEffectList().hasDances())
|
||||
{
|
||||
buffs.addAll(target.getEffectList().getDances());
|
||||
}
|
||||
|
||||
for (int i = buffs.size() - 1; i >= 0 && canceled.size() < amount; i--) // reverse order
|
||||
|
||||
for (int i = buffs.size() - 1; (i >= 0) && (canceled.size() < amount); i--) // reverse order
|
||||
{
|
||||
final BuffInfo info = buffs.get(i);
|
||||
if (!info.getSkill().canBeStolen())
|
||||
@ -1880,7 +1880,7 @@ public class Formulas
|
||||
}
|
||||
return canceled;
|
||||
}
|
||||
|
||||
|
||||
public static List<BuffInfo> calcCancelEffects(Creature creature, Creature target, Skill skill, String slot, int rate, int max)
|
||||
{
|
||||
final List<BuffInfo> canceled = new ArrayList<>(max);
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -168,7 +168,6 @@ public class Q10985_CleaningUpTheGround extends Quest
|
||||
{
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
|
||||
htmltext = "30600-02.htm";
|
||||
}
|
||||
break;
|
||||
|
@ -116,7 +116,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
packet.writeD(0); // petName id
|
||||
packet.writeD(2);
|
||||
packet.writeD(3);
|
||||
packet.writeD(PetDataTable.getInstance().getTypeByIndex(item.getPetData().getIndex()));//pet id
|
||||
packet.writeD(PetDataTable.getInstance().getTypeByIndex(item.getPetData().getIndex())); // pet id
|
||||
packet.writeQ(item.getPetData().getExp()); // pet exp
|
||||
}
|
||||
if (containsMask(mask, ItemListType.BLESSED))
|
||||
@ -172,7 +172,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
packet.writeD(0);
|
||||
packet.writeD(2);
|
||||
packet.writeD(3);
|
||||
packet.writeD(PetDataTable.getInstance().getTypeByIndex(item.getPetData().getIndex()));//pet id
|
||||
packet.writeD(PetDataTable.getInstance().getTypeByIndex(item.getPetData().getIndex())); // pet id
|
||||
packet.writeQ(item.getPetData().getExp()); // pet exp
|
||||
}
|
||||
if (containsMask(mask, ItemListType.BLESSED))
|
||||
|
@ -1,6 +1,21 @@
|
||||
/*
|
||||
* 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.network.serverpackets.pet;
|
||||
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
@ -10,27 +25,31 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
/**
|
||||
* Written by Berezkin Nikolay, on 26.04.2021
|
||||
*/
|
||||
public class ExPetSkillList implements IClientOutgoingPacket{
|
||||
|
||||
private final boolean onEnter;
|
||||
private final Summon pet;
|
||||
public ExPetSkillList(boolean onEnter, Summon pet) {
|
||||
this.onEnter = onEnter;
|
||||
this.pet = pet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet) {
|
||||
OutgoingPackets.EX_PET_SKILL_LIST.writeId(packet);
|
||||
packet.writeC(onEnter ? 1 : 0);
|
||||
packet.writeD(pet.getAllSkills().size());
|
||||
for (Skill sk : pet.getAllSkills()) {
|
||||
packet.writeD(sk.getDisplayId());
|
||||
packet.writeD(sk.getDisplayLevel());
|
||||
packet.writeD(sk.getReuseDelayGroup());
|
||||
packet.writeC(0);
|
||||
packet.writeC(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public class ExPetSkillList implements IClientOutgoingPacket
|
||||
{
|
||||
private final boolean _onEnter;
|
||||
private final Summon _pet;
|
||||
|
||||
public ExPetSkillList(boolean onEnter, Summon pet)
|
||||
{
|
||||
_onEnter = onEnter;
|
||||
_pet = pet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_PET_SKILL_LIST.writeId(packet);
|
||||
packet.writeC(_onEnter ? 1 : 0);
|
||||
packet.writeD(_pet.getAllSkills().size());
|
||||
for (Skill sk : _pet.getAllSkills())
|
||||
{
|
||||
packet.writeD(sk.getDisplayId());
|
||||
packet.writeD(sk.getDisplayLevel());
|
||||
packet.writeD(sk.getReuseDelayGroup());
|
||||
packet.writeC(0);
|
||||
packet.writeC(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -156,10 +156,10 @@ public class PetInfo implements IClientOutgoingPacket
|
||||
packet.writeQ(_summon.getStat().getSp()); // sp
|
||||
packet.writeH(_summon.getLevel()); // level
|
||||
packet.writeQ(_summon.getStat().getExp());
|
||||
|
||||
|
||||
// 0% absolute value
|
||||
packet.writeQ(Math.min(_summon.getExpForThisLevel(), _summon.getStat().getExp())); // 0% absolute value
|
||||
|
||||
|
||||
packet.writeQ(_summon.getExpForNextLevel()); // 100% absoulte value
|
||||
packet.writeD(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
|
||||
packet.writeD(_summon.getMaxLoad()); // max weight it can carry
|
||||
@ -181,7 +181,7 @@ public class PetInfo implements IClientOutgoingPacket
|
||||
packet.writeC(_summon.getTeam().getId()); // Confirmed
|
||||
packet.writeC(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
|
||||
packet.writeC(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
|
||||
|
||||
|
||||
packet.writeD(-1);
|
||||
packet.writeD(0);
|
||||
final Set<AbnormalVisualEffect> aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
|
||||
@ -190,14 +190,17 @@ public class PetInfo implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeH(ave.getClientId()); // Confirmed
|
||||
}
|
||||
packet.writeH(0);//visibility
|
||||
packet.writeH(0); // visibility
|
||||
packet.writeC(_statusMask);
|
||||
if (_summon.isPet()) {
|
||||
if (_summon.isPet())
|
||||
{
|
||||
final PetInstance pet = (PetInstance) _summon;
|
||||
packet.writeD(pet.getPetData().getType());
|
||||
packet.writeD(pet.getEvolveLevel());
|
||||
packet.writeD(pet.getEvolveLevel() == 0 ? -1 : pet.getId());
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0);
|
||||
packet.writeD(EvolveLevel.None.ordinal());
|
||||
packet.writeD(0);
|
||||
|
@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = summon.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
|
||||
final int y = (int) (py + (25 * Math.sin(ph)));
|
||||
final int z = effected.getZ();
|
||||
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z,effector.getInstanceWorld());
|
||||
final Location loc = GeoEngine.getInstance().getValidLocation(effector.getX(), effector.getY(), effector.getZ(), x, y, z, effector.getInstanceWorld());
|
||||
|
||||
effector.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
|
||||
|
@ -168,7 +168,6 @@ public class Q10985_CleaningUpTheGround extends Quest
|
||||
{
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
|
||||
htmltext = "30600-02.htm";
|
||||
}
|
||||
break;
|
||||
|
@ -1,26 +1,49 @@
|
||||
/*
|
||||
* 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.holders;
|
||||
|
||||
/**
|
||||
* Written by Berezkin Nikolay, on 04.05.2021
|
||||
*/
|
||||
public class PlayerCollectionData {
|
||||
public int getCollectionId() {
|
||||
return collectionId;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
private final int collectionId, itemId, index;
|
||||
|
||||
public PlayerCollectionData(int collectionId, int itemId, int index) {
|
||||
this.collectionId = collectionId;
|
||||
this.itemId = itemId;
|
||||
this.index = index;
|
||||
}
|
||||
public class PlayerCollectionData
|
||||
{
|
||||
private final int _collectionId;
|
||||
private final int _itemId;
|
||||
private final int _index;
|
||||
|
||||
public PlayerCollectionData(int collectionId, int itemId, int index)
|
||||
{
|
||||
_collectionId = collectionId;
|
||||
_itemId = itemId;
|
||||
_index = index;
|
||||
}
|
||||
|
||||
public int getCollectionId()
|
||||
{
|
||||
return _collectionId;
|
||||
}
|
||||
|
||||
public int getItemId()
|
||||
{
|
||||
return _itemId;
|
||||
}
|
||||
|
||||
public int getIndex()
|
||||
{
|
||||
return _index;
|
||||
}
|
||||
}
|
@ -116,7 +116,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
packet.writeD(0); // petName id
|
||||
packet.writeD(2);
|
||||
packet.writeD(3);
|
||||
packet.writeD(PetDataTable.getInstance().getTypeByIndex(item.getPetData().getIndex()));//pet id
|
||||
packet.writeD(PetDataTable.getInstance().getTypeByIndex(item.getPetData().getIndex())); // pet id
|
||||
packet.writeQ(item.getPetData().getExp()); // pet exp
|
||||
}
|
||||
if (containsMask(mask, ItemListType.BLESSED))
|
||||
@ -172,7 +172,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
packet.writeD(0);
|
||||
packet.writeD(2);
|
||||
packet.writeD(3);
|
||||
packet.writeD(PetDataTable.getInstance().getTypeByIndex(item.getPetData().getIndex()));//pet id
|
||||
packet.writeD(PetDataTable.getInstance().getTypeByIndex(item.getPetData().getIndex())); // pet id
|
||||
packet.writeQ(item.getPetData().getExp()); // pet exp
|
||||
}
|
||||
if (containsMask(mask, ItemListType.BLESSED))
|
||||
|
@ -1,6 +1,21 @@
|
||||
/*
|
||||
* 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.network.serverpackets.pet;
|
||||
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
@ -10,27 +25,31 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
/**
|
||||
* Written by Berezkin Nikolay, on 26.04.2021
|
||||
*/
|
||||
public class ExPetSkillList implements IClientOutgoingPacket{
|
||||
|
||||
private final boolean onEnter;
|
||||
private final Summon pet;
|
||||
public ExPetSkillList(boolean onEnter, Summon pet) {
|
||||
this.onEnter = onEnter;
|
||||
this.pet = pet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet) {
|
||||
OutgoingPackets.EX_PET_SKILL_LIST.writeId(packet);
|
||||
packet.writeC(onEnter ? 1 : 0);
|
||||
packet.writeD(pet.getAllSkills().size());
|
||||
for (Skill sk : pet.getAllSkills()) {
|
||||
packet.writeD(sk.getDisplayId());
|
||||
packet.writeD(sk.getDisplayLevel());
|
||||
packet.writeD(sk.getReuseDelayGroup());
|
||||
packet.writeC(0);
|
||||
packet.writeC(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public class ExPetSkillList implements IClientOutgoingPacket
|
||||
{
|
||||
private final boolean _onEnter;
|
||||
private final Summon _pet;
|
||||
|
||||
public ExPetSkillList(boolean onEnter, Summon pet)
|
||||
{
|
||||
_onEnter = onEnter;
|
||||
_pet = pet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_PET_SKILL_LIST.writeId(packet);
|
||||
packet.writeC(_onEnter ? 1 : 0);
|
||||
packet.writeD(_pet.getAllSkills().size());
|
||||
for (Skill sk : _pet.getAllSkills())
|
||||
{
|
||||
packet.writeD(sk.getDisplayId());
|
||||
packet.writeD(sk.getDisplayLevel());
|
||||
packet.writeD(sk.getReuseDelayGroup());
|
||||
packet.writeC(0);
|
||||
packet.writeC(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -156,10 +156,10 @@ public class PetInfo implements IClientOutgoingPacket
|
||||
packet.writeQ(_summon.getStat().getSp()); // sp
|
||||
packet.writeH(_summon.getLevel()); // level
|
||||
packet.writeQ(_summon.getStat().getExp());
|
||||
|
||||
|
||||
// 0% absolute value
|
||||
packet.writeQ(Math.min(_summon.getExpForThisLevel(), _summon.getStat().getExp())); // 0% absolute value
|
||||
|
||||
|
||||
packet.writeQ(_summon.getExpForNextLevel()); // 100% absoulte value
|
||||
packet.writeD(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
|
||||
packet.writeD(_summon.getMaxLoad()); // max weight it can carry
|
||||
@ -181,7 +181,7 @@ public class PetInfo implements IClientOutgoingPacket
|
||||
packet.writeC(_summon.getTeam().getId()); // Confirmed
|
||||
packet.writeC(_summon.getSoulShotsPerHit()); // How many soulshots this servitor uses per hit - Confirmed
|
||||
packet.writeC(_summon.getSpiritShotsPerHit()); // How many spiritshots this servitor uses per hit - - Confirmed
|
||||
|
||||
|
||||
packet.writeD(-1);
|
||||
packet.writeD(0);
|
||||
final Set<AbnormalVisualEffect> aves = _summon.getEffectList().getCurrentAbnormalVisualEffects();
|
||||
@ -190,14 +190,17 @@ public class PetInfo implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeH(ave.getClientId()); // Confirmed
|
||||
}
|
||||
packet.writeH(0);//visibility
|
||||
packet.writeH(0); // visibility
|
||||
packet.writeC(_statusMask);
|
||||
if (_summon.isPet()) {
|
||||
if (_summon.isPet())
|
||||
{
|
||||
final PetInstance pet = (PetInstance) _summon;
|
||||
packet.writeD(pet.getPetData().getType());
|
||||
packet.writeD(pet.getEvolveLevel());
|
||||
packet.writeD(pet.getEvolveLevel() == 0 ? -1 : pet.getId());
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0);
|
||||
packet.writeD(EvolveLevel.None.ordinal());
|
||||
packet.writeD(0);
|
||||
|
Loading…
Reference in New Issue
Block a user