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

* New files for lib: CBattleCallback.cpp and CBattleCallback.h

* Updated MSVC project files
* Filesystem: My version of .SND archive does not have \0 after WAV extension. Fixed (though hardcoded 3-char extension length).
* New bonus types: BLOCK_MAGIC_ABOVE for blocking casting spells above given level and BLOCK_ALL_MAGIC for blocking all magic.
* Heavy rewrite of battle callbacks. Fixed some minor bugs. Code reusage between lib/client/server (removed proxy calls). Better access control and support for various perspectives.
* Fixed #1031
* Fixed Orb of Inhibition and Recanter's Cloak (they were incorrectly implemented). Fixed #97.
* Fleeing hero won't lose artifacts. Spellbook won't be captured. Fixed #980.
* Fixed crash when attacking stack dies before counterattack (ie. because of Fire Shield)
* Server does some basic checks if action requests during battle are valid
* Minor stuff.
This commit is contained in:
Michał W. Urbańczyk
2012-08-26 09:07:48 +00:00
parent 2dd9d943c9
commit d390113c23
39 changed files with 3069 additions and 2386 deletions

View File

@@ -589,7 +589,7 @@ void BattleNextRound::applyCl( CClient *cl )
void BattleSetActiveStack::applyCl( CClient *cl )
{
CStack * activated = GS(cl)->curB->getStack(stack);
const CStack * activated = GS(cl)->curB->battleGetStackByID(stack);
int playerToCall = -1; //player that will move activated stack
if( activated->hasBonusOfType(Bonus::HYPNOTIZED) )
{
@@ -616,11 +616,12 @@ void BattleObstaclePlaced::applyCl(CClient * cl)
void BattleResult::applyFirstCl( CClient *cl )
{
BATTLE_INTERFACE_CALL_IF_PRESENT_FOR_BOTH_SIDES(battleEnd,this);
cl->battleFinished();
}
void BattleStackMoved::applyFirstCl( CClient *cl )
{
const CStack * movedStack = GS(cl)->curB->getStack(stack);
const CStack * movedStack = GS(cl)->curB->battleGetStackByID(stack);
BATTLE_INTERFACE_CALL_IF_PRESENT_FOR_BOTH_SIDES(battleStackMoved,movedStack,tilesToMove,distance);
}