#W# Notoriety tweaks. Hostiles are always red, Peaceful are orange, animals are gray.
This commit is contained in:
parent
97cac07f8b
commit
4a466009a0
2 changed files with 23 additions and 18 deletions
|
|
@ -416,22 +416,27 @@ namespace Server.Misc
|
|||
return Notoriety.Criminal;
|
||||
|
||||
// --- CUSTOM: Hostiles are always red. Peaceful mobs are orange ---
|
||||
if ( target is BaseCreature )
|
||||
{
|
||||
BaseCreature bc = (BaseCreature)target;
|
||||
|
||||
// If it is wild (not tamed), not a summon, and has negative Karma (hostile)
|
||||
if ( bc.AI != AIType.AI_Animal && !bc.Controlled && !bc.Summoned && bc.Karma < 0 )
|
||||
{
|
||||
return Notoriety.Murderer;
|
||||
}
|
||||
// Defensive/Neutral: Aggressor FightMode or 0 Karma shows as Orange
|
||||
if ( !target.Body.IsHuman && bc.AI != AIType.AI_Animal && ( bc.FightMode == FightMode.Aggressor || bc.Karma >= 0 ) )
|
||||
{
|
||||
return Notoriety.Enemy;
|
||||
}
|
||||
}
|
||||
// ---------------------------------------------
|
||||
if ( target is BaseCreature )
|
||||
{
|
||||
BaseCreature bc = (BaseCreature)target;
|
||||
|
||||
// Protects player pets and summons from changing color
|
||||
if ( !bc.Controlled && !bc.Summoned )
|
||||
{
|
||||
// Hostiles: Negative Karma shows as Red
|
||||
if ( bc.AI != AIType.AI_Animal && bc.Karma < 0 )
|
||||
{
|
||||
return Notoriety.Murderer;
|
||||
}
|
||||
|
||||
// Defensive/Neutral: Aggressor FightMode or >= 0 Karma shows as Orange
|
||||
if ( !target.Body.IsHuman && bc.AI != AIType.AI_Animal && ( bc.FightMode == FightMode.Aggressor || bc.Karma >= 0 ) )
|
||||
{
|
||||
return Notoriety.Enemy;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ---------------------------------------------
|
||||
|
||||
Guild sourceGuild = GetGuildFor( source.Guild as Guild, source );
|
||||
Guild targetGuild = GetGuildFor( target.Guild as Guild, target );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue