mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Conditions: Improved mergeability between branches
This commit is contained in:
3
sql/updates/world/2016_99_99_99_world_335.sql
Normal file
3
sql/updates/world/2016_99_99_99_world_335.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
--
|
||||
-- Only for 3.3.5!
|
||||
UPDATE `conditions` SET `ConditionTypeOrReference`=42 WHERE `ConditionTypeOrReference`=41;
|
||||
@@ -670,8 +670,8 @@ enum RBACPermissions
|
||||
RBAC_PERM_COMMAND_WP_UNLOAD = 772,
|
||||
RBAC_PERM_COMMAND_WP_RELOAD = 773,
|
||||
RBAC_PERM_COMMAND_WP_SHOW = 774,
|
||||
RBAC_PERM_COMMAND_MODIFY_CURRENCY = 775, // only 4.3.4
|
||||
RBAC_PERM_COMMAND_DEBUG_PHASE = 776, // only 4.3.4
|
||||
RBAC_PERM_COMMAND_MODIFY_CURRENCY = 775, // only 6.x
|
||||
RBAC_PERM_COMMAND_DEBUG_PHASE = 776, // only 6.x
|
||||
RBAC_PERM_COMMAND_MAILBOX = 777,
|
||||
RBAC_PERM_COMMAND_AHBOT = 778,
|
||||
RBAC_PERM_COMMAND_AHBOT_ITEMS = 779,
|
||||
|
||||
@@ -55,7 +55,8 @@ char const* const ConditionMgr::StaticSourceTypeData[CONDITION_SOURCE_TYPE_MAX]
|
||||
"SmartScript",
|
||||
"Npc Vendor",
|
||||
"Spell Proc",
|
||||
"Phase Def"
|
||||
"Terrain Swap",
|
||||
"Phase"
|
||||
};
|
||||
|
||||
ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData[CONDITION_MAX] =
|
||||
@@ -101,6 +102,7 @@ ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData[COND
|
||||
{ "Health Pct", true, true, false },
|
||||
{ "Realm Achievement", true, false, false },
|
||||
{ "In Water", false, false, false },
|
||||
{ "Terrain Swap", false, false, false },
|
||||
{ "Sit/stand state", true, true, false }
|
||||
};
|
||||
|
||||
@@ -1650,9 +1652,14 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CONDITION_SOURCE_TYPE_PHASE_DEFINITION:
|
||||
case CONDITION_SOURCE_TYPE_TERRAIN_SWAP:
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "CONDITION_SOURCE_TYPE_PHASE_DEFINITION:: is only for 4.3.4 branch, skipped");
|
||||
TC_LOG_ERROR("sql.sql", "CONDITION_SOURCE_TYPE_TERRAIN_SWAP: is only for 6.x branch, skipped");
|
||||
return false;
|
||||
}
|
||||
case CONDITION_SOURCE_TYPE_PHASE:
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "CONDITION_SOURCE_TYPE_PHASE: is only for 6.x branch, skipped");
|
||||
return false;
|
||||
}
|
||||
case CONDITION_SOURCE_TYPE_GOSSIP_MENU:
|
||||
@@ -1670,7 +1677,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const
|
||||
{
|
||||
if (cond->ConditionType == CONDITION_NONE || cond->ConditionType >= CONDITION_MAX)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "%s Invalid ConditionType in `condition` table, ignoring.", cond->ToString().c_str());
|
||||
TC_LOG_ERROR("sql.sql", "%s Invalid ConditionType in `condition` table, ignoring.", cond->ToString(true).c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2107,6 +2114,9 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const
|
||||
}
|
||||
case CONDITION_IN_WATER:
|
||||
break;
|
||||
case CONDITION_TERRAIN_SWAP:
|
||||
TC_LOG_ERROR("sql.sql", "%s is not valid for this branch, skipped.", cond->ToString(true).c_str());
|
||||
return false;
|
||||
case CONDITION_STAND_STATE:
|
||||
{
|
||||
bool valid = false;
|
||||
|
||||
@@ -71,8 +71,9 @@ enum ConditionTypes
|
||||
CONDITION_HP_PCT = 38, // hpPct ComparisonType 0 true if unit's hp matches given pct
|
||||
CONDITION_REALM_ACHIEVEMENT = 39, // achievement_id 0 0 true if realm achievement is complete
|
||||
CONDITION_IN_WATER = 40, // 0 0 0 true if unit in water
|
||||
CONDITION_STAND_STATE = 41, // stateType state 0 true if unit matches specified sitstate (0,x: has exactly state x; 1,0: any standing state; 1,1: any sitting state;)
|
||||
CONDITION_MAX = 42 // MAX
|
||||
CONDITION_TERRAIN_SWAP = 41, // only for 6.x
|
||||
CONDITION_STAND_STATE = 42, // stateType state 0 true if unit matches specified sitstate (0,x: has exactly state x; 1,0: any standing state; 1,1: any sitting state;)
|
||||
CONDITION_MAX = 43 // MAX
|
||||
};
|
||||
|
||||
/*! Documentation on implementing a new ConditionSourceType:
|
||||
@@ -129,8 +130,9 @@ enum ConditionSourceType
|
||||
CONDITION_SOURCE_TYPE_SMART_EVENT = 22,
|
||||
CONDITION_SOURCE_TYPE_NPC_VENDOR = 23,
|
||||
CONDITION_SOURCE_TYPE_SPELL_PROC = 24,
|
||||
CONDITION_SOURCE_TYPE_PHASE_DEFINITION = 25, // only 4.3.4
|
||||
CONDITION_SOURCE_TYPE_MAX = 26 // MAX
|
||||
CONDITION_SOURCE_TYPE_TERRAIN_SWAP = 25, // only 6.x
|
||||
CONDITION_SOURCE_TYPE_PHASE = 26, // only 6.x
|
||||
CONDITION_SOURCE_TYPE_MAX = 27 // MAX
|
||||
};
|
||||
|
||||
enum RelationType
|
||||
|
||||
Reference in New Issue
Block a user