summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-02 19:53:38 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-02 19:53:38 +0000
commitc3a511f4b1f1419307439685c64bc5aee3cfa76f (patch)
tree491bf1b824f85d9dec9f01d901cf32290567ffe3
parent8533f328ee73b484e72a18d3bcbc284ca11b3987 (diff)
downloadhercules-c3a511f4b1f1419307439685c64bc5aee3cfa76f.tar.gz
hercules-c3a511f4b1f1419307439685c64bc5aee3cfa76f.tar.bz2
hercules-c3a511f4b1f1419307439685c64bc5aee3cfa76f.tar.xz
hercules-c3a511f4b1f1419307439685c64bc5aee3cfa76f.zip
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6451 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt7
-rw-r--r--src/map/clif.c54
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/skill.c2
4 files changed, 46 insertions, 19 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0a77aecbf..83b519530 100644
--- a/Changelog-Trunk.txt
+++ b/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]
diff --git a/src/map/clif.c b/src/map/clif.c
index 6808260af..9e451d968 100644
--- a/src/map/clif.c
+++ b/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;
diff --git a/src/map/pc.c b/src/map/pc.c
index 770b857a1..47efd18c0 100644
--- a/src/map/pc.c
+++ b/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)
diff --git a/src/map/skill.c b/src/map/skill.c
index 1bcd5a074..33dc7b439 100644
--- a/src/map/skill.c
+++ b/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]