71 {
"None",
false,
false,
false,
false },
72 {
"Aura",
true,
true,
true,
false },
73 {
"Item Stored",
true,
true,
true,
false },
74 {
"Item Equipped",
true,
false,
false,
false },
75 {
"Zone",
true,
false,
false,
false },
76 {
"Reputation",
true,
true,
false,
false },
77 {
"Team",
true,
false,
false,
false },
78 {
"Skill",
true,
true,
false,
false },
79 {
"Quest Rewarded",
true,
false,
false,
false },
80 {
"Quest Taken",
true,
false,
false,
false },
81 {
"Drunken",
true,
false,
false,
false },
82 {
"WorldState",
true,
true,
false,
false },
83 {
"Active Event",
true,
false,
false,
false },
84 {
"Instance Info",
true,
true,
true,
false },
85 {
"Quest None",
true,
false,
false,
false },
86 {
"Class",
true,
false,
false,
false },
87 {
"Race",
true,
false,
false,
false },
88 {
"Achievement",
true,
false,
false,
false },
89 {
"Title",
true,
false,
false,
false },
90 {
"SpawnMask",
true,
false,
false,
false },
91 {
"Gender",
true,
false,
false,
false },
92 {
"Unit State",
true,
false,
false,
false },
93 {
"Map",
true,
false,
false,
false },
94 {
"Area",
true,
false,
false,
false },
95 {
"CreatureType",
true,
false,
false,
false },
96 {
"Spell Known",
true,
false,
false,
false },
97 {
"PhaseMask",
true,
false,
false,
false },
98 {
"Level",
true,
true,
false,
false },
99 {
"Quest Completed",
true,
false,
false,
false },
100 {
"Near Creature",
true,
true,
true,
false },
101 {
"Near GameObject",
true,
true,
false,
false },
102 {
"Object Entry or Guid",
true,
true,
true,
false },
103 {
"Object TypeMask",
true,
false,
false,
false },
104 {
"Relation",
true,
true,
false,
false },
105 {
"Reaction",
true,
true,
false,
false },
106 {
"Distance",
true,
true,
true,
false },
107 {
"Alive",
false,
false,
false,
false },
108 {
"Health Value",
true,
true,
false,
false },
109 {
"Health Pct",
true,
true,
false,
false },
110 {
"Realm Achievement",
true,
false,
false,
false },
111 {
"In Water",
false,
false,
false,
false },
112 {
"Terrain Swap",
false,
false,
false,
false },
113 {
"Sit/stand state",
true,
true,
false,
false },
114 {
"Daily Quest Completed",
true,
false,
false,
false },
115 {
"Charmed",
false,
false,
false,
false },
116 {
"Pet type",
true,
false,
false,
false },
117 {
"On Taxi",
false,
false,
false,
false },
118 {
"Quest state mask",
true,
true,
false,
false },
119 {
"Quest objective progress",
true,
true,
true,
false },
120 {
"Map Difficulty",
true,
false,
false,
false },
121 {
"Is Gamemaster",
true,
false,
false,
false },
122 {
"Object Entry or Guid",
true,
true,
true,
false },
123 {
"Object TypeMask",
true,
false,
false,
false },
124 {
"BattlePet Species Learned",
true,
true,
true,
false },
125 {
"On Scenario Step",
true,
false,
false,
false },
126 {
"Scene In Progress",
true,
false,
false,
false },
127 {
"Player Condition",
true,
false,
false,
false },
128 {
"Private Object",
false,
false,
false,
false },
129 {
"String ID",
false,
false,
false,
true },
130 {
"Label",
false,
false,
false,
false },
131 {
"Group status",
true,
false,
false,
false }
140 return group ==
nullptr;
142 return group !=
nullptr;
165 bool condMeets =
false;
202 condMeets = (
ConditionValue2 & (1 << player->GetReputationMgr().GetRank(faction))) != 0;
280 Map* map =
object->GetMap();
377 condMeets = unit == toUnit;
421 condMeets = unit->IsAlive();
454 condMeets = ((1 <<
object->GetMap()->GetSpawnMode()) &
ConditionValue1) != 0;
479 condMeets = unit->IsInWater();
489 condMeets = unit->IsStandState();
491 condMeets = unit->IsSitState();
504 condMeets = unit->IsCharmed();
510 if (
Pet* pet = player->GetPet())
517 condMeets = player->IsInFlight();
558 condMeets = player->CanBeGameMaster();
560 condMeets = player->IsGameMaster();
584 condMeets = !condMeets;
589 return condMeets &&
sScriptMgr->OnConditionCheck(
this, sourceInfo);
784 ABORT_MSG(
"Condition::GetSearcherTypeMaskForCondition - missing condition handling!");
813 std::ostringstream ss;
848 if (conditions.empty())
851 std::map<uint32, uint32> elseGroupSearcherTypeMasks;
852 for (ConditionContainer::const_iterator i = conditions.begin(); i != conditions.end(); ++i)
855 ASSERT((*i)->isLoaded() &&
"ConditionMgr::GetSearcherTypeMaskForConditionList - not yet loaded condition found in list");
856 std::map<uint32, uint32>::const_iterator itr = elseGroupSearcherTypeMasks.find((*i)->ElseGroup);
858 if (itr == elseGroupSearcherTypeMasks.end())
861 else if (!itr->second)
864 if ((*i)->ReferenceId)
874 elseGroupSearcherTypeMasks[(*i)->ElseGroup] &= (*i)->GetSearcherTypeMaskForCondition();
880 for (std::map<uint32, uint32>::const_iterator i = elseGroupSearcherTypeMasks.begin(); i != elseGroupSearcherTypeMasks.end(); ++i)
889 std::map<uint32, bool> elseGroupStore;
890 for (
Condition const* condition : conditions)
892 TC_LOG_DEBUG(
"condition",
"ConditionMgr::IsPlayerMeetToConditionList {} val1: {}", condition->ToString(), condition->ConditionValue1);
893 if (condition->isLoaded())
896 std::map<uint32, bool>::const_iterator itr = elseGroupStore.find(condition->ElseGroup);
898 if (itr == elseGroupStore.end())
899 elseGroupStore[condition->ElseGroup] =
true;
900 else if (!(*itr).second)
903 if (condition->ReferenceId)
909 elseGroupStore[condition->ElseGroup] =
false;
913 TC_LOG_DEBUG(
"condition",
"ConditionMgr::IsPlayerMeetToConditionList {} Reference template -{} not found",
914 condition->ToString(), condition->ReferenceId);
920 if (!condition->Meets(sourceInfo))
921 elseGroupStore[condition->ElseGroup] =
false;
925 for (std::map<uint32, bool>::const_iterator i = elseGroupStore.begin(); i != elseGroupStore.end(); ++i)
946 if (conditions.empty())
949 TC_LOG_DEBUG(
"condition",
"ConditionMgr::IsObjectMeetToConditions");
985 ConditionsByEntryMap::const_iterator i =
ConditionStore[sourceType].find(entry);
988 TC_LOG_DEBUG(
"condition",
"GetConditionsForNotGroupedEntry: found conditions for type {} and entry {}",
uint32(sourceType), entry);
1016 ConditionsByEntryMap::const_iterator i = itr->second.find(spellId);
1017 if (i != itr->second.end())
1019 TC_LOG_DEBUG(
"condition",
"GetConditionsForSpellClickEvent: found conditions for SpellClickEvent entry {} spell {}", creatureId, spellId);
1032 ConditionsByEntryMap::const_iterator i = itr->second.find(spellId);
1033 if (i != itr->second.end())
1035 TC_LOG_DEBUG(
"condition",
"GetConditionsForSpellClickEvent: found conditions for SpellClickEvent entry {} spell {}", creatureId, spellId);
1047 ConditionsByEntryMap::const_iterator i = itr->second.find(spellId);
1048 if (i != itr->second.end())
1050 TC_LOG_DEBUG(
"condition",
"GetConditionsForVehicleSpell: found conditions for Vehicle entry {} spell {}", creatureId, spellId);
1060 SmartEventConditionContainer::const_iterator itr =
SmartEventConditionStore.find(std::make_pair(entryOrGuid, sourceType));
1063 ConditionsByEntryMap::const_iterator i = itr->second.find(eventId + 1);
1064 if (i != itr->second.end())
1066 TC_LOG_DEBUG(
"condition",
"GetConditionsForSmartEvent: found conditions for Smart Event entry or guid {} eventId {}", entryOrGuid, eventId);
1079 ConditionsByEntryMap::const_iterator i = (*itr).second.find(itemId);
1080 if (i != (*itr).second.end())
1082 TC_LOG_DEBUG(
"condition",
"GetConditionsForNpcVendorEvent: found conditions for creature entry {} item {}", creatureId, itemId);
1110 TC_LOG_INFO(
"misc",
"Reseting Loot Conditions...");
1124 TC_LOG_INFO(
"misc",
"Re-Loading `gossip_menu` Table for Conditions!");
1127 TC_LOG_INFO(
"misc",
"Re-Loading `gossip_menu_option` Table for Conditions!");
1129 sSpellMgr->UnloadSpellInfoImplicitTargetConditionLists();
1132 QueryResult result =
WorldDatabase.Query(
"SELECT SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, "
1133 "ConditionValue1, ConditionValue2, ConditionValue3, ConditionStringValue1, "
1134 "NegativeCondition, ErrorType, ErrorTextId, ScriptName FROM conditions");
1138 TC_LOG_INFO(
"server.loading",
">> Loaded 0 conditions. DB table `conditions` is empty!");
1146 Field* fields = result->Fetch();
1165 if (iConditionTypeOrReference >= 0)
1168 if (iSourceTypeOrReferenceId >= 0)
1171 if (iConditionTypeOrReference < 0)
1173 if (iConditionTypeOrReference == iSourceTypeOrReferenceId)
1175 TC_LOG_ERROR(
"sql.sql",
"Condition reference {} is referencing self, skipped", iSourceTypeOrReferenceId);
1181 char const* rowType =
"reference template";
1182 if (iSourceTypeOrReferenceId >= 0)
1183 rowType =
"reference";
1186 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in ConditionTarget ({})!", rowType, iSourceTypeOrReferenceId, cond->
ConditionTarget);
1188 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in value1 ({})!", rowType, iSourceTypeOrReferenceId, cond->
ConditionValue1);
1190 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in value2 ({})!", rowType, iSourceTypeOrReferenceId, cond->
ConditionValue2);
1192 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in value3 ({})!", rowType, iSourceTypeOrReferenceId, cond->
ConditionValue3);
1194 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in NegativeCondition ({})!", rowType, iSourceTypeOrReferenceId, cond->
NegativeCondition);
1195 if (cond->
SourceGroup && iSourceTypeOrReferenceId < 0)
1196 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in SourceGroup ({})!", rowType, iSourceTypeOrReferenceId, cond->
SourceGroup);
1197 if (cond->
SourceEntry && iSourceTypeOrReferenceId < 0)
1198 TC_LOG_ERROR(
"sql.sql",
"Condition {} {} has useless data in SourceEntry ({})!", rowType, iSourceTypeOrReferenceId, cond->
SourceEntry);
1206 if (iSourceTypeOrReferenceId < 0)
1353 while (result->NextRow());
1377 if (pMenuBounds.first != pMenuBounds.second)
1379 for (GossipMenusContainer::iterator itr = pMenuBounds.first; itr != pMenuBounds.second; ++itr)
1383 (*itr).second.Conditions.push_back(cond);
1396 if (pMenuItemBounds.first != pMenuItemBounds.second)
1398 for (GossipMenuItemsContainer::iterator itr = pMenuItemBounds.first; itr != pMenuItemBounds.second; ++itr)
1402 (*itr).second.Conditions.push_back(cond);
1416 std::list<uint32> sharedMasks;
1420 if (conditionEffMask & (1 << spellEffectInfo.EffectIndex))
1429 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table - spell {} EFFECT_{} - "
1436 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table - spell {} EFFECT_{} - "
1443 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table - spell {} EFFECT_{} - "
1455 auto itr = std::find_if(sharedMasks.begin(), sharedMasks.end(), [&](
uint32 mask) { return !!(mask & (1 << spellEffectInfo.EffectIndex)); });
1456 if (itr != sharedMasks.end())
1460 uint32 sharedMask = 1 << spellEffectInfo.EffectIndex;
1462 for (
size_t effIndex = spellEffectInfo.EffectIndex + 1; effIndex < spellInfo->
GetEffects().size(); ++effIndex)
1464 sharedMask |= 1 << effIndex;
1466 sharedMasks.push_back(sharedMask);
1469 for (
uint32 effectMask : sharedMasks)
1472 if (
uint32 commonMask = effectMask & conditionEffMask)
1474 size_t firstEffIndex = 0;
1475 for (; firstEffIndex < spellInfo->
GetEffects().size(); ++firstEffIndex)
1476 if ((1 << firstEffIndex) & effectMask)
1479 if (firstEffIndex >= spellInfo->
GetEffects().size())
1489 if (conditionEffMask != effectMask)
1491 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table, has incorrect SourceGroup {} (spell effectMask) set - "
1492 "effect masks are overlapping (all SourceGroup values having given bit set must be equal) - ignoring.", cond->
ToString(), cond->
SourceGroup);
1501 bool assigned =
false;
1502 for (
size_t i = firstEffIndex; i < spellInfo->
GetEffects().size(); ++i)
1504 if ((1 << i) & commonMask)
1517 sharedList->push_back(cond);
1528 TC_LOG_ERROR(
"sql.sql",
"{} Invalid ConditionSourceType in `condition` table, ignoring.", cond->
ToString());
1538 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->
ToString());
1546 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1555 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->
ToString());
1563 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1572 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->
ToString());
1580 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1589 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->
ToString());
1597 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1606 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->
ToString());
1614 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1623 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->
ToString());
1631 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1640 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->
ToString());
1648 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1657 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->
ToString());
1665 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1674 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->
ToString());
1682 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1691 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->
ToString());
1699 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1708 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->
ToString());
1716 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1725 TC_LOG_ERROR(
"sql.sql",
"{} SourceGroup in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->
ToString());
1733 TC_LOG_ERROR(
"sql.sql",
"{} SourceType, SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1743 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table does not exist in `spell.dbc`, ignoring.", cond->
ToString());
1749 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table, has incorrect SourceGroup (spell effectMask) set, ignoring.", cond->
ToString());
1757 if (!((1 << spellEffectInfo.EffectIndex) & cond->
SourceGroup))
1760 if (spellEffectInfo.ChainTargets > 0)
1763 switch (spellEffectInfo.TargetA.GetSelectionCategory())
1774 switch (spellEffectInfo.TargetB.GetSelectionCategory())
1785 switch (spellEffectInfo.Effect)
1799 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));
1800 cond->
SourceGroup &= ~(1 << spellEffectInfo.EffectIndex);
1811 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->
ToString());
1822 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table does not exist in `spell.dbc`, ignoring.", cond->
ToString());
1830 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry specifies non-existing quest, skipped.", cond->
ToString());
1837 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->
ToString());
1843 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table does not exist in `spell.dbc`, ignoring.", cond->
ToString());
1850 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->
ToString());
1856 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table does not exist in `spell.dbc`, ignoring.", cond->
ToString());
1864 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table, does not exist in `creature_template`, ignoring.", cond->
ToString());
1870 TC_LOG_ERROR(
"sql.sql",
"{} SourceEntry in `condition` table, does not exist in `item_template`, ignoring.", cond->
ToString());
1879 TC_LOG_ERROR(
"sql.sql",
"%s SourceEntry in `condition` table, does not exists in AreaTrigger.dbc, ignoring.", cond->
ToString().c_str());
1886 TC_LOG_ERROR(
"sql.sql",
"CONDITION_SOURCE_TYPE_TERRAIN_SWAP: is only for master branch, skipped");
1891 TC_LOG_ERROR(
"sql.sql",
"CONDITION_SOURCE_TYPE_PHASE: is only for master branch, skipped");
1896 TC_LOG_ERROR(
"sql.sql",
"CONDITION_SOURCE_TYPE_GRAVEYARD: is only for master branch, skipped");
1901 TC_LOG_ERROR(
"sql.sql",
"CONDITION_SOURCE_TYPE_AREATRIGGER: is only for master branch, skipped");
1906 TC_LOG_ERROR(
"sql.sql",
"CONDITION_SOURCE_TYPE_CONVERSATION_LINE: is only for master branch, skipped");
1924 TC_LOG_ERROR(
"sql.sql",
"{} Invalid ConditionType in `condition` table, ignoring.", cond->
ToString(
true));
1930 TC_LOG_ERROR(
"sql.sql",
"{} in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->
ToString(
true));
1962 TC_LOG_ERROR(
"sql.sql",
"{} Zero item count in ConditionValue2, skipped.", cond->
ToString(
true));
2410 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);
2454 TC_LOG_ERROR(
"sql.sql",
"{} uses condition type not supported in this game version, skipped.", cond->
ToString(
true));
2472 TC_LOG_ERROR(
"sql.sql",
"{} has useless data in ConditionValue{} ({})!", cond->
ToString(
true), index, value);
2477 TC_LOG_ERROR(
"sql.sql",
"{} has useless data in ConditionStringValue{} ({})!", cond->
ToString(
true), index, value);
2483 for (ConditionContainer::const_iterator it = itr->second.begin(); it != itr->second.end(); ++it)
2491 for (ConditionContainer::const_iterator itr = it->second.begin(); itr != it->second.end(); ++itr)
2498 for (ConditionsByEntryMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
2499 for (ConditionContainer::const_iterator i = it->second.begin(); i != it->second.end(); ++i)
2505 for (ConditionsByEntryMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
2506 for (ConditionContainer::const_iterator i = it->second.begin(); i != it->second.end(); ++i)
2512 for (ConditionsByEntryMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
2513 for (ConditionContainer::const_iterator i = it->second.begin(); i != it->second.end(); ++i)
2520 for (ConditionsByEntryMap::iterator it = itr->second.begin(); it != itr->second.end(); ++it)
2521 for (ConditionContainer::const_iterator i = it->second.begin(); i != it->second.end(); ++i)
static bool MeetsGroupStatusCondition(Player const *player, GroupStatusCondition status)
@ 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)
std::array< uint32, QUEST_OBJECTIVES_COUNT > RequiredNpcOrGoCount
uint32 GetQuestId() const
std::array< int32, QUEST_OBJECTIVES_COUNT > RequiredNpcOrGo
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