예제 #1
0
        public static OtItem Create(OtItemType type)
        {
            OtItem item = null;

            if (type.Group == OtItemGroup.Depot)
            {
                item = new OtDepot(type);
            }
            else if (type.Group == OtItemGroup.Container)
            {
                item = new OtContainer(type);
            }
            else if (type.Group == OtItemGroup.Teleport)
            {
                item = new OtTeleport(type);
            }
            else if (type.Group == OtItemGroup.MagicField)
            {
                item = new OtMagicField(type);
            }
            else if (type.Group == OtItemGroup.Door)
            {
                item = new OtDoor(type);
            }
            else if (type.Group == OtItemGroup.TrashHolder)
            {
                item = new OtTrashHolder(type);
            }
            else if (type.Group == OtItemGroup.MailBox)
            {
                item = new OtMailBox(type);
            }
            else
            {
                item = new OtItem(type);
            }

            return(item);
        }
예제 #2
0
        public static OtItem Create(OtItemType type)
        {
            OtItem item = null;

            if (type.Group == OtItemGroup.Depot)
                item = new OtDepot(type);
            else if (type.Group == OtItemGroup.Container)
                item = new OtContainer(type);
            else if (type.Group == OtItemGroup.Teleport)
                item = new OtTeleport(type);
            else if (type.Group == OtItemGroup.MagicField)
                item = new OtMagicField(type);
            else if (type.Group == OtItemGroup.Door)
                item = new OtDoor(type);
            else if (type.Group == OtItemGroup.TrashHolder)
                item = new OtTrashHolder(type);
            else if (type.Group == OtItemGroup.MailBox)
                item = new OtMailBox(type);
            else
                item = new OtItem(type);

            return item;
        }