summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-18 08:44:27 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-18 08:44:27 +0000
commitdb15814cc463589087a9825dd6012126f89cb261 (patch)
treeae133d196b0a6d9ede41a9cd0c11b28d6257f9c5 /src/map
parent5cf841f555c2d61390e4a3ff835b2c3eade84190 (diff)
downloadhercules-db15814cc463589087a9825dd6012126f89cb261.tar.gz
hercules-db15814cc463589087a9825dd6012126f89cb261.tar.bz2
hercules-db15814cc463589087a9825dd6012126f89cb261.tar.xz
hercules-db15814cc463589087a9825dd6012126f89cb261.zip
Fixed OnPCLoginEvent not working correctly (bugreport:1182).
Cleaned up some code typos/engrish. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12391 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/clif.c21
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/pc.c11
4 files changed, 20 insertions, 16 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 917d119bf..73b0a2feb 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7834,7 +7834,7 @@ int atcommand_barricade(const int fd, struct map_session_data* sd, const char* c
case 1: clif_displaymessage(fd, "Barricade fail. Invalid Size"); break;
case 2: clif_displaymessage(fd, "Barricade fail. Wall problem."); break;
case 3: clif_displaymessage(fd, "Barricade fail. Invalid Event"); break;
- case 4: clif_displaymessage(fd, "Barricade fail. Event allready exists"); break;
+ case 4: clif_displaymessage(fd, "Barricade fail. Event already exists"); break;
}
return -1;
diff --git a/src/map/clif.c b/src/map/clif.c
index f910e5418..fdeef84d0 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7936,17 +7936,23 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
npc_script_event(sd, NPCE_LOGIN);
mob_barricade_get(sd);
} else {
- //For some reason the client "loses" these on map-change.
+ //For some reason the client "loses" these on warp/map-change.
clif_updatestatus(sd,SP_STR);
clif_updatestatus(sd,SP_AGI);
clif_updatestatus(sd,SP_VIT);
clif_updatestatus(sd,SP_INT);
clif_updatestatus(sd,SP_DEX);
clif_updatestatus(sd,SP_LUK);
+
+ // abort currently running script
+ sd->state.using_fake_npc = 0;
+
+ if(sd->npc_id)
+ npc_event_dequeue(sd);
}
if( sd->state.changemap )
- {
+ {// restore information that gets lost on map-change
if (night_flag && map[sd->bl.m].flag.nightenabled)
{ //Display night.
if( !sd->state.night )
@@ -7965,11 +7971,6 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
sd->state.changemap = false;
}
- sd->state.using_fake_npc = 0;
-
- if(sd->npc_id)
- npc_event_dequeue(sd);
-
#ifndef TXT_ONLY
mail_clear(sd);
#endif
@@ -12023,9 +12024,9 @@ void clif_parse_cashshop_buy(int fd, struct map_session_data *sd)
* Adoption System
*==========================================*/
-// 0 : You cannot adopt more that 1 son
-// 1 : You should be at least lvl 70 to adopt
-// 2 : You cannot adopt a married player
+// 0 : "You cannot adopt more than 1 child."
+// 1 : "You must be at least character level 70 in order to adopt someone."
+// 2 : "You cannot adopt a married person."
void clif_Adopt_reply(struct map_session_data *sd, int type)
{
int fd = sd->fd;
diff --git a/src/map/mob.c b/src/map/mob.c
index 026f08c84..a26726b21 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -513,7 +513,7 @@ short mob_barricade_build(short m, short x, short y, short count, short dir, boo
return 2;
if( (barricade = (struct barricade_data *)strdb_get(barricade_db,event)) != NULL )
- return 3; // Allready a barricade with event name
+ return 3; // Already a barricade with event name
if( map_getcell(m, x, y, CELL_CHKNOREACH) )
return 4; // Starting cell problem
diff --git a/src/map/pc.c b/src/map/pc.c
index 9d8ef409b..5845fe56e 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -569,7 +569,7 @@ bool pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd
return false;
if( b_sd->status.father || b_sd->status.mother || b_sd->adopt_invite )
- return false; // allready adopted baby / in adopt request
+ return false; // already adopted baby / in adopt request
if( !p1_sd->status.partner_id || !p1_sd->status.party_id || p1_sd->status.party_id != b_sd->status.party_id )
return false; // You need to be married and in party with baby to adopt
@@ -587,13 +587,13 @@ bool pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd
if( !pc_isequipped(p2_sd, WEDDING_RING_M) && !pc_isequipped(p2_sd, WEDDING_RING_F) )
return false;
- // Allready adopted a baby
+ // Already adopted a baby
if( p1_sd->status.child || p2_sd->status.child ) {
clif_Adopt_reply(p1_sd, 0);
return false;
}
- // Fathers need at least lvl 70 to adopt
+ // Parents need at least lvl 70 to adopt
if( p1_sd->status.base_level < 70 || p2_sd->status.base_level < 70 ) {
clif_Adopt_reply(p1_sd, 1);
return false;
@@ -604,7 +604,10 @@ bool pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd
return false;
}
- return ( b_sd->status.class_ >= JOB_NOVICE && b_sd->status.class_ <= JOB_THIEF );
+ if( !(b_sd->status.class_ >= JOB_NOVICE && b_sd->status.class_ <= JOB_THIEF) )
+ return false;
+
+ return true;
}
/*==========================================