示例#1
0
 private void HandleGetItemCountCmd(CommandParser.Command param)
 {
     int num = 0;
     int.TryParse(param.GetParam(1), out num);
     ItemInfo info = Globals.Instance.AttDB.ItemDict.GetInfo(num);
     if (info == null)
     {
         return;
     }
     GameUIManager.mInstance.ShowMessageTip(string.Format("{0} count = {1}", info.Name, Globals.Instance.Player.ItemSystem.GetEquipCount(num)), 0f, 0f);
 }
示例#2
0
 private void HandleSetCombatPetCmd(CommandParser.Command param)
 {
     int slot = 0;
     int.TryParse(param.GetParam(1), out slot);
     ulong petID = 0uL;
     ulong.TryParse(param.GetParam(2), out petID);
     MC2S_SetCombatPet mC2S_SetCombatPet = new MC2S_SetCombatPet();
     mC2S_SetCombatPet.Slot = slot;
     mC2S_SetCombatPet.PetID = petID;
     Globals.Instance.CliSession.Send(195, mC2S_SetCombatPet);
 }
示例#3
0
 private void HandleShareAchievementCmd(CommandParser.Command param)
 {
     int iD = 0;
     int.TryParse(param.GetParam(1), out iD);
     MC2S_ShareAchievement mC2S_ShareAchievement = new MC2S_ShareAchievement();
     mC2S_ShareAchievement.ID = iD;
     Globals.Instance.CliSession.Send(731, mC2S_ShareAchievement);
 }
示例#4
0
 private void HandleReplyFriendCmd(CommandParser.Command param)
 {
     ulong gUID = 0uL;
     ulong.TryParse(param.GetParam(1), out gUID);
     int num = 0;
     int.TryParse(param.GetParam(2), out num);
     MC2S_ReplyFriend mC2S_ReplyFriend = new MC2S_ReplyFriend();
     mC2S_ReplyFriend.GUID = gUID;
     mC2S_ReplyFriend.Agree = (num != 0);
     Globals.Instance.CliSession.Send(311, mC2S_ReplyFriend);
 }
示例#5
0
 private void HandleRequestFriendCmd(CommandParser.Command param)
 {
     ulong gUID = 0uL;
     ulong.TryParse(param.GetParam(1), out gUID);
     MC2S_RequestFriend mC2S_RequestFriend = new MC2S_RequestFriend();
     mC2S_RequestFriend.GUID = gUID;
     Globals.Instance.CliSession.Send(309, mC2S_RequestFriend);
 }
示例#6
0
 private void HandleQueryAttCmd(CommandParser.Command param)
 {
     float num = 0f;
     float.TryParse(param.GetParam(1), out num);
     global::Debug.Log(new object[]
     {
         "----------Query Attribute----------"
     });
     List<ActorController> actors = Globals.Instance.ActorMgr.Actors;
     if (num == 0f)
     {
         for (int i = 0; i < actors.Count; i++)
         {
             if (actors[i] == null)
             {
             }
         }
     }
     else if (num == 1f)
     {
         for (int j = 0; j < 5; j++)
         {
             if (actors[j] == null)
             {
             }
         }
     }
     else if (num == 2f)
     {
         for (int k = 5; k < actors.Count; k++)
         {
             if (actors[k] == null)
             {
             }
         }
     }
     global::Debug.Log(new object[]
     {
         "----------------------------------"
     });
 }
示例#7
0
 private void HandleQueryRemotePlayerCmd(CommandParser.Command param)
 {
     ulong playerID = 0uL;
     ulong.TryParse(param.GetParam(1), out playerID);
     MC2S_QueryRemotePlayer mC2S_QueryRemotePlayer = new MC2S_QueryRemotePlayer();
     mC2S_QueryRemotePlayer.PlayerID = playerID;
     Globals.Instance.CliSession.Send(286, mC2S_QueryRemotePlayer);
 }
示例#8
0
 private void HandlePauseCmd(CommandParser.Command param)
 {
     float num = 0f;
     float.TryParse(param.GetParam(1), out num);
     int num2 = 0;
     int.TryParse(param.GetParam(2), out num2);
     if (num2 == 0)
     {
         Globals.Instance.ActorMgr.Pause(num != 0f);
     }
     else
     {
         ActorController actor = Globals.Instance.ActorMgr.GetActor(0);
         if (actor == null)
         {
             global::Debug.Log(new object[]
             {
                 "must in game scene!"
             });
             return;
         }
         Globals.Instance.ActorMgr.PauseActor(num != 0f, actor);
     }
 }
示例#9
0
 private void HandlePetBreakUpCmd(CommandParser.Command param)
 {
     ulong item = 0uL;
     ulong.TryParse(param.GetParam(1), out item);
     MC2S_PetBreakUp mC2S_PetBreakUp = new MC2S_PetBreakUp();
     mC2S_PetBreakUp.PetID.Add(item);
     Globals.Instance.CliSession.Send(413, mC2S_PetBreakUp);
 }
示例#10
0
 private void HandleLuckyRollCmd(CommandParser.Command param)
 {
     int type = 0;
     int.TryParse(param.GetParam(1), out type);
     int num = 0;
     int.TryParse(param.GetParam(2), out num);
     int num2 = 0;
     int.TryParse(param.GetParam(3), out num2);
     MC2S_LuckyRoll mC2S_LuckyRoll = new MC2S_LuckyRoll();
     mC2S_LuckyRoll.Type = type;
     mC2S_LuckyRoll.Flag = (num != 0);
     mC2S_LuckyRoll.Free = (num2 != 0);
     Globals.Instance.CliSession.Send(206, mC2S_LuckyRoll);
 }
示例#11
0
 private void HandlePassTutorialCmd(CommandParser.Command param)
 {
     for (int i = 0; i <= Convert.ToInt32(param.GetParam(1)); i++)
     {
         TutorialEntity.SendTutorialNumToServer(i);
     }
 }
示例#12
0
 private void HandleItemEnhanceCmd(CommandParser.Command param)
 {
     int num = 0;
     int.TryParse(param.GetParam(1), out num);
 }
示例#13
0
 private void HandleGiveFriendEnergyCmd(CommandParser.Command param)
 {
     ulong gUID = 0uL;
     ulong.TryParse(param.GetParam(1), out gUID);
     MC2S_GiveFriendEnergy mC2S_GiveFriendEnergy = new MC2S_GiveFriendEnergy();
     mC2S_GiveFriendEnergy.GUID = gUID;
     Globals.Instance.CliSession.Send(319, mC2S_GiveFriendEnergy);
 }
示例#14
0
 private void HandleGetVoiceCmd(CommandParser.Command param)
 {
     string param2 = param.GetParam(1);
     string text = string.Format("key={0}&host={1}&usernum={2}", param2, GameSetting.Data.ServerID, GameSetting.Data.Account);
     string url = "http://voice.x.netease.com:8020/ma32/getfile?" + text;
     Globals.Instance.CliSession.HttpGet(url, 1514, true, Encoding.ASCII.GetBytes(text));
 }
示例#15
0
 private void HandlePillageStartCmd(CommandParser.Command param)
 {
     ulong num = 0uL;
     ulong.TryParse(param.GetParam(1), out num);
     Globals.Instance.Player.PvpSystem.SetPillageTargetID(num);
     MC2S_PvpPillageStart mC2S_PvpPillageStart = new MC2S_PvpPillageStart();
     mC2S_PvpPillageStart.TargetID = num;
     Globals.Instance.CliSession.Send(816, mC2S_PvpPillageStart);
 }
示例#16
0
 private void HandlePetChangeModelCmd(CommandParser.Command param)
 {
     int index = 0;
     int.TryParse(param.GetParam(1), out index);
     int modelState = 0;
     int.TryParse(param.GetParam(2), out modelState);
     ActorController actor = Globals.Instance.ActorMgr.GetActor(index);
     if (actor != null)
     {
         ModelController component = actor.GetComponent<ModelController>();
         if (component != null)
         {
             component.SetModelState(modelState);
             actor.AnimationCtrler.UpdateAnimCtrl();
         }
     }
 }
示例#17
0
 private void HandlePraisePlayerCmd(CommandParser.Command param)
 {
     ulong gUID = 0uL;
     ulong.TryParse(param.GetParam(1), out gUID);
     MC2S_PraisePlayer mC2S_PraisePlayer = new MC2S_PraisePlayer();
     mC2S_PraisePlayer.GUID = gUID;
     Globals.Instance.CliSession.Send(300, mC2S_PraisePlayer);
 }
