diff options
-rw-r--r-- | sql/updates/world/2016_03_02_00_world_335.sql | 3 | ||||
-rw-r--r-- | src/server/game/Accounts/RBAC.h | 4 | ||||
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 18 | ||||
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.h | 10 |
4 files changed, 25 insertions, 10 deletions
diff --git a/sql/updates/world/2016_03_02_00_world_335.sql b/sql/updates/world/2016_03_02_00_world_335.sql new file mode 100644 index 00000000000..e7a9f60e790 --- /dev/null +++ b/sql/updates/world/2016_03_02_00_world_335.sql @@ -0,0 +1,3 @@ +-- +-- Only for 3.3.5! +UPDATE `conditions` SET `ConditionTypeOrReference`=42 WHERE `ConditionTypeOrReference`=41; diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h index 4ebd3ae7042..3f5db56558b 100644 --- a/src/server/game/Accounts/RBAC.h +++ b/src/server/game/Accounts/RBAC.h @@ -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, diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 81dc7894592..6da83aad1a8 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -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; diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 3123aaca86a..7dc4592a6a9 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -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 |