public void updateInn(GraphicsMgr gfx, VillageMap vm) { if (this.baseSprite != null) { if (this.innExtension == null) { this.innExtension = new VillageMapBuildingInnExtension(); for (int j = 0; j < 3; j++) { this.innExtension.cell[j] = new SpriteWrapper(); this.innExtension.cell[j].Visible = false; this.innExtension.cell[j].PosX = -80 + VillageMapBuildingInnExtension.innLayout[j * 2]; this.innExtension.cell[j].PosY = -44 + VillageMapBuildingInnExtension.innLayout[(j * 2) + 1]; this.baseSprite.AddChild(this.innExtension.cell[j]); this.innExtension.showGood(gfx, j, -1, 0); } } for (int i = 0; i < 3; i++) { this.innExtension.showGood(gfx, i, -1, 0); } VillageMap.InnLevels levels = new VillageMap.InnLevels(); if (vm.getInnLevels(levels)) { if (levels.aleLevel == 0.0) { if (vm.m_effectiveAleRationsLevel > 0.0) { this.open = true; } else { this.open = false; } } else { this.open = true; int index = 0; if (levels.aleLevel > 416.0) { index = 4; } else if (levels.aleLevel > 96.0) { index = 3; } else if (levels.aleLevel > 16.0) { index = 2; } else if (levels.aleLevel > 0.0) { index = 1; } else { index = 0; } if (index > 3) { index = 3; } for (int k = 0; k < index; k++) { if (k != (index - 1)) { this.innExtension.showGood(gfx, k, 12, 0x10); } else { int num6 = (((int) levels.aleLevel) - this.goods16Levels[index]) / this.goodsDividers[index]; this.innExtension.showGood(gfx, k, 12, Math.Min(num6, 0x10)); } } } } } }
public void updateInn(GraphicsMgr gfx, VillageMap vm) { if (this.baseSprite != null) { if (this.innExtension == null) { this.innExtension = new VillageMapBuildingInnExtension(); for (int j = 0; j < 3; j++) { this.innExtension.cell[j] = new SpriteWrapper(); this.innExtension.cell[j].Visible = false; this.innExtension.cell[j].PosX = -80 + VillageMapBuildingInnExtension.innLayout[j * 2]; this.innExtension.cell[j].PosY = -44 + VillageMapBuildingInnExtension.innLayout[(j * 2) + 1]; this.baseSprite.AddChild(this.innExtension.cell[j]); this.innExtension.showGood(gfx, j, -1, 0); } } for (int i = 0; i < 3; i++) { this.innExtension.showGood(gfx, i, -1, 0); } VillageMap.InnLevels levels = new VillageMap.InnLevels(); if (vm.getInnLevels(levels)) { if (levels.aleLevel == 0.0) { if (vm.m_effectiveAleRationsLevel > 0.0) { this.open = true; } else { this.open = false; } } else { this.open = true; int index = 0; if (levels.aleLevel > 416.0) { index = 4; } else if (levels.aleLevel > 96.0) { index = 3; } else if (levels.aleLevel > 16.0) { index = 2; } else if (levels.aleLevel > 0.0) { index = 1; } else { index = 0; } if (index > 3) { index = 3; } for (int k = 0; k < index; k++) { if (k != (index - 1)) { this.innExtension.showGood(gfx, k, 12, 0x10); } else { int num6 = (((int)levels.aleLevel) - this.goods16Levels[index]) / this.goodsDividers[index]; this.innExtension.showGood(gfx, k, 12, Math.Min(num6, 0x10)); } } } } } }