|
From: slartibartfast <sla...@us...> - 2004-09-30 21:59:01
|
Update of /cvsroot/seq/myseq/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2021 Modified Files: MapCon.cs Structures.cs Log Message: Integrated 42! Changes into Version 1.16.3 rdy for release Index: Structures.cs =================================================================== RCS file: /cvsroot/seq/myseq/client/Structures.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Structures.cs 30 Sep 2004 20:59:53 -0000 1.4 +++ Structures.cs 30 Sep 2004 21:58:52 -0000 1.5 @@ -9,661 +9,638 @@ namespace Structures { - #region SPAWNINFO class - [StructLayout(LayoutKind.Sequential, Pack=1)] - public class SPAWNINFO - { - public SPAWNINFO() {} - - private string BytesToString(byte []b, int start, int maxlen) - { [...1226 lines suppressed...] - } - - public bool IsPet(string mobName) - { - return rePet.IsMatch(mobName); - } - } - #endregion + public bool IsFamiliar(string mobName) + { + return reFamiliar.IsMatch(mobName); + } + + public bool IsPet(string mobName) + { + return rePet.IsMatch(mobName); + } + } + #endregion } Index: MapCon.cs =================================================================== RCS file: /cvsroot/seq/myseq/client/MapCon.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- MapCon.cs 30 Sep 2004 20:59:53 -0000 1.11 +++ MapCon.cs 30 Sep 2004 21:58:52 -0000 1.12 @@ -734,67 +734,67 @@ private void MapCon_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { - float x = ScreenToMapCoordX((float)e.X); - float y = ScreenToMapCoordY((float)e.Y); - - if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift) - { - // [42!] Mark an arbitrary spot on the map, or turn it off if a spot was marked already. - if (this.selectedX == -1) - { - this.selectedX = x; - this.selectedY = y; - } - else - { - this.selectedX = -1; - } - } - else - { - if (e.X == m_dragStartX && e.Y == m_dragStartY) - { - // Find the object the user clicked on so we can draw a line between it as the player - MapPane mp = (MapPane)Parent; - frmMain f1 = (frmMain)mp.Parent; + float x = ScreenToMapCoordX((float)e.X); + float y = ScreenToMapCoordY((float)e.Y); - float delta; // allow a small margin of error in coordinates - delta = 5 / m_ratio; // value of 5 screen units in terms of mapcoords - bool foundMob = false; - foreach(SPAWNINFO sp in mobs.Values) - { - if (!sp.hiddenOnMap) - { - if (sp.X < x+delta && sp.X > x-delta && sp.Y < y+delta && sp.Y > y-delta) - { - if (Settings.Instance.AutoSelectSpawnList) - { - sp.listitem.EnsureVisible(); - sp.listitem.Selected = true; - } - else - { - selectedID = (int)sp.SpawnID; - } - foundMob = true; - break; - } - } - } - if (!foundMob) - { - this.selectedID = -1; - } + if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift) + { + // [42!] Mark an arbitrary spot on the map, or turn it off if a spot was marked already. + if (this.selectedX == -1) + { + this.selectedX = x; + this.selectedY = y; + } + else + { + this.selectedX = -1; + } + } + else + { + if (e.X == m_dragStartX && e.Y == m_dragStartY) + { + // Find the object the user clicked on so we can draw a line between it as the player + MapPane mp = (MapPane)Parent; + frmMain f1 = (frmMain)mp.Parent; - Invalidate(); - } - } - m_dragging = false; - m_dragStartX = m_dragStartY = 0; - rclick = false; - System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default; - } + float delta; // allow a small margin of error in coordinates + delta = 5 / m_ratio; // value of 5 screen units in terms of mapcoords + bool foundMob = false; + foreach(SPAWNINFO sp in mobs.Values) + { + if (!sp.hiddenOnMap) + { + if (sp.X < x+delta && sp.X > x-delta && sp.Y < y+delta && sp.Y > y-delta) + { + if (Settings.Instance.AutoSelectSpawnList) + { + sp.listitem.EnsureVisible(); + sp.listitem.Selected = true; + } + else + { + selectedID = (int)sp.SpawnID; + } + foundMob = true; + break; + } + } + } + if (!foundMob) + { + this.selectedID = -1; + } + Invalidate(); + } + } + m_dragging = false; + m_dragStartX = m_dragStartY = 0; + rclick = false; + System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default; + } + private void MapCon_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { MapPane mp = (MapPane)Parent; @@ -1074,9 +1074,9 @@ { // if we have blank space to the left or right repostion the center point appropriately if (ScreenMinX<minx) - m_mapCenterX += (minx-ScreenMinY); + m_mapCenterX += (minx-ScreenMinX); else if (ScreenMaxX>maxx) - m_mapCenterX -= (ScreenMaxY-maxx); + m_mapCenterX -= (ScreenMaxX-maxx); } if (mapHeight <= ScreenMapHeight) @@ -1237,12 +1237,12 @@ mobInfo.AppendFormat("Y: {0:f3} X: {1:f3} Z: {2:f3}", si.Y, si.X, si.Z); if (SetColor) { - if (si.Level <= greenRange) lblMobInfo.BackColor = Color.PaleGreen; - else if (si.Level <= cyanRange) lblMobInfo.BackColor = System.Drawing.Color.FromArgb(192, 255, 255); - else if (si.Level < PlayerInfo.Level) lblMobInfo.BackColor = System.Drawing.Color.FromArgb(0, 192, 255); - else if (si.Level == PlayerInfo.Level) lblMobInfo.BackColor = Color.White; - else if (si.Level <= PlayerInfo.Level + 2) lblMobInfo.BackColor = System.Drawing.Color.FromArgb(255, 255, 128); - else lblMobInfo.BackColor = System.Drawing.Color.FromArgb(255, 128, 128); + if (si.Level <= greenRange) lblMobInfo.BackColor = Color.PaleGreen; + else if (si.Level <= cyanRange) lblMobInfo.BackColor = System.Drawing.Color.FromArgb(192, 255, 255); + else if (si.Level < PlayerInfo.Level) lblMobInfo.BackColor = System.Drawing.Color.FromArgb(0, 192, 255); + else if (si.Level == PlayerInfo.Level) lblMobInfo.BackColor = Color.White; + else if (si.Level <= PlayerInfo.Level + 2) lblMobInfo.BackColor = System.Drawing.Color.FromArgb(255, 255, 128); + else lblMobInfo.BackColor = System.Drawing.Color.FromArgb(255, 128, 128); Graphics g = lblMobInfo.CreateGraphics(); SizeF sf = g.MeasureString(mobInfo.ToString(), lblMobInfo.Font); @@ -1388,6 +1388,10 @@ if (sp.isHunt && flash) DrawEllipse(ltbluePen, x - AlertSizeOffset, y - AlertSizeOffset, AlertSize, AlertSize); + // Draw Ring around Lookup'ed Mobs + if (sp.isLookup && flash) + DrawEllipse(greenPen, x - AlertSizeOffset, y - AlertSizeOffset, AlertSize, AlertSize); + // Draw Ring around Rare Mobs if (sp.isRare && flash) DrawEllipse(whitePen, x - AlertSizeOffset, y - AlertSizeOffset, AlertSize, AlertSize); @@ -1421,9 +1425,9 @@ // [42!] Draw a line to an arbitrary spot. if (selectedX != -1) { - Pen myPen = new Pen(new SolidBrush(Color.White)); - myPen.DashStyle = DashStyle.Dash; - myPen.DashPattern = new float[] {8, 4}; + Pen myPen = new Pen(new SolidBrush(Color.White)); + myPen.DashStyle = DashStyle.Dash; + myPen.DashPattern = new float[] {8, 4}; DrawLine(myPen, playerx, playery, CalcScreenCoordX(selectedX), CalcScreenCoordY(selectedY)); } |