示例#18
0
 private void HandlePetDeadCmd(CommandParser.Command param)
 {
     int num = 0;
     int.TryParse(param.GetParam(1), out num);
     for (int i = 1; i < 5; i++)
     {
         ActorController actor = Globals.Instance.ActorMgr.GetActor(i);
         if (actor != null && (num == 0 || i == num))
         {
             actor.DoDamage(actor.MaxHP * 2L, null, false);
         }
     }
 }
示例#19
0
 private void HandleQueryPillageCmd(CommandParser.Command param)
 {
     int itemID = 0;
     int.TryParse(param.GetParam(1), out itemID);
     MC2S_QueryPillageTarget mC2S_QueryPillageTarget = new MC2S_QueryPillageTarget();
     mC2S_QueryPillageTarget.ItemID = itemID;
     Globals.Instance.CliSession.Send(814, mC2S_QueryPillageTarget);
 }
示例#20
0
 private void HandlePetExchangeCmd(CommandParser.Command param)
 {
     ulong petID = 0uL;
     ulong.TryParse(param.GetParam(1), out petID);
     ulong petID2 = 0uL;
     ulong.TryParse(param.GetParam(2), out petID2);
     MC2S_PetExchange mC2S_PetExchange = new MC2S_PetExchange();
     mC2S_PetExchange.PetID1 = petID;
     mC2S_PetExchange.PetID2 = petID2;
     Globals.Instance.CliSession.Send(425, mC2S_PetExchange);
 }
示例#21
0
 private void HandleRemoveBlackListCmd(CommandParser.Command param)
 {
     ulong gUID = 0uL;
     ulong.TryParse(param.GetParam(1), out gUID);
     MC2S_RemoveBlackList mC2S_RemoveBlackList = new MC2S_RemoveBlackList();
     mC2S_RemoveBlackList.GUID = gUID;
     Globals.Instance.CliSession.Send(317, mC2S_RemoveBlackList);
 }
示例#22
0
 private void HandlePetFurtherCmd(CommandParser.Command param)
 {
     ulong petID = 0uL;
     ulong.TryParse(param.GetParam(1), out petID);
     MC2S_PetFurther mC2S_PetFurther = new MC2S_PetFurther();
     mC2S_PetFurther.PetID = petID;
     Globals.Instance.CliSession.Send(404, mC2S_PetFurther);
 }
示例#23
0
 private void HandleAddBuffCmd(CommandParser.Command param)
 {
     int buffID = 0;
     int.TryParse(param.GetParam(1), out buffID);
     int num = 0;
     int.TryParse(param.GetParam(2), out num);
     int index = 0;
     int.TryParse(param.GetParam(3), out index);
     ActorController actor = Globals.Instance.ActorMgr.GetActor(0);
     if (actor == null)
     {
         global::Debug.Log(new object[]
         {
             "must in game scene!"
         });
         return;
     }
     PoolMgr.CreateBuffPrefabPool(buffID);
     if (num == 0)
     {
         actor.AddBuff(buffID, actor);
     }
     else if (num == 1)
     {
         if (actor.AiCtrler.Target != null)
         {
             actor.AiCtrler.Target.AddBuff(buffID, actor);
         }
     }
     else if (num == 2)
     {
         for (int i = 0; i < 5; i++)
         {
             actor = Globals.Instance.ActorMgr.GetActor(i);
             if (actor != null)
             {
                 actor.AddBuff(buffID, actor);
             }
         }
     }
     else if (num == 3)
     {
         actor = Globals.Instance.ActorMgr.GetActor(index);
         if (actor != null)
         {
             actor.AddBuff(buffID, actor);
         }
     }
 }
