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.
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
hello everyone !
I need help with a l2script Rev H5-Salvation/Classic build. I compiled the project, installed everything but I can't log in to the server, it won't log me in. I tried a thousand ways without good results. I leave you the error when logging in either with the H5-Salvation Client.
ERROR ---> WARN: IPBANMANAGER ---> IP !!!!
I'm waiting for help! Thank you!
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.