summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c8
-rw-r--r--src/map/map.c3
-rw-r--r--src/map/status.c12
3 files changed, 7 insertions, 16 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index aad0a5ddc..f895a7579 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -276,7 +276,7 @@ int clif_send_sub(struct block_list *bl, va_list ap)
case AREA_WOSC:
{
struct map_session_data *ssd = (struct map_session_data *)src_bl;
- if ((ssd != 0) && (src_bl->type == BL_PC) && (sd->chatID != 0) && (sd->chatID == ssd->chatID))
+ if (ssd && (src_bl->type == BL_PC) && sd->chatID && (sd->chatID == ssd->chatID))
return 0;
}
break;
@@ -385,9 +385,11 @@ int clif_send (unsigned char *buf, int len, struct block_list *bl, int type) {
}
break;
case AREA:
- case AREA_WOS:
- case AREA_WOC:
case AREA_WOSC:
+ if (sd && bl->prev == NULL) //Otherwise source misses the packet.[Skotlex]
+ clif_send (buf, len, bl, SELF);
+ case AREA_WOC:
+ case AREA_WOS:
map_foreachinarea(clif_send_sub, bl->m, bl->x-AREA_SIZE, bl->y-AREA_SIZE, bl->x+AREA_SIZE, bl->y+AREA_SIZE,
BL_PC, buf, len, bl, type);
break;
diff --git a/src/map/map.c b/src/map/map.c
index b639e8f85..70b9d290e 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1744,8 +1744,7 @@ struct map_session_data * map_charid2sd(int id) {
*------------------------------------------
*/
struct map_session_data * map_nick2sd(char *nick) {
- int i, quantity=0, users;
- struct map_session_data *sd = NULL;
+ int i, users;
struct map_session_data *pl_sd = NULL, **pl_allsd;
if (nick == NULL)
diff --git a/src/map/status.c b/src/map/status.c
index a26986316..7fc090dd1 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5162,13 +5162,8 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
break;
}
- if (sd)
- { //Why must it be ONLY for players? [Skotlex]
- if (bl->prev)
+ if (sd) //Only for players, client crashes if they receive this for a mob o.O [Skotlex]
clif_status_change(bl,StatusIconChangeTable[type],1);
- else
- clif_status_load(bl,StatusIconChangeTable[type],1);
- }
// Set option as needed.
opt_flag = 1;
@@ -5627,12 +5622,7 @@ int status_change_end( struct block_list* bl , int type,int tid )
}
if (sd)
- { //Why must it be ONLY for players? [Skotlex]
- if (bl->prev)
clif_status_change(bl,StatusIconChangeTable[type],0);
- else
- clif_status_load(bl,StatusIconChangeTable[type],0);
- }
opt_flag = 1;
switch(type){