A Question on Gems
#13
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
Reply


Messages In This Thread
A Question on Gems - by Miscr3ant - 10-22-2014, 07:20 PM
RE: A Question on Gems - by Miscr3ant - 10-23-2014, 12:00 AM
RE: A Question on Gems - by Balanor - 10-23-2014, 09:43 AM
RE: A Question on Gems - by Miscr3ant - 10-23-2014, 02:17 PM
RE: A Question on Gems - by Balanor - 10-23-2014, 08:13 PM
RE: A Question on Gems - by Miscr3ant - 10-23-2014, 09:04 PM
RE: A Question on Gems - by Balanor - 12-18-2014, 12:46 PM
RE: A Question on Gems - by Miscr3ant - 12-18-2014, 01:19 PM
RE: A Question on Gems - by Bertram Anders - 12-18-2014, 01:44 PM
RE: A Question on Gems - by Miscr3ant - 12-18-2014, 06:00 PM
RE: A Question on Gems - by Bishop Edward - 12-18-2014, 07:48 PM
RE: A Question on Gems - by Balanor - 12-18-2014, 08:07 PM
RE: A Question on Gems - by Bishop Edward - 12-19-2014, 01:06 AM
RE: A Question on Gems - by NOITCA - 12-19-2014, 03:54 AM
RE: A Question on Gems - by Miscr3ant - 12-19-2014, 09:20 AM
RE: A Question on Gems - by Balanor - 12-19-2014, 11:06 AM
RE: A Question on Gems - by Miscr3ant - 12-19-2014, 11:28 AM

Forum Jump:


Users browsing this thread: 8 Guest(s)