Jump to content

[Patch]TemporarySummon set UNIT_FIELD_SUMMONEDBY value


Recommended Posts

Posted

Mangos Verion: all until current

Who wrote this patch:

me

what does it change:

temporarysummoned creatures now set the "UNIT_FIELD_SUMMONEDBY" value, so the "GetOwner()" and "GetOwnerGuid()" function are working correct.

diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp index 7d3ad3d..052ad70 100644 --- a/src/game/TemporarySummon.cpp +++ b/src/game/TemporarySummon.cpp @@ -156,6 +156,8 @@ void TemporarySummon::Summon(TempSummonType type, uint32 lifetime, uint32 spawnP m_timer = lifetime; m_lifetime = lifetime; + SetGuidValue(UNIT_FIELD_SUMMONEDBY, m_summoner); + AIM_Initialize(); GetMap()->Add((Creature*)this); }

Posted

When you set owner field UNIT_FIELD_SUMMONEDBY then this affect client way work.

For example if thsi freindly npc then only owner can interact with it after. Possible other affects.

So need set this field carefully, only for non-wild summons as Schmoozerd.

So rejected as not correct for generic case.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use