mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:28 -05:00
Give tracktrix monsters_home_server data
This commit is contained in:
@@ -4672,6 +4672,7 @@ function init_io() {
|
|||||||
maps: D.drops.maps,
|
maps: D.drops.maps,
|
||||||
tables: {},
|
tables: {},
|
||||||
max: player.max_stats,
|
max: player.max_stats,
|
||||||
|
monsters_home: D.drops.monsters_home_server || {}, //add this
|
||||||
}; // ,computer:false
|
}; // ,computer:false
|
||||||
function register_table(table) {
|
function register_table(table) {
|
||||||
if (table) {
|
if (table) {
|
||||||
@@ -4686,12 +4687,17 @@ function init_io() {
|
|||||||
if (player.computer || 1) {
|
if (player.computer || 1) {
|
||||||
// data.computer=true;
|
// data.computer=true;
|
||||||
data.drops = D.drops.monsters;
|
data.drops = D.drops.monsters;
|
||||||
|
data.drops_home = D.drops.monsters_home_server || {}; //mirror monsters_home
|
||||||
} else {
|
} else {
|
||||||
data.drops = {};
|
data.drops = {};
|
||||||
|
data.drops_home = {};
|
||||||
for (var name in data.monsters) {
|
for (var name in data.monsters) {
|
||||||
if (data.monsters[name] >= 100 && D.drops.monsters[name]) {
|
if (data.monsters[name] >= 100 && D.drops.monsters[name]) {
|
||||||
data.drops[name] = D.drops.monsters[name];
|
data.drops[name] = D.drops.monsters[name];
|
||||||
}
|
}
|
||||||
|
if (data.monsters[name] >= 100 && D.drops.monsters_home_server[name]) {
|
||||||
|
data.drops_home[name] = D.drops.monsters_home_server[name];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (D.drops.maps.global) {
|
if (D.drops.maps.global) {
|
||||||
@@ -4705,6 +4711,9 @@ function init_io() {
|
|||||||
for (var name in data.drops) {
|
for (var name in data.drops) {
|
||||||
register_table(data.drops[name]);
|
register_table(data.drops[name]);
|
||||||
}
|
}
|
||||||
|
for (var name in data.drops_home) { //include home tables
|
||||||
|
register_table(data.drops_home[name]);
|
||||||
|
}
|
||||||
for (var name in data.maps) {
|
for (var name in data.maps) {
|
||||||
register_table(data.maps[name]);
|
register_table(data.maps[name]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user