diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-29 13:17:15 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-29 13:17:15 +0000 |
commit | 8d78bf32411bff959e38cb94e9c9cdb383706a69 (patch) | |
tree | 36192f3b40c56a7941f8e1bd9bdc39b9e2221e10 /src/map/pc.c | |
parent | 246bcf76ea27aa1fa94f6a751ee40bf32298460a (diff) | |
download | hercules-8d78bf32411bff959e38cb94e9c9cdb383706a69.tar.gz hercules-8d78bf32411bff959e38cb94e9c9cdb383706a69.tar.bz2 hercules-8d78bf32411bff959e38cb94e9c9cdb383706a69.tar.xz hercules-8d78bf32411bff959e38cb94e9c9cdb383706a69.zip |
- Modified pc_dead so that the src is passed on to the master when it is a pet or homunculus.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12150 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 19781f1e5..3d0d0fc95 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4976,7 +4976,15 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) mob_script_callback(md, &sd->bl, CALLBACK_KILL); } break; - case BL_PC: + case BL_PET: //Pass on to master... + src = &((TBL_PET*)src)->msd->bl; + break; + case BL_HOM: + src = &((TBL_HOM*)src)->master->bl; + break; + } + + if (src && src->type == BL_PC) { struct map_session_data *ssd = (struct map_session_data *)src; pc_setglobalreg(ssd, "killedrid", sd->bl.id); @@ -4986,33 +4994,31 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) ssd->status.manner -= 5; if(ssd->status.manner < 0) sc_start(src,SC_NOCHAT,100,0,0); - - // PK/Karma system code (not enabled yet) [celest] - // originally from Kade Online, so i don't know if any of these is correct ^^; - // note: karma is measured REVERSE, so more karma = more 'evil' / less honourable, - // karma going down = more 'good' / more honourable. - // The Karma System way... - /* +#if 0 + // PK/Karma system code (not enabled yet) [celest] + // originally from Kade Online, so i don't know if any of these is correct ^^; + // note: karma is measured REVERSE, so more karma = more 'evil' / less honourable, + // karma going down = more 'good' / more honourable. + // The Karma System way... + if (sd->status.karma > ssd->status.karma) { // If player killed was more evil sd->status.karma--; ssd->status.karma--; } else if (sd->status.karma < ssd->status.karma) // If player killed was more good ssd->status.karma++; - */ + - // or the PK System way... - /* + // or the PK System way... + if (sd->status.karma > 0) // player killed is dishonourable? ssd->status.karma--; // honour points earned sd->status.karma++; // honour points lost - */ + // To-do: Receive exp on certain occasions +#endif } } - break; - } - // PK/Karma system code (not enabled yet) [celest] /* |