1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

* blocked map scrolling where dialog window is opened

* it's possible in battles to check remeaining HP of neutral stacks
* function in CGameInterface called when spell is casted. Support for the Magic Arrow from engine side.
* heroes can regain mana
* support for mistycisim and intelligence skills
* fixed leak with creating frameratekeeper every turn
* minor improvements
This commit is contained in:
Michał W. Urbańczyk
2008-10-18 11:41:24 +00:00
parent 20a6e05718
commit 9d099e8c54
17 changed files with 257 additions and 108 deletions

View File

@@ -525,6 +525,17 @@ void CClient::process(int what)
gs->apply(&br);
break;
}
case 3005:
{
BattleStackAttacked bsa;
*serv >> bsa;
gs->apply(&bsa);
if(playerint.find(gs->curB->side1) != playerint.end())
playerint[gs->curB->side1]->battleStackAttacked(&bsa);
if(playerint.find(gs->curB->side2) != playerint.end())
playerint[gs->curB->side2]->battleStackAttacked(&bsa);
break;
}
case 3006:
{
BattleAttack ba;
@@ -544,7 +555,7 @@ void CClient::process(int what)
case 3007:
{
*serv >> curbaction;
tlog5 << "Action started. ID: " << curbaction.actionType << ". Destination: "<< curbaction.destinationTile <<std::endl;
tlog5 << "Action started. ID: " << (int)curbaction.actionType << ". Destination: "<< curbaction.destinationTile <<std::endl;
if(playerint.find(gs->curB->side1) != playerint.end())
playerint[gs->curB->side1]->actionStarted(&curbaction);
if(playerint.find(gs->curB->side2) != playerint.end())
@@ -565,6 +576,19 @@ void CClient::process(int what)
playerint[gs->curB->side2]->actionFinished(&curbaction);
break;
}
case 3009:
{
tlog5 << "Spell casted!\n";
SpellCasted sc;
*serv >> sc;
gs->apply(&sc);
//todo - apply
if(playerint.find(gs->curB->side1) != playerint.end())
playerint[gs->curB->side1]->battleSpellCasted(&sc);
if(playerint.find(gs->curB->side2) != playerint.end())
playerint[gs->curB->side2]->battleSpellCasted(&sc);
break;
}
case 9999:
break;
default: