[10042] Implement CONDITION_QUESTAVAILABLE.

Also do come constatification of quest status check functions
and fix one unsafe use std::map operator[].
Never never use std::map operator [] for _read_ access.
Good chance corrupt related structure state ;)
Not in found case but in general.
This commit is contained in:
VladimirMangos 2010-06-07 22:21:28 +04:00
parent 5ea6815ea1
commit 5eabf12111
6 changed files with 193 additions and 179 deletions

View file

@ -317,9 +317,10 @@ enum ConditionType
CONDITION_NOITEM = 16, // item_id count
CONDITION_SPELL = 17, // spell_id 0, 1 (0: has spell, 1: hasn't spell)
CONDITION_INSTANCE_SCRIPT = 18, // map_id instance_condition_id (instance script specific enum)
CONDITION_QUESTAVAILABLE = 19, // quest_id 0 for case when loot/gossip possible only if player can start quest
};
#define MAX_CONDITION 19 // maximum value in ConditionType enum
#define MAX_CONDITION 20 // maximum value in ConditionType enum
struct PlayerCondition
{