diff --git a/data/sql/updates/pending_db_world/rev_1644959483034654993.sql b/data/sql/updates/pending_db_world/rev_1644959483034654993.sql new file mode 100644 index 000000000..07006d535 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1644959483034654993.sql @@ -0,0 +1,57 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1644959483034654993'); + +-- back up of original line +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=23 AND `link`=13; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (17664, 0, 23, 13, 61, 1, 100, 1, 22, 51, 0, 0, 0, 11, 31336, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - Between 22-51% Health - Cast \'Matis Captured DND\' (Phase 1) (No Repeat)'); + +UPDATE `smart_scripts` SET `event_param1`=0, `event_param2`=0 WHERE `entryorguid`=17664 AND `source_type`=0 AND `id`=23 AND `link`=13; + +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=18985 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (18985, 0, 1, 0, 61, 0, 100, 0, 7859, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Seer Skaltesh - On Gossip Option Select - Close Gossip'); + +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18985 AND `source_type`=0 AND `id`=1 AND `link`=0; + +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=37887 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (37887, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'); + +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=37887 AND `source_type`=0 AND `id`=1 AND `link`=0; + +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=38039 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (38039, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'); + +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=38039 AND `source_type`=0 AND `id`=1 AND `link`=0; + +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=38040 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (38040, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'); + +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=38040 AND `source_type`=0 AND `id`=1 AND `link`=0; + +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=38041 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (38041, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'); + +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=38041 AND `source_type`=0 AND `id`=1 AND `link`=0; + +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=18985 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (18985, 0, 1, 0, 61, 0, 100, 0, 7859, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Seer Skaltesh - On Gossip Option Select - Close Gossip'); + +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=18985 AND `source_type`=0 AND `id`=1 AND `link`=0; + +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=38042 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (38042, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'); + +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=38042 AND `source_type`=0 AND `id`=1 AND `link`=0; + +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=38043 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (38043, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'); + +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=38043 AND `source_type`=0 AND `id`=1 AND `link`=0; + +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=38044 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (38044, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'); + +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=38044 AND `source_type`=0 AND `id`=1 AND `link`=0; + +-- DELETE FROM `smart_scripts` WHERE `entryorguid`=38045 AND `source_type`=0 AND `id`=1 AND `link`=0; +-- INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (38045, 0, 1, 0, 61, 0, 100, 0, 10948, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Kwee Q. Peddlefeet - On Gossip Option Select - Close Gossip'); + +UPDATE `smart_scripts` SET `event_param1`=0 WHERE `entryorguid`=38045 AND `source_type`=0 AND `id`=1 AND `link`=0; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index dfffffaed..cdb3523a4 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -546,7 +546,7 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e) //case SMART_EVENT_SCENE_COMPLETE: return sizeof(SmartEvent::raw); case SMART_EVENT_SUMMONED_UNIT_DIES: return sizeof(SmartEvent::summoned); default: - LOG_WARN("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is using an event with no unused params specified in SmartAIMgr::CheckUnusedEventParams(), please report this.", + LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using an event with no unused params specified in SmartAIMgr::CheckUnusedEventParams(), please report this.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return sizeof(SmartEvent::raw); } @@ -561,7 +561,7 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e) uint32 value = ((uint32*)&e.event.raw)[index]; if (value != 0) { - LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} has unused event_param{} with value {}, it must be 0, skipped.", + LOG_ERROR("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} has unused event_param{} with value {}, it must be 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), index + 1, value); valid = false; } @@ -722,7 +722,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e) case SMART_ACTION_SET_HEALTH_PCT: return sizeof(SmartAction::setHealthPct); //case SMART_ACTION_CREATE_CONVERSATION: return sizeof(SmartAction::raw); default: - LOG_WARN("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is using an action with no unused params specified in SmartAIMgr::CheckUnusedActionParams(), please report this.", + LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using an action with no unused params specified in SmartAIMgr::CheckUnusedActionParams(), please report this.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return sizeof(SmartAction::raw); } @@ -737,7 +737,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e) uint32 value = ((uint32*)&e.action.raw)[index]; if (value != 0) { - LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has unused action_param%zu with value %u, it must be 0, skipped.", + LOG_ERROR("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} has unused action_param{} with value {}, it must be 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), index + 1, value); valid = false; } @@ -785,7 +785,7 @@ bool SmartAIMgr::CheckUnusedTargetParams(SmartScriptHolder const& e) case SMART_TARGET_VEHICLE_PASSENGER: return sizeof(SmartTarget::vehicle); // case SMART_TARGET_CLOSEST_UNSPAWNED_GAMEOBJECT: return sizeof(SmartTarget::goClosest); default: - LOG_WARN("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is using a target with no unused params specified in SmartAIMgr::CheckUnusedTargetParams(), please report this.", + LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using a target with no unused params specified in SmartAIMgr::CheckUnusedTargetParams(), please report this.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType()); return sizeof(SmartTarget::raw); } @@ -800,7 +800,7 @@ bool SmartAIMgr::CheckUnusedTargetParams(SmartScriptHolder const& e) uint32 value = ((uint32*)&e.target.raw)[index]; if (value != 0) { - LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has unused target_param%zu with value %u, it must be 0, skipped.", + LOG_ERROR("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} has unused target_param{} with value {}, it must be 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), index + 1, value); valid = false; }