Skip to content

Commit

Permalink
Set initial aggro of 'added' mobs to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
NetDwarf committed Oct 27, 2022
1 parent 479a3ee commit d903180
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion GameServer/ai/brain/DragonBrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ protected override void CheckNPCAggro()
{
if (CalculateAggroLevelToTarget(npc) > 0)
{
AddToAggroList(npc, (npc.Level + 1) << 1);
AddToAggroList(npc, 1);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions GameServer/ai/brain/GuardBrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected override void CheckPlayerAggro()
if (!Body.IsWithinRadius(player, AggroRange))
continue;

AddToAggroList(player, player.EffectiveLevel << 1);
AddToAggroList(player, 1);
return;
}
}
Expand All @@ -75,7 +75,7 @@ protected override void CheckNPCAggro()
if (!npc.IsWithinRadius(Body, AggroRange))
continue;

AddToAggroList(npc, npc.Level << 1);
AddToAggroList(npc, 1);
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions GameServer/ai/brain/Guards/KeepGuardBrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected override void CheckPlayerAggro()
Body.Say("Want to attack player " + player.Name);
}

AddToAggroList(player, player.EffectiveLevel << 1);
AddToAggroList(player, 1);
return;
}
}
Expand Down Expand Up @@ -171,7 +171,7 @@ protected override void CheckNPCAggro()
Body.Say("Want to attack player " + player.Name + " pet " + npc.Name);
}

AddToAggroList(npc, (npc.Level + 1) << 1);
AddToAggroList(npc, 1);
return;
}
}
Expand Down
6 changes: 3 additions & 3 deletions GameServer/ai/brain/StandardMobBrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ protected virtual void CheckNPCAggro()
if (CalculateAggroLevelToTarget(npc) > 0)
{
if (npc.Brain is ControlledNpcBrain) // This is a pet or charmed creature, checkLOS
AddToAggroList(npc, (npc.Level + 1) << 1, true);
AddToAggroList(npc, 1, true);
else
AddToAggroList(npc, (npc.Level + 1) << 1);
AddToAggroList(npc, 1);
}
}
}
Expand Down Expand Up @@ -290,7 +290,7 @@ protected virtual void CheckPlayerAggro()

if (CalculateAggroLevelToTarget(player) > 0)
{
AddToAggroList(player, player.EffectiveLevel << 1, true);
AddToAggroList(player, 1, true);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion GameServer/spells/Masterlevel/Convoker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ protected override void CheckNPCAggro()
if (!(npc.Brain is IControlledBrain || npc is GameGuard))
continue;

AddToAggroList(npc, npc.Level << 1);
AddToAggroList(npc, 1);
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions GameServer/spells/negative/FriendBrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected override void CheckPlayerAggro()
if (!GameServer.ServerRules.IsAllowedToAttack(m_spellHandler.Caster, player, true))
continue;

AddToAggroList(player, player.EffectiveLevel<<1);
AddToAggroList(player, 1);
}
}
}
Expand All @@ -45,7 +45,7 @@ protected override void CheckNPCAggro()
{
if (GameServer.ServerRules.IsAllowedToAttack(m_spellHandler.Caster, npc, true))
{
AddToAggroList(npc, npc.Level<<1);
AddToAggroList(npc, 1);
return;
}
}
Expand Down

0 comments on commit d903180

Please sign in to comment.