Use BannerElement instead of TileElement

This commit is contained in:
Gymnasiast 2021-04-03 22:07:11 +02:00
parent ea961aed93
commit 943e89d5a6
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
1 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ class BannerWindow final : public Window
private:
Banner* _banner;
CoordsXYZ _bannerViewPos;
TileElement* _tileElement = nullptr;
BannerElement* _tileElement = nullptr;
void CreateViewport()
{
@ -99,7 +99,7 @@ private:
{
if ((tileElement->GetType() == TILE_ELEMENT_TYPE_BANNER) && (tileElement->AsBanner()->GetIndex() == number))
{
_tileElement = tileElement;
_tileElement = tileElement->AsBanner();
return;
}
if (tileElement->IsLastForTile())
@ -173,7 +173,7 @@ public:
case WIDX_BANNER_DEMOLISH:
{
auto bannerRemoveAction = BannerRemoveAction(
{ _banner->position.ToCoordsXY(), _tileElement->GetBaseZ(), _tileElement->AsBanner()->GetPosition() });
{ _banner->position.ToCoordsXY(), _tileElement->GetBaseZ(), _tileElement->GetPosition() });
GameActions::Execute(&bannerRemoveAction);
break;
}