Karla Stenger wrote: > hi, > I found something about this wrong merging rings problem, but i dont know how to > fix it, so i drop it here for those who know the code better. > > i was playing with a pile of rings of pow+2 and another of int+2 and it happened > once and again, that no matter what the order was, the rings would always merge > together into ones of the same kind, so i went to look at the CAN_MERGE function > and found out that it only checks for the type of the rings, which as you can > see below are exactly the same in this case. No wonder that it will keep > merging. I just dont know what is wrong, is it the item type?, is it that the > CAN_MERGE should check for other things also to compare the items? CAN_MERGE wasn't checking to see if the stats of the two rings are the same. While less likely, this could actually be a problem with all objects. Eg, if there was a nice DM that took just a normal sword and gave it +3 Str, it could merge with other normal swords, either losing that +3 Str, or giving it to the entire group. This is probably less likely with most other objects, because the value wouldn't be the same (eg, a Str +1 sword would cost more than a sword without that Str +1 in most cases). And stat bonus don't show up in most other object, so less likely to be problems elsewhere. In any case, the fix appears to be to just put a memcmp for the stats structures, just like is already done for the resist structures. > on the same topic but slightly different, seems like the animation check for > merging items is what is not allowing diamonds (and other gems) to merge > sometimes I've not seen it - the animation checks shouldn't cause a problem, because the check is actually to be making sure it is using the same animation sequence, and not so much the same frame is being animated. If there are cases where this can be documented and the two objects fully examined to make sure that nothing else is in fact different. _______________________________________________ crossfire-devel mailing list crossfire-devel at lists.real-time.com https://mailman.real-time.com/mailman/listinfo/crossfire-devel