Пример #1
0
 public bool GetFlag(int factionID, FactionFile.Flags flag)
 {
     if (factionDict.ContainsKey(factionID))
     {
         FactionFile.FactionData factionData = factionDict[factionID];
         return((factionData.flags & (int)flag) > 0);
     }
     return(false);
 }
Пример #2
0
 public bool SetFlag(int factionID, FactionFile.Flags flag)
 {
     if (factionDict.ContainsKey(factionID))
     {
         FactionFile.FactionData factionData = factionDict[factionID];
         factionData.flags     |= (int)flag;
         factionDict[factionID] = factionData;
         return(true);
     }
     return(false);
 }