aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2010-01-13 14:40:23 +0300
committern0n4m3 <none@none>2010-01-13 14:40:23 +0300
commit92d3209ab212a8fd56a58ccb3057e17a21c77327 (patch)
tree7a84ecd395f2ceb24032b8c758d9d67ad66ab0aa /src
parent7d988221f70c620da2d694022caa0bfac0268299 (diff)
Fixed spell Snake Trap, port from tc1, thx Frankir.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/world/npcs_special.cpp11
-rw-r--r--src/game/Pet.cpp16
2 files changed, 18 insertions, 9 deletions
diff --git a/src/bindings/scripts/scripts/world/npcs_special.cpp b/src/bindings/scripts/scripts/world/npcs_special.cpp
index 7908e2989f1..375848da9e8 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 1200
+#define VENOMOUS_SNAKE_TIMER 1500
#define VIPER_TIMER 3000
#define C_VIPER 19921
@@ -1585,13 +1585,6 @@ 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);
@@ -1657,7 +1650,7 @@ struct TRINITY_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI
}
else //Venomous Snake
{
- if (urand(0,9) < 8) //80% chance to cast
+ if (urand(0,2) == 0) //33% chance to cast
DoCast(m_creature->getVictim(), SPELL_DEADLY_POISON);
SpellTimer = VENOMOUS_SNAKE_TIMER + (rand() %5)*100;
}
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 5fe6a64932d..e9b1a2d0eac 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -969,6 +969,22 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel));
break;
}
+ case 19833: //Snake Trap - Venomous Snake
+ {
+ SetCreateHealth(uint32(107 * (petlevel - 40) * 0.025f));
+ SetCreateMana(0);
+ SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel / 2) - 25));
+ SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel / 2) - 18));
+ break;
+ }
+ case 19921: //Snake Trap - Viper
+ {
+ SetCreateHealth(uint32(107 * (petlevel - 40) * 0.025f));
+ SetCreateMana(0);
+ SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel / 2 - 10));
+ SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel / 2));
+ break;
+ }
case 31216: // Mirror Image
{
SetBonusDamage(int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FROST) * 0.33f));