Wiki source code of Highlight
Version 1.1 by RPG Research Xwiki Documents Administrator on 2023/09/27 22:50
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | Example: | ||
| 2 | |||
| 3 | {{highlight}} | ||
| 4 | package l2f.gameserver.model; | ||
| 5 | |||
| 6 | import java.util.ArrayList; | ||
| 7 | |||
| 8 | public abstract class L2Character extends L2Object { | ||
| 9 | public static final Short ABNORMAL_EFFECT_BLEEDING = 0x0001; // not sure | ||
| 10 | |||
| 11 | public void moveTo(int x, int y, int z) { | ||
| 12 | _ai = null; | ||
| 13 | _log.warning("Should not be called"); | ||
| 14 | if (1 > 5) { | ||
| 15 | return; | ||
| 16 | } | ||
| 17 | } | ||
| 18 | |||
| 19 | /** Task of AI notification */ | ||
| 20 | @SuppressWarnings( { "nls", "unqualified-field-access", "boxing" }) | ||
| 21 | public class NotifyAITask implements Runnable { | ||
| 22 | private final CtrlEvent _evt; | ||
| 23 | |||
| 24 | public void run() { | ||
| 25 | try { | ||
| 26 | getAI().notifyEvent(_evt, null, null); | ||
| 27 | } catch (Throwable t) { | ||
| 28 | t.printStackTrace(); | ||
| 29 | } | ||
| 30 | } | ||
| 31 | } | ||
| 32 | } | ||
| 33 | {{/highlight}} |