2025/12/23 Update

Hooked up new GUI module event.
Updated PRC8 includes.
Full compile.
This commit is contained in:
Jaysyn904
2025-12-23 14:19:54 -05:00
parent c41f664b12
commit d66eb5bcfd
82 changed files with 4467 additions and 518 deletions

View File

@@ -1,6 +1,6 @@
//::///////////////////////////////////////////////
//:: Weapon Restriction System Include
//:: prc_inc_restwpn.nss
//:: prc_inc_wpnrest.nss
//::///////////////////////////////////////////////
/*
Functions to support PnP Weapon Proficiency and
@@ -15,6 +15,56 @@
#include "inc_item_props"
#include "prc_x2_itemprop"
//:: Detects if "monk" gloves are being equipped & set a
//:: variable if TRUE for use with other functions
void DetectMonkGloveEquip(object oItem)
{
int nItemType = GetBaseItemType(oItem);
object oPC = GetItemPossessor(oItem);
if (!GetIsObjectValid(oItem))
{
if (DEBUG) DoDebug("prc_inc_wpnrest >> DetectMonkGloveEquip(): Unable to determine item possessor");
return;
}
if(nItemType != BASE_ITEM_GLOVES && nItemType != BASE_ITEM_BRACER) {return;}
else if (nItemType == BASE_ITEM_BRACER)
{
if(DEBUG) DoDebug("prc_inc_wpnrest >> DetectMonkGloveEquip(): Bracer found!");
DeleteLocalInt(oPC, "WEARING_MONK_GLOVES");
return;
}
else
{
itemproperty ipG = GetFirstItemProperty(oItem);
while(GetIsItemPropertyValid(ipG))
{
int nTypeG = GetItemPropertyType(ipG);
// Damage related properties we care about
if(nTypeG == ITEM_PROPERTY_DAMAGE_BONUS
|| nTypeG == ITEM_PROPERTY_ATTACK_BONUS
|| nTypeG == ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP
|| nTypeG == ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP
|| nTypeG == ITEM_PROPERTY_DAMAGE_BONUS_VS_SPECIFIC_ALIGNMENT)
{
if(DEBUG) DoDebug("prc_inc_wpnrest >> DetectMonkGloves(): Monk gloves found!");
SetLocalInt(oPC, "WEARING_MONK_GLOVES", 1);
return;
}
else
{
if(DEBUG) DoDebug("prc_inc_wpnrest >> DetectMonkGloves(): Monk gloves not found! You should never see this.");
DeleteLocalInt(oPC, "WEARING_MONK_GLOVES");
return;
}
}
}
}
/**
* All of the following functions use the following parameters:
*
@@ -23,6 +73,69 @@
* @param nHand The hand the weapon is wielded in. In the form of
* ATTACK_BONUS_ONHAND or ATTACK_BONUS_OFFHAND.
*/
//:: returns TRUE if the wielded weapon works with the Swashbuckler's class abilities.
int GetHasSwashbucklerWeapon(object oPC)
{
object oWeap = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
if (!GetIsObjectValid(oWeap)) return FALSE;
int nType = GetBaseItemType(oWeap);
switch (nType)
{
case BASE_ITEM_DAGGER:
case BASE_ITEM_KATAR:
case BASE_ITEM_HANDAXE:
case BASE_ITEM_KAMA:
case BASE_ITEM_KUKRI:
case BASE_ITEM_LIGHTHAMMER:
case BASE_ITEM_LIGHTMACE:
case BASE_ITEM_LIGHT_PICK:
case BASE_ITEM_RAPIER:
case BASE_ITEM_SHORTSWORD:
case BASE_ITEM_SICKLE:
case BASE_ITEM_WHIP:
case BASE_ITEM_SAI:
case BASE_ITEM_SAP:
case BASE_ITEM_NUNCHAKU:
case BASE_ITEM_GOAD:
case BASE_ITEM_ELVEN_LIGHTBLADE:
case BASE_ITEM_ELVEN_THINBLADE:
case BASE_ITEM_EAGLE_CLAW:
return TRUE;
}
// Iaijutsu Master allows katana
if (GetLevelByClass(CLASS_TYPE_IAIJUTSU_MASTER, oPC) > 0)
{
if (nType == BASE_ITEM_KATANA) return TRUE;
}
return FALSE;
}
//:: returns TRUE if the wielded weapon works with the Champion of Corellon's Elegant Strike.
int GetHasCorellonWeapon(object oPC)
{
object oWeap = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
if (!GetIsObjectValid(oWeap)) return FALSE;
int nType = GetBaseItemType(oWeap);
switch (nType)
{
case BASE_ITEM_SCIMITAR:
case BASE_ITEM_LONGSWORD:
case BASE_ITEM_RAPIER:
case BASE_ITEM_ELVEN_COURTBLADE:
case BASE_ITEM_ELVEN_LIGHTBLADE:
case BASE_ITEM_ELVEN_THINBLADE:
return TRUE;
}
return FALSE;
}
void DoRacialEquip(object oPC, int nBaseType);
//return if PC has proficiency in an item
@@ -763,6 +876,7 @@ int IsMeleeWeapon(int nBaseItemType)
case BASE_ITEM_CLOAK:
case BASE_ITEM_CRAFTED_ROD:
case BASE_ITEM_CRAFTED_STAFF:
case BASE_ITEM_CRAFTED_SCEPTER:
case BASE_ITEM_CRAFTMATERIALMED:
case BASE_ITEM_CRAFTMATERIALSML:
case BASE_ITEM_CREATUREITEM: