Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add summon max count in MonsterType:addSummon #3883

Merged
merged 2 commits into from
Jan 5, 2022

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

@emil92b
Copy link
Contributor

emil92b commented Jan 5, 2022

works 馃憤

@EPuncker EPuncker 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
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
4 participants