The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Discussion on ID vs DISPID (OOP)
Author Message
Capes
Journeyman
*

Posts: 57
Likes Given: 0
Likes Received: 4 in 4 posts
Joined: Mar 2018
Reputation: 0



Post: #2
RE: Discussion on ID vs DISPID (OOP)
Id also like to add that in a item definition (0.56d) sphere won't let you use both ID & DISPID together you have to add DISPID in the on=@create.
DUPEITEM seems to be a combination of ID & DISPID except allowing the new Object to keep all behaviors of old object.
So DUPEITEM does not remove the base behaviors of the original object it retains them.
Basically DUPEITEM is the same as defining an object using both ID & DISPID where ID is the old objects behaviors/properties and DISPID is the new appearance.

Summary
DISPID -> changes only the appearance of the object (all old behavior's remain)
ID -> change all aspects of old object to new object
DUPEITEM -> acts like an object with ID & DISPID set to separate objects, where ID defines behaviors and DISPID is the appearance.

DUPEITEM example-
[ITEMDEF 01041]
DEFNAME=i_pie_baked
TYPE=t_food
//bla bla bla

[ITEMDEF 0dc0] //fishing pole
DEFNAME=fishing_pole_acts_like_baked_pie
DUPEITEM=i_pie_baked

Same example using ID & DISPID
[ITEMDEF fishing_pole_acts_like_baked_pie]
ID=i_pie_baked
ON=@Create
DISPID=i_fishing_pole


The reason for me posting this is because I spent literally days trying to debug why certain things didn't work. Only to find out that I didn't really understand how ID, DISPID & DUPEITEM worked.

Thanks
Capes
04-15-2018 01:01 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Discussion on ID vs DISPID (OOP) - Capes - 04-14-2018, 10:54 PM
RE: Discussion on ID vs DISPID (OOP) - Capes - 04-15-2018 01:01 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)