Explorar el Código

Fixed Enchanter ability.

DjWarmonger hace 12 años
padre
commit
bbdac2f068
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      server/CGameHandler.cpp

+ 2 - 2
server/CGameHandler.cpp

@@ -4496,7 +4496,7 @@ void CGameHandler::stackTurnTrigger(const CStack * st)
 	if (st->alive())
 	{
 		//unbind
-		if (st->getEffect(72))
+		if (st->getEffect (SpellID::BIND))
 		{
 			bool unbind = true;
 			BonusList bl = *(st->getBonuses(Selector::type(Bonus::BIND_EFFECT)));
@@ -4590,7 +4590,7 @@ void CGameHandler::stackTurnTrigger(const CStack * st)
 		{
 			int index = rand() % bl.size();
 			SpellID spellID = SpellID(bl[index]->subtype);
-			if (gs->curB->battleCanCastThisSpell(st->owner, SpellID(spellID).toSpell(), ECastingMode::ENCHANTER_CASTING)) //TODO: select another?
+			if (gs->curB->battleCanCastThisSpell(st->owner, SpellID(spellID).toSpell(), ECastingMode::ENCHANTER_CASTING) == ESpellCastProblem::OK) //TODO: select another available?
 			{
 				int spellLeveL = bl[index]->val; //spell level
 				const CGHeroInstance * enemyHero = gs->curB->getHero(gs->curB->theOtherPlayer(st->owner));