mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-21 20:18:14 +07:00
Changed play(String,boolean) behavior to return id of audio file, 0 if not found
This commit is contained in:
parent
ca9c9be8df
commit
7ec02be171
@ -84,10 +84,12 @@ public class Audio {
|
||||
play(sound, global);
|
||||
}
|
||||
|
||||
public void play(String id, boolean global) {
|
||||
if (id.isEmpty()) return;
|
||||
public int play(String id, boolean global) {
|
||||
if (id.isEmpty()) return 0;
|
||||
Sounds.Entry sound = Diablo.files.Sounds.get(id);
|
||||
if (sound == null) return 0;
|
||||
play(sound, global);
|
||||
return sound.Index;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user