diff options
| author | DDuarte <dnpd.dd@gmail.com> | 2014-01-11 17:26:22 +0000 |
|---|---|---|
| committer | DDuarte <dnpd.dd@gmail.com> | 2014-01-11 17:26:22 +0000 |
| commit | 08003577de2ea70fcbf4410eb889b67023bed700 (patch) | |
| tree | 95f7e4c4edff9551017e4f3da2e6abf70c482140 /src/server/scripts/Pet | |
| parent | 33c2bd5ce1f4f8d20981e9f7aea90e37de0abbda (diff) | |
| parent | 41b613186e06e3f41549912f91e68bafa3e8c059 (diff) | |
Merge branch 'master' into 4.3.4
Conflicts:
dep/libmpq/CMakeLists.txt
src/server/game/Battlefield/BattlefieldMgr.cpp
src/server/game/Battlefield/BattlefieldMgr.h
src/server/game/DataStores/DBCStores.cpp
src/server/game/Entities/Creature/Creature.cpp
src/server/game/Entities/Creature/Creature.h
src/server/game/Entities/Object/Object.cpp
src/server/game/Entities/Player/Player.h
src/server/game/Entities/Unit/StatSystem.cpp
src/server/game/Entities/Unit/Unit.cpp
src/server/game/Entities/Vehicle/Vehicle.cpp
src/server/game/Globals/ObjectMgr.cpp
src/server/game/Handlers/BattlefieldHandler.cpp
src/server/game/Handlers/GuildHandler.cpp
src/server/game/Movement/Spline/MoveSplineInit.cpp
src/server/game/Server/Protocol/Opcodes.cpp
src/server/game/Server/WorldSession.h
src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
src/server/scripts/EasternKingdoms/ZulAman/zulaman.h
src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h
src/server/scripts/EasternKingdoms/boss_kruul.cpp
src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
src/server/scripts/Kalimdor/zone_azshara.cpp
src/server/scripts/Kalimdor/zone_moonglade.cpp
src/server/scripts/Kalimdor/zone_orgrimmar.cpp
src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
src/server/scripts/OutdoorPvP/OutdoorPvPEP.h
src/server/scripts/Spells/spell_dk.cpp
src/tools/map_extractor/mpq_libmpq.cpp
src/tools/map_extractor/mpq_libmpq04.h
src/tools/vmap4_extractor/loadlib/loadlib.h
src/tools/vmap4_extractor/mpq_libmpq.cpp
src/tools/vmap4_extractor/mpq_libmpq04.h
Diffstat (limited to 'src/server/scripts/Pet')
| -rw-r--r-- | src/server/scripts/Pet/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/server/scripts/Pet/pet_dk.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Pet/pet_generic.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Pet/pet_hunter.cpp | 42 | ||||
| -rw-r--r-- | src/server/scripts/Pet/pet_mage.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Pet/pet_priest.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Pet/pet_shaman.cpp | 2 |
7 files changed, 22 insertions, 32 deletions
diff --git a/src/server/scripts/Pet/CMakeLists.txt b/src/server/scripts/Pet/CMakeLists.txt index 87bbfd63c69..fce34098f41 100644 --- a/src/server/scripts/Pet/CMakeLists.txt +++ b/src/server/scripts/Pet/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> +# Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without diff --git a/src/server/scripts/Pet/pet_dk.cpp b/src/server/scripts/Pet/pet_dk.cpp index 799aaf5d0a2..daeb0d71720 100644 --- a/src/server/scripts/Pet/pet_dk.cpp +++ b/src/server/scripts/Pet/pet_dk.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Pet/pet_generic.cpp b/src/server/scripts/Pet/pet_generic.cpp index f59f850c20b..2a41b293967 100644 --- a/src/server/scripts/Pet/pet_generic.cpp +++ b/src/server/scripts/Pet/pet_generic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Pet/pet_hunter.cpp b/src/server/scripts/Pet/pet_hunter.cpp index 80551be9131..8a0b78b5478 100644 --- a/src/server/scripts/Pet/pet_hunter.cpp +++ b/src/server/scripts/Pet/pet_hunter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -25,9 +25,9 @@ enum HunterSpells { - SPELL_HUNTER_CRIPPLING_POISON = 30981, // Viper - SPELL_HUNTER_DEADLY_POISON = 34655, // Venomous Snake - SPELL_HUNTER_MIND_NUMBING_POISON = 25810 // Viper + SPELL_HUNTER_CRIPPLING_POISON = 30981, // Viper + SPELL_HUNTER_DEADLY_POISON_PASSIVE = 34657, // Venomous Snake + SPELL_HUNTER_MIND_NUMBING_POISON = 25810 // Viper }; enum HunterCreatures @@ -57,14 +57,17 @@ class npc_pet_hunter_snake_trap : public CreatureScript me->SetMaxHealth(uint32(107 * (me->getLevel() - 40) * 0.025f)); // Add delta to make them not all hit the same time uint32 delta = (rand() % 7) * 100; - me->SetStatFloatValue(UNIT_FIELD_BASEATTACKTIME, float(Info->baseattacktime + delta)); - me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER, float(Info->attackpower)); + me->SetAttackTime(BASE_ATTACK, Info->baseattacktime + delta); + //me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER, float(Info->attackpower)); // Start attacking attacker of owner on first ai update after spawn - move in line of sight may choose better target if (!me->GetVictim() && me->IsSummon()) if (Unit* Owner = me->ToTempSummon()->GetSummoner()) if (Owner->getAttackerForHelper()) AttackStart(Owner->getAttackerForHelper()); + + if (!_isViper) + DoCast(me, SPELL_HUNTER_DEADLY_POISON_PASSIVE, true); } // Redefined for random target selection: @@ -99,32 +102,19 @@ class npc_pet_hunter_snake_trap : public CreatureScript return; } - if (_spellTimer <= diff) + // Viper + if (_isViper) { - if (_isViper) // Viper + if (_spellTimer <= diff) { - if (urand(0, 2) == 0) //33% chance to cast - { - uint32 spell; - if (urand(0, 1) == 0) - spell = SPELL_HUNTER_MIND_NUMBING_POISON; - else - spell = SPELL_HUNTER_CRIPPLING_POISON; - - DoCastVictim(spell); - } + if (urand(0, 2) == 0) // 33% chance to cast + DoCastVictim(RAND(SPELL_HUNTER_MIND_NUMBING_POISON, SPELL_HUNTER_CRIPPLING_POISON)); _spellTimer = 3000; } - else // Venomous Snake - { - if (urand(0, 2) == 0) // 33% chance to cast - DoCastVictim(SPELL_HUNTER_DEADLY_POISON); - _spellTimer = 1500 + (rand() % 5) * 100; - } + else + _spellTimer -= diff; } - else - _spellTimer -= diff; DoMeleeAttackIfReady(); } diff --git a/src/server/scripts/Pet/pet_mage.cpp b/src/server/scripts/Pet/pet_mage.cpp index 7ac50f4313c..69e924c0d43 100644 --- a/src/server/scripts/Pet/pet_mage.cpp +++ b/src/server/scripts/Pet/pet_mage.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Pet/pet_priest.cpp b/src/server/scripts/Pet/pet_priest.cpp index 4b565aaec10..fc106a2a786 100644 --- a/src/server/scripts/Pet/pet_priest.cpp +++ b/src/server/scripts/Pet/pet_priest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/scripts/Pet/pet_shaman.cpp b/src/server/scripts/Pet/pet_shaman.cpp index 989d6f46327..03e6c55b109 100644 --- a/src/server/scripts/Pet/pet_shaman.cpp +++ b/src/server/scripts/Pet/pet_shaman.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the |
