Reverted the specialty naming.
This commit is contained in:
parent
dacb94f13a
commit
271de4803a
19
L2J_Mobius_5.0_Salvation/dist/game/data/ClanMasteryData.xml
vendored
Normal file
19
L2J_Mobius_5.0_Salvation/dist/game/data/ClanMasteryData.xml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/ClanMasteryData.xsd">
|
||||
<clan mastery="1" skilId="1" skillLevel="1" clanLevel="5" clanReputation="10000" /> <!-- middle -->
|
||||
<clan mastery="2" skilId="1" skillLevel="1" clanLevel="6" clanReputation="10000" previousMastery="1" /> <!-- middle -->
|
||||
<clan mastery="3" skilId="1" skillLevel="1" clanLevel="7" clanReputation="10000" previousMastery="2" /> <!-- middle -->
|
||||
<clan mastery="4" skilId="1" skillLevel="1" clanLevel="11" clanReputation="50000" previousMastery="9" previousMasteryAlt="14" /> <!-- middle -->
|
||||
<clan mastery="5" skilId="1" skillLevel="1" clanLevel="14" clanReputation="100000" previousMastery="11" previousMasteryAlt="16" /> <!-- middle -->
|
||||
<clan mastery="6" skilId="1" skillLevel="1" clanLevel="15" clanReputation="100000" previousMastery="5" /> <!-- middle -->
|
||||
<clan mastery="7" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousMastery="3" /> <!-- left -->
|
||||
<clan mastery="8" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousMastery="7" /> <!-- left -->
|
||||
<clan mastery="9" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousMastery="8" /> <!-- left -->
|
||||
<clan mastery="10" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousMastery="4" /> <!-- left -->
|
||||
<clan mastery="11" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousMastery="10" /> <!-- left -->
|
||||
<clan mastery="12" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousMastery="3" /> <!-- right -->
|
||||
<clan mastery="13" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousMastery="12" /> <!-- right -->
|
||||
<clan mastery="14" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousMastery="13" /> <!-- right -->
|
||||
<clan mastery="15" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousMastery="14" /> <!-- right -->
|
||||
<clan mastery="16" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousMastery="15" /> <!-- right -->
|
||||
</list>
|
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/ClanSpecialtyData.xsd">
|
||||
<clan specialty="1" skilId="1" skillLevel="1" clanLevel="5" clanReputation="10000" /> <!-- middle -->
|
||||
<clan specialty="2" skilId="1" skillLevel="1" clanLevel="6" clanReputation="10000" previousSpecialty="1" /> <!-- middle -->
|
||||
<clan specialty="3" skilId="1" skillLevel="1" clanLevel="7" clanReputation="10000" previousSpecialty="2" /> <!-- middle -->
|
||||
<clan specialty="4" skilId="1" skillLevel="1" clanLevel="11" clanReputation="50000" previousSpecialty="9" previousSpecialtyAlt="14" /> <!-- middle -->
|
||||
<clan specialty="5" skilId="1" skillLevel="1" clanLevel="14" clanReputation="100000" previousSpecialty="11" previousSpecialtyAlt="16" /> <!-- middle -->
|
||||
<clan specialty="6" skilId="1" skillLevel="1" clanLevel="15" clanReputation="100000" previousSpecialty="5" /> <!-- middle -->
|
||||
<clan specialty="7" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousSpecialty="3" /> <!-- left -->
|
||||
<clan specialty="8" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousSpecialty="7" /> <!-- left -->
|
||||
<clan specialty="9" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousSpecialty="8" /> <!-- left -->
|
||||
<clan specialty="10" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousSpecialty="4" /> <!-- left -->
|
||||
<clan specialty="11" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousSpecialty="10" /> <!-- left -->
|
||||
<clan specialty="12" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousSpecialty="3" /> <!-- right -->
|
||||
<clan specialty="13" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousSpecialty="12" /> <!-- right -->
|
||||
<clan specialty="14" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousSpecialty="13" /> <!-- right -->
|
||||
<clan specialty="15" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousSpecialty="14" /> <!-- right -->
|
||||
<clan specialty="16" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousSpecialty="15" /> <!-- right -->
|
||||
</list>
|
@ -6,13 +6,13 @@
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute type="xs:int" name="specialty" use="required"/>
|
||||
<xs:attribute type="xs:int" name="mastery" 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="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="previousSpecialtyAlt" use="optional"/>
|
||||
<xs:attribute type="xs:int" name="previousMastery" use="optional"/>
|
||||
<xs:attribute type="xs:int" name="previousMasteryAlt" use="optional"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
@ -50,9 +50,9 @@ import com.l2jmobius.gameserver.data.xml.impl.BeautyShopData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.BuyListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CategoryData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanHallData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanMasteryData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanRewardData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanShopData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanSpecialtyData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClassListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CombinationItemsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CubicData;
|
||||
@ -307,7 +307,7 @@ public class GameServer
|
||||
ClanHallData.getInstance();
|
||||
ClanHallAuctionManager.getInstance();
|
||||
ClanEntryManager.getInstance();
|
||||
ClanSpecialtyData.getInstance();
|
||||
ClanMasteryData.getInstance();
|
||||
ClanShopData.getInstance();
|
||||
|
||||
printSection("Geodata");
|
||||
|
@ -25,19 +25,19 @@ import org.w3c.dom.Document;
|
||||
|
||||
import com.l2jmobius.commons.util.IGameXmlReader;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanSpecialtyHolder;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanMasteryHolder;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ClanSpecialtyData implements IGameXmlReader
|
||||
public class ClanMasteryData implements IGameXmlReader
|
||||
{
|
||||
private static Logger LOGGER = Logger.getLogger(ClanSpecialtyData.class.getName());
|
||||
private static Logger LOGGER = Logger.getLogger(ClanMasteryData.class.getName());
|
||||
|
||||
private final List<ClanSpecialtyHolder> _clanSpecialtyData = new ArrayList<>();
|
||||
private final List<ClanMasteryHolder> _clanMasteryData = new ArrayList<>();
|
||||
|
||||
protected ClanSpecialtyData()
|
||||
protected ClanMasteryData()
|
||||
{
|
||||
load();
|
||||
}
|
||||
@ -45,10 +45,10 @@ public class ClanSpecialtyData implements IGameXmlReader
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
_clanSpecialtyData.clear();
|
||||
_clanMasteryData.clear();
|
||||
|
||||
parseDatapackFile("data/ClanSpecialtyData.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _clanSpecialtyData.size() + " clan specialties.");
|
||||
parseDatapackFile("data/ClanMasteryData.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _clanMasteryData.size() + " clan masteries.");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -57,38 +57,38 @@ public class ClanSpecialtyData implements IGameXmlReader
|
||||
forEach(doc, "list", listNode -> forEach(listNode, "clan", clanNode ->
|
||||
{
|
||||
final StatsSet set = new StatsSet(parseAttributes(clanNode));
|
||||
final int id = set.getInt("specialty");
|
||||
final int id = set.getInt("mastery");
|
||||
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);
|
||||
final int previousMastery = set.getInt("previousMastery", 0);
|
||||
final int previousMasteryAlt = set.getInt("previousMasteryAlt", 0);
|
||||
|
||||
final Skill skill = SkillData.getInstance().getSkill(skillId, skillLevel);
|
||||
if (skill == null)
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Could not create clan specialty, skill id " + skillId + " with level " + skillLevel + " does not exist.");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Could not create clan mastery, skill id " + skillId + " with level " + skillLevel + " does not exist.");
|
||||
}
|
||||
else
|
||||
{
|
||||
_clanSpecialtyData.add(new ClanSpecialtyHolder(id, skill, clanLevel, clanReputation, previousSpecialty, previousSpecialtyAlt));
|
||||
_clanMasteryData.add(new ClanMasteryHolder(id, skill, clanLevel, clanReputation, previousMastery, previousMasteryAlt));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public List<ClanSpecialtyHolder> getSpecialties()
|
||||
public List<ClanMasteryHolder> getMasteries()
|
||||
{
|
||||
return _clanSpecialtyData;
|
||||
return _clanMasteryData;
|
||||
}
|
||||
|
||||
public static ClanSpecialtyData getInstance()
|
||||
public static ClanMasteryData getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final ClanSpecialtyData _instance = new ClanSpecialtyData();
|
||||
protected static final ClanMasteryData _instance = new ClanMasteryData();
|
||||
}
|
||||
}
|
@ -21,23 +21,23 @@ import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ClanSpecialtyHolder
|
||||
public class ClanMasteryHolder
|
||||
{
|
||||
private final int _id;
|
||||
private final Skill _skill;
|
||||
private final int _clanLevel;
|
||||
private final int _clanReputation;
|
||||
private final int _previousSpecialty;
|
||||
private final int _previousSpecialtyAlt;
|
||||
private final int _previousMastery;
|
||||
private final int _previousMasteryAlt;
|
||||
|
||||
public ClanSpecialtyHolder(int id, Skill skill, int clanLevel, int clanReputation, int previousSpecialty, int previousSpecialtyAlt)
|
||||
public ClanMasteryHolder(int id, Skill skill, int clanLevel, int clanReputation, int previousMastery, int previousMasteryAlt)
|
||||
{
|
||||
_id = id;
|
||||
_skill = skill;
|
||||
_clanLevel = clanLevel;
|
||||
_clanReputation = clanReputation;
|
||||
_previousSpecialty = previousSpecialty;
|
||||
_previousSpecialtyAlt = previousSpecialtyAlt;
|
||||
_previousMastery = previousMastery;
|
||||
_previousMasteryAlt = previousMasteryAlt;
|
||||
}
|
||||
|
||||
public int getId()
|
||||
@ -60,13 +60,13 @@ public class ClanSpecialtyHolder
|
||||
return _clanReputation;
|
||||
}
|
||||
|
||||
public int getPreviousSpecialty()
|
||||
public int getPreviousMastery()
|
||||
{
|
||||
return _previousSpecialty;
|
||||
return _previousMastery;
|
||||
}
|
||||
|
||||
public int getPreviousSpecialtyAlt()
|
||||
public int getPreviousMasteryAlt()
|
||||
{
|
||||
return _previousSpecialtyAlt;
|
||||
return _previousMasteryAlt;
|
||||
}
|
||||
}
|
@ -17,9 +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.data.xml.impl.ClanMasteryData;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanSpecialtyHolder;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanMasteryHolder;
|
||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||
|
||||
@ -49,13 +49,13 @@ public class ExPledgeMasteryInfo extends AbstractItemPacket
|
||||
packet.writeD(Math.max(0, _player.getClan().getLevel() - 4)); // Total development points
|
||||
|
||||
packet.writeD(16); // Masteries count
|
||||
for (ClanSpecialtyHolder specialty : ClanSpecialtyData.getInstance().getSpecialties())
|
||||
for (ClanMasteryHolder mastery : ClanMasteryData.getInstance().getMasteries())
|
||||
{
|
||||
if (specialty.getId() < 17)
|
||||
if (mastery.getId() < 17)
|
||||
{
|
||||
packet.writeD(specialty.getId()); // Mastery
|
||||
packet.writeD(mastery.getId()); // Mastery
|
||||
packet.writeD(0); // Purchased?
|
||||
packet.writeC(/* _player.getClan().getLevel() >= specialty.getClanLevel() ? 1 : */ 0); // Availability - TODO: Previous level requirement.
|
||||
packet.writeC(/* _player.getClan().getLevel() >= mastery.getClanLevel() ? 1 : */ 0); // Availability - TODO: Previous level requirement.
|
||||
}
|
||||
}
|
||||
|
||||
|
19
L2J_Mobius_5.5_EtinasFate/dist/game/data/ClanMasteryData.xml
vendored
Normal file
19
L2J_Mobius_5.5_EtinasFate/dist/game/data/ClanMasteryData.xml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/ClanMasteryData.xsd">
|
||||
<clan mastery="1" skilId="1" skillLevel="1" clanLevel="5" clanReputation="10000" /> <!-- middle -->
|
||||
<clan mastery="2" skilId="1" skillLevel="1" clanLevel="6" clanReputation="10000" previousMastery="1" /> <!-- middle -->
|
||||
<clan mastery="3" skilId="1" skillLevel="1" clanLevel="7" clanReputation="10000" previousMastery="2" /> <!-- middle -->
|
||||
<clan mastery="4" skilId="1" skillLevel="1" clanLevel="11" clanReputation="50000" previousMastery="9" previousMasteryAlt="14" /> <!-- middle -->
|
||||
<clan mastery="5" skilId="1" skillLevel="1" clanLevel="14" clanReputation="100000" previousMastery="11" previousMasteryAlt="16" /> <!-- middle -->
|
||||
<clan mastery="6" skilId="1" skillLevel="1" clanLevel="15" clanReputation="100000" previousMastery="5" /> <!-- middle -->
|
||||
<clan mastery="7" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousMastery="3" /> <!-- left -->
|
||||
<clan mastery="8" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousMastery="7" /> <!-- left -->
|
||||
<clan mastery="9" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousMastery="8" /> <!-- left -->
|
||||
<clan mastery="10" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousMastery="4" /> <!-- left -->
|
||||
<clan mastery="11" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousMastery="10" /> <!-- left -->
|
||||
<clan mastery="12" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousMastery="3" /> <!-- right -->
|
||||
<clan mastery="13" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousMastery="12" /> <!-- right -->
|
||||
<clan mastery="14" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousMastery="13" /> <!-- right -->
|
||||
<clan mastery="15" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousMastery="14" /> <!-- right -->
|
||||
<clan mastery="16" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousMastery="15" /> <!-- right -->
|
||||
</list>
|
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/ClanSpecialtyData.xsd">
|
||||
<clan specialty="1" skilId="1" skillLevel="1" clanLevel="5" clanReputation="10000" /> <!-- middle -->
|
||||
<clan specialty="2" skilId="1" skillLevel="1" clanLevel="6" clanReputation="10000" previousSpecialty="1" /> <!-- middle -->
|
||||
<clan specialty="3" skilId="1" skillLevel="1" clanLevel="7" clanReputation="10000" previousSpecialty="2" /> <!-- middle -->
|
||||
<clan specialty="4" skilId="1" skillLevel="1" clanLevel="11" clanReputation="50000" previousSpecialty="9" previousSpecialtyAlt="14" /> <!-- middle -->
|
||||
<clan specialty="5" skilId="1" skillLevel="1" clanLevel="14" clanReputation="100000" previousSpecialty="11" previousSpecialtyAlt="16" /> <!-- middle -->
|
||||
<clan specialty="6" skilId="1" skillLevel="1" clanLevel="15" clanReputation="100000" previousSpecialty="5" /> <!-- middle -->
|
||||
<clan specialty="7" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousSpecialty="3" /> <!-- left -->
|
||||
<clan specialty="8" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousSpecialty="7" /> <!-- left -->
|
||||
<clan specialty="9" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousSpecialty="8" /> <!-- left -->
|
||||
<clan specialty="10" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousSpecialty="4" /> <!-- left -->
|
||||
<clan specialty="11" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousSpecialty="10" /> <!-- left -->
|
||||
<clan specialty="12" skilId="1" skillLevel="1" clanLevel="8" clanReputation="30000" previousSpecialty="3" /> <!-- right -->
|
||||
<clan specialty="13" skilId="1" skillLevel="1" clanLevel="9" clanReputation="30000" previousSpecialty="12" /> <!-- right -->
|
||||
<clan specialty="14" skilId="1" skillLevel="1" clanLevel="10" clanReputation="30000" previousSpecialty="13" /> <!-- right -->
|
||||
<clan specialty="15" skilId="1" skillLevel="1" clanLevel="12" clanReputation="50000" previousSpecialty="14" /> <!-- right -->
|
||||
<clan specialty="16" skilId="1" skillLevel="1" clanLevel="13" clanReputation="50000" previousSpecialty="15" /> <!-- right -->
|
||||
</list>
|
@ -6,13 +6,13 @@
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute type="xs:int" name="specialty" use="required"/>
|
||||
<xs:attribute type="xs:int" name="mastery" 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="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="previousSpecialtyAlt" use="optional"/>
|
||||
<xs:attribute type="xs:int" name="previousMastery" use="optional"/>
|
||||
<xs:attribute type="xs:int" name="previousMasteryAlt" use="optional"/>
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
@ -50,9 +50,9 @@ import com.l2jmobius.gameserver.data.xml.impl.BeautyShopData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.BuyListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CategoryData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanHallData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanMasteryData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanRewardData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanShopData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClanSpecialtyData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ClassListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CombinationItemsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.CubicData;
|
||||
@ -307,7 +307,7 @@ public class GameServer
|
||||
ClanHallData.getInstance();
|
||||
ClanHallAuctionManager.getInstance();
|
||||
ClanEntryManager.getInstance();
|
||||
ClanSpecialtyData.getInstance();
|
||||
ClanMasteryData.getInstance();
|
||||
ClanShopData.getInstance();
|
||||
|
||||
printSection("Geodata");
|
||||
|
@ -25,19 +25,19 @@ import org.w3c.dom.Document;
|
||||
|
||||
import com.l2jmobius.commons.util.IGameXmlReader;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanSpecialtyHolder;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanMasteryHolder;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ClanSpecialtyData implements IGameXmlReader
|
||||
public class ClanMasteryData implements IGameXmlReader
|
||||
{
|
||||
private static Logger LOGGER = Logger.getLogger(ClanSpecialtyData.class.getName());
|
||||
private static Logger LOGGER = Logger.getLogger(ClanMasteryData.class.getName());
|
||||
|
||||
private final List<ClanSpecialtyHolder> _clanSpecialtyData = new ArrayList<>();
|
||||
private final List<ClanMasteryHolder> _clanMasteryData = new ArrayList<>();
|
||||
|
||||
protected ClanSpecialtyData()
|
||||
protected ClanMasteryData()
|
||||
{
|
||||
load();
|
||||
}
|
||||
@ -45,10 +45,10 @@ public class ClanSpecialtyData implements IGameXmlReader
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
_clanSpecialtyData.clear();
|
||||
_clanMasteryData.clear();
|
||||
|
||||
parseDatapackFile("data/ClanSpecialtyData.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _clanSpecialtyData.size() + " clan specialties.");
|
||||
parseDatapackFile("data/ClanMasteryData.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _clanMasteryData.size() + " clan masteries.");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -57,38 +57,38 @@ public class ClanSpecialtyData implements IGameXmlReader
|
||||
forEach(doc, "list", listNode -> forEach(listNode, "clan", clanNode ->
|
||||
{
|
||||
final StatsSet set = new StatsSet(parseAttributes(clanNode));
|
||||
final int id = set.getInt("specialty");
|
||||
final int id = set.getInt("mastery");
|
||||
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);
|
||||
final int previousMastery = set.getInt("previousMastery", 0);
|
||||
final int previousMasteryAlt = set.getInt("previousMasteryAlt", 0);
|
||||
|
||||
final Skill skill = SkillData.getInstance().getSkill(skillId, skillLevel);
|
||||
if (skill == null)
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Could not create clan specialty, skill id " + skillId + " with level " + skillLevel + " does not exist.");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Could not create clan mastery, skill id " + skillId + " with level " + skillLevel + " does not exist.");
|
||||
}
|
||||
else
|
||||
{
|
||||
_clanSpecialtyData.add(new ClanSpecialtyHolder(id, skill, clanLevel, clanReputation, previousSpecialty, previousSpecialtyAlt));
|
||||
_clanMasteryData.add(new ClanMasteryHolder(id, skill, clanLevel, clanReputation, previousMastery, previousMasteryAlt));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
public List<ClanSpecialtyHolder> getSpecialties()
|
||||
public List<ClanMasteryHolder> getMasteries()
|
||||
{
|
||||
return _clanSpecialtyData;
|
||||
return _clanMasteryData;
|
||||
}
|
||||
|
||||
public static ClanSpecialtyData getInstance()
|
||||
public static ClanMasteryData getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final ClanSpecialtyData _instance = new ClanSpecialtyData();
|
||||
protected static final ClanMasteryData _instance = new ClanMasteryData();
|
||||
}
|
||||
}
|
@ -21,23 +21,23 @@ import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ClanSpecialtyHolder
|
||||
public class ClanMasteryHolder
|
||||
{
|
||||
private final int _id;
|
||||
private final Skill _skill;
|
||||
private final int _clanLevel;
|
||||
private final int _clanReputation;
|
||||
private final int _previousSpecialty;
|
||||
private final int _previousSpecialtyAlt;
|
||||
private final int _previousMastery;
|
||||
private final int _previousMasteryAlt;
|
||||
|
||||
public ClanSpecialtyHolder(int id, Skill skill, int clanLevel, int clanReputation, int previousSpecialty, int previousSpecialtyAlt)
|
||||
public ClanMasteryHolder(int id, Skill skill, int clanLevel, int clanReputation, int previousMastery, int previousMasteryAlt)
|
||||
{
|
||||
_id = id;
|
||||
_skill = skill;
|
||||
_clanLevel = clanLevel;
|
||||
_clanReputation = clanReputation;
|
||||
_previousSpecialty = previousSpecialty;
|
||||
_previousSpecialtyAlt = previousSpecialtyAlt;
|
||||
_previousMastery = previousMastery;
|
||||
_previousMasteryAlt = previousMasteryAlt;
|
||||
}
|
||||
|
||||
public int getId()
|
||||
@ -60,13 +60,13 @@ public class ClanSpecialtyHolder
|
||||
return _clanReputation;
|
||||
}
|
||||
|
||||
public int getPreviousSpecialty()
|
||||
public int getPreviousMastery()
|
||||
{
|
||||
return _previousSpecialty;
|
||||
return _previousMastery;
|
||||
}
|
||||
|
||||
public int getPreviousSpecialtyAlt()
|
||||
public int getPreviousMasteryAlt()
|
||||
{
|
||||
return _previousSpecialtyAlt;
|
||||
return _previousMasteryAlt;
|
||||
}
|
||||
}
|
@ -17,9 +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.data.xml.impl.ClanMasteryData;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanSpecialtyHolder;
|
||||
import com.l2jmobius.gameserver.model.holders.ClanMasteryHolder;
|
||||
import com.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||
|
||||
@ -49,13 +49,13 @@ public class ExPledgeMasteryInfo extends AbstractItemPacket
|
||||
packet.writeD(Math.max(0, _player.getClan().getLevel() - 4)); // Total development points
|
||||
|
||||
packet.writeD(16); // Masteries count
|
||||
for (ClanSpecialtyHolder specialty : ClanSpecialtyData.getInstance().getSpecialties())
|
||||
for (ClanMasteryHolder mastery : ClanMasteryData.getInstance().getMasteries())
|
||||
{
|
||||
if (specialty.getId() < 17)
|
||||
if (mastery.getId() < 17)
|
||||
{
|
||||
packet.writeD(specialty.getId()); // Mastery
|
||||
packet.writeD(mastery.getId()); // Mastery
|
||||
packet.writeD(0); // Purchased?
|
||||
packet.writeC(/* _player.getClan().getLevel() >= specialty.getClanLevel() ? 1 : */ 0); // Availability - TODO: Previous level requirement.
|
||||
packet.writeC(/* _player.getClan().getLevel() >= mastery.getClanLevel() ? 1 : */ 0); // Availability - TODO: Previous level requirement.
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user