Skip to content

Commit

Permalink
[11327] Restore hunter's pet call after desmiss work.
Browse files Browse the repository at this point in the history
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
SeTM authored and VladimirMangos committed Apr 8, 2011
1 parent b7eadbe commit d4aef13
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions src/game/SpellEffects.cpp
Expand Up @@ -5441,14 +5441,12 @@ void Spell::EffectSummonPet(SpellEffectIndex eff_idx)
return;
}

// not error in case fail hunter call pet
if (!petentry)
return;
CreatureInfo const* cInfo = petentry ? sCreatureStorage.LookupEntry<CreatureInfo>(petentry) : NULL;

CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(petentry);
if(!cInfo)
// == 0 in case call current pet, check only real summon case
if (petentry && !cInfo)
{
sLog.outErrorDb("EffectSummonPet: creature entry %u not found.", petentry);
sLog.outErrorDb("EffectSummonPet: creature entry %u not found for spell %u.", petentry, m_spellInfo->Id);
return;
}

Expand All @@ -5458,6 +5456,13 @@ void Spell::EffectSummonPet(SpellEffectIndex eff_idx)
if (m_caster->GetTypeId() == TYPEID_PLAYER && NewSummon->LoadPetFromDB((Player*)m_caster, petentry))
return;

// not error in case fail hunter call pet
if (!petentry)
{
delete NewSummon;
return;
}

CreatureCreatePos pos(m_caster, m_caster->GetOrientation());

Map *map = m_caster->GetMap();
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11326"
#define REVISION_NR "11327"
#endif // __REVISION_NR_H__

0 comments on commit d4aef13

Please sign in to comment.