summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ecommon/init.c6
-rw-r--r--src/emap/enum/esctype.h7
-rw-r--r--src/emap/enum/esitype.h29
-rwxr-xr-xtools/vars.sh34
4 files changed, 51 insertions, 25 deletions
diff --git a/src/ecommon/init.c b/src/ecommon/init.c
index bcd68d1..11f1df4 100644
--- a/src/ecommon/init.c
+++ b/src/ecommon/init.c
@@ -51,11 +51,11 @@ void common_online(void)
{
checkVar(MAX_SKILL_DB, 1532);
checkVar(MAX_SKILL_ID, 20022);
- checkVar(SC_MAX, 658);
- checkVar(SI_MAX, 991);
+ checkVar(SC_MAX, 682);
+ checkVar(SI_MAX, 1175);
checkVar(OLD_MAX_SKILL_DB, 1510);
checkVar(MAX_EVOL_SKILLS, 22);
checkVar(EVOL_FIRST_SKILL, 20000);
- checkVar(MAX_SKILL_TREE, 110);
+ checkVar(MAX_SKILL_TREE, 108);
checkVar(BASE_GUILD_SIZE, 100);
}
diff --git a/src/emap/enum/esctype.h b/src/emap/enum/esctype.h
index 28e3930..932d297 100644
--- a/src/emap/enum/esctype.h
+++ b/src/emap/enum/esctype.h
@@ -4,9 +4,14 @@
#ifndef EVOL_MAP_ENUM_ESCTYPE
#define EVOL_MAP_ENUM_ESCTYPE
+#ifndef OLD_SC_MAX
+#define OLD_SC_MAX 0
+#error "vars.sh did not define OLD_SC_MAX"
+#endif
+
typedef enum esc_type
{
- SC_PHYSICAL_SHIELD = 654,
+ SC_PHYSICAL_SHIELD = OLD_SC_MAX, // defined in vars.sh
} esc_type;
#endif // EVOL_MAP_ENUM_ESCTYPE
diff --git a/src/emap/enum/esitype.h b/src/emap/enum/esitype.h
index 2791bd4..7dd10a7 100644
--- a/src/emap/enum/esitype.h
+++ b/src/emap/enum/esitype.h
@@ -4,20 +4,25 @@
#ifndef EVOL_MAP_ENUM_ESITYPE
#define EVOL_MAP_ENUM_ESITYPE
+#ifndef OLD_SI_MAX
+#define OLD_SI_MAX 0
+#error "vars.sh did not define OLD_SI_MAX"
+#endif
+
enum esi_type
{
- SI_PHYSICAL_SHIELD = 966,
- //SI_EVOL_INCSTR = 970,
- SI_EVOL_INCAGI = 971,
- SI_EVOL_INCVIT = 972,
- SI_EVOL_INCINT = 973,
- SI_EVOL_INCDEX = 974,
- SI_EVOL_INCLUK = 975,
- SI_EVOL_INCHIT = 976,
- SI_EVOL_INCFLEE = 977,
- SI_EVOL_WALKSPEED = 978,
- SI_EVOL_INCMHPRATE = 979,
- SI_EVOL_INCMSPRATE = 980,
+ SI_PHYSICAL_SHIELD = OLD_SI_MAX, // defined in vars.sh
+ SI_EVOL_INCSTR,
+ SI_EVOL_INCAGI,
+ SI_EVOL_INCVIT,
+ SI_EVOL_INCINT,
+ SI_EVOL_INCDEX,
+ SI_EVOL_INCLUK,
+ SI_EVOL_INCHIT,
+ SI_EVOL_INCFLEE,
+ SI_EVOL_WALKSPEED,
+ SI_EVOL_INCMHPRATE,
+ SI_EVOL_INCMSPRATE,
};
#endif // EVOL_MAP_ENUM_ESITYPE
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}"