Forráskód Böngészése

获取指定套装Gm

zhaoyang 2 éve
szülő
commit
0bc1b16372

+ 28 - 21
FGUIProject/assets/RoleInfo/components/ComBtn.xml

@@ -35,47 +35,54 @@
     <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="n45_miy3" name="btnAnswerStart" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,366" size="139,46" group="n48_miy3">
+    <component id="n65_fpax" name="btnGetSuit" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,366" size="330,46" group="n67_fpax">
+      <Button title="获取指定套装" titleFontSize="30"/>
+    </component>
+    <text id="n66_fpax" name="txtSuitId" xy="331,368" size="160,42" group="n67_fpax" fontSize="30" autoSize="none" text="" input="true" prompt="[color=#666666]输入套装id[/color]"/>
+    <group id="n67_fpax" name="n67" xy="0,366" size="491,46" group="n28_ysx9" advanced="true">
+      <gearDisplay controller="c1" pages="0,1"/>
+    </group>
+    <component id="n45_miy3" name="btnAnswerStart" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,427" size="139,46" group="n48_miy3">
       <Button title="答题开始" titleFontSize="30"/>
     </component>
-    <component id="n46_miy3" name="btnAnswerEnd" src="c5sc8h" fileName="components/ButtonGM.xml" xy="179,366" size="135,46" group="n48_miy3">
+    <component id="n46_miy3" name="btnAnswerEnd" src="c5sc8h" fileName="components/ButtonGM.xml" xy="179,427" size="135,46" group="n48_miy3">
       <Button title="答题结束" titleFontSize="30"/>
     </component>
-    <component id="n47_miy3" name="btnAnswerActiveEnd" src="c5sc8h" fileName="components/ButtonGM.xml" xy="354,367" size="145,46" group="n48_miy3">
+    <component id="n47_miy3" name="btnAnswerActiveEnd" src="c5sc8h" fileName="components/ButtonGM.xml" xy="354,428" size="145,46" group="n48_miy3">
       <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="n35_u10a" name="btnArenaGrade" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,428" size="330,46" group="n40_u10a">
+    <group id="n48_miy3" name="n48" xy="0,427" size="499,47" group="n28_ysx9" advanced="true" layout="hz" colGap="40" excludeInvisibles="true"/>
+    <component id="n35_u10a" name="btnArenaGrade" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,489" 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">
+    <text id="n36_u10a" name="txtArenaGrade" xy="332,490" 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,490" 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,489" 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">
+    <component id="n41_gfx4" name="btnLeagueSkill" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,550" size="330,46" group="n44_gfx4">
       <Button title="学习茶艺技能" titleFontSize="30"/>
     </component>
-    <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">
+    <text id="n42_gfx4" name="txtskillType" xy="332,551" 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,550" 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,550" size="330,46" group="n28_ysx9">
+    <component id="n62_ebfi" name="btnMaxFightSpeed" src="c5sc8h" fileName="components/ButtonGM.xml" xy="0,611" 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,611" size="166,46" group="n53_y5mt">
+    <component id="n60_y5mt" name="btnAddLeagueNum" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,672" size="166,46" group="n53_y5mt">
       <Button title="添加联盟值" titleFontSize="30"/>
     </component>
-    <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">
+    <text id="n50_y5mt" name="AddLeagueNumType" xy="184,672" 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,672" 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,672" size="494,46" group="n28_ysx9" advanced="true"/>
+    <component id="n61_y5mt" name="btnSetLeaguNum" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,733" size="166,46" group="n58_y5mt">
       <Button title="设置联盟值" titleFontSize="30"/>
     </component>
-    <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"/>
+    <text id="n55_y5mt" name="SetLeagueNumType" xy="186,733" 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,733" 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,733" size="494,46" group="n28_ysx9" advanced="true"/>
+    <group id="n28_ysx9" name="n28" xy="0,0" size="499,779" advanced="true" layout="vt" lineGap="15" excludeInvisibles="true"/>
   </displayList>
 </component>

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/RoleInfo/UI_ComBtn.cs

@@ -17,6 +17,8 @@ namespace UI.RoleInfo
         public GButton m_btnSetChapter;
         public GTextInput m_txtChapter;
         public GTextInput m_txtChapterLv;
