diff options
author | shennetsind <ind@henn.et> | 2013-10-30 18:42:58 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-10-30 18:42:58 -0200 |
commit | c159a3c4ffd414d7423b3504a282cce1111b7874 (patch) | |
tree | 0d7051a90bcd0b9ba229ff16d52a9dea0bbee743 /src/map/clif.c | |
parent | 7fefefdde386f13f8fefa8db3ffe9ed140c8aa10 (diff) | |
download | hercules-c159a3c4ffd414d7423b3504a282cce1111b7874.tar.gz hercules-c159a3c4ffd414d7423b3504a282cce1111b7874.tar.bz2 hercules-c159a3c4ffd414d7423b3504a282cce1111b7874.tar.xz hercules-c159a3c4ffd414d7423b3504a282cce1111b7874.zip |
Account-wide Exp/Drop/Death Modifiers
Attempting to mimic the official as suggested in http://hercules.ws/board/topic/250-official-vip-system/
The variables can be read and modified thru scripting as well as sql, the patch introduces 3 new pc-arams 'ModExp','ModDrop' and 'ModDeath' for that purpose.
The OnLogin modifier display is not the real deal though -- wasn't able to get it to output properly (though that might have been my client files failt)
Up for review.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 957f75d99..a5e92b998 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17798,6 +17798,19 @@ void clif_bank_withdraw(struct map_session_data *sd,enum e_BANKING_WITHDRAW_ACK clif->send(&p,sizeof(p), &sd->bl, SELF); } +/* TODO: official response packet (tried 0x8cb/0x97b but the display was quite screwed up.) */ +/* currently mimicing */ +void clif_show_modifiers (struct map_session_data *sd) { + + if( sd->status.mod_exp != 100 || sd->status.mod_drop != 100 || sd->status.mod_death != 100 ) { + char output[128]; + + snprintf(output,128,"Base EXP : %d%% | Base Drop: %d%% | Base Death Penalty: %d%%", + sd->status.mod_exp,sd->status.mod_drop,sd->status.mod_death); + clif->broadcast2(&sd->bl,output, strlen(output) + 1, 0xffbc90, 0x190, 12, 0, 0, SELF); + } + +} /* */ unsigned short clif_decrypt_cmd( int cmd, struct map_session_data *sd ) { @@ -18597,6 +18610,8 @@ void clif_defaults(void) { /* Bank System [Yommy/Hercules] */ clif->bank_deposit = clif_bank_deposit; clif->bank_withdraw = clif_bank_withdraw; + /* */ + clif->show_modifiers = clif_show_modifiers; /*------------------------ *- Parse Incoming Packet *------------------------*/ |