From 830ae2e72a5f0deab0ff6cb7009cad6106f1c9ba Mon Sep 17 00:00:00 2001 From: Ledmitz Date: Wed, 4 Jan 2023 15:38:10 -0400 Subject: Fixed mob-search to keep up with server DB file changes. Drops now report correctly again. --- README.md | 13 +++++++------ tmw-info | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 290db06..f6e96ad 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ Use gm-show to quickly display the last 10 gm commands run. Updates automaticall ``` ## Changelog +* 2023-01-04 - Fixed mob-search do display proper drops. This was due to a server DB update which added new columns * 2022-12-13 - Changed check for zenity from dpkg -l to find in /bin or /usr/bin. - Added general check and warning for those without curl or wget - Used find for removing .tmp files instead of specifying locations in the exit trap @@ -78,10 +79,10 @@ Use gm-show to quickly display the last 10 gm commands run. Updates automaticall - Added extra help text * 2021-04-13 - added cmds-update to download @ command DB pages and jak1's wiki on client commands - "cmds" now gets info from those pages and is better organized - - added extra function to chat-search to view a log file easily after a search - - fixed a bug that downloaded 2020-09 GM log everytime gm-update was run - - added support for GM log files ending in "-old" (2020-09-old is a restored file) -* 2020-09-16 - added chat log search -* 2020-08-16 - added ratio for dropped items to represent chances in a more human readable way -* 2020-08-15 - fixed gm-show (wasn't showing GUI) and removed trailing comma in mob drops + - Added extra function to chat-search to view a log file easily after a search + - Fixed a bug that downloaded 2020-09 GM log everytime gm-update was run + - Added support for GM log files ending in "-old" (2020-09-old is a restored file) +* 2020-09-16 - Added chat log search +* 2020-08-16 - Added ratio for dropped items to represent chances in a more human readable way +* 2020-08-15 - Fixed gm-show (wasn't showing GUI) and removed trailing comma in mob drops diff --git a/tmw-info b/tmw-info index 04a0c4d..90cbd18 100755 --- a/tmw-info +++ b/tmw-info @@ -314,8 +314,8 @@ elif [ "$1" == "mob-search" ]; then done while IFS= read -r LINE; do 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') + DROP_IDS=($(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')) + DROP_PERCS=$(echo "$LINE" | awk -F ',' '{print $32 $34 $36 $38 $40 $42 $44 $46}' | sed -E 's/ 0,//g' | sed 's/,//g' | sed -E 's/^\s*//g') if [[ $(ls "$ITEM_DIR"/* 2> '/dev/null') != '' ]]; then for DROP_ID in "${DROP_IDS[@]}"; do grep -hE "^$DROP_ID, " "$ITEM_DIR"/* | awk '{print $2}' >> "$TMW_INFO/mob-drop-names-$MOB_ID.tmp" -- cgit v1.2.3-70-g09d2