1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Add pre-battle message

This commit is contained in:
nordsoft 2023-09-23 02:35:21 +02:00
parent 455c13164e
commit a5492b30c3

View File

@ -103,6 +103,16 @@ std::string CGCreature::getHoverText(const CGHeroInstance * hero) const
void CGCreature::onHeroVisit( const CGHeroInstance * h ) const
{
//show message
if(!message.empty())
{
InfoWindow iw;
iw.player = h->tempOwner;
iw.text.appendRawString(message);
iw.type = EInfoWindowMode::MODAL;
cb->showInfoDialog(&iw);
}
int action = takenAction(h);
switch( action ) //decide what we do...
{