From 448e506757a4776728fafecb8540a145724c3131 Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Fri, 15 Feb 2019 07:32:31 +0000
Subject: [PATCH] More clan specialty packets and data based on client
observations.
---
.../dist/game/data/ClanSpecialtyData.xml | 37 +++++-------
.../dist/game/data/xsd/ClanSpecialtyData.xsd | 1 +
.../data/xml/impl/ClanSpecialtyData.java | 3 +-
.../model/holders/ClanSpecialtyHolder.java | 9 ++-
.../gameserver/network/ExIncomingPackets.java | 3 +-
.../pledgeV2/RequestExPledgeSkillInfo.java | 58 +++++++++++++++++++
.../pledgeV2/ExPledgeMasteryInfo.java | 21 ++++---
.../pledgeV2/ExPledgeSkillActivate.java | 42 ++++++++++++++
.../pledgeV2/ExPledgeSkillInfo.java | 51 ++++++++++++++++
.../dist/game/data/ClanSpecialtyData.xml | 37 +++++-------
.../dist/game/data/xsd/ClanSpecialtyData.xsd | 1 +
.../data/xml/impl/ClanSpecialtyData.java | 3 +-
.../model/holders/ClanSpecialtyHolder.java | 9 ++-
.../gameserver/network/ExIncomingPackets.java | 3 +-
.../pledgeV2/RequestExPledgeSkillInfo.java | 58 +++++++++++++++++++
.../pledgeV2/ExPledgeMasteryInfo.java | 21 ++++---
.../pledgeV2/ExPledgeSkillActivate.java | 42 ++++++++++++++
.../pledgeV2/ExPledgeSkillInfo.java | 51 ++++++++++++++++
18 files changed, 388 insertions(+), 62 deletions(-)
create mode 100644 L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/clientpackets/pledgeV2/RequestExPledgeSkillInfo.java
create mode 100644 L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillActivate.java
create mode 100644 L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillInfo.java
create mode 100644 L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/clientpackets/pledgeV2/RequestExPledgeSkillInfo.java
create mode 100644 L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillActivate.java
create mode 100644 L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillInfo.java
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/ClanSpecialtyData.xml b/L2J_Mobius_5.0_Salvation/dist/game/data/ClanSpecialtyData.xml
index 51a3bcfe28..00c88d9271 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/ClanSpecialtyData.xml
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/ClanSpecialtyData.xml
@@ -1,24 +1,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/xsd/ClanSpecialtyData.xsd b/L2J_Mobius_5.0_Salvation/dist/game/data/xsd/ClanSpecialtyData.xsd
index d9bdd82e1f..ca7dfeab0f 100644
--- a/L2J_Mobius_5.0_Salvation/dist/game/data/xsd/ClanSpecialtyData.xsd
+++ b/L2J_Mobius_5.0_Salvation/dist/game/data/xsd/ClanSpecialtyData.xsd
@@ -10,6 +10,7 @@
+
diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/data/xml/impl/ClanSpecialtyData.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/data/xml/impl/ClanSpecialtyData.java
index 68fad458c2..4cc0f9f09e 100644
--- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/data/xml/impl/ClanSpecialtyData.java
+++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/data/xml/impl/ClanSpecialtyData.java
@@ -61,6 +61,7 @@ public class ClanSpecialtyData implements IGameXmlReader
final int skillId = set.getInt("skilId");
final int skillLevel = set.getInt("skillLevel");
final int clanLevel = set.getInt("clanLevel");
+ final int clanReputation = set.getInt("clanReputation");
final int previousSpecialty = set.getInt("previousSpecialty", 0);
final int previousSpecialtyAlt = set.getInt("previousSpecialtyAlt", 0);
@@ -71,7 +72,7 @@ public class ClanSpecialtyData implements IGameXmlReader
}
else
{
- _clanSpecialtyData.add(new ClanSpecialtyHolder(id, skill, clanLevel, previousSpecialty, previousSpecialtyAlt));
+ _clanSpecialtyData.add(new ClanSpecialtyHolder(id, skill, clanLevel, clanReputation, previousSpecialty, previousSpecialtyAlt));
}
}));
}
diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/holders/ClanSpecialtyHolder.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/holders/ClanSpecialtyHolder.java
index ace81fba98..c8ce698869 100644
--- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/holders/ClanSpecialtyHolder.java
+++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/holders/ClanSpecialtyHolder.java
@@ -26,14 +26,16 @@ public class ClanSpecialtyHolder
private final int _id;
private final Skill _skill;
private final int _clanLevel;
+ private final int _clanReputation;
private final int _previousSpecialty;
private final int _previousSpecialtyAlt;
- public ClanSpecialtyHolder(int id, Skill skill, int clanLevel, int previousSpecialty, int previousSpecialtyAlt)
+ public ClanSpecialtyHolder(int id, Skill skill, int clanLevel, int clanReputation, int previousSpecialty, int previousSpecialtyAlt)
{
_id = id;
_skill = skill;
_clanLevel = clanLevel;
+ _clanReputation = clanReputation;
_previousSpecialty = previousSpecialty;
_previousSpecialtyAlt = previousSpecialtyAlt;
}
@@ -53,6 +55,11 @@ public class ClanSpecialtyHolder
return _clanLevel;
}
+ public int getClanReputation()
+ {
+ return _clanReputation;
+ }
+
public int getPreviousSpecialty()
{
return _previousSpecialty;
diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
index ffb770d011..649d58e0af 100644
--- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
+++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
@@ -84,6 +84,7 @@ import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeIt
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeItemList;
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryInfo;
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryReset;
+import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeSkillInfo;
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusOpen;
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusReward;
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusRewardList;
@@ -426,7 +427,7 @@ public enum ExIncomingPackets implements IIncomingPackets
EX_PLEDGE_MASTERY_INFO(0x144, RequestExPledgeMasteryInfo::new, ConnectionState.IN_GAME),
EX_PLEDGE_MASTERY_SET(0x145, null, ConnectionState.IN_GAME),
EX_PLEDGE_MASTERY_RESET(0x146, RequestExPledgeMasteryReset::new, ConnectionState.IN_GAME),
- EX_PLEDGE_SKILL_INFO(0x147, null, ConnectionState.IN_GAME),
+ EX_PLEDGE_SKILL_INFO(0x147, RequestExPledgeSkillInfo::new, ConnectionState.IN_GAME),
EX_PLEDGE_SKILL_ACTIVATE(0x148, null, ConnectionState.IN_GAME),
EX_PLEDGE_ITEM_LIST(0x149, RequestExPledgeItemList::new, ConnectionState.IN_GAME),
EX_PLEDGE_ITEM_ACTIVATE(0x14A, null, ConnectionState.IN_GAME),
diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/clientpackets/pledgeV2/RequestExPledgeSkillInfo.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/clientpackets/pledgeV2/RequestExPledgeSkillInfo.java
new file mode 100644
index 0000000000..a97e795748
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/clientpackets/pledgeV2/RequestExPledgeSkillInfo.java
@@ -0,0 +1,58 @@
+/*
+ * 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 .
+ */
+package com.l2jmobius.gameserver.network.clientpackets.pledgeV2;
+
+import com.l2jmobius.commons.network.PacketReader;
+import com.l2jmobius.gameserver.model.L2Clan;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.network.L2GameClient;
+import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
+import com.l2jmobius.gameserver.network.serverpackets.pledgeV2.ExPledgeSkillInfo;
+
+/**
+ * @author Mobius
+ */
+public class RequestExPledgeSkillInfo implements IClientIncomingPacket
+{
+ private int _skillId;
+ private int _skillLevel;
+
+ @Override
+ public boolean read(L2GameClient client, PacketReader packet)
+ {
+ _skillId = packet.readD();
+ _skillLevel = packet.readD();
+ return true;
+ }
+
+ @Override
+ public void run(L2GameClient client)
+ {
+ final L2PcInstance activeChar = client.getActiveChar();
+ if (activeChar == null)
+ {
+ return;
+ }
+ final L2Clan clan = activeChar.getClan();
+ if (clan == null)
+ {
+ return;
+ }
+
+ client.sendPacket(new ExPledgeSkillInfo(_skillId, _skillLevel, -1, 0));
+ }
+}
\ No newline at end of file
diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeMasteryInfo.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeMasteryInfo.java
index 87601b0e1c..07eef6841e 100644
--- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeMasteryInfo.java
+++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeMasteryInfo.java
@@ -17,7 +17,9 @@
package com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.data.xml.impl.ClanSpecialtyData;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.holders.ClanSpecialtyHolder;
import com.l2jmobius.gameserver.network.OutgoingPackets;
import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
@@ -43,14 +45,19 @@ public class ExPledgeMasteryInfo extends AbstractItemPacket
OutgoingPackets.EX_PLEDGE_MASTERY_INFO.writeId(packet);
- packet.writeD(10); // Consumed development points
- packet.writeD(10); // Total development points
+ packet.writeD(0); // Consumed development points
+ packet.writeD(_player.getClan().getLevel() + 1); // Total development points
- packet.writeD(1); // Masteries count
-
- packet.writeD(10); // Mastery
- packet.writeD(1); // Purchased
- packet.writeC(1); // Availability
+ packet.writeD(16); // Masteries count
+ for (ClanSpecialtyHolder specialty : ClanSpecialtyData.getInstance().getSpecialties())
+ {
+ if (specialty.getId() < 16)
+ {
+ packet.writeD(specialty.getId()); // Mastery
+ packet.writeD(0); // Purchased?
+ packet.writeC(/* _player.getClan().getLevel() >= specialty.getClanLevel() ? 1 : */ 0); // Availability - TODO: Previous level requirement.
+ }
+ }
return true;
}
diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillActivate.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillActivate.java
new file mode 100644
index 0000000000..ab1f9079b5
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillActivate.java
@@ -0,0 +1,42 @@
+/*
+ * 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 .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExPledgeSkillActivate implements IClientOutgoingPacket
+{
+ private final int _specialtyId;
+
+ public ExPledgeSkillActivate(int specialtyId)
+ {
+ _specialtyId = specialtyId;
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_PLEDGE_SKILL_ACTIVATE.writeId(packet);
+ packet.writeC(_specialtyId);
+ return true;
+ }
+}
diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillInfo.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillInfo.java
new file mode 100644
index 0000000000..0ac51d8b10
--- /dev/null
+++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillInfo.java
@@ -0,0 +1,51 @@
+/*
+ * 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 .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExPledgeSkillInfo implements IClientOutgoingPacket
+{
+ private final int _skillId;
+ private final int _skillLevel;
+ private final int _timeLeft;
+ private final int _availability;
+
+ public ExPledgeSkillInfo(int skillId, int skillLevel, int timeLeft, int availability)
+ {
+ _skillId = skillId;
+ _skillLevel = skillLevel;
+ _timeLeft = timeLeft;
+ _availability = availability;
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_PLEDGE_SKILL_INFO.writeId(packet);
+ packet.writeD(_skillId);
+ packet.writeD(_skillLevel);
+ packet.writeD(_timeLeft);
+ packet.writeC(_availability);
+ return true;
+ }
+}
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/ClanSpecialtyData.xml b/L2J_Mobius_5.5_EtinasFate/dist/game/data/ClanSpecialtyData.xml
index 51a3bcfe28..00c88d9271 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/ClanSpecialtyData.xml
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/ClanSpecialtyData.xml
@@ -1,24 +1,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/xsd/ClanSpecialtyData.xsd b/L2J_Mobius_5.5_EtinasFate/dist/game/data/xsd/ClanSpecialtyData.xsd
index d9bdd82e1f..ca7dfeab0f 100644
--- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/xsd/ClanSpecialtyData.xsd
+++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/xsd/ClanSpecialtyData.xsd
@@ -10,6 +10,7 @@
+
diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/data/xml/impl/ClanSpecialtyData.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/data/xml/impl/ClanSpecialtyData.java
index 68fad458c2..4cc0f9f09e 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/data/xml/impl/ClanSpecialtyData.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/data/xml/impl/ClanSpecialtyData.java
@@ -61,6 +61,7 @@ public class ClanSpecialtyData implements IGameXmlReader
final int skillId = set.getInt("skilId");
final int skillLevel = set.getInt("skillLevel");
final int clanLevel = set.getInt("clanLevel");
+ final int clanReputation = set.getInt("clanReputation");
final int previousSpecialty = set.getInt("previousSpecialty", 0);
final int previousSpecialtyAlt = set.getInt("previousSpecialtyAlt", 0);
@@ -71,7 +72,7 @@ public class ClanSpecialtyData implements IGameXmlReader
}
else
{
- _clanSpecialtyData.add(new ClanSpecialtyHolder(id, skill, clanLevel, previousSpecialty, previousSpecialtyAlt));
+ _clanSpecialtyData.add(new ClanSpecialtyHolder(id, skill, clanLevel, clanReputation, previousSpecialty, previousSpecialtyAlt));
}
}));
}
diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/holders/ClanSpecialtyHolder.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/holders/ClanSpecialtyHolder.java
index ace81fba98..c8ce698869 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/holders/ClanSpecialtyHolder.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/holders/ClanSpecialtyHolder.java
@@ -26,14 +26,16 @@ public class ClanSpecialtyHolder
private final int _id;
private final Skill _skill;
private final int _clanLevel;
+ private final int _clanReputation;
private final int _previousSpecialty;
private final int _previousSpecialtyAlt;
- public ClanSpecialtyHolder(int id, Skill skill, int clanLevel, int previousSpecialty, int previousSpecialtyAlt)
+ public ClanSpecialtyHolder(int id, Skill skill, int clanLevel, int clanReputation, int previousSpecialty, int previousSpecialtyAlt)
{
_id = id;
_skill = skill;
_clanLevel = clanLevel;
+ _clanReputation = clanReputation;
_previousSpecialty = previousSpecialty;
_previousSpecialtyAlt = previousSpecialtyAlt;
}
@@ -53,6 +55,11 @@ public class ClanSpecialtyHolder
return _clanLevel;
}
+ public int getClanReputation()
+ {
+ return _clanReputation;
+ }
+
public int getPreviousSpecialty()
{
return _previousSpecialty;
diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
index 690b9f9b4d..3c2ea735ff 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/ExIncomingPackets.java
@@ -84,6 +84,7 @@ import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeIt
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeItemList;
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryInfo;
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryReset;
+import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeSkillInfo;
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusOpen;
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusReward;
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusRewardList;
@@ -426,7 +427,7 @@ public enum ExIncomingPackets implements IIncomingPackets
EX_PLEDGE_MASTERY_INFO(0x144, RequestExPledgeMasteryInfo::new, ConnectionState.IN_GAME),
EX_PLEDGE_MASTERY_SET(0x145, null, ConnectionState.IN_GAME),
EX_PLEDGE_MASTERY_RESET(0x146, RequestExPledgeMasteryReset::new, ConnectionState.IN_GAME),
- EX_PLEDGE_SKILL_INFO(0x147, null, ConnectionState.IN_GAME),
+ EX_PLEDGE_SKILL_INFO(0x147, RequestExPledgeSkillInfo::new, ConnectionState.IN_GAME),
EX_PLEDGE_SKILL_ACTIVATE(0x148, null, ConnectionState.IN_GAME),
EX_PLEDGE_ITEM_LIST(0x149, RequestExPledgeItemList::new, ConnectionState.IN_GAME),
EX_PLEDGE_ITEM_ACTIVATE(0x14A, null, ConnectionState.IN_GAME),
diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/clientpackets/pledgeV2/RequestExPledgeSkillInfo.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/clientpackets/pledgeV2/RequestExPledgeSkillInfo.java
new file mode 100644
index 0000000000..a97e795748
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/clientpackets/pledgeV2/RequestExPledgeSkillInfo.java
@@ -0,0 +1,58 @@
+/*
+ * 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 .
+ */
+package com.l2jmobius.gameserver.network.clientpackets.pledgeV2;
+
+import com.l2jmobius.commons.network.PacketReader;
+import com.l2jmobius.gameserver.model.L2Clan;
+import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.network.L2GameClient;
+import com.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
+import com.l2jmobius.gameserver.network.serverpackets.pledgeV2.ExPledgeSkillInfo;
+
+/**
+ * @author Mobius
+ */
+public class RequestExPledgeSkillInfo implements IClientIncomingPacket
+{
+ private int _skillId;
+ private int _skillLevel;
+
+ @Override
+ public boolean read(L2GameClient client, PacketReader packet)
+ {
+ _skillId = packet.readD();
+ _skillLevel = packet.readD();
+ return true;
+ }
+
+ @Override
+ public void run(L2GameClient client)
+ {
+ final L2PcInstance activeChar = client.getActiveChar();
+ if (activeChar == null)
+ {
+ return;
+ }
+ final L2Clan clan = activeChar.getClan();
+ if (clan == null)
+ {
+ return;
+ }
+
+ client.sendPacket(new ExPledgeSkillInfo(_skillId, _skillLevel, -1, 0));
+ }
+}
\ No newline at end of file
diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeMasteryInfo.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeMasteryInfo.java
index 87601b0e1c..07eef6841e 100644
--- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeMasteryInfo.java
+++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeMasteryInfo.java
@@ -17,7 +17,9 @@
package com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.data.xml.impl.ClanSpecialtyData;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jmobius.gameserver.model.holders.ClanSpecialtyHolder;
import com.l2jmobius.gameserver.network.OutgoingPackets;
import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
@@ -43,14 +45,19 @@ public class ExPledgeMasteryInfo extends AbstractItemPacket
OutgoingPackets.EX_PLEDGE_MASTERY_INFO.writeId(packet);
- packet.writeD(10); // Consumed development points
- packet.writeD(10); // Total development points
+ packet.writeD(0); // Consumed development points
+ packet.writeD(_player.getClan().getLevel() + 1); // Total development points
- packet.writeD(1); // Masteries count
-
- packet.writeD(10); // Mastery
- packet.writeD(1); // Purchased
- packet.writeC(1); // Availability
+ packet.writeD(16); // Masteries count
+ for (ClanSpecialtyHolder specialty : ClanSpecialtyData.getInstance().getSpecialties())
+ {
+ if (specialty.getId() < 16)
+ {
+ packet.writeD(specialty.getId()); // Mastery
+ packet.writeD(0); // Purchased?
+ packet.writeC(/* _player.getClan().getLevel() >= specialty.getClanLevel() ? 1 : */ 0); // Availability - TODO: Previous level requirement.
+ }
+ }
return true;
}
diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillActivate.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillActivate.java
new file mode 100644
index 0000000000..ab1f9079b5
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillActivate.java
@@ -0,0 +1,42 @@
+/*
+ * 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 .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExPledgeSkillActivate implements IClientOutgoingPacket
+{
+ private final int _specialtyId;
+
+ public ExPledgeSkillActivate(int specialtyId)
+ {
+ _specialtyId = specialtyId;
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_PLEDGE_SKILL_ACTIVATE.writeId(packet);
+ packet.writeC(_specialtyId);
+ return true;
+ }
+}
diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillInfo.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillInfo.java
new file mode 100644
index 0000000000..0ac51d8b10
--- /dev/null
+++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/network/serverpackets/pledgeV2/ExPledgeSkillInfo.java
@@ -0,0 +1,51 @@
+/*
+ * 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 .
+ */
+package com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
+
+import com.l2jmobius.commons.network.PacketWriter;
+import com.l2jmobius.gameserver.network.OutgoingPackets;
+import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
+
+/**
+ * @author Mobius
+ */
+public class ExPledgeSkillInfo implements IClientOutgoingPacket
+{
+ private final int _skillId;
+ private final int _skillLevel;
+ private final int _timeLeft;
+ private final int _availability;
+
+ public ExPledgeSkillInfo(int skillId, int skillLevel, int timeLeft, int availability)
+ {
+ _skillId = skillId;
+ _skillLevel = skillLevel;
+ _timeLeft = timeLeft;
+ _availability = availability;
+ }
+
+ @Override
+ public boolean write(PacketWriter packet)
+ {
+ OutgoingPackets.EX_PLEDGE_SKILL_INFO.writeId(packet);
+ packet.writeD(_skillId);
+ packet.writeD(_skillLevel);
+ packet.writeD(_timeLeft);
+ packet.writeC(_availability);
+ return true;
+ }
+}