Skip to content

Commit

Permalink
add skill updated and widget updated events
Browse files Browse the repository at this point in the history
  • Loading branch information
NoEffex committed Feb 6, 2019
1 parent 17de0d8 commit cdc9c7e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
24 changes: 24 additions & 0 deletions api/src/main/java/com/rsbuddy/osrs/event/SkillUpdated.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.rsbuddy.osrs.event;

import com.rsbuddy.osrs.content.config.Skill;

public class SkillUpdated {
private final Skill skill;
private final int oldExperience;
private final int newExperience;

public SkillUpdated(Skill skill, int oldExperience, int newExperience) {
this.skill = skill;
this.oldExperience = oldExperience;
this.newExperience = newExperience;
}

@Override
public String toString() {
return "SkillUpdated{" +
"skill=" + skill +
", oldExperience=" + oldExperience +
", newExperience=" + newExperience +
'}';
}
}
7 changes: 3 additions & 4 deletions api/src/main/java/com/rsbuddy/osrs/game/GameEvent.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.rsbuddy.osrs.game;

import com.rsbuddy.osrs.event.AttackStyleUpdated;
import com.rsbuddy.osrs.event.ChatShortcut;
import com.rsbuddy.osrs.event.MessageEvent;
import com.rsbuddy.osrs.event.SendChatMessage;
import com.rsbuddy.osrs.event.*;
import com.rsbuddy.osrs.event.world.GroundItemRemoved;
import com.rsbuddy.osrs.event.world.GroundItemUpdated;
import com.rsbuddy.osrs.game.world.*;
Expand Down Expand Up @@ -32,6 +29,8 @@ public enum GameEvent {
SEND_CHAT_MESSAGE(SendChatMessage.class),
CHAT_SHORTCUT(ChatShortcut.class),
DRAW_LAYER(Integer.class),
SKILL_UPDATED(SkillUpdated.class),
WIDGET_UPDATED(Integer.class),
WIDGET_DRAW_END;

private Class<?> clazz;
Expand Down

0 comments on commit cdc9c7e

Please sign in to comment.