Moved PRC8 notes into DevNotes. Updated Eternal Blade TLK to explain abilities better. Updated Werewolf to use "monk" gloves when they exist. Added PRC switch to allow Wildshapes to always merge the arms slot. Clicking on a spell effect now opens the spell effect NUI. (@Rakiov)) Added prc_onplayergui event script for spell effect handling. (@Rakiov) Added prc_nui_sd_event and prc_nui_dur_view to handle displaying spell durations. (@Rakiov) Corrected typo in switch name for PRC_CRAFT_POISON_USE_INGREDIENTS Allowed mindblade to work with Vow of Poverty. Eternal Blade - Island in TIme now has a VFX, looks slightly better. Eternal Blade - Guided Strike now functions. Time Stands Still now has an impact VFX. Added optional PRC_ALLOWED_TO_REMOVE_FRIENDLY_SPELLS and PRC_ALLOWED_TO_SEE_HOSTILE_SPELLS switches for the spell effect view window.
52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: PRC Spell Duration NUI Events
|
|
//:: prc_nui_sd_event
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
This is the logic that handles the events for the Spell Duration NUI
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Rakiov
|
|
//:: Created On: 29.11.2025
|
|
//:://////////////////////////////////////////////
|
|
|
|
#include "prc_nui_lv_inc"
|
|
|
|
void RemoveSpellEffectBySpellID(int spellId, object oPC)
|
|
{
|
|
effect selectedEffect = GetFirstEffect(oPC);
|
|
while (GetIsEffectValid(selectedEffect))
|
|
{
|
|
int selectedSpellId = GetEffectSpellId(selectedEffect);
|
|
if (selectedSpellId == spellId)
|
|
RemoveEffect(oPC, selectedEffect);
|
|
selectedEffect = GetNextEffect(oPC);
|
|
}
|
|
}
|
|
|
|
void main()
|
|
{
|
|
object oPlayer = NuiGetEventPlayer();
|
|
int nToken = NuiGetEventWindow();
|
|
string sEvent = NuiGetEventType();
|
|
string sElement = NuiGetEventElement();
|
|
string sWindowId = NuiGetWindowId(oPlayer, nToken);
|
|
|
|
// Not a mouseup event, nothing to do.
|
|
if (sEvent != "mouseup")
|
|
{
|
|
return;
|
|
}
|
|
|
|
// we clicked a spell circle, set the selected circle to the new one and refresh the window
|
|
if (FindSubString(sElement, NUI_SPELL_DURATION_SPELLID_BASE_CANCEL_BUTTON) >= 0)
|
|
{
|
|
int spellId = StringToInt(RegExpReplace(NUI_SPELL_DURATION_SPELLID_BASE_CANCEL_BUTTON, sElement, ""));
|
|
RemoveSpellEffectBySpellID(spellId, oPlayer);
|
|
SetScriptParam(NUI_DURATION_NO_LOOP_PARAM, "1");
|
|
ExecuteScript("prc_nui_dur_view", oPlayer);
|
|
return;
|
|
}
|
|
}
|
|
|