[DiscordArchive] ```c++
[DiscordArchive] ```c++
Archived author: JeimonkAs • Posted: 2024-10-25T11:03:17.892000+00:00
Original source
```C++
class at_civil_despawn: public AreaTriggerEntityScript
{
public:
at_civil_despawn() : AreaTriggerEntityScript("at_civil_despawn") { }
bool OnTrigger(Player* player,AreaTriggerEntry* areaTrigger)
{
if(areaTrigger->ID == 70096)
{
std::list<Creature*> creatureList;
player->GetCreatureListWithEntryInGrid(creatureList,219871);
for (Creature* creature : creatureList)
{
if (creature && creature->IsAlive())
{
creature->ForcedDespawn(0);
}
}
}
return true;
}
};
```
Like this ? but how it registry ? new at_civil_despawn() ?
Archived author: Drikish • Posted: 2025-01-12T21:04:45.079000+00:00
Original source
I am a C++ newbie ultra newbie
Archived author: Drikish • Posted: 2025-01-12T21:05:13.722000+00:00
Original source
It does work but I don't know if I should also be returning here under any circumstance or not
Archived author: Telegrill • Posted: 2025-01-12T21:10:46.841000+00:00
Original source
we don't pass true anymore
Archived author: Telegrill • Posted: 2025-01-12T21:11:01.258000+00:00
Original source
we try to pass required trigger flags only
Archived author: Drikish • Posted: 2025-01-12T21:39:59.873000+00:00
Original source
Also annoying when the event fires and the spell hits the targets its Evaded and this wasn't happening when I just cast it myself normally without a delay / event