From: Hendrik B. <nh...@us...> - 2010-01-29 22:18:11
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/events In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16349/src/games/stendhal/server/events Added Files: SoundEvent.java Log Message: added a sound_event so that the server can tell the client to play a sound file (fixes #2942546) --- NEW FILE: SoundEvent.java --- package games.stendhal.server.events; import games.stendhal.common.constants.Events; import marauroa.common.game.RPClass; import marauroa.common.game.RPEvent; import marauroa.common.game.Definition.DefinitionClass; import marauroa.common.game.Definition.Type; /** * A sound. * * @author hendrik */ public class SoundEvent extends RPEvent { /** * Creates the rpclass. */ public static void generateRPClass() { final RPClass rpclass = new RPClass(Events.SOUND); rpclass.add(DefinitionClass.ATTRIBUTE, "sound", Type.STRING); } /** * Creates a new sound event. * * @param sound name of sound to play */ public SoundEvent(final String sound) { super(Events.SOUND); put("sound", sound); } } |