Skip to content

Conversation

marmichalski
Copy link
Contributor

@marmichalski marmichalski commented Jan 4, 2022

Pull Request Prelude

@emil92b test pls 😎

I'm actually uncertain if there is 0 by default or some garbage value. Looking at the summoning logic probably the latter. 💩

Changes Proposed

Add configurable max summon count in MonsterType:addSummon.

Issues addressed: Closes #3882

MonsterType* monsterType = getUserdata<MonsterType>(L, 1);
if (monsterType) {
summonBlock_t summon;
summon.name = getString(L, 2);
summon.speed = getNumber<int32_t>(L, 3);
summon.chance = getNumber<int32_t>(L, 4);
summon.max = getNumber<int32_t>(L, 5, -1);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10/10 would underflow again

@ghost
Copy link

ghost commented Jan 5, 2022

works 👍

@ghost ghost merged commit 215713d into otland:master Jan 5, 2022
@marmichalski marmichalski deleted the monster-type-summons branch January 6, 2022 22:53
Znote pushed a commit to Znote/forgottenserver that referenced this pull request Jan 30, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

revscript monster summons
2 participants