20 typedef std::map<int, CharacterRef*> CharacterRefs;
22 unsigned int crefs_count;
29 for ( CharacterRefs::iterator itr = crefs.begin(); itr != crefs.end(); ++itr )
31 tmp <<
"cref " << ( *itr ).first <<
"=0x" << fmt::hexu( ( *itr ).second->get()->serial )
40 if (
get() &&
get()->serial_ext == 0x619d1300 )
48 if (
get() &&
get()->serial_ext == 0x619d1300 )
55 UObjectRef::~UObjectRef()
58 if (
get() &&
get()->serial_ext == 0x619d1300 )
67 if (
get() &&
get()->serial_ext == 0x619d1300 )
70 cref_instance = crefs_count++;
71 crefs[cref_instance] =
this;
78 if (
get() &&
get()->serial_ext == 0x619d1300 )
81 cref_instance = crefs_count++;
82 crefs[cref_instance] =
this;
86 CharacterRef::~CharacterRef()
89 if (
get() &&
get()->serial_ext == 0x619d1300 )
91 crefs.erase( cref_instance );
104 if (
get() &&
get()->serial_ext == 0x619d1300 )
106 crefs.erase( cref_instance );
112 if (
get() &&
get()->serial_ext == 0x619d1300 )
115 cref_instance = crefs_count++;
116 crefs[cref_instance] =
this;
119 void CharacterRef::clear()
121 if (
get() &&
get()->serial_ext == 0x619d1300 )
123 crefs.erase( cref_instance );
133 if (
get() &&
get()->serial_ext == 0x619d1300 )
141 if (
get() &&
get()->serial_ext == 0x619d1300 )
151 if (
get() &&
get()->serial_ext == 0x619d1300 )
160 if (
get() &&
get()->serial_ext == 0x619d1300 )
169 if (
get() &&
get()->serial_ext == 0x619d1300 )
179 if (
get() &&
get()->serial_ext == 0x619d1300 )
ref_ptr< UObject > UObjectRef
ref_ptr< Mobile::NPC > NpcRef
ref_ptr< Mobile::Character > CharacterRef
ref_ptr< Items::Item > ItemRef