diff options
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 570ceb6..6f1cc86 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -790,7 +790,10 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, short tmw_versio pc_calcstatus(sd,1); if (pc_isGM(sd)) + { printf("Connection accepted: character '%s' (account: %d; GM level %d).\n", sd->status.name, sd->status.account_id, pc_isGM(sd)); + clif_updatestatus(sd, SP_GM); + } else printf("Connection accepted: Character '%s' (account: %d).\n", sd->status.name, sd->status.account_id); @@ -817,6 +820,8 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, short tmw_versio sd->chat_lastmsg[0] = '\0'; sd->trade_reset_due = sd->trades_in = 0; + + sd->sit_reset_due = sd->sits_in = 0; // message of the limited time of the account if (connect_until_time != 0) { // don't display if it's unlimited or unknow value @@ -2948,7 +2953,6 @@ int pc_delitem(struct map_session_data *sd,int n,int amount,int type) */ int pc_dropitem(struct map_session_data *sd,int n,int amount) { - int i; nullpo_retr(1, sd); if (sd->trade_partner != 0 || sd->npc_id != 0 || sd->state.storage_flag) @@ -2960,12 +2964,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount) if(amount <= 0) return 0; - for (i = 0; i < 11; i++) { - if (equip_pos[i] > 0 && sd->equip_index[i] == n) { //Slot taken, remove item from there. - pc_unequipitem(sd, sd->equip_index[i], 1); - sd->equip_index[i] = -1; - } - } + pc_unequipinvyitem(sd, n, 1); if (sd->status.inventory[n].nameid <= 0 || @@ -6507,6 +6506,22 @@ int pc_unequipitem(struct map_session_data *sd,int n,int type) return 0; } +int pc_unequipinvyitem(struct map_session_data* sd, int n, int type) +{ + int i; + + nullpo_retr(1, sd); + + for (i = 0; i < 11; i++) { + if (equip_pos[i] > 0 && sd->equip_index[i] == n) { //Slot taken, remove item from there. + pc_unequipitem(sd, sd->equip_index[i], type); + sd->equip_index[i] = -1; + } + } + + return 0; +} + /*========================================== * �A�C�e����index�ԍ����l�߂��� * �� ���i�̑����\�`�F�b�N���s�Ȃ� |