diff options
author | shennetsind <ind@henn.et> | 2013-09-06 22:20:27 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-09-06 22:20:27 -0300 |
commit | 2c736580c86bab5c4bbf6154c3bcab70a51064a0 (patch) | |
tree | bff1cf633505e3294951d03187acde021fbf9f51 | |
parent | 8ca1bf26750139ebc003f2ff0a7fd448c57bd183 (diff) | |
download | hercules-2c736580c86bab5c4bbf6154c3bcab70a51064a0.tar.gz hercules-2c736580c86bab5c4bbf6154c3bcab70a51064a0.tar.bz2 hercules-2c736580c86bab5c4bbf6154c3bcab70a51064a0.tar.xz hercules-2c736580c86bab5c4bbf6154c3bcab70a51064a0.zip |
Fixed @reloadpcdb to refresh online player data
Special Thanks to hemagx, closes #92
Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r-- | src/map/pc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 044e55508..7607db560 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -9649,6 +9649,8 @@ void pc_read_skill_tree(void) { const char *config_filename = "db/pre-re/skill_tree.conf"; // FIXME hardcoded name #endif int i = 0, jnamelen = 0; + struct s_mapiterator *iter; + struct map_session_data *sd; struct { const char *name; int id; @@ -9893,6 +9895,11 @@ void pc_read_skill_tree(void) { config_destroy(&skill_tree_conf); + /* lets update all players skill tree */ + iter = mapit_getallusers(); + for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) ) + clif->skillinfoblock(sd); + mapit->free(iter); } #if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) static bool pc_readdb_levelpenalty(char* fields[], int columns, int current) @@ -9930,8 +9937,7 @@ static bool pc_readdb_levelpenalty(char* fields[], int columns, int current) * skill_tree.txt - skill tree for every class * attr_fix.txt - elemental adjustment table *------------------------------------------*/ -int pc_readdb(void) -{ +int pc_readdb(void) { int i,j,k; unsigned int count = 0; FILE *fp; @@ -9948,8 +9954,7 @@ int pc_readdb(void) ShowError("can't read %s\n", line); return 1; } - while(fgets(line, sizeof(line), fp)) - { + while(fgets(line, sizeof(line), fp)) { int jobs[CLASS_COUNT], job_count, job, job_id; int type; unsigned int ui,maxlv; |