37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
#include "prc_inc_skin"
|
|
|
|
// FILE: rts_inc_feats
|
|
void GiveFeat(object oCreature, int nFeatIP,int bShow=TRUE);
|
|
|
|
// FILE: rts_inc_feats
|
|
void RemoveFeat(object oCreature, int nFeatIP);
|
|
|
|
|
|
void GiveFeat(object oCreature, int nFeatIP,int bShow=TRUE)
|
|
{
|
|
//object oSkin = GetItemInSlot(INVENTORY_SLOT_CARMOUR,oCreature);
|
|
object oSkin = GetPCSkin(oCreature);
|
|
string sTitle=Get2DAString("iprp_feats","Label",nFeatIP);
|
|
if (bShow) SendMessageToPC(oCreature,"Feat added("+IntToString(nFeatIP)+"): '"+sTitle+"'");
|
|
AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyBonusFeat(nFeatIP), oSkin);
|
|
}
|
|
|
|
void RemoveFeat(object oCreature, int nFeatIP)
|
|
{
|
|
//object oSkin = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oCreature);
|
|
object oSkin = GetPCSkin(oCreature);
|
|
itemproperty ipX = GetFirstItemProperty(oSkin);
|
|
while (GetIsItemPropertyValid(ipX))
|
|
{
|
|
if (GetItemPropertyType(ipX) == ITEM_PROPERTY_BONUS_FEAT)
|
|
if(GetItemPropertySubType(ipX) == nFeatIP)
|
|
{
|
|
RemoveItemProperty(oSkin, ipX);
|
|
break;
|
|
}
|
|
ipX = GetNextItemProperty(oSkin);
|
|
}
|
|
}
|
|
|
|
//void main(){}
|