Explorar el Código

ongetstats now sends the blueprint to the event emitter as well. also, fixed small issue with unloading sounds

tags/v0.7.0^2
Shaun hace 4 años
padre
commit
62990ad8e3
Se han modificado 2 ficheros con 4 adiciones y 3 borrados
  1. +2
    -2
      src/client/js/components/stats.js
  2. +2
    -1
      src/client/js/sound/sound.js

+ 2
- 2
src/client/js/components/stats.js Ver fichero

@@ -77,7 +77,7 @@ define([
this.hpSpriteInner.visible = this.hpSprite.visible;
},

extend: function (blueprint) {
extend: function (blueprint) {
let bValues = blueprint.values || {};

let values = this.values;
@@ -86,7 +86,7 @@ define([
values[b] = bValues[b];

if (this.obj.self)
events.emit('onGetStats', this.values);
events.emit('onGetStats', this.values, blueprint);

if (this.obj.has('serverId'))
events.emit('onGetPartyStats', this.obj.serverId, this.values);


+ 2
- 1
src/client/js/sound/sound.js Ver fichero

@@ -42,7 +42,8 @@ define([
const { scope, sound } = sounds[i];

if (!globalScopes.includes(scope) && scope !== newScope) {
sound.unload();
if (sound)
sound.unload();
sounds.splice(i, 1);
i--;
}


Cargando…
Cancelar
Guardar