Преглед на файлове

Rename destroyedBy & send visibility destroy event

tags/v0.11.0
kckckc преди 2 години
родител
ревизия
677522eb81
променени са 2 файла, в които са добавени 10 реда и са изтрити 4 реда
  1. +1
    -1
      src/server/components/stats.js
  2. +9
    -3
      src/server/world/syncer.js

+ 1
- 1
src/server/components/stats.js Целия файл

@@ -438,7 +438,7 @@ module.exports = {
this.obj.spellbook.die();

obj.destroyed = true;
obj.destroyedBy = 'death';
obj.destructionEvent = 'death';

let deathAnimation = _.getDeepProperty(animations, ['mobs', obj.sheetName, obj.cell, 'death']);
if (deathAnimation) {


+ 9
- 3
src/server/world/syncer.js Целия файл

@@ -70,7 +70,7 @@ module.exports = {
sync = {
id: o.id,
destroyed: true,
destroyedBy: o.destroyedBy
destructionEvent: o.destructionEvent
};

objects.removeObject(o);
@@ -113,8 +113,14 @@ module.exports = {
}

if (destroyed || !canSee) {
if (!canSee)
queueFunction({ id: oId, destroyed: true }, [ p.serverId ]);
if (!canSee) {
queueFunction({
id: oId,
destroyed: true,
destructionEvent: 'visibility'
},
[ p.serverId ]);
}

p.player.unsee(oId);
}


Зареждане…
Отказ
Запис