Gift of the Harvester

Hi all,

I’m trying to Fix the spell (Gift of the harvester) http://www.wowhead.com/item=39253.

The problem is that It keeps spawning ghouls and ghosts for 20 seconds(I timed it and wowhead agrees)see http://www.wowhead.com/spell=52482

I cannot find the part of code that handles this spawning for 20 seconds It somehow needs to be limited to one spawn.

This will be my first attempt to modify the core so please help me if i’m wrong.

i’m using TrinityCore Rev: 11765+ Release Hash: 8d1cb7fb3481+ (Win64, little-endian)

it would be nice if someone would find the commit that messed it up so it will be easier to fix it, it was a commit made in the last 2 weeks or so.

I looked here http://www.trinitycore.org/t/trinitycore/timeline?from=05%2F01%2F11&daysback=24&authors=&changeset=on&update=Update It goes 24 days back, I didn’t see anything that could break it.

In the core I found 2 places where some work on this spell is done

SpellMgr.cpp


            case 52479: // Gift of the Harvester

            spellInfo->MaxAffectedTargets = 1;

            // a trap always has dst = src?

            spellInfo->EffectImplicitTargetA[0] = TARGET_DST_CASTER;

            spellInfo->EffectImplicitTargetA[1] = TARGET_DST_CASTER;

            ++count;

            break;

and SpellEffects.cpp


                    case 52479: // Gift of the Harvester

                    if (unitTarget && m_originalCaster)

                        m_originalCaster->CastSpell(unitTarget, urand(0, 1) ? damage : 52505, true);

                    return;

Someone have information of this?? I already try to find which is wrong and i can’t find it

(yes I like to share & help)

When I was testing, I found that some miners only spawned one, while others spawned almost continuously…

I have also encountered this phenomenon

I have now found that there are 3 types of scarlet miners, A alive one (entry 28822), another alive one (entry 28819) and a Dead one (entry 28891). What the purpose of this is I am yet to discover

The scarlet Miners with the Entry 28819 works Perfectly. No they don’t

I noticed that you can stop the spam spawning if you do a really strong area attack.

Quest needs to be rescripted. It’s a big shitty hack atm

where is the script for this ? I doubt a database script can be a hack, so it must be implemented somewhere in the code. I would like to start helping so that I can learn C++ and Trinity. Can you tell me where its script is, I would like to look at it.

Script is in scripts\EasternKingdoms\ScarletEnclave\chapter1.cpp

Also some lines for 52479 in SpellMgr.cpp seems pretty bad.

Ok but the quest actually works, we need to fix the spell that is not working.

I don’t think the code in the spellmgr is the problem, somewhere the spell gets stuck in a loop for exactly 20 seconds.

It has worked fine for over a year, and, suddenly broke when some change was made in the last couple of weeks.

https://github.com/TrinityCore/TrinityCore/commit/5f4337f7e9e11b7992a39a88969ba9f4502d00dc

Gameobject 190769 got type=0.

Sure, the hack was working. Just saying that we might as well script it properly for once.

Shouldn’t setting the trap to type 2 fix the problem ? after all it probably does need to go away after casting its spell. Or is that type a DBC value ?

That field (like all dataX field) come from sniff / WDB.

While I agree that this quest does need to be re-scripted, the fix that was pushed that made proper use of the type field for traps revealed that we were not handling cooldown properly. If a trap casts a spell that has no cooldown and is type 0, then the GO needs to handle the cooldown.

Should be fixed after this: https://github.com/TrinityCore/TrinityCore/commit/f4a29646a59c8e84672c0f1eedcc8fab01883266

– Brian

It still Spams, It works right 2/3 times for me. tested it on npc 28819. Something strange is going on somewhere. I think part of the reason it still spams is because the spell the the go 190769 casts(52479) has no cooldown( I could not verify this since i don’t have a DBC reader.)

You are correct, the spell has no cooldown, that is why the cooldown must be handled by the GO (hence the cooldown field). It checks the cooldown and won’t cast the spell again unless the timer is up.

So, I don’t get how it can work 2/3 times for you… It should either work (and have a 10 second cooldown for the spell – and since the spell has a duration of 20 seconds the max number of spawns should be 2), or it shouldn’t work at all…

– Brian

paradox has also seen this happen, I’m not the only one.