public void Read(BinaryReader br) { enabled = (EnabledFlags)br.ReadByte();// Enabled|In world|MiniMog found|Demon King defeated|Koko kidnapped|Hurry!|Koko met|Event Wait off level = br.ReadByte(); current_hp = br.ReadByte(); max_hp = br.ReadByte(); var tmp = br.ReadUInt16();// 4 bit = 1 weapon weapon = new byte[4]; weapon[0] = (byte)(tmp & 0x000F); weapon[1] = (byte)((tmp & 0x00F0) >> 4); weapon[2] = (byte)((tmp & 0x0F00) >> 8); weapon[3] = (byte)((tmp & 0xF000) >> 12); rank = br.ReadByte(); move = br.ReadByte(); saveCount = br.ReadUInt32(); id_related = br.ReadUInt16(); u1 = br.ReadBytes(6); itemClassACount = br.ReadByte(); itemClassBCount = br.ReadByte(); itemClassCCount = br.ReadByte(); itemClassDCount = br.ReadByte(); u2 = br.ReadBytes(16); associatedSaveID = br.ReadUInt32(); u3 = br.ReadByte(); boko_attack = (BokuAttackFlags)br.ReadByte();// star Count (chocobraise | chocoflammes | chocométéore | grochocobo) u4 = br.ReadByte(); home_walking = br.ReadByte(); u5 = br.ReadBytes(16); }
private void ParseCharacterGroup(CharacterGroup characterGroup, User user) { var subscribe = user.Subscriptions.SingleOrDefault(s => s.CharacterGroupId == characterGroup.CharacterGroupId); if (subscribe != null) { //Set what set in parent this.OrSetIn(subscribe); //Disable edit if set in parent EnabledFlags.AndNotSetIn(subscribe); if (!EnabledFlags.AnySet()) { return; } } foreach (var parentGroup in characterGroup.ParentGroups) { ParseCharacterGroup(parentGroup, user); if (!EnabledFlags.AnySet()) { return; } } }