public List <ClickableTextureComponent> getClickableComponents() { Dictionary <int, int> dictionary = new Dictionary <int, int>(); if (this.sheetIndex != -1) { dictionary.Add(this.sheetIndex, 0); } else { if (this.buffAttributes[0] != 0) { dictionary.Add(0, this.buffAttributes[0]); } if (this.buffAttributes[1] != 0) { dictionary.Add(1, this.buffAttributes[1]); } if (this.buffAttributes[2] != 0) { dictionary.Add(2, this.buffAttributes[2]); } if (this.buffAttributes[4] != 0) { dictionary.Add(4, this.buffAttributes[4]); } if (this.buffAttributes[5] != 0) { dictionary.Add(5, this.buffAttributes[5]); } if (this.buffAttributes[7] != 0) { dictionary.Add(16, this.buffAttributes[7]); } if (this.buffAttributes[11] != 0) { dictionary.Add(11, this.buffAttributes[11]); } if (this.buffAttributes[8] != 0) { dictionary.Add(8, this.buffAttributes[8]); } if (this.buffAttributes[10] != 0) { dictionary.Add(10, this.buffAttributes[10]); } if (this.buffAttributes[9] != 0) { dictionary.Add(9, this.buffAttributes[9]); } } List <ClickableTextureComponent> textureComponentList = new List <ClickableTextureComponent>(); foreach (KeyValuePair <int, int> keyValuePair in dictionary) { textureComponentList.Add(new ClickableTextureComponent("", Rectangle.Empty, (string)null, this.getDescription(Buff.getAttributeIndexFromSourceRectIndex(keyValuePair.Key)), Game1.buffsIcons, Game1.getSourceRectForStandardTileSheet(Game1.buffsIcons, keyValuePair.Key, 16, 16), (float)Game1.pixelZoom, false)); } return(textureComponentList); }
public bool betterThan(Buff other) { return(this.total > 0 && (other == null || this.total > other.total)); }