Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] I need have a spell script do this case?

[DiscordArchive] I need have a spell script do this case?

[DiscordArchive] I need have a spell script do this case?

rektbyfaith
Administrator
0
01-26-2024, 03:38 PM
#1
Archived author: JORGIE • Posted: 2024-01-26T15:38:40.831000+00:00
Original source

I need have a spell script do this case?
rektbyfaith
01-26-2024, 03:38 PM #1

Archived author: JORGIE • Posted: 2024-01-26T15:38:40.831000+00:00
Original source

I need have a spell script do this case?

rektbyfaith
Administrator
0
01-26-2024, 03:47 PM
#2
Archived author: JORGIE • Posted: 2024-01-26T15:47:42.177000+00:00
Original source


[Image: 1706284031314.png?ex=690c1a5e&is=690ac8d...31bc02bb5&]
rektbyfaith
01-26-2024, 03:47 PM #2

Archived author: JORGIE • Posted: 2024-01-26T15:47:42.177000+00:00
Original source


[Image: 1706284031314.png?ex=690c1a5e&is=690ac8d...31bc02bb5&]

rektbyfaith
Administrator
0
01-26-2024, 03:52 PM
#3
Archived author: JORGIE • Posted: 2024-01-26T15:52:30.819000+00:00
Original source

You guys are so familiar with this. do you give me a best solution to fix this.
rektbyfaith
01-26-2024, 03:52 PM #3

Archived author: JORGIE • Posted: 2024-01-26T15:52:30.819000+00:00
Original source

You guys are so familiar with this. do you give me a best solution to fix this.

rektbyfaith
Administrator
0
01-26-2024, 04:03 PM
#4
Archived author: JORGIE • Posted: 2024-01-26T16:03:38.431000+00:00
Original source

```c++

// Heroic Leap
ApplySpellFix({ 52174 }, [](SpellInfo* spellInfo)
{
spellInfo->_visuals.clear();
spellInfo->_visuals.push_back(sSpellXSpellVisualStore.LookupEntry(25530));
spellInfo->_visuals.push_back(sSpellXSpellVisualStore.LookupEntry(109554));
});

```
rektbyfaith
01-26-2024, 04:03 PM #4

Archived author: JORGIE • Posted: 2024-01-26T16:03:38.431000+00:00
Original source

```c++

// Heroic Leap
ApplySpellFix({ 52174 }, [](SpellInfo* spellInfo)
{
spellInfo->_visuals.clear();
spellInfo->_visuals.push_back(sSpellXSpellVisualStore.LookupEntry(25530));
spellInfo->_visuals.push_back(sSpellXSpellVisualStore.LookupEntry(109554));
});

```

rektbyfaith
Administrator
0
01-26-2024, 04:06 PM
#5
Archived author: JORGIE • Posted: 2024-01-26T16:06:54.574000+00:00
Original source

So, I thank this is a best way to fix the heroic leap. as you mention, visual 109554 has a condition that requires player to have spell 228378. It will match the player condidtion automatic choose the correct visual
rektbyfaith
01-26-2024, 04:06 PM #5

Archived author: JORGIE • Posted: 2024-01-26T16:06:54.574000+00:00
Original source

So, I thank this is a best way to fix the heroic leap. as you mention, visual 109554 has a condition that requires player to have spell 228378. It will match the player condidtion automatic choose the correct visual

rektbyfaith
Administrator
0
01-26-2024, 04:10 PM
#6
Archived author: JORGIE • Posted: 2024-01-26T16:10:55.393000+00:00
Original source

```c++

uint32 SpellInfo::GetSpellXSpellVisualId(WorldObject const* caster /*= nullptr*/, WorldObject const* viewer /*= nullptr*/) const
{
for (SpellXSpellVisualEntry const* visual : _visuals)
{
if (PlayerConditionEntry const* playerCondition = sPlayerConditionStore.LookupEntry(visual->CasterPlayerConditionID))
if (!caster || !caster->IsPlayer() || !ConditionMgr::IsPlayerMeetingCondition(caster->ToPlayer(), playerCondition))
continue;

if (UnitConditionEntry const* unitCondition = sUnitConditionStore.LookupEntry(visual->CasterUnitConditionID))
if (!caster || !caster->IsUnit() || !ConditionMgr::IsUnitMeetingCondition(caster->ToUnit(), Object::ToUnit(viewer), unitCondition))
continue;

return visual->ID;
}
return 0;
}
```
rektbyfaith
01-26-2024, 04:10 PM #6

Archived author: JORGIE • Posted: 2024-01-26T16:10:55.393000+00:00
Original source

```c++

uint32 SpellInfo::GetSpellXSpellVisualId(WorldObject const* caster /*= nullptr*/, WorldObject const* viewer /*= nullptr*/) const
{
for (SpellXSpellVisualEntry const* visual : _visuals)
{
if (PlayerConditionEntry const* playerCondition = sPlayerConditionStore.LookupEntry(visual->CasterPlayerConditionID))
if (!caster || !caster->IsPlayer() || !ConditionMgr::IsPlayerMeetingCondition(caster->ToPlayer(), playerCondition))
continue;

if (UnitConditionEntry const* unitCondition = sUnitConditionStore.LookupEntry(visual->CasterUnitConditionID))
if (!caster || !caster->IsUnit() || !ConditionMgr::IsUnitMeetingCondition(caster->ToUnit(), Object::ToUnit(viewer), unitCondition))
continue;

return visual->ID;
}
return 0;
}
```

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