2025/08/22 Update

Reverted to 4.56 to track down a bug that started in 4.57.  Bugfixed back to 4.61.
It's amazing the damage that one skipped case statement can do.
This commit is contained in:
Jaysyn904
2025-08-22 17:54:55 -04:00
parent 59b2630adf
commit 246f8d56aa
3624 changed files with 101489 additions and 93263 deletions

View File

@@ -1,5 +1,29 @@
void DestroyAllInventory(object oCreature)
{
object oItem = GetFirstItemInInventory(oCreature);
while (GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oCreature);
}
}
void main()
{
ExecuteScript("prc_npc_death", OBJECT_SELF);
object oDead = OBJECT_SELF;
object oMaster = GetMaster(oDead);
// Only destroy inventory if this creature is summoned
if (GetIsObjectValid(oMaster))
{
int nType = GetAssociateType(oDead);
if (nType == ASSOCIATE_TYPE_SUMMONED)
{
DestroyAllInventory(oDead);
}
}
ExecuteScript("prc_npc_death", OBJECT_SELF);
ExecuteScript("nw_ch_ac7", OBJECT_SELF);
}