Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Resolve #1426 -- Fix getting xp from the wrong team #1424

Merged
merged 2 commits into from
Apr 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion GameServerLib/GameObjects/AttackableUnits/AttackableUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,13 @@ public virtual void Die(IDeathData data)
{
if (!(obj is IMonster))
{
var champs = _game.ObjectManager.GetChampionsInRangeFromTeam(Position, _game.Map.MapScript.MapScriptMetadata.AIVars.EXPRadius, Team, true);
var enemyTeam = TeamId.TEAM_BLUE;
if (Team == TeamId.TEAM_BLUE)
{
enemyTeam = TeamId.TEAM_PURPLE;
}

var champs = _game.ObjectManager.GetChampionsInRangeFromTeam(Position, _game.Map.MapScript.MapScriptMetadata.AIVars.EXPRadius, enemyTeam, true);
lzardy marked this conversation as resolved.
Show resolved Hide resolved
if (champs.Count > 0)
{
var expPerChamp = obj.Stats.ExpGivenOnDeath.Total / champs.Count;
Expand Down