mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:28 -05:00
Merge pull request #80 from FreezePhoenix/patch-7
Fix gold announcement bug
This commit is contained in:
+18
-8
@@ -9311,14 +9311,6 @@ function init_io() {
|
||||
return fail_response("loot_failed");
|
||||
}
|
||||
try {
|
||||
if (chest && !chest.pvp && chest.gold > 100000000 && !player.stealth) {
|
||||
broadcast("server_message", {
|
||||
message: player.name + " looted " + to_pretty_num(server_tax(round(chest.gold * r.goldm), true)) + " gold",
|
||||
color: "gold",
|
||||
type: "server_gold",
|
||||
name: player.name,
|
||||
});
|
||||
}
|
||||
if (chest && player.owner && chest.owners && !in_arr(player.owner, chest.owners) && !W.chest[player.owner]) {
|
||||
W.chest[player.owner] = new Date();
|
||||
server_log("SEVERE - Cross Loot from " + player.name + " not from " + chest.owners.toString());
|
||||
@@ -9329,6 +9321,15 @@ function init_io() {
|
||||
if (!can_add_items(player, all_items)) {
|
||||
return fail_response("loot_no_space");
|
||||
}
|
||||
if (chest && !chest.pvp && chest.gold > 100000000 && !player.stealth) {
|
||||
broadcast("server_message", {
|
||||
message:
|
||||
player.name + " looted " + to_pretty_num(server_tax(round(chest.gold * r.goldm), true)) + " gold",
|
||||
color: "gold",
|
||||
type: "server_gold",
|
||||
name: player.name,
|
||||
});
|
||||
}
|
||||
delete chests[data.id]; // The add_shells routine was at the top, so when inventory was full, attempting to open the chest gave shells infinitely, repeated lesson, always remove before adding, or exceptions [11/07/18]
|
||||
if (chest && chest.cash) {
|
||||
add_shells(player, chest.cash, "chest", true, "override");
|
||||
@@ -9389,6 +9390,15 @@ function init_io() {
|
||||
r.party = true;
|
||||
var chest = chests[data.id];
|
||||
var reopen = {};
|
||||
if (chest && !chest.pvp && chest.gold > 100000000 && !player.stealth) {
|
||||
broadcast("server_message", {
|
||||
message:
|
||||
player.name + " looted " + to_pretty_num(server_tax(round(chest.gold * r.goldm), true)) + " gold",
|
||||
color: "gold",
|
||||
type: "server_gold",
|
||||
name: player.name,
|
||||
});
|
||||
}
|
||||
delete chests[data.id];
|
||||
if (chest && chest.cash) {
|
||||
add_shells(player, chest.cash, "chest", true, "override");
|
||||
|
||||
Reference in New Issue
Block a user