mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-18 23:34:51 +01:00
Implement some star tower npc events
This commit is contained in:
34
src/main/java/emu/nebula/data/resources/EventOptionsDef.java
Normal file
34
src/main/java/emu/nebula/data/resources/EventOptionsDef.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package emu.nebula.data.resources;
|
||||
|
||||
import emu.nebula.data.BaseDef;
|
||||
import emu.nebula.data.GameData;
|
||||
import emu.nebula.data.ResourceType;
|
||||
import emu.nebula.data.ResourceType.LoadPriority;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* We don't need a DataTable for this, since we are only using this class to verify event options for the client
|
||||
*/
|
||||
@Getter
|
||||
@ResourceType(name = "EventOptions.json", loadPriority = LoadPriority.LOW)
|
||||
public class EventOptionsDef extends BaseDef {
|
||||
private int Id;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
// Get event
|
||||
var event = GameData.getStarTowerEventDataTable().get(this.Id / 100);
|
||||
if (event == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add to avaliable options
|
||||
event.getOptionIds().add(this.getId());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user