Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] Would you tell me what that should look like?

[DiscordArchive] Would you tell me what that should look like?

[DiscordArchive] Would you tell me what that should look like?

rektbyfaith
Administrator
0
10-01-2023, 08:58 AM
#1
Archived author: Krutok • Posted: 2023-10-01T08:58:27.213000+00:00
Original source

Would you tell me what that should look like?
rektbyfaith
10-01-2023, 08:58 AM #1

Archived author: Krutok • Posted: 2023-10-01T08:58:27.213000+00:00
Original source

Would you tell me what that should look like?

rektbyfaith
Administrator
0
10-01-2023, 09:18 AM
#2
Archived author: Alistar • Posted: 2023-10-01T09:18:01.750000+00:00
Original source

```c++
case SPELL_EFFECT_APPLY_GLYPH:
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return SPELL_FAILED_BAD_TARGETS;

static constexpr std::array<uint32, 4> uniqueGlyphAuras = { 11111, 22222, 33333 };

uint32 glyphId = spellEffectInfo.MiscValue;
if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyphId))
{
if (m_caster->ToPlayer()->HasAura(gp->SpellID))
return SPELL_FAILED_UNIQUE_GLYPH;

for (const uint32 uniqueAura : uniqueGlyphAuras)
if (m_caster->ToPlayer()->HasAura(uniqueAura))
return SPELL_FAILED_UNIQUE_GLYPH;
}
break;
}
```
a quick and dirty check
rektbyfaith
10-01-2023, 09:18 AM #2

Archived author: Alistar • Posted: 2023-10-01T09:18:01.750000+00:00
Original source

```c++
case SPELL_EFFECT_APPLY_GLYPH:
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return SPELL_FAILED_BAD_TARGETS;

static constexpr std::array<uint32, 4> uniqueGlyphAuras = { 11111, 22222, 33333 };

uint32 glyphId = spellEffectInfo.MiscValue;
if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyphId))
{
if (m_caster->ToPlayer()->HasAura(gp->SpellID))
return SPELL_FAILED_UNIQUE_GLYPH;

for (const uint32 uniqueAura : uniqueGlyphAuras)
if (m_caster->ToPlayer()->HasAura(uniqueAura))
return SPELL_FAILED_UNIQUE_GLYPH;
}
break;
}
```
a quick and dirty check

rektbyfaith
Administrator
0
10-01-2023, 09:22 AM
#3
Archived author: Krutok • Posted: 2023-10-01T09:22:30.843000+00:00
Original source

Thank you. Where does the code have to be inserted? also in unit.cpp?
rektbyfaith
10-01-2023, 09:22 AM #3

Archived author: Krutok • Posted: 2023-10-01T09:22:30.843000+00:00
Original source

Thank you. Where does the code have to be inserted? also in unit.cpp?

rektbyfaith
Administrator
0
10-01-2023, 09:25 AM
#4
Archived author: Alistar • Posted: 2023-10-01T09:25:10.232000+00:00
Original source

if spell.cpp just search for SPELL_EFFECT_APPLY_GLYPH
rektbyfaith
10-01-2023, 09:25 AM #4

Archived author: Alistar • Posted: 2023-10-01T09:25:10.232000+00:00
Original source

if spell.cpp just search for SPELL_EFFECT_APPLY_GLYPH

rektbyfaith
Administrator
0
10-01-2023, 09:28 AM
#5
Archived author: Krutok • Posted: 2023-10-01T09:28:55.369000+00:00
Original source

yeah found it. uniqueGlyphAuras = { 11111, 22222, 33333 }; = my spellID from the DBC file
rektbyfaith
10-01-2023, 09:28 AM #5

Archived author: Krutok • Posted: 2023-10-01T09:28:55.369000+00:00
Original source

yeah found it. uniqueGlyphAuras = { 11111, 22222, 33333 }; = my spellID from the DBC file

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