70 {
"None",
false,
false,
false,
false },
71 {
"Aura",
true,
true,
true,
false },
72 {
"Item Stored",
true,
true,
true,
false },
73 {
"Item Equipped",
true,
false,
false,
false },
74 {
"Zone",
true,
false,
false,
false },
75 {
"Reputation",
true,
true,
false,
false },
76 {
"Team",
true,
false,
false,
false },
77 {
"Skill",
true,
true,
false,
false },
78 {
"Quest Rewarded",
true,
false,
false,
false },
79 {
"Quest Taken",
true,
false,
false,
false },
80 {
"Drunken",
true,
false,
false,
false },
81 {
"WorldState",
true,
true,
false,
false },
82 {
"Active Event",
true,
false,
false,
false },
83 {
"Instance Info",
true,
true,
true,
false },
84 {
"Quest None",
true,
false,
false,
false },
85 {
"Class",
true,
false,
false,
false },
86 {
"Race",
true,
false,
false,
false },
87 {
"Achievement",
true,
false,
false,
false },
88 {
"Title",
true,
false,
false,
false },
89 {
"SpawnMask",
true,
false,
false,
false },
90 {
"Gender",
true,
false,
false,
false },
91 {
"Unit State",
true,
false,
false,
false },
92 {
"Map",
true,
false,
false,
false },
93 {
"Area",
true,
false,
false,
false },
94 {
"CreatureType",
true,
false,
false,
false },
95 {
"Spell Known",
true,
false,
false,
false },
96 {
"PhaseMask",
true,
false,
false,
false },
97 {
"Level",
true,
true,
false,
false },
98 {
"Quest Completed",
true,
false,
false,
false },
99 {
"Near Creature",
true,
true,
true,
false },
100 {
"Near GameObject",
true,
true,
false,
false },
101 {
"Object Entry or Guid",
true,
true,
true,
false },
102 {
"Object TypeMask",
true,
false,
false,
false },
103 {
"Relation",
true,
true,
false,
false },
104 {
"Reaction",
true,
true,
false,
false },
105 {
"Distance",
true,
true,
true,
false },
106 {
"Alive",
false,
false,
false,
false },
107 {
"Health Value",
true,
true,
false,
false },
108 {
"Health Pct",
true,
true,
false,
false },
109 {
"Realm Achievement",
true,
false,
false,
false },
110 {
"In Water",
false,
false,
false,
false },
111 {
"Terrain Swap",
false,
false,
false,
false },
112 {
"Sit/stand state",
true,
true,
false,
false },
113 {
"Daily Quest Completed",
true,
false,
false,
false },
114 {
"Charmed",
false,
false,
false,
false },
115 {
"Pet type",
true,
false,
false,
false },
116 {
"On Taxi",
false,
false,
false,
false },
117 {
"Quest state mask",
true,
true,
false,
false },
118 {
"Quest objective progress",
true,
true,
true,
false },
119 {
"Map Difficulty",
true,
false,
false,
false },
120 {
"Is Gamemaster",
true,
false,
false,
false },
121 {
"Object Entry or Guid",
true,
true,
true,
false },
122 {
"Object TypeMask",
true,
false,
false,
false },
123 {
"BattlePet Species Learned",
true,
true,
true,
false },
124 {
"On Scenario Step",
true,
false,
false,
false },
125 {
"Scene In Progress",
true,
false,
false,
false },
126 {
"Player Condition",
true,
false,
false,
false },
127 {
"Private Object",
false,
false,
false,
false },
128 {
"String ID",
false,
false,
false,
true },
129 {
"Label",
false,
false,
false,
false },
144 bool condMeets =
false;
181 condMeets = (
ConditionValue2 & (1 << player->GetReputationMgr().GetRank(faction))) != 0;
259 Map* map =
object->GetMap();
356 condMeets = unit == toUnit;
400 condMeets = unit->IsAlive();
433 condMeets = ((1 <<
object->GetMap()->GetSpawnMode()) &
ConditionValue1) != 0;
458 condMeets = unit->IsInWater();
468 condMeets = unit->IsStandState();
470 condMeets = unit->IsSitState();
483 condMeets = unit->IsCharmed();
489 if (
Pet* pet = player->GetPet())
496 condMeets = player->IsInFlight();
537 condMeets = player->CanBeGameMaster();
539 condMeets = player->IsGameMaster();
557 condMeets = !condMeets;
562 return condMeets &&
sScriptMgr->OnConditionCheck(
this, sourceInfo);
754 ABORT_MSG(
"Condition::GetSearcherTypeMaskForCondition - missing condition handling!");
783 std::ostringstream ss;
818 if (conditions.empty())
821 std::map<uint32, uint32> elseGroupSearcherTypeMasks;
822 for (ConditionContainer::const_iterator i = conditions.begin(); i != conditions.end(); ++i)
825 ASSERT((*i)->isLoaded() &&
"ConditionMgr::GetSearcherTypeMaskForConditionList - not yet loaded condition found in list");
826 std::map<uint32, uint32>::const_iterator itr = elseGroupSearcherTypeMasks.find((*i)->ElseGroup);
828 if (itr == elseGroupSearcherTypeMasks.end())
831 else if (!itr->second)
834 if ((*i)->ReferenceId)
844 elseGroupSearcherTypeMasks[(*i)->ElseGroup] &= (*i)->GetSearcherTypeMaskForCondition();
850 for (std::map<uint32, uint32>::const_iterator i = elseGroupSearcherTypeMasks.begin(); i != elseGroupSearcherTypeMasks.end(); ++i)
859 std::map<uint32, bool> elseGroupStore;
860 for (
Condition const* condition : conditions)
862 TC_LOG_DEBUG(
"condition",
"ConditionMgr::IsPlayerMeetToConditionList {} val1: {}", condition->ToString(), condition->ConditionValue1);
863 if (condition->isLoaded())
866 std::map<uint32, bool>::const_iterator itr = elseGroupStore.find(condition->ElseGroup);
868 if (itr == elseGroupStore.end())
869 elseGroupStore[condition->ElseGroup] =
true;
870 else if (!(*itr).second)
873 if (condition->ReferenceId)
879 elseGroupStore[condition->ElseGroup] =
false;
883 TC_LOG_DEBUG(
"condition",
"ConditionMgr::IsPlayerMeetToConditionList {} Reference template -{} not found",
884 condition->ToString(), condition->ReferenceId);
890 if (!condition->Meets(sourceInfo))
891 elseGroupStore[condition->ElseGroup] =
false;
895 for (std::map<uint32, bool>::const_iterator i = elseGroupStore.begin(); i != elseGroupStore.end(); ++i)
916 if (conditions.empty())
919 TC_LOG_DEBUG(
"condition",
"ConditionMgr::IsObjectMeetToConditions");
955 ConditionsByEntryMap::const_iterator i =
ConditionStore[sourceType].find(entry);
958 TC_LOG_DEBUG(
"condition",
"GetConditionsForNotGroupedEntry: found conditions for type {} and entry {}",
uint32(sourceType), entry);
986 ConditionsByEntryMap::const_iterator i = itr->second.find(spellId);
987 if (i != itr->second.end())
989 TC_LOG_DEBUG(
"condition",
"GetConditionsForSpellClickEvent: found conditions for SpellClickEvent entry {} spell {}", creatureId, spellId);
1002 ConditionsByEntryMap::const_iterator i = itr->second.find(spellId);
1003 if (i != itr->second.end())
1005 TC_LOG_DEBUG(
"condition",
"GetConditionsForSpellClickEvent: found conditions for SpellClickEvent entry {} spell {}", creatureId, spellId);
1017 ConditionsByEntryMap::const_iterator i = itr->second.find(spellId);
1018 if (i != itr->second.end())
1020 TC_LOG_DEBUG(
"condition",
"GetConditionsForVehicleSpell: found conditions for Vehicle entry {} spell {}", creatureId, spellId);
1030 SmartEventConditionContainer::const_iterator itr =
SmartEventConditionStore.find(std::make_pair(entryOrGuid, sourceType));
1033 ConditionsByEntryMap::const_iterator i = itr->second.find(eventId + 1);
1034 if (i != itr->second.end())
1036 TC_LOG_DEBUG(
"condition",
"GetConditionsForSmartEvent: found conditions for Smart Event entry or guid {} eventId {}", entryOrGuid, eventId);
1049 ConditionsByEntryMap::const_iterator i = (*itr).second.find(itemId);
1050 if (i != (*itr).second.end())
1052 TC_LOG_DEBUG(
"condition",
"GetConditionsForNpcVendorEvent: found conditions for creature entry {} item {}", creatureId, itemId);
1080 TC_LOG_INFO(
"misc",
"Reseting Loot Conditions...");
1094 TC_LOG_INFO(
"misc",
"Re-Loading `gossip_menu` Table for Conditions!");
1097 TC_LOG_INFO(
"misc",
"Re-Loading `gossip_menu_option` Table for Conditions!");
1099 sSpellMgr->UnloadSpellInfoImplicitTargetConditionLists();
1102 QueryResult result =
WorldDatabase.Query(
"SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, "
1103 "ConditionValue1, ConditionValue2, ConditionValue3, ConditionStringValue1, "
1104 "NegativeCondition, ErrorType, ErrorTextId, ScriptName FROM conditions");
1108 TC_LOG_INFO(
"server.loading",
">> Loaded 0 conditions. DB table `conditions` is empty!");
1116 Field* fields = result->Fetch();
1135 if (iConditionTypeOrReference >= 0)
1138 if (iSourceTypeOrReferenceId >= 0)
1141 if (iConditionTypeOrReference < 0)
1143 if (iConditionTypeOrReference == iSourceTypeOrReferenceId)
1145 TC_LOG_ERROR(
"sql.sql",
"Condition reference {} is referencing self, skipped", iSourceTypeOrReferenceId);
1151 char const* rowType =
"reference template";
1152 if (iSourceTypeOrReferenceId >= 0)
1153 rowType =
"reference";
1156 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in ConditionTarget ({})!", rowType, iSourceTypeOrReferenceId, cond->
ConditionTarget);
1158 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in value1 ({})!", rowType, iSourceTypeOrReferenceId, cond->
ConditionValue1);
1160 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in value2 ({})!", rowType, iSourceTypeOrReferenceId, cond->
ConditionValue2);
1162 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in value3 ({})!", rowType, iSourceTypeOrReferenceId, cond->
ConditionValue3);
1164 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in NegativeCondition ({})!", rowType, iSourceTypeOrReferenceId, cond->
NegativeCondition);
1165 if (cond->
SourceGroup && iSourceTypeOrReferenceId < 0)
1166 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in SourceGroup ({})!", rowType, iSourceTypeOrReferenceId, cond->
SourceGroup);
1167 if (cond->
SourceEntry && iSourceTypeOrReferenceId < 0)
1168 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in SourceEntry ({})!", rowType, iSourceTypeOrReferenceId, cond->
SourceEntry);
1176 if (iSourceTypeOrReferenceId < 0)
1323 while (result->NextRow());
1347 if (pMenuBounds.first != pMenuBounds.second)
1349 for (GossipMenusContainer::iterator itr = pMenuBounds.first; itr != pMenuBounds.second; ++itr)
1353 (*itr).second.Conditions.push_back(cond);
1366 if (pMenuItemBounds.first != pMenuItemBounds.second)
1368 for (GossipMenuItemsContainer::iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
1372 (*itr).second.Conditions.push_back(cond);
1386 std::list<uint32> sharedMasks;
1390 if (conditionEffMask & (1 << spellEffectInfo.EffectIndex))
1399 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table - spell {} EFFECT_{} - "
1406 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table - spell {} EFFECT_{} - "
1413 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table - spell {} EFFECT_{} - "
1425 auto itr = std::find_if(sharedMasks.begin(), sharedMasks.end(), [&](
uint32 mask) { return !!(mask & (1 << spellEffectInfo.EffectIndex)); });
1426 if (itr != sharedMasks.end())
1430 uint32 sharedMask = 1 << spellEffectInfo.EffectIndex;
1432 for (
size_t effIndex = spellEffectInfo.EffectIndex + 1; effIndex < spellInfo->
GetEffects().size(); ++effIndex)
1434 sharedMask |= 1 << effIndex;
1436 sharedMasks.push_back(sharedMask);
1439 for (
uint32 effectMask : sharedMasks)
1442 if (
uint32 commonMask = effectMask & conditionEffMask)
1444 size_t firstEffIndex = 0;
1445 for (; firstEffIndex < spellInfo->
GetEffects().size(); ++firstEffIndex)
1446 if ((1 << firstEffIndex) & effectMask)
1449 if (firstEffIndex >= spellInfo->
GetEffects().size())
1459 if (conditionEffMask != effectMask)
1461 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table, has incorrect SourceGroup {} (spell effectMask) set - "
1462 "effect masks are overlapping (all SourceGroup values having given bit set must be equal) - ignoring.", cond->
ToString(), cond->
SourceGroup);
1471 bool assigned =
false;
1472 for (
size_t i = firstEffIndex; i < spellInfo->
GetEffects().size(); ++i)
1474 if ((1 << i) & commonMask)
1487 sharedList->push_back(cond);
1498 TC_LOG_ERROR(
"sql.sql",
"{} Invalid ConditionSourceType in `condition` table, ignoring.", cond->
ToString());
1508 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->
ToString());
1516 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1525 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->
ToString());
1533 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1542 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->
ToString());
1550 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1559 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->
ToString());
1567 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1576 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->
ToString());
1584 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1593 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->
ToString());
1601 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1610 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->
ToString());
1618 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1627 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->
ToString());
1635 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1644 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->
ToString());
1652 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1661 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->
ToString());
1669 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1678 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->
ToString());
1686 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1695 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->
ToString());
1703 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1713 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table does not exist in `spell.dbc`, ignoring.", cond->
ToString());
1719 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table, has incorrect SourceGroup (spell effectMask) set, ignoring.", cond->
ToString());
1727 if (!((1 << spellEffectInfo.EffectIndex) & cond->
SourceGroup))
1730 if (spellEffectInfo.ChainTargets > 0)
1733 switch (spellEffectInfo.TargetA.GetSelectionCategory())
1744 switch (spellEffectInfo.TargetB.GetSelectionCategory())
1755 switch (spellEffectInfo.Effect)
1769 TC_LOG_ERROR(
"sql.sql",
"SourceEntry {} SourceGroup {} in `condition` table - spell {} does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_, __CHAIN__ or is not SPELL_EFFECT_PERSISTENT_AREA_AURA or SPELL_EFFECT_APPLY_AREA_AURA_* for effect {}, SourceGroup needs correction, ignoring.", cond->
SourceEntry, origGroup, cond->
SourceEntry,
uint32(spellEffectInfo.EffectIndex));
1770 cond->
SourceGroup &= ~(1 << spellEffectInfo.EffectIndex);
1781 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->
ToString());
1792 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table does not exist in `spell.dbc`, ignoring.", cond->
ToString());
1800 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry specifies non-existing quest, skipped.", cond->
ToString());
1807 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->
ToString());
1813 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table does not exist in `spell.dbc`, ignoring.", cond->
ToString());
1820 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->
ToString());
1826 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table does not exist in `spell.dbc`, ignoring.", cond->
ToString());
1834 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->
ToString());
1840 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1849 TC_LOG_ERROR(
"sql.sql",
"%s SourceEntry in `condition` table, does not exists in AreaTrigger.dbc, ignoring.", cond->
ToString().c_str());
1856 TC_LOG_ERROR(
"sql.sql",
"CONDITION_SOURCE_TYPE_TERRAIN_SWAP: is only for master branch, skipped");
1861 TC_LOG_ERROR(
"sql.sql",
"CONDITION_SOURCE_TYPE_PHASE: is only for master branch, skipped");
1866 TC_LOG_ERROR(
"sql.sql",
"CONDITION_SOURCE_TYPE_GRAVEYARD: is only for master branch, skipped");
1871 TC_LOG_ERROR(
"sql.sql",
"CONDITION_SOURCE_TYPE_AREATRIGGER: is only for master branch, skipped");
1876 TC_LOG_ERROR(
"sql.sql",
"CONDITION_SOURCE_TYPE_CONVERSATION_LINE: is only for master branch, skipped");
1894 TC_LOG_ERROR(
"sql.sql",
"{} Invalid ConditionType in `condition` table, ignoring.", cond->
ToString(
true));
1900 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->
ToString(
true));
1932 TC_LOG_ERROR(
"sql.sql",
"{} Zero item count in ConditionValue2, skipped.", cond->
ToString(
true));
2380 TC_LOG_ERROR(
"sql.sql",
"{} has out-of-range quest objective index specified ({}), it must be a number between 0 and 3. skipped.", cond->
ToString(
true), cond->
ConditionValue2);
2417 TC_LOG_ERROR(
"sql.sql",
"{} uses condition type not supported in this game version, skipped.", cond->
ToString(
true));
2435 TC_LOG_ERROR(
"sql.sql",
"{} has useless data in ConditionValue{} ({})!", cond->
ToString(
true), index, value);
2440 TC_LOG_ERROR(
"sql.sql",
"{} has useless data in ConditionStringValue{} ({})!", cond->
ToString(
true), index, value);
2446 for (ConditionContainer::const_iterator it = itr->second.begin(); it != itr->second.end(); ++it)
2454 for (ConditionContainer::const_iterator itr = it->second.begin(); itr != it->second.end(); ++itr)
2461 for (ConditionsByEntryMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
2462 for (ConditionContainer::const_iterator i = it->second.begin(); i != it->second.end(); ++i)
2468 for (ConditionsByEntryMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
2469 for (ConditionContainer::const_iterator i = it->second.begin(); i != it->second.end(); ++i)
2475 for (ConditionsByEntryMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
2476 for (ConditionContainer::const_iterator i = it->second.begin(); i != it->second.end(); ++i)
2483 for (ConditionsByEntryMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
2484 for (ConditionContainer::const_iterator i = it->second.begin(); i != it->second.end(); ++i)
@ CONDITION_SOURCE_TYPE_MAX
@ CONDITION_SOURCE_TYPE_CONVERSATION_LINE
@ CONDITION_SOURCE_TYPE_VEHICLE_SPELL
@ CONDITION_SOURCE_TYPE_DISENCHANT_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_REFERENCE_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_TERRAIN_SWAP
@ CONDITION_SOURCE_TYPE_NPC_VENDOR
@ CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION
@ CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT
@ CONDITION_SOURCE_TYPE_MAIL_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_PHASE
@ CONDITION_SOURCE_TYPE_SPELL_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_SMART_EVENT
@ CONDITION_SOURCE_TYPE_PICKPOCKETING_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_PROSPECTING_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_AREATRIGGER_CLIENT_TRIGGERED
@ CONDITION_SOURCE_TYPE_AREATRIGGER
@ CONDITION_SOURCE_TYPE_SPELL
@ CONDITION_SOURCE_TYPE_FISHING_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_GOSSIP_MENU
@ CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE
@ CONDITION_SOURCE_TYPE_ITEM_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET
@ CONDITION_SOURCE_TYPE_GRAVEYARD
@ CONDITION_SOURCE_TYPE_SKINNING_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_CREATURE_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_GAMEOBJECT_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_MILLING_LOOT_TEMPLATE
@ CONDITION_SOURCE_TYPE_SPELL_PROC
@ CONDITION_SOURCE_TYPE_QUEST_AVAILABLE
@ CONDITION_SOURCE_TYPE_NONE
@ INSTANCE_INFO_BOSS_STATE
@ INSTANCE_INFO_GUID_DATA
@ CONDITION_NEAR_GAMEOBJECT
@ CONDITION_QUESTREWARDED
@ CONDITION_REALM_ACHIEVEMENT
@ CONDITION_QUEST_OBJECTIVE_PROGRESS
@ CONDITION_DAILY_QUEST_DONE
@ CONDITION_INSTANCE_INFO
@ CONDITION_PRIVATE_OBJECT
@ CONDITION_OBJECT_ENTRY_GUID
@ CONDITION_DIFFICULTY_ID
@ CONDITION_SCENARIO_STEP
@ CONDITION_BATTLE_PET_COUNT
@ CONDITION_REPUTATION_RANK
@ CONDITION_QUEST_COMPLETE
@ CONDITION_ITEM_EQUIPPED
@ CONDITION_SCENE_IN_PROGRESS
@ CONDITION_PLAYER_CONDITION
@ CONDITION_NEAR_CREATURE
@ CONDITION_CREATURE_TYPE
std::vector< Condition * > ConditionContainer
@ RELATION_IN_RAID_OR_PARTY
DBCStorage< CharTitlesEntry > sCharTitlesStore(CharTitlesEntryfmt)
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
DBCStorage< AreaTriggerEntry > sAreaTriggerStore(AreaTriggerEntryfmt)
DBCStorage< AchievementEntry > sAchievementStore(Achievementfmt)
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
std::shared_ptr< ResultSet > QueryResult
DatabaseWorkerPool< WorldDatabaseConnection > WorldDatabase
Accessor to the world database.
#define ASSERT_NOTNULL(pointer)
@ GRID_MAP_TYPE_MASK_PLAYER
@ GRID_MAP_TYPE_MASK_CREATURE
@ GRID_MAP_TYPE_MASK_GAMEOBJECT
@ GRID_MAP_TYPE_MASK_CORPSE
#define TC_LOG_DEBUG(filterType__,...)
#define TC_LOG_ERROR(filterType__,...)
#define TC_LOG_INFO(filterType__,...)
LootStore LootTemplates_Spell("spell_loot_template", "spell id (random item creating)", false)
LootStore LootTemplates_Skinning("skinning_loot_template", "creature skinning id", true)
LootStore LootTemplates_Gameobject("gameobject_loot_template", "gameobject entry", true)
LootStore LootTemplates_Item("item_loot_template", "item entry", true)
LootStore LootTemplates_Milling("milling_loot_template", "item entry (herb)", true)
LootStore LootTemplates_Reference("reference_loot_template", "reference id", false)
LootStore LootTemplates_Disenchant("disenchant_loot_template", "item disenchant id", true)
LootStore LootTemplates_Prospecting("prospecting_loot_template", "item entry (ore)", true)
LootStore LootTemplates_Creature("creature_loot_template", "creature entry", true)
LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template", "creature pickpocket lootid", true)
LootStore LootTemplates_Mail("mail_loot_template", "mail template id", false)
LootStore LootTemplates_Fishing("fishing_loot_template", "area id", true)
std::pair< GossipMenuItemsContainer::iterator, GossipMenuItemsContainer::iterator > GossipMenuItemsMapBoundsNonConst
std::pair< GossipMenusContainer::iterator, GossipMenusContainer::iterator > GossipMenusMapBoundsNonConst
#define MAX_QUEST_LOG_SIZE
@ QUEST_STATUS_INCOMPLETE
@ SPELL_EFFECT_APPLY_AREA_AURA_PARTY
@ SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
@ SPELL_EFFECT_APPLY_AREA_AURA_PET
@ SPELL_EFFECT_APPLY_AREA_AURA_RAID
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
@ SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
@ SPELL_EFFECT_APPLY_AREA_AURA_OWNER
@ CREATURE_TYPE_GAS_CLOUD
#define CLASSMASK_ALL_PLAYABLE
#define RACEMASK_ALL_PLAYABLE
@ TARGET_FLAG_CORPSE_MASK
@ TARGET_FLAG_GAMEOBJECT_MASK
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
@ TARGET_SELECT_CATEGORY_CONE
@ TARGET_SELECT_CATEGORY_AREA
@ TARGET_SELECT_CATEGORY_NEARBY
@ TARGET_SELECT_CATEGORY_TRAJ
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
@ UNIT_STAND_STATE_SUBMERGED
@ UNIT_STATE_ALL_STATE_SUPPORTED
bool CompareValues(ComparisionType type, T val1, T val2)
bool isConditionTypeValid(Condition *cond) const
bool IsSpellUsedInSpellClickConditions(uint32 spellId) const
ConditionEntriesByCreatureIdMap NpcVendorConditionContainerStore
std::unordered_set< uint32 > SpellsUsedInSpellClickConditions
bool addToSpellImplicitTargetConditions(Condition *cond) const
ConditionEntriesByCreatureIdMap VehicleSpellConditionStore
bool IsObjectMeetingVehicleSpellConditions(uint32 creatureId, uint32 spellId, Player *player, Unit *vehicle) const
std::vector< Condition * > AllocatedMemoryStore
ConditionContainer const * GetConditionsForSpellClickEvent(uint32 creatureId, uint32 spellId) const
bool isSourceTypeValid(Condition *cond) const
bool addToGossipMenus(Condition *cond) const
uint32 GetSearcherTypeMaskForConditionList(ConditionContainer const &conditions) const
bool IsObjectMeetingNotGroupedConditions(ConditionSourceType sourceType, uint32 entry, ConditionSourceInfo &sourceInfo) const
static ConditionMgr * instance()
SmartEventConditionContainer SmartEventConditionStore
bool HasConditionsForNotGroupedEntry(ConditionSourceType sourceType, uint32 entry) const
bool IsObjectMeetingSmartEventConditions(int32 entryOrGuid, uint32 eventId, uint32 sourceType, Unit *unit, WorldObject *baseObject) const
bool IsObjectMeetToConditionList(ConditionSourceInfo &sourceInfo, ConditionContainer const &conditions) const
bool IsObjectMeetingSpellClickConditions(uint32 creatureId, uint32 spellId, WorldObject *clicker, WorldObject *target) const
static void LogUselessConditionValue(Condition const *cond, uint8 index, uint32 value)
bool addToLootTemplate(Condition *cond, LootTemplate *loot) const
bool addToGossipMenuItems(Condition *cond) const
ConditionEntriesByTypeArray ConditionStore
static bool CanHaveSourceGroupSet(ConditionSourceType sourceType)
ConditionEntriesByCreatureIdMap SpellClickEventConditionStore
ConditionReferenceContainer ConditionReferenceStore
static bool CanHaveSourceIdSet(ConditionSourceType sourceType)
bool IsObjectMeetToConditions(WorldObject *object, ConditionContainer const &conditions) const
static ConditionTypeInfo const StaticConditionTypeData[CONDITION_MAX]
bool IsObjectMeetingVendorItemConditions(uint32 creatureId, uint32 itemId, Player *player, Creature *vendor) const
static char const *const StaticSourceTypeData[CONDITION_SOURCE_TYPE_MAX]
void LoadConditions(bool isReload=false)
Class used to access individual fields of database query result.
std::string GetString() const
std::vector< GameEventData > GameEventDataMap
LootTemplate * GetLootForConditionFill(uint32 loot_id)
bool HaveLootFor(uint32 loot_id) const
bool isReference(uint32 id)
bool addConditionItem(Condition *cond)
static Creature * ToCreature(Object *o)
static Unit * ToUnit(Object *o)
static GameObject * ToGameObject(Object *o)
static ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
static bool IsValidGender(uint8 Gender)
static DrunkenState GetDrunkenstateByValue(uint8 value)
int32 RequiredNpcOrGo[QUEST_OBJECTIVES_COUNT]
uint32 RequiredNpcOrGoCount[QUEST_OBJECTIVES_COUNT]
uint32 GetQuestId() const
std::vector< Condition * > * ImplicitTargetConditions
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > const & GetEffects() const
ObjectGuid GetCreatorGUID() const
ObjectGuid GetOwnerGUID() const override
bool IsOnVehicle(Unit const *vehicle) const
bool IsInRaidWith(Unit const *unit) const
bool IsInPartyWith(Unit const *unit) const
ReputationRank GetReactionTo(WorldObject const *target) const
float GetDistance(WorldObject const *obj) const
ObjectData const creatureData[]
bool HasConditionStringValue1
Condition const * mLastFailedCondition
WorldObject * mConditionTargets[MAX_CONDITION_TARGETS]
ConditionTypes ConditionType
std::string ToString(bool ext=false) const
std::string ConditionStringValue1
uint32 GetSearcherTypeMaskForCondition() const
ConditionSourceType SourceType
uint32 GetMaxAvailableConditionTargets() const
bool Meets(ConditionSourceInfo &sourceInfo) const