diff options
| author | Brian <runningnak3d@gmail.com> | 2009-12-20 20:23:18 -0700 |
|---|---|---|
| committer | Brian <runningnak3d@gmail.com> | 2009-12-20 20:23:18 -0700 |
| commit | 5300226feebec5bab585819f7cdce214ec14dce9 (patch) | |
| tree | d6e55869d4cc010033b5c1e9120b458448505a87 /src/bindings/scripts | |
| parent | c4ac6323b0bb4eb9f4f1729ce2a63ab1a8ebd523 (diff) | |
* Added support for using a lookup table for creature mana / health
* As long as creature level, class, and the proper expansion they are from are
* set in creature_template, you will have 100% accurate health and mana.
* Research and base stats table done by Malcrom -- THANK YOU!
* Original patch by Kudlaty -- THANK YOU!
* Updated and enhanced by Machiavelli - THANK YOU!
* Optimizations by w12x, MrSmite, and XTZGZoReX -- THANK YOU!
* Final code updating for current rev by XTZGZoReX -- THANK YOU!
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts')
| -rw-r--r-- | src/bindings/scripts/scripts/world/npcs_special.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bindings/scripts/scripts/world/npcs_special.cpp b/src/bindings/scripts/scripts/world/npcs_special.cpp index 3acea45f65e..f63f1f22203 100644 --- a/src/bindings/scripts/scripts/world/npcs_special.cpp +++ b/src/bindings/scripts/scripts/world/npcs_special.cpp @@ -1585,8 +1585,9 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI IsViper = false; //We have to reload the states from db for summoned guardians - m_creature->SetMaxHealth(Info->maxhealth); - m_creature->SetHealth(Info->maxhealth); + BaseHealthManaPair pair = m_creature->GenerateHealthMana(); + m_creature->SetMaxHealth(pair.first); + m_creature->SetHealth(pair.second); m_creature->SetStatFloatValue(UNIT_FIELD_MINDAMAGE, Info->mindmg); m_creature->SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, Info->maxdmg); |
