|
@@ -1194,7 +1194,10 @@ void CCastleBuildings::enterTownHall()
|
|
|
void CCastleBuildings::openMagesGuild()
|
|
|
{
|
|
|
auto mageGuildBackground = GAME->interface()->castleInt->town->getTown()->clientInfo.guildBackground;
|
|
|
- ENGINE->windows().createAndPushWindow<CMageGuildScreen>(GAME->interface()->castleInt, mageGuildBackground);
|
|
|
+ assert(mageGuildBackground.size() == 1 || mageGuildBackground.size() == GAME->interface()->castleInt->town->getTown()->mageLevel);
|
|
|
+ auto selectedMageGuildBackground = mageGuildBackground.size() == 1 ? mageGuildBackground[0] : mageGuildBackground[town->mageGuildLevel() - 1];
|
|
|
+
|
|
|
+ ENGINE->windows().createAndPushWindow<CMageGuildScreen>(GAME->interface()->castleInt, selectedMageGuildBackground);
|
|
|
}
|
|
|
|
|
|
void CCastleBuildings::openTownHall()
|
|
@@ -2113,7 +2116,11 @@ CMageGuildScreen::CMageGuildScreen(CCastleInterface * owner, const ImagePath & i
|
|
|
{
|
|
|
OBJECT_CONSTRUCTION;
|
|
|
|
|
|
- window = std::make_shared<CPicture>(owner->town->getTown()->clientInfo.guildWindow, 332, 76);
|
|
|
+ auto guildWindow = owner->town->getTown()->clientInfo.guildWindow;
|
|
|
+ assert(guildWindow.size() == 1 || guildWindow.size() == GAME->interface()->castleInt->town->getTown()->mageLevel);
|
|
|
+ auto selectedGuildWindow = guildWindow.size() == 1 ? guildWindow[0] : guildWindow[owner->town->mageGuildLevel() - 1];
|
|
|
+
|
|
|
+ window = std::make_shared<CPicture>(selectedGuildWindow, 332, 76);
|
|
|
|
|
|
resdatabar = std::make_shared<CMinorResDataBar>();
|
|
|
resdatabar->moveBy(pos.topLeft(), true);
|
|
@@ -2140,7 +2147,7 @@ void CMageGuildScreen::updateSpells(ObjectInstanceID tID)
|
|
|
{Point(48,53), Point(48,147), Point(48,241), Point(48,335), Point(48,429)},
|
|
|
{Point(570,82), Point(672,82), Point(570,157), Point(672,157)},
|
|
|
{Point(183,42), Point(183,148), Point(183,253)},
|
|
|
- {Point(491,325), Point(591,325)}
|
|
|
+ {Point(491,325), Point(591,325)}//
|
|
|
};
|
|
|
|
|
|
spells.clear();
|