Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] do you have an example?

[DiscordArchive] do you have an example?

[DiscordArchive] do you have an example?

Pages (2): Previous 1 2
rektbyfaith
Administrator
0
06-22-2022, 09:16 PM
#11
Archived author: whatwere • Posted: 2022-06-22T21:16:49.450000+00:00
Original source

So it copies the list and then checks each ones existence? It's too expensive for something running every movementpacket
rektbyfaith
06-22-2022, 09:16 PM #11

Archived author: whatwere • Posted: 2022-06-22T21:16:49.450000+00:00
Original source

So it copies the list and then checks each ones existence? It's too expensive for something running every movementpacket

rektbyfaith
Administrator
0
06-22-2022, 09:17 PM
#12
Archived author: <o> • Posted: 2022-06-22T21:17:35.464000+00:00
Original source

what rev of ac?
rektbyfaith
06-22-2022, 09:17 PM #12

Archived author: <o> • Posted: 2022-06-22T21:17:35.464000+00:00
Original source

what rev of ac?

rektbyfaith
Administrator
0
06-22-2022, 09:18 PM
#13
Archived author: <o> • Posted: 2022-06-22T21:18:29.925000+00:00
Original source

at least the latest one doesn't even do that, so i'll guess it's two collections too: <https://github.com/azerothcore/azerothcore-wotlk/blob/92aec9fc3e8fc363db856faab480a8edb32606fd/src/server/game/Entities/Unit/Unit.cpp#L16185>
rektbyfaith
06-22-2022, 09:18 PM #13

Archived author: <o> • Posted: 2022-06-22T21:18:29.925000+00:00
Original source

at least the latest one doesn't even do that, so i'll guess it's two collections too: <https://github.com/azerothcore/azerothcore-wotlk/blob/92aec9fc3e8fc363db856faab480a8edb32606fd/src/server/game/Entities/Unit/Unit.cpp#L16185>

rektbyfaith
Administrator
0
06-22-2022, 09:19 PM
#14
Archived author: whatwere • Posted: 2022-06-22T21:19:06.535000+00:00
Original source

36f0a7757bde9573262f298aa1eaf6765af8295e
rektbyfaith
06-22-2022, 09:19 PM #14

Archived author: whatwere • Posted: 2022-06-22T21:19:06.535000+00:00
Original source

36f0a7757bde9573262f298aa1eaf6765af8295e

rektbyfaith
Administrator
0
06-22-2022, 09:19 PM
#15
Archived author: whatwere • Posted: 2022-06-22T21:19:58.926000+00:00
Original source

I could probably return a true/false bool if the aura still exists and only iterate if it does.
rektbyfaith
06-22-2022, 09:19 PM #15

Archived author: whatwere • Posted: 2022-06-22T21:19:58.926000+00:00
Original source

I could probably return a true/false bool if the aura still exists and only iterate if it does.

rektbyfaith
Administrator
0
06-22-2022, 09:21 PM
#16
Archived author: <o> • Posted: 2022-06-22T21:21:53.509000+00:00
Original source

you have this function:

```c++
void Unit::RemoveAura(AuraApplicationMap::iterator& i, AuraRemoveMode mode)
```

it takes an iterator to an aura application map, that's to update it if it's being removed, follow calls to this function and you can probably figure out how you're supposed to iterate that map
rektbyfaith
06-22-2022, 09:21 PM #16

Archived author: <o> • Posted: 2022-06-22T21:21:53.509000+00:00
Original source

you have this function:

```c++
void Unit::RemoveAura(AuraApplicationMap::iterator& i, AuraRemoveMode mode)
```

it takes an iterator to an aura application map, that's to update it if it's being removed, follow calls to this function and you can probably figure out how you're supposed to iterate that map

rektbyfaith
Administrator
0
06-22-2022, 09:22 PM
#17
Archived author: <o> • Posted: 2022-06-22T21:22:53.878000+00:00
Original source

you should not try to update the collections yourself manually, they're very sensitive to that
rektbyfaith
06-22-2022, 09:22 PM #17

Archived author: <o> • Posted: 2022-06-22T21:22:53.878000+00:00
Original source

you should not try to update the collections yourself manually, they're very sensitive to that

rektbyfaith
Administrator
0
06-22-2022, 09:23 PM
#18
Archived author: whatwere • Posted: 2022-06-22T21:23:19.030000+00:00
Original source

Damn you're fast
rektbyfaith
06-22-2022, 09:23 PM #18

Archived author: whatwere • Posted: 2022-06-22T21:23:19.030000+00:00
Original source

Damn you're fast

rektbyfaith
Administrator
0
06-22-2022, 09:25 PM
#19
Archived author: <o> • Posted: 2022-06-22T21:25:32.561000+00:00
Original source

then you just do the typical thing when iterating with erases:

```c++
for (auto it = m_appliedAuras.begin(); it != m_appliedAuras.end(); ) {
if (it->second)
{
bool erased = it->second->GetBase()->CallScriptOnMovementPacket(it); // by ref
if (erased)
continue;
}
++it;
}
```

(my first example was obviously wrong)
rektbyfaith
06-22-2022, 09:25 PM #19

Archived author: <o> • Posted: 2022-06-22T21:25:32.561000+00:00
Original source

then you just do the typical thing when iterating with erases:

```c++
for (auto it = m_appliedAuras.begin(); it != m_appliedAuras.end(); ) {
if (it->second)
{
bool erased = it->second->GetBase()->CallScriptOnMovementPacket(it); // by ref
if (erased)
continue;
}
++it;
}
```

(my first example was obviously wrong)

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