1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-27 00:41:08 +02:00

* general improvements in battles

* calls for spell casting in battles (they usually crash VCMI server)
This commit is contained in:
mateuszb
2008-10-17 16:30:56 +00:00
parent 4af64f1b9f
commit 929ce79ad4
7 changed files with 164 additions and 57 deletions

View File

@ -6,6 +6,7 @@
#include "../hch/CPreGameTextHandler.h"
#include "../hch/CGeneralTextHandler.h"
#include "../CAdvmapInterface.h"
#include "../CBattleInterface.h"
#include "../CGameInfo.h"
#include "../SDL_Extensions.h"
#include "../CMessage.h"
@ -615,6 +616,12 @@ 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
{
dynamic_cast<CBattleInterface*>(LOCPLINT->curint)->castThisSpell(mySpell);
}
}
void CSpellWindow::SpellArea::clickRight(boost::logic::tribool down)