+        public GButton m_btnGetSuit;
+        public GTextInput m_txtSuitId;
         public GButton m_btnAnswerStart;
         public GButton m_btnAnswerEnd;
         public GButton m_btnAnswerActiveEnd;
@@ -89,6 +91,8 @@ namespace UI.RoleInfo
             m_btnSetChapter = (GButton)comp.GetChild("btnSetChapter");
             m_txtChapter = (GTextInput)comp.GetChild("txtChapter");
             m_txtChapterLv = (GTextInput)comp.GetChild("txtChapterLv");
+            m_btnGetSuit = (GButton)comp.GetChild("btnGetSuit");
+            m_txtSuitId = (GTextInput)comp.GetChild("txtSuitId");
             m_btnAnswerStart = (GButton)comp.GetChild("btnAnswerStart");
             m_btnAnswerEnd = (GButton)comp.GetChild("btnAnswerEnd");
             m_btnAnswerActiveEnd = (GButton)comp.GetChild("btnAnswerActiveEnd");
@@ -117,6 +121,8 @@ namespace UI.RoleInfo
             m_btnSetChapter = null;
             m_txtChapter = null;
             m_txtChapterLv = null;
+            m_btnGetSuit = null;
+            m_txtSuitId = null;
             m_btnAnswerStart = null;
             m_btnAnswerEnd = null;
             m_btnAnswerActiveEnd = null;

+ 27 - 2
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/GMPanelView.cs

@@ -42,6 +42,7 @@ namespace GFGGame
             _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_ComBtn.m_btnGetSuit.onClick.Add(OnClickBtnGetSuit);
             _ui.m_btnAddItem.onClick.Add(OnClickBtnAddItem);
             _ui.m_btnGM.onClick.Add(OnClickBtnGM);
             _ui.m_btnAddNum.onClick.Add(OnClickBtnAddCount);
@@ -102,12 +103,12 @@ namespace GFGGame
                 string messageSuc;
                 if (itemNum > 0)
                 {
-                    messageSuc = "�ѻ����Ʒ" + itemId + "*" + itemNum;
+                    messageSuc = "获取 " + itemId + "*" + itemNum;
                     GMController.SendGMCommand("getItem " + content, messageSuc).Coroutine();
                 }
                 else if (itemNum < 0)
                 {
-                    messageSuc = "�ѿ۳���Ʒ" + itemId + "*" + itemNum;
+                    messageSuc = "获取 " + itemId + "*" + itemNum;
                     GMController.SendGMCommand("getItem " + content, messageSuc).Coroutine();
                 }
             }
@@ -253,6 +254,30 @@ namespace GFGGame
             }
 
         }
+
+        private void OnClickBtnGetSuit()
+        {
+            int suitId = int.Parse(_ui.m_ComBtn.m_txtSuitId.text);
+            SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(suitId);
+            if (suitCfg == null)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("套装配置不存在");
+            }
+            for (int i = 0; i < suitCfg.partsArr.Length; i++)
+            {
+                string content = string.Format("{0} {1}", suitCfg.partsArr[i], 1);
+                string name = ItemCfgArray.Instance.GetCfg(suitCfg.partsArr[i]).name;
+                string successMessage = string.Format("已获取 【{0} * {1}】", name, 1000);
+                GMController.SendGMCommand("getItem " + content, successMessage).Coroutine();
+            }
+            for (int i = 0; i < suitCfg.partsOptionalArr.Length; i++)
+            {
+                string content = string.Format("{0} {1}", suitCfg.partsOptionalArr[i], 1);
+                string name = ItemCfgArray.Instance.GetCfg(suitCfg.partsOptionalArr[i]).name;
+                string successMessage = string.Format("已获取 【{0} * {1}】", name, 1000);
+                GMController.SendGMCommand("getItem " + content, successMessage).Coroutine();
+            }
+        }
         private void OnClickBtnGM(EventContext context)
         {
             string content = _ui.m_inputGM.text;

BIN
GameClient/Assets/ResIn/UI/RoleInfo/RoleInfo_fui.bytes