diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-10-24 12:36:36 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-10-24 12:36:36 -0300 |
commit | 6a31a3e8177704b8bef6ec07c7db79ec04789d4b (patch) | |
tree | 33adfec325a0d26a029bf7a52a06665091229959 | |
parent | b5201637f8d6d045a52c8c1a3d548e04adc055b5 (diff) | |
download | tools-6a31a3e8177704b8bef6ec07c7db79ec04789d4b.tar.gz tools-6a31a3e8177704b8bef6ec07c7db79ec04789d4b.tar.bz2 tools-6a31a3e8177704b8bef6ec07c7db79ec04789d4b.tar.xz tools-6a31a3e8177704b8bef6ec07c7db79ec04789d4b.zip |
Add an offset of 200 for negative IDs
-rwxr-xr-x | merge-client.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/merge-client.py b/merge-client.py index 394b93d..be5019b 100755 --- a/merge-client.py +++ b/merge-client.py @@ -15,11 +15,14 @@ item_db=[] paths=[] def fix_id(l, offset): - if "id=" in l: + if "id=" in l or " from=" in l or " to=" in l: tmp=l.split("\"") try: if (int(tmp[1]) > 0): tmp[1]=str(int(tmp[1]) + offset) + else: + # Negative IDs are special (10,000 => 200 per game) + tmp[1]=str(int(tmp[1]) - int(offset//50)) except: traceback.print_exc() l="\"".join(tmp) |