private void addStackingRound(BuffInfo info) { BuffStackInfo _stackInfo = new BuffStackInfo(); _stackInfo.init(buffAction.CDRound); _stackInfo.Condition = info.Condition; stackingList.AddLast(_stackInfo); }
public virtual BattleFighterBuff putBuff(BattleFighter owner, BuffInfo info) { IBuffAction _buffAction = info.BuffAction; BattleFighterBuff _buff = createBattleFighterBuff(owner, _buffAction); buffMap[_buffAction.TypeB] = _buff; _buff.stackingBuff(info); return _buff; }
/// <summary> /// 上个buff,先算出个数是否已满,再查看buff增加的策略 /// </summary> /// <param name="buffId"> </param> public virtual void addBuff(BuffInfo buffInfo) { // TODO: add battle report IBuffAction _buffAction = getBuffAction(buffInfo.BuffId); if (_buffAction == null) { // TODO: add error log return; } if (hasMaxCountBuff(_buffAction)) { // TODO: log max buff return; } buffInfo.BuffAction = _buffAction; BuffPolicyEnum _policyType = calcPolicy(_buffAction); _policyType.addBuff(this, buffInfo); }
protected internal virtual void stackingNewBuff(BuffInfo info) { addStackingRound(info); refreshShowLeftRound(); }
// TODO: result record public virtual void stackingBuff(BuffInfo info) { if (!canStacking()) { removeFirstStack(); } stackingNewBuff(info); }
public virtual BattleFighterBuff putToBuffHolder(BuffInfo buffInfo) { BuffTypeHolder _holder = getBuffTypeHolder(buffInfo.BuffAction); return _holder.putBuff(Owner, buffInfo); }