Thread: Managed Objects
View Single Post
  #3  
Old 05-15-2007, 06:25 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Further information:

customClasses...

entity.setValueForKey( "party", "customClass" );

This makes the entities derive from the party custom class.

Things of notice are these:

validForKey( aValue, aKey )

valueForKey( aValue, aKey )

allKeys()

These can be used for programmed variables*, access to all the keys available, or for your own error-handling. Try to keep it backward compatible... An example of this:

PHP Code:
public function validForKeyaValueaKey )
{
  if ( 
simplemanagedobject::validForKeyaValueaKey ) )
    {
    
// Your error-handling here!
    
if ( player.account == "Novo" )
      return 
true;
    return 
false;
    }
  return 
false;

* Programmed Variables will surely depend on the 'dependencies' functionality. It is currently AVAILABLE, however, it needs a better set-up for it to work appropiately!

Oh... Attachment shows how it could be implemented for muds.
Attached Thumbnails
Click image for larger version

Name:	Picture 1.png
Views:	267
Size:	127.5 KB
ID:	41073  

Last edited by Novo; 05-15-2007 at 06:39 PM..
Reply With Quote