Files
DarkflameServer/dGame/dUtilities/PropertyReputation.h
Aaron Kimbrell d95eab1212 feat: property reputation from visitors, resistant to farming
Property worlds now give their property reputation for the time other people spend on it, which
fills the property lists and the news screen's Today's Top Properties. Visitors are counted per
account; the owner's account, accounts linked to it and staff don't count. A visit earns nothing
for the first property_reputation_min_visit seconds (WorldConfig's propertyReputationDelay), then
each active minute (the visitor moved) earns reputationPerMinute times a multiplier, for a capped
number of minutes per visit. Repeat visitors earn less the more recent days they already gave
reputation, and each visitor and each property have a daily cap. Every parameter is a setting;
what each account gave each property per day is kept in property_reputation_visits. The rules are
pure functions with unit tests.

Fixes #636
Fixes #637

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 22:30:52 -05:00

21 lines
773 B
C++

#ifndef __PROPERTYREPUTATION__H__
#define __PROPERTYREPUTATION__H__
#include "PropertyReputationRules.h"
/**
* Property reputation in a property world (issues #636 and #637; the algorithm is in PropertyReputationRules.h).
* Visitors are followed per account once a minute; what they earn the property is written to
* property_reputation_visits and added to properties.reputation, which the property lists, the news screen's
* "Today's Top Properties" and the dashboard show. Off when property_reputation_enabled is 0.
*/
namespace PropertyReputation {
// The settings (property_reputation_*)
PropertyReputationRules::Params LoadParams();
// Called every frame on property worlds; does its work once a minute
void Tick();
}
#endif //!__PROPERTYREPUTATION__H__