diff options
author | maximius <none@none> | 2009-09-23 22:09:20 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-09-23 22:09:20 -0700 |
commit | 8ccf471bcb0584737463f430435c209460f4c152 (patch) | |
tree | f9bf27b772094279b959ffbcebbf3b046d917147 /src | |
parent | 906b00465ad7c41a018a6c6ea3f37b6c466d38cd (diff) |
*Force creatures to choose a new, random model on spawn/respawn
*Change the damage formula to include weapon min/max damage.. previous method did not work properly at all.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Creature.cpp | 3 | ||||
-rw-r--r-- | src/game/StatSystem.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index a9b4aa0bec5..dda642c9504 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -724,6 +724,7 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, } LoadCreaturesAddon(); } + SetDisplayId(GetCreatureInfo()->GetRandomValidModelId()); return bResult; } @@ -1843,6 +1844,8 @@ void Creature::Respawn(bool force) else setDeathState( JUST_ALIVED ); + SetDisplayId(cinfo->GetRandomValidModelId()); + //Call AI respawn virtual function AI()->JustRespawned(); diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index 744be0e26eb..74d790de1a4 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -870,8 +870,8 @@ void Creature::UpdateDamagePhysical(WeaponAttackType attType) weapon_maxdamage = 0; } - float mindamage = ((base_value * dmg_multiplier + weapon_mindamage) * base_pct + total_value) * total_pct; - float maxdamage = ((base_value * dmg_multiplier + weapon_maxdamage) * base_pct + total_value) * total_pct; + float mindamage = ((base_value + weapon_mindamage) * dmg_multiplier * base_pct + total_value) * total_pct; + float maxdamage = ((base_value + weapon_maxdamage) * dmg_multiplier * base_pct + total_value) * total_pct; switch(attType) { |