merlin
Public Area Guest
Posts: 19
|
Post by merlin on Jul 29, 2004 8:54:39 GMT
Oh, is that meant to be working...? I haven't seen anything on that screen...
|
|
Ringthane
Public Area Guest
Ardet nec Consumitur
Posts: 5,446
|
Post by Ringthane on Jul 29, 2004 8:57:17 GMT
Hm I have... too much actually ;D
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on Jul 29, 2004 9:03:42 GMT
Hm I have... too much actually ;D Which makes me think I should have seen something...
|
|
|
Post by sparrowhawk on Jul 29, 2004 9:14:07 GMT
Here's the SQL - I think that it is correct, which means that the GML_InBattle flag is probably wrongly set in some situations.
Could other SQL'ers just confirm the SQL for me, just to be sure?
$query = "SELECT DOM_Description"; $query .= " FROM (DOM_Domains INNER JOIN MPD_MapDescriptions ON MPD_DOM_ID = DOM_ID)"; $query .= " INNER JOIN GML_GameLords ON (GML_Row = MPD_Row) AND (GML_Column = MPD_Column)"; $query .= " WHERE GML_USR_ID = " . $_SESSION["user"]->getUserID(); $query .= " AND GML_InBattle = 1"; $query .= " AND GML_GAM_ID = " . $_SESSION["currentGame"]->getGameID(); $query .= " AND MPD_SCN_ID = " . $_SESSION["currentGame"]->getScenarioID(); $query .= " GROUP BY DOM_Description";
Just had a thought - I wonder if it's reporting dead lords from previous battles...
|
|
|
Post by sparrowhawk on Jul 29, 2004 9:31:32 GMT
I've just checked, and the location that you mention is in Iserath.
I'll check to see if it's a dead lord issue. Mads, had ANY battles taken place in Blood? Are you aware of any enemies or allies fighting in Blood?
|
|
Matija
Morkin Member
The Turtle Moves!
Posts: 1,696
|
Post by Matija on Jul 29, 2004 9:33:29 GMT
I understand a domain as a lord's land. So even if the plains are named Iserath, they sill could be owned by Blood.
|
|
|
Post by sparrowhawk on Jul 29, 2004 9:34:46 GMT
The MPD_DOM_ID (ie the foreign key pointing to the DOM_ID in the DOM_Domains table) is 33, which is Iserath
|
|
|
Post by sparrowhawk on Jul 29, 2004 11:24:02 GMT
No, the SQL links the lord to the location by row and column, and the location then links to domain by id, so it's not possible.
I'll investigate the InBattle flag some more. I have a feeling that that may be the problem
|
|
Matija
Morkin Member
The Turtle Moves!
Posts: 1,696
|
Post by Matija on Jul 31, 2004 7:28:54 GMT
I believe I have spotted the problem: Lord's current position is shown in the bloody hand of battle, not the position at the start of turn where battle took place.
So if Madses lord fought on the plains of Blood, but then moved to Isertah, the BHoB would now show Iserath instead of Blood.
|
|
|
Post by sparrowhawk on Jul 31, 2004 20:02:03 GMT
Bingo! Thanks Matija I must have been taking the silly pills when i wrote that script!
|
|
|
Post by sparrowhawk on Aug 2, 2004 7:38:27 GMT
OK, I'll run some more tests and get back to you all asap.
|
|