[DiscordArchive] you interested in refactors for stuff like that or let sleeping dogs lie?
[DiscordArchive] you interested in refactors for stuff like that or let sleeping dogs lie?
Archived author: Kitzunu • Posted: 2023-10-29T22:20:56.307000+00:00
Original source
Why not
Archived author: KJack • Posted: 2023-10-29T22:21:04.794000+00:00
Original source
nice, let me add it to the list
Archived author: KJack • Posted: 2023-10-29T22:37:35.780000+00:00
Original source
i see what's happening but i don't know how to fix it yet. when i add the immunities first, i can then remove them.
```c++
me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true, SPELL_BLOCK_TYPE_ALL, true);
me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SNARE, true, SPELL_BLOCK_TYPE_ALL, true);
me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true, SPELL_BLOCK_TYPE_ALL, true);
me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, false, SPELL_BLOCK_TYPE_ALL, true);
me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SNARE, false, SPELL_BLOCK_TYPE_ALL, true);
me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, false, SPELL_BLOCK_TYPE_ALL, true);
```
```
----------------------------------------
Unit::ApplySpellImmune: 0 5 13 true
----------------------------------------
Unit::ApplySpellImmune: 0 5 11 true
----------------------------------------
Unit::ApplySpellImmune: 0 5 7 true
----------------------------------------
Unit::ApplySpellImmune: 0 5 13 false
Unit::ApplySpellImmune: apply = false
Unit::ApplySpellImmune: Current immunities for op 5:
Unit::ApplySpellImmune: 0 13 0
Unit::ApplySpellImmune: 0 11 0
Unit::ApplySpellImmune: 0 7 0
Should 0 (type 13) be removed?
Yes!
----------------------------------------
Unit::ApplySpellImmune: 0 5 11 false
Unit::ApplySpellImmune: apply = false
Unit::ApplySpellImmune: Current immunities for op 5:
Unit::ApplySpellImmune: 0 11 0
Unit::ApplySpellImmune: 0 7 0
Should 0 (type 11) be removed?
Yes!
----------------------------------------
Unit::ApplySpellImmune: 0 5 7 false
Unit::ApplySpellImmune: apply = false
Unit::ApplySpellImmune: Current immunities for op 5:
Unit::ApplySpellImmune: 0 7 0
Should 0 (type 7) be removed?
Yes!
```
Archived author: KJack • Posted: 2023-10-29T22:38:02.365000+00:00
Original source
still has no effect on the actual immunities of the creature in-game
Archived author: KJack • Posted: 2023-10-29T22:38:35.060000+00:00
Original source
so i think that list that is being manipulated is detached from whatever the DB is loading into and whatever the game is reading from
Archived author: KJack • Posted: 2023-10-29T22:38:51.690000+00:00
Original source
let me see if i can just straight up add a new immunity
Archived author: KJack • Posted: 2023-10-29T22:39:38.389000+00:00
Original source
( ignore that last `true` in my example functions, i added a `log` bool for testing)
Archived author: Kitzunu • Posted: 2023-10-29T22:42:57.103000+00:00
Original source
Just check where we load creature immunities. Perhaps it is seperate
Archived author: Kitzunu • Posted: 2023-10-29T22:43:00.070000+00:00
Original source
I cant recall
Archived author: KJack • Posted: 2023-10-29T22:44:17.605000+00:00
Original source
will do. i'm going to have to step away for a bit but i'll dig into this tonight. see what's going on.
~~~it doesn't appear i can add mechanic immunities with that function either.~~ nevermind, they just don't show in `.npc info`