Make capturing grant player experience

This commit is contained in:
Oliver Brakmann
2016-07-10 13:35:50 +02:00
parent c1729a3b70
commit 1e86326cbc
4 changed files with 28 additions and 0 deletions

View File

@@ -77,6 +77,13 @@ namespace OpenRA.Mods.Common.Activities
capturable.EndCapture();
if (self.Owner.Stances[oldOwner].HasStance(capturesInfo.PlayerExperienceStances))
{
var exp = self.Owner.PlayerActor.TraitOrDefault<PlayerExperience>();
if (exp != null)
exp.GiveExperience(capturesInfo.PlayerExperience);
}
if (capturesInfo != null && capturesInfo.ConsumeActor)
self.Dispose();
});