mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Spells/Parsing
* bandaid fix parsing deeply nested formulas in non-interactive mode (should rethink how/when formulas get flagged as un-evalable)
This commit is contained in:
@@ -910,7 +910,11 @@ class SpellList extends DBTypeList
|
||||
$formula = preg_replace('/(\+|-|\*|\/)(\+|-|\*|\/)/i', '\1 \2', $formula);
|
||||
|
||||
// there should not be any letters without a leading $
|
||||
return eval('return '.$formula.';');
|
||||
try { $formula = eval('return '.$formula.';'); }
|
||||
// but there can be if we are non-interactive
|
||||
catch (\Throwable $e) { }
|
||||
|
||||
return $formula;
|
||||
}
|
||||
|
||||
// description-, buff-parsing component
|
||||
|
||||
Reference in New Issue
Block a user