Replaced unnecessary hexadecimal values with decimals and cleanup.
This commit is contained in:
@@ -73,7 +73,7 @@ public abstract class BaseRecievePacket
|
||||
try
|
||||
{
|
||||
result = new String(_decrypt, _off, _decrypt.length - _off, StandardCharsets.UTF_16LE);
|
||||
result = result.substring(0, result.indexOf(0x00));
|
||||
result = result.substring(0, result.indexOf(0));
|
||||
_off += (result.length() * 2) + 2;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -117,16 +117,16 @@ public abstract class BaseSendablePacket
|
||||
public byte[] getBytes()
|
||||
{
|
||||
// if (this instanceof Init)
|
||||
// writeD(0x00); // reserve for XOR initial key
|
||||
// writeD(0); // reserve for XOR initial key
|
||||
|
||||
writeD(0x00); // reserve for checksum
|
||||
writeD(0); // reserve for checksum
|
||||
|
||||
final int padding = _bao.size() % 8;
|
||||
if (padding != 0)
|
||||
{
|
||||
for (int i = padding; i < 8; i++)
|
||||
{
|
||||
writeC(0x00);
|
||||
writeC(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.l2jmobius.gameserver.util.Broadcast;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Fromat:(ch) dddddc
|
||||
* Format:(ch) dddddc
|
||||
* @author -Wooden-
|
||||
*/
|
||||
public class RequestExMagicSkillUseGround implements IClientIncomingPacket
|
||||
|
||||
@@ -44,7 +44,6 @@ public abstract class AbstractHtmlPacket implements IClientOutgoingPacket
|
||||
{
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
_npcObjId = npcObjId;
|
||||
}
|
||||
|
||||
@@ -60,7 +59,6 @@ public abstract class AbstractHtmlPacket implements IClientOutgoingPacket
|
||||
{
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
_npcObjId = npcObjId;
|
||||
setHtml(html);
|
||||
}
|
||||
@@ -77,13 +75,11 @@ public abstract class AbstractHtmlPacket implements IClientOutgoingPacket
|
||||
PacketLogger.warning(getClass().getSimpleName() + ": Html is too long! this will crash the client!");
|
||||
_html = html.substring(0, 17200);
|
||||
}
|
||||
|
||||
if (!html.contains("<html") && !html.startsWith("..\\L2"))
|
||||
{
|
||||
_html = "<html><body>" + html + "</body></html>";
|
||||
return;
|
||||
}
|
||||
|
||||
_html = html;
|
||||
}
|
||||
|
||||
@@ -96,7 +92,6 @@ public abstract class AbstractHtmlPacket implements IClientOutgoingPacket
|
||||
PacketLogger.warning(getClass().getSimpleName() + ": Missing html page " + path);
|
||||
return false;
|
||||
}
|
||||
|
||||
setHtml(content);
|
||||
return true;
|
||||
}
|
||||
@@ -138,12 +133,10 @@ public abstract class AbstractHtmlPacket implements IClientOutgoingPacket
|
||||
{
|
||||
player.clearHtmlActions(getScope());
|
||||
}
|
||||
|
||||
if (_disabledValidation)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player != null)
|
||||
{
|
||||
Util.buildHtmlActionCache(player, getScope(), _npcObjId, _html);
|
||||
|
||||
@@ -83,7 +83,7 @@ public abstract class AbstractItemPacket implements IClientOutgoingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
protected final int _flyRunSpd;
|
||||
protected final int _flyWalkSpd;
|
||||
protected double _moveMultiplier;
|
||||
|
||||
protected int _rhand;
|
||||
protected int _lhand;
|
||||
protected int _chest;
|
||||
@@ -115,7 +114,6 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
_collisionHeight = cha.getTemplate().getFCollisionHeight(); // On every subclass
|
||||
_collisionRadius = cha.getTemplate().getFCollisionRadius(); // On every subclass
|
||||
_isAttackable = cha.isAutoAttackable(attacker);
|
||||
|
||||
// npc crest of owning clan/ally of castle
|
||||
if (cha.isNpc() && cha.isInsideZone(ZoneId.TOWN) && (Config.SHOW_CREST_WITHOUT_QUEST || cha.getCastle().getShowNpcCrest()) && (cha.getCastle().getOwnerId() != 0))
|
||||
{
|
||||
@@ -133,7 +131,6 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_displayEffect = cha.getDisplayEffect();
|
||||
}
|
||||
|
||||
@@ -148,7 +145,7 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_y);
|
||||
packet.writeD(_z);
|
||||
packet.writeD(_heading);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeD(_mAtkSpd);
|
||||
packet.writeD(_pAtkSpd);
|
||||
packet.writeD(_runSpd);
|
||||
@@ -230,30 +227,26 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
_title = (Config.CHAMP_TITLE); // On every subclass
|
||||
}
|
||||
packet.writeS(_title);
|
||||
packet.writeD(0x00); // Title color 0=client default
|
||||
packet.writeD(0x00); // pvp flag
|
||||
packet.writeD(0x00); // karma
|
||||
|
||||
packet.writeD(0); // Title color 0=client default
|
||||
packet.writeD(0); // pvp flag
|
||||
packet.writeD(0); // karma
|
||||
packet.writeD(_npc.isInvisible() ? _npc.getAbnormalVisualEffects() | AbnormalVisualEffect.STEALTH.getMask() : _npc.getAbnormalVisualEffects());
|
||||
packet.writeD(_clanId); // clan id
|
||||
packet.writeD(_clanCrest); // crest id
|
||||
packet.writeD(_allyId); // ally id
|
||||
packet.writeD(_allyCrest); // all crest
|
||||
|
||||
packet.writeC(_npc.isInsideZone(ZoneId.WATER) ? 1 : _npc.isFlying() ? 2 : 0); // C2
|
||||
packet.writeC(_npc.getTeam().getId());
|
||||
|
||||
packet.writeF(_collisionRadius);
|
||||
packet.writeF(_collisionHeight);
|
||||
packet.writeD(_enchantEffect); // C4
|
||||
packet.writeD(_npc.isFlying() ? 1 : 0); // C6
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeD(_npc.getColorEffect()); // CT1.5 Pet form and skills, Color effect
|
||||
packet.writeC(_npc.isTargetable() ? 0x01 : 0x00);
|
||||
packet.writeC(_npc.isShowName() ? 0x01 : 0x00);
|
||||
packet.writeC(_npc.isTargetable() ? 1 : 0);
|
||||
packet.writeC(_npc.isShowName() ? 1 : 0);
|
||||
packet.writeD(_npc.getAbnormalVisualEffectSpecial());
|
||||
packet.writeD(_displayEffect);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -265,7 +258,6 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
public TrapInfo(Trap cha, Creature attacker)
|
||||
{
|
||||
super(cha, (attacker != null) && attacker.canOverrideCond(PlayerCondOverride.SEE_ALL_PLAYERS));
|
||||
|
||||
_trap = cha;
|
||||
_displayId = cha.getTemplate().getDisplayId();
|
||||
_isAttackable = cha.isAutoAttackable(attacker);
|
||||
@@ -291,7 +283,7 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_y);
|
||||
packet.writeD(_z);
|
||||
packet.writeD(_heading);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeD(_mAtkSpd);
|
||||
packet.writeD(_pAtkSpd);
|
||||
packet.writeD(_runSpd);
|
||||
@@ -318,30 +310,25 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
packet.writeS(_name);
|
||||
packet.writeD(-1); // High Five NPCString ID
|
||||
packet.writeS(_title);
|
||||
packet.writeD(0x00); // title color 0 = client default
|
||||
|
||||
packet.writeD(0); // title color 0 = client default
|
||||
packet.writeD(_trap.getPvpFlag());
|
||||
packet.writeD(_trap.getKarma());
|
||||
|
||||
packet.writeD(_trap.isInvisible() ? _trap.getAbnormalVisualEffects() | AbnormalVisualEffect.STEALTH.getMask() : _trap.getAbnormalVisualEffects());
|
||||
packet.writeD(0x00); // clan id
|
||||
packet.writeD(0x00); // crest id
|
||||
packet.writeD(0000); // C2
|
||||
packet.writeD(0000); // C2
|
||||
packet.writeC(0000); // C2
|
||||
|
||||
packet.writeD(0); // clan id
|
||||
packet.writeD(0); // crest id
|
||||
packet.writeD(0); // C2
|
||||
packet.writeD(0); // C2
|
||||
packet.writeC(0); // C2
|
||||
packet.writeC(_trap.getTeam().getId());
|
||||
|
||||
packet.writeF(_collisionRadius);
|
||||
packet.writeF(_collisionHeight);
|
||||
packet.writeD(0x00); // C4
|
||||
packet.writeD(0x00); // C6
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0); // C4
|
||||
packet.writeD(0); // C6
|
||||
packet.writeD(0);
|
||||
packet.writeD(0); // CT1.5 Pet form and skills
|
||||
packet.writeC(0x01);
|
||||
packet.writeC(0x01);
|
||||
packet.writeD(0x00);
|
||||
|
||||
packet.writeC(1);
|
||||
packet.writeC(1);
|
||||
packet.writeD(0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -384,7 +371,7 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_y);
|
||||
packet.writeD(_z);
|
||||
packet.writeD(_heading);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeD(_mAtkSpd);
|
||||
packet.writeD(_pAtkSpd);
|
||||
packet.writeD(_runSpd);
|
||||
@@ -402,8 +389,8 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_rhand); // right hand weapon
|
||||
packet.writeD(_chest);
|
||||
packet.writeD(_lhand); // left hand weapon
|
||||
packet.writeC(0x01); // name above char 1=true ... ??
|
||||
packet.writeC(0x01); // always running 1=running 0=walking
|
||||
packet.writeC(1); // name above char 1=true ... ??
|
||||
packet.writeC(1); // always running 1=running 0=walking
|
||||
packet.writeC(_summon.isInCombat() ? 1 : 0);
|
||||
packet.writeC(_summon.isAlikeDead() ? 1 : 0);
|
||||
packet.writeC(_isSummoned ? 2 : _value); // invisible ?? 0=false 1=true 2=summoned (only works if model has a summon animation)
|
||||
@@ -411,31 +398,25 @@ public abstract class AbstractNpcInfo implements IClientOutgoingPacket
|
||||
packet.writeS(_name);
|
||||
packet.writeD(-1); // High Five NPCString ID
|
||||
packet.writeS(_title);
|
||||
packet.writeD(0x01); // Title color 0=client default
|
||||
|
||||
packet.writeD(1); // Title color 0=client default
|
||||
packet.writeD(_summon.getPvpFlag());
|
||||
packet.writeD(_summon.getKarma());
|
||||
|
||||
packet.writeD(_gmSeeInvis && _summon.isInvisible() ? _summon.getAbnormalVisualEffects() | AbnormalVisualEffect.STEALTH.getMask() : _summon.getAbnormalVisualEffects());
|
||||
|
||||
packet.writeD(0x00); // clan id
|
||||
packet.writeD(0x00); // crest id
|
||||
packet.writeD(0x00); // C2
|
||||
packet.writeD(0x00); // C2
|
||||
packet.writeD(0); // clan id
|
||||
packet.writeD(0); // crest id
|
||||
packet.writeD(0); // C2
|
||||
packet.writeD(0); // C2
|
||||
packet.writeC(_summon.isInsideZone(ZoneId.WATER) ? 1 : _summon.isFlying() ? 2 : 0); // C2
|
||||
|
||||
packet.writeC(_summon.getTeam().getId());
|
||||
|
||||
packet.writeF(_collisionRadius);
|
||||
packet.writeF(_collisionHeight);
|
||||
packet.writeD(_enchantEffect); // C4
|
||||
packet.writeD(0x00); // C6
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0); // C6
|
||||
packet.writeD(0);
|
||||
packet.writeD(_form); // CT1.5 Pet form and skills
|
||||
packet.writeC(0x01);
|
||||
packet.writeC(0x01);
|
||||
packet.writeC(1);
|
||||
packet.writeC(1);
|
||||
packet.writeD(_summon.getAbnormalVisualEffectSpecial());
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,11 +70,9 @@ public class AcquireSkillList implements IClientOutgoingPacket
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
OutgoingPackets.ACQUIRE_SKILL_LIST.writeId(packet);
|
||||
packet.writeD(_skillType.ordinal());
|
||||
packet.writeD(_skills.size());
|
||||
|
||||
for (Skill temp : _skills)
|
||||
{
|
||||
packet.writeD(temp.id);
|
||||
|
||||
@@ -44,7 +44,6 @@ public class AllianceInfo implements IClientOutgoingPacket
|
||||
_name = leader.getAllyName();
|
||||
_leaderC = leader.getName();
|
||||
_leaderP = leader.getLeaderName();
|
||||
|
||||
final Collection<Clan> allies = ClanTable.getInstance().getClanAllies(allianceId);
|
||||
_allies = new ClanInfo[allies.size()];
|
||||
int idx = 0;
|
||||
@@ -57,7 +56,6 @@ public class AllianceInfo implements IClientOutgoingPacket
|
||||
total += ci.getTotal();
|
||||
online += ci.getOnline();
|
||||
}
|
||||
|
||||
_total = total;
|
||||
_online = online;
|
||||
}
|
||||
@@ -66,18 +64,16 @@ public class AllianceInfo implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.ALLIANCE_INFO.writeId(packet);
|
||||
|
||||
packet.writeS(_name);
|
||||
packet.writeD(_total);
|
||||
packet.writeD(_online);
|
||||
packet.writeS(_leaderC);
|
||||
packet.writeS(_leaderP);
|
||||
|
||||
packet.writeD(_allies.length);
|
||||
for (ClanInfo aci : _allies)
|
||||
{
|
||||
packet.writeS(aci.getClan().getName());
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeD(aci.getClan().getLevel());
|
||||
packet.writeS(aci.getClan().getLeaderName());
|
||||
packet.writeD(aci.getTotal());
|
||||
|
||||
@@ -96,23 +96,19 @@ public class Attack implements IClientOutgoingPacket
|
||||
{
|
||||
final Iterator<Hit> it = _hits.iterator();
|
||||
OutgoingPackets.ATTACK.writeId(packet);
|
||||
|
||||
packet.writeD(_attackerObjId);
|
||||
writeHit(packet, it.next());
|
||||
packet.writeD(_attackerLoc.getX());
|
||||
packet.writeD(_attackerLoc.getY());
|
||||
packet.writeD(_attackerLoc.getZ());
|
||||
|
||||
packet.writeH(_hits.size() - 1);
|
||||
while (it.hasNext())
|
||||
{
|
||||
writeHit(packet, it.next());
|
||||
}
|
||||
|
||||
packet.writeD(_targetLoc.getX());
|
||||
packet.writeD(_targetLoc.getY());
|
||||
packet.writeD(_targetLoc.getZ());
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,12 +43,10 @@ public class BuyList implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BUY_SELL_LIST.writeId(packet);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeQ(_money); // current money
|
||||
packet.writeD(_listId);
|
||||
|
||||
packet.writeH(_list.size());
|
||||
|
||||
for (Product product : _list)
|
||||
{
|
||||
if ((product.getCount() > 0) || !product.hasLimitedStock())
|
||||
@@ -59,24 +57,23 @@ public class BuyList implements IClientOutgoingPacket
|
||||
packet.writeQ(product.getCount() < 0 ? 0 : product.getCount());
|
||||
packet.writeH(product.getItem().getType2());
|
||||
packet.writeH(product.getItem().getType1()); // Custom Type 1
|
||||
packet.writeH(0x00); // isEquipped
|
||||
packet.writeH(0); // isEquipped
|
||||
packet.writeD(product.getItem().getBodyPart()); // Body Part
|
||||
packet.writeH(product.getItem().getDefaultEnchantLevel()); // Enchant
|
||||
packet.writeH(0x00); // Custom Type
|
||||
packet.writeD(0x00); // Augment
|
||||
packet.writeH(0); // Custom Type
|
||||
packet.writeD(0); // Augment
|
||||
packet.writeD(-1); // Mana
|
||||
packet.writeD(-9999); // Time
|
||||
packet.writeH(0x00); // Element Type
|
||||
packet.writeH(0x00); // Element Power
|
||||
packet.writeH(0); // Element Type
|
||||
packet.writeH(0); // Element Power
|
||||
for (byte i = 0; i < 6; i++)
|
||||
{
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0);
|
||||
}
|
||||
// Enchant Effects
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0x00);
|
||||
|
||||
packet.writeH(0);
|
||||
packet.writeH(0);
|
||||
packet.writeH(0);
|
||||
if ((product.getItemId() >= 3960) && (product.getItemId() <= 4026))
|
||||
{
|
||||
packet.writeQ((long) (product.getPrice() * Config.RATE_SIEGE_GUARDS_PRICE * (1 + _taxRate)));
|
||||
|
||||
@@ -50,10 +50,8 @@ public class BuyListSeed implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.BUY_LIST_SEED.writeId(packet);
|
||||
|
||||
packet.writeQ(_money); // current money
|
||||
packet.writeD(_manorId); // manor id
|
||||
|
||||
if (!_list.isEmpty())
|
||||
{
|
||||
packet.writeH(_list.size()); // list length
|
||||
@@ -61,34 +59,34 @@ public class BuyListSeed implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(s.getId());
|
||||
packet.writeD(s.getId());
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeQ(s.getAmount()); // item count
|
||||
packet.writeH(0x05); // Custom Type 2
|
||||
packet.writeH(0x00); // Custom Type 1
|
||||
packet.writeH(0x00); // Equipped
|
||||
packet.writeD(0x00); // Body Part
|
||||
packet.writeH(0x00); // Enchant
|
||||
packet.writeH(0x00); // Custom Type
|
||||
packet.writeD(0x00); // Augment
|
||||
packet.writeH(5); // Custom Type 2
|
||||
packet.writeH(0); // Custom Type 1
|
||||
packet.writeH(0); // Equipped
|
||||
packet.writeD(0); // Body Part
|
||||
packet.writeH(0); // Enchant
|
||||
packet.writeH(0); // Custom Type
|
||||
packet.writeD(0); // Augment
|
||||
packet.writeD(-1); // Mana
|
||||
packet.writeD(-9999); // Time
|
||||
packet.writeH(0x00); // Element Type
|
||||
packet.writeH(0x00); // Element Power
|
||||
packet.writeH(0); // Element Type
|
||||
packet.writeH(0); // Element Power
|
||||
for (byte i = 0; i < 6; i++)
|
||||
{
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0);
|
||||
}
|
||||
// Enchant Effects
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0);
|
||||
packet.writeH(0);
|
||||
packet.writeH(0);
|
||||
packet.writeQ(s.getPrice()); // price
|
||||
}
|
||||
_list.clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class CSShowComBoard implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.SHOW_BOARD.writeId(packet);
|
||||
packet.writeC(0x01); // c4 1 to show community 00 to hide
|
||||
packet.writeC(1); // c4 1 to show community 00 to hide
|
||||
packet.writeB(_html);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,17 +22,17 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class ChangeWaitType implements IClientOutgoingPacket
|
||||
{
|
||||
public static final int WT_SITTING = 0;
|
||||
public static final int WT_STANDING = 1;
|
||||
public static final int WT_START_FAKEDEATH = 2;
|
||||
public static final int WT_STOP_FAKEDEATH = 3;
|
||||
|
||||
private final int _objectId;
|
||||
private final int _moveType;
|
||||
private final int _x;
|
||||
private final int _y;
|
||||
private final int _z;
|
||||
|
||||
public static final int WT_SITTING = 0;
|
||||
public static final int WT_STANDING = 1;
|
||||
public static final int WT_START_FAKEDEATH = 2;
|
||||
public static final int WT_STOP_FAKEDEATH = 3;
|
||||
|
||||
public ChangeWaitType(Creature creature, int newMoveType)
|
||||
{
|
||||
_objectId = creature.getObjectId();
|
||||
|
||||
@@ -29,7 +29,6 @@ public class CharCreateFail implements IClientOutgoingPacket
|
||||
public static final int REASON_CREATE_NOT_ALLOWED = 0x05; // "Characters cannot be created from this server."
|
||||
public static final int REASON_CHOOSE_ANOTHER_SVR = 0x06; // "Unable to create character. You are unable to create a new character on the selected server. A restriction is in place which restricts users from creating characters on different servers where no previous character exists. Please
|
||||
// choose another server."
|
||||
|
||||
private final int _error;
|
||||
|
||||
public CharCreateFail(int errorCode)
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CharCreateOk implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.CHARACTER_CREATE_SUCCESS.writeId(packet);
|
||||
packet.writeD(0x01);
|
||||
packet.writeD(1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class CharDeleteFail implements IClientOutgoingPacket
|
||||
{
|
||||
public static final int REASON_DELETION_FAILED = 0x01;
|
||||
public static final int REASON_YOU_MAY_NOT_DELETE_CLAN_MEMBER = 0x02;
|
||||
public static final int REASON_CLAN_LEADERS_MAY_NOT_BE_DELETED = 0x03;
|
||||
public static final int REASON_DELETION_FAILED = 1;
|
||||
public static final int REASON_YOU_MAY_NOT_DELETE_CLAN_MEMBER = 2;
|
||||
public static final int REASON_CLAN_LEADERS_MAY_NOT_BE_DELETED = 3;
|
||||
|
||||
private final int _error;
|
||||
|
||||
|
||||
@@ -29,26 +29,6 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class CharInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _player;
|
||||
private final Clan _clan;
|
||||
private int _objId;
|
||||
private int _x;
|
||||
private int _y;
|
||||
private int _z;
|
||||
private int _heading;
|
||||
private final int _mAtkSpd;
|
||||
private final int _pAtkSpd;
|
||||
private final int _runSpd;
|
||||
private final int _walkSpd;
|
||||
private final int _swimRunSpd;
|
||||
private final int _swimWalkSpd;
|
||||
private final int _flyRunSpd;
|
||||
private final int _flyWalkSpd;
|
||||
private final double _moveMultiplier;
|
||||
|
||||
private int _vehicleId = 0;
|
||||
private final boolean _gmSeeInvis;
|
||||
|
||||
private static final int[] PAPERDOLL_ORDER = new int[]
|
||||
{
|
||||
Inventory.PAPERDOLL_UNDER,
|
||||
@@ -74,6 +54,25 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
Inventory.PAPERDOLL_BELT
|
||||
};
|
||||
|
||||
private final Player _player;
|
||||
private final Clan _clan;
|
||||
private int _objId;
|
||||
private int _x;
|
||||
private int _y;
|
||||
private int _z;
|
||||
private int _heading;
|
||||
private final int _mAtkSpd;
|
||||
private final int _pAtkSpd;
|
||||
private final int _runSpd;
|
||||
private final int _walkSpd;
|
||||
private final int _swimRunSpd;
|
||||
private final int _swimWalkSpd;
|
||||
private final int _flyRunSpd;
|
||||
private final int _flyWalkSpd;
|
||||
private final double _moveMultiplier;
|
||||
private int _vehicleId = 0;
|
||||
private final boolean _gmSeeInvis;
|
||||
|
||||
public CharInfo(Player player, boolean gmSeeInvis)
|
||||
{
|
||||
_player = player;
|
||||
@@ -141,15 +140,11 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
|
||||
packet.writeD(_player.getInventory().getTalismanSlots());
|
||||
packet.writeD(_player.getInventory().canEquipCloak() ? 1 : 0);
|
||||
|
||||
packet.writeD(_player.getPvpFlag());
|
||||
packet.writeD(_player.getKarma());
|
||||
|
||||
packet.writeD(_mAtkSpd);
|
||||
packet.writeD(_pAtkSpd);
|
||||
|
||||
packet.writeD(0x00); // ?
|
||||
|
||||
packet.writeD(0); // ?
|
||||
packet.writeD(_runSpd);
|
||||
packet.writeD(_walkSpd);
|
||||
packet.writeD(_swimRunSpd);
|
||||
@@ -160,16 +155,12 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_flyWalkSpd);
|
||||
packet.writeF(_moveMultiplier);
|
||||
packet.writeF(_player.getAttackSpeedMultiplier());
|
||||
|
||||
packet.writeF(_player.getCollisionRadius());
|
||||
packet.writeF(_player.getCollisionHeight());
|
||||
|
||||
packet.writeD(_player.getAppearance().getHairStyle());
|
||||
packet.writeD(_player.getAppearance().getHairColor());
|
||||
packet.writeD(_player.getAppearance().getFace());
|
||||
|
||||
packet.writeS(_gmSeeInvis ? "Invisible" : _player.getAppearance().getVisibleTitle());
|
||||
|
||||
if (!_player.isCursedWeaponEquipped())
|
||||
{
|
||||
packet.writeD(_player.getClanId());
|
||||
@@ -179,20 +170,16 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
}
|
||||
|
||||
packet.writeC(_player.isSitting() ? 0 : 1); // standing = 1 sitting = 0
|
||||
packet.writeC(_player.isRunning() ? 1 : 0); // running = 1 walking = 0
|
||||
packet.writeC(_player.isInCombat() ? 1 : 0);
|
||||
|
||||
packet.writeC(!_player.isInOlympiadMode() && _player.isAlikeDead() ? 1 : 0);
|
||||
|
||||
packet.writeC(!_gmSeeInvis && _player.isInvisible() ? 1 : 0); // invisible = 1 visible =0
|
||||
|
||||
packet.writeC(_player.getMountType().ordinal()); // 1-on Strider, 2-on Wyvern, 3-on Great Wolf, 0-no mount
|
||||
packet.writeC(_player.getPrivateStoreType().getId());
|
||||
|
||||
@@ -203,48 +190,35 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
}
|
||||
|
||||
packet.writeC(_player.isInPartyMatchRoom() ? 1 : 0);
|
||||
|
||||
packet.writeD(_gmSeeInvis ? (_player.getAbnormalVisualEffects() | AbnormalVisualEffect.STEALTH.getMask()) : _player.getAbnormalVisualEffects());
|
||||
|
||||
packet.writeC(_player.isInsideZone(ZoneId.WATER) ? 1 : _player.isFlyingMounted() ? 2 : 0);
|
||||
|
||||
packet.writeH(_player.getRecomHave()); // Blue value for name (0 = white, 255 = pure blue)
|
||||
packet.writeD(_player.getMountNpcId() + 1000000);
|
||||
packet.writeD(_player.getClassId().getId());
|
||||
packet.writeD(0x00); // ?
|
||||
packet.writeD(0); // ?
|
||||
packet.writeC(_player.isMounted() ? 0 : _player.getEnchantEffect());
|
||||
|
||||
packet.writeC(_player.getTeam().getId());
|
||||
|
||||
packet.writeD(_player.getClanCrestLargeId());
|
||||
packet.writeC(_player.isNoble() ? 1 : 0); // Symbol on char menu ctrl+I
|
||||
packet.writeC(_player.isHero() || (_player.isGM() && Config.GM_HERO_AURA) ? 1 : 0); // Hero Aura
|
||||
|
||||
packet.writeC(_player.isFishing() ? 1 : 0); // 0x01: Fishing Mode (Cant be undone by setting back to 0)
|
||||
packet.writeC(_player.isFishing() ? 1 : 0); // 1: Fishing Mode (Cant be undone by setting back to 0)
|
||||
packet.writeD(_player.getFishx());
|
||||
packet.writeD(_player.getFishy());
|
||||
packet.writeD(_player.getFishz());
|
||||
|
||||
packet.writeD(_player.getAppearance().getNameColor());
|
||||
|
||||
packet.writeD(_heading);
|
||||
|
||||
packet.writeD(_player.getPledgeClass());
|
||||
packet.writeD(_player.getPledgeType());
|
||||
|
||||
packet.writeD(_player.getAppearance().getTitleColor());
|
||||
|
||||
packet.writeD(_player.isCursedWeaponEquipped() ? CursedWeaponsManager.getInstance().getLevel(_player.getCursedWeaponEquippedId()) : 0);
|
||||
|
||||
packet.writeD(_clan != null ? _clan.getReputationScore() : 0);
|
||||
|
||||
// T1
|
||||
packet.writeD(_player.getTransformationDisplayId());
|
||||
packet.writeD(_player.getAgathionId());
|
||||
|
||||
// T2
|
||||
packet.writeD(0x01);
|
||||
|
||||
packet.writeD(1);
|
||||
// T2.3
|
||||
packet.writeD(_player.getAbnormalVisualEffectSpecial());
|
||||
return true;
|
||||
|
||||
@@ -40,21 +40,19 @@ public class CharSelected implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.CHARACTER_SELECTED.writeId(packet);
|
||||
|
||||
packet.writeS(_player.getName());
|
||||
packet.writeD(_player.getObjectId());
|
||||
packet.writeS(_player.getTitle());
|
||||
packet.writeD(_sessionId);
|
||||
packet.writeD(_player.getClanId());
|
||||
packet.writeD(0x00); // ??
|
||||
packet.writeD(0); // ??
|
||||
packet.writeD(_player.getAppearance().isFemale() ? 1 : 0);
|
||||
packet.writeD(_player.getRace().ordinal());
|
||||
packet.writeD(_player.getClassId().getId());
|
||||
packet.writeD(0x01); // active ??
|
||||
packet.writeD(1); // active ??
|
||||
packet.writeD(_player.getX());
|
||||
packet.writeD(_player.getY());
|
||||
packet.writeD(_player.getZ());
|
||||
|
||||
packet.writeF(_player.getCurrentHp());
|
||||
packet.writeF(_player.getCurrentMp());
|
||||
packet.writeD((int) _player.getSp());
|
||||
@@ -68,19 +66,15 @@ public class CharSelected implements IClientOutgoingPacket
|
||||
packet.writeD(_player.getMEN());
|
||||
packet.writeD(_player.getDEX());
|
||||
packet.writeD(_player.getWIT());
|
||||
|
||||
packet.writeD(GameTimeTaskManager.getInstance().getGameTime() % (24 * 60)); // "reset" on 24th hour
|
||||
packet.writeD(0x00);
|
||||
|
||||
packet.writeD(0);
|
||||
packet.writeD(_player.getClassId().getId());
|
||||
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeB(new byte[64]);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(CharSelectionInfo.class.getName());
|
||||
|
||||
private final String _loginName;
|
||||
private final int _sessionId;
|
||||
private int _activeId;
|
||||
@@ -77,13 +78,10 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.CHARACTER_SELECTION_INFO.writeId(packet);
|
||||
|
||||
final int size = _characterPackages.size();
|
||||
packet.writeD(size); // Created character count
|
||||
|
||||
packet.writeD(Config.MAX_CHARACTERS_NUMBER_PER_ACCOUNT); // Can prevent players from creating new characters (if 0); (if 1, the client will ask if chars may be created (0x13) Response: (0x0D) )
|
||||
packet.writeC(0x00);
|
||||
|
||||
packet.writeC(0);
|
||||
long lastAccess = 0;
|
||||
if (_activeId == -1)
|
||||
{
|
||||
@@ -96,7 +94,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
final CharSelectInfoPackage charInfoPackage = _characterPackages.get(i);
|
||||
@@ -105,67 +102,53 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
packet.writeS(_loginName); // Account name
|
||||
packet.writeD(_sessionId); // Account ID
|
||||
packet.writeD(charInfoPackage.getClanId()); // Clan ID
|
||||
packet.writeD(0x00); // Builder level
|
||||
|
||||
packet.writeD(0); // Builder level
|
||||
packet.writeD(charInfoPackage.getSex()); // Sex
|
||||
packet.writeD(charInfoPackage.getRace()); // Race
|
||||
packet.writeD(charInfoPackage.getBaseClassId());
|
||||
|
||||
packet.writeD(0x01); // GameServerName
|
||||
|
||||
packet.writeD(1); // GameServerName
|
||||
packet.writeD(charInfoPackage.getX());
|
||||
packet.writeD(charInfoPackage.getY());
|
||||
packet.writeD(charInfoPackage.getZ());
|
||||
packet.writeF(charInfoPackage.getCurrentHp());
|
||||
packet.writeF(charInfoPackage.getCurrentMp());
|
||||
|
||||
packet.writeD((int) charInfoPackage.getSp());
|
||||
packet.writeQ(charInfoPackage.getExp());
|
||||
packet.writeF((float) (charInfoPackage.getExp() - ExperienceData.getInstance().getExpForLevel(charInfoPackage.getLevel())) / (ExperienceData.getInstance().getExpForLevel(charInfoPackage.getLevel() + 1) - ExperienceData.getInstance().getExpForLevel(charInfoPackage.getLevel()))); // High
|
||||
// Five
|
||||
packet.writeD(charInfoPackage.getLevel());
|
||||
|
||||
packet.writeD(charInfoPackage.getKarma());
|
||||
packet.writeD(charInfoPackage.getPkKills());
|
||||
packet.writeD(charInfoPackage.getPvPKills());
|
||||
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
for (int slot : getPaperdollOrder())
|
||||
{
|
||||
packet.writeD(charInfoPackage.getPaperdollItemId(slot));
|
||||
}
|
||||
|
||||
packet.writeD(charInfoPackage.getHairStyle());
|
||||
packet.writeD(charInfoPackage.getHairColor());
|
||||
packet.writeD(charInfoPackage.getFace());
|
||||
|
||||
packet.writeF(charInfoPackage.getMaxHp()); // Maximum HP
|
||||
packet.writeF(charInfoPackage.getMaxMp()); // Maximum MP
|
||||
|
||||
packet.writeD(charInfoPackage.getDeleteTimer() > 0 ? (int) ((charInfoPackage.getDeleteTimer() - Chronos.currentTimeMillis()) / 1000) : 0);
|
||||
packet.writeD(charInfoPackage.getClassId());
|
||||
packet.writeD(i == _activeId ? 0x01 : 0x00);
|
||||
|
||||
packet.writeD(i == _activeId ? 1 : 0);
|
||||
packet.writeC(Math.min(charInfoPackage.getEnchantEffect(), 127));
|
||||
packet.writeD(charInfoPackage.getAugmentationId());
|
||||
|
||||
// packet.writeD(charInfoPackage.getTransformId()); // Used to display Transformations
|
||||
packet.writeD(0x00); // Currently on retail when you are on character select you don't see your transformation.
|
||||
|
||||
packet.writeD(0x00); // Pet NpcId
|
||||
packet.writeD(0x00); // Pet level
|
||||
packet.writeD(0x00); // Pet Food
|
||||
packet.writeD(0x00); // Pet Food Level
|
||||
packet.writeF(0x00); // Current pet HP
|
||||
packet.writeF(0x00); // Current pet MP
|
||||
|
||||
packet.writeD(0); // Currently on retail when you are on character select you don't see your transformation.
|
||||
packet.writeD(0); // Pet NpcId
|
||||
packet.writeD(0); // Pet level
|
||||
packet.writeD(0); // Pet Food
|
||||
packet.writeD(0); // Pet Food Level
|
||||
packet.writeF(0); // Current pet HP
|
||||
packet.writeF(0); // Current pet MP
|
||||
packet.writeD(charInfoPackage.getVitalityPoints()); // Vitality
|
||||
}
|
||||
return true;
|
||||
@@ -175,7 +158,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
{
|
||||
CharSelectInfoPackage charInfopackage;
|
||||
final List<CharSelectInfoPackage> characterList = new LinkedList<>();
|
||||
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("SELECT * FROM characters WHERE account_name=? ORDER BY createDate"))
|
||||
{
|
||||
@@ -188,7 +170,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
if (charInfopackage != null)
|
||||
{
|
||||
characterList.add(charInfopackage);
|
||||
|
||||
final Player player = World.getInstance().getPlayer(charInfopackage.getObjectId());
|
||||
if (player != null)
|
||||
{
|
||||
@@ -202,7 +183,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "Could not restore char info: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
return characterList;
|
||||
}
|
||||
|
||||
@@ -243,7 +223,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
{
|
||||
clan.removeClanMember(objectId, 0);
|
||||
}
|
||||
|
||||
GameClient.deleteCharByObjId(objectId);
|
||||
return null;
|
||||
}
|
||||
@@ -262,20 +241,16 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
charInfopackage.setHairStyle(chardata.getInt("hairstyle"));
|
||||
charInfopackage.setHairColor(chardata.getInt("haircolor"));
|
||||
charInfopackage.setSex(chardata.getInt("sex"));
|
||||
|
||||
charInfopackage.setExp(chardata.getLong("exp"));
|
||||
charInfopackage.setSp(chardata.getLong("sp"));
|
||||
charInfopackage.setVitalityPoints(chardata.getInt("vitality_points"));
|
||||
charInfopackage.setClanId(chardata.getInt("clanid"));
|
||||
|
||||
charInfopackage.setRace(chardata.getInt("race"));
|
||||
|
||||
final int baseClassId = chardata.getInt("base_class");
|
||||
final int activeClassId = chardata.getInt("classid");
|
||||
charInfopackage.setX(chardata.getInt("x"));
|
||||
charInfopackage.setY(chardata.getInt("y"));
|
||||
charInfopackage.setZ(chardata.getInt("z"));
|
||||
|
||||
final int faction = chardata.getInt("faction");
|
||||
if (faction == 1)
|
||||
{
|
||||
@@ -285,7 +260,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
{
|
||||
charInfopackage.setEvil();
|
||||
}
|
||||
|
||||
if (Config.MULTILANG_ENABLE)
|
||||
{
|
||||
String lang = chardata.getString("language");
|
||||
@@ -295,22 +269,18 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
}
|
||||
charInfopackage.setHtmlPrefix("data/lang/" + lang + "/");
|
||||
}
|
||||
|
||||
// if is in subclass, load subclass exp, sp, level info
|
||||
if (baseClassId != activeClassId)
|
||||
{
|
||||
loadCharacterSubclassInfo(charInfopackage, objectId, activeClassId);
|
||||
}
|
||||
|
||||
charInfopackage.setClassId(activeClassId);
|
||||
|
||||
// Get the augmentation id for equipped weapon
|
||||
int weaponObjId = charInfopackage.getPaperdollObjectId(Inventory.PAPERDOLL_RHAND);
|
||||
if (weaponObjId < 1)
|
||||
{
|
||||
weaponObjId = charInfopackage.getPaperdollObjectId(Inventory.PAPERDOLL_RHAND);
|
||||
}
|
||||
|
||||
if (weaponObjId > 0)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
@@ -331,7 +301,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
LOGGER.log(Level.WARNING, "Could not restore augmentation info: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the base class is set to zero and also doesn't match with the current active class, otherwise send the base class ID. This prevents chars created before base class was introduced from being displayed incorrectly.
|
||||
if ((baseClassId == 0) && (activeClassId > 0))
|
||||
{
|
||||
@@ -341,7 +310,6 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
{
|
||||
charInfopackage.setBaseClassId(baseClassId);
|
||||
}
|
||||
|
||||
charInfopackage.setDeleteTimer(deletetime);
|
||||
charInfopackage.setLastAccess(chardata.getLong("lastAccess"));
|
||||
return charInfopackage;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ClientSetTime implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.CLIENT_SET_TIME.writeId(packet);
|
||||
packet.writeD(GameTimeTaskManager.getInstance().getGameTime()); // time in client minutes
|
||||
packet.writeD(0x06); // constant to match the server time( this determines the speed of the client clock)
|
||||
packet.writeD(6); // constant to match the server time( this determines the speed of the client clock)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,6 @@ public class ConfirmDlg implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.CONFIRM_DLG.writeId(packet);
|
||||
|
||||
final SMParam[] params = _systemMessage.getParams();
|
||||
packet.writeD(_systemMessage.getId());
|
||||
packet.writeD(params.length);
|
||||
@@ -117,7 +116,6 @@ public class ConfirmDlg implements IClientOutgoingPacket
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
packet.writeD(_time);
|
||||
packet.writeD(_requesterId);
|
||||
return true;
|
||||
|
||||
@@ -81,7 +81,6 @@ public class CreatureSay implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.SAY2.writeId(packet);
|
||||
|
||||
packet.writeD(_sender == null ? 0 : _sender.getObjectId());
|
||||
packet.writeD(_chatType.getClientId());
|
||||
if (_senderName != null)
|
||||
|
||||
@@ -39,7 +39,7 @@ public class DeleteObject implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.DELETE_OBJECT.writeId(packet);
|
||||
packet.writeD(_objectId);
|
||||
packet.writeD(0x00); // c2
|
||||
packet.writeD(0); // c2
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,22 +64,19 @@ public class Die implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.DIE.writeId(packet);
|
||||
packet.writeD(_objectId);
|
||||
packet.writeD(_canTeleport ? 0x01 : 0x00);
|
||||
|
||||
packet.writeD(_canTeleport ? 1 : 0);
|
||||
if (_creature.isPlayer())
|
||||
{
|
||||
if (!OlympiadManager.getInstance().isRegistered(_creature.getActingPlayer()) && !_creature.getActingPlayer().isOnEvent())
|
||||
{
|
||||
_staticRes = _creature.getInventory().haveItemForSelfResurrection();
|
||||
}
|
||||
|
||||
// Verify if player can use fixed resurrection without Feather
|
||||
if (_access.allowFixedRes())
|
||||
{
|
||||
_staticRes = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (_canTeleport && (_clan != null) && !_isJailed)
|
||||
{
|
||||
boolean isInCastleDefense = false;
|
||||
@@ -106,30 +103,29 @@ public class Die implements IClientOutgoingPacket
|
||||
isInFortDefense = true;
|
||||
}
|
||||
}
|
||||
|
||||
packet.writeD(_clan.getHideoutId() > 0 ? 0x01 : 0x00); // 6d 01 00 00 00 - to hide away
|
||||
packet.writeD((_clan.getCastleId() > 0) || isInCastleDefense ? 0x01 : 0x00); // 6d 02 00 00 00 - to castle
|
||||
packet.writeD((TerritoryWarManager.getInstance().getHQForClan(_clan) != null) || ((siegeClan != null) && !isInCastleDefense && !isInFortDefense && !siegeClan.getFlag().isEmpty()) || ((hall != null) && (hall.getSiege() != null) && hall.getSiege().checkIsAttacker(_clan)) ? 0x01 : 0x00); // 6d
|
||||
// 03
|
||||
// 00
|
||||
// 00
|
||||
// 00
|
||||
// -
|
||||
// to
|
||||
// siege
|
||||
// HQ
|
||||
packet.writeD(_sweepable ? 0x01 : 0x00); // sweepable (blue glow)
|
||||
packet.writeD(_staticRes ? 0x01 : 0x00); // 6d 04 00 00 00 - to FIXED
|
||||
packet.writeD((_clan.getFortId() > 0) || isInFortDefense ? 0x01 : 0x00); // 6d 05 00 00 00 - to fortress
|
||||
packet.writeD(_clan.getHideoutId() > 0 ? 1 : 0); // 6d 01 00 00 00 - to hide away
|
||||
packet.writeD((_clan.getCastleId() > 0) || isInCastleDefense ? 1 : 0); // 6d 02 00 00 00 - to castle
|
||||
packet.writeD((TerritoryWarManager.getInstance().getHQForClan(_clan) != null) || ((siegeClan != null) && !isInCastleDefense && !isInFortDefense && !siegeClan.getFlag().isEmpty()) || ((hall != null) && (hall.getSiege() != null) && hall.getSiege().checkIsAttacker(_clan)) ? 1 : 0); // 6d
|
||||
// 03
|
||||
// 00
|
||||
// 00
|
||||
// 00
|
||||
// -
|
||||
// to
|
||||
// siege
|
||||
// HQ
|
||||
packet.writeD(_sweepable ? 1 : 0); // sweepable (blue glow)
|
||||
packet.writeD(_staticRes ? 1 : 0); // 6d 04 00 00 00 - to FIXED
|
||||
packet.writeD((_clan.getFortId() > 0) || isInFortDefense ? 1 : 0); // 6d 05 00 00 00 - to fortress
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00); // 6d 01 00 00 00 - to hide away
|
||||
packet.writeD(0x00); // 6d 02 00 00 00 - to castle
|
||||
packet.writeD(0x00); // 6d 03 00 00 00 - to siege HQ
|
||||
packet.writeD(_sweepable ? 0x01 : 0x00); // sweepable (blue glow)
|
||||
packet.writeD(_staticRes ? 0x01 : 0x00); // 6d 04 00 00 00 - to FIXED
|
||||
packet.writeD(0x00); // 6d 05 00 00 00 - to fortress
|
||||
packet.writeD(0); // 6d 01 00 00 00 - to hide away
|
||||
packet.writeD(0); // 6d 02 00 00 00 - to castle
|
||||
packet.writeD(0); // 6d 03 00 00 00 - to siege HQ
|
||||
packet.writeD(_sweepable ? 1 : 0); // sweepable (blue glow)
|
||||
packet.writeD(_staticRes ? 1 : 0); // 6d 04 00 00 00 - to FIXED
|
||||
packet.writeD(0); // 6d 05 00 00 00 - to fortress
|
||||
}
|
||||
// TODO: protocol 152
|
||||
// packet.writeC(0); // show die animation
|
||||
|
||||
@@ -43,15 +43,13 @@ public class DropItem implements IClientOutgoingPacket
|
||||
packet.writeD(_objectId);
|
||||
packet.writeD(_item.getObjectId());
|
||||
packet.writeD(_item.getDisplayId());
|
||||
|
||||
packet.writeD(_item.getX());
|
||||
packet.writeD(_item.getY());
|
||||
packet.writeD(_item.getZ());
|
||||
// only show item count if it is a stackable item
|
||||
packet.writeD(_item.isStackable() ? 0x01 : 0x00);
|
||||
packet.writeD(_item.isStackable() ? 1 : 0);
|
||||
packet.writeQ(_item.getCount());
|
||||
|
||||
packet.writeD(0x01); // unknown
|
||||
packet.writeD(1); // unknown
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class Earthquake implements IClientOutgoingPacket
|
||||
packet.writeD(_z);
|
||||
packet.writeD(_intensity);
|
||||
packet.writeD(_duration);
|
||||
packet.writeD(0x00); // Unknown
|
||||
packet.writeD(0); // Unknown
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
*/
|
||||
public class Ex2ndPasswordAck implements IClientOutgoingPacket
|
||||
{
|
||||
int _response;
|
||||
public static final int SUCCESS = 0;
|
||||
public static final int WRONG_PATTERN = 1;
|
||||
|
||||
public static final int SUCCESS = 0x00;
|
||||
public static final int WRONG_PATTERN = 0x01;
|
||||
int _response;
|
||||
|
||||
public Ex2ndPasswordAck(int response)
|
||||
{
|
||||
@@ -38,9 +38,9 @@ public class Ex2ndPasswordAck implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_2ND_PASSWORD_ACK.writeId(packet);
|
||||
packet.writeC(0x00);
|
||||
packet.writeD(_response == WRONG_PATTERN ? 0x01 : 0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeC(0);
|
||||
packet.writeD(_response == WRONG_PATTERN ? 1 : 0);
|
||||
packet.writeD(0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
*/
|
||||
public class Ex2ndPasswordCheck implements IClientOutgoingPacket
|
||||
{
|
||||
public static final int PASSWORD_NEW = 0x00;
|
||||
public static final int PASSWORD_PROMPT = 0x01;
|
||||
public static final int PASSWORD_OK = 0x02;
|
||||
public static final int PASSWORD_NEW = 0;
|
||||
public static final int PASSWORD_PROMPT = 1;
|
||||
public static final int PASSWORD_OK = 2;
|
||||
|
||||
private final int _windowType;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Ex2ndPasswordCheck implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.EX_2ND_PASSWORD_CHECK.writeId(packet);
|
||||
packet.writeD(_windowType);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
*/
|
||||
public class Ex2ndPasswordVerify implements IClientOutgoingPacket
|
||||
{
|
||||
public static final int PASSWORD_OK = 0x00;
|
||||
public static final int PASSWORD_WRONG = 0x01;
|
||||
public static final int PASSWORD_BAN = 0x02;
|
||||
public static final int PASSWORD_OK = 0;
|
||||
public static final int PASSWORD_WRONG = 1;
|
||||
public static final int PASSWORD_BAN = 2;
|
||||
|
||||
private final int _wrongTentatives;
|
||||
private final int _mode;
|
||||
|
||||
@@ -50,13 +50,11 @@ public class ExAirShipInfo implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_AIRSHIP_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(_ship.getObjectId());
|
||||
packet.writeD(_x);
|
||||
packet.writeD(_y);
|
||||
packet.writeD(_z);
|
||||
packet.writeD(_heading);
|
||||
|
||||
packet.writeD(_captain);
|
||||
packet.writeD(_moveSpeed);
|
||||
packet.writeD(_rotationSpeed);
|
||||
@@ -73,14 +71,13 @@ public class ExAirShipInfo implements IClientOutgoingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
}
|
||||
|
||||
packet.writeD(_ship.getFuel());
|
||||
packet.writeD(_ship.getMaxFuel());
|
||||
return true;
|
||||
|
||||
@@ -41,7 +41,6 @@ public class ExAirShipTeleportList implements IClientOutgoingPacket
|
||||
if (_teleports != null)
|
||||
{
|
||||
packet.writeD(_teleports.length);
|
||||
|
||||
VehiclePathPoint[] path;
|
||||
VehiclePathPoint dst;
|
||||
for (int i = 0; i < _teleports.length; i++)
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ExBaseAttributeCancelResult implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BASE_ATTRIBUTE_CANCEL_RESULT.writeId(packet);
|
||||
packet.writeD(0x01); // result
|
||||
packet.writeD(1); // result
|
||||
packet.writeD(_objId);
|
||||
packet.writeD(_attribute);
|
||||
return true;
|
||||
|
||||
@@ -63,6 +63,7 @@ public class ExBasicActionList implements IClientOutgoingPacket
|
||||
1096, 1097, 1098
|
||||
};
|
||||
//@formatter:on
|
||||
|
||||
public static final int[] DEFAULT_ACTION_LIST;
|
||||
static
|
||||
{
|
||||
@@ -75,12 +76,10 @@ public class ExBasicActionList implements IClientOutgoingPacket
|
||||
{
|
||||
DEFAULT_ACTION_LIST[i] = i;
|
||||
}
|
||||
|
||||
for (i = count2; i-- > 0;)
|
||||
{
|
||||
DEFAULT_ACTION_LIST[count1 + i] = 1000 + i;
|
||||
}
|
||||
|
||||
for (i = count3; i-- > 0;)
|
||||
{
|
||||
DEFAULT_ACTION_LIST[count1 + count2 + i] = 5000 + i;
|
||||
|
||||
@@ -26,6 +26,12 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
*/
|
||||
public class ExBrBroadcastEventState implements IClientOutgoingPacket
|
||||
{
|
||||
public static final int APRIL_FOOLS = 20090401;
|
||||
public static final int EVAS_INFERNO = 20090801; // event state (0 - hide, 1 - show), day (1-14), percent (0-100)
|
||||
public static final int HALLOWEEN_EVENT = 20091031; // event state (0 - hide, 1 - show)
|
||||
public static final int RAISING_RUDOLPH = 20091225; // event state (0 - hide, 1 - show)
|
||||
public static final int LOVERS_JUBILEE = 20100214; // event state (0 - hide, 1 - show)
|
||||
|
||||
private final int _eventId;
|
||||
private final int _eventState;
|
||||
private int _param0;
|
||||
@@ -36,12 +42,6 @@ public class ExBrBroadcastEventState implements IClientOutgoingPacket
|
||||
private String _param5;
|
||||
private String _param6;
|
||||
|
||||
public static final int APRIL_FOOLS = 20090401;
|
||||
public static final int EVAS_INFERNO = 20090801; // event state (0 - hide, 1 - show), day (1-14), percent (0-100)
|
||||
public static final int HALLOWEEN_EVENT = 20091031; // event state (0 - hide, 1 - show)
|
||||
public static final int RAISING_RUDOLPH = 20091225; // event state (0 - hide, 1 - show)
|
||||
public static final int LOVERS_JUBILEE = 20100214; // event state (0 - hide, 1 - show)
|
||||
|
||||
public ExBrBroadcastEventState(int eventId, int eventState)
|
||||
{
|
||||
_eventId = eventId;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ExBrGamePoint implements IClientOutgoingPacket
|
||||
OutgoingPackets.EX_BR_GAME_POINT.writeId(packet);
|
||||
packet.writeD(_playerObj);
|
||||
packet.writeQ(_points);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,9 +40,7 @@ public class ExBrProductInfo implements IClientOutgoingPacket
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
OutgoingPackets.EX_BR_PRODUCT_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(_product.getProductId()); // product id
|
||||
packet.writeD(_product.getPrice()); // points
|
||||
packet.writeD(1); // components size
|
||||
|
||||
@@ -35,47 +35,44 @@ public class ExBrProductList implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.EX_BR_PRODUCT_LIST.writeId(packet);
|
||||
packet.writeD(_itemList.size());
|
||||
|
||||
for (PrimeShopProductHolder product : _itemList)
|
||||
{
|
||||
final int category = product.getCategory();
|
||||
packet.writeD(product.getProductId()); // product id
|
||||
packet.writeH(category); // category id
|
||||
packet.writeD(product.getPrice()); // points
|
||||
|
||||
switch (category)
|
||||
{
|
||||
case 6:
|
||||
{
|
||||
packet.writeD(0x01); // event
|
||||
packet.writeD(1); // event
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
packet.writeD(0x02); // best
|
||||
packet.writeD(2); // best
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
packet.writeD(0x03); // event & best
|
||||
packet.writeD(3); // event & best
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
packet.writeD(0x00); // normal
|
||||
packet.writeD(0); // normal
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
packet.writeD(0x00); // start sale
|
||||
packet.writeD(0x00); // end sale
|
||||
packet.writeC(0x00); // day week
|
||||
packet.writeC(0x00); // start hour
|
||||
packet.writeC(0x00); // start min
|
||||
packet.writeC(0x00); // end hour
|
||||
packet.writeC(0x00); // end min
|
||||
packet.writeD(0x00); // current stock
|
||||
packet.writeD(0x00); // max stock
|
||||
packet.writeD(0); // start sale
|
||||
packet.writeD(0); // end sale
|
||||
packet.writeC(0); // day week
|
||||
packet.writeC(0); // start hour
|
||||
packet.writeC(0); // start min
|
||||
packet.writeC(0); // end hour
|
||||
packet.writeC(0); // end min
|
||||
packet.writeD(0); // current stock
|
||||
packet.writeD(0); // max stock
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ public class ExBrRecentProductList implements IClientOutgoingPacket
|
||||
public ExBrRecentProductList(Player player)
|
||||
{
|
||||
final int playerObj = player.getObjectId();
|
||||
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("SELECT productId FROM prime_shop_transactions WHERE charId=? ORDER BY transactionTime DESC"))
|
||||
{
|
||||
@@ -70,26 +69,23 @@ public class ExBrRecentProductList implements IClientOutgoingPacket
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
OutgoingPackets.EX_BR_RECENT_PRODUCT_LIST.writeId(packet);
|
||||
packet.writeD(_itemList.size());
|
||||
|
||||
for (PrimeShopProductHolder product : _itemList)
|
||||
{
|
||||
packet.writeD(product.getProductId());
|
||||
packet.writeH(product.getCategory());
|
||||
packet.writeD(product.getPrice());
|
||||
packet.writeD(0x00); // category
|
||||
|
||||
packet.writeD(0x00); // start sale
|
||||
packet.writeD(0x00); // end sale
|
||||
packet.writeC(0x00); // day week
|
||||
packet.writeC(0x00); // start hour
|
||||
packet.writeC(0x00); // start min
|
||||
packet.writeC(0x00); // end hour
|
||||
packet.writeC(0x00); // end min
|
||||
packet.writeD(0x00); // current stock
|
||||
packet.writeD(0x00); // max stock
|
||||
packet.writeD(0); // category
|
||||
packet.writeD(0); // start sale
|
||||
packet.writeD(0); // end sale
|
||||
packet.writeC(0); // day week
|
||||
packet.writeC(0); // start hour
|
||||
packet.writeC(0); // start min
|
||||
packet.writeC(0); // end hour
|
||||
packet.writeC(0); // end min
|
||||
packet.writeD(0); // current stock
|
||||
packet.writeD(0); // max stock
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -47,8 +47,7 @@ public class ExBuySellList extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BUY_SELL_LIST.writeId(packet);
|
||||
packet.writeD(0x01);
|
||||
|
||||
packet.writeD(1);
|
||||
if ((_sellList != null))
|
||||
{
|
||||
packet.writeH(_sellList.size());
|
||||
@@ -60,9 +59,8 @@ public class ExBuySellList extends AbstractItemPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0);
|
||||
}
|
||||
|
||||
if ((_refundList != null) && !_refundList.isEmpty())
|
||||
{
|
||||
packet.writeH(_refundList.size());
|
||||
@@ -76,10 +74,9 @@ public class ExBuySellList extends AbstractItemPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeH(0x00);
|
||||
packet.writeH(0);
|
||||
}
|
||||
|
||||
packet.writeC(_done ? 0x01 : 0x00);
|
||||
packet.writeC(_done ? 1 : 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,6 @@ public class ExColosseumFenceInfo implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_COLOSSEUM_FENCE_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(_objId);
|
||||
packet.writeD(_clientState);
|
||||
packet.writeD(_x);
|
||||
@@ -62,7 +61,6 @@ public class ExColosseumFenceInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_z);
|
||||
packet.writeD(_width);
|
||||
packet.writeD(_length);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ExConfirmAddingContact implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.EX_CONFIRM_ADDING_POST_FRIEND.writeId(packet);
|
||||
packet.writeS(_charName);
|
||||
packet.writeD(_added ? 0x01 : 0x00);
|
||||
packet.writeD(_added ? 1 : 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,12 +43,9 @@ public class ExCubeGameAddPlayer implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BLOCK_UP_SET_LIST.writeId(packet);
|
||||
|
||||
packet.writeD(0x01);
|
||||
|
||||
packet.writeD(1);
|
||||
packet.writeD(0xffffffff);
|
||||
|
||||
packet.writeD(_isRedTeam ? 0x01 : 0x00);
|
||||
packet.writeD(_isRedTeam ? 1 : 0);
|
||||
packet.writeD(_player.getObjectId());
|
||||
packet.writeS(_player.getName());
|
||||
return true;
|
||||
|
||||
@@ -45,8 +45,7 @@ public class ExCubeGameChangePoints implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BLOCK_UP_SET_STATE.writeId(packet);
|
||||
packet.writeD(0x02);
|
||||
|
||||
packet.writeD(2);
|
||||
packet.writeD(_timeLeft);
|
||||
packet.writeD(_bluePoints);
|
||||
packet.writeD(_redPoints);
|
||||
|
||||
@@ -43,11 +43,10 @@ public class ExCubeGameChangeTeam implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BLOCK_UP_SET_LIST.writeId(packet);
|
||||
packet.writeD(0x05);
|
||||
|
||||
packet.writeD(5);
|
||||
packet.writeD(_player.getObjectId());
|
||||
packet.writeD(_fromRedTeam ? 0x01 : 0x00);
|
||||
packet.writeD(_fromRedTeam ? 0x00 : 0x01);
|
||||
packet.writeD(_fromRedTeam ? 1 : 0);
|
||||
packet.writeD(_fromRedTeam ? 0 : 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -39,8 +39,7 @@ public class ExCubeGameChangeTimeToStart implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BLOCK_UP_SET_LIST.writeId(packet);
|
||||
packet.writeD(0x03);
|
||||
|
||||
packet.writeD(3);
|
||||
packet.writeD(_seconds);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -40,9 +40,8 @@ public class ExCubeGameEnd implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BLOCK_UP_SET_STATE.writeId(packet);
|
||||
packet.writeD(0x01);
|
||||
|
||||
packet.writeD(_isRedTeamWin ? 0x01 : 0x00);
|
||||
packet.writeD(1);
|
||||
packet.writeD(_isRedTeamWin ? 1 : 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -55,13 +55,11 @@ public class ExCubeGameExtendedChangePoints implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BLOCK_UP_SET_STATE.writeId(packet);
|
||||
packet.writeD(0x00);
|
||||
|
||||
packet.writeD(0);
|
||||
packet.writeD(_timeLeft);
|
||||
packet.writeD(_bluePoints);
|
||||
packet.writeD(_redPoints);
|
||||
|
||||
packet.writeD(_isRedTeam ? 0x01 : 0x00);
|
||||
packet.writeD(_isRedTeam ? 1 : 0);
|
||||
packet.writeD(_player.getObjectId());
|
||||
packet.writeD(_playerPoints);
|
||||
return true;
|
||||
|
||||
@@ -43,11 +43,9 @@ public class ExCubeGameRemovePlayer implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BLOCK_UP_SET_LIST.writeId(packet);
|
||||
packet.writeD(0x02);
|
||||
|
||||
packet.writeD(2);
|
||||
packet.writeD(0xffffffff);
|
||||
|
||||
packet.writeD(_isRedTeam ? 0x01 : 0x00);
|
||||
packet.writeD(_isRedTeam ? 1 : 0);
|
||||
packet.writeD(_player.getObjectId());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ExCubeGameRequestReady implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BLOCK_UP_SET_LIST.writeId(packet);
|
||||
packet.writeD(0x04);
|
||||
packet.writeD(4);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,6 @@ public class ExCubeGameTeamList implements IClientOutgoingPacket
|
||||
// Players Lists
|
||||
List<Player> _bluePlayers;
|
||||
List<Player> _redPlayers;
|
||||
|
||||
// Common Values
|
||||
int _roomNumber;
|
||||
|
||||
@@ -51,11 +50,9 @@ public class ExCubeGameTeamList implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_BLOCK_UP_SET_LIST.writeId(packet);
|
||||
packet.writeD(0x00);
|
||||
|
||||
packet.writeD(0);
|
||||
packet.writeD(_roomNumber);
|
||||
packet.writeD(0xffffffff);
|
||||
|
||||
packet.writeD(_bluePlayers.size());
|
||||
for (Player player : _bluePlayers)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,6 @@ public class ExCursedWeaponList implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_CURSED_WEAPON_LIST.writeId(packet);
|
||||
|
||||
packet.writeD(_cursedWeaponIds.size());
|
||||
for (int i : _cursedWeaponIds)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,6 @@ public class ExCursedWeaponLocation implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_CURSED_WEAPON_LOCATION.writeId(packet);
|
||||
|
||||
if (!_cursedWeaponInfo.isEmpty())
|
||||
{
|
||||
packet.writeD(_cursedWeaponInfo.size());
|
||||
@@ -47,7 +46,6 @@ public class ExCursedWeaponLocation implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(w.id);
|
||||
packet.writeD(w.activated);
|
||||
|
||||
packet.writeD(w.pos.getX());
|
||||
packet.writeD(w.pos.getY());
|
||||
packet.writeD(w.pos.getZ());
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ExDominionWarStart implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.EX_DOMINION_WAR_START.writeId(packet);
|
||||
packet.writeD(_objId);
|
||||
packet.writeD(0x01); // ??
|
||||
packet.writeD(1); // ??
|
||||
packet.writeD(_terId);
|
||||
packet.writeD(_isDisguised ? 1 : 0);
|
||||
packet.writeD(_isDisguised ? _terId : 0);
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final List<Integer> _routes = new ArrayList<>(); // skill levels for each route
|
||||
|
||||
private final int _id;
|
||||
private final int _level;
|
||||
private boolean _maxEnchanted = false;
|
||||
@@ -37,7 +36,6 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
||||
{
|
||||
_id = id;
|
||||
_level = level;
|
||||
|
||||
final EnchantSkillLearn enchantLearn = EnchantSkillGroupsData.getInstance().getSkillEnchantmentBySkillId(_id);
|
||||
// do we have this skill?
|
||||
if (enchantLearn != null)
|
||||
@@ -46,16 +44,13 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
||||
if (_level > 100)
|
||||
{
|
||||
_maxEnchanted = enchantLearn.isMaxEnchant(_level);
|
||||
|
||||
// get detail for next level
|
||||
final EnchantSkillHolder esd = enchantLearn.getEnchantSkillHolder(_level);
|
||||
|
||||
// if it exists add it
|
||||
if (esd != null)
|
||||
{
|
||||
_routes.add(_level); // current enchant add firts
|
||||
}
|
||||
|
||||
final int skillLevel = (_level % 100);
|
||||
for (int route : enchantLearn.getAllRoutes())
|
||||
{
|
||||
@@ -89,7 +84,6 @@ public class ExEnchantSkillInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_maxEnchanted ? 0 : 1);
|
||||
packet.writeD(_level > 100 ? 1 : 0); // enchanted?
|
||||
packet.writeD(_routes.size());
|
||||
|
||||
for (int level : _routes)
|
||||
{
|
||||
packet.writeD(level);
|
||||
|
||||
@@ -20,8 +20,8 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.EnchantSkillGroupsData;
|
||||
import org.l2jmobius.gameserver.model.EnchantSkillGroup.EnchantSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.EnchantSkillLearn;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
@@ -61,12 +61,10 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
||||
esd = enchantLearn.getFirstRouteGroup().getEnchantGroupDetails().get(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (esd == null)
|
||||
{
|
||||
throw new IllegalArgumentException("Skill " + skillId + " dont have enchant data for level " + skillLevel);
|
||||
}
|
||||
|
||||
if (type == 0)
|
||||
{
|
||||
multi = EnchantSkillGroupsData.NORMAL_ENCHANT_COST_MULTIPLIER;
|
||||
@@ -85,7 +83,6 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
||||
_type = type;
|
||||
_skillId = skillId;
|
||||
_skillLevel = skillLevel;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case TYPE_NORMAL_ENCHANT:
|
||||
@@ -117,7 +114,6 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ((type != TYPE_SAFE_ENCHANT) && !Config.ES_SP_BOOK_NEEDED)
|
||||
{
|
||||
reqCount = 0;
|
||||
@@ -133,7 +129,7 @@ public class ExEnchantSkillInfoDetail implements IClientOutgoingPacket
|
||||
packet.writeD(_skillLevel);
|
||||
packet.writeD(_sp * multi); // sp
|
||||
packet.writeD(_chance); // exp
|
||||
packet.writeD(0x02); // items count?
|
||||
packet.writeD(2); // items count?
|
||||
packet.writeD(Inventory.ADENA_ID); // Adena
|
||||
packet.writeD(_adenacount); // Adena count
|
||||
packet.writeD(bookId); // ItemId Required
|
||||
|
||||
@@ -50,7 +50,6 @@ public class ExFishingHpRegen implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_FISHING_HP_REGEN.writeId(packet);
|
||||
|
||||
packet.writeD(_creature.getObjectId());
|
||||
packet.writeD(_time);
|
||||
packet.writeD(_fishHP);
|
||||
|
||||
@@ -51,8 +51,8 @@ public class ExFishingStart implements IClientOutgoingPacket
|
||||
packet.writeD(_x); // x position
|
||||
packet.writeD(_y); // y position
|
||||
packet.writeD(_z); // z position
|
||||
packet.writeC(_isNightLure ? 0x01 : 0x00); // night lure
|
||||
packet.writeC(0x00); // show fish rank result button
|
||||
packet.writeC(_isNightLure ? 1 : 0); // night lure
|
||||
packet.writeC(0); // show fish rank result button
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -37,10 +37,9 @@ public class ExGetBookMarkInfoPacket implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_GET_BOOKMARK_INFO.writeId(packet);
|
||||
packet.writeD(0x00); // Dummy
|
||||
packet.writeD(0); // Dummy
|
||||
packet.writeD(_player.getBookmarkSlot());
|
||||
packet.writeD(_player.getTeleportBookmarks().size());
|
||||
|
||||
for (TeleportBookmark tpbm : _player.getTeleportBookmarks())
|
||||
{
|
||||
packet.writeD(tpbm.getId());
|
||||
|
||||
@@ -46,10 +46,10 @@ public class ExGetBossRecord implements IClientOutgoingPacket
|
||||
packet.writeD(_totalPoints);
|
||||
if (_bossRecordInfo == null)
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -58,7 +58,7 @@ public class ExGetBossRecord implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(entry.getKey());
|
||||
packet.writeD(entry.getValue());
|
||||
packet.writeD(0x00); // ??
|
||||
packet.writeD(0); // ??
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ExGetPremiumItemList implements IClientOutgoingPacket
|
||||
packet.writeD(_player.getObjectId());
|
||||
packet.writeD(item.getItemId());
|
||||
packet.writeQ(item.getCount());
|
||||
packet.writeD(0x00); // ?
|
||||
packet.writeD(0); // ?
|
||||
packet.writeS(item.getSender());
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -41,7 +41,6 @@ public class ExHeroList implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.EX_HERO_LIST.writeId(packet);
|
||||
packet.writeD(_heroList.size());
|
||||
|
||||
for (StatSet hero : _heroList.values())
|
||||
{
|
||||
packet.writeS(hero.getString(Olympiad.CHAR_NAME));
|
||||
|
||||
@@ -38,7 +38,6 @@ public class ExItemAuctionInfoPacket extends AbstractItemPacket
|
||||
{
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
if (currentAuction.getAuctionState() != ItemAuctionState.STARTED)
|
||||
{
|
||||
_timeRemaining = 0;
|
||||
@@ -47,7 +46,6 @@ public class ExItemAuctionInfoPacket extends AbstractItemPacket
|
||||
{
|
||||
_timeRemaining = (int) (currentAuction.getFinishingTimeRemaining() / 1000); // in seconds
|
||||
}
|
||||
|
||||
_refresh = refresh;
|
||||
_currentAuction = currentAuction;
|
||||
_nextAuction = nextAuction;
|
||||
@@ -57,15 +55,12 @@ public class ExItemAuctionInfoPacket extends AbstractItemPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_ITEM_AUCTION_INFO.writeId(packet);
|
||||
packet.writeC(_refresh ? 0x00 : 0x01);
|
||||
packet.writeC(_refresh ? 0 : 1);
|
||||
packet.writeD(_currentAuction.getInstanceId());
|
||||
|
||||
final ItemAuctionBid highestBid = _currentAuction.getHighestBid();
|
||||
packet.writeQ(highestBid != null ? highestBid.getLastBid() : _currentAuction.getAuctionInitBid());
|
||||
|
||||
packet.writeD(_timeRemaining);
|
||||
writeItem(packet, _currentAuction.getItemInfo());
|
||||
|
||||
if (_nextAuction != null)
|
||||
{
|
||||
packet.writeQ(_nextAuction.getAuctionInitBid());
|
||||
|
||||
@@ -56,29 +56,24 @@ public class ExListPartyMatchingWaitingRoom implements IClientOutgoingPacket
|
||||
packet.writeD(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
for (Player cha : PartyMatchWaitingList.getInstance().getPlayers())
|
||||
{
|
||||
if ((cha == null) || (cha == _player))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!cha.isPartyWaiting())
|
||||
{
|
||||
PartyMatchWaitingList.getInstance().removePlayer(cha);
|
||||
continue;
|
||||
}
|
||||
|
||||
else if ((cha.getLevel() < _minLevel) || (cha.getLevel() > _maxLevel))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
_members.add(cha);
|
||||
}
|
||||
|
||||
packet.writeD(0x01); // Page?
|
||||
packet.writeD(1); // Page?
|
||||
packet.writeD(_members.size());
|
||||
for (Player member : _members)
|
||||
{
|
||||
|
||||
@@ -61,11 +61,11 @@ public class ExManagePartyRoomMember implements IClientOutgoingPacket
|
||||
{
|
||||
if ((_room.getOwner().isInParty() && _player.isInParty()) && (_room.getOwner().getParty().getLeaderObjectId() == _player.getParty().getLeaderObjectId()))
|
||||
{
|
||||
packet.writeD(0x02);
|
||||
packet.writeD(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -40,13 +40,10 @@ public class ExMultiPartyCommandChannelInfo implements IClientOutgoingPacket
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
OutgoingPackets.EX_MULTI_PARTY_COMMAND_CHANNEL_INFO.writeId(packet);
|
||||
|
||||
packet.writeS(_channel.getLeader().getName());
|
||||
packet.writeD(0x00); // Channel loot 0 or 1
|
||||
packet.writeD(0); // Channel loot 0 or 1
|
||||
packet.writeD(_channel.getMemberCount());
|
||||
|
||||
packet.writeD(_channel.getParties().size());
|
||||
for (Party p : _channel.getParties())
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ExNevitAdventTimeChange implements IClientOutgoingPacket
|
||||
{
|
||||
OutgoingPackets.EX_NAVIT_ADVENT_TIME_CHANGE.writeId(packet);
|
||||
// state 0 - pause 1 - started
|
||||
packet.writeC(_paused ? 0x00 : 0x01);
|
||||
packet.writeC(_paused ? 0 : 1);
|
||||
// left time in ms max is 16000 its 4m and state is automatically changed to quit
|
||||
packet.writeD(_time);
|
||||
return true;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ExNoticePostArrived implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_NOTICE_POST_ARRIVED.writeId(packet);
|
||||
packet.writeD(_showAnim ? 0x01 : 0x00);
|
||||
packet.writeD(_showAnim ? 1 : 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ExNoticePostSent implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_NOTICE_POST_SENT.writeId(packet);
|
||||
packet.writeD(_showAnim ? 0x01 : 0x00);
|
||||
packet.writeD(_showAnim ? 1 : 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,18 +56,15 @@ public class ExOlympiadMatchList implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_RECEIVE_OLYMPIAD.writeId(packet);
|
||||
packet.writeD(0x00); // Type 0 = Match List, 1 = Match Result
|
||||
|
||||
packet.writeD(0); // Type 0 = Match List, 1 = Match Result
|
||||
packet.writeD(_games.size());
|
||||
packet.writeD(0x00);
|
||||
|
||||
packet.writeD(0);
|
||||
for (OlympiadGameTask curGame : _games)
|
||||
{
|
||||
final AbstractOlympiadGame game = curGame.getGame();
|
||||
if (game != null)
|
||||
{
|
||||
packet.writeD(game.getStadiumId()); // Stadium Id (Arena 1 = 0)
|
||||
|
||||
if (game instanceof OlympiadGameNonClassed)
|
||||
{
|
||||
packet.writeD(1);
|
||||
@@ -84,8 +81,7 @@ public class ExOlympiadMatchList implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(0);
|
||||
}
|
||||
|
||||
packet.writeD(curGame.isRunning() ? 0x02 : 0x01); // (1 = Standby, 2 = Playing)
|
||||
packet.writeD(curGame.isRunning() ? 2 : 1); // (1 = Standby, 2 = Playing)
|
||||
packet.writeS(game.getPlayerNames()[0]); // Player 1 Name
|
||||
packet.writeS(game.getPlayerNames()[1]); // Player 2 Name
|
||||
}
|
||||
|
||||
@@ -53,8 +53,7 @@ public class ExOlympiadMatchResult implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_RECEIVE_OLYMPIAD.writeId(packet);
|
||||
packet.writeD(0x01); // Type 0 = Match List, 1 = Match Result
|
||||
|
||||
packet.writeD(1); // Type 0 = Match List, 1 = Match Result
|
||||
packet.writeD(_tie ? 1 : 0); // 0 - win, 1 - tie
|
||||
packet.writeS(_winnerList.get(0).getName());
|
||||
packet.writeD(_winTeam);
|
||||
@@ -69,7 +68,6 @@ public class ExOlympiadMatchResult implements IClientOutgoingPacket
|
||||
packet.writeD(info.getCurrentPoints());
|
||||
packet.writeD(info.getDiffPoints());
|
||||
}
|
||||
|
||||
packet.writeD(_loseTeam);
|
||||
packet.writeD(_loserList.size());
|
||||
for (OlympiadInfo info : _loserList)
|
||||
|
||||
@@ -90,7 +90,6 @@ public class ExOlympiadUserInfo implements IClientOutgoingPacket
|
||||
packet.writeS(_par.getName());
|
||||
packet.writeD(_par.getBaseClass());
|
||||
}
|
||||
|
||||
packet.writeD(_curHp);
|
||||
packet.writeD(_maxHp);
|
||||
packet.writeD(_curCp);
|
||||
|
||||
@@ -50,20 +50,20 @@ public class ExPartyRoomMember implements IClientOutgoingPacket
|
||||
packet.writeD(_room.getLocation());
|
||||
if (_room.getOwner().equals(member))
|
||||
{
|
||||
packet.writeD(0x01);
|
||||
packet.writeD(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((_room.getOwner().isInParty() && member.isInParty()) && (_room.getOwner().getParty().getLeaderObjectId() == member.getParty().getLeaderObjectId()))
|
||||
{
|
||||
packet.writeD(0x02);
|
||||
packet.writeD(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
}
|
||||
}
|
||||
packet.writeD(0x00); // TODO: Instance datas there is more if that is not 0!
|
||||
packet.writeD(0); // TODO: Instance datas there is more if that is not 0!
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ExPledgeEmblem implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_PLEDGE_EMBLEM.writeId(packet);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeD(_crestId);
|
||||
if (_data != null)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ExPutItemResultForVariationCancel implements IClientOutgoingPacket
|
||||
packet.writeD(_itemAug1);
|
||||
packet.writeD(_itemAug2);
|
||||
packet.writeQ(_price);
|
||||
packet.writeD(0x01);
|
||||
packet.writeD(1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ExPutItemResultForVariationMake implements IClientOutgoingPacket
|
||||
OutgoingPackets.EX_PUT_ITEM_RESULT_FOR_VARIATION_MAKE.writeId(packet);
|
||||
packet.writeD(_itemObjId);
|
||||
packet.writeD(_itemId);
|
||||
packet.writeD(0x01);
|
||||
packet.writeD(1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
/**
|
||||
* @author Migi, DS
|
||||
*/
|
||||
|
||||
public class ExReplyPostItemList extends AbstractItemPacket
|
||||
{
|
||||
Player _player;
|
||||
|
||||
@@ -56,11 +56,10 @@ public class ExReplyReceivedPost extends AbstractItemPacket
|
||||
OutgoingPackets.EX_REPLY_RECEIVED_POST.writeId(packet);
|
||||
packet.writeD(_msg.getId());
|
||||
packet.writeD(_msg.isLocked() ? 1 : 0);
|
||||
packet.writeD(0x00); // Unknown
|
||||
packet.writeD(0); // Unknown
|
||||
packet.writeS(_msg.getSenderName());
|
||||
packet.writeS(_msg.getSubject());
|
||||
packet.writeS(_msg.getContent());
|
||||
|
||||
if ((_items != null) && !_items.isEmpty())
|
||||
{
|
||||
packet.writeD(_items.size());
|
||||
@@ -72,9 +71,8 @@ public class ExReplyReceivedPost extends AbstractItemPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
}
|
||||
|
||||
packet.writeQ(_msg.getReqAdena());
|
||||
packet.writeD(_msg.hasAttachments() ? 1 : 0);
|
||||
packet.writeD(_msg.getSendBySystem());
|
||||
|
||||
@@ -60,7 +60,6 @@ public class ExReplySentPost extends AbstractItemPacket
|
||||
packet.writeS(_msg.getReceiverName());
|
||||
packet.writeS(_msg.getSubject());
|
||||
packet.writeS(_msg.getContent());
|
||||
|
||||
if ((_items != null) && !_items.isEmpty())
|
||||
{
|
||||
packet.writeD(_items.size());
|
||||
@@ -74,7 +73,7 @@ public class ExReplySentPost extends AbstractItemPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeQ(_msg.getReqAdena());
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ExRpItemLink implements IClientOutgoingPacket
|
||||
packet.writeQ(_item.getCount());
|
||||
packet.writeH(_item.getItem().getType2());
|
||||
packet.writeH(_item.getCustomType1());
|
||||
packet.writeH(_item.isEquipped() ? 0x01 : 0x00);
|
||||
packet.writeH(_item.isEquipped() ? 1 : 0);
|
||||
packet.writeD(_item.getItem().getBodyPart());
|
||||
packet.writeH(_item.getEnchantLevel());
|
||||
packet.writeH(_item.getCustomType2());
|
||||
@@ -52,7 +52,7 @@ public class ExRpItemLink implements IClientOutgoingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
}
|
||||
packet.writeD(_item.getMana());
|
||||
packet.writeD(_item.isTimeLimitedItem() ? (int) (_item.getRemainingTime() / 1000) : -9999);
|
||||
|
||||
@@ -34,7 +34,6 @@ public class ExSendManorList implements IClientOutgoingPacket
|
||||
{
|
||||
final List<Castle> castles = CastleManager.getInstance().getCastles();
|
||||
castles.sort(Comparator.comparing(Castle::getResidenceId));
|
||||
|
||||
OutgoingPackets.EX_SEND_MANOR_LIST.writeId(packet);
|
||||
packet.writeD(castles.size());
|
||||
for (Castle castle : castles)
|
||||
|
||||
@@ -391,9 +391,7 @@ public class ExServerPrimitive implements IClientOutgoingPacket
|
||||
packet.writeD(_z);
|
||||
packet.writeD(65535); // has to do something with display range and angle
|
||||
packet.writeD(65535); // has to do something with display range and angle
|
||||
|
||||
packet.writeD(_points.size() + _lines.size());
|
||||
|
||||
for (Point point : _points)
|
||||
{
|
||||
packet.writeC(1); // Its the type in this case Point
|
||||
@@ -407,7 +405,6 @@ public class ExServerPrimitive implements IClientOutgoingPacket
|
||||
packet.writeD(point.getY());
|
||||
packet.writeD(point.getZ());
|
||||
}
|
||||
|
||||
for (Line line : _lines)
|
||||
{
|
||||
packet.writeC(2); // Its the type in this case Line
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ExShowAgitInfo implements IClientOutgoingPacket
|
||||
packet.writeD(ch.getId());
|
||||
packet.writeS(ch.getOwnerId() <= 0 ? "" : ClanTable.getInstance().getClan(ch.getOwnerId()).getName()); // owner clan name
|
||||
packet.writeS(ch.getOwnerId() <= 0 ? "" : ClanTable.getInstance().getClan(ch.getOwnerId()).getLeaderName()); // leader name
|
||||
packet.writeD(ch.getGrade() > 0 ? 0x00 : 0x01); // 0 - auction 1 - war clanhall 2 - ETC (rainbow spring clanhall)
|
||||
packet.writeD(ch.getGrade() > 0 ? 0 : 1); // 0 - auction 1 - war clanhall 2 - ETC (rainbow spring clanhall)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ public class ExShowCropInfo implements IClientOutgoingPacket
|
||||
{
|
||||
_manorId = manorId;
|
||||
_hideButtons = hideButtons;
|
||||
|
||||
final CastleManorManager manor = CastleManorManager.getInstance();
|
||||
_crops = (nextPeriod && !manor.isManorApproved()) ? null : manor.getCropProcure(manorId, nextPeriod);
|
||||
}
|
||||
@@ -46,9 +45,9 @@ public class ExShowCropInfo implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_CROP_INFO.writeId(packet);
|
||||
packet.writeC(_hideButtons ? 0x01 : 0x00); // Hide "Crop Sales" button
|
||||
packet.writeC(_hideButtons ? 1 : 0); // Hide "Crop Sales" button
|
||||
packet.writeD(_manorId); // Manor ID
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
if (_crops == null)
|
||||
{
|
||||
packet.writeD(0);
|
||||
@@ -66,17 +65,17 @@ public class ExShowCropInfo implements IClientOutgoingPacket
|
||||
if (seed == null)
|
||||
{
|
||||
packet.writeD(0); // Seed level
|
||||
packet.writeC(0x01); // Reward 1
|
||||
packet.writeC(1); // Reward 1
|
||||
packet.writeD(0); // Reward 1 - item id
|
||||
packet.writeC(0x01); // Reward 2
|
||||
packet.writeC(1); // Reward 2
|
||||
packet.writeD(0); // Reward 2 - item id
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(seed.getLevel()); // Seed level
|
||||
packet.writeC(0x01); // Reward 1
|
||||
packet.writeC(1); // Reward 1
|
||||
packet.writeD(seed.getReward(1)); // Reward 1 - item id
|
||||
packet.writeC(0x01); // Reward 2
|
||||
packet.writeC(1); // Reward 2
|
||||
packet.writeD(seed.getReward(2)); // Reward 2 - item id
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,10 +62,8 @@ public class ExShowCropSetting implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_CROP_SETTING.writeId(packet);
|
||||
|
||||
packet.writeD(_manorId); // manor id
|
||||
packet.writeD(_seeds.size()); // size
|
||||
|
||||
CropProcure cp;
|
||||
for (Seed s : _seeds)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
public class ExShowDominionRegistry implements IClientOutgoingPacket
|
||||
{
|
||||
private static final int MINID = 80;
|
||||
|
||||
private final int _castleId;
|
||||
private int _clanReq = 0x00;
|
||||
private int _mercReq = 0x00;
|
||||
@@ -48,13 +49,13 @@ public class ExShowDominionRegistry implements IClientOutgoingPacket
|
||||
_clanReq = TerritoryWarManager.getInstance().getRegisteredClans(castleId).size();
|
||||
if (player.getClan() != null)
|
||||
{
|
||||
_isClanRegistered = (TerritoryWarManager.getInstance().getRegisteredClans(castleId).contains(player.getClan()) ? 0x01 : 0x00);
|
||||
_isClanRegistered = (TerritoryWarManager.getInstance().getRegisteredClans(castleId).contains(player.getClan()) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
if (TerritoryWarManager.getInstance().getRegisteredMercenaries(castleId) != null)
|
||||
{
|
||||
_mercReq = TerritoryWarManager.getInstance().getRegisteredMercenaries(castleId).size();
|
||||
_isMercRegistered = (TerritoryWarManager.getInstance().getRegisteredMercenaries(castleId).contains(player.getObjectId()) ? 0x01 : 0x00);
|
||||
_isMercRegistered = (TerritoryWarManager.getInstance().getRegisteredMercenaries(castleId).contains(player.getObjectId()) ? 1 : 0);
|
||||
}
|
||||
_warTime = (int) (TerritoryWarManager.getInstance().getTWStartTimeInMillis() / 1000);
|
||||
}
|
||||
@@ -94,7 +95,7 @@ public class ExShowDominionRegistry implements IClientOutgoingPacket
|
||||
packet.writeD(_currentTime); // Current Time
|
||||
packet.writeD(_isClanRegistered); // is Cancel clan registration
|
||||
packet.writeD(_isMercRegistered); // is Cancel mercenaries registration
|
||||
packet.writeD(0x01); // unknown
|
||||
packet.writeD(1); // unknown
|
||||
final List<Territory> territoryList = TerritoryWarManager.getInstance().getAllTerritories();
|
||||
packet.writeD(territoryList.size()); // Territory Count
|
||||
for (Territory t : territoryList)
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ExShowFortressInfo implements IClientOutgoingPacket
|
||||
final Clan clan = fort.getOwnerClan();
|
||||
packet.writeD(fort.getResidenceId());
|
||||
packet.writeS(clan != null ? clan.getName() : "");
|
||||
packet.writeD(fort.getSiege().isInProgress() ? 0x01 : 0x00);
|
||||
packet.writeD(fort.getSiege().isInProgress() ? 1 : 0);
|
||||
// Time of possession
|
||||
packet.writeD(fort.getOwnedTime());
|
||||
}
|
||||
|
||||
@@ -41,11 +41,9 @@ public class ExShowFortressMapInfo implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_FORTRESS_MAP_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(_fortress.getResidenceId());
|
||||
packet.writeD(_fortress.getSiege().isInProgress() ? 1 : 0); // fortress siege status
|
||||
packet.writeD(_fortress.getFortSize()); // barracks count
|
||||
|
||||
final List<FortSiegeSpawn> commanders = FortSiegeManager.getInstance().getCommanderSpawnList(_fortress.getResidenceId());
|
||||
if ((commanders != null) && !commanders.isEmpty() && _fortress.getSiege().isInProgress())
|
||||
{
|
||||
|
||||
@@ -50,7 +50,6 @@ public class ExShowFortressSiegeInfo implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_FORTRESS_SIEGE_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(_fortId); // Fortress Id
|
||||
packet.writeD(_size); // Total Barracks Count
|
||||
if (_csize > 0)
|
||||
@@ -63,22 +62,22 @@ public class ExShowFortressSiegeInfo implements IClientOutgoingPacket
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
packet.writeD(0x03);
|
||||
packet.writeD(3);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
packet.writeD(0x02);
|
||||
packet.writeD(2);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
packet.writeD(0x01);
|
||||
packet.writeD(1);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -91,27 +90,27 @@ public class ExShowFortressSiegeInfo implements IClientOutgoingPacket
|
||||
// TODO: once control room supported, update packet.writeD(0x0x) to support 5th room
|
||||
case 0:
|
||||
{
|
||||
packet.writeD(0x05);
|
||||
packet.writeD(5);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
packet.writeD(0x04);
|
||||
packet.writeD(4);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
packet.writeD(0x03);
|
||||
packet.writeD(3);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
packet.writeD(0x02);
|
||||
packet.writeD(2);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
packet.writeD(0x01);
|
||||
packet.writeD(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -123,7 +122,7 @@ public class ExShowFortressSiegeInfo implements IClientOutgoingPacket
|
||||
{
|
||||
for (int i = 0; i < _size; i++)
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class ExShowManorDefaultInfo implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_MANOR_DEFAULT_INFO.writeId(packet);
|
||||
packet.writeC(_hideButtons ? 0x01 : 0x00); // Hide "Seed Purchase" and "Crop Sales" buttons
|
||||
packet.writeC(_hideButtons ? 1 : 0); // Hide "Seed Purchase" and "Crop Sales" buttons
|
||||
packet.writeD(_crops.size());
|
||||
for (Seed crop : _crops)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,6 @@ public class ExShowOwnthingPos implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_OWNTHING_POS.writeId(packet);
|
||||
|
||||
if (TerritoryWarManager.getInstance().isTWInProgress())
|
||||
{
|
||||
final Collection<TerritoryWard> territoryWardList = TerritoryWarManager.getInstance().getAllTerritoryWards();
|
||||
@@ -46,7 +45,6 @@ public class ExShowOwnthingPos implements IClientOutgoingPacket
|
||||
for (TerritoryWard ward : territoryWardList)
|
||||
{
|
||||
packet.writeD(ward.getTerritoryId());
|
||||
|
||||
if (ward.getNpc() != null)
|
||||
{
|
||||
packet.writeD(ward.getNpc().getX());
|
||||
@@ -61,15 +59,15 @@ public class ExShowOwnthingPos implements IClientOutgoingPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -52,10 +52,8 @@ public class ExShowProcureCropDetail implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_PROCURE_CROP_DETAIL.writeId(packet);
|
||||
|
||||
packet.writeD(_cropId); // crop id
|
||||
packet.writeD(_castleCrops.size()); // size
|
||||
|
||||
for (Entry<Integer, CropProcure> entry : _castleCrops.entrySet())
|
||||
{
|
||||
final CropProcure crop = entry.getValue();
|
||||
|
||||
@@ -49,19 +49,19 @@ public class ExShowReceivedPostList implements IClientOutgoingPacket
|
||||
packet.writeD(msg.getId());
|
||||
packet.writeS(msg.getSubject());
|
||||
packet.writeS(msg.getSenderName());
|
||||
packet.writeD(msg.isLocked() ? 0x01 : 0x00);
|
||||
packet.writeD(msg.isLocked() ? 1 : 0);
|
||||
packet.writeD(msg.getExpirationSeconds());
|
||||
packet.writeD(msg.isUnread() ? 0x01 : 0x00);
|
||||
packet.writeD(0x01);
|
||||
packet.writeD(msg.hasAttachments() ? 0x01 : 0x00);
|
||||
packet.writeD(msg.isReturned() ? 0x01 : 0x00);
|
||||
packet.writeD(msg.isUnread() ? 1 : 0);
|
||||
packet.writeD(1);
|
||||
packet.writeD(msg.hasAttachments() ? 1 : 0);
|
||||
packet.writeD(msg.isReturned() ? 1 : 0);
|
||||
packet.writeD(msg.getSendBySystem());
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,16 @@ import org.l2jmobius.gameserver.network.SystemMessageId.SMLocalisation;
|
||||
*/
|
||||
public class ExShowScreenMessage implements IClientOutgoingPacket
|
||||
{
|
||||
// Positions
|
||||
public static final byte TOP_LEFT = 1;
|
||||
public static final byte TOP_CENTER = 2;
|
||||
public static final byte TOP_RIGHT = 3;
|
||||
public static final byte MIDDLE_LEFT = 4;
|
||||
public static final byte MIDDLE_CENTER = 5;
|
||||
public static final byte MIDDLE_RIGHT = 6;
|
||||
public static final byte BOTTOM_CENTER = 7;
|
||||
public static final byte BOTTOM_RIGHT = 8;
|
||||
|
||||
private final int _type;
|
||||
private final int _sysMessageId;
|
||||
private final int _unk1;
|
||||
@@ -48,15 +58,6 @@ public class ExShowScreenMessage implements IClientOutgoingPacket
|
||||
private List<String> _parameters;
|
||||
// Localisation related.
|
||||
private String _lang;
|
||||
// Positions
|
||||
public static final byte TOP_LEFT = 0x01;
|
||||
public static final byte TOP_CENTER = 0x02;
|
||||
public static final byte TOP_RIGHT = 0x03;
|
||||
public static final byte MIDDLE_LEFT = 0x04;
|
||||
public static final byte MIDDLE_CENTER = 0x05;
|
||||
public static final byte MIDDLE_RIGHT = 0x06;
|
||||
public static final byte BOTTOM_CENTER = 0x07;
|
||||
public static final byte BOTTOM_RIGHT = 0x08;
|
||||
|
||||
public void setLang(String lang)
|
||||
{
|
||||
@@ -237,7 +238,6 @@ public class ExShowScreenMessage implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_SCREEN_MESSAGE.writeId(packet);
|
||||
|
||||
// Localisation related.
|
||||
if (_lang != null)
|
||||
{
|
||||
@@ -256,9 +256,9 @@ public class ExShowScreenMessage implements IClientOutgoingPacket
|
||||
packet.writeD(_size);
|
||||
packet.writeD(_unk2);
|
||||
packet.writeD(_unk3);
|
||||
packet.writeD(_effect ? 0x01 : 0x00);
|
||||
packet.writeD(_effect ? 1 : 0);
|
||||
packet.writeD(_time);
|
||||
packet.writeD(_fade ? 0x01 : 0x00);
|
||||
packet.writeD(_fade ? 1 : 0);
|
||||
packet.writeD(-1);
|
||||
packet.writeS(sml.getLocalisation(_parameters != null ? _parameters : Collections.emptyList()));
|
||||
return true;
|
||||
@@ -280,9 +280,9 @@ public class ExShowScreenMessage implements IClientOutgoingPacket
|
||||
packet.writeD(_size);
|
||||
packet.writeD(_unk2);
|
||||
packet.writeD(_unk3);
|
||||
packet.writeD(_effect ? 0x01 : 0x00);
|
||||
packet.writeD(_effect ? 1 : 0);
|
||||
packet.writeD(_time);
|
||||
packet.writeD(_fade ? 0x01 : 0x00);
|
||||
packet.writeD(_fade ? 1 : 0);
|
||||
packet.writeD(-1);
|
||||
packet.writeS(nsl.getLocalisation(_parameters != null ? _parameters : Collections.emptyList()));
|
||||
return true;
|
||||
@@ -290,7 +290,6 @@ public class ExShowScreenMessage implements IClientOutgoingPacket
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
packet.writeD(_type);
|
||||
packet.writeD(_sysMessageId);
|
||||
packet.writeD(_position);
|
||||
@@ -298,9 +297,9 @@ public class ExShowScreenMessage implements IClientOutgoingPacket
|
||||
packet.writeD(_size);
|
||||
packet.writeD(_unk2);
|
||||
packet.writeD(_unk3);
|
||||
packet.writeD(_effect ? 0x01 : 0x00);
|
||||
packet.writeD(_effect ? 1 : 0);
|
||||
packet.writeD(_time);
|
||||
packet.writeD(_fade ? 0x01 : 0x00);
|
||||
packet.writeD(_fade ? 1 : 0);
|
||||
packet.writeD(_npcString);
|
||||
if (_npcString == -1)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,6 @@ public class ExShowSeedInfo implements IClientOutgoingPacket
|
||||
{
|
||||
_manorId = manorId;
|
||||
_hideButtons = hideButtons;
|
||||
|
||||
final CastleManorManager manor = CastleManorManager.getInstance();
|
||||
_seeds = (nextPeriod && !manor.isManorApproved()) ? null : manor.getSeedProduction(manorId, nextPeriod);
|
||||
}
|
||||
@@ -46,9 +45,9 @@ public class ExShowSeedInfo implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_SEED_INFO.writeId(packet);
|
||||
packet.writeC(_hideButtons ? 0x01 : 0x00); // Hide "Seed Purchase" button
|
||||
packet.writeC(_hideButtons ? 1 : 0); // Hide "Seed Purchase" button
|
||||
packet.writeD(_manorId); // Manor ID
|
||||
packet.writeD(0x00); // Unknown
|
||||
packet.writeD(0); // Unknown
|
||||
if (_seeds == null)
|
||||
{
|
||||
packet.writeD(0);
|
||||
@@ -65,17 +64,17 @@ public class ExShowSeedInfo implements IClientOutgoingPacket
|
||||
if (s == null)
|
||||
{
|
||||
packet.writeD(0); // Seed level
|
||||
packet.writeC(0x01); // Reward 1
|
||||
packet.writeC(1); // Reward 1
|
||||
packet.writeD(0); // Reward 1 - item id
|
||||
packet.writeC(0x01); // Reward 2
|
||||
packet.writeC(1); // Reward 2
|
||||
packet.writeD(0); // Reward 2 - item id
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(s.getLevel()); // Seed level
|
||||
packet.writeC(0x01); // Reward 1
|
||||
packet.writeC(1); // Reward 1
|
||||
packet.writeD(s.getReward(1)); // Reward 1 - item id
|
||||
packet.writeC(0x01); // Reward 2
|
||||
packet.writeC(1); // Reward 2
|
||||
packet.writeD(s.getReward(2)); // Reward 2 - item id
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ public class ExShowSeedMapInfo implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_SEED_MAP_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(ENTRANCES.length);
|
||||
for (Location loc : ENTRANCES)
|
||||
{
|
||||
|
||||
@@ -62,10 +62,8 @@ public class ExShowSeedSetting implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_SEED_SETTING.writeId(packet);
|
||||
|
||||
packet.writeD(_manorId); // manor id
|
||||
packet.writeD(_seeds.size()); // size
|
||||
|
||||
SeedProduction sp;
|
||||
for (Seed s : _seeds)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,6 @@ public class ExShowSellCropList implements IClientOutgoingPacket
|
||||
_cropsItems.put(cropId, item);
|
||||
}
|
||||
}
|
||||
|
||||
for (CropProcure crop : CastleManorManager.getInstance().getCropProcure(_manorId, false))
|
||||
{
|
||||
if (_cropsItems.containsKey(crop.getId()) && (crop.getAmount() > 0))
|
||||
@@ -61,7 +60,6 @@ public class ExShowSellCropList implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_SELL_CROP_LIST.writeId(packet);
|
||||
|
||||
packet.writeD(_manorId); // manor id
|
||||
packet.writeD(_cropsItems.size()); // size
|
||||
for (Item item : _cropsItems.values())
|
||||
@@ -70,9 +68,9 @@ public class ExShowSellCropList implements IClientOutgoingPacket
|
||||
packet.writeD(item.getObjectId()); // Object id
|
||||
packet.writeD(item.getId()); // crop id
|
||||
packet.writeD(seed.getLevel()); // seed level
|
||||
packet.writeC(0x01);
|
||||
packet.writeC(1);
|
||||
packet.writeD(seed.getReward(1)); // reward 1 id
|
||||
packet.writeC(0x01);
|
||||
packet.writeC(1);
|
||||
packet.writeD(seed.getReward(2)); // reward 2 id
|
||||
if (_castleCrops.containsKey(item.getId()))
|
||||
{
|
||||
@@ -85,9 +83,9 @@ public class ExShowSellCropList implements IClientOutgoingPacket
|
||||
else
|
||||
{
|
||||
packet.writeD(0xFFFFFFFF); // manor
|
||||
packet.writeQ(0x00); // buy residual
|
||||
packet.writeQ(0x00); // buy price
|
||||
packet.writeC(0x00); // reward
|
||||
packet.writeQ(0); // buy residual
|
||||
packet.writeQ(0); // buy price
|
||||
packet.writeC(0); // reward
|
||||
}
|
||||
packet.writeQ(item.getCount()); // my crops
|
||||
}
|
||||
|
||||
@@ -49,16 +49,16 @@ public class ExShowSentPostList implements IClientOutgoingPacket
|
||||
packet.writeD(msg.getId());
|
||||
packet.writeS(msg.getSubject());
|
||||
packet.writeS(msg.getReceiverName());
|
||||
packet.writeD(msg.isLocked() ? 0x01 : 0x00);
|
||||
packet.writeD(msg.isLocked() ? 1 : 0);
|
||||
packet.writeD(msg.getExpirationSeconds());
|
||||
packet.writeD(msg.isUnread() ? 0x01 : 0x00);
|
||||
packet.writeD(0x01);
|
||||
packet.writeD(msg.hasAttachments() ? 0x01 : 0x00);
|
||||
packet.writeD(msg.isUnread() ? 1 : 0);
|
||||
packet.writeD(1);
|
||||
packet.writeD(msg.hasAttachments() ? 1 : 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ public class ExShowTrace implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_TRACE.writeId(packet);
|
||||
|
||||
packet.writeH(0); // type broken in H5
|
||||
packet.writeD(0); // time broken in H5
|
||||
packet.writeH(_locations.size());
|
||||
|
||||
@@ -44,10 +44,9 @@ public class ExSpawnEmitter implements IClientOutgoingPacket
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SPAWN_EMITTER.writeId(packet);
|
||||
|
||||
packet.writeD(_npcObjectId);
|
||||
packet.writeD(_playerObjectId);
|
||||
packet.writeD(0x00); // ?
|
||||
packet.writeD(0); // ?
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user