浏览代码

获取所有材料指令

zhaoyang 2 年之前
父节点
当前提交
7f2d9e05ce

+ 34 - 30
FGUIProject/assets/RoleInfo/components/ComBtn.xml

@@ -14,31 +14,27 @@
       <gearDisplay controller="c1" pages="0"/>
       <Button title="获取所有卡牌" titleFontSize="30"/>
     </component>
-    <component id="n14_lqp0" name="btnSetLv" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,183" size="330,46" group="n26_ysx9">
+    <component id="n63_fpax" name="btnCardMaterials" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,183" size="330,46" group="n28_ysx9">
+      <gearDisplay controller="c1" pages="0"/>
+      <Button title="获取所有材料" titleFontSize="30"/>
+    </component>
+    <component id="n14_lqp0" name="btnSetLv" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,244" size="330,46" group="n26_ysx9">
       <Button title="设置玩家等级" titleFontSize="30"/>
     </component>
-    <text id="n17_lqp0" name="txtRoleLv" xy="332,185" size="119,42" group="n26_ysx9" fontSize="30" autoSize="none" text="99" input="true" prompt="[color=#B6A688]99[/color]" maxLength="3"/>
-    <group id="n26_ysx9" name="n26" xy="1,183" size="450,46" group="n28_ysx9" advanced="true">
+    <text id="n17_lqp0" name="txtRoleLv" xy="332,246" size="119,42" group="n26_ysx9" fontSize="30" autoSize="none" text="99" input="true" prompt="[color=#B6A688]99[/color]" maxLength="3"/>
+    <group id="n26_ysx9" name="n26" xy="1,244" size="450,46" group="n28_ysx9" advanced="true">
       <gearDisplay controller="c1" pages="0,1"/>
     </group>
-    <component id="n15_lqp0" name="btnSetChapter" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,244" size="330,46" group="n27_ysx9">
+    <component id="n15_lqp0" name="btnSetChapter" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,305" size="330,46" group="n27_ysx9">
       <Button title="设置玩家章节" titleFontSize="30"/>
     </component>
-    <text id="n18_lqp0" name="txtChapter" xy="333,245" size="44,42" group="n27_ysx9" fontSize="30" autoSize="none" text="5" input="true" prompt="[color=#B6A688]章[/color]"/>
-    <text id="n24_lqp0" name="n24" xy="454,246" size="34,41" group="n27_ysx9" fontSize="30" text="关"/>
-    <text id="n21_lqp0" name="n21" xy="377,245" size="34,41" group="n27_ysx9" fontSize="30" text="章"/>
-    <text id="n19_lqp0" name="txtChapterLv" xy="411,245" size="42,42" group="n27_ysx9" fontSize="30" autoSize="none" text="1" input="true" prompt="[color=#B6A688]关[/color]"/>
-    <group id="n27_ysx9" name="n27" xy="1,244" size="487,46" group="n28_ysx9" advanced="true">
+    <text id="n18_lqp0" name="txtChapter" xy="333,306" size="44,42" group="n27_ysx9" fontSize="30" autoSize="none" text="5" input="true" prompt="[color=#B6A688]章[/color]"/>
+    <text id="n24_lqp0" name="n24" xy="454,307" size="34,41" group="n27_ysx9" fontSize="30" text="关"/>
+    <text id="n21_lqp0" name="n21" xy="377,306" size="34,41" group="n27_ysx9" fontSize="30" text="章"/>
+    <text id="n19_lqp0" name="txtChapterLv" xy="411,306" size="42,42" group="n27_ysx9" fontSize="30" autoSize="none" text="1" input="true" prompt="[color=#B6A688]关[/color]"/>
+    <group id="n27_ysx9" name="n27" xy="1,305" size="487,46" group="n28_ysx9" advanced="true">
       <gearDisplay controller="c1" pages="0,1"/>
     </group>
