Переглянути джерело

- Fixed the CL_WHITE define, thanks to FlavioJS
- NPC break equipment stuff now has a 1.5% per skilllv success rate.
- pc_setpos won't random warp players if placed on top of Moonlight Petals
- Removed the check in clif.c for npc_shopid as the client never sends a packet when the trade is cancelled...


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

skotlex 19 роки тому
батько
коміт
f6b78466ab
6 змінених файлів з 21 додано та 23 видалено
  1. 8 0
      Changelog-Trunk.txt
  2. 1 1
      src/common/showmsg.h
  3. 3 2
      src/map/clif.c
  4. 0 11
      src/map/path.c
  5. 5 5
      src/map/pc.c
  6. 4 4
      src/map/skill.c

+ 8 - 0
Changelog-Trunk.txt

@@ -5,6 +5,14 @@ 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/02/23
+	* Fixed the CL_WHITE define, thanks to FlavioJS [Skotlex]
+	* NPC break equipment stuff now has a 1.5% per skilllv success rate.
+	- This is a custom value as 20%-lv10 seems too high and 10%-lv10 seems too
+	  low. [Skotlex]
+	* pc_setpos won't random warp players if placed on top of Moonlight Petals
+	  [Skotlex]
+	* Removed the check in clif.c for npc_shopid as the client never sends a
+	  packet when the trade is cancelled... [Skotlex]
 	* Player-summoned mobs won't level up now. [Skotlex]
 	* Fixed Super Novice explosion spirits triggering no matter what you said
 	  on the third line. It now triggers on the fourth line.... [Skotlex]

+ 1 - 1
src/common/showmsg.h

@@ -43,7 +43,7 @@
 	#define CL_NORMAL	CL_RESET
 	#define CL_NONE		CL_RESET
 
-	#define	CL_WHITE	"\033[1;29m"
+	#define	CL_WHITE	"\033[1;37m"
 	#define	CL_GRAY		"\033[1;30m"
 	#define	CL_RED		"\033[1;31m"
 	#define	CL_GREEN	"\033[1;32m"

+ 3 - 2
src/map/clif.c

@@ -157,11 +157,12 @@ enum {
 //To make the assignation of the level based on limits clearer/easier. [Skotlex]
 #define clif_setlevel(lv) (lv<battle_config.max_lv?lv:battle_config.max_lv-(lv<battle_config.aura_lv?1:0));
 
+//Removed sd->npc_shopid because there is no packet sent from the client when you cancel a buy!
 //Quick check to know if the player shouldn't be "busy" with something else to deny action requests. [Skotlex]
-#define clif_cant_act(sd) (sd->npc_id || sd->npc_shopid || sd->vender_id || sd->chatID || (sd->sc.opt1 && sd->sc.opt1 != OPT1_STONEWAIT) || sd->trade_partner || sd->state.storage_flag)
+#define clif_cant_act(sd) (sd->npc_id || sd->vender_id || sd->chatID || (sd->sc.opt1 && sd->sc.opt1 != OPT1_STONEWAIT) || sd->trade_partner || sd->state.storage_flag)
 
 // Checks if SD is in a trade/shop (where messing with the inventory can cause problems/exploits)
-#define clif_trading(sd) (sd->npc_id || sd->npc_shopid || sd->vender_id || sd->trade_partner)
+#define clif_trading(sd) (sd->npc_id || sd->vender_id || sd->trade_partner)
 
 static char map_ip_str[16];
 static in_addr_t map_ip;

+ 0 - 11
src/map/path.c

@@ -366,17 +366,6 @@ int path_search_real(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1
 		return 0;
 	}
 	
-#ifdef CELL_NOSTACK
-/* Should not be needed, let's try and see.
-	//If you fail by 1 cell, consider easy path successful, too. [Skotlex]
-	if (check_distance(x-x1,y-y1,1)) {
-		wpd->path_len=i;
-		wpd->path_pos=0;
-		wpd->path_half=0;
-		return 0;
-	}
-*/
-#endif
 	if(flag&1)
 		return -1;
 

+ 5 - 5
src/map/pc.c

@@ -3238,13 +3238,13 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
 	if(x <0 || x >= map[m].xs || y <0 || y >= map[m].ys)
 		x=y=0;
 	if((x==0 && y==0) ||
+		(map_getcell(m, x, y, CELL_CHKNOPASS) &&
+		!map_getcell(m, x, y, CELL_CHKICEWALL) &&
 #ifndef CELL_NOSTACK
-		(map_getcell(m,x,y,CELL_CHKNOPASS) && !map_getcell(m, x, y, CELL_CHKICEWALL))
-#else
-		(map_getcell(m,x,y,CELL_CHKNOPASS) && !map_getcell(m, x, y, CELL_CHKICEWALL) && !map_getcell(m, x, y, CELL_CHKSTACK))
+		!map_getcell(m, x, y, CELL_CHKSTACK) &&
 #endif
-	){ //We allow placing players on top of an ICEWALL tile to prevent force-warping players when an ice wall is placed 
-		//at spawn points from warps and the like. [Skotlex]
+		!map_getcell(m, x, y, CELL_CHKMOONLIT))
+	){ //It is allowed on top of Moonlight/icewall tiles to prevent force-warping 'cheats' [Skotlex]
 		if(x||y) {
 			if(battle_config.error_log)
 				ShowError("pc_setpos: attempt to place player on non-walkable tile (%s-%d,%d)\n",mapindex_id2name(mapindex),x,y);

+ 4 - 4
src/map/skill.c

@@ -1097,16 +1097,16 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
 		break;
 	// Equipment breaking monster skills [Celest]
 	case NPC_BREAKWEAPON:
-		skill_break_equip(bl, EQP_WEAPON, 1000*skilllv, BCT_ENEMY);
+		skill_break_equip(bl, EQP_WEAPON, 150*skilllv, BCT_ENEMY);
 		break;
 	case NPC_BREAKARMOR:
-		skill_break_equip(bl, EQP_ARMOR, 1000*skilllv, BCT_ENEMY);
+		skill_break_equip(bl, EQP_ARMOR, 150*skilllv, BCT_ENEMY);
 		break;
 	case NPC_BREAKHELM:
-		skill_break_equip(bl, EQP_HELM, 1000*skilllv, BCT_ENEMY);
+		skill_break_equip(bl, EQP_HELM, 150*skilllv, BCT_ENEMY);
 		break;
 	case NPC_BREAKSHIELD:
-		skill_break_equip(bl, EQP_SHIELD, 1000*skilllv, BCT_ENEMY);
+		skill_break_equip(bl, EQP_SHIELD, 150*skilllv, BCT_ENEMY);
 		break;
 
 	case CH_TIGERFIST: