Jump to content

[fix] Random Heroic/Dungeon daily


Guest piroy1337

Recommended Posts

What bug does the patch fix? What features does the patch add?

adds random Heroic/Dungeon dailys (ProofofDemise/Timear)

For which repository revision was the patch created?

9635

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

none

Who has been writing this patch? Please include either forum user names or email addresses.

me

add this to SharedDefines.h:

enum RandomDungeon
{
   RandomDungeon_Daily_Ingvar          = 60,
   RandomDungeon_Daily_Keristrasza     = 61,
   RandomDungeon_Daily_Leyguard        = 62,
   RandomDungeon_Daily_KingYmiron      = 63,
   RandomDungeon_Daily_ProphetTharon    = 64,
   RandomDungeon_Daily_Galdarah        = 65,
   RandomDungeon_Daily_Malganis        = 66,
   RandomDungeon_Daily_Sjonnir         = 67,
   RandomDungeon_Daily_Loken           = 68,
   RandomDungeon_Daily_Anubarak        = 69,
   RandomDungeon_Daily_Herald          = 70,
   RandomDungeon_Daily_Cyanigosa       = 71,
};
#define MAX_RandomDungeon_Daily_EVENT       12

enum RandomTimearForesees
{
   RandomTimearForesees_Daily_Centrifuge     = 72,
   RandomTimearForesees_Daily_Ymirjar        = 73,
   RandomTimearForesees_Daily_Infinite          = 74,
   RandomTimearForesees_Daily_Titanium       = 75,
};
#define MAX_RandomTimearForesees_Daily_EVENT       4

this to World.cpp:

if(m_gameTime > m_NextDailyQuestReset)
{
   ResetDailyQuests();
   SelectRandomBGDaily();
   SelectRandomDungeonDaily();
   SelectRandomTimearForeseesDaily();
   m_NextDailyQuestReset += DAY;
}


void World::SelectRandomDungeonDaily()
{
   //Delay all events
   for(uint8 eventId = 0; eventId < MAX_RandomDungeon_Daily_EVENT; ++eventId)
   {
       sGameEventMgr.StopEvent(RandomDungeon_Daily_Ingvar+eventId);
       WorldDatabase.PExecute("UPDATE game_event SET occurence = 5184000 WHERE entry = %u", RandomDungeon_Daily_Ingvar+eventId);
   }
   //Start new event  
   uint8 random = urand(0,11);
   sGameEventMgr.StartEvent(RandomDungeon_Daily_Ingvar+random);
   WorldDatabase.PExecute("UPDATE game_event SET occurence = 1400 WHERE entry = %u", RandomDungeon_Daily_Ingvar+random);
}

void World::RandomTimearForeseesDaily()
{
   //Delay all events
   for(uint8 eventId = 0; eventId < MAX_RandomTimearForesees_Daily_EVENT; ++eventId)
   {
       sGameEventMgr.StopEvent(RandomTimearForesees_Daily_Centrifuge+eventId);
       WorldDatabase.PExecute("UPDATE game_event SET occurence = 5184000 WHERE entry = %u",RandomTimearForesees_Daily_Centrifuge+eventId);
   }
   //Start new event  
   uint8 random = urand(0,3);
   sGameEventMgr.StartEvent(RandomTimearForesees_Daily_Centrifuge+random);
   WorldDatabase.PExecute("UPDATE game_event SET occurence = 1400 WHERE entry = %u", RandomTimearForesees_Daily_Centrifuge+random);
}

and this too World.h:

void SelectRandomDungeonDaily();
void SelectRandomTimearForeseesDaily();

here sql files for both:

-- RandomDungeonDaily
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 60, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 1440, 1440, 0, 'Daily Hero: Ingvar!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 61, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: Keristrasza!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 62, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: Leyguard!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 63, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: KingYmiron!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 64, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: ProphetTharon!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 65, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: Galdarah!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 66, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: Malganis!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 67, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: Sjonnir!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 68, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: Loken!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 69, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: Anubarak!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 70, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: Herald!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 71, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Hero: Cyanigosa!');
DELETE FROM creature_questrelation WHERE quest IN (13245, 13247, 13249, 13251, 13253, 13255, 13246, 13248, 13250, 13252, 13254, 13256);
INSERT INTO game_event_creature_quest VALUES
(20735, 13245, 60),
(20735, 13247, 61),
(20735, 13249, 62),
(20735, 13251, 63),
(20735, 13253, 64),
(20735, 13255, 65),
(20735, 13246, 66),
(20735, 13248, 67),
(20735, 13250, 68),
(20735, 13252, 69),
(20735, 13254, 70),
(20735, 13256, 71);

-- RandomTimearForeseesDaily
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 72, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 1440, 1440, 0, 'Daily Timear: Centrifuge Constructs!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 73, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Timear: Ymirjar Berserkers!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 74, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Timear: Infinite Agents!');
INSERT INTO game_event (entry, start_time, end_time, occurence, length, holiday, description) values( 75, 2010-01-03 06:00:00, 2020-01-03 09:00:00, 5184000, 1440, 0, 'Daily Timear: Titanium Vanguards!');
DELETE FROM creature_questrelation WHERE quest IN (13240, 13243, 13241, 13244);
INSERT INTO game_event_creature_quest VALUES
(31439, 13240, 72),
(31439, 13243, 73),
(31439, 13241, 74),
(31439, 13244, 75);

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use