Ejemplo n.º 1
0
    public void AppClearFuse(long targetID, bool isDeadDefuse)
    {
        EntityParent entityByID = LocalAgent.GetEntityByID(targetID);

        if (entityByID == null)
        {
            return;
        }
        if (entityByID.BattleBaseAttrs == null)
        {
            return;
        }
        if (!this.fuseStateTable.ContainsKey(targetID))
        {
            return;
        }
        FuseState fuseState = this.fuseStateTable[targetID];

        TimerHeap.DelTimer(fuseState.timerID);
        if (!isDeadDefuse)
        {
            LocalBattleProtocolSimulator.SendExitFit(targetID, fuseState.petID, fuseState.modelID, fuseState.skill);
        }
        this.ResetFuseAttrs(targetID, 0L, fuseState);
        entityByID.SetValue(GameData.AttrType.MoveSpeed, DataReader <AvatarModel> .Get(fuseState.modelID).speed, true);
        this.fuseStateTable.Remove(targetID);
    }