mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
display owner of ownable objects in tooltip
also displays owner of towns (deviation from oh3)
This commit is contained in:
@ -328,7 +328,10 @@ boost::optional<std::string> CGObjectInstance::getRemovalSound() const
|
||||
|
||||
std::string CGObjectInstance::getHoverText(PlayerColor player) const
|
||||
{
|
||||
return getObjectName();
|
||||
auto text = getObjectName();
|
||||
if (tempOwner.isValidPlayer())
|
||||
text += "\n" + VLC->generaltexth->arraytxt[23 + tempOwner.getNum()];
|
||||
return text;
|
||||
}
|
||||
|
||||
std::string CGObjectInstance::getHoverText(const CGHeroInstance * hero) const
|
||||
|
Reference in New Issue
Block a user