[11077] Game event fixes and condition improvments.

* At game events table loading checked not only allowed event ids range but also event existance.
* Renamed CONDITION_ACTIVE_EVENT -> CONDITION_ACTIVE_GAME_EVENT
* Implemented new conditions:
   - CONDITION_NOT_ACTIVE_GAME_EVENT
   - CONDITION_ACTIVE_HOLIDAY
   - CONDITION_NOT_ACTIVE_HOLIDAY

Recomended use holiday version where possible as more portable.
This commit is contained in:
VladimirMangos 2011-01-28 23:29:04 +03:00
parent 84dd2e4393
commit 2fd536fe43
9 changed files with 90 additions and 62 deletions

View file

@ -125,6 +125,12 @@ void LootStore::LoadLootTable()
continue; // error already printed to log/console.
}
if (mincountOrRef < 0 && condition != CONDITION_NONE)
{
sLog.outErrorDb("Table '%s' entry %u mincountOrRef %i < 0 and not allowed has condition, skipped",
GetName(), entry, mincountOrRef);
continue;
}
if(!PlayerCondition::IsValid(condition,cond_value1, cond_value2))
{