12-19-2014, 01:06 AM
How about this:
Quote:Define this function somewhere, it tests to see if a property is already exisistant on an item:
int IsImprovement( object oTarget, int improv_ipType){
int Mods = IPGetNumberOfItemProperties(oTarget);
itemproperty ip = GetFirstItemProperty(oTarget);
int ipType;
while(GetIsItemPropertyValid(ip)){
ipType = GetItemPropertyType(ip);
if ( improv_ipType == ipType ){
return 1;
}
ip = GetNextItemProperty(oTarget);
}
return 0;
}
// Somewhere in the forging process, there should be a call to IsModMax to determine if an item has room for the forging. Replace this call with:
if( IsImprovement( oTarget, improv_iptype) ){
// it's a valid forging, continue
//....
//...
//..
}
else{
if( IsModMax (oTarget) ){
//failed, reject the forging, per earlier
}
else{
// room on item to be applied
}
}
Currently Playing:
Galambos Thrune - Griffon Knight
Archibold Vanderdaghast - Palemaster
Anders Maerklos - Spellsword
Chessala Zolond - Yathrin d'Lolth
Galambos Thrune - Griffon Knight
Archibold Vanderdaghast - Palemaster
Anders Maerklos - Spellsword
Chessala Zolond - Yathrin d'Lolth