More clan specialty packets and data based on client observations.
This commit is contained in:
@@ -1,24 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/ClanSpecialtyData.xsd">
|
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/ClanSpecialtyData.xsd">
|
||||||
<clan specialty="1" skilId="1" skillLevel="1" clanLevel="5" /> <!-- middle -->
|
<clan specialty="1" skilId="1" skillLevel="1" clanLevel="5" clanReputation="10000" /> <!-- middle -->
|
||||||
<clan specialty="2" skilId="1" skillLevel="1" clanLevel="6" previousSpecialty="1" /> <!-- middle -->
|
<clan specialty="2" skilId="1" skillLevel="1" clanLevel="6" clanReputation="10000" previousSpecialty="1" /> <!-- middle -->
|
||||||
<clan specialty="3" skilId="1" skillLevel="1" clanLevel="7" previousSpecialty="2" /> <!-- middle -->
|
<clan specialty="3" skilId="1" skillLevel="1" clanLevel="7" clanReputation="10000" previousSpecialty="2" /> <!-- middle -->
|
||||||
<clan specialty="4" skilId="1" skillLevel="1" clanLevel="8" previousSpecialty="3" /> <!-- left -->
|
<clan specialty="4" skilId="1" skillLevel="1" clanLevel="11" clanReputation="50000" previousSpecialty="9" previousSpecialtyAlt="14" /> <!-- middle -->
|
||||||
<clan specialty="5" skilId="1" skillLevel="1" clanLevel="9" previousSpecialty="4" /> <!-- left -->
|
<clan specialty="5" skilId="1" skillLevel="1" clanLevel="14" clanReputation="100000" previousSpecialty="11" previousSpecialtyAlt="16" /> <!-- middle -->
|
||||||
<clan specialty="6" skilId="1" skillLevel="1" clanLevel="10" previousSpecialty="5" /> <!-- left -->
|
<clan specialty="6" skilId="1" skillLevel="1" clanLevel="15" clanReputation="100000" previousSpecialty="5" /> <!-- middle -->
|
||||||
<clan specialty="7" skilId="1" skillLevel="1" clanLevel="10" previousSpecialty="6" /> <!-- left extra -->
|
<clan specialty="7" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousSpecialty="3" /> <!-- left -->
|
||||||
<clan specialty="8" skilId="1" skillLevel="1" clanLevel="8" previousSpecialty="3" /> <!-- right -->
|
<clan specialty="8" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousSpecialty="7" /> <!-- left -->
|
||||||
<clan specialty="9" skilId="1" skillLevel="1" clanLevel="9" previousSpecialty="8" /> <!-- right -->
|
<clan specialty="9" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousSpecialty="8" /> <!-- left -->
|
||||||
<clan specialty="10" skilId="1" skillLevel="1" clanLevel="10" previousSpecialty="9" /> <!-- right -->
|
<clan specialty="10" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousSpecialty="4" /> <!-- left -->
|
||||||
<clan specialty="11" skilId="1" skillLevel="1" clanLevel="10" previousSpecialty="10" /> <!-- right extra -->
|
<clan specialty="11" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousSpecialty="10" /> <!-- left -->
|
||||||
<clan specialty="12" skilId="1" skillLevel="1" clanLevel="11" previousSpecialty="6" previousSpecialtyAlt="10" /> <!-- middle -->
|
<clan specialty="12" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousSpecialty="3" /> <!-- right -->
|
||||||
<clan specialty="13" skilId="1" skillLevel="1" clanLevel="11" previousSpecialty="12" /> <!-- middle extra -->
|
<clan specialty="13" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousSpecialty="12" /> <!-- right -->
|
||||||
<clan specialty="14" skilId="1" skillLevel="1" clanLevel="12" previousSpecialty="12" /> <!-- left -->
|
<clan specialty="14" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousSpecialty="13" /> <!-- right -->
|
||||||
<clan specialty="15" skilId="1" skillLevel="1" clanLevel="13" previousSpecialty="14" /> <!-- left -->
|
<clan specialty="15" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousSpecialty="14" /> <!-- right -->
|
||||||
<clan specialty="16" skilId="1" skillLevel="1" clanLevel="13" previousSpecialty="15" /> <!-- left extra -->
|
<clan specialty="16" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousSpecialty="15" /> <!-- right -->
|
||||||
<clan specialty="17" skilId="1" skillLevel="1" clanLevel="12" previousSpecialty="12" /> <!-- right -->
|
|
||||||
<clan specialty="18" skilId="1" skillLevel="1" clanLevel="13" previousSpecialty="17" /> <!-- right -->
|
|
||||||
<clan specialty="19" skilId="1" skillLevel="1" clanLevel="13" previousSpecialty="18" /> <!-- right extra -->
|
|
||||||
<clan specialty="20" skilId="1" skillLevel="1" clanLevel="14" previousSpecialty="15" previousSpecialtyAlt="18" /> <!-- middle -->
|
|
||||||
<clan specialty="21" skilId="1" skillLevel="1" clanLevel="15" previousSpecialty="20" /> <!-- middle -->
|
|
||||||
</list>
|
</list>
|
@@ -10,6 +10,7 @@
|
|||||||
<xs:attribute type="xs:int" name="skilId" use="required"/>
|
<xs:attribute type="xs:int" name="skilId" use="required"/>
|
||||||
<xs:attribute type="xs:int" name="skillLevel" use="required"/>
|
<xs:attribute type="xs:int" name="skillLevel" use="required"/>
|
||||||
<xs:attribute type="xs:int" name="clanLevel" use="required"/>
|
<xs:attribute type="xs:int" name="clanLevel" use="required"/>
|
||||||
|
<xs:attribute type="xs:int" name="clanReputation" use="required"/>
|
||||||
<xs:attribute type="xs:int" name="previousSpecialty" use="optional"/>
|
<xs:attribute type="xs:int" name="previousSpecialty" use="optional"/>
|
||||||
<xs:attribute type="xs:int" name="previousSpecialtyAlt" use="optional"/>
|
<xs:attribute type="xs:int" name="previousSpecialtyAlt" use="optional"/>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
|
@@ -61,6 +61,7 @@ public class ClanSpecialtyData implements IGameXmlReader
|
|||||||
final int skillId = set.getInt("skilId");
|
final int skillId = set.getInt("skilId");
|
||||||
final int skillLevel = set.getInt("skillLevel");
|
final int skillLevel = set.getInt("skillLevel");
|
||||||
final int clanLevel = set.getInt("clanLevel");
|
final int clanLevel = set.getInt("clanLevel");
|
||||||
|
final int clanReputation = set.getInt("clanReputation");
|
||||||
final int previousSpecialty = set.getInt("previousSpecialty", 0);
|
final int previousSpecialty = set.getInt("previousSpecialty", 0);
|
||||||
final int previousSpecialtyAlt = set.getInt("previousSpecialtyAlt", 0);
|
final int previousSpecialtyAlt = set.getInt("previousSpecialtyAlt", 0);
|
||||||
|
|
||||||
@@ -71,7 +72,7 @@ public class ClanSpecialtyData implements IGameXmlReader
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_clanSpecialtyData.add(new ClanSpecialtyHolder(id, skill, clanLevel, previousSpecialty, previousSpecialtyAlt));
|
_clanSpecialtyData.add(new ClanSpecialtyHolder(id, skill, clanLevel, clanReputation, previousSpecialty, previousSpecialtyAlt));
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@@ -26,14 +26,16 @@ public class ClanSpecialtyHolder
|
|||||||
private final int _id;
|
private final int _id;
|
||||||
private final Skill _skill;
|
private final Skill _skill;
|
||||||
private final int _clanLevel;
|
private final int _clanLevel;
|
||||||
|
private final int _clanReputation;
|
||||||
private final int _previousSpecialty;
|
private final int _previousSpecialty;
|
||||||
private final int _previousSpecialtyAlt;
|
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;
|
_id = id;
|
||||||
_skill = skill;
|
_skill = skill;
|
||||||
_clanLevel = clanLevel;
|
_clanLevel = clanLevel;
|
||||||
|
_clanReputation = clanReputation;
|
||||||
_previousSpecialty = previousSpecialty;
|
_previousSpecialty = previousSpecialty;
|
||||||
_previousSpecialtyAlt = previousSpecialtyAlt;
|
_previousSpecialtyAlt = previousSpecialtyAlt;
|
||||||
}
|
}
|
||||||
@@ -53,6 +55,11 @@ public class ClanSpecialtyHolder
|
|||||||
return _clanLevel;
|
return _clanLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getClanReputation()
|
||||||
|
{
|
||||||
|
return _clanReputation;
|
||||||
|
}
|
||||||
|
|
||||||
public int getPreviousSpecialty()
|
public int getPreviousSpecialty()
|
||||||
{
|
{
|
||||||
return _previousSpecialty;
|
return _previousSpecialty;
|
||||||
|
@@ -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.RequestExPledgeItemList;
|
||||||
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryInfo;
|
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryInfo;
|
||||||
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryReset;
|
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.RequestPledgeBonusOpen;
|
||||||
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusReward;
|
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusReward;
|
||||||
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusRewardList;
|
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusRewardList;
|
||||||
@@ -426,7 +427,7 @@ public enum ExIncomingPackets implements IIncomingPackets<L2GameClient>
|
|||||||
EX_PLEDGE_MASTERY_INFO(0x144, RequestExPledgeMasteryInfo::new, ConnectionState.IN_GAME),
|
EX_PLEDGE_MASTERY_INFO(0x144, RequestExPledgeMasteryInfo::new, ConnectionState.IN_GAME),
|
||||||
EX_PLEDGE_MASTERY_SET(0x145, null, ConnectionState.IN_GAME),
|
EX_PLEDGE_MASTERY_SET(0x145, null, ConnectionState.IN_GAME),
|
||||||
EX_PLEDGE_MASTERY_RESET(0x146, RequestExPledgeMasteryReset::new, 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_SKILL_ACTIVATE(0x148, null, ConnectionState.IN_GAME),
|
||||||
EX_PLEDGE_ITEM_LIST(0x149, RequestExPledgeItemList::new, ConnectionState.IN_GAME),
|
EX_PLEDGE_ITEM_LIST(0x149, RequestExPledgeItemList::new, ConnectionState.IN_GAME),
|
||||||
EX_PLEDGE_ITEM_ACTIVATE(0x14A, null, ConnectionState.IN_GAME),
|
EX_PLEDGE_ITEM_ACTIVATE(0x14A, null, ConnectionState.IN_GAME),
|
||||||
|
@@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
@@ -17,7 +17,9 @@
|
|||||||
package com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
|
package com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketWriter;
|
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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.holders.ClanSpecialtyHolder;
|
||||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||||
|
|
||||||
@@ -43,14 +45,19 @@ public class ExPledgeMasteryInfo extends AbstractItemPacket
|
|||||||
|
|
||||||
OutgoingPackets.EX_PLEDGE_MASTERY_INFO.writeId(packet);
|
OutgoingPackets.EX_PLEDGE_MASTERY_INFO.writeId(packet);
|
||||||
|
|
||||||
packet.writeD(10); // Consumed development points
|
packet.writeD(0); // Consumed development points
|
||||||
packet.writeD(10); // Total development points
|
packet.writeD(_player.getClan().getLevel() + 1); // Total development points
|
||||||
|
|
||||||
packet.writeD(1); // Masteries count
|
packet.writeD(16); // Masteries count
|
||||||
|
for (ClanSpecialtyHolder specialty : ClanSpecialtyData.getInstance().getSpecialties())
|
||||||
packet.writeD(10); // Mastery
|
{
|
||||||
packet.writeD(1); // Purchased
|
if (specialty.getId() < 16)
|
||||||
packet.writeC(1); // Availability
|
{
|
||||||
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@@ -1,24 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/ClanSpecialtyData.xsd">
|
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/ClanSpecialtyData.xsd">
|
||||||
<clan specialty="1" skilId="1" skillLevel="1" clanLevel="5" /> <!-- middle -->
|
<clan specialty="1" skilId="1" skillLevel="1" clanLevel="5" clanReputation="10000" /> <!-- middle -->
|
||||||
<clan specialty="2" skilId="1" skillLevel="1" clanLevel="6" previousSpecialty="1" /> <!-- middle -->
|
<clan specialty="2" skilId="1" skillLevel="1" clanLevel="6" clanReputation="10000" previousSpecialty="1" /> <!-- middle -->
|
||||||
<clan specialty="3" skilId="1" skillLevel="1" clanLevel="7" previousSpecialty="2" /> <!-- middle -->
|
<clan specialty="3" skilId="1" skillLevel="1" clanLevel="7" clanReputation="10000" previousSpecialty="2" /> <!-- middle -->
|
||||||
<clan specialty="4" skilId="1" skillLevel="1" clanLevel="8" previousSpecialty="3" /> <!-- left -->
|
<clan specialty="4" skilId="1" skillLevel="1" clanLevel="11" clanReputation="50000" previousSpecialty="9" previousSpecialtyAlt="14" /> <!-- middle -->
|
||||||
<clan specialty="5" skilId="1" skillLevel="1" clanLevel="9" previousSpecialty="4" /> <!-- left -->
|
<clan specialty="5" skilId="1" skillLevel="1" clanLevel="14" clanReputation="100000" previousSpecialty="11" previousSpecialtyAlt="16" /> <!-- middle -->
|
||||||
<clan specialty="6" skilId="1" skillLevel="1" clanLevel="10" previousSpecialty="5" /> <!-- left -->
|
<clan specialty="6" skilId="1" skillLevel="1" clanLevel="15" clanReputation="100000" previousSpecialty="5" /> <!-- middle -->
|
||||||
<clan specialty="7" skilId="1" skillLevel="1" clanLevel="10" previousSpecialty="6" /> <!-- left extra -->
|
<clan specialty="7" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousSpecialty="3" /> <!-- left -->
|
||||||
<clan specialty="8" skilId="1" skillLevel="1" clanLevel="8" previousSpecialty="3" /> <!-- right -->
|
<clan specialty="8" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousSpecialty="7" /> <!-- left -->
|
||||||
<clan specialty="9" skilId="1" skillLevel="1" clanLevel="9" previousSpecialty="8" /> <!-- right -->
|
<clan specialty="9" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousSpecialty="8" /> <!-- left -->
|
||||||
<clan specialty="10" skilId="1" skillLevel="1" clanLevel="10" previousSpecialty="9" /> <!-- right -->
|
<clan specialty="10" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousSpecialty="4" /> <!-- left -->
|
||||||
<clan specialty="11" skilId="1" skillLevel="1" clanLevel="10" previousSpecialty="10" /> <!-- right extra -->
|
<clan specialty="11" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousSpecialty="10" /> <!-- left -->
|
||||||
<clan specialty="12" skilId="1" skillLevel="1" clanLevel="11" previousSpecialty="6" previousSpecialtyAlt="10" /> <!-- middle -->
|
<clan specialty="12" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousSpecialty="3" /> <!-- right -->
|
||||||
<clan specialty="13" skilId="1" skillLevel="1" clanLevel="11" previousSpecialty="12" /> <!-- middle extra -->
|
<clan specialty="13" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousSpecialty="12" /> <!-- right -->
|
||||||
<clan specialty="14" skilId="1" skillLevel="1" clanLevel="12" previousSpecialty="12" /> <!-- left -->
|
<clan specialty="14" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousSpecialty="13" /> <!-- right -->
|
||||||
<clan specialty="15" skilId="1" skillLevel="1" clanLevel="13" previousSpecialty="14" /> <!-- left -->
|
<clan specialty="15" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousSpecialty="14" /> <!-- right -->
|
||||||
<clan specialty="16" skilId="1" skillLevel="1" clanLevel="13" previousSpecialty="15" /> <!-- left extra -->
|
<clan specialty="16" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousSpecialty="15" /> <!-- right -->
|
||||||
<clan specialty="17" skilId="1" skillLevel="1" clanLevel="12" previousSpecialty="12" /> <!-- right -->
|
|
||||||
<clan specialty="18" skilId="1" skillLevel="1" clanLevel="13" previousSpecialty="17" /> <!-- right -->
|
|
||||||
<clan specialty="19" skilId="1" skillLevel="1" clanLevel="13" previousSpecialty="18" /> <!-- right extra -->
|
|
||||||
<clan specialty="20" skilId="1" skillLevel="1" clanLevel="14" previousSpecialty="15" previousSpecialtyAlt="18" /> <!-- middle -->
|
|
||||||
<clan specialty="21" skilId="1" skillLevel="1" clanLevel="15" previousSpecialty="20" /> <!-- middle -->
|
|
||||||
</list>
|
</list>
|
@@ -10,6 +10,7 @@
|
|||||||
<xs:attribute type="xs:int" name="skilId" use="required"/>
|
<xs:attribute type="xs:int" name="skilId" use="required"/>
|
||||||
<xs:attribute type="xs:int" name="skillLevel" use="required"/>
|
<xs:attribute type="xs:int" name="skillLevel" use="required"/>
|
||||||
<xs:attribute type="xs:int" name="clanLevel" use="required"/>
|
<xs:attribute type="xs:int" name="clanLevel" use="required"/>
|
||||||
|
<xs:attribute type="xs:int" name="clanReputation" use="required"/>
|
||||||
<xs:attribute type="xs:int" name="previousSpecialty" use="optional"/>
|
<xs:attribute type="xs:int" name="previousSpecialty" use="optional"/>
|
||||||
<xs:attribute type="xs:int" name="previousSpecialtyAlt" use="optional"/>
|
<xs:attribute type="xs:int" name="previousSpecialtyAlt" use="optional"/>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
|
@@ -61,6 +61,7 @@ public class ClanSpecialtyData implements IGameXmlReader
|
|||||||
final int skillId = set.getInt("skilId");
|
final int skillId = set.getInt("skilId");
|
||||||
final int skillLevel = set.getInt("skillLevel");
|
final int skillLevel = set.getInt("skillLevel");
|
||||||
final int clanLevel = set.getInt("clanLevel");
|
final int clanLevel = set.getInt("clanLevel");
|
||||||
|
final int clanReputation = set.getInt("clanReputation");
|
||||||
final int previousSpecialty = set.getInt("previousSpecialty", 0);
|
final int previousSpecialty = set.getInt("previousSpecialty", 0);
|
||||||
final int previousSpecialtyAlt = set.getInt("previousSpecialtyAlt", 0);
|
final int previousSpecialtyAlt = set.getInt("previousSpecialtyAlt", 0);
|
||||||
|
|
||||||
@@ -71,7 +72,7 @@ public class ClanSpecialtyData implements IGameXmlReader
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_clanSpecialtyData.add(new ClanSpecialtyHolder(id, skill, clanLevel, previousSpecialty, previousSpecialtyAlt));
|
_clanSpecialtyData.add(new ClanSpecialtyHolder(id, skill, clanLevel, clanReputation, previousSpecialty, previousSpecialtyAlt));
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@@ -26,14 +26,16 @@ public class ClanSpecialtyHolder
|
|||||||
private final int _id;
|
private final int _id;
|
||||||
private final Skill _skill;
|
private final Skill _skill;
|
||||||
private final int _clanLevel;
|
private final int _clanLevel;
|
||||||
|
private final int _clanReputation;
|
||||||
private final int _previousSpecialty;
|
private final int _previousSpecialty;
|
||||||
private final int _previousSpecialtyAlt;
|
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;
|
_id = id;
|
||||||
_skill = skill;
|
_skill = skill;
|
||||||
_clanLevel = clanLevel;
|
_clanLevel = clanLevel;
|
||||||
|
_clanReputation = clanReputation;
|
||||||
_previousSpecialty = previousSpecialty;
|
_previousSpecialty = previousSpecialty;
|
||||||
_previousSpecialtyAlt = previousSpecialtyAlt;
|
_previousSpecialtyAlt = previousSpecialtyAlt;
|
||||||
}
|
}
|
||||||
@@ -53,6 +55,11 @@ public class ClanSpecialtyHolder
|
|||||||
return _clanLevel;
|
return _clanLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getClanReputation()
|
||||||
|
{
|
||||||
|
return _clanReputation;
|
||||||
|
}
|
||||||
|
|
||||||
public int getPreviousSpecialty()
|
public int getPreviousSpecialty()
|
||||||
{
|
{
|
||||||
return _previousSpecialty;
|
return _previousSpecialty;
|
||||||
|
@@ -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.RequestExPledgeItemList;
|
||||||
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryInfo;
|
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryInfo;
|
||||||
import com.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeMasteryReset;
|
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.RequestPledgeBonusOpen;
|
||||||
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusReward;
|
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusReward;
|
||||||
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusRewardList;
|
import com.l2jmobius.gameserver.network.clientpackets.pledgebonus.RequestPledgeBonusRewardList;
|
||||||
@@ -426,7 +427,7 @@ public enum ExIncomingPackets implements IIncomingPackets<L2GameClient>
|
|||||||
EX_PLEDGE_MASTERY_INFO(0x144, RequestExPledgeMasteryInfo::new, ConnectionState.IN_GAME),
|
EX_PLEDGE_MASTERY_INFO(0x144, RequestExPledgeMasteryInfo::new, ConnectionState.IN_GAME),
|
||||||
EX_PLEDGE_MASTERY_SET(0x145, null, ConnectionState.IN_GAME),
|
EX_PLEDGE_MASTERY_SET(0x145, null, ConnectionState.IN_GAME),
|
||||||
EX_PLEDGE_MASTERY_RESET(0x146, RequestExPledgeMasteryReset::new, 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_SKILL_ACTIVATE(0x148, null, ConnectionState.IN_GAME),
|
||||||
EX_PLEDGE_ITEM_LIST(0x149, RequestExPledgeItemList::new, ConnectionState.IN_GAME),
|
EX_PLEDGE_ITEM_LIST(0x149, RequestExPledgeItemList::new, ConnectionState.IN_GAME),
|
||||||
EX_PLEDGE_ITEM_ACTIVATE(0x14A, null, ConnectionState.IN_GAME),
|
EX_PLEDGE_ITEM_ACTIVATE(0x14A, null, ConnectionState.IN_GAME),
|
||||||
|
@@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
@@ -17,7 +17,9 @@
|
|||||||
package com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
|
package com.l2jmobius.gameserver.network.serverpackets.pledgeV2;
|
||||||
|
|
||||||
import com.l2jmobius.commons.network.PacketWriter;
|
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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.holders.ClanSpecialtyHolder;
|
||||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||||
|
|
||||||
@@ -43,14 +45,19 @@ public class ExPledgeMasteryInfo extends AbstractItemPacket
|
|||||||
|
|
||||||
OutgoingPackets.EX_PLEDGE_MASTERY_INFO.writeId(packet);
|
OutgoingPackets.EX_PLEDGE_MASTERY_INFO.writeId(packet);
|
||||||
|
|
||||||
packet.writeD(10); // Consumed development points
|
packet.writeD(0); // Consumed development points
|
||||||
packet.writeD(10); // Total development points
|
packet.writeD(_player.getClan().getLevel() + 1); // Total development points
|
||||||
|
|
||||||
packet.writeD(1); // Masteries count
|
packet.writeD(16); // Masteries count
|
||||||
|
for (ClanSpecialtyHolder specialty : ClanSpecialtyData.getInstance().getSpecialties())
|
||||||
packet.writeD(10); // Mastery
|
{
|
||||||
packet.writeD(1); // Purchased
|
if (specialty.getId() < 16)
|
||||||
packet.writeC(1); // Availability
|
{
|
||||||
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user