From 6a7ca8fa08d881527dc5e9b7ae36604b73c34ae1 Mon Sep 17 00:00:00 2001
From: sigtus <vantimothy@openmailbox.org>
Date: Tue, 29 Jan 2019 04:49:34 -0300
Subject: Added missing return on F_GetTradeRestriction

---
 npc/other/Global_Functions.txt | 1 +
 1 file changed, 1 insertion(+)

(limited to 'npc')

diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
index 904ed7165..860053b70 100644
--- a/npc/other/Global_Functions.txt
+++ b/npc/other/Global_Functions.txt
@@ -474,4 +474,5 @@ function	script	F_GetTradeRestriction	{
 	if (.@trade & ITR_NOAUCTION) {
 		.@trade$ += "NoAuction|";
 	}
+	return .@trade$;
 }
-- 
cgit v1.2.3-70-g09d2


From f202ca60acb3fbdf6ca1db5691bef35ff758ae79 Mon Sep 17 00:00:00 2001
From: sigtus <vantimothy@openmailbox.org>
Date: Tue, 29 Jan 2019 05:19:34 -0300
Subject: Update Global_Functions.txt

---
 npc/other/Global_Functions.txt | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)

(limited to 'npc')

diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt
index 860053b70..86332e931 100644
--- a/npc/other/Global_Functions.txt
+++ b/npc/other/Global_Functions.txt
@@ -446,33 +446,24 @@ function	script	F_MesColor	{
 function	script	F_GetTradeRestriction	{
 	.@trade = getiteminfo(getarg(0), ITEMINFO_TRADE);
 
-	if (.@trade == 0) {
+	if (.@trade == 0)
 		return "None";
-	}
 	.@trade$ = "";
-	if (.@trade & ITR_NODROP) {
+	if (.@trade & ITR_NODROP)
 		.@trade$ += "NoDrop|";
-	}
-	if (.@trade & ITR_NOTRADE) {
+	if (.@trade & ITR_NOTRADE)
 		.@trade$ += "NoTrade|";
-	}
-	if (.@trade & ITR_PARTNEROVERRIDE) {
+	if (.@trade & ITR_PARTNEROVERRIDE)
 		.@trade$ += "PartnerOverride|";
-	}
-	if (.@trade & ITR_NOSELLTONPC) {
+	if (.@trade & ITR_NOSELLTONPC)
 		.@trade$ += "NoSellToNpc|";
-	}
-	if (.@trade & ITR_NOSTORAGE) {
+	if (.@trade & ITR_NOSTORAGE)
 		.@trade$ += "NoStorage|";
-	}
-	if (.@trade & ITR_NOGSTORAGE) {
+	if (.@trade & ITR_NOGSTORAGE)
 		.@trade$ += "NoGuildStorage|";
-	}
-	if (.@trade & ITR_NOMAIL) {
+	if (.@trade & ITR_NOMAIL)
 		.@trade$ += "NoMail|";
-	}
-	if (.@trade & ITR_NOAUCTION) {
+	if (.@trade & ITR_NOAUCTION)
 		.@trade$ += "NoAuction|";
-	}
 	return .@trade$;
 }
-- 
cgit v1.2.3-70-g09d2