mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-22 12:38:12 +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);
|
play(sound, global);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void play(String id, boolean global) {
|
public int play(String id, boolean global) {
|
||||||
if (id.isEmpty()) return;
|
if (id.isEmpty()) return 0;
|
||||||
Sounds.Entry sound = Diablo.files.Sounds.get(id);
|
Sounds.Entry sound = Diablo.files.Sounds.get(id);
|
||||||
|
if (sound == null) return 0;
|
||||||
play(sound, global);
|
play(sound, global);
|
||||||
|
return sound.Index;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user