public MainPlayer(ActorType type, int id, int staticID, CSItemGuid guid) : base(type, id, staticID, guid) { ItemBag = new CSItemBag(); m_player.Owner = this; m_autoPlayer.Owner = this; SelfAI = m_player; SetPropertyObjectID((int)MVCPropertyID.enMainPlayer); Combo = BattleArena.Singleton.Combo; }
public void OnMsgPlayerData_S2D2C(PacketReader p, object state) { Debug.Log("OnMsgPlayerData_S2D2C"); int operatorType = p.ReadInt32(); int feID = p.ReadInt32(); uint accountUID = p.ReadUInt32(); string accountName = p.ReadUTF8(64); int charUID = p.ReadInt32(); uint dataLength = p.ReadUInt32(); byte version = p.ReadByte(); int serilizeType = p.ReadInt32(); PropertySet props = User.Singleton.UserProps; CSItemBag bag = User.Singleton.ItemBag; PlayerFloorInsts floorInsts = User.Singleton.floorInsts; //todo test Data //CardBag.Singleton.GetTestCard(); User.Singleton.Guid = charUID; if ((serilizeType & (int)ENSerilizeType.enSerilizeProps) > 0) { props.Deserialize(p); } if ((serilizeType & (int)ENSerilizeType.enSerilizeItemBag) > 0) { bag.Deserialize(p); } if ((serilizeType & (int)ENSerilizeType.enSerilizeFloorInsts) > 0) { floorInsts.Deserialize(p); } User.Singleton.OnServerProps(); UnityEngine.Debug.Log("count = " + bag.GetItemCount()); //MiniServer.Singleton.req_battleHelperList(); // 记录数据 User.Singleton.RecordData(); }