소스 검색

Updated @reloadskilldb to update all connected clients skill infos; and to explain why I'll write a short, cute story.
Prior to this change, if you changed a skill type from, say, ground to self, and reloaded the skill db, you'd need to relog (or force kick everyone in the server) in order for this to refresh in their clients; thanks to this change @reloadscript will refresh everyones skill tree.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16928 54d463be-8e91-2dee-dedb-b68131a5f0ec

shennetsind 12 년 전
부모
커밋
ad3527821b
1개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. 9 2
      src/map/skill.c

+ 9 - 2
src/map/skill.c

@@ -17782,9 +17782,16 @@ static void skill_readdb(void)
 
 }
 
-void skill_reload (void)
-{
+void skill_reload (void) {
+	struct s_mapiterator *iter;
+	struct map_session_data *sd;
 	skill_readdb();
+	/* lets update all players skill tree : so that if any skill modes were changed they're properly updated */
+	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);
+	
 }
 
 /*==========================================