| [Résolu] Npc PC | |
|
|
Auteur | Message |
---|
yacancoatl
Nombre de messages : 91 Age : 36 Date d'inscription : 24/09/2008
| Sujet: [Résolu] Npc PC 13/12/08, 11:20 pm | |
| Bonjour/bonsoir à tous ! Hé bien me revoilà après une petite absence du aux examens... non je n'ai pas fini mes examens donc je passe juste comme ça. OK on s'en fou ! Bon, au boulot >.< Jusque maintenant j'utilisais des serveurs précompiler mais j'ai voulu aller plus loin donc mon amis "Google". Je veux faire quelques petites choses dans le Java et je n'ai pas encore eu le temps d'aller voir un peu les cours sur "siteduzero.com". Voila je veux implanter le fameux " Npc to Pc's" -> http://www.l2jfree.com/index.php?action=dlattach;topic=2864.0;attach=478Vu que quand je veux appliquer le patch avec " clic droit->SVNTortoise->ApplyPatch" ça me met une erreur - Citation :
- "An unknow line type was found in line 181"
Alors j'ai fais ça manuellement. J'ai eu quelques erreur que j'ai corrigé grâce à ce cher Google mais la je bloque -_- [ Je dois pas préciser que je suis complètement nul en java ? Si ? ] - Code:
-
C:\Serveur_V1>C:/maven/bin/mvn assembly:assembly -Dmaven.test.skip=true [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'assembly'. WAGON_VERSION: 1.0-beta-2 [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - l2jfree:l2jfree-core:jar:1.2.3A [INFO] task-segment: [assembly:assembly] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Preparing assembly:assembly [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - l2jfree:l2jfree-core:jar:1.2.3A [INFO] ------------------------------------------------------------------------ [INFO] [buildnumber:create {execution: default}] [INFO] Storing buildNumber: 4904 [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Compiling 1352 source files to C:\Serveur_V1\target\classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\model\actor\instance\L2NpcIns tance.java:[211,15] sa is already defined in onRandomAnimation()
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\model\actor\instance\L2NpcIns tance.java:[325,1] method does not override or implement a method from a superty pe
[INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17 seconds [INFO] Finished at: Sat Dec 13 21:01:32 CET 2008 [INFO] Final Memory: 18M/120M [INFO] ------------------------------------------------------------------------
C:\Serveur_V1> Vous allez me dire, ton probleme est dans [L2NpcInstance.java] Je suis tout à fait d'accord avec vous, mais je dois faire quoi moi ? 0.0 - Citation :
- [RP Mode ON] *tape sur le code* aller petit...aller quoi....... s'il te plait...[RP Mode OFF]
En parallèle, questions : - Dans le patch on trouve des trucs comme ça : "@@ -0,0 +1,160 @@" 1) Qu'est ce que c'est ? (Moi ça me fais penser à un endroit pour une recherche. Ligne ****** ) 2) Si c'est ce que je pense, comment l'utiliser ? Pour le topic ou ils expliquent tout -> C'est la http://www.l2jfree.com/index.php?topic=2864.0Merci d'avance pour vos réponses. Oui j'ai cherché sur google, c'est évident >.< !
Dernière édition par yacancoatl le 16/12/08, 05:43 pm, édité 1 fois | |
|
| |
Divinity
Nombre de messages : 1282 Age : 35 Localisation : Yvelines Date d'inscription : 24/05/2006
| Sujet: Re: [Résolu] Npc PC 14/12/08, 01:43 pm | |
| - Code:
-
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\model\actor\instance\L2NpcIns tance.java:[211,15] sa is already defined in onRandomAnimation()
Pour moi c'est une variable que tu modifies plusieurs fois, et qui ne devrait pas l'être. - Code:
-
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\model\actor\instance\L2NpcIns tance.java:[325,1] method does not override or implement a method from a superty pe Et ici, tu as mis un @override ou un implement dans le thread alors qu'il ne le fallait pas. Après je ne suis pas sûr ^^. Tu as le numéro des lignes [ 325,1] et des caractères [325, 1] pour t'aider à corriger le problème. | |
|
| |
yacancoatl
Nombre de messages : 91 Age : 36 Date d'inscription : 24/09/2008
| Sujet: Re: [Résolu] Npc PC 14/12/08, 02:22 pm | |
| Ok merci pour la réponse, donc je me met au boulot : Pour le - Code:
-
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\model\actor\instance\L2NpcInstance.java:[211,15] sa is already defined in onRandomAnimation() Ca a l'air corrigé. en supprimant une ligne : Ce que j'ai : - Code:
-
public void onRandomAnimation() { // Send a packet SocialAction to all L2PcInstance in the _KnownPlayers of the L2NpcInstance SocialAction sa = new SocialAction(getObjectId(), Rnd.get(2, 3)); int min = (_customNpcInstance != null) ? 1 : 2; int max = (_customNpcInstance != null) ? 13 : 3; // Send a packet SocialAction to all L2PcInstance in the _KnownPlayers of the L2NpcInstance broadcastPacket(sa); }
Ce que le patch disait : - Code:
-
@@ -200,8 +204,10 @@ */ public void onRandomAnimation() { - // Send a packet SocialAction to all L2PcInstance in the _KnownPlayers of the L2NpcInstance - SocialAction sa = new SocialAction(getObjectId(), Rnd.get(2, 3)); + int min = (_customNpcInstance != null) ? 1 : 2; + int max = (_customNpcInstance != null) ? 13 : 3; + // Send a packet SocialAction to all L2PcInstance in the _KnownPlayers of the L2NpcInstance + SocialAction sa = new SocialAction(getObjectId(), Rnd.get(min, max)); broadcastPacket(sa); }
J'ai donc supprimé : + SocialAction sa = new SocialAction(getObjectId(), Rnd.get(min, max));Le second est un Override à ajouter. (d'apres le patch) Ce que dit le patch : - Code:
-
@Override @@ -2711,8 +2729,18 @@ + public L2CustomNpcInstance getCustomNpcInstance() + { + return _customNpcInstance; + } + + public void setCustomNpcInstance(L2CustomNpcInstance arg) + { + _customNpcInstance = arg; + }
je suis donc aller a la ligne 2711 et ajouter ceci mais j'ai toujours l'erreur : C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\model\actor\instance\L2NpcInstance.java:[2700,1] method does not override or implement a method from a supertype
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\model\actor\instance\L2NpcInstance.java:[2700,1] method does not override or implement a method from a supertypeMais si je le met pas... c'est pas grave ? je doute quand même, c'est pas la pour faire beau quoi >_> Merci | |
|
| |
Respawner
Nombre de messages : 1620 Age : 35 Date d'inscription : 20/04/2006
| Sujet: Re: [Résolu] Npc PC 14/12/08, 02:27 pm | |
| Je vois aucun Override à ajouter. Celui qui est sur le patch n'est absolument pas à mettre... | |
|
| |
yacancoatl
Nombre de messages : 91 Age : 36 Date d'inscription : 24/09/2008
| Sujet: Re: [Résolu] Npc PC 14/12/08, 03:27 pm | |
| - Citation :
- Je vois aucun Override à ajouter. Celui qui est sur le patch n'est absolument pas à mettre...
Ok deleted. Bizarre -_- Je n'ai plus de problème concernant ca.. j'ai un nouveau truc qui vien. -> Omg 0.0 Voici l'erreur : - Code:
-
C:\Serveur_V1>C:/maven/bin/mvn assembly:assembly -Dmaven.test.skip=true [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'assembly'. WAGON_VERSION: 1.0-beta-2 [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - l2jfree:l2jfree-core:jar:1.2.3A [INFO] task-segment: [assembly:assembly] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Preparing assembly:assembly [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - l2jfree:l2jfree-core:jar:1.2.3A [INFO] ------------------------------------------------------------------------ [INFO] [buildnumber:create {execution: default}] [INFO] Storing buildNumber: 4904 [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Compiling 1224 source files to C:\Serveur_V1\target\classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[46,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[47,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[48,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[49,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[51,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[52,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[53,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[54,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[55,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[56,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[57,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[58,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[59,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[60,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[69,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[70,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[75,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[76,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[89,64] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[90,64] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[92,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[93,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[94,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[96,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[98,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[99,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[100,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[101,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[113,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[116,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[119,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[120,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[124,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[126,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[128,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[129,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\NpcInfo .java:[60,9] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\model\actor\instance\L2Custom NpcInstance.java:[83,16] cannot find symbol symbol : method setCustomNpcInstance(<nulltype>) location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\model\actor\instance\L2Custom NpcInstance.java:[88,15] cannot find symbol symbol : method setCustomNpcInstance(com.l2jfree.gameserver.model.actor.instanc e.L2CustomNpcInstance) location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
[INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 20 seconds [INFO] Finished at: Sun Dec 14 14:57:28 CET 2008 [INFO] Final Memory: 15M/86M [INFO] ------------------------------------------------------------------------
Dernière édition par yacancoatl le 14/12/08, 03:43 pm, édité 1 fois | |
|
| |
yacancoatl
Nombre de messages : 91 Age : 36 Date d'inscription : 24/09/2008
| Sujet: Re: [Résolu] Npc PC 14/12/08, 03:27 pm | |
| Bon un a la fois. Il y a un problème dans CustomNpcInfo.java et L2NpcInstance.java Voici le mien :(CustomNpcinfo.java) - Code:
-
/* * 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.l2jfree.gameserver.network.serverpackets;
import com.l2jfree.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfree.gameserver.datatables.CharTemplateTable; public class CustomNpcInfo extends L2GameServerPacket {
private static final String _S__31_CUSTOMNPCINFO = "[S] 31 CustomNpcInfo [dddddsddd dddddddddddd dddddddd hhhh d hhhhhhhhhhhh d hhhh hhhhhhhhhhhhhhhh dddddd dddddddd ffff ddd s ddddd ccccccc h c d c h ddd cc d ccc ddddddddddd]"; private L2NpcInstance _activeChar;
/** [color=red]* @param custom npcs that look like players */ pub[/color]lic CustomNpcInfo(L2NpcInstance cha) { _activeChar = cha; _activeChar.setClientX(_activeChar.getPosition().getX()); _activeChar.setClientY(_activeChar.getPosition().getY()); _activeChar.setClientZ(_activeChar.getPosition().getZ());
}
@Override protected final void writeImpl() { writeC(0x31); writeD(_activeChar.getX()); writeD(_activeChar.getY()); writeD(_activeChar.getZ()); writeD(_activeChar.getHeading()); writeD(_activeChar.getObjectId()); writeS(_activeChar.getCustomNpcInstance().getName()); writeD(_activeChar.getCustomNpcInstance().getRace()); writeD(_activeChar.getCustomNpcInstance().isFemaleSex()? 1 : 0); writeD(_activeChar.getCustomNpcInstance().getClassId()); write('D',0, 2); writeD(_activeChar.getCustomNpcInstance().PAPERDOLL_RHAND()); writeD(_activeChar.getCustomNpcInstance().PAPERDOLL_LHAND()); writeD(_activeChar.getCustomNpcInstance().PAPERDOLL_GLOVES()); writeD(_activeChar.getCustomNpcInstance().PAPERDOLL_CHEST()); writeD(_activeChar.getCustomNpcInstance().PAPERDOLL_LEGS()); writeD(_activeChar.getCustomNpcInstance().PAPERDOLL_FEET()); writeD(_activeChar.getCustomNpcInstance().PAPERDOLL_HAIR()); writeD(_activeChar.getCustomNpcInstance().PAPERDOLL_RHAND()); writeD(_activeChar.getCustomNpcInstance().PAPERDOLL_HAIR()); writeD(_activeChar.getCustomNpcInstance().PAPERDOLL_HAIR2());
write('D',0, 8); write('H',0, 4); writeD(0); write('H',0,12); writeD(0); write('H',0,20); writeD(_activeChar.getCustomNpcInstance().getPvpFlag() ? 1 : 0); writeD(_activeChar.getCustomNpcInstance().getKarma());
writeD(_activeChar.getMAtkSpd()); writeD(_activeChar.getPAtkSpd()); writeD(_activeChar.getCustomNpcInstance().getPvpFlag() ? 1 : 0); writeD(_activeChar.getCustomNpcInstance().getKarma());
writeD(_activeChar.getRunSpeed()); writeD(_activeChar.getRunSpeed()/2); writeD(_activeChar.getRunSpeed()/3); writeD(_activeChar.getRunSpeed()/3); writeD(_activeChar.getRunSpeed()); writeD(_activeChar.getRunSpeed()); writeD(_activeChar.getRunSpeed()); writeD(_activeChar.getRunSpeed()); writeF(_activeChar.getStat().getMovementSpeedMultiplier()); writeF(_activeChar.getStat().getAttackSpeedMultiplier());
writeF(CharTemplateTable.getInstance().getTemplate(_activeChar.getCustomNpcInstance().getClassId()).getCollisionRadius()); writeF(CharTemplateTable.getInstance().getTemplate(_activeChar.getCustomNpcInstance().getClassId()).getCollisionHeight()); writeD(_activeChar.getCustomNpcInstance().getHairStyle()); writeD(_activeChar.getCustomNpcInstance().getHairColor()); writeD(_activeChar.getCustomNpcInstance().getFace()); writeS(_activeChar.getCustomNpcInstance().getTitle()); writeD(_activeChar.getCustomNpcInstance().getClanId()); writeD(_activeChar.getCustomNpcInstance().getClanCrestId()); writeD(_activeChar.getCustomNpcInstance().getAllyId()); writeD(_activeChar.getCustomNpcInstance().getAllyCrestId()); writeD(0); writeC(1); writeC(_activeChar.isRunning() ? 1 : 0); writeC(_activeChar.isInCombat() ? 1 : 0); writeC(_activeChar.isAlikeDead() ? 1 : 0); write('C',0, 3); writeH(0); writeC(0); writeD(_activeChar.getAbnormalEffect()); writeC(0); writeH(0); writeD(_activeChar.getCustomNpcInstance().getClassId()); writeD(_activeChar.getMaxCp()); writeD((int)_activeChar.getStatus().getCurrentCp()); writeC(_activeChar.getCustomNpcInstance().getEnchantWeapon()); writeC(0); writeD(0); writeC(_activeChar.getCustomNpcInstance().isNoble() ? 1 : 0); writeC(_activeChar.getCustomNpcInstance().isHero() ? 1 : 0); writeC(0);
write('D',0, 3); writeD(_activeChar.getCustomNpcInstance().nameColor()); writeD(0); writeD(_activeChar.getCustomNpcInstance().getPledgeClass()); writeD(0); writeD(_activeChar.getCustomNpcInstance().titleColor()); writeD(_activeChar.getCustomNpcInstance().getCursedWeaponLevel()); write('D',0, 2); } /* (non-Javadoc)
* @see com.l2jfree.gameserver.serverpackets.ServerBasePacket#getType() */ @Override public String getType() { return _S__31_CUSTOMNPCINFO; } private final void write(char type, int value , int times) { for (int i=0 ; i<times ; i++) { switch(type) { case 'C': writeC(value); break; case 'D': writeD(value); break; case 'F': writeF(value); break; case 'H': writeH(value); [url] break; } } } }
L2NpcInstance.java -> http://www.megaupload.com/?d=YRO7CASS L2CustomNpcInstance.javahttp://www.megaupload.com/?d=S0Y2DQJG | |
|
| |
decarvk
Nombre de messages : 241 Age : 34 Localisation : en france Date d'inscription : 06/07/2008
| Sujet: Re: [Résolu] Npc PC 14/12/08, 11:38 pm | |
| C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomN pcInfo.java:[129,20] cannot find symbol symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance
ce type d'erreur je l'ai rencoontrai ya pas longtemps sur l'installation du script pour ajouter un etape sur les chance d'enchant de respawner verifie bien les noms de variable corrige les et sa devrai marcher | |
|
| |
Divinity
Nombre de messages : 1282 Age : 35 Localisation : Yvelines Date d'inscription : 24/05/2006
| Sujet: Re: [Résolu] Npc PC 15/12/08, 12:58 am | |
| - Citation :
- J'ai donc supprimé : + SocialAction sa = new SocialAction(getObjectId(), Rnd.get(min, max));
Remet cette ligne, et supprime celle du dessus, ça ira mieux ^^, enfin tu n'auras pas de suprise quand le mode fonctionnera . | |
|
| |
yacancoatl
Nombre de messages : 91 Age : 36 Date d'inscription : 24/09/2008
| Sujet: Re: [Résolu] Npc PC 16/12/08, 02:45 pm | |
| Bonjour, (enfin fini les examens!) Moi je capte pas trop enfaite decarvk... mais bon j'ai envie de savoir alors je persiste. -> Et on rigole pas de mes démonstrations a la James Bond ! Donc je regarde ce truc. - Citation :
- C:\Serveur_V1\src\main\java\com\l2jfree\gameserver\network\serverpackets\CustomNpcInfo.java:[129,20] cannot find symbol
symbol : method getCustomNpcInstance() location: class com.l2jfree.gameserver.model.actor.instance.L2NpcInstance Pour moi ca veu dire "CustomNpcInfo.java trouve pas le symbole method getCustomNpcInstance() dans L2NpcInstance" Donc il y a un truc pas clair. Je regarde "CustomNpcInfo" je m'aperçois que a chaque ligne ou on me di qu'il y a une erreur on vois ce truc là : "(_activeChar.getCustomNpcInstance()" C'est joli mais C'est pas plutot get L2CustomNpcInstance ? Donc si j'ai juste; ce serais pas getCustomNpcInstance qui déconne mais le lieu où il cherche ? Si on pourrais me mettre sur un piste un peu plus précise ce serait pas de refus Merci d'avance encore une fois et toujours... Ah oui ! Je deteste le java ! >.< | |
|
| |
Respawner
Nombre de messages : 1620 Age : 35 Date d'inscription : 20/04/2006
| Sujet: Re: [Résolu] Npc PC 16/12/08, 03:15 pm | |
| Hého faut réfléchir hein Traduction de la stacktrace => Impossible de trouver la méthode getCustomNpcInstance() dans la classe L2NpcInstance. Donc tu vas voir dans la classe, tu regardes si la méthode a été oubliée (probablement) et tu la codes. Elle est dans ton 3ème post... - Code:
-
@Override @@ -2711,8 +2729,18 @@ + public L2CustomNpcInstance getCustomNpcInstance() + { + return _customNpcInstance; + } + + public void setCustomNpcInstance(L2CustomNpcInstance arg) + { + _customNpcInstance = arg; + } | |
|
| |
yacancoatl
Nombre de messages : 91 Age : 36 Date d'inscription : 24/09/2008
| Sujet: Re: [Résolu] Npc PC 16/12/08, 04:08 pm | |
| - Citation :
- Hého faut réfléchir hein Smile
Maieuh !! Je fais que ça mais j'ai le crane remplit à 99,99% ! Une fois faut pas mettre l'Override une fois faut le mettre ... Grrr ! D'habitude je comprend vite mais Java ça me change vraiment tout *_* Et j'ai entendu dire je sais pas où que même en apprenant le java (au moin les bases) c'était pas suffisant pour L2 qui est sois disant "super complexe" Omg c'est vrai ? *-* [edit]Après reflection tu voulait juste dire d'enlever le @Override ? Quand je l'enleve sa se compile maintenant ... >_< C'est logique et bete enfaite je comprend pas comment j'ai pas vu ...Quand tu m'a dis d'enlever @Override je pensais tout le code qui va avec >_> | |
|
| |
Respawner
Nombre de messages : 1620 Age : 35 Date d'inscription : 20/04/2006
| Sujet: Re: [Résolu] Npc PC 16/12/08, 04:34 pm | |
| Est-ce que tu sais ce que veut dire "override" en anglais ? On peut traduire ça par passer outre, prendre le dessus, etc... @Override c'est une annotation pour dire que la méthode est déclarée dans une classe mère ou une interface et que quand on va la redéfinir dans notre classe actuelle, celle que l'on fait va prendre le pas sur celle de la classe mère. On l'utilise dans le contexte de l'héritage donc. L'annotation @Override tu peux t'en passer car déjà là tu n'avais pas à la mettre (le patch ne te dit pas de le mettre [ pas de + devant la ligne donc c'est une ligne qui existait déjà ]) et tout simplement c'est pas obligatoire... La méthode getCustomNpcInstance est déclarée une seule et unique fois, elle n'est pas déjà codée dans la classe mère de L2NpcInstance donc tu ne dois en aucun cas mettre le @Override. C'est pas compliqué, tu as juste fait une erreur d'interprétation du patch et vu que tu débutes en Java ça te paraissais correct stoo. Mais avec l'expérience tu ne feras plus l'erreur par la suite | |
|
| |
yacancoatl
Nombre de messages : 91 Age : 36 Date d'inscription : 24/09/2008
| Sujet: Re: [Résolu] Npc PC 16/12/08, 04:40 pm | |
| Oui enfaite j'aimerais apprendre le Java mais je sais pas quels livres acheter. Il y a une "séries" qui serait conseiller pour les débutant ? Histoire d'apprendre Je vous embeterais bientot pour un code Java pour creer un language de race. D'apres moi, je dois creer un nouveau chat avec une nouvelle commande et faire en sorte que ca apparaisse que en all. Vous allez me taper sur les doigts je le sent *_* Merci beaucoup a tous et merci pour l'info sur l'Override et oui je pense ne plus refaire cette erreur ! Enfin j'espere Je teste et je met [Resolu] Si c'est bon | |
|
| |
Respawner
Nombre de messages : 1620 Age : 35 Date d'inscription : 20/04/2006
| Sujet: Re: [Résolu] Npc PC 16/12/08, 04:47 pm | |
| - yacancoatl a écrit:
- Oui enfaite j'aimerais apprendre le Java mais je sais pas quels livres acheter. Il y a une "séries" qui serait conseiller pour les débutant ?
Histoire d'apprendre Va sur developpez.com y'a de bonnes choses même si je suis pas fan. J'ai commencé avec un bouquin "Aide-mémoire du Java" un truc comme ça qui est pas mal foutu mais qui ne m'apprend plus rien maintenant. - yacancoatl a écrit:
- Je vous embeterais bientot pour un code Java pour creer un language de race.
D'apres moi, je dois creer un nouveau chat avec une nouvelle commande et faire en sorte que ca apparaisse que en all. Vous allez me taper sur les doigts je le sent *_* Ahah j'ai terminé un système dans le genre il y a pas longtemps juste pour le fun | |
|
| |
Jules
Nombre de messages : 384 Localisation : Rome Date d'inscription : 11/04/2008
| Sujet: Re: [Résolu] Npc PC 16/12/08, 05:32 pm | |
| Resp, t'as gardé les mêmes décalages entre langues que prévu ou t'as changé des trucs ? | |
|
| |
Respawner
Nombre de messages : 1620 Age : 35 Date d'inscription : 20/04/2006
| Sujet: Re: [Résolu] Npc PC 16/12/08, 05:36 pm | |
| - Jules a écrit:
- Resp, t'as gardé les mêmes décalages entre langues que prévu ou t'as changé des trucs ?
J'ai changé, j'ai perdu les originaux, j'ai fait du random à la place. C'est utile à personne, j'ai gardé le code pour moi. Ça tenait plus du "proof of concept" comme quoi on peut le faire (sans se casser la tête comme je pensais). | |
|
| |
yacancoatl
Nombre de messages : 91 Age : 36 Date d'inscription : 24/09/2008
| Sujet: Re: [Résolu] Npc PC 16/12/08, 05:44 pm | |
| Voila ca fonctionne impeccable ( enfin jais pas vu d'erreur je vais d'abord l'implanter sur un nouveau Core 1.2.6 voila voila bisous bisous et a bientot pour de nouvelles aventures !
Merci ! | |
|
| |
decarvk
Nombre de messages : 241 Age : 34 Localisation : en france Date d'inscription : 06/07/2008
| Sujet: Re: [Résolu] Npc PC 16/12/08, 07:09 pm | |
| si tu veut vraiment un bouquin pour assimiler les base je te conseil:
programmer un java de Claude Delanniy au edition EYROLLES
voila bonne continuation | |
|
| |
yacancoatl
Nombre de messages : 91 Age : 36 Date d'inscription : 24/09/2008
| Sujet: Re: [Résolu] Npc PC 16/12/08, 07:30 pm | |
| Merci beaucoup je vais voir ça, il y aussi "siteduzero.com" c'est un bon truc aussi ? | |
|
| |
Hizin
Nombre de messages : 501 Age : 35 Localisation : Le Mans, Sarthe Date d'inscription : 08/04/2007
| Sujet: Re: [Résolu] Npc PC 16/12/08, 07:54 pm | |
| Je n'ai pas lu la partie consacrée au Java sur le site du zéro, mais c'est au moins une bonne "approche" du langage (mais pas forcément complète) a ce que j'ai lu des réactions. | |
|
| |
decarvk
Nombre de messages : 241 Age : 34 Localisation : en france Date d'inscription : 06/07/2008
| Sujet: Re: [Résolu] Npc PC 16/12/08, 09:05 pm | |
| j'ai commencer sur le site du zero certain point reste flou mais les base (signification des class, methode, objet.....) sont assez claire
ensuite quand on commence a parler de thread (dans les dernier chapitre bien on vas poser des question a droite et a gauche pour avoir de l'aide a comprendre. | |
|
| |
Contenu sponsorisé
| Sujet: Re: [Résolu] Npc PC | |
| |
|
| |
| [Résolu] Npc PC | |
|