Shillelagh fix, Eldritch Knight fix
Shillelagh fix, Eldritch Knight fix
This commit is contained in:
@@ -346,14 +346,44 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
fDuration = HoursToSeconds(nDuration);
|
||||
break;
|
||||
}
|
||||
case SPELL_SHILLELAGH:
|
||||
|
||||
case SPELL_SHILLELAGH:
|
||||
{
|
||||
int nBaseItemType = GetBaseItemType(oMyWeapon);
|
||||
|
||||
if (nBaseItemType == BASE_ITEM_QUARTERSTAFF && !GetIsMagicItem(oMyWeapon))
|
||||
{
|
||||
// Execute the code for non-magical quarterstaff here
|
||||
|
||||
bCondition = bCondition && TRUE; // Update the condition as needed
|
||||
fDuration = TurnsToSeconds(nDuration);
|
||||
}
|
||||
else if (nBaseItemType == BASE_ITEM_CLUB && !GetIsMagicItem(oMyWeapon))
|
||||
{
|
||||
// Execute the code for non-magical club here
|
||||
|
||||
bCondition = bCondition && TRUE; // Update the condition as needed
|
||||
fDuration = TurnsToSeconds(nDuration);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Invalid weapon type, do nothing or handle the error here
|
||||
|
||||
bCondition = bCondition && FALSE; // Update the condition as needed
|
||||
fDuration = 0.0; // Update the duration as needed
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/* case SPELL_SHILLELAGH:
|
||||
{
|
||||
bCondition = bCondition && ((GetBaseItemType(oMyWeapon) == BASE_ITEM_QUARTERSTAFF) ||
|
||||
(GetBaseItemType(oMyWeapon) == BASE_ITEM_CLUB)) &&
|
||||
!GetIsMagicItem(oMyWeapon);
|
||||
fDuration = TurnsToSeconds(nDuration);
|
||||
break;
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
if(bCondition)
|
||||
|
Reference in New Issue
Block a user