mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
@@ -136,6 +136,16 @@ SummonBoatMechanics::SummonBoatMechanics(const CSpell * s):
|
||||
|
||||
ESpellCastResult SummonBoatMechanics::applyAdventureEffects(const SpellCastEnvironment * env, const AdventureSpellCastParameters & parameters) const
|
||||
{
|
||||
if(parameters.caster->boat)
|
||||
{
|
||||
InfoWindow iw;
|
||||
iw.player = parameters.caster->tempOwner;
|
||||
iw.text.addTxt(MetaString::GENERAL_TXT, 333);//%s is already in boat
|
||||
iw.text.addReplacement(parameters.caster->name);
|
||||
env->sendAndApply(&iw);
|
||||
return ESpellCastResult::CANCEL;
|
||||
}
|
||||
|
||||
int3 summonPos = parameters.caster->bestLocation();
|
||||
if(summonPos.x < 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user