コード例 #1
0
        //Invitations

        //TEST: NEED TO CREATE OBJECT TO SEND PUBLIC PROPERTIES BACK TO GUMP
        //TEST
        public GuildGump(Mobile from, int guildTabPage) : base(10, 10)
        {
            m_Player       = from as PlayerMobile;
            m_GuildTabPage = guildTabPage;

            if (m_Player == null)
            {
                return;
            }

            Guilds.CheckCreateGuildGuildSettings(m_Player);

            m_GumpPageType = m_Player.m_GuildGumpSettings.m_GuildGumpPage;

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            int WhiteTextHue  = 2655;
            int GreenTextHue  = 63;
            int YellowTextHue = 2550;
            int GreyTextHue   = 2401;

            #region Background

            AddImage(132, 193, 103, 2499);
            AddImage(131, 98, 103, 2499);
            AddImage(132, 288, 103, 2499);
            AddImage(528, 369, 103, 2499);
            AddImage(395, 369, 103, 2499);
            AddImage(265, 369, 103, 2499);
            AddImage(132, 369, 103, 2499);
            AddImage(528, 3, 103, 2499);
            AddImage(528, 98, 103, 2499);
            AddImage(528, 193, 103, 2499);
            AddImage(527, 288, 103, 2499);
            AddImage(132, 3, 103, 2499);
            AddImage(265, 3, 103, 2499);
            AddImage(395, 3, 103, 2499);
            AddImage(395, 98, 103, 2499);
            AddImage(395, 193, 103, 2499);
            AddImage(394, 288, 103, 2499);
            AddImage(265, 98, 103, 2499);
            AddImage(265, 193, 103, 2499);
            AddImage(264, 288, 103, 2499);
            AddImage(3, 194, 103, 2499);
            AddImage(3, 272, 103, 2499);
            AddImage(3, 369, 103, 2499);
            AddImage(2, 3, 103, 2499);
            AddImage(2, 97, 103, 2499);
            AddImage(10, 15, 3604, 2052);
            AddImage(10, 108, 3604, 2052);
            AddImage(10, 213, 3604, 2052);
            AddImage(10, 330, 3604, 2052);
            AddImage(147, 15, 3604, 2052);
            AddImage(147, 108, 3604, 2052);
            AddImage(147, 213, 3604, 2052);
            AddImage(147, 330, 3604, 2052);
            AddImage(286, 15, 3604, 2052);
            AddImage(286, 108, 3604, 2052);
            AddImage(286, 213, 3604, 2052);
            AddImage(286, 330, 3604, 2052);
            AddImage(411, 15, 3604, 2052);
            AddImage(411, 108, 3604, 2052);
            AddImage(411, 213, 3604, 2052);
            AddImage(411, 330, 3604, 2052);
            AddImage(531, 15, 3604, 2052);
            AddImage(531, 108, 3604, 2052);
            AddImage(531, 213, 3604, 2052);
            AddImage(531, 330, 3604, 2052);
            AddImage(184, 15, 3604, 2052);
            AddImage(184, 108, 3604, 2052);
            AddImage(184, 213, 3604, 2052);
            AddImage(184, 330, 3604, 2052);

            #endregion

            #region Sidebar

            List <GuildGumpPageType> m_GuildTabs = Guilds.GetGuildPageTypeList(m_Player);

            int GuildTabsPerPage   = 4;
            int TotalGuildTabs     = m_GuildTabs.Count;
            int TotalGuildTabPages = (int)(Math.Ceiling((double)TotalGuildTabs / (double)GuildTabsPerPage));

            if (m_GuildTabPage >= TotalGuildTabPages)
            {
                m_GuildTabPage = TotalGuildTabPages - 1;
            }

            if (m_GuildTabPage < 0)
            {
                m_GuildTabPage = 0;
            }

            int guildTabStartIndex = m_GuildTabPage * GuildTabsPerPage;
            int guildTabEndIndex   = (m_GuildTabPage * GuildTabsPerPage) + (GuildTabsPerPage - 1);

            if (guildTabEndIndex >= TotalGuildTabs)
            {
                guildTabEndIndex = TotalGuildTabs - 1;
            }

            int guildTabCount = guildTabEndIndex - guildTabStartIndex;

            int startX = 12;
            int startY = 50;

            int tabSpacing = 90;

            for (int a = 0; a < guildTabCount + 1; a++)
            {
                int guildTabIndex = guildTabStartIndex + a;
                int buttonIndex   = 20 + guildTabIndex;

                GuildGumpPageType gumpPageType = m_GuildTabs[guildTabIndex];

                #region Guild Tab Images

                int pressedId = 9721;
                int releaseId = 9724;

                if (gumpPageType == m_Player.m_GuildGumpSettings.m_GuildGumpPage)
                {
                    pressedId = 9724;
                    releaseId = 9721;
                }

                switch (gumpPageType)
                {
                case GuildGumpPageType.Messages:
                    AddLabel(startX + 36, startY + 5, 2526, "Messages");
                    AddImage(startX + 60, startY + 32, 10550, 55);
                    AddImage(startX + 88, startY + 32, 10552, 55);
                    AddButton(startX + 74, startY + 46, pressedId, releaseId, buttonIndex, GumpButtonType.Reply, 0);
                    AddItem(startX + -1, startY + 18, 7774);
                    break;

                case GuildGumpPageType.Overview:
                    AddLabel(startX + 34, startY + 5, 2401, "Overview");
                    AddImage(startX + 60, startY + 32, 10550, 2401);
                    AddImage(startX + 88, startY + 32, 10552, 2401);
                    AddButton(startX + 74, startY + 46, pressedId, releaseId, buttonIndex, GumpButtonType.Reply, 0);
                    AddImage(startX + 13, startY + 35, 11016);
                    break;

                case GuildGumpPageType.Invitations:
                    AddItem(startX + 21, startY + 41, 2942);
                    AddItem(startX + -3, startY + 25, 2943);
                    AddLabel(startX + 12, startY + 5, 2564, "Guild Invitations");
                    AddImage(startX + 60, startY + 32, 10550, 2566);
                    AddImage(startX + 88, startY + 32, 10552, 2566);
                    AddButton(startX + 74, startY + 46, pressedId, releaseId, buttonIndex, GumpButtonType.Reply, 0);
                    AddItem(startX + 9, startY + 31, 5359);
                    AddItem(startX + 23, startY + 24, 4031);
                    AddItem(startX + 23, startY + 50, 5357);
                    AddItem(startX + 27, startY + 52, 5357);
                    break;

                case GuildGumpPageType.Members:
                    AddLabel(startX + 35, startY + 5, 64, "Members");
                    AddItem(startX + 69, startY + 46, 6877);
                    AddImage(startX + 60, startY + 32, 10550, 2551);
                    AddImage(startX + 88, startY + 32, 10552, 2551);
                    AddButton(startX + 74, startY + 46, pressedId, releaseId, buttonIndex, GumpButtonType.Reply, 0);
                    AddItem(startX + 20, startY + 29, 10905);
                    AddItem(startX + 19, startY + 33, 3746);
                    break;

                case GuildGumpPageType.Candidates:
                    AddLabel(startX + 27, startY + 4, 2553, "Candidates");
                    AddImage(startX + 60, startY + 32, 10550, 2566);
                    AddImage(startX + 88, startY + 32, 10552, 2566);
                    AddButton(startX + 74, startY + 45, pressedId, releaseId, buttonIndex, GumpButtonType.Reply, 0);
                    AddItem(startX + 28, startY + 45, 4647, 2563);
                    AddItem(startX + 11, startY + 36, 4645, 2563);
                    AddItem(startX + -5, startY + 42, 5018, 2563);
                    break;

                case GuildGumpPageType.CreateGuild:
                    AddImage(startX + 88, startY + 32, 10552, 2401);
                    AddLabel(startX + 25, startY + 5, 2401, "Create Guild");
                    AddImage(startX + 60, startY + 32, 10550, 2401);
                    AddButton(startX + 74, startY + 46, pressedId, releaseId, buttonIndex, GumpButtonType.Reply, 0);
                    AddItem(startX + 15, startY + 29, 3796);
                    break;

                case GuildGumpPageType.Faction:
                    AddLabel(startX + 44, startY + 5, 1256, "Faction");
                    AddItem(startX + -15, startY + 20, 3936);
                    AddItem(startX + 18, startY + 21, 18194);
                    AddItem(startX + 10, startY + 13, 5129);
                    AddItem(startX + 32, startY + 31, 18196);
                    AddItem(startX + 9, startY + 30, 5050);
                    AddItem(startX + 26, startY + 22, 5135, 2500);
                    AddImage(startX + 60, startY + 32, 10550, 1256);
                    AddImage(startX + 88, startY + 32, 10552, 1256);
                    AddItem(startX + 26, startY + 47, 7034);
                    AddButton(startX + 74, startY + 46, pressedId, releaseId, buttonIndex, GumpButtonType.Reply, 0);
                    AddItem(startX + -4, startY + 33, 543);
                    AddItem(startX + 14, startY + 45, 543);
                    break;

                case GuildGumpPageType.Diplomacy:
                    AddItem(startX + 21, startY + 42, 2942);
                    AddItem(startX + -4, startY + 28, 2943);
                    AddItem(startX + 11, startY + 20, 4031);
                    AddItem(startX + 13, startY + 38, 4030);
                    AddItem(startX + 20, startY + 59, 2507);
                    AddItem(startX + 22, startY + 44, 2459);
                    AddLabel(startX + 35, startY + 5, 2606, "Diplomacy");
                    AddImage(startX + 60, startY + 32, 10550, 2606);
                    AddImage(startX + 88, startY + 32, 10552, 2606);
                    AddButton(startX + 74, startY + 46, pressedId, releaseId, buttonIndex, GumpButtonType.Reply, 0);
                    break;
                }

                #endregion

                startY += tabSpacing;
            }

            AddButton(3, 3, 2094, 2095, 1, GumpButtonType.Reply, 0);
            AddLabel(24, -2, 149, "Guide");

            if (m_GuildTabPage > 0)
            {
                AddButton(65, 22, 9900, 9900, 2, GumpButtonType.Reply, 0);
            }

            if (m_GuildTabPage < TotalGuildTabPages - 1)
            {
                AddButton(65, 432, 9906, 9906, 3, GumpButtonType.Reply, 0);
            }

            #endregion

            //-----

            #region Create Guild

            if (m_Player.m_GuildGumpSettings.m_GuildGumpPage == GuildGumpPageType.CreateGuild)
            {
                #region Images

                AddImage(326, 116, 2328, 0);
                AddImage(159, 165, 9809, 0);
                AddItem(485, 115, 1928);
                AddItem(507, 136, 1928);
                AddItem(529, 158, 1928);
                AddItem(551, 180, 1928);
                AddItem(573, 202, 1928);
                AddItem(589, 219, 1928);
                AddItem(466, 134, 1928);
                AddItem(488, 155, 1928);
                AddItem(510, 177, 1928);
                AddItem(532, 199, 1928);
                AddItem(555, 220, 1928);
                AddItem(571, 237, 1928);
                AddItem(445, 154, 1928);
                AddItem(467, 175, 1928);
                AddItem(489, 197, 1928);
                AddItem(511, 219, 1928);
                AddItem(534, 240, 1928);
                AddItem(550, 257, 1928);
                AddItem(424, 176, 1928);
                AddItem(446, 197, 1928);
                AddItem(468, 219, 1928);
                AddItem(490, 241, 1928);
                AddItem(513, 262, 1928);
                AddItem(529, 279, 1928);
                AddItem(606, 235, 1930);
                AddItem(586, 255, 1930);
                AddItem(564, 276, 1930);
                AddItem(544, 295, 1930);
                AddItem(403, 198, 1929);
                AddItem(422, 217, 1929);
                AddItem(443, 238, 1929);
                AddItem(462, 256, 1929);
                AddItem(482, 275, 1929);
                AddItem(504, 295, 1929);
                AddItem(524, 315, 1934);
                AddLabel(212, 86, 149, "Guild Abbreviation");
                AddLabel(212, 46, 149, "Guild Name");
                AddImage(286, 44, 1141, 2400);
                AddImage(335, 85, 2444, 2401);
                AddItem(163, 43, 3796);
                AddLabel(212, 134, 149, "Guild Symbol");
                AddItem(156, 123, 7776);
                AddLabel(369, 16, 149, "Create Guild");
                AddLabel(319, 406, 63, "Confirm and Create Guild");
                AddItem(160, 187, 3823);
                AddLabel(212, 185, 149, "Registration Fee");
                AddItem(470, 146, 6918);
                AddItem(497, 267, 6914);
                AddItem(550, 202, 6916);
                AddItem(516, 291, 6920);
                AddItem(577, 289, 6915);
                AddItem(555, 214, 6917);
                AddItem(523, 344, 6918);
                AddItem(464, 279, 6913);
                AddItem(399, 229, 6916);
                AddItem(486, 158, 6916);
                AddItem(499, 161, 16645);
                AddItem(497, 193, 3823);
                AddItem(592, 232, 6913);
                AddItem(527, 207, 6918);
                AddItem(504, 113, 17074);
                AddItem(412, 170, 633, 2419);
                AddItem(585, 198, 635, 2419);
                AddItem(429, 142, 636, 2419);
                AddItem(604, 153, 16119);
                AddItem(563, 264, 634, 2419);
                AddItem(547, 274, 633, 2419);
                AddItem(592, 252, 6915);
                AddItem(471, 341, 3791);
                AddItem(463, 154, 3786);
                AddItem(378, 214, 3792);
                AddItem(609, 197, 3814);
                AddItem(562, 236, 3790);
                AddItem(442, 144, 3812);
                AddItem(243, 303, 3816);
                AddItem(265, 320, 3808);
                AddItem(276, 275, 3816);
                AddItem(298, 292, 3808);
                AddItem(243, 303, 3816);
                AddItem(265, 320, 3808);
                AddItem(308, 243, 3816);
                AddItem(331, 259, 3808);
                AddItem(297, 230, 3799);
                AddItem(206, 331, 3816);
                AddItem(228, 346, 3808);
                AddItem(199, 313, 4455);
                AddItem(287, 343, 2322);
                AddItem(312, 293, 2322);
                AddItem(208, 355, 2322);
                AddItem(351, 263, 7685, 2401);
                AddItem(330, 325, 7685, 2401);
                AddItem(252, 360, 7685, 2401);
                AddItem(379, 272, 7684, 2401);
                AddItem(475, 310, 7684, 2401);
                AddItem(231, 388, 7684, 2401);
                AddItem(385, 348, 7684, 2401);
                AddItem(447, 321, 7684, 2401);
                AddItem(421, 321, 7682, 2401);
                AddItem(243, 338, 7684, 1107);
                AddItem(292, 326, 7682, 2401);
                AddItem(469, 254, 7684, 2401);
                AddItem(331, 244, 7681, 2415);
                AddItem(232, 324, 7684, 2401);
                AddItem(269, 291, 7684, 2401);
                AddItem(224, 305, 7684, 2401);
                AddItem(331, 287, 7682, 2401);
                AddItem(365, 300, 7684, 2401);
                AddItem(418, 271, 7684, 2401);
                AddItem(601, 178, 7574);
                AddItem(496, 309, 7570);
                AddItem(240, 271, 4465);
                AddItem(272, 253, 4479);
                AddItem(505, 335, 4651);
                AddItem(441, 258, 6937);
                AddItem(397, 288, 6927);
                AddItem(311, 289, 6925);
                AddItem(348, 341, 6922);
                AddItem(214, 346, 6930);
                AddItem(226, 353, 6938);
                AddItem(276, 353, 3786);
                AddItem(391, 254, 6938);
                AddItem(472, 228, 3793);
                AddItem(295, 371, 7684, 2401);
                AddItem(196, 367, 7685, 2401);
                AddItem(368, 241, 7684, 2401);
                AddItem(368, 324, 7685, 2401);
                AddItem(492, 199, 2507, 2415);
                AddItem(507, 199, 3880);
                AddItem(493, 208, 4234, 2499);
                AddItem(436, 92, 3938);
                AddItem(476, 102, 18236);
                AddItem(470, 96, 5128, 2401);
                AddItem(457, 124, 7032);
                AddItem(549, 150, 18194);

                AddItem(541, 142, 5135, 2500);

                AddItem(530, 152, 5114);
                AddItem(532, 248, 18196);
                AddItem(531, 268, 7034);

                AddItem(522, 240, 5133, 2413);

                AddItem(513, 253, 5178);

                AddItem(442, 211, 18210, 2500);
                AddItem(445, 208, 5049, 2500);
                AddItem(437, 199, 5138, 2500);
                AddItem(426, 221, 7028, 2500);

                AddItem(550, 163, 7030);
                AddItem(345, 312, 6930);
                AddItem(261, 330, 6934);
                AddItem(400, 332, 6924);
                AddItem(424, 312, 6883);
                AddItem(310, 352, 6881);
                AddItem(405, 217, 7684, 2401);
                AddItem(341, 273, 3788);
                AddItem(441, 350, 7685, 2401);
                AddItem(467, 336, 7684, 2401);
                AddItem(518, 298, 17075);
                AddItem(538, 205, 3788);
                AddItem(334, 304, 3788);
                AddItem(369, 259, 3790);
                AddItem(263, 331, 6930);
                AddItem(298, 295, 6938);
                AddItem(276, 294, 6883);
                AddItem(480, 293, 7684, 2401);
                AddItem(405, 235, 7684, 2401);
                AddItem(453, 185, 7684, 2401);
                AddItem(304, 325, 3793);

                #endregion

                AddTextEntry(295, 46, 248, 20, WhiteTextHue, 7, "Guild Name", Guilds.GuildNameCharacterLimit);
                AddTextEntry(355, 86, 47, 20, WhiteTextHue, 8, "ABC", Guilds.GuildNameCharacterLimit);

                AddButton(300, 137, 2223, 2223, 4, GumpButtonType.Reply, 0); //Previous Symbol
                AddItem(341, 123, 4014);                                     // Symbol
                AddButton(413, 137, 2224, 2224, 5, GumpButtonType.Reply, 0); //Next Symbol

                AddLabel(341, 185, GreenTextHue, Utility.CreateCurrencyString(Guilds.GuildRegistrationFee));

                AddButton(366, 429, 247, 249, 6, GumpButtonType.Reply, 0); //Create Guild
            }

            #endregion

            #region Invitations

            else if (m_Player.m_GuildGumpSettings.m_GuildGumpPage == GuildGumpPageType.Invitations)
            {
                #region Images

                AddLabel(345, 15, 2563, "Guild Invitations");
                AddLabel(188, 429, WhiteTextHue, "Previous Page");
                AddLabel(552, 429, WhiteTextHue, "Next Page");
                AddImage(299, 39, 2446, 2401);
                AddLabel(508, 39, 149, "Search for Guild Name");
                AddLabel(360, 400, 149, "Page");
                AddLabel(356, 429, 63, "Ignore Guild Invitations");
                AddLabel(157, 400, 2599, "Total Invitations");
                AddLabel(289, 70, 149, "Guild Name");
                AddLabel(605, 70, 149, "Decline");
                AddLabel(534, 70, 149, "Guild Info");
                AddLabel(158, 70, 149, "Accept");
                AddLabel(458, 70, 149, "Expires In");

                #endregion

                AddButton(271, 40, 9909, 9909, 3, GumpButtonType.Reply, 0); //Search Left
                AddTextEntry(308, 40, 158, 20, WhiteTextHue, 10, "Guild Name", Guilds.GuildNameCharacterLimit);
                AddButton(483, 39, 9903, 9903, 4, GumpButtonType.Reply, 0); //Search Right

                AddButton(268, 73, 2117, 2118, 5, GumpButtonType.Reply, 0); //Guild Name Sort

                AddButton(438, 73, 5602, 5606, 6, GumpButtonType.Reply, 0); //Expiration Sort

                //List
                AddButton(165, 90, 9721, 9724, 0, GumpButtonType.Reply, 0);
                AddLabel(218, 97, WhiteTextHue, "Outlands Shipping Company (OSC)");
                AddLabel(448, 95, WhiteTextHue, "24d 18h 20m");
                AddButton(550, 95, 4011, 4013, 0, GumpButtonType.Reply, 0);
                AddButton(614, 90, 2472, 2473, 0, GumpButtonType.Reply, 0);
                //--

                AddLabel(270, 400, WhiteTextHue, "1");                       //Total Invitations
                AddLabel(397, 400, WhiteTextHue, "1/1");                     //Page

                AddButton(154, 429, 4014, 4016, 7, GumpButtonType.Reply, 0); //Previous Page
                AddButton(620, 429, 4005, 4007, 8, GumpButtonType.Reply, 0); //Next Page
                AddButton(322, 426, 9721, 9724, 9, GumpButtonType.Reply, 0); //Ignore Guild Invites
            }

            #endregion

            #region Overview

            else if (m_Player.m_GuildGumpSettings.m_GuildGumpPage == GuildGumpPageType.Overview)
            {
                #region Images

                AddImage(285, 90, 2328, 0);
                AddItem(155, 384, 4647);
                AddItem(156, 191, 8900);
                AddItem(153, 150, 4810, 2563);
                AddLabel(197, 159, 149, "Guildmaster");
                AddLabel(197, 61, 149, "Guild Abbreviation");
                AddLabel(197, 25, 149, "Guild Name");
                AddImage(271, 23, 1141, 2400);
                AddImage(320, 60, 2444, 2401);
                AddItem(151, 22, 3796);
                AddImage(278, 160, 2446, 2401);
                AddLabel(197, 109, 149, "Guild Symbol");
                AddItem(144, 98, 7776);
                AddLabel(197, 203, 149, "Guildhouse");
                AddImage(269, 202, 2446, 2401);
                AddLabel(515, 109, 149, "Faction");
                AddBackground(158, 347, 493, 23, 5100);

                AddLabel(197, 324, 149, "Website");
                AddLabel(197, 392, 149, "My Rank");
                AddImage(256, 391, 2446, 2401);

                AddLabel(503, 392, 149, "Show Guild Title");
                AddItem(454, 397, 3034, 2562);
                AddItem(458, 380, 2978);
                AddLabel(310, 429, 2115, "Resign from Guild");
                AddItem(482, 80, 5402);

                AddLabel(299, 257, 2502, "Players");
                AddLabel(382, 257, 2506, "Characters");
                AddLabel(493, 257, 1256, "Wars");
                AddLabel(553, 257, 2599, "Alliances");

                AddLabel(197, 257, 149, "Guild Age");

                AddItem(164, 250, 3103);
                AddItem(296, 281, 8454, 2500);
                AddItem(383, 281, 8454, 2515);

                AddItem(404, 281, 8455, 2515);
                AddItem(493, 292, 3914);
                AddItem(479, 293, 5049);
                AddItem(558, 295, 4030);
                AddItem(558, 287, 4031);

                #endregion

                Guild guild = m_Player.Guild;

                if (guild == null)
                {
                    return;
                }

                AddLabel(Utility.CenteredTextOffset(405, guild.Name), 25, WhiteTextHue, guild.Name);
                AddLabel(Utility.CenteredTextOffset(354, guild.m_Abbreviation), 61, WhiteTextHue, guild.m_Abbreviation);

                //Get Guild Symbol Detail
                int guildIcon        = guild.m_Icon;
                int guildIconHue     = guild.m_IconHue;
                int guildIconOffsetX = 0;
                int guildIconOffsetY = 0;

                AddItem(300 + guildIconOffsetX, 97 + guildIconOffsetY, guildIcon, guildIconHue); //Guild Symbol

                //Faction
                AddItem(555, 58, 17099, 2603); //Flag
                AddItem(600, 91, 11009, 2603); //Shield
                AddLabel(586, 144, 2603, "Order");

                string guildmasterName = "";

                if (guild.m_Guildmaster != null)
                {
                    guildmasterName = guild.m_Guildmaster.RawName;
                }

                AddLabel(Utility.CenteredTextOffset(365, guildmasterName), 161, WhiteTextHue, guildmasterName);

                string guildHouseOwner    = "";
                string guildHouseLocation = "";

                bool guildHouseExists = false;

                if (guild.m_Guildhouse != null)
                {
                    guildHouseExists = true;

                    if (guild.m_Guildhouse.Owner != null)
                    {
                        guildHouseOwner = "Owned by " + guild.m_Guildhouse.Owner.RawName;
                    }

                    else
                    {
                        guildHouseOwner = "Unknown Owner";
                    }

                    guildHouseLocation = "(Located at " + guild.m_Guildhouse.Location.X.ToString() + "," + guild.m_Guildhouse.Location.Y.ToString() + ")";
                }

                else
                {
                    guildHouseOwner = "-";
                }

                AddLabel(Utility.CenteredTextOffset(358, guildHouseOwner), 203, WhiteTextHue, guildHouseOwner);
                if (guildHouseLocation != "")
                {
                    AddLabel(282, 226, 2599, "(located at 2500, 2500)");
                }

                if (guild.m_Guildhouse != null)
                {
                    AddLabel(473, 203, 2550, "Show Location");
                    AddButton(453, 206, 2117, 2118, 4, GumpButtonType.Reply, 0); //Show Guildhouse Location
                }

                int guildAge = (int)(Math.Floor((DateTime.UtcNow - guild.m_CreationTime).TotalDays));

                string guildAgeText = "";

                if (guildAge > 1)
                {
                    guildAgeText = guildAge.ToString() + " Days";
                }

                else if (guildAge == 1)
                {
                    guildAgeText = "1 Day";
                }

                else
                {
                    guildAgeText = "Brand New";
                }

                int activePlayers    = 25;
                int activeCharacters = 125;
                int wars             = 1;
                int alliances        = 1;

                AddLabel(196, 282, WhiteTextHue, guildAgeText);                //Guild Age
                AddLabel(332, 296, WhiteTextHue, activePlayers.ToString());    //Players
                AddLabel(443, 297, WhiteTextHue, activeCharacters.ToString()); //Characters
                AddLabel(529, 297, WhiteTextHue, wars.ToString());             //Wars
                AddLabel(599, 297, WhiteTextHue, alliances.ToString());        //Alliances

                AddButton(165, 327, 30008, 30009, 5, GumpButtonType.Reply, 0); //Launch Website
                AddLabel(167, 348, WhiteTextHue, guild.m_Website);             //Website

                string rankName = "";

                int rankHue = WhiteTextHue;

                if (m_Player.m_GuildMemberEntry != null)
                {
                    rankName = guild.GetRankName(m_Player.m_GuildMemberEntry.m_Rank);
                    rankHue  = guild.GetRankHue(m_Player.m_GuildMemberEntry.m_Rank);
                }

                AddLabel(Utility.CenteredTextOffset(347, rankName), 392, rankHue, rankName); //Guild Rank

                if (m_Player.m_GuildGumpSettings.m_ShowGuildTitle)
                {
                    AddButton(611, 389, 9724, 9721, 6, GumpButtonType.Reply, 0); //Show Guild Title
                }
                else
                {
                    AddButton(611, 389, 9721, 9724, 6, GumpButtonType.Reply, 0); //Show Guild Title
                }
                AddButton(425, 425, 2472, 2473, 7, GumpButtonType.Reply, 0);     //Resign from Guild
            }

            #endregion

            #region Members

            else if (m_Player.m_GuildGumpSettings.m_GuildGumpPage == GuildGumpPageType.Members)
            {
                #region Images

                AddLabel(365, 15, 2563, "Members");
                AddLabel(280, 70, 149, "Player Name");
                AddLabel(407, 70, 149, "Guild Rank");
                AddLabel(188, 429, WhiteTextHue, "Previous Page");
                AddLabel(552, 429, WhiteTextHue, "Next Page");
                AddLabel(373, 429, 63, "Invite Player to Guild");
                AddLabel(170, 70, 149, "Last Online");
                AddLabel(556, 70, 149, "Fealty");
                AddLabel(604, 70, 149, "Dismiss");
                AddLabel(503, 70, 149, "Manage");
                AddImage(299, 39, 2446, 2401);
                AddLabel(508, 39, 149, "Search for Player");
                AddLabel(360, 400, 149, "Page");
                AddLabel(526, 400, 2550, "Total Members");
                AddLabel(157, 400, 2599, "Online Members");

                #endregion

                AddButton(271, 40, 9909, 9909, 4, GumpButtonType.Reply, 0); //Search Left
                AddTextEntry(308, 40, 158, 20, WhiteTextHue, 12, "Player Name", Guilds.GuildNameCharacterLimit);
                AddButton(483, 39, 9903, 9903, 5, GumpButtonType.Reply, 0); //Search Right

                AddButton(151, 73, 5602, 5606, 6, GumpButtonType.Reply, 0); //Sort Last Online
                AddButton(259, 73, 2117, 2118, 7, GumpButtonType.Reply, 0); //Sort Player Name
                AddButton(387, 73, 2117, 2118, 8, GumpButtonType.Reply, 0); //Sort Rank

                //List
                AddButton(163, 101, 2361, 2361, 0, GumpButtonType.Reply, 0); //Online Icon
                AddLabel(185, 97, 63, "Online");
                AddLabel(272, 97, WhiteTextHue, "Merrill Calder");
                AddLabel(401, 97, 2603, "Guildmaster");
                AddButton(512, 95, 4011, 4013, 0, GumpButtonType.Reply, 0); //Manage Player
                AddButton(564, 92, 9721, 9724, 0, GumpButtonType.Reply, 0); //Declare Fealty
                AddButton(614, 92, 2472, 2473, 0, GumpButtonType.Reply, 0); //Dismiss
                //

                AddLabel(263, 400, WhiteTextHue, "8");                        //Online Members
                AddLabel(397, 400, WhiteTextHue, "10/10");                    //Page
                AddLabel(623, 400, WhiteTextHue, "50");                       //Total Members

                AddButton(154, 429, 4014, 4016, 9, GumpButtonType.Reply, 0);  //Previous Page
                AddButton(620, 429, 4005, 4007, 10, GumpButtonType.Reply, 0); //Next Page
                AddButton(337, 429, 4002, 4004, 11, GumpButtonType.Reply, 0); //Invite Player
            }

            #endregion

            #region Candidates

            else if (m_Player.m_GuildGumpSettings.m_GuildGumpPage == GuildGumpPageType.Candidates)
            {
                AddLabel(365, 15, 2563, "Candidates");
                AddLabel(267, 70, 149, "Player Name");
                AddLabel(188, 429, WhiteTextHue, "Previous Page");
                AddLabel(552, 429, WhiteTextHue, "Next Page");
                AddLabel(373, 429, 63, "Invite Player to Guild");
                AddLabel(548, 70, 149, "Approve");
                AddLabel(605, 70, 149, "Decline");
                AddLabel(466, 70, 149, "Player Info");
                AddLabel(174, 70, 149, "Accepted");
                AddLabel(387, 70, 149, "Expires In");
                AddImage(299, 39, 2446, 2401);
                AddLabel(508, 39, 149, "Search for Player");
                AddLabel(360, 400, 149, "Page");
                AddLabel(513, 400, 2550, "Total Candidates");
                AddLabel(157, 400, 2599, "Total Accepted");

                AddButton(271, 40, 9909, 9909, 4, GumpButtonType.Reply, 0); //Search Left
                AddTextEntry(308, 40, 158, 20, WhiteTextHue, 12, "Player Name", Guilds.GuildNameCharacterLimit);
                AddButton(483, 39, 9903, 9903, 5, GumpButtonType.Reply, 0); //Search Right

                AddButton(154, 73, 2117, 2118, 6, GumpButtonType.Reply, 0); //Sort Accepted
                AddButton(246, 73, 2117, 2118, 7, GumpButtonType.Reply, 0); //Sort Player Name
                AddButton(367, 73, 5602, 5606, 8, GumpButtonType.Reply, 0); //Sort Expiration

                //List
                AddButton(185, 90, 9723, 2151, 0, GumpButtonType.Reply, 0); //Accepted
                AddLabel(260, 95, WhiteTextHue, "Merrill Calder");
                AddLabel(377, 95, WhiteTextHue, "24d 18h 20m");
                AddButton(485, 95, 4011, 4013, 0, GumpButtonType.Reply, 0); //Player Info
                AddButton(559, 90, 2151, 2154, 0, GumpButtonType.Reply, 0); //Approve
                AddButton(614, 90, 2472, 2473, 0, GumpButtonType.Reply, 0); //Decline
                //

                AddLabel(262, 400, WhiteTextHue, "1");   //Total Accepted
                AddLabel(397, 400, WhiteTextHue, "1/1"); //Page
                AddLabel(625, 400, WhiteTextHue, "1");   //Total Candidates

                AddButton(154, 429, 4014, 4016, 9, GumpButtonType.Reply, 0);
                AddButton(620, 429, 4005, 4007, 10, GumpButtonType.Reply, 0);
                AddButton(337, 429, 4002, 4004, 11, GumpButtonType.Reply, 0); //Invite Player
            }

            #endregion

            #region Diplomacy

            else if (m_Player.m_GuildGumpSettings.m_GuildGumpPage == GuildGumpPageType.Diplomacy)
            {
                #region Images

                AddLabel(365, 15, 2606, "Diplomacy");
                AddLabel(244, 70, 149, "Guild Name");
                AddLabel(422, 70, 149, "Relationship");
                AddLabel(188, 429, WhiteTextHue, "Previous Page");
                AddLabel(552, 429, WhiteTextHue, "Next Page");
                AddLabel(373, 429, 63, "Add New Guild");
                AddLabel(609, 70, 149, "Manage");
                AddImage(299, 39, 2446, 2401);
                AddLabel(508, 39, 149, "Search for Guild Name");
                AddLabel(360, 400, 149, "Page");
                AddLabel(546, 70, 149, "Players");

                #endregion

                AddButton(271, 40, 9909, 9909, 4, GumpButtonType.Reply, 0); //Search Left
                AddTextEntry(308, 40, 158, 20, WhiteTextHue, 14, "Guild Name", Guilds.GuildNameCharacterLimit);
                AddButton(483, 39, 9903, 9903, 5, GumpButtonType.Reply, 0); //Search Right

                AddButton(223, 73, 2117, 2118, 6, GumpButtonType.Reply, 0); //Sort Guild Name
                AddButton(400, 73, 5602, 5606, 7, GumpButtonType.Reply, 0); //Sort Relationship
                AddButton(526, 73, 2117, 2118, 8, GumpButtonType.Reply, 0); //Sort Players

                //List
                AddLabel(192, 95, WhiteTextHue, "God's Wrath Clan (GoD)");
                AddLabel(398, 95, 2599, "Alliance Requested");
                AddLabel(561, 95, WhiteTextHue, "5");                       //Players
                AddButton(617, 95, 4011, 4013, 0, GumpButtonType.Reply, 0); //Manage Relationship
                //--

                AddButton(295, 379, 2223, 2223, 9, GumpButtonType.Reply, 0);  //Previous Relationship Filter
                AddLabel(326, 375, 2603, "Show All Relationships");
                AddButton(473, 379, 2224, 2224, 10, GumpButtonType.Reply, 0); //Next Relationship Filter

                AddLabel(158, 400, 1256, "War Requests");
                AddLabel(251, 400, WhiteTextHue, "10");

                AddLabel(397, 400, WhiteTextHue, "1/1"); //Page

                AddLabel(533, 400, 2599, "Ally Requests");
                AddLabel(625, 400, WhiteTextHue, "10");

                AddButton(154, 429, 4014, 4016, 11, GumpButtonType.Reply, 0); //Previous Page
                AddButton(620, 429, 4005, 4007, 12, GumpButtonType.Reply, 0); //Next Page
                AddButton(337, 429, 4002, 4004, 13, GumpButtonType.Reply, 0); //Add New Guild
            }

            #endregion

            #region Faction

            else if (m_Player.m_GuildGumpSettings.m_GuildGumpPage == GuildGumpPageType.Faction)
            {
            }

            #endregion

            #region Messages

            else if (m_Player.m_GuildGumpSettings.m_GuildGumpPage == GuildGumpPageType.Messages)
            {
            }

            #endregion
        }
