Addition of ExElementalSpiritInfo.

This commit is contained in:
MobiusDevelopment
2019-05-10 23:22:32 +00:00
parent 70c8155f37
commit 2d494ab600
8 changed files with 186 additions and 14 deletions

View File

@@ -60,6 +60,7 @@ import org.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrys
import org.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel; import org.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel;
import org.l2jmobius.gameserver.network.clientpackets.dailymission.RequestOneDayRewardReceive; import org.l2jmobius.gameserver.network.clientpackets.dailymission.RequestOneDayRewardReceive;
import org.l2jmobius.gameserver.network.clientpackets.dailymission.RequestTodoList; import org.l2jmobius.gameserver.network.clientpackets.dailymission.RequestTodoList;
import org.l2jmobius.gameserver.network.clientpackets.elementalspirits.ExElementalSpiritInfo;
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestItemEnsoul; import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestItemEnsoul;
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestTryEnSoulExtraction; import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestTryEnSoulExtraction;
import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo; import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
@@ -421,7 +422,7 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
EX_CREATE_PLEDGE(0x14D, null, ConnectionState.IN_GAME), EX_CREATE_PLEDGE(0x14D, null, ConnectionState.IN_GAME),
EX_PLEDGE_ITEM_INFO(0x14E, null, ConnectionState.IN_GAME), EX_PLEDGE_ITEM_INFO(0x14E, null, ConnectionState.IN_GAME),
EX_PLEDGE_ITEM_BUY(0x14F, null, ConnectionState.IN_GAME), EX_PLEDGE_ITEM_BUY(0x14F, null, ConnectionState.IN_GAME),
EX_ELEMENTAL_SPIRIT_INFO(0x150, null, ConnectionState.IN_GAME), EX_ELEMENTAL_SPIRIT_INFO(0x150, ExElementalSpiritInfo::new, ConnectionState.IN_GAME),
EX_ELEMENTAL_SPIRIT_EXTRACT_INFO(0x151, null, ConnectionState.IN_GAME), EX_ELEMENTAL_SPIRIT_EXTRACT_INFO(0x151, null, ConnectionState.IN_GAME),
EX_ELEMENTAL_SPIRIT_EXTRACT(0x152, null, ConnectionState.IN_GAME), EX_ELEMENTAL_SPIRIT_EXTRACT(0x152, null, ConnectionState.IN_GAME),
EX_ELEMENTAL_SPIRIT_EVOLUTION_INFO(0x153, null, ConnectionState.IN_GAME), EX_ELEMENTAL_SPIRIT_EVOLUTION_INFO(0x153, null, ConnectionState.IN_GAME),

View File

@@ -0,0 +1,50 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2jmobius.gameserver.network.clientpackets.elementalspirits;
import org.l2jmobius.commons.network.PacketReader;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
/**
* @author Mobius
*/
public class ExElementalSpiritInfo implements IClientIncomingPacket
{
@SuppressWarnings("unused")
private int _id;
@Override
public boolean read(GameClient client, PacketReader packet)
{
_id = packet.readC();
return true;
}
@Override
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if (player == null)
{
return;
}
// player.sendPacket(new org.l2jmobius.gameserver.network.serverpackets.elementalspirits.ExElementalSpiritInfo());
}
}

View File

@@ -19,6 +19,7 @@ package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.Config; import org.l2jmobius.Config;
import org.l2jmobius.commons.network.PacketWriter; import org.l2jmobius.commons.network.PacketWriter;
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData; import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
import org.l2jmobius.gameserver.enums.AttributeType;
import org.l2jmobius.gameserver.enums.UserInfoType; import org.l2jmobius.gameserver.enums.UserInfoType;
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager; import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
import org.l2jmobius.gameserver.model.Party; import org.l2jmobius.gameserver.model.Party;
@@ -375,12 +376,12 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
if (containsMask(UserInfoType.ATT_SPIRITS)) // 152 if (containsMask(UserInfoType.ATT_SPIRITS)) // 152
{ {
packet.writeH(26); packet.writeH(26);
packet.writeD(-1); packet.writeD(_player.getAttackElementValue(_player.getAttackElement())); // Attribute Attack Power
packet.writeD(0x00); packet.writeD(_player.getDefenseElementValue(AttributeType.FIRE)); // Fire defence
packet.writeD(0x00); packet.writeD(_player.getDefenseElementValue(AttributeType.WATER)); // Water defence
packet.writeD(0x00); packet.writeD(_player.getDefenseElementValue(AttributeType.WIND)); // Wind defence
packet.writeD(0x00); packet.writeD(_player.getDefenseElementValue(AttributeType.EARTH)); // Earth defence
packet.writeD(0x00); packet.writeD(0x00); // Enabled 1 - Disabled 0 // Third class player?
} }
return true; return true;

View File

@@ -0,0 +1,34 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2jmobius.gameserver.network.serverpackets.elementalspirits;
import org.l2jmobius.commons.network.PacketWriter;
import org.l2jmobius.gameserver.network.OutgoingPackets;
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
/**
* @author Mobius
*/
public class ExElementalSpiritInfo implements IClientOutgoingPacket
{
@Override
public boolean write(PacketWriter packet)
{
OutgoingPackets.EX_ELEMENTAL_SPIRIT_INFO.writeId(packet);
return true;
}
}

