ArcEmu: Respawn Time Of Game Objects - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Respawn Time Of Game Objects

#1 User is offline   Magnifikator 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 398
  • Joined: 05-October 11
  • Gender:Male
  • Location:Switzerland
  • Server OS:Windows

Posted 13 April 2013 - 02:08 AM

Hi

Rogues have to train their skill in lock opening on several training chests.

But player claims that these chests have a respawn time of about 20 minutes. However I couldn't find a field in the database for the respawn time of go's.

Is that time fixed in the core ?


A workaround would be to spawn much more (10-20pcs) of these chests.
Try out the LoE ArcEmu World database. Please visit dev.LandOfElves.net.

Posted Image


0

#2 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 13 April 2013 - 02:15 PM

Yes, unfortunately it is hardcoded.
It has been since Ascent times and I've never had time to change it :(
"The demand for free goods is infinite."
0

#3 User is offline   eatos92 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 193
  • Joined: 06-May 09
  • Gender:Male
  • Location:Serbia, Devil WoW

Posted 15 April 2013 - 09:07 AM

I could recode that part, to make it read from db table :)
Posted Image
0

#4 User is offline   Magnifikator 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 398
  • Joined: 05-October 11
  • Gender:Male
  • Location:Switzerland
  • Server OS:Windows

Posted 15 April 2013 - 10:44 AM

Yes, please. :rolleyes:

At least I would include it in LoE Sunrise core+db if nobody else is interested.
Try out the LoE ArcEmu World database. Please visit dev.LandOfElves.net.

Posted Image


0

#5 User is offline   Satanail 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 150
  • Joined: 11-March 12
  • Gender:Male
  • Location:Absurdistan
  • Server OS:Windows

Posted 15 April 2013 - 02:23 PM

There is also another thing that i think is wrong with the gameobjects. It is that destructible buildings rebuild themselves when the cell they are in unloads. Not sure if this is how it should be or not, but it causes lots of trouble in the Wintergrasp battle. Especially if it is done with few players.
0

#6 User is offline   eatos92 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 193
  • Joined: 06-May 09
  • Gender:Male
  • Location:Serbia, Devil WoW

Posted 15 April 2013 - 04:21 PM

Ok here it is...
I haven't tested it fully but it should work...Might need few more changes
SQL
ALTER TABLE `gameobject_names`
	ADD COLUMN `despawntime` INT(10) NOT NULL DEFAULT '1200000' COMMENT 'Despawn time for gameobjects default 20mins' AFTER `QuestItem6`;


.diff
commit 9177affc5d5f65cf0b151c0b834056a3c5f71c76
Author: Eatos <92eatos@gmail.com>
Date:   Mon Apr 15 23:17:17 2013 +0200

    Gameobject Despawn changed to db handling

diff --git a/src/arcemu-world/GameObject.cpp b/src/arcemu-world/GameObject.cpp
index bb052fd..8386276 100644
--- a/src/arcemu-world/GameObject.cpp
+++ b/src/arcemu-world/GameObject.cpp
@@ -553,7 +553,7 @@ void GameObject::UseFishingNode(Player* player)
 		school->CatchFish();
 
 		if(!school->CanFish())
-			sEventMgr.AddEvent(school, &GameObject::Despawn, (uint32)0, (1800000 + RandomUInt(3600000)), EVENT_GAMEOBJECT_EXPIRE, 10000, 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT);       // respawn in 30 - 90 minutes
+			sEventMgr.AddEvent(school, &GameObject::Despawn, (uint32)0, school->GetInfo()->despawntimer, EVENT_GAMEOBJECT_EXPIRE, 10000, 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT);       // respawn in 30 - 90 minutes
 	}
 	else if(Rand(((player->_GetSkillLineCurrent(SKILL_FISHING, true) - minskill) * 100) / maxskill))           // Open loot on success, otherwise FISH_ESCAPED.
 	{
diff --git a/src/arcemu-world/GameObject.h b/src/arcemu-world/GameObject.h
index 2b4857b..b404688 100644
--- a/src/arcemu-world/GameObject.h
+++ b/src/arcemu-world/GameObject.h
@@ -108,6 +108,7 @@ struct GameObjectInfo
 	uint32 Unknown14;
 	float Size;
 	uint32 QuestItems[6];
+	uint32 despawntimer;
 
 	// Quests
 	GameObjectGOMap goMap;
diff --git a/src/arcemu-world/MiscHandler.cpp b/src/arcemu-world/MiscHandler.cpp
index 895ec83..002685c 100644
--- a/src/arcemu-world/MiscHandler.cpp
+++ b/src/arcemu-world/MiscHandler.cpp
@@ -506,7 +506,7 @@ void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data)
 								if(pLock->locktype[i] == 1)   //Item or Quest Required;
 								{
 									if( despawn )
-										pGO->Despawn(0, (sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : 900000 + (RandomUInt(600000))));
+										pGO->Despawn(0, (sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? pGO->GetInfo()->despawntimer : pGO->GetInfo()->despawntimer + 6000000));
 									else
 										pGO->SetByte( GAMEOBJECT_BYTES_1, 0, 1 );
 
@@ -536,7 +536,7 @@ void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data)
 										else
 										{
 											pGO->CalcMineRemaining(true);
-											pGO->Despawn(0, 900000 + (RandomUInt(600000)));
+											pGO->Despawn(0, pGO->GetInfo()->despawntimer);
 											return;
 										}
 									}
