|
@@ -39,7 +39,7 @@ static const int packet_len_table[0x3d] = { // U - used, F - free
|
|
|
11,10,10, 0,11, -1,266,10, // 2b10-2b17: U->2b10, U->2b11, U->2b12, F->2b13, U->2b14, U->2b15, U->2b16, U->2b17
|
|
|
2,10, 2,-1,-1,-1, 2, 7, // 2b18-2b1f: U->2b18, U->2b19, U->2b1a, U->2b1b, U->2b1c, U->2b1d, U->2b1e, U->2b1f
|
|
|
-1,10, 8, 2, 2,14,19,19, // 2b20-2b27: U->2b20, U->2b21, U->2b22, U->2b23, U->2b24, U->2b25, U->2b26, U->2b27
|
|
|
- -1, 0, 6,16, 0, 6,-1,-1, // 2b28-2b2f: U->2b28, F->2b29, U->2b2a, U->2b2b, F->2b2c, U->2b2d, U->2b2e, U->2b2f
|
|
|
+ -1, 0, 6,15, 0, 6,-1,-1, // 2b28-2b2f: U->2b28, F->2b29, U->2b2a, U->2b2b, F->2b2c, U->2b2d, U->2b2e, U->2b2f
|
|
|
};
|
|
|
|
|
|
//Used Packets:
|
|
@@ -849,6 +849,10 @@ int chrif_changeemail(int id, const char *actual_email, const char *new_email) {
|
|
|
* @operation_type : see chrif_req_op
|
|
|
* @timediff : tick to add or remove to unixtimestamp
|
|
|
* @val1 : extra data value to transfer for operation
|
|
|
+ * CHRIF_OP_LOGIN_VIP: 0x1 : Select info and update old_groupid
|
|
|
+ * 0x2 : VIP duration is changed by atcommand or script
|
|
|
+ * 0x4 : Show status reply by char-server through 0x2b0f
|
|
|
+ * 0x8 : First request on player login
|
|
|
* @val2 : extra data value to transfer for operation
|
|
|
*/
|
|
|
int chrif_req_login_operation(int aid, const char* character_name, enum chrif_req_op operation_type, int32 timediff, int val1, int val2) {
|
|
@@ -1575,38 +1579,44 @@ void chrif_parse_ack_vipActive(int fd) {
|
|
|
#ifdef VIP_ENABLE
|
|
|
int aid = RFIFOL(fd,2);
|
|
|
uint32 vip_time = RFIFOL(fd,6);
|
|
|
- bool isvip = RFIFOB(fd,10);
|
|
|
- bool isgm = RFIFOB(fd,11);
|
|
|
- uint32 groupid = RFIFOL(fd,12);
|
|
|
+ uint32 groupid = RFIFOL(fd,10);
|
|
|
+ uint8 flag = RFIFOB(fd,14);
|
|
|
TBL_PC *sd = map_id2sd(aid);
|
|
|
+ bool changed = false;
|
|
|
|
|
|
if(sd == NULL) return;
|
|
|
|
|
|
sd->group_id = groupid;
|
|
|
pc_group_pc_load(sd);
|
|
|
|
|
|
- if(isgm) {
|
|
|
+ if ((flag&0x2)) //isgm
|
|
|
clif_displaymessage(sd->fd,msg_txt(sd,437));
|
|
|
- return;
|
|
|
- }
|
|
|
- if(isvip) {
|
|
|
- sd->vip.enabled = 1;
|
|
|
- sd->vip.time = vip_time;
|
|
|
- // Increase storage size for VIP.
|
|
|
- sd->storage_size = battle_config.vip_storage_increase + MIN_STORAGE;
|
|
|
- if (sd->storage_size > MAX_STORAGE) {
|
|
|
- ShowError("intif_parse_ack_vipActive: Storage size for player %s (%d:%d) is larger than MAX_STORAGE. Storage size has been set to MAX_STORAGE.\n", sd->status.name, sd->status.account_id, sd->status.char_id);
|
|
|
- sd->storage_size = MAX_STORAGE;
|
|
|
+ else {
|
|
|
+ changed = (sd->vip.enabled != (flag&0x1));
|
|
|
+ if((flag&0x1)) { //isvip
|
|
|
+ sd->vip.enabled = 1;
|
|
|
+ sd->vip.time = vip_time;
|
|
|
+ // Increase storage size for VIP.
|
|
|
+ sd->storage_size = battle_config.vip_storage_increase + MIN_STORAGE;
|
|
|
+ if (sd->storage_size > MAX_STORAGE) {
|
|
|
+ ShowError("intif_parse_ack_vipActive: Storage size for player %s (%d:%d) is larger than MAX_STORAGE. Storage size has been set to MAX_STORAGE.\n", sd->status.name, sd->status.account_id, sd->status.char_id);
|
|
|
+ sd->storage_size = MAX_STORAGE;
|
|
|
+ }
|
|
|
+ // Magic Stone requirement avoidance for VIP.
|
|
|
+ if (battle_config.vip_gemstone)
|
|
|
+ sd->special_state.no_gemstone = 2; // need to be done after status_calc_bl(bl,first);
|
|
|
+ } else if (sd->vip.enabled) {
|
|
|
+ sd->vip.enabled = 0;
|
|
|
+ sd->vip.time = 0;
|
|
|
+ sd->storage_size = MIN_STORAGE;
|
|
|
+ sd->special_state.no_gemstone = 0;
|
|
|
+ clif_displaymessage(sd->fd,msg_txt(sd,438));
|
|
|
}
|
|
|
- // Magic Stone requirement avoidance for VIP.
|
|
|
- if (battle_config.vip_gemstone)
|
|
|
- sd->special_state.no_gemstone = 2; // need to be done after status_calc_bl(bl,first);
|
|
|
- } else if (sd->vip.enabled) {
|
|
|
- sd->vip.enabled = 0;
|
|
|
- sd->vip.time = 0;
|
|
|
- sd->storage_size = MIN_STORAGE;
|
|
|
- sd->special_state.no_gemstone = 0;
|
|
|
- clif_displaymessage(sd->fd,msg_txt(sd,438));
|
|
|
+ }
|
|
|
+ // Show info if status changed
|
|
|
+ if (((flag&0x4) || changed) && !sd->vip.disableshowrate) {
|
|
|
+ clif_display_pinfo(sd,ZC_PERSONAL_INFOMATION);
|
|
|
+ //clif_vip_display_info(sd,ZC_PERSONAL_INFOMATION_CHN);
|
|
|
}
|
|
|
#endif
|
|
|
}
|