--- deliantra/server/common/loader.C 2010/03/26 00:59:20 1.152 +++ deliantra/server/common/loader.C 2010/04/11 01:35:51 1.154 @@ -431,7 +431,7 @@ value = arch->value * inv->value; } - if (QUERY_FLAG (this, FLAG_MONSTER)) + if (this->flag [FLAG_MONSTER]) { if (stats.hp > stats.maxhp) { @@ -444,7 +444,7 @@ move_type = MOVE_WALK; } - if ((QUERY_FLAG (this, FLAG_GENERATOR) && QUERY_FLAG (this, FLAG_CONTENT_ON_GEN)) || type == CREATOR || type == CONVERTER) + if ((this->flag [FLAG_GENERATOR] && this->flag [FLAG_CONTENT_ON_GEN]) || type == CREATOR || type == CONVERTER) /* Object will duplicate it's content as part of the * generation process. To do this, we must flag inventory * so it remains unevaluated concerning the randomitems and @@ -590,8 +590,8 @@ // also, appending instead of prepending keeps the // save ordering the same between repeated load/saves. // and finally we do not want any funny effects - CLEAR_FLAG (tmp, FLAG_OBJ_ORIGINAL); - CLEAR_FLAG (tmp, FLAG_REMOVED); + tmp->clr_flag (FLAG_OBJ_ORIGINAL); + tmp->clr_flag (FLAG_REMOVED); if (!op_inv) { @@ -634,11 +634,11 @@ case KW_animation: { - CLEAR_FLAG (this, FLAG_ANIMATE); + this->clr_flag (FLAG_ANIMATE); animation_id = 0; if (f.has_value () && (animation_id = find_animation (f.get_str ()))) - SET_FLAG (this, FLAG_ANIMATE); //TODO: should not be forced to true here + this->set_flag (FLAG_ANIMATE); //TODO: should not be forced to true here } break; @@ -826,8 +826,8 @@ case KW_identified: GET_FLAG (this, FLAG_IDENTIFIED); //TODO: move to check_object or so - if (QUERY_FLAG (this, FLAG_IDENTIFIED)) - CLEAR_FLAG (this, FLAG_KNOWN_MAGICAL); + if (this->flag [FLAG_IDENTIFIED]) + this->clr_flag (FLAG_KNOWN_MAGICAL); break; @@ -1342,7 +1342,8 @@ CMP_OUT (custom_name); if (object *owner = op->owner) - f.put (KW(owner), static_cast(owner->ref ())); + if (const char *ref = owner->ref ()) + f.put (KW(owner), ref); // memory, attacked_by, chosen_skill, spellitem, spell, current_weapon, arch not saved