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); }
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); }