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

AOS Properties Regeneration #277

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

DragonSlayer62
Copy link
Contributor

@DragonSlayer62 DragonSlayer62 commented Apr 30, 2024

Regeneration Hit Points
Regeneration Stam Points
Regeneration Mana Points

Added AOS formula for mana regeneration. Only Active in AOS and up.

@DragonSlayer62 DragonSlayer62 requested review from Xoduz and strattond May 2, 2024 15:20
DragonSlayer62 and others added 11 commits May 11, 2024 18:51
fixed cast and added it to npcs.cpp so it can be used on them as well.
Regen function/property names updated to be more in line with existing naming conventions
Fixed an issue where health regen setting would be loaded for both health, stamina and mana when parsing uox.ini
Moved regenstats to baseonject because it can be used on both npc and item. removed it out of citems.cpp
@Xoduz Xoduz self-assigned this Jan 12, 2025
@strattond strattond changed the title AOS Properties Regenation AOS Properties Regeneration Jan 14, 2025
Copy link
Contributor

@strattond strattond left a comment

Choose a reason for hiding this comment

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

Smal requested improvements

@@ -6565,6 +6616,15 @@ auto CServerData::HandleLine( const std::string& tag, const std::string& value )
case 349: // LOOTDECAYSWITHNPCCORPSE
NpcCorpseLootDecay( static_cast<UI16>( std::stoul( value, nullptr, 0 )) != 0 );
break;
case 350: // HEALTHREGENCAP
HealthRegenCap( std::stof( value ));
Copy link
Contributor

Choose a reason for hiding this comment

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

stof returns a floating point value - but the caps take a SI16.

I'd expect this to be different e.g. stoi

@@ -6565,6 +6616,15 @@ auto CServerData::HandleLine( const std::string& tag, const std::string& value )
case 349: // LOOTDECAYSWITHNPCCORPSE
NpcCorpseLootDecay( static_cast<UI16>( std::stoul( value, nullptr, 0 )) != 0 );
break;
case 350: // HEALTHREGENCAP
HealthRegenCap( std::stof( value ));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
HealthRegenCap( std::stof( value ));
HealthRegenCap( std::stoi( value ));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

xuri has pulled this so not sure what updates he made or changes ill wait to see

HealthRegenCap( std::stof( value ));
break;
case 351: // STAMINAREGENCAP
StaminaRegenCap( std::stof( value ));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
StaminaRegenCap( std::stof( value ));
StaminaRegenCap( std::stoi( value ));

StaminaRegenCap( std::stof( value ));
break;
case 352: // MANAREGENCAP
ManaRegenCap( std::stof( value ));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ManaRegenCap( std::stof( value ));
ManaRegenCap( std::stoi( value ));

@Xoduz Xoduz added the Changes Requested Change requested as part of Review label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes Requested Change requested as part of Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants