summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-07-13 20:31:36 +0000
committergumi <git@gumi.ca>2020-07-13 20:31:53 +0000
commit858de334b4e9dd4d81b7f78aeadd195ecf9ca342 (patch)
treefd856707eab52e1b493c4a3a3beaac814534e55c /tools
parent918d53cc4d9c7198b19f20c840cbb8755b6ea3ab (diff)
downloadevol-hercules-858de334b4e9dd4d81b7f78aeadd195ecf9ca342.tar.gz
evol-hercules-858de334b4e9dd4d81b7f78aeadd195ecf9ca342.tar.bz2
evol-hercules-858de334b4e9dd4d81b7f78aeadd195ecf9ca342.tar.xz
evol-hercules-858de334b4e9dd4d81b7f78aeadd195ecf9ca342.zip
update skill constants from hercules
Diffstat (limited to 'tools')
-rwxr-xr-xtools/vars.sh34
1 files changed, 25 insertions, 9 deletions
diff --git a/tools/vars.sh b/tools/vars.sh
index 30cb07a..3571999 100755
--- a/tools/vars.sh
+++ b/tools/vars.sh
@@ -1,15 +1,31 @@
#!/usr/bin/env bash
-# MAX_SKILL_DB 1510 + 22 = 1532
-# MAX_SKILL_ID 10015 + 22 + 9963 = 20022
-# SC_MAX 653 + 5 = 658
-# SI_MAX 966 + 25 = 991
-# MAX_EVOL_SKILLS 22
-# EVOL_FIRST_SKILL 20000
-# OLD_MAX_SKILL_DB 1510
-# MAX_SKILL_TREE 110
+# NOTE: ecommon/init.c needs to be updated when vars.sh changes
+
+# what the plugin adds:
+MAX_EVOL_SKILLS=22
+MAX_EVOL_SC=5
+MAX_EVOL_SI=25
+
+# from Herc:
+OLD_SI_MAX=1150 # from constants
+OLD_SC_MAX=677 # in src/map/status.h
+OLD_MAX_SKILL_ID=10015 # in src/common/mmo.h
+OLD_MAX_SKILL_DB=1510 # in src/common/mmo.h
+OLD_MAX_SKILL_TREE=86 # in src/common/mmo.h
+
+# constants:
+EVOL_FIRST_SKILL=20000 # skills have to be saved to SQL so they shouldn't change ID
+
+# calculated:
+MAX_SKILL_DB=$(($OLD_MAX_SKILL_DB + $MAX_EVOL_SKILLS))
+MAX_SKILL_ID=$(($EVOL_FIRST_SKILL + $MAX_EVOL_SKILLS))
+SC_MAX=$(($OLD_SC_MAX + $MAX_EVOL_SC))
+SI_MAX=$(($OLD_SI_MAX + $MAX_EVOL_SI))
+CUSTOM_SKILL_RANGES="{${EVOL_FIRST_SKILL},${MAX_SKILL_ID}},"
+MAX_SKILL_TREE=$(($OLD_MAX_SKILL_TREE + $MAX_EVOL_SKILLS))
# can be used for custom skill id: 10016 - 10036
-export VARS=" -DOLD_MAX_SKILL_DB=1510 -DMAX_SKILL_DB=1532 -DMAX_SKILL_ID=20022 -DMAX_EVOL_SKILLS=22 -DEVOL_FIRST_SKILL=20000 -DMAX_SKILL_TREE=110 -DSC_MAX=658 -DSI_MAX=991 -DBASE_GUILD_SIZE=100 -DMIN_PACKET_DB=0x63 -DMAX_PACKET_DB=0x7531"
+export VARS=" -DOLD_SI_MAX=${OLD_SI_MAX} -DOLD_SC_MAX=${OLD_SC_MAX} -DOLD_MAX_SKILL_DB=${OLD_MAX_SKILL_DB} -DMAX_SKILL_DB=${MAX_SKILL_DB} -DMAX_SKILL_ID=${MAX_SKILL_ID} -DMAX_EVOL_SKILLS=${MAX_EVOL_SKILLS} -DEVOL_FIRST_SKILL=${EVOL_FIRST_SKILL} -DCUSTOM_SKILL_RANGES=\"${CUSTOM_SKILL_RANGES}\" -DMAX_SKILL_TREE=${MAX_SKILL_TREE} -DSC_MAX=${SC_MAX} -DSI_MAX=${SI_MAX} -DBASE_GUILD_SIZE=100 -DMIN_PACKET_DB=0x63 -DMAX_PACKET_DB=0x7531"
export CPPFLAGS="${VARS}"