const int iType = ITEM_APPR_TYPE_ARMOR_MODEL;
const int iIndex=ITEM_APPR_ARMOR_MODEL_TORSO;
const int CATAGORY_ARMOR = 4;
const int CATAGORY_SHIELD = 3;
int GetBaseAC( object oItem)
{
int nBaseType=GetBaseItemType(oItem);
int nBaseCatagory= StringToInt(Get2DAString("baseitems", "Category",nBaseType));
int BaseAC;
switch( nBaseCatagory)
{
case CATAGORY_SHIELD:
BaseAC= StringToInt(Get2DAString("baseitems", "BaseAC",nBaseType));
break;
case CATAGORY_ARMOR:
{
int nChest = GetItemAppearance(oItem, iType, iIndex );
BaseAC= StringToInt( Get2DAString( "parts_chest","ACBONUS", nChest));
}
}
return BaseAC;
}
Modifié par Lightfoot8, 21 décembre 2013 - 07:03 .