Ejemplo n.º 1
0
 public void LoadCharacter(SaveCharacterClass _scc)
 {
     this.pc_Name           = _scc.pc_Name;
     this.pc_Class          = _scc.pc_Class;
     this.pc_PortraintIndex = _scc.pc_PortraintIndex;
     this.pc_HP             = _scc.pc_HP; this.pc_Max_HP = _scc.pc_Max_HP; this.pc_MP = _scc.pc_MP; this.pc_Max_MP = _scc.pc_Max_MP;
     this.pc_XP_Level       = _scc.pc_XP_Level; this.pc_XP = _scc.pc_XP; this.pc_XP_NNL = _scc.pc_XP_NNL;
     this.pc_Base_Str       = _scc.pc_Base_Str; this.pc_Base_Dex = _scc.pc_Base_Dex; this.pc_Base_IQ = _scc.pc_Base_IQ; this.pc_Base_Wis = _scc.pc_Base_Wis; this.pc_Base_Charm = _scc.pc_Base_Charm; this.pc_Base_Health = _scc.pc_Base_Health;
     this.pc_Str_Mod        = _scc.pc_Str_Mod; this.pc_Dex_Mod = _scc.pc_Dex_Mod; this.pc_IQ_Mod = _scc.pc_IQ_Mod; this.pc_Wis_Mod = _scc.pc_Wis_Mod; this.pc_Charm_Mod = _scc.pc_Charm_Mod; this.pc_Health_Mod = _scc.pc_Health_Mod;
     this.skills            = _scc.skills;
     //this.eq_Head = _scc.eq_Head; eq_Neck, eq_LeftFinger, eq_RightFinger, eq_LeftHand, eq_RightHand, eq_Torso, eq_Legs, eq_Feet; //Equipment slots
     if (_scc.eq_Head != null)
     {
         this.eq_Head.LoadItem(_scc.eq_Head);
     }
     if (_scc.eq_Head == null)
     {
         this.eq_Head = null;
     }
     if (_scc.eq_Neck != null)
     {
         this.eq_Neck.LoadItem(_scc.eq_Neck);
     }
     if (_scc.eq_Neck == null)
     {
         this.eq_Neck = null;
     }
     if (_scc.eq_LeftFinger != null)
     {
         this.eq_LeftFinger.LoadItem(_scc.eq_LeftFinger);
     }
     if (_scc.eq_LeftFinger == null)
     {
         this.eq_LeftFinger = null;
     }
     if (_scc.eq_RightFinger != null)
     {
         this.eq_RightFinger.LoadItem(_scc.eq_RightFinger);
     }
     if (_scc.eq_RightFinger == null)
     {
         this.eq_RightFinger = null;
     }
     if (_scc.eq_LeftHand != null)
     {
         this.eq_LeftHand.LoadItem(_scc.eq_LeftHand);
     }
     if (_scc.eq_LeftHand == null)
     {
         this.eq_LeftHand = null;
     }
     if (_scc.eq_RightHand != null)
     {
         this.eq_RightHand.LoadItem(_scc.eq_RightHand);
     }
     if (_scc.eq_RightHand == null)
     {
         this.eq_RightHand = null;
     }
     if (_scc.eq_Torso != null)
     {
         this.eq_Torso.LoadItem(_scc.eq_Torso);
     }
     if (_scc.eq_Torso == null)
     {
         this.eq_Torso = null;
     }
     if (_scc.eq_Legs != null)
     {
         this.eq_Legs.LoadItem(_scc.eq_Legs);
     }
     if (_scc.eq_Legs == null)
     {
         this.eq_Legs = null;
     }
     if (_scc.eq_Feet != null)
     {
         this.eq_Feet.LoadItem(_scc.eq_Feet);
     }
     if (_scc.eq_Feet == null)
     {
         this.eq_Feet = null;
     }
     this.pc_Defense        = _scc.pc_Defense; this.pc_Attack = _scc.pc_Attack;
     this.isDead            = _scc.isDead; //oof!
     this.con_Bless         = _scc.con_Bless;  this.tmr_Bless = _scc.tmr_Bless;
     this.con_Curse         = _scc.con_Curse;  this.tmr_Curse = _scc.tmr_Curse;
     this.con_Regen         = _scc.con_Regen;  this.tmr_Regen = _scc.tmr_Regen; this.val_Regen = _scc.val_Regen;
     this.con_Poison        = _scc.con_Poison;  this.tmr_Poison = _scc.tmr_Poison; this.val_Poison = _scc.val_Poison;
     this.con_Haste         = _scc.con_Haste;  this.tmr_Haste = _scc.tmr_Haste; this.val_Haste = _scc.val_Haste;
     this.con_Slow          = _scc.con_Slow;  this.tmr_Slow = _scc.tmr_Slow; this.val_Slow = _scc.val_Slow;
     this.con_Sevrd         = _scc.con_Sevrd;  this.tmr_Sevrd = _scc.tmr_Sevrd;
     this.con_Paralyzed     = _scc.con_Paralyzed;  this.tmr_Paralyzed = _scc.tmr_Paralyzed;
     this.con_Stone         = _scc.con_Stone;  this.tmr_Stone = _scc.tmr_Stone;
     this.con_Frog          = _scc.con_Frog;  this.tmr_Frog = _scc.tmr_Frog;
     this.con_Shield        = _scc.con_Shield;  this.tmr_Shield = _scc.tmr_Shield; this.val_Shield = _scc.val_Shield;
     this.con_Weak          = _scc.con_Weak;  this.tmr_Weak = _scc.tmr_Weak; this.val_Weak = _scc.val_Weak;
     this.con_StrDisease    = _scc.con_StrDisease;  this.tmr_StrDisease = _scc.tmr_StrDisease; this.val_StrDisease = _scc.val_StrDisease;
     this.con_DexDisease    = _scc.con_DexDisease;  this.tmr_DexDisease = _scc.tmr_DexDisease; this.val_DexDisease = _scc.val_DexDisease;
     this.con_IQDisease     = _scc.con_IQDisease;  this.tmr_IQDisease = _scc.tmr_IQDisease; this.val_IQDisease = _scc.val_IQDisease;
     this.con_WisDisease    = _scc.con_WisDisease;  this.tmr_WisDisease = _scc.tmr_WisDisease; this.val_WisDisease = _scc.val_WisDisease;
     this.con_CharmDisease  = _scc.con_CharmDisease;  this.tmr_CharmDisease = _scc.tmr_CharmDisease; this.val_CharmDisease = _scc.val_CharmDisease;
     this.con_HealthDisease = _scc.con_HealthDisease;  this.tmr_HealthDisease = _scc.tmr_HealthDisease; this.val_HealthDisease = _scc.val_HealthDisease;
 }
    public Character LoadCharacter(SaveCharacterClass toon)
    {
        Character _result = ScriptableObject.CreateInstance <Character>();

        _result.name              = toon.pc_Name + "_charcter";
        _result.pc_Name           = toon.pc_Name;
        _result.pc_Class          = toon.pc_Class;
        _result.pc_PortraintIndex = toon.pc_PortraintIndex;
        _result.pc_HP             = toon.pc_HP;
        _result.pc_Max_HP         = toon.pc_Max_HP;
        _result.pc_MP             = toon.pc_MP;
        _result.pc_Max_MP         = toon.pc_Max_MP;
        _result.pc_XP_Level       = toon.pc_XP_Level;
        _result.pc_XP             = toon.pc_XP;
        _result.pc_XP_NNL         = toon.pc_XP_NNL;
        _result.pc_Base_Str       = toon.pc_Base_Str;
        _result.pc_Str_Mod        = toon.pc_Str_Mod;
        _result.pc_Base_Dex       = toon.pc_Base_Dex;
        _result.pc_Dex_Mod        = toon.pc_Dex_Mod;
        _result.pc_Base_IQ        = toon.pc_Base_IQ;
        _result.pc_IQ_Mod         = toon.pc_IQ_Mod;
        _result.pc_Base_Wis       = toon.pc_Base_Wis;
        _result.pc_Wis_Mod        = toon.pc_Wis_Mod;
        _result.pc_Base_Charm     = toon.pc_Base_Charm;
        _result.pc_Charm_Mod      = toon.pc_Charm_Mod;
        _result.pc_Base_Health    = toon.pc_Base_Health;
        _result.pc_Health_Mod     = toon.pc_Health_Mod;
        _result.skills            = toon.skills;
        _result.pc_Defense        = toon.pc_Defense;
        _result.pc_Attack         = toon.pc_Attack;

        _result.isDead            = toon.isDead;
        _result.con_Bless         = toon.con_Bless; _result.tmr_Bless = toon.tmr_Bless;
        _result.con_Curse         = toon.con_Curse; _result.tmr_Curse = toon.tmr_Curse;
        _result.con_Regen         = toon.con_Regen; _result.tmr_Regen = toon.tmr_Regen; _result.val_Regen = toon.val_Regen;
        _result.con_Poison        = toon.con_Poison; _result.tmr_Poison = toon.tmr_Poison; _result.val_Poison = toon.val_Poison;
        _result.con_Haste         = toon.con_Haste; _result.tmr_Haste = toon.val_Haste;
        _result.con_Slow          = toon.con_Slow; _result.tmr_Slow = toon.tmr_Slow; _result.val_Slow = toon.val_Slow;
        _result.con_Sevrd         = toon.con_Sevrd; _result.tmr_Sevrd = toon.tmr_Sevrd;
        _result.con_Paralyzed     = toon.con_Paralyzed; _result.tmr_Paralyzed = toon.tmr_Paralyzed;
        _result.con_Stone         = toon.con_Stone; _result.tmr_Stone = toon.tmr_Stone;
        _result.con_Frog          = toon.con_Frog; _result.tmr_Frog = toon.tmr_Frog;
        _result.con_Shield        = toon.con_Shield; _result.tmr_Shield = toon.tmr_Shield; _result.val_Shield = toon.val_Shield;
        _result.con_Weak          = toon.con_Weak; _result.tmr_Weak = toon.tmr_Weak; _result.val_Weak = toon.val_Weak;
        _result.con_StrDisease    = toon.con_StrDisease; _result.tmr_StrDisease = toon.tmr_StrDisease; _result.val_StrDisease = toon.val_StrDisease;
        _result.con_DexDisease    = toon.con_DexDisease; _result.tmr_DexDisease = toon.tmr_DexDisease; _result.val_DexDisease = toon.val_DexDisease;
        _result.con_IQDisease     = toon.con_IQDisease; _result.tmr_IQDisease = toon.tmr_IQDisease; _result.val_IQDisease = toon.val_IQDisease;
        _result.con_WisDisease    = toon.con_WisDisease; _result.tmr_WisDisease = toon.tmr_WisDisease; _result.val_WisDisease = toon.val_WisDisease;
        _result.con_CharmDisease  = toon.con_CharmDisease; _result.tmr_CharmDisease = toon.tmr_CharmDisease; _result.val_CharmDisease = toon.val_CharmDisease;
        _result.con_HealthDisease = toon.con_HealthDisease; _result.tmr_HealthDisease = toon.tmr_HealthDisease; _result.val_HealthDisease = toon.val_HealthDisease;

        if (toon.eq_Head != null)
        {
            _result.eq_Head = ScriptableObject.CreateInstance <Item>().LoadItem(toon.eq_Head);
        }
        if (toon.eq_Head == null)
        {
            _result.eq_Head = null;
        }
        if (toon.eq_Neck != null)
        {
            _result.eq_Neck = ScriptableObject.CreateInstance <Item>().LoadItem(toon.eq_Neck);
        }
        if (toon.eq_Neck == null)
        {
            _result.eq_Neck = null;
        }
        if (toon.eq_LeftFinger != null)
        {
            _result.eq_LeftFinger = ScriptableObject.CreateInstance <Item>().LoadItem(toon.eq_LeftFinger);
        }
        if (toon.eq_LeftFinger == null)
        {
            _result.eq_LeftFinger = null;
        }
        if (toon.eq_RightFinger != null)
        {
            _result.eq_RightFinger = ScriptableObject.CreateInstance <Item>().LoadItem(toon.eq_RightFinger);
        }
        if (toon.eq_RightFinger == null)
        {
            _result.eq_RightFinger = null;
        }
        if (toon.eq_LeftHand != null)
        {
            _result.eq_LeftHand = ScriptableObject.CreateInstance <Item>().LoadItem(toon.eq_LeftHand);
        }
        if (toon.eq_LeftHand == null)
        {
            _result.eq_LeftHand = null;
        }
        if (toon.eq_RightHand != null)
        {
            _result.eq_RightHand = ScriptableObject.CreateInstance <Item>().LoadItem(toon.eq_RightHand);
        }
        if (toon.eq_RightHand == null)
        {
            _result.eq_RightHand = null;
        }
        if (toon.eq_Torso != null)
        {
            _result.eq_Torso = ScriptableObject.CreateInstance <Item>().LoadItem(toon.eq_Torso);
        }
        if (toon.eq_Torso == null)
        {
            _result.eq_Torso = null;
        }
        if (toon.eq_Legs != null)
        {
            _result.eq_Legs = ScriptableObject.CreateInstance <Item>().LoadItem(toon.eq_Legs);
        }
        if (toon.eq_Legs == null)
        {
            _result.eq_Legs = null;
        }
        if (toon.eq_Feet != null)
        {
            _result.eq_Feet = ScriptableObject.CreateInstance <Item>().LoadItem(toon.eq_Feet);
        }
        if (toon.eq_Feet == null)
        {
            _result.eq_Feet = null;
        }

        return(_result);
    }