Exemple #1
0
 /// <summary>
 /// 注销
 /// </summary>
 protected virtual void UnRegist(MainPlayerMng _main)
 {
     MsgHander.UnRegist(0xDA01, S2C_OnGotOrderID);
     MsgHander.UnRegist(0xD819, S2C_OnGotTestChargeData);
     TestRechargeRewardDiamo  = 0;
     TestRechargeRewardVipExp = 0;
 }
Exemple #2
0
 /// <summary>
 /// 注册
 /// </summary>
 protected virtual void Init(MainPlayerMng _main)
 {
     MsgHander.Regist(0xD514, S2C_OnGetGuildSkillList);
     C2S_AskGuildSkillList();
     //		MsgHander.Regist(0xD401, S2C_OnGetUseSkillList);
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate += ChangeAutoUseSkill;
 }
Exemple #3
0
    public void S2C_OnGetMainPlayerInfo(Pt _info)
    {
        isLogin = true;
        //Debug.logger.Log("S2C_OnGetMainPlayerInfo");
        pt_usr_info_b102 pt = _info as pt_usr_info_b102;

        GameCenter.mainPlayerMng = MainPlayerMng.CreateNew(new MainPlayerInfo(pt));
        GameCenter.mainPlayerMng.C2S_LoginInGame();
        GameCenter.mainPlayerMng.ApplySubData();
        if (MainPlayerMng.OnCreateNew != null)
        {
            MainPlayerMng.OnCreateNew();
        }
        if (GameCenter.instance.isPlatform)
        {
            MainPlayerInfo mainPlayerInfo = GameCenter.mainPlayerMng.MainPlayerInfo;
            //这里必须加角色创建时间(中间件要求) By邓成
            string playerName = mainPlayerInfo.Name + "|" + GetPlayerLastLoginTime(mainPlayerInfo.ServerInstanceID);
            LynSdkManager.Instance.UsrEnterGame(LoginServerID, LoginServerName, (ulong)mainPlayerInfo.ServerInstanceID, playerName, mainPlayerInfo.CurLevel,
                                                mainPlayerInfo.Prof.ToString(), mainPlayerInfo.GuildID.ToString(), mainPlayerInfo.VipLevel.ToString(), mainPlayerInfo.FightValue.ToString(), PlatformID);
            YvVoiceSdk.YvVoiceLogin(mainPlayerInfo.Name, mainPlayerInfo.ServerInstanceID);//云娃语音登录
            //if (GameCenter.instance.isDataEyePattern)
            //{
            //    DCAccount.setLevel(GameCenter.mainPlayerMng.MainPlayerInfo.CurLevel);
            //    DCAccount.login(Login_ID.ToString(), LoginServerName);
            //}
        }
    }
Exemple #4
0
 /// <summary>
 /// 注销
 /// </summary>
 protected void UnRegist(MainPlayerMng _main)
 {
     MsgHander.UnRegist(0xD412, S2C_GetFashionList);
     MsgHander.UnRegist(0xD414, S2C_PutFashion);
     MsgHander.UnRegist(0xD788, S2C_UpdateFashionLev);
     ResetData();
 }
Exemple #5
0
 /// <summary>
 /// 注销
 /// </summary>
 protected virtual void UnRegist(MainPlayerMng _main)
 {
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate -= ChangeAutoUseSkill;
     MsgHander.UnRegist(0xD911, S2C_GetAllOpenServerRewardInfo);
     MsgHander.UnRegist(0xD913, S2C_GetOpenServerRewardResult);
     MsgHander.UnRegist(0xD961, S2C_GetLotteryInfo);
     MsgHander.UnRegist(0xD963, S2C_GetLotteryRecord);
     MsgHander.UnRegist(0xD965, S2C_GetLotteryResult);
     MsgHander.UnRegist(0xC128, S2C_GetTarotInfo);
     MsgHander.UnRegist(0xC129, S2C_GetTarotReward);
     MsgHander.UnRegist(0xD990, S2C_GetDailyFirstRechargeInfo);
     MsgHander.UnRegist(0xD991, S2C_CloseDailyFirstRecharge);
     GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate -= RefreshOpen;
     MainPlayerMng.OnCreateNew -= FirstIn;
     CanOpen     = false;
     serverData  = null;
     isAccord    = false;
     lotteryData = null;
     lottryResult.Clear();
     lottryRecord.Clear();
     isRotateOver      = false;
     curOpenServerType = OpenServerType.none;
     isRotating        = false;
     taroatRewards.Clear();
     wdfTaroatData       = null;
     rebackPercent       = 0;
     reminTime           = 0;
     isOpenFirstRecharge = false;
 }
