Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] Anyone willing to give a helping hand? As I stated somewhere above, the Mirror Image is acting weird

[DiscordArchive] Anyone willing to give a helping hand? As I stated somewhere above, the Mirror Image is acting weird

[DiscordArchive] Anyone willing to give a helping hand? As I stated somewhere above, the Mirror Image is acting weird

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
06-23-2023, 10:34 PM
#1
Archived author: Lucian Tudorache • Posted: 2023-06-23T22:34:57.072000+00:00
Original source

Anyone willing to give a helping hand? As I stated somewhere above, the Mirror Image is acting weird on 3.3.5 TrinityCore - player casting Mirror Image will see afterwards each selection as him (his name, his level etc.), I've found the code:

// 55342 - Mirror Image
class spell_mage_mirror_image : public AuraScript
{
PrepareAuraScript(spell_mage_mirror_image);

bool Validate(SpellInfo const* spellInfo) override
{
return ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_2).TriggerSpell });
}

void PeriodicTick(AuraEffect const* aurEff)
{
// Set name of summons to name of caster
GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, true);
}

void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mage_mirror_image:TongueeriodicTick, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY);
}
};

- As I'm not quite sure what I must be doing here, I guess the GetTarget()->CastSpell is wrong here, it must have the target stored first, right?
rektbyfaith
06-23-2023, 10:34 PM #1

Archived author: Lucian Tudorache • Posted: 2023-06-23T22:34:57.072000+00:00
Original source

Anyone willing to give a helping hand? As I stated somewhere above, the Mirror Image is acting weird on 3.3.5 TrinityCore - player casting Mirror Image will see afterwards each selection as him (his name, his level etc.), I've found the code:

// 55342 - Mirror Image
class spell_mage_mirror_image : public AuraScript
{
PrepareAuraScript(spell_mage_mirror_image);

bool Validate(SpellInfo const* spellInfo) override
{
return ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_2).TriggerSpell });
}

void PeriodicTick(AuraEffect const* aurEff)
{
// Set name of summons to name of caster
GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, true);
}

void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mage_mirror_image:TongueeriodicTick, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY);
}
};

- As I'm not quite sure what I must be doing here, I guess the GetTarget()->CastSpell is wrong here, it must have the target stored first, right?

rektbyfaith
Administrator
0
06-23-2023, 10:57 PM
#2
Archived author: Kiffy • Posted: 2023-06-23T22:57:33.573000+00:00
Original source

really hard to say what the problem is as its probably complicated, but just that script seems to be a periodic cast of the effects triggerspell argument. would you be able to record the problem? I havent encountered it myself, just wondering
rektbyfaith
06-23-2023, 10:57 PM #2

Archived author: Kiffy • Posted: 2023-06-23T22:57:33.573000+00:00
Original source

really hard to say what the problem is as its probably complicated, but just that script seems to be a periodic cast of the effects triggerspell argument. would you be able to record the problem? I havent encountered it myself, just wondering

rektbyfaith
Administrator
0
06-23-2023, 11:00 PM
#3
Archived author: Lucian Tudorache • Posted: 2023-06-23T23:00:52.089000+00:00
Original source

Seems like exactly that line of code is making it happen "GetTarget"
rektbyfaith
06-23-2023, 11:00 PM #3

Archived author: Lucian Tudorache • Posted: 2023-06-23T23:00:52.089000+00:00
Original source

Seems like exactly that line of code is making it happen "GetTarget"

rektbyfaith
Administrator
0
06-23-2023, 11:01 PM
#4
Archived author: Lucian Tudorache • Posted: 2023-06-23T23:01:15.268000+00:00
Original source

Try to cast it and select any NPC
rektbyfaith
06-23-2023, 11:01 PM #4

Archived author: Lucian Tudorache • Posted: 2023-06-23T23:01:15.268000+00:00
Original source

Try to cast it and select any NPC

rektbyfaith
Administrator
0
06-23-2023, 11:01 PM
#5
Archived author: Lucian Tudorache • Posted: 2023-06-23T23:01:34.409000+00:00
Original source

It shouldn't have your name...
rektbyfaith
06-23-2023, 11:01 PM #5

Archived author: Lucian Tudorache • Posted: 2023-06-23T23:01:34.409000+00:00
Original source

It shouldn't have your name...

rektbyfaith
Administrator
0
06-23-2023, 11:02 PM
#6
Archived author: Lucian Tudorache • Posted: 2023-06-23T23:02:48.088000+00:00
Original source

I can't send videos here zzz
rektbyfaith
06-23-2023, 11:02 PM #6

Archived author: Lucian Tudorache • Posted: 2023-06-23T23:02:48.088000+00:00
Original source

I can't send videos here zzz

rektbyfaith
Administrator
0
06-23-2023, 11:03 PM
#7
Archived author: Kiffy • Posted: 2023-06-23T23:03:21.279000+00:00
Original source

doesnt have my name, no
rektbyfaith
06-23-2023, 11:03 PM #7

Archived author: Kiffy • Posted: 2023-06-23T23:03:21.279000+00:00
Original source

doesnt have my name, no

rektbyfaith
Administrator
0
06-23-2023, 11:04 PM
#8
Archived author: Lucian Tudorache • Posted: 2023-06-23T23:04:07.856000+00:00
Original source

Can you share your code from spell_mages.cpp?
rektbyfaith
06-23-2023, 11:04 PM #8

Archived author: Lucian Tudorache • Posted: 2023-06-23T23:04:07.856000+00:00
Original source

Can you share your code from spell_mages.cpp?

rektbyfaith
Administrator
0
06-23-2023, 11:04 PM
#9
Archived author: Lucian Tudorache • Posted: 2023-06-23T23:04:15.901000+00:00
Original source

Very curious
rektbyfaith
06-23-2023, 11:04 PM #9

Archived author: Lucian Tudorache • Posted: 2023-06-23T23:04:15.901000+00:00
Original source

Very curious

rektbyfaith
Administrator
0
06-23-2023, 11:05 PM
#10
Archived author: Kiffy • Posted: 2023-06-23T23:05:08.434000+00:00
Original source

its the exact same to me
rektbyfaith
06-23-2023, 11:05 PM #10

Archived author: Kiffy • Posted: 2023-06-23T23:05:08.434000+00:00
Original source

its the exact same to me

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