Minor code cleanup.

This commit is contained in:
MobiusDevelopment
2021-06-12 21:21:17 +00:00
parent dd5bb3f959
commit dcc2fd58f1
51 changed files with 238 additions and 150 deletions

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -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; package org.l2jmobius.gameserver.model.holders;
/** /**
* Written by Berezkin Nikolay, on 04.05.2021 * Written by Berezkin Nikolay, on 04.05.2021
*/ */
public class PlayerCollectionData { public class PlayerCollectionData
public int getCollectionId() { {
return collectionId; 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 getItemId() { public int getCollectionId()
return itemId; {
return _collectionId;
} }
public int getIndex() { public int getItemId()
return index; {
return _itemId;
} }
private final int collectionId, itemId, index; public int getIndex()
{
public PlayerCollectionData(int collectionId, int itemId, int index) { return _index;
this.collectionId = collectionId;
this.itemId = itemId;
this.index = index;
} }
} }

View File

@@ -1869,7 +1869,7 @@ public class Formulas
buffs.addAll(target.getEffectList().getDances()); 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); final BuffInfo info = buffs.get(i);
if (!info.getSkill().canBeStolen()) if (!info.getSkill().canBeStolen())

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -168,7 +168,6 @@ public class Q10985_CleaningUpTheGround extends Quest
{ {
if (qs.isCond(1)) if (qs.isCond(1))
{ {
htmltext = "30600-02.htm"; htmltext = "30600-02.htm";
} }
break; break;

View File

@@ -116,7 +116,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
packet.writeD(0); // petName id packet.writeD(0); // petName id
packet.writeD(2); packet.writeD(2);
packet.writeD(3); 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 packet.writeQ(item.getPetData().getExp()); // pet exp
} }
if (containsMask(mask, ItemListType.BLESSED)) if (containsMask(mask, ItemListType.BLESSED))
@@ -172,7 +172,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
packet.writeD(0); packet.writeD(0);
packet.writeD(2); packet.writeD(2);
packet.writeD(3); 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 packet.writeQ(item.getPetData().getExp()); // pet exp
} }
if (containsMask(mask, ItemListType.BLESSED)) if (containsMask(mask, ItemListType.BLESSED))

View File

@@ -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; package org.l2jmobius.gameserver.network.serverpackets.pet;
import org.l2jmobius.commons.network.PacketWriter; import org.l2jmobius.commons.network.PacketWriter;
import org.l2jmobius.gameserver.model.actor.Summon; import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.skills.Skill; import org.l2jmobius.gameserver.model.skills.Skill;
@@ -10,21 +25,25 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
/** /**
* Written by Berezkin Nikolay, on 26.04.2021 * Written by Berezkin Nikolay, on 26.04.2021
*/ */
public class ExPetSkillList implements IClientOutgoingPacket{ public class ExPetSkillList implements IClientOutgoingPacket
{
private final boolean _onEnter;
private final Summon _pet;
private final boolean onEnter; public ExPetSkillList(boolean onEnter, Summon pet)
private final Summon pet; {
public ExPetSkillList(boolean onEnter, Summon pet) { _onEnter = onEnter;
this.onEnter = onEnter; _pet = pet;
this.pet = pet;
} }
@Override @Override
public boolean write(PacketWriter packet) { public boolean write(PacketWriter packet)
{
OutgoingPackets.EX_PET_SKILL_LIST.writeId(packet); OutgoingPackets.EX_PET_SKILL_LIST.writeId(packet);
packet.writeC(onEnter ? 1 : 0); packet.writeC(_onEnter ? 1 : 0);
packet.writeD(pet.getAllSkills().size()); packet.writeD(_pet.getAllSkills().size());
for (Skill sk : pet.getAllSkills()) { for (Skill sk : _pet.getAllSkills())
{
packet.writeD(sk.getDisplayId()); packet.writeD(sk.getDisplayId());
packet.writeD(sk.getDisplayLevel()); packet.writeD(sk.getDisplayLevel());
packet.writeD(sk.getReuseDelayGroup()); packet.writeD(sk.getReuseDelayGroup());

View File

@@ -190,14 +190,17 @@ public class PetInfo implements IClientOutgoingPacket
{ {
packet.writeH(ave.getClientId()); // Confirmed packet.writeH(ave.getClientId()); // Confirmed
} }
packet.writeH(0);//visibility packet.writeH(0); // visibility
packet.writeC(_statusMask); packet.writeC(_statusMask);
if (_summon.isPet()) { if (_summon.isPet())
{
final PetInstance pet = (PetInstance) _summon; final PetInstance pet = (PetInstance) _summon;
packet.writeD(pet.getPetData().getType()); packet.writeD(pet.getPetData().getType());
packet.writeD(pet.getEvolveLevel()); packet.writeD(pet.getEvolveLevel());
packet.writeD(pet.getEvolveLevel() == 0 ? -1 : pet.getId()); packet.writeD(pet.getEvolveLevel() == 0 ? -1 : pet.getId());
} else { }
else
{
packet.writeD(0); packet.writeD(0);
packet.writeD(EvolveLevel.None.ordinal()); packet.writeD(EvolveLevel.None.ordinal());
packet.writeD(0); packet.writeD(0);

View File

@@ -87,7 +87,7 @@ public class TeleportToSummon extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = summon.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -76,7 +76,7 @@ public class TeleportToTarget extends AbstractEffect
final int y = (int) (py + (25 * Math.sin(ph))); final int y = (int) (py + (25 * Math.sin(ph)));
final int z = effected.getZ(); 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.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY)); effector.broadcastPacket(new FlyToLocation(effector, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));

View File

@@ -168,7 +168,6 @@ public class Q10985_CleaningUpTheGround extends Quest
{ {
if (qs.isCond(1)) if (qs.isCond(1))
{ {
htmltext = "30600-02.htm"; htmltext = "30600-02.htm";
} }
break; break;

View File

@@ -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; package org.l2jmobius.gameserver.model.holders;
/** /**
* Written by Berezkin Nikolay, on 04.05.2021 * Written by Berezkin Nikolay, on 04.05.2021
*/ */
public class PlayerCollectionData { public class PlayerCollectionData
public int getCollectionId() { {
return collectionId; 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 getItemId() { public int getCollectionId()
return itemId; {
return _collectionId;
} }
public int getIndex() { public int getItemId()
return index; {
return _itemId;
} }
private final int collectionId, itemId, index; public int getIndex()
{
public PlayerCollectionData(int collectionId, int itemId, int index) { return _index;
this.collectionId = collectionId;
this.itemId = itemId;
this.index = index;
} }
} }

View File

@@ -116,7 +116,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
packet.writeD(0); // petName id packet.writeD(0); // petName id
packet.writeD(2); packet.writeD(2);
packet.writeD(3); 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 packet.writeQ(item.getPetData().getExp()); // pet exp
} }
if (containsMask(mask, ItemListType.BLESSED)) if (containsMask(mask, ItemListType.BLESSED))
@@ -172,7 +172,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
packet.writeD(0); packet.writeD(0);
packet.writeD(2); packet.writeD(2);
packet.writeD(3); 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 packet.writeQ(item.getPetData().getExp()); // pet exp
} }
if (containsMask(mask, ItemListType.BLESSED)) if (containsMask(mask, ItemListType.BLESSED))

View File

@@ -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; package org.l2jmobius.gameserver.network.serverpackets.pet;
import org.l2jmobius.commons.network.PacketWriter; import org.l2jmobius.commons.network.PacketWriter;
import org.l2jmobius.gameserver.model.actor.Summon; import org.l2jmobius.gameserver.model.actor.Summon;
import org.l2jmobius.gameserver.model.skills.Skill; import org.l2jmobius.gameserver.model.skills.Skill;
@@ -10,21 +25,25 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
/** /**
* Written by Berezkin Nikolay, on 26.04.2021 * Written by Berezkin Nikolay, on 26.04.2021
*/ */
public class ExPetSkillList implements IClientOutgoingPacket{ public class ExPetSkillList implements IClientOutgoingPacket
{
private final boolean _onEnter;
private final Summon _pet;
private final boolean onEnter; public ExPetSkillList(boolean onEnter, Summon pet)
private final Summon pet; {
public ExPetSkillList(boolean onEnter, Summon pet) { _onEnter = onEnter;
this.onEnter = onEnter; _pet = pet;
this.pet = pet;
} }
@Override @Override
public boolean write(PacketWriter packet) { public boolean write(PacketWriter packet)
{
OutgoingPackets.EX_PET_SKILL_LIST.writeId(packet); OutgoingPackets.EX_PET_SKILL_LIST.writeId(packet);
packet.writeC(onEnter ? 1 : 0); packet.writeC(_onEnter ? 1 : 0);
packet.writeD(pet.getAllSkills().size()); packet.writeD(_pet.getAllSkills().size());
for (Skill sk : pet.getAllSkills()) { for (Skill sk : _pet.getAllSkills())
{
packet.writeD(sk.getDisplayId()); packet.writeD(sk.getDisplayId());
packet.writeD(sk.getDisplayLevel()); packet.writeD(sk.getDisplayLevel());
packet.writeD(sk.getReuseDelayGroup()); packet.writeD(sk.getReuseDelayGroup());

View File

@@ -190,14 +190,17 @@ public class PetInfo implements IClientOutgoingPacket
{ {
packet.writeH(ave.getClientId()); // Confirmed packet.writeH(ave.getClientId()); // Confirmed
} }
packet.writeH(0);//visibility packet.writeH(0); // visibility
packet.writeC(_statusMask); packet.writeC(_statusMask);
if (_summon.isPet()) { if (_summon.isPet())
{
final PetInstance pet = (PetInstance) _summon; final PetInstance pet = (PetInstance) _summon;
packet.writeD(pet.getPetData().getType()); packet.writeD(pet.getPetData().getType());
packet.writeD(pet.getEvolveLevel()); packet.writeD(pet.getEvolveLevel());
packet.writeD(pet.getEvolveLevel() == 0 ? -1 : pet.getId()); packet.writeD(pet.getEvolveLevel() == 0 ? -1 : pet.getId());
} else { }
else
{
packet.writeD(0); packet.writeD(0);
packet.writeD(EvolveLevel.None.ordinal()); packet.writeD(EvolveLevel.None.ordinal());
packet.writeD(0); packet.writeD(0);