diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-12 13:44:42 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-12 13:44:42 +0000 |
commit | a522db8a246bcac5c1aa82ee070db2c5453f0cb4 (patch) | |
tree | a72461ceca95948e0d7148b1c9846e7ba0a20f54 | |
parent | 1b2454dc416b9821b754879305bf22d74cae7ae0 (diff) | |
download | hercules-a522db8a246bcac5c1aa82ee070db2c5453f0cb4.tar.gz hercules-a522db8a246bcac5c1aa82ee070db2c5453f0cb4.tar.bz2 hercules-a522db8a246bcac5c1aa82ee070db2c5453f0cb4.tar.xz hercules-a522db8a246bcac5c1aa82ee070db2c5453f0cb4.zip |
- Fixed Cart Termination's damage.
- Added the missing check to remove character from memory when logging out and using the charsave_method which saves character map-server-side.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7631 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 5 | ||||
-rw-r--r-- | src/map/battle.c | 9 | ||||
-rw-r--r-- | src/map/chrif.c | 27 |
3 files changed, 25 insertions, 16 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 0879372ac..7ed26b6fc 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,11 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/07/12
+ * Fixed Cart Termination's damage. [Skotlex]
+ * Added the missing check to remove character from memory when logging out
+ and using the charsave_method which saves character map-server-side.
+ [Skotlex]
2006/07/11
* Fixed inverted check which was preventing you from buying more than 1
from any stackable item.... [Skotlex]
diff --git a/src/map/battle.c b/src/map/battle.c index c74179db2..c956fcda8 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1422,12 +1422,13 @@ static struct Damage battle_calc_weapon_attack( skillratio += 30*skill_lv; break; case WS_CARTTERMINATION: - i = (10 * (16 - skill_lv)); + i = 10 * (16 - skill_lv); if (i < 1) i = 1; - if(sd && sd->cart_weight > 0) //Preserve damage ratio when max cart weight is changed. - skillratio += (sd->cart_weight * 8000) / (i * battle_config.max_cart_weight) - 100; + //Preserve damage ratio when max cart weight is changed. + if(sd && sd->cart_weight && sd->cart_max_weight) + skillratio += (sd->cart_weight * 80000) / (i * sd->cart_max_weight) - 100; else if (!sd) - skillratio += 8000 / i - 100; + skillratio += 80000 / i - 100; flag.cardfix = 0; break; case TK_DOWNKICK: diff --git a/src/map/chrif.c b/src/map/chrif.c index 520ee4052..3f253d5a2 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -212,20 +212,23 @@ int chrif_save(struct map_session_data *sd, int flag) #ifndef TXT_ONLY
if(charsave_method){ //New 'Local' save
charsave_savechar(sd->char_id, &sd->status);
- if (flag == 1) chrif_char_offline(sd); //Tell char server that character went offline.
- }else{
-#endif
- WFIFOHEAD(char_fd, sizeof(sd->status) + 13);
- WFIFOW(char_fd,0) = 0x2b01;
- WFIFOW(char_fd,2) = sizeof(sd->status) + 13;
- WFIFOL(char_fd,4) = sd->bl.id;
- WFIFOL(char_fd,8) = sd->char_id;
- WFIFOB(char_fd,12) = (flag==1)?1:0; //Flag to tell char-server this character is quitting.
- memcpy(WFIFOP(char_fd,13), &sd->status, sizeof(sd->status));
- WFIFOSET(char_fd, WFIFOW(char_fd,2));
-#ifndef TXT_ONLY
+ if (flag) //Character final saved.
+ sd->state.finalsave = 1;
+ if (flag == 1) {
+ chrif_char_offline(sd); //Tell char server that character went offline.
+ map_quit_ack(sd); //Remove from memory.
+ }
+ return 0;
}
#endif
+ WFIFOHEAD(char_fd, sizeof(sd->status) + 13);
+ WFIFOW(char_fd,0) = 0x2b01;
+ WFIFOW(char_fd,2) = sizeof(sd->status) + 13;
+ WFIFOL(char_fd,4) = sd->bl.id;
+ WFIFOL(char_fd,8) = sd->char_id;
+ WFIFOB(char_fd,12) = (flag==1)?1:0; //Flag to tell char-server this character is quitting.
+ memcpy(WFIFOP(char_fd,13), &sd->status, sizeof(sd->status));
+ WFIFOSET(char_fd, WFIFOW(char_fd,2));
if (flag)
sd->state.finalsave = 1; //Mark the last save as done.
return 0;
|