|
Pol
Rev 533
|
#include <repsys.h>
| void RepSystem::de_escalate | ( | Character * | amy, |
| Character * | bob | ||
| ) | [static, private] |
[7] De-Escalation To De-escalate Amy and Bob: if Amy's opponent is Bob, Amy clears her opponent If Bob's opponent is Amy, Bob clears his opponent
Definition at line 543 of file repsys.cpp.
References Character::opponent_, and Character::set_opponent().
Referenced by repsys_task().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned char RepSystem::hilite_color_idx | ( | const Character * | amy, |
| const Character * | bob | ||
| ) | [static, private] |
[8] Highlighting and Name Coloring if Amy looks at Bob, coloring is as follows: if Bob is invul and invul tag set 2, color Bob INVUL (yellow) if Bob is a Murderer color Bob MURDERER () if Bob is a Criminal, color Bob CRIMINAL (Red) If Bob is a guild ally of Amy's, color Bob FRIEND (Green) if Bob is an Aggressor to Amy, color Bob ATTACKABLE (Grey) if Amy has lawfully damaged Bob, color Bob ATTACKABLE (Grey) if Bob is a guild enemy of Amy's, color Bob ENEMY (Orange) otherwise color Bob INNOCENT (Blue)
Definition at line 569 of file repsys.cpp.
References ExportedFunction::call_long(), CHAR_HILITE_ATTACKABLE, CHAR_HILITE_CRIMINAL, CHAR_HILITE_ENEMY, CHAR_HILITE_FRIEND, CHAR_HILITE_INNOCENT, CHAR_HILITE_INVUL, CHAR_HILITE_MURDERER, Character::has_lawfully_damaged(), RepSys_Cfg::HighLightColor, RepSys_Cfg::Hooks, Character::invul, ServSpecOpt::invul_tag, Character::is_aggressor_to(), Character::is_criminal(), Character::is_guild_ally(), Character::is_guild_enemy(), Character::is_murderer(), Character::make_ref(), repsys_cfg, and ssopt.
Here is the call graph for this function:| unsigned short RepSystem::name_color | ( | const Character * | seen_by, |
| const Character * | who | ||
| ) | [static, private] |
Definition at line 600 of file repsys.cpp.
References RepSys_Cfg::Attackable, ExportedFunction::call_long(), RepSys_Cfg::Criminal, RepSys_Cfg::GuildAlly, RepSys_Cfg::GuildEnemy, Character::has_lawfully_damaged(), RepSys_Cfg::Hooks, RepSys_Cfg::Innocent, Character::invul, ServSpecOpt::invul_tag, RepSys_Cfg::Invulnerable, Character::is_aggressor_to(), Character::is_criminal(), Character::is_guild_ally(), Character::is_guild_enemy(), Character::is_murderer(), Character::make_ref(), RepSys_Cfg::Murderer, RepSys_Cfg::NameColor, RepSys_Cfg::NameColoring, repsys_cfg, and ssopt.
Here is the call graph for this function:| void RepSystem::on_pc_attacks_pc | ( | Character * | amy_attacker, |
| Character * | bob_defender | ||
| ) | [static, private] |
[3] Player attacks another Player When Amy attacks Bob These rules are applied:
if Bob is Innocent to Amy, Set Amy's Criminal flag for CriminalFlagInterval seconds
if Bob is Aggressor to Amy, Set Bob as Aggressor to Amy for AggressorFlagTimeout seconds else, Tell Bob "Amy is Attacking you!" if this is news Set Amy as Aggressor to Bob for AggressorFlagTimeout seconds
Definition at line 425 of file repsys.cpp.
References RepSys_Cfg::AggressorFlagTimeout, Character::client, RepSys_Cfg::CriminalFlagInterval, earliest_timer(), RepSys_Cfg::General, Character::is_aggressor_to(), Character::is_criminal(), Character::is_innocent_to(), RepSys_Cfg::Murderer, UObject::name(), RepSys_Cfg::NameColoring, polclock(), POLCLOCKS_PER_SEC, private_say_above_ex(), repsys_cfg, Character::restart_aggressor_timer(), Character::restart_criminal_timer(), schedule_repsys_task(), send_create_mobile_to_nearby_cansee(), and send_move().
Referenced by on_pc_damages_pc(), and Character::repsys_on_attack().
Here is the call graph for this function:
Here is the caller graph for this function:| void RepSystem::on_pc_damages_pc | ( | Character * | amy, |
| Character * | bob | ||
| ) | [static, private] |
[4] Player Damages Player When Amy damages Bob These rules applied:
Apply all rules for "Player Attacks Another Player"[->3]
If Bob is Innocent to Amy, Add Amy to Bob's "ToBeReportable" list else Set Amy as having LawfullyDamaged Bob for AggressorFlagTimeout seconds
Definition at line 490 of file repsys.cpp.
References Character::add_to_be_reportable(), RepSys_Cfg::AggressorFlagTimeout, RepSys_Cfg::General, Character::is_innocent_to(), on_pc_attacks_pc(), polclock(), POLCLOCKS_PER_SEC, repsys_cfg, Character::restart_lawfully_damaged_timer(), schedule_repsys_task(), and UObject::serial.
Referenced by Character::repsys_on_damage().
Here is the call graph for this function:
Here is the caller graph for this function:| void RepSystem::on_pc_helps_pc | ( | Character * | amy, |
| Character * | bob | ||
| ) | [static, private] |
[5] Player Helps Another Player When Amy Helps Bob These rules applied:
If PartyHelpFullCountsAsCriminal false and same party dont set If Bob is a Criminal, Set Amy Criminal
Definition at line 524 of file repsys.cpp.
References RepSys_Cfg::General, Character::is_criminal(), Party::is_member(), Character::make_criminal(), Character::party(), RepSys_Cfg::PartyHelpFullCountsAsCriminal, repsys_cfg, and UObject::serial.
Referenced by Character::repsys_on_help().
Here is the call graph for this function:
Here is the caller graph for this function:| void RepSystem::repsys_task | ( | Character * | amy | ) | [static, private] |
[2] Timeouts When Any of Amy's Rep-system timers time out
If Amy's Criminal Timer has expired, Clear Amy's Criminal Timer
If Amy was Aggressor to Bob, but has timed out De-escalate[->7] Amy and Bob Update Bob to nearby clients
If Amy had Lawfully Damaged Bob, but has timed out De-escalate[->7] Amy and Bob Update Bob to nearby clients
If any of Amy's statuses changed, Update Amy to nearby clients
Definition at line 197 of file repsys.cpp.
References Character::aggressor_to_, Character::client, Character::criminal_until_, de_escalate(), earliest_timer(), ref_ptr< T >::get(), Character::is_innocent_to(), Character::lawfully_damaged_, Log(), Character::opponent_of, UObject::orphan(), polclock(), POLCLOCKS_PER_SEC, schedule_repsys_task(), send_create_mobile_to_nearby_cansee(), send_move(), THREAD_CHECKPOINT, and timer_expired().
Referenced by schedule_repsys_task().
Here is the call graph for this function:
Here is the caller graph for this function:| static void RepSystem::restart_crim_timer | ( | Character * | chr | ) | [static, private] |
| void RepSystem::schedule_repsys_task | ( | Character * | chr, |
| polclock_t | runat | ||
| ) | [static, private] |
Definition at line 359 of file repsys.cpp.
References OneShotTask::cancel(), ScheduledTask::next_run_clock(), repsys_task(), and Character::repsys_task_.
Referenced by Character::make_aggressor_to(), Character::make_criminal(), Character::make_lawfullydamaged_to(), Character::make_murderer(), on_pc_attacks_pc(), on_pc_damages_pc(), and repsys_task().
Here is the call graph for this function:
Here is the caller graph for this function:| void RepSystem::show_repdata | ( | Client * | client, |
| Character * | mob | ||
| ) | [static, private] |
Internal Command: .i_repdata Show Reputation System Data for a Targetted Mobile Displays: Murderer status Criminal status and timeout LawfullyDamaged status and timeouts AggressorTo status and timeouts ToBeReportable list Reportable list RepSystem Task status
Definition at line 275 of file textcmd.cpp.
References Character::aggressor_to_, Character::criminal_until_, decint(), hexint(), Character::is_criminal(), Character::is_murderer(), Character::lawfully_damaged_, ScheduledTask::next_run_clock(), reportable_t::polclock, Character::reportable_, Character::repsys_task_, send_sysmessage(), reportable_t::serial, timeoutstr(), and Character::to_be_reportable_.
Referenced by show_repdata().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned char Character::hilite_color_idx | ( | const Character * | seen_by | ) | const [friend] |
| void Character::make_aggressor_to | ( | Character * | chr | ) | [friend] |
| void Character::make_criminal | ( | int | level | ) | [friend] |
| void Character::make_lawfullydamaged_to | ( | Character * | chr | ) | [friend] |
| void Character::make_murderer | ( | bool | newval | ) | [friend] |
| unsigned short Character::name_color | ( | const Character * | seen_by | ) | const [friend] |
| void Character::repsys_on_attack | ( | Character * | defender | ) | [friend] |
| void Character::repsys_on_damage | ( | Character * | defender | ) | [friend] |
| void Character::repsys_on_help | ( | Character * | helper | ) | [friend] |
| unsigned char NPC::hilite_color_idx | ( | const Character * | seen_by | ) | const [friend] |
| unsigned short NPC::name_color | ( | const Character * | seen_by | ) | const [friend] |
| void show_repdata | ( | Character * | looker, |
| Character * | mob | ||
| ) | [friend] |
Definition at line 329 of file textcmd.cpp.