-    <component id="n35_u10a" name="btnArenaGrade" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,305" size="330,46" group="n40_u10a">
-      <Button title="设置竞技场段位排行" titleFontSize="30"/>
-    </component>
-    <text id="n36_u10a" name="txtArenaGrade" xy="332,306" size="73,42" group="n40_u10a" fontSize="30" autoSize="none" text="" input="true" prompt="[color=#666666]段位[/color]"/>
-    <text id="n39_u10a" name="txtArenaRank" xy="407,306" size="75,42" group="n40_u10a" fontSize="30" autoSize="none" text="" input="true" prompt="[color=#666666]排行[/color]"/>
-    <group id="n40_u10a" name="n40" xy="0,305" size="482,46" group="n28_ysx9" advanced="true" layout="hz" colGap="2">
-      <gearDisplay controller="c1" pages="0"/>
-    </group>
     <component id="n45_miy3" name="btnAnswerStart" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,366" size="139,46" group="n48_miy3">
       <Button title="答题开始" titleFontSize="30"/>
     </component>
@@ -49,29 +45,37 @@
       <Button title="活动结束" titleFontSize="30"/>
     </component>
     <group id="n48_miy3" name="n48" xy="0,366" size="499,47" group="n28_ysx9" advanced="true" layout="hz" colGap="40" excludeInvisibles="true"/>
-    <component id="n41_gfx4" name="btnLeagueSkill" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,428" size="330,46" group="n44_gfx4">
+    <component id="n35_u10a" name="btnArenaGrade" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,428" size="330,46" group="n40_u10a">
+      <Button title="设置竞技场段位排行" titleFontSize="30"/>
+    </component>
+    <text id="n36_u10a" name="txtArenaGrade" xy="332,429" size="73,42" group="n40_u10a" fontSize="30" autoSize="none" text="" input="true" prompt="[color=#666666]段位[/color]"/>
+    <text id="n39_u10a" name="txtArenaRank" xy="407,429" size="75,42" group="n40_u10a" fontSize="30" autoSize="none" text="" input="true" prompt="[color=#666666]排行[/color]"/>
+    <group id="n40_u10a" name="n40" xy="0,428" size="482,46" group="n28_ysx9" advanced="true" layout="hz" colGap="2">
+      <gearDisplay controller="c1" pages="0"/>
+    </group>
+    <component id="n41_gfx4" name="btnLeagueSkill" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,489" size="330,46" group="n44_gfx4">
       <Button title="学习茶艺技能" titleFontSize="30"/>
     </component>
-    <text id="n42_gfx4" name="txtskillType" xy="332,429" size="92,42" group="n44_gfx4" fontSize="30" autoSize="none" text="" input="true" prompt="[color=#666666]第N层[/color]"/>
-    <group id="n44_gfx4" name="n44" xy="0,428" size="424,46" group="n28_ysx9" advanced="true" layout="hz" colGap="2">
+    <text id="n42_gfx4" name="txtskillType" xy="332,490" size="92,42" group="n44_gfx4" fontSize="30" autoSize="none" text="" input="true" prompt="[color=#666666]第N层[/color]"/>
+    <group id="n44_gfx4" name="n44" xy="0,489" size="424,46" group="n28_ysx9" advanced="true" layout="hz" colGap="2">
       <gearDisplay controller="c1" pages="0"/>
     </group>
-    <component id="n62_ebfi" name="btnMaxFightSpeed" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,489" size="330,46" group="n28_ysx9">
+    <component id="n62_ebfi" name="btnMaxFightSpeed" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,550" size="330,46" group="n28_ysx9">
       <gearDisplay controller="c1" pages="0"/>
       <Button title="8倍战斗速度" titleFontSize="30"/>
     </component>
-    <component id="n60_y5mt" name="btnAddLeagueNum" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,550" size="166,46" group="n53_y5mt">
+    <component id="n60_y5mt" name="btnAddLeagueNum" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,611" size="166,46" group="n53_y5mt">
       <Button title="添加联盟值" titleFontSize="30"/>
     </component>
-    <text id="n50_y5mt" name="AddLeagueNumType" xy="184,550" size="139,42" group="n53_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数类型[/size][/color]" keyboardType="4"/>
-    <text id="n51_y5mt" name="AddNum" xy="354,550" size="141,42" group="n53_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数值[/size][/color]" keyboardType="4"/>
-    <group id="n53_y5mt" name="n53" xy="1,550" size="494,46" group="n28_ysx9" advanced="true"/>
-    <component id="n61_y5mt" name="btnSetLeaguNum" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,611" size="166,46" group="n58_y5mt">
+    <text id="n50_y5mt" name="AddLeagueNumType" xy="184,611" size="139,42" group="n53_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数类型[/size][/color]" keyboardType="4"/>
+    <text id="n51_y5mt" name="AddNum" xy="354,611" size="141,42" group="n53_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数值[/size][/color]" keyboardType="4"/>
+    <group id="n53_y5mt" name="n53" xy="1,611" size="494,46" group="n28_ysx9" advanced="true"/>
+    <component id="n61_y5mt" name="btnSetLeaguNum" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,672" size="166,46" group="n58_y5mt">
       <Button title="设置联盟值" titleFontSize="30"/>
     </component>
-    <text id="n55_y5mt" name="SetLeagueNumType" xy="186,611" size="139,42" group="n58_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数类型[/size][/color]" keyboardType="4"/>
-    <text id="n56_y5mt" name="SetNum" xy="354,611" size="141,42" group="n58_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数值[/size][/color]" keyboardType="4"/>
-    <group id="n58_y5mt" name="n58" xy="1,611" size="494,46" group="n28_ysx9" advanced="true"/>
-    <group id="n28_ysx9" name="n28" xy="0,0" size="499,657" advanced="true" layout="vt" lineGap="15" excludeInvisibles="true"/>
+    <text id="n55_y5mt" name="SetLeagueNumType" xy="186,672" size="139,42" group="n58_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数类型[/size][/color]" keyboardType="4"/>
+    <text id="n56_y5mt" name="SetNum" xy="354,672" size="141,42" group="n58_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数值[/size][/color]" keyboardType="4"/>
+    <group id="n58_y5mt" name="n58" xy="1,672" size="494,46" group="n28_ysx9" advanced="true"/>
+    <group id="n28_ysx9" name="n28" xy="0,0" size="499,718" advanced="true" layout="vt" lineGap="15" excludeInvisibles="true"/>
   </displayList>
 </component>

+ 12 - 9
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/RoleInfo/UI_ComBtn.cs

@@ -11,17 +11,18 @@ namespace UI.RoleInfo
         public GButton m_btnAll;
         public GButton m_btnGetAllDressUpItem;
         public GButton m_btnGetAllCardItem;
+        public GButton m_btnCardMaterials;
         public GButton m_btnSetLv;
         public GTextInput m_txtRoleLv;
         public GButton m_btnSetChapter;
         public GTextInput m_txtChapter;
         public GTextInput m_txtChapterLv;
-        public GButton m_btnArenaGrade;
-        public GTextInput m_txtArenaGrade;
-        public GTextInput m_txtArenaRank;
         public GButton m_btnAnswerStart;
         public GButton m_btnAnswerEnd;
         public GButton m_btnAnswerActiveEnd;
+        public GButton m_btnArenaGrade;
+        public GTextInput m_txtArenaGrade;
+        public GTextInput m_txtArenaRank;
         public GButton m_btnLeagueSkill;
         public GTextInput m_txtskillType;
         public GButton m_btnMaxFightSpeed;
@@ -82,17 +83,18 @@ namespace UI.RoleInfo
             m_btnAll = (GButton)comp.GetChild("btnAll");
             m_btnGetAllDressUpItem = (GButton)comp.GetChild("btnGetAllDressUpItem");
             m_btnGetAllCardItem = (GButton)comp.GetChild("btnGetAllCardItem");
+            m_btnCardMaterials = (GButton)comp.GetChild("btnCardMaterials");
             m_btnSetLv = (GButton)comp.GetChild("btnSetLv");
             m_txtRoleLv = (GTextInput)comp.GetChild("txtRoleLv");
             m_btnSetChapter = (GButton)comp.GetChild("btnSetChapter");
             m_txtChapter = (GTextInput)comp.GetChild("txtChapter");
             m_txtChapterLv = (GTextInput)comp.GetChild("txtChapterLv");
