You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.6 KiB
48 lines
1.6 KiB
using System;
|
|
using GAS.Runtime;
|
|
using xFrame;
|
|
|
|
namespace CoreGame.Render
|
|
{
|
|
// 强行掉落, 抓取本机玩家属性
|
|
[Serializable]
|
|
public class TaskDropHpBoss: InstantAbilityTask
|
|
{
|
|
public int dropSkillId;
|
|
public string rateStr;
|
|
|
|
public override void OnExecute(in TaskSpec self)
|
|
{
|
|
var ctx = self.abilitySpec.ctx;
|
|
// var combatLocalPlayer = Contexts.Combat.LocalPlayer;
|
|
// if (combatLocalPlayer != null)
|
|
// {
|
|
// var val = combatLocalPlayer.property.GetProperty(PropertyDef.HealthOrbDropIncrease);
|
|
// ctx.ownerEnt.property.SetProperty(PropertyDef.HealthOrbDropIncrease, val, true);
|
|
// }
|
|
//
|
|
// var calcValWithCtx = ExpressionEvaluator.CalcVal_WithCtx(rateStr, ctx, 1);
|
|
//
|
|
// if (RandomSrv.Range(0, 1.0f) > calcValWithCtx)
|
|
// {
|
|
// XLog.LogDebug("没有触发掉落...");
|
|
// return;
|
|
// }
|
|
//
|
|
// if (ctx.castTarget.Count == 0)
|
|
// return;
|
|
//
|
|
// var pos = ctx.castPos[0];
|
|
// var target = ctx.castTarget[0];
|
|
// var targetEntity = Contexts.Combat.GetEntity(target);
|
|
// if (targetEntity != null)
|
|
// {
|
|
// var transformProxy = targetEntity.logicTransform;
|
|
// if (transformProxy != null)
|
|
// pos = transformProxy.position;
|
|
// }
|
|
//
|
|
// DropItemSrv.CreateExactDropItem(pos, dropSkillId);
|
|
}
|
|
}
|
|
}
|