mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Bypass initial version of spell callback
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user