Sync with L2JServer Jan 2nd 2015.
This commit is contained in:
@ -18,7 +18,6 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
@ -32,28 +31,25 @@ import com.l2jserver.gameserver.model.holders.ItemHolder;
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
final List<L2SkillLearn> learnable = SkillTreesData.getInstance().getAvailableSkills(_activeChar, _activeChar.getClassId(), false, false);
|
||||
List<Integer> re = Collections.emptyList();
|
||||
|
||||
writeC(0x90);
|
||||
writeH(learnable.size());
|
||||
for (L2SkillLearn skill : learnable)
|
||||
writeH(_learnable.size());
|
||||
for (L2SkillLearn skill : _learnable)
|
||||
{
|
||||
writeD(skill.getSkillId());
|
||||
writeH(skill.getSkillLevel());
|
||||
writeQ(skill.getLevelUpSp());
|
||||
writeC(skill.getGetLevel());
|
||||
writeC(0x00); // Dual Class Level Required
|
||||
writeC(skill.getGetLevel()); // Dual Class Level Required
|
||||
writeC(skill.getRequiredItems().size());
|
||||
for (ItemHolder item : skill.getRequiredItems())
|
||||
{
|
||||
@ -61,12 +57,12 @@ public class AcquireSkillList extends L2GameServerPacket
|
||||
writeQ(item.getCount());
|
||||
}
|
||||
|
||||
writeC(re.size());
|
||||
for (int skillId : re)
|
||||
writeC(skill.getRemoveSkills().size());
|
||||
for (int skillId : skill.getRemoveSkills())
|
||||
{
|
||||
writeD(skillId);
|
||||
writeH(SkillData.getInstance().getMaxLevel(skillId));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -205,10 +205,7 @@ public class CharInfo extends L2GameServerPacket
|
||||
writeC(_activeChar.getPrivateStoreType().getId()); // Confirmed
|
||||
|
||||
writeH(_activeChar.getCubics().size()); // Confirmed
|
||||
for (int cubicId : _activeChar.getCubics().keySet())
|
||||
{
|
||||
writeH(cubicId); // Confirmed
|
||||
}
|
||||
_activeChar.getCubics().keySet().forEach(this::writeH);
|
||||
|
||||
writeC(_activeChar.isInPartyMatchRoom() ? 0x01 : 0x00); // Confirmed
|
||||
|
||||
@ -270,4 +267,4 @@ public class CharInfo extends L2GameServerPacket
|
||||
{
|
||||
return PAPERDOLL_ORDER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -154,14 +154,6 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
writeD(charInfoPackage.getPaperdollItemId(slot));
|
||||
}
|
||||
|
||||
writeD(0x00); // Brooch
|
||||
writeD(0x00); // Jewel 1
|
||||
writeD(0x00); // Jewel 2
|
||||
writeD(0x00); // Jewel 3
|
||||
writeD(0x00); // Jewel 4
|
||||
writeD(0x00); // Jewel 5
|
||||
writeD(0x00); // Jewel 6
|
||||
|
||||
writeD(0x00); // rhand item visual id
|
||||
writeD(0x00); // lhand item visual id
|
||||
writeD(0x00); // gloves item visual id
|
||||
|
@ -21,6 +21,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.MentorManager;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.NpcStringId;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
@ -59,7 +60,10 @@ public final class CreatureSay extends L2GameServerPacket
|
||||
{
|
||||
_mask |= 0x02;
|
||||
}
|
||||
// TODO : if mentor, _mask |= 0x04;
|
||||
if ((MentorManager.getInstance().getMentee(receiver.getObjectId(), sender.getObjectId()) != null) || (MentorManager.getInstance().getMentee(sender.getObjectId(), receiver.getObjectId()) != null))
|
||||
{
|
||||
_mask |= 0x04;
|
||||
}
|
||||
if ((receiver.getAllyId() > 0) && (receiver.getAllyId() == sender.getAllyId()))
|
||||
{
|
||||
_mask |= 0x08;
|
||||
|
@ -19,7 +19,6 @@
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
@ -37,7 +36,7 @@ public class ExAcquireSkillInfo extends L2GameServerPacket
|
||||
private final int _spCost;
|
||||
private final int _minLevel;
|
||||
private final List<ItemHolder> _itemReq = new ArrayList<>();
|
||||
private final List<Integer> _skillRem;
|
||||
private final List<Integer> _skillRem = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Special constructor for Alternate Skill Learning system.<br>
|
||||
@ -53,7 +52,7 @@ public class ExAcquireSkillInfo extends L2GameServerPacket
|
||||
_spCost = sp;
|
||||
_minLevel = skillLearn.getGetLevel();
|
||||
_itemReq.addAll(skillLearn.getRequiredItems());
|
||||
_skillRem = Collections.emptyList();
|
||||
_skillRem.addAll(skillLearn.getRemoveSkills());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -18,9 +18,11 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.enums.MailType;
|
||||
import com.l2jserver.gameserver.model.entity.Message;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.ItemContainer;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
|
||||
/**
|
||||
* @author Migi, DS
|
||||
@ -52,6 +54,23 @@ public class ExReplyReceivedPost extends AbstractItemPacket
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xAC);
|
||||
writeD(_msg.getMailType().ordinal()); // GOD
|
||||
if (_msg.getMailType() == MailType.COMMISSION_ITEM_RETURNED)
|
||||
{
|
||||
writeD(SystemMessageId.THE_REGISTRATION_PERIOD_FOR_THE_ITEM_YOU_REGISTERED_HAS_EXPIRED.getId());
|
||||
writeD(SystemMessageId.THE_AUCTION_HOUSE_REGISTRATION_PERIOD_HAS_EXPIRED_AND_THE_CORRESPONDING_ITEM_IS_BEING_FORWARDED.getId());
|
||||
}
|
||||
else if (_msg.getMailType() == MailType.COMMISSION_ITEM_SOLD)
|
||||
{
|
||||
writeD(_msg.getItemId());
|
||||
writeD(_msg.getEnchantLvl());
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
writeD(_msg.getElementals()[i]);
|
||||
}
|
||||
writeD(SystemMessageId.THE_ITEM_YOU_REGISTERED_HAS_BEEN_SOLD.getId());
|
||||
writeD(SystemMessageId.S1_HAS_BEEN_SOLD.getId());
|
||||
}
|
||||
writeD(_msg.getId());
|
||||
writeD(_msg.isLocked() ? 1 : 0);
|
||||
writeD(0x00); // Unknown
|
||||
@ -75,6 +94,6 @@ public class ExReplyReceivedPost extends AbstractItemPacket
|
||||
|
||||
writeQ(_msg.getReqAdena());
|
||||
writeD(_msg.hasAttachments() ? 1 : 0);
|
||||
writeD(_msg.getSendBySystem());
|
||||
writeD(_msg.isReturned() ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ public class ExReplySentPost extends AbstractItemPacket
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xAE);
|
||||
writeD(0x00); // GOD
|
||||
writeD(_msg.getId());
|
||||
writeD(_msg.isLocked() ? 1 : 0);
|
||||
writeS(_msg.getReceiverName());
|
||||
@ -66,12 +67,13 @@ public class ExReplySentPost extends AbstractItemPacket
|
||||
writeItem(item);
|
||||
writeD(item.getObjectId());
|
||||
}
|
||||
writeQ(_msg.getReqAdena());
|
||||
writeD(_msg.getSendBySystem());
|
||||
}
|
||||
else
|
||||
{
|
||||
writeD(0x00);
|
||||
}
|
||||
writeQ(_msg.getReqAdena());
|
||||
writeD(_msg.hasAttachments() ? 0x01 : 0x00);
|
||||
writeD(_msg.isReturned() ? 0x01 : 00);
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,10 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.enums.MailType;
|
||||
import com.l2jserver.gameserver.instancemanager.MailManager;
|
||||
import com.l2jserver.gameserver.model.entity.Message;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
|
||||
/**
|
||||
* @author Migi, DS
|
||||
@ -46,22 +48,32 @@ public class ExShowReceivedPostList extends L2GameServerPacket
|
||||
writeD(_inbox.size());
|
||||
for (Message msg : _inbox)
|
||||
{
|
||||
writeD(msg.getMailType().ordinal());
|
||||
if (msg.getMailType() == MailType.COMMISSION_ITEM_SOLD)
|
||||
{
|
||||
writeD(SystemMessageId.THE_ITEM_YOU_REGISTERED_HAS_BEEN_SOLD.getId());
|
||||
}
|
||||
else if (msg.getMailType() == MailType.COMMISSION_ITEM_RETURNED)
|
||||
{
|
||||
writeD(SystemMessageId.THE_REGISTRATION_PERIOD_FOR_THE_ITEM_YOU_REGISTERED_HAS_EXPIRED.getId());
|
||||
}
|
||||
writeD(msg.getId());
|
||||
writeS(msg.getSubject());
|
||||
writeS(msg.getSenderName());
|
||||
writeD(msg.isLocked() ? 0x01 : 0x00);
|
||||
writeD(msg.getExpirationSeconds());
|
||||
writeD(msg.isUnread() ? 0x01 : 0x00);
|
||||
writeD(0x01);
|
||||
writeD(((msg.getMailType() == MailType.COMMISSION_ITEM_SOLD) || (msg.getMailType() == MailType.COMMISSION_ITEM_RETURNED)) ? 0 : 1);
|
||||
writeD(msg.hasAttachments() ? 0x01 : 0x00);
|
||||
writeD(msg.isReturned() ? 0x01 : 0x00);
|
||||
writeD(msg.getSendBySystem());
|
||||
writeD(0x00);
|
||||
writeD(0x00); // SysString in some case it seems
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
writeD(0x00);
|
||||
}
|
||||
writeD(100); // TODO: Find me
|
||||
writeD(1000); // TODO: Find me
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* @author Sdw
|
||||
*/
|
||||
public class ExUserInfoCubic extends L2GameServerPacket
|
||||
{
|
||||
private final L2PcInstance _activeChar;
|
||||
|
||||
public ExUserInfoCubic(L2PcInstance cha)
|
||||
{
|
||||
_activeChar = cha;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x157);
|
||||
|
||||
writeD(_activeChar.getObjectId());
|
||||
writeH(_activeChar.getCubics().size());
|
||||
|
||||
_activeChar.getCubics().keySet().forEach(this::writeH);
|
||||
|
||||
writeD(_activeChar.getAgathionId());
|
||||
}
|
||||
}
|
@ -64,7 +64,15 @@ public abstract class L2GameServerPacket extends SendablePacket<L2GameClient>
|
||||
Inventory.PAPERDOLL_DECO4,
|
||||
Inventory.PAPERDOLL_DECO5,
|
||||
Inventory.PAPERDOLL_DECO6,
|
||||
Inventory.PAPERDOLL_BELT
|
||||
Inventory.PAPERDOLL_BELT,
|
||||
Inventory.PAPERDOLL_BROOCH,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL1,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL2,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL3,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL4,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL5,
|
||||
Inventory.PAPERDOLL_BROOCH_JEWEL6
|
||||
|
||||
};
|
||||
|
||||
private static final int[] PAPERDOLL_ORDER_AUGMENT = new int[]
|
||||
|
@ -18,7 +18,6 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
|
||||
/**
|
||||
* @author Gnacik, UnAfraid
|
||||
@ -28,15 +27,9 @@ public class OnEventTrigger extends L2GameServerPacket
|
||||
private final int _emitterId;
|
||||
private final int _enabled;
|
||||
|
||||
public OnEventTrigger(L2DoorInstance door, boolean enabled)
|
||||
public OnEventTrigger(int emitterId, boolean enabled)
|
||||
{
|
||||
_emitterId = door.getEmitter();
|
||||
_enabled = enabled ? 1 : 0;
|
||||
}
|
||||
|
||||
public OnEventTrigger(int id, boolean enabled)
|
||||
{
|
||||
_emitterId = id;
|
||||
_emitterId = emitterId;
|
||||
_enabled = enabled ? 1 : 0;
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.instancemanager.MentorManager;
|
||||
import com.l2jserver.gameserver.model.PcCondOverride;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
@ -46,7 +47,10 @@ public final class TradeStart extends AbstractItemPacket
|
||||
{
|
||||
_mask |= 0x02;
|
||||
}
|
||||
// TODO : if mentor, _mask |= 0x04;
|
||||
if ((MentorManager.getInstance().getMentee(player.getObjectId(), _partner.getObjectId()) != null) || (MentorManager.getInstance().getMentee(_partner.getObjectId(), player.getObjectId()) != null))
|
||||
{
|
||||
_mask |= 0x04;
|
||||
}
|
||||
if ((player.getAllyId() > 0) && (player.getAllyId() == _partner.getAllyId()))
|
||||
{
|
||||
_mask |= 0x08;
|
||||
|
@ -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/>.
|
||||
*/
|
||||
@ -314,8 +314,8 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
if (containsMask(UserInfoType.SLOTS))
|
||||
{
|
||||
writeH(9);
|
||||
writeC(_activeChar.getInventory().getTalismanSlots());
|
||||
writeC(_activeChar.getInventory().canEquipCloak() ? 0x01 : 0x00);
|
||||
writeC(_activeChar.getInventory().getTalismanSlots()); // Confirmed
|
||||
writeC(_activeChar.getInventory().getBroochJewelSlots()); // Confirmed
|
||||
writeC(_activeChar.getTeam().getId()); // Confirmed
|
||||
writeC(0x00); // Red dotted ring on the floor
|
||||
writeC(0x00);
|
||||
@ -386,4 +386,4 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
|
||||
return relation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user