summaryrefslogtreecommitdiff
path: root/tools/vars.sh
blob: 1f5a59675f56c016c37e126141865368d66e7b89 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash

# 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
OLD_IT_MAX=19 # 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))
IT_VIRTUAL=$(($OLD_IT_MAX + 1))
IT_MAX=$(($IT_VIRTUAL + 1))

# can be used for custom skill id: 10016 - 10036

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 -DIT_VIRTUAL=${IT_VIRTUAL} -DIT_MAX=${IT_MAX}"
export CPPFLAGS="${VARS}"