ArcEmu: Halloween Automatic Start And Ending + Localisation Support For Inkeepers - 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

Read:

When submitting patches - READ: http://arcemu.org/fo...?showtopic=2355 -
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Halloween Automatic Start And Ending + Localisation Support For Inkeepers

#1 User is offline   Sindastra 

  • Member
  • Pip
  • Group: Members
  • Posts: 44
  • Joined: 16-March 11
  • Gender:Female
  • Server OS:Linux

Posted 30 October 2011 - 01:20 PM

Automatic Halloween start and ending + localisation support for inkeepers
Index: Gossip_Innkeepers.cpp
===================================================================
--- Gossip_Innkeepers.cpp	(revision 4678)
+++ Gossip_Innkeepers.cpp	(working copy)
@@ -19,8 +19,6 @@
 
 #include "Setup.h"
 
-// Event of Hallowen control
-//#define EVENT_HALLOWEEN		// Decomment this for enable the event on Innkeepers
 
 #define SPELL_TRICK_OR_TREATED  24755
 #define SPELL_TREAT             24715
@@ -49,16 +47,20 @@
 	}
 	Arcemu::Gossip::Menu menu(pCreature->GetGUID(), TextID, 0);
 
-#ifdef	EVENT_HALLOWEEN
+// Halloween control
+	tm * ct = localtime(&UNIXTIME);
+	if( ct->tm_mon == 9 && ( ct->tm_mday > 17 && ct->tm_mday <= 31 ) )
+{
 	if(!Plr->HasAura(SPELL_TRICK_OR_TREATED))
-		menu.AddItem(Arcemu::Gossip::ICON_CHAT, "Trick or Treat!", 4);
-#endif
+		menu.AddItem(Arcemu::Gossip::ICON_CHAT, Plr->GetSession()->LocalizedWorldSrv(Arcemu::Gossip::TRICKORTREAT), 4);
+	}
+// End of Halloween control
 
 	if(pCreature->isVendor())
 		menu.AddItem(Arcemu::Gossip::ICON_VENDOR, Plr->GetSession()->LocalizedWorldSrv(Arcemu::Gossip::VENDOR), 1);
 
 	menu.AddItem(Arcemu::Gossip::ICON_CHAT, Plr->GetSession()->LocalizedWorldSrv(Arcemu::Gossip::INNKEEPER), 2);
-	menu.AddItem(Arcemu::Gossip::ICON_CHAT, "What can I do at an inn?", 3);
+	menu.AddItem(Arcemu::Gossip::ICON_CHAT, Plr->GetSession()->LocalizedWorldSrv(Arcemu::Gossip::INNKEEPERASK), 3);
 
 	sQuestMgr.FillQuestMenu(pCreature, Plr, menu);
 


Index: Gossip.h
===================================================================
--- Gossip.h	(revision 4678)
+++ Gossip.h	(working copy)
@@ -64,6 +64,8 @@
 		    CLASSTRAINER_TALENTCONFIRM,
 		    PETTRAINER_TALENTCONFIRM,
 		    DEATHKNIGHT = 82,
+			INNKEEPERASK = 83,
+			TRICKORTREAT = 84,
 		    TXTID_TALENTRESET = 5674,
 		    TXTID_PETUNTRAIN = 7722,
 		    TXTID_DUALSPECPURCHASE = 14136	//this is not correct.


INSERT INTO `worldstring_tables` VALUES ('83', 'What can I do at an inn?');
INSERT INTO `worldstring_tables` VALUES ('84', 'Trick or Treat!');

Attached File(s)


Posted Image
1

#2 User is offline   GooMan 

  • Member
  • Pip
  • Group: Members
  • Posts: 15
  • Joined: 12-January 10

Posted 10 November 2011 - 08:03 AM

But it's not the full Event :/...
0

#3 User is offline   Sindastra 

  • Member
  • Pip
  • Group: Members
  • Posts: 44
  • Joined: 16-March 11
  • Gender:Female
  • Server OS:Linux

Posted 10 December 2011 - 02:01 PM

View PostGooMan, on 10 November 2011 - 08:03 AM, said:

But it's not the full Event :/...


but full localisation and automatic event start and ending in inkeepers script :(
Posted Image
1

#4 User is offline   sanctum32 

  • Occasional Poster
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 28-November 10
  • Gender:Male

Posted 09 January 2012 - 05:20 AM

great addition, thanks!
Posted Image
Posted Image
Sorry for my bad english
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