Esempio n. 1
0
        private Manifestation CreateCharacterManifestation(CharacterEntry character)
        {
            using var unitOfWork = _gameUnitOfWorkFactory.CreateChar();
            var characterAppearances = unitOfWork.CharacterAppearances.GetByCharacterId(character.Id);

            var newCharacter = new Manifestation()
            {
                AppearanceData = characterAppearances,
                IsRunning      = character.RunState == 1,
                Position       = new Vector3((float)character.CoordX, (float)character.CoordY, (float)character.CoordZ)
            };

            newCharacter.GenerateGUID(EntityType.Character, character.Id);

            return(newCharacter);
        }
Esempio n. 2
0
        private Manifestation CreateCharacterManifestation(CharacterEntry character)
        {
            using var unitOfWork = _gameUnitOfWorkFactory.CreateChar();
            var characterAppearances = unitOfWork.CharacterAppearances.GetByCharacterId(character.Id);

            var newCharacter = new Manifestation
            {
                AppearanceData = characterAppearances,
                Gender         = character.Gender,
                IsRunning      = character.IsRunning(),
                Position       = character.GetPositionVector()
            };

            newCharacter.GenerateGUID(EntityType.Character, character.Id);

            return(newCharacter);
        }