Browse Source

bug #2018: Mobs can now have names that differ from their zone names

1993-leagues
Shaun 2 months ago
parent
commit
33de630fa1
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/server/world/map.js
  2. +1
    -1
      src/server/world/spawners.js

+ 1
- 1
src/server/world/map.js View File

@@ -471,7 +471,7 @@ module.exports = {
if (this.zoneConfig?.objects?.[objZoneName.toLowerCase()])
extend(blueprint, this.zoneConfig.objects[objZoneName.toLowerCase()]);
else if (this.zoneConfig?.mobs?.[objZoneName.toLowerCase()])
extend(blueprint, this.zoneConfig.objects[objZoneName.toLowerCase()]);
extend(blueprint, this.zoneConfig.mobs[objZoneName.toLowerCase()]);

if (blueprint.blocking)
this.collisionMap[blueprint.x][blueprint.y] = 1;


+ 1
- 1
src/server/world/spawners.js View File

@@ -37,7 +37,7 @@ module.exports = {
else
this.mobTypes[name]++;

spawner.zonePrint = extend({}, this.zoneConfig.mobs.default, this.zoneConfig.mobs[name] || {});
spawner.zonePrint = extend({}, this.zoneConfig.mobs.default, this.zoneConfig.mobs[(blueprint.objZoneName ?? blueprint.name).toLowerCase()] || {});
},

spawn: function (spawner) {


Loading…
Cancel
Save