Hi guys , i'm trying to change this java code from java 7 to java 8
who can help me please change it .
i want change it , for L2RO-TEAM source
/*
* 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.l2jserver.gameserver.network.serverpackets;
import java.util.ArrayList;
import java.util.List;
import com.l2jserver.ArabicUtilities;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.NpcStringId;
import com.l2jserver.gameserver.network.SystemMessageId;
/**
* This class ...
*
* @version $Revision: 1.4.2.1.2.3 $ $Date: 2005/03/27 15:29:57 $
*/
public final class CreatureSay extends L2GameServerPacket
{
// ddSS
private static final String _S__4A_CREATURESAY = "[S] 4A CreatureSay";
private int _objectId;
private int _textType;
private String _charName = null;
private int _charId = 0;
private String _text = null;
private int _npcString = -1;
private List<String> _parameters;
/**
* @param objectId
* @param messageType
* @param charName
* @param text
*/
public CreatureSay(int objectId, int messageType, String charName, String text)
{
_objectId = objectId;
_textType = messageType;
_charName = charName;
_text = text;
}
public CreatureSay(int objectId, int messageType, int charId, NpcStringId npcString)
{
_objectId = objectId;
_textType = messageType;
_charId = charId;
_npcString = npcString.getId();
}
public CreatureSay(int objectId, int messageType, String charName, NpcStringId npcString)
{
_objectId = objectId;
_textType = messageType;
_charName = charName;
_npcString = npcString.getId();
}
public CreatureSay(int objectId, int messageType, int charId, SystemMessageId sysString)
{
_objectId = objectId;
_textType = messageType;
_charId = charId;
_npcString = sysString.getId();
}
/**
* String parameter for argument S1,S2,.. in npcstring-e.dat
* @param text
*/
public void addStringParameter(String text)
{
if (_parameters == null)
_parameters = new ArrayList<>();
_parameters.add(text);
}
@Override
protected final void writeImpl()
{
writeC(0x4a);
writeD(_objectId);
writeD(_textType);
if (_charName != null)
writeS(_charName);
else
writeD(_charId);
writeD(_npcString); // High Five NPCString ID
if (_text != null)
{//only edit this
if (ArabicUtilities.hasArabicLetters(_text))
{
String ttext = ArabicUtilities.reshapeSentence(_text);
writeS(ttext);
}
else
{
writeS(_text);
}
}//only edit this
else
{
if (_parameters != null)
{
for (String s : _parameters)
writeS(s);
}
}
}
@Override
public final void runImpl()
{
L2PcInstance _pci = getClient().getActiveChar();
if (_pci != null)
{
_pci.broadcastSnoop(_textType,_charName,_text);
}
}
@Override
public String getType()
{
return _S__4A_CREATURESAY;
}
}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hola, gente bella como estan? Acabo de terminar de compilar el proyecto L2jFrozen Rev: 1132 (viejisimo)
No tengo problemas con que sea muy viejo, ya que el proyecto es para mi y mis hijos. (Lan/Offline) no es para ponerlo en línea. Quiero aprender y darles a mis hijos más comodidades a la hora de jugar. y por mi parte, también experimentar con el juego.
Mi problema es que no se mucho del tema. Pude hacer algunas configuraciones Basicas a mi gusto y el de mis hijos, pero nunca compila ni nada de eso... Estaria necesitando ayuda por parte de ustedes, la comunidad... Quiero simplemente Quitar todas las restricciones de Subclases, Quitar restriccion de "Overlord, Warsmith y subclase de elfos oscuros con elfos blancos y alrevez" desde ya muchas gracias! saludos comunidad
Question
DLDL
Hi guys , i'm trying to change this java code from java 7 to java 8
who can help me please change it .
i want change it , for L2RO-TEAM source
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.