uniqueness.c

ds2.4.1/lib/lib/props/uniqueness.c · 659 B

From the archive ds2.4.1.zip

Download the archive   « Back to the archive contents

/*    /lib/props/uniqueness.c
 *    From the Dead Souls Object Library
 *    Allows certain objects to be made rareor unique
 *    Created by Descartes of Borg 961222
 *    Version: @(#) uniqueness.c 1.1@(#)
 *    Last modified: 97/01/01
 */

#include <daemons.h>

private static int array Rarity = 0;
private static int       Unique = 0;

int array GetRarity() {
    return Rarity;
}

int array SetRarity(int count, int days) {
    return (Rarity = ({ count, days }));
}

int GetUnique() {
    return Unique;
}

int SetUnique(int x) {
    Unique = x;
    if( Unique ) {
	UNIQUE_D->eventTouchObject();
	this_object()->SetRetain(0);
    }
    return Unique;
}

Site Stats

Snippets: 1791
Codebases: 571