aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Map.cpp2
-rw-r--r--src/game/SpellEffects.cpp9
2 files changed, 9 insertions, 2 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index f8e5077d52f..0bf1d5b7bf2 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -257,7 +257,7 @@ template<>
void Map::AddToGrid(Creature* obj, NGridType *grid, Cell const& cell)
{
// add to world object registry in grid
- if(obj->isPet() && IS_PLAYER_GUID(obj->GetOwnerGUID()) || obj->isPossessedByPlayer())
+ if(obj->isPet() /*&& IS_PLAYER_GUID(obj->GetOwnerGUID())*/ || obj->isPossessedByPlayer())
{
(*grid)(cell.CellX(), cell.CellY()).AddWorldObject<Creature>(obj, obj->GetGUID());
obj->SetCurrentCell(cell);
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index e693cd9adbd..d3e503d47b2 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3575,7 +3575,7 @@ void Spell::EffectSummonGuardian(uint32 i)
}
// trigger
- if(m_spellInfo->Id == 40276)
+ if(!m_originalCaster || m_originalCaster->GetTypeId() != TYPEID_PLAYER /*m_spellInfo->Id == 40276*/)
{
EffectSummonWild(i);
return;
@@ -3987,6 +3987,12 @@ void Spell::EffectTameCreature(uint32 /*i*/)
void Spell::EffectSummonPet(uint32 i)
{
+ if(!m_originalCaster || m_originalCaster->GetTypeId() != TYPEID_PLAYER)
+ {
+ EffectSummonWild(i);
+ return;
+ }
+
uint32 petentry = m_spellInfo->EffectMiscValue[i];
Pet *OldSummon = m_caster->GetPet();
@@ -5768,6 +5774,7 @@ void Spell::EffectSummonCritter(uint32 i)
// summon new pet
Pet* critter = new Pet(MINI_PET);
+ critter->setActive(m_caster->isActive());
Map *map = m_caster->GetMap();
uint32 pet_number = objmgr.GeneratePetNumber();