summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLedmitz <smoothshifter@tuta.io>2020-08-15 19:04:30 +0000
committerLedmitz <smoothshifter@tuta.io>2020-08-15 19:04:30 +0000
commit99f4aaee22252499d6095b1c536eacfe063f87c2 (patch)
tree1f5778a47e31c9acab10d7a73e70ad8d33db278f
parent215ad1b52941b818565c3b9b4da82ed9d1765d27 (diff)
downloadtmw-info-99f4aaee22252499d6095b1c536eacfe063f87c2.tar.gz
tmw-info-99f4aaee22252499d6095b1c536eacfe063f87c2.tar.bz2
tmw-info-99f4aaee22252499d6095b1c536eacfe063f87c2.tar.xz
tmw-info-99f4aaee22252499d6095b1c536eacfe063f87c2.zip
Fixed reporting no file for drops for mobs that have nonenull_drop_fix
-rwxr-xr-xtmw-info4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmw-info b/tmw-info
index 8a7cfcf..628ee9c 100755
--- a/tmw-info
+++ b/tmw-info
@@ -298,7 +298,7 @@ elif [ "$1" == "mob-search" ]; then
#echo "LAST_COUNT: $LAST_COUNT"
done
while IFS= read -r LINE; do
- MOB_ID=$(echo "$LINE" | awk '{print $1}')
+ MOB_ID=$(echo "$LINE" | awk '{print $1}' | sed 's/,//g')
DROP_IDS=($(echo "$LINE" | awk -F ',' '{print $30 $32 $34 $36 $38 $40 $42 $44}' | sed -E 's/ 0,//g' | sed 's/,//g' | sed -E 's/^\s*//g'))
DROP_PERCS=$(echo "$LINE" | awk -F ',' '{print $31 $33 $35 $37 $39 $41 $43 $45}' | sed -E 's/ 0,//g' | sed 's/,//g' | sed -E 's/^\s*//g')
if [[ $(ls "$ITEM_DIR"/* 2> '/dev/null') != '' ]]; then
@@ -330,7 +330,7 @@ elif [ "$1" == "mob-search" ]; then
mv "$TMW_INFO/mob-drops-$MOB_ID.tmp.tmp" "$TMW_INFO/mob-drops-$MOB_ID.tmp"
DROP_COUNT=$(( DROP_COUNT + 1 ))
done
- DROPS=$(cat < "$TMW_INFO/mob-drops-$MOB_ID.tmp" | sed 's/^$//g' | sed -E 's/,\s*$//g')
+ DROPS=$(sed 's/^$//g' "$TMW_INFO/mob-drops-$MOB_ID.tmp" 2> '/dev/null' | sed -E 's/,\s*$//g')
echo -e "\
ID: $(echo "$LINE" | awk '{print $1}') NAME: $(echo "$LINE" | awk '{print $2 $3}') LVL: $(echo "$LINE" | awk '{print $4}')\n\
HP: $(echo "$LINE" | awk '{print $5}') SP: $(echo "$LINE" | awk '{print $6}') \