1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

small fixes

This commit is contained in:
mateuszb 2008-10-17 17:43:25 +00:00
parent 929ce79ad4
commit 20a6e05718
3 changed files with 9 additions and 5 deletions

View File

@ -1049,6 +1049,7 @@ void CBattleInterface::hexLclicked(int whichOne)
{
spellToCast->destinationTile = whichOne;
LOCPLINT->cb->battleMakeAction(spellToCast);
delete spellToCast;
spellToCast = NULL;
spellDestSelectMode = false;
CGI->curh->changeGraphic(1, 6);

View File

@ -33,7 +33,7 @@ void CCursorHandler::draw1()
{
if(!Show) return;
int x = xpos, y = ypos;
if(mode==1 && number!=6)
if((mode==1 && number!=6) || mode ==3)
{
x-=16;
y-=16;

View File

@ -616,11 +616,14 @@ CSpellWindow::SpellArea::SpellArea(SDL_Rect pos, CSpellWindow * owner)
void CSpellWindow::SpellArea::clickLeft(boost::logic::tribool down)
{
owner->fexitb();
//we will cast a spell
if(dynamic_cast<CBattleInterface*>(LOCPLINT->curint)) //if battle window is open
if(!down && mySpell!=-1)
{
dynamic_cast<CBattleInterface*>(LOCPLINT->curint)->castThisSpell(mySpell);
//we will cast a spell
if(dynamic_cast<CBattleInterface*>(LOCPLINT->curint)) //if battle window is open
{
dynamic_cast<CBattleInterface*>(LOCPLINT->curint)->castThisSpell(mySpell);
}
owner->fexitb();
}
}