Forums WoW Modding Support Archives Azerothcore Discord Archives [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 ?

[DiscordArchive] oh wait its c++ did u create overload 1 with and 1 without ?

Pages (3): Previous 1 2 3 Next
rektbyfaith
Administrator
0
12-13-2023, 02:46 AM
#11
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>
rektbyfaith
12-13-2023, 02:46 AM #11

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>

rektbyfaith
Administrator
0
12-13-2023, 02:47 AM
#12
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.
rektbyfaith
12-13-2023, 02:47 AM #12

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.

rektbyfaith
Administrator
0
12-13-2023, 02:47 AM
#13
Archived author: Natrist • Posted: 2023-12-13T02:47:24.847000+00:00
Original source

Let me show you the code...
rektbyfaith
12-13-2023, 02:47 AM #13

Archived author: Natrist • Posted: 2023-12-13T02:47:24.847000+00:00
Original source

Let me show you the code...

rektbyfaith
Administrator
0
12-13-2023, 02:47 AM
#14
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);
}
```
rektbyfaith
12-13-2023, 02:47 AM #14

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

rektbyfaith
Administrator
0
12-13-2023, 02:48 AM
#15
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.
rektbyfaith
12-13-2023, 02:48 AM #15

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.

rektbyfaith
Administrator
0
12-13-2023, 02:49 AM
#16
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.
rektbyfaith
12-13-2023, 02:49 AM #16

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.

rektbyfaith
Administrator
0
12-13-2023, 02:49 AM
#17
Archived author: Rymercyble • Posted: 2023-12-13T02:49:08.576000+00:00
Original source

rektbyfaith
12-13-2023, 02:49 AM #17

Archived author: Rymercyble • Posted: 2023-12-13T02:49:08.576000+00:00
Original source

rektbyfaith
Administrator
0
12-13-2023, 02:49 AM
#18
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.
rektbyfaith
12-13-2023, 02:49 AM #18

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.

rektbyfaith
Administrator
0
12-13-2023, 02:50 AM
#19
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);
```
rektbyfaith
12-13-2023, 02:50 AM #19

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

rektbyfaith
Administrator
0
12-13-2023, 02:50 AM
#20
Archived author: Natrist • Posted: 2023-12-13T02:50:18.011000+00:00
Original source

Yes
rektbyfaith
12-13-2023, 02:50 AM #20

Archived author: Natrist • Posted: 2023-12-13T02:50:18.011000+00:00
Original source

Yes

Pages (3): Previous 1 2 3 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)