summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-09 14:21:41 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-09 14:21:41 +0000
commit173c3195ade5a6cdfe20c49e7f184a6b1336ca19 (patch)
treef85048abbba257b7418b8f379ed2b858088945d7 /src/map/clif.c
parent71ae3526c038b1aceb0400c6c798f2a69234087b (diff)
downloadhercules-173c3195ade5a6cdfe20c49e7f184a6b1336ca19.tar.gz
hercules-173c3195ade5a6cdfe20c49e7f184a6b1336ca19.tar.bz2
hercules-173c3195ade5a6cdfe20c49e7f184a6b1336ca19.tar.xz
hercules-173c3195ade5a6cdfe20c49e7f184a6b1336ca19.zip
- Code rewrites in mob_damage and party_exp_even_share for correctly handling overflow issues. Now uses UINT_MAX for range comparisons, as it should be.
- Also modified the mob_db reading to use UINT_MAX for exp limits, changed their exp/job exp fields to unsigned int as well. - Modified multi_level_up behaviour to work as specified by Kyoki. - removed functions pc_next[base/job]after as they are no longer needed. - Modified the skill attack display of Meteor Assault and the Warm Skills (I think the caster should no longer do fancy animations now on each hit) - Added back water elemental targets being inmune to SC_FREEZE - Fixed the status_change_start line in charsave.c (I knew I was forgetting something) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5235 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 1ba814652..a97f27941 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -365,7 +365,7 @@ int clif_send (unsigned char *buf, int len, struct block_list *bl, int type) {
for (i = 0; i < fd_max; i++) {
if (session[i] && (sd = (struct map_session_data *)session[i]->session_data) != NULL && sd->state.auth) {
if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
- WFIFOHEAD(i, len);
+ WFIFOHEAD(i, len);
memcpy(WFIFOP(i,0), buf, len);
WFIFOSET(i,len);
}
@@ -412,7 +412,7 @@ int clif_send (unsigned char *buf, int len, struct block_list *bl, int type) {
if (packet_db[cd->usersd[i]->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
if (cd->usersd[i]->fd >0 && session[cd->usersd[i]->fd]) // Added check to see if session exists [PoW]
{
- WFIFOHEAD(cd->usersd[i]->fd,len);
+ WFIFOHEAD(cd->usersd[i]->fd,len);
memcpy(WFIFOP(cd->usersd[i]->fd,0), buf, len);
WFIFOSET(cd->usersd[i]->fd,len);
}
@@ -424,6 +424,7 @@ int clif_send (unsigned char *buf, int len, struct block_list *bl, int type) {
for(i=1; i<fd_max; i++) {
if(session[i] && (sd = (struct map_session_data*)session[i]->session_data) != NULL &&
sd->state.mainchat && sd->fd) {
+ WFIFOHEAD(sd->fd, len);
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd, len);
}
@@ -472,7 +473,7 @@ int clif_send (unsigned char *buf, int len, struct block_list *bl, int type) {
if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) != NULL && sd->state.auth && sd->fd && sd->partyspy) {
if (sd->partyspy == p->party_id) {
if (sd->fd && packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
- WFIFOHEAD(sd->fd,len);
+ WFIFOHEAD(sd->fd,len);
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);
}
@@ -483,7 +484,7 @@ int clif_send (unsigned char *buf, int len, struct block_list *bl, int type) {
break;
case SELF:
if (sd && sd->fd && packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
- WFIFOHEAD(sd->fd,len);
+ WFIFOHEAD(sd->fd,len);
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);
}
@@ -533,7 +534,7 @@ int clif_send (unsigned char *buf, int len, struct block_list *bl, int type) {
if (session[i] && (sd = (struct map_session_data*)session[i]->session_data) != NULL && sd->state.auth && sd->fd && sd->guildspy) {
if (sd->guildspy == g->guild_id) {
if (packet_db[sd->packet_ver][RBUFW(buf,0)].len) { // packet must exist for the client version
- WFIFOHEAD(sd->fd,len);
+ WFIFOHEAD(sd->fd,len);
memcpy(WFIFOP(sd->fd,0), buf, len);
WFIFOSET(sd->fd,len);
}
@@ -8809,7 +8810,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
pc_checkskill(sd,SG_STAR_COMFORT))
status_calc_pc(sd,0);
- if (pc_checkskill(sd, SG_DEVIL) && !pc_nextjobafter(sd))
+ if (pc_checkskill(sd, SG_DEVIL) && !pc_nextjobexp(sd))
clif_status_load(&sd->bl, SI_DEVIL, 1); //blindness [Komurka]
map_foreachinarea(clif_getareachar,sd->bl.m,sd->bl.x-AREA_SIZE,sd->bl.y-AREA_SIZE,sd->bl.x+AREA_SIZE,sd->bl.y+AREA_SIZE,BL_ALL,sd);