示例#24
0
 private void HandlePetLevelupCmd(CommandParser.Command param)
 {
     int num = 0;
     int.TryParse(param.GetParam(1), out num);
     long itemID = 0L;
     long.TryParse(param.GetParam(2), out itemID);
     int count = 0;
     int.TryParse(param.GetParam(3), out count);
     long num2 = 0L;
     long.TryParse(param.GetParam(4), out num2);
     int num3 = 0;
     int.TryParse(param.GetParam(5), out num3);
     MC2S_PetLevelup mC2S_PetLevelup = new MC2S_PetLevelup();
     SocketDataEx socket = Globals.Instance.Player.TeamSystem.GetSocket(num);
     if (socket == null)
     {
         global::Debug.LogFormat("pet is empty, slot = {0}", new object[]
         {
             num
         });
     }
     PetDataEx pet = socket.GetPet();
     if (pet != null)
     {
         mC2S_PetLevelup.PetID = pet.Data.ID;
         ItemUpdate itemUpdate = new ItemUpdate();
         itemUpdate.ItemID = (ulong)itemID;
         itemUpdate.Count = count;
         Globals.Instance.CliSession.Send(402, mC2S_PetLevelup);
     }
 }
示例#25
0
 private void HandleResetSceneCD(CommandParser.Command param)
 {
     int sceneID = 0;
     int.TryParse(param.GetParam(1), out sceneID);
     SceneData sceneData = Globals.Instance.Player.GetSceneData(sceneID);
     if (sceneData == null)
     {
         return;
     }
     sceneData.ResetCount = 0;
     sceneData.CoolDown = Globals.Instance.Player.GetTimeStamp();
     sceneData.Times = 0;
 }
示例#26
0
 private void HandlePetRebornCmd(CommandParser.Command param)
 {
     ulong petID = 0uL;
     ulong.TryParse(param.GetParam(1), out petID);
     MC2S_PetReborn mC2S_PetReborn = new MC2S_PetReborn();
     mC2S_PetReborn.PetID = petID;
     Globals.Instance.CliSession.Send(415, mC2S_PetReborn);
 }
示例#27
0
 private void HandleSetFameMessageCmd(CommandParser.Command param)
 {
     string param2 = param.GetParam(1);
     MC2S_SetFameMessage mC2S_SetFameMessage = new MC2S_SetFameMessage();
     mC2S_SetFameMessage.Message = param2;
     Globals.Instance.CliSession.Send(302, mC2S_SetFameMessage);
 }
示例#28
0
 private void HandlePetSkillCmd(CommandParser.Command param)
 {
     int num = 0;
     int.TryParse(param.GetParam(1), out num);
     int index = 0;
     int.TryParse(param.GetParam(2), out index);
     SocketDataEx socket = Globals.Instance.Player.TeamSystem.GetSocket(num);
     if (socket == null)
     {
         global::Debug.LogFormat("pet is empty, slot = {0}", new object[]
         {
             num
         });
     }
     PetDataEx pet = socket.GetPet();
     MC2S_PetSkill mC2S_PetSkill = new MC2S_PetSkill();
     mC2S_PetSkill.PetID = pet.Data.ID;
     mC2S_PetSkill.Index = index;
     Globals.Instance.CliSession.Send(406, mC2S_PetSkill);
 }
示例#29
0
 private void HandleShowAttCmd(CommandParser.Command param)
 {
     int num = 0;
     int.TryParse(param.GetParam(1), out num);
     SocketDataEx socket = Globals.Instance.Player.TeamSystem.GetSocket(num);
     if (socket != null)
     {
         global::Debug.LogFormat("MaxHP = {0}, Attack = {1}, PhysicDefense = {2}, MagicDefense = {3}, Hit = {4}, Dodge = {5}, Crit = {6}, CritResis = {7}, DamagePlus = {8}, DamageMinus = {9}, TotalCombatValue = {10}", new object[]
         {
             socket.MaxHP,
             socket.Attack,
             socket.PhysicDefense,
             socket.MagicDefense,
             socket.GetAtt(5),
             socket.GetAtt(6),
             socket.GetAtt(7),
             socket.GetAtt(8),
             socket.GetAtt(9),
             socket.GetAtt(10),
             Globals.Instance.Player.TeamSystem.GetCombatValue()
         });
     }
     this.SendServerCommand(string.Format("-show_att {0}", num));
 }
示例#30
0
 private void HandleExchangeGiftCodeCmd(CommandParser.Command param)
 {
     string param2 = param.GetParam(1);
     MC2S_ExchangeGiftCode mC2S_ExchangeGiftCode = new MC2S_ExchangeGiftCode();
     mC2S_ExchangeGiftCode.Code = param2;
     Globals.Instance.CliSession.Send(724, mC2S_ExchangeGiftCode);
 }