Ejemplo n.º 1
0
    public PlayerData()
    {
        name                 = "Brink";
        level                = 1;       //temp 1
        resId                = 1;
        vip_value            = 0;
        vip_level            = 0;
        main_weaponId        = 1000;
        exp                  = 0;
        mStrenLv             = 0;
        mPack                = new PackageManager();
        sp                   = 0;
        sp_max               = 0;
        sp_next_inc_time     = ulong.MaxValue;
        mFittChance          = 3;
        arena_currank        = uint.MaxValue;
        arena_bestrank       = uint.MaxValue;
        arena_score          = 0;
        arena_lefttimes      = 0;
        arena_buytimes       = 0;
        arena_lasttime       = 0;
        qualifying_currank   = uint.MaxValue;
        qualifying_bestrank  = uint.MaxValue;
        qualifying_lefttimes = 0;
        qualifying_buytimes  = 0;
        qualifying_lasttime  = 0;
        next_daily_resettime = ulong.MaxValue;
        rmb_used             = 0;
        for (uint i = 0; i < mProceeds.Length; ++i)
        {
            mProceeds[i] = 0;
        }
        mWingData = new WingData();

        skillData.Clear();
        mChallengeStage.Clear();
        mWingData.Clear();
//      for(int i = 1 ; i < 13 ; i++)
//      {
//          if(skillData.mLevels.ContainsKey(i))
//              skillData.mLevels[i] = 1;
//          else
//              skillData.mLevels.Add(i , 1);
//      }

        for (uint i = 0; i < (uint)FittingsType.MAX_FITTGINS; i++)
        {
            mFittings[i] = new FittingsData();
        }

        mStageData.Clear();
        mActivity.mActivityTypeCompletedTime.Clear();
        mActivity.mHasCompletedActivity.Clear();
        mZonesData.Clear();
        mCropsData.Clear();
        weapon_skill_unlocked = false;
        firstCharge           = false;
        firstCharge_picked    = false;
    }
Ejemplo n.º 2
0
    public GhostData()
    {
        name          = "Brink";
        level         = 1;
        resId         = 1;
        main_weaponId = 1000;
        sub_weaponId  = 1000;
        mStrenLv      = 0;

        for (uint i = 0; i < (uint)FittingsType.MAX_FITTGINS; i++)
        {
            mFittings[i] = new FittingsData();
        }

        skillData.Clear();
        mWingData    = new WingData();
        mFashionData = new PlayerFashionData();
        mWingData.Clear();
        mMainCropsInfo.Clear();
        mSubCropsInfo.Clear();
    }
Ejemplo n.º 3
0
    public void SyncProperty(other_role_fight_property msg)
    {
        if (msg == null)
        {
            return;
        }

        name          = msg.name;
        level         = (int)msg.level;
        resId         = (int)msg.job;
        main_weaponId = (int)msg.weapon_id;
        sub_weaponId  = (int)msg.sub_weapon_id;
        mStrenLv      = msg.stren_lv;

        skillData.Clear();

        if (msg.skillinfo != null)
        {
            for (int i = 0; i < msg.skillinfo.levels.Count; ++i)
            {
                skillData.mLevels.Add(i, msg.skillinfo.levels[i]);
            }

            for (int i = 0; i < msg.skillinfo.equips.Count && i < SkillMaxCountDefine.MAX_EQUIP_SKILL_NUM; ++i)
            {
                skillData.skills[i] = msg.skillinfo.equips[i];
            }
        }

        if (msg.wing_info != null)
        {
            if (msg.wing_info.unlock_count != null)
            {
                if (mWingData.wingItems.Count > (int)msg.wing_info.unlock_count.value)
                {
                    //除非重置数据否则不会出现这种情况
                    mWingData.Clear();
                }
            }
            if (msg.wing_info.wearid != null)
            {
                mWingData.mWearId = msg.wing_info.wearid.value;
            }
            if (msg.wing_info.items != null && msg.wing_info.items.Count > 0)
            {
                for (int i = 0; i < msg.wing_info.items.Count; ++i)
                {
                    WingItemData wing_item_data =
                        mWingData.wingItems.Find(x => (x.id == msg.wing_info.items[i].id));
                    if (wing_item_data == null)
                    {
                        wing_item_data = new WingItemData();
                        mWingData.wingItems.Add(wing_item_data);
                        wing_item_data.id    = msg.wing_info.items[i].id;
                        wing_item_data.level = msg.wing_info.items[i].level;
                        mWingData.getPropertyTotal(ref wing_item_data);
                        // GameDebug.Log("添加WingitemData数据" + serverProperty.wing_info.items[i].id);
                    }

                    wing_item_data.id      = msg.wing_info.items[i].id;
                    wing_item_data.level   = msg.wing_info.items[i].level;
                    wing_item_data.process = msg.wing_info.items[i].process;
                    wing_item_data.UpdateProperty();
                }

                EventSystem.Instance.PushEvent(new WingUIEvent(WingUIEvent.WING_GHOST_UPDATE));
            }
        }

        //时装
        role_fashion_info fashion_info = msg.fashion_info;

        if (fashion_info != null)
        {
            if (fashion_info.head_id != null)
            {
                mFashionData.head_id = fashion_info.head_id.value;
                GameDebug.Log("同步Fashion head_id = " + mFashionData.head_id);
            }

            if (fashion_info.uppper_body_id != null)
            {
                mFashionData.upper_body_id = fashion_info.uppper_body_id.value;
                GameDebug.Log("同步Fashion upper_body_id = " + mFashionData.upper_body_id);
            }

            if (fashion_info.lower_body_id != null)
            {
                mFashionData.lower_body_id = fashion_info.lower_body_id.value;
                GameDebug.Log("同步Fashion lower_body_id = " + mFashionData.lower_body_id);
            }

            if (fashion_info.unlock_count != null)
            {
                mFashionData.unlock_count = fashion_info.unlock_count.value;
                GameDebug.Log("同步Fashion unlock_count = " + mFashionData.unlock_count);
            }

            if (fashion_info.items != null)
            {
                for (int i = 0; i < mFashionData.unlock_count; ++i)
                {
                    mFashionData.items[i].id      = fashion_info.items[i].id;
                    mFashionData.items[i].starnum = fashion_info.items[i].starnum;
                    GameDebug.Log("同步Fashion items = " + mFashionData.items[i].id + " starnum =" + mFashionData.items[i].starnum);
                }
            }
        }

        do
        {
            GameDebug.Log("同步对手佣兵信息!");
            mMainCropsInfo.mCropsId      = msg.maincrops.cropsid;
            mMainCropsInfo.mCropsStarslv = msg.maincrops.starslv;
            mSubCropsInfo.mCropsId       = msg.subcrops.cropsid;
            mSubCropsInfo.mCropsStarslv  = msg.subcrops.starslv;
        } while (false);
    }