diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-31 03:52:56 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-31 03:52:56 +0000 |
commit | af2d2bc89af950fe2b780ef72ac6b0f8561ac950 (patch) | |
tree | 0044bf40e7f93ec7b089bfe6385bfc07c5cd58f2 /src/map/pc.c | |
parent | 4107030428aa608b62524bcde7d211665ab83ca3 (diff) | |
download | hercules-af2d2bc89af950fe2b780ef72ac6b0f8561ac950.tar.gz hercules-af2d2bc89af950fe2b780ef72ac6b0f8561ac950.tar.bz2 hercules-af2d2bc89af950fe2b780ef72ac6b0f8561ac950.tar.xz hercules-af2d2bc89af950fe2b780ef72ac6b0f8561ac950.zip |
[Improved]:
- Fake NPC interface to use real NPCs.
- Scripting interface to restore and save sd->npc_id.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6873 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 8e76d3c7e..9049bc52b 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2785,8 +2785,8 @@ int pc_useitem(struct map_session_data *sd,int n) }
sd->canuseitem_tick= tick + battle_config.item_use_interval; //Update item use time.
- sd->npc_id = fake_npc_id;
- run_script(script,0,sd->bl.id,fake_npc_id);
+ //sd->npc_id = fake_nd->bl.id;
+ run_script(script,0,sd->bl.id,fake_nd->bl.id);
potion_flag = 0;
return 1;
}
@@ -6077,7 +6077,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int pos) int i;
struct item_data *data;
if (sd->inventory_data[n]->equip_script)
- run_script(sd->inventory_data[n]->equip_script,0,sd->bl.id,0);
+ run_script(sd->inventory_data[n]->equip_script,0,sd->bl.id,fake_nd->bl.id);
if(sd->status.inventory[n].card[0]==0x00ff ||
sd->status.inventory[n].card[0]==0x00fe ||
sd->status.inventory[n].card[0]==(short)0xff00)
@@ -6089,7 +6089,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int pos) continue;
data = itemdb_exists(sd->status.inventory[n].card[i]);
if (data && data->equip_script)
- run_script(data->equip_script,0,sd->bl.id,0);
+ run_script(data->equip_script,0,sd->bl.id,fake_nd->bl.id);
}
}
return 0;
@@ -6175,7 +6175,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) if (sd->inventory_data[n]) {
struct item_data *data;
if (sd->inventory_data[n]->unequip_script)
- run_script(sd->inventory_data[n]->unequip_script,0,sd->bl.id,0);
+ run_script(sd->inventory_data[n]->unequip_script,0,sd->bl.id,fake_nd->bl.id);
if(sd->status.inventory[n].card[0]==0x00ff ||
sd->status.inventory[n].card[0]==0x00fe ||
sd->status.inventory[n].card[0]==(short)0xff00)
@@ -6187,7 +6187,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) continue;
data = itemdb_exists(sd->status.inventory[n].card[i]);
if (data && data->unequip_script)
- run_script(data->unequip_script,0,sd->bl.id,0);
+ run_script(data->unequip_script,0,sd->bl.id,fake_nd->bl.id);
}
}
|