virtualvoidbattleStacksEffectsSet(constSetStackEffect&sse){};//called when a specific effect is set to stacks
virtualvoidbattleStart(constCCreatureSet*army1,constCCreatureSet*army2,int3tile,constCGHeroInstance*hero1,constCGHeroInstance*hero2,boolside){};//called by engine when battle starts; side=0 - left, side=1 - right
//virtual void battlefieldPrepared(int battlefieldType, std::vector<CObstacle*> obstacles){}; //called when battlefield is prepared, prior the battle beginning
virtualvoidbattleStacksHealedRes(conststd::vector<std::pair<ui32,ui32>>&healedStacks,boollifeDrain,si32lifeDrainFrom){};//called when stacks are healed / resurrected first element of pair - stack id, second - healed hp
virtualvoidbattleNewStackAppeared(intstackID){};//not called at the beginning of a battle or by resurrection; called eg. when elemental is summoned
virtualvoidbattleObstaclesRemoved(conststd::set<si32>&removedObstacles){};//called when a certain set of obstacles is removed from batlefield; IDs of them are given
virtualvoidbattleCatapultAttacked(constCatapultAttack&ca){};//called when catapult makes an attack
virtualvoidbattleStacksRemoved(constBattleStacksRemoved&bsr){};//called when certain stack is completely removed from battlefield
virtualvoidstackChagedCount(constStackLocation&location,constTQuantity&change,boolisAbsolute){};//if absolute, change is the new count; otherwise count was modified by adding change
virtualvoidstackChangedType(constStackLocation&location,constCCreature&newType){};//used eg. when upgrading creatures
virtualvoidstacksErased(constStackLocation&location){};//stack removed from previously filled slot
virtualvoidnewStackInserted(constStackLocation&location,constCStackInstance&stack){};//new stack inserted at given (previously empty position)
virtualvoidstacksRebalanced(constStackLocation&src,constStackLocation&dst,TQuantitycount){};//moves creatures from src stack to dst slot, may be used for merging/splittint/moving stacks
virtualvoidheroGotLevel(constCGHeroInstance*hero,intpskill,std::vector<ui16>&skills,boost::function<void(ui32)>&callback)=0;//pskill is gained primary skill, interface has to choose one of given skills and call callback with selection id
virtualvoidshowShipyardDialog(constIShipyard*obj){}//obj may be town or shipyard; state: 0 - can buid, 1 - lack of resources, 2 - dest tile is blocked, 3 - no water
virtualvoidshowBlockingDialog(conststd::string&text,conststd::vector<Component>&components,ui32askID,constintsoundID,boolselection,boolcancel)=0;//Show a dialog, player must take decision. If selection then he has to choose between one of given components, if cancel he is allowed to not choose. After making choice, CCallback::selectionMade should be called with number of selected component (1 - n) or 0 for cancel (if allowed) and askID.
virtualvoidshowGarrisonDialog(constCArmedInstance*up,constCGHeroInstance*down,boolremovableUnits,boost::function<void()>&onEnd)=0;//all stacks operations between these objects become allowed, interface has to call onEnd when done
virtualvoidavailableArtifactsChanged(constCGBlackMarket*bm=NULL){};//bm may be NULL, then artifacts are changed in the global pool (used by merchants in towns)