-            m_btnArenaGrade = (GButton)comp.GetChild("btnArenaGrade");
-            m_txtArenaGrade = (GTextInput)comp.GetChild("txtArenaGrade");
-            m_txtArenaRank = (GTextInput)comp.GetChild("txtArenaRank");
             m_btnAnswerStart = (GButton)comp.GetChild("btnAnswerStart");
             m_btnAnswerEnd = (GButton)comp.GetChild("btnAnswerEnd");
             m_btnAnswerActiveEnd = (GButton)comp.GetChild("btnAnswerActiveEnd");
+            m_btnArenaGrade = (GButton)comp.GetChild("btnArenaGrade");
+            m_txtArenaGrade = (GTextInput)comp.GetChild("txtArenaGrade");
+            m_txtArenaRank = (GTextInput)comp.GetChild("txtArenaRank");
             m_btnLeagueSkill = (GButton)comp.GetChild("btnLeagueSkill");
             m_txtskillType = (GTextInput)comp.GetChild("txtskillType");
             m_btnMaxFightSpeed = (GButton)comp.GetChild("btnMaxFightSpeed");
@@ -109,17 +111,18 @@ namespace UI.RoleInfo
             m_btnAll = null;
             m_btnGetAllDressUpItem = null;
             m_btnGetAllCardItem = null;
+            m_btnCardMaterials = null;
             m_btnSetLv = null;
             m_txtRoleLv = null;
             m_btnSetChapter = null;
             m_txtChapter = null;
             m_txtChapterLv = null;
-            m_btnArenaGrade = null;
-            m_txtArenaGrade = null;
-            m_txtArenaRank = null;
             m_btnAnswerStart = null;
             m_btnAnswerEnd = null;
             m_btnAnswerActiveEnd = null;
+            m_btnArenaGrade = null;
+            m_txtArenaGrade = null;
+            m_txtArenaRank = null;
             m_btnLeagueSkill = null;
             m_txtskillType = null;
             m_btnMaxFightSpeed = null;

+ 14 - 0
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/GMPanelView.cs

@@ -41,6 +41,7 @@ namespace GFGGame
             _ui.m_ComBtn.m_btnAddLeagueNum.onClick.Add(OnClickBtnLeagueAddNum);
             _ui.m_ComBtn.m_btnSetLeaguNum.onClick.Add(OnClickBtnLeagueSetNum);
             _ui.m_ComBtn.m_btnMaxFightSpeed.onClick.Add(OnClickBtnMaxFightSpeed);
+            _ui.m_ComBtn.m_btnCardMaterials.onClick.Add(OnClickBtnMaterials);
             _ui.m_btnAddItem.onClick.Add(OnClickBtnAddItem);
             _ui.m_btnGM.onClick.Add(OnClickBtnGM);
             _ui.m_btnAddNum.onClick.Add(OnClickBtnAddCount);
@@ -233,12 +234,25 @@ namespace GFGGame
             _ui.m_ComBtn.m_txtChapterLv.text = "1";
             OnClickBtnSetChapter();
             OnClickBtnSkipCheckOpen();
+            OnClickBtnMaterials();
         }
 
         private void OnClickBtnMaxFightSpeed()
         {
             FightDataManager.Instance.maxFightSpeed = 8;
         }
+        private void OnClickBtnMaterials()
+        {
+            List<ItemCfg> itemCfgs = ItemCfgArray.Instance.GetCfgsByitemType(ConstItemType.ITEM);
+
+            for (int i = 0; i < itemCfgs.Count; i++)
+            {
+                string content = string.Format("{0} {1}", itemCfgs[i].id, 1000);
+                string successMessage = string.Format("已获取 【{0} * {1}】", itemCfgs[i].name, 1000);
+                GMController.SendGMCommand("getItem " + content, successMessage).Coroutine();
+            }
+
+        }
         private void OnClickBtnGM(EventContext context)
         {
             string content = _ui.m_inputGM.text;

二进制
GameClient/Assets/ResIn/UI/RoleInfo/RoleInfo_fui.bytes