started porting traits to use new trait args.
This commit is contained in:
@@ -13,8 +13,9 @@ namespace OpenRa.Game.Traits.Activities
|
||||
|
||||
void DoSell(Actor self)
|
||||
{
|
||||
var refund = Rules.General.RefundPercent
|
||||
* self.Health * self.LegacyInfo.Cost / self.LegacyInfo.Strength;
|
||||
var cost = self.Info.Traits.Get<BuildableInfo>().Cost;
|
||||
var hp = self.Info.Traits.WithInterface<OwnedActorInfo>().First().HP;
|
||||
var refund = Rules.General.RefundPercent * self.Health * cost / hp;
|
||||
|
||||
self.Owner.GiveCash((int)refund);
|
||||
self.Health = 0;
|
||||
|
||||
Reference in New Issue
Block a user