a100affda2
Unified kotlin and java into just src/main Unified the rs09 and core packages Took all content out of the core package, and placed it into the new content package Reorganised all source code relating to content to be easier to find and explore
26 lines
659 B
Java
26 lines
659 B
Java
package content.data.consumables.effects;
|
|
|
|
import core.game.consumable.ConsumableEffect;
|
|
import core.game.node.entity.player.Player;
|
|
import core.game.node.entity.state.EntityState;
|
|
|
|
public class RemoveStateEffect extends ConsumableEffect {
|
|
int state = -1;
|
|
String statekey;
|
|
@Deprecated
|
|
public RemoveStateEffect(int state){
|
|
this.state = state;
|
|
}
|
|
public RemoveStateEffect(String key){
|
|
statekey = key;
|
|
}
|
|
@Override
|
|
public void activate(Player p) {
|
|
if(state == -1){
|
|
p.clearState(statekey);
|
|
return;
|
|
}
|
|
p.getStateManager().remove(EntityState.values()[state]);
|
|
}
|
|
}
|