From 0dbd0478c0d92437962a3ab1c33e231a9860595d Mon Sep 17 00:00:00 2001 From: KimLS Date: Wed, 12 Jun 2013 12:11:56 -0700 Subject: [PATCH] Merge of hatebourne's stuff --- changelog.txt | 9 +++++++++ zone/bot.cpp | 2 +- zone/client_mods.cpp | 2 +- zone/common.h | 2 +- zone/merc.cpp | 2 +- zone/mob.cpp | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 546be96d3..ec834d7f6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,14 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 06/12/2013 == +KLS: Merge Hateborne's hp cap stuff +KLS: We haven't updated changelog in a while but there's been: + -Some string stuff + -A lot of fixes to things like caps. + -More work on custom mod stuff (including examples) + -Fix for login not bailing out if it cant connect to a db + -Quite a few warning changes. + == 05/05/2013 == Tabasco: Added EVENT_ITEM_TICK for interactive item quest scripts. (See https://github.com/josheb/quests_dc/blob/master/items/12204.pl) Added simple account flags. Would this work better as an additional qglobal category? diff --git a/zone/bot.cpp b/zone/bot.cpp index c88ad72b7..239674927 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -11043,7 +11043,7 @@ int32 Bot::CalcMaxHP() { bot_hp += GroupLeadershipAAHealthEnhancement(); - bot_hp += bot_hp * (spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000; + bot_hp += bot_hp * ((spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); max_hp = bot_hp; if (cur_hp > max_hp) diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index eaab0ba81..b05b30e77 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -250,7 +250,7 @@ int32 Client::CalcMaxHP() { max_hp += GroupLeadershipAAHealthEnhancement(); - max_hp += max_hp * (spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000; + max_hp += max_hp * ((spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); if (cur_hp > max_hp) cur_hp = max_hp; diff --git a/zone/common.h b/zone/common.h index ddc17118f..f7716c927 100644 --- a/zone/common.h +++ b/zone/common.h @@ -283,7 +283,7 @@ struct StatBonuses { int16 HundredHands; //extra haste, stacks with all other haste i int8 MeleeLifetap; //i int16 HealRate; // Spell effect that influences effectiveness of heals - int16 MaxHPChange; // Spell Effect + int32 MaxHPChange; // Spell Effect int16 SkillDmgTaken[HIGHEST_SKILL+2]; // All Skills + -1 int32 HealAmt; // Item Effect int32 SpellDmg; // Item Effect diff --git a/zone/merc.cpp b/zone/merc.cpp index 0e652ff5a..0e262f735 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -918,7 +918,7 @@ int32 Merc::CalcMaxHP() { max_hp += GroupLeadershipAAHealthEnhancement(); - max_hp += max_hp * (spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000; + max_hp += max_hp * ((spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); if (cur_hp > max_hp) cur_hp = max_hp; diff --git a/zone/mob.cpp b/zone/mob.cpp index 33560ed55..f5073f860 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -615,7 +615,7 @@ int32 Mob::CalcMaxMana() { int32 Mob::CalcMaxHP() { max_hp = (base_hp + itembonuses.HP + spellbonuses.HP); - max_hp += max_hp * (aabonuses.MaxHPChange + spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000; + max_hp += max_hp * ((aabonuses.MaxHPChange + spellbonuses.MaxHPChange + itembonuses.MaxHPChange) / 10000.0f); return max_hp; }