Project 1999

Go Back   Project 1999 > Blue Community > Blue Server Chat

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 12-23-2013, 12:56 PM
Splorf22 Splorf22 is offline
Planar Protector


Join Date: Mar 2011
Posts: 3,236
Default

Quote:
Originally Posted by Aeolwind [You must be logged in to view images. Log in or Register.]
Find a problem you want to fix, download source, review, write a fix, PM to a blue or red name.
In questmgr.cpp there exists:
Code:
void QuestManager::UpdateSpawnTimer(uint32 id, uint32 newTime)
{
	bool found = false;

	database.UpdateSpawn2Timeleft(id, 0, (newTime/1000));
	LinkedListIterator<Spawn2*> iterator(zone->spawn2_list);
	iterator.Reset();
	while (iterator.MoreElements())
	{
		if(iterator.GetData()->GetID() == id)
		{
			if(!iterator.GetData()->NPCPointerValid())
			{
				iterator.GetData()->SetTimer(newTime);
			}
			found = true;
			break;
		}
		iterator.Advance();
	}

	if(!found)
	{
		//Spawn wasn't in this zone...
		//Tell the other zones to update their spawn time for this spawn point
		ServerPacket *pack = new ServerPacket(ServerOP_UpdateSpawn, sizeof(UpdateSpawnTimer_Struct));
		UpdateSpawnTimer_Struct *ust = (UpdateSpawnTimer_Struct*)pack->pBuffer;
		ust->id = id;
		ust->duration = newTime;
		worldserver.SendPacket(pack);
		safe_delete(pack);
	}
}
This appears to do exactly what you want: it updates the database and communicates with the other zone servers if necessary. Is the QuestManager stuff not available from your perl scripts? Or is it difficult to get the NPC id? I poked around in the source a bit more and it *looks* like a static global id per mob, but maybe not.

Anyway, basically I agree with Jeremy: it simply cannot be that hard to implement this, and it would be huge for the community.
__________________
Raev | Loraen | Sakuragi <The A-Team> | Solo Artist Challenge | Farmer's Market
Quote:
Originally Posted by Arteker
in words of anal fingers, just a filthy spaniard
 


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 04:00 PM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.