|
From: <xer...@us...> - 2026-07-17 20:01:02
|
Revision: 1669
http://sourceforge.net/p/seq/svn/1669
Author: xerxes00
Date: 2026-07-17 20:00:59 +0000 (Fri, 17 Jul 2026)
Log Message:
-----------
Quality-of-life and log hygiene fixes
Reduces redundant map reloads (skip the reload zoneEnd() issues right
after zoneBegin() loaded the same zone, and the pre-zone unknown-zone
load attempt). Routes spell-timer notices to the MT_Spell message type
so they filter with cast messages. Tidies money/LDoN reporting to skip
empty wallet lines and collapse all-zero point lines, and trims noisy
debug logging.
Modified Paths:
--------------
showeq/branches/xerxes-trunk-dev/conf/seqdef.xml
showeq/branches/xerxes-trunk-dev/src/category.cpp
showeq/branches/xerxes-trunk-dev/src/diagnosticmessages.cpp
showeq/branches/xerxes-trunk-dev/src/diagnosticmessages.h
showeq/branches/xerxes-trunk-dev/src/filtermgr.cpp
showeq/branches/xerxes-trunk-dev/src/guild.cpp
showeq/branches/xerxes-trunk-dev/src/map.cpp
showeq/branches/xerxes-trunk-dev/src/map.h
showeq/branches/xerxes-trunk-dev/src/messageshell.cpp
showeq/branches/xerxes-trunk-dev/src/spellshell.cpp
Modified: showeq/branches/xerxes-trunk-dev/conf/seqdef.xml
===================================================================
--- showeq/branches/xerxes-trunk-dev/conf/seqdef.xml 2026-07-17 18:19:21 UTC (rev 1668)
+++ showeq/branches/xerxes-trunk-dev/conf/seqdef.xml 2026-07-17 20:00:59 UTC (rev 1669)
@@ -291,7 +291,7 @@
<comment>Display Cold Resist</comment>
</property>
<property name="showAGI" >
- <bool value="false" />
+ <bool value="true" />
<comment>Display AGIlity</comment>
</property>
<property name="showINT" >
Modified: showeq/branches/xerxes-trunk-dev/src/category.cpp
===================================================================
--- showeq/branches/xerxes-trunk-dev/src/category.cpp 2026-07-17 18:19:21 UTC (rev 1668)
+++ showeq/branches/xerxes-trunk-dev/src/category.cpp 2026-07-17 20:00:59 UTC (rev 1669)
@@ -370,7 +370,7 @@
// signal that the categories have been loaded
emit loadedCategories();
- seqInfo("Categories Reloaded");
+ seqDebug("Categories Reloaded");
}
void CategoryMgr::savePrefs(void)
Modified: showeq/branches/xerxes-trunk-dev/src/diagnosticmessages.cpp
===================================================================
--- showeq/branches/xerxes-trunk-dev/src/diagnosticmessages.cpp 2026-07-17 18:19:21 UTC (rev 1668)
+++ showeq/branches/xerxes-trunk-dev/src/diagnosticmessages.cpp 2026-07-17 20:00:59 UTC (rev 1669)
@@ -73,6 +73,18 @@
return ret;
}
+// Spell-timer notices (e.g. "'...' finished") emitted as MT_Spell
+// so they fall under the same filter as cast messages, instead of the MT_Info
+// bucket seqInfo would put them in.
+int seqSpell(const char* format, ...)
+{
+ va_list ap;
+ va_start(ap, format);
+ int ret = seqMessage(MT_Spell, format, ap);
+ va_end(ap);
+ return ret;
+}
+
int seqWarn(const char* format, ...)
{
va_list ap;
Modified: showeq/branches/xerxes-trunk-dev/src/diagnosticmessages.h
===================================================================
--- showeq/branches/xerxes-trunk-dev/src/diagnosticmessages.h 2026-07-17 18:19:21 UTC (rev 1668)
+++ showeq/branches/xerxes-trunk-dev/src/diagnosticmessages.h 2026-07-17 20:00:59 UTC (rev 1669)
@@ -26,6 +26,7 @@
int seqDebug(const char* format, ...);
int seqInfo(const char* format, ...);
+int seqSpell(const char* format, ...);
int seqWarn(const char* format, ...);
void seqFatal(const char* format, ...);
Modified: showeq/branches/xerxes-trunk-dev/src/filtermgr.cpp
===================================================================
--- showeq/branches/xerxes-trunk-dev/src/filtermgr.cpp 2026-07-17 18:19:21 UTC (rev 1668)
+++ showeq/branches/xerxes-trunk-dev/src/filtermgr.cpp 2026-07-17 20:00:59 UTC (rev 1669)
@@ -135,7 +135,8 @@
m_filterFile = fileInfo.absoluteFilePath();
- seqInfo("Loading Filters from '%s'", m_filterFile.toLatin1().data());
+ if (!m_filterFile.isEmpty())
+ seqInfo("Loading Filters from '%s'", m_filterFile.toLatin1().data());
m_filters->load(m_filterFile);
@@ -149,7 +150,8 @@
m_filterFile = fileInfo.absoluteFilePath();
- seqInfo("Loading Filters from '%s'", m_filterFile.toLatin1().data());
+ if (!m_filterFile.isEmpty())
+ seqInfo("Loading Filters from '%s'", m_filterFile.toLatin1().data());
m_filters->load(m_filterFile);
@@ -240,7 +242,8 @@
m_zoneFilterFile = fileInfo.absoluteFilePath();
- seqInfo("Loading Zone Filter File: %s", m_zoneFilterFile.toLatin1().data());
+ if (!m_zoneFilterFile.isEmpty())
+ seqInfo("Loading Zone Filter File: %s", m_zoneFilterFile.toLatin1().data());
m_zoneFilters->load(m_zoneFilterFile);
@@ -256,7 +259,8 @@
m_zoneFilterFile = fileInfo.absoluteFilePath();
- seqInfo("Loading Zone Filter File: %s", m_zoneFilterFile.toLatin1().data());
+ if (!m_zoneFilterFile.isEmpty())
+ seqInfo("Loading Zone Filter File: %s", m_zoneFilterFile.toLatin1().data());
m_zoneFilters->load(m_zoneFilterFile);
Modified: showeq/branches/xerxes-trunk-dev/src/guild.cpp
===================================================================
--- showeq/branches/xerxes-trunk-dev/src/guild.cpp 2026-07-17 18:19:21 UTC (rev 1668)
+++ showeq/branches/xerxes-trunk-dev/src/guild.cpp 2026-07-17 20:00:59 UTC (rev 1669)
@@ -201,7 +201,7 @@
}
guildsfile.close();
- seqInfo("GuildMgr: Guildsfile loaded");
+ seqDebug("GuildMgr: Guildsfile loaded");
}
else
seqWarn("GuildMgr: Could not load guildsfile, %s", guildsFileName.toLatin1().data());
Modified: showeq/branches/xerxes-trunk-dev/src/map.cpp
===================================================================
--- showeq/branches/xerxes-trunk-dev/src/map.cpp 2026-07-17 18:19:21 UTC (rev 1668)
+++ showeq/branches/xerxes-trunk-dev/src/map.cpp 2026-07-17 20:00:59 UTC (rev 1669)
@@ -332,7 +332,8 @@
// clear the map data
m_mapData.clear();
-
+ m_loadedZoneName = QString();
+
// signal that the map has been unloaded
emit mapUnloaded();
@@ -349,7 +350,8 @@
// clear the map data
m_mapData.clear();
-
+ m_loadedZoneName = QString();
+
// signal that the map has been unloaded
emit mapUnloaded();
@@ -370,7 +372,17 @@
void MapMgr::loadZoneMap(const QString& shortZoneName)
{
+ // Pre-zone placeholder: at startup (and between sessions) the zone is
+ // "unknown" - no real zone yet - so don't try to load, or warn about a
+ // missing map for, "unknown". Real zones without a map still warn.
+ if (shortZoneName.isEmpty() || shortZoneName == "unknown")
+ return;
+ // Skip the redundant reload zoneEnd() issues for a zone zoneBegin()
+ // already loaded. A genuine re-zone clears m_loadedZoneName first.
+ if (shortZoneName == m_loadedZoneName)
+ return;
+
bool found = false;
QString extension = "";
@@ -422,6 +434,9 @@
}
loadFileMap(mapFiles);
+
+ // remember the loaded zone so zoneEnd() won't reload it
+ m_loadedZoneName = shortZoneName;
}
void MapMgr::loadMap ()
@@ -490,9 +505,9 @@
#endif /* DEBUGMAP */
if (import)
- seqInfo("Attempting to import map: %s", fileName.toLatin1().data());
+ seqDebug("Attempting to import map: %s", fileName.toLatin1().data());
else
- seqInfo("Attempting to load map: %s", fileName.toLatin1().data());
+ seqDebug("Attempting to load map: %s", fileName.toLatin1().data());
// if not a forced load, and the same map is already loaded, do nothing
Modified: showeq/branches/xerxes-trunk-dev/src/map.h
===================================================================
--- showeq/branches/xerxes-trunk-dev/src/map.h 2026-07-17 18:19:21 UTC (rev 1668)
+++ showeq/branches/xerxes-trunk-dev/src/map.h 2026-07-17 20:00:59 UTC (rev 1669)
@@ -226,6 +226,11 @@
MapData m_mapData;
QHash<int, uint16_t> m_spawnAggroRange;
+ // Short zone name currently loaded; used to skip the redundant reload that
+ // zoneEnd() issues right after zoneBegin() already loaded the same zone.
+ // Cleared whenever the map data is cleared for a genuine reload.
+ QString m_loadedZoneName;
+
QString m_curLineColor;
QString m_curLineName;
QString m_curLocationColor;
Modified: showeq/branches/xerxes-trunk-dev/src/messageshell.cpp
===================================================================
--- showeq/branches/xerxes-trunk-dev/src/messageshell.cpp 2026-07-17 18:19:21 UTC (rev 1668)
+++ showeq/branches/xerxes-trunk-dev/src/messageshell.cpp 2026-07-17 20:00:59 UTC (rev 1669)
@@ -463,7 +463,7 @@
void MessageShell::zoneEntryClient(const ClientZoneEntryStruct* zsentry)
{
- m_messages->addMessage(MT_Zone, "EntryCode: Client");
+ m_messages->addMessage(MT_Debug, "EntryCode: Client");
}
void MessageShell::zoneChanged(const zoneChangeStruct* zoneChange, size_t, uint8_t dir)
@@ -492,7 +492,7 @@
QString tempStr;
tempStr = "NewCode: Zone: ";
tempStr += newZoneShortName + " (" + newZoneLongName + ")";
- m_messages->addMessage(MT_Zone, tempStr);
+ m_messages->addMessage(MT_Debug, tempStr);
}
void MessageShell::zoneBegin(const QString& shortZoneName)
@@ -951,39 +951,54 @@
#endif
m_messages->addMessage(MT_Player, message);
+ // Money lines: skip any wallet that is entirely empty.
+ if (player->profile.platinum || player->profile.gold ||
+ player->profile.silver || player->profile.copper)
+ {
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
message = QString::asprintf("PlayerMoney: P=%d G=%d S=%d C=%d",
- player->profile.platinum, player->profile.gold,
+ player->profile.platinum, player->profile.gold,
player->profile.silver, player->profile.copper);
#else
message.sprintf("PlayerMoney: P=%d G=%d S=%d C=%d",
- player->profile.platinum, player->profile.gold,
+ player->profile.platinum, player->profile.gold,
player->profile.silver, player->profile.copper);
#endif
m_messages->addMessage(MT_Player, message);
-
+ }
+
+ if (player->platinum_bank || player->gold_bank ||
+ player->silver_bank || player->copper_bank)
+ {
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
message = QString::asprintf("BankMoney: P=%d G=%d S=%d C=%d",
- player->platinum_bank, player->gold_bank,
+ player->platinum_bank, player->gold_bank,
player->silver_bank, player->copper_bank);
#else
message.sprintf("BankMoney: P=%d G=%d S=%d C=%d",
- player->platinum_bank, player->gold_bank,
+ player->platinum_bank, player->gold_bank,
player->silver_bank, player->copper_bank);
#endif
m_messages->addMessage(MT_Player, message);
+ }
+ if (player->profile.platinum_cursor || player->profile.gold_cursor ||
+ player->profile.silver_cursor || player->profile.copper_cursor)
+ {
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
message = QString::asprintf("CursorMoney: P=%d G=%d S=%d C=%d",
- player->profile.platinum_cursor, player->profile.gold_cursor,
+ player->profile.platinum_cursor, player->profile.gold_cursor,
player->profile.silver_cursor, player->profile.copper_cursor);
#else
message.sprintf("CursorMoney: P=%d G=%d S=%d C=%d",
- player->profile.platinum_cursor, player->profile.gold_cursor,
+ player->profile.platinum_cursor, player->profile.gold_cursor,
player->profile.silver_cursor, player->profile.copper_cursor);
#endif
m_messages->addMessage(MT_Player, message);
+ }
+ if (player->platinum_shared)
+ {
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
message = QString::asprintf("SharedMoney: P=%d",
player->platinum_shared);
@@ -992,15 +1007,19 @@
player->platinum_shared);
#endif
m_messages->addMessage(MT_Player, message);
+ }
+ if (player->currentRadCrystals || player->currentEbonCrystals)
+ {
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message = QString::asprintf("DoN Crystals: Radiant=%d Ebon=%d",
- player->currentRadCrystals, player->currentEbonCrystals);
+ message = QString::asprintf("DoN Crystals: Radiant=%d Ebon=%d",
+ player->currentRadCrystals, player->currentEbonCrystals);
#else
- message.sprintf("DoN Crystals: Radiant=%d Ebon=%d",
- player->currentRadCrystals, player->currentEbonCrystals);
+ message.sprintf("DoN Crystals: Radiant=%d Ebon=%d",
+ player->currentRadCrystals, player->currentEbonCrystals);
#endif
- m_messages->addMessage(MT_Player, message);
+ m_messages->addMessage(MT_Player, message);
+ }
// charProfileStruct.exp hasn't been found
// message = "Exp: " + Commanate(player->exp);
@@ -1062,18 +1081,19 @@
}
}
- message = "LDoN Earned Guk Points: " + Commanate(player->ldon_guk_points);
- m_messages->addMessage(MT_Player, message);
- message = "LDoN Earned Mira Points: " + Commanate(player->ldon_mir_points);
- m_messages->addMessage(MT_Player, message);
- message = "LDoN Earned MMC Points: " + Commanate(player->ldon_mmc_points);
- m_messages->addMessage(MT_Player, message);
- message = "LDoN Earned Ruj Points: " + Commanate(player->ldon_ruj_points);
- m_messages->addMessage(MT_Player, message);
- message = "LDoN Earned Tak Points: " + Commanate(player->ldon_tak_points);
- m_messages->addMessage(MT_Player, message);
- message = "LDoN Unspent Points: " + Commanate(player->ldon_avail_points);
- m_messages->addMessage(MT_Player, message);
+ // LDoN points on one line; skip entirely when everything is zero.
+ if (player->ldon_guk_points || player->ldon_mir_points ||
+ player->ldon_mmc_points || player->ldon_ruj_points ||
+ player->ldon_tak_points || player->ldon_avail_points)
+ {
+ message = "LDoN Points: Guk=" + Commanate(player->ldon_guk_points)
+ + " Mir=" + Commanate(player->ldon_mir_points)
+ + " MMC=" + Commanate(player->ldon_mmc_points)
+ + " Ruj=" + Commanate(player->ldon_ruj_points)
+ + " Tak=" + Commanate(player->ldon_tak_points)
+ + " Unspent=" + Commanate(player->ldon_avail_points);
+ m_messages->addMessage(MT_Player, message);
+ }
}
void MessageShell::increaseSkill(const uint8_t* data)
Modified: showeq/branches/xerxes-trunk-dev/src/spellshell.cpp
===================================================================
--- showeq/branches/xerxes-trunk-dev/src/spellshell.cpp 2026-07-17 18:19:21 UTC (rev 1668)
+++ showeq/branches/xerxes-trunk-dev/src/spellshell.cpp 2026-07-17 20:00:59 UTC (rev 1669)
@@ -443,16 +443,20 @@
// Your xxx has worn off.
// Your target resisted the xxx spell.
// Your spell fizzles.
- seqInfo("*** spellMessage *** %s", spell.toLatin1().data());
+#ifdef DIAG_SPELLSHELL
+ seqDebug("*** spellMessage *** %s", spell.toLatin1().data());
+#endif // DIAG_SPELLSHELL
+ // Dead: the spellMessage signal is never emitted (no caller in any tree),
+ // so this handler never runs.
if (spell.left(25) == QString("Your target resisted the ")) {
spell = spell.right(spell.length() - 25);
spell = spell.left(spell.length() - 7);
- seqInfo("RESIST: '%s'", spell.toLatin1().data());
+ //seqInfo("RESIST: '%s'", spell.toLatin1().data());
b = true;
} else if (spell.right(20) == QString(" spell has worn off.")) {
spell = spell.right(spell.length() - 5);
spell = spell.left(spell.length() - 20);
- seqInfo("WORE OFF: '%s'", spell.toLatin1().data());
+ //seqInfo("WORE OFF: '%s'", spell.toLatin1().data());
b = true;
}
@@ -544,7 +548,7 @@
}
else
{
- seqInfo("SpellItem '%s' finished.", (*it)->spellName().toLatin1().data());
+ seqSpell("'%s' finished.", (*it)->spellName().toLatin1().data());
if (m_lastPlayerSpell == spell)
m_lastPlayerSpell = 0;
emit delSpell(spell);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|