Ok I looked deeply.
First your skin is custom right? cos default vampire skin have resref "nw_creitemvam"
Second, it looks that this function is "private" cos there is no definition and it don't work with custom content which is what you trying to do that. This function is apparently meant only for equpping default horse skin that came with 1.69 and so when it found out there is some skin already it destroys the one being equipped.
So, a workaround for it would be to destroy current PC skin OR if PC have skin already instead of changing it, you can add itemproperties from vampire skin into current one.
The first workaround would be done like this:
object oCurrent = GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC);
if(GetIsObjectValid(oCurrent))
{
DestroyObject(oCurrent);
}
second would need to loop itemproperties in vampire skin, and copy them (and to create it on the ground instead and destroy immediately) or better manually input them via ItemProperty* functions
But really this function is not for what you are trying to do that.
You can try my function but its been a while since I used it so I cannot guarantee it will not mess with default skin (which is not present in my module at all).
//force equip the skin
void ActionForceEquipItem(object oItem, int
nInventorySlot);
void ActionForceEquipItemContinue(object oItem, int nInventorySlot)
{
object oSelf = OBJECT_SELF;
if(GetIsObjectValid(oSelf) && GetIsObjectValid(oItem))
{
if(!GetIdentified(oItem))
{
SetIdentified(oItem,TRUE);
}
if(!GetIsInSlot(nInventorySlot,oItem,oSelf))
{
if(GetLocalObject(oSelf,"ActionForceEquipItem_"+IntToString(nInventorySlot)) == oItem)
{
ClearAllActions();
ActionEquipItem(oItem,nInventorySlot);
DelayCommand(0.1,ActionForceEquipItemContinue(oItem,nInventorySlot));
}
}
else
{
DeleteLocalInt(oItem,"FIRST_TIME");
DeleteLocalInt(oItem,"ActionForceEquipItem");
DeleteLocalObject(oSelf,"ActionForceEquipItem_"+IntToString(nInventorySlot));
}
}
}
void ActionForceEquipItem(object oItem, int nInventorySlot)
{
if(!GetLocalInt(oItem,"ActionForceEquipItem"))
{
SetLocalObject(OBJECT_SELF,"ActionForceEquipItem_"+IntToString(nInventorySlot),oItem);
SetLocalInt(oItem,"ActionForceEquipItem",TRUE);
ActionForceEquipItemContinue(oItem,nInventorySlot);
}
}