1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Use toEntity/toXXX methods in Identifier instead VLC objects access

This commit is contained in:
Ivan Savenko
2023-11-02 18:45:46 +02:00
parent 8d5fa41a19
commit 184f5a72cc
29 changed files with 101 additions and 90 deletions

View File

@@ -775,7 +775,7 @@ std::string CGKeys::getHoverText(PlayerColor player) const
std::string CGKeys::getObjectName() const
{
return VLC->generaltexth->tentColors[subID] + " " + CGObjectInstance::getObjectName();
return VLC->generaltexth->tentColors[subID.getNum()] + " " + CGObjectInstance::getObjectName();
}
bool CGKeymasterTent::wasVisited (PlayerColor player) const
@@ -810,7 +810,7 @@ void CGBorderGuard::getRolloverText(MetaString &text, bool onHover) const
{
if (!onHover)
{
text.appendRawString(VLC->generaltexth->tentColors[subID]);
text.appendRawString(VLC->generaltexth->tentColors[subID.getNum()]);
text.appendRawString(" ");
text.appendRawString(VLC->objtypeh->getObjectName(Obj::KEYMASTER, subID));
}