Jelajahi Sumber

- Absorb Spirit Sphere now gives +10SP per sphere as per discussions with Haplo.
- Changed a <= into a < in pc_steal_item. This means drops with 0.01% are impossible to steal unless you have at least 100% steal-rate (where steal rate is dex - opponent dex + skill_lv*3% + 10%)
- Cleaned up clif_parse_action_request to enable sitting/standing while in shops, interacting with npcs, etc.


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

skotlex 19 tahun lalu
induk
melakukan
9b6b46c455
4 mengubah file dengan 46 tambahan dan 19 penghapusan
  1. 7 0
      Changelog-Trunk.txt
  2. 37 17
      src/map/clif.c
  3. 1 1
      src/map/pc.c
  4. 1 1
      src/map/skill.c

+ 7 - 0
Changelog-Trunk.txt

@@ -4,6 +4,13 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/05/02
+	* Absorb Spirit Sphere now gives +10SP per sphere as per discussions with
+	  Haplo. [Skotlex]
+	* Changed a <= into a < in pc_steal_item. This means drops with 0.01% are
+	  impossible to steal unless you have at least 100% steal-rate (where steal
+	  rate is dex - opponent dex + skill_lv*3% + 10%) [Skotlex[
+	* Cleaned up clif_parse_action_request to enable sitting/standing while in
+	  shops, interacting with npcs, etc. [Skotlex]
 	* Kaite now works against all types of spells. [Skotlex]
 	* Kaupe now works against all skills. [Skotlex]
 	* Sanctuary now won't damage non-enemies. [Skotlex]

+ 37 - 17
src/map/clif.c

@@ -8715,9 +8715,6 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) {
 		return;
 	}
 
-	if (clif_cant_act(sd) || sd->sc.option&OPTION_HIDE)
-		return;
-	
 	if (sd->sc.count &&
 		(sd->sc.data[SC_TRICKDEAD].timer != -1 ||
 	 	sd->sc.data[SC_AUTOCOUNTER].timer != -1 ||
@@ -8740,8 +8737,13 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) {
 	switch(action_type) {
 	case 0x00: // once attack
 	case 0x07: // continuous attack
+
+		if (clif_cant_act(sd) || sd->sc.option&OPTION_HIDE)
+			return;
+
 		if(sd->sc.option&OPTION_WEDDING || sd->vd.class_ == JOB_XMAS)
 			return;
+
 		if (!battle_config.sdelay_attack_enable && pc_checkskill(sd, SA_FREECAST) <= 0) {
 			if (DIFF_TICK(tick, sd->ud.canact_tick) < 0) {
 				clif_skill_fail(sd, 1, 4, 0);
@@ -8753,23 +8755,41 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) {
 		unit_attack(&sd->bl, target_id, action_type != 0);
 		break;
 	case 0x02: // sitdown
-		if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 3) {
-			if (sd->ud.skilltimer != -1) //No sitting while casting :P
-				break;
-			if (sd->sc.count && (
-				sd->sc.data[SC_DANCING].timer != -1 ||
-				(sd->sc.data[SC_GRAVITATION].timer != -1 && sd->sc.data[SC_GRAVITATION].val3 == BCT_SELF)
-			)) //No sitting during these states neither.
-			break;
-			pc_setsit(sd);
-			skill_gangsterparadise(sd, 1); // ギャングスターパラダイス設定 fixed Valaris
-			skill_rest(sd, 1); // TK_HPTIME sitting down mode [Dralnu]
-			clif_sitting(sd);
-		} else
+		if (battle_config.basic_skill_check && pc_checkskill(sd, NV_BASIC) < 3) {
 			clif_skill_fail(sd, 1, 0, 2);
+			break;
+		}
+		if(pc_issit(sd)) {
+			//Bugged client? Just refresh them.
+			WBUFW(buf, 0) = 0x8a;
+			WBUFL(buf, 2) = sd->bl.id;
+			WBUFB(buf,26) = 2;
+			clif_send(buf, packet_len_table[0x8a], &sd->bl, SELF);
+			return;
+		}
+
+		if (sd->ud.skilltimer != -1 || sd->sc.opt1)
+			break;
+
+		if (sd->sc.count && (
+			sd->sc.data[SC_DANCING].timer != -1 ||
+			(sd->sc.data[SC_GRAVITATION].timer != -1 && sd->sc.data[SC_GRAVITATION].val3 == BCT_SELF)
+		)) //No sitting during these states neither.
+		break;
+		pc_setsit(sd);
+		skill_gangsterparadise(sd, 1); // ギャングスターパラダイス設定 fixed Valaris
+		skill_rest(sd, 1); // TK_HPTIME sitting down mode [Dralnu]
+		clif_sitting(sd);
 		break;
 	case 0x03: // standup
-		pc_setstand(sd);
+		if (!pc_issit(sd)) {
+			//Bugged client? Just refresh them.
+			WBUFW(buf, 0) = 0x8a;
+			WBUFL(buf, 2) = sd->bl.id;
+			WBUFB(buf,26) = 3;
+			clif_send(buf, packet_len_table[0x8a], &sd->bl, SELF);
+			return;
+		}
 		skill_gangsterparadise(sd, 0); // ギャングスターパラダイス解除 fixed Valaris
 		skill_rest(sd, 0); // TK_HPTIME standing up mode [Dralnu]
 		WBUFW(buf, 0) = 0x8a;

+ 1 - 1
src/map/pc.c

@@ -2952,7 +2952,7 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl)
 		itemid = md->db->dropitem[i].nameid;
 		if(itemid <= 0 || (itemid>4000 && itemid<5000 && pc_checkskill(sd,TF_STEAL) <= 5))
 			continue;
-		if(rand() % 10000 <= md->db->dropitem[i].p*skill/100)
+		if(rand() % 10000 < md->db->dropitem[i].p*skill/100)
 			break;
 	}
 	if (i == MAX_MOB_DROP)

+ 1 - 1
src/map/skill.c

@@ -3915,7 +3915,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 		i = 0;
 		if (dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m)) && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER)
 		{	// split the if for readability, and included gunslingers in the check so that their coins cannot be removed [Reddozen]
-			i = dstsd->spiritball * 7;
+			i = dstsd->spiritball * 10;
 			pc_delspiritball(dstsd,dstsd->spiritball,0);
 		} else if (dstmd && !(status_get_mode(bl)&MD_BOSS) && rand() % 100 < 20)
 		{	// check if target is a monster and not a Boss, for the 20% chance to absorb 2 SP per monster's level [Reddozen]