Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] can you build with windows 11 sdk?

[DiscordArchive] can you build with windows 11 sdk?

[DiscordArchive] can you build with windows 11 sdk?

rektbyfaith
Administrator
0
11-06-2024, 12:15 PM
#1
Archived author: Rencx • Posted: 2024-11-06T12:15:44.016000+00:00
Original source

can you build with windows 11 sdk?
rektbyfaith
11-06-2024, 12:15 PM #1

Archived author: Rencx • Posted: 2024-11-06T12:15:44.016000+00:00
Original source

can you build with windows 11 sdk?

rektbyfaith
Administrator
0
11-06-2024, 01:01 PM
#2
Archived author: blinky • Posted: 2024-11-06T13:01:47.973000+00:00
Original source

Good morning guys. I was wondering if there is someone here more experienced either editing or creating spells. I'm trying to essentially recreate the Omen of Clarity glyph from Wotlk Classic in Azerothcore. I have got as far as creating this but a bit confused how to get it to work or if maybe I'm going about this completely wrong. I also tried looking at spell_druid.cpp but don't even see Faerie Fire in there to maybe just add logic for the clearcasting. ```#include "ScriptMgr.h"
#include "SpellScript.h"
#include "Player.h"
#include "Spell.h"

class spell_faerie_fire_feral : public SpellScriptLoader
{
public:
spell_faerie_fire_feral() : SpellScriptLoader("spell_faerie_fire_feral") { }

class spell_faerie_fire_feral_SpellScript : public SpellScript
{
PrepareSpellScript(spell_faerie_fire_feral_SpellScript);

void HandleOnCast()
{
// Check if the target is an NPC (Unit)
if (Unit* target = GetExplTargetUnit())
{
// Only cast Clearcasting if the target is an NPC
if (target->GetTypeId() == TYPEID_UNIT) // TYPEID_UNIT means NPC
{
if (Unit* caster = GetCaster())
{
// Cast Clearcasting (ID 16870) on the caster
caster->CastSpell(caster, 16870, true);
}
}
}
}

void Register() override
{
OnCast += SpellCastFn(spell_faerie_fire_feral_SpellScript::HandleOnCast);
}
};

SpellScript* GetSpellScript() const override
{
return new spell_faerie_fire_feral_SpellScript();
}
};

// Register the custom script for Faerie Fire (Feral) (ID 16857)
void AddSC_custom_ff()
{
new spell_faerie_fire_feral();
}
```
rektbyfaith
11-06-2024, 01:01 PM #2

Archived author: blinky • Posted: 2024-11-06T13:01:47.973000+00:00
Original source

Good morning guys. I was wondering if there is someone here more experienced either editing or creating spells. I'm trying to essentially recreate the Omen of Clarity glyph from Wotlk Classic in Azerothcore. I have got as far as creating this but a bit confused how to get it to work or if maybe I'm going about this completely wrong. I also tried looking at spell_druid.cpp but don't even see Faerie Fire in there to maybe just add logic for the clearcasting. ```#include "ScriptMgr.h"
#include "SpellScript.h"
#include "Player.h"
#include "Spell.h"

class spell_faerie_fire_feral : public SpellScriptLoader
{
public:
spell_faerie_fire_feral() : SpellScriptLoader("spell_faerie_fire_feral") { }

class spell_faerie_fire_feral_SpellScript : public SpellScript
{
PrepareSpellScript(spell_faerie_fire_feral_SpellScript);

void HandleOnCast()
{
// Check if the target is an NPC (Unit)
if (Unit* target = GetExplTargetUnit())
{
// Only cast Clearcasting if the target is an NPC
if (target->GetTypeId() == TYPEID_UNIT) // TYPEID_UNIT means NPC
{
if (Unit* caster = GetCaster())
{
// Cast Clearcasting (ID 16870) on the caster
caster->CastSpell(caster, 16870, true);
}
}
}
}

void Register() override
{
OnCast += SpellCastFn(spell_faerie_fire_feral_SpellScript::HandleOnCast);
}
};

SpellScript* GetSpellScript() const override
{
return new spell_faerie_fire_feral_SpellScript();
}
};

// Register the custom script for Faerie Fire (Feral) (ID 16857)
void AddSC_custom_ff()
{
new spell_faerie_fire_feral();
}
```

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