Ejemplo n.º 1
0
 public void SetCharacterState(CharacterStateControlStore savedCSC, BattleStateData battleStateData)
 {
     this._currentHp    = savedCSC.hp;
     this.ap            = savedCSC.ap;
     this.isSelectSkill = savedCSC.isSelectSkill;
     this.hate          = savedCSC.hate;
     this.previousHate  = savedCSC.previousHate;
     this.isLeader      = savedCSC.isLeader;
     this.skillOrder    = savedCSC.skillOrder;
     this.myIndex       = savedCSC.myIndex;
     this.isEnemy       = savedCSC.isEnemy;
     this.currentSufferState.Set(savedCSC.currentSufferState);
     this.randomedSpeed  = savedCSC.randomedSpeed;
     this.isEscape       = savedCSC.isEscape;
     this.skillUseCounts = savedCSC.skillUseCounts;
     this.chip.SetCharacterState(savedCSC);
 }
Ejemplo n.º 2
0
 public void SetCharacterState(CharacterStateControlStore savedCSC)
 {
     this.SetChipEffectCount(savedCSC.chipEffectCount);
     this.SetPotencyChipIdList(savedCSC.potencyChipIdList);
     foreach (int num in this.potencyChipIdList.Keys)
     {
         GameWebAPI.RespDataMA_ChipEffectM.ChipEffect chipEffectDataToId = ChipDataMng.GetChipEffectDataToId(num.ToString());
         if (chipEffectDataToId != null)
         {
             GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] chipEffects = new GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[]
             {
                 chipEffectDataToId
             };
             EffectStatusBase.EffectTriggerType effectTriggerType = (EffectStatusBase.EffectTriggerType)chipEffectDataToId.effectTrigger.ToInt32();
             if (effectTriggerType != EffectStatusBase.EffectTriggerType.Usually && effectTriggerType != EffectStatusBase.EffectTriggerType.Area)
             {
                 this.AddChipParam(true, chipEffects, true, false);
             }
         }
     }
 }
Ejemplo n.º 3
0
    private string ManageCharacterStateControlForValueToJson(CharacterStateControl csc)
    {
        CharacterStateControlStore value = new CharacterStateControlStore
        {
            hp                 = csc.hp,
            ap                 = csc.ap,
            isSelectSkill      = csc.isSelectSkill,
            hate               = csc.hate,
            previousHate       = csc.previousHate,
            isLeader           = csc.isLeader,
            skillOrder         = csc.skillOrder,
            myIndex            = csc.myIndex,
            isEnemy            = csc.isEnemy,
            chipIds            = csc.chipIds,
            isEscape           = csc.isEscape,
            skillUseCounts     = csc.skillUseCounts,
            currentSufferState = csc.currentSufferState.Get(),
            chipEffectCount    = csc.GetChipEffectCountToString(),
            potencyChipIdList  = csc.GetPotencyChipIdListToString()
        };

        return(JsonWriter.Serialize(value));
    }
Ejemplo n.º 4
0
    private void ManageCharacterStateControlForJsonToValue(string json, CharacterStateControl characterStateControl, BattleStateData battleStateData)
    {
        CharacterStateControlStore savedCSC = JsonReader.Deserialize(json, typeof(CharacterStateControlStore)) as CharacterStateControlStore;

        characterStateControl.SetCharacterState(savedCSC, battleStateData);
    }