Sync with L2JServer Jan 24th 2015.
This commit is contained in:
@@ -23,9 +23,9 @@ import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.datatables.DoorTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||
import com.l2jserver.gameserver.datatables.NpcData;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.instancemanager.CastleManager;
|
||||
import com.l2jserver.gameserver.instancemanager.InstanceManager;
|
||||
@@ -607,7 +607,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
|
||||
|
||||
case TYPE_DOOR_NAME:
|
||||
{
|
||||
final L2DoorInstance door = DoorTable.getInstance().getDoor(param.getIntValue());
|
||||
final L2DoorInstance door = DoorData.getInstance().getDoor(param.getIntValue());
|
||||
params[i] = door == null ? "Unknown" : door.getName();
|
||||
break;
|
||||
}
|
||||
|
@@ -19,9 +19,7 @@
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2TrapInstance;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
|
||||
public abstract class AbstractNpcInfo extends L2GameServerPacket
|
||||
{
|
||||
@@ -142,98 +140,4 @@ public abstract class AbstractNpcInfo extends L2GameServerPacket
|
||||
writeD(0x00);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Packet for summons.
|
||||
*/
|
||||
public static class SummonInfo extends AbstractNpcInfo
|
||||
{
|
||||
private final L2Summon _summon;
|
||||
private final int _form;
|
||||
private final int _val;
|
||||
|
||||
public SummonInfo(L2Summon cha, L2Character attacker, int val)
|
||||
{
|
||||
super(cha);
|
||||
_summon = cha;
|
||||
_val = val;
|
||||
_form = cha.getFormId();
|
||||
|
||||
_isAttackable = cha.isAutoAttackable(attacker);
|
||||
_rhand = cha.getWeapon();
|
||||
_lhand = 0;
|
||||
_chest = cha.getArmor();
|
||||
_enchantEffect = cha.getTemplate().getWeaponEnchant();
|
||||
_name = cha.getName();
|
||||
_title = (cha.getOwner() != null) && cha.getOwner().isOnline() ? cha.getOwner().getName() : "";
|
||||
_idTemplate = cha.getTemplate().getDisplayId();
|
||||
_collisionHeight = cha.getTemplate().getfCollisionHeight();
|
||||
_collisionRadius = cha.getTemplate().getfCollisionRadius();
|
||||
setInvisible(cha.isInvisible());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0x0c);
|
||||
writeD(_summon.getObjectId());
|
||||
writeD(_idTemplate + 1000000); // npctype id
|
||||
writeD(_isAttackable ? 1 : 0);
|
||||
writeD(_x);
|
||||
writeD(_y);
|
||||
writeD(_z);
|
||||
writeD(_heading);
|
||||
writeD(0x00);
|
||||
writeD(_mAtkSpd);
|
||||
writeD(_pAtkSpd);
|
||||
writeD(_runSpd);
|
||||
writeD(_walkSpd);
|
||||
writeD(_swimRunSpd);
|
||||
writeD(_swimWalkSpd);
|
||||
writeD(_flyRunSpd);
|
||||
writeD(_flyWalkSpd);
|
||||
writeD(_flyRunSpd);
|
||||
writeD(_flyWalkSpd);
|
||||
writeF(_moveMultiplier);
|
||||
writeF(_summon.getAttackSpeedMultiplier());
|
||||
writeF(_collisionRadius);
|
||||
writeF(_collisionHeight);
|
||||
writeD(_rhand); // right hand weapon
|
||||
writeD(_chest);
|
||||
writeD(_lhand); // left hand weapon
|
||||
writeC(0x01); // name above char 1=true ... ??
|
||||
writeC(0x01); // always running 1=running 0=walking
|
||||
writeC(_summon.isInCombat() ? 1 : 0);
|
||||
writeC(_summon.isAlikeDead() ? 1 : 0);
|
||||
writeC(_val); // invisible ?? 0=false 1=true 2=summoned (only works if model has a summon animation)
|
||||
writeD(-1); // High Five NPCString ID
|
||||
writeS(_name);
|
||||
writeD(-1); // High Five NPCString ID
|
||||
writeS(_title);
|
||||
writeD(0x01);// Title color 0=client default
|
||||
|
||||
writeD(_summon.getPvpFlag());
|
||||
writeD(_summon.getKarma());
|
||||
|
||||
writeD(0); // was AVE and was adding stealth
|
||||
|
||||
writeD(0x00); // clan id
|
||||
writeD(0x00); // crest id
|
||||
writeD(0x00); // C2
|
||||
writeD(0x00); // C2
|
||||
writeC(_summon.isInsideZone(ZoneId.WATER) ? 1 : _summon.isFlying() ? 2 : 0); // C2
|
||||
|
||||
writeC(_summon.getTeam().getId());
|
||||
|
||||
writeF(_collisionRadius);
|
||||
writeF(_collisionHeight);
|
||||
writeD(_enchantEffect); // C4
|
||||
writeD(0x00); // C6
|
||||
writeD(0x00);
|
||||
writeD(_form); // CT1.5 Pet form and skills
|
||||
writeC(0x01);
|
||||
writeC(0x01);
|
||||
// writeD(_summon.getAbnormalVisualEffectSpecial());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -19,22 +19,26 @@
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.datatables.SkillTreesData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jserver.gameserver.model.L2SkillLearn;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.ItemHolder;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
*/
|
||||
public class AcquireSkillList extends L2GameServerPacket
|
||||
{
|
||||
final L2PcInstance _activeChar;
|
||||
final List<L2SkillLearn> _learnable;
|
||||
|
||||
public AcquireSkillList(L2PcInstance activeChar)
|
||||
{
|
||||
_activeChar = activeChar;
|
||||
_learnable = SkillTreesData.getInstance().getAvailableSkills(activeChar, activeChar.getClassId(), false, false);
|
||||
_learnable.addAll(SkillTreesData.getInstance().getNextAvailableSkills(activeChar, activeChar.getClassId(), false, false));
|
||||
}
|
||||
@@ -58,11 +62,13 @@ public class AcquireSkillList extends L2GameServerPacket
|
||||
writeQ(item.getCount());
|
||||
}
|
||||
|
||||
writeC(skill.getRemoveSkills().size());
|
||||
for (int skillId : skill.getRemoveSkills())
|
||||
final List<Skill> skillRem = skill.getRemoveSkills().stream().map(_activeChar::getKnownSkill).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
|
||||
writeC(skillRem.size());
|
||||
for (Skill skillRemove : skillRem)
|
||||
{
|
||||
writeD(skillId);
|
||||
writeH(SkillData.getInstance().getMaxLevel(skillId));
|
||||
writeD(skillRemove.getId());
|
||||
writeH(skillRemove.getLevel());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -97,8 +97,7 @@ public class AgitDecoInfo extends L2GameServerPacket
|
||||
{
|
||||
writeC(0);
|
||||
}
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLvl() < 25)) || ((_clanHall.getGrade() == 1) && (function.getLvl() < 30)) || ((_clanHall.getGrade() == 2) && (function
|
||||
.getLvl() < 40)) || ((_clanHall.getGrade() == 3) && (function.getLvl() < 50)))
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLvl() < 25)) || ((_clanHall.getGrade() == 1) && (function.getLvl() < 30)) || ((_clanHall.getGrade() == 2) && (function.getLvl() < 40)) || ((_clanHall.getGrade() == 3) && (function.getLvl() < 50)))
|
||||
{
|
||||
writeC(1);
|
||||
}
|
||||
@@ -156,8 +155,7 @@ public class AgitDecoInfo extends L2GameServerPacket
|
||||
writeC(0);
|
||||
writeC(0);
|
||||
}
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLvl() < 2)) || ((_clanHall.getGrade() == 1) && (function.getLvl() < 4)) || ((_clanHall.getGrade() == 2) && (function
|
||||
.getLvl() < 5)) || ((_clanHall.getGrade() == 3) && (function.getLvl() < 8)))
|
||||
else if (((_clanHall.getGrade() == 0) && (function.getLvl() < 2)) || ((_clanHall.getGrade() == 1) && (function.getLvl() < 4)) || ((_clanHall.getGrade() == 2) && (function.getLvl() < 5)) || ((_clanHall.getGrade() == 3) && (function.getLvl() < 8)))
|
||||
{
|
||||
writeC(1);
|
||||
writeC(1);
|
||||
|
@@ -20,7 +20,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.model.ClanInfo;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.network.clientpackets.RequestAllyInfo;
|
||||
|
@@ -19,7 +19,7 @@
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.datatables.CrestTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.CrestTable;
|
||||
import com.l2jserver.gameserver.model.L2Crest;
|
||||
|
||||
public class AllyCrest extends L2GameServerPacket
|
||||
|
@@ -20,7 +20,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.CharNameTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
|
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
*
|
||||
* L2J Server 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/>.
|
||||
*/
|
||||
@@ -29,8 +29,8 @@ import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.datatables.ExperienceTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.ExperienceData;
|
||||
import com.l2jserver.gameserver.model.CharSelectInfoPackage;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.entity.Hero;
|
||||
@@ -131,7 +131,7 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
|
||||
writeQ(charInfoPackage.getSp());
|
||||
writeQ(charInfoPackage.getExp());
|
||||
writeF((float) (charInfoPackage.getExp() - ExperienceTable.getInstance().getExpForLevel(charInfoPackage.getLevel())) / (ExperienceTable.getInstance().getExpForLevel(charInfoPackage.getLevel() + 1) - ExperienceTable.getInstance().getExpForLevel(charInfoPackage.getLevel()))); // High Five
|
||||
writeF((float) (charInfoPackage.getExp() - ExperienceData.getInstance().getExpForLevel(charInfoPackage.getLevel())) / (ExperienceData.getInstance().getExpForLevel(charInfoPackage.getLevel() + 1) - ExperienceData.getInstance().getExpForLevel(charInfoPackage.getLevel()))); // High Five
|
||||
writeD(charInfoPackage.getLevel());
|
||||
|
||||
writeD(charInfoPackage.getKarma());
|
||||
|
@@ -50,7 +50,7 @@ public class EnchantResult extends L2GameServerPacket
|
||||
|
||||
public EnchantResult(int result, L2ItemInstance item)
|
||||
{
|
||||
this(result, 0, 0, 0, item.getEnchantOptions());
|
||||
this(result, 0, 0, item.getEnchantLevel(), item.getEnchantOptions());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -1,95 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.model.items.L2Item;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
|
||||
public final class EquipUpdate extends L2GameServerPacket
|
||||
{
|
||||
private final L2ItemInstance _item;
|
||||
private final int _change;
|
||||
|
||||
public EquipUpdate(L2ItemInstance item, int change)
|
||||
{
|
||||
_item = item;
|
||||
_change = change;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
int bodypart = 0;
|
||||
writeC(0x4b);
|
||||
writeD(_change);
|
||||
writeD(_item.getObjectId());
|
||||
switch (_item.getItem().getBodyPart())
|
||||
{
|
||||
case L2Item.SLOT_L_EAR:
|
||||
bodypart = 0x01;
|
||||
break;
|
||||
case L2Item.SLOT_R_EAR:
|
||||
bodypart = 0x02;
|
||||
break;
|
||||
case L2Item.SLOT_NECK:
|
||||
bodypart = 0x03;
|
||||
break;
|
||||
case L2Item.SLOT_R_FINGER:
|
||||
bodypart = 0x04;
|
||||
break;
|
||||
case L2Item.SLOT_L_FINGER:
|
||||
bodypart = 0x05;
|
||||
break;
|
||||
case L2Item.SLOT_HEAD:
|
||||
bodypart = 0x06;
|
||||
break;
|
||||
case L2Item.SLOT_R_HAND:
|
||||
bodypart = 0x07;
|
||||
break;
|
||||
case L2Item.SLOT_L_HAND:
|
||||
bodypart = 0x08;
|
||||
break;
|
||||
case L2Item.SLOT_GLOVES:
|
||||
bodypart = 0x09;
|
||||
break;
|
||||
case L2Item.SLOT_CHEST:
|
||||
bodypart = 0x0a;
|
||||
break;
|
||||
case L2Item.SLOT_LEGS:
|
||||
bodypart = 0x0b;
|
||||
break;
|
||||
case L2Item.SLOT_FEET:
|
||||
bodypart = 0x0c;
|
||||
break;
|
||||
case L2Item.SLOT_BACK:
|
||||
bodypart = 0x0d;
|
||||
break;
|
||||
case L2Item.SLOT_LR_HAND:
|
||||
bodypart = 0x0e;
|
||||
break;
|
||||
case L2Item.SLOT_HAIR:
|
||||
bodypart = 0x0f;
|
||||
break;
|
||||
case L2Item.SLOT_BELT:
|
||||
bodypart = 0x10;
|
||||
break;
|
||||
}
|
||||
writeD(bodypart);
|
||||
}
|
||||
}
|
@@ -22,8 +22,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.datatables.AbilityPointsData;
|
||||
import com.l2jserver.gameserver.datatables.SkillTreesData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.AbilityPointsData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jserver.gameserver.model.L2SkillLearn;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
|
@@ -18,13 +18,14 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.model.L2SkillLearn;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.ItemHolder;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
@@ -35,8 +36,8 @@ public class ExAcquireSkillInfo extends L2GameServerPacket
|
||||
private final int _level;
|
||||
private final int _spCost;
|
||||
private final int _minLevel;
|
||||
private final List<ItemHolder> _itemReq = new ArrayList<>();
|
||||
private final List<Integer> _skillRem = new ArrayList<>();
|
||||
private final List<ItemHolder> _itemReq;
|
||||
private final List<Skill> _skillRem;
|
||||
|
||||
/**
|
||||
* Special constructor for Alternate Skill Learning system.<br>
|
||||
@@ -51,8 +52,8 @@ public class ExAcquireSkillInfo extends L2GameServerPacket
|
||||
_level = skillLearn.getSkillLevel();
|
||||
_spCost = sp;
|
||||
_minLevel = skillLearn.getGetLevel();
|
||||
_itemReq.addAll(skillLearn.getRequiredItems());
|
||||
_skillRem.addAll(skillLearn.getRemoveSkills());
|
||||
_itemReq = skillLearn.getRequiredItems();
|
||||
_skillRem = skillLearn.getRemoveSkills().stream().map(player::getKnownSkill).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -65,7 +66,7 @@ public class ExAcquireSkillInfo extends L2GameServerPacket
|
||||
writeD(_level);
|
||||
writeQ(_spCost);
|
||||
writeH(_minLevel);
|
||||
writeH(0x00); // TODO: Find me !
|
||||
writeH(0x00); // Dual Class Level Required
|
||||
writeD(_itemReq.size());
|
||||
for (ItemHolder holder : _itemReq)
|
||||
{
|
||||
@@ -74,10 +75,10 @@ public class ExAcquireSkillInfo extends L2GameServerPacket
|
||||
}
|
||||
|
||||
writeD(_skillRem.size());
|
||||
for (int skillId : _skillRem)
|
||||
for (Skill skill : _skillRem)
|
||||
{
|
||||
writeD(skillId);
|
||||
writeD(SkillData.getInstance().getMaxLevel(skillId));
|
||||
writeD(skill.getId());
|
||||
writeD(skill.getLevel());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.SkillTreesData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
|
||||
|
@@ -23,7 +23,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.BeautyShopData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.BeautyShopData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.beautyshop.BeautyData;
|
||||
import com.l2jserver.gameserver.model.beautyshop.BeautyItem;
|
||||
|
@@ -20,7 +20,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.EnchantSkillGroupsData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.EnchantSkillGroupsData;
|
||||
import com.l2jserver.gameserver.model.L2EnchantSkillGroup.EnchantSkillHolder;
|
||||
import com.l2jserver.gameserver.model.L2EnchantSkillLearn;
|
||||
|
||||
@@ -98,4 +98,4 @@ public final class ExEnchantSkillInfo extends L2GameServerPacket
|
||||
writeD(level);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.datatables.EnchantSkillGroupsData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.EnchantSkillGroupsData;
|
||||
import com.l2jserver.gameserver.model.L2EnchantSkillGroup.EnchantSkillHolder;
|
||||
import com.l2jserver.gameserver.model.L2EnchantSkillLearn;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
@@ -0,0 +1,391 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jserver.gameserver.enums.NpcInfoType;
|
||||
import com.l2jserver.gameserver.enums.Team;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
*/
|
||||
public class ExPetInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
{
|
||||
private final L2Summon _summon;
|
||||
private final L2PcInstance _attacker;
|
||||
private final int _val;
|
||||
private final byte[] _masks = new byte[]
|
||||
{
|
||||
(byte) 0x00,
|
||||
(byte) 0x0C,
|
||||
(byte) 0x0C,
|
||||
(byte) 0x00,
|
||||
(byte) 0x00
|
||||
};
|
||||
|
||||
private int _initSize = 0;
|
||||
private int _blockSize = 0;
|
||||
|
||||
private int _clanCrest = 0;
|
||||
private int _clanLargeCrest = 0;
|
||||
private int _allyCrest = 0;
|
||||
private int _allyId = 0;
|
||||
private int _clanId = 0;
|
||||
private int _statusMask = 0;
|
||||
private final String _title;
|
||||
private final Set<AbnormalVisualEffect> _abnormalVisualEffects;
|
||||
|
||||
public ExPetInfo(L2Summon summon, L2PcInstance attacker, int val)
|
||||
{
|
||||
_summon = summon;
|
||||
_attacker = attacker;
|
||||
_title = (summon.getOwner() != null) && summon.getOwner().isOnline() ? summon.getOwner().getName() : "";
|
||||
_val = val;
|
||||
_abnormalVisualEffects = summon.getCurrentAbnormalVisualEffects();
|
||||
|
||||
if (summon.getTemplate().getDisplayId() != summon.getTemplate().getId())
|
||||
{
|
||||
_masks[2] |= 0x10;
|
||||
addComponentType(NpcInfoType.NAME);
|
||||
}
|
||||
|
||||
addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.UNKNOWN1, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
|
||||
|
||||
if (summon.getHeading() > 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.HEADING);
|
||||
}
|
||||
|
||||
if ((summon.getStat().getPAtkSpd() > 0) || (summon.getStat().getMAtkSpd() > 0))
|
||||
{
|
||||
addComponentType(NpcInfoType.ATK_CAST_SPEED);
|
||||
}
|
||||
|
||||
if (summon.getRunSpeed() > 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.SPEED_MULTIPLIER);
|
||||
}
|
||||
|
||||
if ((summon.getWeapon() > 0) || (summon.getArmor() > 0))
|
||||
{
|
||||
addComponentType(NpcInfoType.EQUIPPED);
|
||||
}
|
||||
|
||||
if (summon.getTeam() != Team.NONE)
|
||||
{
|
||||
addComponentType(NpcInfoType.TEAM);
|
||||
}
|
||||
|
||||
if (summon.isInsideZone(ZoneId.WATER) || summon.isFlying())
|
||||
{
|
||||
addComponentType(NpcInfoType.SWIM_OR_FLY);
|
||||
}
|
||||
|
||||
if (summon.isFlying())
|
||||
{
|
||||
addComponentType(NpcInfoType.FLYING);
|
||||
}
|
||||
|
||||
if (summon.getMaxHp() > 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.MAX_HP);
|
||||
}
|
||||
|
||||
if (summon.getMaxMp() > 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.MAX_MP);
|
||||
}
|
||||
|
||||
if (summon.getCurrentHp() <= summon.getMaxHp())
|
||||
{
|
||||
addComponentType(NpcInfoType.CURRENT_HP);
|
||||
}
|
||||
|
||||
if (summon.getCurrentMp() <= summon.getMaxMp())
|
||||
{
|
||||
addComponentType(NpcInfoType.CURRENT_MP);
|
||||
}
|
||||
|
||||
if (!_abnormalVisualEffects.isEmpty())
|
||||
{
|
||||
addComponentType(NpcInfoType.ABNORMALS);
|
||||
}
|
||||
|
||||
if (summon.getTemplate().getWeaponEnchant() > 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.ENCHANT);
|
||||
}
|
||||
|
||||
if ((summon.getTransformation() != null) && (summon.getTransformation().getId() > 0))
|
||||
{
|
||||
addComponentType(NpcInfoType.TRANSFORMATION);
|
||||
}
|
||||
|
||||
if (summon.getOwner().getClan() != null)
|
||||
{
|
||||
_clanId = summon.getOwner().getClanId();
|
||||
_clanCrest = summon.getOwner().getClanCrestId();
|
||||
_clanLargeCrest = summon.getOwner().getClanCrestLargeId();
|
||||
_allyCrest = summon.getOwner().getAllyId();
|
||||
_allyId = summon.getOwner().getAllyCrestId();
|
||||
|
||||
addComponentType(NpcInfoType.CLAN);
|
||||
}
|
||||
|
||||
addComponentType(NpcInfoType.UNKNOWN8);
|
||||
|
||||
// TODO: Confirm me
|
||||
if (summon.isInCombat())
|
||||
{
|
||||
_statusMask |= 0x01;
|
||||
}
|
||||
if (summon.isDead())
|
||||
{
|
||||
_statusMask |= 0x02;
|
||||
}
|
||||
if (summon.isTargetable())
|
||||
{
|
||||
_statusMask |= 0x04;
|
||||
}
|
||||
|
||||
_statusMask |= 0x08;
|
||||
|
||||
if (_statusMask != 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.VISUAL_STATE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected byte[] getMasks()
|
||||
{
|
||||
return _masks;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewMaskAdded(NpcInfoType component)
|
||||
{
|
||||
calcBlockSize(_summon, component);
|
||||
}
|
||||
|
||||
private void calcBlockSize(L2Summon summon, NpcInfoType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ATTACKABLE:
|
||||
case UNKNOWN1:
|
||||
{
|
||||
_initSize += type.getBlockLength();
|
||||
break;
|
||||
}
|
||||
case TITLE:
|
||||
{
|
||||
_initSize += type.getBlockLength() + (_title.length() * 2);
|
||||
break;
|
||||
}
|
||||
case NAME:
|
||||
{
|
||||
_blockSize += type.getBlockLength() + (summon.getName().length() * 2);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
_blockSize += type.getBlockLength();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x15E);
|
||||
writeD(_summon.getObjectId());
|
||||
writeC(_val); // // 0=teleported 1=default 2=summoned
|
||||
writeH(37); // mask_bits_37
|
||||
writeB(_masks);
|
||||
|
||||
// Block 1
|
||||
writeC(_initSize);
|
||||
|
||||
if (containsMask(NpcInfoType.ATTACKABLE))
|
||||
{
|
||||
writeC(_summon.isAutoAttackable(_attacker) ? 0x01 : 0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN1))
|
||||
{
|
||||
writeD(0x00); // unknown
|
||||
}
|
||||
if (containsMask(NpcInfoType.TITLE))
|
||||
{
|
||||
writeS(_title);
|
||||
}
|
||||
|
||||
// Block 2
|
||||
writeH(_blockSize);
|
||||
if (containsMask(NpcInfoType.ID))
|
||||
{
|
||||
writeD(_summon.getTemplate().getDisplayId() + 1000000);
|
||||
}
|
||||
if (containsMask(NpcInfoType.POSITION))
|
||||
{
|
||||
writeD(_summon.getX());
|
||||
writeD(_summon.getY());
|
||||
writeD(_summon.getZ());
|
||||
}
|
||||
if (containsMask(NpcInfoType.HEADING))
|
||||
{
|
||||
writeD(_summon.getHeading());
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN2))
|
||||
{
|
||||
writeD(0x00); // Unknown
|
||||
}
|
||||
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
|
||||
{
|
||||
writeD(_summon.getPAtkSpd());
|
||||
writeD(_summon.getMAtkSpd());
|
||||
}
|
||||
if (containsMask(NpcInfoType.SPEED_MULTIPLIER))
|
||||
{
|
||||
_buf.putFloat((float) _summon.getStat().getMovementSpeedMultiplier());
|
||||
_buf.putFloat(_summon.getStat().getAttackSpeedMultiplier());
|
||||
}
|
||||
if (containsMask(NpcInfoType.EQUIPPED))
|
||||
{
|
||||
writeD(_summon.getWeapon());
|
||||
writeD(_summon.getArmor()); // Armor id?
|
||||
writeD(0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.ALIVE))
|
||||
{
|
||||
writeC(_summon.isDead() ? 0x00 : 0x01);
|
||||
}
|
||||
if (containsMask(NpcInfoType.RUNNING))
|
||||
{
|
||||
writeC(_summon.isRunning() ? 0x01 : 0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.SWIM_OR_FLY))
|
||||
{
|
||||
writeC(_summon.isInsideZone(ZoneId.WATER) ? 0x01 : _summon.isFlying() ? 0x02 : 0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.TEAM))
|
||||
{
|
||||
writeC(_summon.getTeam().getId());
|
||||
}
|
||||
if (containsMask(NpcInfoType.ENCHANT))
|
||||
{
|
||||
writeD(_summon.getTemplate().getWeaponEnchant());
|
||||
}
|
||||
if (containsMask(NpcInfoType.FLYING))
|
||||
{
|
||||
writeD(_summon.isFlying() ? 0x01 : 00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.CLONE))
|
||||
{
|
||||
writeD(0x00); // Player ObjectId with Decoy
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN8))
|
||||
{
|
||||
// No visual effect
|
||||
writeD(0x00); // Unknown
|
||||
}
|
||||
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
|
||||
{
|
||||
writeD(0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.TRANSFORMATION))
|
||||
{
|
||||
writeD(0x00); // Transformation ID
|
||||
}
|
||||
if (containsMask(NpcInfoType.CURRENT_HP))
|
||||
{
|
||||
writeD((int) _summon.getCurrentHp());
|
||||
}
|
||||
if (containsMask(NpcInfoType.CURRENT_MP))
|
||||
{
|
||||
writeD((int) _summon.getCurrentMp());
|
||||
}
|
||||
if (containsMask(NpcInfoType.MAX_HP))
|
||||
{
|
||||
writeD(_summon.getMaxHp());
|
||||
}
|
||||
if (containsMask(NpcInfoType.MAX_MP))
|
||||
{
|
||||
writeD(_summon.getMaxMp());
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN11))
|
||||
{
|
||||
writeC(0x00); // 2 - do some animation on spawn
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN12))
|
||||
{
|
||||
writeD(0x00);
|
||||
writeD(0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.NAME))
|
||||
{
|
||||
writeS(_summon.getName());
|
||||
}
|
||||
if (containsMask(NpcInfoType.NAME_NPCSTRINGID))
|
||||
{
|
||||
writeD(-1); // NPCStringId for name
|
||||
}
|
||||
if (containsMask(NpcInfoType.TITLE_NPCSTRINGID))
|
||||
{
|
||||
writeD(-1); // NPCStringId for title
|
||||
}
|
||||
if (containsMask(NpcInfoType.PVP_FLAG))
|
||||
{
|
||||
writeC(_summon.getPvpFlag()); // PVP flag
|
||||
}
|
||||
if (containsMask(NpcInfoType.NAME_COLOR))
|
||||
{
|
||||
writeD(0x00); // Name color
|
||||
}
|
||||
if (containsMask(NpcInfoType.CLAN))
|
||||
{
|
||||
writeD(_clanId);
|
||||
writeD(_clanCrest);
|
||||
writeD(_clanLargeCrest);
|
||||
writeD(_allyId);
|
||||
writeD(_allyCrest);
|
||||
}
|
||||
|
||||
if (containsMask(NpcInfoType.VISUAL_STATE))
|
||||
{
|
||||
writeC(_statusMask);
|
||||
}
|
||||
|
||||
if (containsMask(NpcInfoType.ABNORMALS))
|
||||
{
|
||||
writeH(_abnormalVisualEffects.size());
|
||||
for (AbnormalVisualEffect abnormalVisualEffect : _abnormalVisualEffects)
|
||||
{
|
||||
writeH(abnormalVisualEffect.getClientId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.instancemanager.ClanEntryManager;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.clan.entry.PledgeRecruitInfo;
|
||||
|
@@ -20,7 +20,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.BeautyShopData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.BeautyShopData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.beautyshop.BeautyItem;
|
||||
|
||||
|
@@ -20,7 +20,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.instancemanager.ClanHallManager;
|
||||
import com.l2jserver.gameserver.model.entity.clanhall.AuctionableHall;
|
||||
|
||||
|
@@ -20,7 +20,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.instancemanager.CastleManager;
|
||||
import com.l2jserver.gameserver.model.entity.Castle;
|
||||
|
||||
|
@@ -100,4 +100,4 @@ public final class FlyToLocation extends L2GameServerPacket
|
||||
writeD(_flyDelay);
|
||||
writeD(_animationSpeed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ExperienceTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.ExperienceData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
public class GMViewCharacterInfo extends L2GameServerPacket
|
||||
@@ -57,7 +57,7 @@ public class GMViewCharacterInfo extends L2GameServerPacket
|
||||
writeD(_activeChar.getClassId().getId());
|
||||
writeD(_activeChar.getLevel());
|
||||
writeQ(_activeChar.getExp());
|
||||
writeF((float) (_activeChar.getExp() - ExperienceTable.getInstance().getExpForLevel(_activeChar.getLevel())) / (ExperienceTable.getInstance().getExpForLevel(_activeChar.getLevel() + 1) - ExperienceTable.getInstance().getExpForLevel(_activeChar.getLevel()))); // High Five exp %
|
||||
writeF((float) (_activeChar.getExp() - ExperienceData.getInstance().getExpForLevel(_activeChar.getLevel())) / (ExperienceData.getInstance().getExpForLevel(_activeChar.getLevel() + 1) - ExperienceData.getInstance().getExpForLevel(_activeChar.getLevel()))); // High Five exp %
|
||||
writeD(_activeChar.getSTR());
|
||||
writeD(_activeChar.getDEX());
|
||||
writeD(_activeChar.getCON());
|
||||
|
@@ -20,7 +20,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.HennaData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.HennaData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.L2Henna;
|
||||
|
||||
|
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
|
||||
public final class KeyPacket extends L2GameServerPacket
|
||||
{
|
||||
private final byte[] _key;
|
||||
@@ -39,8 +41,9 @@ public final class KeyPacket extends L2GameServerPacket
|
||||
writeC(_key[i]); // key
|
||||
}
|
||||
writeD(0x01);
|
||||
writeD(0x01); // server id
|
||||
writeD(Config.SERVER_ID); // server id
|
||||
writeC(0x01);
|
||||
writeD(0x00); // obfuscation key
|
||||
writeC((Config.SERVER_LIST_TYPE & 0x400) == 0x400 ? 0x01 : 0x00); // isClassic
|
||||
}
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import static com.l2jserver.gameserver.datatables.MultisellData.PAGE_SIZE;
|
||||
import static com.l2jserver.gameserver.data.xml.impl.MultisellData.PAGE_SIZE;
|
||||
|
||||
import com.l2jserver.gameserver.model.multisell.Entry;
|
||||
import com.l2jserver.gameserver.model.multisell.Ingredient;
|
||||
|
@@ -21,7 +21,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.enums.NpcInfoType;
|
||||
import com.l2jserver.gameserver.enums.Team;
|
||||
import com.l2jserver.gameserver.instancemanager.TownManager;
|
||||
|
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
*/
|
||||
public class NpcInfoAbnormalVisualEffect extends L2GameServerPacket
|
||||
{
|
||||
private final L2Npc _npc;
|
||||
|
||||
public NpcInfoAbnormalVisualEffect(L2Npc npc)
|
||||
{
|
||||
_npc = npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0x4B);
|
||||
|
||||
writeD(_npc.getObjectId());
|
||||
writeD(_npc.getTransformation() == null ? 0 : _npc.getTransformation().getId());
|
||||
|
||||
final Set<AbnormalVisualEffect> abnormalVisualEffects = _npc.getCurrentAbnormalVisualEffects();
|
||||
writeD(abnormalVisualEffects.size());
|
||||
for (AbnormalVisualEffect abnormalVisualEffect : abnormalVisualEffects)
|
||||
{
|
||||
writeH(abnormalVisualEffect.getClientId());
|
||||
}
|
||||
}
|
||||
}
|
@@ -19,6 +19,7 @@
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.model.L2Party;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
public final class PartySmallWindowAll extends L2GameServerPacket
|
||||
@@ -59,19 +60,32 @@ public final class PartySmallWindowAll extends L2GameServerPacket
|
||||
writeH(member.getClassId().getId());
|
||||
writeC(0x01); // Unk
|
||||
writeH(member.getRace().ordinal());
|
||||
writeD(member.hasSummon() ? 0x01 : 0x00); // Summon size, one only atm
|
||||
if (member.hasSummon())
|
||||
final L2Summon pet = member.getPet();
|
||||
writeD(member.getServitors().size() + (pet != null ? 1 : 0)); // Summon size, one only atm
|
||||
if (pet != null)
|
||||
{
|
||||
writeD(member.getSummon().getObjectId());
|
||||
writeD(member.getSummon().getId() + 1000000);
|
||||
writeC(member.getSummon().getSummonType());
|
||||
writeS(member.getSummon().getName());
|
||||
writeD((int) member.getSummon().getCurrentHp());
|
||||
writeD(member.getSummon().getMaxHp());
|
||||
writeD((int) member.getSummon().getCurrentMp());
|
||||
writeD(member.getSummon().getMaxMp());
|
||||
writeC(member.getSummon().getLevel());
|
||||
writeD(pet.getObjectId());
|
||||
writeD(pet.getId() + 1000000);
|
||||
writeC(pet.getSummonType());
|
||||
writeS(pet.getName());
|
||||
writeD((int) pet.getCurrentHp());
|
||||
writeD(pet.getMaxHp());
|
||||
writeD((int) pet.getCurrentMp());
|
||||
writeD(pet.getMaxMp());
|
||||
writeC(pet.getLevel());
|
||||
}
|
||||
member.getServitors().values().forEach(s ->
|
||||
{
|
||||
writeD(s.getObjectId());
|
||||
writeD(s.getId() + 1000000);
|
||||
writeC(s.getSummonType());
|
||||
writeS(s.getName());
|
||||
writeD((int) s.getCurrentHp());
|
||||
writeD(s.getMaxHp());
|
||||
writeD((int) s.getCurrentMp());
|
||||
writeD(s.getMaxMp());
|
||||
writeC(s.getLevel());
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2ServitorInstance;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
import com.l2jserver.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
|
||||
public class PetInfo extends L2GameServerPacket
|
||||
{
|
||||
@@ -38,6 +39,7 @@ public class PetInfo extends L2GameServerPacket
|
||||
private final int _flyWalkSpd;
|
||||
private final double _moveMultiplier;
|
||||
private int _maxFed, _curFed;
|
||||
private int _statusMask = 0;
|
||||
|
||||
public PetInfo(L2Summon summon, int val)
|
||||
{
|
||||
@@ -62,6 +64,19 @@ public class PetInfo extends L2GameServerPacket
|
||||
_curFed = sum.getLifeTimeRemaining();
|
||||
_maxFed = sum.getLifeTime();
|
||||
}
|
||||
|
||||
if (summon.isRunning())
|
||||
{
|
||||
_statusMask |= 0x04;
|
||||
}
|
||||
if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(summon))
|
||||
{
|
||||
_statusMask |= 0x08;
|
||||
}
|
||||
if (summon.isDead())
|
||||
{
|
||||
_statusMask |= 0x10;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -98,7 +113,7 @@ public class PetInfo extends L2GameServerPacket
|
||||
writeD(_summon.getArmor()); // body armor
|
||||
writeD(0x00); // left hand weapon
|
||||
|
||||
writeC(_summon.isShowSummonAnimation() ? 2 : _val); // 0=teleported 1=default 2=summoned
|
||||
writeC(_summon.isShowSummonAnimation() ? 0x02 : _val); // 0=teleported 1=default 2=summoned
|
||||
writeD(-1); // High Five NPCString ID
|
||||
if (_summon.isPet())
|
||||
{
|
||||
@@ -111,8 +126,8 @@ public class PetInfo extends L2GameServerPacket
|
||||
writeD(-1); // High Five NPCString ID
|
||||
writeS(_summon.getTitle()); // owner name
|
||||
|
||||
writeC(_summon.getPvpFlag()); // ?
|
||||
writeD(_summon.getKarma());
|
||||
writeC(_summon.getPvpFlag()); // confirmed
|
||||
writeD(_summon.getKarma()); // confirmed
|
||||
|
||||
writeD(_curFed); // how fed it is
|
||||
writeD(_maxFed); // max fed it can be
|
||||
@@ -160,8 +175,8 @@ public class PetInfo extends L2GameServerPacket
|
||||
writeD(0x00); // TODO: Find me
|
||||
writeD(_summon.getFormId()); // Transformation ID - Confirmed
|
||||
|
||||
writeC(0x00); // Used Summon Points
|
||||
writeC(0x00); // Maximum Summon Points
|
||||
writeC(_summon.getOwner().getSummonPoints()); // Used Summon Points
|
||||
writeC(_summon.getOwner().getMaxSummonPoints()); // Maximum Summon Points
|
||||
|
||||
final Set<AbnormalVisualEffect> aves = _summon.getCurrentAbnormalVisualEffects();
|
||||
writeH(aves.size()); // Confirmed
|
||||
@@ -170,6 +185,6 @@ public class PetInfo extends L2GameServerPacket
|
||||
writeH(ave.getClientId()); // Confirmed
|
||||
}
|
||||
|
||||
writeC(0x00); // TODO: Find me
|
||||
writeC(_statusMask);
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.datatables.CrestTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.CrestTable;
|
||||
import com.l2jserver.gameserver.model.L2Crest;
|
||||
|
||||
public final class PledgeCrest extends L2GameServerPacket
|
||||
|
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
|
||||
/**
|
||||
|
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.RecipeData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.RecipeData;
|
||||
import com.l2jserver.gameserver.model.L2RecipeList;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
|
@@ -22,6 +22,7 @@ import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2MerchantInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
@@ -57,9 +58,10 @@ public class SellList extends L2GameServerPacket
|
||||
{
|
||||
if (_lease == null)
|
||||
{
|
||||
final L2Summon pet = _activeChar.getPet();
|
||||
for (L2ItemInstance item : _activeChar.getInventory().getItems())
|
||||
{
|
||||
if (!item.isEquipped() && item.isSellable() && (!_activeChar.hasSummon() || (item.getObjectId() != _activeChar.getSummon().getControlObjectId()))) // Pet is summoned and not the item that summoned the pet
|
||||
if (!item.isEquipped() && item.isSellable() && ((pet == null) || (item.getObjectId() != pet.getControlObjectId()))) // Pet is summoned and not the item that summoned the pet
|
||||
{
|
||||
_selllist.add(item);
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.L2SiegeClan;
|
||||
import com.l2jserver.gameserver.model.entity.Castle;
|
||||
|
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.enums.SiegeClanType;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.L2SiegeClan;
|
||||
|
@@ -21,7 +21,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
import java.util.Calendar;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.datatables.ClanTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.instancemanager.CHSiegeManager;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.RecipeData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.RecipeData;
|
||||
import com.l2jserver.gameserver.model.L2RecipeList;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.L2Item;
|
||||
|
@@ -0,0 +1,390 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jserver.gameserver.enums.NpcInfoType;
|
||||
import com.l2jserver.gameserver.enums.Team;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
*/
|
||||
public class SummonInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
{
|
||||
private final L2Summon _summon;
|
||||
private final L2PcInstance _attacker;
|
||||
private final int _val;
|
||||
private final byte[] _masks = new byte[]
|
||||
{
|
||||
(byte) 0x00,
|
||||
(byte) 0x0C,
|
||||
(byte) 0x0C,
|
||||
(byte) 0x00,
|
||||
(byte) 0x00
|
||||
};
|
||||
|
||||
private int _initSize = 0;
|
||||
private int _blockSize = 0;
|
||||
|
||||
private int _clanCrest = 0;
|
||||
private int _clanLargeCrest = 0;
|
||||
private int _allyCrest = 0;
|
||||
private int _allyId = 0;
|
||||
private int _clanId = 0;
|
||||
private int _statusMask = 0;
|
||||
private final String _title;
|
||||
private final Set<AbnormalVisualEffect> _abnormalVisualEffects;
|
||||
|
||||
public SummonInfo(L2Summon summon, L2PcInstance attacker, int val)
|
||||
{
|
||||
_summon = summon;
|
||||
_attacker = attacker;
|
||||
_title = (summon.getOwner() != null) && summon.getOwner().isOnline() ? summon.getOwner().getName() : "";
|
||||
_val = val;
|
||||
_abnormalVisualEffects = summon.getCurrentAbnormalVisualEffects();
|
||||
|
||||
if (summon.getTemplate().getDisplayId() != summon.getTemplate().getId())
|
||||
{
|
||||
_masks[2] |= 0x10;
|
||||
addComponentType(NpcInfoType.NAME);
|
||||
}
|
||||
|
||||
addComponentType(NpcInfoType.ATTACKABLE, NpcInfoType.UNKNOWN1, NpcInfoType.TITLE, NpcInfoType.ID, NpcInfoType.POSITION, NpcInfoType.ALIVE, NpcInfoType.RUNNING);
|
||||
|
||||
if (summon.getHeading() > 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.HEADING);
|
||||
}
|
||||
|
||||
if ((summon.getStat().getPAtkSpd() > 0) || (summon.getStat().getMAtkSpd() > 0))
|
||||
{
|
||||
addComponentType(NpcInfoType.ATK_CAST_SPEED);
|
||||
}
|
||||
|
||||
if (summon.getRunSpeed() > 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.SPEED_MULTIPLIER);
|
||||
}
|
||||
|
||||
if ((summon.getWeapon() > 0) || (summon.getArmor() > 0))
|
||||
{
|
||||
addComponentType(NpcInfoType.EQUIPPED);
|
||||
}
|
||||
|
||||
if (summon.getTeam() != Team.NONE)
|
||||
{
|
||||
addComponentType(NpcInfoType.TEAM);
|
||||
}
|
||||
|
||||
if (summon.isInsideZone(ZoneId.WATER) || summon.isFlying())
|
||||
{
|
||||
addComponentType(NpcInfoType.SWIM_OR_FLY);
|
||||
}
|
||||
|
||||
if (summon.isFlying())
|
||||
{
|
||||
addComponentType(NpcInfoType.FLYING);
|
||||
}
|
||||
|
||||
if (summon.getMaxHp() > 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.MAX_HP);
|
||||
}
|
||||
|
||||
if (summon.getMaxMp() > 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.MAX_MP);
|
||||
}
|
||||
|
||||
if (summon.getCurrentHp() <= summon.getMaxHp())
|
||||
{
|
||||
addComponentType(NpcInfoType.CURRENT_HP);
|
||||
}
|
||||
|
||||
if (summon.getCurrentMp() <= summon.getMaxMp())
|
||||
{
|
||||
addComponentType(NpcInfoType.CURRENT_MP);
|
||||
}
|
||||
|
||||
if (!_abnormalVisualEffects.isEmpty())
|
||||
{
|
||||
addComponentType(NpcInfoType.ABNORMALS);
|
||||
}
|
||||
|
||||
if (summon.getTemplate().getWeaponEnchant() > 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.ENCHANT);
|
||||
}
|
||||
|
||||
if ((summon.getTransformation() != null) && (summon.getTransformation().getId() > 0))
|
||||
{
|
||||
addComponentType(NpcInfoType.TRANSFORMATION);
|
||||
}
|
||||
|
||||
if (summon.getOwner().getClan() != null)
|
||||
{
|
||||
_clanId = summon.getOwner().getClanId();
|
||||
_clanCrest = summon.getOwner().getClanCrestId();
|
||||
_clanLargeCrest = summon.getOwner().getClanCrestLargeId();
|
||||
_allyCrest = summon.getOwner().getAllyId();
|
||||
_allyId = summon.getOwner().getAllyCrestId();
|
||||
|
||||
addComponentType(NpcInfoType.CLAN);
|
||||
}
|
||||
|
||||
addComponentType(NpcInfoType.UNKNOWN8);
|
||||
|
||||
// TODO: Confirm me
|
||||
if (summon.isInCombat())
|
||||
{
|
||||
_statusMask |= 0x01;
|
||||
}
|
||||
if (summon.isDead())
|
||||
{
|
||||
_statusMask |= 0x02;
|
||||
}
|
||||
if (summon.isTargetable())
|
||||
{
|
||||
_statusMask |= 0x04;
|
||||
}
|
||||
|
||||
_statusMask |= 0x08;
|
||||
|
||||
if (_statusMask != 0)
|
||||
{
|
||||
addComponentType(NpcInfoType.VISUAL_STATE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected byte[] getMasks()
|
||||
{
|
||||
return _masks;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewMaskAdded(NpcInfoType component)
|
||||
{
|
||||
calcBlockSize(_summon, component);
|
||||
}
|
||||
|
||||
private void calcBlockSize(L2Summon summon, NpcInfoType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ATTACKABLE:
|
||||
case UNKNOWN1:
|
||||
{
|
||||
_initSize += type.getBlockLength();
|
||||
break;
|
||||
}
|
||||
case TITLE:
|
||||
{
|
||||
_initSize += type.getBlockLength() + (_title.length() * 2);
|
||||
break;
|
||||
}
|
||||
case NAME:
|
||||
{
|
||||
_blockSize += type.getBlockLength() + (summon.getName().length() * 2);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
_blockSize += type.getBlockLength();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0x8B);
|
||||
writeD(_summon.getObjectId());
|
||||
writeC(_val); // 0=teleported 1=default 2=summoned
|
||||
writeH(37); // mask_bits_37
|
||||
writeB(_masks);
|
||||
|
||||
// Block 1
|
||||
writeC(_initSize);
|
||||
|
||||
if (containsMask(NpcInfoType.ATTACKABLE))
|
||||
{
|
||||
writeC(_summon.isAutoAttackable(_attacker) ? 0x01 : 0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN1))
|
||||
{
|
||||
writeD(0x00); // unknown
|
||||
}
|
||||
if (containsMask(NpcInfoType.TITLE))
|
||||
{
|
||||
writeS(_title);
|
||||
}
|
||||
|
||||
// Block 2
|
||||
writeH(_blockSize);
|
||||
if (containsMask(NpcInfoType.ID))
|
||||
{
|
||||
writeD(_summon.getTemplate().getDisplayId() + 1000000);
|
||||
}
|
||||
if (containsMask(NpcInfoType.POSITION))
|
||||
{
|
||||
writeD(_summon.getX());
|
||||
writeD(_summon.getY());
|
||||
writeD(_summon.getZ());
|
||||
}
|
||||
if (containsMask(NpcInfoType.HEADING))
|
||||
{
|
||||
writeD(_summon.getHeading());
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN2))
|
||||
{
|
||||
writeD(0x00); // Unknown
|
||||
}
|
||||
if (containsMask(NpcInfoType.ATK_CAST_SPEED))
|
||||
{
|
||||
writeD(_summon.getPAtkSpd());
|
||||
writeD(_summon.getMAtkSpd());
|
||||
}
|
||||
if (containsMask(NpcInfoType.SPEED_MULTIPLIER))
|
||||
{
|
||||
_buf.putFloat((float) _summon.getStat().getMovementSpeedMultiplier());
|
||||
_buf.putFloat(_summon.getStat().getAttackSpeedMultiplier());
|
||||
}
|
||||
if (containsMask(NpcInfoType.EQUIPPED))
|
||||
{
|
||||
writeD(_summon.getWeapon());
|
||||
writeD(_summon.getArmor()); // Armor id?
|
||||
writeD(0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.ALIVE))
|
||||
{
|
||||
writeC(_summon.isDead() ? 0x00 : 0x01);
|
||||
}
|
||||
if (containsMask(NpcInfoType.RUNNING))
|
||||
{
|
||||
writeC(_summon.isRunning() ? 0x01 : 0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.SWIM_OR_FLY))
|
||||
{
|
||||
writeC(_summon.isInsideZone(ZoneId.WATER) ? 0x01 : _summon.isFlying() ? 0x02 : 0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.TEAM))
|
||||
{
|
||||
writeC(_summon.getTeam().getId());
|
||||
}
|
||||
if (containsMask(NpcInfoType.ENCHANT))
|
||||
{
|
||||
writeD(_summon.getTemplate().getWeaponEnchant());
|
||||
}
|
||||
if (containsMask(NpcInfoType.FLYING))
|
||||
{
|
||||
writeD(_summon.isFlying() ? 0x01 : 00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.CLONE))
|
||||
{
|
||||
writeD(0x00); // Player ObjectId with Decoy
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN8))
|
||||
{
|
||||
// No visual effect
|
||||
writeD(0x00); // Unknown
|
||||
}
|
||||
if (containsMask(NpcInfoType.DISPLAY_EFFECT))
|
||||
{
|
||||
writeD(0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.TRANSFORMATION))
|
||||
{
|
||||
writeD(0x00); // Transformation ID
|
||||
}
|
||||
if (containsMask(NpcInfoType.CURRENT_HP))
|
||||
{
|
||||
writeD((int) _summon.getCurrentHp());
|
||||
}
|
||||
if (containsMask(NpcInfoType.CURRENT_MP))
|
||||
{
|
||||
writeD((int) _summon.getCurrentMp());
|
||||
}
|
||||
if (containsMask(NpcInfoType.MAX_HP))
|
||||
{
|
||||
writeD(_summon.getMaxHp());
|
||||
}
|
||||
if (containsMask(NpcInfoType.MAX_MP))
|
||||
{
|
||||
writeD(_summon.getMaxMp());
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN11))
|
||||
{
|
||||
writeC(0x00); // 2 - do some animation on spawn
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN12))
|
||||
{
|
||||
writeD(0x00);
|
||||
writeD(0x00);
|
||||
}
|
||||
if (containsMask(NpcInfoType.NAME))
|
||||
{
|
||||
writeS(_summon.getName());
|
||||
}
|
||||
if (containsMask(NpcInfoType.NAME_NPCSTRINGID))
|
||||
{
|
||||
writeD(-1); // NPCStringId for name
|
||||
}
|
||||
if (containsMask(NpcInfoType.TITLE_NPCSTRINGID))
|
||||
{
|
||||
writeD(-1); // NPCStringId for title
|
||||
}
|
||||
if (containsMask(NpcInfoType.PVP_FLAG))
|
||||
{
|
||||
writeC(_summon.getPvpFlag()); // PVP flag
|
||||
}
|
||||
if (containsMask(NpcInfoType.NAME_COLOR))
|
||||
{
|
||||
writeD(0x00); // Name color
|
||||
}
|
||||
if (containsMask(NpcInfoType.CLAN))
|
||||
{
|
||||
writeD(_clanId);
|
||||
writeD(_clanCrest);
|
||||
writeD(_clanLargeCrest);
|
||||
writeD(_allyId);
|
||||
writeD(_allyCrest);
|
||||
}
|
||||
|
||||
if (containsMask(NpcInfoType.VISUAL_STATE))
|
||||
{
|
||||
writeC(_statusMask);
|
||||
}
|
||||
|
||||
if (containsMask(NpcInfoType.ABNORMALS))
|
||||
{
|
||||
writeH(_abnormalVisualEffects.size());
|
||||
for (AbnormalVisualEffect abnormalVisualEffect : _abnormalVisualEffects)
|
||||
{
|
||||
writeH(abnormalVisualEffect.getClientId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.ExperienceTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.ExperienceData;
|
||||
import com.l2jserver.gameserver.enums.UserInfoType;
|
||||
import com.l2jserver.gameserver.instancemanager.RaidBossPointsManager;
|
||||
import com.l2jserver.gameserver.model.Elementals;
|
||||
@@ -172,7 +172,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
writeD((int) Math.round(_activeChar.getCurrentCp()));
|
||||
writeQ(_activeChar.getSp());
|
||||
writeQ(_activeChar.getExp());
|
||||
writeF((float) (_activeChar.getExp() - ExperienceTable.getInstance().getExpForLevel(_activeChar.getLevel())) / (ExperienceTable.getInstance().getExpForLevel(_activeChar.getLevel() + 1) - ExperienceTable.getInstance().getExpForLevel(_activeChar.getLevel())));
|
||||
writeF((float) (_activeChar.getExp() - ExperienceData.getInstance().getExpForLevel(_activeChar.getLevel())) / (ExperienceData.getInstance().getExpForLevel(_activeChar.getLevel() + 1) - ExperienceData.getInstance().getExpForLevel(_activeChar.getLevel())));
|
||||
}
|
||||
|
||||
if (containsMask(UserInfoType.ENCHANTLEVEL))
|
||||
|
@@ -26,7 +26,7 @@ import java.util.List;
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.datatables.CharNameTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets.friend;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.CharNameTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
|
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.CharNameTable;
|
||||
import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
Reference in New Issue
Block a user