diff options
| author | n0n4m3 <none@none> | 2010-01-13 19:11:46 +0300 |
|---|---|---|
| committer | n0n4m3 <none@none> | 2010-01-13 19:11:46 +0300 |
| commit | f7ad3aefc8e63e87c29d5e9c169210f4e7e80ac8 (patch) | |
| tree | 7418fd8e76d498bb754b3b92b981743e20199f98 /src/bindings/scripts | |
| parent | edeb6bf284e9f7ab501f6c3273221dbf02d60084 (diff) | |
Removed all my commits for today, this is hack? really? okey
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts')
| -rw-r--r-- | src/bindings/scripts/scripts/world/npcs_special.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bindings/scripts/scripts/world/npcs_special.cpp b/src/bindings/scripts/scripts/world/npcs_special.cpp index 375848da9e8..7908e2989f1 100644 --- a/src/bindings/scripts/scripts/world/npcs_special.cpp +++ b/src/bindings/scripts/scripts/world/npcs_special.cpp @@ -1556,7 +1556,7 @@ CreatureAI* GetAI_npc_winter_reveler(Creature* pCreature) #define SPELL_DEADLY_POISON 34655 //Venomous Snake #define SPELL_CRIPPLING_POISON 3409 //Viper -#define VENOMOUS_SNAKE_TIMER 1500 +#define VENOMOUS_SNAKE_TIMER 1200 #define VIPER_TIMER 3000 #define C_VIPER 19921 @@ -1585,6 +1585,13 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI else IsViper = false; + //We have to reload the states from db for summoned guardians + CreatureBaseStats const* stats = CreatureBaseStats::GetBaseStats(m_creature->getLevel(), Info->unit_class); + m_creature->SetMaxHealth(stats->GenerateHealth(Info)); + m_creature->SetHealth(stats->GenerateMana(Info)); + m_creature->SetStatFloatValue(UNIT_FIELD_MINDAMAGE, Info->mindmg); + m_creature->SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, Info->maxdmg); + //Add delta to make them not all hit the same time uint32 delta = (rand() % 7) * 100; m_creature->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, Info->baseattacktime + delta); @@ -1650,7 +1657,7 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI } else //Venomous Snake { - if (urand(0,2) == 0) //33% chance to cast + if (urand(0,9) < 8) //80% chance to cast DoCast(m_creature->getVictim(), SPELL_DEADLY_POISON); SpellTimer = VENOMOUS_SNAKE_TIMER + (rand() %5)*100; } |
