Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] how to make a creature re-check if a waypoint has been reached?

[DiscordArchive] how to make a creature re-check if a waypoint has been reached?

[DiscordArchive] how to make a creature re-check if a waypoint has been reached?

rektbyfaith
Administrator
0
06-24-2023, 03:55 PM
#1
Archived author: Chaz • Posted: 2023-06-24T15:55:02.147000+00:00
Original source

how to make a creature re-check if a waypoint has been reached?
rektbyfaith
06-24-2023, 03:55 PM #1

Archived author: Chaz • Posted: 2023-06-24T15:55:02.147000+00:00
Original source

how to make a creature re-check if a waypoint has been reached?

rektbyfaith
Administrator
0
06-24-2023, 03:55 PM
#2
Archived author: Chaz • Posted: 2023-06-24T15:55:13.598000+00:00
Original source

and if not, proceed to that waypoint
rektbyfaith
06-24-2023, 03:55 PM #2

Archived author: Chaz • Posted: 2023-06-24T15:55:13.598000+00:00
Original source

and if not, proceed to that waypoint

rektbyfaith
Administrator
0
06-24-2023, 03:55 PM
#3
Archived author: Chaz • Posted: 2023-06-24T15:55:31.142000+00:00
Original source

for example sometimes creatures bug out and don't reach their waypoint
rektbyfaith
06-24-2023, 03:55 PM #3

Archived author: Chaz • Posted: 2023-06-24T15:55:31.142000+00:00
Original source

for example sometimes creatures bug out and don't reach their waypoint

rektbyfaith
Administrator
0
06-24-2023, 03:56 PM
#4
Archived author: Chaz • Posted: 2023-06-24T15:56:08.231000+00:00
Original source

casting the gm spell banish on brann bronzebeard does this for example
rektbyfaith
06-24-2023, 03:56 PM #4

Archived author: Chaz • Posted: 2023-06-24T15:56:08.231000+00:00
Original source

casting the gm spell banish on brann bronzebeard does this for example

rektbyfaith
Administrator
0
06-24-2023, 03:59 PM
#5
Archived author: Deleted User • Posted: 2023-06-24T15:59:52.757000+00:00
Original source

I don't get why this doesn't work

```cpp
// 58914 - Kill Command
class spell_hun_kill_command_pet : public AuraScript
{
PrepareAuraScript(spell_hun_kill_command_pet);

bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_KILL_COMMAND_HUNTER });
}

void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
// prevent charge drop (aura has both proc charge and stacks)
PreventDefaultAction();

if (Unit* owner = eventInfo.GetActor()->GetOwner())
owner->RemoveAuraFromStack(SPELL_HUNTER_KILL_COMMAND_HUNTER);

ModStackAmount(-1);
}
void HandleDummy()
{
Unit* caster = GetCaster();
if (!caster)
return;

// clear hunter crit aura state
//caster->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH_OR_HUNTER_CRIT_STRIKE, false);

if (caster->HasAura(SPELL_HUNTER_IMPROVED_KILL_COMMAND))
caster->CastSpell(caster, SPELL_HUNTER_IMPROVED_KILL_COMMAND_EXPLOIT_WEAKNESS, true);

// additional damage from pet to pet target
Unit* pet = caster->GetGuardianPet(); // It was GetPet but i get fatal error: no member named 'GetPet' in 'Unit'
if (!pet || !pet->GetVictim())
return;

pet->CastSpell(pet->GetVictim(), GetSpellInfo()->GetEffect(EFFECT_0).CalcValue(), true);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_hun_kill_command_pet::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};

```
rektbyfaith
06-24-2023, 03:59 PM #5

Archived author: Deleted User • Posted: 2023-06-24T15:59:52.757000+00:00
Original source

I don't get why this doesn't work

```cpp
// 58914 - Kill Command
class spell_hun_kill_command_pet : public AuraScript
{
PrepareAuraScript(spell_hun_kill_command_pet);

bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_KILL_COMMAND_HUNTER });
}

void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
// prevent charge drop (aura has both proc charge and stacks)
PreventDefaultAction();

if (Unit* owner = eventInfo.GetActor()->GetOwner())
owner->RemoveAuraFromStack(SPELL_HUNTER_KILL_COMMAND_HUNTER);

ModStackAmount(-1);
}
void HandleDummy()
{
Unit* caster = GetCaster();
if (!caster)
return;

// clear hunter crit aura state
//caster->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH_OR_HUNTER_CRIT_STRIKE, false);

if (caster->HasAura(SPELL_HUNTER_IMPROVED_KILL_COMMAND))
caster->CastSpell(caster, SPELL_HUNTER_IMPROVED_KILL_COMMAND_EXPLOIT_WEAKNESS, true);

// additional damage from pet to pet target
Unit* pet = caster->GetGuardianPet(); // It was GetPet but i get fatal error: no member named 'GetPet' in 'Unit'
if (!pet || !pet->GetVictim())
return;

pet->CastSpell(pet->GetVictim(), GetSpellInfo()->GetEffect(EFFECT_0).CalcValue(), true);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_hun_kill_command_pet::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};

```

rektbyfaith
Administrator
0
06-24-2023, 04:00 PM
#6
Archived author: Deleted User • Posted: 2023-06-24T16:00:08.181000+00:00
Original source

```cpp

SPELL_HUNTER_KILL_COMMAND_HUNTER = 34027,
SPELL_HUNTER_IMPROVED_KILL_COMMAND = 37483, // Dungeon Set 4P Bonus
SPELL_HUNTER_IMPROVED_KILL_COMMAND_EXPLOIT_WEAKNESS = 37482 // Dungeon Set 4P Bonus

```
rektbyfaith
06-24-2023, 04:00 PM #6

Archived author: Deleted User • Posted: 2023-06-24T16:00:08.181000+00:00
Original source

```cpp

SPELL_HUNTER_KILL_COMMAND_HUNTER = 34027,
SPELL_HUNTER_IMPROVED_KILL_COMMAND = 37483, // Dungeon Set 4P Bonus
SPELL_HUNTER_IMPROVED_KILL_COMMAND_EXPLOIT_WEAKNESS = 37482 // Dungeon Set 4P Bonus

```

rektbyfaith
Administrator
0
06-24-2023, 04:00 PM
#7
Archived author: Deleted User • Posted: 2023-06-24T16:00:36.677000+00:00
Original source

RegisterSpellScript(spell_hun_kill_command_pet);

and i've added spell to spell_script_names ofc
rektbyfaith
06-24-2023, 04:00 PM #7

Archived author: Deleted User • Posted: 2023-06-24T16:00:36.677000+00:00
Original source

RegisterSpellScript(spell_hun_kill_command_pet);

and i've added spell to spell_script_names ofc

Recently Browsing
 
Recently Browsing