Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] SMART_EVENT_SPELLHIT_TARGET ?

[DiscordArchive] SMART_EVENT_SPELLHIT_TARGET ?

[DiscordArchive] SMART_EVENT_SPELLHIT_TARGET ?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
12-11-2023, 07:57 PM
#1
Archived author: Meji • Posted: 2023-12-11T19:57:30.481000+00:00
Original source

SMART_EVENT_SPELLHIT_TARGET ?
rektbyfaith
12-11-2023, 07:57 PM #1

Archived author: Meji • Posted: 2023-12-11T19:57:30.481000+00:00
Original source

SMART_EVENT_SPELLHIT_TARGET ?

rektbyfaith
Administrator
0
12-11-2023, 08:03 PM
#2
Archived author: M'Dic • Posted: 2023-12-11T20:03:07.067000+00:00
Original source

ill see if that will point me in the right direction
rektbyfaith
12-11-2023, 08:03 PM #2

Archived author: M'Dic • Posted: 2023-12-11T20:03:07.067000+00:00
Original source

ill see if that will point me in the right direction

rektbyfaith
Administrator
0
12-11-2023, 08:13 PM
#3
Archived author: M'Dic • Posted: 2023-12-11T20:13:35.062000+00:00
Original source

so the reason for asking is the crashing we are getting at this part when the spell is cast. We need it to play a conversation on spell cast.
```cpp
// Spell 320605
class spell_knockback_charge_enhanced_training : public SpellScript
{
void HandleEffect(SpellEffIndex effIndex)
{
// Not working
PreventHitDefaultEffect(effIndex);

Creature* caster = GetCaster()->ToCreature();
if (!caster)
return;

Player* player = GetHitUnit()->ToPlayer();
if (!player)
return;

// Crashes core
Conversation* conversation = Conversation::CreateConversation(GetSpellInfo()->GetEffect(effIndex).MiscValue, player, *player, player->GetGUID(), nullptr, false);
conversation->AddActor(ACTOR_ID_ALLIANCE_ENHANCED_TRAINING, 0, player->GetTeam() == ALLIANCE ? caster->GetGUID() : ObjectGuid::Empty);
conversation->AddActor(ACTOR_ID_HORDE_ENHANCED_TRAINING, 1, player->GetTeam() == ALLIANCE ? ObjectGuid::Empty : caster->GetGUID());
conversation->Start();
}

void Register() override
{
OnEffectLaunch += SpellEffectFn(spell_knockback_charge_enhanced_training::HandleEffect, EFFECT_1, SPELL_EFFECT_CREATE_PRIVATE_CONVERSATION);
}
};
```
rektbyfaith
12-11-2023, 08:13 PM #3

Archived author: M'Dic • Posted: 2023-12-11T20:13:35.062000+00:00
Original source

so the reason for asking is the crashing we are getting at this part when the spell is cast. We need it to play a conversation on spell cast.
```cpp
// Spell 320605
class spell_knockback_charge_enhanced_training : public SpellScript
{
void HandleEffect(SpellEffIndex effIndex)
{
// Not working
PreventHitDefaultEffect(effIndex);

Creature* caster = GetCaster()->ToCreature();
if (!caster)
return;

Player* player = GetHitUnit()->ToPlayer();
if (!player)
return;

// Crashes core
Conversation* conversation = Conversation::CreateConversation(GetSpellInfo()->GetEffect(effIndex).MiscValue, player, *player, player->GetGUID(), nullptr, false);
conversation->AddActor(ACTOR_ID_ALLIANCE_ENHANCED_TRAINING, 0, player->GetTeam() == ALLIANCE ? caster->GetGUID() : ObjectGuid::Empty);
conversation->AddActor(ACTOR_ID_HORDE_ENHANCED_TRAINING, 1, player->GetTeam() == ALLIANCE ? ObjectGuid::Empty : caster->GetGUID());
conversation->Start();
}

void Register() override
{
OnEffectLaunch += SpellEffectFn(spell_knockback_charge_enhanced_training::HandleEffect, EFFECT_1, SPELL_EFFECT_CREATE_PRIVATE_CONVERSATION);
}
};
```

rektbyfaith
Administrator
0
12-11-2023, 08:14 PM
#4
Archived author: M'Dic • Posted: 2023-12-11T20:14:02.342000+00:00
Original source

unless we are missing some sort of null check or if we are writing it out wrong.
rektbyfaith
12-11-2023, 08:14 PM #4

Archived author: M'Dic • Posted: 2023-12-11T20:14:02.342000+00:00
Original source

unless we are missing some sort of null check or if we are writing it out wrong.

rektbyfaith
Administrator
0
12-11-2023, 08:15 PM
#5
Archived author: candp1225 • Posted: 2023-12-11T20:15:59.039000+00:00
Original source

Thank you so much for the help, everything is working now
rektbyfaith
12-11-2023, 08:15 PM #5

Archived author: candp1225 • Posted: 2023-12-11T20:15:59.039000+00:00
Original source

Thank you so much for the help, everything is working now

rektbyfaith
Administrator
0
12-11-2023, 09:02 PM
#6
Archived author: Kelpie • Posted: 2023-12-11T21:02:26.829000+00:00
Original source

this isn't true...I'm using domain name and it's working fine
rektbyfaith
12-11-2023, 09:02 PM #6

Archived author: Kelpie • Posted: 2023-12-11T21:02:26.829000+00:00
Original source

this isn't true...I'm using domain name and it's working fine

rektbyfaith
Administrator
0
12-11-2023, 09:03 PM
#7
Archived author: Kelpie • Posted: 2023-12-11T21:03:07.098000+00:00
Original source

I remember that used to be an issue way back in the day, but that hasn't been an issue since I started using tc again in the past year
rektbyfaith
12-11-2023, 09:03 PM #7

Archived author: Kelpie • Posted: 2023-12-11T21:03:07.098000+00:00
Original source

I remember that used to be an issue way back in the day, but that hasn't been an issue since I started using tc again in the past year

rektbyfaith
Administrator
0
12-11-2023, 09:08 PM
#8
Archived author: Kelpie • Posted: 2023-12-11T21:08:39.824000+00:00
Original source

like far be it from me to question your knowledge of the system, just saying, it's been tested, and it works fine, and I've even helped others get their servers up the same way
rektbyfaith
12-11-2023, 09:08 PM #8

Archived author: Kelpie • Posted: 2023-12-11T21:08:39.824000+00:00
Original source

like far be it from me to question your knowledge of the system, just saying, it's been tested, and it works fine, and I've even helped others get their servers up the same way

rektbyfaith
Administrator
0
12-11-2023, 09:09 PM
#9
Archived author: Tea • Posted: 2023-12-11T21:09:44.123000+00:00
Original source

its easier to tell people that way, some people have weird configurations where a domain name resolves to local address in their network (this is bad because data from realmlist is resolved on the server)
rektbyfaith
12-11-2023, 09:09 PM #9

Archived author: Tea • Posted: 2023-12-11T21:09:44.123000+00:00
Original source

its easier to tell people that way, some people have weird configurations where a domain name resolves to local address in their network (this is bad because data from realmlist is resolved on the server)

rektbyfaith
Administrator
0
12-11-2023, 09:09 PM
#10
Archived author: Kelpie • Posted: 2023-12-11T21:09:58.936000+00:00
Original source

Oh yes, with NATs and stuff, yes
rektbyfaith
12-11-2023, 09:09 PM #10

Archived author: Kelpie • Posted: 2023-12-11T21:09:58.936000+00:00
Original source

Oh yes, with NATs and stuff, yes

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)