1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Gernsworth's patch for bug #1118

This commit is contained in:
mateuszb 2012-12-30 18:29:15 +00:00
parent c0e09679f1
commit 2848fb6fef
3 changed files with 17 additions and 1 deletions

View File

@ -1292,6 +1292,10 @@ bool CPlayerInterface::moveHero( const CGHeroInstance *h, CGPath path )
CCS->soundh->stopSound(sh);
}
//Update cursor so icon can change if needed when it reappears; doesn;'t apply if a dialog box pops up at the end of the movement
if(!showingDialog->get())
GH.fakeMouseMove();
//RAII unlocks
}

View File

@ -5911,8 +5911,20 @@ void CWindowWithArtifacts::artifactRemoved(const ArtifactLocation &artLoc)
void CWindowWithArtifacts::artifactMoved(const ArtifactLocation &artLoc, const ArtifactLocation &destLoc)
{
CArtifactsOfHero *destaoh = NULL;
BOOST_FOREACH(CArtifactsOfHero *aoh, artSets)
{
aoh->artifactMoved(artLoc, destLoc);
aoh->redraw();
if(destLoc.isHolder(aoh->getHero()))
destaoh = aoh;
}
//Make sure the status bar is updated so it does not display old text
if(destaoh != NULL)
{
destaoh->getArtPlace(destLoc.slot)->hover(true);
}
}
void CWindowWithArtifacts::artifactDisassembled(const ArtifactLocation &artLoc)

View File

@ -224,7 +224,7 @@ void MoveArtifact::applyCl( CClient *cl )
{
INTERFACE_CALL_IF_PRESENT(src.owningPlayer(), artifactMoved, src, dst);
if(src.owningPlayer() != dst.owningPlayer())
INTERFACE_CALL_IF_PRESENT(src.owningPlayer(), artifactMoved, src, dst);
INTERFACE_CALL_IF_PRESENT(dst.owningPlayer(), artifactMoved, src, dst);
}
void AssembledArtifact::applyCl( CClient *cl )