Ver Fonte

- Fixed skill_check_cloak to use the current skill level of the cloaking skill and not pc_checkskill() to know if a cloaker away from a wall should be uncloaked.
- Likely fixed opening guild storage.


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

skotlex há 19 anos atrás
pai
commit
d13956c142
4 ficheiros alterados com 12 adições e 11 exclusões
  1. 4 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/mob.c
  3. 6 6
      src/map/skill.c
  4. 1 4
      src/map/storage.c

+ 4 - 0
Changelog-Trunk.txt

@@ -5,6 +5,10 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 2006/01/31
+	* Fixed skill_check_cloak to use the current skill level of the cloaking
+	  skill and not pc_checkskill() to know if a cloaker away from a wall should
+	  be uncloaked. [Skotlex]
+	* Likely fixed opening guild storage. [Skotlex]
 	* Removed no penelty mapflag for nifilheim. Confirmed on iRO. [Kayla]
 	* Changed default value of gm_cant_drop_max_lvl to 98. Also reworded the
 	  comments for cant_drop_max and min. [Kayla]

+ 1 - 1
src/map/mob.c

@@ -565,7 +565,7 @@ static int mob_walk(struct mob_data *md,unsigned int tick,int data)
 		map_foreachinmovearea(clif_mobinsight,md->bl.m,x-AREA_SIZE,y-AREA_SIZE,x+AREA_SIZE,y+AREA_SIZE,-dx,-dy,BL_PC,md);
 		md->state.state=MS_IDLE;
 
-		if(md->option&4)
+		if(md->option&OPTION_CLOAK)
 			skill_check_cloaking(&md->bl);
 	}
 	if((i=calc_next_walk_step(md))>0){

+ 6 - 6
src/map/skill.c

@@ -10030,15 +10030,15 @@ int skill_enchant_elemental_end (struct block_list *bl, int type)
 int skill_check_cloaking(struct block_list *bl)
 {
 	struct map_session_data *sd = NULL;
+	struct status_change *sc_data;
 	static int dx[] = { 0, 1, 0, -1, -1,  1, 1, -1}; //optimized by Lupus
 	static int dy[] = {-1, 0, 1,  0, -1, -1, 1,  1};
 	int end = 1,i;
 
 	nullpo_retr(1, bl);
 
-	if (bl->type == BL_PC) {
-		nullpo_retr(1, sd = (struct map_session_data *)bl);
-	}
+	if (bl->type == BL_PC)
+		sd = (struct map_session_data *)bl;
 	
 	if ((bl->type == BL_PC && battle_config.pc_cloak_check_type&1) ||
 		(bl->type != BL_PC && battle_config.monster_cloak_check_type&1))
@@ -10053,10 +10053,10 @@ int skill_check_cloaking(struct block_list *bl)
 			end = 0; //No wall check.
 			
 	if(end){
-		if ((sd && pc_checkskill(sd,AS_CLOAKING)<3) || bl->type == BL_MOB) {
+		sc_data = status_get_sc_data(bl);
+		if (sc_data && sc_data[SC_CLOAKING].timer != -1 && sc_data[SC_CLOAKING].val1 < 3) {
 			status_change_end(bl, SC_CLOAKING, -1);
-		}
-		else if (sd && sd->sc_data[SC_CLOAKING].val3 != 130) {
+		} else if (sd && sd->sc_data[SC_CLOAKING].val3 != 130) {
 			status_quick_recalc_speed (sd, AS_CLOAKING, 130, 1);
 		}
 	}

+ 1 - 4
src/map/storage.c

@@ -464,11 +464,8 @@ int storage_guild_storageopen(struct map_session_data *sd)
 		clif_updateguildstorageamount(sd,gstor);
 		return 0;
 	}
-	else {
-		gstor = guild2storage(sd->status.guild_id);
-		gstor->storage_status = 1;
+	else
 		intif_request_guild_storage(sd->status.account_id,sd->status.guild_id);
-	}
 
 	return 0;
 }