コード例 #2
0
ファイル: DamageTracker.cs プロジェクト: Pumpk1ns/outlands
        public DamageTrackerGump(PlayerMobile player) : base(10, 10)
        {
            if (player == null)
            {
                return;
            }
            if (player.Deleted)
            {
                return;
            }
            if (player.m_DamageTracker == null)
            {
                return;
            }

            m_Player = player;

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            int textHue = 2036;

            int totalDamage = 0;

            if (player.m_DamageTracker.AddMeleeDamageToTotal)
            {
                totalDamage += player.m_DamageTracker.MeleeDamage;
            }

            if (player.m_DamageTracker.AddSpellDamageToTotal)
            {
                totalDamage += player.m_DamageTracker.SpellDamage;
            }

            if (player.m_DamageTracker.AddFollowerDamageToTotal)
            {
                totalDamage += player.m_DamageTracker.FollowerDamage;
            }

            if (player.m_DamageTracker.AddProvocationDamageToTotal)
            {
                totalDamage += player.m_DamageTracker.ProvocationDamage;
            }

            if (player.m_DamageTracker.AddPoisonDamageToTotal)
            {
                totalDamage += player.m_DamageTracker.PoisonDamage;
            }

            string timeElapsed = Utility.CreateTimeRemainingString(DateTime.UtcNow, DateTime.UtcNow + m_Player.m_DamageTracker.RunningTime, true, false, true, true, true);

            if (m_Player.m_DamageTracker.RunningTime == TimeSpan.FromSeconds(0))
            {
                timeElapsed = "0s";
            }

            string autostopHours   = m_Player.m_DamageTracker.AutoStopDuration.Hours.ToString() + "h";
            string autostopMinutes = m_Player.m_DamageTracker.AutoStopDuration.Minutes.ToString() + "m";
            string autostopSeconds = m_Player.m_DamageTracker.AutoStopDuration.Seconds.ToString() + "s";

            if (player.m_DamageTracker.m_Collapsed)
            {
                AddAlphaRegion(9, 7, 150, 90);

                AddButton(16, 18, 9900, 9900, 1, GumpButtonType.Reply, 0); //Expand Gump

                AddLabel(42, 17, 2577, "Total Damage");
                AddLabel(130, 17, textHue, Utility.CreateCurrencyString(totalDamage));

                AddItem(39, 38, 6160);                                     //Hour Glass

                AddButton(46, 69, 4017, 4019, 2, GumpButtonType.Reply, 0); //Reset

                //Running
                if (m_Player.m_DamageTracker.m_Running)
                {
                    AddLabel(72, 43, 63, timeElapsed);
                    AddButton(88, 69, 4020, 4022, 3, GumpButtonType.Reply, 0); //Pause
                }

                //Paused
                else
                {
                    AddLabel(72, 43, 2213, timeElapsed);
                    AddButton(88, 69, 4005, 4007, 3, GumpButtonType.Reply, 0); //Start
                }
            }

            else
            {
                AddAlphaRegion(3, 9, 169, 376);

                //Collapse
                AddButton(16, 20, 9906, 9906, 1, GumpButtonType.Reply, 0); //Collapse Gump

                //Damage Dealt
                AddImage(40, 17, 2445, 2425);
                AddLabel(52, 18, textHue, "Damage Dealt");
                AddLabel(49, 45, 34, "Melee");
                if (player.m_DamageTracker.AddMeleeDamageToTotal)
                {
                    AddButton(91, 45, 211, 210, 20, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(91, 45, 210, 211, 20, GumpButtonType.Reply, 0);
                }
                AddLabel(117, 45, textHue, Utility.CreateCurrencyString(player.m_DamageTracker.MeleeDamage));

                AddLabel(52, 65, 117, "Spell");
                if (player.m_DamageTracker.AddSpellDamageToTotal)
                {
                    AddButton(91, 65, 211, 210, 21, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(91, 65, 210, 211, 21, GumpButtonType.Reply, 0);
                }
                AddLabel(117, 65, textHue, Utility.CreateCurrencyString(player.m_DamageTracker.SpellDamage));

                AddLabel(42, 85, 63, "Poison");
                if (player.m_DamageTracker.AddPoisonDamageToTotal)
                {
                    AddButton(91, 85, 211, 210, 22, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(91, 85, 210, 211, 22, GumpButtonType.Reply, 0);
                }
                AddLabel(117, 85, textHue, Utility.CreateCurrencyString(player.m_DamageTracker.PoisonDamage));

                AddLabel(11, 105, 2417, "Provocation");
                if (player.m_DamageTracker.AddProvocationDamageToTotal)
                {
                    AddButton(91, 105, 211, 210, 23, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(91, 105, 210, 211, 23, GumpButtonType.Reply, 0);
                }

                AddLabel(117, 105, textHue, Utility.CreateCurrencyString(player.m_DamageTracker.ProvocationDamage));

                AddLabel(26, 125, 89, "Followers");
                if (player.m_DamageTracker.AddFollowerDamageToTotal)
                {
                    AddButton(91, 125, 211, 210, 24, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(91, 125, 210, 211, 24, GumpButtonType.Reply, 0);
                }
                AddLabel(117, 125, textHue, Utility.CreateCurrencyString(player.m_DamageTracker.FollowerDamage));

                AddLabel(48, 144, 2577, "Total");
                AddLabel(117, 144, textHue, Utility.CreateCurrencyString(totalDamage));

                //Damage Taken
                AddImage(40, 169, 2445, 2425);
                AddLabel(50, 171, textHue, "Damage Taken");
                AddLabel(82, 198, 2603, "Self");
                AddLabel(117, 198, textHue, Utility.CreateCurrencyString(player.m_DamageTracker.DamageTaken));

                AddLabel(52, 219, 2562, "Followers");
                AddLabel(117, 219, textHue, Utility.CreateCurrencyString(player.m_DamageTracker.FollowerDamageTaken));

                //Stop Timer At
                AddImage(40, 243, 2445, 2425);
                AddLabel(49, 245, textHue, "Stop Timer At");
                if (m_Player.m_DamageTracker.AutoStopEnabled)
                {
                    AddButton(18, 283, 2154, 2151, 4, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(18, 283, 2151, 2154, 4, GumpButtonType.Reply, 0);
                }

                //Hours
                AddButton(58, 273, 5600, 5600, 5, GumpButtonType.Reply, 0);
                AddLabel(Utility.CenteredTextOffset(65, autostopHours), 288, textHue, autostopHours);
                AddButton(58, 308, 5606, 5606, 6, GumpButtonType.Reply, 0);

                AddButton(91, 273, 5600, 5600, 7, GumpButtonType.Reply, 0);
                AddLabel(Utility.CenteredTextOffset(98, autostopMinutes), 288, textHue, autostopMinutes);
                AddButton(91, 308, 5606, 5606, 8, GumpButtonType.Reply, 0);

                AddButton(122, 273, 5600, 5600, 9, GumpButtonType.Reply, 0);
                AddLabel(Utility.CenteredTextOffset(130, autostopSeconds), 288, textHue, autostopSeconds);
                AddButton(122, 308, 5606, 5606, 10, GumpButtonType.Reply, 0);

                //Reset
                AddLabel(8, 330, 2116, "Reset");
                AddButton(50, 330, 4017, 4019, 2, GumpButtonType.Reply, 0);

                //Running
                if (m_Player.m_DamageTracker.m_Running)
                {
                    AddLabel(77, 361, 63, timeElapsed); //Time Elapsed

                    AddLabel(93, 331, 2599, "Pause");
                    AddButton(134, 329, 4020, 4022, 3, GumpButtonType.Reply, 0);
                }

                //Paused
                else
                {
                    AddLabel(77, 361, 2213, timeElapsed); //Time Elapsed

                    AddLabel(93, 331, 2599, "Start");
                    AddButton(134, 329, 4005, 4007, 3, GumpButtonType.Reply, 0);
                }

                AddItem(44, 356, 6160); //Hourglass
            }
        }
コード例 #3
0
        public MurderPenaltyGump(PlayerMobile player, bool previewMode, int selectionIndex, bool confirmed) : base(400, 25)
        {
            m_Player         = player;
            m_PreviewMode    = previewMode;
            m_SelectionIndex = selectionIndex;
            m_Confirmed      = confirmed;

            if (m_Player == null)
            {
                return;
            }

            Account account = m_Player.Account as Account;

            if (account == null)
            {
                return;
            }

            if (selectionIndex > 2)
            {
                selectionIndex = 0;
            }

            #region Images

            AddImage(57, 56, 103, 2075);
            AddImage(190, 153, 103, 2075);
            AddImage(191, 196, 103, 2075);
            AddImage(191, 282, 103, 2075);
            AddImage(191, 372, 103, 2075);
            AddImage(193, 472, 103, 2075);
            AddImage(57, 472, 103, 2075);
            AddImage(57, 281, 103, 2075);
            AddImage(189, 56, 103, 2075);
            AddImage(56, 195, 103, 2075);
            AddImage(57, 152, 103, 2075);
            AddImage(67, 194, 3604, 2052);
            AddImage(195, 184, 3604, 2052);
            AddImage(67, 66, 3604, 2052);
            AddImage(195, 66, 3604, 2052);
            AddImage(57, 371, 103, 2075);
            AddImage(67, 242, 3604, 2052);
            AddImage(196, 241, 3604, 2052);
            AddImage(67, 334, 3604, 2052);
            AddImage(195, 333, 3604, 2052);
            AddImage(67, 434, 3604, 2052);
            AddImage(195, 434, 3604, 2052);
            AddImage(77, -28, 102, 1107);
            AddItem(297, 58, 3812, 2101);

            #endregion

            AddLabel(161, 31, 149, "Punishable");
            AddLabel(147, 51, 149, "Murder Counts");
            AddLabel(143, 71, 2550, "(counts above " + Mobile.MurderCountsRequiredForMurderer.ToString() + ")");

            int punishableMurderCounts = m_Player.MurderCounts - Mobile.MurderCountsRequiredForMurderer;

            if (punishableMurderCounts < 0)
            {
                punishableMurderCounts = 0;
            }

            AddItem(158, 102, 7574);

            if (punishableMurderCounts >= 1)
            {
                AddLabel(200, 112, 2116, punishableMurderCounts.ToString());
            }

            else
            {
                AddLabel(200, 112, WhiteTextHue, punishableMurderCounts.ToString());
            }

            AddLabel(134, 161, WhiteTextHue, "Counts Will Reset");
            AddLabel(118, 178, WhiteTextHue, "to 5 Upon Resurrection");

            if (m_PreviewMode)
            {
                AddLabel(147, 214, 2603, "Preview Mode");
            }
            else
            {
                AddLabel(127, 214, 2603, "Resurrection Options");
            }

            AddButton(49, 49, 2094, 2095, 1, GumpButtonType.Reply, 0);
            AddLabel(45, 38, 149, "Guide");

            int resurrectionTotalCost  = 0;
            int goldAvailableInBank    = 0;
            int goldAvailableInAccount = 0;

            foreach (Mobile mobile in account.accountMobiles)
            {
                if (mobile == null)
                {
                    continue;
                }
                if (mobile.Deleted)
                {
                    continue;
                }

                if (mobile == m_Player)
                {
                    goldAvailableInBank += Banker.GetBalance(m_Player);
                }

                goldAvailableInAccount += Banker.GetBalance(mobile);
            }

            if (m_SelectionIndex == 0)
            {
                resurrectionTotalCost = punishableMurderCounts * PlayerMobile.RessPenaltyAccountWideAggressionRestrictionFeePerCount;

                AddButton(75, 258, 9724, 9721, 2, GumpButtonType.Reply, 0);
                AddLabel(110, 254, 63, "Pay " + PlayerMobile.RessPenaltyAccountWideAggressionRestrictionFeePerCount.ToString() + " Gold Per Murder Count");
            }

            else
            {
                AddButton(75, 258, 9721, 9724, 2, GumpButtonType.Reply, 0);
                AddLabel(110, 254, 2599, "Pay " + PlayerMobile.RessPenaltyAccountWideAggressionRestrictionFeePerCount.ToString() + " Gold Per Murder Count");
            }

            AddLabel(110, 274, WhiteTextHue, "No Aggressive Actions Allowed");
            AddLabel(110, 294, WhiteTextHue, "Account-Wide for 24 Hours");

            if (m_SelectionIndex == 1)
            {
                resurrectionTotalCost = punishableMurderCounts * PlayerMobile.RessPenaltyEffectivenessReductionFeePerCount;

                AddButton(75, 330, 9724, 9721, 3, GumpButtonType.Reply, 0);
                AddLabel(110, 325, 63, "Pay " + PlayerMobile.RessPenaltyEffectivenessReductionFeePerCount.ToString() + " Gold Per Murder Count");
            }

            else
            {
                AddButton(75, 330, 9721, 9724, 3, GumpButtonType.Reply, 0);
                AddLabel(110, 325, 2599, "Pay " + PlayerMobile.RessPenaltyEffectivenessReductionFeePerCount.ToString() + " Gold Per Murder Count");
            }

            double damagePenalty  = PlayerMobile.RessPenaltyDamageScalar * (m_Player.m_RessPenaltyEffectivenessReductionCount + 1);
            double healingPenalty = PlayerMobile.RessPenaltyHealingScalar * (m_Player.m_RessPenaltyEffectivenessReductionCount + 1);
            double fizzlePenalty  = PlayerMobile.RessPenaltyFizzleScalar * (m_Player.m_RessPenaltyEffectivenessReductionCount + 1);

            AddLabel(110, 344, WhiteTextHue, "-" + Utility.CreatePercentageString(damagePenalty) + " Damage Dealt");
            AddLabel(110, 364, WhiteTextHue, "-" + Utility.CreatePercentageString(healingPenalty) + " Healing Amounts");
            AddLabel(110, 384, WhiteTextHue, Utility.CreatePercentageString(fizzlePenalty) + " Chance to Fizzle Field");
            AddLabel(110, 404, WhiteTextHue, "and Paralyze Spells for 24 Hours");
            AddLabel(130, 423, 2550, "(Penalties are Stackable)");

            if (m_SelectionIndex == 2)
            {
                resurrectionTotalCost = punishableMurderCounts * PlayerMobile.RessPenaltyNoPenaltyFeePerCount;

                AddButton(75, 446, 9724, 9721, 4, GumpButtonType.Reply, 0);
                AddLabel(112, 451, 63, "Pay " + PlayerMobile.RessPenaltyNoPenaltyFeePerCount.ToString() + " Gold Per Murder Count");
            }

            else
            {
                AddButton(75, 446, 9721, 9724, 4, GumpButtonType.Reply, 0);
                AddLabel(112, 451, 2599, "Pay " + PlayerMobile.RessPenaltyNoPenaltyFeePerCount.ToString() + " Gold Per Murder Count");
            }

            AddLabel(85, 483, 2603, "Selected Option Cost:");

            AddLabel(230, 483, 63, Utility.CreateCurrencyString(resurrectionTotalCost));

            AddLabel(85, 511, 149, "Gold Available in Bank:");
            AddLabel(230, 511, WhiteTextHue, Utility.CreateCurrencyString(goldAvailableInBank));

            AddLabel(85, 531, 149, "Gold Across Account:");
            AddLabel(230, 531, WhiteTextHue, Utility.CreateCurrencyString(goldAvailableInAccount));

            if (!m_PreviewMode)
            {
                AddButton(159, 555, 239, 240, 5, GumpButtonType.Reply, 0); //Apply
            }
        }
コード例 #4
0
        public DamageTrackerGump(PlayerMobile player) : base(10, 10)
        {
            if (player == null)
            {
                return;
            }
            if (player.Deleted)
            {
                return;
            }
            if (player.m_DamageTracker == null)
            {
                return;
            }

            m_Player = player;

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            int textHue = 2036;

            int totalDamage = 0;

            if (player.m_DamageTracker.AddMeleeDamageToTotal)
            {
                totalDamage += player.m_DamageTracker.MeleeDamage;
            }

            if (player.m_DamageTracker.AddSpellDamageToTotal)
            {
                totalDamage += player.m_DamageTracker.SpellDamage;
            }

            if (player.m_DamageTracker.AddFollowerDamageToTotal)
            {
                totalDamage += player.m_DamageTracker.FollowerDamage;
            }

            if (player.m_DamageTracker.AddProvocationDamageToTotal)
            {
                totalDamage += player.m_DamageTracker.ProvocationDamage;
            }

            if (player.m_DamageTracker.AddPoisonDamageToTotal)
            {
                totalDamage += player.m_DamageTracker.PoisonDamage;
            }

            string timerDuration      = Utility.CreateTimeRemainingString(DateTime.UtcNow, DateTime.UtcNow + m_Player.m_DamageTracker.TimerDuration, true, true, true, true, true);
            string timerAmountElapsed = Utility.CreateTimeRemainingString(DateTime.UtcNow, DateTime.UtcNow + m_Player.m_DamageTracker.TimerAmountElapsed, true, true, true, true, true);

            if (m_Player.m_DamageTracker.TimerAmountElapsed == TimeSpan.FromSeconds(0))
            {
                timerAmountElapsed = "0s";
            }

            if (player.m_DamageTracker.m_Collapsed)
            {
                #region Images

                AddImage(38, 17, 103, 2499);
                AddImage(181, 17, 103, 2499);
                AddImage(48, 25, 2081, 2499);
                AddImage(48, 37, 2081, 2499);
                AddItem(43, 46, 6160);

                #endregion

                AddButton(9, 16, 9906, 9906, 1, GumpButtonType.Reply, 0); //Expand Gump

                AddLabel(69, 30, 149, "Time Elapsed");
                if (m_Player.m_DamageTracker.TimerAmountElapsed >= m_Player.m_DamageTracker.TimerDuration && !m_Player.m_DamageTracker.m_Running)
                {
                    AddLabel(77, 50, 2101, timerAmountElapsed);
                }
                else
                {
                    AddLabel(77, 50, 63, timerAmountElapsed);
                }

                AddLabel(187, 30, 2577, "Dealt");
                AddLabel(229, 30, WhiteTextHue, Utility.CreateCurrencyString(totalDamage));

                AddLabel(184, 50, 2603, "Taken");
                AddLabel(229, 50, WhiteTextHue, Utility.CreateCurrencyString(player.m_DamageTracker.DamageTaken));

                AddLabel(57, 79, 1256, "Reset Timer");
                AddButton(79, 101, 4020, 4022, 2, GumpButtonType.Reply, 0);

                AddLabel(151, 79, 53, "Clear Damage");
                AddButton(176, 98, 9721, 9724, 3, GumpButtonType.Reply, 0);

                if (player.m_DamageTracker.m_Running)
                {
                    AddLabel(253, 79, 2599, "Pause");
                    AddButton(257, 101, 4017, 4019, 4, GumpButtonType.Reply, 0);
                }

                else
                {
                    AddLabel(253, 79, 2599, "Start");
                    AddButton(257, 101, 4005, 4007, 4, GumpButtonType.Reply, 0);
                }
            }

            else
            {
                #region Images

                AddImage(38, 17, 103, 2499);
                AddImage(181, 17, 103, 2499);
                AddImage(181, 110, 103, 2499);
                AddImage(38, 110, 103, 2499);
                AddImage(181, 206, 103, 2499);
                AddImage(39, 206, 103, 2499);
                AddImage(181, 306, 103, 2499);
                AddImage(38, 306, 103, 2499);
                AddImage(48, 25, 2081, 2499);
                AddImage(48, 94, 2081, 2499);
                AddImage(47, 160, 2081, 2499);
                AddImage(47, 225, 2081, 2499);
                AddImage(47, 293, 2081, 2499);
                AddImage(48, 326, 2081, 2499);

                AddImage(51, 165, 3001, 1105);
                AddImage(65, 165, 3001, 1105);
                AddImage(51, 238, 3001, 1105);
                AddImage(65, 238, 3001, 1105);
                AddImage(51, 333, 3001, 1105);
                AddImage(65, 333, 3001, 1105);

                #endregion

                AddButton(36, 14, 2094, 2095, 5, GumpButtonType.Reply, 0);
                AddLabel(36, 2, 149, "Guide");

                AddButton(9, 16, 9900, 9900, 1, GumpButtonType.Reply, 0); //Collapse Gump

                //------------

                AddLabel(137, 25, 149, "Damage Dealt");

                AddLabel(107, 45, 34, "Melee");
                if (player.m_DamageTracker.AddMeleeDamageToTotal)
                {
                    AddButton(149, 45, 211, 210, 6, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(149, 45, 210, 211, 6, GumpButtonType.Reply, 0);
                }
                AddLabel(175, 45, WhiteTextHue, Utility.CreateCurrencyString(player.m_DamageTracker.MeleeDamage));

                AddLabel(110, 65, 117, "Spell");
                if (player.m_DamageTracker.AddSpellDamageToTotal)
                {
                    AddButton(149, 65, 211, 210, 7, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(149, 65, 210, 211, 7, GumpButtonType.Reply, 0);
                }
                AddLabel(175, 65, WhiteTextHue, Utility.CreateCurrencyString(player.m_DamageTracker.SpellDamage));

                AddLabel(100, 85, 63, "Poison");
                if (player.m_DamageTracker.AddPoisonDamageToTotal)
                {
                    AddButton(149, 85, 211, 210, 8, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(149, 85, 210, 211, 8, GumpButtonType.Reply, 0);
                }
                AddLabel(175, 85, WhiteTextHue, Utility.CreateCurrencyString(player.m_DamageTracker.PoisonDamage));

                AddLabel(65, 105, 2417, "Provocation");
                if (player.m_DamageTracker.AddProvocationDamageToTotal)
                {
                    AddButton(149, 105, 211, 210, 9, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(149, 105, 210, 211, 9, GumpButtonType.Reply, 0);
                }
                AddLabel(175, 105, WhiteTextHue, Utility.CreateCurrencyString(player.m_DamageTracker.ProvocationDamage));

                AddLabel(81, 125, 89, "Followers");
                if (player.m_DamageTracker.AddFollowerDamageToTotal)
                {
                    AddButton(149, 124, 211, 210, 10, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(149, 124, 210, 211, 10, GumpButtonType.Reply, 0);
                }
                AddLabel(175, 125, WhiteTextHue, Utility.CreateCurrencyString(player.m_DamageTracker.FollowerDamage));

                AddLabel(106, 145, 2577, "Total");
                AddLabel(175, 145, WhiteTextHue, Utility.CreateCurrencyString(totalDamage));

                //----------

                AddLabel(136, 170, 149, "Damage Taken");

                AddLabel(140, 195, 2603, "Self");
                AddLabel(175, 195, WhiteTextHue, Utility.CreateCurrencyString(player.m_DamageTracker.DamageTaken));

                AddLabel(106, 215, 2550, "Followers");
                AddLabel(175, 215, WhiteTextHue, Utility.CreateCurrencyString(player.m_DamageTracker.FollowerDamageTaken));

                //---------

                AddLabel(136, 243, 149, "Damage Timer");

                AddLabel(80, 263, 2599, "Force Pause After Duration");
                if (player.m_DamageTracker.TimerEnabled)
                {
                    AddButton(265, 264, 211, 210, 17, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddButton(265, 264, 210, 211, 17, GumpButtonType.Reply, 0);
                }

                AddLabel(107, 286, 2599, "Timer Duration");
                AddLabel(211, 286, WhiteTextHue, timerDuration);

                AddButton(70, 314, 2223, 2223, 11, GumpButtonType.Reply, 0);
                AddLabel(94, 310, WhiteTextHue, "Hour");
                AddButton(127, 314, 2224, 2224, 12, GumpButtonType.Reply, 0);

                AddButton(154, 314, 2223, 2223, 13, GumpButtonType.Reply, 0);
                AddLabel(177, 310, WhiteTextHue, "Min");
                AddButton(202, 314, 2224, 2224, 14, GumpButtonType.Reply, 0);

                AddButton(228, 314, 2223, 2223, 15, GumpButtonType.Reply, 0);
                AddLabel(252, 310, WhiteTextHue, "Sec");
                AddButton(278, 314, 2224, 2224, 16, GumpButtonType.Reply, 0);

                //-------------

                AddLabel(96, 341, 149, "Time Elapsed");
                AddItem(165, 338, 6160);
                if (m_Player.m_DamageTracker.TimerAmountElapsed >= m_Player.m_DamageTracker.TimerDuration && !m_Player.m_DamageTracker.m_Running)
                {
                    AddLabel(200, 343, 2101, timerAmountElapsed);
                }
                else
                {
                    AddLabel(200, 343, 63, timerAmountElapsed);
                }

                //----------

                AddLabel(58, 369, 1256, "Reset Timer");
                AddButton(81, 391, 4020, 4022, 2, GumpButtonType.Reply, 0);

                AddLabel(148, 369, 53, "Clear Damage");
                AddButton(172, 388, 9721, 9724, 3, GumpButtonType.Reply, 0);

                if (player.m_DamageTracker.m_Running)
                {
                    AddLabel(251, 369, 2599, "Pause");
                    AddButton(256, 391, 4017, 4019, 4, GumpButtonType.Reply, 0);
                }

                else
                {
                    AddLabel(251, 369, 2599, "Start");
                    AddButton(256, 391, 4005, 4007, 4, GumpButtonType.Reply, 0);
                }
            }
        }