Example #1
0
 public void PurifyInfluenceKind(Person person, Influence i, Applier applier, int applierID)
 {
     if (this.Type == InfluenceType.个人)
     {
         PurifyInfluenceKind(person);
     }
     if (this.Type == InfluenceType.战斗 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingTroop t = new ApplyingTroop(person.LocationTroop, applier, applierID);
         if (person.LocationTroop != null && i.appliedTroop.Contains(t))
         {
             i.appliedTroop.RemoveWhere((a2) => { return(t.Equals(a2)); });
             PurifyInfluenceKind(person.LocationTroop, i, applier, applierID);
         }
     }
     if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingArchitecture t = new ApplyingArchitecture(person.LocationArchitecture, applier, applierID);
         if (person.LocationTroop != null && i.appliedArch.Contains(t))
         {
             i.appliedArch.RemoveWhere((a2) => { return(t.Equals(a2)); });
             PurifyInfluenceKind(person.LocationArchitecture, i, applier, applierID);
         }
     }
 }
        public void PurifyInfluenceKind(Person person, Influence i, Applier applier, int applierID)
        {
            PurifyInfluenceKind(person);
            ApplyingTroop t = new ApplyingTroop(person.LocationTroop, applier, applierID);

            if (person.LocationTroop != null && i.appliedTroop.Contains(t))
            {
                i.appliedTroop.RemoveWhere((a2) => { return(t.Equals(a2)); });
                PurifyInfluenceKind(person.LocationTroop, i, applier, applierID);
            }
        }
 public void PurifyInfluenceKind(Person person, Influence i, Applier applier, int applierID)
 {
     if (this.Type == InfluenceType.个人)
     {
         PurifyInfluenceKind(person);
     }
     if (this.Type == InfluenceType.战斗 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingTroop t = new ApplyingTroop(person.LocationTroop, applier, applierID);
         if (person.LocationTroop != null && i.appliedTroop.Contains(t))
         {
             i.appliedTroop.RemoveWhere((a2) => { return t.Equals(a2); });
             PurifyInfluenceKind(person.LocationTroop, i, applier, applierID);
         }
     }
     if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingArchitecture t = new ApplyingArchitecture(person.LocationArchitecture, applier, applierID);
         if (person.LocationTroop != null && i.appliedArch.Contains(t))
         {
             i.appliedArch.RemoveWhere((a2) => { return t.Equals(a2); });
             PurifyInfluenceKind(person.LocationArchitecture, i, applier, applierID);
         }
     }
 }