RE: [SMAUG] Problem with showaffect()

RE: [SMAUG] Problem with showaffect()



There are very few ways to do what you want, without ungodly levels of recursion
(going through the affect cycle over and over).
 
But the route you're taking is horribly flawed to begin with.
 
If you want to show consolidated affects, you don't target individual affects the
way showaffect does.
It's meant to describe a single affect, so its going to be called once for every
effect on its target.
 
Since it's used exclusively on objects, you create a new function to replace
calls to it:

affect_summary( ch, obj); 
( http://www.auricmud.com/snippets/condensed.c )

And just replace all those calls to showaffect() with a single instance of
affect_summary
 
 You can even give players the a config option on whether or not they want
summarization like that, and have it use showaffect for those who don't.


________________________________

From: Exodus [mailto:angelus433@gmail.com] 
Sent: Wednesday, April 27, 2005 5:59 AM
To: smaug
Subject: [SMAUG] Problem with showaffect()


I was trying to modify the showaffect function so that when items were
identified, both index and non-index affects would
be consolidated when printed to the character. This was an effort to reduce spam
from items that had many affects, be it from
immortal editing, glorified affects etc. It works just fine if the apply type for
the affect exists on the object index, but fails to
display correctly if it isn't.
 
You can find the function and examples at
http://darkrealms.genesismuds.com/snippets/showaffect.txt
 
If anyone has any ideas, I'd appreciate it. Thanks!
 
Exo