mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 11:48:37 +00:00
[Spells] Added IsNightTime() for Dance of the Fireflies (#3667)
* Added IsNightOnly for Dance of the Fireflies spell which should only be cast at night from 7pm to 4pm. * Update to include IsDayTime and replace magic numbers.
This commit is contained in:
@@ -711,6 +711,18 @@ bool Mob::DoCastingChecksZoneRestrictions(bool check_on_casting, int32 spell_id)
|
||||
Message(Chat::Red, "You cannot cast detrimental spells here.");
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
Zones where you can not cast a spell that is for daytime or nighttime only
|
||||
*/
|
||||
if (spells[spell_id].time_of_day == SpellTimeRestrictions::Day && !zone->zone_time.IsDayTime()) {
|
||||
MessageString(Chat::Red, CAST_DAYTIME);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (spells[spell_id].time_of_day == SpellTimeRestrictions::Night && !zone->zone_time.IsNightTime()) {
|
||||
MessageString(Chat::Red, CAST_NIGHTTIME);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (check_on_casting) {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user