summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-09-06 22:20:27 -0300
committershennetsind <ind@henn.et>2013-09-06 22:20:27 -0300
commit2c736580c86bab5c4bbf6154c3bcab70a51064a0 (patch)
treebff1cf633505e3294951d03187acde021fbf9f51 /src
parent8ca1bf26750139ebc003f2ff0a7fd448c57bd183 (diff)
downloadhercules-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>
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.c13
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;