Optimized calcStat method.
This commit is contained in:
parent
b8f0b1f39c
commit
6aaf999da7
@ -59,7 +59,7 @@ public class CreatureStat
|
|||||||
*/
|
*/
|
||||||
public double calcStat(Stat stat, double init, Creature target, Skill skill)
|
public double calcStat(Stat stat, double init, Creature target, Skill skill)
|
||||||
{
|
{
|
||||||
if (_creature == null)
|
if ((_creature == null) || (stat == null))
|
||||||
{
|
{
|
||||||
return init;
|
return init;
|
||||||
}
|
}
|
||||||
@ -106,6 +106,7 @@ public class CreatureStat
|
|||||||
case STAT_WIT:
|
case STAT_WIT:
|
||||||
{
|
{
|
||||||
env.value = 1;
|
env.value = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public class CreatureStat
|
|||||||
*/
|
*/
|
||||||
public double calcStat(Stat stat, double init, Creature target, Skill skill)
|
public double calcStat(Stat stat, double init, Creature target, Skill skill)
|
||||||
{
|
{
|
||||||
if (_creature == null)
|
if ((_creature == null) || (stat == null))
|
||||||
{
|
{
|
||||||
return init;
|
return init;
|
||||||
}
|
}
|
||||||
@ -106,6 +106,7 @@ public class CreatureStat
|
|||||||
case STAT_WIT:
|
case STAT_WIT:
|
||||||
{
|
{
|
||||||
env.value = 1;
|
env.value = 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user