浏览代码

Merge remote-tracking branch 'remotes/FeniksFire/develop' into develop

AlexVinS 8 年之前
父节点
当前提交
2400bec52c
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      lib/spells/AdventureSpellMechanics.cpp

+ 4 - 1
lib/spells/AdventureSpellMechanics.cpp

@@ -322,7 +322,10 @@ ESpellCastResult DimensionDoorMechanics::applyAdventureEffects(const SpellCastEn
 	{
 		SetMovePoints smp;
 		smp.hid = parameters.caster->id;
-		smp.val = std::max<ui32>(0, parameters.caster->movement - movementCost);
+		if(movementCost < parameters.caster->movement)
+			smp.val = parameters.caster->movement - movementCost;
+		else
+			smp.val = 0;
 		env->sendAndApply(&smp);
 	}
 	return ESpellCastResult::OK;