Moved alchemy packets to seperate folders.

This commit is contained in:
MobiusDev
2015-11-16 20:33:26 +00:00
parent a4630cae9b
commit 3864680edd
9 changed files with 216 additions and 144 deletions

View File

@@ -16,7 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.serverpackets;
package com.l2jserver.gameserver.network.serverpackets.alchemy;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author Mobius
@@ -35,7 +37,7 @@ public class ExAlchemyConversion extends L2GameServerPacket
@Override
protected void writeImpl()
{
writeC(0x00); // Unk
writeC(0x00); // Unk???
writeD(_itemCount);
writeD(_failCount);
}

View File

@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.serverpackets;
package com.l2jserver.gameserver.network.serverpackets.alchemy;
import java.util.ArrayList;
import java.util.List;
@@ -24,12 +24,14 @@ import java.util.List;
import com.l2jserver.gameserver.data.xml.impl.SkillTreesData;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.skills.Skill;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author UnAfraid
*/
public class ExAlchemySkillList extends L2GameServerPacket
{
private final static int ALCHEMY_CUBE_SKILL = 17943;
private final List<Skill> _skills = new ArrayList<>();
public ExAlchemySkillList(final L2PcInstance player)
@@ -55,7 +57,7 @@ public class ExAlchemySkillList extends L2GameServerPacket
writeD(skill.getId());
writeD(skill.getLevel());
writeQ(0x00); // Always 0 on Naia, SP i guess?
writeC(0x01); // Always 1 on Naia
writeC(skill.getId() == ALCHEMY_CUBE_SKILL ? 0 : 1);
}
}
}

View File

@@ -16,32 +16,38 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.network.serverpackets;
package com.l2jserver.gameserver.network.serverpackets.alchemy;
import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
/**
* @author GenCloud
*/
public class ExTryMixCube extends L2GameServerPacket
{
private final int _stoneID;
private final long _count;
@SuppressWarnings("unused")
private final int _typePacket;
public static final L2GameServerPacket FAIL = new ExTryMixCube(6);
private final int _result;
private final int _itemId;
private final long _itemCount;
public ExTryMixCube(long count, int stoneId, int type)
public ExTryMixCube(final int result)
{
_count = count;
_typePacket = type;
_stoneID = stoneId;
_result = result;
_itemId = 0;
_itemCount = 0;
}
public ExTryMixCube(final int itemId, final long itemCount)
{
_result = 0;
_itemId = itemId;
_itemCount = itemCount;
}
@Override
protected void writeImpl()
{
writeC(0x00); // Unk
writeC(0x01); // Type
writeD(0x00); // Unk
writeD(_stoneID); // StoneID
writeQ(_count); // Count
writeC(_result);
writeD(0x01);
writeC(0x00);
writeD(_itemId);
writeQ(_itemCount);
}
}