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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding HandleStatModifier for Unit #161

Merged
merged 2 commits into from
Jan 28, 2024
Merged

Adding HandleStatModifier for Unit #161

merged 2 commits into from
Jan 28, 2024

Conversation

iThorgrim
Copy link

Greetings,

This pull request introduces the HandleStatModifier method for Unit in the Eluna module.

Here's a brief overview of the addition:

/**
 * The [Unit] modifies a specific stat
 *
 * @param int32 stat : The stat to modify
 * @param int8 type : The type of modifier to apply
 * @param float value : The value to apply to the stat
 * @param bool apply = false : Whether the modifier should be applied or removed
 * @return bool : Whether the stat modification was successful
 */
int HandleStatModifier(lua_State* L, Unit* unit)
{
    // Implementation...
}

This new method allows you to modify a specific stat of a [Unit], defining the type of modifier to apply, the value to apply to the stat, and whether the modifier should be applied or removed.

Your feedback on this addition would be greatly appreciated.
Kind Regards,

Vaiocti (iThorgrim)

@iThorgrim
Copy link
Author

Tests were carried out over several months on my own server.
image

@Nyeriah Nyeriah merged commit 5e45216 into azerothcore:master Jan 28, 2024
1 check passed
@iThorgrim iThorgrim deleted the HandleStatModifier branch January 28, 2024 14:26
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.

2 participants