diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-24 02:41:32 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-24 02:41:32 +0000 |
commit | e061189cdeb39b3efb0fd3a9e6f299379671fb2f (patch) | |
tree | a00b8b11e068c2beec5112f17a167cd5652d919d /src/map/clif.c | |
parent | 2d740c0b724383ea09540509d7069d02b74db096 (diff) | |
download | hercules-e061189cdeb39b3efb0fd3a9e6f299379671fb2f.tar.gz hercules-e061189cdeb39b3efb0fd3a9e6f299379671fb2f.tar.bz2 hercules-e061189cdeb39b3efb0fd3a9e6f299379671fb2f.tar.xz hercules-e061189cdeb39b3efb0fd3a9e6f299379671fb2f.zip |
* [Optimized]:
- Setting of variables with defined scope in some frequently executed script events.
* [Added]:
- Missing script_require_trigger flags for some power hungry events.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7325 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 324994d69..9994de65e 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8231,7 +8231,10 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) sc_start(&sd->bl,SC_NOCHAT,100,0,0);
// Lance
- npc_script_event(sd, NPCE_LOADMAP);
+ if(sd->state.event_loadmap){
+ pc_setregstr(sd, add_str("@maploaded$"), map[sd->bl.m].name);
+ npc_script_event(sd, NPCE_LOADMAP);
+ }
if (pc_checkskill(sd, SG_DEVIL) && !pc_nextjobexp(sd))
clif_status_load(&sd->bl, SI_DEVIL, 1); //blindness [Komurka]
@@ -9273,10 +9276,12 @@ void clif_parse_NpcBuyListSend(int fd,struct map_session_data *sd) fail = 1;
else{
if((nd = ((struct npc_data *)map_id2bl(sd->npc_shopid))->master_nd)){
+ int regkey = add_str("@bought_nameid");
+ int regkey2 = add_str("@bought_quantity");
sprintf(npc_ev, "%s::OnBuyItem", nd->exname);
for(i=0;i<n;i++){
- setd_sub(NULL,sd, "@bought_nameid", i, (void *)((int)item_list[i*2+1]),NULL);
- setd_sub(NULL,sd, "@bought_quantity", i, (void *)((int)item_list[i*2]),NULL);
+ pc_setreg(sd,regkey+(i<<24),(int)item_list[i*2+1]);
+ pc_setreg(sd,regkey2+(i<<24),(int)item_list[i*2]);
}
npc_event(sd, npc_ev, 0);
fail = 0;
|