예제 #1
0
    // Allow params to be a comma-delimited list of various incentives, such as item name, buff, or cvar.
    //	<property name="AITask-5" value="ApproachAndAttackTarget" data="class=EntityNPC,0,EntityEnemyAnimal,0,EntityPlayer,0"/> <!-- class,maxChaseTime (return home) -->

    public override void SetData(DictionarySave <string, string> data)
    {
        base.SetData(data);
        string text;

        if (data.TryGetValue("incentives", out text))
        {
            DisplayLog("Text: " + text);
            string[] array = text.Split(new char[]
            {
                ','
            });
            for (int i = 0; i < array.Length; i++)
            {
                DisplayLog("\tIncentive: " + array[i].ToString());
                if (this.lstIncentives.Contains(array[i].ToString()))
                {
                    continue;
                }
                this.lstIncentives.Add(array[i].ToString());
            }
        }

        if (data.TryGetValue("Death", out text))
        {
            if (text.ToLower() == "true")
            {
                DeathOnLeaderLoss = true;
            }
        }
    }
    // Allow params to be a comma-delimited list of various incentives, such as item name, buff, or cvar.
    //	<property name="AITask-5" value="ApproachAndAttackTarget" data="class=EntityNPC,0,EntityEnemyAnimal,0,EntityPlayer,0"/> <!-- class,maxChaseTime (return home) -->

    public override void SetData(DictionarySave <string, string> data)
    {
        base.SetData(data);
        string text;

        if (data.TryGetValue("incentives", out text))
        {
            string[] array = text.Split(new char[]
            {
                ','
            });
            for (int i = 0; i < array.Length; i++)
            {
                if (this.lstIncentives.Contains(array[i].ToString()))
                {
                    continue;
                }
                this.lstIncentives.Add(array[i].ToString());
            }
        }
    }