internal static void SpellGrid_MouseClick_Control(object sender, MouseEventArgs e) { PanelGrid pl = (PanelGrid)sender; switch (pl.Group) { case "Magery": RazorEnhanced.Spells.CastMageryHotKey(pl.Spell); break; case "Abilities": if (pl.Spell == "Primary") { Assistant.SpecialMoves.SetPrimaryAbility(); } else { Assistant.SpecialMoves.SetSecondaryAbility(); } break; case "Bushido": RazorEnhanced.Spells.CastBushidoHotKey(pl.Spell); break; case "Chivalry": RazorEnhanced.Spells.CastChivalryHotKey(pl.Spell); break; case "Necromancy": RazorEnhanced.Spells.CastNecroHotKey(pl.Spell); break; case "Ninjitsu": RazorEnhanced.Spells.CastNinjitsuHotKey(pl.Spell); break; case "Mysticism": RazorEnhanced.Spells.CastMysticismHotKey(pl.Spell); break; case "Spellweaving": RazorEnhanced.Spells.CastSpellweavingHotKey(pl.Spell); break; case "Mastery": RazorEnhanced.Spells.CastMasteryHotKey(pl.Spell); break; default: break; } ClientCommunication.SetForegroundWindow(ClientCommunication.FindUOWindow()); }
internal static void DrawSpellGrid() { m_panellist = new List <PanelGrid>(); m_form = new SpellGridForm { ClientSize = new System.Drawing.Size(m_hslot * 44 + m_hslot * 3, m_vslot * 44 + m_vslot * 3) }; int paneloffsetX = 1; int paneloffsetY = 1; for (int i = 0; i < m_vslot; i += 1) { for (int x = 0; x < m_hslot; x += 1) { // Aggiungo panel dinamici PanelGrid paneltemp = new PanelGrid { BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center, Location = new System.Drawing.Point(paneloffsetX, paneloffsetY), Margin = new System.Windows.Forms.Padding(0), Size = new System.Drawing.Size(44, 44), TabIndex = i, BackColor = Color.Transparent }; m_panellist.Add(paneltemp); m_form.Controls.Add(paneltemp); paneloffsetX += 45; } paneloffsetX = 1; paneloffsetY += 45; } InitEvent(); }
internal static void SpellGrid_MouseClick_Control(object sender, MouseEventArgs e) { PanelGrid pl = (PanelGrid)sender; switch (pl.Group) { case GroupType.Magery: Spells.CastMagery(pl.Spell, false); break; case GroupType.Abilities: if (pl.Spell == "Primary") { SpecialMoves.SetPrimaryAbility(false); } else { SpecialMoves.SetSecondaryAbility(false); } break; case GroupType.Bushido: Spells.CastBushido(pl.Spell, false); break; case GroupType.Chivalry: Spells.CastChivalry(pl.Spell, false); break; case GroupType.Necromancy: Spells.CastNecro(pl.Spell, false); break; case GroupType.Ninjitsu: Spells.CastNinjitsu(pl.Spell, false); break; case GroupType.Mysticism: Spells.CastMysticism(pl.Spell, false); break; case GroupType.Spellweaving: Spells.CastSpellweaving(pl.Spell, false); break; case GroupType.Mastery: Spells.CastMastery(pl.Spell, false); break; case GroupType.Cleric: Spells.CastMastery(pl.Spell, false); break; case GroupType.Druid: Spells.CastMastery(pl.Spell, false); break; case GroupType.Script: Misc.ScriptRun(pl.Spell); break; case GroupType.Skills: Player.UseSkill(pl.Spell, false); break; default: break; } DLLImport.Win.SetForegroundWindow(Assistant.Client.Instance.GetWindowHandle()); }