mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
[7886] Drop use table petcreateinfo_spell
This is first commit in chain for remove oudated and not used pet functionality.
* Use instead dropped table CreatureSpellData.dbc if creature_template.PetSpellDataId set (mostly hunter pets)
* Use creature_template.spellN if not set creature_template.PetSpellDataId (mostly different summon creatures)
* Fixed bug with not removing from action bar spell icon for not ranked unlearned spells.
Note: summoned controllable creatures without PetSpellDataId must have expected spells in spellN feilds for creature_template.
[7887] Drop pet spell teaching code, including field in character_pet.
Author: VladimirMangos
--HG--
branch : trunk
This commit is contained in:
@@ -250,8 +250,6 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
|
||||
if(result == SPELL_CAST_OK)
|
||||
{
|
||||
((Creature*)pet)->AddCreatureSpellCooldown(spellid);
|
||||
if (((Creature*)pet)->isPet())
|
||||
((Pet*)pet)->CheckLearning(spellid);
|
||||
|
||||
unit_target = spell->m_targets.getUnitTarget();
|
||||
|
||||
@@ -657,7 +655,6 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
|
||||
if(pet->isPet())
|
||||
{
|
||||
Pet* p = (Pet*)pet;
|
||||
p->CheckLearning(spellid);
|
||||
// 10% chance to play special pet attack talk, else growl
|
||||
// actually this only seems to happen on special spells, fire shield for imp, torment for voidwalker, but it's stupid to check every spell
|
||||
if(p->getPetType() == SUMMON_PET && (urand(0, 100) < 10))
|
||||
|
||||
Reference in New Issue
Block a user