|
@@ -17,6 +17,8 @@
|
|
|
#include "../IGameCallback.h"
|
|
|
#include "../CGameState.h"
|
|
|
#include "../CPlayerState.h"
|
|
|
+#include "../spells/CSpellHandler.h"
|
|
|
+#include "../spells/ISpellMechanics.h"
|
|
|
|
|
|
#include "CObjectClassesHandler.h"
|
|
|
|
|
@@ -359,6 +361,14 @@ void CRewardableObject::grantRewardAfterLevelup(const CRewardVisitInfo & info, c
|
|
|
|
|
|
cb->giveCreatures(this, hero, creatures, false);
|
|
|
}
|
|
|
+
|
|
|
+ if(!info.reward.casts.empty())
|
|
|
+ {
|
|
|
+ for(const auto & c : info.reward.casts)
|
|
|
+ {
|
|
|
+ cb->castSpell(hero, c, int3{-1, -1, -1});
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if(info.reward.removeObject)
|
|
|
cb->removeObject(this);
|