aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Conditions
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-03-14 23:31:49 +0100
committerShauren <shauren.trinity@gmail.com>2018-03-14 23:31:49 +0100
commit5bd61e91bf0a4530598a5969047d0374fa761ff8 (patch)
tree0a91d3818d81d8498a064582c5e5ef1dc207803f /src/server/game/Conditions
parentbc88d3bc15debb70432603b21a2319b72db02f49 (diff)
Core/Misc: Graveyards can now use conditions, SourceType = 27, SourceEntry = graveyard_zone.ID
Diffstat (limited to 'src/server/game/Conditions')
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp7
-rw-r--r--src/server/game/Conditions/ConditionMgr.h3
2 files changed, 9 insertions, 1 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index a2a97faa783..8598b44915d 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -1852,6 +1852,13 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const
case CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION:
case CONDITION_SOURCE_TYPE_SMART_EVENT:
break;
+ case CONDITION_SOURCE_TYPE_GRAVEYARD:
+ if (!sWorldSafeLocsStore.LookupEntry(cond->SourceEntry))
+ {
+ TC_LOG_ERROR("sql.sql", "%s SourceEntry in `condition` table, does not exist in WorldSafeLocs.db2, ignoring.", cond->ToString().c_str());
+ return false;
+ }
+ break;
default:
TC_LOG_ERROR("sql.sql", "%s Invalid ConditionSourceType in `condition` table, ignoring.", cond->ToString().c_str());
return false;
diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h
index e85d2aa9ee0..a94a14c6f71 100644
--- a/src/server/game/Conditions/ConditionMgr.h
+++ b/src/server/game/Conditions/ConditionMgr.h
@@ -162,7 +162,8 @@ enum ConditionSourceType
CONDITION_SOURCE_TYPE_SPELL_PROC = 24,
CONDITION_SOURCE_TYPE_TERRAIN_SWAP = 25,
CONDITION_SOURCE_TYPE_PHASE = 26,
- CONDITION_SOURCE_TYPE_MAX = 27 // MAX
+ CONDITION_SOURCE_TYPE_GRAVEYARD = 27,
+ CONDITION_SOURCE_TYPE_MAX = 28 // MAX
};
enum RelationType