misc stuff idk, timeto update the serber

This commit is contained in:
mstoppelli
2019-06-13 12:29:54 -04:00
parent 5deb7d495f
commit 201d86b913
18 changed files with 417 additions and 207 deletions

View File

@@ -1,14 +1,15 @@
package mod.sin.wyvern.mastercraft;
import com.wurmonline.server.players.Titles;
import javassist.CannotCompileException;
import javassist.ClassPool;
import javassist.NotFoundException;
import javassist.bytecode.BadBytecode;
public class AchievementTitles {
public static int gremlinSlayerTitleID = 704;
public class CustomTitles {
public static Titles.Title GremlinSlayer;
public static void register(ClassPool cp) throws NotFoundException, BadBytecode, CannotCompileException {
TitleInjector injector = new TitleInjector(cp);
injector.addTitle("GremlinSlayer", gremlinSlayerTitleID, "Gremlin Slayer", "Gremlin Slayer", -1, "NORMAL");
injector.addTitle("GremlinSlayer", 704, "Gremlin Slayer", "Gremlin Slayer", -1, "NORMAL");
}
}

View File

@@ -80,7 +80,7 @@ public class TitleInjector {
code.add(Bytecode.DUP);
// Put instance into static field - this will use the second copy of our instance
//code.addPutstatic("net.bdew.wurm.halloween.titles.TitlesExtended", ident, "Lcom/wurmonline/server/players/Titles$Title;");
code.addPutstatic("mod.sin.wyvern.mastercraft.CustomTitles", ident, "Lcom/wurmonline/server/players/Titles$Title;");
// And finally stick it into values array, this will use the duped array, ordinal and the final copy of our instance
code.add(Bytecode.AASTORE);