|
|
@@ -237,7 +237,7 @@ define([ |
|
|
|
mult = (1 + (partySize * 0.1)); |
|
|
|
} |
|
|
|
|
|
|
|
if (a.obj.stats) { |
|
|
|
if ((a.obj.stats) && (!a.obj.follower)) { |
|
|
|
//Scale xp by source level so you can't just farm low level mobs (or get boosted on high level mobs). |
|
|
|
//Mobs that are farther then 10 levels from you, give no xp |
|
|
|
//We don't currently do this for quests/herb gathering |
|
|
@@ -325,11 +325,12 @@ define([ |
|
|
|
var deathEvent = {}; |
|
|
|
|
|
|
|
var killSource = source; |
|
|
|
|
|
|
|
if (source.follower) |
|
|
|
killSource = source.follower.master; |
|
|
|
|
|
|
|
if (source.player) |
|
|
|
source.stats.kill(this.obj); |
|
|
|
if (killSource.player) |
|
|
|
killSource.stats.kill(this.obj); |
|
|
|
else |
|
|
|
this.obj.fireEvent('afterDeath', deathEvent); |
|
|
|
|
|
|
@@ -339,12 +340,12 @@ define([ |
|
|
|
this.obj.auth.permadie(); |
|
|
|
|
|
|
|
this.syncer.queue('onPermadeath', { |
|
|
|
source: source.name |
|
|
|
source: killSource.name |
|
|
|
}, [this.obj.serverId]); |
|
|
|
} else |
|
|
|
this.values.hp = 0; |
|
|
|
|
|
|
|
this.obj.player.die(source, deathEvent.permadeath); |
|
|
|
this.obj.player.die(killSource, deathEvent.permadeath); |
|
|
|
} else { |
|
|
|
this.obj.effects.die(); |
|
|
|
if (this.obj.spellbook) |
|
|
@@ -365,14 +366,14 @@ define([ |
|
|
|
if (done.some(d => d == p)) |
|
|
|
return; |
|
|
|
|
|
|
|
this.obj.inventory.dropBag(p, source); |
|
|
|
this.obj.inventory.dropBag(p, killSource); |
|
|
|
done.push(p); |
|
|
|
}, this); |
|
|
|
} else { |
|
|
|
if (a.serverId == null) |
|
|
|
continue; |
|
|
|
|
|
|
|
this.obj.inventory.dropBag(a.serverId, source); |
|
|
|
this.obj.inventory.dropBag(a.serverId, killSource); |
|
|
|
done.push(a.serverId); |
|
|
|
} |
|
|
|
} |
|
|
|