[DiscordArchive] What is this There's a precious SetImmuneToNPC?
[DiscordArchive] What is this There's a precious SetImmuneToNPC?
Archived author: Malcrom • Posted: 2023-12-29T14:26:51.033000+00:00
Original source
What is this There's a precious SetImmuneToNPC?
Archived author: Malcrom • Posted: 2023-12-29T14:27:10.302000+00:00
Original source
I set and removed the flags in the sniff
Archived author: ModoX • Posted: 2023-12-29T14:28:51.755000+00:00
Original source
immuneflags should be removed with their related function, instead of setting the flag directly
Archived author: ModoX • Posted: 2023-12-29T14:29:53.902000+00:00
Original source
just `npc_<npc name here>`, if we have multiple occurences of the npc shovel the questname in it, if multiple in same quest also the purpose, e.g. `npc_thrall_super_cool_quest_fighting`
Archived author: Malcrom • Posted: 2023-12-29T14:31:33.127000+00:00
Original source
Where is this function documented?
Archived author: Malcrom • Posted: 2023-12-29T14:31:57.435000+00:00
Original source
All I saw in sniff was a flag being removed
Archived author: ModoX • Posted: 2023-12-29T14:32:03.237000+00:00
Original source
```cpp
bool IsImmuneToAll() const { return IsImmuneToPC() && IsImmuneToNPC(); }
void SetImmuneToAll(bool apply, bool keepCombat);
virtual void SetImmuneToAll(bool apply) { SetImmuneToAll(apply, false); }
bool IsImmuneToPC() const { return HasUnitFlag(UNIT_FLAG_IMMUNE_TO_PC); }
void SetImmuneToPC(bool apply, bool keepCombat);
virtual void SetImmuneToPC(bool apply) { SetImmuneToPC(apply, false); }
bool IsImmuneToNPC() const { return HasUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC); }
void SetImmuneToNPC(bool apply, bool keepCombat);
virtual void SetImmuneToNPC(bool apply) { SetImmuneToNPC(apply, false); }
```
Archived author: ModoX • Posted: 2023-12-29T14:32:06.974000+00:00
Original source
Unit.h
Archived author: Malcrom • Posted: 2023-12-29T14:34:21.723000+00:00
Original source
I don't know how I was suppose to know this from your comment. It was very useless
Archived author: ModoX • Posted: 2023-12-29T14:36:48.261000+00:00
Original source
use `->SetImmuneToPC(true)` instead of `SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);` e.g.