Core/Conditions: Add CONDITION_TITLE
Original patch by svetilo12
This commit is contained in:
@@ -422,6 +422,9 @@ uint32 Condition::GetSearcherTypeMaskForCondition()
|
||||
case CONDITION_PHASEMASK:
|
||||
mask |= GRID_MAP_TYPE_MASK_ALL;
|
||||
break;
|
||||
case CONDITION_TITLE:
|
||||
mask |= GRID_MAP_TYPE_MASK_PLAYER;
|
||||
break;
|
||||
default:
|
||||
ASSERT(false && "Condition::GetSearcherTypeMaskForCondition - missing condition handling!");
|
||||
break;
|
||||
@@ -1826,9 +1829,16 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
sLog->outErrorDb("Phasemask condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_UNUSED_18:
|
||||
sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_18 in `conditions` table - ignoring");
|
||||
return false;
|
||||
case CONDITION_TITLE:
|
||||
{
|
||||
CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(cond->ConditionValue1);
|
||||
if (!titleEntry)
|
||||
{
|
||||
sLog->outErrorDb("Title condition has non existing title in value1 (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CONDITION_UNUSED_19:
|
||||
sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_19 in `conditions` table - ignoring");
|
||||
return false;
|
||||
|
||||
@@ -48,7 +48,7 @@ enum ConditionTypes
|
||||
CONDITION_CLASS = 15, // class 0 0 true if player's class is equal to class
|
||||
CONDITION_RACE = 16, // race 0 0 true if player's race is equal to race
|
||||
CONDITION_ACHIEVEMENT = 17, // achievement_id 0 0 true if achievement is complete
|
||||
CONDITION_UNUSED_18 = 18, //
|
||||
CONDITION_TITLE = 18, // title id 0 0 true if player has title
|
||||
CONDITION_UNUSED_19 = 19, //
|
||||
CONDITION_UNUSED_20 = 20, //
|
||||
CONDITION_UNUSED_21 = 21, //
|
||||
|
||||
Reference in New Issue
Block a user