[DiscordArchive] Would you tell me what that should look like?
[DiscordArchive] Would you tell me what that should look like?
Archived author: Krutok • Posted: 2023-10-01T08:58:27.213000+00:00
Original source
Would you tell me what that should look like?
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
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?
Archived author: Alistar • Posted: 2023-10-01T09:25:10.232000+00:00
Original source
if spell.cpp just search for SPELL_EFFECT_APPLY_GLYPH
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