public override void copy(object destObj)
    {
        base.copy(destObj);
        GuildDonateSample dest = destObj as GuildDonateSample;

        if (this.consume != null)
        {
            dest.consume = new int[this.consume.Length];
            for (int i = 0; i < this.consume.Length; i++)
            {
                dest.consume [i] = this.consume [i];
            }
        }
        if (this.activity != null)
        {
            dest.activity = new int[this.activity.Length];
            for (int i = 0; i < this.activity.Length; i++)
            {
                dest.activity [i] = this.activity [i];
            }
        }
        if (this.dedication != null)
        {
            dest.dedication = new int[this.dedication.Length];
            for (int i = 0; i < this.dedication.Length; i++)
            {
                dest.dedication [i] = this.dedication [i];
            }
        }
    }
Exemple #2
0
    public override void parseConfig(string str)
    {
        string[]          arr = str.Split('|');
        GuildDonateSample s   = new GuildDonateSample();
        int sid = StringKit.toInt(arr[0]);

        s.parse(sid, str);
        samples.Add(s);
    }
Exemple #3
0
 public GuildDonateItem[] getGuildDonateItems(int guildLevel)
 {
     GuildDonateItem[] items = new GuildDonateItem[samples.Count];
     for (int i = 0; i < items.Length; i++)
     {
         GuildDonateSample s    = samples[i];
         GuildDonateItem   item = new GuildDonateItem();
         item.description    = s.description;
         item.maxTimesOneDay = s.maxTimesOneDay;
         item.consume        = s.consume[guildLevel - 1];
         item.activity       = s.activity[guildLevel - 1];
         item.dedication     = s.dedication[guildLevel - 1];
         items[i]            = item;
     }
     return(items);
 }