Exemple #6
0
 /// <summary>
 /// 注销
 /// </summary>
 protected virtual void UnRegist(MainPlayerMng _main)
 {
     MsgHander.UnRegist(0xD550, S2C_GetMarketItem);
     MsgHander.UnRegist(0xD555, S2C_GetMarketItemFeedBack);
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate -= ChangeAutoUseSkill;
     ResetData();
 }
Exemple #7
0
 /// <summary>
 /// 注册
 /// </summary>
 protected void Init(MainPlayerMng _main)
 {
     MsgHander.Regist(0xD412, S2C_GetFashionList);
     MsgHander.Regist(0xD414, S2C_PutFashion);
     MsgHander.Regist(0xD788, S2C_UpdateFashionLev);
     //GetAllFashion ();
     C2S_AskFashionDic();
 }
Exemple #8
0
 /// <summary>
 /// 注销
 /// </summary>
 protected virtual void UnRegist(MainPlayerMng _main)
 {
     //371出售  372 回购 373 购买次数   375 请求
     //	MsgHander.UnRegist(0xD372, S2C_OnGetRedeemItemList);
     //		MsgHander.UnRegist(0xD100, S2C_OnGetSkillList);
     //		MsgHander.UnRegist(0xD401, S2C_OnGetUseSkillList);
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate -= ChangeAutoUseSkill;
 }
Exemple #9
0
 /// <summary>
 /// 注销
 /// </summary>
 protected virtual void UnRegist(MainPlayerMng _main)
 {
     LittleHelperDic.Clear();
     LittleHelperTypeDic.Clear();
     //		MsgHander.UnRegist(0xD100, S2C_OnGetSkillList);
     //		MsgHander.UnRegist(0xD401, S2C_OnGetUseSkillList);
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate -= ChangeAutoUseSkill;
 }
Exemple #10
0
 /// <summary>
 /// 注册
 /// </summary>
 protected virtual void Init(MainPlayerMng _main)
 {
     GetAllOnlineReward();
     MsgHander.Regist(0xD763, S2C_GetOnlineRewardItemInfo);
     MsgHander.Regist(0xC107, S2C_OnlineRewardLottery);
     C2S_AskOnlineRewardInfo(2);
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate += ChangeAutoUseSkill;
 }
Exemple #11
0
 /// <summary>
 /// 初始化(包含协议注册)
 /// </summary>
 protected void Init(MainPlayerMng _father)
 {
     foreach (MagicWeaponRef data in ConfigMng.Instance.MagicWeaponRefTabel.Values)
     {
         magicInfoDic[data.id] = new MagicWeaponInfo(data);
     }
     MsgHander.Regist(0xD309, S2C_GetMagicData);
 }
Exemple #12
0
    /// <summary>
    /// 注册
    /// </summary>
    protected virtual void Init(MainPlayerMng _main)
    {
        MsgHander.Regist(0xD822, S2C_OnGetDownReward);

        //MsgHander.Regist(0xD372, S2C_OnGetRedeemItemList);
        //		MsgHander.Regist(0xD401, S2C_OnGetUseSkillList);
        //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate += ChangeAutoUseSkill;
    }
Exemple #13
0
 /// <summary>
 /// 注册
 /// </summary>
 protected virtual void Init(MainPlayerMng _main)
 {
     MsgHander.Regist(0xD557, S2C_GetGuildFightInfo);
     MsgHander.Regist(0xD556, S2C_GetGuildFightScore);
     MsgHander.Regist(0xD558, S2C_GetGuildFightNum);
     MsgHander.Regist(0xD695, S2C_GetGuildFightRemainTime);
     MsgHander.Regist(0xD694, S2C_GetGuildFightEnd);
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate += ChangeAutoUseSkill;
 }
Exemple #14
0
 /// <summary>
 /// 注册
 /// </summary>
 protected virtual void Init(MainPlayerMng _main)
 {
     LittleHelperDic     = ConfigMng.Instance.GetLittleHelperDic();
     LittleHelperTypeDic = ConfigMng.Instance.GetLittleHelperTypeDic();
     NeedType            = LittleHelpType.STRONG;
     //Debug.Log("长度分别为" + LittleHelperDic.Count + ":" + LittleHelperTypeDic.Count);
     //		MsgHander.Regist(0xD100, S2C_OnGetSkillList);
     //		MsgHander.Regist(0xD401, S2C_OnGetUseSkillList);
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate += ChangeAutoUseSkill;
 }
Exemple #15
0
 /// <summary>
 /// 注册
 /// </summary>
 protected virtual void Init(MainPlayerMng _main)
 {
     MsgHander.Regist(0xD631, S2C_OnGetTradeReq);
     MsgHander.Regist(0xD633, S2C_OnGetTradeStart);
     MsgHander.Regist(0xD635, S2C_OnGetTradeLock);
     MsgHander.Regist(0xD639, S2C_OnGetReplyTrade);
     MsgHander.Regist(0xD638, S2C_OnGetTradeFinish);
     //		MsgHander.Regist(0xD401, S2C_OnGetUseSkillList);
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate += ChangeAutoUseSkill;
 }
Exemple #16
0
 /// <summary>
 /// 注销
 /// </summary>
 protected virtual void UnRegist(MainPlayerMng _main)
 {
     MsgHander.UnRegist(0xD777, S2C_GetAllSoulCrit);
     MsgHander.UnRegist(0xD446, S2C_GetAllSoulNum);
     MsgHander.UnRegist(0xD447, S2C_GetUpdateSoulNum);
     MsgHander.UnRegist(0xC101, S2C_GetUpdateSoulReward);
     ResetData();
     //		MsgHander.UnRegist(0xD401, S2C_OnGetUseSkillList);
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate -= ChangeAutoUseSkill;
 }
Exemple #17
0
 /// <summary>
 /// 注销(包含清空和还原数据)
 /// </summary>
 protected void UnRegist(MainPlayerMng _father)
 {
     MsgHander.UnRegist(0xD309, S2C_GetMagicData);
     magicInfoDic.Clear();
     newRefineLev   = 0;
     newAddSoulLev  = 0;
     newRefineStar  = 0;
     newAddSoulStar = 0;
     isFirst        = true;
     isAddExp       = false;
 }
Exemple #18
0
 /// <summary>
 /// 注销
 /// </summary>
 protected virtual void UnRegist(MainPlayerMng _main)
 {
     MsgHander.UnRegist(0xD557, S2C_GetGuildFightInfo);
     MsgHander.UnRegist(0xD556, S2C_GetGuildFightScore);
     MsgHander.UnRegist(0xD558, S2C_GetGuildFightNum);
     MsgHander.UnRegist(0xD695, S2C_GetGuildFightRemainTime);
     MsgHander.UnRegist(0xD694, S2C_GetGuildFightEnd);
     //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate -= ChangeAutoUseSkill;
     isGuildFight    = false;
     vectorGuildName = string.Empty;
 }
Exemple #19
0
 /// <summary>
 /// 注销
 /// </summary>
 protected virtual void UnRegist(MainPlayerMng _main)
 {
     //371出售  372 回购 373 购买次数   375 请求
     MsgHander.UnRegist(0xD373, S2C_OnGetBuyNums);
     MallItemDic.Clear();
     RestrictionMallItemDic.Clear();
     StrengthenMallItemDic.Clear();
     PetMallItemDic.Clear();
     DailyMallItemDic.Clear();
     FashionMallItemDic.Clear();
     CashMallItemDic.Clear();
 }
Exemple #20
0
    /// <summary>
    /// 注册
    /// </summary>
    protected virtual void Init(MainPlayerMng _main)
    {
        for (int i = 0; i < ConfigMng.Instance.AllMarketTypeItem.Count; i++)
        {
            MarketTypes.Add(new MarketTypeInfo(i + 1));
        }

        InitLimit(0);
        MsgHander.Regist(0xD550, S2C_GetMarketItem);
        MsgHander.Regist(0xD555, S2C_GetMarketItemFeedBack);
        //GameCenter.mainPlayerMng.MainPlayerInfo.OnBaseUpdate += ChangeAutoUseSkill;
    }
Exemple #21
0
 /// <summary>
 /// 返回该管理类的唯一实例
 /// </summary>
 /// <returns></returns>
 public static DownloadBonusMng CreateNew(MainPlayerMng _main)
 {
     if (_main.downloadBonusMng == null)
     {
         DownloadBonusMng DownloadBonusMng = new DownloadBonusMng();
         DownloadBonusMng.Init(_main);
         return(DownloadBonusMng);
     }
     else
     {
         _main.downloadBonusMng.UnRegist(_main);
         _main.downloadBonusMng.Init(_main);
         return(_main.downloadBonusMng);
     }
 }
