Core/Creatures: reworked tempoary summon creation
* all stats and values will now be set before summons are getting added to map * cleaned up summon spell effect handler to reduce duplicade code * summoner guids will no longer be set for every minion and correctly handle assigning creator guids instead. These values will serve as fallback guid if there is no summoner guid * friendly tempsummons will now inherit the guild data of their player and pass them on to further allied summons. This fixes guild specific visuals for creatures such as Guild Battle Standards and Guild Heralds. Todo: check for regressions
This commit is contained in:
1 parent
bc1a69caa3
commit
d30c811d9e
19 files changed
+145
-276
No files matched your search
@@ -420,7 +420,7 @@ class spell_dk_death_pact : public SpellScript
|
||||
for (Unit::ControlList::const_iterator itr = player->m_Controlled.begin(); itr != player->m_Controlled.end(); ++itr)
|
||||
if (Creature* undeadPet = (*itr)->ToCreature())
|
||||
if (undeadPet->IsAlive() &&
|
||||
undeadPet->GetOwnerGUID() == player->GetGUID() &&
|
||||
undeadPet->GetOwnerOrCreatorGUID() == player->GetGUID() &&
|
||||
undeadPet->GetCreatureType() == CREATURE_TYPE_UNDEAD &&
|
||||
undeadPet->IsWithinDist(player, 100.0f, false))
|
||||
return SPELL_CAST_OK;
|
||||
@@ -435,7 +435,7 @@ class spell_dk_death_pact : public SpellScript
|
||||
{
|
||||
if (Unit* unit = (*itr)->ToUnit())
|
||||
{
|
||||
if (unit->GetOwnerGUID() == GetCaster()->GetGUID() && unit->GetCreatureType() == CREATURE_TYPE_UNDEAD)
|
||||
if (unit->GetOwnerOrCreatorGUID() == GetCaster()->GetGUID() && unit->GetCreatureType() == CREATURE_TYPE_UNDEAD)
|
||||
{
|
||||
target = unit;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user