summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--.travis.yml4
-rw-r--r--3rdparty/libconfig/Makefile.in2
-rw-r--r--3rdparty/mt19937ar/Makefile.in2
-rw-r--r--Makefile.in29
-rw-r--r--conf/battle/player.conf7
-rw-r--r--conf/messages.conf21
-rw-r--r--db/job_db2.txt131
-rw-r--r--db/re/exp.txt18
-rw-r--r--db/re/item_db.conf16
-rw-r--r--db/re/statpoint.txt38
-rw-r--r--doc/script_commands.txt8
-rw-r--r--npc/re/quests/quests_brasilis.txt8
-rwxr-xr-xscript-checker14
-rw-r--r--sql-files/item_db_re.sql20
-rw-r--r--src/char/Makefile.in9
-rw-r--r--src/char/char.c117
-rw-r--r--src/char/char.h2
-rw-r--r--src/char/int_storage.c78
-rw-r--r--src/common/HPM.c5
-rw-r--r--src/common/HPM.h2
-rw-r--r--src/common/HPMDataCheck.h5
-rw-r--r--src/common/HPMi.h16
-rw-r--r--src/common/Makefile.in24
-rw-r--r--src/common/console.c15
-rw-r--r--src/common/console.h4
-rw-r--r--src/common/core.c151
-rw-r--r--src/common/core.h14
-rw-r--r--src/common/des.h5
-rw-r--r--src/common/grfio.h4
-rw-r--r--src/common/malloc.c8
-rw-r--r--src/common/mmo.h142
-rw-r--r--src/common/socket.h2
-rw-r--r--src/common/sysinfo.c1022
-rw-r--r--src/common/sysinfo.h62
-rw-r--r--src/common/timer.h4
-rw-r--r--src/login/Makefile.in9
-rw-r--r--src/map/Makefile.in9
-rw-r--r--src/map/atcommand.c102
-rw-r--r--src/map/battle.c75
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/chrif.c57
-rw-r--r--src/map/clif.c46
-rw-r--r--src/map/guild.c1
-rw-r--r--src/map/map.c8
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/npc.c17
-rw-r--r--src/map/pc.c33
-rw-r--r--src/map/pc.h28
-rw-r--r--src/map/script.c17
-rw-r--r--src/map/trade.h4
-rw-r--r--src/map/vending.h4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc3
-rw-r--r--src/plugins/Makefile.in5
-rw-r--r--src/test/Makefile.in25
-rw-r--r--src/tool/Makefile.in29
-rwxr-xr-xsysinfogen.sh259
-rwxr-xr-xtools/HPMHookGen/HPMHookGen.pl2
-rw-r--r--tools/HPMHookGen/Makefile.in6
-rw-r--r--vcproj-10/char-server.vcxproj2
-rw-r--r--vcproj-10/char-server.vcxproj.filters6
-rw-r--r--vcproj-10/login-server.vcxproj2
-rw-r--r--vcproj-10/login-server.vcxproj.filters6
-rw-r--r--vcproj-10/map-server.vcxproj2
-rw-r--r--vcproj-10/map-server.vcxproj.filters6
-rw-r--r--vcproj-10/mapcache.vcxproj2
-rw-r--r--vcproj-10/mapcache.vcxproj.filters6
-rw-r--r--vcproj-11/char-server.vcxproj2
-rw-r--r--vcproj-11/char-server.vcxproj.filters6
-rw-r--r--vcproj-11/login-server.vcxproj2
-rw-r--r--vcproj-11/login-server.vcxproj.filters6
-rw-r--r--vcproj-11/map-server.vcxproj2
-rw-r--r--vcproj-11/map-server.vcxproj.filters6
-rw-r--r--vcproj-11/mapcache.vcxproj2
-rw-r--r--vcproj-11/mapcache.vcxproj.filters6
-rw-r--r--vcproj-12/char-server.vcxproj2
-rw-r--r--vcproj-12/char-server.vcxproj.filters6
-rw-r--r--vcproj-12/login-server.vcxproj2
-rw-r--r--vcproj-12/login-server.vcxproj.filters6
-rw-r--r--vcproj-12/map-server.vcxproj2
-rw-r--r--vcproj-12/map-server.vcxproj.filters6
-rw-r--r--vcproj-12/mapcache.vcxproj2
-rw-r--r--vcproj-12/mapcache.vcxproj.filters6
-rw-r--r--vcproj-9/char-server.vcproj8
-rw-r--r--vcproj-9/login-server.vcproj8
-rw-r--r--vcproj-9/map-server.vcproj8
-rw-r--r--vcproj-9/mapcache.vcproj8
87 files changed, 2244 insertions, 639 deletions
diff --git a/.gitignore b/.gitignore
index c43c27e31..4ee9469de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,8 @@
.DS_Store
._*
.clang_complete
+.local.vimrc
+.ycm_extra_conf.py*
Thumbs.db
# /
@@ -69,7 +71,7 @@ Thumbs.db
/src/common/Makefile
/src/common/obj_all
/src/common/obj_sql
-/src/common/svnversion.h
+/src/common/sysinfo.inc
# /src/login/
/src/login/Makefile
diff --git a/.travis.yml b/.travis.yml
index e6e60500c..4de81e6a8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,9 +7,9 @@ before_script:
- uname -a
script:
- - ./configure --enable-debug && make sql -j3
+ - ./configure --enable-debug && make sql -j3 && ./map-server --version
- make clean
- - ./configure --disable-renewal --enable-debug && make sql -j3
+ - ./configure --disable-renewal --enable-debug && make sql -j3 && ./map-server --version
notifications:
email: false
diff --git a/3rdparty/libconfig/Makefile.in b/3rdparty/libconfig/Makefile.in
index 88c5eba96..e27aab30a 100644
--- a/3rdparty/libconfig/Makefile.in
+++ b/3rdparty/libconfig/Makefile.in
@@ -1,3 +1,5 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
LIBCONFIG_OBJ = libconfig.o grammar.o scanctx.o scanner.o strbuf.o
LIBCONFIG_H = libconfig.h grammar.h parsectx.h scanctx.h scanner.h strbuf.h wincompat.h
diff --git a/3rdparty/mt19937ar/Makefile.in b/3rdparty/mt19937ar/Makefile.in
index 5d8e19994..61f0556be 100644
--- a/3rdparty/mt19937ar/Makefile.in
+++ b/3rdparty/mt19937ar/Makefile.in
@@ -1,3 +1,5 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
MT19937AR_OBJ = mt19937ar.o
MT19937AR_H = mt19937ar.h
diff --git a/Makefile.in b/Makefile.in
index d61a885b4..e987c713f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,14 +1,17 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+
@SET_MAKE@
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- ALL_DEPENDS=common_sql login_sql char_sql map_sql tools | import
- SQL_DEPENDS=common_sql login_sql char_sql map_sql | import
- COMMON_SQL_DEPENDS=mt19937ar libconfig
- LOGIN_SQL_DEPENDS=mt19937ar libconfig common_sql
- CHAR_SQL_DEPENDS=mt19937ar libconfig common_sql
- MAP_SQL_DEPENDS=mt19937ar libconfig common_sql
- TOOLS_DEPENDS=mt19937ar libconfig common_sql
+ ALL_DEPENDS=common_sql login_sql char_sql map_sql tools sysinfo | import
+ SQL_DEPENDS=common_sql login_sql char_sql map_sql sysinfo | import
+ COMMON_SQL_DEPENDS=mt19937ar libconfig sysinfo
+ LOGIN_SQL_DEPENDS=mt19937ar libconfig common_sql sysinfo
+ CHAR_SQL_DEPENDS=mt19937ar libconfig common_sql sysinfo
+ MAP_SQL_DEPENDS=mt19937ar libconfig common_sql sysinfo
+ TOOLS_DEPENDS=mt19937ar libconfig common_sql sysinfo
else
ALL_DEPENDS=needs_mysql
SQL_DEPENDS=needs_mysql
@@ -51,6 +54,7 @@ export CC
clean \
buildclean \
distclean \
+ sysinfo \
hooks \
help
@@ -140,6 +144,14 @@ clean buildclean: $(MF_TARGETS)
distclean: clean
@-rm -f $(MF_TARGETS) config.status config.log
+sysinfo:
+ @./sysinfogen.sh src/common/sysinfo_new.inc @CFLAGS@
+ @if cmp -s src/common/sysinfo.inc src/common/sysinfo_new.inc; then \
+ rm src/common/sysinfo_new.inc ; \
+ else \
+ mv src/common/sysinfo_new.inc src/common/sysinfo.inc ; \
+ fi
+
help: Makefile
@echo "most common targets are 'all' 'sql' 'clean' 'plugins' 'help'"
@echo "possible targets are:"
@@ -161,8 +173,9 @@ help: Makefile
@echo "'buildclean' - cleans build temporary (object) files, without deleting the"
@echo " executables"
@echo "'distclean' - cleans files generated by ./configure"
+ @echo "'sysinfo' - re-generates the System Info include"
ifeq ($(HAVE_PERL)$(HAVE_DOXYGEN),yesyes)
- @echo "'hooks' - re-generates the definitions for the HPM Hooking plugin"
+ @echo "'hooks' - re-generates the definitions for the HPM"
endif
@echo "'help' - outputs this message"
diff --git a/conf/battle/player.conf b/conf/battle/player.conf
index c11015937..cdfcece8d 100644
--- a/conf/battle/player.conf
+++ b/conf/battle/player.conf
@@ -82,13 +82,16 @@ max_sp: 1000000
max_parameter: 99
// Same as max_parameter, but for 3rd classes.
-max_third_parameter: 120
+max_third_parameter: 130
+
+// Same as max_parameter, but for extend classes (Ex. Super Novice, Kagero/Oboro, Rebellion).
+max_extended_parameter: 125
// Same as max_parameter, but for baby classes.
max_baby_parameter: 80
// Same as max_parameter, but for baby 3rd's.
-max_baby_third_parameter: 108
+max_baby_third_parameter: 117
// Max armor def/mdef
// NOTE: This setting have no effect if server is run on Renewal Mode (RENEWAL)
diff --git a/conf/messages.conf b/conf/messages.conf
index 2eba688cd..7070b80e0 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -247,7 +247,7 @@
250: You have already opened your storage. Close it first.
251: You have already opened your guild storage. Close it first.
252: You are not in a guild.
-//253 FREE
+253: You already are at your destination!
254: GM command configuration has been reloaded.
255: Battle configuration has been reloaded.
256: Status database has been reloaded.
@@ -470,7 +470,12 @@
//541: %.0s%.0sSomeone got %s
542: '%s' stole %s's %s (chance: %0.02f%%)
//542: %.0s%.0sSomeone stole %s
-//543-548 FREE
+//543-545 FREE
+// @showmobs
+546: Please enter a mob name/id (usage: @showmobs <mob name/id>)
+547: Invalid mob name %s!
+// @clearcart
+548: You can't clean a cart while vending!
// @Autotrade
549: You should have a shop open in order to use @autotrade.
@@ -1065,7 +1070,10 @@
1199: Items on your autolootitem list:
1200: Your autolootitem list has been reset.
-//1201-1202 FREE
+// @guildstorage
+1201: Your guild's storage has already been opened by another member, try again later.
+
+//1202 FREE
// @snow
1203: Snow has stopped falling.
@@ -1223,12 +1231,11 @@
1289: %s spawns in:
1290: This monster does not spawn normally.
-//1291-1293 FREE
+//1291-1294 FREE
// @version
-1294: SVN r%s
-1295: Git Hash '%s'
-1296: Cannot determine version.
+1295: %s revision '%s' (src) / '%s' (scripts)
+1296: Hercules %d-bit for %s
// @mutearea
1297: Please enter a time in minutes (usage: @mutearea/@stfu <time in minutes>).
diff --git a/db/job_db2.txt b/db/job_db2.txt
index 5c5f9a445..19e19e192 100644
--- a/db/job_db2.txt
+++ b/db/job_db2.txt
@@ -13,7 +13,7 @@
// 6 = LUK increased by 1 at this job level
//
// Novice
-0,0,0,0,0,0,0,0,0,0
+0,0,6,5,0,2,3,0,1,4,0
// Swordman
1,0,1,0,0,0,3,0,0,0,5,0,0,0,1,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,2,0,0,1,0,0,5,0,3,0,1,0,3,0,6,0,2,1,0,1,1
// Magician
@@ -23,19 +23,19 @@
// Acolyte
4,0,6,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,2,0,0,0,1,0,0,0,3,0,0,4,0,0,5,0,6,0,2,0,1,0,3,0,4,5,0,1,6
// Merchant
-5,0,3,0,0,0,5,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,3,0,0,0,0,0,6,0,5,0,1,2,5,0,1,0,6,3,0,1,5
+5,0,3,0,0,0,5,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,3,0,0,2,0,0,6,0,5,0,1,0,5,0,1,0,6,3,0,1,5
// Thief
-6,0,2,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,1,0,0,2,0,0,1,0,2,0,6,0,5,0,3,0,6,1,0,5,2
+6,0,2,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,1,0,0,2,0,0,2,0,1,0,6,0,5,0,3,0,6,1,0,5,2
// Knight
7,3,0,3,1,6,0,0,3,0,1,5,3,2,0,1,0,3,3,5,6,1,0,3,0,0,0,1,6,3,0,5,0,1,0,0,3,6,2,0,5,0,0,3,0,0,1,1,5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,5,2,0,0,0,4,2,6,5,0,4,2,0,3,6,5,2
// Baby Mechanic (Mado)
-4112,6,1,0,0,1,0,6,2,5,4,0,0,4,6,0,0,2,0,3,3,4,5,0,0,3,6,0,0,3,0,1,1,3,6,0,0,4,4,0,0,0,3,3,1,1,0,0,5,2,0
+4112,6,1,0,0,1,0,6,2,5,4,0,0,4,6,0,0,2,0,3,3,4,5,0,0,3,6,0,0,3,0,1,1,3,6,0,0,4,4,0,0,0,3,3,1,1,0,0,5,2,0,6,1,5,0,4,3,2,0,5,1
// Super Novice (Expanded)
4190,1,2,0,3,0,4,5,0,6,0,1,2,0,3,0,4,5,0,6,0,1,2,0,3,0,4,5,0,6,0,1,2,0,3,0,4,5,0,6,0,1,2,0,3,0,4,5,0,6,0
// Super Baby (Expanded)
@@ -288,4 +288,5 @@
// Oboro
4212,5,0,4,0,2,3,0,1,6,0,5,1,2,0,4,6,3,0,1,5,2,0,6,3,4,0,5,0,2,0,1,4,0,5,4,0,3,5,1,0,2,4,1,0,5,6,2,1,0,5
// Rebellion
-4215,5,6,0,6,0,5,0,0,0,6,5,6,0,0,4,0,5,0,0,5,6,0,0,0,5,2,0,0,0,3,6,1,0,0,5,4,0,0,5,0,1,0,6,0,5,0,0,1,0,1
+4215,0,5,0,4,0,3,5,4,2,6,0,0,3,4,0,2,5,4,3,6,0,0,3,5,1,4,2,0,0,6,3,0,5,4,1,0,0,5,0,2,6,0,5,3,4,0,0,0,0,1
+
diff --git a/db/re/exp.txt b/db/re/exp.txt
index c3bf5ccc0..c4be1cd07 100644
--- a/db/re/exp.txt
+++ b/db/re/exp.txt
@@ -12,9 +12,12 @@
//Base - Adv Jobs
99,4001:4002:4003:4004:4005:4006:4007:4008:4009:4010:4011:4012:4013:4014:4015:4016:4017:4018:4019:4020:4021:4022,0,420,660,1080,1800,2640,3840,4560,5040,5460,6000,6600,7200,7320,7620,8040,8820,9600,10080,10560,11040,12610,13390,14300,15340,16900,18460,19500,20800,22100,23400,24700,26000,27300,28600,30160,31200,33800,35750,37700,39000,44100,46200,47600,50400,52500,53200,56000,58800,62300,65800,68600,71400,74200,77000,79800,82600,86100,88200,91000,93800,103500,105000,109500,115500,120000,126000,132000,136500,142500,165000,192000,210000,232500,244500,255000,270000,282000,292500,300000,345000,416000,480000,560000,640000,768000,880000,960000,1088000,1200000,1440000,1700000,2040000,2550000,3060000,3570000,4080000,4760000,5610000,6800000,6827199,6854507,6881924,6909451,6937088,6964835,6992693,7020663,7048745,7076939,7105246,7133666,7162200,7190848,7219611,7248489,7277482,7306591,7335816,7365158,7394618,7424196,7453892,7483707,7513641,7543695,7573869,7604164,7634580,7665117,7695777,7726559,7757464,7788493,7819646,7850924,7882327,7913855,7945510,7977291,8009199,8041235,8073399,8105692,8138114,8170666,8203348,8236160,8269104,8302179,8335387,8368728,8402202,8435810,8469552,8503429,8537442,8571591,8605876,8640299,8674859,8709557,8744394,8779371,8814488,8849745,8885143,8920683,8956365,8992189,9028157,9064269,9100525,9136926,9173473,9210166,9247006,9283993,9321128,9358412,9395845,9433427,9471160,9509044,9547079,9585266,9623606,9662099,9700746,9739548,9778505,9817618,9856887,9896314,9935898,9975641,10015543,10055604,10095825,10136207,10176751,10217457,10258326,10299358,10340554,10381915,10423442,10465135,10506995,10549022,10591217,10633581,10676114,10718817,10761691,10804737,10847955,10891346,10934910,10978649,11022563,11066652,11110918,11155361,11199981,11244780,11289758,11334916,11380255,11425775,11471477,11517362,11563430,11609683,11656121,11702744,11749554,11796551,11843736,11891110,11938673,11986427,12034372,12082508,12130837,12179359,12228075,12276986,12326093,12375396,12424896,12474594,12524491,12574588,12624885,12675383,12726083,12776986,12828093,12879404,12930920,12982643,13034572,13086709,13139055,13191610,13244375,13297351,13350539,13403940,13457555,13511384,13565428,13619689,13674167,13728862,13783776,13838910,13894264,13949840,14005638,14061659,14117904,14174374,14231070,14287993,14345144,14402523,14460132,14517971,14576042,14634345,14692881,14751651,14810656,14869897,14929375,14989091,15049046,15109241,15169677,15230354,15291274,15352438,15413846,15475500,15537401,15599549,15661946,15724592,15787489,15850638,15914039,15977694,16041603,16105768,16170190,16234869,16299807,16365005,16430464,16496185,16562168,16628415,16694927,16761705,16828750,16896064,16963647,17031501,17099625,17168021,17236691,17305637,17374857,17444354,17514130,17584185,17654519,17725137,17796035,17867219,17938687,18010441,18082480,18154808,18227426,18300334,18373534,18447027,18520815,18594898,18669276,18743952,18818926,18894200,18969775,19045654,19121835,19198322,19275114,19352213,19429619,19507337,19585364,19663704,19742357,19821324,19900608,19980209,20060127,20140367,20220928,20301810,20383016,20464547,20546405,20628588,20711101,20793943,20877118,20960625,21044465,21128640,21213153,21298003,21383194,21468725,21554597,21640813,21727374,21814282,21901538,21989143,22077099,22165407,22254068,22343083,22432455,22522184,22612271,22702719,22793529,22884700,22976237,23068139,23160411,23253052,23346063,23439447,23533204,23627335,23721844,23816730,23911995,24007642,24103671,24200085,24296883,24394070,24491645,24589609,24687965,24786714,24885859,24985402,25085342,25185682,25286423,25387568,25489116,25591071,25693434,25796206,25899389,26002984,26106994,26211420,26316264,26421527,26527212,26633319,26739851,26846810,26954195,27062011,27170258,27278937,27388050,27497600,27607588,27718016,27828886,27940200,28051959,28164166,28276821,28389925,28503482,28617494,28731962,28846888,28962274,29078121,29194430,29311206,29428449,29546160,29664343,29782999,29902130,30021736,30141821,30262385,30383431,30504964,30626982,30749488,30872484,30995972,31119954,31244432,31369408,31494884,31620861,31747341,31874327,32001823,32129829,32258345,32387375,32516923,32646990,32777576,32908684,33040317,33172475,33305164,33438382,33572133,33706418,33841239,33976603,34112508,34248956,34385950,34523494,34661588,34800232,34939431,35079187,35219502,35360380,35501819,35643825,35786397,35929539,36073256,36217547,36362416,36507863,36653893,36800505,36947704,37095492,37243872,37392845,37542413,37692579,37843348,37994719,38146696,38299280,38452475,38606283,38760707,38915748,39071408,39227691,39384600,39542136,39700302,39859103,40018538,40178608,40339320,40500675,40662676,40825324,40988623,41152576,41317184,41482450,41648375,41814967,41982225,42150150,42318750,42488024,42657973,42828601,42999912,43171909,43344593,43517968,43692037,43866801,44042264,44218430,44395303,44572882,44751169,44930170,45109886,45290325,45471482,45653363,45835975,46019317,46203390,46388203,46573754,46760044,46947081,47134865,47323401,47512691,47702740,47893548,48085119,48277458,48470563,48664443,48859099,49054533,49250747,49447748,49645536,49844115,50043489,50243659,50444632,50646407,50848991,51052385,51256590,51461615,51667459,51874127,52081621,52289943,52499101,52709093,52919925,53131600,53344123,53557497,53771723,53986808,54202752,54419560,54637235,54855782,55075204,55295501,55516679,55738743,55961696,56185539,56410279,56635918,56862460,57089906,57318260,57547530,57777715,58008823,58240856,58473816,58707708,58942535,59178303,59415014,59652673,59891279,60130842,60371360,60612842,60855288,61098706,61343095,61588465,61834814,62082152,62330477,62579794,62830107,63081425,63333746,63587075,63841421,64096782,64353167,64610577,64869014,65128488,65388998,65650552,65913150,66176801,66441503,66707266,66974089,67241980,67510948,67780984,68052104,68324308,68597597,68871986,69147468,69424058,69701748,69980547,70260462,70541502,70823666,71106955,71391376,71676937,71963640,72251490,72540490,72830646,73121966,73414452,73708102,74002932,74298935,74596127,74894508,75194086,75494860,75796839,76100023,76404420,76710029,77016868,77324927,77634223,77944756,78256526,78569550,78883826,79199355,79516145,79834204,80153540,80474146,80796036,81119211,81443680,81769450,82096521,82424901,82754599,83085614,83417954,83751619,84086618,84422958,84760647,85099686,85440082,85781835,86124954,86469447,86815321,87162576,87511221,87861264,88212704,88565550,88919809,89275482,89632577,89991101,90351063,90712463,91075309,91439608,91805361,92172576,92541261,92911424,93283064,93656191,94030811,94406926,94784550,95163685,95544337,95926508,96310213,96695451,97082224,97470547,97860421,98251860,98644858,99039430,99435584,99833321,100232648,100633573,101036105,101440243,101845995,102253370,102662376,103073020,103485310,103899247,104314839,104732093,105151018,105571614,105993897,106417866,106843529,107270896,107699974,108130770,108563285,108997535,109433520,109871248,110310727,110751965,111194970,111639742,112086297,112534635,112984764,113436701,113890444,114346003,114803378,115262583,115723628,116186520,116651260,117117863,117586329,118056667,118528884,119002989,119478997,119956909,120436733,120918476,121402147,121887746,122375288,122864782,123356236,123849658,124345048,124842421,125341787,125843144,126346510,126851891,127359289,127868718,128380188,128893706,129409272,129926902,130446604,130968387,131492250,132018210,132546274,133076450,133608746,134143172,134679733,135218439,135759298,136302326,136847522,137394903,137944468,138496234,139050217,139606417,140164834,140725484,141288382,141853530,142420942,142990620,143562579,144136818,144713355,145292205,145873369,146456861,147042683,147630851,148221363,148814237,149409489,150007118,150607140,151209556,151814382,152421633,153031310,153643429,154257989,154875007,155494500,156116465,156740921,157367883,157997351,158629325,159263837,159900887,160540475,161182633,161827362,162474661,163124546,163777033,164432139,165089864,165750206,166413200,167078844,167747154,168418131,169091791,169768150,170447207,171128980,171813483,172500733,173190730,173883490,174579012,175277315,175978412,176682320,177389040,178098587,178810977,179526210,180244303,180965271,181689115,182415867,183145526,183878092,184613598,185352044,186093446,186837804,187585149,188335482,189088820,189845161,190604538,191366952,192132401,192900919,193672505,194447192,195224978,196005865,196789885,197577037,198367337,199160803,199957432,200757259,201560282,202366518,203175967,203988661,204804600,205623815,206446292,207272062,208101141,208933529,209769259,210608330,211450758,212296544,213145719,213998283,214854270,215713678,216576523,217442822,218312576,219185815,220062539,220942782,221826543,222713838,223604683,224499095,225397072,226298648,227203838,228112643,229025078,229941160,230860904,231784327,232711445,233642273,234576829,235515127,236457168,237402984,238352575,239305974,240263179,241224224,242189108,243157847,244130458,245106973,246087391,247071728,248060002
-//Base - 3rd Jobs, Baby 3rds, Expanded Super Novice, and Kagerou/Oboro
+//Base - 3rd Jobs, Baby 3rds
//Note: (First 98 values [Level 1 - 98] are dummy values (used Adv Jobs values), because 3rd classes start at level 99.)
-150,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,0,420,660,1080,1800,2640,3840,4560,5040,5460,6000,6600,7200,7320,7620,8040,8820,9600,10080,10560,11040,12610,13390,14300,15340,16900,18460,19500,20800,22100,23400,24700,26000,27300,28600,30160,31200,33800,35750,37700,39000,44100,46200,47600,50400,52500,53200,56000,58800,62300,65800,68600,71400,74200,77000,79800,82600,86100,88200,91000,93800,103500,105000,109500,115500,120000,126000,132000,136500,142500,165000,192000,210000,232500,244500,255000,270000,282000,292500,300000,345000,416000,480000,560000,640000,768000,880000,960000,1088000,1200000,1440000,1700000,2040000,2550000,3060000,3570000,4080000,4760000,5610000,6800000,7070000,7400000,7770000,8150000,8550000,9100000,9610000,10150000,10570000,11180000,12000000,12200000,12930000,13150000,14030000,14420000,15420000,15670000,16870000,17140000,18720000,19020000,20590000,20930000,22690000,23310000,25290000,26020000,27860000,28535000,30990000,31680000,33560000,34942000,36372000,38350000,39890000,41545000,43330000,45400000,48100000,50410000,53370000,56250000,59230000,62590000,66120000,70200000,75330000,81100000,95000000,95285001,95570856,95857570,96145142,96433581,96722886,97013058,97304097,97596010,97888798,98182468,98477013,98772449,99068767,99365976,99664076,99963074,100262963,100563750,100865445,101168046,101471554,101775968,102081298,102387542,102694708,103002790,103311802,103621737,103932603,104244399,104557135,104870809,105185422,105500982,105817489,106134942,106453351,106772714,107093032,107414313,107736557,108059771,108383949,108709106,109035233,109362339,109690425,110019497,110349556,110680602,111012644,111345680,111679719,112014761,112350806,112687862,113025929,113365008,113705105,114046221,114388365,114731535,115075733,115420965,115767233,116114536,116462882,116812271,117162711,117514202,117866745,118220346,118575007,118930735,119287530,119645393,120004330,120364343,120725439,121087618,121450881,121815235,122180680,122547224,122914868,123283611,123653461,124024426,124396499,124769688,125143999,125519434,125895992,126273682,126652503,127032464,127413564,127795811,128179198,128563740,128949437,129336291,129724299,130113471,130503815,130895330,131288016,131681882,132076928,132473161,132870582,133269198,133669010,134070017,134472228,134875643,135280277,135686115,136093173,136501450,136910963,137321695,137733663,138146867,138561307,138976998,139393925,139812104,140231535,140652233,141074199,141497417,141921919,142347688,142774726,143203047,143632652,144063556,144495745,144929234,145364022,145800111,146237515,146676235,147116271,147557623,148000291,148444291,148889623,149336287,149784299,150233660,150684368,151136424,151589828,152044596,152500728,152958241,153417117,153877374,154339011,154802028,155266441,155732250,156199456,156668057,157138071,157609481,158082319,158556570,159032249,159509356,159987891,160467855,160949262,161432115,161916411,162402168,162889385,163378063,163868201,164359816,164852890,165347458,165843501,166341037,166840066,167340587,167842617,168346155,168851202,169357757,169865836,170375441,170886569,171399239,171913433,172429183,172946475,173465323,173985727,174507688,175031206,175556297,176082976,176611228,177141069,177672498,178205517,178740140,179276368,179814200,180353654,180894712,181437407,181981724,182527677,183075266,183624493,184175373,184727905,185282091,185837946,186395469,186954662,187515523,188078070,188642302,189208234,189775868,190345203,190916239,191488992,192063462,192639650,193217570,193797224,194378611,194961747,195546633,196133284,196721683,197311849,197903795,198497507,199093000,199690275,200289347,200890216,201492882,202097362,202703656,203311763,203921699,204533465,205147076,205762517,206379803,206998951,207619945,208242816,208867548,209494159,210122646,210753012,211385271,212019424,212655486,213293458,213933340,214575148,215218881,215864541,216512142,217161684,217813169,218466612,219122012,219779386,220438734,221100056,221763368,222428654,223095946,223765244,224436548,225109858,225785190,226462544,227141936,227823366,228506834,229192357,229879933,230569580,231261297,231955084,232650958,233348917,234048963,234751111,235455362,236161731,236870218,237580839,238293579,239008469,239725494,240444669,241166011,241889519,242615193,243343050,244073090,244805312,245539733,246276352,247015186,247756234,248499513,249245023,249992764,250742751,251494985,252249482,253006241,253765264,254526565,255290145,256056019,256824189,257594669,258367461,259142563,259919993,260699765,261481864,262266307,263053108,263842268,264633804,265427714,266224000,267022677,267823745,268627220,269433119,270241425,271052169,271865322,272680913,273498976,274319478,275142452,275967897,276795813,277626201,278459092,279294487,280132385,280972787,281815724,282661165,283509141,284359685,285212765,286068412,286926627,287787409,288650792,289516742,290385292,291256441,292130223,293006604,293885617,294767295,295651604,296538577,297428213,298320514,299215479,300113140,301013497,301916550,302822299,303730777,304641982,305555916,306472578,307392000,308314182,309239124,310166859,311097355,312030642,312966754,313905658,314847387,315791940,316739318,317689552,318642611,319598558,320557362,321519054,322483603,323451073,324421432,325394711,326370910,327350031,328332072,329317067,330305014,331295946,332289830,333286700,334286555,335289426,336295315,337304221,338316143,339331083,340349072,341370110,342394229,343421429,344451711,345485074,346521550,347561107,348603810,349649626,350698588,351750695,352805947,353864377,354925984,355990769,357058763,358129935,359204317,360281940,361362805,362446912,363534260,364624882,365718778,366815948,367916391,369020140,370127196,371237589,372351320,373468389,374588796,375712574,376839721,377970239,379104158,380241480,381382204,382526362,383673955,384824981,385979475,387137434,388298860,389463752,390632143,391804032,392979452,394158402,395340883,396526926,397716501,398909669,400106401,401306727,402510648,403718196,404929371,406144172,407362601,408584688,409810466,411039903,412273032,413509851,414750394,415994659,417242648,418494392,419749891,421009146,422272188,423539017,424809633,426084069,427362325,428644431,429930358,431220168,432513829,433811374,435112803,436418147,437727407,439040583,440357706,441678778,443003829,444332860,445665871,447002862,448343865,449688913,451038004,452391139,453748318,455109574,456474906,457844346,459217894,460595551,461977348,463363285,464753395,466147677,467546132,468948792,470355656,471766724,473182030,474601571,476025382,477453462,478885842,480322523,481763505,483208820,484658468,486112449,487570795,489033506,490500614,491972120,493448054,494928418,496413211,497902466,499396181,500894391,502397093,503904289,505416011,506932258,508453063,509978425,511508377,513042919,514582051,516125804,517674180,519227209,520784892,522347261,523914316,525486057,527062517,528643726,530229654,531820364,533415824,535016066,536621123,538230994,539845680,541465244,543089623,544718880,546353015,547992094,549636051,551284951,552938794,554597644,556261436,557930235,559604042,561282855,562966740,564655631,566349594,568048628,569752797,571462038,573176414,574895925,576620635,578350481,580085527,581825772,583571281,585321990,587077962,588839198,590605697,592377525,594154681,595937164,597724975,599518179,601316775,603120763,604930142,606744915,608565143,610390828,612222033,614058694,615900876,617748579,619601866,621460674,623325067,625195044,627070670,628951881,630838740,632731249,634629471,636533341,638442925,640358286,642279360,644206211,646138840,648077246,650021493,651971582,653927512,655889284,657856961,659830544,661810033,663795492,665786920,667784318,669787686,671797089,673812525,675833995,677861500,679895102,681934803,683980602,686032564,688090688,690154974,692225423,694302098,696385000,698474193,700569613,702671323,704779324,706893680,709014391,711141458,713274879,715414719,717560979,719713657,721872820,724038465,726210594,728389271,730574431,732766138,734964457,737169388,739380931,741599086,743823916,746055423,748293605,750538528,752790127,755048530,757313673,759585620,761864372,764149993,766442482,768741839,771048065,773361224,775681315,778008404,780342425,782683443,785031522,787386663,789748864,792118127,794494515,796878028,799268666,801666494,804071512,806483719,808903180,811329894,813763926,816205212,818653816,821109802,823573170,826043920,828522053,831007631,833500656,836001191,838509237,841024793,843547859,846078501,848616781,851162636,853716129,856277326,858846161,861422700,864007006,866599015,869198855,871806462,874421901,877045172,879676337,882315399,884962356,887617273,890280150,892950987,895629847,898316732,901011705,903714766,906425915,909145216,911872670,914608277,917352099,920104203,922864523,925633124,928410070,931195297,933988933,936790914,939601304,942420103,945247376,948083121,950927405,953780226,956641584,959511544,962390106,965277270,968173099,971077659,973990885,976912905,979843655,982783199,985731538,988688735,991654790,994629769,997613670,1000606558,1003608368,1006619230,1009639078,1012668042,1015706057,1018753187,1021809497,1024874921,1027949590,1031033438,1034126529,1037228929,1040340636,1043461651,1046592038,1049731862,1052881057,1056039753,1059207885,1062385517,1065572714,1068769476,1071975802,1075191757,1078417405,1081652682,1084897716,1088152379,1091416799,1094691105,1097975168,1101269116,1104572950,1107886669,1111210403,1114544022,1117887655,1121241302,1124605091,1127978894,1131362840,1134756928,1138161158,1141575659,1145000430,1148435473,1151880786,1155336498,1158802481,1162278863,1165765773,1169263081,1172770917,1176289281,1179818172,1183357591,1186907665,1190468395,1194039782,1197621952,1201214907,1204818517,1208433040,1212058348
+175,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112,0,420,660,1080,1800,2640,3840,4560,5040,5460,6000,6600,7200,7320,7620,8040,8820,9600,10080,10560,11040,12610,13390,14300,15340,16900,18460,19500,20800,22100,23400,24700,26000,27300,28600,30160,31200,33800,35750,37700,39000,44100,46200,47600,50400,52500,53200,56000,58800,62300,65800,68600,71400,74200,77000,79800,82600,86100,88200,91000,93800,103500,105000,109500,115500,120000,126000,132000,136500,142500,165000,192000,210000,232500,244500,255000,270000,282000,292500,300000,345000,416000,480000,560000,640000,768000,880000,960000,1088000,1200000,1440000,1700000,2040000,2550000,3060000,3570000,4080000,4760000,5610000,6800000,7070000,7400000,7770000,8150000,8550000,9100000,9610000,10150000,10570000,11180000,12000000,12200000,12930000,13150000,14030000,14420000,15420000,15670000,16870000,17140000,18720000,19020000,20590000,20930000,22690000,23310000,25290000,26020000,27860000,28535000,30990000,31680000,33560000,34942000,36372000,38350000,39890000,41545000,43330000,45400000,48100000,50410000,53370000,56250000,59230000,62590000,66120000,70200000,75330000,81100000,95000000,98000000,103000000,107000000,112000000,116000000,121000000,125000000,130000000,134000000,139000000,145000000,152200000,160840000,171200000,191930000,202290000,214720000,229640000,247550000,283370000,301280000,322770000,348560000,379500000,441390000,102694708,103002790,103311802,103621737,103932603,104244399,104557135,104870809,105185422,105500982,105817489,106134942,106453351,106772714,107093032,107414313,107736557,108059771,108383949,108709106,109035233,109362339,109690425,110019497,110349556,110680602,111012644,111345680,111679719,112014761,112350806,112687862,113025929,113365008,113705105,114046221,114388365,114731535,115075733,115420965,115767233,116114536,116462882,116812271,117162711,117514202,117866745,118220346,118575007,118930735,119287530,119645393,120004330,120364343,120725439,121087618,121450881,121815235,122180680,122547224,122914868,123283611,123653461,124024426,124396499,124769688,125143999,125519434,125895992,126273682,126652503,127032464,127413564,127795811,128179198,128563740,128949437,129336291,129724299,130113471,130503815,130895330,131288016,131681882,132076928,132473161,132870582,133269198,133669010,134070017,134472228,134875643,135280277,135686115,136093173,136501450,136910963,137321695,137733663,138146867,138561307,138976998,139393925,139812104,140231535,140652233,141074199,141497417,141921919,142347688,142774726,143203047,143632652,144063556,144495745,144929234,145364022,145800111,146237515,146676235,147116271,147557623,148000291,148444291,148889623,149336287,149784299,150233660,150684368,151136424,151589828,152044596,152500728,152958241,153417117,153877374,154339011,154802028,155266441,155732250,156199456,156668057,157138071,157609481,158082319,158556570,159032249,159509356,159987891,160467855,160949262,161432115,161916411,162402168,162889385,163378063,163868201,164359816,164852890,165347458,165843501,166341037,166840066,167340587,167842617,168346155,168851202,169357757,169865836,170375441,170886569,171399239,171913433,172429183,172946475,173465323,173985727,174507688,175031206,175556297,176082976,176611228,177141069,177672498,178205517,178740140,179276368,179814200,180353654,180894712,181437407,181981724,182527677,183075266,183624493,184175373,184727905,185282091,185837946,186395469,186954662,187515523,188078070,188642302,189208234,189775868,190345203,190916239,191488992,192063462,192639650,193217570,193797224,194378611,194961747,195546633,196133284,196721683,197311849,197903795,198497507,199093000,199690275,200289347,200890216,201492882,202097362,202703656,203311763,203921699,204533465,205147076,205762517,206379803,206998951,207619945,208242816,208867548,209494159,210122646,210753012,211385271,212019424,212655486,213293458,213933340,214575148,215218881,215864541,216512142,217161684,217813169,218466612,219122012,219779386,220438734,221100056,221763368,222428654,223095946,223765244,224436548,225109858,225785190,226462544,227141936,227823366,228506834,229192357,229879933,230569580,231261297,231955084,232650958,233348917,234048963,234751111,235455362,236161731,236870218,237580839,238293579,239008469,239725494,240444669,241166011,241889519,242615193,243343050,244073090,244805312,245539733,246276352,247015186,247756234,248499513,249245023,249992764,250742751,251494985,252249482,253006241,253765264,254526565,255290145,256056019,256824189,257594669,258367461,259142563,259919993,260699765,261481864,262266307,263053108,263842268,264633804,265427714,266224000,267022677,267823745,268627220,269433119,270241425,271052169,271865322,272680913,273498976,274319478,275142452,275967897,276795813,277626201,278459092,279294487,280132385,280972787,281815724,282661165,283509141,284359685,285212765,286068412,286926627,287787409,288650792,289516742,290385292,291256441,292130223,293006604,293885617,294767295,295651604,296538577,297428213,298320514,299215479,300113140,301013497,301916550,302822299,303730777,304641982,305555916,306472578,307392000,308314182,309239124,310166859,311097355,312030642,312966754,313905658,314847387,315791940,316739318,317689552,318642611,319598558,320557362,321519054,322483603,323451073,324421432,325394711,326370910,327350031,328332072,329317067,330305014,331295946,332289830,333286700,334286555,335289426,336295315,337304221,338316143,339331083,340349072,341370110,342394229,343421429,344451711,345485074,346521550,347561107,348603810,349649626,350698588,351750695,352805947,353864377,354925984,355990769,357058763,358129935,359204317,360281940,361362805,362446912,363534260,364624882,365718778,366815948,367916391,369020140,370127196,371237589,372351320,373468389,374588796,375712574,376839721,377970239,379104158,380241480,381382204,382526362,383673955,384824981,385979475,387137434,388298860,389463752,390632143,391804032,392979452,394158402,395340883,396526926,397716501,398909669,400106401,401306727,402510648,403718196,404929371,406144172,407362601,408584688,409810466,411039903,412273032,413509851,414750394,415994659,417242648,418494392,419749891,421009146,422272188,423539017,424809633,426084069,427362325,428644431,429930358,431220168,432513829,433811374,435112803,436418147,437727407,439040583,440357706,441678778,443003829,444332860,445665871,447002862,448343865,449688913,451038004,452391139,453748318,455109574,456474906,457844346,459217894,460595551,461977348,463363285,464753395,466147677,467546132,468948792,470355656,471766724,473182030,474601571,476025382,477453462,478885842,480322523,481763505,483208820,484658468,486112449,487570795,489033506,490500614,491972120,493448054,494928418,496413211,497902466,499396181,500894391,502397093,503904289,505416011,506932258,508453063,509978425,511508377,513042919,514582051,516125804,517674180,519227209,520784892,522347261,523914316,525486057,527062517,528643726,530229654,531820364,533415824,535016066,536621123,538230994,539845680,541465244,543089623,544718880,546353015,547992094,549636051,551284951,552938794,554597644,556261436,557930235,559604042,561282855,562966740,564655631,566349594,568048628,569752797,571462038,573176414,574895925,576620635,578350481,580085527,581825772,583571281,585321990,587077962,588839198,590605697,592377525,594154681,595937164,597724975,599518179,601316775,603120763,604930142,606744915,608565143,610390828,612222033,614058694,615900876,617748579,619601866,621460674,623325067,625195044,627070670,628951881,630838740,632731249,634629471,636533341,638442925,640358286,642279360,644206211,646138840,648077246,650021493,651971582,653927512,655889284,657856961,659830544,661810033,663795492,665786920,667784318,669787686,671797089,673812525,675833995,677861500,679895102,681934803,683980602,686032564,688090688,690154974,692225423,694302098,696385000,698474193,700569613,702671323,704779324,706893680,709014391,711141458,713274879,715414719,717560979,719713657,721872820,724038465,726210594,728389271,730574431,732766138,734964457,737169388,739380931,741599086,743823916,746055423,748293605,750538528,752790127,755048530,757313673,759585620,761864372,764149993,766442482,768741839,771048065,773361224,775681315,778008404,780342425,782683443,785031522,787386663,789748864,792118127,794494515,796878028,799268666,801666494,804071512,806483719,808903180,811329894,813763926,816205212,818653816,821109802,823573170,826043920,828522053,831007631,833500656,836001191,838509237,841024793,843547859,846078501,848616781,851162636,853716129,856277326,858846161,861422700,864007006,866599015,869198855,871806462,874421901,877045172,879676337,882315399,884962356,887617273,890280150,892950987,895629847,898316732,901011705,903714766,906425915,909145216,911872670,914608277,917352099,920104203,922864523,925633124,928410070,931195297,933988933,936790914,939601304,942420103,945247376,948083121,950927405,953780226,956641584,959511544,962390106,965277270,968173099,971077659,973990885,976912905,979843655,982783199,985731538,988688735,991654790,994629769,997613670,1000606558,1003608368,1006619230,1009639078,1012668042,1015706057,1018753187,1021809497,1024874921,1027949590,1031033438,1034126529,1037228929,1040340636,1043461651,1046592038,1049731862,1052881057,1056039753,1059207885,1062385517,1065572714,1068769476,1071975802,1075191757,1078417405,1081652682,1084897716,1088152379,1091416799,1094691105,1097975168,1101269116,1104572950,1107886669,1111210403,1114544022,1117887655,1121241302,1124605091,1127978894,1131362840,1134756928,1138161158,1141575659,1145000430,1148435473,1151880786,1155336498,1158802481,1162278863,1165765773,1169263081,1172770917,1176289281,1179818172,1183357591,1186907665,1190468395,1194039782,1197621952,1201214907,1204818517,1208433040,1212058348
+
+//Base - Expanded Super Novice , Kagerou/Oboro , Rebellion
+160,4190:4191:4211:4212:4215,0,420,660,1080,1800,2640,3840,4560,5040,5460,6000,6600,7200,7320,7620,8040,8820,9600,10080,10560,11040,12610,13390,14300,15340,16900,18460,19500,20800,22100,23400,24700,26000,27300,28600,30160,31200,33800,35750,37700,39000,44100,46200,47600,50400,52500,53200,56000,58800,62300,65800,68600,71400,74200,77000,79800,82600,86100,88200,91000,93800,103500,105000,109500,115500,120000,126000,132000,136500,142500,165000,192000,210000,232500,244500,255000,270000,282000,292500,300000,345000,416000,480000,560000,640000,768000,880000,960000,1088000,1200000,1440000,1700000,2040000,2550000,3060000,3570000,4080000,4760000,5610000,6800000,7070000,7400000,7770000,8150000,8550000,9100000,9610000,10150000,10570000,11180000,12000000,12200000,12930000,13150000,14030000,14420000,15420000,15670000,16870000,17140000,18720000,19020000,20590000,20930000,22690000,23310000,25290000,26020000,27860000,28535000,30990000,31680000,33560000,34942000,36372000,38350000,39890000,41545000,43330000,45400000,48100000,50410000,53370000,56250000,59230000,62590000,66120000,70200000,75330000,81100000,95000000,98000000,103000000,107000000,112000000,116000000,121000000,125000000,130000000,134000000,139000000,145000000,152200000,160840000,171200000,191930000,202290000,214720000,229640000,247550000,283370000,301280000,322770000,348560000,379500000,441390000,102694708,103002790,103311802,103621737,103932603,104244399,104557135,104870809,105185422,105500982,105817489,106134942,106453351,106772714,107093032,107414313,107736557,108059771,108383949,108709106,109035233,109362339,109690425,110019497,110349556,110680602,111012644,111345680,111679719,112014761,112350806,112687862,113025929,113365008,113705105,114046221,114388365,114731535,115075733,115420965,115767233,116114536,116462882,116812271,117162711,117514202,117866745,118220346,118575007,118930735,119287530,119645393,120004330,120364343,120725439,121087618,121450881,121815235,122180680,122547224,122914868,123283611,123653461,124024426,124396499,124769688,125143999,125519434,125895992,126273682,126652503,127032464,127413564,127795811,128179198,128563740,128949437,129336291,129724299,130113471,130503815,130895330,131288016,131681882,132076928,132473161,132870582,133269198,133669010,134070017,134472228,134875643,135280277,135686115,136093173,136501450,136910963,137321695,137733663,138146867,138561307,138976998,139393925,139812104,140231535,140652233,141074199,141497417,141921919,142347688,142774726,143203047,143632652,144063556,144495745,144929234,145364022,145800111,146237515,146676235,147116271,147557623,148000291,148444291,148889623,149336287,149784299,150233660,150684368,151136424,151589828,152044596,152500728,152958241,153417117,153877374,154339011,154802028,155266441,155732250,156199456,156668057,157138071,157609481,158082319,158556570,159032249,159509356,159987891,160467855,160949262,161432115,161916411,162402168,162889385,163378063,163868201,164359816,164852890,165347458,165843501,166341037,166840066,167340587,167842617,168346155,168851202,169357757,169865836,170375441,170886569,171399239,171913433,172429183,172946475,173465323,173985727,174507688,175031206,175556297,176082976,176611228,177141069,177672498,178205517,178740140,179276368,179814200,180353654,180894712,181437407,181981724,182527677,183075266,183624493,184175373,184727905,185282091,185837946,186395469,186954662,187515523,188078070,188642302,189208234,189775868,190345203,190916239,191488992,192063462,192639650,193217570,193797224,194378611,194961747,195546633,196133284,196721683,197311849,197903795,198497507,199093000,199690275,200289347,200890216,201492882,202097362,202703656,203311763,203921699,204533465,205147076,205762517,206379803,206998951,207619945,208242816,208867548,209494159,210122646,210753012,211385271,212019424,212655486,213293458,213933340,214575148,215218881,215864541,216512142,217161684,217813169,218466612,219122012,219779386,220438734,221100056,221763368,222428654,223095946,223765244,224436548,225109858,225785190,226462544,227141936,227823366,228506834,229192357,229879933,230569580,231261297,231955084,232650958,233348917,234048963,234751111,235455362,236161731,236870218,237580839,238293579,239008469,239725494,240444669,241166011,241889519,242615193,243343050,244073090,244805312,245539733,246276352,247015186,247756234,248499513,249245023,249992764,250742751,251494985,252249482,253006241,253765264,254526565,255290145,256056019,256824189,257594669,258367461,259142563,259919993,260699765,261481864,262266307,263053108,263842268,264633804,265427714,266224000,267022677,267823745,268627220,269433119,270241425,271052169,271865322,272680913,273498976,274319478,275142452,275967897,276795813,277626201,278459092,279294487,280132385,280972787,281815724,282661165,283509141,284359685,285212765,286068412,286926627,287787409,288650792,289516742,290385292,291256441,292130223,293006604,293885617,294767295,295651604,296538577,297428213,298320514,299215479,300113140,301013497,301916550,302822299,303730777,304641982,305555916,306472578,307392000,308314182,309239124,310166859,311097355,312030642,312966754,313905658,314847387,315791940,316739318,317689552,318642611,319598558,320557362,321519054,322483603,323451073,324421432,325394711,326370910,327350031,328332072,329317067,330305014,331295946,332289830,333286700,334286555,335289426,336295315,337304221,338316143,339331083,340349072,341370110,342394229,343421429,344451711,345485074,346521550,347561107,348603810,349649626,350698588,351750695,352805947,353864377,354925984,355990769,357058763,358129935,359204317,360281940,361362805,362446912,363534260,364624882,365718778,366815948,367916391,369020140,370127196,371237589,372351320,373468389,374588796,375712574,376839721,377970239,379104158,380241480,381382204,382526362,383673955,384824981,385979475,387137434,388298860,389463752,390632143,391804032,392979452,394158402,395340883,396526926,397716501,398909669,400106401,401306727,402510648,403718196,404929371,406144172,407362601,408584688,409810466,411039903,412273032,413509851,414750394,415994659,417242648,418494392,419749891,421009146,422272188,423539017,424809633,426084069,427362325,428644431,429930358,431220168,432513829,433811374,435112803,436418147,437727407,439040583,440357706,441678778,443003829,444332860,445665871,447002862,448343865,449688913,451038004,452391139,453748318,455109574,456474906,457844346,459217894,460595551,461977348,463363285,464753395,466147677,467546132,468948792,470355656,471766724,473182030,474601571,476025382,477453462,478885842,480322523,481763505,483208820,484658468,486112449,487570795,489033506,490500614,491972120,493448054,494928418,496413211,497902466,499396181,500894391,502397093,503904289,505416011,506932258,508453063,509978425,511508377,513042919,514582051,516125804,517674180,519227209,520784892,522347261,523914316,525486057,527062517,528643726,530229654,531820364,533415824,535016066,536621123,538230994,539845680,541465244,543089623,544718880,546353015,547992094,549636051,551284951,552938794,554597644,556261436,557930235,559604042,561282855,562966740,564655631,566349594,568048628,569752797,571462038,573176414,574895925,576620635,578350481,580085527,581825772,583571281,585321990,587077962,588839198,590605697,592377525,594154681,595937164,597724975,599518179,601316775,603120763,604930142,606744915,608565143,610390828,612222033,614058694,615900876,617748579,619601866,621460674,623325067,625195044,627070670,628951881,630838740,632731249,634629471,636533341,638442925,640358286,642279360,644206211,646138840,648077246,650021493,651971582,653927512,655889284,657856961,659830544,661810033,663795492,665786920,667784318,669787686,671797089,673812525,675833995,677861500,679895102,681934803,683980602,686032564,688090688,690154974,692225423,694302098,696385000,698474193,700569613,702671323,704779324,706893680,709014391,711141458,713274879,715414719,717560979,719713657,721872820,724038465,726210594,728389271,730574431,732766138,734964457,737169388,739380931,741599086,743823916,746055423,748293605,750538528,752790127,755048530,757313673,759585620,761864372,764149993,766442482,768741839,771048065,773361224,775681315,778008404,780342425,782683443,785031522,787386663,789748864,792118127,794494515,796878028,799268666,801666494,804071512,806483719,808903180,811329894,813763926,816205212,818653816,821109802,823573170,826043920,828522053,831007631,833500656,836001191,838509237,841024793,843547859,846078501,848616781,851162636,853716129,856277326,858846161,861422700,864007006,866599015,869198855,871806462,874421901,877045172,879676337,882315399,884962356,887617273,890280150,892950987,895629847,898316732,901011705,903714766,906425915,909145216,911872670,914608277,917352099,920104203,922864523,925633124,928410070,931195297,933988933,936790914,939601304,942420103,945247376,948083121,950927405,953780226,956641584,959511544,962390106,965277270,968173099,971077659,973990885,976912905,979843655,982783199,985731538,988688735,991654790,994629769,997613670,1000606558,1003608368,1006619230,1009639078,1012668042,1015706057,1018753187,1021809497,1024874921,1027949590,1031033438,1034126529,1037228929,1040340636,1043461651,1046592038,1049731862,1052881057,1056039753,1059207885,1062385517,1065572714,1068769476,1071975802,1075191757,1078417405,1081652682,1084897716,1088152379,1091416799,1094691105,1097975168,1101269116,1104572950,1107886669,1111210403,1114544022,1117887655,1121241302,1124605091,1127978894,1131362840,1134756928,1138161158,1141575659,1145000430,1148435473,1151880786,1155336498,1158802481,1162278863,1165765773,1169263081,1172770917,1176289281,1179818172,1183357591,1186907665,1190468395,1194039782,1197621952,1201214907,1204818517,1208433040,1212058348
//Job - Novice & Baby Novice
10,0:4023,1,4,10,18,28,40,91,151,205,268,340
@@ -34,8 +37,11 @@
//Job - Adv Second Classes
70,4008:4009:4010:4011:4012:4013:4014:4015:4016:4017:4018:4019:4020:4021:4022,1,2400,3800,6200,10400,15200,22900,27100,30000,32500,35700,41300,45000,45800,47600,50300,58700,63900,67100,70300,73500,90600,96200,102700,110200,121400,144700,152900,163100,173300,183500,213500,224700,236000,247200,260700,299800,324800,343600,362300,374800,474400,497000,512100,542200,564800,644300,678200,712100,754500,796900,949300,988100,1026800,1065600,1104300,1334800,1391400,1425300,1470600,1515800,2003800,2032800,2119900,2236100,2323200,3025300,3433300,3776600,4436900,6758400,6893567,7031438,7172066,7315507,7461817,7611053,7763273,7918538,8076908,8238446,8403214,8571278,8742703,8917556,9095906,9277823,9463379,9652646,9845698,10042611,10243463,10448332,10657298,10870443,11087851,11309607,11535798,11766513,12001843,12241879,12486716,12736450,12991178,13251001,13516020,13786340,14062066,14343307,14630172,14922775,15221230,15525654,15836166,16152889,16475946,16805464,17141572,17484403,17834091,18190773,18554587,18925679,19304193,19690275,20084081,20485761,20895474,21313383,21739651,22174444,22617932,23070290,23531695,24002329,24482374,24972021,25471459,25980888,26500505,27030513,27571121,28122541,28684990,29258689,29843861,30440736,31049550,31670540,32303950,32950028,33609027,34281207,34966831,35666167,36379490,37107077,37849216,38606199,39378323,40165889,40969204,41788587,42624358,43476846,44346384,45233310,46137977,47060734,48001949,48961986,49941222,50940047,51958847,52998023,54057983,55139142,56241925,57366761,58514094,59684376,60878062,62095624,63337535,64604285,65896368,67214294,68558580,69929746,71328337,72754901,74210000,75694198,77208082,78752240,80327283,81933824,83572498,85243944,86948821,88687798,90461554,92270781,94116197,95998522,97918488,99876855,101874391,103911877,105990115,108109912,110272108,112477552,114727100,117021643,119362070,121749311,124184295,126667979,129201333,131785360,134421064,137109474,139851658,142648694,145501659,148411694,151379927,154407515,157495667,160645574,163858476,167135646,170478357,173887915,177365675,180912990,184531248,188221869,191986305,195826026,199742548,203737391,207812135,211968366,216207731,220531878,224942505,229441357,234030182,238710775,243484978,248354670,253321760,258388190,263555950
-//Job - 3rd Jobs, Baby 3rds, Expanded Super Novice, and Kagerou/Oboro
-50,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112:4190:4191:4211:4212:4215,1,106000,112000,355000,615000,917000,1253000,1595000,2007000,2430000,2868000,3420000,3863000,4504000,4998000,5769000,6321000,7254000,7870000,9015000,9530000,11072000,11848000,13467000,14337000,16243000,17216000,19446000,20781000,23070000,24453000,27568000,29118000,31820000,34125000,37048000,40204000,42972000,45937000,49110000,52696000,57158000,61305000,67167000,72285000,77647000,83624000,91113000,98548000,107630000,119077000,120267768,121470444,122685151,123912002,125151118,126402630,127666657,128943321,130232751,131535078,132850429,134178935,135520724,136875925,138244677,139627117,141023389,142433624,143857966,145296546,146749508,148216997,149699160,151196158,152708120,154235207,155777550,157335326,158908679,160497757,162102736,163723761,165360996,167014600,168684736,170371581,172075298,173796047,175534006,177289338,179062235,180852860,182661390,184488004,186332878,188196207,190078168,191978955,193898747,195837737,197796119,199774071,201771802,203789524,205827413,207885680,209964534,212064171,214184815,216326662,218489920,220674817,222881562,225110381,227361485,229635100,231931452,234250768,236593273,238959210,241348805,243762285,246199908,248661900,251148520,253659994,256196597,258758555,261346143,263959602,266599193,269265189,271957833,274677399,277424179,280198431,283000413,285830417,288688733,291575620,294491369,297436270,300410615,303414727,306448864,309513349,312608474,315734561,318891902,322080819,325301637,328554645,331840199,335158590,338510174,341895274,345314213,348767346,352255030,355777587,359335372,362928710,366557987,370223560,373925783,377665046,381441702,385256109,389108653,392999722,396929705,400898989,404907961,408957043,413046622,417177086,421348854,425562348,429817955,434116127,438457285,442841848,447270270,451742970,456260401,460823015,465431233,470085539,474786386,479534259,484329610,489172891,494064620,499005249,503995295,509035244,514125579,519266818,524459479,529704077,535001099,540351093,545754609,551212165,556724276,562291525,567914429,573593570,579329530,585122825,590974038,596883750,602852608,608881128,614969957,621119677,627330870,633604182,639940195,646339620,652803038,659331031,665924311,672583524,679309381,686102463,692963482,699893083,706891979,713960880,721100498,728311477,735594595,742950563,750380090,757883889,765462735,773117339,780848477,788656925,796543457,804508915,812554009,820679516,828886275,837175126,845546847,854002276,862542318,871167751,879879413,888678209,897564981,906540633,915606005
+//Job - 3rd Jobs, Baby 3rds, Expanded Super Novice
+60,4054:4055:4056:4057:4058:4059:4060:4061:4062:4063:4064:4065:4066:4067:4068:4069:4070:4071:4072:4073:4074:4075:4076:4077:4078:4079:4080:4081:4082:4083:4084:4085:4086:4087:4096:4097:4098:4099:4100:4101:4102:4103:4104:4105:4106:4107:4108:4109:4110:4111:4112,1,106000,112000,355000,615000,917000,1253000,1595000,2007000,2430000,2868000,3420000,3863000,4504000,4998000,5769000,6321000,7254000,7870000,9015000,9530000,11072000,11848000,13467000,14337000,16243000,17216000,19446000,20781000,23070000,24453000,27568000,29118000,31820000,34125000,37048000,40204000,42972000,45937000,49110000,52696000,57158000,61305000,67167000,72285000,77647000,83624000,91113000,98548000,107630000,119077000,131668000,145518000,160753000,177511000,195944000,216220000,238523000,263056000,290042000,319726000,,134178935,135520724,136875925,138244677,139627117,141023389,142433624,143857966,145296546,146749508,148216997,149699160,151196158,152708120,154235207,155777550,157335326,158908679,160497757,162102736,163723761,165360996,167014600,168684736,170371581,172075298,173796047,175534006,177289338,179062235,180852860,182661390,184488004,186332878,188196207,190078168,191978955,193898747,195837737,197796119,199774071,201771802,203789524,205827413,207885680,209964534,212064171,214184815,216326662,218489920,220674817,222881562,225110381,227361485,229635100,231931452,234250768,236593273,238959210,241348805,243762285,246199908,248661900,251148520,253659994,256196597,258758555,261346143,263959602,266599193,269265189,271957833,274677399,277424179,280198431,283000413,285830417,288688733,291575620,294491369,297436270,300410615,303414727,306448864,309513349,312608474,315734561,318891902,322080819,325301637,328554645,331840199,335158590,338510174,341895274,345314213,348767346,352255030,355777587,359335372,362928710,366557987,370223560,373925783,377665046,381441702,385256109,389108653,392999722,396929705,400898989,404907961,408957043,413046622,417177086,421348854,425562348,429817955,434116127,438457285,442841848,447270270,451742970,456260401,460823015,465431233,470085539,474786386,479534259,484329610,489172891,494064620,499005249,503995295,509035244,514125579,519266818,524459479,529704077,535001099,540351093,545754609,551212165,556724276,562291525,567914429,573593570,579329530,585122825,590974038,596883750,602852608,608881128,614969957,621119677,627330870,633604182,639940195,646339620,652803038,659331031,665924311,672583524,679309381,686102463,692963482,699893083,706891979,713960880,721100498,728311477,735594595,742950563,750380090,757883889,765462735,773117339,780848477,788656925,796543457,804508915,812554009,820679516,828886275,837175126,845546847,854002276,862542318,871167751,879879413,888678209,897564981,906540633,915606005
+
+//Job - Expanded Super Novice , Kagerou/Oboro , Rebellion
+50,4190:4191:4211:4212:4215,1,106000,112000,355000,615000,917000,1253000,1595000,2007000,2430000,2868000,3420000,3863000,4504000,4998000,5769000,6321000,7254000,7870000,9015000,9530000,11072000,11848000,13467000,14337000,16243000,17216000,19446000,20781000,23070000,24453000,27568000,29118000,31820000,34125000,37048000,40204000,42972000,45937000,49110000,52696000,57158000,61305000,67167000,72285000,77647000,83624000,91113000,98548000,107630000,119077000,131668000,145518000,160753000,177511000,195944000,216220000,238523000,263056000,290042000,319726000,,134178935,135520724,136875925,138244677,139627117,141023389,142433624,143857966,145296546,146749508,148216997,149699160,151196158,152708120,154235207,155777550,157335326,158908679,160497757,162102736,163723761,165360996,167014600,168684736,170371581,172075298,173796047,175534006,177289338,179062235,180852860,182661390,184488004,186332878,188196207,190078168,191978955,193898747,195837737,197796119,199774071,201771802,203789524,205827413,207885680,209964534,212064171,214184815,216326662,218489920,220674817,222881562,225110381,227361485,229635100,231931452,234250768,236593273,238959210,241348805,243762285,246199908,248661900,251148520,253659994,256196597,258758555,261346143,263959602,266599193,269265189,271957833,274677399,277424179,280198431,283000413,285830417,288688733,291575620,294491369,297436270,300410615,303414727,306448864,309513349,312608474,315734561,318891902,322080819,325301637,328554645,331840199,335158590,338510174,341895274,345314213,348767346,352255030,355777587,359335372,362928710,366557987,370223560,373925783,377665046,381441702,385256109,389108653,392999722,396929705,400898989,404907961,408957043,413046622,417177086,421348854,425562348,429817955,434116127,438457285,442841848,447270270,451742970,456260401,460823015,465431233,470085539,474786386,479534259,484329610,489172891,494064620,499005249,503995295,509035244,514125579,519266818,524459479,529704077,535001099,540351093,545754609,551212165,556724276,562291525,567914429,573593570,579329530,585122825,590974038,596883750,602852608,608881128,614969957,621119677,627330870,633604182,639940195,646339620,652803038,659331031,665924311,672583524,679309381,686102463,692963482,699893083,706891979,713960880,721100498,728311477,735594595,742950563,750380090,757883889,765462735,773117339,780848477,788656925,796543457,804508915,812554009,820679516,828886275,837175126,845546847,854002276,862542318,871167751,879879413,888678209,897564981,906540633,915606005
//Job - Ninja/Gunslinger
70,24:25,1,100,200,300,400,600,700,1000,1200,1400,1700,1900,2400,2700,3200,3600,4200,4900,5500,6100,6900,7700,8400,9300,10100,11100,12100,13000,14600,16100,17500,18600,21500,23300,24700,27000,29000,30000,32400,35000,38100,41100,44000,46700,49600,52500,55600,58900,62700,65500,69200,72300,81200,84100,89300,95500,100900,107800,114900,120700,128600,150500,176900,196100,219600,234200,247900,266400,281300,296600,308000,311079,314189,317330,320503,323708,326945,330214,333516,336851,340219,343621,347057,350527,354032,357572,361147,364758,368405,372089,375809,379567,383362,387195,391066,394976,398925,402914,406943,411012,415122,419273,423465,427699,431975,436294,440656,445062,449512,454007,458547,463132,467763,472440,477164,481935,486754,491621,496537,501502,506517,511582,516697,521863,527081,532351,537674,543050,548480,553964,559503,565098,570748,576455,582219,588041,593921,599860,605858,611916,618035,624215,630457,636761,643128,649559,656054,662614,669240,675932,682691,689517,696412,703376,710409,717513,724688,731934,739253,746645,754111,761652,769268,776960,784729,792576,800501,808506,816591,824756,833003,841333,849746,858243,866825,875493,884247,893089,902019,911039,920149,929350,938643,948029,957509,967084,976754,996289,1016214,1036538,1057268,1078413,1099981,1121980,1144419,1167307,1190653,1214466,1238755,1263530,1288800,1314575,1340866,1367683,1395036,1422936,1451394,1480421,1510029,1540229,1571033,1602453,1634502,1667192,1700535,1734545,1769235,1804619,1840711,1877525,1915075,1953376,1992443,2032291,2072936,2114394,2156681,2199814,2243810,2288686,2334459,2381148,2428770,2477345,2526891,2577428,2628976,2681555,2735186,2789889,2845686,2902599,2960650,3019862,3080259,3141864,3204701,3268794,3334169,3400852,3468868,3538245,3609009,3681189,3754812,3829908
@@ -43,8 +49,8 @@
//Job - Taekwon (Same EXP table as 1st Classes & Baby 1st Classes)
50,4046,1,60,130,260,460,780,1060,1300,1560,1910,2290,2680,2990,3340,3740,4360,4970,5530,6120,6700,8090,8920,9970,11080,12690,14440,15850,17400,19220,21060,22870,24910,26840,29080,31320,33300,37110,40500,43570,46180,53510,57200,60310,65690,70090,72130,77540,83320,90120,97180,99123,101105,103127,105189,107292,109437,111625,113857,116134,118456,120825,123241,125705,128219,130783,133398,136065,138786,141561,144392,147279,150224,153228,156292,159417,162605,165857,169174,172557,176008,179528,183118,186780,190515,194325,198211,202175,206218,210342,214548,218838,223214,227678,232231,236875,241612,246444,251372,256399,261526,266756,272091,277532,283082,288743,294517,300407,306415,312543,318793,325168,331671,338304,345070,351971,359010,366190,373513,380983,388602,396374,404301,412387,420634,429046,437626,446378,455305,464411,473699,483172,492835,502691,512744,522998,533457,544126,555008,566108,577430,588978,600757,612772,625027,637527,650277,663282,676547,690077,703878,717955,732314,746960,761899,777136,792678,808531,824701,841195,858018,875178,892681,910534,928744,947318,966264,985589,1005300,1025405,1045913,1066831,1088167,1109930,1132128,1154770,1177865,1201422,1225450,1249958,1274957,1300456,1326465,1352994,1380053,1407654,1435807,1464523,1493813,1523689,1554162,1585245,1616949,1649287,1682272,1715917,1750235,1785239,1820943,1857361,1894508,1932398,1971045,2010465,2050674,2091687,2133520,2176190,2219713,2264107,2309389,2355576,2402687,2450740,2499754,2549749,2600743,2652757,2705812,2759928,2815126,2871428,2928856,2987433,3047181,3108124,3170286,3233691,3298364,3364331,3431617,3500249,3570253,3641657,3714490,3788779,3864554,3941845,4020681,4101094,4183115,4266777,4352112,4439154,4527936,4618494,4710863,4805080,4901181,4999204,5099187,5201170,5305193,5411296,5519521,5629911
-//Job - Star Gladiator (Still pre-renewal values -> Needs info)
-50,4047:4048,1,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,27434,54868,70216,77154,84412,105416,133924,165376,179008,193338,235642,289842,348402,373354,399168,477234,572732,674294,716870,760752,895370,1053978,1220492,1289472,1587070,1843620,2213516,2521910,2974608,3115314,3981264,5166772,5218439,5270623,5323329,5376562,5430327,5484630,5539476,5594870,5650818,5707326,5764399,5822042,5880262,5939064,5998454,6058438,6119022,6180212,6242014,6304434,6367478,6431152,6495463,6560417,6626021,6692281,6759203,6826794,6895061,6964011,7033651,7103987,7175026,7246776,7319243,7392435,7466359,7541022,7616432,7692596,7769521,7847216,7925688,8004944,8084993,8165842,8247500,8329974,8413273,8497405,8582378,8668201,8754882,8842430,8930854,9020162,9110363,9201466,9293480,9386414,9480278,9575080,9670830,9767538,9865213,9963865,10063503,10164137,10265778,10368435,10472119,10576840,10682608,10789433,10897327,11006300,11116362,11227525,11339800,11453197,11567728,11683405,11800238,11918240,12037422,12157796,12279373,12402166,12526187,12651448,12777962,12905741,13034798,13165145,13296796,13429763,13564060,13699700,13836696,13975062,14114812,14255959,14398518,14542503,14687927,14834806,14983153,15132984,15284313,15437155,15591526,15747441,15904915,16063963,16224602,16386847,16550715,16716221,16883383,17052217,17222737,17394963,17568913,17744600,17922045,18101264,18282276,18465098,18649748,18836245,19024606,19214851,19407000,19601069,19797078,19995048,20194998,20396947,20600917,20806924,21014993,21225141,21437391,21651765,21868281,22086962,22307831,22530910,22756218,22983779,23213617,23445751,23680209,23917009,24156177,24397737,24641713,24888128,25137009,25388377,25642259,25898682,26157668,26419244,26683436,26950270,27219772,27491969,27766887,28044556,28325001,28608249,28894330,29183273,29475104,29769854,30067552,30368227,30671909,30978626,31288411,31601295,31917308,32236480,32558844,32884432,33213276,33545408,33880861,34219668,34561864,34907482,35256554,35609117,35965206,36324859,36688108,37054988,37425537,37799791,38177789,38559565,38945159,39334611,39727957
+//Job - Star Gladiator
+50,4047:4048,1,50700,50700,50700,50700,50700,50700,50700,50700,50700,50700,50700,50700,50700,50700,50700,50700,50700,50700,50700,101400,112000,118800,127000,136200,150000,171400,181000,193200,205200,217200,239400,252000,264600,277200,292200,315000,341200,360800,380600,393600,429800,450400,464000,491400,511800,558600,588000,617400,654000,690800,5270623,5323329,5376562,5430327,5484630,5539476,5594870,5650818,5707326,5764399,5822042,5880262,5939064,5998454,6058438,6119022,6180212,6242014,6304434,6367478,6431152,6495463,6560417,6626021,6692281,6759203,6826794,6895061,6964011,7033651,7103987,7175026,7246776,7319243,7392435,7466359,7541022,7616432,7692596,7769521,7847216,7925688,8004944,8084993,8165842,8247500,8329974,8413273,8497405,8582378,8668201,8754882,8842430,8930854,9020162,9110363,9201466,9293480,9386414,9480278,9575080,9670830,9767538,9865213,9963865,10063503,10164137,10265778,10368435,10472119,10576840,10682608,10789433,10897327,11006300,11116362,11227525,11339800,11453197,11567728,11683405,11800238,11918240,12037422,12157796,12279373,12402166,12526187,12651448,12777962,12905741,13034798,13165145,13296796,13429763,13564060,13699700,13836696,13975062,14114812,14255959,14398518,14542503,14687927,14834806,14983153,15132984,15284313,15437155,15591526,15747441,15904915,16063963,16224602,16386847,16550715,16716221,16883383,17052217,17222737,17394963,17568913,17744600,17922045,18101264,18282276,18465098,18649748,18836245,19024606,19214851,19407000,19601069,19797078,19995048,20194998,20396947,20600917,20806924,21014993,21225141,21437391,21651765,21868281,22086962,22307831,22530910,22756218,22983779,23213617,23445751,23680209,23917009,24156177,24397737,24641713,24888128,25137009,25388377,25642259,25898682,26157668,26419244,26683436,26950270,27219772,27491969,27766887,28044556,28325001,28608249,28894330,29183273,29475104,29769854,30067552,30368227,30671909,30978626,31288411,31601295,31917308,32236480,32558844,32884432,33213276,33545408,33880861,34219668,34561864,34907482,35256554,35609117,35965206,36324859,36688108,37054988,37425537,37799791,38177789,38559565,38945159,39334611,39727957
//Job - Soul Linker (Same EXP table as 2nd Classes & Baby 2nd Classes)
50,4049,1,2500,4200,7000,10300,15900,18900,20900,22600,24900,28800,31500,32000,33300,35100,40500,44100,46300,48500,50700,56000,59400,63500,68100,75000,85700,90500,96600,102600,108600,119700,126000,132300,138600,146100,157500,170600,180400,190300,196800,214900,225200,232000,245700,255900,279300,294000,308700,327000,345400,355761,366433,377425,388747,400409,412421,424793,437536,450662,464181,478106,492449,507222,522438,538111,554254,570881,588007,605647,623816,642530,661805,681659,702108,723171,744866,767211,790227,813933,838350,863500,889404,916086,943568,971875,1001031,1031061,1061992,1093851,1126666,1160465,1195278,1231136,1268070,1306112,1345295,1385653,1427222,1470038,1514139,1559563,1606349,1654539,1704175,1755300,1807958,1862196,1918061,1975602,2034870,2095916,2158793,2223556,2290262,2358969,2429738,2502630,2577708,2655039,2734690,2816730,2901231,2988267,3077914,3170251,3265358,3363318,3464217,3568143,3675187,3785442,3899005,4015975,4136454,4260547,4388363,4520013,4655613,4795281,4939139,5087313,5239932,5397129,5559042,5725813,5897587,6074514,6256749,6444451,6637784,6836917,7042024,7253284,7470882,7695008,7925858,8163633,8408541,8660796,8920619,9188237,9463883,9747799,10040232,10341438,10651680,10758196,10865777,10974434,11084178,11195019,11306969,11420038,11534238,11649580,11766075,11883735,12002572,12122597,12243822,12366260,12489922,12614821,12740969,12868378,12997061,13127031,13258301,13390883,13524791,13660038,13796638,13934604,14073949,14214688,14356834,14500402,14645405,14791858,14939776,15089173,15240064,15392464,15546388,15701851,15858869,16017457,16177631,16339407,16502800,16667827,16834505,17002848,17172876,17344604,17518049,17693228,17870160,18048861,18229348,18411641,18595756,18781713,18969528,19159223,19350816,19544323,19739767,19937165,20136535,20337901,20541278,20746690,20954156,21163697,21375332,21589085,21804974,22023023,22243254,22465686,22690342,22917245,23146416,23377879,23611658,23847774,24086251,24327114,24570384,24816087,25064248,25314890,25568038,25823718
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 229deb776..cedda9b2a 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -461,6 +461,7 @@ item_db: (
Buy: 10
Weight: 10
Upper: 63
+ Script: <" itemheal rand(325,405),0; ">
},
{
Id: 543
@@ -470,6 +471,7 @@ item_db: (
Buy: 10
Weight: 10
Upper: 63
+ Script: <" itemheal rand(325,405),0; ">
},
{
Id: 544
@@ -65132,7 +65134,7 @@ item_db: (
Buy: 20
Weight: 50
Upper: 63
- Script: <" itemheal rand(17,23),rand(16,20); ">
+ Script: <" itemheal rand(17,23),0; ">
},
{
Id: 11535
@@ -65262,7 +65264,7 @@ item_db: (
Buy: 0
Weight: 80
Upper: 63
- Script: <" itemheal rand(500,600),rand(60,80); ">
+ Script: <" itemheal rand(500,700),rand(60,85); ">
},
{
Id: 11548
@@ -65272,6 +65274,7 @@ item_db: (
Buy: 0
Weight: 80
Upper: 63
+ Script: <" percentheal 10,0; ">
},
{
Id: 11549
@@ -65281,6 +65284,7 @@ item_db: (
Buy: 0
Weight: 80
Upper: 63
+ Script: <" percentheal 0,10; ">
},
{
Id: 11550
@@ -65299,7 +65303,7 @@ item_db: (
Buy: 0
Weight: 10
Upper: 63
- Script: <" percentheal rand(20,30),0; ">
+ Script: <" itemheal rand(20,30),0; ">
},
{
Id: 11552
@@ -65309,7 +65313,7 @@ item_db: (
Buy: 0
Weight: 10
Upper: 63
- Script: <" percentheal rand(20,30),0; ">
+ Script: <" itemheal rand(20,30),0; ">
},
{
Id: 11553
@@ -65319,7 +65323,7 @@ item_db: (
Buy: 0
Weight: 10
Upper: 63
- Script: <" percentheal rand(20,30),0; ">
+ Script: <" itemheal rand(20,30),0; ">
},
{
Id: 11554
@@ -65329,7 +65333,7 @@ item_db: (
Buy: 0
Weight: 10
Upper: 63
- Script: <" percentheal rand(20,30),0; ">
+ Script: <" itemheal rand(20,30),0; ">
},
{
Id: 11701
diff --git a/db/re/statpoint.txt b/db/re/statpoint.txt
index 71d0e5506..5b2329983 100644
--- a/db/re/statpoint.txt
+++ b/db/re/statpoint.txt
@@ -154,25 +154,25 @@
2657
2685
2713
-2743
-2769
-2797
-2825
-2854
-2883
-2912
-2941
-2970
-2999
-3028
-3057
-3086
-3115
-3145
-3175
-3205
-3235
-3265
+2741
+2770
+2799
+2828
+2857
+2886
+2915
+2944
+2974
+3004
+3034
+3064
+3094
+3124
+3154
+3185
+3216
+3247
+3278
3295
3325
3355
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 1fd3c47a6..e8069cb0b 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -243,9 +243,11 @@ and to make it look southeast it's facing 5.)
Sprite id is the sprite number used to display this particular NPC. For a
full list of sprite id numbers see http://kalen.s79.xrea.com/npc/npce.shtml
You may also use a monster's ID number instead to display a monster sprite
-for this NPC. It is possible to use a job sprite as well, but you must
-first define it as a monster sprite in 'mob_avail.txt', a full description
-on how to do this is not in the scope of this manual.
+for this NPC, in npcs that have view ids of mobs it's encouraged to use
+OnTouch events with a 2,2 range and with an 'end' after the header to avoid
+bugs (for more info on why see npc_click@map/npc.c). It is possible to use a job
+sprite as well, but you must first define it as a monster sprite in 'mob_avail.txt',
+a full description on how to do this is not in the scope of this manual.
A '-1' sprite id will make the NPC invisible (and unclickable).
A '111' sprite id will make an NPC which does not have a sprite, but is
still clickable, which is useful if you want to make a clickable object of
diff --git a/npc/re/quests/quests_brasilis.txt b/npc/re/quests/quests_brasilis.txt
index b6aa85ce9..33758fe9a 100644
--- a/npc/re/quests/quests_brasilis.txt
+++ b/npc/re/quests/quests_brasilis.txt
@@ -3,7 +3,7 @@
//===== By ===================================================
//= L0ne_W0lf
//===== Version ==============================================
-//= 1.2a
+//= 1.2c
//===== Description ==========================================
//= [Official Conversion]
//= Lost Puppies (Repeatable, 24 hours.)
@@ -18,6 +18,8 @@
//= 1.2 Optimization. [Euphy]
//= 1.2a Added 'consumeitem' command. [Euphy]
//= 1.2b Updated RE EXP. [Michieru]
+//= 1.2c Put end; before OnTouch events in npcs that
+//= have view id of a mob [Panikon]
//============================================================
// Lost Puppies :: dogdog.sc
@@ -862,6 +864,8 @@ brasilis,59,226,3 script Poring#bra 4_PORING,{
}
bra_fild01,75,83,5 script Toucan#bra TOUCAN,2,2,{
+end;
+
OnTouch:
if (brazil_gua == 6) {
mes "[Toucan]";
@@ -922,6 +926,8 @@ OnTouch:
}
bra_fild01,34,184,5 script Jaguar#bra JAGUAR,2,2,{
+end;
+
OnTouch_:
if (brazil_gua == 7) {
mes "[Jaguar]";
diff --git a/script-checker b/script-checker
index f4a277e2d..7be4bc51a 100755
--- a/script-checker
+++ b/script-checker
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
# See the LICENSE file
@@ -13,10 +13,18 @@ if [ -z "$1" ]; then
echo "No file specified."
echo "Usage: $0 <path to the script>"
echo " (you may use a relative or absolute path)"
- exit -1
+ exit 1
fi
+case "$1" in
+ /*)
+ FILE="$1"
+ ;;
+ *)
+ FILE="${ORIG_CWD}/$1"
+ ;;
+esac
if [ ! -x "$EXECUTABLE" ]; then
- exit -1
+ exit 1
fi
while [ -n "$1" ]; do
diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql
index 58362472a..842d22ee8 100644
--- a/sql-files/item_db_re.sql
+++ b/sql-files/item_db_re.sql
@@ -71,8 +71,8 @@ REPLACE INTO `item_db_re` VALUES ('538','Well_Baked_Cookie','Well-baked Cookie',
REPLACE INTO `item_db_re` VALUES ('539','Piece_Of_Cake','Piece of Cake','0','3000','1500','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(270,330),0;','','');
REPLACE INTO `item_db_re` VALUES ('540','Falcon\'s_Feed','Falcon Food','0','2000','1000','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(185,225),0;','','');
REPLACE INTO `item_db_re` VALUES ('541','Pecopeco\'s_Feed','PecoPeco Food','0','3000','1500','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(325,405),0;','','');
-REPLACE INTO `item_db_re` VALUES ('542','Festive_Cookie','Festive Cookie','0','10','5','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('543','Festive_Rainbow_Cake','Festive Rainbow Cake','0','10','5','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('542','Festive_Cookie','Festive Cookie','0','10','5','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(325,405),0;','','');
+REPLACE INTO `item_db_re` VALUES ('543','Festive_Rainbow_Cake','Festive Rainbow Cake','0','10','5','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(325,405),0;','','');
REPLACE INTO `item_db_re` VALUES ('544','Fish_Slice','Raw Fish','0','20','10','30','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(25,60),0;','','');
REPLACE INTO `item_db_re` VALUES ('545','Red_Slim_Potion','Condensed Red Potion','0','150','75','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(45,65),0;','','');
REPLACE INTO `item_db_re` VALUES ('546','Yellow_Slim_Potion','Condensed Yellow Potion','0','600','300','30','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(175,235),0;','','');
@@ -5249,7 +5249,7 @@ REPLACE INTO `item_db_re` VALUES ('11530','Jujube','Jujube','0','10','5','100','
REPLACE INTO `item_db_re` VALUES ('11531','Coffee','Coffee','0','10','5','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal 0,10;','','');
REPLACE INTO `item_db_re` VALUES ('11532','Nasi_Goreng','Nasi Goreng','0','15','7','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(17,23),0;','','');
REPLACE INTO `item_db_re` VALUES ('11533','Satay','Satay','0','15','7','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(17,23),0;','','');
-REPLACE INTO `item_db_re` VALUES ('11534','Coco_Juice','Coconut Juice','0','20','10','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(17,23),rand(16,20);','','');
+REPLACE INTO `item_db_re` VALUES ('11534','Coco_Juice','Coconut Juice','0','20','10','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(17,23),0;','','');
REPLACE INTO `item_db_re` VALUES ('11535','Almond_Chocolate','Almond Chocolate','0','190','95','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal 0,rand(8,16);','','');
REPLACE INTO `item_db_re` VALUES ('11536','Cat_Hard_Biscuit','Cat\'s Ship Biscuit','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(70,110),0;','','');
REPLACE INTO `item_db_re` VALUES ('11537','Rice_weevil_Bug','Weevil Bug Worm','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(100,150),0;','','');
@@ -5262,14 +5262,14 @@ REPLACE INTO `item_db_re` VALUES ('11543','Goedo_Choco','Handmade Chocolate','0'
REPLACE INTO `item_db_re` VALUES ('11544','Huike_Choco','Handmade Chocolate','0','1','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal 50,50;','','');
REPLACE INTO `item_db_re` VALUES ('11545','Rune_Choco','Handmade Chocolate','0','1','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal 50,50;','','');
REPLACE INTO `item_db_re` VALUES ('11546','Pope_Choco','Handmade Chocolate','0','1','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal 50,50;','','');
-REPLACE INTO `item_db_re` VALUES ('11547','Woe_Violet_Potion','WoE Violet Potion','0','0','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(500,600),rand(60,80);','','');
-REPLACE INTO `item_db_re` VALUES ('11548','Woe_White_Potion','WoE White Potion','0','0','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('11549','Woe_Blue_Potion','WoE Blue Potion','0','0','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('11547','Woe_Violet_Potion','WoE Violet Potion','0','0','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(500,700),rand(60,85);','','');
+REPLACE INTO `item_db_re` VALUES ('11548','Woe_White_Potion','WoE White Potion','0','0','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal 10,0;','','');
+REPLACE INTO `item_db_re` VALUES ('11549','Woe_Blue_Potion','WoE Blue Potion','0','0','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal 0,10;','','');
REPLACE INTO `item_db_re` VALUES ('11550','Pumpkin_Cake','Pumpkin Cake','0','10','5','40','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('11551','Savory_Herb_Salad','Aromatic Herb Seasoned','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal rand(20,30),0;','','');
-REPLACE INTO `item_db_re` VALUES ('11552','Apple_Carrot_Salad','Apple Carrot Salad','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal rand(20,30),0;','','');
-REPLACE INTO `item_db_re` VALUES ('11553','Casual_Stew','Anything Casserole','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal rand(20,30),0;','','');
-REPLACE INTO `item_db_re` VALUES ('11554','Golden_Roasted_Apple','92 Golden Apple','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal rand(20,30),0;','','');
+REPLACE INTO `item_db_re` VALUES ('11551','Savory_Herb_Salad','Aromatic Herb Seasoned','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(20,30),0;','','');
+REPLACE INTO `item_db_re` VALUES ('11552','Apple_Carrot_Salad','Apple Carrot Salad','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(20,30),0;','','');
+REPLACE INTO `item_db_re` VALUES ('11553','Casual_Stew','Anything Casserole','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(20,30),0;','','');
+REPLACE INTO `item_db_re` VALUES ('11554','Golden_Roasted_Apple','92 Golden Apple','0','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(20,30),0;','','');
REPLACE INTO `item_db_re` VALUES ('11701','Girl_Bunch_Of_Flower','Girl\'s Bouquet','0','20','10','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal rand(105,145),0;','','');
REPLACE INTO `item_db_re` VALUES ('11702','Moon_Cookie','Moon Cookie','0','0','0','300','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('11703','Mysterious_Blood','Mystery Blood','0','0','0','30','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemheal 0,rand(25,35);','','');
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index ab1e7c234..ecaad3602 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -1,9 +1,12 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
+SYSINFO_INC = $(COMMON_D)/sysinfo.inc
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
@@ -27,7 +30,7 @@ CHAR_H = char.h inter.h int_auction.h int_elemental.h int_guild.h int_homun.h \
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- CHAR_SERVER_SQL_DEPENDS=$(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ)
+ CHAR_SERVER_SQL_DEPENDS=$(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC)
else
CHAR_SERVER_SQL_DEPENDS=needs_mysql
endif
@@ -66,6 +69,10 @@ help:
Makefile: Makefile.in
@$(MAKE) -C ../.. src/char/Makefile
+$(SYSINFO_INC): $(CHAR_C) $(CHAR_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
diff --git a/src/char/char.c b/src/char/char.c
index a4bc9cef9..cf961fd93 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2419,71 +2419,82 @@ int parse_fromlogin(int fd) {
{
unsigned char buf[7];
+ int char_id[MAX_CHARS];
+ int class_[MAX_CHARS];
+ int guild_id[MAX_CHARS];
+ int num;
+ int i;
+ char* data;
+ struct auth_node* node;
+
int acc = RFIFOL(fd,2);
int sex = RFIFOB(fd,6);
+
RFIFOSKIP(fd,7);
- if( acc > 0 )
- {// TODO: Is this even possible?
- int char_id[MAX_CHARS];
- int class_[MAX_CHARS];
- int guild_id[MAX_CHARS];
- int num;
- int i;
- char* data;
+ // This should _never_ happen
+ if( acc <= 0 ) {
+ ShowError("Received invalid account id from login server! (aid: %d)\n", acc);
+ return 0;
+ }
- struct auth_node* node = (struct auth_node*)idb_get(auth_db, acc);
- if( node != NULL )
- node->sex = sex;
+ node = (struct auth_node*)idb_get(auth_db, acc);
+ if( node != NULL )
+ node->sex = sex;
- // get characters
- if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `char_id`,`class`,`guild_id` FROM `%s` WHERE `account_id` = '%d'", char_db, acc) )
- Sql_ShowDebug(sql_handle);
- for( i = 0; i < MAX_CHARS && SQL_SUCCESS == SQL->NextRow(sql_handle); ++i )
+ // get characters
+ if( SQL_ERROR == SQL->Query(sql_handle, "SELECT `char_id`,`class`,`guild_id` FROM `%s` WHERE `account_id` = '%d'", char_db, acc) )
+ Sql_ShowDebug(sql_handle);
+ for( i = 0; i < MAX_CHARS && SQL_SUCCESS == SQL->NextRow(sql_handle); ++i )
+ {
+ SQL->GetData(sql_handle, 0, &data, NULL); char_id[i] = atoi(data);
+ SQL->GetData(sql_handle, 1, &data, NULL); class_[i] = atoi(data);
+ SQL->GetData(sql_handle, 2, &data, NULL); guild_id[i] = atoi(data);
+ }
+ num = i;
+ for( i = 0; i < num; ++i )
+ {
+ if( class_[i] == JOB_BARD || class_[i] == JOB_DANCER ||
+ class_[i] == JOB_CLOWN || class_[i] == JOB_GYPSY ||
+ class_[i] == JOB_BABY_BARD || class_[i] == JOB_BABY_DANCER ||
+ class_[i] == JOB_MINSTREL || class_[i] == JOB_WANDERER ||
+ class_[i] == JOB_MINSTREL_T || class_[i] == JOB_WANDERER_T ||
+ class_[i] == JOB_BABY_MINSTREL || class_[i] == JOB_BABY_WANDERER ||
+ class_[i] == JOB_KAGEROU || class_[i] == JOB_OBORO )
{
- SQL->GetData(sql_handle, 0, &data, NULL); char_id[i] = atoi(data);
- SQL->GetData(sql_handle, 1, &data, NULL); class_[i] = atoi(data);
- SQL->GetData(sql_handle, 2, &data, NULL); guild_id[i] = atoi(data);
+ // job modification
+ if( class_[i] == JOB_BARD || class_[i] == JOB_DANCER )
+ class_[i] = (sex ? JOB_BARD : JOB_DANCER);
+ else if( class_[i] == JOB_CLOWN || class_[i] == JOB_GYPSY )
+ class_[i] = (sex ? JOB_CLOWN : JOB_GYPSY);
+ else if( class_[i] == JOB_BABY_BARD || class_[i] == JOB_BABY_DANCER )
+ class_[i] = (sex ? JOB_BABY_BARD : JOB_BABY_DANCER);
+ else if( class_[i] == JOB_MINSTREL || class_[i] == JOB_WANDERER )
+ class_[i] = (sex ? JOB_MINSTREL : JOB_WANDERER);
+ else if( class_[i] == JOB_MINSTREL_T || class_[i] == JOB_WANDERER_T )
+ class_[i] = (sex ? JOB_MINSTREL_T : JOB_WANDERER_T);
+ else if( class_[i] == JOB_BABY_MINSTREL || class_[i] == JOB_BABY_WANDERER )
+ class_[i] = (sex ? JOB_BABY_MINSTREL : JOB_BABY_WANDERER);
+ else if( class_[i] == JOB_KAGEROU || class_[i] == JOB_OBORO )
+ class_[i] = (sex ? JOB_KAGEROU : JOB_OBORO);
}
- num = i;
- for( i = 0; i < num; ++i )
- {
- if( class_[i] == JOB_BARD || class_[i] == JOB_DANCER ||
- class_[i] == JOB_CLOWN || class_[i] == JOB_GYPSY ||
- class_[i] == JOB_BABY_BARD || class_[i] == JOB_BABY_DANCER ||
- class_[i] == JOB_MINSTREL || class_[i] == JOB_WANDERER ||
- class_[i] == JOB_MINSTREL_T || class_[i] == JOB_WANDERER_T ||
- class_[i] == JOB_BABY_MINSTREL || class_[i] == JOB_BABY_WANDERER ||
- class_[i] == JOB_KAGEROU || class_[i] == JOB_OBORO )
- {
- // job modification
- if( class_[i] == JOB_BARD || class_[i] == JOB_DANCER )
- class_[i] = (sex ? JOB_BARD : JOB_DANCER);
- else if( class_[i] == JOB_CLOWN || class_[i] == JOB_GYPSY )
- class_[i] = (sex ? JOB_CLOWN : JOB_GYPSY);
- else if( class_[i] == JOB_BABY_BARD || class_[i] == JOB_BABY_DANCER )
- class_[i] = (sex ? JOB_BABY_BARD : JOB_BABY_DANCER);
- else if( class_[i] == JOB_MINSTREL || class_[i] == JOB_WANDERER )
- class_[i] = (sex ? JOB_MINSTREL : JOB_WANDERER);
- else if( class_[i] == JOB_MINSTREL_T || class_[i] == JOB_WANDERER_T )
- class_[i] = (sex ? JOB_MINSTREL_T : JOB_WANDERER_T);
- else if( class_[i] == JOB_BABY_MINSTREL || class_[i] == JOB_BABY_WANDERER )
- class_[i] = (sex ? JOB_BABY_MINSTREL : JOB_BABY_WANDERER);
- else if( class_[i] == JOB_KAGEROU || class_[i] == JOB_OBORO )
- class_[i] = (sex ? JOB_KAGEROU : JOB_OBORO);
- }
- if( SQL_ERROR == SQL->Query(sql_handle, "UPDATE `%s` SET `class`='%d', `weapon`='0', `shield`='0', `head_top`='0', `head_mid`='0', `head_bottom`='0' WHERE `char_id`='%d'", char_db, class_[i], char_id[i]) )
- Sql_ShowDebug(sql_handle);
+ if( SQL_ERROR == SQL->Query(sql_handle, "UPDATE `%s` SET `equip`='0' WHERE `char_id`='%d'", inventory_db, char_id[i]) )
+ Sql_ShowDebug(sql_handle);
- if( guild_id[i] )// If there is a guild, update the guild_member data [Skotlex]
- inter_guild_sex_changed(guild_id[i], acc, char_id[i], sex);
- }
- SQL->FreeResult(sql_handle);
+ if( SQL_ERROR == SQL->Query(sql_handle,
+ "UPDATE `%s` SET `class`='%d', `weapon`='0', `shield`='0', `head_top`='0', `head_mid`='0', "
+ "`head_bottom`='0' WHERE `char_id`='%d'",
+ char_db, class_[i], char_id[i]) )
+ Sql_ShowDebug(sql_handle);
- // disconnect player if online on char-server
- disconnect_player(acc);
+ if( guild_id[i] )// If there is a guild, update the guild_member data [Skotlex]
+ inter_guild_sex_changed(guild_id[i], acc, char_id[i], sex);
}
+ SQL->FreeResult(sql_handle);
+
+ // disconnect player if online on char-server
+ disconnect_player(acc);
// notify all mapservers about this change
WBUFW(buf,0) = 0x2b0d;
diff --git a/src/char/char.h b/src/char/char.h
index 372af91f7..2928929de 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -65,6 +65,8 @@ int mapif_sendallwos(int fd,unsigned char *buf,unsigned int len);
int mapif_send(int fd,unsigned char *buf,unsigned int len);
void mapif_on_parse_accinfo(int account_id,int u_fd, int aid, int castergroup, int map_fd);
+void disconnect_player(int account_id);
+
int char_married(int pl1,int pl2);
int char_child(int parent_id, int child_id);
int char_family(int pl1,int pl2,int pl3);
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 0313f2a41..966e61bb3 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -258,8 +258,9 @@ int mapif_parse_ItemBoundRetrieve_sub(int fd)
StringBuf buf;
SqlStmt* stmt;
struct item item;
- int j, i=0, s;
+ int j, i=0, s=0, bound_qt=0;
struct item items[MAX_INVENTORY];
+ unsigned int bound_item[MAX_INVENTORY] = {0};
int char_id = RFIFOL(fd,2);
int aid = RFIFOL(fd,6);
int guild_id = RFIFOW(fd,10);
@@ -313,6 +314,20 @@ int mapif_parse_ItemBoundRetrieve_sub(int fd)
StrBuf->AppendStr(&buf, " OR");
StrBuf->Printf(&buf, " `id`=%d",items[j].id);
+
+ if( items[j].bound && items[j].equip ) {
+ // Only the items that are also stored in `char` `equip`
+ if( items[j].equip&EQP_HAND_R
+ || items[j].equip&EQP_HAND_L
+ || items[j].equip&EQP_HEAD_TOP
+ || items[j].equip&EQP_HEAD_MID
+ || items[j].equip&EQP_HEAD_LOW
+ || items[j].equip&EQP_GARMENT
+ ) {
+ bound_item[bound_qt] = items[j].equip;
+ bound_qt++;
+ }
+ }
}
if( SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf))
@@ -324,19 +339,63 @@ int mapif_parse_ItemBoundRetrieve_sub(int fd)
return 1;
}
+ // Removes any view id that was set by an item that was removed
+ if( bound_qt ) {
+
+#define CHECK_REMOVE(var,mask,token) do { /* Verifies equip bitmasks (see item.equip) and handles the sql statement */ \
+ if ((var)&(mask)) { \
+ if ((var) != (mask) && s) StrBuf->AppendStr(&buf, ","); \
+ StrBuf->AppendStr(&buf,"`"#token"`='0'"); \
+ (var) &= ~(mask); \
+ s++; \
+ } \
+} while(0)
+
+ StrBuf->Clear(&buf);
+ StrBuf->Printf(&buf, "UPDATE `%s` SET ", char_db);
+ for( j = 0; j < bound_qt; j++ ) {
+ // Equips can be at more than one slot at the same time
+ CHECK_REMOVE(bound_item[j],EQP_HAND_R,weapon);
+ CHECK_REMOVE(bound_item[j],EQP_HAND_L,shield);
+ CHECK_REMOVE(bound_item[j],EQP_HEAD_TOP,head_top);
+ CHECK_REMOVE(bound_item[j],EQP_HEAD_MID,head_mid);
+ CHECK_REMOVE(bound_item[j],EQP_HEAD_LOW,head_bottom);
+ CHECK_REMOVE(bound_item[j],EQP_GARMENT,robe);
+ }
+ StrBuf->Printf(&buf, " WHERE `char_id`='%d'", char_id);
+
+ if( SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf))
+ || SQL_ERROR == SQL->StmtExecute(stmt) )
+ {
+ Sql_ShowDebug(sql_handle);
+ SQL->StmtFree(stmt);
+ StrBuf->Destroy(&buf);
+ return 1;
+ }
+#undef CHECK_REMOVE
+ }
+
//Now let's update the guild storage with those deleted items
+ /// TODO/FIXME:
+ /// This approach is basically the same as the one from memitemdata_to_sql, but
+ /// the latter compares current database values and this is not needed in this case
+ /// maybe sometime separate memitemdata_to_sql into different methods in order to use
+ /// call that function here as well [Panikon]
StrBuf->Clear(&buf);
- StrBuf->Printf(&buf, "INSERT INTO `%s` (`guild_id`, `nameid`, `amount`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`", guild_storage_db);
- for( j = 0; j < MAX_SLOTS; ++j )
- StrBuf->Printf(&buf, ", `card%d`", j);
- StrBuf->AppendStr(&buf, ") VALUES ");
-
+ StrBuf->Printf(&buf,"INSERT INTO `%s` (`guild_id`,`nameid`,`amount`,`equip`,`identify`,`refine`,"
+ "`attribute`,`expire_time`,`bound`,`unique_id`",
+ guild_storage_db);
+ for( s = 0; s < MAX_SLOTS; ++s )
+ StrBuf->Printf(&buf, ", `card%d`", s);
+ StrBuf->AppendStr(&buf," ) VALUES ");
+
for( j = 0; j < i; ++j ) {
if( j )
StrBuf->AppendStr(&buf, ",");
- StrBuf->Printf(&buf, "('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d'",
- guild_id, items[j].nameid, items[j].amount, items[j].identify, items[j].refine, items[j].attribute, items[j].expire_time, items[j].bound, items[j].unique_id);
+ StrBuf->Printf(&buf, "('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d'",
+ guild_id, items[j].nameid, items[j].amount, items[j].equip, items[j].identify, items[j].refine,
+ items[j].attribute, items[j].expire_time, items[j].bound, items[j].unique_id);
for( s = 0; s < MAX_SLOTS; ++s )
StrBuf->Printf(&buf, ", '%d'", items[j].card[s]);
StrBuf->AppendStr(&buf, ")");
@@ -356,6 +415,9 @@ int mapif_parse_ItemBoundRetrieve_sub(int fd)
//Finally reload storage and tell map we're done
mapif_load_guild_storage(fd,aid,guild_id,0);
+
+ // If character is logged in char, disconnect
+ disconnect_player(aid);
#endif
return 0;
}
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 971eb83bd..9ffce87de 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -13,6 +13,7 @@
#include "../common/console.h"
#include "../common/strlib.h"
#include "../common/sql.h"
+#include "../common/sysinfo.h"
#include "HPM.h"
#include <stdio.h>
@@ -703,8 +704,6 @@ void hplugins_share_defaults(void) {
HPM->share(&arg_c,"arg_c");
HPM->share(SERVER_NAME,"SERVER_NAME");
HPM->share(&SERVER_TYPE,"SERVER_TYPE");
- HPM->share((void*)get_svn_revision,"get_svn_revision");
- HPM->share((void*)get_git_hash,"get_git_hash");
HPM->share(DB, "DB");
HPM->share(HPMiMalloc, "iMalloc");
/* socket */
@@ -719,6 +718,8 @@ void hplugins_share_defaults(void) {
HPM->share(timer,"timer");
/* libconfig */
HPM->share(libconfig,"libconfig");
+ /* sysinfo */
+ HPM->share(sysinfo,"sysinfo");
}
void hpm_init(void) {
diff --git a/src/common/HPM.h b/src/common/HPM.h
index b466cb4f3..0f0df4cda 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -1,7 +1,7 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _COMMON_HPM_H_
+#ifndef _COMMON_HPM_H_
#define _COMMON_HPM_H_
#include "../common/cbasetypes.h"
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 6eef028b2..f202ac306 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -51,6 +51,11 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define _COMMON_STRLIB_H_
#endif // _COMMON_STRLIB_H_
+ #ifdef _COMMON_SYSINFO_H_
+ { "sysinfo_interface", sizeof(struct sysinfo_interface) },
+ #else
+ #define _COMMON_SYSINFO_H_
+ #endif // _COMMON_SYSINFO_H_
#ifdef _MAP_ATCOMMAND_H_
{ "AliasInfo", sizeof(struct AliasInfo) },
{ "atcommand_interface", sizeof(struct atcommand_interface) },
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 95037fd14..19206aeca 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -1,7 +1,7 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _COMMON_HPMI_H_
+#ifndef _COMMON_HPMI_H_
#define _COMMON_HPMI_H_
#include "../common/cbasetypes.h"
@@ -67,13 +67,13 @@ enum hp_event_types {
};
enum HPluginPacketHookingPoints {
- hpClif_Parse, /* map-server (client-map) */
- hpChrif_Parse, /* map-server (char-map) */
- hpParse_FromMap, /* char-server (map-char) */
- hpParse_FromLogin, /* char-server (login-char) */
- hpParse_Char, /* char-server (client-char) */
- hpParse_FromChar, /* login-server (char-login) */
- hpParse_Login, /* login-server (client-login) */
+ hpClif_Parse, ///< map-server (client-map)
+ hpChrif_Parse, ///< map-server (char-map)
+ hpParse_FromMap, ///< char-server (map-char)
+ hpParse_FromLogin, ///< char-server (login-char)
+ hpParse_Char, ///< char-server (client-char)
+ hpParse_FromChar, ///< login-server (char-login)
+ hpParse_Login, ///< login-server (client-login)
/* */
hpPHP_MAX,
};
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index 7bb9ae630..623c59c2e 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -1,3 +1,5 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
@@ -15,8 +17,8 @@ MT19937AR_H = $(MT19937AR_D)/mt19937ar.h
MT19937AR_INCLUDE = -I$(MT19937AR_D)
COMMON_SHARED_C = conf.c db.c des.c ers.c grfio.c HPM.c mapindex.c md5calc.c \
- mutex.c nullpo.c random.c showmsg.c strlib.c thread.c \
- timer.c utils.c
+ mutex.c nullpo.c random.c showmsg.c strlib.c sysinfo.c \
+ thread.c timer.c utils.c
COMMON_C = $(COMMON_SHARED_C)
COMMON_SHARED_OBJ = $(patsubst %.c,%.o,$(COMMON_SHARED_C))
COMMON_OBJ = $(addprefix obj_all/, $(COMMON_SHARED_OBJ) \
@@ -27,11 +29,12 @@ COMMON_C += console.c core.c malloc.c socket.c
COMMON_H = atomic.h cbasetypes.h conf.h console.h core.h db.h des.h ers.h \
grfio.h HPM.h HPMi.h malloc.h mapindex.h md5calc.h mmo.h mutex.h \
nullpo.h random.h showmsg.h socket.h spinlock.h sql.h strlib.h \
- thread.h timer.h utils.h winapi.h
+ sysinfo.h thread.h timer.h utils.h winapi.h
COMMON_SQL_OBJ = obj_sql/sql.o
COMMON_SQL_H = sql.h
COMMON_C += sql.c
+SYSINFO_INC = sysinfo.inc
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
@@ -54,7 +57,7 @@ sql: $(SQL_DEPENDS)
buildclean:
@echo " CLEAN common (build temp files)"
- @rm -rf *.o obj_all obj_sql
+ @rm -rf *.o obj_all obj_sql sysinfo.inc
clean: buildclean
@echo " CLEAN common"
@@ -71,6 +74,10 @@ help:
Makefile: Makefile.in
@$(MAKE) -C ../.. src/common/Makefile
+$(SYSINFO_INC): $(COMMON_C) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
@@ -103,19 +110,20 @@ common_mini: $(COMMON_MINI_OBJ) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) obj_all/common
common_sql: $(COMMON_SQL_OBJ) obj_sql/common_sql.a Makefile
-obj_all/%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_all
+obj_all/sysinfo.o: sysinfo.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) $(SYSINFO_INC) | obj_all
+
+obj_all/%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | $(SYSINFO_INC) obj_all
@echo " CC $<"
@$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
-obj_all/mini%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_all
+obj_all/mini%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | $(SYSINFO_INC) obj_all
@echo " CC $<"
@$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
-obj_sql/%.o: %.c $(COMMON_H) $(COMMON_SQL_H) $(CONFIG_H) $(LIBCONFIG_H) | obj_sql
+obj_sql/%.o: %.c $(COMMON_H) $(COMMON_SQL_H) $(CONFIG_H) $(LIBCONFIG_H) | $(SYSINFO_INC) obj_sql
@echo " CC $<"
@$(CC) @CFLAGS@ $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
-
# missing object files
$(MT19937AR_OBJ):
@echo " MAKE $@"
diff --git a/src/common/console.c b/src/common/console.c
index ec228b563..d8f352c8a 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -5,6 +5,7 @@
#include "../common/cbasetypes.h"
#include "../common/showmsg.h"
#include "../common/core.h"
+#include "../common/sysinfo.h"
#include "../config/core.h"
#include "console.h"
@@ -41,8 +42,7 @@ struct console_interface console_s;
* CORE : Display title
*--------------------------------------*/
void display_title(void) {
- const char* svn = get_svn_revision();
- const char* git = get_git_hash();
+ const char *vcstype = sysinfo->vcstype();
ShowMessage("\n");
ShowMessage(""CL_BG_RED""CL_BT_WHITE" "CL_CLL""CL_NORMAL"\n");
@@ -57,10 +57,13 @@ void display_title(void) {
ShowMessage(""CL_BG_RED""CL_BT_WHITE" http://hercules.ws/board/ "CL_CLL""CL_NORMAL"\n");
ShowMessage(""CL_BG_RED""CL_BT_WHITE" "CL_CLL""CL_NORMAL"\n");
- if( git[0] != HERC_UNKNOWN_VER )
- ShowInfo("Git Hash: '"CL_WHITE"%s"CL_RESET"'\n", git);
- else if( svn[0] != HERC_UNKNOWN_VER )
- ShowInfo("SVN Revision: '"CL_WHITE"%s"CL_RESET"'\n", svn);
+ ShowInfo("Hercules %d-bit for %s\n", sysinfo->is64bit() ? 64 : 32, sysinfo->platform());
+ ShowInfo("%s revision (src): '"CL_WHITE"%s"CL_RESET"'\n", vcstype, sysinfo->vcsrevision_src());
+ ShowInfo("%s revision (scripts): '"CL_WHITE"%s"CL_RESET"'\n", vcstype, sysinfo->vcsrevision_scripts());
+ ShowInfo("OS version: '"CL_WHITE"%s"CL_RESET" [%s]'\n", sysinfo->osversion(), sysinfo->arch());
+ ShowInfo("CPU: '"CL_WHITE"%s [%d]"CL_RESET"'\n", sysinfo->cpu(), sysinfo->cpucores());
+ ShowInfo("Compiled with %s\n", sysinfo->compiler());
+ ShowInfo("Compile Flags: %s\n", sysinfo->cflags());
}
#ifdef CONSOLE_INPUT
#if defined(WIN32)
diff --git a/src/common/console.h b/src/common/console.h
index bd1de4cbf..3d19ddc9d 100644
--- a/src/common/console.h
+++ b/src/common/console.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _COMMON_CONSOLE_H_
-#define _COMMON_CONSOLE_H_
+#ifndef _COMMON_CONSOLE_H_
+#define _COMMON_CONSOLE_H_
#include "../common/thread.h"
#include "../common/mutex.h"
diff --git a/src/common/core.c b/src/common/core.c
index c6075da40..798c832f0 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -9,6 +9,7 @@
#include "core.h"
#include "../common/console.h"
#include "../common/random.h"
+#include "../common/sysinfo.h"
#ifndef MINICORE
#include "../common/db.h"
@@ -78,7 +79,7 @@ sigfunc *compat_signal(int signo, sigfunc *func) {
*--------------------------------------*/
#ifdef _WIN32
static BOOL WINAPI console_handler(DWORD c_event) {
- switch(c_event) {
+ switch(c_event) {
case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT:
@@ -89,8 +90,8 @@ static BOOL WINAPI console_handler(DWORD c_event) {
break;
default:
return FALSE;
- }
- return TRUE;
+ }
+ return TRUE;
}
static void cevents_init() {
@@ -152,134 +153,21 @@ void signals_init (void) {
}
#endif
-const char* get_svn_revision(void) {
- static char svn_version_buffer[16] = "";
- FILE *fp;
-
- if( svn_version_buffer[0] != '\0' )
- return svn_version_buffer;
-
- // subversion 1.7 uses a sqlite3 database
- // FIXME this is hackish at best...
- // - ignores database file structure
- // - assumes the data in NODES.dav_cache column ends with "!svn/ver/<revision>/<path>)"
- // - since it's a cache column, the data might not even exist
- if( (fp = fopen(".svn"PATHSEP_STR"wc.db", "rb")) != NULL || (fp = fopen(".."PATHSEP_STR".svn"PATHSEP_STR"wc.db", "rb")) != NULL )
- {
- #ifndef SVNNODEPATH
- //not sure how to handle branches, so i'll leave this overridable define until a better solution comes up
- #define SVNNODEPATH trunk
- #endif
- const char* prefix = "!svn/ver/";
- const char* postfix = "/"EXPAND_AND_QUOTE(SVNNODEPATH)")"; // there should exist only 1 entry like this
- size_t prefix_len = strlen(prefix);
- size_t postfix_len = strlen(postfix);
- size_t i,j,len;
- char* buffer;
-
- // read file to buffer
- fseek(fp, 0, SEEK_END);
- len = ftell(fp);
- buffer = (char*)aMalloc(len + 1);
- fseek(fp, 0, SEEK_SET);
- len = fread(buffer, 1, len, fp);
- buffer[len] = '\0';
- fclose(fp);
-
- // parse buffer
- for( i = prefix_len + 1; i + postfix_len <= len; ++i ) {
- if( buffer[i] != postfix[0] || memcmp(buffer + i, postfix, postfix_len) != 0 )
- continue; // postfix missmatch
- for( j = i; j > 0; --j ) {// skip digits
- if( !ISDIGIT(buffer[j - 1]) )
- break;
- }
- if( memcmp(buffer + j - prefix_len, prefix, prefix_len) != 0 )
- continue; // prefix missmatch
- // done
- snprintf(svn_version_buffer, sizeof(svn_version_buffer), "%d", atoi(buffer + j));
- break;
- }
- aFree(buffer);
-
- if( svn_version_buffer[0] != '\0' )
- return svn_version_buffer;
- }
-
- // subversion 1.6 and older?
- if ((fp = fopen(".svn/entries", "r")) != NULL) {
- char line[1024];
- int rev;
- // Check the version
- if (fgets(line, sizeof(line), fp)) {
- if(!ISDIGIT(line[0])) {
- // XML File format
- while (fgets(line,sizeof(line),fp))
- if (strstr(line,"revision=")) break;
- if (sscanf(line," %*[^\"]\"%d%*[^\n]", &rev) == 1) {
- snprintf(svn_version_buffer, sizeof(svn_version_buffer), "%d", rev);
- }
- } else {
- // Bin File format
- if ( fgets(line, sizeof(line), fp) == NULL ) { printf("Can't get bin name\n"); } // Get the name
- if ( fgets(line, sizeof(line), fp) == NULL ) { printf("Can't get entries kind\n"); } // Get the entries kind
- if(fgets(line, sizeof(line), fp)) { // Get the rev numver
- snprintf(svn_version_buffer, sizeof(svn_version_buffer), "%d", atoi(line));
- }
- }
- }
- fclose(fp);
-
- if( svn_version_buffer[0] != '\0' )
- return svn_version_buffer;
- }
-
- // fallback
- svn_version_buffer[0] = HERC_UNKNOWN_VER;
- return svn_version_buffer;
-}
-/* whats our origin */
-#define GIT_ORIGIN "refs/remotes/origin/master"
-/* Grabs the hash from the last time the user updated his working copy (last pull) */
-const char *get_git_hash (void) {
- static char HerculesGitHash[41] = "";//Sha(40) + 1
- FILE *fp;
-
- if( HerculesGitHash[0] != '\0' )
- return HerculesGitHash;
-
- if ( (fp = fopen (".git/"GIT_ORIGIN, "r")) != NULL) {
- char line[64];
- char *rev = malloc (sizeof (char) * 50);
-
- if (fgets (line, sizeof (line), fp) && sscanf (line, "%50s", rev))
- snprintf (HerculesGitHash, sizeof (HerculesGitHash), "%s", rev);
-
- free (rev);
- fclose (fp);
- } else {
- HerculesGitHash[0] = HERC_UNKNOWN_VER;
- }
-
- if (! (*HerculesGitHash)) {
- HerculesGitHash[0] = HERC_UNKNOWN_VER;
- }
-
- return HerculesGitHash;
-}
-// Warning if executed as superuser (root)
+/**
+ * Warns the user if executed as superuser (root)
+ */
void usercheck(void) {
-#ifndef _WIN32
- if (geteuid() == 0) {
- ShowWarning ("You are running Hercules with root privileges, it is not necessary.\n");
- }
-#endif
+ if (sysinfo->is_superuser()) {
+ ShowWarning("You are running Hercules with root privileges, it is not necessary.\n");
+ }
}
+
void core_defaults(void) {
#ifndef MINICORE
hpm_defaults();
HCache_defaults();
#endif
+ sysinfo_defaults();
console_defaults();
strlib_defaults();
malloc_defaults();
@@ -318,16 +206,18 @@ int main (int argc, char **argv) {
iMalloc->init();// needed for Show* in display_title() [FlavioJS]
+ sysinfo->init();
+
if (!(msg_silent&0x1))
console->display_title();
-
-#ifdef MINICORE // minimalist Core
+
usercheck();
+
+#ifdef MINICORE // minimalist Core
do_init(argc,argv);
do_final();
#else// not MINICORE
set_server_type();
- usercheck();
Sql_Init();
rathread_init();
@@ -348,10 +238,8 @@ int main (int argc, char **argv) {
HCache->init();
-#ifndef MINICORE
HPM->init();
-#endif
-
+
sockt->init();
do_init(argc,argv);
@@ -366,15 +254,14 @@ int main (int argc, char **argv) {
console->final();
do_final();
-#ifndef MINICORE
HPM->final();
-#endif
timer->final();
sockt->final();
DB->final();
rathread_final();
ers_final();
#endif
+ sysinfo->final();
iMalloc->final();
diff --git a/src/common/core.h b/src/common/core.h
index 72f956e1d..5c2f2c9a5 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_CORE_H_
-#define _COMMON_CORE_H_
+#ifndef _COMMON_CORE_H_
+#define _COMMON_CORE_H_
#include "../common/db.h"
#include "../common/mmo.h"
@@ -24,16 +24,14 @@ extern int runflag;
extern char *SERVER_NAME;
enum server_types {
- SERVER_TYPE_UNKNOWN = 0x0,
- SERVER_TYPE_LOGIN = 0x1,
- SERVER_TYPE_CHAR = 0x2,
- SERVER_TYPE_MAP = 0x4,
+ SERVER_TYPE_UNKNOWN = 0x0,
+ SERVER_TYPE_LOGIN = 0x1,
+ SERVER_TYPE_CHAR = 0x2,
+ SERVER_TYPE_MAP = 0x4,
};
enum server_types SERVER_TYPE;
-const char *get_svn_revision(void);
-const char *get_git_hash (void);
extern int do_init(int,char**);
extern void set_server_type(void);
extern void do_abort(void);
diff --git a/src/common/des.h b/src/common/des.h
index 3f55448ba..0f908a15b 100644
--- a/src/common/des.h
+++ b/src/common/des.h
@@ -1,8 +1,9 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_DES_H_
-#define _COMMON_DES_H_
+#ifndef _COMMON_DES_H_
+#define _COMMON_DES_H_
+#include "../common/cbasetypes.h"
/// One 64-bit block.
typedef struct BIT64 { uint8_t b[8]; } BIT64;
diff --git a/src/common/grfio.h b/src/common/grfio.h
index 4f5d0d6bc..930ed7e36 100644
--- a/src/common/grfio.h
+++ b/src/common/grfio.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_GRFIO_H_
-#define _COMMON_GRFIO_H_
+#ifndef _COMMON_GRFIO_H_
+#define _COMMON_GRFIO_H_
void grfio_init(const char* fname);
void grfio_final(void);
diff --git a/src/common/malloc.c b/src/common/malloc.c
index f7f108304..5b39cbab6 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -5,6 +5,7 @@
#include "../common/malloc.h"
#include "../common/core.h"
#include "../common/showmsg.h"
+#include "../common/sysinfo.h"
#include <stdio.h>
#include <stdlib.h>
@@ -574,17 +575,14 @@ static void memmgr_log (char *buf)
if( !log_fp ) {
time_t raw;
struct tm* t;
- const char* svn = get_svn_revision();
- const char* git = get_git_hash();
log_fp = fopen(memmer_logfile,"at");
if (!log_fp) log_fp = stdout;
time(&raw);
t = localtime(&raw);
- fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (rev %s).\n",
- (t->tm_year+1900), (t->tm_mon+1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec,
- git[0] != HERC_UNKNOWN_VER ? git : svn[0] != HERC_UNKNOWN_VER ? svn : "Unknown");
+ fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (%s rev '%s').\n",
+ (t->tm_year+1900), (t->tm_mon+1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, sysinfo->vcstype(), sysinfo->vcsrevision_src());
}
fprintf(log_fp, "%s", buf);
return;
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 0dd8d0f09..07a05677f 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_MMO_H_
-#define _COMMON_MMO_H_
+#ifndef _COMMON_MMO_H_
+#define _COMMON_MMO_H_
#include "cbasetypes.h"
#include "../common/db.h"
@@ -60,7 +60,7 @@
// Client support for experimental RagexeRE UI present in 2012-04-10 and 2012-04-18
#if defined(PACKETVER_RE) && ( PACKETVER == 20120410 || PACKETVER == 20120418 )
-#define PARTY_RECRUIT
+#define PARTY_RECRUIT
#endif // PACKETVER_RE && (PACKETVER == 20120410 || PACKETVER == 10120418)
// Comment the following line to disable sc_data saving. [Skotlex]
@@ -113,11 +113,11 @@
#define MAX_GUILDPOSITION 20 // Increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
#define MAX_GUILDEXPULSION 32
#define MAX_GUILDALLIANCE 16
-#define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan]
+#define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan]
#define MAX_GUILDLEVEL 50
#define MAX_GUARDIANS 8 // Local max per castle. [Skotlex]
#define MAX_QUEST_OBJECTIVES 3 // Max quest objectives for a quest
-#define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95]
+#define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95]
// for produce
#define MIN_ATTRIBUTE 0
@@ -158,7 +158,7 @@
// Base Homun skill.
#define HM_SKILLBASE 8001
#define MAX_HOMUNSKILL 43
-#define MAX_HOMUNCULUS_CLASS 52 // [orn] Increased to 60 from 16 to allow new Homun-S.
+#define MAX_HOMUNCULUS_CLASS 52 // [orn] Increased to 60 from 16 to allow new Homun-S.
#define HM_CLASS_BASE 6001
#define HM_CLASS_MAX (HM_CLASS_BASE+MAX_HOMUNCULUS_CLASS-1)
@@ -230,6 +230,32 @@ struct item {
uint64 unique_id;
};
+//Equip position constants
+enum equip_pos {
+ EQP_HEAD_LOW = 0x000001,
+ EQP_HEAD_MID = 0x000200, //512
+ EQP_HEAD_TOP = 0x000100, //256
+ EQP_HAND_R = 0x000002, //2
+ EQP_HAND_L = 0x000020, //32
+ EQP_ARMOR = 0x000010, //16
+ EQP_SHOES = 0x000040, //64
+ EQP_GARMENT = 0x000004, //4
+ EQP_ACC_L = 0x000008, //8
+ EQP_ACC_R = 0x000080, //128
+ EQP_COSTUME_HEAD_TOP = 0x000400, //1024
+ EQP_COSTUME_HEAD_MID = 0x000800, //2048
+ EQP_COSTUME_HEAD_LOW = 0x001000, //4096
+ EQP_COSTUME_GARMENT = 0x002000, //8192
+ //UNUSED_COSTUME_FLOOR = 0x004000, //16384
+ EQP_AMMO = 0x008000, //32768
+ EQP_SHADOW_ARMOR = 0x010000, //65536
+ EQP_SHADOW_WEAPON = 0x020000, //131072
+ EQP_SHADOW_SHIELD = 0x040000, //262144
+ EQP_SHADOW_SHOES = 0x080000, //524288
+ EQP_SHADOW_ACC_R = 0x100000, //1048576
+ EQP_SHADOW_ACC_L = 0x200000, //2097152
+};
+
struct point {
unsigned short map;
short x,y;
@@ -240,17 +266,17 @@ enum e_skill_flag
SKILL_FLAG_PERMANENT,
SKILL_FLAG_TEMPORARY,
SKILL_FLAG_PLAGIARIZED,
- SKILL_FLAG_UNUSED, /* needed to maintain the order since the values are saved, can be renamed and used if a new flag is necessary */
- SKILL_FLAG_PERM_GRANTED, // Permanent, granted through someway (e.g. script).
+ SKILL_FLAG_UNUSED, ///< needed to maintain the order since the values are saved, can be renamed and used if a new flag is necessary
+ SKILL_FLAG_PERM_GRANTED, ///< Permanent, granted through someway (e.g. script).
/* */
/* MUST be the last, because with it the flag value stores a dynamic value (flag+lv) */
SKILL_FLAG_REPLACED_LV_0, // Temporary skill overshadowing permanent skill of level 'N - SKILL_FLAG_REPLACED_LV_0',
};
enum e_mmo_charstatus_opt {
- OPT_NONE = 0x0,
- OPT_SHOW_EQUIP = 0x1,
- OPT_ALLOW_PARTY = 0x2,
+ OPT_NONE = 0x0,
+ OPT_SHOW_EQUIP = 0x1,
+ OPT_ALLOW_PARTY = 0x2,
};
enum e_item_bound_type {
@@ -319,14 +345,14 @@ struct s_pet {
char incuvate;
};
-struct s_homunculus { //[orn]
+struct s_homunculus { //[orn]
char name[NAME_LENGTH];
int hom_id;
int char_id;
short class_;
short prev_class;
int hp,max_hp,sp,max_sp;
- unsigned int intimacy; //[orn]
+ unsigned int intimacy;
short hunger;
struct s_skill hskill[MAX_HOMUNSKILL]; //albator
short skillpts;
@@ -503,7 +529,7 @@ struct party {
unsigned char count; //Count of online characters.
unsigned exp : 1,
item : 2; //&1: Party-Share (round-robin), &2: pickup style: shared.
- struct party_member member[MAX_PARTY];
+ struct party_member member[MAX_PARTY];
};
struct map_session_data;
@@ -607,14 +633,14 @@ enum fame_list_type {
};
enum { //Change Guild Infos
- GBI_EXP =1, // Guild Experience (EXP)
- GBI_GUILDLV, // Guild level
- GBI_SKILLPOINT, // Guild skillpoints
- GBI_SKILLLV, // Guild skill_lv ?? seem unused
+ GBI_EXP = 1, ///< Guild Experience (EXP)
+ GBI_GUILDLV, ///< Guild level
+ GBI_SKILLPOINT, ///< Guild skillpoints
+ GBI_SKILLLV, ///< Guild skill_lv ?? seem unused
};
enum { //Change Member Infos
- GMI_POSITION =0,
+ GMI_POSITION = 0,
GMI_EXP,
GMI_HAIR,
GMI_HAIR_COLOR,
@@ -811,50 +837,50 @@ enum {
};
enum weapon_type {
- W_FIST, //Bare hands
- W_DAGGER, //1
- W_1HSWORD, //2
- W_2HSWORD, //3
- W_1HSPEAR, //4
- W_2HSPEAR, //5
- W_1HAXE, //6
- W_2HAXE, //7
- W_MACE, //8
- W_2HMACE, //9 (unused)
- W_STAFF, //10
- W_BOW, //11
- W_KNUCKLE, //12
- W_MUSICAL, //13
- W_WHIP, //14
- W_BOOK, //15
- W_KATAR, //16
- W_REVOLVER, //17
- W_RIFLE, //18
- W_GATLING, //19
- W_SHOTGUN, //20
- W_GRENADE, //21
- W_HUUMA, //22
- W_2HSTAFF, //23
+ W_FIST, ///< Bare hands
+ W_DAGGER, //1
+ W_1HSWORD, //2
+ W_2HSWORD, //3
+ W_1HSPEAR, //4
+ W_2HSPEAR, //5
+ W_1HAXE, //6
+ W_2HAXE, //7
+ W_MACE, //8
+ W_2HMACE, //9 (unused)
+ W_STAFF, //10
+ W_BOW, //11
+ W_KNUCKLE, //12
+ W_MUSICAL, //13
+ W_WHIP, //14
+ W_BOOK, //15
+ W_KATAR, //16
+ W_REVOLVER, //17
+ W_RIFLE, //18
+ W_GATLING, //19
+ W_SHOTGUN, //20
+ W_GRENADE, //21
+ W_HUUMA, //22
+ W_2HSTAFF, //23
MAX_WEAPON_TYPE,
// dual-wield constants
- W_DOUBLE_DD, // 2 daggers
- W_DOUBLE_SS, // 2 swords
- W_DOUBLE_AA, // 2 axes
- W_DOUBLE_DS, // dagger + sword
- W_DOUBLE_DA, // dagger + axe
- W_DOUBLE_SA, // sword + axe
+ W_DOUBLE_DD, ///< 2 daggers
+ W_DOUBLE_SS, ///< 2 swords
+ W_DOUBLE_AA, ///< 2 axes
+ W_DOUBLE_DS, ///< dagger + sword
+ W_DOUBLE_DA, ///< dagger + axe
+ W_DOUBLE_SA, ///< sword + axe
};
enum ammo_type {
- A_ARROW = 1,
- A_DAGGER, //2
- A_BULLET, //3
- A_SHELL, //4
- A_GRENADE, //5
- A_SHURIKEN, //6
- A_KUNAI, //7
- A_CANNONBALL, //8
- A_THROWWEAPON //9
+ A_ARROW = 1,
+ A_DAGGER, //2
+ A_BULLET, //3
+ A_SHELL, //4
+ A_GRENADE, //5
+ A_SHURIKEN, //6
+ A_KUNAI, //7
+ A_CANNONBALL, //8
+ A_THROWWEAPON, //9
};
enum e_char_server_type {
diff --git a/src/common/socket.h b/src/common/socket.h
index ca9141716..75adde4cf 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -2,7 +2,7 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_SOCKET_H_
+#ifndef _COMMON_SOCKET_H_
#define _COMMON_SOCKET_H_
#include "../common/cbasetypes.h"
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
new file mode 100644
index 000000000..a56896458
--- /dev/null
+++ b/src/common/sysinfo.c
@@ -0,0 +1,1022 @@
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Base Author: Haru @ http://hercules.ws
+
+/// See sysinfo.h for a description of this file
+
+#define _COMMON_SYSINFO_P_
+#include "sysinfo.h"
+#undef _COMMON_SYSINFO_P_
+
+#include "../common/cbasetypes.h"
+#include "../common/core.h"
+#include "../common/strlib.h"
+#include "../common/malloc.h"
+
+#ifdef WIN32
+#include <windows.h>
+#include <string.h> // strlen
+#else
+#include <unistd.h>
+#endif
+#include <stdio.h> // fopen
+#include <stdlib.h> // atoi
+
+/// sysinfo.c interface source
+struct sysinfo_interface sysinfo_s;
+struct sysinfo_private sysinfo_p;
+
+#define VCSTYPE_UNKNOWN 0
+#define VCSTYPE_GIT 1
+#define VCSTYPE_SVN 2
+#define VCSTYPE_NONE -1
+
+#ifdef WIN32
+/**
+ * Values to be used with GetProductInfo.
+ *
+ * These aren't defined in MSVC2008/WindowsXP, so we gotta define them here.
+ * Values from: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724358%28v=vs.85%29.aspx
+ */
+enum windows_product_type {
+ msPRODUCT_UNDEFINED = 0x00000000, ///< An unknown product
+ msPRODUCT_ULTIMATE = 0x00000001, ///< Ultimate
+ msPRODUCT_HOME_BASIC = 0x00000002, ///< Home Basic
+ msPRODUCT_HOME_PREMIUM = 0x00000003, ///< Home Premium
+ msPRODUCT_ENTERPRISE = 0x00000004, ///< Enterprise
+ msPRODUCT_HOME_BASIC_N = 0x00000005, ///< Home Basic N
+ msPRODUCT_BUSINESS = 0x00000006, ///< Business
+ msPRODUCT_STANDARD_SERVER = 0x00000007, ///< Server Standard
+ msPRODUCT_DATACENTER_SERVER = 0x00000008, ///< Server Datacenter (full installation)
+ msPRODUCT_SMALLBUSINESS_SERVER = 0x00000009, ///< Windows Small Business Server
+ msPRODUCT_ENTERPRISE_SERVER = 0x0000000A, ///< Server Enterprise (full installation)
+ msPRODUCT_STARTER = 0x0000000B, ///< Starter
+ msPRODUCT_DATACENTER_SERVER_CORE = 0x0000000C, ///< Server Datacenter (core installation)
+ msPRODUCT_ENTERPRISE_SERVER_CORE = 0x0000000E, ///< Server Enterprise (core installation)
+ msPRODUCT_STANDARD_SERVER_CORE = 0x0000000D, ///< Server Standard (core installation)
+ msPRODUCT_ENTERPRISE_SERVER_IA64 = 0x0000000F, ///< Server Enterprise for Itanium-based Systems
+ msPRODUCT_BUSINESS_N = 0x00000010, ///< Business N
+ msPRODUCT_WEB_SERVER = 0x00000011, ///< Web Server (full installation)
+ msPRODUCT_CLUSTER_SERVER = 0x00000012, ///< HPC Edition
+ msPRODUCT_HOME_SERVER = 0x00000013, ///< Windows Storage Server 2008 R2 Essentials
+ msPRODUCT_STORAGE_EXPRESS_SERVER = 0x00000014, ///< Storage Server Express
+ msPRODUCT_STORAGE_STANDARD_SERVER = 0x00000015, ///< Storage Server Standard
+ msPRODUCT_STORAGE_WORKGROUP_SERVER = 0x00000016, ///< Storage Server Workgroup
+ msPRODUCT_STORAGE_ENTERPRISE_SERVER = 0x00000017, ///< Storage Server Enterprise
+ msPRODUCT_SERVER_FOR_SMALLBUSINESS = 0x00000018, ///< Windows Server 2008 for Windows Essential Server Solutions
+ msPRODUCT_SMALLBUSINESS_SERVER_PREMIUM = 0x00000019, ///< Small Business Server Premium
+ msPRODUCT_HOME_PREMIUM_N = 0x0000001A, ///< Home Premium N
+ msPRODUCT_ENTERPRISE_N = 0x0000001B, ///< Enterprise N
+ msPRODUCT_ULTIMATE_N = 0x0000001C, ///< Ultimate N
+ msPRODUCT_WEB_SERVER_CORE = 0x0000001D, ///< Web Server (core installation)
+ msPRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT = 0x0000001E, ///< Windows Essential Business Server Management Server
+ msPRODUCT_MEDIUMBUSINESS_SERVER_SECURITY = 0x0000001F, ///< Windows Essential Business Server Security Server
+ msPRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING = 0x00000020, ///< Windows Essential Business Server Messaging Server
+ msPRODUCT_SERVER_FOUNDATION = 0x00000021, ///< Server Foundation
+ msPRODUCT_HOME_PREMIUM_SERVER = 0x00000022, ///< Windows Home Server 2011
+ msPRODUCT_SERVER_FOR_SMALLBUSINESS_V = 0x00000023, ///< Windows Server 2008 without Hyper-V for Windows Essential Server Solutions
+ msPRODUCT_STANDARD_SERVER_V = 0x00000024, ///< Server Standard without Hyper-V
+ msPRODUCT_DATACENTER_SERVER_V = 0x00000025, ///< Server Datacenter without Hyper-V (full installation)
+ msPRODUCT_ENTERPRISE_SERVER_V = 0x00000026, ///< Server Enterprise without Hyper-V (full installation)
+ msPRODUCT_DATACENTER_SERVER_CORE_V = 0x00000027, ///< Server Datacenter without Hyper-V (core installation)
+ msPRODUCT_STANDARD_SERVER_CORE_V = 0x00000028, ///< Server Standard without Hyper-V (core installation)
+ msPRODUCT_ENTERPRISE_SERVER_CORE_V = 0x00000029, ///< Server Enterprise without Hyper-V (core installation)
+ msPRODUCT_HYPERV = 0x0000002A, ///< Microsoft Hyper-V Server
+ msPRODUCT_STORAGE_EXPRESS_SERVER_CORE = 0x0000002B, ///< Storage Server Express (core installation)
+ msPRODUCT_STORAGE_STANDARD_SERVER_CORE = 0x0000002C, ///< Storage Server Standard (core installation)
+ msPRODUCT_STORAGE_WORKGROUP_SERVER_CORE = 0x0000002D, ///< Storage Server Workgroup (core installation)
+ msPRODUCT_STORAGE_ENTERPRISE_SERVER_CORE = 0x0000002E, ///< Storage Server Enterprise (core installation)
+ msPRODUCT_STARTER_N = 0x0000002F, ///< Starter N
+ msPRODUCT_PROFESSIONAL = 0x00000030, ///< Professional
+ msPRODUCT_PROFESSIONAL_N = 0x00000031, ///< Professional N
+ msPRODUCT_SB_SOLUTION_SERVER = 0x00000032, ///< Windows Small Business Server 2011 Essentials
+ msPRODUCT_SERVER_FOR_SB_SOLUTIONS = 0x00000033, ///< Server For SB Solutions
+ msPRODUCT_STANDARD_SERVER_SOLUTIONS = 0x00000034, ///< Server Solutions Premium
+ msPRODUCT_STANDARD_SERVER_SOLUTIONS_CORE = 0x00000035, ///< Server Solutions Premium (core installation)
+ msPRODUCT_SB_SOLUTION_SERVER_EM = 0x00000036, ///< Server For SB Solutions EM
+ msPRODUCT_SERVER_FOR_SB_SOLUTIONS_EM = 0x00000037, ///< Server For SB Solutions EM
+ msPRODUCT_SOLUTION_EMBEDDEDSERVER = 0x00000038, ///< Windows MultiPoint Server
+ msPRODUCT_ESSENTIALBUSINESS_SERVER_MGMT = 0x0000003B, ///< Windows Essential Server Solution Management
+ msPRODUCT_ESSENTIALBUSINESS_SERVER_ADDL = 0x0000003C, ///< Windows Essential Server Solution Additional
+ msPRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC = 0x0000003D, ///< Windows Essential Server Solution Management SVC
+ msPRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC = 0x0000003E, ///< Windows Essential Server Solution Additional SVC
+ msPRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE = 0x0000003F, ///< Small Business Server Premium (core installation)
+ msPRODUCT_CLUSTER_SERVER_V = 0x00000040, ///< Server Hyper Core V
+ msPRODUCT_STARTER_E = 0x00000042, ///< Not supported
+ msPRODUCT_HOME_BASIC_E = 0x00000043, ///< Not supported
+ msPRODUCT_HOME_PREMIUM_E = 0x00000044, ///< Not supported
+ msPRODUCT_PROFESSIONAL_E = 0x00000045, ///< Not supported
+ msPRODUCT_ENTERPRISE_E = 0x00000046, ///< Not supported
+ msPRODUCT_ULTIMATE_E = 0x00000047, ///< Not supported
+ msPRODUCT_ENTERPRISE_EVALUATION = 0x00000048, ///< Server Enterprise (evaluation installation)
+ msPRODUCT_MULTIPOINT_STANDARD_SERVER = 0x0000004C, ///< Windows MultiPoint Server Standard (full installation)
+ msPRODUCT_MULTIPOINT_PREMIUM_SERVER = 0x0000004D, ///< Windows MultiPoint Server Premium (full installation)
+ msPRODUCT_STANDARD_EVALUATION_SERVER = 0x0000004F, ///< Server Standard (evaluation installation)
+ msPRODUCT_DATACENTER_EVALUATION_SERVER = 0x00000050, ///< Server Datacenter (evaluation installation)
+ msPRODUCT_ENTERPRISE_N_EVALUATION = 0x00000054, ///< Enterprise N (evaluation installation)
+ msPRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER = 0x0000005F, ///< Storage Server Workgroup (evaluation installation)
+ msPRODUCT_STORAGE_STANDARD_EVALUATION_SERVER = 0x00000060, ///< Storage Server Standard (evaluation installation)
+ msPRODUCT_CORE_N = 0x00000062, ///< Windows 8 N
+ msPRODUCT_CORE_COUNTRYSPECIFIC = 0x00000063, ///< Windows 8 China
+ msPRODUCT_CORE_SINGLELANGUAGE = 0x00000064, ///< Windows 8 Single Language
+ msPRODUCT_CORE = 0x00000065, ///< Windows 8
+ msPRODUCT_PROFESSIONAL_WMC = 0x00000067, ///< Professional with Media Center
+};
+
+/**
+ * Values to be used with GetSystemMetrics.
+ *
+ * Values from http://msdn.microsoft.com/en-us/library/windows/desktop/ms724385%28v=vs.85%29.aspx
+ */
+enum windows_metrics {
+ msSM_SERVERR2 = 89, ///< Obtains the build number if the system is Windows Server 2003 R2; otherwise, 0.
+};
+
+/**
+ * Values to be used with OSVERSIONINFOEX.wSuiteMask.
+ *
+ * Values from http://msdn.microsoft.com/en-us/library/windows/desktop/ms724833%28v=vs.85%29.aspx
+ */
+enum windows_ver_suite {
+ msVER_SUITE_BLADE = 0x00000400, ///< Windows Server 2003, Web Edition is installed.
+ msVER_SUITE_STORAGE_SERVER = 0x00002000, ///< Windows Storage Server 2003 R2 or Windows Storage Server 2003 is installed.
+ msVER_SUITE_COMPUTE_SERVER = 0x00004000, ///< Windows Server 2003, Compute Cluster Edition is installed.
+ msVER_SUITE_WH_SERVER = 0x00008000, ///< Windows Home Server is installed.
+};
+
+#else // not WIN32
+// UNIX. Use build-time cached values
+#include "sysinfo.inc"
+#endif // WIN32
+
+// Compiler detection <http://sourceforge.net/p/predef/wiki/Compilers/>
+#if defined(__BORLANDC__)
+#define SYSINFO_COMPILER "Borland C++"
+#elif defined(__clang__)
+#define SYSINFO_COMPILER "Clang v" EXPAND_AND_QUOTE(__clang_major__) "." EXPAND_AND_QUOTE(__clang_minor__) "." EXPAND_AND_QUOTE(__clang_patchlevel__)
+#elif defined(__INTEL_COMPILER)
+#define SYSINFO_COMPILER "Intel CC v" EXPAND_AND_QUOTE(__INTEL_COMPILER)
+#elif defined(__MINGW32__)
+#if defined(__MINGW64__)
+#define SYSINFO_COMPILER "MinGW-w64 64 Bit v" EXPAND_AND_QUOTE(__MINGW64_VERSION_MAJOR) "." EXPAND_AND_QUOTE(__MINGW64_VERSION_MINOR) \
+ " (MinGW " EXPAND_AND_QUOTE(__MINGW32_MAJOR_VERSION) "." EXPAND_AND_QUOTE(__MINGW32_MINOR_VERSION) ")"
+#elif defined(__MINGW64_VERSION_MAJOR)
+#define SYSINFO_COMPILER "MinGW-w64 32 Bit v" EXPAND_AND_QUOTE(__MINGW64_VERSION_MAJOR) "." EXPAND_AND_QUOTE(__MINGW64_VERSION_MINOR) \
+ " (MinGW " EXPAND_AND_QUOTE(__MINGW32_MAJOR_VERSION) "." EXPAND_AND_QUOTE(__MINGW32_MINOR_VERSION) ")"
+#else
+#define SYSINFO_COMPILER "MinGW32 v" EXPAND_AND_QUOTE(__MINGW32_MAJOR_VERSION) "." EXPAND_AND_QUOTE(__MINGW32_MINOR_VERSION)
+#endif
+#elif defined(__GNUC__)
+#define SYSINFO_COMPILER "GCC v" EXPAND_AND_QUOTE(__GNUC__) "." EXPAND_AND_QUOTE(__GNUC_MINOR__) "." EXPAND_AND_QUOTE(__GNUC_PATCHLEVEL__)
+#elif defined(_MSC_VER)
+#if _MSC_VER >= 1300 && _MSC_VER < 1310
+#define SYSINFO_COMPILER "Microsoft Visual C++ 7.0 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1310 && _MSC_VER < 1400
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2003 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1400 && _MSC_VER < 1500
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2005 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1500 && _MSC_VER < 1600
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2008 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1600 && _MSC_VER < 1700
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2010 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1700 && _MSC_VER < 1800
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2012 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1800 && _MSC_VER < 1900
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2013 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#else // < 1300 || >= 1900
+#define SYSINFO_COMPILER "Microsoft Visual C++ v" EXPAND_AND_QUOTE(_MSC_VER)
+#endif
+#else
+#define SYSINFO_COMPILER "Unknown"
+#endif
+// end compiler detection
+
+/**
+ * Retrieves the current SVN revision.
+ *
+ * @param out[out] a string pointer to return the value (to be aFree()'d.)
+ * @retval true if a revision was correctly detected.
+ * @retval false if no revision was detected. out is set to NULL in this case.
+ */
+bool sysinfo_svn_get_revision(char **out) {
+ // Only include SVN support if detected it, or we're on MSVC
+#if !defined(SYSINFO_VCSTYPE) || SYSINFO_VCSTYPE == VCSTYPE_SVN || SYSINFO_VCSTYPE == VCSTYPE_UNKNOWN
+ FILE *fp;
+
+ // subversion 1.7 uses a sqlite3 database
+ // FIXME this is hackish at best...
+ // - ignores database file structure
+ // - assumes the data in NODES.dav_cache column ends with "!svn/ver/<revision>/<path>)"
+ // - since it's a cache column, the data might not even exist
+ if ((fp = fopen(".svn"PATHSEP_STR"wc.db", "rb")) != NULL || (fp = fopen(".."PATHSEP_STR".svn"PATHSEP_STR"wc.db", "rb")) != NULL) {
+
+#ifndef SVNNODEPATH //not sure how to handle branches, so i'll leave this overridable define until a better solution comes up
+#define SVNNODEPATH trunk
+#endif // SVNNODEPATH
+
+ const char* prefix = "!svn/ver/";
+ const char* postfix = "/"EXPAND_AND_QUOTE(SVNNODEPATH)")"; // there should exist only 1 entry like this
+ size_t prefix_len = strlen(prefix);
+ size_t postfix_len = strlen(postfix);
+ size_t i,j,flen;
+ char* buffer;
+
+ // read file to buffer
+ fseek(fp, 0, SEEK_END);
+ flen = ftell(fp);
+ buffer = (char*)aMalloc(flen + 1);
+ fseek(fp, 0, SEEK_SET);
+ flen = fread(buffer, 1, flen, fp);
+ buffer[flen] = '\0';
+ fclose(fp);
+
+ // parse buffer
+ for (i = prefix_len + 1; i + postfix_len <= flen; ++i) {
+ if (buffer[i] != postfix[0] || memcmp(buffer + i, postfix, postfix_len) != 0)
+ continue; // postfix mismatch
+ for (j = i; j > 0; --j) { // skip digits
+ if (!ISDIGIT(buffer[j - 1]))
+ break;
+ }
+ if (memcmp(buffer + j - prefix_len, prefix, prefix_len) != 0)
+ continue; // prefix mismatch
+ // done
+ if (*out != NULL)
+ aFree(*out);
+ *out = aCalloc(1, 8);
+ snprintf(*out, 8, "%d", atoi(buffer + j));
+ break;
+ }
+ aFree(buffer);
+
+ if (*out != NULL)
+ return true;
+ }
+
+ // subversion 1.6 and older?
+ if ((fp = fopen(".svn/entries", "r")) != NULL) {
+ char line[1024];
+ int rev;
+ // Check the version
+ if (fgets(line, sizeof(line), fp)) {
+ if (!ISDIGIT(line[0])) {
+ // XML File format
+ while (fgets(line,sizeof(line),fp))
+ if (strstr(line,"revision=")) break;
+ if (sscanf(line," %*[^\"]\"%d%*[^\n]", &rev) == 1) {
+ if (*out != NULL)
+ aFree(*out);
+ *out = aCalloc(1, 8);
+ snprintf(*out, 8, "%d", rev);
+ }
+ } else {
+ // Bin File format
+ if (fgets(line, sizeof(line), fp) == NULL) { printf("Can't get bin name\n"); } // Get the name
+ if (fgets(line, sizeof(line), fp) == NULL) { printf("Can't get entries kind\n"); } // Get the entries kind
+ if (fgets(line, sizeof(line), fp)) { // Get the rev numver
+ if (*out != NULL)
+ aFree(*out);
+ *out = aCalloc(1, 8);
+ snprintf(*out, 8, "%d", atoi(line));
+ }
+ }
+ }
+ fclose(fp);
+
+ if (*out != NULL)
+ return true;
+ }
+#endif
+ if (*out != NULL)
+ aFree(*out);
+ *out = NULL;
+ return false;
+}
+
+/**
+ * Retrieves the current Git revision.
+ *
+ * @param out[out] a string pointer to return the value (to be aFree()'d.)
+ * @retval true if a revision was correctly detected.
+ * @retval false if no revision was detected. out is set to NULL in this case.
+ */
+bool sysinfo_git_get_revision(char **out) {
+ // Only include Git support if we detected it, or we're on MSVC
+#if !defined(SYSINFO_VCSTYPE) || SYSINFO_VCSTYPE == VCSTYPE_GIT || SYSINFO_VCSTYPE == VCSTYPE_UNKNOWN
+ FILE *fp;
+ char ref[128], filepath[128], line[128];
+
+ strcpy(ref, "HEAD");
+
+ while (*ref) {
+ snprintf(filepath, sizeof(filepath), ".git/%s", ref);
+ if ((fp = fopen(filepath, "r")) != NULL) {
+ if (fgets(line, sizeof(line)-1, fp) == NULL) {
+ fclose(fp);
+ break;
+ }
+ fclose(fp);
+ if (sscanf(line, "ref: %127[^\n]", ref) == 1) {
+ continue;
+ } else if (sscanf(line, "%127[a-f0-9]", ref) == 1 && strlen(ref) == 40) {
+ if (*out != NULL)
+ aFree(*out);
+ *out = aStrdup(ref);
+ }
+ }
+ break;
+ }
+ if (*out != NULL)
+ return true;
+#else
+ if (*out != NULL)
+ aFree(*out);
+ *out = NULL;
+#endif
+ return false;
+}
+
+#ifdef WIN32
+
+/// Windows-specific runtime detection functions.
+
+typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
+/**
+ * Retrieves the Operating System version (Windows only).
+ *
+ * Once retrieved, the version string is stored into sysinfo->p->osversion.
+ */
+void sysinfo_osversion_retrieve(void) {
+ OSVERSIONINFOEX osvi;
+ StringBuf buf;
+ ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
+ StrBuf->Init(&buf);
+
+ osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+
+ if (sysinfo->p->osversion != NULL) {
+ aFree(sysinfo->p->osversion);
+ sysinfo->p->osversion = NULL;
+ }
+
+ /*
+ * #pragma rantmode (on)
+ * Some engineer at Microsoft moronically decided that, since some applications use this information to do version checks and refuse to
+ * run if they detect a new, unknown version of Windows, now nobody will be able to rely on this information anymore, not even those who
+ * need it for reporting or logging.
+ * The correct fix was to let those applications break, and their developer fix them (and in the meanwhile let the users use the
+ * Compatibility settings to run them) but no, they decided they'd deprecate the API, and make it lie for those who use it, reporting
+ * windows 8 even if they're running on 8.1 or newer.
+ * The API wasn't broken, applications were. Now we have broken applications, and a broken API. Great move, Microsoft. Oh right,
+ * there's the Version API helper functions. Or maybe not, since you can only do 'are we running on at least version X?' checks with
+ * those, it's not what we need.
+ * You know what? I'll just silence your deprecation warning for the time being. Maybe by the time you release the next version of
+ * Windows, you'll have provided a less crippled API or something.
+ * #pragma rantmode (off)
+ */
+#pragma warning (push)
+#pragma warning (disable : 4996)
+ if (!GetVersionEx((OSVERSIONINFO*) &osvi)) {
+ sysinfo->p->osversion = aStrdup("Unknown Version");
+ return;
+ }
+#pragma warning (pop)
+
+ if (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId // Windows NT Family
+ && ((osvi.dwMajorVersion > 4 && osvi.dwMajorVersion < 6) || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 3)) // Between XP and 8.1
+ ) {
+ if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 3) { // Between Vista and 8.1
+ PGPI pGPI;
+ DWORD dwType;
+ if (osvi.dwMinorVersion == 0) {
+ StrBuf->AppendStr(&buf, osvi.wProductType == VER_NT_WORKSTATION ? "Windows Vista" : "Windows Server 2008");
+ } else if (osvi.dwMinorVersion == 1) {
+ StrBuf->AppendStr(&buf, osvi.wProductType == VER_NT_WORKSTATION ? "Windows 7" : "Windows Server 2008 R2");
+ } else {
+ // If it's 2, it can be Windows 8, or any newer version (8.1 at the time of writing this) -- see above for the reason.
+ switch (osvi.dwMinorVersion) {
+ case 2:
+ {
+ ULONGLONG mask = 0;
+ OSVERSIONINFOEX osvi2;
+ ZeroMemory(&osvi2, sizeof(OSVERSIONINFOEX));
+ osvi2.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+ osvi2.dwMajorVersion = 6;
+ osvi2.dwMinorVersion = 2;
+ VER_SET_CONDITION(mask, VER_MAJORVERSION, VER_LESS_EQUAL);
+ VER_SET_CONDITION(mask, VER_MINORVERSION, VER_LESS_EQUAL);
+ if (VerifyVersionInfo(&osvi2, VER_MAJORVERSION | VER_MINORVERSION, mask)) {
+ StrBuf->AppendStr(&buf, osvi.wProductType == VER_NT_WORKSTATION ? "Windows 8" : "Windows Server 2012");
+ break;
+ }
+ }
+ case 3:
+ StrBuf->AppendStr(&buf, osvi.wProductType == VER_NT_WORKSTATION ? "Windows 8.1" : "Windows Server 2012 R2");
+ }
+ }
+
+ pGPI = (PGPI) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetProductInfo");
+
+ pGPI(osvi.dwMajorVersion, osvi.dwMinorVersion, 0, 0, &dwType);
+
+ switch (dwType) {
+ case msPRODUCT_ULTIMATE:
+ case msPRODUCT_ULTIMATE_N:
+ StrBuf->AppendStr(&buf, " Ultimate");
+ break;
+ case msPRODUCT_PROFESSIONAL:
+ case msPRODUCT_PROFESSIONAL_N:
+ case msPRODUCT_PROFESSIONAL_WMC:
+ StrBuf->AppendStr(&buf, " Professional");
+ break;
+ case msPRODUCT_HOME_PREMIUM:
+ case msPRODUCT_HOME_PREMIUM_N:
+ StrBuf->AppendStr(&buf, " Home Premium");
+ break;
+ case msPRODUCT_HOME_BASIC:
+ case msPRODUCT_HOME_BASIC_N:
+ StrBuf->AppendStr(&buf, " Home Basic");
+ break;
+ case msPRODUCT_ENTERPRISE:
+ case msPRODUCT_ENTERPRISE_N:
+ case msPRODUCT_ENTERPRISE_SERVER:
+ case msPRODUCT_ENTERPRISE_SERVER_CORE:
+ case msPRODUCT_ENTERPRISE_SERVER_IA64:
+ case msPRODUCT_ENTERPRISE_SERVER_V:
+ case msPRODUCT_ENTERPRISE_SERVER_CORE_V:
+ case msPRODUCT_ENTERPRISE_EVALUATION:
+ case msPRODUCT_ENTERPRISE_N_EVALUATION:
+ StrBuf->AppendStr(&buf, " Enterprise");
+ break;
+ case msPRODUCT_BUSINESS:
+ case msPRODUCT_BUSINESS_N:
+ StrBuf->AppendStr(&buf, " Business");
+ break;
+ case msPRODUCT_STARTER:
+ case msPRODUCT_STARTER_N:
+ StrBuf->AppendStr(&buf, " Starter");
+ break;
+ case msPRODUCT_CLUSTER_SERVER:
+ case msPRODUCT_CLUSTER_SERVER_V:
+ StrBuf->AppendStr(&buf, " Cluster Server");
+ break;
+ case msPRODUCT_DATACENTER_SERVER:
+ case msPRODUCT_DATACENTER_SERVER_CORE:
+ case msPRODUCT_DATACENTER_SERVER_V:
+ case msPRODUCT_DATACENTER_SERVER_CORE_V:
+ case msPRODUCT_DATACENTER_EVALUATION_SERVER:
+ StrBuf->AppendStr(&buf, " Datacenter");
+ break;
+ case msPRODUCT_SMALLBUSINESS_SERVER:
+ case msPRODUCT_SMALLBUSINESS_SERVER_PREMIUM:
+ case msPRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE:
+ StrBuf->AppendStr(&buf, " Small Business Server");
+ break;
+ case PRODUCT_STANDARD_SERVER:
+ case PRODUCT_STANDARD_SERVER_CORE:
+ case msPRODUCT_STANDARD_SERVER_V:
+ case msPRODUCT_STANDARD_SERVER_CORE_V:
+ case msPRODUCT_STANDARD_EVALUATION_SERVER:
+ StrBuf->AppendStr(&buf, " Standard");
+ break;
+ case msPRODUCT_WEB_SERVER:
+ case msPRODUCT_WEB_SERVER_CORE:
+ StrBuf->AppendStr(&buf, " Web Server");
+ break;
+ case msPRODUCT_STORAGE_EXPRESS_SERVER:
+ case msPRODUCT_STORAGE_STANDARD_SERVER:
+ case msPRODUCT_STORAGE_WORKGROUP_SERVER:
+ case msPRODUCT_STORAGE_ENTERPRISE_SERVER:
+ case msPRODUCT_STORAGE_EXPRESS_SERVER_CORE:
+ case msPRODUCT_STORAGE_STANDARD_SERVER_CORE:
+ case msPRODUCT_STORAGE_WORKGROUP_SERVER_CORE:
+ case msPRODUCT_STORAGE_ENTERPRISE_SERVER_CORE:
+ case msPRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER:
+ case msPRODUCT_STORAGE_STANDARD_EVALUATION_SERVER:
+ StrBuf->AppendStr(&buf, " Storage Server");
+ break;
+ case msPRODUCT_HOME_SERVER:
+ case msPRODUCT_SERVER_FOR_SMALLBUSINESS:
+ case msPRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT:
+ case msPRODUCT_MEDIUMBUSINESS_SERVER_SECURITY:
+ case msPRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING:
+ case msPRODUCT_SERVER_FOR_SMALLBUSINESS_V:
+ case msPRODUCT_SERVER_FOUNDATION:
+ case msPRODUCT_HOME_PREMIUM_SERVER:
+ case msPRODUCT_HYPERV:
+ case msPRODUCT_SB_SOLUTION_SERVER:
+ case msPRODUCT_SERVER_FOR_SB_SOLUTIONS:
+ case msPRODUCT_STANDARD_SERVER_SOLUTIONS:
+ case msPRODUCT_STANDARD_SERVER_SOLUTIONS_CORE:
+ case msPRODUCT_SB_SOLUTION_SERVER_EM:
+ case msPRODUCT_SERVER_FOR_SB_SOLUTIONS_EM:
+ case msPRODUCT_SOLUTION_EMBEDDEDSERVER:
+ case msPRODUCT_ESSENTIALBUSINESS_SERVER_MGMT:
+ case msPRODUCT_ESSENTIALBUSINESS_SERVER_ADDL:
+ case msPRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC:
+ case msPRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC:
+ case msPRODUCT_MULTIPOINT_STANDARD_SERVER:
+ case msPRODUCT_MULTIPOINT_PREMIUM_SERVER:
+ StrBuf->AppendStr(&buf, " Server (other)");
+ break;
+ case msPRODUCT_CORE_N:
+ case msPRODUCT_CORE_COUNTRYSPECIFIC:
+ case msPRODUCT_CORE_SINGLELANGUAGE:
+ case msPRODUCT_CORE:
+ StrBuf->AppendStr(&buf, " Workstation (other)");
+ break;
+ }
+
+ } else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) { // XP x64 and Server 2003
+ if (osvi.wProductType == VER_NT_WORKSTATION) {
+ StrBuf->AppendStr(&buf, "Windows XP Professional");
+ } else {
+ if (GetSystemMetrics(msSM_SERVERR2))
+ StrBuf->AppendStr(&buf, "Windows Server 2003 R2");
+ else if (osvi.wSuiteMask & msVER_SUITE_STORAGE_SERVER)
+ StrBuf->AppendStr(&buf, "Windows Storage Server 2003");
+ else if (osvi.wSuiteMask & msVER_SUITE_WH_SERVER)
+ StrBuf->AppendStr(&buf, "Windows Home Server");
+ else
+ StrBuf->AppendStr(&buf, "Windows Server 2003");
+
+ // Test for the server type.
+ if (osvi.wSuiteMask & msVER_SUITE_COMPUTE_SERVER)
+ StrBuf->AppendStr(&buf, " Compute Cluster");
+ else if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
+ StrBuf->AppendStr(&buf, " Datacenter");
+ else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
+ StrBuf->AppendStr(&buf, " Enterprise");
+ else if (osvi.wSuiteMask & msVER_SUITE_BLADE)
+ StrBuf->AppendStr(&buf, " Web");
+ else
+ StrBuf->AppendStr(&buf, " Standard");
+ }
+ } else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) { // XP
+ StrBuf->AppendStr(&buf, "Windows XP");
+ if (osvi.wSuiteMask & VER_SUITE_EMBEDDEDNT)
+ StrBuf->AppendStr(&buf, " Embedded");
+ else if (osvi.wSuiteMask & VER_SUITE_PERSONAL)
+ StrBuf->AppendStr(&buf, " Home");
+ else
+ StrBuf->AppendStr(&buf, " Professional");
+ } else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) { // 2000
+ StrBuf->AppendStr(&buf, "Windows 2000");
+
+ if (osvi.wProductType == VER_NT_WORKSTATION)
+ StrBuf->AppendStr(&buf, " Professional");
+ else if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
+ StrBuf->AppendStr(&buf, " Datacenter Server");
+ else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
+ StrBuf->AppendStr(&buf, " Advanced Server");
+ else
+ StrBuf->AppendStr(&buf, " Server");
+ } else {
+ StrBuf->Printf(&buf, "Unknown Windows version %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
+ }
+ }
+
+ // Include service pack (if any) and build number.
+
+ if (strlen(osvi.szCSDVersion) > 0) {
+ StrBuf->Printf(&buf, " %s", osvi.szCSDVersion);
+ }
+
+ StrBuf->Printf(&buf, " (build %d)", osvi.dwBuildNumber);
+
+ sysinfo->p->osversion = aStrdup(StrBuf->Value(&buf));
+
+ StrBuf->Destroy(&buf);
+ return;
+}
+
+typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
+/**
+ * Retrieves the CPU type (Windows only).
+ *
+ * Once retrieved, the name is stored into sysinfo->p->cpu and the
+ * number of cores in sysinfo->p->cpucores.
+ */
+void sysinfo_cpu_retrieve(void) {
+ StringBuf buf;
+ PGNSI pGNSI;
+ SYSTEM_INFO si;
+ ZeroMemory(&si, sizeof(SYSTEM_INFO));
+ StrBuf->Init(&buf);
+
+ if (sysinfo->p->cpu != NULL) {
+ aFree(sysinfo->p->cpu);
+ sysinfo->p->cpu = NULL;
+ }
+
+ // Call GetNativeSystemInfo if supported or GetSystemInfo otherwise.
+ pGNSI = (PGNSI) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo");
+ if (NULL != pGNSI)
+ pGNSI(&si);
+ else
+ GetSystemInfo(&si);
+
+ if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL
+ || si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64
+ ) {
+ StrBuf->Printf(&buf, "%s CPU, Family %d, Model %d, Stepping %d",
+ si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL ? "x86" : "x86_64",
+ si.wProcessorLevel,
+ (si.wProcessorRevision&0xff00)>>8,
+ (si.wProcessorRevision&0xff));
+ } else {
+ StrBuf->AppendStr(&buf, "Unknown");
+ }
+
+ sysinfo->p->cpu = aStrdup(StrBuf->Value(&buf));
+ sysinfo->p->cpucores = si.dwNumberOfProcessors;
+
+ StrBuf->Destroy(&buf);
+}
+
+/**
+ * Retrieves the OS architecture (Windows only).
+ *
+ * Once retrieved, the name is stored into sysinfo->p->arch.
+ */
+void sysinfo_arch_retrieve(void) {
+ PGNSI pGNSI;
+ SYSTEM_INFO si;
+ ZeroMemory(&si, sizeof(SYSTEM_INFO));
+
+ if (sysinfo->p->arch != NULL) {
+ aFree(sysinfo->p->arch);
+ sysinfo->p->arch = NULL;
+ }
+
+ // Call GetNativeSystemInfo if supported or GetSystemInfo otherwise.
+ pGNSI = (PGNSI) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo");
+ if (NULL != pGNSI)
+ pGNSI(&si);
+ else
+ GetSystemInfo(&si);
+
+ if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) // x64
+ sysinfo->p->arch = aStrdup("x86_64");
+ else if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) // x32
+ sysinfo->p->arch = aStrdup("x86");
+ else if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_ARM) // ARM
+ sysinfo->p->arch = aStrdup("ARM");
+ else if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) // Itanium
+ sysinfo->p->arch = aStrdup("IA-64");
+ else
+ sysinfo->p->arch = aStrdup("Unknown");
+}
+
+/**
+ * Retrieves the startup-time VCS revision information.
+ *
+ * Once retrieved, the value is stored in sysinfo->p->vcsrevision_src.
+ */
+void sysinfo_vcsrevision_src_retrieve(void) {
+ if (sysinfo->p->vcsrevision_src != NULL) {
+ aFree(sysinfo->p->vcsrevision_src);
+ sysinfo->p->vcsrevision_src = NULL;
+ }
+ // Try Git, then SVN
+ if (sysinfo_git_get_revision(&sysinfo->p->vcsrevision_src)) {
+ sysinfo->p->vcstype = VCSTYPE_GIT;
+ return;
+ }
+ if (sysinfo_svn_get_revision(&sysinfo->p->vcsrevision_src)) {
+ sysinfo->p->vcstype = VCSTYPE_SVN;
+ return;
+ }
+ sysinfo->p->vcstype = VCSTYPE_NONE;
+ sysinfo->p->vcsrevision_src = aStrdup("Unknown");
+}
+#endif // WIN32
+
+/**
+ * Retrieevs the VCS type name.
+ *
+ * Once retrieved, the value is stored in sysinfo->p->vcstype_name.
+ */
+void sysinfo_vcstype_name_retrieve(void) {
+ if (sysinfo->p->vcstype_name != NULL) {
+ aFree(sysinfo->p->vcstype_name);
+ sysinfo->p->vcstype_name = NULL;
+ }
+ switch (sysinfo->p->vcstype) {
+ case VCSTYPE_GIT:
+ sysinfo->p->vcstype_name = aStrdup("Git");
+ break;
+ case VCSTYPE_SVN:
+ sysinfo->p->vcstype_name = aStrdup("SVN");
+ break;
+ default:
+ sysinfo->p->vcstype_name = aStrdup("Exported");
+ break;
+ }
+}
+
+/**
+ * Returns the platform (OS type) this application is running on.
+ *
+ * This information is cached at compile time, since it's unlikely to change.
+ *
+ * @return the OS platform name.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "Linux", "Darwin", "Windows", etc.
+ */
+const char *sysinfo_platform(void) {
+ return sysinfo->p->platform;
+}
+
+/**
+ * Returns the Operating System version the application is running on.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time, since it is uncommon that an application is compiled and runs
+ * on different machines.
+ *
+ * @return the OS name.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "Windows 2008 Small Business Server", "OS X 10.8 Mountain Lion",
+ * "Gentoo Base System Release 2.2", "Debian GNU/Linux 6.0.6 (squeeze)", etc.
+ */
+const char *sysinfo_osversion(void) {
+ return sysinfo->p->osversion;
+}
+
+/**
+ * Returns the CPU model the application is running on.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time, since it is uncommon that an application is compiled and runs
+ * on different machines.
+ *
+ * @return the CPU model name.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "Intel(R) Atom(TM) CPU D2500 @ 1.86GHz",
+ * "Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz", "Intel Core i7",
+ * "x86 CPU, Family 6, Model 54, Stepping 1", etc.
+ */
+const char *sysinfo_cpu(void) {
+ return sysinfo->p->cpu;
+}
+
+/**
+ * Returns the number of CPU cores available.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time, since it is uncommon that an application is compiled and runs
+ * on different machines.
+ *
+ * @return the number of CPU cores.
+ */
+int sysinfo_cpucores(void) {
+ return sysinfo->p->cpucores;
+}
+
+/**
+ * Returns the CPU architecture the application was compiled for.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time, since it is uncommon that an application is compiled and runs
+ * on different machines.
+ *
+ * @return the CPU architecture name.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "x86", "x86_64", "IA-64", "ARM", etc.
+ */
+const char *sysinfo_arch(void) {
+ return sysinfo->p->arch;
+}
+
+/**
+ * Returns info about the 32 or 64 bit build of Hercules.
+ *
+ * @retval true if this is a 64 bit build.
+ * @retval false if this isn't a 64 bit build (i.e. it is a 32 bit build).
+ */
+bool sysinfo_is64bit(void) {
+#ifdef _LP64
+ return true;
+#else
+ return false;
+#endif
+}
+
+/**
+ * Returns the compiler the application was compiled with.
+ *
+ * @return the compiler name.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "Microsoft Visual C++ 2012 (v170050727)",
+ * "Clang v5.0.0", "MinGW32 v3.20", "GCC v4.7.3", etc.
+ */
+const char *sysinfo_compiler(void) {
+ return sysinfo->p->compiler;
+}
+
+/**
+ * Returns the compiler flags the application was compiled with.
+ *
+ * On Windows (MSVC), an empty string is returned instead.
+ *
+ * @return the compiler flags.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "-ggdb -O2 -flto -pipe -ffast-math ..."
+ */
+const char *sysinfo_cflags(void) {
+ return sysinfo->p->cflags;
+}
+
+/**
+ * Returns the Version Control System the application was downloaded with.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time. On Windows (MSVC), it is cached when the function is first
+ * called (most likely on server startup).
+ *
+ * @return the VCS type (numerical).
+ *
+ * @see VCSTYPE_NONE, VCSTYPE_GIT, VCSTYPE_SVN, VCSTYPE_UNKNOWN
+ */
+int sysinfo_vcstypeid(void) {
+ return sysinfo->p->vcstype;
+}
+
+/**
+ * Returns the Version Control System the application was downloaded with.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time. On Windows (MSVC), it is cached when the function is first
+ * called (most likely on server startup).
+ *
+ * @return the VCS type.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: "Git", "SVN", "Exported"
+ */
+const char *sysinfo_vcstype(void) {
+ return sysinfo->p->vcstype_name;
+}
+
+/**
+ * Returns the Version Control System revision.
+ *
+ * On platforms other than Windows (MSVC), this information is cached at
+ * compile time for better reliability. On Windows (MSVC), it is cached when
+ * the function is first called (most likely on server startup), so it may
+ * diverge from the actual revision that was compiled.
+ *
+ * @return the VCS revision.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: Git: "9128feccf3bddda94a7f8a170305565416815b40", SVN: "17546"
+ */
+const char *sysinfo_vcsrevision_src(void) {
+ return sysinfo->p->vcsrevision_src;
+}
+
+/**
+ * Returns the Version Control System revision.
+ *
+ * This information is cached during a script reload, so that it matches the
+ * version of the loaded scripts.
+ *
+ * @return the VCS revision.
+ *
+ * Note: Ownership is NOT transferred, the value should not be freed.
+ *
+ * Output example: Git: "9128feccf3bddda94a7f8a170305565416815b40", SVN: "17546"
+ */
+const char *sysinfo_vcsrevision_scripts(void) {
+ return sysinfo->p->vcsrevision_scripts;
+}
+
+/**
+ * Reloads the run-time (scripts) VCS revision information. To be used during
+ * script reloads to refresh the cached version.
+ */
+void sysinfo_vcsrevision_reload(void) {
+ if (sysinfo->p->vcsrevision_scripts != NULL) {
+ aFree(sysinfo->p->vcsrevision_scripts);
+ sysinfo->p->vcsrevision_scripts = NULL;
+ }
+ // Try Git, then SVN
+ if (sysinfo_git_get_revision(&sysinfo->p->vcsrevision_scripts)) {
+ return;
+ }
+ if (sysinfo_svn_get_revision(&sysinfo->p->vcsrevision_scripts)) {
+ return;
+ }
+ sysinfo->p->vcsrevision_scripts = aStrdup("Unknown");
+}
+
+/**
+ * Checks if we're running (unnecessarily) as superuser.
+ *
+ * @retval true if the current process is running as UNIX super-user.
+ * @retval false if the current process is running as regular user, or
+ * in any case under Windows.
+ */
+bool sysinfo_is_superuser(void) {
+#ifndef _WIN32
+ if (geteuid() == 0)
+ return true;
+#endif
+ return false;
+}
+
+/**
+ * Interface runtime initialization.
+ */
+void sysinfo_init(void) {
+ sysinfo->p->compiler = SYSINFO_COMPILER;
+#ifdef WIN32
+ sysinfo->p->platform = "Windows";
+ sysinfo->p->cflags = "N/A";
+ sysinfo_osversion_retrieve();
+ sysinfo_cpu_retrieve();
+ sysinfo_arch_retrieve();
+ sysinfo_vcsrevision_src_retrieve();
+#else
+ sysinfo->p->platform = SYSINFO_PLATFORM;
+ sysinfo->p->osversion = SYSINFO_OSVERSION;
+ sysinfo->p->cpucores = SYSINFO_CPUCORES;
+ sysinfo->p->cpu = SYSINFO_CPU;
+ sysinfo->p->arch = SYSINFO_ARCH;
+ sysinfo->p->cflags = SYSINFO_CFLAGS;
+ sysinfo->p->vcstype = SYSINFO_VCSTYPE;
+ sysinfo->p->vcsrevision_src = SYSINFO_VCSREV;
+#endif
+ sysinfo->vcsrevision_reload();
+ sysinfo_vcstype_name_retrieve(); // Must be called after setting vcstype
+}
+
+/**
+ * Interface shutdown cleanup.
+ */
+void sysinfo_final(void) {
+#ifdef WIN32
+ // Only need to be free'd in win32, they're #defined elsewhere
+ if (sysinfo->p->osversion)
+ aFree(sysinfo->p->osversion);
+ if (sysinfo->p->cpu)
+ aFree(sysinfo->p->cpu);
+ if (sysinfo->p->arch)
+ aFree(sysinfo->p->arch);
+ if (sysinfo->p->vcsrevision_src)
+ aFree(sysinfo->p->vcsrevision_src);
+#endif
+ sysinfo->p->platform = NULL;
+ sysinfo->p->osversion = NULL;
+ sysinfo->p->cpu = NULL;
+ sysinfo->p->arch = NULL;
+ sysinfo->p->vcsrevision_src = NULL;
+ sysinfo->p->cflags = NULL;
+ if (sysinfo->p->vcsrevision_scripts)
+ aFree(sysinfo->p->vcsrevision_scripts);
+ sysinfo->p->vcsrevision_scripts = NULL;
+ if (sysinfo->p->vcstype_name)
+ aFree(sysinfo->p->vcstype_name);
+ sysinfo->p->vcstype_name = NULL;
+}
+
+/**
+ * Interface default values initialization.
+ */
+void sysinfo_defaults(void) {
+ sysinfo = &sysinfo_s;
+ memset(&sysinfo_p, '\0', sizeof(sysinfo_p));
+ sysinfo->p = &sysinfo_p;
+
+ sysinfo->platform = sysinfo_platform;
+ sysinfo->osversion = sysinfo_osversion;
+ sysinfo->cpu = sysinfo_cpu;
+ sysinfo->cpucores = sysinfo_cpucores;
+ sysinfo->arch = sysinfo_arch;
+ sysinfo->is64bit = sysinfo_is64bit;
+ sysinfo->compiler = sysinfo_compiler;
+ sysinfo->cflags = sysinfo_cflags;
+ sysinfo->vcstype = sysinfo_vcstype;
+ sysinfo->vcstypeid = sysinfo_vcstypeid;
+ sysinfo->vcsrevision_src = sysinfo_vcsrevision_src;
+ sysinfo->vcsrevision_scripts = sysinfo_vcsrevision_scripts;
+ sysinfo->vcsrevision_reload = sysinfo_vcsrevision_reload;
+ sysinfo->is_superuser = sysinfo_is_superuser;
+ sysinfo->init = sysinfo_init;
+ sysinfo->final = sysinfo_final;
+}
diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h
new file mode 100644
index 000000000..17faac26b
--- /dev/null
+++ b/src/common/sysinfo.h
@@ -0,0 +1,62 @@
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Base Author: Haru @ http://hercules.ws
+
+#ifndef _COMMON_SYSINFO_H_
+#define _COMMON_SYSINFO_H_
+
+/**
+ * Provides various bits of information about the system Hercules is running on
+ * (note: on unix systems, to avoid runtime detection, most of the data is
+ * cached at compile time)
+ */
+
+#include "../common/cbasetypes.h"
+
+#ifdef _COMMON_SYSINFO_P_
+struct sysinfo_private {
+ char *platform;
+ char *osversion;
+ char *cpu;
+ int cpucores;
+ char *arch;
+ char *compiler;
+ char *cflags;
+ char *vcstype_name;
+ int vcstype;
+ char *vcsrevision_src;
+ char *vcsrevision_scripts;
+};
+#else
+struct sysinfo_private;
+#endif
+
+/**
+ * sysinfo.c interface
+ **/
+struct sysinfo_interface {
+ struct sysinfo_private *p;
+
+ const char *(*platform) (void);
+ const char *(*osversion) (void);
+ const char *(*cpu) (void);
+ int (*cpucores) (void);
+ const char *(*arch) (void);
+ bool (*is64bit) (void);
+ const char *(*compiler) (void);
+ const char *(*cflags) (void);
+ const char *(*vcstype) (void);
+ int (*vcstypeid) (void);
+ const char *(*vcsrevision_src) (void);
+ const char *(*vcsrevision_scripts) (void);
+ void (*vcsrevision_reload) (void);
+ bool (*is_superuser) (void);
+ void (*init) (void);
+ void (*final) (void);
+};
+
+struct sysinfo_interface *sysinfo;
+
+void sysinfo_defaults(void);
+
+#endif /* _COMMON_SYSINFO_H_ */
diff --git a/src/common/timer.h b/src/common/timer.h
index ab3ffc21f..1ce8cf203 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_TIMER_H_
-#define _COMMON_TIMER_H_
+#ifndef _COMMON_TIMER_H_
+#define _COMMON_TIMER_H_
#include "../common/cbasetypes.h"
diff --git a/src/login/Makefile.in b/src/login/Makefile.in
index fa5f92105..033dad25b 100644
--- a/src/login/Makefile.in
+++ b/src/login/Makefile.in
@@ -1,9 +1,12 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
+SYSINFO_INC = $(COMMON_D)/sysinfo.inc
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
@@ -23,7 +26,7 @@ LOGIN_H = login.h account.h ipban.h loginlog.h
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- LOGIN_SERVER_SQL_DEPENDS=$(LOGIN_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ)
+ LOGIN_SERVER_SQL_DEPENDS=$(LOGIN_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ $(SYSINFO_INC))
else
LOGIN_SERVER_SQL_DEPENDS=needs_mysql
endif
@@ -62,6 +65,10 @@ help:
Makefile: Makefile.in
@$(MAKE) -C ../.. src/login/Makefile
+$(SYSINFO_INC): $(LOGIN_C) $(LOGIN_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
diff --git a/src/map/Makefile.in b/src/map/Makefile.in
index e3a47abeb..e4f2d9953 100644
--- a/src/map/Makefile.in
+++ b/src/map/Makefile.in
@@ -1,9 +1,12 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
+SYSINFO_INC = $(COMMON_D)/sysinfo.inc
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
@@ -33,7 +36,7 @@ MAP_H = atcommand.h battle.h battleground.h buyingstore.h chat.h chrif.h \
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- MAP_SERVER_SQL_DEPENDS=$(MAP_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ)
+ MAP_SERVER_SQL_DEPENDS=$(MAP_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ $(SYSINFO_INC))
else
MAP_SERVER_SQL_DEPENDS=needs_mysql
endif
@@ -79,6 +82,10 @@ help:
Makefile: Makefile.in
@$(MAKE) -C ../.. src/map/Makefile
+$(SYSINFO_INC): $(MAP_C) $(MAP_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
needs_mysql:
@echo "MySQL not found or disabled by the configure script"
@exit 1
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 09159c3f7..5fd0faf86 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -14,6 +14,7 @@
#include "../common/strlib.h"
#include "../common/utils.h"
#include "../common/conf.h"
+#include "../common/sysinfo.h"
#include "atcommand.h"
#include "battle.h"
@@ -403,6 +404,11 @@ ACMD(mapmove) {
clif->message(fd, msg_txt(1)); // Map not found.
return false;
}
+
+ if( sd->bl.m == m && sd->bl.x == x && sd->bl.y == y ) {
+ clif->message(fd, msg_txt(253)); // You already are at your destination!
+ return false;
+ }
if ((x || y) && map->getcell(m, x, y, CELL_CHKNOPASS) && pc_get_group_level(sd) < battle_config.gm_ignore_warpable_area) {
//This is to prevent the pc->setpos call from printing an error.
@@ -460,12 +466,22 @@ ACMD(where) {
*------------------------------------------*/
ACMD(jumpto) {
struct map_session_data *pl_sd = NULL;
-
+
if (!message || !*message) {
clif->message(fd, msg_txt(911)); // Please enter a player name (usage: @jumpto/@warpto/@goto <char name/ID>).
return false;
}
-
+
+ if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
+ clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map.
+ return false;
+ }
+
+ if( pc_isdead(sd) ) {
+ clif->message(fd, msg_txt(864)); // "You cannot use this command when dead."
+ return false;
+ }
+
if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
clif->message(fd, msg_txt(3)); // Character not found.
return false;
@@ -475,21 +491,16 @@ ACMD(jumpto) {
clif->message(fd, msg_txt(247)); // You are not authorized to warp to this map.
return false;
}
-
- if (sd->bl.m >= 0 && map->list[sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) {
- clif->message(fd, msg_txt(248)); // You are not authorized to warp from your current map.
- return false;
- }
-
- if( pc_isdead(sd) ) {
- clif->message(fd, msg_txt(864)); // "You cannot use this command when dead."
+
+ if( pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y ) {
+ clif->message(fd, msg_txt(253)); // You already are at your destination!
return false;
}
-
+
pc->setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
sprintf(atcmd_output, msg_txt(4), pl_sd->status.name); // Jumped to %s
- clif->message(fd, atcmd_output);
-
+ clif->message(fd, atcmd_output);
+
return true;
}
@@ -520,6 +531,11 @@ ACMD(jump)
if (!map->search_freecell(NULL, sd->bl.m, &x, &y, 10, 10, 1))
x = y = 0; //Invalid cell, use random spot.
}
+
+ if( x && y && sd->bl.x == x && sd->bl.y == y ) {
+ clif->message(fd, msg_txt(253)); // You already are at your destination!
+ return false;
+ }
pc->setpos(sd, sd->mapindex, x, y, CLR_TELEPORT);
sprintf(atcmd_output, msg_txt(5), sd->bl.x, sd->bl.y); // Jumped to %d %d
@@ -824,7 +840,11 @@ ACMD(guildstorage)
return false;
}
- gstorage->open(sd);
+ if( gstorage->open(sd) ) {
+ clif->message(fd, msg_txt(1201)); // Your guild's storage has already been opened by another member, try again later.
+ return false;
+ }
+
clif->message(fd, msg_txt(920)); // Guild storage opened.
return true;
}
@@ -2353,7 +2373,11 @@ ACMD(zeny)
if((ret=pc->payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL)) == 1)
clif->message(fd, msg_txt(41)); // Unable to decrease the number/value.
}
- if(!ret) clif->message(fd, msg_txt(176)); //ret=0 mean cmd success
+
+ if( ret ) //ret != 0 means cmd failure
+ return false;
+
+ clif->message(fd, msg_txt(176));
return true;
}
@@ -5183,9 +5207,10 @@ ACMD(clearcart)
return false;
}
- if (sd->state.vending == 1) { //Somehow...
- return false;
- }
+ if( sd->state.vending == 1 ) {
+ clif->message(fd, msg_txt(548)); // You can't clean a cart while vending!
+ return false;
+ }
for( i = 0; i < MAX_CART; i++ )
if(sd->status.cart[i].nameid > 0)
@@ -6673,20 +6698,29 @@ ACMD(showmobs)
int number = 0;
struct s_mapiterator* it;
- if(sscanf(message, "%99[^\n]", mob_name) < 0)
+ if( sscanf(message, "%99[^\n]", mob_name) < 0 ) {
+ clif->message(fd, msg_txt(546)); // Please enter a mob name/id (usage: @showmobs <mob name/id>)
return false;
-
- if((mob_id = atoi(mob_name)) == 0)
+ }
+
+ if( (mob_id = atoi(mob_name)) == 0 )
mob_id = mob->db_searchname(mob_name);
+
+ if( mob_id == 0 ) {
+ snprintf(atcmd_output, sizeof atcmd_output, msg_txt(547), mob_name); // Invalid mob name %s!
+ clif->message(fd, atcmd_output);
+ return false;
+ }
+
if(mob_id > 0 && mob->db_checkid(mob_id) == 0){
snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1250),mob_name); // Invalid mob id %s!
clif->message(fd, atcmd_output);
- return true;
+ return false;
}
if(mob->db(mob_id)->status.mode&MD_BOSS && !pc_has_permission(sd, PC_PERM_SHOW_BOSS)){ // If player group does not have access to boss mobs.
clif->message(fd, msg_txt(1251)); // Can't show boss mobs!
- return true;
+ return false;
}
if(mob_id == atoi(mob_name) && mob->db(mob_id)->jname)
@@ -7208,18 +7242,11 @@ ACMD(whereis)
}
ACMD(version) {
- const char *git = get_git_hash();
- const char *svn = get_svn_revision();
-
- if ( git[0] != HERC_UNKNOWN_VER ) {
- sprintf(atcmd_output,msg_txt(1295),git); // Git Hash '%s'
- clif->message(fd,atcmd_output);
- } else if ( svn[0] != HERC_UNKNOWN_VER ) {
- sprintf(atcmd_output,msg_txt(1294),git); // SVN r%s
- clif->message(fd,atcmd_output);
- } else
- clif->message(fd,msg_txt(1296)); // Cannot determine version
-
+ sprintf(atcmd_output, msg_txt(1296), sysinfo->is64bit() ? 64 : 32, sysinfo->platform()); // Hercules %d-bit for %s
+ clif->message(fd, atcmd_output);
+ sprintf(atcmd_output, msg_txt(1295), sysinfo->vcstype(), sysinfo->vcsrevision_src(), sysinfo->vcsrevision_scripts()); // %s revision '%s' (src) / '%s' (scripts)
+ clif->message(fd, atcmd_output);
+
return true;
}
@@ -9954,6 +9981,11 @@ bool atcommand_exec(const int fd, struct map_session_data *sd, const char *messa
//Attempt to use the command
if ( (info->func(fd, (*atcmd_msg == atcommand->at_symbol) ? sd : ssd, command, params,info) != true) ) {
+#ifdef AUTOTRADE_PERSISTENCY
+ // Autotrade was successful if standalone is set
+ if( ((*atcmd_msg == atcommand->at_symbol) ? sd->state.standalone : ssd->state.standalone) )
+ return true;
+#endif
sprintf(output,msg_txt(154), command); // %s failed.
clif->message(fd, output);
return true;
diff --git a/src/map/battle.c b/src/map/battle.c
index 2217ccecc..001553f1c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -12,6 +12,7 @@
#include "../common/socket.h"
#include "../common/strlib.h"
#include "../common/utils.h"
+#include "../common/sysinfo.h"
#include "../common/HPM.h"
#include "map.h"
@@ -6711,8 +6712,9 @@ static const struct _battle_data {
/**
* rAthena
**/
- { "max_third_parameter", &battle_config.max_third_parameter, 120, 10, 10000, },
- { "max_baby_third_parameter", &battle_config.max_baby_third_parameter, 108, 10, 10000, },
+ { "max_third_parameter", &battle_config.max_third_parameter, 130, 10, 10000, },
+ { "max_baby_third_parameter", &battle_config.max_baby_third_parameter, 117, 10, 10000, },
+ { "max_extended_parameter", &battle_config.max_extended_parameter, 125, 10, 10000, },
{ "atcommand_max_stat_bypass", &battle_config.atcommand_max_stat_bypass, 0, 0, 100, },
{ "skill_amotion_leniency", &battle_config.skill_amotion_leniency, 90, 0, 300 },
{ "mvp_tomb_enabled", &battle_config.mvp_tomb_enabled, 1, 0, 1 },
@@ -6748,8 +6750,6 @@ static const struct _battle_data {
void Hercules_report(char* date, char *time_c) {
int i, bd_size = ARRAYLENGTH(battle_data);
unsigned int config = 0;
- const char *svn = get_svn_revision();
- const char *git = get_git_hash();
char timestring[25];
time_t curtime;
char* buf;
@@ -6757,7 +6757,7 @@ void Hercules_report(char* date, char *time_c) {
enum config_table {
C_CIRCULAR_AREA = 0x0001,
C_CELLNOSTACK = 0x0002,
- C_CONSOLE_INPUT = 0x0004,
+ C_CONSOLE_INPUT = 0x0004,
C_SCRIPT_CALLFUNC_CHECK = 0x0008,
C_OFFICIAL_WALKPATH = 0x0010,
C_RENEWAL = 0x0020,
@@ -6768,12 +6768,15 @@ void Hercules_report(char* date, char *time_c) {
C_RENEWAL_EDP = 0x0400,
C_RENEWAL_ASPD = 0x0800,
C_SECURE_NPCTIMEOUT = 0x1000,
- C_SQL_DBS = 0x2000,
+ C_SQL_DB_ITEM = 0x2000,
C_SQL_LOGS = 0x4000,
- C_MEMWATCH = 0x8000,
- C_DMALLOC = 0x10000,
- C_GCOLLECT = 0x20000,
- C_SEND_SHORTLIST = 0x40000,
+ C_MEMWATCH = 0x8000,
+ C_DMALLOC = 0x10000,
+ C_GCOLLECT = 0x20000,
+ C_SEND_SHORTLIST = 0x40000,
+ C_SQL_DB_MOB = 0x80000,
+ C_SQL_DB_MOBSKILL = 0x100000,
+ C_PACKETVER_RE = 0x200000,
};
/* we get the current time */
@@ -6831,10 +6834,18 @@ void Hercules_report(char* date, char *time_c) {
#ifdef SECURE_NPCTIMEOUT
config |= C_SECURE_NPCTIMEOUT;
#endif
+
+#ifdef PACKETVER_RE
+ config |= C_PACKETVER_RE
+#endif
/* non-define part */
- if( map->db_use_sql_item_db || map->db_use_sql_mob_db || map->db_use_sql_mob_skill_db )
- config |= C_SQL_DBS; //TODO: split this config into three.
+ if( map->db_use_sql_item_db )
+ config |= C_SQL_DB_ITEM;
+ if( map->db_use_sql_mob_db )
+ config |= C_SQL_DB_MOB;
+ if( map->db_use_sql_mob_skill_db )
+ config |= C_SQL_DB_MOBSKILL;
if( logs->config.sql_logs )
config |= C_SQL_LOGS;
@@ -6855,30 +6866,40 @@ void Hercules_report(char* date, char *time_c) {
#define BFLAG_LENGTH 35
- CREATE(buf, char, 6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) + 1 );
+ CREATE(buf, char, 262 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) + 1 );
/* build packet */
WBUFW(buf,0) = 0x3000;
- WBUFW(buf,2) = 6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) );
- WBUFW(buf,4) = 0x9e;
+ WBUFW(buf,2) = 262 + ( bd_size * ( BFLAG_LENGTH + 4 ) );
+ WBUFW(buf,4) = 0x9f;
safestrncpy((char*)WBUFP(buf,6), date, 12);
- safestrncpy((char*)WBUFP(buf,6 + 12), time_c, 9);
- safestrncpy((char*)WBUFP(buf,6 + 12 + 9), timestring, 24);
-
- safestrncpy((char*)WBUFP(buf,6 + 12 + 9 + 24), git[0] != HERC_UNKNOWN_VER ? git : svn[0] != HERC_UNKNOWN_VER ? svn : "Unknown", 41);
- WBUFL(buf,6 + 12 + 9 + 24 + 41) = map->getusers();
-
- WBUFL(buf,6 + 12 + 9 + 24 + 41 + 4) = config;
- WBUFL(buf,6 + 12 + 9 + 24 + 41 + 4 + 4) = bd_size;
-
+ safestrncpy((char*)WBUFP(buf,18), time_c, 9);
+ safestrncpy((char*)WBUFP(buf,27), timestring, 24);
+
+ safestrncpy((char*)WBUFP(buf,51), sysinfo->platform(), 16);
+ safestrncpy((char*)WBUFP(buf,67), sysinfo->osversion(), 50);
+ safestrncpy((char*)WBUFP(buf,117), sysinfo->cpu(), 32);
+ WBUFL(buf,149) = sysinfo->cpucores();
+ safestrncpy((char*)WBUFP(buf,153), sysinfo->arch(), 8);
+ WBUFB(buf,161) = sysinfo->vcstypeid();
+ WBUFB(buf,162) = sysinfo->is64bit();
+ safestrncpy((char*)WBUFP(buf,163), sysinfo->vcsrevision_src(), 41);
+ safestrncpy((char*)WBUFP(buf,204), sysinfo->vcsrevision_scripts(), 41);
+ WBUFB(buf,245) = (sysinfo->is_superuser()? 1 : 0);
+ WBUFL(buf,246) = map->getusers();
+
+ WBUFL(buf,250) = config;
+ WBUFL(buf,254) = PACKETVER;
+
+ WBUFL(buf,258) = bd_size;
for( i = 0; i < bd_size; i++ ) {
- safestrncpy((char*)WBUFP(buf,6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + ( i * ( BFLAG_LENGTH + 4 ) ) ), battle_data[i].str, 35);
- WBUFL(buf,6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + BFLAG_LENGTH + ( i * ( BFLAG_LENGTH + 4 ) ) ) = *battle_data[i].val;
+ safestrncpy((char*)WBUFP(buf,262 + ( i * ( BFLAG_LENGTH + 4 ) ) ), battle_data[i].str, BFLAG_LENGTH);
+ WBUFL(buf,262 + BFLAG_LENGTH + ( i * ( BFLAG_LENGTH + 4 ) ) ) = *battle_data[i].val;
}
- chrif->send_report(buf, 6 + 12 + 9 + 24 + 41 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) );
+ chrif->send_report(buf, 262 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) );
aFree(buf);
diff --git a/src/map/battle.h b/src/map/battle.h
index b57476cb4..88038ddb4 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -437,6 +437,7 @@ struct Battle_Config {
// rAthena
int max_third_parameter;
int max_baby_third_parameter;
+ int max_extended_parameter;
int atcommand_max_stat_bypass;
int max_third_aspd;
int vcast_stat_scale;
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 80ee50a20..99a1935fd 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -841,57 +841,18 @@ bool chrif_char_ask_name_answer(int acc, const char* player_name, uint16 type, u
* Request char server to change sex of char (modified by Yor)
*------------------------------------------*/
void chrif_changedsex(int fd) {
- int acc, sex;
- struct map_session_data *sd;
-
- acc = RFIFOL(fd,2);
- sex = RFIFOL(fd,6);
+ int acc = RFIFOL(fd,2);
+ //int sex = RFIFOL(fd,6); // Dead store. Uncomment if needed again.
if ( battle_config.etc_log )
ShowNotice("chrif_changedsex %d.\n", acc);
-
- sd = map->id2sd(acc);
- if ( sd ) { //Normally there should not be a char logged on right now!
- if ( sd->status.sex == sex )
- return; //Do nothing? Likely safe.
- sd->status.sex = !sd->status.sex;
-
- // reset skill of some job
- if ((sd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER) {
- int i, idx = 0;
- // remove specifical skills of Bard classes
- for(i = 315; i <= 322; i++) {
- idx = skill->get_index(i);
- if (sd->status.skill[idx].id > 0 && sd->status.skill[idx].flag == SKILL_FLAG_PERMANENT) {
- sd->status.skill_point += sd->status.skill[idx].lv;
- sd->status.skill[idx].id = 0;
- sd->status.skill[idx].lv = 0;
- }
- }
- // remove specifical skills of Dancer classes
- for(i = 323; i <= 330; i++) {
- idx = skill->get_index(i);
- if (sd->status.skill[idx].id > 0 && sd->status.skill[idx].flag == SKILL_FLAG_PERMANENT) {
- sd->status.skill_point += sd->status.skill[idx].lv;
- sd->status.skill[idx].id = 0;
- sd->status.skill[idx].lv = 0;
- }
- }
- clif->updatestatus(sd, SP_SKILLPOINT);
- // change job if necessary
- if (sd->status.sex) //Changed from Dancer
- sd->status.class_ -= 1;
- else //Changed from Bard
- sd->status.class_ += 1;
- //sd->class_ needs not be updated as both Dancer/Bard are the same.
- }
- // save character
- sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
- // do same modify in login-server for the account, but no in char-server (it ask again login_id1 to login, and don't remember it)
- clif->message(sd->fd, msg_txt(409)); //"Your sex has been changed (disconnection required to complete the process)..."
- set_eof(sd->fd); // forced to disconnect for the change
- map->quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X]
- }
+
+ // Path to activate this response:
+ // Map(start) (0x2b0e) -> Char(0x2727) -> Login
+ // Login(0x2723) [ALL] -> Char (0x2b0d)[ALL] -> Map (HERE)
+ // Char will usually be "logged in" despite being forced to log-out in the begining
+ // of this process, but there's no need to perform map-server specific response
+ // as everything should've been changed through char-server [Panikon]
}
/*==========================================
* Request Char Server to Divorce Players
diff --git a/src/map/clif.c b/src/map/clif.c
index 2dbe7cb96..d0fb08486 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3204,6 +3204,12 @@ void clif_changelook(struct block_list *bl,int type,int val)
break;
case LOOK_BASE:
if( !sd ) break;
+ // We shouldn't update LOOK_BASE if the player is disguised
+ // if we do so the client will think that the player class
+ // is really a mob and issues like 7725 will happen in every
+ // SC_ that alters class_ in any way [Panikon]
+ if( sd->disguise != -1 )
+ return;
if( sd->sc.option&OPTION_COSTUME )
vd->weapon = vd->shield = 0;
@@ -8474,6 +8480,26 @@ void clif_refresh(struct map_session_data *sd)
pc->disguise(sd, disguise);
}
+ // Notify the client that the storage is open
+ if( sd->state.storage_flag == 1 ) {
+ storage->sortitem(sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
+ clif->storagelist(sd, sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
+ clif->updatestorageamount(sd, sd->status.storage.storage_amount, MAX_STORAGE);
+ }
+ // Notify the client that the gstorage is open otherwise it will
+ // remain locked forever and nobody will be able to access it
+ if( sd->state.storage_flag == 2 ) {
+ struct guild_storage *gstor;
+ if( (gstor = gstorage->id2storage2(sd->status.guild_id)) == NULL) {
+ // Shouldn't happen... The information should already be at the map-server
+ intif->request_guild_storage(sd->status.account_id,sd->status.guild_id);
+ } else {
+ storage->sortitem(gstor->items, ARRAYLENGTH(gstor->items));
+ clif->storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items));
+ clif->updatestorageamount(sd, gstor->storage_amount, MAX_GUILD_STORAGE);
+ }
+ }
+
}
@@ -9231,6 +9257,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
#if PACKETVER >= 20090218
int i;
#endif
+ bool first_time = false;
if(sd->bl.prev != NULL)
return;
@@ -9391,6 +9418,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
if(sd->state.connect_new) {
int lv;
+ first_time = true;
sd->state.connect_new = 0;
clif->skillinfoblock(sd);
clif->hotkeys(sd);
@@ -9531,6 +9559,10 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
clif->weather_check(sd);
+ // This should be displayed last
+ if( sd->guild && first_time )
+ clif->guild_notice(sd, sd->guild);
+
// For automatic triggering of NPCs after map loading (so you don't need to walk 1 step first)
if (map->getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNPC))
npc->touch_areanpc(sd,sd->bl.m,sd->bl.x,sd->bl.y);
@@ -10089,7 +10121,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
return;
}
- if( pc_cant_act(sd) || sd->sc.option&OPTION_HIDE )
+ if( pc_cant_act(sd) || pc_issit(sd) || sd->sc.option&OPTION_HIDE )
return;
if( sd->sc.option&OPTION_COSTUME )
@@ -11321,8 +11353,18 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
#endif
return;
}
- if( pc_cant_act(sd) && skill_id != RK_REFRESH && !(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN)) )
+
+ if( pc_cant_act(sd)
+ && skill_id != RK_REFRESH
+ && !(skill_id == SR_GENTLETOUCH_CURE && (sd->sc.opt1 == OPT1_STONE || sd->sc.opt1 == OPT1_FREEZE || sd->sc.opt1 == OPT1_STUN))
+ && ( sd->state.storage_flag && !(tmp&INF_SELF_SKILL) ) // SELF skills can be used with the storage open, issue: 8027
+ )
return;
+
+ // Some self skills need to close the storage to work properly
+ if( skill_id == AL_TELEPORT && sd->state.storage_flag )
+ storage->close(sd);
+
if( pc_issit(sd) )
return;
diff --git a/src/map/guild.c b/src/map/guild.c
index 15d13da0b..99c74c217 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -954,7 +954,6 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online)
if(sd->state.connect_new)
{ //Note that this works because it is invoked in parse_LoadEndAck before connect_new is cleared.
clif->guild_belonginfo(sd,g);
- clif->guild_notice(sd,g);
sd->guild_emblem_id = g->emblem_id;
}
return 0;
diff --git a/src/map/map.c b/src/map/map.c
index 9e41bdca3..04ac8a239 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3765,10 +3765,9 @@ struct map_zone_data *map_merge_zone(struct map_zone_data *main, struct map_zone
CREATE(zone->capped_skills, struct map_zone_skill_damage_cap_entry *, zone->capped_skills_count);
-
for(i = 0, cursor = 0; i < main->capped_skills_count; i++, cursor++ ) {
CREATE(zone->capped_skills[cursor], struct map_zone_skill_damage_cap_entry, 1);
- memcpy(zone->capped_skills[cursor], main->disabled_commands[i], sizeof(struct map_zone_skill_damage_cap_entry));
+ memcpy(zone->capped_skills[cursor], main->capped_skills[i], sizeof(struct map_zone_skill_damage_cap_entry));
}
for(i = 0; i < other->capped_skills_count; i++, cursor++ ) {
@@ -5373,9 +5372,6 @@ void map_helpscreen(bool do_exit)
* Map-Server Version Screen [MC Cameri]
*------------------------------------------------------*/
void map_versionscreen(bool do_exit) {
- const char *svn = get_svn_revision();
- const char *git = get_git_hash();
- ShowInfo(CL_WHITE"Hercules version: %s" CL_RESET"\n", git[0] != HERC_UNKNOWN_VER ? git : svn[0] != HERC_UNKNOWN_VER ? svn : "Unknown");
ShowInfo(CL_GREEN"Website/Forum:"CL_RESET"\thttp://hercules.ws/\n");
ShowInfo(CL_GREEN"IRC Channel:"CL_RESET"\tirc://irc.rizon.net/#Hercules\n");
ShowInfo("Open "CL_WHITE"readme.txt"CL_RESET" for more information.\n");
@@ -5808,7 +5804,7 @@ int do_init(int argc, char *argv[])
if (load_extras) {
aFree(load_extras);
load_extras = NULL;
- load_extras_count = 0;
+ //load_extras_count = 0; // Dead store. Uncomment if needed again.
}
if( minimal ) {
diff --git a/src/map/map.h b/src/map/map.h
index c1eaeb40d..7373b516d 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -36,7 +36,7 @@ enum E_MAPSERVER_ST {
#define NATURAL_HEAL_INTERVAL 500
#define MIN_FLOORITEM 2
#define MAX_FLOORITEM START_ACCOUNT_NUM
-#define MAX_LEVEL 150
+#define MAX_LEVEL 175
#define MAX_IGNORE_LIST 20 // official is 14
#define MAX_VENDING 12
#define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo]
diff --git a/src/map/npc.c b/src/map/npc.c
index 3018cceeb..ae374e961 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1146,13 +1146,24 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd)
{
nullpo_retr(1, sd);
+ // This usually happens when the player clicked on a NPC that has the view id
+ // of a mob, to activate this kind of npc it's needed to be in a 2,2 range
+ // from it. If the OnTouch area of a npc, coincides with the 2,2 range of
+ // another it's expected that the OnTouch event be put first in stack, because
+ // unit_walktoxy_timer is executed before any other function in this case.
+ // So it's best practice to put an 'end;' before OnTouch events in npcs that
+ // have view ids of mobs to avoid this "issue" [Panikon]
if (sd->npc_id != 0) {
- ShowError("npc_click: npc_id != 0\n");
+ // The player clicked a npc after entering an OnTouch area
+ if( sd->areanpc_id != sd->npc_id )
+ ShowError("npc_click: npc_id != 0\n");
+
return 1;
}
- if(!nd) return 1;
-
+ if( !nd )
+ return 1;
+
if ((nd = npc->checknear(sd,&nd->bl)) == NULL)
return 1;
diff --git a/src/map/pc.c b/src/map/pc.c
index f5327e0bd..ba66bf7db 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -14,6 +14,7 @@
#include "../common/utils.h"
#include "../common/conf.h"
#include "../common/mmo.h" //NAME_LENGTH
+#include "../common/sysinfo.h"
#include "pc.h"
#include "atcommand.h" // get_atcommand_level()
@@ -1147,15 +1148,8 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
if( !changing_mapservers ) {
if (battle_config.display_version == 1) {
- const char* svn = get_svn_revision();
- const char* git = get_git_hash();
char buf[256];
- if( git[0] != HERC_UNKNOWN_VER )
- sprintf(buf,"Git Hash: %s", git);
- else if( svn[0] != HERC_UNKNOWN_VER )
- sprintf(buf,"SVN Revision: %s", svn);
- else
- sprintf(buf,"Unknown Version");
+ sprintf(buf, msg_txt(1295), sysinfo->vcstype(), sysinfo->vcsrevision_src(), sysinfo->vcsrevision_scripts()); // %s revision '%s' (src) / '%s' (scripts)
clif->message(sd->fd, buf);
}
@@ -1758,6 +1752,13 @@ int pc_disguise(struct map_session_data *sd, int class_) {
status->set_viewdata(&sd->bl, class_);
clif->changeoption(&sd->bl);
+ // We need to update the client so it knows that a costume is being used
+ if( sd->sc.option&OPTION_COSTUME ) {
+ clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_);
+ clif->changelook(&sd->bl,LOOK_WEAPON,0);
+ clif->changelook(&sd->bl,LOOK_SHIELD,0);
+ clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
+ }
if (sd->bl.prev != NULL) {
clif->spawn(&sd->bl);
@@ -6832,13 +6833,14 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
int i=0,j=0;
int64 tick = timer->gettick();
- for(j = 0; j < 5; j++)
+ for(j = 0; j < 5; j++) {
if (sd->devotion[j]){
struct map_session_data *devsd = map->id2sd(sd->devotion[j]);
if (devsd)
status_change_end(&devsd->bl, SC_DEVOTION, INVALID_TIMER);
sd->devotion[j] = 0;
}
+ }
if(sd->status.pet_id > 0 && sd->pd) {
struct pet_data *pd = sd->pd;
@@ -7136,6 +7138,17 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
}
}
+
+ // Remove autotrade to prevent autotrading from save point
+ if( (sd->state.standalone || sd->state.autotrade)
+ && (map->list[sd->bl.m].flag.pvp || map->list[sd->bl.m].flag.gvg)
+ ) {
+ sd->state.autotrade = 0;
+ sd->state.standalone = 0;
+ pc->autotrade_update(sd,PAUC_REMOVE);
+ map->quit(sd);
+ }
+
// pvp
// disable certain pvp functions on pk_mode [Valaris]
if( map->list[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map->list[sd->bl.m].flag.pvp_nocalcrank ) {
@@ -7165,10 +7178,10 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
}
-
//Reset "can log out" tick.
if( battle_config.prevent_logout )
sd->canlog_tick = timer->gettick() - battle_config.prevent_logout;
+
return 1;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index 90448fa1d..70df9ca56 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -545,32 +545,6 @@ struct map_session_data {
};
-//Equip position constants
-enum equip_pos {
- EQP_HEAD_LOW = 0x000001,
- EQP_HEAD_MID = 0x000200, //512
- EQP_HEAD_TOP = 0x000100, //256
- EQP_HAND_R = 0x000002, //2
- EQP_HAND_L = 0x000020, //32
- EQP_ARMOR = 0x000010, //16
- EQP_SHOES = 0x000040, //64
- EQP_GARMENT = 0x000004, //4
- EQP_ACC_L = 0x000008, //8
- EQP_ACC_R = 0x000080, //128
- EQP_COSTUME_HEAD_TOP = 0x000400, //1024
- EQP_COSTUME_HEAD_MID = 0x000800, //2048
- EQP_COSTUME_HEAD_LOW = 0x001000, //4096
- EQP_COSTUME_GARMENT = 0x002000, //8192
- //UNUSED_COSTUME_FLOOR = 0x004000, //16384
- EQP_AMMO = 0x008000, //32768
- EQP_SHADOW_ARMOR = 0x010000, //65536
- EQP_SHADOW_WEAPON = 0x020000, //131072
- EQP_SHADOW_SHIELD = 0x040000, //262144
- EQP_SHADOW_SHOES = 0x080000, //524288
- EQP_SHADOW_ACC_R = 0x100000, //1048576
- EQP_SHADOW_ACC_L = 0x200000, //2097152
-};
-
#define EQP_WEAPON EQP_HAND_R
#define EQP_SHIELD EQP_HAND_L
#define EQP_ARMS (EQP_HAND_R|EQP_HAND_L)
@@ -615,7 +589,7 @@ enum equip_pos {
#define pc_isinvisible(sd) ( (sd)->sc.option&OPTION_INVISIBLE )
#define pc_is50overweight(sd) ( (sd)->weight*100 >= (sd)->max_weight*battle_config.natural_heal_weight_rate )
#define pc_is90overweight(sd) ( (sd)->weight*10 >= (sd)->max_weight*9 )
-#define pc_maxparameter(sd) ( ((((sd)->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO) || (((sd)->class_&MAPID_UPPERMASK) == MAPID_REBELLION) || (sd)->class_&JOBL_THIRD ? ((sd)->class_&JOBL_BABY ? battle_config.max_baby_third_parameter : battle_config.max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter)) )
+#define pc_maxparameter(sd) ( (((sd)->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO || ((sd)->class_&MAPID_UPPERMASK) == MAPID_REBELLION || ((sd)->class_&MAPID_THIRDMASK) == MAPID_SUPER_NOVICE_E) ? battle_config.max_extended_parameter : (sd)->class_&JOBL_THIRD ? ((sd)->class_&JOBL_BABY ? battle_config.max_baby_third_parameter : battle_config.max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter) )
/**
* Ranger
**/
diff --git a/src/map/script.c b/src/map/script.c
index 312e40696..8ac657f93 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -12,6 +12,7 @@
#include "../common/strlib.h"
#include "../common/timer.h"
#include "../common/utils.h"
+#include "../common/sysinfo.h"
#include "map.h"
#include "path.h"
@@ -4499,6 +4500,8 @@ int script_reload(void) {
itemdb->name_constants();
+ sysinfo->vcsrevision_reload();
+
return 0;
}
/* returns name of current function being run, from within the stack [Ind/Hercules] */
@@ -17315,19 +17318,6 @@ BUILDIN(is_function) {
return true;
}
/**
- * get_revision() -> retrieves the current svn revision (if available)
- **/
-BUILDIN(get_revision) {
- const char *svn = get_svn_revision();
-
- if ( svn[0] != HERC_UNKNOWN_VER )
- script_pushint(st,atoi(svn));
- else
- script_pushint(st,-1);//unknown
-
- return true;
-}
-/**
* freeloop(<toggle>) -> toggles this script instance's looping-check ability
**/
BUILDIN(freeloop) {
@@ -19152,7 +19142,6 @@ void script_parse_builtin(void) {
BUILDIN_DEF(getargcount,""),
BUILDIN_DEF(getcharip,"?"),
BUILDIN_DEF(is_function,"s"),
- BUILDIN_DEF(get_revision,""),
BUILDIN_DEF(freeloop,"i"),
BUILDIN_DEF(getrandgroupitem,"ii"),
BUILDIN_DEF(cleanmap,"s"),
diff --git a/src/map/trade.h b/src/map/trade.h
index f2c0d4622..143f26d74 100644
--- a/src/map/trade.h
+++ b/src/map/trade.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_TRADE_H_
-#define _MAP_TRADE_H_
+#ifndef _MAP_TRADE_H_
+#define _MAP_TRADE_H_
//Max distance from traders to enable a trade to take place.
//TODO: battle_config candidate?
diff --git a/src/map/vending.h b/src/map/vending.h
index b2ba22955..a212f8385 100644
--- a/src/map/vending.h
+++ b/src/map/vending.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_VENDING_H_
-#define _MAP_VENDING_H_
+#ifndef _MAP_VENDING_H_
+#define _MAP_VENDING_H_
#include "../common/cbasetypes.h"
#include "../common/db.h"
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index f0932f518..626040e7a 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -2863,9 +2863,8 @@ int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) {
return retVal___;
}
enum bg_queue_types HP_bg_str2teamtype(const char *str) {
-/* Unknown return type 'enum bg_queue_types'. Initializing to '0'. */
int hIndex = 0;
- enum bg_queue_types retVal___ = 0;
+ enum bg_queue_types retVal___ = BGQT_INVALID;
if( HPMHooks.count.HP_bg_str2teamtype_pre ) {
enum bg_queue_types (*preHookFunc) (const char *str);
for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_pre; hIndex++ ) {
diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in
index 0f1698d2a..11e93973d 100644
--- a/src/plugins/Makefile.in
+++ b/src/plugins/Makefile.in
@@ -1,3 +1,6 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+
################ PLUGIN CONFIGURATION ##############################
# #
# When you add a plugin, add its name here: #
@@ -50,7 +53,7 @@ $(ALLPLUGINS): %: ../../plugins/%@DLLEXT@
buildclean:
@echo " CLEAN plugins (build temp files)"
@rm -rf *.o
-
+
clean: buildclean
@echo " CLEAN plugins"
@rm -rf ../../plugins/*@DLLEXT@
diff --git a/src/test/Makefile.in b/src/test/Makefile.in
index c70997c63..2ee4e29b7 100644
--- a/src/test/Makefile.in
+++ b/src/test/Makefile.in
@@ -1,9 +1,12 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
+SYSINFO_INC = $(COMMON_D)/sysinfo.inc
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
@@ -17,9 +20,10 @@ MT19937AR_OBJ = $(MT19937AR_D)/mt19937ar.o
MT19937AR_H = $(MT19937AR_D)/mt19937ar.h
MT19937AR_INCLUDE = -I$(MT19937AR_D)
-TEST_SPINLOCK_OBJ=obj/test_spinlock.o
-TEST_SPINLOCK_H=
-TEST_SPINLOCK_DEPENDS=$(TEST_SPINLOCK_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ)
+TEST_SPINLOCK_OBJ = obj/test_spinlock.o
+TEST_SPINLOCK_C = test_spinlock.c
+TEST_SPINLOCK_H =
+TEST_SPINLOCK_DEPENDS = $(TEST_SPINLOCK_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ $(SYSINFO_INC))
@SET_MAKE@
@@ -44,22 +48,25 @@ clean: buildclean
Makefile: Makefile.in
@$(MAKE) -C ../.. src/test/Makefile
+$(SYSINFO_INC): $(TEST_SPINLOCK_C) $(TEST_SPINLOCK_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
# object directories
obj:
@echo " MKDIR obj"
@-mkdir obj
-
+
#executables
test_spinlock: $(TEST_SPINLOCK_DEPENDS) Makefile
@echo " LD $@"
- @$(CC) @LDFLAGS@ -o ../../test_spinlock@EXEEXT@ $(TEST_SPINLOCK_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
- $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+ @$(CC) @LDFLAGS@ -o ../../test_spinlock@EXEEXT@ $(TEST_SPINLOCK_DEPENDS) @LIBS@ @MYSQL_LIBS@
-# login object files
+# object files
-obj/%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj
+obj/%.o: %.c $(TEST_SPINLOCK_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj
@echo " CC $<"
@$(CC) @CFLAGS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) -DWITH_SQL @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
@@ -67,7 +74,7 @@ obj/%.o: %.c $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj
$(COMMON_D)/obj_all/common.a:
@echo " MAKE $@"
@$(MAKE) -C $(COMMON_D) sql
-
+
$(COMMON_D)/obj_sql/common_sql.a:
@echo " MAKE $@"
@$(MAKE) -C $(COMMON_D) sql
diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in
index 3d0de1122..07b03e334 100644
--- a/src/tool/Makefile.in
+++ b/src/tool/Makefile.in
@@ -1,12 +1,12 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
CONFIG_D = ../config
CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
-COMMON_OBJ = $(addprefix $(COMMON_D)/obj_all/, des.o grfio.o malloc.o \
- nullpo.o miniconsole.o minicore.o showmsg.o strlib.o utils.o)
-COMMON_H = $(addprefix $(COMMON_D)/, cbasetypes.h console.h core.h des.h \
- grfio.h malloc.h mmo.h nullpo.h showmsg.h strlib.h utils.h)
+COMMON_H = $(wildcard $(COMMON_D)/*.h)
+SYSINFO_INC = $(COMMON_D)/sysinfo.inc
LIBCONFIG_D = ../../3rdparty/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
@@ -16,6 +16,9 @@ LIBCONFIG_H = $(addprefix $(LIBCONFIG_D)/, libconfig.h grammar.h parsectx.h \
LIBCONFIG_INCLUDE = -I$(LIBCONFIG_D)
MAPCACHE_OBJ = obj_all/mapcache.o
+MAPCACHE_C = mapcache.c
+MAPCACHE_H =
+MAPCACHE_DEPENDS = $(MAPCACHE_OBJ) $(COMMON_D)/obj_all/common_mini.a $(LIBCONFIG_OBJ $(SYSINFO_INC))
@SET_MAKE@
@@ -29,9 +32,9 @@ all: mapcache Makefile
mapcache: ../../mapcache@EXEEXT@
-../../mapcache@EXEEXT@: $(MAPCACHE_OBJ) $(COMMON_OBJ) $(LIBCONFIG_OBJ) Makefile
+../../mapcache@EXEEXT@: $(MAPCACHE_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @LDFLAGS@ $(LIBCONFIG_INCLUDE) -o ../../mapcache@EXEEXT@ $(MAPCACHE_OBJ) $(COMMON_OBJ) $(LIBCONFIG_OBJ) @LIBS@
+ @$(CC) @LDFLAGS@ -o ../../mapcache@EXEEXT@ $(MAPCACHE_DEPENDS) @LIBS@
buildclean:
@echo " CLEAN tool (build temp files)"
@@ -55,22 +58,22 @@ help:
Makefile: Makefile.in
@$(MAKE) -C ../.. src/tool/Makefile
+$(SYSINFO_INC): $(MAPCACHE_C) $(MAPCACHE_H) $(COMMON_H) $(CONFIG_H) $(LIBCONFIG_H)
+ @echo " MAKE $@"
+ @$(MAKE) -C ../.. sysinfo
+
obj_all:
@echo " MKDIR obj_all"
@-mkdir obj_all
-obj_all/%.o: %.c $(COMMON_H) $(CONFIG_H) $(LIBCONFIG_H) | obj_all
+obj_all/%.o: %.c $(MAPCACHE_H) $(COMMON_H) $(CONFIG_H) $(LIBCONFIG_H) | obj_all
@echo " CC $<"
@$(CC) @CFLAGS@ $(LIBCONFIG_INCLUDE) @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing common object files
-$(COMMON_D)/obj_all/%.o:
- @echo " MAKE $@"
- @$(MAKE) -C $(COMMON_D) sql
-
-$(COMMON_D)/obj_all/mini%.o:
+$(COMMON_D)/obj_all/common_mini.a:
@echo " MAKE $@"
- @$(MAKE) -C $(COMMON_D) sql
+ @$(MAKE) -C $(COMMON_D) common_mini
$(LIBCONFIG_OBJ):
@echo " MAKE $@"
diff --git a/sysinfogen.sh b/sysinfogen.sh
new file mode 100755
index 000000000..89857249f
--- /dev/null
+++ b/sysinfogen.sh
@@ -0,0 +1,259 @@
+#!/bin/sh
+
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+# Base Author: Haru @ http://hercules.ws
+
+do_fail() {
+ echo 'Error writing output file'
+ exit 1
+}
+
+cleanstring() {
+ if [ "$( echo "x x" | sed -e 's/[[:space:]]//g' )" = "x x" ]; then
+ # Workaround for non-POSIX-compliant systems that lack [[:space:]] (Solaris)
+ echo "$@" | sed -e 's/"/ /g' -e 's/[ ][ ]*/ /g' -e 's/^[ ]*//g' -e 's/[ ]*$//g'
+ else
+ echo "$@" | sed -e 's/"/ /g' -e 's/[[:space:]][[:space:]]*/ /g' -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g'
+ fi
+}
+
+if [ -z "$1" ]; then
+ echo 'No output file specified'
+ exit 1
+fi
+
+OUTFILE="$1"
+shift
+
+if ! touch "$OUTFILE"; then
+ echo 'Cannot create output file'
+ exit 1
+fi
+
+cat > "$OUTFILE" << EOF
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+
+// This file was automatically generated. Any edit to it will be lost.
+
+EOF
+[ $? -eq 0 ] || do_fail
+
+HERC_PLATFORM="$( uname -s )"
+HERC_CORES="0"
+HERC_CPU="Unknown"
+
+case $HERC_PLATFORM in
+ Linux)
+ DIST=''
+ DESCRIPTION=''
+ REV=''
+
+ if type lsb_release >/dev/null 2>&1; then
+ LSBINFO="$( lsb_release -a 2>/dev/null )"
+ DIST="$( cleanstring "$( echo "$LSBINFO" | grep '^Distributor ID:' | cut -d: -f2- )" )"
+ DESCRIPTION="$( echo "$LSBINFO" | grep '^Description:' | cut -d: -f2- | sed 's/Enterprise Linux Enterprise Linux/Oracle Linux/' )"
+ fi
+
+ if [ -z "$DIST" ] || [ "$DIST" = "Gentoo" ]; then
+ if [ -f /etc/gentoo-release ]; then
+ # "Gentoo Base System release 2.2"
+ DIST='Gentoo'
+ DESCRIPTION="$( head -n 1 /etc/gentoo-release )"
+ REV=''
+ elif [ -f /etc/arch-release ]; then
+ # empty release file
+ DIST='ArchLinux'
+ DESCRIPTION=''
+ REV=''
+ elif [ -f /etc/vmware-release ]; then
+ # "VMware ESX Server 3" or "VMware ESX 4.0 (Kandinsky)"
+ DIST="VMWare"
+ DESCRIPTION="$( head -n 1 /etc/vmware-release )"
+ REV=''
+ elif [ -f /etc/debian_version ]; then
+ # "wheezy/sid"
+ DIST="Debian"
+ DESCRIPTION="Debian GNU/Linux $( head -n 1 /etc/debian_version )"
+ REV=''
+ elif [ -f /etc/fedora-release ]; then
+ # "Fedora release 9 (Sulphur)"
+ DIST="Fedora"
+ DESCRIPTION="$( head -n 1 /etc/fedora-release )"
+ REV=''
+ elif [ -f /etc/knoppix_version ]; then
+ # "3.2 2003-04-15"
+ DIST="Knoppix"
+ REV="Knoppix GNU/Linux $( head -n 1 /etc/knoppix_version )"
+ DESCRIPTION=''
+ elif [ -f /etc/mandriva-release ]; then
+ # "Mandriva Linux release 2010.1 (Official) for x86_64"
+ DIST="Mandriva"
+ DESCRIPTION="$( head -n 1 /etc/mandriva-release )"
+ REV=''
+ elif [ -f /etc/mandrake-release ]; then
+ # "Mandrakelinux release 10.1 (Community) for i586"
+ DIST="Mandrake"
+ DESCRIPTION="$( head -n 1 /etc/mandrake-release )"
+ REV=''
+ elif [ -f /etc/oracle-release ]; then
+ # "Oracle Linux Server release 6.3"
+ DIST="Oracle"
+ DESCRIPTION="$( head -n 1 /etc/oracle-release )"
+ REV=''
+ elif [ -f /etc/centos-release ]; then
+ # "CentOS Linux release 6.0 (Final)"
+ DIST="CentOS"
+ DESCRIPTION="$( head -n 1 /etc/centos-release )"
+ REV=''
+ elif [ -f /etc/redhat-release ]; then
+ # "Red Hat Enterprise Linux Server release 5 (Tikanga)"
+ DIST="RedHat"
+ DESCRIPTION="$( head -n 1 /etc/redhat-release )"
+ REV=''
+ elif [ -f /etc/slackware-version ]; then
+ DIST="Slackware"
+ DESCRIPTION="$( head -n 1 /etc/slackware-version )"
+ REV=''
+ elif [ -f /etc/slackware-release ]; then
+ DIST="Slackware"
+ DESCRIPTION="$( head -n 1 /etc/slackware-release )"
+ REV=''
+ elif [ -f /etc/SuSE-release ]; then
+ # "SUSE Linux Enterprise Server 11 (x86_64)"
+ # Note: it may contain several extra lines
+ DIST="SuSE"
+ DESCRIPTION="$( head -n 1 /etc/SuSE-release )"
+ REV=''
+ elif [ -f /etc/trustix-release ]; then
+ # "Trustix Secure Linux release 2.0 (Cloud)"
+ DIST="Trustix"
+ DESCRIPTION="$( head -n 1 /etc/trustix-release )"
+ REV=''
+ else
+ DIST='Unknown'
+ DESCRIPTION=''
+ REV=''
+ fi
+ fi
+ if [ -n "$DESCRIPTION" ]; then
+ DIST="$DESCRIPTION"
+ fi
+ HERC_OSVERSION="$DIST"
+
+ HERC_CPU="$( cat /proc/cpuinfo | grep "model name" | head -n 1 | cut -d: -f2- )"
+ HERC_CORES="$( grep '^processor' /proc/cpuinfo | wc -l )"
+ ;;
+ Darwin)
+ HERC_PLATFORM="Mac OS X"
+ if type sw_vers >/dev/null 2>&1; then
+ HERC_OSVERSION="$( sw_vers -productName ) $( sw_vers -productVersion ) $( sw_vers -buildVersion )"
+ else
+ HERC_OSVERSION="Unknown"
+ fi
+ if type system_profiler >/dev/null 2>&1; then
+ HWDATA="$( system_profiler SPHardwareDataType )"
+ HWDATA_CPU="$( echo "$HWDATA" | grep "Processor Name:" | cut -d: -f2- )"
+ HWDATA_CPUSPEED="$( cleanstring "$( echo "$HWDATA" | grep "Processor Speed:" | cut -d: -f2- )" )"
+ HERC_CORES="$( echo "$HWDATA" | grep "Total Number of Cores:" | cut -d: -f2- )"
+ HERC_CPU="${HWDATA_CPU} (${HWDATA_CPUSPEED})"
+ fi
+ ;;
+ SunOS)
+ HERC_PLATFORM="Solaris"
+ HERC_OSVERSION="${HERC_PLATFORM} $( uname -r ) ($( uname -p) $(uname -v))"
+ ;;
+ AIX)
+ HERC_OSVERSION="AIX $( oslevel ) ($(`oslevel -r`))"
+ ;;
+ CYGWIN*)
+ HERC_PLATFORM="Cygwin Windows"
+ HERC_OSVERSION="$( cleanstring "$( uname -s )" )"
+ HERC_CPU="$( cat /proc/cpuinfo | grep "model name" | head -n 1 | cut -d: -f2- )"
+ HERC_CORES="$( grep '^processor' /proc/cpuinfo | wc -l )"
+ ;;
+ OpenBSD)
+ HERC_OSVERSION="${HERC_PLATFORM} $( uname -r ) ($( uname -p) $(uname -v))"
+ HERC_CPU="$( sysctl hw.model | cut -d= -f2- )"
+ HERC_CORES="$( sysctl hw.ncpu | cut -d= -f2- )"
+ ;;
+ FreeBSD)
+ HERC_OSVERSION="${HERC_PLATFORM} $( uname -r ) ($( uname -p))"
+ HERC_CPU="$( sysctl hw.model | cut -d: -f2- )"
+ HERC_CORES="$( sysctl hw.ncpu | cut -d: -f2- )"
+ ;;
+ NetBSD)
+ HERC_OSVERSION="${HERC_PLATFORM} $( uname -r ) ($( uname -p))"
+ HERC_CPU="$( sysctl hw.model | cut -d= -f2- )"
+ HERC_CORES="$( sysctl hw.ncpu | cut -d= -f2- )"
+ ;;
+ *)
+ HERC_OSVERSION="Unknown"
+ ;;
+esac
+
+cat >> "$OUTFILE" << EOF
+// Platform (uname -s)
+#define SYSINFO_PLATFORM "$( cleanstring "${HERC_PLATFORM}" )"
+
+// Operating System version (Platform-dependent)
+#define SYSINFO_OSVERSION "$( cleanstring "${HERC_OSVERSION}" )"
+
+// CPU Model (Platform-dependent)
+#define SYSINFO_CPU "$( cleanstring "${HERC_CPU}" )"
+
+// CPU Cores (Platform-dependent)
+#define SYSINFO_CPUCORES ( $( cleanstring "${HERC_CORES}" ) )
+
+EOF
+[ $? -eq 0 ] || do_fail
+
+HERC_ARCH="$( uname -m )"
+
+cat >> "$OUTFILE" << EOF
+// OS Architecture (uname -m)
+#define SYSINFO_ARCH "$( cleanstring "${HERC_ARCH}" )"
+
+EOF
+[ $? -eq 0 ] || do_fail
+
+HERC_CFLAGS="$@"
+HERC_CFLAGS="$( echo "${HERC_CFLAGS}" | sed 's/"//g' )"
+
+cat >> "$OUTFILE" << EOF
+// Compiler Flags
+#define SYSINFO_CFLAGS "$( cleanstring "${HERC_CFLAGS}" )"
+
+EOF
+[ $? -eq 0 ] || do_fail
+
+HERC_VCSREV=""
+if [ -d .git ]; then
+ HERC_VCSTYPE="VCSTYPE_GIT"
+ if type git >/dev/null 2>&1; then
+ HERC_VCSREV="$( git rev-parse HEAD )"
+ else
+ HERC_VCSREV="Unknown"
+ fi
+elif [ -d .svn ]; then
+ HERC_VCSTYPE="VCSTYPE_SVN"
+ if type svnversion >/dev/null 2>&1; then
+ HERC_VCSREV="$( svnversion )"
+ else
+ HERC_VCSREV="Unknown"
+ fi
+else
+ HERC_VCSTYPE="VCSTYPE_NONE"
+fi
+
+cat >> "$OUTFILE" << EOF
+// VCS Type
+#define SYSINFO_VCSTYPE ${HERC_VCSTYPE}
+
+// VCS Revision
+#define SYSINFO_VCSREV "$( cleanstring "${HERC_VCSREV}" )"
+
+EOF
+[ $? -eq 0 ] || do_fail
+
diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl
index e83d5d9a0..72025f556 100755
--- a/tools/HPMHookGen/HPMHookGen.pl
+++ b/tools/HPMHookGen/HPMHookGen.pl
@@ -217,6 +217,8 @@ sub parse($$) {
$rtinit = ' = BL_NUL';
} elsif ($x =~ /^enum\s+homun_type$/) { # Known enum homun_type
$rtinit = ' = HT_INVALID';
+ } elsif ($x =~ /^enum\s+bg_queue_types$/) { # Known enum bg_queue_types
+ $rtinit = ' = BGQT_INVALID';
} elsif ($x =~ /^struct\s+.*$/ or $x eq 'DBData') { # Structs
$rtinit = '';
$rtmemset = 1;
diff --git a/tools/HPMHookGen/Makefile.in b/tools/HPMHookGen/Makefile.in
index eb9cad8ff..ce07b37d4 100644
--- a/tools/HPMHookGen/Makefile.in
+++ b/tools/HPMHookGen/Makefile.in
@@ -1,3 +1,6 @@
+# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+# See the LICENSE file
+
@SET_MAKE@
COMMON_D = ../../src/common
@@ -38,7 +41,7 @@ endif
.PHONY: hooks clean buildclean generate
all: $(ALL_DEPENDS)
-
+
buildclean:
clean: buildclean
@@ -73,4 +76,3 @@ needs_doxygen:
needs_perl:
@echo "perl not found or disabled by the configure script"
@exit 1
-
diff --git a/vcproj-10/char-server.vcxproj b/vcproj-10/char-server.vcxproj
index 46438b3aa..3be45938a 100644
--- a/vcproj-10/char-server.vcxproj
+++ b/vcproj-10/char-server.vcxproj
@@ -155,6 +155,7 @@
<ClInclude Include="..\src\common\random.h" />
<ClInclude Include="..\src\common\showmsg.h" />
<ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\sql.h" />
<ClInclude Include="..\src\common\strlib.h" />
<ClInclude Include="..\src\common\thread.h" />
@@ -199,6 +200,7 @@
<ClCompile Include="..\src\common\socket.c" />
<ClCompile Include="..\src\common\sql.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\thread.c" />
<ClCompile Include="..\src\common\timer.c" />
<ClCompile Include="..\src\common\utils.c" />
diff --git a/vcproj-10/char-server.vcxproj.filters b/vcproj-10/char-server.vcxproj.filters
index 3f3c2f6ac..ac5b663cd 100644
--- a/vcproj-10/char-server.vcxproj.filters
+++ b/vcproj-10/char-server.vcxproj.filters
@@ -40,6 +40,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\timer.c">
<Filter>common</Filter>
</ClCompile>
@@ -168,6 +171,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\timer.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-10/login-server.vcxproj b/vcproj-10/login-server.vcxproj
index 7cf90854d..17538db85 100644
--- a/vcproj-10/login-server.vcxproj
+++ b/vcproj-10/login-server.vcxproj
@@ -164,6 +164,7 @@
<ClInclude Include="..\src\common\socket.h" />
<ClInclude Include="..\src\common\sql.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\timer.h" />
<ClInclude Include="..\src\common\utils.h" />
<ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h" />
@@ -196,6 +197,7 @@
<ClCompile Include="..\src\common\socket.c" />
<ClCompile Include="..\src\common\sql.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\timer.c" />
<ClCompile Include="..\src\common\utils.c" />
<ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c" />
diff --git a/vcproj-10/login-server.vcxproj.filters b/vcproj-10/login-server.vcxproj.filters
index 46f4efbc4..321f84ad4 100644
--- a/vcproj-10/login-server.vcxproj.filters
+++ b/vcproj-10/login-server.vcxproj.filters
@@ -52,6 +52,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\timer.c">
<Filter>common</Filter>
</ClCompile>
@@ -153,6 +156,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\timer.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-10/map-server.vcxproj b/vcproj-10/map-server.vcxproj
index 9ea5f5341..2c2491040 100644
--- a/vcproj-10/map-server.vcxproj
+++ b/vcproj-10/map-server.vcxproj
@@ -157,6 +157,7 @@
<ClInclude Include="..\src\common\socket.h" />
<ClInclude Include="..\src\common\sql.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\thread.h" />
<ClInclude Include="..\src\common\timer.h" />
<ClInclude Include="..\src\common\utils.h" />
@@ -234,6 +235,7 @@
<ClCompile Include="..\src\common\socket.c" />
<ClCompile Include="..\src\common\sql.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\thread.c" />
<ClCompile Include="..\src\common\timer.c" />
<ClCompile Include="..\src\common\utils.c" />
diff --git a/vcproj-10/map-server.vcxproj.filters b/vcproj-10/map-server.vcxproj.filters
index 1dff3e560..b04819eff 100644
--- a/vcproj-10/map-server.vcxproj.filters
+++ b/vcproj-10/map-server.vcxproj.filters
@@ -160,6 +160,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\timer.c">
<Filter>common</Filter>
</ClCompile>
@@ -378,6 +381,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\timer.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-10/mapcache.vcxproj b/vcproj-10/mapcache.vcxproj
index b8c901f14..4aac4b06a 100644
--- a/vcproj-10/mapcache.vcxproj
+++ b/vcproj-10/mapcache.vcxproj
@@ -130,6 +130,7 @@
<ClCompile Include="..\src\common\malloc.c" />
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\utils.c" />
<ClCompile Include="..\src\common\nullpo.c" />
<ClCompile Include="..\src\tool\mapcache.c" />
@@ -144,6 +145,7 @@
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\showmsg.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\utils.h" />
<ClInclude Include="..\src\common\winapi.h" />
<ClInclude Include="..\src\common\nullpo.h" />
diff --git a/vcproj-10/mapcache.vcxproj.filters b/vcproj-10/mapcache.vcxproj.filters
index e095c1e1c..32479a909 100644
--- a/vcproj-10/mapcache.vcxproj.filters
+++ b/vcproj-10/mapcache.vcxproj.filters
@@ -22,6 +22,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\utils.c">
<Filter>common</Filter>
</ClCompile>
@@ -60,6 +63,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\utils.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-11/char-server.vcxproj b/vcproj-11/char-server.vcxproj
index 126f15ea4..1b77a6270 100644
--- a/vcproj-11/char-server.vcxproj
+++ b/vcproj-11/char-server.vcxproj
@@ -160,6 +160,7 @@
<ClInclude Include="..\src\common\socket.h" />
<ClInclude Include="..\src\common\sql.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\thread.h" />
<ClInclude Include="..\src\common\timer.h" />
<ClInclude Include="..\src\common\utils.h" />
@@ -202,6 +203,7 @@
<ClCompile Include="..\src\common\socket.c" />
<ClCompile Include="..\src\common\sql.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\thread.c" />
<ClCompile Include="..\src\common\timer.c" />
<ClCompile Include="..\src\common\utils.c" />
diff --git a/vcproj-11/char-server.vcxproj.filters b/vcproj-11/char-server.vcxproj.filters
index 5e536aada..9c3926e71 100644
--- a/vcproj-11/char-server.vcxproj.filters
+++ b/vcproj-11/char-server.vcxproj.filters
@@ -43,6 +43,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\timer.c">
<Filter>common</Filter>
</ClCompile>
@@ -171,6 +174,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\timer.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-11/login-server.vcxproj b/vcproj-11/login-server.vcxproj
index 48c79d285..9556c0c72 100644
--- a/vcproj-11/login-server.vcxproj
+++ b/vcproj-11/login-server.vcxproj
@@ -168,6 +168,7 @@
<ClInclude Include="..\src\common\socket.h" />
<ClInclude Include="..\src\common\sql.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\timer.h" />
<ClInclude Include="..\src\common\utils.h" />
<ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h" />
@@ -200,6 +201,7 @@
<ClCompile Include="..\src\common\socket.c" />
<ClCompile Include="..\src\common\sql.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\timer.c" />
<ClCompile Include="..\src\common\utils.c" />
<ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c" />
diff --git a/vcproj-11/login-server.vcxproj.filters b/vcproj-11/login-server.vcxproj.filters
index 4574ee7c1..2bd98407b 100644
--- a/vcproj-11/login-server.vcxproj.filters
+++ b/vcproj-11/login-server.vcxproj.filters
@@ -55,6 +55,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\timer.c">
<Filter>common</Filter>
</ClCompile>
@@ -156,6 +159,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\timer.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-11/map-server.vcxproj b/vcproj-11/map-server.vcxproj
index 5701cd4d0..5e0290f01 100644
--- a/vcproj-11/map-server.vcxproj
+++ b/vcproj-11/map-server.vcxproj
@@ -161,6 +161,7 @@
<ClInclude Include="..\src\common\socket.h" />
<ClInclude Include="..\src\common\sql.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\thread.h" />
<ClInclude Include="..\src\common\timer.h" />
<ClInclude Include="..\src\common\utils.h" />
@@ -238,6 +239,7 @@
<ClCompile Include="..\src\common\socket.c" />
<ClCompile Include="..\src\common\sql.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\thread.c" />
<ClCompile Include="..\src\common\timer.c" />
<ClCompile Include="..\src\common\utils.c" />
diff --git a/vcproj-11/map-server.vcxproj.filters b/vcproj-11/map-server.vcxproj.filters
index 1dff3e560..b04819eff 100644
--- a/vcproj-11/map-server.vcxproj.filters
+++ b/vcproj-11/map-server.vcxproj.filters
@@ -160,6 +160,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\timer.c">
<Filter>common</Filter>
</ClCompile>
@@ -378,6 +381,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\timer.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-11/mapcache.vcxproj b/vcproj-11/mapcache.vcxproj
index 1135461ad..36c8023e3 100644
--- a/vcproj-11/mapcache.vcxproj
+++ b/vcproj-11/mapcache.vcxproj
@@ -134,6 +134,7 @@
<ClCompile Include="..\src\common\malloc.c" />
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\utils.c" />
<ClCompile Include="..\src\common\nullpo.c" />
<ClCompile Include="..\src\tool\mapcache.c" />
@@ -148,6 +149,7 @@
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\showmsg.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\utils.h" />
<ClInclude Include="..\src\common\winapi.h" />
<ClInclude Include="..\src\common\nullpo.h" />
diff --git a/vcproj-11/mapcache.vcxproj.filters b/vcproj-11/mapcache.vcxproj.filters
index 3fe21d74b..d5c2fbb83 100644
--- a/vcproj-11/mapcache.vcxproj.filters
+++ b/vcproj-11/mapcache.vcxproj.filters
@@ -22,6 +22,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\utils.c">
<Filter>common</Filter>
</ClCompile>
@@ -60,6 +63,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\utils.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-12/char-server.vcxproj b/vcproj-12/char-server.vcxproj
index 710251169..a9dc9cac8 100644
--- a/vcproj-12/char-server.vcxproj
+++ b/vcproj-12/char-server.vcxproj
@@ -159,6 +159,7 @@
<ClInclude Include="..\src\common\socket.h" />
<ClInclude Include="..\src\common\sql.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\thread.h" />
<ClInclude Include="..\src\common\timer.h" />
<ClInclude Include="..\src\common\utils.h" />
@@ -201,6 +202,7 @@
<ClCompile Include="..\src\common\socket.c" />
<ClCompile Include="..\src\common\sql.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\thread.c" />
<ClCompile Include="..\src\common\timer.c" />
<ClCompile Include="..\src\common\utils.c" />
diff --git a/vcproj-12/char-server.vcxproj.filters b/vcproj-12/char-server.vcxproj.filters
index 5e536aada..9c3926e71 100644
--- a/vcproj-12/char-server.vcxproj.filters
+++ b/vcproj-12/char-server.vcxproj.filters
@@ -43,6 +43,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\timer.c">
<Filter>common</Filter>
</ClCompile>
@@ -171,6 +174,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\timer.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-12/login-server.vcxproj b/vcproj-12/login-server.vcxproj
index 473f03019..fd1a84820 100644
--- a/vcproj-12/login-server.vcxproj
+++ b/vcproj-12/login-server.vcxproj
@@ -168,6 +168,7 @@
<ClInclude Include="..\src\common\socket.h" />
<ClInclude Include="..\src\common\sql.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\timer.h" />
<ClInclude Include="..\src\common\utils.h" />
<ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h" />
@@ -200,6 +201,7 @@
<ClCompile Include="..\src\common\socket.c" />
<ClCompile Include="..\src\common\sql.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\timer.c" />
<ClCompile Include="..\src\common\utils.c" />
<ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c" />
diff --git a/vcproj-12/login-server.vcxproj.filters b/vcproj-12/login-server.vcxproj.filters
index 4574ee7c1..2bd98407b 100644
--- a/vcproj-12/login-server.vcxproj.filters
+++ b/vcproj-12/login-server.vcxproj.filters
@@ -55,6 +55,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\timer.c">
<Filter>common</Filter>
</ClCompile>
@@ -156,6 +159,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\timer.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-12/map-server.vcxproj b/vcproj-12/map-server.vcxproj
index d5d6c3156..d8e0e2838 100644
--- a/vcproj-12/map-server.vcxproj
+++ b/vcproj-12/map-server.vcxproj
@@ -161,6 +161,7 @@
<ClInclude Include="..\src\common\socket.h" />
<ClInclude Include="..\src\common\sql.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\thread.h" />
<ClInclude Include="..\src\common\timer.h" />
<ClInclude Include="..\src\common\utils.h" />
@@ -238,6 +239,7 @@
<ClCompile Include="..\src\common\socket.c" />
<ClCompile Include="..\src\common\sql.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\thread.c" />
<ClCompile Include="..\src\common\timer.c" />
<ClCompile Include="..\src\common\utils.c" />
diff --git a/vcproj-12/map-server.vcxproj.filters b/vcproj-12/map-server.vcxproj.filters
index 1dff3e560..b04819eff 100644
--- a/vcproj-12/map-server.vcxproj.filters
+++ b/vcproj-12/map-server.vcxproj.filters
@@ -160,6 +160,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\timer.c">
<Filter>common</Filter>
</ClCompile>
@@ -378,6 +381,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\timer.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-12/mapcache.vcxproj b/vcproj-12/mapcache.vcxproj
index 3be84f4d4..46f621966 100644
--- a/vcproj-12/mapcache.vcxproj
+++ b/vcproj-12/mapcache.vcxproj
@@ -134,6 +134,7 @@
<ClCompile Include="..\src\common\malloc.c" />
<ClCompile Include="..\src\common\showmsg.c" />
<ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
<ClCompile Include="..\src\common\utils.c" />
<ClCompile Include="..\src\common\nullpo.c" />
<ClCompile Include="..\src\tool\mapcache.c" />
@@ -148,6 +149,7 @@
<ClInclude Include="..\src\common\mmo.h" />
<ClInclude Include="..\src\common\showmsg.h" />
<ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
<ClInclude Include="..\src\common\utils.h" />
<ClInclude Include="..\src\common\winapi.h" />
<ClInclude Include="..\src\common\nullpo.h" />
diff --git a/vcproj-12/mapcache.vcxproj.filters b/vcproj-12/mapcache.vcxproj.filters
index 3fe21d74b..d5c2fbb83 100644
--- a/vcproj-12/mapcache.vcxproj.filters
+++ b/vcproj-12/mapcache.vcxproj.filters
@@ -22,6 +22,9 @@
<ClCompile Include="..\src\common\strlib.c">
<Filter>common</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\utils.c">
<Filter>common</Filter>
</ClCompile>
@@ -60,6 +63,9 @@
<ClInclude Include="..\src\common\strlib.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\utils.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-9/char-server.vcproj b/vcproj-9/char-server.vcproj
index f8d8e7abd..d1d9645a0 100644
--- a/vcproj-9/char-server.vcproj
+++ b/vcproj-9/char-server.vcproj
@@ -421,6 +421,14 @@
>
</File>
<File
+ RelativePath="..\src\common\sysinfo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\sysinfo.h"
+ >
+ </File>
+ <File
RelativePath="..\src\common\thread.c"
>
</File>
diff --git a/vcproj-9/login-server.vcproj b/vcproj-9/login-server.vcproj
index 1031d2237..58ccfda89 100644
--- a/vcproj-9/login-server.vcproj
+++ b/vcproj-9/login-server.vcproj
@@ -391,6 +391,14 @@
>
</File>
<File
+ RelativePath="..\src\common\sysinfo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\sysinfo.h"
+ >
+ </File>
+ <File
RelativePath="..\src\common\thread.c"
>
</File>
diff --git a/vcproj-9/map-server.vcproj b/vcproj-9/map-server.vcproj
index 81d39e48f..5456d74b1 100644
--- a/vcproj-9/map-server.vcproj
+++ b/vcproj-9/map-server.vcproj
@@ -444,6 +444,14 @@
>
</File>
<File
+ RelativePath="..\src\common\sysinfo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\sysinfo.h"
+ >
+ </File>
+ <File
RelativePath="..\src\common\thread.c"
>
</File>
diff --git a/vcproj-9/mapcache.vcproj b/vcproj-9/mapcache.vcproj
index a9d230b36..70a0ac4a2 100644
--- a/vcproj-9/mapcache.vcproj
+++ b/vcproj-9/mapcache.vcproj
@@ -271,6 +271,14 @@
>
</File>
<File
+ RelativePath="..\src\common\sysinfo.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\sysinfo.h"
+ >
+ </File>
+ <File
RelativePath="..\src\common\utils.c"
>
</File>