private void OnUnitAttrModifyString(PacketBase packet) { ss2db.NotifyUpdatePlayerAttribString msg = packet as ss2db.NotifyUpdatePlayerAttribString; PlayerCache member = PlayerCacheManager.Instance.GetMember(msg.char_idx); if (member != null) { member.UpdateAttribute(msg.type, msg.value); } else { Log.Warning("OnUnitAttrModifyString - 未找到玩家缓存信息:" + msg.char_idx); } }
private void OnCharacterInfoLoaded(ClientUID client_uid, InterServerID server_uid, long char_idx) { PlayerCache member = PlayerCacheManager.Instance.GetMember(char_idx); if (member == null) { Log.Warning("OnPlayerInfoLoaded - 未找到玩家缓存信息:" + char_idx); return; } //设置服务器信息 member.client_uid = client_uid; member.ss_uid = server_uid.ss_uid; member.UpdateAttribute(eUnitModType.UMT_time_last_login, Time.second_time); //返回数据给ss db2ss.CharacterInfo rep_msg = PacketPools.Get(db2ss.msg.CHARACTER_INFO) as db2ss.CharacterInfo; rep_msg.server_uid = server_uid; rep_msg.client_uid = client_uid; rep_msg.data.Copy(member.ss_data); this.Send(rep_msg); //读取邮件 MailCacheManager.Instance.LoadMailbox(member.char_idx); }