ArcEmu: Disable Logout Timer - 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

Disable Logout Timer

#1 User is offline   Claudenegm 

  • Member
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 04-October 08
  • Gender:Male

Posted 31 July 2009 - 02:35 PM

Patch Title: Disable logout timer for players!
Detailed Explanation: You can disable logout timer using this patch
How to reproduce: When you logout from WoW as a normal player you are supposed to wait 20 secs to log out.
Patch:
Index: configs/optional.conf
===================================================================
--- configs/optional.conf	(revision 2803)
+++ configs/optional.conf	(working copy)
@@ -57,6 +57,11 @@
 #      The maximum number of professions a player can have at a time.
 #      Default: 2
 #
+#    LogoutTimer
+#      Set it to the value you want between 20000 - 1 be careful this doesn't affect visually
+#      means that if you set to 10000 = 10 secs it will still go in logout from 20 but 
+#      will logout at 10
+#      Default: 20000
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
 
 <Optional StartingLevel="1"
@@ -69,7 +74,8 @@
 	Unstuck="0" 
 	UnstuckCooldown="60" 
 	UnstuckToBind="0"
-	MaxProfessions="2">
+	MaxProfessions="2"
+	LogoutTimer="20000">
 
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
 # Interfaction Options
Index: src/arcemu-world/MiscHandler.cpp
===================================================================
--- src/arcemu-world/MiscHandler.cpp	(revision 2803)
+++ src/arcemu-world/MiscHandler.cpp	(working copy)
@@ -844,6 +844,14 @@
 			return;
 		}
 
+		int32 logout_timer =  Config.OptionalConfig.GetIntDefault( "Optional" , "LogoutTimer" , 20000);
+
+		if(logout_timer <= 1)
+		{
+			SetLogoutTimer(1);
+			return;
+		}
+
 		data << uint32(0); //Filler
 		data << uint8(0); //Logout accepted
 		SendPacket( &data );
@@ -856,8 +864,19 @@
 
 		//make player sit
 		pPlayer->SetStandState(STANDSTATE_SIT);
-		SetLogoutTimer(20000);
+
+		if(logout_timer > 20000)
+		{
+			SetLogoutTimer(20000);
+		}
+		else
+		{
+			SetLogoutTimer(logout_timer);
+		}
+
 	}
+
+
 	/*
 	> 0 = You can't Logout Now
 	*/

Download:
Attached File  logout_timer_control.patch (1.73K)
Number of downloads: 4

Enjoy!

If you want also a patch to help you choosing required character level to create a Death Knight Click Here

Also, if you can help me with some questions i had please visit this post!

Thanks
0

#2 User is offline   alleycat 

  • Helps so much & is so mature & gay
  • PipPipPipPipPip
  • Group: Members
  • Posts: 835
  • Joined: 25-July 08
  • Gender:Male

Posted 31 July 2009 - 02:47 PM

But, but, wait? If you set it to true, then wouldn't that turn OFF instant log out? Check you logic.
I can haz cookie?
0

#3 User is offline   Claudenegm 

  • Member
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 04-October 08
  • Gender:Male

Posted 31 July 2009 - 03:02 PM

View Postalleycat, on 31 July 2009 - 02:47 PM, said:

But, but, wait? If you set it to true, then wouldn't that turn OFF instant log out? Check you logic.

No, disable log out timer will get u instant log out,
Disable logout timer = false = 0
Enable logout timer = true = 1

Correct me if im wrong
0

#4 User is offline   alleycat 

  • Helps so much & is so mature & gay
  • PipPipPipPipPip
  • Group: Members
  • Posts: 835
  • Joined: 25-July 08
  • Gender:Male

Posted 31 July 2009 - 03:08 PM

Well, leaving DisableLogoutTimer as zero would cause the Logout Timer to be disabled >-<
I can haz cookie?
0

#5 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 31 July 2009 - 04:11 PM

add the config check to GM check for logout instead of making completely new check :P (MiscHandler, line 824)
0

#6 User is offline   Egari 

  • ArcEmu Lover
  • Group: Retired
  • Posts: 233
  • Joined: 08-June 08
  • Gender:Male
  • Location:The Netherlands

Posted 31 July 2009 - 05:33 PM

+
+               if(Config.OptionalConfig.GetBoolDefault( "Optional" , "DisableLogoutTimer" , false ))
+               {
+                       SetLogoutTimer(20000);
+               }
+               else
+               {
+                       SetLogoutTimer(1);
+               }


kay, so lets say we set DisableLogoutTimer to 1 in config, meaning we want it disabled.
-> boolean disabled = Config.OptionalConfig.GetBoolDefault( "Optional" , "DisableLogoutTimer" , false );
( -> disabled = true)
->
if( disabled ) 
{ // (condition is true so this is triggered)
   SetLogoutTimer(20000);
}
else
{
   SetLogoutTimer(1);
}


If you look at it that way alleycat is right, your logic fails.


View PostClaudenegm, on 31 July 2009 - 03:02 PM, said:

No, disable log out timer will get u instant log out,
Disable logout timer = false = 0
Enable logout timer = true = 1

Correct me if im wrong



You're not wrong, you just fail, as you dont see that the OPs (your own) logic fails and that setting "DisableLogoutTimer" to 1 would ENABLE logout timer instead of disabling it.
0

#7 User is offline   Claudenegm 

  • Member
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 04-October 08
  • Gender:Male

Posted 01 August 2009 - 12:29 AM

View PostKrzysiek, on 31 July 2009 - 04:11 PM, said:

add the config check to GM check for logout instead of making completely new check :P (MiscHandler, line 824)

nope, cuz GM check will not pass trough this part:

if( pPlayer->CombatStatus.IsInCombat() || //can't quit still in combat
pPlayer->DuelingWith != NULL ) //can't quit still dueling or attacking
{

and, we just want this part, we just want to set logout timer to 1 to disable waiting!
0

#8 User is offline   Claudenegm 

  • Member
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 04-October 08
  • Gender:Male

Posted 02 August 2009 - 01:44 AM

ok, i added a new one up there is better then the other!
0

#9 User is offline   Shauren 

  • Helper
  • Group: Contributor
  • Posts: 808
  • Joined: 04-November 08
  • Gender:Male
  • Location:Poland
  • Interests:hmm, wow?

Posted 02 August 2009 - 02:01 PM

i see ;)
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