Core/Conditions: Add CONDITION_TITLE

Original patch by svetilo12
This commit is contained in:
Nay
2012-04-07 23:15:16 +01:00
parent f17b990f68
commit 7a5f6dd198
2 changed files with 14 additions and 4 deletions
+13 -3
View File
@@ -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;
+1 -1
View File
@@ -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, //