Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] ```c++

[DiscordArchive] ```c++

[DiscordArchive] ```c++

rektbyfaith
Administrator
0
01-12-2025, 09:04 PM
#1
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() ?
rektbyfaith
01-12-2025, 09:04 PM #1

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() ?

rektbyfaith
Administrator
0
01-12-2025, 09:04 PM
#2
Archived author: Drikish • Posted: 2025-01-12T21:04:45.079000+00:00
Original source

I am a C++ newbie ultra newbie
rektbyfaith
01-12-2025, 09:04 PM #2

Archived author: Drikish • Posted: 2025-01-12T21:04:45.079000+00:00
Original source

I am a C++ newbie ultra newbie

rektbyfaith
Administrator
0
01-12-2025, 09:05 PM
#3
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
rektbyfaith
01-12-2025, 09:05 PM #3

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

rektbyfaith
Administrator
0
01-12-2025, 09:10 PM
#4
Archived author: Telegrill • Posted: 2025-01-12T21:10:46.841000+00:00
Original source

we don't pass true anymore
rektbyfaith
01-12-2025, 09:10 PM #4

Archived author: Telegrill • Posted: 2025-01-12T21:10:46.841000+00:00
Original source

we don't pass true anymore

rektbyfaith
Administrator
0
01-12-2025, 09:11 PM
#5
Archived author: Telegrill • Posted: 2025-01-12T21:11:01.258000+00:00
Original source

we try to pass required trigger flags only
rektbyfaith
01-12-2025, 09:11 PM #5

Archived author: Telegrill • Posted: 2025-01-12T21:11:01.258000+00:00
Original source

we try to pass required trigger flags only

rektbyfaith
Administrator
0
01-12-2025, 09:39 PM
#6
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
rektbyfaith
01-12-2025, 09:39 PM #6

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

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)