View File

@@ -60,6 +60,7 @@ import org.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrys
import org.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel; import org.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel;
import org.l2jmobius.gameserver.network.clientpackets.dailymission.RequestOneDayRewardReceive; import org.l2jmobius.gameserver.network.clientpackets.dailymission.RequestOneDayRewardReceive;
import org.l2jmobius.gameserver.network.clientpackets.dailymission.RequestTodoList; import org.l2jmobius.gameserver.network.clientpackets.dailymission.RequestTodoList;
import org.l2jmobius.gameserver.network.clientpackets.elementalspirits.ExElementalSpiritInfo;
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestItemEnsoul; import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestItemEnsoul;
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestTryEnSoulExtraction; import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestTryEnSoulExtraction;
import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo; import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
@@ -421,7 +422,7 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
EX_CREATE_PLEDGE(0x14D, null, ConnectionState.IN_GAME), EX_CREATE_PLEDGE(0x14D, null, ConnectionState.IN_GAME),
EX_PLEDGE_ITEM_INFO(0x14E, null, ConnectionState.IN_GAME), EX_PLEDGE_ITEM_INFO(0x14E, null, ConnectionState.IN_GAME),
EX_PLEDGE_ITEM_BUY(0x14F, null, ConnectionState.IN_GAME), EX_PLEDGE_ITEM_BUY(0x14F, null, ConnectionState.IN_GAME),
EX_ELEMENTAL_SPIRIT_INFO(0x150, null, ConnectionState.IN_GAME), EX_ELEMENTAL_SPIRIT_INFO(0x150, ExElementalSpiritInfo::new, ConnectionState.IN_GAME),
EX_ELEMENTAL_SPIRIT_EXTRACT_INFO(0x151, null, ConnectionState.IN_GAME), EX_ELEMENTAL_SPIRIT_EXTRACT_INFO(0x151, null, ConnectionState.IN_GAME),
EX_ELEMENTAL_SPIRIT_EXTRACT(0x152, null, ConnectionState.IN_GAME), EX_ELEMENTAL_SPIRIT_EXTRACT(0x152, null, ConnectionState.IN_GAME),
EX_ELEMENTAL_SPIRIT_EVOLUTION_INFO(0x153, null, ConnectionState.IN_GAME), EX_ELEMENTAL_SPIRIT_EVOLUTION_INFO(0x153, null, ConnectionState.IN_GAME),

View File

@@ -0,0 +1,50 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2jmobius.gameserver.network.clientpackets.elementalspirits;
import org.l2jmobius.commons.network.PacketReader;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
/**
* @author Mobius
*/
public class ExElementalSpiritInfo implements IClientIncomingPacket
{
@SuppressWarnings("unused")
private int _id;
@Override
public boolean read(GameClient client, PacketReader packet)
{
_id = packet.readC();
return true;
}
@Override
public void run(GameClient client)
{
final PlayerInstance player = client.getPlayer();
if (player == null)
{
return;
}
// player.sendPacket(new org.l2jmobius.gameserver.network.serverpackets.elementalspirits.ExElementalSpiritInfo());
}
}

View File

@@ -19,6 +19,7 @@ package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.Config; import org.l2jmobius.Config;
import org.l2jmobius.commons.network.PacketWriter; import org.l2jmobius.commons.network.PacketWriter;
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData; import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
import org.l2jmobius.gameserver.enums.AttributeType;
import org.l2jmobius.gameserver.enums.UserInfoType; import org.l2jmobius.gameserver.enums.UserInfoType;
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager; import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
import org.l2jmobius.gameserver.model.Party; import org.l2jmobius.gameserver.model.Party;
@@ -375,12 +376,12 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
if (containsMask(UserInfoType.ATT_SPIRITS)) // 152 if (containsMask(UserInfoType.ATT_SPIRITS)) // 152
{ {
packet.writeH(26); packet.writeH(26);
packet.writeD(-1); packet.writeD(_player.getAttackElementValue(_player.getAttackElement())); // Attribute Attack Power
packet.writeD(0x00); packet.writeD(_player.getDefenseElementValue(AttributeType.FIRE)); // Fire defence
packet.writeD(0x00); packet.writeD(_player.getDefenseElementValue(AttributeType.WATER)); // Water defence
packet.writeD(0x00); packet.writeD(_player.getDefenseElementValue(AttributeType.WIND)); // Wind defence
packet.writeD(0x00); packet.writeD(_player.getDefenseElementValue(AttributeType.EARTH)); // Earth defence
packet.writeD(0x00); packet.writeD(0x00); // Enabled 1 - Disabled 0 // Third class player?
} }
return true; return true;

View File

@@ -0,0 +1,34 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2jmobius.gameserver.network.serverpackets.elementalspirits;
import org.l2jmobius.commons.network.PacketWriter;
import org.l2jmobius.gameserver.network.OutgoingPackets;
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
/**
* @author Mobius
*/
public class ExElementalSpiritInfo implements IClientOutgoingPacket
{
@Override
public boolean write(PacketWriter packet)
{
OutgoingPackets.EX_ELEMENTAL_SPIRIT_INFO.writeId(packet);
return true;
}
}