Example #1
0
 internal static void GetMain(ItemDetail questDetail, MainLua mainLua)
 {
     if (questDetail.items.Any(item => item.isTarget))
     {
         CheckQuestItem checkQuestItem = new CheckQuestItem(mainLua, checkIsDormantItem, questDetail.itemMetadata.objectiveType);
         mainLua.AddToQuestTable(BuildItemTargetList(questDetail.items));
         mainLua.AddToQStep_Main(QStep_MainCommonMessages.dormantItemTargetMessages);
     }
 }
Example #2
0
        internal static void GetDefinition(ItemDetail questDetail, DefinitionLua definitionLua)
        {
            List <string> requestList         = new List <string>();
            StringBuilder requestEquipBuilder = new StringBuilder("requestEquipIds = {");

            foreach (Item item in questDetail.items)
            {
                if (requestList.Contains(item.item))
                {
                    continue;
                }
                else if (item.item.Contains("EQP_WP_"))
                {
                    requestEquipBuilder.Append($@"""{item.item}"", ");
                    requestList.Add(item.item);
                }
            }
            requestEquipBuilder.Append("}");

            definitionLua.AddDefinition(requestEquipBuilder.ToString());
        }
Example #3
0
        public static void AddQuestEntities(ItemDetail detail, DataSet dataSet, List <Fox2EntityClass> entityList)
        {
            List <Item>  items = detail.items;
            ItemMetadata meta  = detail.itemMetadata;

            if (items.Count() > 0)
            {
                foreach (Item item in items)
                {
                    GameObjectLocator           itemLocator = new GameObjectLocator(item.GetObjectName(), dataSet, "TppPickableSystem");
                    Transform                   transform   = new Transform(itemLocator, item.position);
                    string                      equipId     = Hashing.ToStr32(item.item);
                    TppPickableLocatorParameter param       = new TppPickableLocatorParameter(itemLocator, equipId, item.count, item.isBoxed);

                    itemLocator.SetTransform(transform);
                    itemLocator.SetParameter(param);

                    entityList.Add(itemLocator);
                    entityList.Add(transform);
                    entityList.Add(param);
                }
            }
        }
Example #4
0
 public ItemManager(ItemDetail detail) : base(detail, visualizer)
 {
 }