diff options
author | Ledmitz <smoothshifter@tuta.io> | 2020-08-15 19:04:30 +0000 |
---|---|---|
committer | Ledmitz <smoothshifter@tuta.io> | 2020-08-15 19:04:30 +0000 |
commit | 99f4aaee22252499d6095b1c536eacfe063f87c2 (patch) | |
tree | 1f5778a47e31c9acab10d7a73e70ad8d33db278f | |
parent | 215ad1b52941b818565c3b9b4da82ed9d1765d27 (diff) | |
download | tmw-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-x | tmw-info | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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}') \ |