@@ -547,7 +547,7 @@ void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data)
 											pGO->SetByte(GAMEOBJECT_BYTES_1, 0, 1);
 											return;
 										}
-										pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : (IS_INSTANCE(pGO->GetMapId()) ? 0 : 900000 + (RandomUInt(600000))));
+										pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? pGO->GetInfo()->despawntimer : (IS_INSTANCE(pGO->GetMapId()) ? 0 : pGO->GetInfo()->despawntimer));
 										return;
 									}
 								}
@@ -558,7 +558,7 @@ void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data)
 										pGO->SetByte(GAMEOBJECT_BYTES_1, 0, 1);
 										return;
 									}
-									pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : (IS_INSTANCE(pGO->GetMapId()) ? 0 : 900000 + (RandomUInt(600000))));
+									pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? pGO->GetInfo()->despawntimer : (IS_INSTANCE(pGO->GetMapId()) ? 0 : pGO->GetInfo()->despawntimer));
 									return;
 								}
 							}
@@ -571,7 +571,7 @@ void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data)
 							pGO->SetByte(GAMEOBJECT_BYTES_1, 0, 1);
 							return;
 						}
-						pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : (IS_INSTANCE(pGO->GetMapId()) ? 0 : 900000 + (RandomUInt(600000))));
+						pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? pGO->GetInfo()->despawntimer : (IS_INSTANCE(pGO->GetMapId()) ? 0 : pGO->GetInfo()->despawntimer));
 
 						return;
 
diff --git a/src/arcemu-world/ObjectStorage.cpp b/src/arcemu-world/ObjectStorage.cpp
index b0c299a..220cb9d 100644
--- a/src/arcemu-world/ObjectStorage.cpp
+++ b/src/arcemu-world/ObjectStorage.cpp
@@ -25,7 +25,7 @@
 const char * gItemPrototypeFormat						= "uuuusuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuffuffuuuuuuuuuufuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuusuuuuuuuuuuuuuuuuuuuuuuuuuuuuu";
 const char * gItemNameFormat							= "usu";
 const char * gCreatureNameFormat						= "usssuuuuuuuuuuffcuuuuuuu";
-const char * gGameObjectNameFormat						= "uuussssuuuuuuuuuuuuuuuuuuuuuuuufuuuuuu";
+const char * gGameObjectNameFormat						= "uuussssuuuuuuuuuuuuuuuuuuuuuuuufuuuuuuu";
 const char * gCreatureProtoFormat						= "uuuuuuufuuuffuuffuuuuuuuuffsuuufffuuuuuuuuuuuuuuuuu";
 const char * gDisplayBoundingFormat						= "ufffffff";
 const char * gVendorRestrictionEntryFormat				= "uuuuuuuu";

Posted Image
0

#7 User is offline   Magnifikator 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 398
  • Joined: 05-October 11
  • Gender:Male
  • Location:Switzerland
  • Server OS:Windows

Posted 16 April 2013 - 10:39 AM

Hey, that's cool. I have tried it and for me it works well, atm.
The only thing I changed is the word despawntimer to respawntimer. Because I think it reflects the meaning better.

Here's the commit:
http://landofelves.n...e22346c149b28ea
Try out the LoE ArcEmu World database. Please visit dev.LandOfElves.net.

Posted Image


0

#8 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 16 April 2013 - 03:20 PM

Sunrise core!
I like that name! :)
"The demand for free goods is infinite."
0

#9 User is offline   stjernerlever 

  • Newbie
  • Group: Members
  • Posts: 2
  • Joined: 18-April 14
  • Gender:Male
  • Server OS:Windows

Posted 18 April 2014 - 07:37 AM

Can you explain how to use the .diff command?
0

#10 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 18 April 2014 - 05:45 PM

View Poststjernerlever, on 18 April 2014 - 07:37 AM, said:

Can you explain how to use the .diff command?

http://bit.ly/1eJjDa3
"The demand for free goods is infinite."
0

#11 User is offline   stjernerlever 

  • Newbie
  • Group: Members
  • Posts: 2
  • Joined: 18-April 14
  • Gender:Male
  • Server OS:Windows

Posted 19 April 2014 - 10:33 AM

I had hoped to get an explanation, I know google exists.

I did execute the SQL command and now have the column with despawn timer. It doesn't work. I'm wondering if I should execute the .diff as well (and how) or if it's simply showing which changes he's made.

Sorry to sound like an *******, I sincerely welcome useful advice.

Thanks in advance.
0

#12 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 19 April 2014 - 11:16 AM

View Poststjernerlever, on 19 April 2014 - 10:33 AM, said:

I had hoped to get an explanation, I know google exists.

I did execute the SQL command and now have the column with despawn timer. It doesn't work. I'm wondering if I should execute the .diff as well (and how) or if it's simply showing which changes he's made.

Sorry to sound like an *******, I sincerely welcome useful advice.

Thanks in advance.

Those results do just like that ( explaining ).
A diff does show the changes, hence the name diff(erence).

Executing the SQL query won't be enough, since that only changes the database schema.


Anyhow it seems like I misunderstood what you were asking for. since you used the terminology wrong.
It seems you were more interested in what to do with that diff.
You can import that with either the unix patch command, or with git.
Refer to their manuals for details.
( I don't know it from the top of my head either, since I rarely use them )
"The demand for free goods is infinite."
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users