Exemplo n.º 1
0
        public VMAvatar CreateAvatar(uint guid, XmlCharacter xml, bool visitor, short id)
        {
            VMAvatar avatar = (VMAvatar)VM.Context.CreateObjectInstance(guid, LotTilePos.OUT_OF_WORLD, Direction.NORTH).Objects[0];

            avatar.Visitor = visitor;
            var mailbox = VM.Entities.First(x => (x.Object.OBJ.GUID == 0xEF121974 || x.Object.OBJ.GUID == 0x1D95C9B0));


            avatar.SetAvatarData(xml);

            LotTilePos pos = mailbox.Position;

            pos.x = (short)(mailbox.Position.x + 1);
            pos.y = (short)(mailbox.Position.y + id);

            avatar.SetPosition(pos, Direction.WEST, VM.Context);
            //VMFindLocationFor.FindLocationFor(avatar, mailbox, VM.Context);


            return(avatar);
        }