46 lines
1.8 KiB
Plaintext
46 lines
1.8 KiB
Plaintext
#include "x2_inc_itemprop"
|
|
void main()
|
|
{
|
|
object oPC = GetPCSpeaker();
|
|
//Place any items in the main hand or the off-hand in the inventory
|
|
object oCopied;
|
|
int nCursed;
|
|
if (GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC) != OBJECT_INVALID)
|
|
{
|
|
nCursed = GetItemCursedFlag(GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC));
|
|
oCopied = CopyItem(GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC), oPC, TRUE);
|
|
if (oCopied != OBJECT_INVALID) DestroyObject(GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC));
|
|
if (nCursed == TRUE) SetItemCursedFlag(oCopied, TRUE);
|
|
nCursed = FALSE;
|
|
}
|
|
if (GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC) != OBJECT_INVALID)
|
|
{
|
|
nCursed = GetItemCursedFlag(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC));
|
|
oCopied = CopyItem(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC), oPC, TRUE);
|
|
if (oCopied != OBJECT_INVALID) DestroyObject(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC));
|
|
if (nCursed == TRUE) SetItemCursedFlag(oCopied, TRUE);
|
|
nCursed = FALSE;
|
|
}
|
|
//The end of this chunk of code
|
|
|
|
object oItem = GetFirstItemInInventory(oPC);
|
|
int nCheck;
|
|
while (GetIsObjectValid(oItem))
|
|
{
|
|
if (GetLocalInt(oItem, "Prototype") == TRUE)
|
|
{
|
|
nCheck = GetItemHasItemProperty(oItem, ITEM_PROPERTY_USE_LIMITATION_RACIAL_TYPE);
|
|
IPRemoveAllItemProperties(oItem, DURATION_TYPE_TEMPORARY);
|
|
IPRemoveAllItemProperties(oItem, DURATION_TYPE_PERMANENT);
|
|
if (nCheck == TRUE)
|
|
{
|
|
itemproperty ipAdd;
|
|
ipAdd = ItemPropertyLimitUseByRace(RACIAL_TYPE_OOZE);
|
|
IPSafeAddItemProperty(oItem, ipAdd);
|
|
}
|
|
return;
|
|
}
|
|
oItem = GetNextItemInInventory(oPC);
|
|
}
|
|
}
|