Changeset 177e8e0e65c9bcb48fbe6a3ab43081c2a9c47f16
- Timestamp:
- 12/09/07 12:27:11
(1 year ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1197199631 +0100
- git-parent:
[07ac5874c2ffa2ef37b7e92877268110abd1c7ee]
- git-author:
- Christopher Jung <bktheg@web.de> 1197199631 +0100
- Message:
ScriptParser? in eigenes Paket verschoben
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r28b2039 |
r177e8e0 |
|
| 54 | 54 | import net.driftingsouls.ds2.server.framework.Loggable; |
|---|
| 55 | 55 | import net.driftingsouls.ds2.server.framework.caches.CacheManager; |
|---|
| 56 | | import net.driftingsouls.ds2.server.scripting.ScriptParser; |
|---|
| | 56 | import net.driftingsouls.ds2.server.scripting.NullLogger; |
|---|
| 57 | 57 | import net.driftingsouls.ds2.server.scripting.entities.RunningQuest; |
|---|
| 58 | 58 | import net.driftingsouls.ds2.server.ships.Ship; |
|---|
| … | … | |
| 330 | 330 | final Bindings engineBindings = scriptparser.getContext().getBindings(ScriptContext.ENGINE_SCOPE); |
|---|
| 331 | 331 | |
|---|
| 332 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 332 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 333 | 333 | |
|---|
| 334 | 334 | RunningQuest runningquest = (RunningQuest)db.get(RunningQuest.class, rqid); |
|---|
| r28b2039 |
r177e8e0 |
|
| 57 | 57 | import net.driftingsouls.ds2.server.framework.ContextMap; |
|---|
| 58 | 58 | import net.driftingsouls.ds2.server.framework.Loggable; |
|---|
| | 59 | import net.driftingsouls.ds2.server.scripting.NullLogger; |
|---|
| 59 | 60 | import net.driftingsouls.ds2.server.scripting.Quests; |
|---|
| 60 | | import net.driftingsouls.ds2.server.scripting.ScriptParser; |
|---|
| 61 | 61 | import net.driftingsouls.ds2.server.ships.Ship; |
|---|
| 62 | 62 | import net.driftingsouls.ds2.server.ships.ShipClasses; |
|---|
| … | … | |
| 1821 | 1821 | BasicUser activeuser = context.getActiveUser(); |
|---|
| 1822 | 1822 | if( !activeuser.hasFlag(User.FLAG_SCRIPT_DEBUGGING) ) { |
|---|
| 1823 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 1823 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 1824 | 1824 | } |
|---|
| 1825 | 1825 | } |
|---|
| 1826 | 1826 | else { |
|---|
| 1827 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 1827 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 1828 | 1828 | } |
|---|
| 1829 | 1829 | |
|---|
| r28b2039 |
r177e8e0 |
|
| 58 | 58 | import net.driftingsouls.ds2.server.modules.schiffplugins.Parameters; |
|---|
| 59 | 59 | import net.driftingsouls.ds2.server.modules.schiffplugins.SchiffPlugin; |
|---|
| | 60 | import net.driftingsouls.ds2.server.scripting.NullLogger; |
|---|
| 60 | 61 | import net.driftingsouls.ds2.server.scripting.Quests; |
|---|
| 61 | | import net.driftingsouls.ds2.server.scripting.ScriptParser; |
|---|
| 62 | 62 | import net.driftingsouls.ds2.server.scripting.ScriptParserContext; |
|---|
| 63 | 63 | import net.driftingsouls.ds2.server.scripting.entities.RunningQuest; |
|---|
| … | … | |
| 162 | 162 | |
|---|
| 163 | 163 | if( !user.hasFlag( User.FLAG_SCRIPT_DEBUGGING ) ) { |
|---|
| 164 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 164 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 165 | 165 | } |
|---|
| 166 | 166 | |
|---|
| … | … | |
| 758 | 758 | engineBindings.put("_SHIP", ship); |
|---|
| 759 | 759 | if( !user.hasFlag( User.FLAG_SCRIPT_DEBUGGING ) ) { |
|---|
| 760 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 760 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 761 | 761 | } |
|---|
| 762 | 762 | |
|---|
| … | … | |
| 804 | 804 | |
|---|
| 805 | 805 | if( !user.hasFlag( User.FLAG_SCRIPT_DEBUGGING ) ) { |
|---|
| 806 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 806 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 807 | 807 | } |
|---|
| 808 | 808 | |
|---|
| … | … | |
| 849 | 849 | |
|---|
| 850 | 850 | if( !user.hasFlag( User.FLAG_SCRIPT_DEBUGGING ) ) { |
|---|
| 851 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 851 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 852 | 852 | } |
|---|
| 853 | 853 | |
|---|
| r28b2039 |
r177e8e0 |
|
| 55 | 55 | import net.driftingsouls.ds2.server.framework.pipeline.generators.TemplateGenerator; |
|---|
| 56 | 56 | import net.driftingsouls.ds2.server.framework.templates.TemplateEngine; |
|---|
| 57 | | import net.driftingsouls.ds2.server.scripting.ScriptParser; |
|---|
| | 57 | import net.driftingsouls.ds2.server.scripting.NullLogger; |
|---|
| 58 | 58 | import net.driftingsouls.ds2.server.scripting.ScriptParserContext; |
|---|
| 59 | 59 | import net.driftingsouls.ds2.server.scripting.entities.RunningQuest; |
|---|
| … | … | |
| 172 | 172 | ScriptEngine scriptparser = new ScriptEngineManager().getEngineByName("DSQuestScript"); |
|---|
| 173 | 173 | if( !getUser().hasFlag( User.FLAG_SCRIPT_DEBUGGING ) ) { |
|---|
| 174 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 174 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 175 | 175 | } |
|---|
| 176 | 176 | |
|---|
| r28b2039 |
r177e8e0 |
|
| 38 | 38 | import net.driftingsouls.ds2.server.framework.templates.TemplateEngine; |
|---|
| 39 | 39 | import net.driftingsouls.ds2.server.modules.SchiffController; |
|---|
| | 40 | import net.driftingsouls.ds2.server.scripting.NullLogger; |
|---|
| 40 | 41 | import net.driftingsouls.ds2.server.scripting.Quests; |
|---|
| 41 | | import net.driftingsouls.ds2.server.scripting.ScriptParser; |
|---|
| 42 | 42 | import net.driftingsouls.ds2.server.ships.RouteFactory; |
|---|
| 43 | 43 | import net.driftingsouls.ds2.server.ships.Ship; |
|---|
| … | … | |
| 115 | 115 | |
|---|
| 116 | 116 | engineBindings.put("_SHIP", ship); |
|---|
| 117 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 117 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 118 | 118 | engineBindings.put("DIRECTION",Integer.toString(act)); |
|---|
| 119 | 119 | engineBindings.put("MOVEMENTCOUNT",Integer.toString(count)); |
|---|
| r28b2039 |
r177e8e0 |
|
| 52 | 52 | if( (ContextMap.getContext() != null) && |
|---|
| 53 | 53 | (ContextMap.getContext().getRequest().getClass().getName().toUpperCase().contains("HTTP")) ) { |
|---|
| 54 | | setErrorWriter(ScriptParser.LOGGER_HTML); |
|---|
| | 54 | setErrorWriter(new HtmlLogger()); |
|---|
| 55 | 55 | } |
|---|
| 56 | 56 | else { |
|---|
| 57 | | setErrorWriter(ScriptParser.LOGGER_TEXT); |
|---|
| | 57 | setErrorWriter(new TextLogger()); |
|---|
| 58 | 58 | } |
|---|
| 59 | 59 | |
|---|
| r28b2039 |
r177e8e0 |
|
| 25 | 25 | import javax.script.ScriptEngine; |
|---|
| 26 | 26 | |
|---|
| 27 | | import net.driftingsouls.ds2.server.scripting.ScriptParser; |
|---|
| 28 | 27 | |
|---|
| 29 | 28 | /** |
|---|
| r28b2039 |
r177e8e0 |
|
| 25 | 25 | import javax.script.ScriptEngine; |
|---|
| 26 | 26 | |
|---|
| 27 | | import net.driftingsouls.ds2.server.scripting.ScriptParser; |
|---|
| 28 | 27 | |
|---|
| 29 | 28 | /** |
|---|
| r28b2039 |
r177e8e0 |
|
| 71 | 71 | import net.driftingsouls.ds2.server.framework.ContextMap; |
|---|
| 72 | 72 | import net.driftingsouls.ds2.server.framework.Loggable; |
|---|
| | 73 | import net.driftingsouls.ds2.server.scripting.NullLogger; |
|---|
| 73 | 74 | import net.driftingsouls.ds2.server.scripting.Quests; |
|---|
| 74 | | import net.driftingsouls.ds2.server.scripting.ScriptParser; |
|---|
| 75 | 75 | import net.driftingsouls.ds2.server.tasks.Task; |
|---|
| 76 | 76 | import net.driftingsouls.ds2.server.tasks.Taskmanager; |
|---|
| … | … | |
| 2105 | 2105 | engineBindings.put("_SHIP", this); |
|---|
| 2106 | 2106 | if( !user.hasFlag(User.FLAG_SCRIPT_DEBUGGING) ) { |
|---|
| 2107 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 2107 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 2108 | 2108 | } |
|---|
| 2109 | 2109 | |
|---|
| r28b2039 |
r177e8e0 |
|
| 31 | 31 | import net.driftingsouls.ds2.server.entities.User; |
|---|
| 32 | 32 | import net.driftingsouls.ds2.server.framework.Common; |
|---|
| 33 | | import net.driftingsouls.ds2.server.scripting.ScriptParser; |
|---|
| | 33 | import net.driftingsouls.ds2.server.scripting.NullLogger; |
|---|
| 34 | 34 | import net.driftingsouls.ds2.server.scripting.ScriptParserContext; |
|---|
| 35 | 35 | import net.driftingsouls.ds2.server.ships.Ship; |
|---|
| … | … | |
| 85 | 85 | for( User user : users ) { |
|---|
| 86 | 86 | if( !user.hasFlag( User.FLAG_SCRIPT_DEBUGGING ) ) { |
|---|
| 87 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 87 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 88 | 88 | } |
|---|
| 89 | 89 | else { |
|---|
| r28b2039 |
r177e8e0 |
|
| 42 | 42 | import net.driftingsouls.ds2.server.framework.db.SQLQuery; |
|---|
| 43 | 43 | import net.driftingsouls.ds2.server.framework.db.SQLResultRow; |
|---|
| 44 | | import net.driftingsouls.ds2.server.scripting.ScriptParser; |
|---|
| | 44 | import net.driftingsouls.ds2.server.scripting.NullLogger; |
|---|
| 45 | 45 | import net.driftingsouls.ds2.server.scripting.ScriptParserContext; |
|---|
| 46 | 46 | import net.driftingsouls.ds2.server.ships.Ship; |
|---|
| … | … | |
| 308 | 308 | } |
|---|
| 309 | 309 | ScriptEngine scriptparser = getContext().get(ContextCommon.class).getScriptParser("DSQuestScript"); |
|---|
| 310 | | scriptparser.getContext().setErrorWriter(ScriptParser.LOGGER_NULL); |
|---|
| | 310 | scriptparser.getContext().setErrorWriter(new NullLogger()); |
|---|
| 311 | 311 | |
|---|
| 312 | 312 | while( rquest.next() ) { |
|---|