summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-05 08:38:09 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-05 08:38:09 +0000
commit3a254ef8fe55cf4d4cf69ebd2c0edb76646386e9 (patch)
tree56d677e1b18bc1a5e64513aeeaef7c8fe2f7710f /src
parent27ef242114cf8cca770a1d50db6c3c0f997367f2 (diff)
downloadhercules-3a254ef8fe55cf4d4cf69ebd2c0edb76646386e9.tar.gz
hercules-3a254ef8fe55cf4d4cf69ebd2c0edb76646386e9.tar.bz2
hercules-3a254ef8fe55cf4d4cf69ebd2c0edb76646386e9.tar.xz
hercules-3a254ef8fe55cf4d4cf69ebd2c0edb76646386e9.zip
Optimised PCLoginEvent activation a bit
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@912 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index adc2d68da..0586e7a9e 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -891,10 +891,14 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
else
sprintf(tmp_output,"Character '"CL_WHITE"%s"CL_RESET"' logged in. (Account ID: '"CL_WHITE"%d"CL_RESET"').\n", sd->status.name, sd->status.account_id);
ShowInfo(tmp_output);
- //printf("pc: OnPCLogin event done. (%d events)\n", npc_event_doall("OnPCLogin") );
- if (npc_name2id("PCLoginEvent")) {
- run_script(npc_name2id("PCLoginEvent")->u.scr.script,0,sd->bl.id,npc_name2id("PCLoginEvent")->bl.id); // PCLoginNPC
- ShowStatus("Event '"CL_WHITE"PCLoginEvent"CL_RESET"' executed.\n");
+
+ {
+ struct npc_data *npc;
+ //printf("pc: OnPCLogin event done. (%d events)\n", npc_event_doall("OnPCLogin") );
+ if ((npc = npc_name2id("PCLoginEvent"))) {
+ run_script(npc->u.scr.script,0,sd->bl.id,npc->bl.id); // PCLoginNPC
+ ShowStatus("Event '"CL_WHITE"PCLoginEvent"CL_RESET"' executed.\n");
+ }
}
// Send friends list
clif_friends_list_send(sd);