Browse Source

Fixes #9

tags/v0.1.2
Big Bad Waffle 7 years ago
parent
commit
63fe829217
1 changed files with 14 additions and 2 deletions
  1. +14
    -2
      src/server/config/quests/templates/questKillX.js

+ 14
- 2
src/server/config/quests/templates/questKillX.js View File

@@ -12,11 +12,23 @@ define([
type: 'killX',

build: function() {
var mobTypes = this.obj.instance.spawners.zone.mobs;

if (this.mobName) {
if (mobTypes[this.mobName.toLowerCase()].attackable == false)
this.mobName = null;
}

if (!this.mobName) {
var mobTypes = this.obj.instance.spawners.zone.mobs;
var mobCounts = this.obj.instance.spawners.mobTypes;
var keys = Object.keys(mobTypes).filter(function(m) {
return (m != 'default');
return (
(m != 'default') &&
(
(mobTypes[m].attackable) ||
(mobTypes[m].attackable == null)
)
);
});
this.mobType = keys[~~(Math.random() * keys.length)];
var needMax = 8;


Loading…
Cancel
Save