瀏覽代碼

Tweak
* handle BIND_EFFECT by bonus type

AlexVinS 9 年之前
父節點
當前提交
a1ff409080
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      lib/HeroBonus.cpp
  2. 1 1
      server/CGameHandler.cpp

+ 1 - 1
lib/HeroBonus.cpp

@@ -470,7 +470,7 @@ ui32 IBonusBearer::Speed( int turn /*= 0*/ , bool useBind /* = false*/) const
 		return 0;
 	}
 	//bind effect check - doesn't influence stack initiative
-	if (useBind && getEffect (SpellID::BIND))
+	if(useBind && hasBonus(Selector::type(Bonus::BIND_EFFECT).And(Selector::turns(turn))))
 	{
 		return 0;
 	}

+ 1 - 1
server/CGameHandler.cpp

@@ -4482,7 +4482,7 @@ void CGameHandler::stackTurnTrigger(const CStack * st)
 	if (st->alive())
 	{
 		//unbind
-		if (st->getEffect (SpellID::BIND))
+		if(st->hasBonus(Selector::type(Bonus::BIND_EFFECT)))
 		{
 			bool unbind = true;
 			BonusList bl = *(st->getBonuses(Selector::type(Bonus::BIND_EFFECT)));