This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tree<TKey, TValue> | |
{ | |
protected readonly Tree<TKey, TValue> parent; | |
protected readonly IDictionary<TKey, Tree<TKey, TValue>> children = new Dictionary<TKey, Tree<TKey, TValue>>(); | |
public Tree(Tree<TKey, TValue> parent) { | |
this.parent = parent; | |
} | |
public Tree() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.shivas.server; | |
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineFactory; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
import junit.framework.TestCase; | |
public class ScriptingTest extends TestCase { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URLClassLoader loader; | |
try { | |
loader = new URLClassLoader(new URL[] { | |
file.toURI().toURL() | |
}, ClassLoader.getSystemClassLoader()); | |
} catch (Exception e) { | |
log.error("can't load {} because : {}", file.getPath(), e.getMessage()); | |
return null; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.shivas.server.core.plugins.Plugin | |
import org.shivas.server.core.plugins.Startable | |
import com.google.common.collect.Lists | |
import javax.swing.Timer | |
class PubManagerPlugin extends Plugin { | |
final String author = "Blackrush" | |
final String version = "alpha1" | |
final String help = "Sends pub message in global channel" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<npcs> | |
<npc id="1" template="615" map="7411" cell="370" orientation="SOUTH_WEST" start="1936"> | |
<question id="1936"> | |
<answer id="1937"> | |
<action type="5" question="5452" /> | |
</answer> | |
</question> | |
<question id="5452"> | |
<answer id="2627"> | |
<action type="4" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hello | |
import java.util.Scanner | |
import java.util.Random | |
import com.sun.javaws.exceptions.InvalidArgumentException | |
import java.util.HashMap | |
/** | |
* Created with IntelliJ IDEA. | |
* User: Blackrush |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef ABUSE_REASON_HPP | |
#define ABUSE_REASON_HPP | |
namespace Data | |
{ | |
class AbuseReason : public DataObject | |
{ | |
int _abuseReasonId() const | |
{ return this["_abuseReasonId"].Cast<int>(); } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.shivas.data.converter; | |
import com.google.common.collect.Sets; | |
import junit.framework.TestCase; | |
import org.shivas.data.converter.loaders.AncestraLoader; | |
import org.shivas.data.converter.loaders.DataLoader; | |
import org.shivas.data.entity.SpellEffect; | |
import org.shivas.data.entity.SpellLevel; | |
import org.shivas.data.entity.SpellTemplate; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.shivas.core.core.castables.effects; | |
import org.shivas.common.random.Dice; | |
import org.shivas.common.statistics.CharacteristicType; | |
import org.shivas.common.statistics.Statistics; | |
import org.shivas.core.core.fights.Fight; | |
import org.shivas.core.core.fights.FightCell; | |
import org.shivas.core.core.fights.FightException; | |
import org.shivas.core.core.fights.Fighter; | |
import org.shivas.core.core.fights.events.FighterLifeUpdateEvent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private List<Class<?>> getClasses(ClassLoader classLoader) throws ReflectiveOperationException { | |
Class<?> clazz = classLoader.getClass(); | |
while (clazz != ClassLoader.class) { | |
clazz = clazz.getSuperclass(); | |
} | |
Field field = clazz.getDeclaredField("classes"); | |
field.setAccessible(true); | |
return new ArrayList<Class<?>>((Collection<Class<?>>) field.get(classLoader)); | |
} |