ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/arch.C
(Generate patch)

Comparing deliantra/server/common/arch.C (file contents):
Revision 1.103 by root, Sun Apr 11 02:04:54 2010 UTC vs.
Revision 1.106 by root, Thu May 6 22:35:41 2010 UTC

299 return 0; 299 return 0;
300} 300}
301 301
302//-GPL 302//-GPL
303 303
304void
305archetype::do_delete ()
306{
307 delete this;
308}
309
304archetype::archetype (const char *name) 310archetype::archetype (const char *name)
305{ 311{
306 arch = this; 312 arch = this;
307 this->archname = this->name = this->name_pl = name; 313 this->archname = this->name = this->name_pl = name;
308} 314}
351} 357}
352 358
353void 359void
354archetype::post_load_check () 360archetype::post_load_check ()
355{ 361{
362 assert (("obj_original MUST NOT be set for archetypes", !flag [FLAG_OBJ_ORIGINAL]));
363
364 if (type == SKILL)
365 add_skill_archetype (this);
366
356 object::post_load_check (); 367 object::post_load_check ();
357
358 assert (("obj_original MUST NOT be set for archetypes", !flag [FLAG_OBJ_ORIGINAL]));
359} 368}
360 369
361archetype * 370archetype *
362archetype::read (object_thawer &f) 371archetype::read (object_thawer &f)
363{ 372{
540 549
541 if (at->refcnt_cnt () > 1) // all arches have ONE refcount from their object 550 if (at->refcnt_cnt () > 1) // all arches have ONE refcount from their object
542 ++idx; 551 ++idx;
543 else 552 else
544 { 553 {
545 LOG (llevDebug, "garbage collect arch %s", &at->archname); 554 //LOG (llevDebug, "garbage collect arch %s", &at->archname);
546 assert (at->arch == at); // verify that refcnt == 1 is truly valid 555 assert (at->arch == at); // verify that refcnt == 1 is truly valid
547 allarch.erase (idx); 556 allarch.erase (idx);
548 557
549 // break chain 558 // break chain
550 for (object *op = at->head_ (); op; ) 559 for (object *op = at->head_ (); op; )

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines