Example #1
0
 public static void ClearLowData()
 {
     charLowData              = null;
     itemLowData              = null;
     stringLowData            = null;
     resourceLowData          = null;
     partnerLowData           = null;
     monsterLowData           = null;
     npcLowData               = null;
     nonInteractiveNpcLowData = null;
     NewbieData               = null;
     skillLowData             = null;
     dungeonData              = null;
     etcData              = null;
     levelLowData         = null;
     mailLowData          = null;
     questLowData         = null;
     enchantLowData       = null;
     missionLowData       = null;
     mapLowData           = null;
     partnerLvLowData     = null;
     shopLowData          = null;
     priceLowData         = null;
     vipLowData           = null;
     iconLowData          = null;
     FormulaLowData       = null;
     guildLowData         = null;
     gatchaRewardLowData  = null;
     loadingLowData       = null;
     titleLowData         = null;
     welfareLowData       = null;
     achievementLowData   = null;
     activeLowData        = null;
     pvpAutoRewardLowData = null;
 }
Example #2
0
        /// <summary>
        /// 用户登陆
        /// </summary>
        /// <param name="loginType">Login type.</param>
        /// <param name="account">Account.</param>
        /// <param name="password">Password.</param>
        /// <param name="facebookAccessToken">Facebook access token.</param>
        /// <param name="timeout">Timeout.</param>
        public static void OpLogin(PVP.LoginType loginType, string account = "", string password = "", string facebookAccessToken = "", float timeout = 5)
        {
            PVPGlobal.isLogined = false;

            PVP.ICM.internetClient.Login( loginType, account, password, facebookAccessToken, timeout);

            if (PVPGlobal.handlerRegister.lockSocketEventHandler != null) {
                PVPGlobal.handlerRegister.lockSocketEventHandler ();
            }
        }
Example #3
0
 void OnPvpBuyBattleCount(C2G.PvpBuyBattleCount packet, C2G.PvpBuyBattleCountAck ack)
 {
     if (ack.use_goods != null)
     {
         Network.PlayerInfo.UseGoods(ack.use_goods);
         GameMain.Instance.UpdatePlayerInfo();
         PVP pvp_menu = GameMain.Instance.GetCurrentMenu().obj.GetComponent <PVP>();
         if (pvp_menu != null)
         {
             pvp_menu.ResetBattleCount();
         }
         base.OnClose();
     }
 }
Example #4
0
 void OnPvpBuyBattleTime(C2G.PvpBuyBattleTime packet, C2G.PvpBuyBattleTimeAck ack)
 {
     if (ack.use_goods != null)
     {
         Network.PlayerInfo.UseGoods(ack.use_goods);
         GameMain.Instance.UpdatePlayerInfo();
         PVP pvp_menu = GameMain.Instance.GetCurrentMenu().obj.GetComponent <PVP>();
         if (pvp_menu != null)
         {
             pvp_menu.ResetAvailableBattleTime();
         }
         base.OnClose();
     }
     else
     {
         //Tooltip.Instance.ShowMessageKey("");
     }
 }
Example #5
0
        public static void Init()
        {
            using (StyxWoW.Memory.AcquireFrame())
            {
                // get locale specific messasge strings we'll check for
                InitializeLocalizedValues();

                // set default values for timed error states
                LastLineOfSightFailure    = DateTime.MinValue;
                LastUnitNotInfrontFailure = DateTime.MinValue;
                SuppressShapeshiftUntil   = DateTime.MinValue;

                // reset the damage history
                DamageHistory = new Queue <Damage>(50);

                // hook combat log event if we are debugging or not in performance critical circumstance
                if (SingularSettings.Debug || (SingularRoutine.CurrentWoWContext != WoWContext.Battlegrounds && !StyxWoW.Me.CurrentMap.IsRaid))
                {
                    AttachCombatLogEvent();
                }

                // add context handler that reacts to context change with above rules for logging
                SingularRoutine.OnWoWContextChanged += HandleContextChanged;

                // hook PVP start timer so we can identify end of prep phase
                PVP.AttachStartTimer();

                // also hook wow error messages
                Lua.Events.AttachEvent("UI_ERROR_MESSAGE", HandleErrorMessage);

                // hook LOOT_BIND_CONFIRM to handle popup appearing when applying certain spells to weapon
                // Lua.Events.AttachEvent("AUTOEQUIP_BIND_CONFIRM", HandleLootBindConfirm);
                // Lua.Events.AttachEvent("LOOT_BIND_CONFIRM", HandleLootBindConfirm);
                Lua.Events.AttachEvent("END_BOUND_TRADEABLE", HandleEndBoundTradeable);

                Lua.Events.AttachEvent("PARTY_MEMBER_DISABLE", HandlePartyMemberDisable);
                Lua.Events.AttachEvent("PARTY_MEMBER_ENABLE", HandlePartyMemberEnable);
            }
        }
Example #6
0
 /// <summary>
 /// 内部调用
 /// </summary>
 /// <param name="c">C.</param>
 internal void OnUpdateCustomData(PVP.MemberCustomData c)
 {
     this.customDataNumber = c.customDataNumber;
     this.custom_data.Clear ();
     foreach(KeyValuePair<String, byte[]> item in c.custom_data){// i=0;i<c.custom_data.Count;i++){
         this.custom_data[item.Key] = item.Value;
     }
 }
Example #7
0
 internal void OnUpdateCustomData(PVP.NewCustomData c)
 {
     this.customDataNumber = c.customDataNumber;
     foreach(KeyValuePair<String, byte[]> item in c.new_data){// i=0;i<c.custom_data.Count;i++){
         this.customData[item.Key] = item.Value;
     }
     for (int i = 0; i < c.deleted_data.Count; i++) {
         if (this.customData.ContainsKey (c.deleted_data [i])) {
             this.customData.Remove (c.deleted_data [i]);
         }
     }
 }
Example #8
0
 public bool OpUpdateRoomCustomData(PVP.UpdateCustomDataRange update_range, Dictionary<String, byte[]> being_updated_data = null, List<string> being_deleted_data = null, Dictionary<String, byte[]> check_data = null, List<string> check_data_not_exits = null, float timeout = 5)
 {
     return PVP.ICM.internetClient.UpdateRoomCustomData (update_range, being_updated_data, being_deleted_data, check_data, check_data_not_exits, timeout);
 }
Example #9
0
    public static void LoadLowDataALLForTool()
    {
        charLowData              = new Character();
        itemLowData              = new Item();
        stringLowData            = new Local();
        resourceLowData          = new Resource();
        partnerLowData           = new Partner();
        monsterLowData           = new Mob();
        npcLowData               = new NpcData();
        nonInteractiveNpcLowData = new NonInteractiveNpcData();
        skillLowData             = new SkillTables();
        NewbieData               = new Newbie();
        dungeonData              = new DungeonTable();
        etcData              = new Etc();
        levelLowData         = new Level();
        mailLowData          = new Mail();
        questLowData         = new Quest();
        enchantLowData       = new Enchant();
        missionLowData       = new MissionTable();
        mapLowData           = new Map();
        partnerLvLowData     = new PartnerLevel();
        shopLowData          = new Shop();
        priceLowData         = new Price();
        vipLowData           = new Vip();
        iconLowData          = new Icon();
        FormulaLowData       = new Formula();
        guildLowData         = new Guild();
        gatchaRewardLowData  = new GatchaReward();
        loadingLowData       = new Loading();
        titleLowData         = new Title();
        welfareLowData       = new Welfare();
        achievementLowData   = new Achievement();
        activeLowData        = new ActiveReward();
        pvpAutoRewardLowData = new PVP();

        charLowData.LoadLowData();
        itemLowData.LoadLowData();
        stringLowData.LoadLowData();
        resourceLowData.LoadLowData();
        partnerLowData.LoadLowData();
        monsterLowData.LoadLowData();
        npcLowData.LoadLowData();
        nonInteractiveNpcLowData.LoadLowData();
        NewbieData.LoadLowData();
        skillLowData.LoadLowData();
        dungeonData.LoadLowData();
        etcData.LoadLowData();
        levelLowData.LoadLowData();
        mailLowData.LoadLowData();
        questLowData.LoadLowData();
        enchantLowData.LoadLowData();
        missionLowData.LoadLowData();
        mapLowData.LoadLowData();
        partnerLvLowData.LoadLowData();
        shopLowData.LoadLowData();
        priceLowData.LoadLowData();
        vipLowData.LoadLowData();
        iconLowData.LoadLowData();
        FormulaLowData.LoadLowData();
        guildLowData.LoadLowData();
        gatchaRewardLowData.LoadLowData();
        loadingLowData.LoadLowData();
        titleLowData.LoadLowData();
        welfareLowData.LoadLowData();
        achievementLowData.LoadLowData();
        activeLowData.LoadLowData();
        pvpAutoRewardLowData.LoadLowData();
    }
        internal void OnUpdateInfo(PVP.UpdateAppUserInfoResult r)
        {
            if (r.level >= 0) {
                this.level = r.level;
            }
            if (r.score >= 0) {
                this.score = r.score;
            }

            if (r.winTimes >= 0) {
                this.winTimes = r.winTimes;
            }

            if (r.loseTimes >= 0) {
                this.loseTimes = r.loseTimes;
            }

            if (r.number > 0) {
                this.number = r.number;
            }

            if (r.customDataNumber > 0) {
                this.customDataNumber = r.customDataNumber;
            }

            if (this.customDataNumber < r.customDataNumber) {
                this.customDataNumber = customDataNumber;
            }

            foreach(KeyValuePair<string, byte[]> item in r.updatedData){
                this.customData [item.Key] = item.Value;
            }

            for (int i = 0; i > r.deletedData.Count; i++) {
                if (this.customData.ContainsKey (r.deletedData [i])) {
                    this.customData.Remove (r.deletedData [i]);
                }
            }
        }