исходники эти (ЭмуРТ ХФ)
компилю пробовал и менять на 8.73 яву и ант на 1.9.6. все по старому
есть подозрения что все из-за кривости метода ItemFunctions
может кто знает, в чем трабла, почему не компилится?
вот ошибки
P.S Что-то компилятору не нравитсявот файлики на которые ругается
компилю пробовал и менять на 8.73 яву и ант на 1.9.6. все по старому
есть подозрения что все из-за кривости метода ItemFunctions
может кто знает, в чем трабла, почему не компилится?
вот ошибки
D:\emurt\build-full-revision.xml:172: Compile failed; see the compiler error output for details.
D:\emurt\dist\gameserver\data\scripts\handler\items\VisualItem.java (18:49)error: cannot find symbol variable VISUAL_FROM_AUGMENT_ALL
D:\emurt\dist\gameserver\data\scripts\handler\items\VisualItem.java (58:55)error: cannot find symbol method isVisualLifeStoneArmor(int)
D:\emurt\dist\gameserver\data\scripts\handler\items\VisualItem.java (59:56)error: cannot find symbol method isVisualLifeStoneWeapon(int)
D:\emurt\build-full-revision.xml:172: Compile failed; see the compiler error output for details.
D:\emurt\build-full-revision.xml:172: Compile failed; see the compiler error output for details.
Ant build completed with 6 errors and no warnings in 2m 41s at 02.09.2016 22:42
D:\emurt\dist\gameserver\data\scripts\handler\items\VisualItem.java (18:49)error: cannot find symbol variable VISUAL_FROM_AUGMENT_ALL
D:\emurt\dist\gameserver\data\scripts\handler\items\VisualItem.java (58:55)error: cannot find symbol method isVisualLifeStoneArmor(int)
D:\emurt\dist\gameserver\data\scripts\handler\items\VisualItem.java (59:56)error: cannot find symbol method isVisualLifeStoneWeapon(int)
D:\emurt\build-full-revision.xml:172: Compile failed; see the compiler error output for details.
D:\emurt\build-full-revision.xml:172: Compile failed; see the compiler error output for details.
Ant build completed with 6 errors and no warnings in 2m 41s at 02.09.2016 22:42
D:\emurt\build-full-revision.xml:172: Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1365)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1070)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:854)
at org.apache.tools.ant.Main.startAnt(Main.java:236)
at org.apache.tools.ant.Main.start(Main.java:199)
at org.apache.tools.ant.Main.main(Main.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
D:\emurt\build-full-revision.xml:172: Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1365)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1070)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:854)
at org.apache.tools.ant.Main.startAnt(Main.java:236)
at org.apache.tools.ant.Main.start(Main.java:199)
at org.apache.tools.ant.Main.main(Main.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
Ant build completed with 6 errors and no warnings in 2m 41s at 02.09.2016 22:42
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1365)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1070)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:854)
at org.apache.tools.ant.Main.startAnt(Main.java:236)
at org.apache.tools.ant.Main.start(Main.java:199)
at org.apache.tools.ant.Main.main(Main.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
D:\emurt\build-full-revision.xml:172: Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1365)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1070)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:854)
at org.apache.tools.ant.Main.startAnt(Main.java:236)
at org.apache.tools.ant.Main.start(Main.java:199)
at org.apache.tools.ant.Main.main(Main.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
Ant build completed with 6 errors and no warnings in 2m 41s at 02.09.2016 22:42
public class VisualItem extends SimpleItemHandler implements ScriptFile {
//private final int[] ITEM_IDS = Config.VISUAL_FROM_AUGMENT_ALL;
private static final int[] ITEM_IDS = Config.VISUAL_FROM_AUGMENT_ALL;
@Override
public int[] getItemIds() {
return ITEM_IDS;
}
@Override
public boolean pickupItem(Playable playable, ItemInstance item) {
return true;
}
@Override
public void onLoad() {
ItemHandler.getInstance().registerItemHandler(this);
}
@Override
public void onReload() {
}
@Override
public void onShutdown() {
}
@Override
protected boolean useItemImpl(Player player, ItemInstance item, boolean ctrl) {
if (!Config.ALLOW_VISUAL_FROM_AUGMENT) {
return false;
}
int itemId = item.getItemId();
if (player.isInOlympiadMode()) {
player.sendPacket(new SystemMessage(SystemMessage.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addItemName(itemId));
return false;
}
// if (!useItem(player, item, 1)) {
// return false;
// }
boolean isVisualLifeStoneArmor = ItemFunctions.isVisualLifeStoneArmor(itemId);
boolean isVisualLifeStoneWeapon = ItemFunctions.isVisualLifeStoneWeapon(itemId);
if (isVisualLifeStoneArmor) {
player.getInventory().onPaperdollItemId(Inventory.PAPERDOLL_CHEST, itemId);
player.getInventory().refreshEquip();
ThreadPoolManager.getInstance().schedule(new NextSet(player, Inventory.PAPERDOLL_CHEST, 0), 5000);
//player.sendChanges();
return true;
} else if (isVisualLifeStoneWeapon) {
player.getInventory().onPaperdollItemId(Inventory.PAPERDOLL_RHAND, itemId);
player.getInventory().refreshEquip();
ThreadPoolManager.getInstance().schedule(new NextSet(player, Inventory.PAPERDOLL_RHAND, 0), 5000);
//player.sendChanges();
return true;
}
return false;
}
//private final int[] ITEM_IDS = Config.VISUAL_FROM_AUGMENT_ALL;
private static final int[] ITEM_IDS = Config.VISUAL_FROM_AUGMENT_ALL;
@Override
public int[] getItemIds() {
return ITEM_IDS;
}
@Override
public boolean pickupItem(Playable playable, ItemInstance item) {
return true;
}
@Override
public void onLoad() {
ItemHandler.getInstance().registerItemHandler(this);
}
@Override
public void onReload() {
}
@Override
public void onShutdown() {
}
@Override
protected boolean useItemImpl(Player player, ItemInstance item, boolean ctrl) {
if (!Config.ALLOW_VISUAL_FROM_AUGMENT) {
return false;
}
int itemId = item.getItemId();
if (player.isInOlympiadMode()) {
player.sendPacket(new SystemMessage(SystemMessage.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS).addItemName(itemId));
return false;
}
// if (!useItem(player, item, 1)) {
// return false;
// }
boolean isVisualLifeStoneArmor = ItemFunctions.isVisualLifeStoneArmor(itemId);
boolean isVisualLifeStoneWeapon = ItemFunctions.isVisualLifeStoneWeapon(itemId);
if (isVisualLifeStoneArmor) {
player.getInventory().onPaperdollItemId(Inventory.PAPERDOLL_CHEST, itemId);
player.getInventory().refreshEquip();
ThreadPoolManager.getInstance().schedule(new NextSet(player, Inventory.PAPERDOLL_CHEST, 0), 5000);
//player.sendChanges();
return true;
} else if (isVisualLifeStoneWeapon) {
player.getInventory().onPaperdollItemId(Inventory.PAPERDOLL_RHAND, itemId);
player.getInventory().refreshEquip();
ThreadPoolManager.getInstance().schedule(new NextSet(player, Inventory.PAPERDOLL_RHAND, 0), 5000);
//player.sendChanges();
return true;
}
return false;
}
<target name="compile-scripts" depends="commons-jar" description="Compile the source.">
<copy todir="${lib}">
<fileset dir="${build}">
<include name="gameserver.jar" />
<include name="commons.jar" />
</fileset>
</copy>
<delete dir="${build.classes}" />
<mkdir dir="${build.classes}" />
<javac destdir="${build.classes}"
optimize="on"
debug="on"
source="1.8"
target="1.8"
encoding="UTF-8"
includeantruntime="false"
nowarn="off">
<compilerarg value="-Xlint:unchecked"></compilerarg>
<src path="${src.scripts}"/>
<classpath refid="classpath"/>
</javac>
</target>
<copy todir="${lib}">
<fileset dir="${build}">
<include name="gameserver.jar" />
<include name="commons.jar" />
</fileset>
</copy>
<delete dir="${build.classes}" />
<mkdir dir="${build.classes}" />
<javac destdir="${build.classes}"
optimize="on"
debug="on"
source="1.8"
target="1.8"
encoding="UTF-8"
includeantruntime="false"
nowarn="off">
<compilerarg value="-Xlint:unchecked"></compilerarg>
<src path="${src.scripts}"/>
<classpath refid="classpath"/>
</javac>
</target>
Последнее редактирование: