Se trata de un listado de códigos que han cambiado en los emuladores Java Server, y de este modo ayudaros con su adaptación en vuestros proyectos con versiones antiguas. La lista se actualizará con forme va cambiado los valores del emulador.Anuncios:
Anuncios:
Antes:
Announcements.getInstance().announceToAll("Anuncio de ejemplo!");
Ahora:
Broadcast.toAllOnlinePlayers("Anuncio de ejemplo!");
L2Skill
Antes: L2Skill
Ahora: Skill
SkillTable
Antes: SkillTable
Ahora: SkillData
getSkillType
Antes: if (skill.getSkillType(BUFF) == L2SkillType.BUFF
Ahora: if (skill.hasEffectType(L2EffectType.STUN)
applyEffects
Antes:
import com.l2jserver.gameserver.datatables.SkillTable;
SkillTable.getInstance().getInfo(buffId, 1).applyEffects(playerx, playerx);
Ahora:
import com.l2jserver.gameserver.datatables.SkillData;
SkillData.getInstance().getSkill(buffId, 1).applyEffects(playerx, playerx);
createDummyItem
- lootItems.add(ItemTable.getInstance().createDummyItem(item.getId()).getItem());
+ lootItems.add(ItemTable.getInstance().getTemplate(item.getId()));
- if (ItemTable.getInstance().createDummyItem(reward[0]).isStackable())
+ if (ItemTable.getInstance().getTemplate(reward[0]).isStackable())
- final L2ItemInstance _tmpItem = ItemTable.getInstance().createDummyItem(itemId);
+ final L2Item item = ItemTable.getInstance().getTemplate(itemId);
getAnySpawn/findAny
final L2Spawn spawn = SpawnTable.getInstance().getAnySpawn(npcId);
Por este otro:
final L2Spawn spawn = SpawnTable.getInstance().findAny(npcId);
IdFactory.getInstance()
npc1 = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcData.getInstance().getTemplate(mid1));
Por este otro:
npc1 = new L2MonsterInstance(NpcData.getInstance().getTemplate(mid1));
getScriptName
File configFile = new File("data/scripts/events/" + getScriptName() + "/config.xml");
Por este otro:
File configFile = new File("data/scripts/events/" + getName() + "/config.xml");
setTeam
setTeam(0);
setTeam(1);
setTeam(2);
Por este otro:
setTeam(Team.NONE);
setTeam(Team.BLUE);
setTeam(Team.RED);
getEfefcts
Antes: getEfefcts
Ahora: applyEffects
TextBuilder
Antes: TextBuilder contentBuffer = new TextBuilder();
Ahora: StringBuilder contentBuffer = new StringBuilder();
Javolution
Antes: protected Map<Integer, Boolean> _list1 = new FastMap<>();
Ahora: protected Map<Integer, Boolean> _list1 = new ConcurrentHashMap<>();
List/FastList
Antes: List<LoginStatusThread> lsToRemove = new FastList<>();
Ahora: List<LoginStatusThread> lsToRemove = new ArrayList<>();
Map/FastMap
Antes: Map<Integer, String> RaidBosses = new FastMap<>();
Ahora: Map<Integer, String> RaidBosses = new HashMap<>();
addItemNumber
Antes: msg.addItemNumber(_price);
Ahora: msg.addLong(_price);
getDistanceSq/calculateDistance
Antes: castleOwner.getDistanceSq(npc)
Ahora: castleOwner.calculateDistance(npc, true, true)
L2DatabaseFactory
Antes: L2DatabaseFactory.getInstance().getConnection();
Ahora: ConnectionFactory.getInstance().getConnection();
addSpecialProduct
Antes: MultiSell.addSpecialProduct(holder.getId(), holder.getCount(), player);
Ahora: MultisellData.hasSpecialIngredient(holder.getId(), holder.getCount(), player);
Stats Modificados
cAtk -> critDmg
cAtkAdd -> critDmgAdd
rCrit -> critRate
EnlargeAbnormalSlot -> enlargeAbnormalSlot
FreightLimit -> freightLimit
PrivateSellLimit -> privateSellLimit
PrivateBuyLimit -> privateBuyLimit
DwarfRecipeLimit -> dwarfRecipeLimit
CommonRecipeLimit -> commonRecipeLimit
PhysicalMpConsumeRate -> physicalMpConsumeRate
MagicalMpConsumeRate -> magicalMpConsumeRate
DanceMpConsumeRate -> danceMpConsumeRate
BowMpConsumeRate -> bowMpConsumeRate
MpConsume -> mpConsume
setSpawnLoc
Antes: inst.setSpawnLoc(EXIT_POINT);
Ahora: inst.setExitLoc(EXIT_POINT);
skill.getItemConsume()
Antes: skill.getItemConsume()
Ahora: skill.getItemConsumeCount()
NpcTemplate
Antes: NpcTemplate
Ahora: L2NpcTemplate
Announce
Antes: Announcements.getInstance().announceToAll
Ahora: Broadcast.announceToOnlinePlayers
AbnormalEffect
Antes: player.stopAbnormalEffect(AbnormalEffect.INVINCIBILITY);
Antes: player.startAbnormalEffect(AbnormalEffect.INVINCIBILITY);
Ahora: player.stopAbnormalVisualEffect(true, AbnormalVisualEffect.INVINCIBILITY);
Ahora: player.startAbnormalVisualEffect(true, AbnormalVisualEffect.INVINCIBILITY);
setPunishLevel
Antes: _player_cha.getActingPlayer().getActingPlayer().setPunishLevel(L2PcInstance.PunishLevel.JAIL, Config.ANTIBOT_TIME_JAIL);
Ahora: PunishmentManager.getInstance().startPunishment(new PunishmentTask(_player_cha.getActingPlayer().getObjectId(), PunishmentAffect.CHARACTER, PunishmentType.JAIL, System.currentTimeMillis() + (60000 * Config.ANTIBOT_TIME_JAIL), "Bot", getClass().getSimpleName()));
addAttackPlayerDesire
Antes: addAttackPlayerDesire(npc, player.getActingPlayer());
Ahora: addAttackDesire(npc, player.getActingPlayer());
ChatType
Antes: ChatType
Ahora: Says2 --> gameserver-network-clientpackets