Exemple #22
0
 /// <summary>
 /// 返回一个全新的管理类对象实例
 /// </summary>
 /// <param name="_father"></param>
 /// <returns></returns>
 public static WingMng CreateNew(MainPlayerMng _father)
 {
     if (_father.wingMng == null)
     {
         WingMng wingMng = new WingMng();
         wingMng.Init(_father);
         return(wingMng);
     }
     else
     {
         _father.wingMng.UnRegist();
         _father.wingMng.Init(_father);
         return(_father.wingMng);
     }
 }
Exemple #23
0
 /// <summary>
 /// 返回该管理类的唯一实例 by 贺丰
 /// </summary>
 /// <returns></returns>
 public static NewMallMng CreateNew(MainPlayerMng _main)
 {
     if (_main.newMallMng == null)
     {
         NewMallMng NewMallMng = new NewMallMng();
         NewMallMng.Init(_main);
         return(NewMallMng);
     }
     else
     {
         _main.newMallMng.UnRegist(_main);
         _main.newMallMng.Init(_main);
         return(_main.newMallMng);
     }
 }
Exemple #24
0
    /// <summary>
    /// 注册
    /// </summary>
    protected virtual void Init(MainPlayerMng _main)
    {
        Dictionary <int, MallRef> all = ConfigMng.Instance.AllMallItem;

        using (var e = all.GetEnumerator())
        {
            while (e.MoveNext())
            {
                MallItemDic[e.Current.Key] = new MallItemInfo(e.Current.Key);
            }
        }
        C2S_AskBuyItemNum();
        CurMallType = MallItemType.RESTRICTION;
        MsgHander.Regist(0xD373, S2C_OnGetBuyNums);
    }
Exemple #25
0
 /// <summary>
 /// 返回该管理类的唯一实例
 /// </summary>
 /// <returns></returns>
 public static GuildFightMng CreateNew(MainPlayerMng _main)
 {
     if (_main.guildFightMng == null)
     {
         GuildFightMng GuildFightMng = new GuildFightMng();
         GuildFightMng.Init(_main);
         return(GuildFightMng);
     }
     else
     {
         _main.guildFightMng.UnRegist(_main);
         _main.guildFightMng.Init(_main);
         return(_main.guildFightMng);
     }
 }
Exemple #26
0
 /// <summary>
 /// 返回该管理类的唯一实例
 /// </summary>
 /// <returns></returns>
 public static BuyMng CreateNew(MainPlayerMng _main)
 {
     if (_main.buyMng == null)
     {
         BuyMng BuyMng = new BuyMng();
         BuyMng.Init(_main);
         return(BuyMng);
     }
     else
     {
         _main.buyMng.UnRegist(_main);
         _main.buyMng.Init(_main);
         return(_main.buyMng);
     }
 }
Exemple #27
0
 public static RebornMng CreateNew(MainPlayerMng _main)
 {
     if (_main.rebornMng == null)
     {
         RebornMng rebornMng = new RebornMng();
         rebornMng.Init(_main);
         return(rebornMng);
     }
     else
     {
         _main.rebornMng.UnRegist();
         _main.rebornMng.Init(_main);
         return(_main.rebornMng);
     }
 }
Exemple #28
0
 /// <summary>
 /// 返回该管理类的唯一实例
 /// </summary>
 /// <returns></returns>
 public static MarketMng CreateNew(MainPlayerMng _main)
 {
     if (_main.marketMng == null)
     {
         MarketMng MarketMng = new MarketMng();
         MarketMng.Init(_main);
         return(MarketMng);
     }
     else
     {
         _main.marketMng.UnRegist(_main);
         _main.marketMng.Init(_main);
         return(_main.marketMng);
     }
 }
Exemple #29
0
 public static AchievementMng CreateNew(MainPlayerMng _father)
 {
     if (_father.achievementMng == null)
     {
         AchievementMng achievementMng = new AchievementMng();
         achievementMng.Init();
         return(achievementMng);
     }
     else
     {
         _father.achievementMng.UnRegist();
         _father.achievementMng.Init();
         return(_father.achievementMng);
     }
 }
Exemple #30
0
 /// <summary>
 /// 返回该管理类的唯一实例
 /// </summary>
 /// <returns></returns>
 public static CastSoulMng CreateNew(MainPlayerMng _main)
 {
     if (_main.castSoulMng == null)
     {
         CastSoulMng CastSoulMng = new CastSoulMng();
         CastSoulMng.Init(_main);
         return(CastSoulMng);
     }
     else
     {
         _main.castSoulMng.UnRegist(_main);
         _main.castSoulMng.Init(_main);
         return(_main.castSoulMng);
     }
 }