summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2009-12-13 23:45:02 -0500
committerMadCamel <madcamel@gmail.com>2009-12-13 23:45:02 -0500
commit113fcc4f0a7a0921e94bc415515dd4b393a29d60 (patch)
treeaaa3974e0dae69fec04919a7b5d06dab006a6d76
parent79fa54ff8b0e50fe2b70f36573ed5e2cd22eedda (diff)
parentdad2bd80f6e05813715739cc2a047d3a4862b8af (diff)
downloadtmwa-2009.12.25.tar.gz
tmwa-2009.12.25.tar.bz2
tmwa-2009.12.25.tar.xz
tmwa-2009.12.25.zip
Merge commit 'tmw/master'v2009.12.25
-rw-r--r--src/map/clif.c6
-rw-r--r--src/map/mob.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index c961464..3fe4ad9 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6146,6 +6146,9 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
account_id = RFIFOL(fd,2);
} else return; // Not the auth packet
+ WFIFOL(fd,0) = account_id;
+ WFIFOSET(fd,4);
+
// if same account already connected, we disconnect the 2 sessions
if ((old_sd = map_id2sd(account_id)) != NULL) {
clif_authfail_fd(fd, 2); // same id
@@ -6161,9 +6164,6 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
pc_setnewpc(sd, account_id, RFIFOL(fd,6), RFIFOL(fd,10), RFIFOL(fd,14), RFIFOB(fd,18), fd);
- WFIFOL(fd,0) = sd->bl.id;
- WFIFOSET(fd,4);
-
map_addiddb(&sd->bl);
chrif_authreq(sd);
diff --git a/src/map/mob.c b/src/map/mob.c
index 5a0bedc..f3822c4 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2335,7 +2335,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
if(src && src->type == BL_MOB && ((struct mob_data*)src)->state.special_mob_ai){
struct mob_data *md2 = (struct mob_data *)src;
struct block_list *master_bl = map_id2bl(md2->master_id);
- if (master_bl->type == BL_PC) {
+ if (master_bl && master_bl->type == BL_PC) {
MAP_LOG_PC(((struct map_session_data *)master_bl), "MOB-TO-MOB-DMG FROM MOB%d %d TO MOB%d %d FOR %d",
md2->bl.id, md2->class,
md->bl.id, md->class,