Jump to content

[Patch]TemporarySummon set UNIT_FIELD_SUMMONEDBY value


Guest anti-freak

Recommended Posts

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); }

Link to comment
Share on other sites

×
×
  • 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