Example #1
0
        private int GetSelectPriority(NPC_MESSAGE_TYPE type)
        {
            switch (type)
            {
            default:
                return(0);

            case NPC_MESSAGE_TYPE.DELIVERY_QUEST:
                return(1);

            case NPC_MESSAGE_TYPE.NEW_DELIVERY_QUEST:
                return(2);
            }
        }
Example #2
0
    public void CreateTable(string csv_text)
    {
        //IL_015d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0162: Unknown result type (might be due to invalid IL or missing references)
        //IL_016f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0174: Unknown result type (might be due to invalid IL or missing references)
        sections = new List <Section>();
        CSVReader cSVReader = new CSVReader(csv_text, "section,type,prm,priority,npcid,anim,posX,posY,posZ,rotX,rotY,rotZ,jp,voiceId", false);
        Section   section   = null;

        while (cSVReader.NextLine())
        {
            string           value  = string.Empty;
            NPC_MESSAGE_TYPE value2 = NPC_MESSAGE_TYPE.NONE;
            int    value3           = 0;
            int    value4           = 0;
            int    value5           = 0;
            string value6           = string.Empty;
            string value7           = string.Empty;
            float  value8           = 0f;
            float  value9           = 0f;
            float  value10          = 0f;
            float  value11          = 0f;
            float  value12          = 0f;
            float  value13          = 0f;
            int    value14          = 0;
            cSVReader.Pop(ref value);
            cSVReader.Pop(ref value2);
            cSVReader.Pop(ref value3);
            cSVReader.Pop(ref value4);
            cSVReader.Pop(ref value5);
            cSVReader.Pop(ref value6);
            cSVReader.Pop(ref value8);
            cSVReader.Pop(ref value9);
            cSVReader.Pop(ref value10);
            cSVReader.Pop(ref value11);
            cSVReader.Pop(ref value12);
            cSVReader.Pop(ref value13);
            cSVReader.Pop(ref value7);
            cSVReader.Pop(ref value14);
            if (value.Length > 0)
            {
                if (section != null)
                {
                    sections.Add(section);
                }
                section      = new Section();
                section.name = value;
            }
            if (value2 != 0)
            {
                Message message = new Message();
                message.type               = value2;
                message.param              = value3;
                message.priority           = value4;
                message.npc                = value5;
                message.animationStateName = value6;
                message.pos                = new Vector3(value8, value9, value10);
                message.rot                = new Vector3(value11, value12, value13);
                message.message            = value7;
                message.voice_id           = value14;
                section.messages.Add(message);
            }
        }
        if (section != null)
        {
            sections.Add(section);
        }
        sections.TrimExcess();
    }