Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 08-06-2008, 04:28 PM   #1 (permalink)
Forum Novice
 
Join Date: Jun 2004
Posts: 133
Default Mobile storage question

Code:
private Mobile m_mobile;
Say I store a NPC mobile in this format for referance later on. What happens if I referance the mobile value after the NPC mobile is dead or deleted? Is this effected by saves or will it keep brief referance data even after the mobile is deleted? Will it just cause a null referance exception when referanced?
Taffer is offline   Reply With Quote
Old 08-06-2008, 04:30 PM   #2 (permalink)
Forum Novice
 
Join Date: Dec 2005
Posts: 608
Default

it will return null, so nothing. no data is saved. except the info on the corpse.
b0b01 is online now   Reply With Quote
Old 08-06-2008, 04:48 PM   #3 (permalink)
Forum Expert
 
Vorspire's Avatar
 
Join Date: Jan 2005
Location: Newcastle, United Kingdom
Age: 21
Posts: 2,298
Send a message via ICQ to Vorspire Send a message via MSN to Vorspire Send a message via Skype™ to Vorspire
Default

Quote:
Originally Posted by b0b01 View Post
it will return null, so nothing. no data is saved. except the info on the corpse.
It won't return null at all. It will still return the Mobile as it was, even when Dead or deleted.

That's why Mobile has the Alive and Deleted variables...

The only time it will return null is if the Mobile never existed, wasn't set, or runtime no longer uses the Mobile data/information anywhere... (Like when the corpse has been deleted) -that is when the .NET Cleanup takes place, only when an object is not referenced or used anymore.
__________________

WWW.RPK-UO.COM - The WoW-UO Cross-Over Shard
Vorspire is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5