This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Caedes

Pages: [1]
1
Serverside Modding / Passive Spell Scripting
« on: August 23, 2017, 04:28:00 pm »
Hey, I'm trying to script Twist of Fate on the 'newest' Trinity 6.2.4 core (took the last source before they merged legion into 6.x) and my hook doesn't seem to work.
Code: [Select]
class spell_pri_twist_of_fate_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pri_twist_of_fate_AuraScript);

bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_TWIST_OF_FATE))
return false;
return true;
}

bool CheckProc(ProcEventInfo& eventInfo)
{
sWorld->SendServerMessage(SERVER_MSG_STRING, "bool CheckProc got called.");
if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
if (eventInfo.GetActionTarget()->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellInfo, eventInfo.GetActor()))
sWorld->SendServerMessage(SERVER_MSG_STRING, "'If' returns true.");
return true;
sWorld->SendServerMessage(SERVER_MSG_STRING, "'If' returns false.");
return false;
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_pri_twist_of_fate_AuraScript::CheckProc);
}

The spell gets called by 109.142 (that's the Twist of Fate passive you get from choosing the talent) in the DB and I checked the number & script name a hundred times already. None of the server messages are sent when used and the passive procs the healing bonus whenever I heal without checking the health of my target (which is also how it works when I completely remove the script).

What I've tried to do to fix this:
- I've tried changing hooks (from DoCheckProc to OnEffectProc and others), but the script still doesn't get called. I've also made sure that the core doesn't 'unapply' the script on loading due to faulty dbc data by checking the server log output.
- There also don't seem to be any warnings while compiling.

Pages: [1]