Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Windows Servers

Archive::Windows Servers Archive area for Windows Servers's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-19-2003, 07:15 AM
Shadowrun[EQ]
Sarnak
 
Join Date: Apr 2003
Posts: 36
Default #spawnfix command shutting down zone

don't know if I'm compiling wrong or what, but everytime i use the spawn fix command it shuts down my zone.exe. I don't know what else to post for imformation.
__________________
Hmm DB error. . . ok fixed, hmm can't login. . .ok fixed, hmmm 1017 error. . .ok fixed, hmmmm crashed to desktop. . .ok fixed, hmmmmm UI Error. . .ok fixed, HardDrive Failure all Data is Lost. . .GAWD F$#$ DAMMIT PEACE OF S@#$ FU#@$#ING LIFE OF MINE#@$#@$!!!!
Reply With Quote
  #2  
Old 06-19-2003, 09:39 AM
Wolfman
Fire Beetle
 
Join Date: Mar 2003
Posts: 23
Default

Does it crash for every NPC? or just certian ones? I'll thuroughly test it this weekend and see what I can find. My previous tests showed everything was ok. However, I only tested it with about 20 mobs in one zone.
Reply With Quote
  #3  
Old 06-19-2003, 10:10 AM
Bigpull
Discordant
 
Join Date: Feb 2003
Posts: 305
Default

For the short attention span crowd, YES it is broken.

Wolfman, it's mostly hitting the same npc twice.

Current implementation in my local tree,
fixes a memleak, target errors, checks for dupes, and despawns the npc.
The big problem comes from us altering the spawn2 and not reloading it into the zones cache. Once all the npc's are gone or in thier correct position you need to #shutdown(static) or leave(dynamic) the zone, I'll look into spliting the cacheing out into a seperate function we can call from zone->Repop().
Code:
#if 0
// Corrupts zone data
// test with a #repop after a #spawnfix
	else if (strcasecmp(sep->arg[0], "#spawnfix") == 0) { 
		if (!target||!target->IsNPC()) { 
			Message(0, "Error: #spawnfix: No Target."); 
		} 
		else { 
			int32 tmp = 0; 
			char errbuf[MYSQL_ERRMSG_SIZE]; 
			char *query = 0; 
			MYSQL_RES *result; 
			MYSQL_ROW row; 
			if (database.RunQuery(query, MakeAnyLenString(&query, "SELECT id from spawn2 where zone='%s' AND x='%f' AND y='%f' AND heading='%f'", zone->GetShortName(), target->GetX(), target->GetY(), target->GetHeading()), errbuf, &result)) { 
				if (mysql_num_rows(result) == 1) {
				    row = mysql_fetch_row(result);
				    delete[] query;
				    mysql_free_result(result);
				    tmp = atoi(row[0]);
				    if(database.RunQuery(query, MakeAnyLenString(&query, "UPDATE spawn2 SET x='%f', y='%f', z='%f', heading='%f' WHERE id='%i'",this->GetX(), this->GetY(), this->GetZ(), this->GetHeading(),tmp), errbuf, 0)){
				          Message(0, "Updating coordinates successful.");
                          delete[] query;
                          target->Depop(false);
                    }
                    else {
				          Message(0, "Update failed, UPDATE command error!");
                          delete[] query;
                          mysql_free_result(result);
                    }
				}
				else {
				    delete[] query; 
				    mysql_free_result(result);
				    Message(0, "Update failed, duplicate spawns detected!");
				}
			} 
			else { 
				delete[] query; 
				mysql_free_result(result); 
				Message(0, "Update failed, SELECT command error!"); 
			} 
		} 
	} 
#endif
Reply With Quote
  #4  
Old 06-19-2003, 12:13 PM
Wolfman
Fire Beetle
 
Join Date: Mar 2003
Posts: 23
Default

You rule Bigpull
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:58 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3