Loading Zone count bug

Old bugs stored here for reference.
Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Loading Zone count bug

Post by John Adams » Wed Sep 17, 2008 1:09 am

Possibly just a visual thing, but I just noticed after popping Oakmyst forest (zone id 195) that the server console is reporting:
Loading new Zone 'oakmyst'
Loaded 19383 NPC(s), 1234 Object(s), 1 Widget(s), 4 Sign(s).
which is nowhere near accurate. Doing a select count(*) on all records in zonespawnentry for zone ID 195, there are 830 records entirely in this zone. I am not sure where 19,383 is coming from, nor the large objects value. Widgets and signs may be accurate for this zone, we have yet to validate the data.
Any ideas? Doubt it's harmful, but gives my heart a jolt when I first logged in to make sure the zone was working. :)

Image
Retired
Posts: 251
Joined: Sun Oct 26, 2008 10:07 am

Post by Image » Sun Oct 26, 2008 11:43 am

NPCs, Objects, Widgets and Signs are loaded at startup. This is your overall count, not per zone. (This might have been changed).

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Mon Oct 27, 2008 6:23 am

Nah, this value is per-zone now, and way incorrect for all things spawned when a new zone starts up. These totals have never been accurate, but in this particular example it was WAYYY inaccurate.

Image
Retired
Posts: 251
Joined: Sun Oct 26, 2008 10:07 am

Post by Image » Mon Oct 27, 2008 6:27 am

The only place that this information is referenced is in World::init in World.cpp. This is called at bootup of eq2emu after loading the command list.
As I said this may have been changed. I am just looking at the SVN source.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Mon Oct 27, 2008 6:42 am

Here: WorldDatabase::LoadSpawns(ZoneServer* zone)
That's what spits these lines to the console.

Image
Retired
Posts: 251
Joined: Sun Oct 26, 2008 10:07 am

Post by Image » Mon Oct 27, 2008 6:46 am

Ah ok thanks John, I will try and take a look at that when I am off work tonight. I will atleast open a bug report when I can recreate your issue.
Thanks for clearing that up.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Tue Oct 28, 2008 6:54 am

Well, performing the query on your eq2live database produces 6,876 NPCs:

Code: Select all

Showing rows 0 - 29 (6,876 total, Query took 0.0312 sec)
SQL query: SELECT sg.id, se.id, s.x, s.y, s.z, s.x_offset, s.y_offset, s.z_offset, s.heading, se.spawn_id, se.spawnpercentage, s.respawn, s.location_id, s.id
FROM zonespawns s, zonespawngroup sg, zonespawnentry se, spawn_npcs sn
WHERE sn.spawn_id = se.spawn_id
AND sg.id = se.spawngroupid
AND sg.id = s.spawngroup_id
AND s.zone_id =195
ORDER BY sg.id, se.id
LIMIT 0 , 30
The numbers ARE accurate unless there is a problem with the sql query, which I cannot see.
BTW, WB image. Long time no see!

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Tue Oct 28, 2008 2:35 pm

What about adding a group by s.id:

Code: Select all

Showing rows 0 - 29 (325 total, Query took 0.0127 sec)
SQL query: SELECT sg.id, se.id, s.x, s.y, s.z, s.x_offset, s.y_offset, s.z_offset, s.heading, se.spawn_id, se.spawnpercentage, s.respawn, s.location_id, s.id
FROM zonespawns s, zonespawngroup sg, zonespawnentry se, spawn_npcs sn
WHERE sn.spawn_id = se.spawn_id
AND sg.id = se.spawngroupid
AND sg.id = s.spawngroup_id
AND s.zone_id =195
GROUP BY s.id
ORDER BY sg.id, se.id
LIMIT 0 , 30
Does that look about right to you for NPCs?

Image
Retired
Posts: 251
Joined: Sun Oct 26, 2008 10:07 am

Post by Image » Tue Oct 28, 2008 2:57 pm

Thanks LE, nice to be back, would be nice to have you in IRC sometime, Andrew had some stuff he wanted to discuss with you that pertain to the project.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Tue Oct 28, 2008 3:11 pm

Yah I just stopped doing IRC because noone ever used it to talk about the project, only about BS. I'll try to login tonight if I have time.

Image
Retired
Posts: 251
Joined: Sun Oct 26, 2008 10:07 am

Post by Image » Tue Oct 28, 2008 3:28 pm

Lol gotcha, won't take too long just a few ideas for you. I will watch for you in IRC.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Mon Nov 10, 2008 11:22 pm

LethalEncounter wrote:Does that look about right to you for NPCs?
Sorry, I must have missed this post before. Yes, that total looks more accurate. That is not to say it is always super whacked. Most of the times, if there is 1 widget, it says it loaded 1. etc... just sometimes, and I am not sure why, you get sky high totals that definitely are incorrect.
And again, it's super low priority, since it hurts nothing but my eyes.

Locked

Who is online

Users browsing this forum: No registered users and 0 guests