mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
[c12591] Add support for the Rabbit Day
This commit is contained in:
parent
de4c1edf9b
commit
93c35f034d
5 changed files with 20 additions and 1 deletions
|
|
@ -1363,6 +1363,17 @@ bool Creature::LoadFromDB(uint32 guidlow, Map* map)
|
|||
if (m_isCreatureLinkingTrigger && isAlive())
|
||||
GetMap()->GetCreatureLinkingHolder()->DoCreatureLinkingEvent(LINKING_EVENT_RESPAWN, this);
|
||||
|
||||
// check if it is rabbit day
|
||||
if (isAlive() && sWorld.getConfig(CONFIG_UINT32_RABBIT_DAY))
|
||||
{
|
||||
time_t rabbit_day = time_t(sWorld.getConfig(CONFIG_UINT32_RABBIT_DAY));
|
||||
tm rabbit_day_tm = *localtime(&rabbit_day);
|
||||
tm now_tm = *localtime(&sWorld.GetGameTime());
|
||||
|
||||
if (now_tm.tm_mon == rabbit_day_tm.tm_mon && now_tm.tm_mday == rabbit_day_tm.tm_mday)
|
||||
CastSpell(this, 10710 + urand(0, 2), true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue