[DiscordArchive] oh wait its c++ did u create overload 1 with and 1 without ?
[DiscordArchive] oh wait its c++ did u create overload 1 with and 1 without ?
Archived author: Rymercyble • Posted: 2023-12-13T02:46:24.255000+00:00
Original source
but whad did u do with those cases where it was not same ? <:kek:1065379143887372398>
Archived author: Natrist • Posted: 2023-12-13T02:47:21.896000+00:00
Original source
I used the target argument because that's all that matters.
Archived author: Natrist • Posted: 2023-12-13T02:47:24.847000+00:00
Original source
Let me show you the code...
Archived author: Natrist • Posted: 2023-12-13T02:47:45.437000+00:00
Original source
```C++
Aura* Unit::AddAura(uint32 spellId, Unit* target)
{
if (!target)
return nullptr;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
return nullptr;
if (!target->IsAlive() && !spellInfo->HasAttribute(SPELL_ATTR0_PASSIVE) && !spellInfo->HasAttribute(SPELL_ATTR2_ALLOW_DEAD_TARGET))
return nullptr;
return AddAura(spellInfo, MAX_EFFECT_MASK, target);
}
```
Archived author: Natrist • Posted: 2023-12-13T02:48:18.265000+00:00
Original source
It literally doesn't care about the object calling the function.
Archived author: Natrist • Posted: 2023-12-13T02:49:04.664000+00:00
Original source
The function it's calling into also doesn't care about it.
Archived author: Rymercyble • Posted: 2023-12-13T02:49:08.576000+00:00
Original source
Archived author: Natrist • Posted: 2023-12-13T02:49:28.155000+00:00
Original source
Ah, my bad. Didn't quite get what you were saying.
Archived author: Rymercyble • Posted: 2023-12-13T02:50:11.903000+00:00
Original source
so stuff like
```cpp
me->AddAura(SPELL_DK_SUMMON_GARGOYLE_1, who);
```
would become
```cpp
who->AddAura(SPELL_DK_SUMMON_GARGOYLE_1);
```
Archived author: Natrist • Posted: 2023-12-13T02:50:18.011000+00:00
Original source
Yes