#include "mk_inc_generic" #include "mk_inc_version" #include "mk_inc_iaam" #include "mk_inc_craft" #include "mk_inc_states" int StartingConditional() { object oPC = GetPCSpeaker(); object oTarget = MK_GetCurrentTarget(oPC); // int nDisableEEFeatures = MK_INIT_GetAreEEFeaturesDisabled(); int nVersion_GE_1_74 = MK_VERSION_GetIsVersionGreaterEqual_1_74(oPC); int nPerPartColoring = GetLocalInt(oPC, MK_PERPARTCOLORING); object oItem; switch (MK_GenericDialog_GetState(TRUE)) { case MK_STATE_COLOR: { int nColor = MK_GenericDialog_GetAction(); int nNumberOfColorsPerGroup = GetLocalInt(oPC, "MK_NUMBER_OF_COLORS_PER_GROUP"); if ((nColor>=0) && (nColor=0) { object oSourceItem = MK_GenericDialog_GetObject(nItem); if (GetIsObjectValid(oSourceItem)) { oItem = CIGetCurrentModItem(oPC); int bMirrorUpdateDeactivated = FALSE; if (MK_GetUpdateMirror(oPC)) { bMirrorUpdateDeactivated=TRUE; MK_DeactivateMirrorUpdate(oTarget, oPC, TRUE); } oItem = MK_CopyColor(oItem, oSourceItem, nVersion_GE_1_74); CISetCurrentModItem(oPC,oItem); if (bMirrorUpdateDeactivated) { MK_DeactivateMirrorUpdate(oTarget, oPC, FALSE); } else { MK_EquipModifiedItem(oTarget, oPC); } } } } break; case MK_STATE_SELECTPART: { int nPart = MK_GenericDialog_GetAction(); if ((nPart>=0) && (nPart=0) { int nValue = MK_GetIsPerPartColored(oItem, ITEM_APPR_TYPE_ARMOR_COLOR, -1, nCurrentModPart); MK_GenericDialog_SetCondition(252, nValue); } else { MK_GenericDialog_SetCondition(252, FALSE); } MK_GenericDialog_SetCondition(250, TRUE); MK_GenericDialog_SetCondition(255, nPerPartColoring); } break; } default: SetCustomToken(14421,""); break; } return TRUE; }