Clean-up permanent monster spawn: (#1831)
* Clean-up permanent monster spawn: - <delay1>,<delay2>,<event> are actually optionnal field - <event> value 0 and 1 are meaningless (actually event name with length < 4 are skipped) * Exported monster AI constants * Updated docs for monster size constants (already exported) Notes: - the default size for monster script cmd was small not medium - monster script cmd now display a warning for size above SZ_BIG (previously SZ_ALL) * - Fixed an issue to make <xs> and <ys> optionnals - Updated npcs scripts * Leftover in the docs for permanent monster spawn * Corrected english docs. Credit to @aleos89 Added additionnal warning for xs / ys negative input. Credit @Lemongrass3110 Thanks to @cydh for the idea
This commit is contained in:
@@ -9890,7 +9890,7 @@ BUILDIN_FUNC(monster)
|
||||
|
||||
if (script_hasdata(st, 9)) {
|
||||
size = script_getnum(st, 9);
|
||||
if (size > 3) {
|
||||
if (size > SZ_BIG) {
|
||||
ShowWarning("buildin_monster: Attempted to spawn non-existing size %d for monster class %d\n", size, class_);
|
||||
return SCRIPT_CMD_FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user