diff options
521 files changed, 29925 insertions, 9273 deletions
diff --git a/.gitignore b/.gitignore index 9378a13bf11..48fa31fa9d2 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ CMakeLists.txt.user *.BASE.* *.LOCAL.* nbproject/* +.idea/* diff --git a/.travis.yml b/.travis.yml index cddb98492a2..583318ef1fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +sudo: required +dist: trusty + language: cpp compiler: - clang @@ -6,16 +9,10 @@ git: depth: 1 before_install: - - echo "yes" | sudo add-apt-repository ppa:george-edison55/precise-backports - - echo "yes" | sudo add-apt-repository ppa:boost-latest/ppa - - echo "yes" | sudo add-apt-repository ppa:ubuntu-toolchain-r/test - - echo "yes" | sudo add-apt-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.5 main' - - wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - - - sudo apt-get -qq update - - sudo apt-get -qq install build-essential libtool gcc-4.8 g++-4.8 make cmake cmake-data openssl clang-3.5 + - sudo apt-get -qq install build-essential libtool make cmake cmake-data openssl - sudo apt-get -qq install libssl-dev libmysqlclient-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev - sudo apt-get -qq install libboost1.55-dev libboost-thread1.55-dev libboost-filesystem1.55-dev libboost-system1.55-dev libboost-program-options1.55-dev libboost-iostreams1.55-dev - - export CC=clang-3.5 CXX=clang++-3.5 + - sudo apt-get -qq install mysql-server - git config user.email "travis@build.bot" && git config user.name "Travis CI" - git tag -a -m "Travis build" init diff --git a/README.md b/README.md index 066249f0628..d8fd3e323c7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -#  TrinityCore +#  TrinityCore [](http://www.issuestats.com/github/TrinityCore/TrinityCore) [](http://www.issuestats.com/github/TrinityCore/TrinityCore) [](https://www.bountysource.com/trackers/1310-trinity-core?utm_source=1310&utm_medium=shield&utm_campaign=TRACKER_BADGE) diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index c4f97f4ffd4..a0c2b737475 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -1,7 +1,7 @@ # Set build-directive (used in core to tell which buildtype we used) add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"') -set(GCC_EXPECTED_VERSION 4.7.2) +set(GCC_EXPECTED_VERSION 4.9.0) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION) message(FATAL_ERROR "GCC: TrinityCore requires version ${GCC_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}") diff --git a/cmake/macros/FindBoost.cmake b/cmake/macros/FindBoost.cmake index 997336261d3..9be5b4a1c03 100644 --- a/cmake/macros/FindBoost.cmake +++ b/cmake/macros/FindBoost.cmake @@ -478,6 +478,7 @@ else() # The user has not requested an exact version. Among known # versions, find those that are acceptable to the user request. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} + "1.61.0" "1.61" "1.60.0" "1.60" "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1" @@ -1110,10 +1111,10 @@ if(Boost_FOUND) list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS) if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") + "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. If you still have problems search on forum for TCE00020.") else () set(Boost_ERROR_REASON - "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") + "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. If you still have problems search on forum for TCE00021.") endif () endif () diff --git a/cmake/options.cmake b/cmake/options.cmake index 085a45fa03f..80f07b182fc 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -9,8 +9,21 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. option(SERVERS "Build worldserver and authserver" 1) + +set(SCRIPTS_AVAILABLE_OPTIONS none static dynamic minimal-static minimal-dynamic) + +# Log a fatal error when the value of the SCRIPTS variable isn't a valid option. +if (SCRIPTS) + list (FIND SCRIPTS_AVAILABLE_OPTIONS "${SCRIPTS}" SCRIPTS_INDEX) + if (${SCRIPTS_INDEX} EQUAL -1) + message(FATAL_ERROR "The value (${SCRIPTS}) of your SCRIPTS variable is invalid! " + "Allowed values are: ${SCRIPTS_AVAILABLE_OPTIONS} if you still " + "have problems search on forum for TCE00019.") + endif() +endif() + set(SCRIPTS "static" CACHE STRING "Build core with scripts") -set_property(CACHE SCRIPTS PROPERTY STRINGS none static dynamic minimal-static minimal-dynamic) +set_property(CACHE SCRIPTS PROPERTY STRINGS ${SCRIPTS_AVAILABLE_OPTIONS}) # Build a list of all script modules when -DSCRIPT="custom" is selected GetScriptModuleList(SCRIPT_MODULE_LIST) diff --git a/contrib/grafana/1_General.json b/contrib/grafana/1_General.json new file mode 100644 index 00000000000..e54791f190e --- /dev/null +++ b/contrib/grafana/1_General.json @@ -0,0 +1,889 @@ +{ + "id": 1, + "title": "General info", + "originalTitle": "General info", + "tags": [], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "25px", + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "Influx", + "editable": true, + "error": false, + "format": "none", + "id": 5, + "interval": null, + "isNew": true, + "links": [], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "auto" + ], + "type": "time" + } + ], + "measurement": "online_players", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "value" + ] + }, + { + "type": "last", + "params": [] + } + ] + ], + "tags": [ + { + "key": "realm", + "operator": "=~", + "value": "/^$realm$/" + } + ] + } + ], + "thresholds": "", + "title": "Online players", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current", + "timeFrom": null, + "timeShift": null, + "hideTimeOverride": false + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "Influx", + "editable": true, + "error": false, + "format": "none", + "id": 6, + "interval": null, + "isNew": true, + "links": [], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "auto" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "update_time_diff", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "realm", + "operator": "=~", + "value": "/^$realm$/" + } + ] + } + ], + "thresholds": "", + "title": "Update diff (avg)", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg", + "timeFrom": "1m" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "Influx", + "editable": true, + "error": false, + "format": "none", + "id": 7, + "interval": null, + "isNew": true, + "links": [], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "auto" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "update_time_diff", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": "", + "title": "Update diff (avg)", + "transparent": false, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg", + "timeFrom": "5m" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "Influx", + "editable": true, + "error": false, + "format": "none", + "id": 8, + "interval": null, + "isNew": true, + "links": [], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "auto" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "update_time_diff", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "realm", + "operator": "=~", + "value": "/^$realm$/" + } + ] + } + ], + "thresholds": "", + "title": "Update diff (avg)", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg", + "timeFrom": "15m", + "timeShift": null + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "Influx", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 1, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Update diff", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "update_time_diff", + "policy": "default", + "query": "SELECT mean(\"value\") FROM \"update_time_diff\" WHERE \"realm\" =~ /$realm$/ AND $timeFilter GROUP BY time($interval) fill(null)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "realm", + "operator": "=~", + "value": "/$realm$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Update diff", + "tooltip": { + "msResolution": false, + "shared": true, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "show": true + }, + "y-axis": true, + "y_formats": [ + "ms", + "short" + ], + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "Influx", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 4, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Online players", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "online_players", + "policy": "default", + "query": "SELECT mean(\"value\") FROM \"online_players\" WHERE \"realm\" =~ /$realm$/ AND $timeFilter GROUP BY time($interval) fill(null)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "realm", + "operator": "=~", + "value": "/$realm$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Online players", + "tooltip": { + "msResolution": false, + "shared": true, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "show": true + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "Influx", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 3, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Logouts", + "transform": "negative-Y" + } + ], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Logins", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "player_events", + "policy": "default", + "query": "SELECT count(\"text\") FROM \"player_events\" WHERE \"realm\" =~ /$realm$/ AND \"title\" = 'Login' AND $timeFilter GROUP BY time($interval) fill(0)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "text" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [ + { + "key": "realm", + "operator": "=", + "value": "Trinity" + } + ] + }, + { + "alias": "Logouts", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "policy": "default", + "query": "SELECT count(\"text\") FROM \"player_events\" WHERE \"realm\" =~ /$realm$/ AND \"title\" = 'Logout' AND $timeFilter GROUP BY time($interval) fill(0)", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Player login/logout", + "tooltip": { + "msResolution": false, + "shared": true, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "show": true + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": { + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [ + { + "allFormat": "regex values", + "current": { + "text": "Trinity", + "value": "Trinity" + }, + "datasource": "Influx", + "includeAll": false, + "multi": false, + "multiFormat": "regex values", + "name": "realm", + "options": [ + { + "text": "Trinity", + "value": "Trinity", + "selected": true + } + ], + "query": "show tag values from events with key = realm", + "refresh": 1, + "regex": "", + "type": "query" + } + ] + }, + "annotations": { + "list": [ + { + "datasource": "Influx", + "enable": true, + "iconColor": "#C0C6BE", + "iconSize": 13, + "lineColor": "rgba(255, 96, 96, 0.592157)", + "name": "Global Events", + "query": "select title, text from events where $timeFilter and realm =~ /$realm$/", + "showLine": true, + "textColumn": "text", + "titleColumn": "title" + } + ] + }, + "refresh": "1m", + "schemaVersion": 12, + "version": 7, + "links": [] +}
\ No newline at end of file diff --git a/contrib/grafana/2_Maps.json b/contrib/grafana/2_Maps.json new file mode 100644 index 00000000000..6c2cecb1035 --- /dev/null +++ b/contrib/grafana/2_Maps.json @@ -0,0 +1,339 @@ +{ + "id": 2, + "title": "Maps, vmaps and mmaps", + "originalTitle": "Maps, vmaps and mmaps", + "tags": [], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "Influx", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 2, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Unload tile", + "transform": "negative-Y" + } + ], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Load tile", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "query": "SELECT count(\"title\") FROM \"map_events\" WHERE \"realm\" =~ /$realm$/ AND \"title\" = 'LoadMapTile' AND $timeFilter GROUP BY time($interval) fill(0)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Unload tile", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "query": "SELECT count(\"title\") FROM \"map_events\" WHERE \"realm\" =~ /$realm$/ AND \"title\" = 'UnloadMapTile' AND $timeFilter GROUP BY time($interval) fill(0)", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Map", + "tooltip": { + "shared": true, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "y-axis": true, + "y_formats": [ + "short", + "short" + ] + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "Influx", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 1, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Pathfinding queries", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "query": "SELECT count(\"title\") FROM \"mmap_events\" WHERE \"realm\" =~ /$realm$/ AND \"title\" = 'CalculatePath' AND $timeFilter GROUP BY time($interval) fill(0)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "MMap", + "tooltip": { + "shared": true, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "y-axis": true, + "y_formats": [ + "short", + "short" + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": { + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [ + { + "allFormat": "regex values", + "current": { + "text": "Trinity", + "value": "Trinity" + }, + "datasource": "Influx", + "includeAll": false, + "multi": false, + "multiFormat": "regex values", + "name": "realm", + "options": [ + { + "text": "Trinity", + "value": "Trinity", + "selected": true + } + ], + "query": "show tag values from events with key = realm", + "refresh": true, + "type": "query" + } + ] + }, + "annotations": { + "list": [ + { + "datasource": "Influx", + "enable": true, + "iconColor": "#C0C6BE", + "iconSize": 13, + "lineColor": "rgba(255, 96, 96, 0.592157)", + "name": "Global Events", + "query": "select title, text from events where $timeFilter and realm =~ /$realm$/", + "showLine": true, + "textColumn": "text", + "titleColumn": "title" + } + ] + }, + "refresh": "1m", + "schemaVersion": 8, + "version": 11, + "links": [] +}
\ No newline at end of file diff --git a/contrib/grafana/3_Network.json b/contrib/grafana/3_Network.json new file mode 100644 index 00000000000..98c190e1185 --- /dev/null +++ b/contrib/grafana/3_Network.json @@ -0,0 +1,242 @@ +{ + "id": 3, + "title": "Network", + "originalTitle": "Network", + "tags": [], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "Influx", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 1, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Processed packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "processed_packets", + "query": "SELECT sum(\"value\") FROM \"processed_packets\" WHERE \"realm\" =~ /$realm$/ AND $timeFilter GROUP BY time($interval) fill(0)", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "realm", + "operator": "=~", + "value": "/$realm$/" + } + ] + }, + { + "alias": "Processed packets / mean per session", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "0" + ], + "type": "fill" + } + ], + "measurement": "processed_packets", + "query": "SELECT mean(\"value\") FROM \"processed_packets\" WHERE \"realm\" =~ /$realm$/ AND $timeFilter GROUP BY time($interval) fill(0)", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "realm", + "operator": "=~", + "value": "/$realm$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Processed packets", + "tooltip": { + "shared": true, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "y-axis": true, + "y_formats": [ + "short", + "short" + ] + } + ], + "title": "Row" + } + ], + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": { + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [ + { + "allFormat": "regex values", + "current": { + "text": "Trinity", + "value": "Trinity" + }, + "datasource": "Influx", + "includeAll": false, + "multi": false, + "multiFormat": "regex values", + "name": "realm", + "options": [ + { + "text": "Trinity", + "value": "Trinity", + "selected": true + } + ], + "query": "show tag values from events with key = realm", + "refresh": true, + "type": "query" + } + ] + }, + "annotations": { + "list": [ + { + "datasource": "Influx", + "enable": true, + "iconColor": "#C0C6BE", + "iconSize": 13, + "lineColor": "rgba(255, 96, 96, 0.592157)", + "name": "Global Events", + "query": "select title, text from events where $timeFilter and realm =~ /$realm$/", + "showLine": true, + "textColumn": "text", + "titleColumn": "title" + } + ] + }, + "refresh": "1m", + "schemaVersion": 8, + "version": 7, + "links": [] +}
\ No newline at end of file diff --git a/contrib/merge_updates_windows.bat b/contrib/merge_updates_windows.bat index c43d4adf907..78b0b768a07 100644 --- a/contrib/merge_updates_windows.bat +++ b/contrib/merge_updates_windows.bat @@ -1 +1 @@ -copy /a ..\sql\updates\world\*.sql /b world_updates.sql +copy /a ..\sql\updates\world\3.3.5\*.sql /b world_updates.sql diff --git a/dep/PackageList.txt b/dep/PackageList.txt index 66421127162..b01af04f6fa 100644 --- a/dep/PackageList.txt +++ b/dep/PackageList.txt @@ -54,7 +54,7 @@ zlib (A Massively Spiffy Yet Delicately Unobtrusive Compression Library) gSOAP (a portable development toolkit for C and C++ XML Web services and XML data bindings) http://gsoap2.sourceforge.net/ - Version: 2.8.17r + Version: 2.8.33 recastnavigation (Recast is state of the art navigation mesh construction toolset for games) https://github.com/memononen/recastnavigation diff --git a/dep/boost/CMakeLists.txt b/dep/boost/CMakeLists.txt index 6cda5fbec4e..fc20347c2c8 100644 --- a/dep/boost/CMakeLists.txt +++ b/dep/boost/CMakeLists.txt @@ -26,7 +26,7 @@ if(WIN32) set(Boost_USE_STATIC_RUNTIME OFF) endif() -find_package(Boost 1.51 REQUIRED system filesystem thread program_options iostreams regex) +find_package(Boost 1.55 REQUIRED system filesystem thread program_options iostreams) # Find if Boost was compiled in C++03 mode because it requires -DBOOST_NO_CXX11_SCOPED_ENUMS diff --git a/dep/gsoap/soapC.cpp b/dep/gsoap/soapC.cpp index 321cae0299b..cc332c4854b 100644 --- a/dep/gsoap/soapC.cpp +++ b/dep/gsoap/soapC.cpp @@ -1,11 +1,14 @@ /* soapC.cpp - Generated by gSOAP 2.8.17r from gsoap.stub + Generated by gSOAP 2.8.33 for gsoap.stub -Copyright(C) 2000-2013, Robert van Engelen, Genivia Inc. All Rights Reserved. -The generated code is released under one of the following licenses: -GPL or Genivia's license for commercial use. +gSOAP XML Web services tools +Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc. All Rights Reserved. +The soapcpp2 tool and its generated software are released under the GPL. This program is released under the GPL with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial use license is available from Genivia Inc., contact@genivia.com +-------------------------------------------------------------------------------- */ #if defined(__BORLANDC__) @@ -15,7 +18,7 @@ compiling, linking, and/or using OpenSSL is allowed. #include "soapH.h" -SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.8.17r 2014-06-21 21:43:17 GMT") +SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.8.33 2016-07-29 05:51:35 GMT") #ifndef WITH_NOGLOBAL @@ -32,7 +35,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_putheader(struct soap *soap) { if (soap->version && soap->header) { soap->part = SOAP_IN_HEADER; - if (soap_out_SOAP_ENV__Header(soap, "SOAP-ENV:Header", 0, soap->header, NULL)) + if (soap_out_SOAP_ENV__Header(soap, "SOAP-ENV:Header", 0, soap->header, "")) return soap->error; soap->part = SOAP_END_HEADER; } @@ -48,7 +51,7 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_serializeheader(struct soap *soap) SOAP_FMAC3 void SOAP_FMAC4 soap_header(struct soap *soap) { if (soap->header == NULL) - { if ((soap->header = soap_new_SOAP_ENV__Header(soap, -1))) + { if ((soap->header = soap_new_SOAP_ENV__Header(soap))) soap_default_SOAP_ENV__Header(soap, soap->header); } } @@ -56,17 +59,17 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_header(struct soap *soap) SOAP_FMAC3 void SOAP_FMAC4 soap_fault(struct soap *soap) { if (soap->fault == NULL) - { soap->fault = soap_new_SOAP_ENV__Fault(soap, -1); + { soap->fault = soap_new_SOAP_ENV__Fault(soap); if (soap->fault == NULL) return; soap_default_SOAP_ENV__Fault(soap, soap->fault); } if (soap->version == 2 && !soap->fault->SOAP_ENV__Code) - { soap->fault->SOAP_ENV__Code = soap_new_SOAP_ENV__Code(soap, -1); + { soap->fault->SOAP_ENV__Code = soap_new_SOAP_ENV__Code(soap); soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code); } if (soap->version == 2 && !soap->fault->SOAP_ENV__Reason) - { soap->fault->SOAP_ENV__Reason = soap_new_SOAP_ENV__Reason(soap, -1); + { soap->fault->SOAP_ENV__Reason = soap_new_SOAP_ENV__Reason(soap); soap_default_SOAP_ENV__Reason(soap, soap->fault->SOAP_ENV__Reason); } } @@ -81,7 +84,7 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_serializefault(struct soap *soap) SOAP_FMAC3 int SOAP_FMAC4 soap_putfault(struct soap *soap) { if (soap->fault) - return soap_put_SOAP_ENV__Fault(soap, soap->fault, "SOAP-ENV:Fault", NULL); + return soap_put_SOAP_ENV__Fault(soap, soap->fault, "SOAP-ENV:Fault", ""); return SOAP_OK; } @@ -94,8 +97,8 @@ SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap) { soap_fault(soap); if (soap->version == 2 && soap->fault->SOAP_ENV__Code) - return (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value; - return (const char**)&soap->fault->faultcode; + return (const char**)(void*)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Value; + return (const char**)(void*)&soap->fault->faultcode; } SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap) @@ -103,19 +106,19 @@ SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultsubcode(struct soap *soap) soap_fault(soap); if (soap->version == 2) { if (soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode == NULL) - { soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = soap_new_SOAP_ENV__Code(soap, -1); + { soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode = soap_new_SOAP_ENV__Code(soap); soap_default_SOAP_ENV__Code(soap, soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode); } - return (const char**)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value; + return (const char**)(void*)&soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value; } - return (const char**)&soap->fault->faultcode; + return (const char**)(void*)&soap->fault->faultcode; } SOAP_FMAC3 const char * SOAP_FMAC4 soap_check_faultsubcode(struct soap *soap) { soap_fault(soap); if (soap->version == 2) - { if (soap->fault->SOAP_ENV__Code && soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode && soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode) + { if (soap->fault->SOAP_ENV__Code && soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode) return soap->fault->SOAP_ENV__Code->SOAP_ENV__Subcode->SOAP_ENV__Value; return NULL; } @@ -126,8 +129,8 @@ SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultstring(struct soap *soap) { soap_fault(soap); if (soap->version == 2) - return (const char**)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text; - return (const char**)&soap->fault->faultstring; + return (const char**)(void*)&soap->fault->SOAP_ENV__Reason->SOAP_ENV__Text; + return (const char**)(void*)&soap->fault->faultstring; } SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultdetail(struct soap *soap) @@ -135,16 +138,16 @@ SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultdetail(struct soap *soap) soap_fault(soap); if (soap->version == 2) { if (soap->fault->SOAP_ENV__Detail == NULL) - { soap->fault->SOAP_ENV__Detail = soap_new_SOAP_ENV__Detail(soap, -1); + { soap->fault->SOAP_ENV__Detail = soap_new_SOAP_ENV__Detail(soap); soap_default_SOAP_ENV__Detail(soap, soap->fault->SOAP_ENV__Detail); } - return (const char**)&soap->fault->SOAP_ENV__Detail->__any; + return (const char**)(void*)&soap->fault->SOAP_ENV__Detail->__any; } if (soap->fault->detail == NULL) - { soap->fault->detail = soap_new_SOAP_ENV__Detail(soap, -1); + { soap->fault->detail = soap_new_SOAP_ENV__Detail(soap); soap_default_SOAP_ENV__Detail(soap, soap->fault->detail); } - return (const char**)&soap->fault->detail->__any; + return (const char**)(void*)&soap->fault->detail->__any; } SOAP_FMAC3 const char * SOAP_FMAC4 soap_check_faultdetail(struct soap *soap) @@ -166,7 +169,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap *soap) if (soap->version == 1) { for (;;) { if (!soap_getelement(soap, &t)) - if (soap->error || soap_ignore_element(soap)) + if ((soap->error && soap->error != SOAP_TAG_MISMATCH) || soap_ignore_element(soap)) break; } } @@ -260,8 +263,8 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap *soap) { if (!soap_peek_element(soap)) { int t; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unexpected element '%s' in input (level=%u, %d)\n", soap->tag, soap->level, soap->body)); - if (soap->mustUnderstand && !soap->other) + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unexpected element '%s' in input (level = %u, %d)\n", soap->tag, soap->level, soap->body)); + if (soap->mustUnderstand && !soap->other && !soap->fignore) return soap->error = SOAP_MUSTUNDERSTAND; if (((soap->mode & SOAP_XML_STRICT) && soap->part != SOAP_IN_HEADER) || !soap_match_tag(soap, soap->tag, "SOAP-ENV:")) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "REJECTING element '%s'\n", soap->tag)); @@ -276,10 +279,8 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap *soap) DBGLOG(TEST, if (!soap->error) SOAP_MESSAGE(fdebug, "IGNORING element '%s'\n", soap->tag)); if (!soap->error && soap->body) { soap->level++; - while (!soap_ignore_element(soap)) - ; - if (soap->error == SOAP_NO_TAG) - soap->error = soap_element_end_in(soap, NULL); + if (soap_ignore(soap) || soap_element_end_in(soap, NULL)) + return soap->error; } } } @@ -295,7 +296,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap *soap) for (i = 0; i < SOAP_PTRHASH; i++) for (pp = soap->pht[i]; pp; pp = pp->next) if (pp->mark1 == 2 || pp->mark2 == 2) - if (soap_putelement(soap, pp->ptr, "id", pp->id, pp->type)) + if (soap_putelement(soap, pp->ptr, SOAP_MULTIREFTAG, pp->id, pp->type)) return soap->error; return SOAP_OK; } @@ -319,13 +320,12 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap *soap, const void *ptr, co case SOAP_TYPE_PointerTostring: return soap_out_PointerTostring(soap, tag, id, (char **const*)ptr, "xsd:string"); case SOAP_TYPE__QName: - return soap_out_string(soap, tag, id, (char*const*)&ptr, "xsd:QName"); + return soap_out_string(soap, tag, id, (char*const*)(void*)&ptr, "xsd:QName"); case SOAP_TYPE_string: - return soap_out_string(soap, tag, id, (char*const*)&ptr, "xsd:string"); + return soap_out_string(soap, tag, id, (char*const*)(void*)&ptr, "xsd:string"); } return SOAP_OK; } - #ifdef __cplusplus } #endif @@ -350,14 +350,13 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap *soap, const void *ptr, soap_serialize_PointerTostring(soap, (char **const*)ptr); break; case SOAP_TYPE__QName: - soap_serialize_string(soap, (char*const*)&ptr); + soap_serialize_string(soap, (char*const*)(void*)&ptr); break; case SOAP_TYPE_string: - soap_serialize_string(soap, (char*const*)&ptr); + soap_serialize_string(soap, (char*const*)(void*)&ptr); break; } } - #ifdef __cplusplus } #endif @@ -400,64 +399,139 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_fdelete(struct soap_clist *p) { case SOAP_TYPE_ns1__executeCommandResponse: if (p->size < 0) - SOAP_DELETE((struct ns1__executeCommandResponse*)p->ptr); + SOAP_DELETE(static_cast<struct ns1__executeCommandResponse*>(p->ptr)); else - SOAP_DELETE_ARRAY((struct ns1__executeCommandResponse*)p->ptr); + SOAP_DELETE_ARRAY(static_cast<struct ns1__executeCommandResponse*>(p->ptr)); break; case SOAP_TYPE_ns1__executeCommand: if (p->size < 0) - SOAP_DELETE((struct ns1__executeCommand*)p->ptr); + SOAP_DELETE(static_cast<struct ns1__executeCommand*>(p->ptr)); else - SOAP_DELETE_ARRAY((struct ns1__executeCommand*)p->ptr); + SOAP_DELETE_ARRAY(static_cast<struct ns1__executeCommand*>(p->ptr)); break; #ifndef WITH_NOGLOBAL case SOAP_TYPE_SOAP_ENV__Header: if (p->size < 0) - SOAP_DELETE((struct SOAP_ENV__Header*)p->ptr); + SOAP_DELETE(static_cast<struct SOAP_ENV__Header*>(p->ptr)); else - SOAP_DELETE_ARRAY((struct SOAP_ENV__Header*)p->ptr); + SOAP_DELETE_ARRAY(static_cast<struct SOAP_ENV__Header*>(p->ptr)); break; #endif #ifndef WITH_NOGLOBAL case SOAP_TYPE_SOAP_ENV__Code: if (p->size < 0) - SOAP_DELETE((struct SOAP_ENV__Code*)p->ptr); + SOAP_DELETE(static_cast<struct SOAP_ENV__Code*>(p->ptr)); else - SOAP_DELETE_ARRAY((struct SOAP_ENV__Code*)p->ptr); + SOAP_DELETE_ARRAY(static_cast<struct SOAP_ENV__Code*>(p->ptr)); break; #endif #ifndef WITH_NOGLOBAL case SOAP_TYPE_SOAP_ENV__Detail: if (p->size < 0) - SOAP_DELETE((struct SOAP_ENV__Detail*)p->ptr); + SOAP_DELETE(static_cast<struct SOAP_ENV__Detail*>(p->ptr)); else - SOAP_DELETE_ARRAY((struct SOAP_ENV__Detail*)p->ptr); + SOAP_DELETE_ARRAY(static_cast<struct SOAP_ENV__Detail*>(p->ptr)); break; #endif #ifndef WITH_NOGLOBAL case SOAP_TYPE_SOAP_ENV__Reason: if (p->size < 0) - SOAP_DELETE((struct SOAP_ENV__Reason*)p->ptr); + SOAP_DELETE(static_cast<struct SOAP_ENV__Reason*>(p->ptr)); else - SOAP_DELETE_ARRAY((struct SOAP_ENV__Reason*)p->ptr); + SOAP_DELETE_ARRAY(static_cast<struct SOAP_ENV__Reason*>(p->ptr)); break; #endif #ifndef WITH_NOGLOBAL case SOAP_TYPE_SOAP_ENV__Fault: if (p->size < 0) - SOAP_DELETE((struct SOAP_ENV__Fault*)p->ptr); + SOAP_DELETE(static_cast<struct SOAP_ENV__Fault*>(p->ptr)); else - SOAP_DELETE_ARRAY((struct SOAP_ENV__Fault*)p->ptr); + SOAP_DELETE_ARRAY(static_cast<struct SOAP_ENV__Fault*>(p->ptr)); break; #endif - default: return SOAP_ERR; + default: + return SOAP_ERR; } return SOAP_OK; } -SOAP_FMAC3 void* SOAP_FMAC4 soap_class_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, const char *type, const char *arrayType) -{ return soap_id_enter(soap, id, p, t, n, 0, type, arrayType, soap_instantiate); +#ifdef WIN32 +#pragma warning(push) +// do not warn on switch w/o cases +#pragma warning(disable:4065) +#endif +SOAP_FMAC3 int SOAP_FMAC4 soap_fbase(int t, int b) +{ + do + { switch (t) + { + default: return 0; + } + } + while (t != b); + return 1; +} +#ifdef WIN32 +#pragma warning(pop) +#endif + +#ifndef WITH_NOIDREF +#ifdef WIN32 +#pragma warning(push) +// do not warn on switch w/o cases +#pragma warning(disable:4065) +#endif +SOAP_FMAC3 void SOAP_FMAC4 soap_finsert(struct soap *soap, int t, int tt, void *p, size_t index, const void *q, void **x) +{ + (void)soap; (void)t; (void)p; (void)index; (void)q; (void)x; /* appease -Wall -Werror */ + switch (tt) + { + case SOAP_TYPE_ns1__executeCommandResponse: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct ns1__executeCommandResponse type=%d location=%p object=%p\n", t, p, q)); + *(struct ns1__executeCommandResponse*)p = *(struct ns1__executeCommandResponse*)q; + break; + case SOAP_TYPE_ns1__executeCommand: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct ns1__executeCommand type=%d location=%p object=%p\n", t, p, q)); + *(struct ns1__executeCommand*)p = *(struct ns1__executeCommand*)q; + break; +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Header: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct SOAP_ENV__Header type=%d location=%p object=%p\n", t, p, q)); + *(struct SOAP_ENV__Header*)p = *(struct SOAP_ENV__Header*)q; + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Code: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct SOAP_ENV__Code type=%d location=%p object=%p\n", t, p, q)); + *(struct SOAP_ENV__Code*)p = *(struct SOAP_ENV__Code*)q; + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Detail: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct SOAP_ENV__Detail type=%d location=%p object=%p\n", t, p, q)); + *(struct SOAP_ENV__Detail*)p = *(struct SOAP_ENV__Detail*)q; + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Reason: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct SOAP_ENV__Reason type=%d location=%p object=%p\n", t, p, q)); + *(struct SOAP_ENV__Reason*)p = *(struct SOAP_ENV__Reason*)q; + break; +#endif +#ifndef WITH_NOGLOBAL + case SOAP_TYPE_SOAP_ENV__Fault: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy struct SOAP_ENV__Fault type=%d location=%p object=%p\n", t, p, q)); + *(struct SOAP_ENV__Fault*)p = *(struct SOAP_ENV__Fault*)q; + break; +#endif + default: + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not insert type = %d in %d\n", t, tt)); + } } +#ifdef WIN32 +#pragma warning(pop) +#endif +#endif SOAP_FMAC3 void SOAP_FMAC4 soap_default_byte(struct soap *soap, char *a) { @@ -470,20 +544,19 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_default_byte(struct soap *soap, char *a) } SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap *soap, const char *tag, int id, const char *a, const char *type) -{ (void)soap; (void)type; (void)tag; (void)id; +{ return soap_outbyte(soap, tag, id, a, type, SOAP_TYPE_byte); } SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap *soap, const char *tag, char *a, const char *type) -{ char *p; - p = soap_inbyte(soap, tag, a, type, SOAP_TYPE_byte); - return p; +{ + a = soap_inbyte(soap, tag, a, type, SOAP_TYPE_byte); + return a; } SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap *soap, const char *a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_byte); - if (soap_out_byte(soap, tag?tag:"byte", id, a, type)) + if (soap_out_byte(soap, tag?tag:"byte", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -507,20 +580,19 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_default_int(struct soap *soap, int *a) } SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap *soap, const char *tag, int id, const int *a, const char *type) -{ (void)soap; (void)type; (void)tag; (void)id; +{ return soap_outint(soap, tag, id, a, type, SOAP_TYPE_int); } SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap *soap, const char *tag, int *a, const char *type) -{ int *p; - p = soap_inint(soap, tag, a, type, SOAP_TYPE_int); - return p; +{ + a = soap_inint(soap, tag, a, type, SOAP_TYPE_int); + return a; } SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap *soap, const int *a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_int); - if (soap_out_int(soap, tag?tag:"int", id, a, type)) + if (soap_out_int(soap, tag?tag:"int", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -551,16 +623,16 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap *soap, struc SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a) { -#ifndef WITH_NOIDREF (void)soap; (void)a; /* appease -Wall -Werror */ - soap_serialize__QName(soap, &a->faultcode); - soap_serialize_string(soap, &a->faultstring); - soap_serialize_string(soap, &a->faultactor); +#ifndef WITH_NOIDREF + soap_serialize__QName(soap, (char*const*)&a->faultcode); + soap_serialize_string(soap, (char*const*)&a->faultstring); + soap_serialize_string(soap, (char*const*)&a->faultactor); soap_serialize_PointerToSOAP_ENV__Detail(soap, &a->detail); soap_serialize_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Code); soap_serialize_PointerToSOAP_ENV__Reason(soap, &a->SOAP_ENV__Reason); - soap_serialize_string(soap, &a->SOAP_ENV__Node); - soap_serialize_string(soap, &a->SOAP_ENV__Role); + soap_serialize_string(soap, (char*const*)&a->SOAP_ENV__Node); + soap_serialize_string(soap, (char*const*)&a->SOAP_ENV__Role); soap_serialize_PointerToSOAP_ENV__Detail(soap, &a->SOAP_ENV__Detail); #endif } @@ -568,14 +640,14 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap *soap, con SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Fault *a, const char *type) { const char *soap_tmp_faultcode = soap_QName2s(soap, a->faultcode); - (void)soap; (void)tag; (void)id; (void)type; + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Fault), type)) return soap->error; - if (soap_out__QName(soap, "faultcode", -1, (char*const*)&soap_tmp_faultcode, "")) + if (soap_out__QName(soap, "faultcode", -1, (char*const*)(void*)&soap_tmp_faultcode, "")) return soap->error; - if (soap_out_string(soap, "faultstring", -1, &a->faultstring, "")) + if (soap_out_string(soap, "faultstring", -1, (char*const*)&a->faultstring, "")) return soap->error; - if (soap_out_string(soap, "faultactor", -1, &a->faultactor, "")) + if (soap_out_string(soap, "faultactor", -1, (char*const*)&a->faultactor, "")) return soap->error; if (soap_out_PointerToSOAP_ENV__Detail(soap, "detail", -1, &a->detail, "")) return soap->error; @@ -583,9 +655,9 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap *soap, const char return soap->error; if (soap_out_PointerToSOAP_ENV__Reason(soap, "SOAP-ENV:Reason", -1, &a->SOAP_ENV__Reason, "")) return soap->error; - if (soap_out_string(soap, "SOAP-ENV:Node", -1, &a->SOAP_ENV__Node, "")) + if (soap_out_string(soap, "SOAP-ENV:Node", -1, (char*const*)&a->SOAP_ENV__Node, "")) return soap->error; - if (soap_out_string(soap, "SOAP-ENV:Role", -1, &a->SOAP_ENV__Role, "")) + if (soap_out_string(soap, "SOAP-ENV:Role", -1, (char*const*)&a->SOAP_ENV__Role, "")) return soap->error; if (soap_out_PointerToSOAP_ENV__Detail(soap, "SOAP-ENV:Detail", -1, &a->SOAP_ENV__Detail, "")) return soap->error; @@ -605,7 +677,7 @@ SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct so size_t soap_flag_SOAP_ENV__Detail = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; - a = (struct SOAP_ENV__Fault *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), 0, NULL, NULL, NULL); + a = (struct SOAP_ENV__Fault *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), NULL, NULL, NULL, NULL); if (!a) return NULL; soap_default_SOAP_ENV__Fault(soap, a); @@ -614,17 +686,17 @@ SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct so for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_faultcode && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in__QName(soap, "faultcode", &a->faultcode, "")) + if (soap_in__QName(soap, "faultcode", (char**)&a->faultcode, "xsd:QName")) { soap_flag_faultcode--; continue; } if (soap_flag_faultstring && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "faultstring", &a->faultstring, "xsd:string")) + if (soap_in_string(soap, "faultstring", (char**)&a->faultstring, "xsd:string")) { soap_flag_faultstring--; continue; } if (soap_flag_faultactor && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "faultactor", &a->faultactor, "xsd:string")) + if (soap_in_string(soap, "faultactor", (char**)&a->faultactor, "xsd:string")) { soap_flag_faultactor--; continue; } @@ -644,12 +716,12 @@ SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct so continue; } if (soap_flag_SOAP_ENV__Node && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "SOAP-ENV:Node", &a->SOAP_ENV__Node, "xsd:string")) + if (soap_in_string(soap, "SOAP-ENV:Node", (char**)&a->SOAP_ENV__Node, "xsd:string")) { soap_flag_SOAP_ENV__Node--; continue; } if (soap_flag_SOAP_ENV__Role && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "SOAP-ENV:Role", &a->SOAP_ENV__Role, "xsd:string")) + if (soap_in_string(soap, "SOAP-ENV:Role", (char**)&a->SOAP_ENV__Role, "xsd:string")) { soap_flag_SOAP_ENV__Role--; continue; } @@ -669,17 +741,36 @@ SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct so return NULL; } else - { a = (struct SOAP_ENV__Fault *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Fault, 0, sizeof(struct SOAP_ENV__Fault), 0, NULL); + { a = (struct SOAP_ENV__Fault *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Fault, SOAP_TYPE_SOAP_ENV__Fault, sizeof(struct SOAP_ENV__Fault), 0, soap_finsert, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } +SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Fault(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct SOAP_ENV__Fault *p; + size_t k = sizeof(struct SOAP_ENV__Fault); + if (n < 0) + { p = SOAP_NEW(struct SOAP_ENV__Fault); + } + else + { p = SOAP_NEW_ARRAY(struct SOAP_ENV__Fault, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Fault location=%p n=%d\n", p, n)); + soap_link(soap, p, SOAP_TYPE_SOAP_ENV__Fault, n, soap_fdelete); + if (size) + *size = k; + return p; +} + SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap *soap, const struct SOAP_ENV__Fault *a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Fault); - if (soap_out_SOAP_ENV__Fault(soap, tag?tag:"SOAP-ENV:Fault", id, a, type)) + if (soap_out_SOAP_ENV__Fault(soap, tag?tag:"SOAP-ENV:Fault", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -692,36 +783,6 @@ SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct s return p; } -SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) -{ - (void)type; (void)arrayType; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Fault(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); - struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Fault, n, soap_fdelete); - if (!cp) - return NULL; - if (n < 0) - { cp->ptr = (void*)SOAP_NEW(struct SOAP_ENV__Fault); - if (size) - *size = sizeof(struct SOAP_ENV__Fault); - } - else - { cp->ptr = (void*)SOAP_NEW_ARRAY(struct SOAP_ENV__Fault, n); - if (size) - *size = n * sizeof(struct SOAP_ENV__Fault); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); - if (!cp->ptr) - soap->error = SOAP_EOM; - return (struct SOAP_ENV__Fault*)cp->ptr; -} - -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Fault(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) -{ - (void)soap; (void)tt; (void)st; (void)len; (void)n; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct SOAP_ENV__Fault %p -> %p\n", q, p)); - *(struct SOAP_ENV__Fault*)p = *(struct SOAP_ENV__Fault*)q; -} - #endif #ifndef WITH_NOGLOBAL @@ -734,20 +795,20 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Reason(struct soap *soap, stru SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Reason(struct soap *soap, const struct SOAP_ENV__Reason *a) { -#ifndef WITH_NOIDREF (void)soap; (void)a; /* appease -Wall -Werror */ - soap_serialize_string(soap, &a->SOAP_ENV__Text); +#ifndef WITH_NOIDREF + soap_serialize_string(soap, (char*const*)&a->SOAP_ENV__Text); #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Reason(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Reason *a, const char *type) { - (void)soap; (void)tag; (void)id; (void)type; + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Reason), type)) return soap->error; if (soap->lang) soap_set_attr(soap, "xml:lang", soap->lang, 1); - if (soap_out_string(soap, "SOAP-ENV:Text", -1, &a->SOAP_ENV__Text, "")) + if (soap_out_string(soap, "SOAP-ENV:Text", -1, (char*const*)&a->SOAP_ENV__Text, "")) return soap->error; return soap_element_end_out(soap, tag); } @@ -757,7 +818,7 @@ SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct size_t soap_flag_SOAP_ENV__Text = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; - a = (struct SOAP_ENV__Reason *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0, NULL, NULL, NULL); + a = (struct SOAP_ENV__Reason *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), NULL, NULL, NULL, NULL); if (!a) return NULL; soap_default_SOAP_ENV__Reason(soap, a); @@ -766,7 +827,7 @@ SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_SOAP_ENV__Text && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "SOAP-ENV:Text", &a->SOAP_ENV__Text, "xsd:string")) + if (soap_in_string(soap, "SOAP-ENV:Text", (char**)&a->SOAP_ENV__Text, "xsd:string")) { soap_flag_SOAP_ENV__Text--; continue; } @@ -781,17 +842,36 @@ SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct return NULL; } else - { a = (struct SOAP_ENV__Reason *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Reason, 0, sizeof(struct SOAP_ENV__Reason), 0, NULL); + { a = (struct SOAP_ENV__Reason *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Reason, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0, soap_finsert, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } +SOAP_FMAC1 struct SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Reason(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct SOAP_ENV__Reason *p; + size_t k = sizeof(struct SOAP_ENV__Reason); + if (n < 0) + { p = SOAP_NEW(struct SOAP_ENV__Reason); + } + else + { p = SOAP_NEW_ARRAY(struct SOAP_ENV__Reason, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Reason location=%p n=%d\n", p, n)); + soap_link(soap, p, SOAP_TYPE_SOAP_ENV__Reason, n, soap_fdelete); + if (size) + *size = k; + return p; +} + SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap *soap, const struct SOAP_ENV__Reason *a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Reason); - if (soap_out_SOAP_ENV__Reason(soap, tag?tag:"SOAP-ENV:Reason", id, a, type)) + if (soap_out_SOAP_ENV__Reason(soap, tag?tag:"SOAP-ENV:Reason", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -804,36 +884,6 @@ SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct return p; } -SOAP_FMAC1 struct SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) -{ - (void)type; (void)arrayType; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Reason(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); - struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Reason, n, soap_fdelete); - if (!cp) - return NULL; - if (n < 0) - { cp->ptr = (void*)SOAP_NEW(struct SOAP_ENV__Reason); - if (size) - *size = sizeof(struct SOAP_ENV__Reason); - } - else - { cp->ptr = (void*)SOAP_NEW_ARRAY(struct SOAP_ENV__Reason, n); - if (size) - *size = n * sizeof(struct SOAP_ENV__Reason); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); - if (!cp->ptr) - soap->error = SOAP_EOM; - return (struct SOAP_ENV__Reason*)cp->ptr; -} - -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Reason(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) -{ - (void)soap; (void)tt; (void)st; (void)len; (void)n; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct SOAP_ENV__Reason %p -> %p\n", q, p)); - *(struct SOAP_ENV__Reason*)p = *(struct SOAP_ENV__Reason*)q; -} - #endif #ifndef WITH_NOGLOBAL @@ -848,18 +898,18 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap *soap, stru SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Detail(struct soap *soap, const struct SOAP_ENV__Detail *a) { -#ifndef WITH_NOIDREF (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF soap_markelement(soap, a->fault, a->__type); #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Detail *a, const char *type) { - (void)soap; (void)tag; (void)id; (void)type; + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Detail), type)) return soap->error; - soap_outliteral(soap, "-any", &a->__any, NULL); + soap_outliteral(soap, "-any", (char*const*)&a->__any, NULL); if (soap_putelement(soap, a->fault, "fault", -1, a->__type)) return soap->error; return soap_element_end_out(soap, tag); @@ -871,7 +921,7 @@ SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct size_t soap_flag_fault = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; - a = (struct SOAP_ENV__Detail *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0, NULL, NULL, NULL); + a = (struct SOAP_ENV__Detail *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), NULL, NULL, NULL, NULL); if (!a) return NULL; soap_default_SOAP_ENV__Detail(soap, a); @@ -885,7 +935,7 @@ SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct continue; } if (soap_flag___any && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_inliteral(soap, "-any", &a->__any)) + if (soap_inliteral(soap, "-any", (char**)&a->__any)) { soap_flag___any--; continue; } @@ -900,17 +950,36 @@ SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct return NULL; } else - { a = (struct SOAP_ENV__Detail *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Detail, 0, sizeof(struct SOAP_ENV__Detail), 0, NULL); + { a = (struct SOAP_ENV__Detail *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Detail, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0, soap_finsert, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } +SOAP_FMAC1 struct SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Detail(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct SOAP_ENV__Detail *p; + size_t k = sizeof(struct SOAP_ENV__Detail); + if (n < 0) + { p = SOAP_NEW(struct SOAP_ENV__Detail); + } + else + { p = SOAP_NEW_ARRAY(struct SOAP_ENV__Detail, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Detail location=%p n=%d\n", p, n)); + soap_link(soap, p, SOAP_TYPE_SOAP_ENV__Detail, n, soap_fdelete); + if (size) + *size = k; + return p; +} + SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap *soap, const struct SOAP_ENV__Detail *a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Detail); - if (soap_out_SOAP_ENV__Detail(soap, tag?tag:"SOAP-ENV:Detail", id, a, type)) + if (soap_out_SOAP_ENV__Detail(soap, tag?tag:"SOAP-ENV:Detail", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -923,36 +992,6 @@ SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct return p; } -SOAP_FMAC1 struct SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) -{ - (void)type; (void)arrayType; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Detail(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); - struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Detail, n, soap_fdelete); - if (!cp) - return NULL; - if (n < 0) - { cp->ptr = (void*)SOAP_NEW(struct SOAP_ENV__Detail); - if (size) - *size = sizeof(struct SOAP_ENV__Detail); - } - else - { cp->ptr = (void*)SOAP_NEW_ARRAY(struct SOAP_ENV__Detail, n); - if (size) - *size = n * sizeof(struct SOAP_ENV__Detail); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); - if (!cp->ptr) - soap->error = SOAP_EOM; - return (struct SOAP_ENV__Detail*)cp->ptr; -} - -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Detail(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) -{ - (void)soap; (void)tt; (void)st; (void)len; (void)n; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct SOAP_ENV__Detail %p -> %p\n", q, p)); - *(struct SOAP_ENV__Detail*)p = *(struct SOAP_ENV__Detail*)q; -} - #endif #ifndef WITH_NOGLOBAL @@ -966,9 +1005,9 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap *soap, struct SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap *soap, const struct SOAP_ENV__Code *a) { -#ifndef WITH_NOIDREF (void)soap; (void)a; /* appease -Wall -Werror */ - soap_serialize__QName(soap, &a->SOAP_ENV__Value); +#ifndef WITH_NOIDREF + soap_serialize__QName(soap, (char*const*)&a->SOAP_ENV__Value); soap_serialize_PointerToSOAP_ENV__Code(soap, &a->SOAP_ENV__Subcode); #endif } @@ -976,10 +1015,10 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap *soap, cons SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Code *a, const char *type) { const char *soap_tmp_SOAP_ENV__Value = soap_QName2s(soap, a->SOAP_ENV__Value); - (void)soap; (void)tag; (void)id; (void)type; + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Code), type)) return soap->error; - if (soap_out__QName(soap, "SOAP-ENV:Value", -1, (char*const*)&soap_tmp_SOAP_ENV__Value, "")) + if (soap_out__QName(soap, "SOAP-ENV:Value", -1, (char*const*)(void*)&soap_tmp_SOAP_ENV__Value, "")) return soap->error; if (soap_out_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Subcode", -1, &a->SOAP_ENV__Subcode, "")) return soap->error; @@ -992,7 +1031,7 @@ SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap size_t soap_flag_SOAP_ENV__Subcode = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; - a = (struct SOAP_ENV__Code *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0, NULL, NULL, NULL); + a = (struct SOAP_ENV__Code *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), NULL, NULL, NULL, NULL); if (!a) return NULL; soap_default_SOAP_ENV__Code(soap, a); @@ -1001,7 +1040,7 @@ SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_SOAP_ENV__Value && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in__QName(soap, "SOAP-ENV:Value", &a->SOAP_ENV__Value, "")) + if (soap_in__QName(soap, "SOAP-ENV:Value", (char**)&a->SOAP_ENV__Value, "xsd:QName")) { soap_flag_SOAP_ENV__Value--; continue; } @@ -1021,17 +1060,36 @@ SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap return NULL; } else - { a = (struct SOAP_ENV__Code *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Code, 0, sizeof(struct SOAP_ENV__Code), 0, NULL); + { a = (struct SOAP_ENV__Code *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Code, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0, soap_finsert, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } +SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Code(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct SOAP_ENV__Code *p; + size_t k = sizeof(struct SOAP_ENV__Code); + if (n < 0) + { p = SOAP_NEW(struct SOAP_ENV__Code); + } + else + { p = SOAP_NEW_ARRAY(struct SOAP_ENV__Code, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Code location=%p n=%d\n", p, n)); + soap_link(soap, p, SOAP_TYPE_SOAP_ENV__Code, n, soap_fdelete); + if (size) + *size = k; + return p; +} + SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap *soap, const struct SOAP_ENV__Code *a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Code); - if (soap_out_SOAP_ENV__Code(soap, tag?tag:"SOAP-ENV:Code", id, a, type)) + if (soap_out_SOAP_ENV__Code(soap, tag?tag:"SOAP-ENV:Code", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1044,36 +1102,6 @@ SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soa return p; } -SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) -{ - (void)type; (void)arrayType; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Code(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); - struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Code, n, soap_fdelete); - if (!cp) - return NULL; - if (n < 0) - { cp->ptr = (void*)SOAP_NEW(struct SOAP_ENV__Code); - if (size) - *size = sizeof(struct SOAP_ENV__Code); - } - else - { cp->ptr = (void*)SOAP_NEW_ARRAY(struct SOAP_ENV__Code, n); - if (size) - *size = n * sizeof(struct SOAP_ENV__Code); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); - if (!cp->ptr) - soap->error = SOAP_EOM; - return (struct SOAP_ENV__Code*)cp->ptr; -} - -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Code(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) -{ - (void)soap; (void)tt; (void)st; (void)len; (void)n; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct SOAP_ENV__Code %p -> %p\n", q, p)); - *(struct SOAP_ENV__Code*)p = *(struct SOAP_ENV__Code*)q; -} - #endif #ifndef WITH_NOGLOBAL @@ -1085,14 +1113,14 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap *soap, stru SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Header(struct soap *soap, const struct SOAP_ENV__Header *a) { -#ifndef WITH_NOIDREF (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Header *a, const char *type) { - (void)soap; (void)tag; (void)id; (void)type; + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Header), type)) return soap->error; return soap_element_end_out(soap, tag); @@ -1102,7 +1130,7 @@ SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct { if (soap_element_begin_in(soap, tag, 0, type)) return NULL; - a = (struct SOAP_ENV__Header *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), 0, NULL, NULL, NULL); + a = (struct SOAP_ENV__Header *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), NULL, NULL, NULL, NULL); if (!a) return NULL; soap_default_SOAP_ENV__Header(soap, a); @@ -1121,17 +1149,36 @@ SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct return NULL; } else - { a = (struct SOAP_ENV__Header *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Header, 0, sizeof(struct SOAP_ENV__Header), 0, NULL); + { a = (struct SOAP_ENV__Header *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_SOAP_ENV__Header, SOAP_TYPE_SOAP_ENV__Header, sizeof(struct SOAP_ENV__Header), 0, soap_finsert, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } +SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Header(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct SOAP_ENV__Header *p; + size_t k = sizeof(struct SOAP_ENV__Header); + if (n < 0) + { p = SOAP_NEW(struct SOAP_ENV__Header); + } + else + { p = SOAP_NEW_ARRAY(struct SOAP_ENV__Header, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct SOAP_ENV__Header location=%p n=%d\n", p, n)); + soap_link(soap, p, SOAP_TYPE_SOAP_ENV__Header, n, soap_fdelete); + if (size) + *size = k; + return p; +} + SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap *soap, const struct SOAP_ENV__Header *a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_SOAP_ENV__Header); - if (soap_out_SOAP_ENV__Header(soap, tag?tag:"SOAP-ENV:Header", id, a, type)) + if (soap_out_SOAP_ENV__Header(soap, tag?tag:"SOAP-ENV:Header", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1144,36 +1191,6 @@ SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct return p; } -SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) -{ - (void)type; (void)arrayType; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_SOAP_ENV__Header(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); - struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_SOAP_ENV__Header, n, soap_fdelete); - if (!cp) - return NULL; - if (n < 0) - { cp->ptr = (void*)SOAP_NEW(struct SOAP_ENV__Header); - if (size) - *size = sizeof(struct SOAP_ENV__Header); - } - else - { cp->ptr = (void*)SOAP_NEW_ARRAY(struct SOAP_ENV__Header, n); - if (size) - *size = n * sizeof(struct SOAP_ENV__Header); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); - if (!cp->ptr) - soap->error = SOAP_EOM; - return (struct SOAP_ENV__Header*)cp->ptr; -} - -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Header(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) -{ - (void)soap; (void)tt; (void)st; (void)len; (void)n; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct SOAP_ENV__Header %p -> %p\n", q, p)); - *(struct SOAP_ENV__Header*)p = *(struct SOAP_ENV__Header*)q; -} - #endif SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__executeCommand(struct soap *soap, struct ns1__executeCommand *a) @@ -1184,18 +1201,18 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__executeCommand(struct soap *soap, s SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns1__executeCommand(struct soap *soap, const struct ns1__executeCommand *a) { -#ifndef WITH_NOIDREF (void)soap; (void)a; /* appease -Wall -Werror */ - soap_serialize_string(soap, &a->command); +#ifndef WITH_NOIDREF + soap_serialize_string(soap, (char*const*)&a->command); #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__executeCommand(struct soap *soap, const char *tag, int id, const struct ns1__executeCommand *a, const char *type) { - (void)soap; (void)tag; (void)id; (void)type; + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__executeCommand), type)) return soap->error; - if (soap_out_string(soap, "command", -1, &a->command, "")) + if (soap_out_string(soap, "command", -1, (char*const*)&a->command, "")) return soap->error; return soap_element_end_out(soap, tag); } @@ -1205,7 +1222,7 @@ SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_in_ns1__executeCommand(s size_t soap_flag_command = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; - a = (struct ns1__executeCommand *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__executeCommand, sizeof(struct ns1__executeCommand), 0, NULL, NULL, NULL); + a = (struct ns1__executeCommand *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__executeCommand, sizeof(struct ns1__executeCommand), NULL, NULL, NULL, NULL); if (!a) return NULL; soap_default_ns1__executeCommand(soap, a); @@ -1214,7 +1231,7 @@ SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_in_ns1__executeCommand(s for (;;) { soap->error = SOAP_TAG_MISMATCH; if (soap_flag_command && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG)) - if (soap_in_string(soap, "command", &a->command, "xsd:string")) + if (soap_in_string(soap, "command", (char**)&a->command, "xsd:string")) { soap_flag_command--; continue; } @@ -1229,17 +1246,36 @@ SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_in_ns1__executeCommand(s return NULL; } else - { a = (struct ns1__executeCommand *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__executeCommand, 0, sizeof(struct ns1__executeCommand), 0, NULL); + { a = (struct ns1__executeCommand *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__executeCommand, SOAP_TYPE_ns1__executeCommand, sizeof(struct ns1__executeCommand), 0, soap_finsert, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } +SOAP_FMAC1 struct ns1__executeCommand * SOAP_FMAC2 soap_instantiate_ns1__executeCommand(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__executeCommand(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct ns1__executeCommand *p; + size_t k = sizeof(struct ns1__executeCommand); + if (n < 0) + { p = SOAP_NEW(struct ns1__executeCommand); + } + else + { p = SOAP_NEW_ARRAY(struct ns1__executeCommand, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct ns1__executeCommand location=%p n=%d\n", p, n)); + soap_link(soap, p, SOAP_TYPE_ns1__executeCommand, n, soap_fdelete); + if (size) + *size = k; + return p; +} + SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__executeCommand(struct soap *soap, const struct ns1__executeCommand *a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns1__executeCommand); - if (soap_out_ns1__executeCommand(soap, tag?tag:"ns1:executeCommand", id, a, type)) + if (soap_out_ns1__executeCommand(soap, tag?tag:"ns1:executeCommand", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1252,36 +1288,6 @@ SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_get_ns1__executeCommand( return p; } -SOAP_FMAC1 struct ns1__executeCommand * SOAP_FMAC2 soap_instantiate_ns1__executeCommand(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) -{ - (void)type; (void)arrayType; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__executeCommand(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); - struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__executeCommand, n, soap_fdelete); - if (!cp) - return NULL; - if (n < 0) - { cp->ptr = (void*)SOAP_NEW(struct ns1__executeCommand); - if (size) - *size = sizeof(struct ns1__executeCommand); - } - else - { cp->ptr = (void*)SOAP_NEW_ARRAY(struct ns1__executeCommand, n); - if (size) - *size = n * sizeof(struct ns1__executeCommand); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); - if (!cp->ptr) - soap->error = SOAP_EOM; - return (struct ns1__executeCommand*)cp->ptr; -} - -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__executeCommand(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) -{ - (void)soap; (void)tt; (void)st; (void)len; (void)n; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns1__executeCommand %p -> %p\n", q, p)); - *(struct ns1__executeCommand*)p = *(struct ns1__executeCommand*)q; -} - SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__executeCommandResponse(struct soap *soap, struct ns1__executeCommandResponse *a) { (void)soap; (void)a; /* appease -Wall -Werror */ @@ -1290,15 +1296,15 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__executeCommandResponse(struct soap SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns1__executeCommandResponse(struct soap *soap, const struct ns1__executeCommandResponse *a) { -#ifndef WITH_NOIDREF (void)soap; (void)a; /* appease -Wall -Werror */ +#ifndef WITH_NOIDREF soap_serialize_PointerTostring(soap, &a->result); #endif } SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__executeCommandResponse(struct soap *soap, const char *tag, int id, const struct ns1__executeCommandResponse *a, const char *type) { - (void)soap; (void)tag; (void)id; (void)type; + (void)soap; (void)tag; (void)id; (void)a; (void)type; /* appease -Wall -Werror */ if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_ns1__executeCommandResponse), type)) return soap->error; if (soap_out_PointerTostring(soap, "result", -1, &a->result, "")) @@ -1311,7 +1317,7 @@ SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_in_ns1__executeC size_t soap_flag_result = 1; if (soap_element_begin_in(soap, tag, 0, type)) return NULL; - a = (struct ns1__executeCommandResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__executeCommandResponse, sizeof(struct ns1__executeCommandResponse), 0, NULL, NULL, NULL); + a = (struct ns1__executeCommandResponse *)soap_id_enter(soap, soap->id, a, SOAP_TYPE_ns1__executeCommandResponse, sizeof(struct ns1__executeCommandResponse), NULL, NULL, NULL, NULL); if (!a) return NULL; soap_default_ns1__executeCommandResponse(soap, a); @@ -1335,17 +1341,36 @@ SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_in_ns1__executeC return NULL; } else - { a = (struct ns1__executeCommandResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__executeCommandResponse, 0, sizeof(struct ns1__executeCommandResponse), 0, NULL); + { a = (struct ns1__executeCommandResponse *)soap_id_forward(soap, soap->href, (void*)a, 0, SOAP_TYPE_ns1__executeCommandResponse, SOAP_TYPE_ns1__executeCommandResponse, sizeof(struct ns1__executeCommandResponse), 0, soap_finsert, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } return a; } +SOAP_FMAC1 struct ns1__executeCommandResponse * SOAP_FMAC2 soap_instantiate_ns1__executeCommandResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) +{ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__executeCommandResponse(%p, %d, %s, %s)\n", soap, n, type?type:"", arrayType?arrayType:"")); + (void)type; (void)arrayType; /* appease -Wall -Werror */ + struct ns1__executeCommandResponse *p; + size_t k = sizeof(struct ns1__executeCommandResponse); + if (n < 0) + { p = SOAP_NEW(struct ns1__executeCommandResponse); + } + else + { p = SOAP_NEW_ARRAY(struct ns1__executeCommandResponse, n); + k *= n; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated struct ns1__executeCommandResponse location=%p n=%d\n", p, n)); + soap_link(soap, p, SOAP_TYPE_ns1__executeCommandResponse, n, soap_fdelete); + if (size) + *size = k; + return p; +} + SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__executeCommandResponse(struct soap *soap, const struct ns1__executeCommandResponse *a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_ns1__executeCommandResponse); - if (soap_out_ns1__executeCommandResponse(soap, tag?tag:"ns1:executeCommandResponse", id, a, type)) + if (soap_out_ns1__executeCommandResponse(soap, tag?tag:"ns1:executeCommandResponse", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1358,40 +1383,11 @@ SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_get_ns1__execute return p; } -SOAP_FMAC1 struct ns1__executeCommandResponse * SOAP_FMAC2 soap_instantiate_ns1__executeCommandResponse(struct soap *soap, int n, const char *type, const char *arrayType, size_t *size) -{ - (void)type; (void)arrayType; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_instantiate_ns1__executeCommandResponse(%d, %s, %s)\n", n, type?type:"", arrayType?arrayType:"")); - struct soap_clist *cp = soap_link(soap, NULL, SOAP_TYPE_ns1__executeCommandResponse, n, soap_fdelete); - if (!cp) - return NULL; - if (n < 0) - { cp->ptr = (void*)SOAP_NEW(struct ns1__executeCommandResponse); - if (size) - *size = sizeof(struct ns1__executeCommandResponse); - } - else - { cp->ptr = (void*)SOAP_NEW_ARRAY(struct ns1__executeCommandResponse, n); - if (size) - *size = n * sizeof(struct ns1__executeCommandResponse); - } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Instantiated location=%p\n", cp->ptr)); - if (!cp->ptr) - soap->error = SOAP_EOM; - return (struct ns1__executeCommandResponse*)cp->ptr; -} - -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__executeCommandResponse(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) -{ - (void)soap; (void)tt; (void)st; (void)len; (void)n; /* appease -Wall -Werror */ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying struct ns1__executeCommandResponse %p -> %p\n", q, p)); - *(struct ns1__executeCommandResponse*)p = *(struct ns1__executeCommandResponse*)q; -} - #ifndef WITH_NOGLOBAL SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a) { + (void)soap; (void)a; /* appease -Wall -Werror */ #ifndef WITH_NOIDREF if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Reason)) soap_serialize_SOAP_ENV__Reason(soap, *a); @@ -1400,7 +1396,7 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Reason(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Reason *const*a, const char *type) { - id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Reason); + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Reason, NULL); if (id < 0) return soap->error; return soap_out_SOAP_ENV__Reason(soap, tag, id, *a, type); @@ -1408,6 +1404,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Reason(struct soap *soap, SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reason(struct soap *soap, const char *tag, struct SOAP_ENV__Reason **a, const char *type) { + (void)type; /* appease -Wall -Werror */ if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) @@ -1420,7 +1417,7 @@ SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reas return NULL; } else - { a = (struct SOAP_ENV__Reason **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0); + { a = (struct SOAP_ENV__Reason **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Reason, sizeof(struct SOAP_ENV__Reason), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } @@ -1429,8 +1426,7 @@ SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reas SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *const*a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Reason); - if (soap_out_PointerToSOAP_ENV__Reason(soap, tag?tag:"SOAP-ENV:Reason", id, a, type)) + if (soap_out_PointerToSOAP_ENV__Reason(soap, tag?tag:"SOAP-ENV:Reason", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1449,6 +1445,7 @@ SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Rea SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a) { + (void)soap; (void)a; /* appease -Wall -Werror */ #ifndef WITH_NOIDREF if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Detail)) soap_serialize_SOAP_ENV__Detail(soap, *a); @@ -1457,7 +1454,7 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Detail *const*a, const char *type) { - id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Detail); + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Detail, NULL); if (id < 0) return soap->error; return soap_out_SOAP_ENV__Detail(soap, tag, id, *a, type); @@ -1465,6 +1462,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap *soap, SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap *soap, const char *tag, struct SOAP_ENV__Detail **a, const char *type) { + (void)type; /* appease -Wall -Werror */ if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) @@ -1477,7 +1475,7 @@ SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Deta return NULL; } else - { a = (struct SOAP_ENV__Detail **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0); + { a = (struct SOAP_ENV__Detail **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Detail, sizeof(struct SOAP_ENV__Detail), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } @@ -1486,8 +1484,7 @@ SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Deta SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *const*a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Detail); - if (soap_out_PointerToSOAP_ENV__Detail(soap, tag?tag:"SOAP-ENV:Detail", id, a, type)) + if (soap_out_PointerToSOAP_ENV__Detail(soap, tag?tag:"SOAP-ENV:Detail", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1506,6 +1503,7 @@ SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Det SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a) { + (void)soap; (void)a; /* appease -Wall -Werror */ #ifndef WITH_NOIDREF if (!soap_reference(soap, *a, SOAP_TYPE_SOAP_ENV__Code)) soap_serialize_SOAP_ENV__Code(soap, *a); @@ -1514,14 +1512,18 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap *s SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, int id, struct SOAP_ENV__Code *const*a, const char *type) { - id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Code); + char *mark; + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_SOAP_ENV__Code, &mark); if (id < 0) return soap->error; - return soap_out_SOAP_ENV__Code(soap, tag, id, *a, type); + soap_out_SOAP_ENV__Code(soap, tag, id, *a, type); + soap_unmark(soap, mark); + return soap->error; } SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap *soap, const char *tag, struct SOAP_ENV__Code **a, const char *type) { + (void)type; /* appease -Wall -Werror */ if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) @@ -1534,7 +1536,7 @@ SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(s return NULL; } else - { a = (struct SOAP_ENV__Code **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0); + { a = (struct SOAP_ENV__Code **)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_SOAP_ENV__Code, sizeof(struct SOAP_ENV__Code), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } @@ -1543,8 +1545,7 @@ SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(s SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *const*a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerToSOAP_ENV__Code); - if (soap_out_PointerToSOAP_ENV__Code(soap, tag?tag:"SOAP-ENV:Code", id, a, type)) + if (soap_out_PointerToSOAP_ENV__Code(soap, tag?tag:"SOAP-ENV:Code", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1561,6 +1562,7 @@ SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code( SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTostring(struct soap *soap, char **const*a) { + (void)soap; (void)a; /* appease -Wall -Werror */ #ifndef WITH_NOIDREF if (!soap_reference(soap, *a, SOAP_TYPE_string)) soap_serialize_string(soap, *a); @@ -1569,7 +1571,7 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTostring(struct soap *soap, cha SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTostring(struct soap *soap, const char *tag, int id, char **const*a, const char *type) { - id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_string); + id = soap_element_id(soap, tag, id, *a, NULL, 0, type, SOAP_TYPE_string, NULL); if (id < 0) return soap->error; return soap_out_string(soap, tag, id, *a, type); @@ -1577,6 +1579,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTostring(struct soap *soap, const char SOAP_FMAC3 char *** SOAP_FMAC4 soap_in_PointerTostring(struct soap *soap, const char *tag, char ***a, const char *type) { + (void)type; /* appease -Wall -Werror */ if (soap_element_begin_in(soap, tag, 1, NULL)) return NULL; if (!a) @@ -1589,7 +1592,7 @@ SOAP_FMAC3 char *** SOAP_FMAC4 soap_in_PointerTostring(struct soap *soap, const return NULL; } else - { a = (char ***)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_string, sizeof(char *), 1); + { a = (char ***)soap_id_lookup(soap, soap->href, (void**)a, SOAP_TYPE_string, sizeof(char *), 1, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; } @@ -1598,8 +1601,7 @@ SOAP_FMAC3 char *** SOAP_FMAC4 soap_in_PointerTostring(struct soap *soap, const SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTostring(struct soap *soap, char **const*a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_PointerTostring); - if (soap_out_PointerTostring(soap, tag?tag:"byte", id, a, type)) + if (soap_out_PointerTostring(soap, tag?tag:"string", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1612,8 +1614,19 @@ SOAP_FMAC3 char *** SOAP_FMAC4 soap_get_PointerTostring(struct soap *soap, char return p; } +SOAP_FMAC3 void SOAP_FMAC4 soap_default__QName(struct soap *soap, char **a) +{ + (void)soap; /* appease -Wall -Werror */ +#ifdef SOAP_DEFAULT__QName + *a = SOAP_DEFAULT__QName; +#else + *a = (char *)0; +#endif +} + SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap *soap, char *const*a) { + (void)soap; (void)a; /* appease -Wall -Werror */ #ifndef WITH_NOIDREF soap_reference(soap, *a, SOAP_TYPE__QName); #endif @@ -1625,15 +1638,14 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap *soap, const char *tag, in } SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap *soap, const char *tag, char **a, const char *type) -{ char **p; - p = soap_instring(soap, tag, a, type, SOAP_TYPE__QName, 2, 0, -1); - return p; +{ + a = soap_instring(soap, tag, a, type, SOAP_TYPE__QName, 2, 0, -1, NULL); + return a; } SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap *soap, char *const*a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE__QName); - if (soap_out__QName(soap, tag?tag:"byte", id, a, type)) + if (soap_out__QName(soap, tag?tag:"QName", -2, a, type)) return soap->error; return soap_putindependent(soap); } @@ -1658,6 +1670,7 @@ SOAP_FMAC3 void SOAP_FMAC4 soap_default_string(struct soap *soap, char **a) SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap *soap, char *const*a) { + (void)soap; (void)a; /* appease -Wall -Werror */ #ifndef WITH_NOIDREF soap_reference(soap, *a, SOAP_TYPE_string); #endif @@ -1669,15 +1682,14 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap *soap, const char *tag, in } SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap *soap, const char *tag, char **a, const char *type) -{ char **p; - p = soap_instring(soap, tag, a, type, SOAP_TYPE_string, 1, 0, -1); - return p; +{ + a = soap_instring(soap, tag, a, type, SOAP_TYPE_string, 1, 0, -1, NULL); + return a; } SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap *soap, char *const*a, const char *tag, const char *type) { - register int id = soap_embed(soap, (void*)a, NULL, 0, tag, SOAP_TYPE_string); - if (soap_out_string(soap, tag?tag:"byte", id, a, type)) + if (soap_out_string(soap, tag?tag:"string", -2, a, type)) return soap->error; return soap_putindependent(soap); } diff --git a/dep/gsoap/soapH.h b/dep/gsoap/soapH.h index a73b369fe90..f3def95426a 100644 --- a/dep/gsoap/soapH.h +++ b/dep/gsoap/soapH.h @@ -1,11 +1,14 @@ /* soapH.h - Generated by gSOAP 2.8.17r from gsoap.stub + Generated by gSOAP 2.8.33 for gsoap.stub -Copyright(C) 2000-2013, Robert van Engelen, Genivia Inc. All Rights Reserved. -The generated code is released under one of the following licenses: -GPL or Genivia's license for commercial use. +gSOAP XML Web services tools +Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc. All Rights Reserved. +The soapcpp2 tool and its generated software are released under the GPL. This program is released under the GPL with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial use license is available from Genivia Inc., contact@genivia.com +-------------------------------------------------------------------------------- */ #ifndef soapH_H @@ -37,425 +40,635 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char* SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap*); SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap); - SOAP_FMAC3 void * SOAP_FMAC4 soap_instantiate(struct soap*, int, const char*, const char*, size_t*); SOAP_FMAC3 int SOAP_FMAC4 soap_fdelete(struct soap_clist*); -SOAP_FMAC3 void* SOAP_FMAC4 soap_class_id_enter(struct soap*, const char*, void*, int, size_t, const char*, const char*); +SOAP_FMAC3 int SOAP_FMAC4 soap_fbase(int, int); +SOAP_FMAC3 void SOAP_FMAC4 soap_finsert(struct soap*, int, int, void*, size_t, const void*, void**); -#ifndef SOAP_TYPE_byte -#define SOAP_TYPE_byte (3) -#endif +#ifndef SOAP_TYPE_byte_DEFINED +#define SOAP_TYPE_byte_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_default_byte(struct soap*, char *); SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap*, const char*, int, const char *, const char*); SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap*, const char*, char *, const char*); - SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap*, const char *, const char*, const char*); -#ifndef soap_write_byte -#define soap_write_byte(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_byte(soap, data),0) || soap_put_byte(soap, data, "byte", NULL) || soap_end_send(soap), (soap)->error ) -#endif - +inline int soap_write_byte(struct soap *soap, char const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || soap_put_byte(soap, p, "byte", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap*, char *, const char*, const char*); -#ifndef soap_read_byte -#define soap_read_byte(soap, data) ( soap_begin_recv(soap) || !soap_get_byte(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) +inline int soap_read_byte(struct soap *soap, char *p) +{ + if (p) + { if (soap_begin_recv(soap) || soap_get_byte(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} #endif - -#ifndef SOAP_TYPE_int -#define SOAP_TYPE_int (1) -#endif +#ifndef SOAP_TYPE_int_DEFINED +#define SOAP_TYPE_int_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_default_int(struct soap*, int *); SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap*, const char*, int, const int *, const char*); SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap*, const char*, int *, const char*); - SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap*, const int *, const char*, const char*); -#ifndef soap_write_int -#define soap_write_int(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_int(soap, data),0) || soap_put_int(soap, data, "int", NULL) || soap_end_send(soap), (soap)->error ) -#endif - +inline int soap_write_int(struct soap *soap, int const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || soap_put_int(soap, p, "int", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap*, int *, const char*, const char*); -#ifndef soap_read_int -#define soap_read_int(soap, data) ( soap_begin_recv(soap) || !soap_get_int(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) +inline int soap_read_int(struct soap *soap, int *p) +{ + if (p) + { if (soap_begin_recv(soap) || soap_get_int(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} #endif - #ifndef WITH_NOGLOBAL -#ifndef SOAP_TYPE_SOAP_ENV__Fault -#define SOAP_TYPE_SOAP_ENV__Fault (18) -#endif +#ifndef SOAP_TYPE_SOAP_ENV__Fault_DEFINED +#define SOAP_TYPE_SOAP_ENV__Fault_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *); SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *); SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap*, const char*, int, const struct SOAP_ENV__Fault *, const char*); SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct soap*, const char*, struct SOAP_ENV__Fault *, const char*); - -SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *, const char*, const char*); - -#ifndef soap_write_SOAP_ENV__Fault -#define soap_write_SOAP_ENV__Fault(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Fault(soap, data),0) || soap_put_SOAP_ENV__Fault(soap, data, "SOAP-ENV:Fault", NULL) || soap_end_send(soap), (soap)->error ) -#endif - -SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *, const char*, const char*); - -#ifndef soap_read_SOAP_ENV__Fault -#define soap_read_SOAP_ENV__Fault(soap, data) ( soap_begin_recv(soap) || !soap_get_SOAP_ENV__Fault(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) -#endif - SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap*, int, const char*, const char*, size_t*); -inline struct SOAP_ENV__Fault * soap_new_SOAP_ENV__Fault(struct soap *soap, int n = -1) { return soap_instantiate_SOAP_ENV__Fault(soap, n, NULL, NULL, NULL); } +inline struct SOAP_ENV__Fault * soap_new_SOAP_ENV__Fault(struct soap *soap, int n = -1) +{ + return soap_instantiate_SOAP_ENV__Fault(soap, n, NULL, NULL, NULL); +} -inline struct SOAP_ENV__Fault * soap_new_req_SOAP_ENV__Fault(struct soap *soap) { struct SOAP_ENV__Fault *_p = soap_instantiate_SOAP_ENV__Fault(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Fault(soap, _p); } return _p; } +inline struct SOAP_ENV__Fault * soap_new_req_SOAP_ENV__Fault( + struct soap *soap) +{ + struct SOAP_ENV__Fault *_p = soap_new_SOAP_ENV__Fault(soap); + if (_p) + { soap_default_SOAP_ENV__Fault(soap, _p); + } + return _p; +} -inline struct SOAP_ENV__Fault * soap_new_set_SOAP_ENV__Fault(struct soap *soap, char *faultcode, char *faultstring, char *faultactor, struct SOAP_ENV__Detail *detail, struct SOAP_ENV__Code *SOAP_ENV__Code, struct SOAP_ENV__Reason *SOAP_ENV__Reason, char *SOAP_ENV__Node, char *SOAP_ENV__Role, struct SOAP_ENV__Detail *SOAP_ENV__Detail) { struct SOAP_ENV__Fault *_p = soap_instantiate_SOAP_ENV__Fault(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Fault(soap, _p); _p->faultcode = faultcode; _p->faultstring = faultstring; _p->faultactor = faultactor; _p->detail = detail; _p->SOAP_ENV__Code = SOAP_ENV__Code; _p->SOAP_ENV__Reason = SOAP_ENV__Reason; _p->SOAP_ENV__Node = SOAP_ENV__Node; _p->SOAP_ENV__Role = SOAP_ENV__Role; _p->SOAP_ENV__Detail = SOAP_ENV__Detail; } return _p; } +inline struct SOAP_ENV__Fault * soap_new_set_SOAP_ENV__Fault( + struct soap *soap, + char *faultcode, + char *faultstring, + char *faultactor, + struct SOAP_ENV__Detail *detail, + struct SOAP_ENV__Code *SOAP_ENV__Code, + struct SOAP_ENV__Reason *SOAP_ENV__Reason, + char *SOAP_ENV__Node, + char *SOAP_ENV__Role, + struct SOAP_ENV__Detail *SOAP_ENV__Detail) +{ + struct SOAP_ENV__Fault *_p = soap_new_SOAP_ENV__Fault(soap); + if (_p) + { soap_default_SOAP_ENV__Fault(soap, _p); + _p->faultcode = faultcode; + _p->faultstring = faultstring; + _p->faultactor = faultactor; + _p->detail = detail; + _p->SOAP_ENV__Code = SOAP_ENV__Code; + _p->SOAP_ENV__Reason = SOAP_ENV__Reason; + _p->SOAP_ENV__Node = SOAP_ENV__Node; + _p->SOAP_ENV__Role = SOAP_ENV__Role; + _p->SOAP_ENV__Detail = SOAP_ENV__Detail; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *, const char*, const char*); -inline void soap_delete_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p) { soap_delete(soap, p); } +inline int soap_write_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Fault(soap, p), 0) || soap_put_SOAP_ENV__Fault(soap, p, "SOAP-ENV:Fault", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} +SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *, const char*, const char*); -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Fault(struct soap*, int, int, void*, size_t, const void*, size_t); +inline int soap_read_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p) +{ + if (p) + { soap_default_SOAP_ENV__Fault(soap, p); + if (soap_begin_recv(soap) || soap_get_SOAP_ENV__Fault(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} +#endif #endif #ifndef WITH_NOGLOBAL -#ifndef SOAP_TYPE_SOAP_ENV__Reason -#define SOAP_TYPE_SOAP_ENV__Reason (17) -#endif +#ifndef SOAP_TYPE_SOAP_ENV__Reason_DEFINED +#define SOAP_TYPE_SOAP_ENV__Reason_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *); SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Reason(struct soap*, const struct SOAP_ENV__Reason *); SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Reason(struct soap*, const char*, int, const struct SOAP_ENV__Reason *, const char*); SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct soap*, const char*, struct SOAP_ENV__Reason *, const char*); - -SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap*, const struct SOAP_ENV__Reason *, const char*, const char*); - -#ifndef soap_write_SOAP_ENV__Reason -#define soap_write_SOAP_ENV__Reason(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Reason(soap, data),0) || soap_put_SOAP_ENV__Reason(soap, data, "SOAP-ENV:Reason", NULL) || soap_end_send(soap), (soap)->error ) -#endif - -SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *, const char*, const char*); - -#ifndef soap_read_SOAP_ENV__Reason -#define soap_read_SOAP_ENV__Reason(soap, data) ( soap_begin_recv(soap) || !soap_get_SOAP_ENV__Reason(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) -#endif - SOAP_FMAC1 struct SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap*, int, const char*, const char*, size_t*); -inline struct SOAP_ENV__Reason * soap_new_SOAP_ENV__Reason(struct soap *soap, int n = -1) { return soap_instantiate_SOAP_ENV__Reason(soap, n, NULL, NULL, NULL); } +inline struct SOAP_ENV__Reason * soap_new_SOAP_ENV__Reason(struct soap *soap, int n = -1) +{ + return soap_instantiate_SOAP_ENV__Reason(soap, n, NULL, NULL, NULL); +} -inline struct SOAP_ENV__Reason * soap_new_req_SOAP_ENV__Reason(struct soap *soap) { struct SOAP_ENV__Reason *_p = soap_instantiate_SOAP_ENV__Reason(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Reason(soap, _p); } return _p; } +inline struct SOAP_ENV__Reason * soap_new_req_SOAP_ENV__Reason( + struct soap *soap) +{ + struct SOAP_ENV__Reason *_p = soap_new_SOAP_ENV__Reason(soap); + if (_p) + { soap_default_SOAP_ENV__Reason(soap, _p); + } + return _p; +} -inline struct SOAP_ENV__Reason * soap_new_set_SOAP_ENV__Reason(struct soap *soap, char *SOAP_ENV__Text) { struct SOAP_ENV__Reason *_p = soap_instantiate_SOAP_ENV__Reason(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Reason(soap, _p); _p->SOAP_ENV__Text = SOAP_ENV__Text; } return _p; } +inline struct SOAP_ENV__Reason * soap_new_set_SOAP_ENV__Reason( + struct soap *soap, + char *SOAP_ENV__Text) +{ + struct SOAP_ENV__Reason *_p = soap_new_SOAP_ENV__Reason(soap); + if (_p) + { soap_default_SOAP_ENV__Reason(soap, _p); + _p->SOAP_ENV__Text = SOAP_ENV__Text; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap*, const struct SOAP_ENV__Reason *, const char*, const char*); -inline void soap_delete_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p) { soap_delete(soap, p); } +inline int soap_write_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Reason(soap, p), 0) || soap_put_SOAP_ENV__Reason(soap, p, "SOAP-ENV:Reason", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} +SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *, const char*, const char*); -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Reason(struct soap*, int, int, void*, size_t, const void*, size_t); +inline int soap_read_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p) +{ + if (p) + { soap_default_SOAP_ENV__Reason(soap, p); + if (soap_begin_recv(soap) || soap_get_SOAP_ENV__Reason(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} +#endif #endif #ifndef WITH_NOGLOBAL -#ifndef SOAP_TYPE_SOAP_ENV__Detail -#define SOAP_TYPE_SOAP_ENV__Detail (14) -#endif +#ifndef SOAP_TYPE_SOAP_ENV__Detail_DEFINED +#define SOAP_TYPE_SOAP_ENV__Detail_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *); SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *); SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap*, const char*, int, const struct SOAP_ENV__Detail *, const char*); SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail *, const char*); - -SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *, const char*, const char*); - -#ifndef soap_write_SOAP_ENV__Detail -#define soap_write_SOAP_ENV__Detail(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Detail(soap, data),0) || soap_put_SOAP_ENV__Detail(soap, data, "SOAP-ENV:Detail", NULL) || soap_end_send(soap), (soap)->error ) -#endif - -SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *, const char*, const char*); - -#ifndef soap_read_SOAP_ENV__Detail -#define soap_read_SOAP_ENV__Detail(soap, data) ( soap_begin_recv(soap) || !soap_get_SOAP_ENV__Detail(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) -#endif - SOAP_FMAC1 struct SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap*, int, const char*, const char*, size_t*); -inline struct SOAP_ENV__Detail * soap_new_SOAP_ENV__Detail(struct soap *soap, int n = -1) { return soap_instantiate_SOAP_ENV__Detail(soap, n, NULL, NULL, NULL); } +inline struct SOAP_ENV__Detail * soap_new_SOAP_ENV__Detail(struct soap *soap, int n = -1) +{ + return soap_instantiate_SOAP_ENV__Detail(soap, n, NULL, NULL, NULL); +} -inline struct SOAP_ENV__Detail * soap_new_req_SOAP_ENV__Detail(struct soap *soap, int __type, void *fault) { struct SOAP_ENV__Detail *_p = soap_instantiate_SOAP_ENV__Detail(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Detail(soap, _p); _p->__type = __type; _p->fault = fault; } return _p; } +inline struct SOAP_ENV__Detail * soap_new_req_SOAP_ENV__Detail( + struct soap *soap, + int __type, + void *fault) +{ + struct SOAP_ENV__Detail *_p = soap_new_SOAP_ENV__Detail(soap); + if (_p) + { soap_default_SOAP_ENV__Detail(soap, _p); + _p->__type = __type; + _p->fault = fault; + } + return _p; +} -inline struct SOAP_ENV__Detail * soap_new_set_SOAP_ENV__Detail(struct soap *soap, char *__any, int __type, void *fault) { struct SOAP_ENV__Detail *_p = soap_instantiate_SOAP_ENV__Detail(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Detail(soap, _p); _p->__any = __any; _p->__type = __type; _p->fault = fault; } return _p; } +inline struct SOAP_ENV__Detail * soap_new_set_SOAP_ENV__Detail( + struct soap *soap, + char *__any, + int __type, + void *fault) +{ + struct SOAP_ENV__Detail *_p = soap_new_SOAP_ENV__Detail(soap); + if (_p) + { soap_default_SOAP_ENV__Detail(soap, _p); + _p->__any = __any; + _p->__type = __type; + _p->fault = fault; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *, const char*, const char*); -inline void soap_delete_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p) { soap_delete(soap, p); } +inline int soap_write_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Detail(soap, p), 0) || soap_put_SOAP_ENV__Detail(soap, p, "SOAP-ENV:Detail", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} +SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *, const char*, const char*); -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Detail(struct soap*, int, int, void*, size_t, const void*, size_t); +inline int soap_read_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p) +{ + if (p) + { soap_default_SOAP_ENV__Detail(soap, p); + if (soap_begin_recv(soap) || soap_get_SOAP_ENV__Detail(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} +#endif #endif #ifndef WITH_NOGLOBAL -#ifndef SOAP_TYPE_SOAP_ENV__Code -#define SOAP_TYPE_SOAP_ENV__Code (12) -#endif +#ifndef SOAP_TYPE_SOAP_ENV__Code_DEFINED +#define SOAP_TYPE_SOAP_ENV__Code_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *); SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *); SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap*, const char*, int, const struct SOAP_ENV__Code *, const char*); SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code *, const char*); - -SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *, const char*, const char*); - -#ifndef soap_write_SOAP_ENV__Code -#define soap_write_SOAP_ENV__Code(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Code(soap, data),0) || soap_put_SOAP_ENV__Code(soap, data, "SOAP-ENV:Code", NULL) || soap_end_send(soap), (soap)->error ) -#endif - -SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *, const char*, const char*); - -#ifndef soap_read_SOAP_ENV__Code -#define soap_read_SOAP_ENV__Code(soap, data) ( soap_begin_recv(soap) || !soap_get_SOAP_ENV__Code(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) -#endif - SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap*, int, const char*, const char*, size_t*); -inline struct SOAP_ENV__Code * soap_new_SOAP_ENV__Code(struct soap *soap, int n = -1) { return soap_instantiate_SOAP_ENV__Code(soap, n, NULL, NULL, NULL); } +inline struct SOAP_ENV__Code * soap_new_SOAP_ENV__Code(struct soap *soap, int n = -1) +{ + return soap_instantiate_SOAP_ENV__Code(soap, n, NULL, NULL, NULL); +} -inline struct SOAP_ENV__Code * soap_new_req_SOAP_ENV__Code(struct soap *soap) { struct SOAP_ENV__Code *_p = soap_instantiate_SOAP_ENV__Code(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Code(soap, _p); } return _p; } +inline struct SOAP_ENV__Code * soap_new_req_SOAP_ENV__Code( + struct soap *soap) +{ + struct SOAP_ENV__Code *_p = soap_new_SOAP_ENV__Code(soap); + if (_p) + { soap_default_SOAP_ENV__Code(soap, _p); + } + return _p; +} -inline struct SOAP_ENV__Code * soap_new_set_SOAP_ENV__Code(struct soap *soap, char *SOAP_ENV__Value, struct SOAP_ENV__Code *SOAP_ENV__Subcode) { struct SOAP_ENV__Code *_p = soap_instantiate_SOAP_ENV__Code(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Code(soap, _p); _p->SOAP_ENV__Value = SOAP_ENV__Value; _p->SOAP_ENV__Subcode = SOAP_ENV__Subcode; } return _p; } +inline struct SOAP_ENV__Code * soap_new_set_SOAP_ENV__Code( + struct soap *soap, + char *SOAP_ENV__Value, + struct SOAP_ENV__Code *SOAP_ENV__Subcode) +{ + struct SOAP_ENV__Code *_p = soap_new_SOAP_ENV__Code(soap); + if (_p) + { soap_default_SOAP_ENV__Code(soap, _p); + _p->SOAP_ENV__Value = SOAP_ENV__Value; + _p->SOAP_ENV__Subcode = SOAP_ENV__Subcode; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *, const char*, const char*); -inline void soap_delete_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p) { soap_delete(soap, p); } +inline int soap_write_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Code(soap, p), 0) || soap_put_SOAP_ENV__Code(soap, p, "SOAP-ENV:Code", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} +SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *, const char*, const char*); -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Code(struct soap*, int, int, void*, size_t, const void*, size_t); +inline int soap_read_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p) +{ + if (p) + { soap_default_SOAP_ENV__Code(soap, p); + if (soap_begin_recv(soap) || soap_get_SOAP_ENV__Code(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} +#endif #endif #ifndef WITH_NOGLOBAL -#ifndef SOAP_TYPE_SOAP_ENV__Header -#define SOAP_TYPE_SOAP_ENV__Header (11) -#endif +#ifndef SOAP_TYPE_SOAP_ENV__Header_DEFINED +#define SOAP_TYPE_SOAP_ENV__Header_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *); SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *); SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap*, const char*, int, const struct SOAP_ENV__Header *, const char*); SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap*, const char*, struct SOAP_ENV__Header *, const char*); - -SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *, const char*, const char*); - -#ifndef soap_write_SOAP_ENV__Header -#define soap_write_SOAP_ENV__Header(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Header(soap, data),0) || soap_put_SOAP_ENV__Header(soap, data, "SOAP-ENV:Header", NULL) || soap_end_send(soap), (soap)->error ) -#endif - -SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *, const char*, const char*); - -#ifndef soap_read_SOAP_ENV__Header -#define soap_read_SOAP_ENV__Header(soap, data) ( soap_begin_recv(soap) || !soap_get_SOAP_ENV__Header(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) -#endif - SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap*, int, const char*, const char*, size_t*); -inline struct SOAP_ENV__Header * soap_new_SOAP_ENV__Header(struct soap *soap, int n = -1) { return soap_instantiate_SOAP_ENV__Header(soap, n, NULL, NULL, NULL); } - -inline struct SOAP_ENV__Header * soap_new_req_SOAP_ENV__Header(struct soap *soap) { struct SOAP_ENV__Header *_p = soap_instantiate_SOAP_ENV__Header(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Header(soap, _p); } return _p; } +inline struct SOAP_ENV__Header * soap_new_SOAP_ENV__Header(struct soap *soap, int n = -1) +{ + return soap_instantiate_SOAP_ENV__Header(soap, n, NULL, NULL, NULL); +} -inline struct SOAP_ENV__Header * soap_new_set_SOAP_ENV__Header(struct soap *soap) { struct SOAP_ENV__Header *_p = soap_instantiate_SOAP_ENV__Header(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Header(soap, _p); } return _p; } +inline struct SOAP_ENV__Header * soap_new_req_SOAP_ENV__Header( + struct soap *soap) +{ + struct SOAP_ENV__Header *_p = soap_new_SOAP_ENV__Header(soap); + if (_p) + { soap_default_SOAP_ENV__Header(soap, _p); + } + return _p; +} -inline void soap_delete_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p) { soap_delete(soap, p); } +inline struct SOAP_ENV__Header * soap_new_set_SOAP_ENV__Header( + struct soap *soap) +{ + struct SOAP_ENV__Header *_p = soap_new_SOAP_ENV__Header(soap); + if (_p) + { soap_default_SOAP_ENV__Header(soap, _p); + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *, const char*, const char*); -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Header(struct soap*, int, int, void*, size_t, const void*, size_t); +inline int soap_write_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Header(soap, p), 0) || soap_put_SOAP_ENV__Header(soap, p, "SOAP-ENV:Header", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} +SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *, const char*, const char*); +inline int soap_read_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p) +{ + if (p) + { soap_default_SOAP_ENV__Header(soap, p); + if (soap_begin_recv(soap) || soap_get_SOAP_ENV__Header(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} #endif -#ifndef SOAP_TYPE_ns1__executeCommand -#define SOAP_TYPE_ns1__executeCommand (10) #endif + +#ifndef SOAP_TYPE_ns1__executeCommand_DEFINED +#define SOAP_TYPE_ns1__executeCommand_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__executeCommand(struct soap*, struct ns1__executeCommand *); SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns1__executeCommand(struct soap*, const struct ns1__executeCommand *); SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__executeCommand(struct soap*, const char*, int, const struct ns1__executeCommand *, const char*); SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_in_ns1__executeCommand(struct soap*, const char*, struct ns1__executeCommand *, const char*); - -SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__executeCommand(struct soap*, const struct ns1__executeCommand *, const char*, const char*); - -#ifndef soap_write_ns1__executeCommand -#define soap_write_ns1__executeCommand(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_ns1__executeCommand(soap, data),0) || soap_put_ns1__executeCommand(soap, data, "ns1:executeCommand", NULL) || soap_end_send(soap), (soap)->error ) -#endif - -SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_get_ns1__executeCommand(struct soap*, struct ns1__executeCommand *, const char*, const char*); - -#ifndef soap_read_ns1__executeCommand -#define soap_read_ns1__executeCommand(soap, data) ( soap_begin_recv(soap) || !soap_get_ns1__executeCommand(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) -#endif - SOAP_FMAC1 struct ns1__executeCommand * SOAP_FMAC2 soap_instantiate_ns1__executeCommand(struct soap*, int, const char*, const char*, size_t*); -inline struct ns1__executeCommand * soap_new_ns1__executeCommand(struct soap *soap, int n = -1) { return soap_instantiate_ns1__executeCommand(soap, n, NULL, NULL, NULL); } - -inline struct ns1__executeCommand * soap_new_req_ns1__executeCommand(struct soap *soap) { struct ns1__executeCommand *_p = soap_instantiate_ns1__executeCommand(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_ns1__executeCommand(soap, _p); } return _p; } +inline struct ns1__executeCommand * soap_new_ns1__executeCommand(struct soap *soap, int n = -1) +{ + return soap_instantiate_ns1__executeCommand(soap, n, NULL, NULL, NULL); +} -inline struct ns1__executeCommand * soap_new_set_ns1__executeCommand(struct soap *soap, char *command) { struct ns1__executeCommand *_p = soap_instantiate_ns1__executeCommand(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_ns1__executeCommand(soap, _p); _p->command = command; } return _p; } +inline struct ns1__executeCommand * soap_new_req_ns1__executeCommand( + struct soap *soap) +{ + struct ns1__executeCommand *_p = soap_new_ns1__executeCommand(soap); + if (_p) + { soap_default_ns1__executeCommand(soap, _p); + } + return _p; +} -inline void soap_delete_ns1__executeCommand(struct soap *soap, struct ns1__executeCommand *p) { soap_delete(soap, p); } +inline struct ns1__executeCommand * soap_new_set_ns1__executeCommand( + struct soap *soap, + char *command) +{ + struct ns1__executeCommand *_p = soap_new_ns1__executeCommand(soap); + if (_p) + { soap_default_ns1__executeCommand(soap, _p); + _p->command = command; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__executeCommand(struct soap*, const struct ns1__executeCommand *, const char*, const char*); -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__executeCommand(struct soap*, int, int, void*, size_t, const void*, size_t); +inline int soap_write_ns1__executeCommand(struct soap *soap, struct ns1__executeCommand const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || (soap_serialize_ns1__executeCommand(soap, p), 0) || soap_put_ns1__executeCommand(soap, p, "ns1:executeCommand", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} +SOAP_FMAC3 struct ns1__executeCommand * SOAP_FMAC4 soap_get_ns1__executeCommand(struct soap*, struct ns1__executeCommand *, const char*, const char*); -#ifndef SOAP_TYPE_ns1__executeCommandResponse -#define SOAP_TYPE_ns1__executeCommandResponse (9) +inline int soap_read_ns1__executeCommand(struct soap *soap, struct ns1__executeCommand *p) +{ + if (p) + { soap_default_ns1__executeCommand(soap, p); + if (soap_begin_recv(soap) || soap_get_ns1__executeCommand(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} #endif + +#ifndef SOAP_TYPE_ns1__executeCommandResponse_DEFINED +#define SOAP_TYPE_ns1__executeCommandResponse_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_default_ns1__executeCommandResponse(struct soap*, struct ns1__executeCommandResponse *); SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_ns1__executeCommandResponse(struct soap*, const struct ns1__executeCommandResponse *); SOAP_FMAC3 int SOAP_FMAC4 soap_out_ns1__executeCommandResponse(struct soap*, const char*, int, const struct ns1__executeCommandResponse *, const char*); SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_in_ns1__executeCommandResponse(struct soap*, const char*, struct ns1__executeCommandResponse *, const char*); - -SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__executeCommandResponse(struct soap*, const struct ns1__executeCommandResponse *, const char*, const char*); - -#ifndef soap_write_ns1__executeCommandResponse -#define soap_write_ns1__executeCommandResponse(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_ns1__executeCommandResponse(soap, data),0) || soap_put_ns1__executeCommandResponse(soap, data, "ns1:executeCommandResponse", NULL) || soap_end_send(soap), (soap)->error ) -#endif - -SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_get_ns1__executeCommandResponse(struct soap*, struct ns1__executeCommandResponse *, const char*, const char*); - -#ifndef soap_read_ns1__executeCommandResponse -#define soap_read_ns1__executeCommandResponse(soap, data) ( soap_begin_recv(soap) || !soap_get_ns1__executeCommandResponse(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) -#endif - SOAP_FMAC1 struct ns1__executeCommandResponse * SOAP_FMAC2 soap_instantiate_ns1__executeCommandResponse(struct soap*, int, const char*, const char*, size_t*); -inline struct ns1__executeCommandResponse * soap_new_ns1__executeCommandResponse(struct soap *soap, int n = -1) { return soap_instantiate_ns1__executeCommandResponse(soap, n, NULL, NULL, NULL); } +inline struct ns1__executeCommandResponse * soap_new_ns1__executeCommandResponse(struct soap *soap, int n = -1) +{ + return soap_instantiate_ns1__executeCommandResponse(soap, n, NULL, NULL, NULL); +} -inline struct ns1__executeCommandResponse * soap_new_req_ns1__executeCommandResponse(struct soap *soap) { struct ns1__executeCommandResponse *_p = soap_instantiate_ns1__executeCommandResponse(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_ns1__executeCommandResponse(soap, _p); } return _p; } +inline struct ns1__executeCommandResponse * soap_new_req_ns1__executeCommandResponse( + struct soap *soap) +{ + struct ns1__executeCommandResponse *_p = soap_new_ns1__executeCommandResponse(soap); + if (_p) + { soap_default_ns1__executeCommandResponse(soap, _p); + } + return _p; +} -inline struct ns1__executeCommandResponse * soap_new_set_ns1__executeCommandResponse(struct soap *soap, char **result) { struct ns1__executeCommandResponse *_p = soap_instantiate_ns1__executeCommandResponse(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_ns1__executeCommandResponse(soap, _p); _p->result = result; } return _p; } +inline struct ns1__executeCommandResponse * soap_new_set_ns1__executeCommandResponse( + struct soap *soap, + char **result) +{ + struct ns1__executeCommandResponse *_p = soap_new_ns1__executeCommandResponse(soap); + if (_p) + { soap_default_ns1__executeCommandResponse(soap, _p); + _p->result = result; + } + return _p; +} +SOAP_FMAC3 int SOAP_FMAC4 soap_put_ns1__executeCommandResponse(struct soap*, const struct ns1__executeCommandResponse *, const char*, const char*); -inline void soap_delete_ns1__executeCommandResponse(struct soap *soap, struct ns1__executeCommandResponse *p) { soap_delete(soap, p); } +inline int soap_write_ns1__executeCommandResponse(struct soap *soap, struct ns1__executeCommandResponse const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || (soap_serialize_ns1__executeCommandResponse(soap, p), 0) || soap_put_ns1__executeCommandResponse(soap, p, "ns1:executeCommandResponse", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} +SOAP_FMAC3 struct ns1__executeCommandResponse * SOAP_FMAC4 soap_get_ns1__executeCommandResponse(struct soap*, struct ns1__executeCommandResponse *, const char*, const char*); -SOAP_FMAC3 void SOAP_FMAC4 soap_copy_ns1__executeCommandResponse(struct soap*, int, int, void*, size_t, const void*, size_t); +inline int soap_read_ns1__executeCommandResponse(struct soap *soap, struct ns1__executeCommandResponse *p) +{ + if (p) + { soap_default_ns1__executeCommandResponse(soap, p); + if (soap_begin_recv(soap) || soap_get_ns1__executeCommandResponse(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} +#endif #ifndef WITH_NOGLOBAL -#ifndef SOAP_TYPE_PointerToSOAP_ENV__Reason -#define SOAP_TYPE_PointerToSOAP_ENV__Reason (20) -#endif +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Reason_DEFINED +#define SOAP_TYPE_PointerToSOAP_ENV__Reason_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *const*); SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Reason(struct soap*, const char *, int, struct SOAP_ENV__Reason *const*, const char *); SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reason(struct soap*, const char*, struct SOAP_ENV__Reason **, const char*); SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *const*, const char*, const char*); - -#ifndef soap_write_PointerToSOAP_ENV__Reason -#define soap_write_PointerToSOAP_ENV__Reason(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_PointerToSOAP_ENV__Reason(soap, data),0) || soap_put_PointerToSOAP_ENV__Reason(soap, data, "SOAP-ENV:Reason", NULL) || soap_end_send(soap), (soap)->error ) -#endif - SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason **, const char*, const char*); - -#ifndef soap_read_PointerToSOAP_ENV__Reason -#define soap_read_PointerToSOAP_ENV__Reason(soap, data) ( soap_begin_recv(soap) || !soap_get_PointerToSOAP_ENV__Reason(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) #endif - #endif #ifndef WITH_NOGLOBAL -#ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail -#define SOAP_TYPE_PointerToSOAP_ENV__Detail (19) -#endif +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail_DEFINED +#define SOAP_TYPE_PointerToSOAP_ENV__Detail_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*); SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap*, const char *, int, struct SOAP_ENV__Detail *const*, const char *); SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail **, const char*); SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*, const char*, const char*); - -#ifndef soap_write_PointerToSOAP_ENV__Detail -#define soap_write_PointerToSOAP_ENV__Detail(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_PointerToSOAP_ENV__Detail(soap, data),0) || soap_put_PointerToSOAP_ENV__Detail(soap, data, "SOAP-ENV:Detail", NULL) || soap_end_send(soap), (soap)->error ) -#endif - SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail **, const char*, const char*); - -#ifndef soap_read_PointerToSOAP_ENV__Detail -#define soap_read_PointerToSOAP_ENV__Detail(soap, data) ( soap_begin_recv(soap) || !soap_get_PointerToSOAP_ENV__Detail(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) #endif - #endif #ifndef WITH_NOGLOBAL -#ifndef SOAP_TYPE_PointerToSOAP_ENV__Code -#define SOAP_TYPE_PointerToSOAP_ENV__Code (13) -#endif +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Code_DEFINED +#define SOAP_TYPE_PointerToSOAP_ENV__Code_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*); SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap*, const char *, int, struct SOAP_ENV__Code *const*, const char *); SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code **, const char*); SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*, const char*, const char*); - -#ifndef soap_write_PointerToSOAP_ENV__Code -#define soap_write_PointerToSOAP_ENV__Code(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_PointerToSOAP_ENV__Code(soap, data),0) || soap_put_PointerToSOAP_ENV__Code(soap, data, "SOAP-ENV:Code", NULL) || soap_end_send(soap), (soap)->error ) -#endif - SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code **, const char*, const char*); - -#ifndef soap_read_PointerToSOAP_ENV__Code -#define soap_read_PointerToSOAP_ENV__Code(soap, data) ( soap_begin_recv(soap) || !soap_get_PointerToSOAP_ENV__Code(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) #endif - #endif -#ifndef SOAP_TYPE_PointerTostring -#define SOAP_TYPE_PointerTostring (7) -#endif +#ifndef SOAP_TYPE_PointerTostring_DEFINED +#define SOAP_TYPE_PointerTostring_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerTostring(struct soap*, char **const*); SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerTostring(struct soap*, const char *, int, char **const*, const char *); SOAP_FMAC3 char *** SOAP_FMAC4 soap_in_PointerTostring(struct soap*, const char*, char ***, const char*); SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerTostring(struct soap*, char **const*, const char*, const char*); - -#ifndef soap_write_PointerTostring -#define soap_write_PointerTostring(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_PointerTostring(soap, data),0) || soap_put_PointerTostring(soap, data, "byte", NULL) || soap_end_send(soap), (soap)->error ) -#endif - SOAP_FMAC3 char *** SOAP_FMAC4 soap_get_PointerTostring(struct soap*, char ***, const char*, const char*); - -#ifndef soap_read_PointerTostring -#define soap_read_PointerTostring(soap, data) ( soap_begin_recv(soap) || !soap_get_PointerTostring(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) #endif - -#ifndef SOAP_TYPE__QName -#define SOAP_TYPE__QName (5) +#ifndef SOAP_TYPE__XML_DEFINED +#define SOAP_TYPE__XML_DEFINED #endif -#define soap_default__QName(soap, a) soap_default_string(soap, a) - +#ifndef SOAP_TYPE__QName_DEFINED +#define SOAP_TYPE__QName_DEFINED +SOAP_FMAC3 void SOAP_FMAC4 soap_default__QName(struct soap*, char **); SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap*, char *const*); + +#define soap__QName2s(soap, a) soap_QName2s(soap, (a)) SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap*, const char*, int, char*const*, const char*); + +#define soap_s2_QName(soap, s, a) soap_s2QName((soap), (s), (char**)(a), 0, -1, NULL) SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap*, const char*, char **, const char*); SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap*, char *const*, const char*, const char*); -#ifndef soap_write__QName -#define soap_write__QName(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize__QName(soap, data),0) || soap_put__QName(soap, data, "byte", NULL) || soap_end_send(soap), (soap)->error ) -#endif - +inline int soap_write__QName(struct soap *soap, char *const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || soap_put__QName(soap, p, "QName", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap*, char **, const char*, const char*); -#ifndef soap_read__QName -#define soap_read__QName(soap, data) ( soap_begin_recv(soap) || !soap_get__QName(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) +inline int soap_read__QName(struct soap *soap, char **p) +{ + if (p) + { if (soap_begin_recv(soap) || soap_get__QName(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} #endif - -#ifndef SOAP_TYPE_string -#define SOAP_TYPE_string (4) -#endif +#ifndef SOAP_TYPE_string_DEFINED +#define SOAP_TYPE_string_DEFINED SOAP_FMAC3 void SOAP_FMAC4 soap_default_string(struct soap*, char **); SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap*, char *const*); + +#define soap_string2s(soap, a) (a) SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap*, const char*, int, char*const*, const char*); + +#define soap_s2string(soap, s, a) soap_s2char((soap), (s), (char**)(a), 0, -1, NULL) SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap*, const char*, char **, const char*); SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap*, char *const*, const char*, const char*); -#ifndef soap_write_string -#define soap_write_string(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_string(soap, data),0) || soap_put_string(soap, data, "byte", NULL) || soap_end_send(soap), (soap)->error ) -#endif - +inline int soap_write_string(struct soap *soap, char *const*p) +{ + soap_free_temp(soap); + if (p) + { if (soap_begin_send(soap) || soap_put_string(soap, p, "string", "") || soap_end_send(soap)) + return soap->error; + } + return SOAP_OK; +} SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap*, char **, const char*, const char*); -#ifndef soap_read_string -#define soap_read_string(soap, data) ( soap_begin_recv(soap) || !soap_get_string(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error ) +inline int soap_read_string(struct soap *soap, char **p) +{ + if (p) + { if (soap_begin_recv(soap) || soap_get_string(soap, p, NULL, NULL) == NULL || soap_end_recv(soap)) + return soap->error; + } + return SOAP_OK; +} #endif - #endif /* End of soapH.h */ diff --git a/dep/gsoap/soapServer.cpp b/dep/gsoap/soapServer.cpp index 6e5c8040165..f8fa4797180 100644 --- a/dep/gsoap/soapServer.cpp +++ b/dep/gsoap/soapServer.cpp @@ -1,11 +1,14 @@ /* soapServer.cpp - Generated by gSOAP 2.8.17r from gsoap.stub + Generated by gSOAP 2.8.33 for gsoap.stub -Copyright(C) 2000-2013, Robert van Engelen, Genivia Inc. All Rights Reserved. -The generated code is released under one of the following licenses: -GPL or Genivia's license for commercial use. +gSOAP XML Web services tools +Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc. All Rights Reserved. +The soapcpp2 tool and its generated software are released under the GPL. This program is released under the GPL with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial use license is available from Genivia Inc., contact@genivia.com +-------------------------------------------------------------------------------- */ #if defined(__BORLANDC__) @@ -14,9 +17,7 @@ compiling, linking, and/or using OpenSSL is allowed. #endif #include "soapH.h" -SOAP_SOURCE_STAMP("@(#) soapServer.cpp ver 2.8.17r 2014-06-21 21:43:17 GMT") - - +SOAP_SOURCE_STAMP("@(#) soapServer.cpp ver 2.8.33 2016-07-29 05:51:35 GMT") extern "C" SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap) { #ifndef WITH_FASTCGI @@ -88,7 +89,7 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns1__executeCommand(struct soap *soap) { if (soap_envelope_begin_out(soap) || soap_putheader(soap) || soap_body_begin_out(soap) - || soap_put_ns1__executeCommandResponse(soap, &soap_tmp_ns1__executeCommandResponse, "ns1:executeCommandResponse", NULL) + || soap_put_ns1__executeCommandResponse(soap, &soap_tmp_ns1__executeCommandResponse, "ns1:executeCommandResponse", "") || soap_body_end_out(soap) || soap_envelope_end_out(soap)) return soap->error; @@ -98,7 +99,7 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns1__executeCommand(struct soap *soap) || soap_envelope_begin_out(soap) || soap_putheader(soap) || soap_body_begin_out(soap) - || soap_put_ns1__executeCommandResponse(soap, &soap_tmp_ns1__executeCommandResponse, "ns1:executeCommandResponse", NULL) + || soap_put_ns1__executeCommandResponse(soap, &soap_tmp_ns1__executeCommandResponse, "ns1:executeCommandResponse", "") || soap_body_end_out(soap) || soap_envelope_end_out(soap) || soap_end_send(soap)) diff --git a/dep/gsoap/soapStub.h b/dep/gsoap/soapStub.h index 38374561cde..ce1a2546ef6 100644 --- a/dep/gsoap/soapStub.h +++ b/dep/gsoap/soapStub.h @@ -1,30 +1,27 @@ /* soapStub.h - Generated by gSOAP 2.8.17r from gsoap.stub + Generated by gSOAP 2.8.33 for gsoap.stub -Copyright(C) 2000-2013, Robert van Engelen, Genivia Inc. All Rights Reserved. -The generated code is released under one of the following licenses: -GPL or Genivia's license for commercial use. +gSOAP XML Web services tools +Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc. All Rights Reserved. +The soapcpp2 tool and its generated software are released under the GPL. This program is released under the GPL with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. +-------------------------------------------------------------------------------- +A commercial use license is available from Genivia Inc., contact@genivia.com +-------------------------------------------------------------------------------- */ + #ifndef soapStub_H #define soapStub_H #include "stdsoap2.h" -#if GSOAP_VERSION != 20817 -# error "GSOAP VERSION MISMATCH IN GENERATED CODE: PLEASE REINSTALL PACKAGE" +#if GSOAP_VERSION != 20833 +# error "GSOAP VERSION 20833 MISMATCH IN GENERATED CODE VERSUS LIBRARY CODE: PLEASE REINSTALL PACKAGE" #endif /******************************************************************************\ * * - * Enumerations * - * * -\******************************************************************************/ - - -/******************************************************************************\ - * * * Types with Custom Serializers * * * \******************************************************************************/ @@ -32,130 +29,197 @@ compiling, linking, and/or using OpenSSL is allowed. /******************************************************************************\ * * - * Classes and Structs * + * Classes, Structs and Unions * * * \******************************************************************************/ +struct ns1__executeCommandResponse; /* gsoap.stub:1 */ +struct ns1__executeCommand; /* gsoap.stub:1 */ -#if 0 /* volatile type: do not declare here, declared elsewhere */ - -#endif - +/* gsoap.stub:1 */ #ifndef SOAP_TYPE_ns1__executeCommandResponse #define SOAP_TYPE_ns1__executeCommandResponse (9) -/* ns1:executeCommandResponse */ -struct ns1__executeCommandResponse -{ -public: - char **result; /* SOAP 1.2 RPC return element (when namespace qualified) */ /* optional element of type xsd:string */ -public: - int soap_type() const { return 9; } /* = unique type id SOAP_TYPE_ns1__executeCommandResponse */ +/* complex XSD type 'ns1:executeCommandResponse': */ +struct ns1__executeCommandResponse { + public: + /** Optional element 'result' of XSD type 'xsd:string' */ + char **result; + public: + /** Return unique type id SOAP_TYPE_ns1__executeCommandResponse */ + int soap_type() const { return SOAP_TYPE_ns1__executeCommandResponse; } + /** Constructor with member initializations */ + ns1__executeCommandResponse() + { + result = (char **)0; + } + /** Friend allocator used by soap_new_ns1__executeCommandResponse(struct soap*, int) */ + friend SOAP_FMAC1 ns1__executeCommandResponse * SOAP_FMAC2 soap_instantiate_ns1__executeCommandResponse(struct soap*, int, const char*, const char*, size_t*); }; #endif +/* gsoap.stub:1 */ #ifndef SOAP_TYPE_ns1__executeCommand #define SOAP_TYPE_ns1__executeCommand (10) -/* ns1:executeCommand */ -struct ns1__executeCommand -{ -public: - char *command; /* optional element of type xsd:string */ -public: - int soap_type() const { return 10; } /* = unique type id SOAP_TYPE_ns1__executeCommand */ +/* complex XSD type 'ns1:executeCommand': */ +struct ns1__executeCommand { + public: + /** Optional element 'command' of XSD type 'xsd:string' */ + char *command; + public: + /** Return unique type id SOAP_TYPE_ns1__executeCommand */ + int soap_type() const { return SOAP_TYPE_ns1__executeCommand; } + /** Constructor with member initializations */ + ns1__executeCommand() + { + command = (char *)0; + } + /** Friend allocator used by soap_new_ns1__executeCommand(struct soap*, int) */ + friend SOAP_FMAC1 ns1__executeCommand * SOAP_FMAC2 soap_instantiate_ns1__executeCommand(struct soap*, int, const char*, const char*, size_t*); }; #endif +/* gsoap.stub:2 */ #ifndef WITH_NOGLOBAL - #ifndef SOAP_TYPE_SOAP_ENV__Header #define SOAP_TYPE_SOAP_ENV__Header (11) -/* SOAP Header: */ -struct SOAP_ENV__Header -{ -public: - int soap_type() const { return 11; } /* = unique type id SOAP_TYPE_SOAP_ENV__Header */ -#ifdef WITH_NOEMPTYSTRUCT -private: - char dummy; /* dummy member to enable compilation */ -#endif +/* SOAP_ENV__Header: */ +struct SOAP_ENV__Header { + public: + /** Return unique type id SOAP_TYPE_SOAP_ENV__Header */ + int soap_type() const { return SOAP_TYPE_SOAP_ENV__Header; } + /** Constructor with member initializations */ + SOAP_ENV__Header() + { + } + /** Friend allocator used by soap_new_SOAP_ENV__Header(struct soap*, int) */ + friend SOAP_FMAC1 SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap*, int, const char*, const char*, size_t*); }; #endif - #endif +/* gsoap.stub:2 */ #ifndef WITH_NOGLOBAL - #ifndef SOAP_TYPE_SOAP_ENV__Code #define SOAP_TYPE_SOAP_ENV__Code (12) -/* SOAP Fault Code: */ -struct SOAP_ENV__Code -{ -public: - char *SOAP_ENV__Value; /* optional element of type xsd:QName */ - struct SOAP_ENV__Code *SOAP_ENV__Subcode; /* optional element of type SOAP-ENV:Code */ -public: - int soap_type() const { return 12; } /* = unique type id SOAP_TYPE_SOAP_ENV__Code */ +/* Type SOAP_ENV__Code is a recursive data type, (in)directly referencing itself through its (base or derived class) members */ +/* SOAP_ENV__Code: */ +struct SOAP_ENV__Code { + public: + /** Optional element 'SOAP-ENV:Value' of XSD type 'xsd:QName' */ + char *SOAP_ENV__Value; + /** Optional element 'SOAP-ENV:Subcode' of XSD type 'SOAP-ENV:Code' */ + struct SOAP_ENV__Code *SOAP_ENV__Subcode; + public: + /** Return unique type id SOAP_TYPE_SOAP_ENV__Code */ + int soap_type() const { return SOAP_TYPE_SOAP_ENV__Code; } + /** Constructor with member initializations */ + SOAP_ENV__Code() + { + SOAP_ENV__Value = (char *)0; + SOAP_ENV__Subcode = (struct SOAP_ENV__Code *)0; + } + /** Friend allocator used by soap_new_SOAP_ENV__Code(struct soap*, int) */ + friend SOAP_FMAC1 SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap*, int, const char*, const char*, size_t*); }; #endif - #endif +/* gsoap.stub:2 */ #ifndef WITH_NOGLOBAL - #ifndef SOAP_TYPE_SOAP_ENV__Detail #define SOAP_TYPE_SOAP_ENV__Detail (14) -/* SOAP-ENV:Detail */ -struct SOAP_ENV__Detail -{ -public: - char *__any; - int __type; /* any type of element <fault> (defined below) */ - void *fault; /* transient */ -public: - int soap_type() const { return 14; } /* = unique type id SOAP_TYPE_SOAP_ENV__Detail */ +/* SOAP_ENV__Detail: */ +struct SOAP_ENV__Detail { + public: + char *__any; + /** Any type of element 'fault' assigned to fault with its SOAP_TYPE_T assigned to __type */ + /** Do not create a cyclic data structure throught this member unless SOAP encoding or SOAP_XML_GRAPH are used for id-ref serialization */ + int __type; + void *fault; + public: + /** Return unique type id SOAP_TYPE_SOAP_ENV__Detail */ + int soap_type() const { return SOAP_TYPE_SOAP_ENV__Detail; } + /** Constructor with member initializations */ + SOAP_ENV__Detail() + { + __any = (char *)0; + __type = 0; + fault = NULL; + } + /** Friend allocator used by soap_new_SOAP_ENV__Detail(struct soap*, int) */ + friend SOAP_FMAC1 SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap*, int, const char*, const char*, size_t*); }; #endif - #endif +/* gsoap.stub:2 */ #ifndef WITH_NOGLOBAL - #ifndef SOAP_TYPE_SOAP_ENV__Reason #define SOAP_TYPE_SOAP_ENV__Reason (17) -/* SOAP-ENV:Reason */ -struct SOAP_ENV__Reason -{ -public: - char *SOAP_ENV__Text; /* optional element of type xsd:string */ -public: - int soap_type() const { return 17; } /* = unique type id SOAP_TYPE_SOAP_ENV__Reason */ +/* SOAP_ENV__Reason: */ +struct SOAP_ENV__Reason { + public: + /** Optional element 'SOAP-ENV:Text' of XSD type 'xsd:string' */ + char *SOAP_ENV__Text; + public: + /** Return unique type id SOAP_TYPE_SOAP_ENV__Reason */ + int soap_type() const { return SOAP_TYPE_SOAP_ENV__Reason; } + /** Constructor with member initializations */ + SOAP_ENV__Reason() + { + SOAP_ENV__Text = (char *)0; + } + /** Friend allocator used by soap_new_SOAP_ENV__Reason(struct soap*, int) */ + friend SOAP_FMAC1 SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap*, int, const char*, const char*, size_t*); }; #endif - #endif +/* gsoap.stub:2 */ #ifndef WITH_NOGLOBAL - #ifndef SOAP_TYPE_SOAP_ENV__Fault #define SOAP_TYPE_SOAP_ENV__Fault (18) -/* SOAP Fault: */ -struct SOAP_ENV__Fault -{ -public: - char *faultcode; /* optional element of type xsd:QName */ - char *faultstring; /* optional element of type xsd:string */ - char *faultactor; /* optional element of type xsd:string */ - struct SOAP_ENV__Detail *detail; /* optional element of type SOAP-ENV:Detail */ - struct SOAP_ENV__Code *SOAP_ENV__Code; /* optional element of type SOAP-ENV:Code */ - struct SOAP_ENV__Reason *SOAP_ENV__Reason; /* optional element of type SOAP-ENV:Reason */ - char *SOAP_ENV__Node; /* optional element of type xsd:string */ - char *SOAP_ENV__Role; /* optional element of type xsd:string */ - struct SOAP_ENV__Detail *SOAP_ENV__Detail; /* optional element of type SOAP-ENV:Detail */ -public: - int soap_type() const { return 18; } /* = unique type id SOAP_TYPE_SOAP_ENV__Fault */ +/* SOAP_ENV__Fault: */ +struct SOAP_ENV__Fault { + public: + /** Optional element 'faultcode' of XSD type 'xsd:QName' */ + char *faultcode; + /** Optional element 'faultstring' of XSD type 'xsd:string' */ + char *faultstring; + /** Optional element 'faultactor' of XSD type 'xsd:string' */ + char *faultactor; + /** Optional element 'detail' of XSD type 'SOAP-ENV:Detail' */ + struct SOAP_ENV__Detail *detail; + /** Optional element 'SOAP-ENV:Code' of XSD type 'SOAP-ENV:Code' */ + struct SOAP_ENV__Code *SOAP_ENV__Code; + /** Optional element 'SOAP-ENV:Reason' of XSD type 'SOAP-ENV:Reason' */ + struct SOAP_ENV__Reason *SOAP_ENV__Reason; + /** Optional element 'SOAP-ENV:Node' of XSD type 'xsd:string' */ + char *SOAP_ENV__Node; + /** Optional element 'SOAP-ENV:Role' of XSD type 'xsd:string' */ + char *SOAP_ENV__Role; + /** Optional element 'SOAP-ENV:Detail' of XSD type 'SOAP-ENV:Detail' */ + struct SOAP_ENV__Detail *SOAP_ENV__Detail; + public: + /** Return unique type id SOAP_TYPE_SOAP_ENV__Fault */ + int soap_type() const { return SOAP_TYPE_SOAP_ENV__Fault; } + /** Constructor with member initializations */ + SOAP_ENV__Fault() + { + faultcode = (char *)0; + faultstring = (char *)0; + faultactor = (char *)0; + detail = (struct SOAP_ENV__Detail *)0; + SOAP_ENV__Code = (struct SOAP_ENV__Code *)0; + SOAP_ENV__Reason = (struct SOAP_ENV__Reason *)0; + SOAP_ENV__Node = (char *)0; + SOAP_ENV__Role = (char *)0; + SOAP_ENV__Detail = (struct SOAP_ENV__Detail *)0; + } + /** Friend allocator used by soap_new_SOAP_ENV__Fault(struct soap*, int) */ + friend SOAP_FMAC1 SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap*, int, const char*, const char*, size_t*); }; #endif - #endif /******************************************************************************\ @@ -164,16 +228,105 @@ public: * * \******************************************************************************/ + +/* gsoap.stub:1 */ #ifndef SOAP_TYPE__QName #define SOAP_TYPE__QName (5) typedef char *_QName; #endif +/* gsoap.stub:1 */ #ifndef SOAP_TYPE__XML #define SOAP_TYPE__XML (6) typedef char *_XML; #endif +/******************************************************************************\ + * * + * Serializable Types * + * * +\******************************************************************************/ + + +/* char has binding name 'byte' for type 'xsd:byte' */ +#ifndef SOAP_TYPE_byte +#define SOAP_TYPE_byte (3) +#endif + +/* int has binding name 'int' for type 'xsd:int' */ +#ifndef SOAP_TYPE_int +#define SOAP_TYPE_int (1) +#endif + +/* struct SOAP_ENV__Fault has binding name 'SOAP_ENV__Fault' for type '' */ +#ifndef SOAP_TYPE_SOAP_ENV__Fault +#define SOAP_TYPE_SOAP_ENV__Fault (18) +#endif + +/* struct SOAP_ENV__Reason has binding name 'SOAP_ENV__Reason' for type '' */ +#ifndef SOAP_TYPE_SOAP_ENV__Reason +#define SOAP_TYPE_SOAP_ENV__Reason (17) +#endif + +/* struct SOAP_ENV__Detail has binding name 'SOAP_ENV__Detail' for type '' */ +#ifndef SOAP_TYPE_SOAP_ENV__Detail +#define SOAP_TYPE_SOAP_ENV__Detail (14) +#endif + +/* struct SOAP_ENV__Code has binding name 'SOAP_ENV__Code' for type '' */ +#ifndef SOAP_TYPE_SOAP_ENV__Code +#define SOAP_TYPE_SOAP_ENV__Code (12) +#endif + +/* struct SOAP_ENV__Header has binding name 'SOAP_ENV__Header' for type '' */ +#ifndef SOAP_TYPE_SOAP_ENV__Header +#define SOAP_TYPE_SOAP_ENV__Header (11) +#endif + +/* struct ns1__executeCommand has binding name 'ns1__executeCommand' for type 'ns1:executeCommand' */ +#ifndef SOAP_TYPE_ns1__executeCommand +#define SOAP_TYPE_ns1__executeCommand (10) +#endif + +/* struct ns1__executeCommandResponse has binding name 'ns1__executeCommandResponse' for type 'ns1:executeCommandResponse' */ +#ifndef SOAP_TYPE_ns1__executeCommandResponse +#define SOAP_TYPE_ns1__executeCommandResponse (9) +#endif + +/* struct SOAP_ENV__Reason * has binding name 'PointerToSOAP_ENV__Reason' for type '' */ +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Reason +#define SOAP_TYPE_PointerToSOAP_ENV__Reason (20) +#endif + +/* struct SOAP_ENV__Detail * has binding name 'PointerToSOAP_ENV__Detail' for type '' */ +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail +#define SOAP_TYPE_PointerToSOAP_ENV__Detail (19) +#endif + +/* struct SOAP_ENV__Code * has binding name 'PointerToSOAP_ENV__Code' for type '' */ +#ifndef SOAP_TYPE_PointerToSOAP_ENV__Code +#define SOAP_TYPE_PointerToSOAP_ENV__Code (13) +#endif + +/* char ** has binding name 'PointerTostring' for type 'xsd:string' */ +#ifndef SOAP_TYPE_PointerTostring +#define SOAP_TYPE_PointerTostring (7) +#endif + +/* _XML has binding name '_XML' for type '' */ +#ifndef SOAP_TYPE__XML +#define SOAP_TYPE__XML (6) +#endif + +/* _QName has binding name '_QName' for type 'xsd:QName' */ +#ifndef SOAP_TYPE__QName +#define SOAP_TYPE__QName (5) +#endif + +/* char * has binding name 'string' for type 'xsd:string' */ +#ifndef SOAP_TYPE_string +#define SOAP_TYPE_string (4) +#endif /******************************************************************************\ * * @@ -188,8 +341,8 @@ typedef char *_XML; * * \******************************************************************************/ - -SOAP_FMAC5 int SOAP_FMAC6 ns1__executeCommand(struct soap*, char *command, char **result); + /** Web service operation 'ns1__executeCommand' (returns SOAP_OK or error code) */ + SOAP_FMAC5 int SOAP_FMAC6 ns1__executeCommand(struct soap*, char *command, char **result); /******************************************************************************\ * * diff --git a/dep/gsoap/stdsoap2.cpp b/dep/gsoap/stdsoap2.cpp index 6186f8904e3..bec1d4b02a5 100644 --- a/dep/gsoap/stdsoap2.cpp +++ b/dep/gsoap/stdsoap2.cpp @@ -1,10 +1,10 @@ /* - stdsoap2.c[pp] 2.8.17r + stdsoap2.c[pp] 2.8.33 - gSOAP runtime engine + gSOAP runtime engine gSOAP XML Web services tools -Copyright (C) 2000-2013, Robert van Engelen, Genivia Inc., All Rights Reserved. +Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc., All Rights Reserved. This part of the software is released under ONE of the following licenses: GPL, or the gSOAP public license, or Genivia's license for commercial use. -------------------------------------------------------------------------------- @@ -24,7 +24,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2013, Robert van Engelen, Genivia Inc., All Rights Reserved. +Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc., All Rights Reserved. -------------------------------------------------------------------------------- GPL license. @@ -51,43 +51,52 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com -------------------------------------------------------------------------------- */ -#define GSOAP_LIB_VERSION 20817 +#define GSOAP_LIB_VERSION 20833 #ifdef AS400 -# pragma convert(819) /* EBCDIC to ASCII */ +# pragma convert(819) /* EBCDIC to ASCII */ #endif #include "stdsoap2.h" -#if defined(VXWORKS) && defined(WM_SECURE_KEY_STORAGE) -#include <ipcom_key_db.h> -#endif + #if GSOAP_VERSION != GSOAP_LIB_VERSION # error "GSOAP VERSION MISMATCH IN LIBRARY: PLEASE REINSTALL PACKAGE" #endif +#if defined(VXWORKS) && defined(WM_SECURE_KEY_STORAGE) +# include <ipcom_key_db.h> +#endif + #ifdef __BORLANDC__ # pragma warn -8060 #else # ifdef WIN32 # ifdef UNDER_CE -# pragma comment(lib, "ws2.lib") /* WinCE */ +# pragma comment(lib, "ws2.lib") /* WinCE */ # else -# pragma comment(lib, "ws2_32.lib") +# pragma comment(lib, "Ws2_32.lib") # endif # pragma warning(disable : 4996) /* disable deprecation warnings */ # endif #endif #ifdef __cplusplus -SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.8.17r 2013-12-18 00:00:00 GMT") +SOAP_SOURCE_STAMP("@(#) stdsoap2.cpp ver 2.8.33 2016-06-14 00:00:00 GMT") extern "C" { #else -SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.8.17r 2013-12-18 00:00:00 GMT") +SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.8.32 2016-06-14 00:00:00 GMT") #endif -/* 8bit character representing unknown/nonrepresentable character data (e.g. not supported by current locale with multibyte support enabled) */ +/* 8bit character representing unknown character entity or multibyte data */ #ifndef SOAP_UNKNOWN_CHAR -#define SOAP_UNKNOWN_CHAR (127) +# define SOAP_UNKNOWN_CHAR (0x7F) +#endif + +/* unicode character representing unknown characters outside the XML 1.0 UTF8 unicode space */ +#ifdef WITH_REPLACE_ILLEGAL_UTF8 +# ifndef SOAP_UNKNOWN_UNICODE_CHAR +# define SOAP_UNKNOWN_UNICODE_CHAR (0xFFFD) +# endif #endif /* EOF=-1 */ @@ -97,13 +106,13 @@ SOAP_SOURCE_STAMP("@(#) stdsoap2.c ver 2.8.17r 2013-12-18 00:00:00 GMT") #define SOAP_QT (soap_wchar)(-5) /* XML-specific '"' */ #define SOAP_AP (soap_wchar)(-6) /* XML-specific ''' */ -#define soap_blank(c) ((c)+1 > 0 && (c) <= 32) -#define soap_notblank(c) ((c) > 32) +#define soap_blank(c) ((c)+1 > 0 && (c) <= 32) +#define soap_notblank(c) ((c) > 32) #if defined(WIN32) && !defined(UNDER_CE) -#define soap_hash_ptr(p) ((PtrToUlong(p) >> 3) & (SOAP_PTRHASH - 1)) +#define soap_hash_ptr(p) ((PtrToUlong(p) >> 3) & (SOAP_PTRHASH - 1)) #else -#define soap_hash_ptr(p) ((size_t)(((unsigned long)(p) >> 3) & (SOAP_PTRHASH-1))) +#define soap_hash_ptr(p) ((size_t)(((unsigned long)(p) >> 3) & (SOAP_PTRHASH-1))) #endif #if !defined(WITH_LEAN) || defined(SOAP_DEBUG) @@ -123,7 +132,7 @@ static void soap_track_unlink(struct soap*, const void*); #ifndef PALM_2 static int soap_set_error(struct soap*, const char*, const char*, const char*, const char*, int); static int soap_copy_fault(struct soap*, const char*, const char*, const char*, const char*); -static int soap_getattrval(struct soap*, char*, size_t, soap_wchar); +static int soap_getattrval(struct soap*, char*, size_t*, soap_wchar); #endif #ifndef PALM_1 @@ -139,18 +148,26 @@ static int soap_ntlm_handshake(struct soap *soap, int command, const char *endpo #endif #ifndef WITH_NOIDREF static int soap_has_copies(struct soap*, const char*, const char*); +static int soap_type_punned(struct soap*, const struct soap_ilist*); +static int soap_is_shaky(struct soap*, void*); static void soap_init_iht(struct soap*); static void soap_free_iht(struct soap*); +#endif static void soap_init_pht(struct soap*); static void soap_free_pht(struct soap*); #endif -#endif #ifndef WITH_LEAN static const char *soap_set_validation_fault(struct soap*, const char*, const char*); static int soap_isnumeric(struct soap*, const char*); static struct soap_nlist *soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized); static void soap_utilize_ns(struct soap *soap, const char *tag); +static const wchar_t* soap_wstring(struct soap *soap, const char *s, long minlen, long maxlen, const char *pattern); +#endif + +#ifndef PALM_2 +static const char* soap_string(struct soap *soap, const char *s, long minlen, long maxlen, const char *pattern); +static const char* soap_QName(struct soap *soap, const char *s, long minlen, long maxlen, const char *pattern); #endif #ifndef WITH_LEANER @@ -184,6 +201,7 @@ static int ssl_password(char*, int, int, void *); # define SOAP_SSL_RSA_BITS 2048 # endif static int soap_ssl_init_done = 0; +static int ssl_auth_init(struct soap*); static const char *ssl_verify(struct soap *soap, const char *host); # if defined(HAVE_PTHREAD_H) # include <pthread.h> @@ -196,6 +214,12 @@ static const char *ssl_verify(struct soap *soap, const char *host); # endif #endif +#ifdef WITH_SYSTEMSSL +static int ssl_auth_init(struct soap*); +static int ssl_recv(int sk, void *s, int n, char *user); +static int ssl_send(int sk, void *s, int n, char *user); +#endif + #if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) #ifndef PALM_1 static const char *soap_decode(char*, size_t, const char*, const char*); @@ -307,9 +331,9 @@ const char soap_base64i[81] = "\76XXX\77\64\65\66\67\70\71\72\73\74\75XXXXXXX\00 #endif #ifndef WITH_LEAN -static const char soap_indent[11] = "\n\t\t\t\t\t\t\t\t\t"; +static const char soap_indent[21] = "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; /* Alternative indentation form for SOAP_XML_INDENT: -static const char soap_indent[21] = "\n "; +static const char soap_indent[41] = "\n "; */ #endif @@ -511,14 +535,14 @@ static const struct soap_code_map h_ssl_error_codes[] = #ifndef WITH_LEANER static const struct soap_code_map mime_codes[] = -{ { SOAP_MIME_7BIT, "7bit" }, - { SOAP_MIME_8BIT, "8bit" }, - { SOAP_MIME_BINARY, "binary" }, +{ { SOAP_MIME_7BIT, "7bit" }, + { SOAP_MIME_8BIT, "8bit" }, + { SOAP_MIME_BINARY, "binary" }, { SOAP_MIME_QUOTED_PRINTABLE, "quoted-printable" }, - { SOAP_MIME_BASE64, "base64" }, - { SOAP_MIME_IETF_TOKEN, "ietf-token" }, - { SOAP_MIME_X_TOKEN, "x-token" }, - { 0, NULL } + { SOAP_MIME_BASE64, "base64" }, + { SOAP_MIME_IETF_TOKEN, "ietf-token" }, + { SOAP_MIME_X_TOKEN, "x-token" }, + { 0, NULL } }; #endif @@ -531,13 +555,14 @@ extern int h_errno; #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 static int fsend(struct soap *soap, const char *s, size_t n) -{ register int nwritten, err; +{ int nwritten, err; SOAP_SOCKET sk; -#if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT) +#if defined(__cplusplus) && !defined(WITH_COMPAT) if (soap->os) { soap->os->write(s, (std::streamsize)n); if (soap->os->good()) @@ -554,7 +579,7 @@ fsend(struct soap *soap, const char *s, size_t n) { if (soap->send_timeout) { for (;;) - { register int r; + { int r; #ifdef WITH_OPENSSL if (soap->ssl) r = tcp_select(soap, sk, SOAP_TCP_SELECT_ALL, soap->send_timeout); @@ -565,6 +590,11 @@ fsend(struct soap *soap, const char *s, size_t n) r = tcp_select(soap, sk, SOAP_TCP_SELECT_ALL, soap->send_timeout); else #endif +#ifdef WITH_SYSTEMSSL + if (soap->ssl) + r = tcp_select(soap, sk, SOAP_TCP_SELECT_ALL, soap->send_timeout); + else +#endif r = tcp_select(soap, sk, SOAP_TCP_SELECT_SND | SOAP_TCP_SELECT_ERR, soap->send_timeout); if (r > 0) break; @@ -589,10 +619,18 @@ fsend(struct soap *soap, const char *s, size_t n) nwritten = gnutls_record_send(soap->session, s, n); else #endif +#ifdef WITH_SYSTEMSSL + if (soap->ssl) + { err = gsk_secure_socket_write(soap->ssl, (char*)s, n, &nwritten); + if (err != GSK_OK) + nwritten = 0; + } + else +#endif #ifndef WITH_LEAN if ((soap->omode & SOAP_IO_UDP)) { if (soap->peerlen) - nwritten = sendto(sk, (char*)s, (SOAP_WINSOCKINT)n, soap->socket_flags, (struct sockaddr*)&soap->peer, (SOAP_WINSOCKINT)soap->peerlen); + nwritten = sendto(sk, (char*)s, (SOAP_WINSOCKINT)n, soap->socket_flags, &soap->peer.addr, (SOAP_WINSOCKINT)soap->peerlen); else nwritten = send(sk, s, (SOAP_WINSOCKINT)n, soap->socket_flags); /* retry and back-off algorithm */ @@ -608,14 +646,13 @@ fsend(struct soap *soap, const char *s, size_t n) do { tcp_select(soap, sk, SOAP_TCP_SELECT_ERR, -1000 * udp_delay); if (soap->peerlen) - nwritten = sendto(sk, (char*)s, (SOAP_WINSOCKINT)n, soap->socket_flags, (struct sockaddr*)&soap->peer, (SOAP_WINSOCKINT)soap->peerlen); + nwritten = sendto(sk, (char*)s, (SOAP_WINSOCKINT)n, soap->socket_flags, &soap->peer.addr, (SOAP_WINSOCKINT)soap->peerlen); else nwritten = send(sk, s, (SOAP_WINSOCKINT)n, soap->socket_flags); udp_delay <<= 1; if (udp_delay > 500) /* UDP_UPPER_DELAY */ udp_delay = 500; - } - while (nwritten < 0 && --udp_repeat > 0); + } while (nwritten < 0 && --udp_repeat > 0); } if (nwritten < 0) { err = soap_socket_errno(sk); @@ -635,7 +672,7 @@ fsend(struct soap *soap, const char *s, size_t n) #endif if (nwritten <= 0) { - register int r = 0; + int r = 0; err = soap_socket_errno(sk); #ifdef WITH_OPENSSL if (soap->ssl && (r = SSL_get_error(soap->ssl, nwritten)) != SSL_ERROR_NONE && r != SSL_ERROR_WANT_READ && r != SSL_ERROR_WANT_WRITE) @@ -723,6 +760,7 @@ fsend(struct soap *soap, const char *s, size_t n) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -731,25 +769,25 @@ soap_send_raw(struct soap *soap, const char *s, size_t n) { if (!n) return SOAP_OK; #ifndef WITH_LEANER - if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE && (soap->mode & SOAP_IO_LENGTH) && (soap->error = soap->fpreparesend(soap, s, n))) + if (soap->fpreparesend && (soap->mode & SOAP_IO) != SOAP_IO_STORE && (soap->mode & SOAP_IO_LENGTH) && (soap->error = soap->fpreparesend(soap, s, n)) != SOAP_OK) return soap->error; - if (soap->ffiltersend && (soap->error = soap->ffiltersend(soap, &s, &n))) + if (soap->ffiltersend && (soap->error = soap->ffiltersend(soap, &s, &n)) != SOAP_OK) return soap->error; #endif - if (soap->mode & SOAP_IO_LENGTH) + if ((soap->mode & SOAP_IO_LENGTH)) soap->count += n; else if (soap->mode & SOAP_IO) - { register size_t i = SOAP_BUFLEN - soap->bufidx; + { size_t i = sizeof(soap->buf) - soap->bufidx; while (n >= i) - { memcpy(soap->buf + soap->bufidx, s, i); - soap->bufidx = SOAP_BUFLEN; + { soap_memcpy((void*)(soap->buf + soap->bufidx), i, (const void*)s, i); + soap->bufidx = sizeof(soap->buf); if (soap_flush(soap)) return soap->error; s += i; n -= i; - i = SOAP_BUFLEN; + i = sizeof(soap->buf); } - memcpy(soap->buf + soap->bufidx, s, n); + soap_memcpy((void*)(soap->buf + soap->bufidx), sizeof(soap->buf) - soap->bufidx, (const void*)s, n); soap->bufidx += n; } else @@ -759,18 +797,19 @@ soap_send_raw(struct soap *soap, const char *s, size_t n) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap *soap) -{ register size_t n = soap->bufidx; +{ size_t n = soap->bufidx; if (n) { #ifndef WITH_LEANER if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { register int r; - if (soap->fpreparesend && (r = soap->fpreparesend(soap, soap->buf, n))) + { int r; + if (soap->fpreparesend && (r = soap->fpreparesend(soap, soap->buf, n)) != SOAP_OK) return soap->error = r; } #endif @@ -789,10 +828,10 @@ soap_flush(struct soap *soap) return soap->error = SOAP_ZLIB_ERROR; } if (!soap->d_stream->avail_out) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN)) + { if (soap_flush_raw(soap, soap->z_buf, sizeof(soap->buf))) return soap->error; soap->d_stream->next_out = (Byte*)soap->z_buf; - soap->d_stream->avail_out = SOAP_BUFLEN; + soap->d_stream->avail_out = sizeof(soap->buf); } } while (soap->d_stream->avail_in); } @@ -805,28 +844,27 @@ soap_flush(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap *soap, const char *s, size_t n) { if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { register char *t; - if (!(t = (char*)soap_push_block(soap, NULL, n))) + { void *t; + t = soap_push_block(soap, NULL, n); + if (!t) return soap->error = SOAP_EOM; - memcpy(t, s, n); + soap_memcpy(t, n, (const void*)s, n); return SOAP_OK; } #ifndef WITH_LEANER if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) - { char t[16]; -#ifdef HAVE_SNPRINTF - soap_snprintf(t, sizeof(t), &"\r\n%lX\r\n"[soap->chunksize ? 0 : 2], (unsigned long)n); -#else - sprintf(t, &"\r\n%lX\r\n"[soap->chunksize ? 0 : 2], (unsigned long)n); -#endif + { char t[24]; + (SOAP_SNPRINTF(t, sizeof(t), 20), &"\r\n%lX\r\n"[soap->chunksize ? 0 : 2], (unsigned long)n); DBGMSG(SENT, t, strlen(t)); - if ((soap->error = soap->fsend(soap, t, strlen(t)))) + soap->error = soap->fsend(soap, t, strlen(t)); + if (soap->error) return soap->error; soap->chunksize += n; } @@ -838,6 +876,7 @@ soap_flush_raw(struct soap *soap, const char *s, size_t n) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -850,6 +889,7 @@ soap_send(struct soap *soap, const char *s) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -864,6 +904,7 @@ soap_send2(struct soap *soap, const char *s1, const char *s2) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -879,20 +920,30 @@ soap_send3(struct soap *soap, const char *s1, const char *s2, const char *s3) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 static size_t frecv(struct soap *soap, char *s, size_t n) -{ register int r; - register int retries = 100; /* max 100 retries with non-blocking sockets */ +{ int r; + int retries = 100; /* max 100 retries with non-blocking sockets */ SOAP_SOCKET sk; soap->errnum = 0; -#if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT) - if (soap->is) +#if defined(__cplusplus) && !defined(WITH_COMPAT) + if (soap->is) /* recv from C++ stream */ { if (soap->is->good()) - return soap->is->read(s, (std::streamsize)n).gcount(); + return (size_t)soap->is->read(s, (std::streamsize)n).gcount(); return 0; } +#else + if (soap->is) /* recv from C buffer until NUL */ + { size_t l = strlen(soap->is); + if (l > n) + l = n; + soap_memcpy(s, n, soap->is, l); + soap->is += l; + return l; + } #endif sk = soap->recvsk; if (!soap_valid_socket(sk)) @@ -900,11 +951,11 @@ frecv(struct soap *soap, char *s, size_t n) if (soap_valid_socket(sk)) { for (;;) { -#ifdef WITH_OPENSSL - register int err = 0; +#if defined(WITH_OPENSSL) || defined(WITH_SYSTEMSSL) + int err = 0; #endif #ifdef WITH_OPENSSL - if (soap->recv_timeout && !soap->ssl) /* SSL: sockets are nonblocking */ + if (soap->recv_timeout && !soap->ssl) /* OpenSSL: sockets are nonblocking so go ahead to read */ #else if (soap->recv_timeout) #endif @@ -944,20 +995,30 @@ frecv(struct soap *soap, char *s, size_t n) } else #endif +#ifdef WITH_SYSTEMSSL + if (soap->ssl) + { err = gsk_secure_socket_read(soap->ssl, s, n, &r); + if (err == GSK_OK && r > 0) + return (size_t)r; + if (err != GSK_OK && err != GSK_WOULD_BLOCK && err != GSK_WOULD_BLOCK_WRITE) + return 0; + } + else +#endif { #ifndef WITH_LEAN if ((soap->omode & SOAP_IO_UDP)) { SOAP_SOCKLEN_T k = (SOAP_SOCKLEN_T)sizeof(soap->peer); memset((void*)&soap->peer, 0, sizeof(soap->peer)); - r = recvfrom(sk, s, (SOAP_WINSOCKINT)n, soap->socket_flags, (struct sockaddr*)&soap->peer, &k); /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ + r = recvfrom(sk, s, (SOAP_WINSOCKINT)n, soap->socket_flags, &soap->peer.addr, &k); /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ soap->peerlen = (size_t)k; #ifndef WITH_IPV6 - soap->ip = ntohl(soap->peer.sin_addr.s_addr); + soap->ip = ntohl(soap->peer.in.sin_addr.s_addr); #endif } else #endif - r = recv(sk, s, (int)n, soap->socket_flags); + r = recv(sk, s, (SOAP_WINSOCKINT)n, soap->socket_flags); #ifdef PALM /* CycleSyncDisplay(curStatusMsg); */ #endif @@ -977,6 +1038,10 @@ frecv(struct soap *soap, char *s, size_t n) if (soap->session && gnutls_record_get_direction(soap->session)) r = tcp_select(soap, sk, SOAP_TCP_SELECT_SND | SOAP_TCP_SELECT_ERR, soap->recv_timeout ? soap->recv_timeout : 5); else +#elif defined(WITH_SYSTEMSSL) + if (soap->ssl && err == GSK_WOULD_BLOCK_WRITE) + r = tcp_select(soap, sk, SOAP_TCP_SELECT_SND | SOAP_TCP_SELECT_ERR, soap->recv_timeout ? soap->recv_timeout : 5); + else #endif r = tcp_select(soap, sk, SOAP_TCP_SELECT_RCV | SOAP_TCP_SELECT_ERR, soap->recv_timeout ? soap->recv_timeout : 5); if (!r && soap->recv_timeout) @@ -1011,7 +1076,7 @@ frecv(struct soap *soap, char *s, size_t n) #ifdef WIN32 r = _read(soap->recvfd, s, (unsigned int)n); #else - r = read(soap->recvfd, s, (unsigned int)n); + r = read(soap->recvfd, s, n); #endif if (r >= 0) return (size_t)r; @@ -1024,6 +1089,7 @@ frecv(struct soap *soap, char *s, size_t n) #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 static soap_wchar @@ -1031,7 +1097,7 @@ soap_getchunkchar(struct soap *soap) { if (soap->bufidx < soap->buflen) return soap->buf[soap->bufidx++]; soap->bufidx = 0; - soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, SOAP_BUFLEN); + soap->buflen = soap->chunkbuflen = soap->frecv(soap, soap->buf, sizeof(soap->buf)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket=%d/fd=%d\n", (unsigned int)soap->buflen, soap->socket, soap->recvfd)); DBGMSG(RECV, soap->buf, soap->buflen); if (soap->buflen) @@ -1042,6 +1108,7 @@ soap_getchunkchar(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 static int soap_isxdigit(int c) @@ -1050,17 +1117,18 @@ soap_isxdigit(int c) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap *soap) -{ register size_t ret; +{ size_t ret; #if !defined(WITH_LEANER) || defined(WITH_ZLIB) - register int r; + int r; #endif #ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) + if ((soap->mode & SOAP_ENC_ZLIB) && soap->d_stream) { if (soap->d_stream->next_out == Z_NULL) { soap->bufidx = soap->buflen = 0; return EOF; @@ -1068,13 +1136,13 @@ soap_recv_raw(struct soap *soap) if (soap->d_stream->avail_in || !soap->d_stream->avail_out) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflating\n")); soap->d_stream->next_out = (Byte*)soap->buf; - soap->d_stream->avail_out = SOAP_BUFLEN; + soap->d_stream->avail_out = sizeof(soap->buf); r = inflate(soap->d_stream, Z_NO_FLUSH); if (r == Z_NEED_DICT && soap->z_dict) r = inflateSetDictionary(soap->d_stream, (const Bytef*)soap->z_dict, soap->z_dict_len); if (r == Z_OK || r == Z_STREAM_END) { soap->bufidx = 0; - ret = soap->buflen = SOAP_BUFLEN - soap->d_stream->avail_out; + ret = soap->buflen = sizeof(soap->buf) - soap->d_stream->avail_out; if (soap->zlib_in == SOAP_ZLIB_GZIP) soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)ret); if (r == Z_STREAM_END) @@ -1084,11 +1152,15 @@ soap_recv_raw(struct soap *soap) } if (ret) { soap->count += ret; + if (soap->count > SOAP_MAXINFLATESIZE && soap->z_ratio_in < SOAP_MINDEFLATERATIO) + { soap->d_stream->msg = (char*)"caught SOAP_MINDEFLATERATIO explosive decompression guard (remedy: increase SOAP_MAXINFLATESIZE and/or decrease SOAP_MINDEFLATERATIO)"; + return soap->error = SOAP_ZLIB_ERROR; + } DBGLOG(RECV, SOAP_MESSAGE(fdebug, "\n---- decompressed ----\n")); DBGMSG(RECV, soap->buf, ret); DBGLOG(RECV, SOAP_MESSAGE(fdebug, "\n----\n")); #ifndef WITH_LEANER - if (soap->fpreparerecv && (r = soap->fpreparerecv(soap, soap->buf, ret))) + if (soap->fpreparerecv && (r = soap->fpreparerecv(soap, soap->buf, ret)) != SOAP_OK) return soap->error = r; #endif return SOAP_OK; @@ -1102,7 +1174,7 @@ soap_recv_raw(struct soap *soap) } zlib_again: if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK && !soap->chunksize) - { memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); + { soap_memcpy((void*)soap->buf, sizeof(soap->buf), (const void*)soap->z_buf, sizeof(soap->buf)); soap->buflen = soap->z_buflen; } DBGLOG(RECV, SOAP_MESSAGE(fdebug, "\n---- compressed ----\n")); @@ -1111,10 +1183,10 @@ zlib_again: #ifndef WITH_NOHTTP if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) /* read HTTP chunked transfer */ { for (;;) - { register soap_wchar c; + { soap_wchar c; char *t, tmp[17]; if (soap->chunksize) - { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > SOAP_BUFLEN ? SOAP_BUFLEN : soap->chunksize); + { soap->buflen = ret = soap->frecv(soap, soap->buf, soap->chunksize > sizeof(soap->buf) ? sizeof(soap->buf) : soap->chunksize); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Getting chunk: read %u bytes\n", (unsigned int)ret)); DBGMSG(RECV, soap->buf, ret); soap->bufidx = 0; @@ -1123,7 +1195,7 @@ zlib_again: } t = tmp; if (!soap->chunkbuflen) - { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); + { soap->chunkbuflen = ret = soap->frecv(soap, soap->buf, sizeof(soap->buf)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes (chunked) from socket=%d\n", (unsigned int)ret, soap->socket)); DBGMSG(RECV, soap->buf, ret); soap->bufidx = 0; @@ -1157,8 +1229,6 @@ zlib_again: if (!soap->chunksize) { soap->bufidx = soap->buflen = soap->chunkbuflen = 0; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of chunked message\n")); - while ((int)c != EOF && c != '\n') - c = soap_getchunkchar(soap); ret = 0; soap->ahead = EOF; break; @@ -1181,24 +1251,24 @@ zlib_again: else #endif { soap->bufidx = 0; - soap->buflen = ret = soap->frecv(soap, soap->buf, SOAP_BUFLEN); + soap->buflen = ret = soap->frecv(soap, soap->buf, sizeof(soap->buf)); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read %u bytes from socket=%d/fd=%d\n", (unsigned int)ret, soap->socket, soap->recvfd)); DBGMSG(RECV, soap->buf, ret); } #ifdef WITH_ZLIB if (soap->mode & SOAP_ENC_ZLIB) - { memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); + { soap_memcpy((void*)soap->z_buf, sizeof(soap->buf), (const void*)soap->buf, sizeof(soap->buf)); soap->d_stream->next_in = (Byte*)(soap->z_buf + soap->bufidx); soap->d_stream->avail_in = (unsigned int)ret; soap->d_stream->next_out = (Byte*)soap->buf; - soap->d_stream->avail_out = SOAP_BUFLEN; + soap->d_stream->avail_out = sizeof(soap->buf); r = inflate(soap->d_stream, Z_NO_FLUSH); if (r == Z_NEED_DICT && soap->z_dict) r = inflateSetDictionary(soap->d_stream, (const Bytef*)soap->z_dict, soap->z_dict_len); if (r == Z_OK || r == Z_STREAM_END) { soap->bufidx = 0; soap->z_buflen = soap->buflen; - soap->buflen = SOAP_BUFLEN - soap->d_stream->avail_out; + soap->buflen = sizeof(soap->buf) - soap->d_stream->avail_out; if (soap->zlib_in == SOAP_ZLIB_GZIP) soap->z_crc = crc32(soap->z_crc, (Byte*)soap->buf, (unsigned int)soap->buflen); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflated %u bytes\n", (unsigned int)soap->buflen)); @@ -1210,10 +1280,14 @@ zlib_again: soap->z_ratio_in = (float)soap->d_stream->total_in / (float)soap->d_stream->total_out; soap->d_stream->next_out = Z_NULL; } + if (soap->count + ret > SOAP_MAXINFLATESIZE && soap->z_ratio_in < SOAP_MINDEFLATERATIO) + { soap->d_stream->msg = (char*)"caught SOAP_MINDEFLATERATIO explosive decompression guard (remedy: increase SOAP_MAXINFLATESIZE and/or decrease SOAP_MINDEFLATERATIO)"; + return soap->error = SOAP_ZLIB_ERROR; + } DBGLOG(RECV, SOAP_MESSAGE(fdebug, "\n---- decompressed ----\n")); DBGMSG(RECV, soap->buf, ret); #ifndef WITH_LEANER - if (soap->fpreparerecv && (r = soap->fpreparerecv(soap, soap->buf, ret))) + if (soap->fpreparerecv && (r = soap->fpreparerecv(soap, soap->buf, ret)) != SOAP_OK) return soap->error = r; #endif } @@ -1232,13 +1306,17 @@ zlib_again: && (r = soap->fpreparerecv(soap, soap->buf + soap->bufidx, ret))) return soap->error = r; #endif - soap->count += ret; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read count=%lu (+%lu)\n", (unsigned long)soap->count, (unsigned long)ret)); - return !ret; + if (ret) + { soap->count += ret; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Read count=%lu (+%lu)\n", (unsigned long)soap->count, (unsigned long)ret)); + return SOAP_OK; + } + return EOF; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -1307,35 +1385,42 @@ soap_recv(struct soap *soap) } } while (soap->ffilterrecv) - { int err, last = soap->filterstop; - if (last) + { int err; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Filter recverror = %d\n", soap->recverror)); + if (soap->recverror) soap->bufidx = soap->buflen = 0; - if ((err = soap->ffilterrecv(soap, soap->buf, &soap->buflen, sizeof(soap->buf)))) + else + { soap->recverror = soap_recv_raw(soap); /* do not call again after EOF */ + soap->buflen -= soap->bufidx; /* chunked may set bufidx > 0 to skip hex chunk length */ + } + err = soap->ffilterrecv(soap, soap->buf + soap->bufidx, &soap->buflen, sizeof(soap->buf) - soap->bufidx); + if (err) return soap->error = err; if (soap->buflen) - { soap->bufidx = 0; - soap->filterstop = last; + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Filtered %lu\n", (unsigned long)soap->buflen)); + soap->buflen += soap->bufidx; return SOAP_OK; } - if (last) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Returning postponed error %d\n", last)); - soap->filterstop = SOAP_OK; - return last; + if (soap->recverror) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Returning postponed EOF%d\n", soap->recverror)); + return soap->recverror; } - soap->filterstop = soap_recv_raw(soap); /* do not call again after EOF */ } -#endif + return soap->recverror = soap_recv_raw(soap); +#else return soap_recv_raw(soap); +#endif } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap *soap) -{ register soap_wchar c; +{ soap_wchar c; c = soap->ahead; if (c) { if (c != EOF) @@ -1347,6 +1432,7 @@ soap_getchar(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 const struct soap_code_map* @@ -1364,11 +1450,12 @@ soap_code(const struct soap_code_map *code_map, const char *str) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 -long +LONG64 SOAP_FMAC2 -soap_code_int(const struct soap_code_map *code_map, const char *str, long other) +soap_code_int(const struct soap_code_map *code_map, const char *str, LONG64 other) { if (code_map) { while (code_map->string) { if (!soap_tag_cmp(str, code_map->string)) /* case insensitive */ @@ -1381,6 +1468,7 @@ soap_code_int(const struct soap_code_map *code_map, const char *str, long other) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 const char* @@ -1395,17 +1483,18 @@ soap_code_str(const struct soap_code_map *code_map, long code) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 -long +LONG64 SOAP_FMAC2 soap_code_bits(const struct soap_code_map *code_map, const char *str) -{ register long bits = 0; +{ LONG64 bits = 0; if (code_map) { while (str && *str) { const struct soap_code_map *p; for (p = code_map; p->string; p++) - { register size_t n = strlen(p->string); + { size_t n = strlen(p->string); if (!strncmp(p->string, str, n) && soap_blank((soap_wchar)str[n])) { bits |= p->code; str += n; @@ -1423,16 +1512,17 @@ soap_code_bits(const struct soap_code_map *code_map, const char *str) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_list(struct soap *soap, const struct soap_code_map *code_map, long code) -{ register char *t = soap->tmpbuf; +{ char *t = soap->tmpbuf; if (code_map) { while (code_map->string) { if (code_map->code & code) - { register const char *s = code_map->string; + { const char *s = code_map->string; if (t != soap->tmpbuf) *t++ = ' '; while (*s && t < soap->tmpbuf + sizeof(soap->tmpbuf) - 1) @@ -1449,13 +1539,14 @@ soap_code_list(struct soap *soap, const struct soap_code_map *code_map, long cod #endif /******************************************************************************/ + #ifndef PALM_1 static soap_wchar soap_char(struct soap *soap) { char tmp[8]; - register int i; - register soap_wchar c; - register char *s = tmp; + int i; + soap_wchar c; + char *s = tmp; for (i = 0; i < 7; i++) { c = soap_get1(soap); if (c == ';' || (int)c == EOF) @@ -1479,7 +1570,7 @@ soap_char(struct soap *soap) if (!strcmp(tmp, "apos")) return '\''; #ifndef WITH_LEAN - return (soap_wchar)soap_code_int(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR); + return (soap_wchar)soap_code_int(html_entity_codes, tmp, (LONG64)SOAP_UNKNOWN_CHAR); #else return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */ #endif @@ -1487,6 +1578,7 @@ soap_char(struct soap *soap) #endif /******************************************************************************/ + #ifdef WITH_LEAN #ifndef PALM_1 soap_wchar @@ -1499,6 +1591,7 @@ soap_get0(struct soap *soap) #endif /******************************************************************************/ + #ifdef WITH_LEAN #ifndef PALM_1 soap_wchar @@ -1511,12 +1604,13 @@ soap_get1(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap *soap) -{ register soap_wchar c; +{ soap_wchar c; c = soap->ahead; if (c) { if ((int)c != EOF) @@ -1553,7 +1647,7 @@ soap_get(struct soap *soap) do c = soap_get1(soap); while (soap_blank(c)); if (c == '!' || c == '?' || c == '%') - { register int k = 1; + { int k = 1; if (c == '!') { c = soap_get1(soap); if (c == '[') @@ -1609,13 +1703,14 @@ soap_get(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 static soap_wchar soap_get_pi(struct soap *soap) { char buf[64]; - register char *s = buf; - register int i = sizeof(buf); - register soap_wchar c = soap_getchar(soap); + char *s = buf; + int i = sizeof(buf); + soap_wchar c = soap_getchar(soap); /* This is a quick way to parse XML PI and we could use a callback instead to * enable applications to intercept processing instructions */ while ((int)c != EOF && c != '?') @@ -1649,6 +1744,7 @@ soap_get_pi(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -1665,6 +1761,7 @@ soap_move(struct soap *soap, size_t n) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -1677,19 +1774,24 @@ soap_tell(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 -soap_pututf8(struct soap *soap, register unsigned long c) -{ char tmp[16]; - if (c < 0x80 && c > 0) +soap_pututf8(struct soap *soap, unsigned long c) +{ char tmp[24]; + if ((c < 0x7F && c > 0x1F)) { *tmp = (char)c; return soap_send_raw(soap, tmp, 1); } +#ifdef WITH_REPLACE_ILLEGAL_UTF8 + if (!(c == 0x09 || c == 0x0A || c == 0x0D || (c >= 0x80 && c <= 0xD7FF) || (c >= 0xE000 && c <= 0xFFFD) || (c >= 0x10000 && c <= 0x10FFFF))) + c = SOAP_UNKNOWN_UNICODE_CHAR; +#endif #ifndef WITH_LEAN - if (c >= 0x80) - { register char *t = tmp; + if (c > 0x9F) + { char *t = tmp; if (c < 0x0800) *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); else @@ -1716,22 +1818,19 @@ soap_pututf8(struct soap *soap, register unsigned long c) } else #endif -#ifdef HAVE_SNPRINTF - soap_snprintf(tmp, sizeof(tmp), "&#%lu;", c); -#else - sprintf(tmp, "&#%lu;", c); -#endif + (SOAP_SNPRINTF(tmp, sizeof(tmp), 20), "&#x%lX;", c); return soap_send(soap, tmp); } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap *soap) -{ register soap_wchar c, c1, c2, c3, c4; +{ soap_wchar c, c1, c2, c3, c4; c = soap->ahead; if (c >= 0x80) soap->ahead = 0; @@ -1761,22 +1860,39 @@ soap_getutf8(struct soap *soap) #endif /******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +size_t +SOAP_FMAC2 +soap_utf8len(const char *s) +{ size_t l = 0; + while (*s) + if ((*s++ & 0xC0) != 0x80) + l++; + return l; +} +#endif + +/******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap *soap, const unsigned char *s, int n) { char d[2]; - register int i; + int i; #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n))) + { soap->dom->text = soap_s2hex(soap, s, NULL, n); + if (!soap->dom->text) return soap->error; return SOAP_OK; } #endif for (i = 0; i < n; i++) - { register int m = *s++; + { int m = *s++; d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0')); m &= 0x0F; d[1] = (char)(m + (m > 9 ? '7' : '0')); @@ -1788,31 +1904,32 @@ soap_puthex(struct soap *soap, const unsigned char *s, int n) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap *soap, int *n) -{ +{ long l = 0; #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_string_in(soap, 0, -1, -1); - return (unsigned char*)soap_hex2s(soap, soap->dom->data, NULL, 0, n); + { soap->dom->text = soap_string_in(soap, 0, -1, -1, NULL); + return (unsigned char*)soap_hex2s(soap, soap->dom->text, NULL, 0, n); } #endif #ifdef WITH_FAST soap->labidx = 0; for (;;) - { register char *s; - register size_t i, k; + { char *s; + size_t i, k; if (soap_append_lab(soap, NULL, 0)) return NULL; s = soap->labbuf + soap->labidx; k = soap->lablen - soap->labidx; soap->labidx = soap->lablen; for (i = 0; i < k; i++) - { register char d1, d2; - register soap_wchar c; + { char d1, d2; + soap_wchar c; c = soap_get(soap); if (soap_isxdigit(c)) { d1 = (char)c; @@ -1825,31 +1942,41 @@ soap_gethex(struct soap *soap, int *n) } } else - { unsigned char *p; + { unsigned char *p = NULL; + l = (long)(soap->lablen + i - k); soap_unget(soap, c); if (n) - *n = (int)(soap->lablen + i - k); - p = (unsigned char*)soap_malloc(soap, soap->lablen + i - k); - if (p) - memcpy(p, soap->labbuf, soap->lablen + i - k); + *n = (int)l; + if (soap->maxlength > 0 && l > soap->maxlength) + soap->error = SOAP_LENGTH; + else + { p = (unsigned char*)soap_malloc(soap, (size_t)l); + if (p) + soap_memcpy((void*)p, (size_t)l, (const void*)soap->labbuf, (size_t)l); + } return p; } *s++ = (char)(((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0')); } + l = (long)soap->lablen; + if (soap->maxlength > 0 && l > soap->maxlength) + { soap->error = SOAP_LENGTH; + return NULL; + } } #else if (soap_new_block(soap) == NULL) return NULL; for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, NULL, SOAP_BLKLEN); + { int i; + char *s = (char*)soap_push_block(soap, NULL, SOAP_BLKLEN); if (!s) { soap_end_block(soap, NULL); return NULL; } for (i = 0; i < SOAP_BLKLEN; i++) - { register char d1, d2; - register soap_wchar c = soap_get(soap); + { char d1, d2; + soap_wchar c = soap_get(soap); if (soap_isxdigit(c)) { d1 = (char)c; c = soap_get(soap); @@ -1864,12 +1991,23 @@ soap_gethex(struct soap *soap, int *n) else { unsigned char *p; soap_unget(soap, c); + if (soap->maxlength > 0 && l > soap->maxlength) + { soap->error = SOAP_LENGTH; + soap_end_block(soap, NULL); + return NULL; + } if (n) *n = (int)soap_size_block(soap, NULL, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); + p = (unsigned char*)soap_save_block(soap, NULL, NULL, 0); return p; } *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0'); + l++; + } + if (soap->maxlength > 0 && l > soap->maxlength) + { soap->error = SOAP_LENGTH; + soap_end_block(soap, NULL); + return NULL; } } #endif @@ -1877,19 +2015,21 @@ soap_gethex(struct soap *soap, int *n) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap *soap, const unsigned char *s, int n) -{ register int i; - register unsigned long m; +{ int i; + unsigned long m; char d[4]; if (!s) return SOAP_OK; #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!(soap->dom->data = soap_s2base64(soap, s, NULL, n))) + { soap->dom->text = soap_s2base64(soap, s, NULL, n); + if (!soap->dom->text) return soap->error; return SOAP_OK; } @@ -1921,40 +2061,40 @@ soap_putbase64(struct soap *soap, const unsigned char *s, int n) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap *soap, int *n, int malloc_flag) -{ (void)malloc_flag; +{ long l = 0; + (void)malloc_flag; #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_string_in(soap, 0, -1, -1); - return (unsigned char*)soap_base642s(soap, soap->dom->data, NULL, 0, n); + { soap->dom->text = soap_string_in(soap, 0, -1, -1, NULL); + return (unsigned char*)soap_base642s(soap, soap->dom->text, NULL, 0, n); } #endif #ifdef WITH_FAST soap->labidx = 0; for (;;) - { register size_t i, k; - register char *s; + { size_t i, k; + char *s; if (soap_append_lab(soap, NULL, 2)) return NULL; s = soap->labbuf + soap->labidx; k = soap->lablen - soap->labidx; soap->labidx = 3 * (soap->lablen / 3); - if (!s) - return NULL; if (k > 2) { for (i = 0; i < k - 2; i += 3) - { register unsigned long m = 0; - register int j = 0; + { unsigned long m = 0; + int j = 0; do - { register soap_wchar c = soap_get(soap); + { soap_wchar c = soap_get(soap); if (c < SOAP_AP) c &= 0x7FFFFFFF; if (c == '=' || c < 0) - { unsigned char *p; + { unsigned char *p = NULL; switch (j) { case 2: *s++ = (char)((m >> 4) & 0xFF); @@ -1965,21 +2105,26 @@ soap_getbase64(struct soap *soap, int *n, int malloc_flag) *s++ = (char)((m >> 2) & 0xFF); i += 2; } + l = (long)(soap->lablen + i - k); if (n) - *n = (int)(soap->lablen + i - k); - p = (unsigned char*)soap_malloc(soap, soap->lablen + i - k); - if (p) - memcpy(p, soap->labbuf, soap->lablen + i - k); + *n = (int)l; + if (soap->maxlength > 0 && l > soap->maxlength) + soap->error = SOAP_LENGTH; + else + { p = (unsigned char*)soap_malloc(soap, (size_t)l); + if (p) + soap_memcpy((void*)p, (size_t)l, (const void*)soap->labbuf, (size_t)l); + } if (c >= 0) { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; + continue; } soap_unget(soap, c); return p; } c -= '+'; if (c >= 0 && c <= 79) - { register int b = soap_base64i[c]; + { int b = soap_base64i[c]; if (b >= 64) { soap->error = SOAP_TYPE; return NULL; @@ -1996,23 +2141,30 @@ soap_getbase64(struct soap *soap, int *n, int malloc_flag) *s++ = (char)((m >> 8) & 0xFF); *s++ = (char)(m & 0xFF); } + l = (long)soap->lablen; + if (soap->maxlength > 0 && l > soap->maxlength) + { soap->error = SOAP_LENGTH; + return NULL; + } } } #else if (soap_new_block(soap) == NULL) return NULL; for (;;) - { register int i; - register char *s = (char*)soap_push_block(soap, NULL, 3 * SOAP_BLKLEN); /* must be multiple of 3 */ + { int i; + char *s = (char*)soap_push_block(soap, NULL, 3 * SOAP_BLKLEN); /* must be multiple of 3 */ if (!s) { soap_end_block(soap, NULL); return NULL; } for (i = 0; i < SOAP_BLKLEN; i++) - { register unsigned long m = 0; - register int j = 0; + { unsigned long m = 0; + int j = 0; do - { register soap_wchar c = soap_get(soap); + { soap_wchar c = soap_get(soap); + if (c < SOAP_AP) + c &= 0x7FFFFFFF; if (c == '=' || c < 0) { unsigned char *p; i *= 3; @@ -2020,18 +2172,25 @@ soap_getbase64(struct soap *soap, int *n, int malloc_flag) { case 2: *s++ = (char)((m >> 4) & 0xFF); i++; + l++; break; case 3: *s++ = (char)((m >> 10) & 0xFF); *s++ = (char)((m >> 2) & 0xFF); + l += 2; i += 2; } if (n) *n = (int)soap_size_block(soap, NULL, i); - p = (unsigned char*)soap_save_block(soap, NULL, 0); + if (soap->maxlength > 0 && l > soap->maxlength) + { soap->error = SOAP_LENGTH; + soap_end_block(soap, NULL); + return NULL; + } + p = (unsigned char*)soap_save_block(soap, NULL, NULL, 0); if (c >= 0) { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT) - ; + continue; } soap_unget(soap, c); return p; @@ -2046,7 +2205,7 @@ soap_getbase64(struct soap *soap, int *n, int malloc_flag) m = (m << 6) + b; j++; } - else if (!soap_blank(c)) + else if (!soap_blank(c + '+')) { soap->error = SOAP_TYPE; return NULL; } @@ -2054,6 +2213,12 @@ soap_getbase64(struct soap *soap, int *n, int malloc_flag) *s++ = (char)((m >> 16) & 0xFF); *s++ = (char)((m >> 8) & 0xFF); *s++ = (char)(m & 0xFF); + l += 3; + } + if (soap->maxlength > 0 && l > soap->maxlength) + { soap->error = SOAP_LENGTH; + soap_end_block(soap, NULL); + return NULL; } } #endif @@ -2061,6 +2226,7 @@ soap_getbase64(struct soap *soap, int *n, int malloc_flag) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -2072,7 +2238,7 @@ soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, c short body = soap->body; /* should save type too? */ if (!soap_peek_element(soap)) { if (!soap_element_begin_in(soap, "xop:Include", 0, NULL)) - { if (soap_dime_forward(soap, ptr, size, id, type, options) + { if (soap_attachment_forward(soap, ptr, size, id, type, options) || (soap->body && soap_element_end_in(soap, "xop:Include"))) return soap->error; } @@ -2084,12 +2250,13 @@ soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, c #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 -soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options) +soap_attachment_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options) { struct soap_xlist *xp; *ptr = NULL; *size = 0; @@ -2115,19 +2282,42 @@ soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, #endif /******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +void * +SOAP_FMAC2 +soap_memdup(struct soap *soap, const void *s, size_t n) +{ void *t = NULL; + if (s) + { t = soap_malloc(soap, n); + if (t) + soap_memcpy(t, n, s, n); + } + return t; +} +#endif + +/******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 char * SOAP_FMAC2 soap_strdup(struct soap *soap, const char *s) { char *t = NULL; - if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1))) - strcpy(t, s); + if (s) + { size_t l = strlen(s) + 1; + t = (char*)soap_malloc(soap, l); + if (t) + soap_memcpy((void*)t, l, (const void*)s, l); + } return t; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 wchar_t * @@ -2138,14 +2328,63 @@ soap_wstrdup(struct soap *soap, const wchar_t *s) { size_t n = 0; while (s[n]) n++; - if ((t = (wchar_t*)soap_malloc(soap, sizeof(wchar_t)*(n+1)))) - memcpy(t, s, sizeof(wchar_t)*(n+1)); + n = sizeof(wchar_t)*(n+1); + t = (wchar_t*)soap_malloc(soap, n); + if (t) + soap_memcpy((void*)t, n, (const void*)s, n); } return t; } #endif /******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +char * +SOAP_FMAC2 +soap_strtrim(struct soap *soap, char *s) +{ (void)soap; + if (s) + { char *t; + while ((*s >= 9 && *s <= 13) || *s == 32) + s++; + t = s; + while (*t) + t++; + while (--t > s && ((*t >= 9 && *t <= 13) || *t == 32)) + continue; + t[1] = '\0'; + } + return s; +} +#endif + +/******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +wchar_t * +SOAP_FMAC2 +soap_wstrtrim(struct soap *soap, wchar_t *s) +{ (void)soap; + if (s) + { wchar_t *t; + while ((*s >= 9 && *s <= 13) || *s == 32) + s++; + t = s; + while (*t) + t++; + while (--t > s && ((*t >= 9 && *t <= 13) || *t == 32)) + continue; + t[1] = L'\0'; + } + return s; +} +#endif + +/******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 struct soap_blist* @@ -2153,135 +2392,169 @@ SOAP_FMAC2 soap_new_block(struct soap *soap) { struct soap_blist *p; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New block sequence (prev=%p)\n", soap->blist)); - if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist)))) + p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist)); + if (!p) { soap->error = SOAP_EOM; return NULL; } p->next = soap->blist; - p->ptr = NULL; + p->head = NULL; p->size = 0; + p->item = 0; soap->blist = p; return p; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap *soap, struct soap_blist *b, size_t n) -{ char *p; +{ struct soap_bhead *p; if (!b) b = soap->blist; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)b->size + (unsigned int)n)); - if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t)))) + p = (struct soap_bhead*)SOAP_MALLOC(soap, sizeof(struct soap_bhead) + n); + if (!p) { soap->error = SOAP_EOM; return NULL; } - *(char**)p = b->ptr; - *(size_t*)(p + sizeof(char*)) = n; - b->ptr = p; + p->next = b->head; + b->head = p; + p->size = n; b->size += n; - return p + sizeof(char*) + sizeof(size_t); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block %p of %u bytes on %lu previous blocks (%lu bytes total)\n", p, (unsigned int)n, (unsigned long)b->item, (unsigned long)b->size)); + b->item++; + return (void*)(p + 1); /* skip block header and point to n allocated bytes */ +} +#endif + +/******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +void* +SOAP_FMAC2 +soap_push_block_max(struct soap *soap, struct soap_blist *b, size_t n) +{ if (b && b->item >= soap->maxoccurs) /* restrict block array length */ + { soap->error = SOAP_OCCURS; + return NULL; + } + return soap_push_block(soap, b, n); } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap *soap, struct soap_blist *b) -{ char *p; +{ struct soap_bhead *p; if (!b) b = soap->blist; - if (!b->ptr) + if (!b->head) return; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n")); - p = b->ptr; - b->size -= *(size_t*)(p + sizeof(char*)); - b->ptr = *(char**)p; + p = b->head; + b->size -= p->size; + b->head = p->next; + b->item--; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block %p (%lu items of %lu bytes total)\n", p, (unsigned long)b->item, (unsigned long)b->size)); SOAP_FREE(soap, p); } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void SOAP_FMAC2 -soap_update_pointers(struct soap *soap, char *start, char *end, char *p1, char *p2) -{ -#ifndef WITH_NOIDREF - int i; - register struct soap_ilist *ip = NULL; - register struct soap_flist *fp = NULL; +soap_update_pointers(struct soap *soap, const char *dst, const char *src, size_t len) +{ const void *start = src, *end = src + len; #ifndef WITH_LEANER - register struct soap_xlist *xp = NULL; + struct soap_xlist *xp; #endif - register void *p, **q; - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && (char*)ip->ptr >= start && (char*)ip->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", ip->id, ip->ptr, (char*)ip->ptr + (p1-p2))); - ip->ptr = (char*)ip->ptr + (p1-p2); - } - for (q = &ip->link; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p\n", ip->id, p)); - *q = (char*)p + (p1-p2); - } - } - for (q = &ip->copy; q; q = (void**)p) - { p = *q; - if (p && (char*)p >= start && (char*)p < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p\n", ip->id, p)); - *q = (char*)p + (p1-p2); - } - } - for (fp = ip->flist; fp; fp = fp->next) - { if ((char*)fp->ptr >= start && (char*)fp->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' %p\n", ip->id, fp)); - fp->ptr = (char*)fp->ptr + (p1-p2); +#ifndef WITH_NOIDREF + if ((soap->version && !(soap->imode & SOAP_XML_TREE)) || (soap->mode & SOAP_XML_GRAPH)) + { int i; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update pointers %p (%lu bytes) -> %p\n", src, (unsigned long)len, dst)); + for (i = 0; i < SOAP_IDHASH; i++) + { struct soap_ilist *ip; + for (ip = soap->iht[i]; ip; ip = ip->next) + { struct soap_flist *fp; + void *p, **q; + if (ip->shaky) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update shaky id='%s'\n", ip->id)); + if (ip->ptr && ip->ptr >= start && ip->ptr < end) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update ptr %p -> %p\n", ip->ptr, (const char*)ip->ptr + (dst-src))); + ip->ptr = (void*)((const char*)ip->ptr + (dst-src)); + } + for (q = &ip->link; q; q = (void**)p) + { p = *q; + if (p && p >= start && p < end) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Link update id='%s' %p -> %p\n", ip->id, p, (const char*)p + (dst-src))); + *q = (void*)((const char*)p + (dst-src)); + } + } + for (q = &ip->copy; q; q = (void**)p) + { p = *q; + if (p && p >= start && p < end) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy chain update id='%s' %p -> %p\n", ip->id, p, (const char*)p + (dst-src))); + *q = (void*)((const char*)p + (dst-src)); + } + } + for (fp = ip->flist; fp; fp = fp->next) + { if (fp->ptr >= start && fp->ptr < end) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy list update id='%s' target type=%d %p -> %p\n", ip->id, fp->type, fp->ptr, (char*)fp->ptr + (dst-src))); + fp->ptr = (void*)((const char*)fp->ptr + (dst-src)); + } + } + if (ip->smart && ip->smart >= start && ip->smart < end) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Smart shared pointer update %p -> %p\n", ip->smart, (const char*)ip->smart + (dst-src))); + ip->smart = (void*)((const char*)ip->smart + (dst-src)); + } } } } } +#else + (void)soap; (void)start; (void)end; (void)dst; (void)src; +#endif #ifndef WITH_LEANER for (xp = soap->xlist; xp; xp = xp->next) - { if (xp->ptr && (char*)xp->ptr >= start && (char*)xp->ptr < end) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update id='%s' %p -> %p\n", xp->id ? xp->id : SOAP_STR_EOS, xp->ptr, (char*)xp->ptr + (p1-p2))); - xp->ptr = (unsigned char**)((char*)xp->ptr + (p1-p2)); - xp->size = (int*)((char*)xp->size + (p1-p2)); - xp->type = (char**)((char*)xp->type + (p1-p2)); - xp->options = (char**)((char*)xp->options + (p1-p2)); + { if (xp->ptr && (void*)xp->ptr >= start && (void*)xp->ptr < end) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update attachment id='%s' %p -> %p\n", xp->id ? xp->id : SOAP_STR_EOS, xp->ptr, (char*)xp->ptr + (dst-src))); + xp->ptr = (unsigned char**)((char*)xp->ptr + (dst-src)); + xp->size = (int*)((char*)xp->size + (dst-src)); + xp->type = (char**)((char*)xp->type + (dst-src)); + xp->options = (char**)((char*)xp->options + (dst-src)); } } #endif -#else - (void)soap; (void)start; (void)end; (void)p1; (void)p2; -#endif } #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_1 static int -soap_has_copies(struct soap *soap, register const char *start, register const char *end) -{ register int i; - register struct soap_ilist *ip = NULL; - register struct soap_flist *fp = NULL; - register const char *p; +soap_has_copies(struct soap *soap, const char *start, const char *end) +{ int i; + struct soap_ilist *ip = NULL; + struct soap_flist *fp = NULL; + const char *p; for (i = 0; i < SOAP_IDHASH; i++) { for (ip = soap->iht[i]; ip; ip = ip->next) { for (p = (const char*)ip->copy; p; p = *(const char**)p) if (p >= start && p < end) return SOAP_ERR; for (fp = ip->flist; fp; fp = fp->next) - if ((const char*)fp->ptr >= start && (const char*)fp->ptr < end) + if (fp->type == ip->type && (const char*)fp->ptr >= start && (const char*)fp->ptr < end) return SOAP_ERR; } } @@ -2291,91 +2564,112 @@ soap_has_copies(struct soap *soap, register const char *start, register const ch #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap *soap) -{ register int i; - register struct soap_ilist *ip = NULL; - register struct soap_flist *fp = NULL; +{ int i; short flag; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data\n")); + const char *id; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded refs\n")); for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) + { struct soap_ilist *ip; + for (ip = soap->iht[i]; ip; ip = ip->next) { if (ip->ptr) - { register void *p, **q, *r; + { void **q; + struct soap_flist *fp, **fpp = &ip->flist; + if (ip->spine) + ip->spine[0] = ip->ptr; q = (void**)ip->link; ip->link = NULL; - r = ip->ptr; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id)); + DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s' type=%d\n", ip->id, ip->type)); while (q) - { p = *q; - *q = r; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, r)); + { void *p = *q; + *q = ip->ptr; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, ip->ptr)); q = (void**)p; } + while ((fp = *fpp)) + { if (fp->level > 0 && fp->finsert) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... insert type=%d link %p -> %p\n", fp->type, fp->ptr, ip->ptr)); + if (ip->spine && fp->level <= SOAP_MAXPTRS) + fp->finsert(soap, ip->type, fp->type, fp->ptr, fp->index, &ip->spine[fp->level - 1], &ip->smart); + else if (fp->level == 1) + fp->finsert(soap, ip->type, fp->type, fp->ptr, fp->index, &ip->ptr, &ip->smart); + else if (fp->level <= SOAP_MAXPTRS) + { int i; + ip->spine = (void**)soap_malloc(soap, SOAP_MAXPTRS * sizeof(void*)); + if (!ip->spine) + return soap->error = SOAP_EOM; + ip->spine[0] = ip->ptr; + for (i = 1; i < SOAP_MAXPTRS; i++) + ip->spine[i] = &ip->spine[i - 1]; + fp->finsert(soap, ip->type, fp->type, fp->ptr, fp->index, &ip->spine[fp->level - 1], &ip->smart); + } + *fpp = fp->next; + SOAP_FREE(soap, fp); + } + else + fpp = &fp->next; + } } else if (*ip->id == '#') - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing data for id='%s'\n", ip->id)); - strcpy(soap->id, ip->id + 1); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Missing id='%s'\n", ip->id)); + soap_strcpy(soap->id, sizeof(soap->id), ip->id + 1); return soap->error = SOAP_MISSING_ID; } } } do { flag = 0; + id = NULL; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution phase\n")); for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size)) - { if (ip->copy) - { register void *p, **q = (void**)ip->copy; - DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id)); - ip->copy = NULL; - do - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size)); - p = *q; - memcpy(q, ip->ptr, ip->size); - q = (void**)p; - } while (q); - flag = 1; - } - for (fp = ip->flist; fp; fp = ip->flist) - { register unsigned int k = fp->level; - register void *p = ip->ptr; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d location=%p level=%u,%u id='%s'\n", ip->type, p, ip->level, fp->level, ip->id)); - while (ip->level < k) - { register void **q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return soap->error; - *q = p; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level, new location=%p holds=%p...\n", q, *q)); - p = (void*)q; - k--; + { struct soap_ilist *ip; + for (ip = soap->iht[i]; ip; ip = ip->next) + { if (ip->copy || ip->flist) + { if (ip->ptr && !soap_has_copies(soap, (const char*)ip->ptr, (const char*)ip->ptr + ip->size)) + { struct soap_flist *fp; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving id='%s' type=%d ptr=%p size=%lu ...\n", ip->id, ip->type, ip->ptr, (unsigned long)ip->size)); + if (ip->copy) + { void *p, **q = (void**)ip->copy; + DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id)); + ip->copy = NULL; + do + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size)); + p = *q; + soap_memcpy((void*)q, ip->size, (const void*)ip->ptr, ip->size); + q = (void**)p; + } while (q); + flag = 1; + } + while ((fp = ip->flist)) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving forwarded data type=%d target type=%d location=%p level=%u id='%s'\n", ip->type, fp->type, ip->ptr, fp->level, ip->id)); + if (fp->level == 0) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%lu bytes)\n", ip->ptr, fp->ptr, (unsigned long)ip->size)); + if (fp->finsert) + fp->finsert(soap, ip->type, fp->type, fp->ptr, fp->index, ip->ptr, &ip->smart); + else + soap_memcpy((void*)fp->ptr, ip->size, (const void*)ip->ptr, ip->size); + } + ip->flist = fp->next; + SOAP_FREE(soap, fp); + flag = 1; } - if (fp->fcopy) - fp->fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size); - else - soap_fcopy(soap, ip->type, fp->type, fp->ptr, fp->len, p, ip->size); - ip->flist = fp->next; - SOAP_FREE(soap, fp); - flag = 1; } + else + id = ip->id; } } } } while (flag); -#ifdef SOAP_DEBUG - for (i = 0; i < SOAP_IDHASH; i++) - { for (ip = soap->iht[i]; ip; ip = ip->next) - { if (ip->copy || ip->flist) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the developers\n", ip->id)); - } - } + if (id) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution error: forwarded data for id='%s' could not be propagated, please report this problem to the gSOAP developers\n", id)); + return soap_id_nullify(soap, id); } -#endif DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolution done\n")); return SOAP_OK; } @@ -2383,6 +2677,7 @@ soap_resolve(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 size_t @@ -2390,61 +2685,64 @@ SOAP_FMAC2 soap_size_block(struct soap *soap, struct soap_blist *b, size_t n) { if (!b) b = soap->blist; - if (b->ptr) - { b->size -= *(size_t*)(b->ptr + sizeof(char*)) - n; - *(size_t*)(b->ptr + sizeof(char*)) = n; + if (b->head) + { b->size -= b->head->size - n; + b->head->size = n; } return b->size; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap *soap, struct soap_blist *b) -{ char *p, *q, *r; +{ struct soap_bhead *p, *q, *r; if (!b) b = soap->blist; - p = b->ptr; + p = b->head; if (!p) return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n")); r = NULL; do - { q = *(char**)p; - *(char**)p = r; + { q = p->next; + p->next = r; r = p; p = q; } while (p); - b->ptr = r; - return r + sizeof(char*) + sizeof(size_t); + b->head = r; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block %p\n", r + 1)); + return (char*)(r + 1); } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap *soap, struct soap_blist *b) -{ char *p; +{ struct soap_bhead *p; if (!b) b = soap->blist; - p = b->ptr; + p = b->head; if (p) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n")); - b->ptr = *(char**)p; + { b->head = p->next; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block %p, deleting current block\n", b->head ? b->head + 1 : NULL)); SOAP_FREE(soap, p); - if (b->ptr) - return b->ptr + sizeof(char*) + sizeof(size_t); + if (b->head) + return (char*)(b->head + 1); } return NULL; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 size_t @@ -2452,23 +2750,24 @@ SOAP_FMAC2 soap_block_size(struct soap *soap, struct soap_blist *b) { if (!b) b = soap->blist; - return *(size_t*)(b->ptr + sizeof(char*)); + return b->head->size; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap *soap, struct soap_blist *b) -{ char *p, *q; +{ struct soap_bhead *p, *q; if (!b) b = soap->blist; if (b) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of block sequence, free all remaining blocks\n")); - for (p = b->ptr; p; p = q) - { q = *(char**)p; + for (p = b->head; p; p = q) + { q = p->next; SOAP_FREE(soap, p); } if (soap->blist == b) @@ -2484,33 +2783,42 @@ soap_end_block(struct soap *soap, struct soap_blist *b) } SOAP_FREE(soap, b); } - DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restore previous block sequence\n")); + DBGLOG(TEST, if (soap->blist) SOAP_MESSAGE(fdebug, "Restored previous block sequence\n")); +#ifndef WITH_NOIDREF + if (!soap->blist && ((soap->version && !(soap->imode & SOAP_XML_TREE)) || (soap->mode & SOAP_XML_GRAPH))) + { int i; + struct soap_ilist *ip = NULL; + for (i = 0; i < SOAP_IDHASH; i++) + for (ip = soap->iht[i]; ip; ip = ip->next) + ip->shaky = 0; + } +#endif } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap *soap, struct soap_blist *b, char *p, int flag) -{ register size_t n; - register char *q, *s; +{ size_t n; + char *q, *s; if (!b) b = soap->blist; if (b->size) { if (!p) p = (char*)soap_malloc(soap, b->size); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned int)b->size, b->ptr, p)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Save all %lu blocks in contiguous memory space of %u bytes (%p->%p)\n", (unsigned long)b->item, (unsigned int)b->size, b->head, p)); if (p) - { for (s = p, q = soap_first_block(soap, b); q; q = soap_next_block(soap, b)) + { s = p; + for (q = soap_first_block(soap, b); q; q = soap_next_block(soap, b)) { n = soap_block_size(soap, b); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copy %u bytes from %p to %p\n", (unsigned int)n, q, s)); -#ifndef WITH_NOIDREF if (flag) - soap_update_pointers(soap, q, q + n, s, q); -#endif - memcpy(s, q, n); + soap_update_pointers(soap, s, q, n); + soap_memcpy((void*)s, n, (const void*)q, n); s += n; } } @@ -2523,248 +2831,140 @@ soap_save_block(struct soap *soap, struct soap_blist *b, char *p, int flag) #endif /******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsize(struct soap *soap, const char *type, int size) -{ return soap_putsizes(soap, type, &size, 1); -} -#endif - -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -char * -SOAP_FMAC2 -soap_putsizes(struct soap *soap, const char *type, const int *size, int dim) -{ return soap_putsizesoffsets(soap, type, size, NULL, dim); -} -#endif -/******************************************************************************/ #ifndef PALM_2 SOAP_FMAC1 char * SOAP_FMAC2 soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim) -{ register int i; - register size_t l; - if (!type || strlen(type) + 13 > sizeof(soap->type)) /* prevent overruns */ +{ int i; + const char *t = ",%d"; + if (!type) return NULL; if (soap->version == 2) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->type, sizeof(soap->type) - 1, "%s[%d", type, size[0]); -#else - sprintf(soap->type, "%s[%d", type, size[0]); -#endif + t = " %d"; + if (soap->version != 2 && offset) + { (SOAP_SNPRINTF(soap->type, sizeof(soap->type) - 1, strlen(type) + 20), "%s[%d", type, size[0] + offset[0]); for (i = 1; i < dim; i++) - { -#ifdef HAVE_SNPRINTF - l = strlen(soap->type); - soap_snprintf(soap->type + l, sizeof(soap->type) - l - 1, " %d", size[i]); -#else - if ((l = strlen(soap->type)) + 13 > sizeof(soap->type)) - return NULL; - sprintf(soap->type + l, " %d", size[i]); -#endif + { size_t l = strlen(soap->type); + (SOAP_SNPRINTF(soap->type + l, sizeof(soap->type) - l - 1, 20), t, size[i] + offset[i]); } } else - { if (offset) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->type, sizeof(soap->type) - 1, "%s[%d", type, size[0] + offset[0]); -#else - sprintf(soap->type, "%s[%d", type, size[0] + offset[0]); -#endif - for (i = 1; i < dim; i++) - { -#ifdef HAVE_SNPRINTF - l = strlen(soap->type); - soap_snprintf(soap->type + l, sizeof(soap->type) - l - 1, ",%d", size[i] + offset[i]); -#else - if ((l = strlen(soap->type)) + 13 > sizeof(soap->type)) - return NULL; - sprintf(soap->type + l, ",%d", size[i] + offset[i]); -#endif - } - } - else - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->type, sizeof(soap->type) - 1, "%s[%d", type, size[0]); -#else - sprintf(soap->type, "%s[%d", type, size[0]); -#endif - for (i = 1; i < dim; i++) - { -#ifdef HAVE_SNPRINTF - l = strlen(soap->type); - soap_snprintf(soap->type + l, sizeof(soap->type) - l - 1, ",%d", size[i]); -#else - if ((l = strlen(soap->type)) + 13 > sizeof(soap->type)) - return NULL; - sprintf(soap->type + l, ",%d", size[i]); -#endif - } + { (SOAP_SNPRINTF(soap->type, sizeof(soap->type) - 1, strlen(type) + 20), "%s[%d", type, size[0]); + for (i = 1; i < dim; i++) + { size_t l = strlen(soap->type); + (SOAP_SNPRINTF(soap->type + l, sizeof(soap->type) - l - 1, 20), t, size[i]); } } - strcat(soap->type, "]"); + soap_strncat(soap->type, sizeof(soap->type), "]", 1); return soap->type; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 char * SOAP_FMAC2 -soap_putoffset(struct soap *soap, int offset) -{ return soap_putoffsets(soap, &offset, 1); +soap_putoffsets(struct soap *soap, const int *offset, int dim) +{ int i; + soap->arrayOffset[0] = '\0'; + if (soap->version == 1) + { (SOAP_SNPRINTF(soap->arrayOffset, sizeof(soap->arrayOffset) - 1, 20), "[%d", offset[0]); + for (i = 1; i < dim; i++) + { size_t l = strlen(soap->arrayOffset); + (SOAP_SNPRINTF(soap->arrayOffset + l, sizeof(soap->arrayOffset) - l - 1, 20), ",%d", offset[i]); + } + soap_strncat(soap->arrayOffset, sizeof(soap->arrayOffset), "]", 1); + } + return soap->arrayOffset; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 -char * +size_t SOAP_FMAC2 -soap_putoffsets(struct soap *soap, const int *offset, int dim) -{ register int i; - register size_t l; -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->arrayOffset, sizeof(soap->arrayOffset) - 1, "[%d", offset[0]); -#else - if (sizeof(soap->arrayOffset) < 13) /* prevent overruns */ - return NULL; - sprintf(soap->arrayOffset, "[%d", offset[0]); -#endif +soap_size(const int *size, int dim) +{ int i; + size_t n = 0; + if (size[0] <= 0) + return 0; + n = (size_t)size[0]; for (i = 1; i < dim; i++) - { -#ifdef HAVE_SNPRINTF - l = strlen(soap->arrayOffset); - soap_snprintf(soap->arrayOffset + l, sizeof(soap->arrayOffset) - l - 1, ",%d", offset[i]); -#else - if ((l = strlen(soap->arrayOffset)) + 13 > sizeof(soap->arrayOffset)) - return NULL; - sprintf(soap->arrayOffset + l, ",%d", offset[i]); -#endif + { if (size[i] <= 0) + return 0; + n *= (size_t)size[i]; } - strcat(soap->arrayOffset, "]"); - return soap->arrayOffset; + return (size_t)n; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 -int +size_t SOAP_FMAC2 -soap_size(const int *size, int dim) -{ register int i, n = size[0]; - for (i = 1; i < dim; i++) - n *= size[i]; +soap_getsizes(const char *attr, int *size, int dim) +{ size_t i, k, n; + if (!*attr) + return 0; + i = strlen(attr); + n = 1; + do + { for (; i > 0; i--) + if (attr[i - 1] == '[' || attr[i - 1] == ',' || attr[i - 1] == ' ') + break; + n *= k = (size_t)soap_strtoul(attr + i, NULL, 10); + size[--dim] = (int)k; + if (n > SOAP_MAXARRAYSIZE) + return 0; + } while (dim > 0 && --i > 0 && attr[i] != '['); return n; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *attr, const int *size, int *offset, int dim) -{ register int i, j = 0; +{ int i, j = 0; if (offset) - for (i = 0; i < dim && attr && *attr; i++) + { for (i = 0; i < dim && attr && *attr; i++) { attr++; j *= size[i]; j += offset[i] = (int)soap_strtol(attr, NULL, 10); attr = strchr(attr, ','); } + } else - for (i = 0; i < dim && attr && *attr; i++) + { for (i = 0; i < dim && attr && *attr; i++) { attr++; j *= size[i]; j += (int)soap_strtol(attr, NULL, 10); attr = strchr(attr, ','); } + } return j; } #endif /******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsize(const char *attr1, const char *attr2, int *j) -{ register int n, k; - char *s; - *j = 0; - if (!*attr1) - return -1; - if (*attr1 == '[') - attr1++; - n = 1; - for (;;) - { k = (int)soap_strtol(attr1, &s, 10); - n *= k; - if (k < 0 || n > SOAP_MAXARRAYSIZE || s == attr1) - return -1; - attr1 = strchr(s, ','); - if (!attr1) - attr1 = strchr(s, ' '); - if (attr2 && *attr2) - { attr2++; - *j *= k; - k = (int)soap_strtol(attr2, &s, 10); - *j += k; - if (k < 0) - return -1; - attr2 = s; - } - if (!attr1) - break; - attr1++; - } - return n - *j; -} -#endif -/******************************************************************************/ -#ifndef PALM_2 -SOAP_FMAC1 -int -SOAP_FMAC2 -soap_getsizes(const char *attr, int *size, int dim) -{ register int i, k, n; - if (!*attr) - return -1; - i = (int)strlen(attr); - n = 1; - do - { for (i = i-1; i >= 0; i--) - if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ') - break; - k = (int)soap_strtol(attr + i + 1, NULL, 10); - n *= size[--dim] = k; - if (k < 0 || n > SOAP_MAXARRAYSIZE) - return -1; - } while (i >= 0 && attr[i] != '['); - return n; -} -#endif - -/******************************************************************************/ #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *attr, int *pos) -{ register int i, n; +{ int i, n; if (!*attr) return -1; n = 0; @@ -2781,15 +2981,16 @@ soap_getposition(const char *attr, int *pos) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 struct soap_nlist * SOAP_FMAC2 soap_push_namespace(struct soap *soap, const char *id, const char *ns) -{ register struct soap_nlist *np; - register struct Namespace *p; - register short i = -1; - register size_t n, k; +{ struct soap_nlist *np; + struct Namespace *p; + short i = -1; + size_t n, k; n = strlen(id); k = strlen(ns) + 1; p = soap->local_namespaces; @@ -2803,13 +3004,14 @@ soap_push_namespace(struct soap *soap, const char *id, const char *ns) } else if (p->in) { if (!soap_tag_cmp(ns, p->in)) - { if ((p->out = (char*)SOAP_MALLOC(soap, k))) - strcpy(p->out, ns); + { p->out = (char*)SOAP_MALLOC(soap, k); + if (p->out) + soap_strcpy(p->out, k, ns); break; } } } - if (!p || !p->id) + if (!p->id) i = -1; } if (i >= 0) @@ -2823,10 +3025,11 @@ soap_push_namespace(struct soap *soap, const char *id, const char *ns) soap->nlist = np; np->level = soap->level; np->index = i; - strcpy((char*)np->id, id); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns)); + soap_strcpy((char*)np->id, n + 1, id); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s'='%s'\n", soap->level, id, ns)); if (i < 0) - { np->ns = strcpy((char*)np->id + n + 1, ns); + { np->ns = np->id + n + 1; + soap_strcpy((char*)np->ns, k, ns); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push NOT OK: no match found for '%s' in namespace mapping table (added to stack anyway)\n", ns)); } else @@ -2838,15 +3041,16 @@ soap_push_namespace(struct soap *soap, const char *id, const char *ns) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap *soap) -{ register struct soap_nlist *np, *nq; +{ struct soap_nlist *np, *nq; for (np = soap->nlist; np && np->level >= soap->level; np = nq) { nq = np->next; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop namespace binding (level=%u) '%s'\n", soap->level, np->id)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop namespace binding (level=%u) '%s' level=%u\n", soap->level, np->id, np->level)); SOAP_FREE(soap, np); } soap->nlist = np; @@ -2854,24 +3058,26 @@ soap_pop_namespace(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap *soap, const char *id1, const char *id2, size_t n1, size_t n2) -{ register struct soap_nlist *np = soap->nlist; +{ struct soap_nlist *np = soap->nlist; const char *s; while (np && (strncmp(np->id, id1, n1) || np->id[n1])) np = np->next; if (np) - { if (!(soap->mode & SOAP_XML_IGNORENS)) - if (np->index < 0 + { if (!(soap->mode & SOAP_XML_IGNORENS) && (n2 > 0 || !np->ns || *np->ns)) + { if (np->index < 0 || ((s = soap->local_namespaces[np->index].id) && (strncmp(s, id2, n2) || (s[n2] && s[n2] != '_')))) return SOAP_NAMESPACE; + } return SOAP_OK; } if (n1 == 0) - return (soap->mode & SOAP_XML_IGNORENS) ? SOAP_OK : SOAP_NAMESPACE; + return n2 == 0 || (soap->mode & SOAP_XML_IGNORENS) ? SOAP_OK : SOAP_NAMESPACE; if ((n1 == 3 && n1 == n2 && !strncmp(id1, "xml", 3) && !strncmp(id1, id2, 3)) || (soap->mode & SOAP_XML_IGNORENS)) return SOAP_OK; @@ -2880,17 +3086,19 @@ soap_match_namespace(struct soap *soap, const char *id1, const char *id2, size_t #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* SOAP_FMAC2 -soap_current_namespace(struct soap *soap, const char *tag) -{ register struct soap_nlist *np; - register const char *s; +soap_current_namespace_tag(struct soap *soap, const char *tag) +{ struct soap_nlist *np; + const char *s; if (!tag || !strncmp(tag, "xml", 3)) return NULL; np = soap->nlist; - if (!(s = strchr(tag, ':'))) + s = strchr(tag, ':'); + if (!s) { while (np && *np->id) /* find default namespace, if present */ np = np->next; } @@ -2903,7 +3111,7 @@ soap_current_namespace(struct soap *soap, const char *tag) if (np) { if (np->index >= 0) return soap->namespaces[np->index].ns; - if (np->ns) + if (np->ns && *np->ns) return soap_strdup(soap, np->ns); } return NULL; @@ -2911,14 +3119,44 @@ soap_current_namespace(struct soap *soap, const char *tag) #endif /******************************************************************************/ + +#ifndef PALM_2 +SOAP_FMAC1 +const char* +SOAP_FMAC2 +soap_current_namespace_att(struct soap *soap, const char *tag) +{ struct soap_nlist *np; + const char *s; + if (!tag || !strncmp(tag, "xml", 3)) + return NULL; + s = strchr(tag, ':'); + if (!s) + return NULL; + np = soap->nlist; + while (np && (strncmp(np->id, tag, s - tag) || np->id[s - tag])) + np = np->next; + if (!np) + soap->error = SOAP_NAMESPACE; + if (np) + { if (np->index >= 0) + return soap->namespaces[np->index].ns; + if (np->ns && *np->ns) + return soap_strdup(soap, np->ns); + } + return NULL; +} +#endif + +/******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char *s, const char *t) { for (;;) - { register int c1 = *s; - register int c2 = *t; + { int c1 = *s; + int c2 = *t; if (!c1 || c1 == '"') break; if (c2 != '-') @@ -2959,13 +3197,14 @@ soap_tag_cmp(const char *s, const char *t) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap *soap, const char *tag1, const char *tag2) -{ register const char *s, *t; - register int err; +{ const char *s, *t; + int err; if (!tag1 || !tag2 || !*tag2) return SOAP_OK; s = strchr(tag1, ':'); @@ -2974,35 +3213,40 @@ soap_match_tag(struct soap *soap, const char *tag1, const char *tag2) { if (s) { if (t[1] && SOAP_STRCMP(s + 1, t + 1)) return SOAP_TAG_MISMATCH; - if (t != tag2 && (err = soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - if (err == SOAP_NAMESPACE) - return SOAP_TAG_MISMATCH; - return err; + if (t != tag2 && !(soap->mode & SOAP_XML_IGNORENS)) + { err = soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2); + if (err) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); + if (err == SOAP_NAMESPACE) + return SOAP_TAG_MISMATCH; + return err; + } } } else if (!t[1]) - { err = soap_match_namespace(soap, tag1, tag2, 0, t - tag2); - if (err == SOAP_NAMESPACE) + { if ((soap->mode & SOAP_XML_IGNORENS) || soap_match_namespace(soap, tag1, tag2, 0, t - tag2)) return SOAP_TAG_MISMATCH; } else if (SOAP_STRCMP(tag1, t + 1)) { return SOAP_TAG_MISMATCH; } - else if (t != tag2 && (err = soap_match_namespace(soap, tag1, tag2, 0, t - tag2))) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); - if (err == SOAP_NAMESPACE) - return SOAP_TAG_MISMATCH; - return err; + else if (t != tag2) + { err = soap_match_namespace(soap, tag1, tag2, 0, t - tag2); + if (err) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags '%s' and '%s' match but namespaces differ\n", tag1, tag2)); + if (err == SOAP_NAMESPACE) + return SOAP_TAG_MISMATCH; + return err; + } } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags and (default) namespaces match: '%s' '%s'\n", tag1, tag2)); return SOAP_OK; } if (s) - { if (SOAP_STRCMP(s + 1, tag2)) + { if (!(soap->mode & SOAP_XML_IGNORENS) || SOAP_STRCMP(s + 1, tag2)) /* always fails (except when ignoring ns) */ return SOAP_TAG_MISMATCH; } - else if (SOAP_STRCMP(tag1, tag2)) + else if (SOAP_STRCMP(tag1, tag2) || ((soap->mode & SOAP_XML_STRICT) && !(soap->mode & SOAP_XML_IGNORENS) && soap_match_namespace(soap, tag1, tag2, 0, 0))) /* strict checking: default namespace must be null namespace */ return SOAP_TAG_MISMATCH; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Tags match: '%s' '%s'\n", tag1, tag2)); return SOAP_OK; @@ -3010,6 +3254,50 @@ soap_match_tag(struct soap *soap, const char *tag1, const char *tag2) #endif /******************************************************************************/ + +#ifndef PALM_2 +SOAP_FMAC1 +int +SOAP_FMAC2 +soap_match_att(struct soap *soap, const char *tag1, const char *tag2) +{ const char *s, *t; + int err; + if (!tag1 || !tag2 || !*tag2) + return SOAP_OK; + s = strchr(tag1, ':'); + t = strchr(tag2, ':'); + if (t) + { if (s) + { if (t[1] && SOAP_STRCMP(s + 1, t + 1)) + return SOAP_TAG_MISMATCH; + if (t != tag2 && !(soap->mode & SOAP_XML_IGNORENS)) + { err = soap_match_namespace(soap, tag1, tag2, s - tag1, t - tag2); + if (err) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Atts '%s' and '%s' match but namespaces differ\n", tag1, tag2)); + if (err == SOAP_NAMESPACE) + return SOAP_TAG_MISMATCH; + return err; + } + } + } + else if (!t[1] || t != tag2 || SOAP_STRCMP(tag1, t + 1)) + return SOAP_TAG_MISMATCH; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Atts and (default) namespaces match: '%s' '%s'\n", tag1, tag2)); + return SOAP_OK; + } + if (s) + { if (!(soap->mode & SOAP_XML_IGNORENS) || SOAP_STRCMP(s + 1, tag2)) /* always fails (except when ignoring ns) */ + return SOAP_TAG_MISMATCH; + } + else if (SOAP_STRCMP(tag1, tag2)) + return SOAP_TAG_MISMATCH; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Atts match: '%s' '%s'\n", tag1, tag2)); + return SOAP_OK; +} +#endif + +/******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -3029,28 +3317,28 @@ soap_match_array(struct soap *soap, const char *type) /******************************************************************************\ * - * SSL/TLS + * SSL/TLS * \******************************************************************************/ -/******************************************************************************/ #ifdef WITH_OPENSSL #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_rand() -{ unsigned char buf[4]; +{ int r; if (!soap_ssl_init_done) soap_ssl_init(); - RAND_pseudo_bytes(buf, 4); - return *(int*)buf; + RAND_pseudo_bytes((unsigned char*)&r, sizeof(int)); + return r; } #endif #endif /******************************************************************************/ -#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) + +#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) || defined(WITH_SYSTEMSSL) #ifndef PALM_2 SOAP_FMAC1 int @@ -3068,13 +3356,15 @@ soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *key soap->password = password; soap->cafile = cafile; soap->capath = capath; - soap->crlfile = NULL; #ifdef WITH_OPENSSL soap->dhfile = dhfile; soap->randfile = randfile; + if (!soap->fsslverify) + soap->fsslverify = ssl_verify_callback; #endif soap->ssl_flags = flags | (dhfile == NULL ? SOAP_SSL_RSA : 0); #ifdef WITH_GNUTLS + (void)randfile; (void)sid; if (dhfile) { char *s; int n = (int)soap_strtoul(dhfile, &s, 10); @@ -3110,6 +3400,11 @@ soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *key soap->xcred = NULL; } #endif +#ifdef WITH_SYSTEMSSL + (void)randfile; (void)sid; + if (soap->ctx) + gsk_environment_close(&soap->ctx); +#endif err = soap->fsslauth(soap); #ifdef WITH_OPENSSL if (!err) @@ -3125,7 +3420,8 @@ soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *key #endif /******************************************************************************/ -#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) + +#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) || defined(WITH_SYSTEMSSL) #ifndef PALM_2 SOAP_FMAC1 int @@ -3146,9 +3442,11 @@ soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *key #ifdef WITH_OPENSSL soap->dhfile = NULL; soap->randfile = randfile; - soap->fsslverify = (flags & SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE) == 0 ? ssl_verify_callback : ssl_verify_callback_allow_expired_certificate; + if (!soap->fsslverify) + soap->fsslverify = (flags & SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE) == 0 ? ssl_verify_callback : ssl_verify_callback_allow_expired_certificate; #endif #ifdef WITH_GNUTLS + (void)randfile; if (soap->session) { gnutls_deinit(soap->session); soap->session = NULL; @@ -3158,12 +3456,62 @@ soap_ssl_client_context(struct soap *soap, unsigned short flags, const char *key soap->xcred = NULL; } #endif +#ifdef WITH_SYSTEMSSL + (void)randfile; + if (soap->ctx) + gsk_environment_close(&soap->ctx); +#endif return soap->fsslauth(soap); } #endif #endif /******************************************************************************/ + +#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) +#ifndef PALM_2 +SOAP_FMAC1 +int +SOAP_FMAC2 +soap_ssl_crl(struct soap *soap, const char *crlfile) +{ +#ifdef WITH_OPENSSL + if (crlfile && soap->ctx) + { +#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) + X509_STORE *store = SSL_CTX_get_cert_store(soap->ctx); + if (*crlfile) + { int ret; + X509_LOOKUP *lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file()); + ret = X509_load_crl_file(lookup, crlfile, X509_FILETYPE_PEM); + if (ret <= 0) + return soap_set_receiver_error(soap, soap_ssl_error(soap, ret), "Can't read CRL file", SOAP_SSL_ERROR); + } + X509_VERIFY_PARAM *param = X509_VERIFY_PARAM_new(); + X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_CRL_CHECK); + X509_STORE_set1_param(store, param); + X509_VERIFY_PARAM_free(param); +#endif + } + else + soap->crlfile = crlfile; /* activate later when store is available */ +#endif +#ifdef WITH_GNUTLS + if (crlfile && soap->xcred) + { if (*crlfile) + if (gnutls_certificate_set_x509_crl_file(soap->xcred, crlfile, GNUTLS_X509_FMT_PEM) < 0) + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read CRL file", SOAP_SSL_ERROR); + } + else + soap->crlfile = crlfile; /* activate later when xcred is available */ +#endif + return SOAP_OK; +} +#endif +#endif + +/******************************************************************************/ + #if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) #ifndef PALM_2 SOAP_FMAC1 @@ -3175,8 +3523,7 @@ soap_ssl_init() { soap_ssl_init_done = 1; #ifdef WITH_OPENSSL SSL_library_init(); - OpenSSL_add_all_algorithms(); /* 2.8.1 change (wsseapi.c) */ - OpenSSL_add_all_digests(); + OpenSSL_add_all_algorithms(); /* we keep ciphers and digests for the program's lifetime */ #ifndef WITH_LEAN SSL_load_error_strings(); #endif @@ -3206,6 +3553,21 @@ soap_ssl_init() #endif /******************************************************************************/ + +#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) +#ifndef PALM_2 +SOAP_FMAC1 +void +SOAP_FMAC2 +soap_ssl_noinit() +{ /* Call this first to bypass SSL init is SSL is already initialized elsewhere */ + soap_ssl_init_done = 1; +} +#endif +#endif + +/******************************************************************************/ + #if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) #ifndef PALM_1 SOAP_FMAC1 @@ -3217,35 +3579,33 @@ soap_ssl_error(struct soap *soap, int ret) int err = SSL_get_error(soap->ssl, ret); const char *msg = soap_code_str(h_ssl_error_codes, err); if (msg) - strcpy(soap->msgbuf, msg); + (SOAP_SNPRINTF(soap->msgbuf, sizeof(soap->msgbuf), strlen(msg) + 1), "%s\n", msg); else return ERR_error_string(err, soap->msgbuf); if (ERR_peek_error()) { unsigned long r; - strcat(soap->msgbuf, "\n"); while ((r = ERR_get_error())) - ERR_error_string_n(r, soap->msgbuf + strlen(soap->msgbuf), sizeof(soap->msgbuf) - strlen(soap->msgbuf)); + { size_t l = strlen(soap->msgbuf); + ERR_error_string_n(r, soap->msgbuf + l, sizeof(soap->msgbuf) - l); + } } else - { switch (ret) + { size_t l = strlen(soap->msgbuf); + switch (ret) { case 0: - strcpy(soap->msgbuf, "EOF was observed that violates the SSL/TLS protocol. The client probably provided invalid authentication information."); + soap_strcpy(soap->msgbuf + l, sizeof(soap->msgbuf) - l, "EOF was observed that violates the SSL/TLS protocol. The client probably provided invalid authentication information."); break; case -1: -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->msgbuf, sizeof(soap->msgbuf), "Error observed by underlying SSL/TLS BIO: %s", strerror(errno)); -#else - { const char *s = strerror(errno); - size_t l = strlen(s); - sprintf(soap->msgbuf, "Error observed by underlying SSL/TLS BIO: %s", l + 44 < sizeof(soap->msgbuf) ? s : SOAP_STR_EOS); + { const char *s = strerror(soap_errno); + (SOAP_SNPRINTF(soap->msgbuf + l, sizeof(soap->msgbuf) - l, strlen(s) + 42), "Error observed by underlying SSL/TLS BIO: %s", s); } -#endif break; } } return soap->msgbuf; #endif #ifdef WITH_GNUTLS + (void)soap; return gnutls_strerror(ret); #endif } @@ -3253,7 +3613,30 @@ soap_ssl_error(struct soap *soap, int ret) #endif /******************************************************************************/ -#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) + +#ifdef WITH_SYSTEMSSL +static int +ssl_recv(int sk, void *s, int n, char *user) +{ + (void)user; + return recv(sk, s, n, 0); +} +#endif + +/******************************************************************************/ + +#ifdef WITH_SYSTEMSSL +static int +ssl_send(int sk, void *s, int n, char *user) +{ + (void)user; + return send(sk, s, n, 0); +} +#endif + +/******************************************************************************/ + +#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) || defined(WITH_SYSTEMSSL) #ifndef PALM_1 static int ssl_auth_init(struct soap *soap) @@ -3268,7 +3651,15 @@ ssl_auth_init(struct soap *soap) soap_ssl_init(); ERR_clear_error(); if (!soap->ctx) - { if (!(soap->ctx = SSL_CTX_new(SSLv23_method()))) + { +#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) + /* TLS_method: a TLS/SSL connection established may understand the SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols. */ + soap->ctx = SSL_CTX_new(TLS_method()); +#else + /* SSLv23_method: a TLS/SSL connection established may understand the SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols. */ + soap->ctx = SSL_CTX_new(SSLv23_method()); +#endif + if (!soap->ctx) return soap_set_receiver_error(soap, "SSL/TLS error", "Can't setup context", SOAP_SSL_ERROR); /* The following alters the behavior of SSL read/write: */ #if 0 @@ -3289,41 +3680,52 @@ ssl_auth_init(struct soap *soap) { if (!SSL_CTX_set_default_verify_paths(soap->ctx)) return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read default CA file and/or directory", SOAP_SSL_ERROR); } -/* This code assumes a typical scenario, see alternative code below */ + if (soap->crlfile) + { if (soap_ssl_crl(soap, soap->crlfile)) + return soap->error; + } +/* This code assumes a typical scenario with key and cert in one PEM file, see alternative code below */ +#if 1 if (soap->keyfile) { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read certificate key file", SOAP_SSL_ERROR); + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't find or read certificate in key file", SOAP_SSL_ERROR); if (soap->password) { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); } - if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) - return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read key file", SOAP_SSL_ERROR); #ifndef WM_SECURE_KEY_STORAGE if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read key file", SOAP_SSL_ERROR); #endif } -#if defined(VXWORKS) && defined(WM_SECURE_KEY_STORAGE) - if (NULL == (pkey = ipcom_key_db_pkey_get(soap->keyid))) - return soap_set_receiver_error(soap, "SSL error", "Can't find key", SOAP_SSL_ERROR); - if (0 == SSL_CTX_use_PrivateKey(soap->ctx, pkey)) - return soap_set_receiver_error(soap, "SSL error", "Can't read key", SOAP_SSL_ERROR); -#endif -/* Suggested alternative approach to check the key file for certs (cafile=NULL):*/ -#if 0 +#else +/* Suggested alternative approach to check the key file for cert only when cafile==NULL */ if (soap->password) { SSL_CTX_set_default_passwd_cb_userdata(soap->ctx, (void*)soap->password); SSL_CTX_set_default_passwd_cb(soap->ctx, ssl_password); } - if (!soap->cafile || !SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile)) + if (!soap->cafile) { if (soap->keyfile) { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->keyfile)) - return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read certificate or key file", SOAP_SSL_ERROR); + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't find or read certificate in key file", SOAP_SSL_ERROR); if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read key file", SOAP_SSL_ERROR); } } + else /* use cafile for (server) cert and keyfile for (server) key */ + { if (!SSL_CTX_use_certificate_chain_file(soap->ctx, soap->cafile)) + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read CA file", SOAP_SSL_ERROR); + if (soap->keyfile) + if (!SSL_CTX_use_PrivateKey_file(soap->ctx, soap->keyfile, SSL_FILETYPE_PEM)) + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read key file", SOAP_SSL_ERROR); + } +#endif +#if defined(VXWORKS) && defined(WM_SECURE_KEY_STORAGE) + pkey = ipcom_key_db_pkey_get(soap->keyid); + if (!pkey) + return soap_set_receiver_error(soap, "SSL error", "Can't find key", SOAP_SSL_ERROR); + if (!SSL_CTX_use_PrivateKey(soap->ctx, pkey)) + return soap_set_receiver_error(soap, "SSL error", "Can't read key", SOAP_SSL_ERROR); #endif if ((soap->ssl_flags & SOAP_SSL_RSA)) { RSA *rsa = RSA_generate_key(SOAP_SSL_RSA_BITS, RSA_F4, NULL, NULL); @@ -3360,11 +3762,27 @@ ssl_auth_init(struct soap *soap) } DH_free(dh); } - flags = (SSL_OP_ALL | SSL_OP_NO_SSLv2); /* disable SSL v2 */ + flags = (SSL_OP_ALL | SSL_OP_NO_SSLv2); /* disable SSL v2 by default */ if ((soap->ssl_flags & SOAP_SSLv3)) + { +#if (OPENSSL_VERSION_NUMBER >= 0x10001000L) + flags |= SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2; +#else flags |= SSL_OP_NO_TLSv1; - if ((soap->ssl_flags & SOAP_TLSv1)) - flags |= SSL_OP_NO_SSLv3; +#endif + } + else + { if (!(soap->ssl_flags & SOAP_SSLv3_TLSv1)) + flags |= SSL_OP_NO_SSLv3; /* disable SSL v3 by default, unless SOAP_SSLv3 or SOAP_SSLv3_TLSv1 is set */ +#if (OPENSSL_VERSION_NUMBER >= 0x10001000L) + if ((soap->ssl_flags & SOAP_TLSv1_0)) + flags |= SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2; + else if ((soap->ssl_flags & SOAP_TLSv1_1)) + flags |= SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_2; + else if ((soap->ssl_flags & SOAP_TLSv1_2)) + flags |= SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1; +#endif + } #ifdef SSL_OP_NO_TICKET /* TLS extension is enabled by default in OPENSSL v0.9.8k Disable it by adding SSL_OP_NO_TICKET */ @@ -3395,11 +3813,11 @@ ssl_auth_init(struct soap *soap) return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read CA file", SOAP_SSL_ERROR); } if (soap->crlfile) - { if (gnutls_certificate_set_x509_crl_file(soap->xcred, soap->crlfile, GNUTLS_X509_FMT_PEM) < 0) - return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read CRL file", SOAP_SSL_ERROR); + { if (soap_ssl_crl(soap, soap->crlfile)) + return soap->error; } if (soap->keyfile) - { if (gnutls_certificate_set_x509_key_file(soap->xcred, soap->keyfile, soap->keyfile, GNUTLS_X509_FMT_PEM) < 0) /* TODO: GNUTLS need to concat cert and key in single key file */ + { if (gnutls_certificate_set_x509_key_file(soap->xcred, soap->keyfile, soap->keyfile, GNUTLS_X509_FMT_PEM) < 0) /* Assumes that key and cert(s) are concatenated in the keyfile */ return soap_set_receiver_error(soap, "SSL/TLS error", "Can't read key file", SOAP_SSL_ERROR); } } @@ -3434,11 +3852,74 @@ ssl_auth_init(struct soap *soap) if ((soap->ssl_flags & SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION)) gnutls_certificate_server_set_request(soap->session, GNUTLS_CERT_REQUEST); gnutls_session_enable_compatibility_mode(soap->session); - if ((soap->ssl_flags & SOAP_TLSv1)) + if ((soap->ssl_flags & SOAP_SSLv3)) + { int protocol_priority[] = { GNUTLS_SSL3, 0 }; + if (gnutls_protocol_set_priority(soap->session, protocol_priority) != GNUTLS_E_SUCCESS) + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't set SSLv3 protocol", SOAP_SSL_ERROR); + } + else if ((soap->ssl_flags & SOAP_TLSv1_0)) { int protocol_priority[] = { GNUTLS_TLS1_0, 0 }; if (gnutls_protocol_set_priority(soap->session, protocol_priority) != GNUTLS_E_SUCCESS) - return soap_set_receiver_error(soap, "SSL/TLS error", "Can't set TLS v1.0 protocol", SOAP_SSL_ERROR); + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't set TLSv1.0 protocol", SOAP_SSL_ERROR); + } + else if ((soap->ssl_flags & SOAP_TLSv1_1)) + { int protocol_priority[] = { GNUTLS_TLS1_1, 0 }; + if (gnutls_protocol_set_priority(soap->session, protocol_priority) != GNUTLS_E_SUCCESS) + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't set TLSv1.1 protocol", SOAP_SSL_ERROR); + } + else if ((soap->ssl_flags & SOAP_TLSv1_2)) + { int protocol_priority[] = { GNUTLS_TLS1_2, 0 }; + if (gnutls_protocol_set_priority(soap->session, protocol_priority) != GNUTLS_E_SUCCESS) + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't set TLSv1.2 protocol", SOAP_SSL_ERROR); + } + else if ((soap->ssl_flags & SOAP_SSLv3_TLSv1)) + { int protocol_priority[] = { GNUTLS_SSL3, GNUTLS_TLS1_0, GNUTLS_TLS1_1, GNUTLS_TLS1_2, 0 }; + if (gnutls_protocol_set_priority(soap->session, protocol_priority) != GNUTLS_E_SUCCESS) + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't set SSLv3 & TLSv1 protocols", SOAP_SSL_ERROR); + } + else + { int protocol_priority[] = { GNUTLS_TLS1_0, GNUTLS_TLS1_1, GNUTLS_TLS1_2, 0 }; + if (gnutls_protocol_set_priority(soap->session, protocol_priority) != GNUTLS_E_SUCCESS) + return soap_set_receiver_error(soap, "SSL/TLS error", "Can't set TLSv1 protocols", SOAP_SSL_ERROR); + } + } +#endif +#ifdef WITH_SYSTEMSSL + if (!soap->ctx) + { int err; + err = gsk_environment_open(&soap->ctx); + if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ctx, GSK_PROTOCOL_SSLV2, GSK_PROTOCOL_SSLV2_OFF); + if (err == GSK_OK) + { if ((soap->ssl_flags & SOAP_SSLv3) || (soap->ssl_flags & SOAP_SSLv3_TLSv1)) + err = gsk_attribute_set_enum(soap->ctx, GSK_PROTOCOL_SSLV3, GSK_PROTOCOL_SSLV3_ON); + else + err = gsk_attribute_set_enum(soap->ctx, GSK_PROTOCOL_SSLV3, GSK_PROTOCOL_SSLV3_OFF); } + if (!(soap->ssl_flags & SOAP_SSLv3)) + { if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ctx, GSK_PROTOCOL_TLSV1, GSK_PROTOCOL_TLSV1_ON); + if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ctx, GSK_PROTOCOL_TLSV1_1, GSK_PROTOCOL_TLSV1_1_ON); + if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ctx, GSK_PROTOCOL_TLSV1_2, GSK_PROTOCOL_TLSV1_2_ON); + } + else + { if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ctx, GSK_PROTOCOL_TLSV1, GSK_PROTOCOL_TLSV1_OFF); + if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ctx, GSK_PROTOCOL_TLSV1_1, GSK_PROTOCOL_TLSV1_1_OFF); + if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ctx, GSK_PROTOCOL_TLSV1_2, GSK_PROTOCOL_TLSV1_2_OFF); + } + if (err == GSK_OK) + err = gsk_attribute_set_buffer(soap->ctx, GSK_KEYRING_FILE, soap->keyfile, 0); /* keyfile is a keyring .kdb file */ + if (err == GSK_OK) + err = gsk_attribute_set_buffer(soap->ctx, GSK_KEYRING_PW, soap->password, 0); /* locked by password */ + if (err == GSK_OK) + err = gsk_environment_init(soap->ctx); + if (err != GSK_OK) + return soap_set_receiver_error(soap, gsk_strerror(err), "SYSTEM SSL error in ssl_auth_init()", SOAP_SSL_ERROR); } #endif return SOAP_OK; @@ -3447,63 +3928,75 @@ ssl_auth_init(struct soap *soap) #endif /******************************************************************************/ + #ifdef WITH_OPENSSL #ifndef PALM_1 static int ssl_password(char *buf, int num, int rwflag, void *userdata) -{ if (num < (int)strlen((char*)userdata) + 1) +{ (void)rwflag; + if (!buf || !userdata) return 0; - return (int)strlen(strcpy(buf, (char*)userdata)); + soap_strcpy(buf, (size_t)num, (char*)userdata); + return (int)strlen(buf); } #endif #endif /******************************************************************************/ + #ifdef WITH_OPENSSL #ifndef PALM_1 static int ssl_verify_callback(int ok, X509_STORE_CTX *store) -{ +{ (void)store; #ifdef SOAP_DEBUG if (!ok) { char buf[1024]; int err = X509_STORE_CTX_get_error(store); X509 *cert = X509_STORE_CTX_get_current_cert(store); - fprintf(stderr, "SSL verify error or warning with certificate at depth %d: %s\n", X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(err)); + fprintf(stderr, "\nDEBUG mode TLS/SSL warnings:\nSSL verify error %d or warning with certificate at depth %d: %s\n", err, X509_STORE_CTX_get_error_depth(store), X509_verify_cert_error_string(err)); X509_NAME_oneline(X509_get_issuer_name(cert), buf, sizeof(buf)); - fprintf(stderr, "certificate issuer %s\n", buf); + fprintf(stderr, " certificate issuer: %s\n", buf); X509_NAME_oneline(X509_get_subject_name(cert), buf, sizeof(buf)); - fprintf(stderr, "certificate subject %s\n", buf); - /* accept self signed certificates and certificates out of date */ + fprintf(stderr, " certificate subject: %s\n", buf); + /* accept self-signed certificates and certificates out of date */ switch (err) { case X509_V_ERR_CERT_NOT_YET_VALID: case X509_V_ERR_CERT_HAS_EXPIRED: case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: + case X509_V_ERR_UNABLE_TO_GET_CRL: + case X509_V_ERR_CRL_NOT_YET_VALID: + case X509_V_ERR_CRL_HAS_EXPIRED: X509_STORE_CTX_set_error(store, X509_V_OK); ok = 1; + fprintf(stderr, "Initialize soap_ssl_client_context with SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE to allow this verification error to pass without DEBUG mode enabled\n"); } } #endif - /* Note: return 1 to continue, but unsafe progress will be terminated by OpenSSL */ + /* Note: return 1 to try to continue, but unsafe progress will be terminated by OpenSSL */ return ok; } #endif #endif /******************************************************************************/ + #ifdef WITH_OPENSSL #ifndef PALM_1 static int ssl_verify_callback_allow_expired_certificate(int ok, X509_STORE_CTX *store) { ok = ssl_verify_callback(ok, store); if (!ok) - { /* accept self signed certificates and certificates out of date */ + { /* accept self signed certificates, expired certificates, and certficiates w/o CRL */ switch (X509_STORE_CTX_get_error(store)) { case X509_V_ERR_CERT_NOT_YET_VALID: case X509_V_ERR_CERT_HAS_EXPIRED: case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: + case X509_V_ERR_UNABLE_TO_GET_CRL: + case X509_V_ERR_CRL_NOT_YET_VALID: + case X509_V_ERR_CRL_HAS_EXPIRED: X509_STORE_CTX_set_error(store, X509_V_OK); ok = 1; } @@ -3515,6 +4008,7 @@ ssl_verify_callback_allow_expired_certificate(int ok, X509_STORE_CTX *store) #endif /******************************************************************************/ + #ifdef WITH_GNUTLS static const char * ssl_verify(struct soap *soap, const char *host) @@ -3554,6 +4048,7 @@ ssl_verify(struct soap *soap, const char *host) #endif /******************************************************************************/ + #if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) #ifndef WITH_NOIO #ifndef PALM_1 @@ -3568,7 +4063,7 @@ soap_ssl_accept(struct soap *soap) if (!soap_valid_socket(sk)) return soap_set_receiver_error(soap, "SSL/TLS error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR); soap->ssl_flags &= ~SOAP_SSL_CLIENT; - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) + if (!soap->ctx && (soap->error = soap->fsslauth(soap)) != SOAP_OK) return soap->error; if (!soap->ssl) { soap->ssl = SSL_new(soap->ctx); @@ -3630,7 +4125,7 @@ soap_ssl_accept(struct soap *soap) if (!soap_valid_socket(sk)) return soap_set_receiver_error(soap, "SSL/TLS error", "No socket in soap_ssl_accept()", SOAP_SSL_ERROR); soap->ssl_flags &= ~SOAP_SSL_CLIENT; - if (!soap->session && (soap->error = soap->fsslauth(soap))) + if (!soap->session && (soap->error = soap->fsslauth(soap)) != SOAP_OK) { soap_closesock(soap); return soap->error; } @@ -3672,6 +4167,50 @@ soap_ssl_accept(struct soap *soap) } } #endif +#ifdef WITH_SYSTEMSSL + gsk_iocallback local_io = { ssl_recv, ssl_send, NULL, NULL, NULL, NULL }; + int err, s; + int retries = 0; + if (soap->accept_timeout) + { SOAP_SOCKNONBLOCK(sk) + retries = 10*soap->accept_timeout; + } + if (retries <= 0) + retries = 100; /* timeout: 10 sec retries, 100 times 0.1 sec */ + err = gsk_secure_socket_open(soap->ctx, &soap->ssl); + if (err == GSK_OK) + err = gsk_attribute_set_numeric_value(soap->ssl, GSK_FD, sk); + if (err == GSK_OK) + err = gsk_attribute_set_buffer(soap->ssl, GSK_KEYRING_LABEL, soap->cafile, 0); + if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ssl, GSK_SESSION_TYPE, GSK_SERVER_SESSION); + if (err == GSK_OK) + err = gsk_attribute_set_buffer(soap->ssl, GSK_V3_CIPHER_SPECS_EXPANDED, "0035002F000A", 0); + if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ssl, GSK_V3_CIPHERS, GSK_V3_CIPHERS_CHAR4); + if (err == GSK_OK) + err = gsk_attribute_set_callback(soap->ssl, GSK_IO_CALLBACK, &local_io); + if (err != GSK_OK) + return soap_set_receiver_error(soap, gsk_strerror(err), "SYSTEM SSL error in soap_ssl_accept()", SOAP_SSL_ERROR); + while ((err = gsk_secure_socket_init(soap->ssl)) != GSK_OK) + { if (retries-- <= 0) + break; + if (err == GSK_WOULD_BLOCK_READ || err == GSK_WOULD_BLOCK_WRITE) + { if (err == GSK_WOULD_BLOCK_READ) + s = tcp_select(soap, sk, SOAP_TCP_SELECT_RCV | SOAP_TCP_SELECT_ERR, -100000); + else + s = tcp_select(soap, sk, SOAP_TCP_SELECT_SND | SOAP_TCP_SELECT_ERR, -100000); + if (s < 0) + break; + } + else + { soap->errnum = soap_socket_errno(sk); + break; + } + } + if (err != GSK_OK) + return soap_set_receiver_error(soap, gsk_strerror(err), "gsk_secure_socket_init() failed in soap_ssl_accept()", SOAP_SSL_ERROR); +#endif if (soap->recv_timeout || soap->send_timeout) SOAP_SOCKNONBLOCK(sk) else @@ -3686,11 +4225,10 @@ soap_ssl_accept(struct soap *soap) /******************************************************************************\ * - * TCP/UDP [SSL/TLS] IPv4 and IPv6 + * TCP/UDP [SSL/TLS] IPv4 and IPv6 * \******************************************************************************/ -/******************************************************************************/ #ifndef WITH_NOIO #ifndef PALM_1 static int @@ -3712,11 +4250,12 @@ tcp_init(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 static const char* tcp_error(struct soap *soap) -{ register const char *msg = NULL; +{ const char *msg = NULL; switch (soap->errmode) { case 0: msg = soap_strerror(soap); @@ -3730,12 +4269,7 @@ tcp_error(struct soap *soap) msg = soap_code_str(h_error_codes, soap->errnum); if (!msg) #endif - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->msgbuf, sizeof(soap->msgbuf), "TCP/UDP IP error %d", soap->errnum); -#else - sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum); -#endif + { (SOAP_SNPRINTF(soap->msgbuf, sizeof(soap->msgbuf), 37), "TCP/UDP IP error %d", soap->errnum); msg = soap->msgbuf; } } @@ -3746,6 +4280,7 @@ tcp_error(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_IPV6 #ifndef WITH_NOIO #ifndef PALM_1 @@ -3764,15 +4299,16 @@ tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) #ifdef AS400 iadd = inet_addr((void*)addr); #else - iadd = inet_addr(addr); + iadd = inet_addr((char*)addr); #endif #endif if (iadd != -1) - { memcpy(inaddr, &iadd, sizeof(iadd)); + { if (soap_memcpy((void*)inaddr, sizeof(struct in_addr), (const void*)&iadd, sizeof(iadd))) + return soap->error = SOAP_EOM; return SOAP_OK; } #if defined(__GLIBC__) || (defined(HAVE_GETHOSTBYNAME_R) && (defined(FREEBSD) || defined(__FreeBSD__))) || defined(__ANDROID__) - if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0) + if (gethostbyname_r(addr, &hostent, soap->buf, sizeof(soap->buf), &host, &soap->errnum) < 0) host = NULL; #elif defined(_AIX43) || ((defined(TRU64) || defined(HP_UX)) && defined(HAVE_GETHOSTBYNAME_R)) memset((void*)&ht_data, 0, sizeof(ht_data)); @@ -3781,7 +4317,7 @@ tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) soap->errnum = h_errno; } #elif defined(HAVE_GETHOSTBYNAME_R) - host = gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &soap->errnum); + host = gethostbyname_r(addr, &hostent, soap->buf, sizeof(soap->buf), &soap->errnum); #elif defined(VXWORKS) /* If the DNS resolver library resolvLib has been configured in the vxWorks * image, a query for the host IP address is sent to the DNS server, if the @@ -3793,12 +4329,12 @@ tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) } #else #ifdef AS400 - if (!(host = gethostbyname((void*)addr))) - soap->errnum = h_errno; + host = gethostbyname((void*)addr); #else - if (!(host = gethostbyname(addr))) - soap->errnum = h_errno; + host = gethostbyname((char*)addr); #endif + if (!host) + soap->errnum = h_errno; #endif if (!host) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Host name not found\n")); @@ -3807,7 +4343,8 @@ tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) #ifdef VXWORKS inaddr->s_addr = hostint; #else - memcpy(inaddr, host->h_addr, host->h_length); + if (soap_memcpy((void*)inaddr, sizeof(struct in_addr), (const void*)host->h_addr, (size_t)host->h_length)) + return soap->error = SOAP_EOM; #endif return SOAP_OK; } @@ -3816,6 +4353,7 @@ tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 static SOAP_SOCKET @@ -3827,14 +4365,9 @@ tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port) SOAP_SOCKET sk; int err = 0; #ifndef WITH_LEAN -#ifndef WIN32 - int len = SOAP_BUFLEN; -#else - int len = SOAP_BUFLEN + 1; /* speeds up windows xfer */ -#endif int set = 1; #endif -#if !defined(WITH_LEAN) || defined(WITH_OPENSSL) || defined(WITH_GNUTLS) +#if !defined(WITH_LEAN) || defined(WITH_OPENSSL) || defined(WITH_GNUTLS) || defined(WITH_SYSTEMSSL) int retries; #endif if (soap_valid_socket(soap->socket)) @@ -3842,13 +4375,17 @@ tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port) soap->socket = SOAP_INVALID_SOCKET; if (tcp_init(soap)) { soap->errnum = 0; - soap_set_sender_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "TCP init failed in tcp_connect()", SOAP_TCP_ERROR); return SOAP_INVALID_SOCKET; } soap->errmode = 0; #ifdef WITH_IPV6 memset((void*)&hints, 0, sizeof(hints)); +#ifdef WITH_IPV6_V6ONLY + hints.ai_family = PF_INET6; +#else hints.ai_family = PF_UNSPEC; +#endif #ifndef WITH_LEAN if ((soap->omode & SOAP_IO_UDP)) hints.ai_socktype = SOCK_DGRAM; @@ -3860,13 +4397,14 @@ tcp_connect(struct soap *soap, const char *endpoint, const char *host, int port) err = getaddrinfo(soap->proxy_host, soap_int2s(soap, soap->proxy_port), &hints, &res); else err = getaddrinfo(host, soap_int2s(soap, port), &hints, &res); - if (err) - { soap_set_sender_error(soap, SOAP_GAI_STRERROR(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR); + if (err || !res) + { soap_set_receiver_error(soap, SOAP_GAI_STRERROR(err), "getaddrinfo failed in tcp_connect()", SOAP_TCP_ERROR); return SOAP_INVALID_SOCKET; } ressave = res; again: sk = socket(res->ai_family, res->ai_socktype, res->ai_protocol); + soap->error = SOAP_OK; soap->errmode = 0; #else #ifndef WITH_LEAN @@ -3888,13 +4426,13 @@ again: } #endif soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "socket failed in tcp_connect()", SOAP_TCP_ERROR); #ifdef WITH_IPV6 freeaddrinfo(ressave); #endif return SOAP_INVALID_SOCKET; } -#ifdef SOCKET_CLOSE_ON_EXEC +#ifdef SOCKET_CLOSE_ON_EXIT #ifdef WIN32 #ifndef UNDER_CE SetHandleInformation((HANDLE)sk, HANDLE_FLAG_INHERIT, 0); @@ -3904,14 +4442,14 @@ again: #endif #endif #ifndef WITH_LEAN - if (soap->connect_flags == SO_LINGER) + if ((soap->connect_flags & SO_LINGER)) { struct linger linger; memset((void*)&linger, 0, sizeof(linger)); linger.l_onoff = 1; linger.l_linger = soap->linger_time; if (setsockopt(sk, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(struct linger))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_LINGER failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); #ifdef WITH_IPV6 freeaddrinfo(ressave); @@ -3919,36 +4457,37 @@ again: return SOAP_INVALID_SOCKET; } } - else if (soap->connect_flags && setsockopt(sk, SOL_SOCKET, soap->connect_flags, (char*)&set, sizeof(int))) + if ((soap->connect_flags & ~SO_LINGER) && setsockopt(sk, SOL_SOCKET, soap->connect_flags & ~SO_LINGER, (char*)&set, sizeof(int))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); #ifdef WITH_IPV6 freeaddrinfo(ressave); #endif return SOAP_INVALID_SOCKET; } +#ifndef UNDER_CE if ((soap->keep_alive || soap->tcp_keep_alive) && setsockopt(sk, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); #ifdef WITH_IPV6 freeaddrinfo(ressave); #endif return SOAP_INVALID_SOCKET; } - if (setsockopt(sk, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) + if (soap->sndbuf > 0 && setsockopt(sk, SOL_SOCKET, SO_SNDBUF, (char*)&soap->sndbuf, sizeof(int))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); #ifdef WITH_IPV6 freeaddrinfo(ressave); #endif return SOAP_INVALID_SOCKET; } - if (setsockopt(sk, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) + if (soap->rcvbuf > 0 && setsockopt(sk, SOL_SOCKET, SO_RCVBUF, (char*)&soap->rcvbuf, sizeof(int))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); #ifdef WITH_IPV6 freeaddrinfo(ressave); @@ -3958,7 +4497,7 @@ again: #ifdef TCP_KEEPIDLE if (soap->tcp_keep_idle && setsockopt((SOAP_SOCKET)sk, IPPROTO_TCP, TCP_KEEPIDLE, (char*)&(soap->tcp_keep_idle), sizeof(int))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_KEEPIDLE failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_KEEPIDLE failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, (SOAP_SOCKET)sk); #ifdef WITH_IPV6 freeaddrinfo(ressave); @@ -3969,7 +4508,7 @@ again: #ifdef TCP_KEEPINTVL if (soap->tcp_keep_intvl && setsockopt((SOAP_SOCKET)sk, IPPROTO_TCP, TCP_KEEPINTVL, (char*)&(soap->tcp_keep_intvl), sizeof(int))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_KEEPINTVL failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_KEEPINTVL failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, (SOAP_SOCKET)sk); #ifdef WITH_IPV6 freeaddrinfo(ressave); @@ -3980,7 +4519,7 @@ again: #ifdef TCP_KEEPCNT if (soap->tcp_keep_cnt && setsockopt((SOAP_SOCKET)sk, IPPROTO_TCP, TCP_KEEPCNT, (char*)&(soap->tcp_keep_cnt), sizeof(int))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_KEEPCNT failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_KEEPCNT failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, (SOAP_SOCKET)sk); #ifdef WITH_IPV6 freeaddrinfo(ressave); @@ -3991,7 +4530,7 @@ again: #ifdef TCP_NODELAY if (!(soap->omode & SOAP_IO_UDP) && setsockopt(sk, IPPROTO_TCP, TCP_NODELAY, (char*)&set, sizeof(int))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_NODELAY failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); #ifdef WITH_IPV6 freeaddrinfo(ressave); @@ -4011,8 +4550,11 @@ again: { unsigned char ttl = soap->ipv4_multicast_ttl; if (setsockopt(sk, IPPROTO_IP, IP_MULTICAST_TTL, (char*)&ttl, sizeof(ttl))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt IP_MULTICAST_TTL failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt IP_MULTICAST_TTL failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); +#ifdef WITH_IPV6 + freeaddrinfo(ressave); +#endif return SOAP_INVALID_SOCKET; } } @@ -4020,8 +4562,11 @@ again: { if (setsockopt(sk, IPPROTO_IP, IP_MULTICAST_IF, (char*)soap->ipv4_multicast_if, sizeof(struct in_addr))) #ifndef WINDOWS { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt IP_MULTICAST_IF failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt IP_MULTICAST_IF failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); +#ifdef WITH_IPV6 + freeaddrinfo(ressave); +#endif return SOAP_INVALID_SOCKET; } #else @@ -4030,8 +4575,11 @@ again: #endif if (setsockopt(sk, IPPROTO_IP, IP_MULTICAST_IF, (char*)soap->ipv4_multicast_if, sizeof(struct in_addr))) { soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "setsockopt IP_MULTICAST_IF failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "setsockopt IP_MULTICAST_IF failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); +#ifdef WITH_IPV6 + freeaddrinfo(ressave); +#endif return SOAP_INVALID_SOCKET; } #endif @@ -4039,27 +4587,28 @@ again: } #endif #endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Opening socket=%d to host='%s' port=%d\n", sk, host, port)); +#endif + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Opening socket=%d to host='%s' port=%d\n", sk, host, port)); #ifndef WITH_IPV6 - soap->peerlen = sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->peer.sin_family = AF_INET; + soap->peerlen = sizeof(soap->peer.in); + memset((void*)&soap->peer.in, 0, sizeof(soap->peer.in)); + soap->peer.in.sin_family = AF_INET; soap->errmode = 2; if (soap->proxy_host) - { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR); + { if (soap->fresolve(soap, soap->proxy_host, &soap->peer.in.sin_addr)) + { soap_set_receiver_error(soap, tcp_error(soap), "get proxy host by name failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); return SOAP_INVALID_SOCKET; } - soap->peer.sin_port = htons((short)soap->proxy_port); + soap->peer.in.sin_port = htons((short)soap->proxy_port); } else - { if (soap->fresolve(soap, host, &soap->peer.sin_addr)) - { soap_set_sender_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR); + { if (soap->fresolve(soap, host, &soap->peer.in.sin_addr)) + { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); return SOAP_INVALID_SOCKET; } - soap->peer.sin_port = htons((short)port); + soap->peer.in.sin_port = htons((short)port); } soap->errmode = 0; #ifndef WITH_LEAN @@ -4068,7 +4617,11 @@ again: #endif #else if ((soap->omode & SOAP_IO_UDP)) - { memcpy(&soap->peer, res->ai_addr, res->ai_addrlen); + { if (soap_memcpy((void*)&soap->peer.storage, sizeof(soap->peer.storage), (const void*)res->ai_addr, res->ai_addrlen)) + { soap->error = SOAP_EOM; + soap->fclosesocket(soap, sk); + sk = SOAP_INVALID_SOCKET; + } soap->peerlen = res->ai_addrlen; freeaddrinfo(ressave); return sk; @@ -4086,9 +4639,16 @@ again: #ifdef WITH_IPV6 if (connect(sk, res->ai_addr, (int)res->ai_addrlen)) #else - if (connect(sk, (struct sockaddr*)&soap->peer, sizeof(soap->peer))) + if (connect(sk, &soap->peer.addr, sizeof(soap->peer.in))) #endif { err = soap_socket_errno(sk); +#ifdef WITH_IPV6 + if (err == SOAP_ECONNREFUSED && res->ai_next) + { soap->fclosesocket(soap, sk); + res = res->ai_next; + goto again; + } +#endif #ifndef WITH_LEAN if (err == SOAP_EADDRINUSE) { soap->fclosesocket(soap, sk); @@ -4099,15 +4659,19 @@ again: { SOAP_SOCKLEN_T k; for (;;) - { register int r; + { int r; r = tcp_select(soap, sk, SOAP_TCP_SELECT_SND, soap->connect_timeout); if (r > 0) break; if (!r) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, "Timeout", "connect failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); #ifdef WITH_IPV6 + if (res->ai_next) + { res = res->ai_next; + goto again; + } freeaddrinfo(ressave); #endif return SOAP_INVALID_SOCKET; @@ -4115,23 +4679,31 @@ again: r = soap->errnum = soap_socket_errno(sk); if (r != SOAP_EINTR) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); #ifdef WITH_IPV6 + if (res->ai_next) + { res = res->ai_next; + goto again; + } freeaddrinfo(ressave); #endif return SOAP_INVALID_SOCKET; } } k = (SOAP_SOCKLEN_T)sizeof(soap->errnum); - if (!getsockopt(sk, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum) /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ + if (!getsockopt(sk, SOL_SOCKET, SO_ERROR, (char*)&soap->errnum, &k) && !soap->errnum) /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ break; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); if (!soap->errnum) soap->errnum = soap_socket_errno(sk); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); #ifdef WITH_IPV6 + if (res->ai_next) + { res = res->ai_next; + goto again; + } freeaddrinfo(ressave); #endif return SOAP_INVALID_SOCKET; @@ -4147,7 +4719,7 @@ again: if (err && err != SOAP_EINTR) { soap->errnum = err; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not connect to host\n")); - soap_set_sender_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "connect failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); #ifdef WITH_IPV6 freeaddrinfo(ressave); @@ -4165,12 +4737,15 @@ again: soap->socket = sk; soap->imode &= ~SOAP_ENC_SSL; soap->omode &= ~SOAP_ENC_SSL; - if (!soap_tag_cmp(endpoint, "https:*")) + if (endpoint && !soap_tag_cmp(endpoint, "https:*")) { -#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) +#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) || defined(WITH_SYSTEMSSL) #ifdef WITH_OPENSSL BIO *bio; #endif +#ifdef WITH_SYSTEMSSL + gsk_iocallback local_io = { ssl_recv, ssl_send, NULL, NULL, NULL, NULL }; +#endif int r; if (soap->proxy_host) { soap_mode m = soap->mode; /* preserve settings */ @@ -4194,7 +4769,8 @@ again: } soap->status = SOAP_CONNECT; soap->keep_alive = 1; - if ((soap->error = soap->fpost(soap, endpoint, host, port, NULL, NULL, 0)) + soap->error = soap->fpost(soap, endpoint, host, port, NULL, NULL, 0); + if (soap->error || soap_end_send_flush(soap)) { soap->fclosesocket(soap, sk); return SOAP_INVALID_SOCKET; @@ -4205,7 +4781,8 @@ again: soap->imode &= ~SOAP_ENC; /* mask IO and ENC */ userid = soap->userid; /* preserve */ passwd = soap->passwd; /* preserve */ - if ((soap->error = soap->fparse(soap))) + soap->error = soap->fparse(soap); + if (soap->error) { soap->fclosesocket(soap, sk); return SOAP_INVALID_SOCKET; } @@ -4219,14 +4796,12 @@ again: return SOAP_INVALID_SOCKET; } if (endpoint) - { strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint)); /* restore */ - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; - } + soap_strcpy(soap->endpoint, sizeof(soap->endpoint), endpoint); /* restore */ soap->mode = m; } #ifdef WITH_OPENSSL soap->ssl_flags |= SOAP_SSL_CLIENT; - if (!soap->ctx && (soap->error = soap->fsslauth(soap))) + if (!soap->ctx && (soap->error = soap->fsslauth(soap)) != SOAP_OK) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "SSL required, but no ctx set\n")); soap->fclosesocket(soap, sk); soap->error = SOAP_SSL_ERROR; @@ -4248,8 +4823,19 @@ again: SSL_SESSION_free(soap->session); soap->session = NULL; } - soap->imode |= SOAP_ENC_SSL; - soap->omode |= SOAP_ENC_SSL; +#if (OPENSSL_VERSION_NUMBER >= 0x1000000aL) + if (!(soap->ssl_flags & SOAP_SSLv3) && !SSL_set_tlsext_host_name(soap->ssl, host)) + { soap_set_receiver_error(soap, "SSL/TLS error", "SNI failed", SOAP_SSL_ERROR); + soap->fclosesocket(soap, sk); + return SOAP_INVALID_SOCKET; + } +#elif (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && defined(SSL_CTRL_SET_TLSEXT_HOSTNAME) + if (!SSL_ctrl(soap->ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, (void*)host)) + { soap_set_receiver_error(soap, "SSL/TLS error", "SNI failed", SOAP_SSL_ERROR); + soap->fclosesocket(soap, sk); + return SOAP_INVALID_SOCKET; + } +#endif bio = BIO_new_socket((int)sk, BIO_NOCLOSE); SSL_set_bio(soap->ssl, bio, bio); /* Connect timeout: set SSL sockets to non-blocking */ @@ -4267,26 +4853,26 @@ again: { if ((r = SSL_connect(soap->ssl)) <= 0) { int err = SSL_get_error(soap->ssl, r); if (err == SSL_ERROR_WANT_CONNECT || err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) - { register int s; + { int s; if (err == SSL_ERROR_WANT_READ) s = tcp_select(soap, sk, SOAP_TCP_SELECT_RCV | SOAP_TCP_SELECT_ERR, -100000); else s = tcp_select(soap, sk, SOAP_TCP_SELECT_SND | SOAP_TCP_SELECT_ERR, -100000); if (s < 0) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "SSL_connect/select error in tcp_connect\n")); - soap_set_sender_error(soap, soap_ssl_error(soap, r), "SSL_connect failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, soap_ssl_error(soap, r), "SSL_connect failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); return SOAP_INVALID_SOCKET; } if (s == 0 && retries-- <= 0) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "SSL/TLS connect timeout\n")); - soap_set_sender_error(soap, "Timeout", "SSL_connect failed in tcp_connect()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, "Timeout", "SSL_connect failed in tcp_connect()", SOAP_TCP_ERROR); soap->fclosesocket(soap, sk); return SOAP_INVALID_SOCKET; } } else - { soap_set_sender_error(soap, soap_ssl_error(soap, r), "SSL_connect error in tcp_connect()", SOAP_SSL_ERROR); + { soap_set_receiver_error(soap, soap_ssl_error(soap, r), "SSL_connect error in tcp_connect()", SOAP_SSL_ERROR); soap->fclosesocket(soap, sk); return SOAP_INVALID_SOCKET; } @@ -4337,18 +4923,17 @@ again: if (meth->it) ext_data = ASN1_item_d2i(NULL, &data, ext->value->length, ASN1_ITEM_ptr(meth->it)); else - { /* OpenSSL is not portable at this point (?): - Some compilers appear to prefer - meth->d2i(NULL, (const unsigned char**)&data, ... - and others prefer - meth->d2i(NULL, &data, ext->value->length); - */ + { +#if (OPENSSL_VERSION_NUMBER > 0x0090800fL) + ext_data = meth->d2i(NULL, (const unsigned char **)&data, ext->value->length); +#else ext_data = meth->d2i(NULL, &data, ext->value->length); +#endif } if (ext_data) val = meth->i2v(meth, ext_data, NULL); - else - val = NULL; + else + val = NULL; if (meth->it) ASN1_item_free((ASN1_VALUE*)ext_data, ASN1_ITEM_ptr(meth->it)); else @@ -4359,11 +4944,11 @@ again: val = meth->i2v(meth, ext_data, NULL); meth->ext_free(ext_data); #endif - if (val) + if (val) { int j; for (j = 0; j < sk_CONF_VALUE_num(val); j++) { CONF_VALUE *nval = sk_CONF_VALUE_value(val, j); - if (nval && !strcmp(nval->name, "DNS") && !strcmp(nval->value, host)) + if (nval && (!strcmp(nval->name, "DNS") || !strcmp(nval->name,"IP Address")) && !soap_tag_cmp(nval->value, host)) { ok = 1; break; } @@ -4386,7 +4971,7 @@ again: { int j; for (j = 0; j < sk_CONF_VALUE_num(val); j++) { CONF_VALUE *nval = sk_CONF_VALUE_value(val, j); - if (nval && !strcmp(nval->name, "DNS") && !strcmp(nval->value, host)) + if (nval && (!strcmp(nval->name, "DNS") || !strcmp(nval->name,"IP Address")) && !soap_tag_cmp(nval->value, host)) { ok = 1; break; } @@ -4394,7 +4979,7 @@ again: sk_CONF_VALUE_pop_free(val, X509V3_conf_free); } #endif - if (!ok && (subj = X509_get_subject_name(peer))) + if (!ok && (subj = X509_get_subject_name(peer)) != 0) { int i = -1; do { ASN1_STRING *name; @@ -4433,7 +5018,7 @@ again: #endif #ifdef WITH_GNUTLS soap->ssl_flags |= SOAP_SSL_CLIENT; - if (!soap->session && (soap->error = soap->fsslauth(soap))) + if (!soap->session && (soap->error = soap->fsslauth(soap)) != SOAP_OK) { soap->fclosesocket(soap, sk); return SOAP_INVALID_SOCKET; } @@ -4474,11 +5059,75 @@ again: { const char *err = ssl_verify(soap, host); if (err) { soap->fclosesocket(soap, sk); - soap->error = soap_set_sender_error(soap, "SSL/TLS error", err, SOAP_SSL_ERROR); + soap->error = soap_set_sender_error(soap, "SSL/TLS verify error", err, SOAP_SSL_ERROR); return SOAP_INVALID_SOCKET; } } #endif +#ifdef WITH_SYSTEMSSL + soap->ssl_flags |= SOAP_SSL_CLIENT; + if (!soap->ctx && (soap->error = soap->fsslauth(soap)) != SOAP_OK) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "SSL required, but no ctx set\n")); + soap->fclosesocket(soap, sk); + soap->error = SOAP_SSL_ERROR; + return SOAP_INVALID_SOCKET; + } + /* Connect timeout: set SSL sockets to non-blocking */ + retries = 0; + if (soap->connect_timeout) + { SOAP_SOCKNONBLOCK(sk) + retries = 10*soap->connect_timeout; + } + else + SOAP_SOCKBLOCK(sk) + if (retries <= 0) + retries = 100; /* timeout: 10 sec retries, 100 times 0.1 sec */ + err = gsk_secure_socket_open(soap->ctx, &soap->ssl); + if (err == GSK_OK) + err = gsk_attribute_set_numeric_value(soap->ssl, GSK_FD, sk); + if (err == GSK_OK) + err = gsk_attribute_set_buffer(soap->ssl, GSK_KEYRING_LABEL, soap->cafile, 0); /* Certificate label */ + if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ssl, GSK_SESSION_TYPE, GSK_CLIENT_SESSION); + if (err == GSK_OK) + err = gsk_attribute_set_buffer(soap->ssl, GSK_V3_CIPHER_SPECS_EXPANDED, "0035002F000A", 0); + if (err == GSK_OK) + err = gsk_attribute_set_enum(soap->ssl, GSK_V3_CIPHERS, GSK_V3_CIPHERS_CHAR4); + if (err == GSK_OK) + err = gsk_attribute_set_callback(soap->ssl, GSK_IO_CALLBACK, &local_io); + if (err != GSK_OK) + { soap_set_receiver_error(soap, gsk_strerror(err), "SYSTEM SSL error in tcp_connect()", SOAP_SSL_ERROR); + return SOAP_INVALID_SOCKET; + } + /* Try connecting until success or timeout (when nonblocking) */ + while ((err = gsk_secure_socket_init(soap->ssl)) != GSK_OK) + { if (err == GSK_WOULD_BLOCK_READ || err == GSK_WOULD_BLOCK_WRITE) + { if (err == GSK_WOULD_BLOCK_READ) + r = tcp_select(soap, sk, SOAP_TCP_SELECT_RCV | SOAP_TCP_SELECT_ERR, -100000); + else + r = tcp_select(soap, sk, SOAP_TCP_SELECT_SND | SOAP_TCP_SELECT_ERR, -100000); + if (r < 0) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "SSL_connect/select error in tcp_connect\n")); + soap_set_receiver_error(soap, gsk_strerror(err), "gsk_secure_socket_init failed in tcp_connect()", SOAP_TCP_ERROR); + soap->fclosesocket(soap, sk); + return SOAP_INVALID_SOCKET; + } + if (r == 0 && retries-- <= 0) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "SSL/TLS connect timeout\n")); + soap_set_receiver_error(soap, "Timeout", "in tcp_connect()", SOAP_TCP_ERROR); + soap->fclosesocket(soap, sk); + return SOAP_INVALID_SOCKET; + } + } + else + { soap_set_receiver_error(soap, gsk_strerror(err), "gsk_secure_socket_init() failed in tcp_connect()", SOAP_SSL_ERROR); + soap->fclosesocket(soap, sk); + return SOAP_INVALID_SOCKET; + } + } +#endif + soap->imode |= SOAP_ENC_SSL; + soap->omode |= SOAP_ENC_SSL; #else soap->fclosesocket(soap, sk); soap->error = SOAP_SSL_ERROR; @@ -4495,6 +5144,7 @@ again: #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 static int @@ -4531,9 +5181,11 @@ tcp_select(struct soap *soap, SOAP_SOCKET sk, int flags, int timeout) } do { r = poll(&pollfd, 1, timeout); - if (r < 0 && (soap->errnum = soap_socket_errno(sk)) == SOAP_EINTR && eintr--) - continue; - } while (r == 0 && retries--); + if (r < 0 && (soap->errnum = soap_socket_errno(sk)) == SOAP_EINTR && eintr-- > 0) + r = 0; + else if (retries-- <= 0) + break; + } while (r == 0); if (r > 0) { r = 0; if ((flags & SOAP_TCP_SELECT_RCV) && (pollfd.revents & POLLIN)) @@ -4543,6 +5195,8 @@ tcp_select(struct soap *soap, SOAP_SOCKET sk, int flags, int timeout) if ((flags & SOAP_TCP_SELECT_ERR) && (pollfd.revents & POLLERR)) r |= SOAP_TCP_SELECT_ERR; } + else if (r == 0) + soap->errnum = 0; return r; } #else @@ -4579,9 +5233,11 @@ tcp_select(struct soap *soap, SOAP_SOCKET sk, int flags, int timeout) tv.tv_usec = 0; } r = select((int)sk + 1, rfd, sfd, efd, &tv); - if (r < 0 && (soap->errnum = soap_socket_errno(sk)) == SOAP_EINTR && eintr--) - continue; - } while (r == 0 && retries--); + if (r < 0 && (soap->errnum = soap_socket_errno(sk)) == SOAP_EINTR && eintr-- > 0) + r = 0; + else if (retries-- <= 0) + break; + } while (r == 0); if (r > 0) { r = 0; if ((flags & SOAP_TCP_SELECT_RCV) && FD_ISSET(sk, rfd)) @@ -4591,12 +5247,15 @@ tcp_select(struct soap *soap, SOAP_SOCKET sk, int flags, int timeout) if ((flags & SOAP_TCP_SELECT_ERR) && FD_ISSET(sk, efd)) r |= SOAP_TCP_SELECT_ERR; } + else if (r == 0) + soap->errnum = 0; return r; } #endif #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 static SOAP_SOCKET @@ -4604,7 +5263,7 @@ tcp_accept(struct soap *soap, SOAP_SOCKET s, struct sockaddr *a, int *n) { SOAP_SOCKET sk; (void)soap; sk = accept(s, a, (SOAP_SOCKLEN_T*)n); /* portability note: see SOAP_SOCKLEN_T definition in stdsoap2.h */ -#ifdef SOCKET_CLOSE_ON_EXEC +#ifdef SOCKET_CLOSE_ON_EXIT #ifdef WIN32 #ifndef UNDER_CE SetHandleInformation((HANDLE)sk, HANDLE_FLAG_INHERIT, 0); @@ -4619,6 +5278,7 @@ tcp_accept(struct soap *soap, SOAP_SOCKET s, struct sockaddr *a, int *n) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 static int @@ -4634,7 +5294,7 @@ tcp_disconnect(struct soap *soap) if (*soap->host) { soap->session = SSL_get1_session(soap->ssl); if (soap->session) - { strcpy(soap->session_host, soap->host); + { soap_strcpy(soap->session_host, sizeof(soap->session_host), soap->host); soap->session_port = soap->port; } } @@ -4700,6 +5360,12 @@ tcp_disconnect(struct soap *soap) soap->session = NULL; } #endif +#ifdef WITH_SYSTEMSSL + if (soap->ssl) + { gsk_secure_socket_shutdown(soap->ssl); + gsk_secure_socket_close(&soap->ssl); + } +#endif if (soap_valid_socket(soap->socket) && !(soap->omode & SOAP_IO_UDP)) { soap->fshutdownsocket(soap, soap->socket, SOAP_SHUT_RDWR); soap->fclosesocket(soap, soap->socket); @@ -4711,6 +5377,7 @@ tcp_disconnect(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 static int @@ -4723,6 +5390,7 @@ tcp_closesocket(struct soap *soap, SOAP_SOCKET sk) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 static int @@ -4735,6 +5403,7 @@ tcp_shutdownsocket(struct soap *soap, SOAP_SOCKET sk, int how) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 SOAP_FMAC1 @@ -4752,11 +5421,6 @@ soap_bind(struct soap *soap, const char *host, int port, int backlog) #endif #endif #ifndef WITH_LEAN -#ifndef WIN32 - int len = SOAP_BUFLEN; -#else - int len = SOAP_BUFLEN + 1; /* speeds up windows xfer */ -#endif int set = 1; #endif if (soap_valid_socket(soap->master)) @@ -4771,7 +5435,11 @@ soap_bind(struct soap *soap, const char *host, int port, int backlog) } #ifdef WITH_IPV6 memset((void*)&hints, 0, sizeof(hints)); +#ifdef WITH_IPV6_V6ONLY + hints.ai_family = PF_INET6; +#else hints.ai_family = PF_UNSPEC; +#endif #ifndef WITH_LEAN if ((soap->omode & SOAP_IO_UDP)) hints.ai_socktype = SOCK_DGRAM; @@ -4783,12 +5451,18 @@ soap_bind(struct soap *soap, const char *host, int port, int backlog) err = getaddrinfo(host, soap_int2s(soap, port), &hints, &addrinfo); if (err || !addrinfo) { soap_set_receiver_error(soap, SOAP_GAI_STRERROR(err), "getaddrinfo failed in soap_bind()", SOAP_TCP_ERROR); + if (addrinfo) + freeaddrinfo(addrinfo); return SOAP_INVALID_SOCKET; } res = *addrinfo; - memcpy(&soap->peer, addrinfo->ai_addr, addrinfo->ai_addrlen); + if (soap_memcpy((void*)&soap->peer.storage, sizeof(soap->peer.storage), (const void*)addrinfo->ai_addr, addrinfo->ai_addrlen)) + { freeaddrinfo(addrinfo); + soap->error = SOAP_EOM; + return SOAP_INVALID_SOCKET; + } soap->peerlen = addrinfo->ai_addrlen; - res.ai_addr = (struct sockaddr*)&soap->peer; + res.ai_addr = &soap->peer.addr; res.ai_addrlen = soap->peerlen; freeaddrinfo(addrinfo); soap->master = (int)socket(res.ai_family, res.ai_socktype, res.ai_protocol); @@ -4811,7 +5485,7 @@ soap_bind(struct soap *soap, const char *host, int port, int backlog) if ((soap->omode & SOAP_IO_UDP)) soap->socket = soap->master; #endif -#ifdef SOCKET_CLOSE_ON_EXEC +#ifdef SOCKET_CLOSE_ON_EXIT #ifdef WIN32 #ifndef UNDER_CE SetHandleInformation((HANDLE)soap->master, HANDLE_FLAG_INHERIT, 0); @@ -4826,17 +5500,18 @@ soap_bind(struct soap *soap, const char *host, int port, int backlog) soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_bind()", SOAP_TCP_ERROR); return SOAP_INVALID_SOCKET; } +#ifndef UNDER_CE if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && (!((soap->imode | soap->omode) & SOAP_IO_UDP)) && setsockopt(soap->master, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) { soap->errnum = soap_socket_errno(soap->master); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_bind()", SOAP_TCP_ERROR); return SOAP_INVALID_SOCKET; } - if (setsockopt(soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) + if (soap->sndbuf > 0 && setsockopt(soap->master, SOL_SOCKET, SO_SNDBUF, (char*)&soap->sndbuf, sizeof(int))) { soap->errnum = soap_socket_errno(soap->master); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_bind()", SOAP_TCP_ERROR); return SOAP_INVALID_SOCKET; } - if (setsockopt(soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) + if (soap->rcvbuf > 0 && setsockopt(soap->master, SOL_SOCKET, SO_RCVBUF, (char*)&soap->rcvbuf, sizeof(int))) { soap->errnum = soap_socket_errno(soap->master); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_bind()", SOAP_TCP_ERROR); return SOAP_INVALID_SOCKET; @@ -4848,17 +5523,24 @@ soap_bind(struct soap *soap, const char *host, int port, int backlog) return SOAP_INVALID_SOCKET; } #endif +#ifdef TCP_FASTOPEN + if (!(soap->omode & SOAP_IO_UDP) && setsockopt(soap->master, IPPROTO_TCP, TCP_FASTOPEN, (char*)&set, sizeof(int))) + { /* silently ignore */ + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "setsockopt TCP_FASTOPEN failed in soap_bind()\n")); + } +#endif +#endif #endif #ifdef WITH_IPV6 #ifdef WITH_IPV6_V6ONLY - if (setsockopt(soap->master, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&set, sizeof(int))) + if (res.ai_family == AF_INET6 && setsockopt(soap->master, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&set, sizeof(int))) { soap->errnum = soap_socket_errno(soap->master); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt set IPV6_V6ONLY failed in soap_bind()", SOAP_TCP_ERROR); return SOAP_INVALID_SOCKET; } #endif #ifdef WITH_NO_IPV6_V6ONLY - if (setsockopt(soap->master, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&unset, sizeof(int))) + if (res.ai_family == AF_INET6 && setsockopt(soap->master, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&unset, sizeof(int))) { soap->errnum = soap_socket_errno(soap->master); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt unset IPV6_V6ONLY failed in soap_bind()", SOAP_TCP_ERROR); return SOAP_INVALID_SOCKET; @@ -4873,21 +5555,21 @@ soap_bind(struct soap *soap, const char *host, int port, int backlog) return SOAP_INVALID_SOCKET; } #else - soap->peerlen = sizeof(soap->peer); - memset((void*)&soap->peer, 0, sizeof(soap->peer)); - soap->peer.sin_family = AF_INET; + soap->peerlen = sizeof(soap->peer.in); + memset((void*)&soap->peer.in, 0, sizeof(soap->peer.in)); + soap->peer.in.sin_family = AF_INET; soap->errmode = 2; if (host) - { if (soap->fresolve(soap, host, &soap->peer.sin_addr)) + { if (soap->fresolve(soap, host, &soap->peer.in.sin_addr)) { soap_set_receiver_error(soap, tcp_error(soap), "get host by name failed in soap_bind()", SOAP_TCP_ERROR); return SOAP_INVALID_SOCKET; } } else - soap->peer.sin_addr.s_addr = htonl(INADDR_ANY); - soap->peer.sin_port = htons((short)port); + soap->peer.in.sin_addr.s_addr = htonl(INADDR_ANY); + soap->peer.in.sin_port = htons((short)port); soap->errmode = 0; - if (bind(soap->master, (struct sockaddr*)&soap->peer, (int)soap->peerlen)) + if (bind(soap->master, &soap->peer.addr, (int)soap->peerlen)) { soap->errnum = soap_socket_errno(soap->master); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not bind to host\n")); soap_closesock(soap); @@ -4908,6 +5590,7 @@ soap_bind(struct soap *soap, const char *host, int port, int backlog) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 SOAP_FMAC1 @@ -4916,7 +5599,7 @@ SOAP_FMAC2 soap_poll(struct soap *soap) { #ifndef WITH_LEAN - register int r; + int r; if (soap_valid_socket(soap->socket)) { r = tcp_select(soap, soap->socket, SOAP_TCP_SELECT_ALL, 0); if (r > 0 && (r & SOAP_TCP_SELECT_ERR)) @@ -4953,9 +5636,10 @@ soap_poll(struct soap *soap) return soap->error = SOAP_TCP_ERROR; } } - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Polling: other end down on socket=%d select=%d\n", soap->socket, r)); return SOAP_EOF; #else + (void)soap; return SOAP_OK; #endif } @@ -4963,6 +5647,7 @@ soap_poll(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 SOAP_FMAC1 @@ -4970,13 +5655,8 @@ SOAP_SOCKET SOAP_FMAC2 soap_accept(struct soap *soap) { int n = (int)sizeof(soap->peer); - register int err; + int err; #ifndef WITH_LEAN -#ifndef WIN32 - int len = SOAP_BUFLEN; -#else - int len = SOAP_BUFLEN + 1; /* speeds up windows xfer */ -#endif int set = 1; #endif soap->error = SOAP_OK; @@ -4996,7 +5676,7 @@ soap_accept(struct soap *soap) for (;;) { if (soap->accept_timeout || soap->send_timeout || soap->recv_timeout) { for (;;) - { register int r; + { int r; r = tcp_select(soap, soap->master, SOAP_TCP_SELECT_ALL, soap->accept_timeout ? soap->accept_timeout : 60); if (r > 0) break; @@ -5008,7 +5688,7 @@ soap_accept(struct soap *soap) { r = soap->errnum; if (r != SOAP_EINTR) { soap_closesock(soap); - soap_set_sender_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR); + soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR); return SOAP_INVALID_SOCKET; } } @@ -5018,29 +5698,31 @@ soap_accept(struct soap *soap) SOAP_SOCKNONBLOCK(soap->master) else SOAP_SOCKBLOCK(soap->master) - soap->socket = soap->faccept(soap, soap->master, (struct sockaddr*)&soap->peer, &n); + n = (int)sizeof(soap->peer); + soap->socket = soap->faccept(soap, soap->master, &soap->peer.addr, &n); soap->peerlen = (size_t)n; if (soap_valid_socket(soap->socket)) { #ifdef WITH_IPV6 - unsigned int ip1, ip2, ip3, ip4; + char *s = soap->host; char port[16]; - getnameinfo((struct sockaddr*)&soap->peer, n, soap->host, sizeof(soap->host), port, 16, NI_NUMERICHOST | NI_NUMERICSERV); - sscanf(soap->host, "%u.%u.%u.%u", &ip1, &ip2, &ip3, &ip4); - soap->ip = (unsigned long)ip1 << 24 | (unsigned long)ip2 << 16 | (unsigned long)ip3 << 8 | (unsigned long)ip4; + int i; + getnameinfo(&soap->peer.addr, n, soap->host, sizeof(soap->host), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV); + soap->ip = 0; + for (i = 0; i < 4 && *s; i++) + { soap->ip = (soap->ip << 8) + (unsigned int)soap_strtoul(s, &s, 10); + if (*s) + s++; + } soap->port = soap_strtol(port, NULL, 10); #else - soap->ip = ntohl(soap->peer.sin_addr.s_addr); -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->host, sizeof(soap->host), "%u.%u.%u.%u", (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF); -#else - sprintf(soap->host, "%u.%u.%u.%u", (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF); + soap->ip = ntohl(soap->peer.in.sin_addr.s_addr); + (SOAP_SNPRINTF(soap->host, sizeof(soap->host), 80), "%u.%u.%u.%u", (int)(soap->ip>>24)&0xFF, (int)(soap->ip>>16)&0xFF, (int)(soap->ip>>8)&0xFF, (int)soap->ip&0xFF); + soap->port = (int)ntohs(soap->peer.in.sin_port); /* does not return port number on some systems */ #endif - soap->port = (int)ntohs(soap->peer.sin_port); /* does not return port number on some systems */ -#endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept socket=%d at port=%d from IP='%s'\n", soap->socket, soap->port, soap->host)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Accept socket=%d at port=%d from IP='%s'\n", soap->socket, soap->port, soap->host)); #ifndef WITH_LEAN - if (soap->accept_flags == SO_LINGER) + if ((soap->accept_flags & SO_LINGER)) { struct linger linger; memset((void*)&linger, 0, sizeof(linger)); linger.l_onoff = 1; @@ -5052,25 +5734,26 @@ soap_accept(struct soap *soap) return SOAP_INVALID_SOCKET; } } - else if (soap->accept_flags && setsockopt(soap->socket, SOL_SOCKET, soap->accept_flags, (char*)&set, sizeof(int))) + if ((soap->accept_flags & ~SO_LINGER) && setsockopt(soap->socket, SOL_SOCKET, soap->accept_flags & ~SO_LINGER, (char*)&set, sizeof(int))) { soap->errnum = soap_socket_errno(soap->socket); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt failed in soap_accept()", SOAP_TCP_ERROR); soap_closesock(soap); return SOAP_INVALID_SOCKET; } +#ifndef UNDER_CE if (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) && setsockopt(soap->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&set, sizeof(int))) { soap->errnum = soap_socket_errno(soap->socket); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_KEEPALIVE failed in soap_accept()", SOAP_TCP_ERROR); soap_closesock(soap); return SOAP_INVALID_SOCKET; } - if (setsockopt(soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&len, sizeof(int))) + if (soap->sndbuf > 0 && setsockopt(soap->socket, SOL_SOCKET, SO_SNDBUF, (char*)&soap->sndbuf, sizeof(int))) { soap->errnum = soap_socket_errno(soap->socket); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_SNDBUF failed in soap_accept()", SOAP_TCP_ERROR); soap_closesock(soap); return SOAP_INVALID_SOCKET; } - if (setsockopt(soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&len, sizeof(int))) + if (soap->rcvbuf > 0 && setsockopt(soap->socket, SOL_SOCKET, SO_RCVBUF, (char*)&soap->rcvbuf, sizeof(int))) { soap->errnum = soap_socket_errno(soap->socket); soap_set_receiver_error(soap, tcp_error(soap), "setsockopt SO_RCVBUF failed in soap_accept()", SOAP_TCP_ERROR); soap_closesock(soap); @@ -5085,6 +5768,7 @@ soap_accept(struct soap *soap) } #endif #endif +#endif soap->keep_alive = (((soap->imode | soap->omode) & SOAP_IO_KEEPALIVE) != 0); if (soap->send_timeout || soap->recv_timeout) SOAP_SOCKNONBLOCK(soap->socket) @@ -5094,7 +5778,7 @@ soap_accept(struct soap *soap) } err = soap_socket_errno(soap->socket); if (err != 0 && err != SOAP_EINTR && err != SOAP_EAGAIN && err != SOAP_EWOULDBLOCK) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Accept failed from %s\n", soap->host)); soap->errnum = err; soap_set_receiver_error(soap, tcp_error(soap), "accept failed in soap_accept()", SOAP_TCP_ERROR); soap_closesock(soap); @@ -5106,12 +5790,13 @@ soap_accept(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap *soap) -{ register int status = soap->error; +{ int status = soap->error; #ifndef WITH_LEANER if (status) /* close on error: attachment state is not to be trusted */ { soap->mime.first = NULL; @@ -5120,10 +5805,10 @@ soap_closesock(struct soap *soap) soap->dime.last = NULL; } #endif - if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap))) + if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)) != SOAP_OK) return soap->error; if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive) - { if (soap->fclose && (soap->error = soap->fclose(soap))) + { if (soap->fclose && (soap->error = soap->fclose(soap)) != SOAP_OK) return soap->error; soap->keep_alive = 0; } @@ -5141,6 +5826,7 @@ soap_closesock(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 SOAP_FMAC1 @@ -5156,6 +5842,7 @@ soap_force_closesock(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_2 SOAP_FMAC1 @@ -5174,6 +5861,7 @@ soap_cleanup(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void @@ -5202,7 +5890,7 @@ soap_done(struct soap *soap) soap_free_cookies(soap); #endif while (soap->plugins) - { register struct soap_plugin *p = soap->plugins->next; + { struct soap_plugin *p = soap->plugins->next; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Removing plugin '%s'\n", soap->plugins->id)); if (soap->plugins->fcopy || soap->state == SOAP_INIT) soap->plugins->fdelete(soap, soap->plugins); @@ -5245,6 +5933,8 @@ soap_done(struct soap *soap) soap->fpoll = NULL; #endif #ifndef WITH_LEANER + soap->fsvalidate = NULL; + soap->fwvalidate = NULL; soap->feltbegin = NULL; soap->feltendin = NULL; soap->feltbegout = NULL; @@ -5314,20 +6004,31 @@ soap_done(struct soap *soap) soap->session = NULL; } #endif +#ifdef WITH_SYSTEMSSL + if (soap->ssl) + gsk_secure_socket_close(&soap->ssl); + if (soap->state == SOAP_INIT) + if (soap->ctx) + gsk_environment_close(&soap->ctx); +#endif #ifdef WITH_C_LOCALE + if (soap->c_locale) + { # ifdef WIN32 - _free_locale(soap->c_locale); + _free_locale(soap->c_locale); # else - freelocale(soap->c_locale); + freelocale(soap->c_locale); # endif + soap->c_locale = NULL; + } #endif #ifdef WITH_ZLIB if (soap->d_stream) - { SOAP_FREE(soap, (void*)soap->d_stream); + { SOAP_FREE(soap, soap->d_stream); soap->d_stream = NULL; } if (soap->z_buf) - { SOAP_FREE(soap, (void*)soap->z_buf); + { SOAP_FREE(soap, soap->z_buf); soap->z_buf = NULL; } #endif @@ -5335,7 +6036,7 @@ soap_done(struct soap *soap) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free logfiles\n")); for (i = 0; i < SOAP_MAXLOGS; i++) { if (soap->logfile[i]) - { SOAP_FREE(soap, (void*)soap->logfile[i]); + { SOAP_FREE(soap, soap->logfile[i]); soap->logfile[i] = NULL; } soap_close_logfile(soap, i); @@ -5350,11 +6051,10 @@ soap_done(struct soap *soap) /******************************************************************************\ * - * HTTP + * HTTP * \******************************************************************************/ -/******************************************************************************/ #ifndef WITH_NOHTTP #ifndef PALM_1 static int @@ -5386,26 +6086,27 @@ http_parse(struct soap *soap) return SOAP_EOF; return soap->error = 414; } - if ((s = strchr(soap->msgbuf, ' '))) + s = strchr(soap->msgbuf, ' '); + if (s) { soap->status = (unsigned short)soap_strtoul(s, &s, 10); if (!soap_blank((soap_wchar)*s)) soap->status = 0; } else soap->status = 0; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "HTTP status: %s\n", soap->msgbuf)); for (;;) { if (soap_getline(soap, header, SOAP_HDRLEN)) { if (soap->error == SOAP_EOF) { soap->error = SOAP_OK; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "EOF in HTTP header, continue anyway\n")); break; } return soap->error; } if (!*header) break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "HTTP header: %s\n", header)); s = strchr(header, ':'); if (s) { char *t; @@ -5420,7 +6121,8 @@ http_parse(struct soap *soap) if (t >= s && *t == '"') t--; t[1] = '\0'; - if ((soap->error = soap->fparsehdr(soap, header, s))) + soap->error = soap->fparsehdr(soap, header, s); + if (soap->error) { if (soap->error < SOAP_STOP) return soap->error; status = soap->error; @@ -5429,7 +6131,7 @@ http_parse(struct soap *soap) } } } while (soap->status == 100); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Finished HTTP header parsing, status = %d\n", soap->status)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Finished HTTP header parsing, status = %d\n", soap->status)); s = strstr(soap->msgbuf, "HTTP/"); if (s && s[7] != '1') { if (soap->keep_alive == 1) @@ -5439,7 +6141,7 @@ http_parse(struct soap *soap) } if (soap->keep_alive < 0) soap->keep_alive = 1; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Keep alive connection = %d\n", soap->keep_alive)); if (soap->status == 0) { size_t l = 0; if (s) @@ -5457,24 +6159,28 @@ http_parse(struct soap *soap) httpcmd = 6; } if (s && httpcmd) - { size_t m = strlen(soap->endpoint); - size_t n = m + (s - soap->msgbuf) - l - 1; - size_t k; + { size_t m, n, k; + while (soap_blank(soap->msgbuf[l])) + l++; + m = strlen(soap->endpoint); + n = m + (s - soap->msgbuf) - l - 1; if (n >= sizeof(soap->endpoint)) n = sizeof(soap->endpoint) - 1; if (m > n) m = n; k = n - m + 1; - if (k > sizeof(soap->path)) - k = sizeof(soap->path); - strncpy(soap->path, soap->msgbuf + l, k); - soap->path[k - 1] = '\0'; + if (k >= sizeof(soap->path)) + k = sizeof(soap->path) - 1; + while (k > 0 && soap_blank(soap->msgbuf[l + k - 1])) + k--; + soap_strncpy(soap->path, sizeof(soap->path), soap->msgbuf + l, k); if (*soap->path && *soap->path != '/') - *soap->endpoint = '\0'; - strcat(soap->endpoint, soap->path); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Target endpoint='%s'\n", soap->endpoint)); + soap_strncpy(soap->endpoint, sizeof(soap->endpoint), soap->path, k); + else + soap_strncat(soap->endpoint, sizeof(soap->endpoint), soap->path, k); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Target endpoint='%s' path='%s'\n", soap->endpoint, soap->path)); if (httpcmd > 1) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP %s handler\n", soap->msgbuf)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "HTTP %s handler\n", soap->msgbuf)); switch (httpcmd) { case 2: soap->error = soap->fput(soap); break; case 3: soap->error = soap->fget(soap); break; @@ -5483,7 +6189,7 @@ http_parse(struct soap *soap) case 6: soap->error = soap->fhead(soap); break; default: soap->error = 405; break; } - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP handler return = %d\n", soap->error)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "HTTP handler return = %d\n", soap->error)); if (soap->error == SOAP_OK) soap->error = SOAP_STOP; /* prevents further processing */ return soap->error; @@ -5504,7 +6210,7 @@ http_parse(struct soap *soap) { if ((soap->status >= 200 && soap->status <= 299) /* OK, Accepted, etc */ || soap->status == 400 /* Bad Request */ || soap->status == 500) /* Internal Server Error */ - return SOAP_OK; + return soap->error = SOAP_OK; /* force close afterwards in soap_closesock() */ soap->keep_alive = 0; #ifndef WITH_LEAN @@ -5516,13 +6222,14 @@ http_parse(struct soap *soap) } else if (soap->status >= 200 && soap->status <= 299) return soap->error = soap->status; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "HTTP error %d\n", soap->status)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "HTTP error %d: %s\n", soap->status, soap->msgbuf)); return soap_set_receiver_error(soap, "HTTP Error", soap->msgbuf, soap->status); } #endif #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 static int @@ -5531,11 +6238,11 @@ http_parse_header(struct soap *soap, const char *key, const char *val) { #if defined(WITH_OPENSSL) || defined(WITH_GNUTLS) if (soap->imode & SOAP_ENC_SSL) - strcpy(soap->endpoint, "https://"); + soap_strcpy(soap->endpoint, sizeof(soap->endpoint), "https://"); else #endif - strcpy(soap->endpoint, "http://"); - strncat(soap->endpoint, val, sizeof(soap->endpoint) - 8); + soap_strcpy(soap->endpoint, sizeof(soap->endpoint), "http://"); + soap_strncat(soap->endpoint, sizeof(soap->endpoint), val, sizeof(soap->endpoint) - 9); } #ifndef WITH_LEANER else if (!soap_tag_cmp(key, "Content-Type")) @@ -5605,7 +6312,7 @@ http_parse_header(struct soap *soap, const char *key, const char *val) else if (!soap_tag_cmp(val, "close")) soap->keep_alive = 0; } -#ifndef WITH_LEAN +#if !defined(WITH_LEAN) || defined(WITH_NTLM) else if (!soap_tag_cmp(key, "Authorization") || !soap_tag_cmp(key, "Proxy-Authorization")) { #ifdef WITH_NTLM @@ -5618,7 +6325,8 @@ http_parse_header(struct soap *soap, const char *key, const char *val) char *s; soap_base642s(soap, val + 6, soap->tmpbuf, sizeof(soap->tmpbuf) - 1, &n); soap->tmpbuf[n] = '\0'; - if ((s = strchr(soap->tmpbuf, ':'))) + s = strchr(soap->tmpbuf, ':'); + if (s) { *s = '\0'; soap->userid = soap_strdup(soap, soap->tmpbuf); soap->passwd = soap_strdup(soap, s + 1); @@ -5636,8 +6344,8 @@ http_parse_header(struct soap *soap, const char *key, const char *val) } else if (!soap_tag_cmp(key, "Expect")) { if (!soap_tag_cmp(val, "100-continue")) - { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL)) - || (soap->error = soap->fposthdr(soap, NULL, NULL))) + { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL)) != SOAP_OK + || (soap->error = soap->fposthdr(soap, NULL, NULL)) != SOAP_OK) return soap->error; } } @@ -5652,8 +6360,7 @@ http_parse_header(struct soap *soap, const char *key, const char *val) soap->action = soap_strdup(soap, val); } else if (!soap_tag_cmp(key, "Location")) - { strncpy(soap->endpoint, val, sizeof(soap->endpoint)); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; + { soap_strcpy(soap->endpoint, sizeof(soap->endpoint), val); } else if (!soap_tag_cmp(key, "X-Forwarded-For")) { soap->proxy_from = soap_strdup(soap, val); @@ -5672,16 +6379,17 @@ http_parse_header(struct soap *soap, const char *key, const char *val) #endif /******************************************************************************/ + #if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) #ifndef PALM_1 SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap *soap, const char *line, const char *key) -{ register const char *s = line; +{ const char *s = line; if (s) { while (*s) - { register short flag; + { short flag; s = soap_decode_key(soap->tmpbuf, sizeof(soap->tmpbuf), s); flag = soap_tag_cmp(soap->tmpbuf, key); s = soap_decode_val(soap->tmpbuf, sizeof(soap->tmpbuf), s); @@ -5695,6 +6403,7 @@ soap_get_header_attribute(struct soap *soap, const char *line, const char *key) #endif /******************************************************************************/ + #if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) #ifndef PALM_1 SOAP_FMAC1 @@ -5707,6 +6416,7 @@ soap_decode_key(char *buf, size_t len, const char *val) #endif /******************************************************************************/ + #if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) #ifndef PALM_1 SOAP_FMAC1 @@ -5723,6 +6433,7 @@ soap_decode_val(char *buf, size_t len, const char *val) #endif /******************************************************************************/ + #if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) #ifndef PALM_1 static const char* @@ -5761,12 +6472,14 @@ soap_decode(char *buf, size_t len, const char *val, const char *sep) #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 static const char* http_error(struct soap *soap, int status) -{ register const char *msg = SOAP_STR_EOS; +{ const char *msg = SOAP_STR_EOS; (void)soap; + (void)status; #ifndef WITH_LEAN msg = soap_code_str(h_http_error_codes, status); if (!msg) @@ -5791,6 +6504,7 @@ http_get(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 static int @@ -5802,6 +6516,7 @@ http_405(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 static int @@ -5812,12 +6527,14 @@ http_200(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 static int http_post(struct soap *soap, const char *endpoint, const char *host, int port, const char *path, const char *action, size_t count) -{ register const char *s; - register int err; +{ const char *s; + int err; + size_t l; switch (soap->status) { case SOAP_GET: s = "GET"; @@ -5836,39 +6553,23 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "HTTP %s to %s\n", s, endpoint ? endpoint : "(null)")); #ifdef PALM - if (!endpoint || (soap_tag_cmp(endpoint, "http:*") && soap_tag_cmp(endpoint, "https:*") && strncmp(endpoint, "httpg:", 6)) && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8)) + if (!endpoint || (soap_tag_cmp(endpoint, "http:*") && soap_tag_cmp(endpoint, "https:*") && strncmp(endpoint, "_beam:", 6) && strncmp(endpoint, "_local:", 7) && strncmp(endpoint, "_btobex:", 8)) #else - if (!endpoint || (soap_tag_cmp(endpoint, "http:*") && soap_tag_cmp(endpoint, "https:*") && strncmp(endpoint, "httpg:", 6))) + if (!endpoint || (soap_tag_cmp(endpoint, "http:*") && soap_tag_cmp(endpoint, "https:*") && soap_tag_cmp(endpoint, "httpg:*"))) #endif return SOAP_OK; - if (strlen(endpoint) + strlen(soap->http_version) > sizeof(soap->tmpbuf) - 80 - || strlen(host) + strlen(soap->http_version) > sizeof(soap->tmpbuf) - 80) - return soap->error = SOAP_EOM; /* prevent overrun (note that 'host' and 'soap->host' are substrings of 'endpoint') */ + /* set l to prevent overruns ('host' and 'soap->host' are substrings of 'endpoint') */ + l = strlen(endpoint) + strlen(soap->http_version) + 80; + if (l > sizeof(soap->tmpbuf)) + return soap->error = SOAP_EOM; if (soap->status == SOAP_CONNECT) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "%s %s:%d HTTP/%s", s, soap->host, soap->port, soap->http_version); -#else - sprintf(soap->tmpbuf, "%s %s:%d HTTP/%s", s, soap->host, soap->port, soap->http_version); -#endif - } + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), l), "%s %s:%d HTTP/%s", s, soap->host, soap->port, soap->http_version); else if (soap->proxy_host && endpoint) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "%s %s HTTP/%s", s, endpoint, soap->http_version); -#else - sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version); -#endif - } + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), l), "%s %s HTTP/%s", s, endpoint, soap->http_version); else - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version); -#else - sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version); -#endif - } - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), l), "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version); + err = soap->fposthdr(soap, soap->tmpbuf, NULL); + if (err) return err; #ifdef WITH_OPENSSL if ((soap->ssl && port != 443) || (!soap->ssl && port != 80)) @@ -5878,93 +6579,73 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c { #ifdef WITH_IPV6 if (*host != '[' && strchr(host, ':')) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "[%s]:%d", host, port); /* RFC 2732 */ -#else - sprintf(soap->tmpbuf, "[%s]:%d", host, port); /* RFC 2732 */ -#endif - } + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), l), "[%s]:%d", host, port); /* RFC 2732 */ else #endif - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "%s:%d", host, port); -#else - sprintf(soap->tmpbuf, "%s:%d", host, port); -#endif - } + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), l), "%s:%d", host, port); } else { #ifdef WITH_IPV6 if (*host != '[' && strchr(host, ':')) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "[%s]", host); /* RFC 2732 */ -#else - sprintf(soap->tmpbuf, "[%s]", host); /* RFC 2732 */ -#endif - } + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), l), "[%s]", host); /* RFC 2732 */ else #endif - strcpy(soap->tmpbuf, host); + soap_strcpy(soap->tmpbuf, sizeof(soap->tmpbuf), host); } - if ((err = soap->fposthdr(soap, "Host", soap->tmpbuf))) + err = soap->fposthdr(soap, "Host", soap->tmpbuf); + if (err) return err; - if ((err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.8"))) + err = soap->fposthdr(soap, "User-Agent", "gSOAP/2.8"); + if (err) return err; - if ((err = soap_puthttphdr(soap, SOAP_OK, count))) + err = soap_puthttphdr(soap, SOAP_OK, count); + if (err) return err; #ifdef WITH_ZLIB #ifdef WITH_GZIP - if ((err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate"))) + err = soap->fposthdr(soap, "Accept-Encoding", "gzip, deflate"); #else - if ((err = soap->fposthdr(soap, "Accept-Encoding", "deflate"))) + err = soap->fposthdr(soap, "Accept-Encoding", "deflate"); #endif + if (err) return err; #endif -#ifndef WITH_LEAN +#if !defined(WITH_LEAN) || defined(WITH_NTLM) #ifdef WITH_NTLM - if (soap->ntlm_challenge && strlen(soap->ntlm_challenge) + 6 < sizeof(soap->tmpbuf)) - { if (*soap->ntlm_challenge) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "NTLM %s", soap->ntlm_challenge); -#else - sprintf(soap->tmpbuf, "NTLM %s", soap->ntlm_challenge); -#endif + if (soap->ntlm_challenge) + { l = strlen(soap->ntlm_challenge); + if (l) + { (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), l + 5), "NTLM %s", soap->ntlm_challenge); if (soap->proxy_host) - { if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) + { err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf); + if (err) + return err; + } + else + { err = soap->fposthdr(soap, "Authorization", soap->tmpbuf); + if (err) return err; } - else if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf))) - return err; } } else { #endif - if (soap->userid && soap->passwd && strlen(soap->userid) + strlen(soap->passwd) < 761) - { strcpy(soap->tmpbuf, "Basic "); -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf + 262, sizeof(soap->tmpbuf) - 262, "%s:%s", soap->userid, soap->passwd); -#else - sprintf(soap->tmpbuf + 262, "%s:%s", soap->userid, soap->passwd); -#endif + if (soap->userid && soap->passwd) + { soap_strcpy(soap->tmpbuf, sizeof(soap->tmpbuf), "Basic "); + (SOAP_SNPRINTF(soap->tmpbuf + 262, sizeof(soap->tmpbuf) - 262, strlen(soap->userid) + strlen(soap->passwd) + 1), "%s:%s", soap->userid, soap->passwd); soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Authorization", soap->tmpbuf))) + err = soap->fposthdr(soap, "Authorization", soap->tmpbuf); + if (err) return err; } - if (soap->proxy_userid && soap->proxy_passwd && strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) < 761) - { strcpy(soap->tmpbuf, "Basic "); -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf + 262, sizeof(soap->tmpbuf) - 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); -#else - sprintf(soap->tmpbuf + 262, "%s:%s", soap->proxy_userid, soap->proxy_passwd); -#endif + if (soap->proxy_userid && soap->proxy_passwd) + { soap_strcpy(soap->tmpbuf, sizeof(soap->tmpbuf), "Basic "); + (SOAP_SNPRINTF(soap->tmpbuf + 262, sizeof(soap->tmpbuf) - 262, strlen(soap->proxy_userid) + strlen(soap->proxy_passwd) + 1), "%s:%s", soap->proxy_userid, soap->proxy_passwd); soap_s2base64(soap, (const unsigned char*)(soap->tmpbuf + 262), soap->tmpbuf + 6, (int)strlen(soap->tmpbuf + 262)); - if ((err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf))) + err = soap->fposthdr(soap, "Proxy-Authorization", soap->tmpbuf); + if (err) return err; } #ifdef WITH_NTLM @@ -5981,13 +6662,9 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c #endif #endif if (action && soap->status != SOAP_GET && soap->status != SOAP_DEL) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "\"%s\"", action); -#else - sprintf(soap->tmpbuf, "\"%s\"", strlen(action) < sizeof(soap->tmpbuf) - 3 ? action : SOAP_STR_EOS); -#endif - if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf))) + { (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), strlen(action) + 2), "\"%s\"", action); + err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf); + if (err) return err; } return soap->fposthdr(soap, NULL, NULL); @@ -5996,11 +6673,12 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 static int http_send_header(struct soap *soap, const char *s) -{ register const char *t; +{ const char *t; do { t = strchr(s, '\n'); /* disallow \n in HTTP headers */ if (!t) @@ -6015,6 +6693,7 @@ http_send_header(struct soap *soap, const char *s) #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 static int @@ -6031,34 +6710,27 @@ http_post_header(struct soap *soap, const char *key, const char *val) #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 static int http_response(struct soap *soap, int status, size_t count) -{ register int err; - char http[10]; +{ int err; + char http[16]; int code = status; const char *line; #ifdef WMW_RPM_IO if (soap->rpmreqid) httpOutputEnable(soap->rpmreqid); #endif - if (!soap->http_version || strlen(soap->http_version) > 4) - return soap->error = SOAP_EOM; #ifdef WMW_RPM_IO if (soap->rpmreqid || soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* RPM behaves as if standalone */ #else if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application (socket) or CGI (stdin/out)? */ #endif - { -#ifdef HAVE_SNPRINTF - soap_snprintf(http, sizeof(http), "HTTP/%s", soap->http_version); -#else - sprintf(http, "HTTP/%s", soap->http_version); -#endif - } + (SOAP_SNPRINTF(http, sizeof(http), strlen(soap->http_version) + 5), "HTTP/%s", soap->http_version); else - strcpy(http, "Status:"); + soap_strcpy(http, sizeof(http), "Status:"); if (!status || status == SOAP_HTML || status == SOAP_FILE) { if (count || ((soap->omode & SOAP_IO) == SOAP_IO_CHUNK)) code = 200; @@ -6076,31 +6748,28 @@ http_response(struct soap *soap, int status, size_t count) } line = http_error(soap, code); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "HTTP Status = %d %s\n", code, line)); -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "%s %d %s", http, code, line); -#else - sprintf(soap->tmpbuf, "%s %d %s", http, code, line); -#endif - if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL))) + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), sizeof(http) + 22 + strlen(line)), "%s %d %s", http, code, line); + err = soap->fposthdr(soap, soap->tmpbuf, NULL); + if (err) return err; #ifndef WITH_LEAN if (status == 401) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "Basic realm=\"%s\"", (soap->authrealm && strlen(soap->authrealm) < sizeof(soap->tmpbuf) - 14) ? soap->authrealm : "gSOAP Web Service"); -#else - sprintf(soap->tmpbuf, "Basic realm=\"%s\"", (soap->authrealm && strlen(soap->authrealm) < sizeof(soap->tmpbuf) - 14) ? soap->authrealm : "gSOAP Web Service"); -#endif - if ((err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf))) + { (SOAP_SNPRINTF_SAFE(soap->tmpbuf, sizeof(soap->tmpbuf)), "Basic realm=\"%s\"", (soap->authrealm && strlen(soap->authrealm) + 14 < sizeof(soap->tmpbuf)) ? soap->authrealm : "gSOAP Web Service"); + err = soap->fposthdr(soap, "WWW-Authenticate", soap->tmpbuf); + if (err) return err; } else if ((status >= 301 && status <= 303) || status == 307) - { if ((err = soap->fposthdr(soap, "Location", soap->endpoint))) + { err = soap->fposthdr(soap, "Location", soap->endpoint); + if (err) return err; } #endif - if ((err = soap->fposthdr(soap, "Server", "gSOAP/2.8")) - || (err = soap_puthttphdr(soap, status, count))) + err = soap->fposthdr(soap, "Server", "gSOAP/2.8"); + if (err) + return err; + err = soap_puthttphdr(soap, status, count); + if (err) return err; #ifdef WITH_COOKIES if (soap_putsetcookies(soap)) @@ -6112,12 +6781,13 @@ http_response(struct soap *soap, int status, size_t count) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap *soap, int status) -{ register size_t count; +{ size_t count; if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */)) && (status == SOAP_HTML || status == SOAP_FILE)) soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_STORE; @@ -6127,11 +6797,12 @@ soap_response(struct soap *soap, int status) return soap->error; #ifndef WITH_NOHTTP if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML)) - { register int n = soap->mode; + { int n = soap->mode; soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); if ((n & SOAP_IO) != SOAP_IO_FLUSH) soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fresponse(soap, status, count))) + soap->error = soap->fresponse(soap, status, count); + if (soap->error) return soap->error; #ifndef WITH_LEANER if ((n & SOAP_IO) == SOAP_IO_CHUNK) @@ -6147,27 +6818,63 @@ soap_response(struct soap *soap, int status) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 const char* SOAP_FMAC2 -soap_url(struct soap *soap, const char *s, const char *t) -{ if (!t || (*t != '/' && *t != '?') || strlen(s) + strlen(t) >= sizeof(soap->msgbuf)) - return s; - strcpy(soap->msgbuf, s); - strcat(soap->msgbuf, t); +soap_extend_url(struct soap *soap, const char *s, const char *t) +{ if (s) + soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), s); + else + *soap->msgbuf = '\0'; + if (t && (*t == '/' || *t == '?')) + { char *r = strchr(soap->msgbuf, '?'); + if (r) + { if (*t == '?') + { soap_strncat(soap->msgbuf, sizeof(soap->msgbuf), "&", 1); + soap_strncat(soap->msgbuf, sizeof(soap->msgbuf), t + 1, strlen(t) - 1); + } + else /* *t == '/' */ + { size_t l = r - soap->msgbuf; + *r = '\0'; + soap_strncat(soap->msgbuf, sizeof(soap->msgbuf), t, strlen(t)); + if (s) + soap_strncat(soap->msgbuf, sizeof(soap->msgbuf), s + l, strlen(s + l)); + } + } + else + soap_strncat(soap->msgbuf, sizeof(soap->msgbuf), t, strlen(t)); + } return soap->msgbuf; } #endif /******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +const char* +SOAP_FMAC2 +soap_extend_url_query(struct soap *soap, const char *s, const char *t) +{ soap_extend_url(soap, s, t); + if (strchr(soap->msgbuf, '?')) + soap_strncat(soap->msgbuf, sizeof(soap->msgbuf), "&", 1); + else + soap_strncat(soap->msgbuf, sizeof(soap->msgbuf), "?", 1); + return soap->msgbuf; +} +#endif + +/******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_url(const char *s, char *t, size_t len) -{ register int c; - register size_t n = len; +{ int c; + size_t n = len; while ((c = *s++) && --n > 0) { if (c > ' ' && c < 128 && !strchr("()<>@,;:\\\"/[]?={}#!$&'*+", c)) *t++ = c; @@ -6187,6 +6894,7 @@ soap_encode_url(const char *s, char *t, size_t len) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 const char* @@ -6206,12 +6914,12 @@ soap_encode_url_string(struct soap *soap, const char *s) /******************************************************************************\ * - * HTTP Cookies + * HTTP Cookies * \******************************************************************************/ #ifdef WITH_COOKIES -/******************************************************************************/ + SOAP_FMAC1 struct soap_cookie* SOAP_FMAC2 @@ -6229,16 +6937,15 @@ soap_cookie(struct soap *soap, const char *name, const char *domain, const char for (p = soap->cookies; p; p = p->next) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie in database: %s='%s' domain='%s' path='%s' env=%hd\n", p->name, p->value ? p->value : "(null)", p->domain ? p->domain : "(null)", p->path ? p->path : "(null)", p->env)); if (!strcmp(p->name, name) - && p->domain - && p->path - && !strcmp(p->domain, domain) - && (!*p->path || !strncmp(p->path, path, strlen(p->path)))) + && ((!domain && !p->domain) || (domain && p->domain && !strcmp(p->domain, domain))) + && ((!path && !p->path) || (path && p->path && !strncmp(p->path, path, strlen(p->path))))) break; } return p; } /******************************************************************************/ + SOAP_FMAC1 struct soap_cookie* SOAP_FMAC2 @@ -6256,9 +6963,12 @@ soap_set_cookie(struct soap *soap, const char *name, const char *value, const ch q = soap_cookie(soap, name, domain, path); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set %scookie: %s='%s' domain='%s' path='%s'\n", q ? SOAP_STR_EOS : "new ", name, value ? value : "(null)", domain ? domain : "(null)", path ? path : "(null)")); if (!q) - { if ((q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)))) - { if ((q->name = (char*)SOAP_MALLOC(soap, strlen(name)+1))) - strcpy(q->name, name); + { q = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)); + if (q) + { size_t l = strlen(name); + q->name = (char*)SOAP_MALLOC(soap, l + 1); + if (q->name) + soap_strcpy(q->name, l + 1, name); q->value = NULL; q->domain = NULL; q->path = NULL; @@ -6290,24 +7000,36 @@ soap_set_cookie(struct soap *soap, const char *name, const char *value, const ch q->value = NULL; } } - if (value && *value && !q->value && (q->value = (char*)SOAP_MALLOC(soap, strlen(value)+1))) - strcpy(q->value, value); + if (value && *value && !q->value) + { size_t l = strlen(value); + q->value = (char*)SOAP_MALLOC(soap, l + 1); + if (q->value) + soap_strcpy(q->value, l + 1, value); + } if (q->domain) { if (!domain || strcmp(domain, q->domain)) { SOAP_FREE(soap, q->domain); q->domain = NULL; } } - if (domain && !q->domain && (q->domain = (char*)SOAP_MALLOC(soap, strlen(domain)+1))) - strcpy(q->domain, domain); + if (domain && !q->domain) + { size_t l = strlen(domain); + q->domain = (char*)SOAP_MALLOC(soap, l + 1); + if (q->domain) + soap_strcpy(q->domain, l + 1, domain); + } if (q->path) { if (!path || strncmp(path, q->path, strlen(q->path))) { SOAP_FREE(soap, q->path); q->path = NULL; } } - if (path && !q->path && (q->path = (char*)SOAP_MALLOC(soap, strlen(path)+1))) - strcpy(q->path, path); + if (path && !q->path) + { size_t l = strlen(path); + q->path = (char*)SOAP_MALLOC(soap, l + 1); + if (q->path) + soap_strcpy(q->path, l + 1, path); + } q->session = 1; q->env = 0; } @@ -6315,6 +7037,7 @@ soap_set_cookie(struct soap *soap, const char *name, const char *value, const ch } /******************************************************************************/ + SOAP_FMAC1 void SOAP_FMAC2 @@ -6335,7 +7058,7 @@ soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const c if (*path == '/') path++; for (p = &soap->cookies, q = *p; q; q = *p) - { if (!strcmp(q->name, name) && !strcmp(q->domain, domain) && !strncmp(q->path, path, strlen(q->path))) + { if (!strcmp(q->name, name) && (!q->domain || !strcmp(q->domain, domain)) && (!q->path || !strncmp(q->path, path, strlen(q->path)))) { if (q->value) SOAP_FREE(soap, q->value); if (q->domain) @@ -6351,46 +7074,54 @@ soap_clr_cookie(struct soap *soap, const char *name, const char *domain, const c } /******************************************************************************/ + SOAP_FMAC1 char * SOAP_FMAC2 soap_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) { struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) + p = soap_cookie(soap, name, domain, path); + if (p) return p->value; return NULL; } /******************************************************************************/ + SOAP_FMAC1 char * SOAP_FMAC2 soap_env_cookie_value(struct soap *soap, const char *name, const char *domain, const char *path) { struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path)) && p->env) + p = soap_cookie(soap, name, domain, path); + if (p && p->env) return p->value; return NULL; } /******************************************************************************/ + SOAP_FMAC1 time_t SOAP_FMAC2 soap_cookie_expire(struct soap *soap, const char *name, const char *domain, const char *path) { struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) + p = soap_cookie(soap, name, domain, path); + if (p) return p->expire; return -1; } /******************************************************************************/ + SOAP_FMAC1 int SOAP_FMAC2 soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const char *domain, const char *path) { struct soap_cookie *p; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set cookie expiration max-age=%ld: cookie='%s' domain='%s' path='%s'\n", expire, name, domain ? domain : "(null)", path ? path : "(null)")); - if ((p = soap_cookie(soap, name, domain, path))) + p = soap_cookie(soap, name, domain, path); + if (p) { p->maxage = expire; p->modified = 1; return SOAP_OK; @@ -6399,12 +7130,14 @@ soap_set_cookie_expire(struct soap *soap, const char *name, long expire, const c } /******************************************************************************/ + SOAP_FMAC1 int SOAP_FMAC2 soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) { struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) + p = soap_cookie(soap, name, domain, path); + if (p) { p->session = 1; p->modified = 1; return SOAP_OK; @@ -6413,12 +7146,14 @@ soap_set_cookie_session(struct soap *soap, const char *name, const char *domain, } /******************************************************************************/ + SOAP_FMAC1 int SOAP_FMAC2 soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, const char *path) { struct soap_cookie *p; - if ((p = soap_cookie(soap, name, domain, path))) + p = soap_cookie(soap, name, domain, path); + if (p) { p->session = 0; p->modified = 1; return SOAP_OK; @@ -6427,6 +7162,7 @@ soap_clr_cookie_session(struct soap *soap, const char *name, const char *domain, } /******************************************************************************/ + SOAP_FMAC1 int SOAP_FMAC2 @@ -6435,28 +7171,28 @@ soap_putsetcookies(struct soap *soap) char *s, tmp[4096]; const char *t; for (p = soap->cookies; p; p = p->next) - { - if (p->modified + { if (p->modified #ifdef WITH_OPENSSL || (!p->env && !soap->ssl == !p->secure) #endif ) { s = tmp; if (p->name) - s += soap_encode_url(p->name, s, tmp-s+4064); + s += soap_encode_url(p->name, s, 4064 - (s-tmp)); if (p->value && *p->value) { *s++ = '='; - s += soap_encode_url(p->value, s, tmp-s+4064); + s += soap_encode_url(p->value, s, 4064 - (s-tmp)); } - if (p->domain && (int)strlen(p->domain) < tmp-s+4064) - { strcpy(s, ";Domain="); - strcat(s, p->domain); + if (p->domain && (int)strlen(p->domain) < 4064 - (s-tmp)) + { soap_strcpy(s, 4096 - (s-tmp), ";Domain="); + soap_strcpy(s + 8, 4088 - (s-tmp), p->domain); } - else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < tmp-s+4064) - { strcpy(s, ";Domain="); - strcat(s, soap->cookie_domain); + else if (soap->cookie_domain && (int)strlen(soap->cookie_domain) < 4064 - (s-tmp)) + { soap_strcpy(s, 4096 - (s-tmp), ";Domain="); + soap_strcpy(s + 8, 4088 - (s-tmp), soap->cookie_domain); } - strcat(s, ";Path=/"); + s += strlen(s); + soap_strcpy(s, 4096 - (s-tmp), ";Path=/"); s += strlen(s); if (p->path) t = p->path; @@ -6465,31 +7201,21 @@ soap_putsetcookies(struct soap *soap) if (t) { if (*t == '/') t++; - if ((int)strlen(t) < tmp-s+4064) - { if (strchr(t, '%')) /* already URL encoded? */ - { strcpy(s, t); + if ((int)strlen(t) < 4064 - (s-tmp)) + { if (strchr(t, '%')) /* already URL encoded? */ + { soap_strcpy(s, 4096 - (s-tmp), t); s += strlen(s); } else - s += soap_encode_url(t, s, tmp-s+4064); + s += soap_encode_url(t, s, 4064 - (s-tmp)); } } - if (p->version > 0 && s-tmp < 4060) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(s, 4096 - (s-tmp), ";Version=%u", p->version); -#else - sprintf(s, ";Version=%u", p->version); -#endif + if (p->version > 0 && s-tmp < 4064) + { (SOAP_SNPRINTF(s, 4096 - (s-tmp), 29), ";Version=%u", p->version); s += strlen(s); } - if (p->maxage >= 0 && s-tmp < 4060) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(s, 4096 - (s-tmp), ";Max-Age=%ld", p->maxage); -#else - sprintf(s, ";Max-Age=%ld", p->maxage); -#endif + if (p->maxage >= 0 && s-tmp < 4064) + { (SOAP_SNPRINTF(s, 4096 - (s-tmp), 29), ";Max-Age=%ld", p->maxage); s += strlen(s); } if (s-tmp < 4073 @@ -6498,9 +7224,10 @@ soap_putsetcookies(struct soap *soap) || soap->ssl #endif )) - strcpy(s, ";Secure"); + soap_strcpy(s, 4096 - (s-tmp), ";Secure"); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set-Cookie: %s\n", tmp)); - if ((soap->error = soap->fposthdr(soap, "Set-Cookie", tmp))) + soap->error = soap->fposthdr(soap, "Set-Cookie", tmp); + if (soap->error) return soap->error; } } @@ -6508,6 +7235,7 @@ soap_putsetcookies(struct soap *soap) } /******************************************************************************/ + SOAP_FMAC1 int SOAP_FMAC2 @@ -6555,10 +7283,14 @@ soap_putcookies(struct soap *soap, const char *domain, const char *path, int sec if (!flag) { struct hostent *hostent = gethostbyname((char*)domain); if (hostent) - { const char *r = strchr(hostent->h_name, '.'); - if (!r) - r = hostent->h_name; + { const char *r = hostent->h_name; + if (*t == '.') + { size_t k = strlen(hostent->h_name); + if (k >= n) + r = hostent->h_name + k - n; + } flag = !strncmp(t, r, n); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Domain cookie %s host %s (match=%d)\n", t, r, flag)); } } #endif @@ -6578,21 +7310,16 @@ soap_putcookies(struct soap *soap, const char *domain, const char *path, int sec { if (s == tmp) return SOAP_OK; /* HTTP header size overflow */ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Cookie: %s\n", tmp)); - if ((soap->error = soap->fposthdr(soap, "Cookie", tmp))) + soap->error = soap->fposthdr(soap, "Cookie", tmp); + if (soap->error) return soap->error; s = tmp; } else if (s != tmp) - { strcat(s, " "); - s++; + { *s++ = ' '; } if (q->version != version && s-tmp < 4060) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(s, 4096 - (s-tmp), "$Version=%u;", q->version); -#else - sprintf(s, "$Version=%u;", q->version); -#endif + { (SOAP_SNPRINTF(s, 4096 - (s-tmp), 29), "$Version=%u;", q->version); version = q->version; s += strlen(s); } @@ -6603,21 +7330,11 @@ soap_putcookies(struct soap *soap, const char *domain, const char *path, int sec s += soap_encode_url(q->value, s, tmp+sizeof(tmp)-s-16); } if (q->path && (s-tmp) + strlen(q->path) < 4060) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(s, 4096 - (s-tmp), ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path)); -#else - sprintf(s, ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path)); -#endif + { (SOAP_SNPRINTF_SAFE(s, 4096 - (s-tmp)), ";$Path=\"/%s\"", (*q->path == '/' ? q->path + 1 : q->path)); s += strlen(s); } if (q->domain && (s-tmp) + strlen(q->domain) < 4060) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(s, 4096 - (s-tmp), ";$Domain=\"%s\"", q->domain); -#else - sprintf(s, ";$Domain=\"%s\"", q->domain); -#endif + { (SOAP_SNPRINTF_SAFE(s, 4096 - (s-tmp)), ";$Domain=\"%s\"", q->domain); s += strlen(s); } } @@ -6625,12 +7342,15 @@ soap_putcookies(struct soap *soap, const char *domain, const char *path, int sec } } if (s != tmp) - if ((soap->error = soap->fposthdr(soap, "Cookie", tmp))) + { soap->error = soap->fposthdr(soap, "Cookie", tmp); + if (soap->error) return soap->error; + } return SOAP_OK; } /******************************************************************************/ + SOAP_FMAC1 void SOAP_FMAC2 @@ -6648,7 +7368,8 @@ soap_getcookies(struct soap *soap, const char *val) while (*s) { s = soap_decode_key(tmp, sizeof(tmp), s); if (!soap_tag_cmp(tmp, "$Version")) - { if ((s = soap_decode_val(tmp, sizeof(tmp), s))) + { s = soap_decode_val(tmp, sizeof(tmp), s); + if (s) { if (p) p->version = (int)soap_strtol(tmp, NULL, 10); else @@ -6658,8 +7379,10 @@ soap_getcookies(struct soap *soap, const char *val) else if (!soap_tag_cmp(tmp, "$Path")) { s = soap_decode_val(tmp, sizeof(tmp), s); if (*tmp) - { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(t, tmp); + { size_t l = strlen(tmp) + 1; + t = (char*)SOAP_MALLOC(soap, l); + if (t) + soap_memcpy((void*)t, l, (const void*)tmp, l); } else t = NULL; @@ -6677,8 +7400,10 @@ soap_getcookies(struct soap *soap, const char *val) else if (!soap_tag_cmp(tmp, "$Domain")) { s = soap_decode_val(tmp, sizeof(tmp), s); if (*tmp) - { if ((t = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(t, tmp); + { size_t l = strlen(tmp) + 1; + t = (char*)SOAP_MALLOC(soap, l); + if (t) + soap_memcpy((void*)t, l, (const void*)tmp, l); } else t = NULL; @@ -6698,8 +7423,10 @@ soap_getcookies(struct soap *soap, const char *val) SOAP_FREE(soap, p->path); s = soap_decode_val(tmp, sizeof(tmp), s); if (*tmp) - { if ((p->path = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(p->path, tmp); + { size_t l = strlen(tmp) + 1; + p->path = (char*)SOAP_MALLOC(soap, l); + if (p->path) + soap_memcpy((void*)p->path, l, (const void*)tmp, l); } else p->path = NULL; @@ -6709,8 +7436,10 @@ soap_getcookies(struct soap *soap, const char *val) SOAP_FREE(soap, p->domain); s = soap_decode_val(tmp, sizeof(tmp), s); if (*tmp) - { if ((p->domain = (char*)SOAP_MALLOC(soap, strlen(tmp)+1))) - strcpy(p->domain, tmp); + { size_t l = strlen(tmp) + 1; + p->domain = (char*)SOAP_MALLOC(soap, l); + if (p->domain) + soap_memcpy((void*)p->domain, l, (const void*)tmp, l); } else p->domain = NULL; @@ -6757,7 +7486,8 @@ soap_getcookies(struct soap *soap, const char *val) else { if (p) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie='%s' value='%s' domain='%s' path='%s' expire=%ld secure=%d\n", p->name, p->value ? p->value : "(null)", p->domain ? p->domain : "(null)", p->path ? p->path : "(null)", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) + q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path); + if (q) { q->version = p->version; q->expire = p->expire; q->secure = p->secure; @@ -6773,33 +7503,43 @@ soap_getcookies(struct soap *soap, const char *val) SOAP_FREE(soap, p->path); SOAP_FREE(soap, p); } - if ((p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)))) - { p->name = (char*)SOAP_MALLOC(soap, strlen(tmp)+1); - strcpy(p->name, tmp); + p = (struct soap_cookie*)SOAP_MALLOC(soap, sizeof(struct soap_cookie)); + if (p) + { size_t l = strlen(tmp) + 1; + p->name = (char*)SOAP_MALLOC(soap, l); + if (p->name) + soap_memcpy((void*)p->name, l, (const void*)tmp, l); s = soap_decode_val(tmp, sizeof(tmp), s); if (*tmp) - { p->value = (char*)SOAP_MALLOC(soap, strlen(tmp)+1); - strcpy(p->value, tmp); + { l = strlen(tmp) + 1; + p->value = (char*)SOAP_MALLOC(soap, l); + if (p->value) + soap_memcpy((void*)p->value, l, (const void*)tmp, l); } else p->value = NULL; if (domain) p->domain = domain; else if (*soap->host) - { p->domain = (char*)SOAP_MALLOC(soap, strlen(soap->host)+1); - strcpy(p->domain, soap->host); + { l = strlen(soap->host) + 1; + p->domain = (char*)SOAP_MALLOC(soap, l); + if (p->domain) + soap_memcpy((void*)p->domain, l, (const void*)soap->host, l); } else p->domain = NULL; if (path) p->path = path; - else if (soap->path && *soap->path) - { p->path = (char*)SOAP_MALLOC(soap, strlen(soap->path)+1); - strcpy(p->path, soap->path); + else if (*soap->path) + { l = strlen(soap->path) + 1; + p->path = (char*)SOAP_MALLOC(soap, l); + if (p->path) + soap_memcpy((void*)p->path, l, (const void*)soap->path, l); } else { p->path = (char*)SOAP_MALLOC(soap, 2); - strcpy(p->path, "/"); + if (p->path) + soap_memcpy((void*)p->path, 2, (const void*)"/", 2); } p->expire = 0; p->secure = 0; @@ -6809,7 +7549,8 @@ soap_getcookies(struct soap *soap, const char *val) } if (p) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Got environment cookie='%s' value='%s' domain='%s' path='%s' expire=%ld secure=%d\n", p->name, p->value ? p->value : "(null)", p->domain ? p->domain : "(null)", p->path ? p->path : "(null)", p->expire, p->secure)); - if ((q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path))) + q = soap_set_cookie(soap, p->name, p->value, p->domain, p->path); + if (q) { q->version = p->version; q->expire = p->expire; q->secure = p->secure; @@ -6832,6 +7573,7 @@ soap_getcookies(struct soap *soap, const char *val) } /******************************************************************************/ + SOAP_FMAC1 int SOAP_FMAC2 @@ -6839,7 +7581,8 @@ soap_getenv_cookies(struct soap *soap) { struct soap_cookie *p; const char *s; char key[4096], val[4096]; /* cookie size is up to 4096 bytes [RFC2109] */ - if (!(s = getenv("HTTP_COOKIE"))) + s = getenv("HTTP_COOKIE"); + if (!s) return SOAP_ERR; do { s = soap_decode_key(key, sizeof(key), s); @@ -6852,6 +7595,7 @@ soap_getenv_cookies(struct soap *soap) } /******************************************************************************/ + SOAP_FMAC1 struct soap_cookie* SOAP_FMAC2 @@ -6859,24 +7603,33 @@ soap_copy_cookies(struct soap *copy, const struct soap *soap) { struct soap_cookie *p, **q, *r; q = &r; for (p = soap->cookies; p; p = p->next) - { if (!(*q = (struct soap_cookie*)SOAP_MALLOC(copy, sizeof(struct soap_cookie)))) + { *q = (struct soap_cookie*)SOAP_MALLOC(copy, sizeof(struct soap_cookie)); + if (!*q) return r; **q = *p; if (p->name) - { if (((*q)->name = (char*)SOAP_MALLOC(copy, strlen(p->name)+1))) - strcpy((*q)->name, p->name); + { size_t l = strlen(p->name) + 1; + (*q)->name = (char*)SOAP_MALLOC(copy, l); + if ((*q)->name) + soap_memcpy((*q)->name, l, p->name, l); } if (p->value) - { if (((*q)->value = (char*)SOAP_MALLOC(copy, strlen(p->value)+1))) - strcpy((*q)->value, p->value); + { size_t l = strlen(p->value) + 1; + (*q)->value = (char*)SOAP_MALLOC(copy, l); + if ((*q)->value) + soap_memcpy((*q)->value, l, p->value, l); } if (p->domain) - { if (((*q)->domain = (char*)SOAP_MALLOC(copy, strlen(p->domain)+1))) - strcpy((*q)->domain, p->domain); + { size_t l = strlen(p->domain) + 1; + (*q)->domain = (char*)SOAP_MALLOC(copy, l); + if ((*q)->domain) + soap_memcpy((*q)->domain, l, p->domain, l); } if (p->path) - { if (((*q)->path = (char*)SOAP_MALLOC(copy, strlen(p->path)+1))) - strcpy((*q)->path, p->path); + { size_t l = strlen(p->path) + 1; + (*q)->path = (char*)SOAP_MALLOC(copy, l); + if ((*q)->path) + soap_memcpy((*q)->path, l, p->path, l); } q = &(*q)->next; } @@ -6885,6 +7638,7 @@ soap_copy_cookies(struct soap *copy, const struct soap *soap) } /******************************************************************************/ + SOAP_FMAC1 void SOAP_FMAC2 @@ -6904,44 +7658,49 @@ soap_free_cookies(struct soap *soap) } /******************************************************************************/ + #endif /* WITH_COOKIES */ /******************************************************************************/ -#ifndef WITH_NOIDREF + #ifndef PALM_2 SOAP_FMAC1 size_t SOAP_FMAC2 -soap_hash(register const char *s) -{ register size_t h = 0; +soap_hash(const char *s) +{ size_t h = 0; while (*s) h = 65599*h + *s++; return h % SOAP_IDHASH; } #endif -#endif /******************************************************************************/ -#ifndef WITH_NOIDREF + #ifndef PALM_1 static void soap_init_pht(struct soap *soap) -{ register int i; +{ int i; soap->pblk = NULL; soap->pidx = 0; for (i = 0; i < (int)SOAP_PTRHASH; i++) soap->pht[i] = NULL; } #endif -#endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 struct soap* SOAP_FMAC2 soap_versioning(soap_new)(soap_mode imode, soap_mode omode) -{ struct soap *soap = (struct soap*)malloc(sizeof(struct soap)); +{ struct soap *soap; +#ifdef __cplusplus + soap = SOAP_NEW(struct soap); +#else + soap = (struct soap*)malloc(sizeof(struct soap)); +#endif if (soap) soap_versioning(soap_init)(soap, imode, omode); return soap; @@ -6949,17 +7708,23 @@ soap_versioning(soap_new)(soap_mode imode, soap_mode omode) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap *soap) { soap_done(soap); +#ifdef __cplusplus + SOAP_DELETE(soap); +#else free(soap); +#endif } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void @@ -6970,12 +7735,12 @@ soap_del(struct soap *soap) #endif /******************************************************************************/ -#ifndef WITH_NOIDREF + #ifndef PALM_1 static void soap_free_pht(struct soap *soap) -{ register struct soap_pblk *pb, *next; - register int i; +{ struct soap_pblk *pb, *next; + int i; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free pointer hashtable\n")); for (pb = soap->pblk; pb; pb = next) { next = pb->next; @@ -6987,43 +7752,44 @@ soap_free_pht(struct soap *soap) soap->pht[i] = NULL; } #endif -#endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 -soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type) -{ register int i; +soap_embed(struct soap *soap, const void *p, const void *a, int n, int t) +{ int id; struct soap_plist *pp; - (void)soap; if (soap->version == 2) soap->encoding = 1; + if (!p || (!soap->encodingStyle && !(soap->omode & SOAP_XML_GRAPH)) || (soap->omode & SOAP_XML_TREE)) + return 0; if (a) - i = soap_array_pointer_lookup(soap, p, a, n, type, &pp); + id = soap_array_pointer_lookup(soap, p, a, n, t, &pp); else - i = soap_pointer_lookup(soap, p, type, &pp); - if (i) + id = soap_pointer_lookup(soap, p, t, &pp); + if (id) { if (soap_is_embedded(soap, pp) || soap_is_single(soap, pp)) return 0; soap_set_embedded(soap, pp); } - return i; + return id; } #endif #endif /******************************************************************************/ -#ifndef WITH_NOIDREF + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; +{ struct soap_plist *pp; *ppp = NULL; if (p) { for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next) @@ -7038,20 +7804,19 @@ soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plis return 0; } #endif -#endif /******************************************************************************/ -#ifndef WITH_NOIDREF + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 -soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register size_t h; - register struct soap_plist *pp; +soap_pointer_enter(struct soap *soap, const void *p, const void *a, int n, int type, struct soap_plist **ppp) +{ size_t h; + struct soap_plist *pp; (void)n; if (!soap->pblk || soap->pidx >= SOAP_PTRBLK) - { register struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk)); + { struct soap_pblk *pb = (struct soap_pblk*)SOAP_MALLOC(soap, sizeof(struct soap_pblk)); if (!pb) { soap->error = SOAP_EOM; return 0; @@ -7062,54 +7827,49 @@ soap_pointer_enter(struct soap *soap, const void *p, const struct soap_array *a, } *ppp = pp = &soap->pblk->plist[soap->pidx++]; if (a) - h = soap_hash_ptr(a->__ptr); + h = soap_hash_ptr(a); else h = soap_hash_ptr(p); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%d dim=%d type=%d id=%d\n", p, a ? a->__ptr : NULL, a ? a->__size : 0, n, type, soap->idnum+1)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pointer enter location=%p array=%p size=%lu type=%d id=%d\n", p, a, (unsigned long)n, type, soap->idnum+1)); pp->next = soap->pht[h]; pp->type = type; pp->mark1 = 0; pp->mark2 = 0; pp->ptr = p; + pp->dup = NULL; pp->array = a; + pp->size = n; soap->pht[h] = pp; pp->id = ++soap->idnum; return pp->id; } #endif -#endif /******************************************************************************/ -#ifndef WITH_NOIDREF + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 -soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp) -{ register struct soap_plist *pp; +soap_array_pointer_lookup(struct soap *soap, const void *p, const void *a, int n, int type, struct soap_plist **ppp) +{ struct soap_plist *pp; *ppp = NULL; - if (!p || !a->__ptr) + if (!p || !a) return 0; - for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next) - { if (pp->type == type && pp->array && pp->array->__ptr == a->__ptr) - { register int i; - for (i = 0; i < n; i++) - if (((const int*)&pp->array->__size)[i] != ((const int*)&a->__size)[i]) - break; - if (i == n) - { *ppp = pp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a->__ptr, type, pp->id)); - return pp->id; - } + for (pp = soap->pht[soap_hash_ptr(a)]; pp; pp = pp->next) + { if (pp->type == type && pp->array == a && pp->size == n) + { *ppp = pp; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d id=%d\n", a, type, pp->id)); + return pp->id; } } - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a->__ptr, type)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array lookup location=%p type=%d: not found\n", a, type)); return 0; } #endif -#endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -7123,7 +7883,9 @@ soap_begin_count(struct soap *soap) #endif { soap->mode = soap->omode; if ((soap->mode & SOAP_IO_UDP)) - soap->mode |= SOAP_ENC_XML; + { soap->mode |= SOAP_ENC_XML; + soap->mode &= ~SOAP_IO_CHUNK; + } if ((soap->mode & SOAP_IO) == SOAP_IO_STORE || (((soap->mode & SOAP_IO) == SOAP_IO_CHUNK || (soap->mode & SOAP_ENC_XML)) #ifndef WITH_LEANER @@ -7151,7 +7913,7 @@ soap_begin_count(struct soap *soap) soap->mode &= ~SOAP_ENC_MTOM; if (soap->mode & SOAP_ENC_MIME) soap_select_mime_boundary(soap); - soap->dime.list = soap->dime.last; /* keep track of last DIME attachment */ + soap->dime.list = soap->dime.last; /* keep track of last DIME attachment */ #endif soap->count = 0; soap->ns = 0; @@ -7163,12 +7925,14 @@ soap_begin_count(struct soap *soap) soap->event = 0; soap->evlev = 0; soap->idnum = 0; + soap->body = 1; + soap->level = 0; soap_clr_attr(soap); soap_set_local_namespaces(soap); #ifndef WITH_LEANER soap->dime.count = 0; /* count # of attachments */ soap->dime.size = 0; /* accumulate total size of attachments */ - if (soap->fprepareinitsend && (soap->mode & SOAP_IO) != SOAP_IO_STORE && (soap->error = soap->fprepareinitsend(soap))) + if (soap->fprepareinitsend && (soap->mode & SOAP_IO) != SOAP_IO_STORE && (soap->error = soap->fprepareinitsend(soap)) != SOAP_OK) return soap->error; #endif DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin count phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, (unsigned int)soap->mode, (unsigned long)soap->count)); @@ -7177,6 +7941,7 @@ soap_begin_count(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -7185,15 +7950,18 @@ soap_end_count(struct soap *soap) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n")); #ifndef WITH_LEANER if ((soap->mode & SOAP_IO_LENGTH)) - { if (soap->fpreparefinalsend && (soap->error = soap->fpreparefinalsend(soap))) + { if (soap->fpreparefinalsend && (soap->error = soap->fpreparefinalsend(soap)) != SOAP_OK) return soap->error; } +#else + (void)soap; #endif return SOAP_OK; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -7203,27 +7971,36 @@ soap_begin_send(struct soap *soap) soap_free_ns(soap); soap->error = SOAP_OK; soap->mode = soap->omode | (soap->mode & (SOAP_IO_LENGTH | SOAP_ENC_DIME)); -#ifdef WITH_ZLIB - if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) - { if (soap->mode & SOAP_ENC_XML) - soap->mode |= SOAP_IO_BUFFER; - else - soap->mode |= SOAP_IO_STORE; - } -#endif #ifndef WITH_LEAN if ((soap->mode & SOAP_IO_UDP)) { soap->mode |= SOAP_ENC_XML; - if (soap->count > SOAP_BUFLEN) + soap->mode &= ~SOAP_IO_CHUNK; + if (soap->count > sizeof(soap->buf)) return soap->error = SOAP_UDP_ERROR; } #endif - if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH && soap_valid_socket(soap->socket)) - { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML)) +#ifdef WITH_ZLIB + if ((soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) == SOAP_IO_FLUSH) + { if (soap->mode & SOAP_ENC_XML) soap->mode |= SOAP_IO_BUFFER; else soap->mode |= SOAP_IO_STORE; } +#endif + if ((soap->mode & SOAP_IO) == SOAP_IO_FLUSH) + { if (soap_valid_socket(soap->socket)) + { if (soap->count || (soap->mode & SOAP_IO_LENGTH) || (soap->mode & SOAP_ENC_XML)) + soap->mode |= SOAP_IO_BUFFER; + else + soap->mode |= SOAP_IO_STORE; + } +#if !defined(__cplusplus) || defined(WITH_COMPAT) + else if (soap->os != NULL) + { *soap->os = NULL; + soap->mode |= SOAP_IO_STORE; + } +#endif + } soap->mode &= ~SOAP_IO_LENGTH; if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) if (soap_new_block(soap) == NULL) @@ -7242,7 +8019,7 @@ soap_begin_send(struct soap *soap) #ifdef WIN32 #ifndef UNDER_CE #ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket) && !soap->os) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */ + if (!soap_valid_socket(soap->socket) && !soap->os && soap->sendfd >= 0) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */ #ifdef __BORLANDC__ setmode(soap->sendfd, _O_BINARY); #else @@ -7263,21 +8040,30 @@ soap_begin_send(struct soap *soap) soap->mustUnderstand = 0; soap->encoding = 0; soap->idnum = 0; + soap->body = 1; soap->level = 0; soap_clr_attr(soap); soap_set_local_namespaces(soap); #ifdef WITH_ZLIB soap->z_ratio_out = 1.0; if ((soap->mode & SOAP_ENC_ZLIB) && soap->zlib_state != SOAP_ZLIB_DEFLATE) - { if (!soap->z_buf) - soap->z_buf = (char*)SOAP_MALLOC(soap, SOAP_BUFLEN); + { if (!soap->d_stream) + { soap->d_stream = (z_stream*)SOAP_MALLOC(soap, sizeof(z_stream)); + soap->d_stream->zalloc = Z_NULL; + soap->d_stream->zfree = Z_NULL; + soap->d_stream->opaque = Z_NULL; + soap->d_stream->next_in = Z_NULL; + } + if (!soap->z_buf) + soap->z_buf = (char*)SOAP_MALLOC(soap, sizeof(soap->buf)); soap->d_stream->next_out = (Byte*)soap->z_buf; - soap->d_stream->avail_out = SOAP_BUFLEN; + soap->d_stream->avail_out = sizeof(soap->buf); #ifdef WITH_GZIP if (soap->zlib_out != SOAP_ZLIB_DEFLATE) - { memcpy(soap->z_buf, "\37\213\10\0\0\0\0\0\0\377", 10); + { if (soap_memcpy((void*)soap->z_buf, sizeof(soap->buf), (const void*)"\37\213\10\0\0\0\0\0\0\377", 10)) + return soap->error = SOAP_EOM; soap->d_stream->next_out = (Byte*)soap->z_buf + 10; - soap->d_stream->avail_out = SOAP_BUFLEN - 10; + soap->d_stream->avail_out = sizeof(soap->buf) - 10; soap->z_crc = crc32(0L, NULL, 0); soap->zlib_out = SOAP_ZLIB_GZIP; if (soap->z_dict) @@ -7304,7 +8090,7 @@ soap_begin_send(struct soap *soap) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin send phase (socket=%d mode=0x%x count=%lu)\n", soap->socket, soap->mode, (unsigned long)soap->count)); soap->part = SOAP_BEGIN; #ifndef WITH_LEANER - if (soap->fprepareinitsend && (soap->mode & SOAP_IO) == SOAP_IO_STORE && (soap->error = soap->fprepareinitsend(soap))) + if (soap->fprepareinitsend && (soap->mode & SOAP_IO) == SOAP_IO_STORE && (soap->error = soap->fprepareinitsend(soap)) != SOAP_OK) return soap->error; #endif return SOAP_OK; @@ -7312,6 +8098,7 @@ soap_begin_send(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 @@ -7329,6 +8116,7 @@ soap_embedded(struct soap *soap, const void *p, int t) #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 @@ -7353,14 +8141,15 @@ soap_reference(struct soap *soap, const void *p, int t) #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 -soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t) +soap_array_reference(struct soap *soap, const void *p, const void *a, int n, int t) { struct soap_plist *pp; - if (!p || !a->__ptr || (!soap->encodingStyle && !(soap->omode & (SOAP_ENC_DIME|SOAP_ENC_MIME|SOAP_ENC_MTOM|SOAP_XML_GRAPH))) || (soap->omode & SOAP_XML_TREE)) + if (!p || !a || (!soap->encodingStyle && !(soap->omode & (SOAP_ENC_DIME|SOAP_ENC_MIME|SOAP_ENC_MTOM|SOAP_XML_GRAPH))) || (soap->omode & SOAP_XML_TREE)) return 1; if (soap_array_pointer_lookup(soap, p, a, n, t, &pp)) { if (pp->mark1 == 0) @@ -7370,13 +8159,14 @@ soap_array_reference(struct soap *soap, const void *p, const struct soap_array * } else if (!soap_pointer_enter(soap, p, a, n, t, &pp)) return 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p n=%lu type=%d (%d %d)\n", p, a, (unsigned long)n, t, (int)pp->mark1, (int)pp->mark2)); return pp->mark1; } #endif #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 @@ -7384,13 +8174,15 @@ int SOAP_FMAC2 soap_embedded_id(struct soap *soap, int id, const void *p, int t) { struct soap_plist *pp = NULL; - if (!id || (!soap->encodingStyle && !(soap->omode & SOAP_XML_GRAPH)) || (soap->omode & SOAP_XML_TREE)) + if (id >= 0 || (!soap->encodingStyle && !(soap->omode & SOAP_XML_GRAPH)) || (soap->omode & SOAP_XML_TREE)) return id; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id %p type=%d id=%d\n", p, t, id)); - if (soap->version == 1 && soap->part != SOAP_IN_HEADER) - { if (id < 0) - { id = soap_pointer_lookup(soap, p, t, &pp); - if (id) + if (id < -1) + return soap_embed(soap, p, NULL, 0, t); + if (id < 0) + { id = soap_pointer_lookup(soap, p, t, &pp); + if (soap->version == 1 && soap->part != SOAP_IN_HEADER) + { if (id) { if (soap->mode & SOAP_IO_LENGTH) pp->mark1 = 2; else @@ -7399,18 +8191,13 @@ soap_embedded_id(struct soap *soap, int id, const void *p, int t) } return -1; } - return id; - } - if (id < 0) - id = soap_pointer_lookup(soap, p, t, &pp); - else if (id && !soap_pointer_lookup(soap, p, t, &pp)) - return 0; - if (id && pp) - { if (soap->mode & SOAP_IO_LENGTH) - pp->mark1 = 1; - else - pp->mark2 = 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); + else if (id) + { if (soap->mode & SOAP_IO_LENGTH) + pp->mark1 = 1; + else + pp->mark2 = 1; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded_id embedded ref id=%d %p type=%d = (%d %d)\n", id, p, t, (int)pp->mark1, (int)pp->mark2)); + } } return id; } @@ -7418,6 +8205,7 @@ soap_embedded_id(struct soap *soap, int id, const void *p, int t) #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 @@ -7440,6 +8228,7 @@ soap_is_embedded(struct soap *soap, struct soap_plist *pp) #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 @@ -7458,6 +8247,7 @@ soap_is_single(struct soap *soap, struct soap_plist *pp) #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 @@ -7475,18 +8265,17 @@ soap_set_embedded(struct soap *soap, struct soap_plist *pp) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 -soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, const char *aid, const char *atype, const char *aoptions, int n, const char *type, int t) -{ -#ifndef WITH_NOIDREF - struct soap_plist *pp; +soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const void *a, int n, const char *aid, const char *atype, const char *aoptions, const char *type, int t) +{ struct soap_plist *pp; int i; - if (!p || !a->__ptr || (!aid && !atype)) - return soap_element_id(soap, tag, id, p, a, n, type, t); + if (!p || !a || (!aid && !atype)) + return soap_element_id(soap, tag, id, p, a, n, type, t, NULL); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attachment tag='%s' id='%s' (%d) type='%s'\n", tag, aid ? aid : SOAP_STR_EOS, id, atype ? atype : SOAP_STR_EOS)); i = soap_array_pointer_lookup(soap, p, a, n, t, &pp); if (!i) @@ -7499,12 +8288,7 @@ soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const if (id <= 0) id = i; if (!aid) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), soap->dime_id_format, id); -#else - sprintf(soap->tmpbuf, soap->dime_id_format, id); -#endif + { (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), strlen(soap->dime_id_format) + 20), soap->dime_id_format, id); aid = soap_strdup(soap, soap->tmpbuf); } /* Add MTOM xop:Include element when necessary */ @@ -7521,20 +8305,22 @@ soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const { if (pp->mark1 != 3) { struct soap_multipart *content; if (soap->mode & SOAP_ENC_MTOM) - content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a->__ptr, a->__size); + content = soap_new_multipart(soap, &soap->mime.first, &soap->mime.last, (char*)a, n); else - content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a->__ptr, a->__size); + content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, (char*)a, n); if (!content) { soap->error = SOAP_EOM; return -1; } if (!strncmp(aid, "cid:", 4)) /* RFC 2111 */ { if (soap->mode & SOAP_ENC_MTOM) - { char *s = (char*)soap_malloc(soap, strlen(aid) - 1); + { size_t l = strlen(aid) - 1; + char *s = (char*)soap_malloc(soap, l); if (s) - { *s = '<'; - strcpy(s + 1, aid + 4); - strcat(s, ">"); + { s[0] = '<'; + soap_strncpy(s + 1, l - 1, aid + 4, l - 3); + s[l - 2] = '>'; + s[l - 1] = '\0'; content->id = s; } } @@ -7551,18 +8337,18 @@ soap_attachment(struct soap *soap, const char *tag, int id, const void *p, const } else pp->mark2 = 3; -#endif return -1; } #endif #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_1 static void soap_init_iht(struct soap *soap) -{ register int i; +{ int i; for (i = 0; i < SOAP_IDHASH; i++) soap->iht[i] = NULL; } @@ -7570,13 +8356,14 @@ soap_init_iht(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_1 static void soap_free_iht(struct soap *soap) -{ register int i; - register struct soap_ilist *ip = NULL, *p = NULL; - register struct soap_flist *fp = NULL, *fq = NULL; +{ int i; + struct soap_ilist *ip = NULL, *p = NULL; + struct soap_flist *fp = NULL, *fq = NULL; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free ID hashtable\n")); for (i = 0; i < SOAP_IDHASH; i++) { for (ip = soap->iht[i]; ip; ip = p) @@ -7594,13 +8381,14 @@ soap_free_iht(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 struct soap_ilist * SOAP_FMAC2 soap_lookup(struct soap *soap, const char *id) -{ register struct soap_ilist *ip = NULL; +{ struct soap_ilist *ip = NULL; for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next) if (!strcmp(ip->id, id)) return ip; @@ -7610,17 +8398,28 @@ soap_lookup(struct soap *soap, const char *id) #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 struct soap_ilist * SOAP_FMAC2 -soap_enter(struct soap *soap, const char *id) -{ register size_t h; - register struct soap_ilist *ip; - ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + strlen(id)); +soap_enter(struct soap *soap, const char *id, int t, size_t n) +{ size_t h; + struct soap_ilist *ip; + size_t l = strlen(id); + ip = (struct soap_ilist*)SOAP_MALLOC(soap, sizeof(struct soap_ilist) + l); if (ip) - { strcpy((char*)ip->id, id); + { ip->type = t; + ip->size = n; + ip->ptr = NULL; + ip->spine = NULL; + ip->link = NULL; + ip->copy = NULL; + ip->flist = NULL; + ip->smart = NULL; + ip->shaky = 0; + soap_strcpy((char*)ip->id, l + 1, id); h = soap_hash(id); /* h = (HASH(id) % SOAP_IDHASH) so soap->iht[h] is safe */ ip->next = soap->iht[h]; soap->iht[h] = ip; @@ -7631,14 +8430,13 @@ soap_enter(struct soap *soap, const char *id) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap *soap, size_t n) -{ register char *p; - if (!n) - return (void*)SOAP_NON_NULL; +{ char *p; if (!soap) return SOAP_MALLOC(soap, n); if (soap->fmalloc) @@ -7646,38 +8444,40 @@ soap_malloc(struct soap *soap, size_t n) else { n += sizeof(short); n += (-(long)n) & (sizeof(void*)-1); /* align at 4-, 8- or 16-byte boundary */ - if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t)))) + p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t)); + if (!p) { soap->error = SOAP_EOM; return NULL; } - /* set the canary to detect corruption */ + /* set a canary word to detect memory overruns and data corruption */ *(unsigned short*)(p + n - sizeof(unsigned short)) = (unsigned short)SOAP_CANARY; /* keep chain of alloced cells for destruction */ *(void**)(p + n) = soap->alist; *(size_t*)(p + n + sizeof(void*)) = n; soap->alist = p + n; } - soap->alloced = 1; return p; } #endif /******************************************************************************/ + #ifdef SOAP_MEM_DEBUG static void soap_init_mht(struct soap *soap) -{ register int i; +{ int i; for (i = 0; i < (int)SOAP_PTRHASH; i++) soap->mht[i] = NULL; } #endif /******************************************************************************/ + #ifdef SOAP_MEM_DEBUG static void soap_free_mht(struct soap *soap) -{ register int i; - register struct soap_mlist *mp, *mq; +{ int i; + struct soap_mlist *mp, *mq; for (i = 0; i < (int)SOAP_PTRHASH; i++) { for (mp = soap->mht[i]; mp; mp = mq) { mq = mp->next; @@ -7691,15 +8491,16 @@ soap_free_mht(struct soap *soap) #endif /******************************************************************************/ + #ifdef SOAP_MEM_DEBUG SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap *soap, const char *file, int line, size_t size) -{ register void *p = malloc(size); +{ void *p = malloc(size); if (soap) - { register size_t h = soap_hash_ptr(p); - register struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist)); + { size_t h = soap_hash_ptr(p); + struct soap_mlist *mp = (struct soap_mlist*)malloc(sizeof(struct soap_mlist)); if (soap->fdebug[SOAP_INDEX_TEST]) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): malloc(%lu) = %p\n", file, line, (unsigned long)size, p)); } @@ -7715,38 +8516,44 @@ soap_track_malloc(struct soap *soap, const char *file, int line, size_t size) #endif /******************************************************************************/ + #ifdef SOAP_MEM_DEBUG SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap *soap, const char *file, int line, void *p) -{ register size_t h = soap_hash_ptr(p); - register struct soap_mlist *mp; - for (mp = soap->mht[h]; mp; mp = mp->next) - if (mp->ptr == p) - break; - if (mp) - { if (mp->live) - { free(p); - if (soap->fdebug[SOAP_INDEX_TEST]) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p)); +{ if (!soap) + free(p); + else + { size_t h = soap_hash_ptr(p); + struct soap_mlist *mp; + for (mp = soap->mht[h]; mp; mp = mp->next) + if (mp->ptr == p) + break; + if (mp) + { if (mp->live) + { if (soap->fdebug[SOAP_INDEX_TEST]) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): free(%p)\n", file, line, p)); + } + free(p); + mp->live = 0; } - mp->live = 0; + else + fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line); } else - fprintf(stderr, "%s(%d): free(%p) double free of pointer malloced at %s(%d)\n", file, line, p, mp->file, mp->line); + fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p); } - else - fprintf(stderr, "%s(%d): free(%p) pointer not malloced\n", file, line, p); } #endif /******************************************************************************/ + #ifdef SOAP_MEM_DEBUG static void soap_track_unlink(struct soap *soap, const void *p) -{ register size_t h = soap_hash_ptr(p); - register struct soap_mlist *mp; +{ size_t h = soap_hash_ptr(p); + struct soap_mlist *mp; for (mp = soap->mht[h]; mp; mp = mp->next) if (mp->ptr == p) break; @@ -7756,6 +8563,7 @@ soap_track_unlink(struct soap *soap, const void *p) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void @@ -7764,8 +8572,8 @@ soap_dealloc(struct soap *soap, void *p) { if (soap_check_state(soap)) return; if (p) - { register char **q; - for (q = (char**)&soap->alist; *q; q = *(char***)q) + { char **q; + for (q = (char**)(void*)&soap->alist; *q; q = *(char***)q) { if (*(unsigned short*)(char*)(*q - sizeof(unsigned short)) != (unsigned short)SOAP_CANARY) { @@ -7788,7 +8596,7 @@ soap_dealloc(struct soap *soap, void *p) soap_delete(soap, p); } else - { register char *q; + { char *q; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free all soap_malloc() data\n")); while (soap->alist) { q = (char*)soap->alist; @@ -7807,7 +8615,7 @@ soap_dealloc(struct soap *soap, void *p) q -= *(size_t*)(q + sizeof(void*)); SOAP_FREE(soap, q); } - /* we must assume these were deallocated: */ + /* assume these were deallocated: */ soap->http_content = NULL; soap->action = NULL; soap->fault = NULL; @@ -7826,19 +8634,20 @@ soap_dealloc(struct soap *soap, void *p) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap *soap, void *p) -{ register struct soap_clist **cp; +{ struct soap_clist **cp; if (soap_check_state(soap)) return; cp = &soap->clist; if (p) { while (*cp) { if (p == (*cp)->ptr) - { register struct soap_clist *q = *cp; + { struct soap_clist *q = *cp; *cp = q->next; if (q->fdelete(q)) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: deletion callback failed for object type %d\n", q->ptr, q->type)); @@ -7855,8 +8664,9 @@ soap_delete(struct soap *soap, void *p) } else { while (*cp) - { register struct soap_clist *q = *cp; + { struct soap_clist *q = *cp; *cp = q->next; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Delete %p type=%d (cp=%p)\n", q->ptr, q->type, q)); if (q->fdelete(q)) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not dealloc data %p: deletion callback failed for object type %d\n", q->ptr, q->type)); #ifdef SOAP_MEM_DEBUG @@ -7866,25 +8676,26 @@ soap_delete(struct soap *soap, void *p) SOAP_FREE(soap, q); } } - soap->fault = NULL; /* this was possibly deallocated */ - soap->header = NULL; /* this was possibly deallocated */ + soap->fault = NULL; /* assume this was deallocated */ + soap->header = NULL; /* assume this was deallocated */ } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void SOAP_FMAC2 soap_delegate_deletion(struct soap *soap, struct soap *soap_to) -{ register struct soap_clist *cp; - register char **q; +{ struct soap_clist *cp; + char **q; #ifdef SOAP_MEM_DEBUG - register void *p; - register struct soap_mlist **mp, *mq; + void *p; + struct soap_mlist **mp, *mq; size_t h; #endif - for (q = (char**)&soap->alist; *q; q = *(char***)q) + for (q = (char**)(void*)&soap->alist; *q; q = *(char***)q) { if (*(unsigned short*)(char*)(*q - sizeof(unsigned short)) != (unsigned short)SOAP_CANARY) { @@ -7943,41 +8754,51 @@ soap_delegate_deletion(struct soap *soap, struct soap *soap_to) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap *soap, void *p, int t, int n, int (*fdelete)(struct soap_clist*)) -{ register struct soap_clist *cp; - if ((cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist)))) - { cp->next = soap->clist; - cp->type = t; - cp->size = n; - cp->ptr = p; - cp->fdelete = fdelete; - soap->clist = cp; +{ struct soap_clist *cp = NULL; + if (soap) + { if (p && n != SOAP_NO_LINK_TO_DELETE) + { cp = (struct soap_clist*)SOAP_MALLOC(soap, sizeof(struct soap_clist)); + if (!cp) + soap->error = SOAP_EOM; + else + { cp->next = soap->clist; + cp->type = t; + cp->size = n; + cp->ptr = p; + cp->fdelete = fdelete; + soap->clist = cp; + } + } + soap->alloced = t; } return cp; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_unlink(struct soap *soap, const void *p) -{ register char **q; - register struct soap_clist **cp; +{ char **q; + struct soap_clist **cp; if (soap && p) - { for (q = (char**)&soap->alist; *q; q = *(char***)q) + { for (q = (char**)(void*)&soap->alist; *q; q = *(char***)q) { if (p == (void*)(*q - *(size_t*)(*q + sizeof(void*)))) { *q = **(char***)q; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Unlinked data %p\n", p)); #ifdef SOAP_MEM_DEBUG soap_track_unlink(soap, p); #endif - return SOAP_OK; /* found and removed from dealloc chain */ + return SOAP_OK; /* found and removed from dealloc chain */ } } for (cp = &soap->clist; *cp; cp = &(*cp)->next) @@ -7986,7 +8807,7 @@ soap_unlink(struct soap *soap, const void *p) q = (char**)*cp; *cp = (*cp)->next; SOAP_FREE(soap, q); - return SOAP_OK; /* found and removed from dealloc chain */ + return SOAP_OK; /* found and removed from dealloc chain */ } } } @@ -7995,13 +8816,14 @@ soap_unlink(struct soap *soap, const void *p) #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap *soap, const char *id) -{ register struct soap_ilist *ip; +{ struct soap_ilist *ip; if (id && *id) { ip = soap_lookup(soap, id); if (ip) @@ -8016,87 +8838,119 @@ soap_lookup_type(struct soap *soap, const char *id) #endif /******************************************************************************/ + +#ifndef WITH_NOIDREF +#ifndef PALM_1 +SOAP_FMAC1 +short +SOAP_FMAC2 +soap_begin_shaky(struct soap *soap) +{ short f = soap->shaky; + soap->shaky = 1; + return f; +} +#endif +#endif + +/******************************************************************************/ + +#ifndef WITH_NOIDREF +#ifndef PALM_1 +SOAP_FMAC1 +void +SOAP_FMAC2 +soap_end_shaky(struct soap *soap, short f) +{ soap->shaky = f; +} +#endif +#endif + +/******************************************************************************/ + +#ifndef WITH_NOIDREF +static int +soap_is_shaky(struct soap *soap, void *p) +{ (void)p; + if (!soap->blist && !soap->shaky) + return 0; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Shaky %p\n", p)); + return 1; +} +#endif + +/******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 void* SOAP_FMAC2 -soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k) +soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, unsigned int k, int (*fbase)(int, int)) { struct soap_ilist *ip; - void **q; if (!p || !id || !*id) return p; ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ if (!ip) - { if (!(ip = soap_enter(soap, id))) /* new hash table entry for string id */ + { ip = soap_enter(soap, id, t, n); /* new hash table entry for string id */ + if (!ip) return NULL; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d %p (%u bytes)\n", id, t, p, (unsigned int)n)); - ip->type = t; - ip->size = n; - ip->link = p; - ip->copy = NULL; - ip->flist = NULL; - ip->ptr = NULL; - ip->level = k; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding first href='%s' type=%d location=%p (%u bytes) level=%u\n", id, t, p, (unsigned int)n, k)); *p = NULL; - } - else if (ip->ptr) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n)); - if (ip->type != t) - { strcpy(soap->id, id); - soap->error = SOAP_HREF; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: href='%s' id-type=%d href-type=%d\n", id, ip->type, t)); - return NULL; - } - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) + if (k) + { int i; + if (k > SOAP_MAXPTRS) return NULL; - *p = (void*)q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); + ip->spine = (void**)soap_malloc(soap, SOAP_MAXPTRS * sizeof(void*)); + if (!ip->spine) + return NULL; + ip->spine[0] = NULL; + for (i = 1; i < SOAP_MAXPTRS; i++) + ip->spine[i] = &ip->spine[i - 1]; + *p = &ip->spine[k - 1]; + } + else + { ip->link = p; + ip->shaky = soap_is_shaky(soap, (void*)p); } + } + else if (ip->type != t && (!fbase || !fbase(ip->type, t)) && (!fbase || !fbase(t, ip->type) || soap_type_punned(soap, ip))) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup type incompatibility: ref='%s' id-type=%d ref-type=%d\n", id, ip->type, t)); + (void)soap_id_nullify(soap, id); + return NULL; + } + else if (k == 0 && ip->ptr && !ip->shaky) /* when block lists are in use, ip->ptr will change */ + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes) level=%u\n", id, t, ip->ptr, (unsigned int)n, k)); *p = ip->ptr; } - else if (ip->level > k) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving level %u pointers to href='%s'\n", ip->level, id)); - while (ip->level > k) - { void *s, **r = &ip->link; - q = (void**)ip->link; - while (q) - { *r = (void*)soap_malloc(soap, sizeof(void*)); - if (!*r) + else + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes) level=%u\n", id, t, p, (unsigned int)n, k)); + if (fbase && fbase(t, ip->type) && !soap_type_punned(soap, ip)) + { ip->type = t; + ip->size = n; + } + *p = NULL; + if (k) + { if (!ip->spine) + { int i; + if (k > SOAP_MAXPTRS) + return NULL; + ip->spine = (void**)soap_malloc(soap, SOAP_MAXPTRS * sizeof(void*)); + if (!ip->spine) return NULL; - s = *q; - *q = *r; - r = (void**)*r; - q = (void**)s; + ip->spine[0] = NULL; + for (i = 1; i < SOAP_MAXPTRS; i++) + ip->spine[i] = &ip->spine[i - 1]; } - *r = NULL; - ip->size = n; - ip->copy = NULL; - ip->level = ip->level - 1; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); + *p = &ip->spine[k - 1]; + if (ip->ptr && !ip->shaky) + ip->spine[0] = ip->ptr; } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; - } - else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarded href='%s' type=%d location=%p (%u bytes)\n", id, t, p, (unsigned int)n)); - while (ip->level < k) - { q = (void**)soap_malloc(soap, sizeof(void*)); - if (!q) - return NULL; + else + { void *q = ip->link; + ip->link = p; + ip->shaky = soap_is_shaky(soap, (void*)p); *p = q; - p = q; - k--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n")); } - q = (void**)ip->link; - ip->link = p; - *p = (void*)q; } return p; } @@ -8104,81 +8958,87 @@ soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, uns #endif /******************************************************************************/ + #ifndef WITH_NOIDREF #ifndef PALM_2 SOAP_FMAC1 void* SOAP_FMAC2 -soap_id_forward(struct soap *soap, const char *href, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t)) +soap_id_forward(struct soap *soap, const char *href, void *p, size_t i, int t, int tt, size_t n, unsigned int k, void (*finsert)(struct soap*, int, int, void*, size_t, const void*, void**), int (*fbase)(int, int)) { struct soap_ilist *ip; if (!p || !href || !*href) return p; ip = soap_lookup(soap, href); /* lookup pointer to hash table entry for string id */ if (!ip) - { if (!(ip = soap_enter(soap, href))) /* new hash table entry for string id */ + { ip = soap_enter(soap, href, t, n); /* new hash table entry for string id */ + if (!ip) return NULL; - ip->type = st; - ip->size = n; - ip->link = NULL; - ip->copy = NULL; - ip->ptr = NULL; - ip->level = 0; - ip->flist = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, t, (unsigned long)n, k, p)); } - else if (ip->type != st || (ip->level == k && ip->size != n)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n)); - strcpy(soap->id, href); - soap->error = SOAP_HREF; + else if ((ip->type != t || ip->size != n) && k == 0) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forward type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n)); + (void)soap_id_nullify(soap, href); return NULL; } - if (fcopy || n < sizeof(void*) || *href != '#') - { register struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist)); + if (finsert || n < sizeof(void*)) + { struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist)); if (!fp) { soap->error = SOAP_EOM; return NULL; } + if (fbase && fbase(t, ip->type) && !soap_type_punned(soap, ip)) + { ip->type = t; + ip->size = n; + } + if ((ip->type != t || ip->size != n) && (!fbase || !fbase(ip->type, t))) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forward type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n)); + SOAP_FREE(soap, fp); + (void)soap_id_nullify(soap, href); + return NULL; + } fp->next = ip->flist; fp->type = tt; fp->ptr = p; fp->level = k; - fp->len = len; - if (fcopy) - fp->fcopy = fcopy; - else - fp->fcopy = soap_fcopy; + fp->index = i; + fp->finsert = finsert; ip->flist = fp; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u len=%lu href='%s'\n", st, tt, (unsigned long)n, p, k, (unsigned long)len, href)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding type=%d (target type=%d) size=%lu location=%p level=%u index=%lu href='%s'\n", t, tt, (unsigned long)n, p, k, (unsigned long)i, href)); } else - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, st, href)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Forwarding copying address %p for type=%d href='%s'\n", p, t, href)); *(void**)p = ip->copy; ip->copy = p; } + ip->shaky = soap_is_shaky(soap, p); return p; } #endif #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void* SOAP_FMAC2 -soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)) +soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*), int (*fbase)(int, int)) { #ifndef WITH_NOIDREF struct soap_ilist *ip; #endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d loc=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); + (void)id; (void)fbase; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enter id='%s' type=%d location=%p size=%lu\n", id, t, p, (unsigned long)n)); soap->alloced = 0; if (!p) { if (finstantiate) - p = finstantiate(soap, t, type, arrayType, &n); + { p = finstantiate(soap, t, type, arrayType, &n); /* soap->alloced is set in soap_link() */ + t = soap->alloced; + } else - p = soap_malloc(soap, n); - if (p) - soap->alloced = 1; + { p = soap_malloc(soap, n); + soap->alloced = t; + } } #ifndef WITH_NOIDREF if (!id || !*id) @@ -8186,36 +9046,48 @@ soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsig return p; #ifndef WITH_NOIDREF ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Lookup entry id='%s for location=%p'\n", id, p)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Lookup entry id='%s' for location=%p type=%d\n", id, p, t)); if (!ip) - { if (!(ip = soap_enter(soap, id))) /* new hash table entry for string id */ + { ip = soap_enter(soap, id, t, n); /* new hash table entry for string id */ + if (!ip) return NULL; - ip->type = t; - ip->link = NULL; - ip->copy = NULL; - ip->flist = NULL; - ip->size = n; ip->ptr = p; - ip->level = k; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu level=%u location=%p\n", id, t, (unsigned long)n, k, p)); - } - else if ((ip->type != t || (ip->level == k && ip->size != n)) && (ip->copy || ip->flist)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n)); - strcpy(soap->id, id); - soap->error = SOAP_HREF; - return NULL; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New entry id='%s' type=%d size=%lu location=%p\n", id, t, (unsigned long)n, p)); + if (!soap->alloced) + ip->shaky = soap_is_shaky(soap, p); } else if (ip->ptr) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id)); - strcpy(soap->id, id); + soap_strcpy(soap->id, sizeof(soap->id), id); soap->error = SOAP_DUPLICATE_ID; return NULL; } + else if ((ip->type != t && (!fbase || !fbase(t, ip->type) || soap_type_punned(soap, ip))) + || (ip->type == t && ip->size != n && soap_type_punned(soap, ip))) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enter type incompatibility id='%s' expect type=%d size=%lu got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, t, (unsigned long)n)); + (void)soap_id_nullify(soap, id); + return NULL; + } else - { ip->size = n; + { ip->type = t; + ip->size = n; ip->ptr = p; - ip->level = k; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Update entry id='%s' type=%d location=%p size=%lu level=%u\n", id, t, p, (unsigned long)n, k)); + if (!soap->alloced) + ip->shaky = soap_is_shaky(soap, p); + if (soap->alloced || !ip->shaky) + { void **q; /* ptr will not change later, so resolve links now */ + if (ip->spine) + ip->spine[0] = p; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s' type=%d\n", ip->id, ip->type)); + q = (void**)ip->link; + while (q) + { void *r = *q; + *q = p; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... link %p -> %p\n", q, p)); + q = (void**)r; + } + ip->link = NULL; + } } return ip->ptr; #endif @@ -8223,18 +9095,75 @@ soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsig #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 -void +void** SOAP_FMAC2 -soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t len, const void *q, size_t n) -{ DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Copying data type=%d (target type=%d) %p -> %p (%lu bytes)\n", st, tt, q, p, (unsigned long)n)); - memcpy(p, q, n); - (void)soap; (void)st; (void)tt; (void)len; +soap_id_smart(struct soap *soap, const char *id, int t, size_t n) +{ (void)soap; (void)id; (void)t; (void)n; +#ifndef WITH_NOIDREF + if (id && *id) + { struct soap_ilist *ip = soap_lookup(soap, id); /* lookup pointer to hash table entry for string id */ + if (!ip) + { ip = soap_enter(soap, id, t, n); /* new hash table entry for string id */ + if (!ip) + return NULL; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New smart shared pointer entry id='%s' type=%d size=%lu smart=%p\n", id, t, (unsigned long)n, ip->smart)); + return &ip->smart; + } +#endif + return NULL; } #endif /******************************************************************************/ + +#ifndef WITH_NOIDREF +#ifndef PALM_2 +static int +soap_type_punned(struct soap *soap, const struct soap_ilist *ip) +{ const struct soap_flist *fp; + (void)soap; + if (ip->ptr || ip->copy) + return 1; + for (fp = ip->flist; fp; fp = fp->next) + if (fp->level == 0) + return 1; + return 0; +} +#endif +#endif + +/******************************************************************************/ + +#ifndef WITH_NOIDREF +#ifndef PALM_2 +SOAP_FMAC1 +int +SOAP_FMAC2 +soap_id_nullify(struct soap *soap, const char *id) +{ int i; + for (i = 0; i < SOAP_IDHASH; i++) + { struct soap_ilist *ip; + for (ip = soap->iht[i]; ip; ip = ip->next) + { void *p, *q; + for (p = ip->link; p; p = q) + { q = *(void**)p; + *(void**)p = NULL; + } + ip->link = NULL; + } + } + soap_strcpy(soap->id, sizeof(soap->id), id); + return soap->error = SOAP_HREF; +} +#endif +#endif + +/******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -8250,7 +9179,8 @@ soap_end_send(struct soap *soap) soap->dime.list->next = NULL; soap->dime.last = soap->dime.list; } - if (!(err = soap_putdime(soap))) + err = soap_putdime(soap); + if (!err) err = soap_putmime(soap); soap->mime.list = NULL; soap->mime.first = NULL; @@ -8266,6 +9196,7 @@ soap_end_send(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -8285,20 +9216,20 @@ soap_end_send_flush(struct soap *soap) return soap->error; #endif #ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) + if ((soap->mode & SOAP_ENC_ZLIB) && soap->d_stream) { int r; soap->d_stream->avail_in = 0; do { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflating remainder\n")); r = deflate(soap->d_stream, Z_FINISH); - if (soap->d_stream->avail_out != SOAP_BUFLEN) - { if (soap_flush_raw(soap, soap->z_buf, SOAP_BUFLEN - soap->d_stream->avail_out)) + if (soap->d_stream->avail_out != sizeof(soap->buf)) + { if (soap_flush_raw(soap, soap->z_buf, sizeof(soap->buf) - soap->d_stream->avail_out)) { soap->zlib_state = SOAP_ZLIB_NONE; deflateEnd(soap->d_stream); return soap->error; } soap->d_stream->next_out = (Byte*)soap->z_buf; - soap->d_stream->avail_out = SOAP_BUFLEN; + soap->d_stream->avail_out = sizeof(soap->buf); } } while (r == Z_OK); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Deflated total %lu->%lu bytes\n", soap->d_stream->total_in, soap->d_stream->total_out)); @@ -8327,49 +9258,65 @@ soap_end_send_flush(struct soap *soap) } #endif if ((soap->mode & SOAP_IO) == SOAP_IO_STORE) - { char *p; -#ifndef WITH_NOHTTP - if (!(soap->mode & SOAP_ENC_XML)) - { soap->mode--; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size)); - if (soap->status >= SOAP_POST) - soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size); - else if (soap->status != SOAP_STOP) - soap->error = soap->fresponse(soap, soap->status, soap->blist->size); - if (soap->error || soap_flush(soap)) - return soap->error; - soap->mode++; + { +#if !defined(__cplusplus) || defined(WITH_COMPAT) + if (soap->os) + { char *b = (char*)soap_push_block(soap, NULL, 1); + if (b) + *soap->os = soap_save_block(soap, NULL, NULL, 0); } + else #endif - for (p = soap_first_block(soap, NULL); p; p = soap_next_block(soap, NULL)) - { DBGMSG(SENT, p, soap_block_size(soap, NULL)); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Send %u bytes to socket=%d/fd=%d\n", (unsigned int)soap_block_size(soap, NULL), soap->socket, soap->sendfd)); - if ((soap->error = soap->fsend(soap, p, soap_block_size(soap, NULL)))) - { soap_end_block(soap, NULL); - return soap->error; + { char *p; +#ifndef WITH_NOHTTP + if (!(soap->mode & SOAP_ENC_XML)) + { soap->mode--; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending buffered message of length %u\n", (unsigned int)soap->blist->size)); + if (soap->status >= SOAP_POST) + soap->error = soap->fpost(soap, soap->endpoint, soap->host, soap->port, soap->path, soap->action, soap->blist->size); + else if (soap->status != SOAP_STOP) + soap->error = soap->fresponse(soap, soap->status, soap->blist->size); + if (soap->error || soap_flush(soap)) + return soap->error; + soap->mode++; } +#endif + for (p = soap_first_block(soap, NULL); p; p = soap_next_block(soap, NULL)) + { DBGMSG(SENT, p, soap_block_size(soap, NULL)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Send %u bytes to socket=%d/fd=%d\n", (unsigned int)soap_block_size(soap, NULL), soap->socket, soap->sendfd)); + soap->error = soap->fsend(soap, p, soap_block_size(soap, NULL)); + if (soap->error) + { soap_end_block(soap, NULL); + return soap->error; + } + } + soap_end_block(soap, NULL); } - soap_end_block(soap, NULL); - if (soap->fpreparefinalsend && (soap->error = soap->fpreparefinalsend(soap))) +#ifndef WITH_LEANER + if (soap->fpreparefinalsend && (soap->error = soap->fpreparefinalsend(soap)) != SOAP_OK) return soap->error; +#endif } #ifndef WITH_LEANER else if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) { DBGMSG(SENT, "\r\n0\r\n\r\n", 7); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Send 7 bytes to socket=%d/fd=%d\n", soap->socket, soap->sendfd)); - if ((soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7))) + soap->error = soap->fsend(soap, "\r\n0\r\n\r\n", 7); + if (soap->error) return soap->error; } #endif } #ifdef WITH_TCPFIN -#ifdef WITH_OPENSSL - if (!soap->ssl && soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP)) - soap->fshutdownsocket(soap, soap->socket, SOAP_SHUT_WR); /* Send TCP FIN */ -#else - if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP)) - soap->fshutdownsocket(soap, soap->socket, SOAP_SHUT_WR); /* Send TCP FIN */ +#if defined(WITH_OPENSSL) || defined(WITH_SYSTEMSSL) + if (!soap->ssl) #endif + if (soap_valid_socket(soap->socket) && !soap->keep_alive && !(soap->omode & SOAP_IO_UDP)) + soap->fshutdownsocket(soap, soap->socket, SOAP_SHUT_WR); /* Send TCP FIN */ +#endif +#if defined(__cplusplus) && !defined(WITH_COMPAT) + if (soap->os) + soap->os->flush(); #endif DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of send phase\n")); soap->omode &= ~SOAP_SEC_WSUID; @@ -8380,6 +9327,7 @@ soap_end_send_flush(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -8387,8 +9335,9 @@ SOAP_FMAC2 soap_end_recv(struct soap *soap) { soap->part = SOAP_END; #ifndef WITH_LEAN - soap->wsuid = NULL; /* reset before next send */ - soap->c14nexclude = NULL; /* reset before next send */ + soap->wsuid = NULL; /* reset before next send */ + soap->c14nexclude = NULL; /* reset before next send */ + soap->c14ninclude = NULL; /* reset before next send */ #endif #ifndef WITH_LEANER soap->ffilterrecv = NULL; @@ -8403,7 +9352,7 @@ soap_end_recv(struct soap *soap) /* Check if MIME attachments and mime-post-check flag is set, if so call soap_resolve() and return */ if (soap->mode & SOAP_ENC_MIME) { if (soap->mode & SOAP_MIME_POSTCHECK) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Post checking MIME attachments\n")); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Post checking MIME attachments\n")); if (!soap->keep_alive) soap->keep_alive = -1; #ifndef WITH_NOIDREF @@ -8424,39 +9373,39 @@ soap_end_recv(struct soap *soap) soap_resolve_attachment(soap, content); } #endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of receive message ok\n")); #ifdef WITH_ZLIB - if (soap->mode & SOAP_ENC_ZLIB) + if ((soap->mode & SOAP_ENC_ZLIB) && soap->d_stream) { /* Make sure end of compressed content is reached */ while (soap->d_stream->next_out != Z_NULL) if ((int)soap_get1(soap) == EOF) break; soap->mode &= ~SOAP_ENC_ZLIB; - memcpy(soap->buf, soap->z_buf, SOAP_BUFLEN); + soap_memcpy((void*)soap->buf, sizeof(soap->buf), (const void*)soap->z_buf, sizeof(soap->buf)); soap->bufidx = (char*)soap->d_stream->next_in - soap->z_buf; soap->buflen = soap->z_buflen; soap->zlib_state = SOAP_ZLIB_NONE; if (inflateEnd(soap->d_stream) != Z_OK) return soap->error = SOAP_ZLIB_ERROR; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Inflate end ok\n")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate end ok\n")); #ifdef WITH_GZIP if (soap->zlib_in == SOAP_ZLIB_GZIP) { soap_wchar c; short i; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Inflate gzip crc check\n")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate gzip crc check\n")); for (i = 0; i < 8; i++) { if ((int)(c = soap_get1(soap)) == EOF) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip error: unable to read crc value\n")); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Gzip error: unable to read crc value\n")); return soap->error = SOAP_ZLIB_ERROR; } soap->z_buf[i] = (char)c; } if (soap->z_crc != ((uLong)(unsigned char)soap->z_buf[0] | ((uLong)(unsigned char)soap->z_buf[1] << 8) | ((uLong)(unsigned char)soap->z_buf[2] << 16) | ((uLong)(unsigned char)soap->z_buf[3] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip inflate error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Gzip inflate error: crc check failed, message corrupted? (crc32=%lu)\n", (unsigned long)soap->z_crc)); return soap->error = SOAP_ZLIB_ERROR; } if (soap->d_stream->total_out != ((uLong)(unsigned char)soap->z_buf[4] | ((uLong)(unsigned char)soap->z_buf[5] << 8) | ((uLong)(unsigned char)soap->z_buf[6] << 16) | ((uLong)(unsigned char)soap->z_buf[7] << 24))) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Gzip inflate error: incorrect message length\n")); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Gzip inflate error: incorrect message length\n")); return soap->error = SOAP_ZLIB_ERROR; } } @@ -8466,7 +9415,7 @@ soap_end_recv(struct soap *soap) #endif if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) while (soap->ahead != EOF && !soap_recv_raw(soap)) - ; + continue; #ifndef WITH_NOIDREF if (soap_resolve(soap)) return soap->error; @@ -8488,13 +9437,14 @@ soap_end_recv(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void SOAP_FMAC2 soap_free_temp(struct soap *soap) -{ register struct soap_attribute *tp, *tq; - register struct Namespace *ns; +{ struct soap_attribute *tp, *tq; + struct Namespace *ns; soap_free_ns(soap); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free any remaining temp blocks\n")); while (soap->blist) @@ -8533,17 +9483,18 @@ soap_free_temp(struct soap *soap) } #endif #ifndef WITH_NOIDREF - soap_free_pht(soap); soap_free_iht(soap); #endif + soap_free_pht(soap); } #endif /******************************************************************************/ + #ifndef PALM_1 static void soap_free_ns(struct soap *soap) -{ register struct soap_nlist *np, *nq; +{ struct soap_nlist *np, *nq; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n")); for (np = soap->nlist; np; np = nq) { nq = np->next; @@ -8554,6 +9505,7 @@ soap_free_ns(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 #if !defined(WITH_LEAN) || defined(SOAP_DEBUG) static void @@ -8568,6 +9520,7 @@ soap_init_logs(struct soap *soap) #endif /******************************************************************************/ + #if !defined(WITH_LEAN) || defined(SOAP_DEBUG) SOAP_FMAC1 void @@ -8579,6 +9532,7 @@ soap_open_logfile(struct soap *soap, int i) #endif /******************************************************************************/ + #ifdef SOAP_DEBUG static void soap_close_logfile(struct soap *soap, int i) @@ -8590,6 +9544,7 @@ soap_close_logfile(struct soap *soap, int i) #endif /******************************************************************************/ + #ifdef SOAP_DEBUG SOAP_FMAC1 void @@ -8602,6 +9557,7 @@ soap_close_logfiles(struct soap *soap) #endif /******************************************************************************/ + #ifdef SOAP_DEBUG static void soap_set_logfile(struct soap *soap, int i, const char *logfile) @@ -8611,58 +9567,73 @@ soap_set_logfile(struct soap *soap, int i, const char *logfile) s = soap->logfile[i]; soap->logfile[i] = logfile; if (s) - SOAP_FREE(soap, (void*)s); + SOAP_FREE(soap, s); if (logfile) - if ((t = (char*)SOAP_MALLOC(soap, strlen(logfile) + 1))) - strcpy(t, logfile); + { size_t l = strlen(logfile) + 1; + t = (char*)SOAP_MALLOC(soap, l); + if (t) + soap_memcpy((void*)t, l, (const void*)logfile, l); + } soap->logfile[i] = t; } #endif /******************************************************************************/ + SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap *soap, const char *logfile) { + (void)soap; (void)logfile; #ifdef SOAP_DEBUG soap_set_logfile(soap, SOAP_INDEX_RECV, logfile); #endif } /******************************************************************************/ + SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap *soap, const char *logfile) { + (void)soap; (void)logfile; #ifdef SOAP_DEBUG soap_set_logfile(soap, SOAP_INDEX_SENT, logfile); #endif } /******************************************************************************/ + SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap *soap, const char *logfile) { + (void)soap; (void)logfile; #ifdef SOAP_DEBUG soap_set_logfile(soap, SOAP_INDEX_TEST, logfile); #endif } /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 struct soap* SOAP_FMAC2 soap_copy(const struct soap *soap) -{ return soap_copy_context((struct soap*)malloc(sizeof(struct soap)), soap); +{ struct soap *copy = soap_versioning(soap_new)(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT); + if (soap_copy_context(copy, soap) != NULL) + return copy; + soap_free(copy); + return NULL; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 struct soap* @@ -8673,13 +9644,9 @@ soap_copy_context(struct soap *copy, const struct soap *soap) if (soap_check_state(soap)) return NULL; if (copy) - { register struct soap_plugin *p = NULL; + { struct soap_plugin *p = NULL; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying context\n")); -#ifdef __cplusplus - *copy = *soap; -#else - memcpy(copy, soap, sizeof(struct soap)); -#endif + soap_memcpy((void*)copy, sizeof(struct soap), (const void*)soap, sizeof(struct soap)); copy->state = SOAP_COPY; copy->error = SOAP_OK; copy->userid = NULL; @@ -8710,15 +9677,7 @@ soap_copy_context(struct soap *copy, const struct soap *soap) copy->local_namespaces = NULL; soap_set_local_namespaces(copy); /* copy content of soap->local_namespaces */ copy->namespaces = soap->namespaces; /* point to shared read-only namespaces table */ -#ifdef WITH_C_LOCALE -# ifdef WIN32 - copy->c_locale = _create_locale(LC_ALL, "C"); -# else - copy->c_locale = duplocale(soap->c_locale); -# endif -#else copy->c_locale = NULL; -#endif #ifdef WITH_OPENSSL copy->bio = NULL; copy->ssl = NULL; @@ -8728,16 +9687,13 @@ soap_copy_context(struct soap *copy, const struct soap *soap) copy->session = NULL; #endif #ifdef WITH_ZLIB - copy->d_stream = (z_stream*)SOAP_MALLOC(copy, sizeof(z_stream)); - copy->d_stream->zalloc = Z_NULL; - copy->d_stream->zfree = Z_NULL; - copy->d_stream->opaque = Z_NULL; + copy->d_stream = NULL; copy->z_buf = NULL; #endif #ifndef WITH_NOIDREF soap_init_iht(copy); - soap_init_pht(copy); #endif + soap_init_pht(copy); copy->header = NULL; copy->fault = NULL; copy->action = NULL; @@ -8750,14 +9706,20 @@ soap_copy_context(struct soap *copy, const struct soap *soap) #endif copy->plugins = NULL; for (p = soap->plugins; p; p = p->next) - { register struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin)); + { struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin)); if (!q) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not allocate plugin '%s'\n", p->id)); + soap_end(copy); + soap_done(copy); return NULL; + } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id)); *q = *p; - if (p->fcopy && p->fcopy(copy, q, p)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s'\n", p->id)); + if (p->fcopy && (copy->error = p->fcopy(copy, q, p)) != SOAP_OK) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Could not copy plugin '%s' error = %d\n", p->id, copy->error)); SOAP_FREE(copy, q); + soap_end(copy); + soap_done(copy); return NULL; } q->next = copy->plugins; @@ -8769,6 +9731,7 @@ soap_copy_context(struct soap *copy, const struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void @@ -8787,10 +9750,20 @@ soap_copy_stream(struct soap *copy, struct soap *soap) copy->recvsk = soap->recvsk; copy->recv_timeout = soap->recv_timeout; copy->send_timeout = soap->send_timeout; -#if defined(__cplusplus) && !defined(WITH_LEAN) + copy->connect_timeout = soap->connect_timeout; + copy->accept_timeout = soap->accept_timeout; + copy->socket_flags = soap->socket_flags; + copy->connect_flags = soap->connect_flags; + copy->bind_flags = soap->bind_flags; + copy->accept_flags = soap->accept_flags; + copy->sndbuf = soap->sndbuf; + copy->rcvbuf = soap->rcvbuf; + copy->linger_time = soap->linger_time; + copy->maxlevel = soap->maxlevel; + copy->maxlength = soap->maxlength; + copy->maxoccurs = soap->maxoccurs; copy->os = soap->os; copy->is = soap->is; -#endif copy->sendfd = soap->sendfd; copy->recvfd = soap->recvfd; copy->bufidx = soap->bufidx; @@ -8810,8 +9783,8 @@ soap_copy_stream(struct soap *copy, struct soap *soap) copy->peerlen = soap->peerlen; copy->ip = soap->ip; copy->port = soap->port; - memcpy(copy->host, soap->host, sizeof(soap->host)); - memcpy(copy->endpoint, soap->endpoint, sizeof(soap->endpoint)); + soap_memcpy((void*)copy->host, sizeof(copy->host), (const void*)soap->host, sizeof(soap->host)); + soap_memcpy((void*)copy->endpoint, sizeof(copy->endpoint), (const void*)soap->endpoint, sizeof(soap->endpoint)); #endif #ifdef WITH_OPENSSL copy->bio = soap->bio; @@ -8821,14 +9794,20 @@ soap_copy_stream(struct soap *copy, struct soap *soap) #ifdef WITH_GNUTLS copy->session = soap->session; #endif +#ifdef WITH_SYSTEMSSL + copy->ctx = soap->ctx; + copy->ssl = soap->ssl; +#endif #ifdef WITH_ZLIB copy->zlib_state = soap->zlib_state; copy->zlib_in = soap->zlib_in; copy->zlib_out = soap->zlib_out; - if (!copy->d_stream) - copy->d_stream = (z_stream*)SOAP_MALLOC(copy, sizeof(z_stream)); - if (copy->d_stream) - memcpy(copy->d_stream, soap->d_stream, sizeof(z_stream)); + if (soap->d_stream && soap->zlib_state != SOAP_ZLIB_NONE) + { if (!copy->d_stream) + copy->d_stream = (z_stream*)SOAP_MALLOC(copy, sizeof(z_stream)); + if (copy->d_stream) + soap_memcpy((void*)copy->d_stream, sizeof(z_stream), (const void*)soap->d_stream, sizeof(z_stream)); + } copy->z_crc = soap->z_crc; copy->z_ratio_in = soap->z_ratio_in; copy->z_ratio_out = soap->z_ratio_out; @@ -8836,32 +9815,32 @@ soap_copy_stream(struct soap *copy, struct soap *soap) copy->z_buflen = soap->z_buflen; copy->z_level = soap->z_level; if (soap->z_buf && soap->zlib_state != SOAP_ZLIB_NONE) - { copy->z_buf = (char*)SOAP_MALLOC(copy, SOAP_BUFLEN); + { copy->z_buf = (char*)SOAP_MALLOC(copy, sizeof(soap->buf)); if (copy->z_buf) - memcpy(copy->z_buf, soap->z_buf, SOAP_BUFLEN); + soap_memcpy((void*)copy->z_buf, sizeof(soap->buf), (const void*)soap->z_buf, sizeof(soap->buf)); } copy->z_dict = soap->z_dict; copy->z_dict_len = soap->z_dict_len; #endif - memcpy(copy->buf, soap->buf, sizeof(soap->buf)); + soap_memcpy((void*)copy->buf, sizeof(copy->buf), (const void*)soap->buf, sizeof(soap->buf)); /* copy XML parser state */ soap_free_ns(copy); soap_set_local_namespaces(copy); copy->version = soap->version; if (soap->nlist && soap->local_namespaces) - { register struct soap_nlist *np = NULL, *nq; + { struct soap_nlist *np = NULL, *nq; /* copy reversed nlist */ for (nq = soap->nlist; nq; nq = nq->next) - { register struct soap_nlist *nr = np; + { struct soap_nlist *nr = np; size_t n = sizeof(struct soap_nlist) + strlen(nq->id); np = (struct soap_nlist*)SOAP_MALLOC(copy, n); if (!np) break; - memcpy(np, nq, n); + soap_memcpy((void*)np, n, (const void*)nq, n); np->next = nr; } while (np) - { register const char *s = np->ns; + { const char *s = np->ns; copy->level = np->level; /* preserve element nesting level */ if (!s && np->index >= 0) { s = soap->local_namespaces[np->index].out; @@ -8875,10 +9854,10 @@ soap_copy_stream(struct soap *copy, struct soap *soap) SOAP_FREE(copy, nq); } } - memcpy(copy->tag, soap->tag, sizeof(copy->tag)); - memcpy(copy->id, soap->id, sizeof(copy->id)); - memcpy(copy->href, soap->href, sizeof(copy->href)); - memcpy(copy->type, soap->type, sizeof(copy->type)); + soap_memcpy((void*)copy->tag, sizeof(copy->tag), (const void*)soap->tag, sizeof(soap->tag)); + soap_memcpy((void*)copy->id, sizeof(copy->id), (const void*)soap->id, sizeof(soap->id)); + soap_memcpy((void*)copy->href, sizeof(copy->href), (const void*)soap->href, sizeof(soap->href)); + soap_memcpy((void*)copy->type, sizeof(copy->type), (const void*)soap->type, sizeof(soap->type)); copy->other = soap->other; copy->root = soap->root; copy->null = soap->null; @@ -8892,11 +9871,11 @@ soap_copy_stream(struct soap *copy, struct soap *soap) { struct soap_attribute *tr = tp; size_t n = sizeof(struct soap_attribute) + strlen(tq->name); tp = (struct soap_attribute*)SOAP_MALLOC(copy, n); - memcpy(tp, tq, n); + soap_memcpy((void*)tp, n, (const void*)tq, n); if (tp->size) { tp->value = (char*)SOAP_MALLOC(copy, tp->size); if (tp->value) - strcpy(tp->value, tq->value); + soap_memcpy((void*)tp->value, tp->size, (const void*)tq->value, tp->size); } tp->ns = NULL; tp->next = tr; @@ -8906,6 +9885,7 @@ soap_copy_stream(struct soap *copy, struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void @@ -8927,6 +9907,10 @@ soap_free_stream(struct soap *soap) soap->dh_params = NULL; soap->rsa_params = NULL; #endif +#ifdef WITH_SYSTEMSSL + soap->ctx = (gsk_handle)NULL; + soap->ssl = (gsk_handle)NULL; +#endif #ifdef WITH_ZLIB if (soap->z_buf) SOAP_FREE(soap, soap->z_buf); @@ -8936,6 +9920,7 @@ soap_free_stream(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void @@ -8946,6 +9931,7 @@ soap_initialize(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void @@ -8971,9 +9957,9 @@ soap_versioning(soap_init)(struct soap *soap, soap_mode imode, soap_mode omode) #endif #endif soap->version = 0; - soap_mode(soap, imode); - soap_imode(soap, imode); - soap_omode(soap, omode); + soap->imode = imode; + soap->omode = omode; + soap->mode = imode; soap->plugins = NULL; soap->user = NULL; for (i = 0; i < sizeof(soap->data)/sizeof(*soap->data); i++) @@ -9028,6 +10014,8 @@ soap_versioning(soap_init)(struct soap *soap, soap_mode imode, soap_mode omode) soap->fplugin = fplugin; soap->fmalloc = NULL; #ifndef WITH_LEANER + soap->fsvalidate = NULL; + soap->fwvalidate = NULL; soap->feltbegin = NULL; soap->feltendin = NULL; soap->feltbegout = NULL; @@ -9055,7 +10043,27 @@ soap_versioning(soap_init)(struct soap *soap, soap_mode imode, soap_mode omode) #endif soap->float_format = "%.9G"; /* Alternative: use "%G" */ soap->double_format = "%.17lG"; /* Alternative: use "%lG" */ - soap->dime_id_format = "cid:id%d"; /* default DIME id format */ + soap->long_double_format = NULL; /* Defined in custom serializer custom/long_double.c */ + soap->dime_id_format = "cid:id%d"; /* default DIME id format for int id index */ + soap->recv_timeout = 0; + soap->send_timeout = 0; + soap->connect_timeout = 0; + soap->accept_timeout = 0; + soap->socket_flags = 0; + soap->connect_flags = 0; + soap->bind_flags = 0; + soap->accept_flags = 0; +#ifdef WIN32 + soap->sndbuf = SOAP_BUFLEN + 1; /* this size speeds up windows xfer */ + soap->rcvbuf = SOAP_BUFLEN + 1; +#else + soap->sndbuf = SOAP_BUFLEN; + soap->rcvbuf = SOAP_BUFLEN; +#endif + soap->linger_time = 0; + soap->maxlevel = SOAP_MAXLEVEL; + soap->maxlength = SOAP_MAXLENGTH; + soap->maxoccurs = SOAP_MAXOCCURS; soap->http_version = "1.1"; soap->proxy_http_version = "1.0"; soap->http_content = NULL; @@ -9067,15 +10075,6 @@ soap_versioning(soap_init)(struct soap *soap, soap_mode imode, soap_mode omode) soap->tcp_keep_intvl = 0; soap->tcp_keep_cnt = 0; soap->max_keep_alive = SOAP_MAXKEEPALIVE; - soap->recv_timeout = 0; - soap->send_timeout = 0; - soap->connect_timeout = 0; - soap->accept_timeout = 0; - soap->socket_flags = 0; - soap->connect_flags = 0; - soap->bind_flags = 0; - soap->accept_flags = 0; - soap->linger_time = 0; soap->ip = 0; soap->labbuf = NULL; soap->lablen = 0; @@ -9091,6 +10090,7 @@ soap_versioning(soap_init)(struct soap *soap, soap_mode imode, soap_mode omode) soap->blist = NULL; soap->clist = NULL; soap->alist = NULL; + soap->shaky = 0; soap->attributes = NULL; soap->header = NULL; soap->fault = NULL; @@ -9120,21 +10120,19 @@ soap_versioning(soap_init)(struct soap *soap, soap_mode imode, soap_mode omode) soap->sendfd = stdout; #endif soap->host[0] = '\0'; + soap->path[0] = '\0'; soap->port = 0; soap->action = NULL; soap->proxy_host = NULL; soap->proxy_port = 8080; soap->proxy_userid = NULL; soap->proxy_passwd = NULL; - soap->prolog = NULL; + soap->prolog = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; #ifdef WITH_ZLIB soap->zlib_state = SOAP_ZLIB_NONE; soap->zlib_in = SOAP_ZLIB_NONE; soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream = (z_stream*)SOAP_MALLOC(soap, sizeof(z_stream)); - soap->d_stream->zalloc = Z_NULL; - soap->d_stream->zfree = Z_NULL; - soap->d_stream->opaque = Z_NULL; + soap->d_stream = NULL; soap->z_buf = NULL; soap->z_level = 6; soap->z_dict = NULL; @@ -9143,6 +10141,7 @@ soap_versioning(soap_init)(struct soap *soap, soap_mode imode, soap_mode omode) #ifndef WITH_LEAN soap->wsuid = NULL; soap->c14nexclude = NULL; + soap->c14ninclude = NULL; soap->cookies = NULL; soap->cookie_domain = NULL; soap->cookie_path = NULL; @@ -9156,13 +10155,13 @@ soap_versioning(soap_init)(struct soap *soap, soap_mode imode, soap_mode omode) #endif #ifndef WITH_NOIDREF soap_init_iht(soap); - soap_init_pht(soap); #endif + soap_init_pht(soap); #ifdef WITH_OPENSSL if (!soap_ssl_init_done) soap_ssl_init(); soap->fsslauth = ssl_auth_init; - soap->fsslverify = ssl_verify_callback; + soap->fsslverify = NULL; soap->bio = NULL; soap->ssl = NULL; soap->ctx = NULL; @@ -9196,15 +10195,24 @@ soap_versioning(soap_init)(struct soap *soap, soap_mode imode, soap_mode omode) soap->dh_params = NULL; soap->rsa_params = NULL; #endif -#ifdef WITH_C_LOCALE -# ifdef WIN32 - soap->c_locale = _create_locale(LC_ALL, "C"); -# else - soap->c_locale = newlocale(LC_ALL_MASK, "C", NULL); -# endif -#else - soap->c_locale = NULL; +#ifdef WITH_SYSTEMSSL + soap->fsslauth = ssl_auth_init; + soap->fsslverify = NULL; + soap->bio = NULL; + soap->ssl = (gsk_handle)NULL; + soap->ctx = (gsk_handle)NULL; + soap->session = NULL; + soap->ssl_flags = SOAP_SSL_DEFAULT; + soap->keyfile = NULL; + soap->keyid = NULL; + soap->password = NULL; + soap->cafile = NULL; + soap->capath = NULL; + soap->crlfile = NULL; + soap->dhfile = NULL; + soap->randfile = NULL; #endif + soap->c_locale = NULL; soap->buflen = 0; soap->bufidx = 0; #ifndef WITH_LEANER @@ -9233,12 +10241,15 @@ soap_versioning(soap_init)(struct soap *soap, soap_mode imode, soap_mode omode) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap *soap) -{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reinitializing context\n")); +{ if (soap_check_state(soap)) + return; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reinitializing context\n")); if (!soap->keep_alive) { soap->buflen = 0; soap->bufidx = 0; @@ -9252,7 +10263,6 @@ soap_begin(struct soap *soap) soap->part = SOAP_END; soap->event = 0; soap->evlev = 0; - soap->alloced = 0; soap->count = 0; soap->length = 0; soap->cdata = 0; @@ -9272,6 +10282,7 @@ soap_begin(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void @@ -9282,7 +10293,7 @@ soap_end(struct soap *soap) soap_free_temp(soap); soap_dealloc(soap, NULL); while (soap->clist) - { register struct soap_clist *cp = soap->clist->next; + { struct soap_clist *cp = soap->clist->next; SOAP_FREE(soap, soap->clist); soap->clist = cp; } @@ -9297,13 +10308,14 @@ soap_end(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void SOAP_FMAC2 soap_set_version(struct soap *soap, short version) { soap_set_local_namespaces(soap); - if (soap->version != version) + if (soap->version != version && soap->local_namespaces && soap->local_namespaces[0].id && soap->local_namespaces[1].id) { if (version == 1) { soap->local_namespaces[0].ns = soap_env1; soap->local_namespaces[1].ns = soap_enc1; @@ -9314,18 +10326,55 @@ soap_set_version(struct soap *soap, short version) } soap->version = version; } + if (version == 0) + soap->encodingStyle = SOAP_STR_EOS; + else + soap->encodingStyle = NULL; } #endif /******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +void +SOAP_FMAC2 +soap_get_version(struct soap *soap) +{ struct Namespace *p = soap->local_namespaces; + if (p) + { const char *ns = p[0].out; + if (!ns) + ns = p[0].ns; + if (!strcmp(ns, soap_env1)) + { soap->version = 1; /* make sure we use SOAP 1.1 */ + if (p[1].out) + SOAP_FREE(soap, p[1].out); + p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1)); + if (p[1].out) + soap_strncpy(p[1].out, sizeof(soap_enc1), soap_enc1, sizeof(soap_enc1) - 1); + } + else if (!strcmp(ns, soap_env2)) + { soap->version = 2; /* make sure we use SOAP 1.2 */ + if (p[1].out) + SOAP_FREE(soap, p[1].out); + p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2)); + if (p[1].out) + soap_strncpy(p[1].out, sizeof(soap_enc2), soap_enc2, sizeof(soap_enc2) - 1); + } + } +} +#endif + +/******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap *soap, const struct Namespace *p) -{ register struct Namespace *ns = soap->local_namespaces; - register struct soap_nlist *np, *nq, *nr; - register unsigned int level = soap->level; +{ struct Namespace *ns = soap->local_namespaces; + struct soap_nlist *np, *nq, *nr; + unsigned int level = soap->level; soap->namespaces = p; soap->local_namespaces = NULL; soap_set_local_namespaces(soap); @@ -9344,7 +10393,7 @@ soap_set_namespaces(struct soap *soap, const struct Namespace *p) } /* then push on new stack */ while (np) - { register const char *s; + { const char *s; soap->level = np->level; /* preserve element nesting level */ s = np->ns; if (!s && np->index >= 0 && ns) @@ -9359,7 +10408,7 @@ soap_set_namespaces(struct soap *soap, const struct Namespace *p) SOAP_FREE(soap, nq); } if (ns) - { register int i; + { int i; for (i = 0; ns[i].id; i++) { if (ns[i].out) { SOAP_FREE(soap, ns[i].out); @@ -9374,21 +10423,22 @@ soap_set_namespaces(struct soap *soap, const struct Namespace *p) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap *soap) { if (soap->namespaces && !soap->local_namespaces) - { register const struct Namespace *ns1; - register struct Namespace *ns2; - register size_t n = 1; + { const struct Namespace *ns1; + struct Namespace *ns2; + size_t n = 1; for (ns1 = soap->namespaces; ns1->id; ns1++) n++; n *= sizeof(struct Namespace); ns2 = (struct Namespace*)SOAP_MALLOC(soap, n); if (ns2) - { memcpy(ns2, soap->namespaces, n); + { soap_memcpy((void*)ns2, n, (const void*)soap->namespaces, n); if (ns2[0].ns) { if (!strcmp(ns2[0].ns, soap_env1)) soap->version = 1; @@ -9404,18 +10454,19 @@ soap_set_local_namespaces(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEAN #ifndef PALM_1 SOAP_FMAC1 const char * SOAP_FMAC2 soap_tagsearch(const char *big, const char *little) -{ if (little) - { register size_t n = strlen(little); - register const char *s = big; +{ if (big && little) + { size_t n = strlen(little); + const char *s = big; while (s) - { register const char *t = s; - register size_t i; + { const char *t = s; + size_t i; for (i = 0; i < n; i++, t++) { if (*t != little[i]) break; @@ -9435,27 +10486,26 @@ soap_tagsearch(const char *big, const char *little) #endif /******************************************************************************/ -#ifndef WITH_LEAN + #ifndef PALM_1 SOAP_FMAC1 struct soap_nlist * SOAP_FMAC2 soap_lookup_ns(struct soap *soap, const char *tag, size_t n) -{ register struct soap_nlist *np; +{ struct soap_nlist *np; for (np = soap->nlist; np; np = np->next) - { if (!strncmp(np->id, tag, n) && !np->id[n]) + if (!strncmp(np->id, tag, n) && !np->id[n]) return np; - } return NULL; } #endif -#endif /******************************************************************************/ + #ifndef WITH_LEAN static struct soap_nlist * soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized) -{ register struct soap_nlist *np; +{ struct soap_nlist *np; size_t n, k; if (soap_tagsearch(soap->c14nexclude, id)) return NULL; @@ -9484,9 +10534,11 @@ soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized) } np->next = soap->nlist; soap->nlist = np; - strcpy((char*)np->id, id); + soap_strcpy((char*)np->id, n + 1, id); if (ns) - np->ns = strcpy((char*)np->id + n + 1, ns); + { np->ns = np->id + n + 1; + soap_strcpy((char*)np->ns, k + 1, ns); + } else np->ns = NULL; np->level = soap->level; @@ -9496,32 +10548,34 @@ soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized) #endif /******************************************************************************/ + #ifndef WITH_LEAN static void soap_utilize_ns(struct soap *soap, const char *tag) -{ register struct soap_nlist *np; +{ struct soap_nlist *np; size_t n = 0; const char *t = strchr(tag, ':'); if (t) - { n = t - tag; - if (n >= sizeof(soap->tmpbuf)) - n = sizeof(soap->tmpbuf) - 1; - } + n = t - tag; np = soap_lookup_ns(soap, tag, n); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Utilizing namespace of '%s'\n", tag)); if (np) { if (np->index <= 0) - soap_push_ns(soap, np->id, np->ns, 1); + { if (np->level == soap->level) + np->index = 1; + else + soap_push_ns(soap, np->id, np->ns, 1); + } } - else if (strncmp(tag, "xml", 3)) - { strncpy(soap->tmpbuf, tag, n); - soap->tmpbuf[n] = '\0'; + else if (n && strncmp(tag, "xml", 3)) + { soap_strncpy(soap->tmpbuf, sizeof(soap->tmpbuf), tag, n); soap_push_ns(soap, soap->tmpbuf, NULL, 1); } } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -9529,13 +10583,15 @@ SOAP_FMAC2 soap_element(struct soap *soap, const char *tag, int id, const char *type) { #ifndef WITH_LEAN - register const char *s; + const char *s; #endif DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element begin tag='%s' level='%u' id='%d' type='%s'\n", tag, soap->level, id, type ? type : SOAP_STR_EOS)); soap->level++; + if (soap->level > soap->maxlevel) + return soap->error = SOAP_LEVEL; #ifdef WITH_DOM #ifndef WITH_LEAN - if (soap->wsuid && soap_tagsearch(soap->wsuid, tag)) + if (soap_tagsearch(soap->wsuid, tag)) { size_t i; for (s = tag, i = 0; *s && i < sizeof(soap->tag) - 1; s++, i++) soap->tag[i] = *s == ':' ? '-' : *s; @@ -9547,12 +10603,13 @@ soap_element(struct soap *soap, const char *tag, int id, const char *type) { if (soap->evlev >= soap->level) soap->evlev = 0; if (soap->event == SOAP_SEC_BEGIN && !soap->evlev) - { register struct soap_nlist *np; + { struct soap_nlist *np; /* non-nested wsu:Id found: clear xmlns, re-emit them for exc-c14n */ for (np = soap->nlist; np; np = np->next) - { if (np->index == 2) + { int p = soap_tagsearch(soap->c14ninclude, np->id) != NULL; + if (np->index == 2 || p) { struct soap_nlist *np1 = soap_push_ns(soap, np->id, np->ns, 1); - if (np1) + if (np1 && !p) np1->index = 0; } } @@ -9561,22 +10618,22 @@ soap_element(struct soap *soap, const char *tag, int id, const char *type) } #endif if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); + { struct soap_dom_element *elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); if (!elt) return soap->error; elt->soap = soap; elt->next = NULL; elt->prnt = soap->dom; - elt->name = soap_strdup(soap, tag); elt->elts = NULL; elt->atts = NULL; elt->nstr = NULL; - elt->data = NULL; - elt->wide = NULL; + elt->name = soap_strdup(soap, tag); + elt->lead = NULL; + elt->text = NULL; + elt->code = NULL; + elt->tail = NULL; elt->node = NULL; elt->type = 0; - elt->head = NULL; - elt->tail = NULL; if (soap->dom) { struct soap_dom_element *p = soap->dom->elts; if (p) @@ -9594,8 +10651,7 @@ soap_element(struct soap *soap, const char *tag, int id, const char *type) #endif #ifndef WITH_LEAN if (!soap->ns) - { if (!(soap->mode & SOAP_XML_CANONICAL) - && soap_send(soap, soap->prolog ? soap->prolog : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")) + { if (!(soap->mode & SOAP_XML_CANONICAL) && soap_send(soap, soap->prolog)) return soap->error; } else if (soap->mode & SOAP_XML_INDENT) @@ -9603,22 +10659,34 @@ soap_element(struct soap *soap, const char *tag, int id, const char *type) return soap->error; soap->body = 1; } - if ((soap->mode & SOAP_XML_DEFAULTNS) && (s = strchr(tag, ':'))) + if ((soap->mode & SOAP_XML_DEFAULTNS)) { struct Namespace *ns = soap->local_namespaces; - size_t n = s - tag; + size_t n = 0; + s = strchr(tag, ':'); + if (s) + n = s++ - tag; + else + s = tag; if (soap_send_raw(soap, "<", 1) - || soap_send(soap, s + 1)) + || soap_send(soap, s)) return soap->error; - if (soap->nlist && !strncmp(soap->nlist->id, tag, n) && !soap->nlist->id[n]) - ns = NULL; - for (; ns && ns->id; ns++) - { if (*ns->id && (ns->out || ns->ns) && !strncmp(ns->id, tag, n) && !ns->id[n]) - { soap_push_ns(soap, ns->id, ns->out ? ns->out : ns->ns, 0); - if (soap_attribute(soap, "xmlns", ns->out ? ns->out : ns->ns)) - return soap->error; - break; + if (n) + { if (soap->nlist && !strncmp(soap->nlist->id, tag, n) && !soap->nlist->id[n]) + ns = NULL; + for (; ns && ns->id; ns++) + { if (*ns->id && ns->ns && !strncmp(ns->id, tag, n) && !ns->id[n]) + { soap_push_ns(soap, ns->id, ns->out ? ns->out : ns->ns, 0); + if (soap_attribute(soap, "xmlns", ns->out ? ns->out : ns->ns)) + return soap->error; + break; + } } } + else if (!soap->nlist || *soap->nlist->id) + { soap_push_ns(soap, "", "", 0); + if (soap_attribute(soap, "xmlns", "")) + return soap->error; + } } else #endif @@ -9646,14 +10714,12 @@ soap_element(struct soap *soap, const char *tag, int id, const char *type) } #endif while (k-- && ns->id) - { if (*ns->id && (ns->out || ns->ns)) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "xmlns:%s", ns->id); -#else - sprintf(soap->tmpbuf, "xmlns:%s", ns->id); -#endif - if (soap_attribute(soap, soap->tmpbuf, ns->out ? ns->out : ns->ns)) + { const char *t = ns->out; + if (!t) + t = ns->ns; + if (*ns->id && t && *t) + { (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), strlen(ns->id) + 6), "xmlns:%s", ns->id); + if (soap_attribute(soap, soap->tmpbuf, t)) return soap->error; } ns++; @@ -9662,16 +10728,11 @@ soap_element(struct soap *soap, const char *tag, int id, const char *type) } soap->ns = 1; /* namespace table control: ns = 0 or 2 to start, then 1 to stop dumping the table */ #ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) + if ((soap->mode & SOAP_XML_CANONICAL)) soap_utilize_ns(soap, tag); #endif if (id > 0) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "_%d", id); -#else - sprintf(soap->tmpbuf, "_%d", id); -#endif + { (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), sizeof(SOAP_BASEREFNAME) + 20), SOAP_BASEREFNAME "%d", id); if (soap->version == 2) { if (soap_attribute(soap, "SOAP-ENC:id", soap->tmpbuf)) return soap->error; @@ -9679,41 +10740,30 @@ soap_element(struct soap *soap, const char *tag, int id, const char *type) else if (soap_attribute(soap, "id", soap->tmpbuf)) return soap->error; } - if (type && *type && !(soap->mode & SOAP_XML_NOTYPE) && soap->part != SOAP_IN_HEADER) + if (type && *type && !(soap->mode & SOAP_XML_NOTYPE)) { const char *t = type; #ifndef WITH_LEAN - if (soap->mode & SOAP_XML_DEFAULTNS) + if ((soap->mode & SOAP_XML_DEFAULTNS)) { t = strchr(type, ':'); if (t) t++; else t = type; } + else if ((soap->mode & SOAP_XML_CANONICAL)) + soap_utilize_ns(soap, type); #endif if (soap->attributes ? soap_set_attr(soap, "xsi:type", t, 1) : soap_attribute(soap, "xsi:type", t)) return soap->error; -#ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) - soap_utilize_ns(soap, type); -#endif } - if (soap->null && soap->position > 0) - { register int i; -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf) - 1, "[%d", soap->positions[0]); -#else - sprintf(soap->tmpbuf, "[%d", soap->positions[0]); -#endif + if (soap->null && soap->position > 0 && soap->version == 1) + { int i; + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf) - 1, 20), "[%d", soap->positions[0]); for (i = 1; i < soap->position; i++) - { register size_t l = strlen(soap->tmpbuf); -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf + l, sizeof(soap->tmpbuf)-l-1, ",%d", soap->positions[i]); -#else - if (l + 13 < sizeof(soap->tmpbuf)) - sprintf(soap->tmpbuf + l, ",%d", soap->positions[i]); -#endif + { size_t l = strlen(soap->tmpbuf); + (SOAP_SNPRINTF(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l - 1, 20), ",%d", soap->positions[i]); } - strcat(soap->tmpbuf, "]"); + soap_strncat(soap->tmpbuf, sizeof(soap->tmpbuf), "]", 1); if (soap_attribute(soap, "SOAP-ENC:position", soap->tmpbuf)) return soap->error; } @@ -9750,6 +10800,7 @@ soap_element(struct soap *soap, const char *tag, int id, const char *type) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -9772,13 +10823,14 @@ soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *t #endif /******************************************************************************/ + #ifndef PALM_2 #ifndef HAVE_STRRCHR SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t) -{ register char *r = NULL; +{ char *r = NULL; while (*s) if (*s++ == t) r = (char*)s - 1; @@ -9788,14 +10840,15 @@ soap_strrchr(const char *s, int t) #endif /******************************************************************************/ + #ifndef PALM_2 #ifndef HAVE_STRTOL SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b) -{ register long n = 0; - register int c; +{ long n = 0; + int c; while (*s > 0 && *s <= 32) s++; if (b == 10) @@ -9808,7 +10861,13 @@ soap_strtol(const char *s, char **t, int b) s++; while ((c = *s) && c >= '0' && c <= '9') { if (n >= 214748364 && (n > 214748364 || c >= '8')) + { if (neg && n == 214748364 && c == '8') + { if (t) + *t = (char*)(s + 1); + return -2147483648; + } break; + } n *= 10; n += c - '0'; s++; @@ -9839,6 +10898,7 @@ soap_strtol(const char *s, char **t, int b) #endif /******************************************************************************/ + #ifndef PALM_2 #ifndef HAVE_STRTOUL SOAP_FMAC1 @@ -9846,11 +10906,16 @@ unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b) { unsigned long n = 0; - register int c; + int c; while (*s > 0 && *s <= 32) s++; if (b == 10) - { if (*s == '+') + { short neg = 0; + if (*s == '-') + { s++; + neg = 1; + } + else if (*s == '+') s++; while ((c = *s) && c >= '0' && c <= '9') { if (n >= 429496729 && (n > 429496729 || c >= '6')) @@ -9859,6 +10924,8 @@ soap_strtoul(const char *s, char **t, int b) n += c - '0'; s++; } + if (neg && n > 0) + s--; } else /* b == 16 */ { while ((c = *s)) @@ -9883,39 +10950,38 @@ soap_strtoul(const char *s, char **t, int b) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *type, const char *offset) -{ if (!type || !*type) +{ if (!type || !*type || soap->version == 0) return soap_element_begin_out(soap, tag, id, NULL); - if (soap_element(soap, tag, id, "SOAP-ENC:Array")) + if (soap_element(soap, tag, id, NULL)) return soap->error; - if (soap->version == 2) + if (soap->version == 1) + { if (offset && soap_attribute(soap, "SOAP-ENC:offset", offset)) + return soap->error; + if (soap_attribute(soap, "SOAP-ENC:arrayType", type)) + return soap->error; + } + else { const char *s; s = soap_strrchr(type, '['); if (s && (size_t)(s - type) < sizeof(soap->tmpbuf)) - { strncpy(soap->tmpbuf, type, s - type); - soap->tmpbuf[s - type] = '\0'; + { soap_strncpy(soap->tmpbuf, sizeof(soap->tmpbuf), type, s - type); if (soap_attribute(soap, "SOAP-ENC:itemType", soap->tmpbuf)) return soap->error; s++; if (*s) - { strncpy(soap->tmpbuf, s, sizeof(soap->tmpbuf)); - soap->tmpbuf[sizeof(soap->tmpbuf) - 1] = '\0'; + { soap_strcpy(soap->tmpbuf, sizeof(soap->tmpbuf), s); soap->tmpbuf[strlen(soap->tmpbuf) - 1] = '\0'; if (soap_attribute(soap, "SOAP-ENC:arraySize", soap->tmpbuf)) return soap->error; } } } - else - { if (offset && soap_attribute(soap, "SOAP-ENC:offset", offset)) - return soap->error; - if (soap_attribute(soap, "SOAP-ENC:arrayType", type)) - return soap->error; - } #ifndef WITH_LEAN if ((soap->mode & SOAP_XML_CANONICAL)) soap_utilize_ns(soap, type); @@ -9925,41 +10991,40 @@ soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *typ #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap *soap, const char *tag) -{ register struct soap_attribute *tp; +{ struct soap_attribute *tp; #ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) + if ((soap->mode & SOAP_XML_CANONICAL)) { struct soap_nlist *np; for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && tp->name) + { if (tp->visible && *tp->name) soap_utilize_ns(soap, tp->name); } for (np = soap->nlist; np; np = np->next) - { if (np->index == 1 && np->ns) + { if (np->ns && (np->index == 1 || (np->index == 0 && soap->event == SOAP_SEC_BEGIN && soap_tagsearch(soap->c14ninclude, np->id)))) { if (*(np->id)) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "xmlns:%s", np->id); -#else - sprintf(soap->tmpbuf, "xmlns:%s", np->id); -#endif - } + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), strlen(np->id) + 6), "xmlns:%s", np->id); else - strcpy(soap->tmpbuf, "xmlns"); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enabling utilized binding (level=%u) %s='%s'\n", np->level, soap->tmpbuf, np->ns)); + soap_strcpy(soap->tmpbuf, sizeof(soap->tmpbuf), "xmlns"); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enabling utilized binding (level=%u) %s='%s' c14ninclude='%s'\n", np->level, soap->tmpbuf, np->ns, soap->c14ninclude ? soap->c14ninclude : "(null)")); soap_set_attr(soap, soap->tmpbuf, np->ns, 1); np->index = 2; } + else + { + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Binding (level=%u) %s='%s' utilized=%d\n", np->level, np->id, np->ns, np->index)); + } } } #endif #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { register struct soap_dom_attribute **att; + { struct soap_dom_attribute **att; att = &soap->dom->atts; for (tp = soap->attributes; tp; tp = tp->next) { if (tp->visible) @@ -9969,8 +11034,7 @@ soap_element_start_end_out(struct soap *soap, const char *tag) (*att)->next = NULL; (*att)->nstr = NULL; (*att)->name = soap_strdup(soap, tp->name); - (*att)->data = soap_strdup(soap, tp->value); - (*att)->wide = NULL; + (*att)->text = soap_strdup(soap, tp->value); (*att)->soap = soap; att = &(*att)->next; tp->visible = 0; @@ -9981,41 +11045,35 @@ soap_element_start_end_out(struct soap *soap, const char *tag) #endif for (tp = soap->attributes; tp; tp = tp->next) { if (tp->visible) - { -#ifndef WITH_LEAN - const char *s; - if ((soap->mode & SOAP_XML_DEFAULTNS) && (s = strchr(tp->name, ':'))) - { size_t n = s - tp->name; - if (soap->nlist && !strncmp(soap->nlist->id, tp->name, n) && !soap->nlist->id[n]) - s++; - else - s = tp->name; - if (soap_send(soap, " ") || soap_send(soap, s)) - return soap->error; - } - else -#endif - if (soap_send(soap, " ") || soap_send(soap, tp->name)) + { if (soap_send_raw(soap, " ", 1) || soap_send(soap, tp->name)) return soap->error; if (tp->visible == 2 && tp->value) - if (soap_send_raw(soap, "=\"", 2) + { if (soap_send_raw(soap, "=\"", 2) || soap_string_out(soap, tp->value, tp->flag) || soap_send_raw(soap, "\"", 1)) return soap->error; + } + else if (soap->mode & SOAP_XML_STRICT) + { if (soap_send_raw(soap, "=\"\"", 3)) + return soap->error; + } tp->visible = 0; } } if (tag) { #ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) + if ((soap->mode & SOAP_XML_CANONICAL)) { if (soap_send_raw(soap, ">", 1) || soap_element_end_out(soap, tag)) return soap->error; return SOAP_OK; } #endif - soap->level--; /* decrement level just before /> */ + if (soap->nlist) + soap_pop_namespace(soap); + soap->level--; /* decrement level just before /> */ + soap->body = 0; return soap_send_raw(soap, "/>", 2); } return soap_send_raw(soap, ">", 1); @@ -10023,6 +11081,7 @@ soap_element_start_end_out(struct soap *soap, const char *tag) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -10036,7 +11095,7 @@ soap_element_end_out(struct soap *soap, const char *tag) return SOAP_OK; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag)); #ifdef WITH_DOM - if (soap->feltendout && (soap->error = soap->feltendout(soap, tag))) + if (soap->feltendout && (soap->error = soap->feltendout(soap, tag)) != SOAP_OK) return soap->error; if ((soap->mode & SOAP_XML_DOM) && soap->dom) { if (soap->dom->prnt) @@ -10045,7 +11104,7 @@ soap_element_end_out(struct soap *soap, const char *tag) } #endif #ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) + if (soap->nlist) soap_pop_namespace(soap); if (soap->mode & SOAP_XML_INDENT) { if (!soap->body) @@ -10054,43 +11113,39 @@ soap_element_end_out(struct soap *soap, const char *tag) } soap->body = 0; } - if ((soap->mode & SOAP_XML_DEFAULTNS) && (s = strchr(tag, ':'))) - { soap_pop_namespace(soap); + if ((soap->mode & SOAP_XML_DEFAULTNS) && (s = strchr(tag, ':')) != NULL) tag = s + 1; - } #endif if (soap_send_raw(soap, "</", 2) || soap_send(soap, tag)) return soap->error; - soap->level--; /* decrement level just before > */ + soap->level--; /* decrement level just before > */ return soap_send_raw(soap, ">", 1); } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap *soap, const char *tag, int id, int href) -{ register const char *s = "ref"; - register int n = 1; +{ const char *s = "ref"; + int n = 1; if (soap->version == 1) { s = "href"; n = 0; } else if (soap->version == 2) s = "SOAP-ENC:ref"; -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->href, sizeof(soap->href), "#_%d", href); -#else - sprintf(soap->href, "#_%d", href); -#endif + (SOAP_SNPRINTF(soap->href, sizeof(soap->href), sizeof(SOAP_BASEREFNAME) + 21), "#" SOAP_BASEREFNAME "%d", href); return soap_element_href(soap, tag, id, s, soap->href + n); } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -10101,11 +11156,13 @@ soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, c || soap_attribute(soap, ref, val) || soap_element_start_end_out(soap, tag)) return soap->error; + soap->body = 0; return SOAP_OK; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -10117,44 +11174,55 @@ soap_element_null(struct soap *soap, const char *tag, int id, const char *type) break; if (tp || (soap->version == 2 && soap->position > 0) || id > 0 || (soap->mode & SOAP_XML_NIL)) { if (soap_element(soap, tag, id, type) - || (!tp && soap_attribute(soap, "xsi:nil", "true"))) + || (!tp && soap_attribute(soap, "xsi:nil", "true")) + || soap_element_start_end_out(soap, tag)) return soap->error; - return soap_element_start_end_out(soap, tag); + soap->body = 0; + } + else + { soap->null = 1; + soap->position = 0; + soap->mustUnderstand = 0; } - soap->null = 1; - soap->position = 0; - soap->mustUnderstand = 0; return SOAP_OK; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_element_nil(struct soap *soap, const char *tag) { if (soap_element(soap, tag, -1, NULL) - || ((soap->mode & SOAP_XML_NIL) && soap_attribute(soap, "xsi:nil", "true"))) + || (soap_attribute(soap, "xsi:nil", "true"))) return soap->error; return soap_element_start_end_out(soap, tag); } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 -soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const struct soap_array *a, int n, const char *type, int t) -{ if (!p) +soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const void *a, int n, const char *type, int t, char **mark) +{ (void)a; (void)n; + if (!p) { soap->error = soap_element_null(soap, tag, id, type); return -1; } #ifndef WITH_NOIDREF + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element_id %p type=%d id=%d\n", p, t, id)); if ((!soap->encodingStyle && !(soap->omode & SOAP_XML_GRAPH)) || (soap->omode & SOAP_XML_TREE)) - return 0; - if (id < 0) + return soap_check_and_mark(soap, p, t, mark); + if (mark) + *mark = NULL; + if (id < -1) + return soap_embed(soap, p, a, n, t); + else if (id <= 0) { struct soap_plist *pp; if (a) id = soap_array_pointer_lookup(soap, p, a, n, t, &pp); @@ -10172,12 +11240,113 @@ soap_element_id(struct soap *soap, const char *tag, int id, const void *p, const } return id; #else + return soap_check_and_mark(soap, p, t, mark); +#endif +} +#endif + +/******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +int +SOAP_FMAC2 +soap_check_and_mark(struct soap *soap, const void *p, int t, char **mark) +{ if (mark) + { struct soap_plist *pp; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Check %p and mark %p\n", p, mark)); + if (!soap_pointer_lookup(soap, p, t, &pp)) + if (!soap_pointer_enter(soap, p, NULL, 0, t, &pp)) + return -1; + if (soap->mode & SOAP_IO_LENGTH) + { if (pp->mark1 > 0) + return -1; + pp->mark1 = 1; + *mark = &pp->mark1; + } + else + { if (pp->mark2 > 0) + return -1; + pp->mark2 = 1; + *mark = &pp->mark2; + } + } return 0; +} #endif + +/******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +void * +SOAP_FMAC2 +soap_mark_lookup(struct soap *soap, const void *p, int t, struct soap_plist **ppp, char **mark) +{ if (!soap) + return NULL; + if (mark || !(soap->mode & SOAP_XML_TREE)) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Mark lookup %p type %d\n", p, t)); + if (!soap_pointer_lookup(soap, p, t, ppp)) + { if (!soap_pointer_enter(soap, p, NULL, 0, t, ppp)) + return NULL; + } + else if (!(soap->mode & SOAP_XML_TREE)) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Mark found %p\n", (*ppp)->dup)); + return (*ppp)->dup; + } + if (mark) + { if ((*ppp)->mark1 > 0) + (*ppp)->mark1 = 2; /* cycle */ + else + (*ppp)->mark1 = 1; /* cycle detection */ + *mark = &(*ppp)->mark1; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Mark cycle %d\n", (*ppp)->mark1)); + } + } + return NULL; } #endif /******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +int +SOAP_FMAC2 +soap_mark_cycle(struct soap *soap, struct soap_plist *pp) +{ (void)soap; + return pp && pp->mark1 == 2 && (soap->mode & SOAP_XML_TREE); +} +#endif + +/******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +void +SOAP_FMAC2 +soap_mark_dup(struct soap *soap, void *a, struct soap_plist *pp) +{ (void)soap; + if (pp) + pp->dup = a; +} +#endif + +/******************************************************************************/ + +#ifndef PALM_1 +SOAP_FMAC1 +void +SOAP_FMAC2 +soap_unmark(struct soap *soap, char *mark) +{ (void)soap; + if (mark) + *mark = 0; /* release detection */ +} +#endif + +/******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -10196,44 +11365,44 @@ soap_element_result(struct soap *soap, const char *tag) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void SOAP_FMAC2 soap_check_result(struct soap *soap, const char *tag) -{ if (soap->version == 2 && soap->encodingStyle) - { soap_instring(soap, ":result", NULL, NULL, 0, 2, -1, -1); +{ (void)tag; + if (soap->version == 2 && soap->encodingStyle) + { soap_instring(soap, ":result", NULL, NULL, 0, 2, -1, -1, NULL); /* just ignore content for compliance reasons, but should compare tag to element's QName value? */ } - (void)tag; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap *soap, const char *name, const char *value) -{ - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attribute '%s'='%s'\n", name, value)); +{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Attribute '%s'='%s'\n", name, value)); #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && !(soap->mode & SOAP_XML_CANONICAL) && soap->dom) - { register struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); + { struct soap_dom_attribute *a = (struct soap_dom_attribute*)soap_malloc(soap, sizeof(struct soap_dom_attribute)); if (!a) return soap->error; a->next = soap->dom->atts; a->nstr = NULL; a->name = soap_strdup(soap, name); - a->data = soap_strdup(soap, value); - a->wide = NULL; + a->text = soap_strdup(soap, value); a->soap = soap; soap->dom->atts = a; return SOAP_OK; } #endif #ifndef WITH_LEAN - if (soap->mode & SOAP_XML_CANONICAL) + if ((soap->mode & SOAP_XML_CANONICAL)) { /* push namespace */ if (!strncmp(name, "xmlns", 5) && (name[5] == ':' || name[5] == '\0')) soap_push_ns(soap, name + 5 + (name[5] == ':'), value, 0); @@ -10242,7 +11411,8 @@ soap_attribute(struct soap *soap, const char *name, const char *value) } else #endif - { if (soap_send(soap, " ") || soap_send(soap, name)) + { if (soap_send_raw(soap, " ", 1) + || soap_send(soap, name)) return soap->error; if (value) if (soap_send_raw(soap, "=\"", 2) @@ -10255,6 +11425,7 @@ soap_attribute(struct soap *soap, const char *name, const char *value) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -10265,15 +11436,19 @@ soap_element_begin_in(struct soap *soap, const char *tag, int nillable, const ch return soap->error = SOAP_TAG_MISMATCH; if (tag && *tag == '-') return SOAP_OK; - if (!(soap->error = soap_match_tag(soap, soap->tag, tag))) + soap->error = soap_match_tag(soap, soap->tag, tag); + if (!soap->error) { soap->peeked = 0; if (type && *soap->type && soap_match_tag(soap, soap->type, type)) return soap->error = SOAP_TYPE; if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT)) return soap->error = SOAP_NULL; if (soap->body) - soap->level++; - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag ? tag : SOAP_STR_EOS )); + { soap->level++; + if (soap->level > soap->maxlevel) + return soap->error = SOAP_LEVEL; + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin tag found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag ? tag : SOAP_STR_EOS )); soap->error = SOAP_OK; } } @@ -10284,25 +11459,32 @@ soap_element_begin_in(struct soap *soap, const char *tag, int nillable, const ch #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap *soap, const char *tag) -{ register soap_wchar c; - register char *s; - register int n = 0; +{ soap_wchar c; + char *s; + int n = 0; if (tag && *tag == '-') return SOAP_OK; if (soap->error == SOAP_NO_TAG) soap->error = SOAP_OK; #ifdef WITH_DOM - /* this whitespace or mixed content is significant for DOM */ + /* this whitespace or mixed content is significant for DOM "as-is" */ if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (!soap->peeked && !soap_string_in(soap, 3, -1, -1)) + { s = soap_string_in(soap, -1, -1, -1, NULL); + if (!soap->peeked && !s) return soap->error; if (soap->dom->prnt) soap->dom = soap->dom->prnt; + if ((soap->mode & SOAP_XML_STRICT)) + { for (; *s; s++) + if (soap_notblank(*s)) + return soap->error = SOAP_SYNTAX_ERROR; /* reject mixed content before ending tag */ + } } #endif if (soap->peeked) @@ -10314,14 +11496,18 @@ soap_element_end_in(struct soap *soap, const char *tag) { while (((c = soap_get(soap)) != SOAP_TT)) { if ((int)c == EOF) return soap->error = SOAP_CHK_EOF; - if (c == SOAP_LT) - n++; - else if (c == '/') - { c = soap_get(soap); - if (c == SOAP_GT) - n--; - else - soap_unget(soap, c); + if (!soap_blank(c)) + { if ((soap->mode & SOAP_XML_STRICT)) + return soap->error = SOAP_SYNTAX_ERROR; /* reject mixed content before ending tag */ + if (c == SOAP_LT) + n++; + else if (c == '/') + { c = soap_get(soap); + if (c == SOAP_GT && n > 0) + n--; + else + soap_unget(soap, c); + } } } } while (n--); @@ -10348,37 +11534,38 @@ soap_element_end_in(struct soap *soap, const char *tag) if (tag && (soap->mode & SOAP_XML_STRICT)) { soap_pop_namespace(soap); if (soap_match_tag(soap, soap->tag, tag)) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element tag '%s' does not match '%s'\n", soap->tag, tag ? tag : SOAP_STR_EOS)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End tag '%s' does not match '%s'\n", soap->tag, tag ? tag : SOAP_STR_EOS)); return soap->error = SOAP_SYNTAX_ERROR; } } #endif - DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag ? tag : SOAP_STR_EOS)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End tag found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag ? tag : SOAP_STR_EOS)); soap->level--; return SOAP_OK; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char * SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag) -{ register struct soap_attribute *tp; +{ struct soap_attribute *tp; if (*name == '-') return SOAP_STR_EOS; for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible && !soap_match_tag(soap, tp->name, name)) + { if (!soap_match_att(soap, tp->name, name)) break; } - if (tp) - { if (flag == 2 && (soap->mode & SOAP_XML_STRICT)) + if (tp && tp->visible == 2) + { if (flag == 4 || (flag == 2 && (soap->mode & SOAP_XML_STRICT))) soap->error = SOAP_PROHIBITED; else return tp->value; } - else if (flag == 1 && (soap->mode & SOAP_XML_STRICT)) + else if (flag == 3 || (flag == 1 && (soap->mode & SOAP_XML_STRICT))) soap->error = SOAP_REQUIRED; else soap->error = SOAP_OK; @@ -10387,22 +11574,26 @@ soap_attr_value(struct soap *soap, const char *name, int flag) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value, int flag) -{ register struct soap_attribute *tp; +{ struct soap_attribute *tp, *tq; if (*name == '-') return SOAP_OK; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Set attribute %s='%s'\n", name, value ? value : SOAP_STR_EOS)); - for (tp = soap->attributes; tp; tp = tp->next) + tq = NULL; + for (tp = soap->attributes; tp; tq = tp, tp = tp->next) { if (!strcmp(tp->name, name)) break; } if (!tp) - { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name)); - if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name)))) + { size_t l = strlen(name); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name)); + tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + l); + if (!tp) return soap->error = SOAP_EOM; tp->ns = NULL; #ifndef WITH_LEAN @@ -10444,10 +11635,15 @@ soap_set_attr(struct soap *soap, const char *name, const char *value, int flag) } else #endif + if (tq) + { tq->next = tp; + tp->next = NULL; + } + else { tp->next = soap->attributes; soap->attributes = tp; } - strcpy((char*)tp->name, name); + soap_strcpy((char*)tp->name, l + 1, name); tp->value = NULL; } else if (tp->visible) @@ -10462,11 +11658,12 @@ soap_set_attr(struct soap *soap, const char *name, const char *value, int flag) if (value) { if (!tp->value) { tp->size = strlen(value) + 1; - if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size))) + tp->value = (char*)SOAP_MALLOC(soap, tp->size); + if (!tp->value) return soap->error = SOAP_EOM; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute value for %s (%p)\n", tp->name, tp->value)); } - strcpy(tp->value, value); + soap_strcpy(tp->value, tp->size, value); if (!strncmp(tp->name, "xmlns:", 6)) tp->ns = tp->value; tp->visible = 2; @@ -10474,8 +11671,18 @@ soap_set_attr(struct soap *soap, const char *name, const char *value, int flag) #ifndef WITH_LEAN if (!strcmp(name, "wsu:Id")) { soap->event = SOAP_SEC_BEGIN; - strncpy(soap->id, value, sizeof(soap->id)); - soap->id[sizeof(soap->id) - 1] = '\0'; + soap_strcpy(soap->id, sizeof(soap->id), value); + } + if ((soap->mode & SOAP_XML_CANONICAL)) + { const char *s = strchr(name, ':'); + if (s) /* should also check default namespace when 'type' is not qualified? */ + { struct soap_nlist *np = soap_lookup_ns(soap, name, s - name); + if (np && np->ns && soap->local_namespaces) + { if ((!strcmp(s + 1, "type") && !strcmp(np->ns, soap->local_namespaces[2].ns)) /* xsi:type QName */ + || ((!strcmp(s + 1, "arrayType") || !strcmp(s + 1, "itemType")) && !strcmp(np->ns, soap->local_namespaces[1].ns))) /* SOAP-ENC:arrayType and SOAP-ENC:itemType QName */ + soap_utilize_ns(soap, value); + } + } } #endif } @@ -10486,12 +11693,13 @@ soap_set_attr(struct soap *soap, const char *name, const char *value, int flag) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap) -{ register struct soap_attribute *tp; +{ struct soap_attribute *tp; #ifndef WITH_LEAN if ((soap->mode & SOAP_XML_CANONICAL)) { while (soap->attributes) @@ -10511,12 +11719,62 @@ soap_clr_attr(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 static int -soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) -{ register size_t i; - for (i = 0; i < n; i++) - { register soap_wchar c = soap_get(soap); +soap_getattrval(struct soap *soap, char *s, size_t *n, soap_wchar d) +{ char buf[8]; + size_t i; + size_t k = *n; + size_t m = 0; + char *t = buf; + for (i = 0; i < k; i++) + { soap_wchar c; + if (m) + { *s++ = *t++; + m--; + continue; + } + if ((soap->mode & SOAP_C_UTFSTRING)) + { c = soap_get(soap); + if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) + { t = buf; + c &= 0x7FFFFFFF; + if (c < 0x0800) + *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); + else + { if (c < 0x010000) + *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); + else + { if (c < 0x200000) + *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); + else + { if (c < 0x04000000) + *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); + else + { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); + *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); + } + *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); + } + *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); + } + *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); + } + *t++ = (char)(0x80 | (c & 0x3F)); + m = t - buf - 1; + if (i + m >= k) + { soap_unget(soap, c | 0x80000000); + *n = i; + return soap->error = SOAP_EOM; + } + t = buf; + *s++ = *t++; + continue; + } + } + else + c = soap_getutf8(soap); switch (c) { case SOAP_TT: @@ -10530,6 +11788,7 @@ soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) if (d == ' ') { soap_unget(soap, c); *s = '\0'; + *n = i + 1; return SOAP_OK; } *s++ = '>'; @@ -10537,6 +11796,7 @@ soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) case SOAP_QT: if (c == d) { *s = '\0'; + *n = i + 1; return SOAP_OK; } *s++ = '"'; @@ -10544,6 +11804,7 @@ soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) case SOAP_AP: if (c == d) { *s = '\0'; + *n = i + 1; return SOAP_OK; } *s++ = '\''; @@ -10556,11 +11817,15 @@ soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) if (d == ' ') { soap_unget(soap, c); *s = '\0'; + *n = i + 1; return SOAP_OK; } + *s++ = (char)c; + break; default: if ((int)c == EOF) { *s = '\0'; + *n = i + 1; return soap->error = SOAP_CHK_EOF; } *s++ = (char)c; @@ -10571,6 +11836,7 @@ soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d) #endif /******************************************************************************/ + #ifdef WITH_FAST #ifndef PALM_2 SOAP_FMAC1 @@ -10584,6 +11850,7 @@ soap_store_lab(struct soap *soap, const char *s, size_t n) #endif /******************************************************************************/ + #ifdef WITH_FAST #ifndef PALM_2 SOAP_FMAC1 @@ -10591,7 +11858,7 @@ int SOAP_FMAC2 soap_append_lab(struct soap *soap, const char *s, size_t n) { if (soap->labidx + n >= soap->lablen) - { register char *t = soap->labbuf; + { char *t = soap->labbuf; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Enlarging look-aside buffer to append data, size=%lu\n", (unsigned long)soap->lablen)); if (soap->lablen == 0) soap->lablen = SOAP_LABLEN; @@ -10605,12 +11872,12 @@ soap_append_lab(struct soap *soap, const char *s, size_t n) return soap->error = SOAP_EOM; } if (t) - { memcpy(soap->labbuf, t, soap->labidx); + { soap_memcpy((void*)soap->labbuf, soap->lablen, (const void*)t, soap->labidx); SOAP_FREE(soap, t); } } if (s) - { memcpy(soap->labbuf + soap->labidx, s, n); + { soap_memcpy((void*)(soap->labbuf + soap->labidx), soap->lablen - soap->labidx, (const void*)s, n); soap->labidx += n; } return SOAP_OK; @@ -10619,6 +11886,7 @@ soap_append_lab(struct soap *soap, const char *s, size_t n) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -10626,14 +11894,14 @@ SOAP_FMAC2 soap_peek_element(struct soap *soap) { #ifdef WITH_DOM - register struct soap_dom_attribute **att = NULL; - register char *lead = NULL; -#endif - register struct soap_attribute *tp, *tq = NULL; - register const char *t; - register char *s; - register soap_wchar c; - register int i; + struct soap_dom_attribute **att = NULL; + char *lead = NULL; +#endif + struct soap_attribute *tp, *tq = NULL; + const char *t; + char *s; + soap_wchar c; + int i; if (soap->peeked) { if (!*soap->tag) return soap->error = SOAP_NO_TAG; @@ -10654,8 +11922,9 @@ soap_peek_element(struct soap *soap) /* UTF-8 BOM? */ c = soap_getchar(soap); if (c == 0xEF && soap_get0(soap) == 0xBB) - { c = soap_get1(soap); - if ((c = soap_get1(soap)) == 0xBF) + { soap_get1(soap); + c = soap_get1(soap); + if (c == 0xBF) soap->mode &= ~SOAP_ENC_LATIN; else soap_unget(soap, (0x0F << 12) | (0xBB << 6) | (c & 0x3F)); /* UTF-8 */ @@ -10667,7 +11936,7 @@ soap_peek_element(struct soap *soap) soap_unget(soap, c); c = soap_get(soap); #ifdef WITH_DOM - /* whitespace leading to tag is not insignificant for DOM */ + /* whitespace leading up to the start tag is significant for DOM as-is (but comments and PIs are removed from this lead) */ if (soap_blank(c)) { soap->labidx = 0; do @@ -10680,8 +11949,7 @@ soap_peek_element(struct soap *soap) { *s++ = c; c = soap_get(soap); } - } - while (soap_blank(c)); + } while (soap_blank(c)); *s = '\0'; lead = soap->labbuf; } @@ -10696,12 +11964,12 @@ soap_peek_element(struct soap *soap) return soap->error = SOAP_CHK_EOF; soap_unget(soap, c); #ifdef WITH_DOM - /* whitespace leading to end tag is significant for DOM */ + /* whitespace leading up to the end tag is significant for DOM as-is */ if ((soap->mode & SOAP_XML_DOM) && soap->dom) { if (lead && *lead) soap->dom->tail = soap_strdup(soap, lead); else - soap->dom->tail = (char*)SOAP_STR_EOS; + soap->dom->tail = SOAP_STR_EOS; /* body with closing tag instead of <tag/> */ } #endif return soap->error = SOAP_NO_TAG; @@ -10720,22 +11988,25 @@ soap_peek_element(struct soap *soap) c = soap_get1(soap); #ifdef WITH_DOM if (soap->mode & SOAP_XML_DOM) - { register struct soap_dom_element *elt; + { struct soap_dom_element *elt; elt = (struct soap_dom_element*)soap_malloc(soap, sizeof(struct soap_dom_element)); if (!elt) return soap->error; elt->next = NULL; - elt->nstr = NULL; - elt->name = soap_strdup(soap, soap->tag); elt->prnt = soap->dom; elt->elts = NULL; elt->atts = NULL; - elt->data = NULL; - elt->wide = NULL; - elt->type = 0; - elt->node = NULL; - elt->head = soap_strdup(soap, lead); + elt->nstr = NULL; + elt->name = soap_strdup(soap, soap->tag); + elt->text = NULL; + elt->code = NULL; elt->tail = NULL; + elt->node = NULL; + elt->type = 0; + if (lead && *lead) + elt->lead = soap_strdup(soap, lead); + else + elt->lead = NULL; elt->soap = soap; if (soap->dom) { struct soap_dom_element *p = soap->dom->elts; @@ -10774,8 +12045,7 @@ soap_peek_element(struct soap *soap) (*att)->next = NULL; (*att)->nstr = NULL; (*att)->name = soap_strdup(soap, soap->tmpbuf); - (*att)->data = NULL; - (*att)->wide = NULL; + (*att)->text = NULL; (*att)->soap = soap; } #endif @@ -10795,15 +12065,16 @@ soap_peek_element(struct soap *soap) break; } if (!tp) - { tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(soap->tmpbuf)); + { size_t l = strlen(soap->tmpbuf); + tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + l); if (!tp) return soap->error = SOAP_EOM; - strcpy((char*)tp->name, soap->tmpbuf); + soap_strcpy((char*)tp->name, l + 1, soap->tmpbuf); tp->value = NULL; tp->size = 0; tp->ns = NULL; - /* if attribute name is qualified, append it to the end of the list */ - if (tq && strchr(soap->tmpbuf, ':')) + /* append attribute to the end of the list */ + if (tq) { tq->next = tp; tp->next = NULL; } @@ -10815,25 +12086,28 @@ soap_peek_element(struct soap *soap) while (soap_blank(c)) c = soap_get1(soap); if (c == '=') - { do c = soap_getutf8(soap); + { size_t k; + do c = soap_getutf8(soap); while (soap_blank(c)); if (c != SOAP_QT && c != SOAP_AP) { soap_unget(soap, c); c = ' '; /* blank delimiter */ } - if (soap_getattrval(soap, tp->value, tp->size, c)) + k = tp->size; + if (soap_getattrval(soap, tp->value, &k, c)) { #ifdef WITH_FAST if (soap->error != SOAP_EOM) return soap->error; soap->error = SOAP_OK; - if (soap_store_lab(soap, tp->value, tp->size)) + if (soap_store_lab(soap, tp->value, k)) return soap->error; if (tp->value) SOAP_FREE(soap, tp->value); tp->value = NULL; for (;;) - { if (soap_getattrval(soap, soap->labbuf + soap->labidx, soap->lablen - soap->labidx, c)) + { k = soap->lablen - soap->labidx; + if (soap_getattrval(soap, soap->labbuf + soap->labidx, &k, c)) { if (soap->error != SOAP_EOM) return soap->error; soap->error = SOAP_OK; @@ -10851,37 +12125,42 @@ soap_peek_element(struct soap *soap) if (tp->size < SOAP_LABLEN) tp->size = SOAP_LABLEN; } - if (!(tp->value = (char*)SOAP_MALLOC(soap, tp->size))) + tp->value = (char*)SOAP_MALLOC(soap, tp->size); + if (!tp->value) return soap->error = SOAP_EOM; - strcpy(tp->value, soap->labbuf); + soap_strcpy(tp->value, tp->size, soap->labbuf); #else - size_t n; + tp->size = k; if (soap->error != SOAP_EOM) return soap->error; soap->error = SOAP_OK; if (soap_new_block(soap) == NULL) return soap->error; for (;;) - { if (!(s = (char*)soap_push_block(soap, NULL, SOAP_BLKLEN))) + { s = (char*)soap_push_block(soap, NULL, SOAP_BLKLEN); + if (!s) return soap->error; - if (soap_getattrval(soap, s, SOAP_BLKLEN, c)) + k = SOAP_BLKLEN; + if (soap_getattrval(soap, s, &k, c)) { if (soap->error != SOAP_EOM) return soap->error; soap->error = SOAP_OK; + soap_size_block(soap, NULL, k); } else break; } - n = tp->size + soap->blist->size; - if (!(s = (char*)SOAP_MALLOC(soap, n))) + k = tp->size + soap->blist->size; + s = (char*)SOAP_MALLOC(soap, k); + if (!s) return soap->error = SOAP_EOM; if (tp->value) - { memcpy(s, tp->value, tp->size); + { soap_memcpy((void*)s, k, (const void*)tp->value, tp->size); SOAP_FREE(soap, tp->value); } soap_save_block(soap, NULL, s + tp->size, 0); tp->value = s; - tp->size = n; + tp->size = k; #endif } do c = soap_get1(soap); @@ -10889,7 +12168,7 @@ soap_peek_element(struct soap *soap) tp->visible = 2; /* seen this attribute w/ value */ #ifdef WITH_DOM if (att) - (*att)->data = soap_strdup(soap, tp->value); + (*att)->text = soap_strdup(soap, tp->value); #endif } else @@ -10905,16 +12184,18 @@ soap_peek_element(struct soap *soap) } #ifdef WITH_DOM if (att) - { soap->dom->nstr = soap_current_namespace(soap, soap->tag); + { soap->dom->nstr = soap_current_namespace_tag(soap, soap->tag); for (att = &soap->dom->atts; *att; att = &(*att)->next) - (*att)->nstr = soap_current_namespace(soap, (*att)->name); + (*att)->nstr = soap_current_namespace_att(soap, (*att)->name); } #endif if ((int)c == EOF) return soap->error = SOAP_CHK_EOF; - if (!(soap->body = (c != '/'))) - do c = soap_get1(soap); + soap->body = (c != '/'); + if (!soap->body) + { do c = soap_get1(soap); while (soap_blank(c)); + } #ifdef WITH_DOM if (soap->mode & SOAP_XML_DOM) { if (!soap->body && soap->dom->prnt) @@ -10929,32 +12210,30 @@ soap_peek_element(struct soap *soap) { if ((soap->version > 0 && !(soap->imode & SOAP_XML_TREE)) || (soap->mode & SOAP_XML_GRAPH)) { *soap->id = '#'; - strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2); - soap->id[sizeof(soap->id) - 1] = '\0'; + soap_strcpy(soap->id + 1, sizeof(soap->id) - 1, tp->value); } } else if (!strcmp(tp->name, "href")) { if ((soap->version == 1 && !(soap->imode & SOAP_XML_TREE)) || (soap->mode & SOAP_XML_GRAPH) - || (soap->mode & SOAP_ENC_MTOM) - || (soap->mode & SOAP_ENC_DIME)) - { strncpy(soap->href, tp->value, sizeof(soap->href) - 1); - soap->href[sizeof(soap->href) - 1] = '\0'; - } + || ((soap->mode & (SOAP_ENC_MTOM | SOAP_ENC_DIME)) && *tp->value != '#')) + soap_strcpy(soap->href, sizeof(soap->href), tp->value); } else if (!strcmp(tp->name, "ref")) { if ((soap->version == 2 && !(soap->imode & SOAP_XML_TREE)) || (soap->mode & SOAP_XML_GRAPH)) { *soap->href = '#'; - strncpy(soap->href + (*tp->value != '#'), tp->value, sizeof(soap->href) - 2); - soap->href[sizeof(soap->href) - 1] = '\0'; + soap_strcpy(soap->href + (*tp->value != '#'), sizeof(soap->href) - 1, tp->value); } } - else +#else + if (!strcmp(tp->name, "href")) + { if ((soap->mode & (SOAP_ENC_MTOM | SOAP_ENC_DIME)) && *tp->value != '#') + soap_strcpy(soap->href, sizeof(soap->href), tp->value); + } #endif - if (!soap_match_tag(soap, tp->name, "xsi:type")) - { strncpy(soap->type, tp->value, sizeof(soap->type) - 1); - soap->type[sizeof(soap->type) - 1] = '\0'; + else if (!soap_match_tag(soap, tp->name, "xsi:type")) + { soap_strcpy(soap->type, sizeof(soap->type), tp->value); } else if ((!soap_match_tag(soap, tp->name, "xsi:null") || !soap_match_tag(soap, tp->name, "xsi:nil")) @@ -10962,21 +12241,24 @@ soap_peek_element(struct soap *soap) || !strcmp(tp->value, "true"))) { soap->null = 1; } + else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:encodingStyle")) + { if (!soap->encodingStyle) + soap->encodingStyle = SOAP_STR_EOS; + soap_get_version(soap); + } else if (soap->version == 1) - { if (!soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType")) + { + if (!soap_match_tag(soap, tp->name, "SOAP-ENC:arrayType")) { s = soap_strrchr(tp->value, '['); if (s && (size_t)(s - tp->value) < sizeof(soap->arrayType)) - { strncpy(soap->arrayType, tp->value, s - tp->value); - soap->arrayType[s - tp->value] = '\0'; - strncpy(soap->arraySize, s, sizeof(soap->arraySize)); + { soap_strncpy(soap->arrayType, sizeof(soap->arrayType), tp->value, s - tp->value); + soap_strcpy(soap->arraySize, sizeof(soap->arraySize), s); } else - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType)); - soap->arraySize[sizeof(soap->arraySize) - 1] = '\0'; - soap->arrayType[sizeof(soap->arrayType) - 1] = '\0'; + soap_strcpy(soap->arrayType, sizeof(soap->arrayType), tp->value); } else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:offset")) - strncpy(soap->arrayOffset, tp->value, sizeof(soap->arrayOffset)); + soap_strcpy(soap->arrayOffset, sizeof(soap->arrayOffset), tp->value); else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:position")) soap->position = soap_getposition(tp->value, soap->positions); else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:root")) @@ -10995,20 +12277,18 @@ soap_peek_element(struct soap *soap) #ifndef WITH_NOIDREF if (!soap_match_tag(soap, tp->name, "SOAP-ENC:id")) { *soap->id = '#'; - strncpy(soap->id + 1, tp->value, sizeof(soap->id) - 2); - soap->id[sizeof(soap->id) - 1] = '\0'; + soap_strcpy(soap->id + 1, sizeof(soap->id) - 1, tp->value); } else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:ref")) { *soap->href = '#'; - strncpy(soap->href + (*tp->value != '#'), tp->value, sizeof(soap->href) - 2); - soap->href[sizeof(soap->href) - 1] = '\0'; + soap_strcpy(soap->href + (*tp->value != '#'), sizeof(soap->href) - 1, tp->value); } else #endif if (!soap_match_tag(soap, tp->name, "SOAP-ENC:itemType")) - strncpy(soap->arrayType, tp->value, sizeof(soap->arrayType) - 1); + soap_strcpy(soap->arrayType, sizeof(soap->arrayType), tp->value); else if (!soap_match_tag(soap, tp->name, "SOAP-ENC:arraySize")) - strncpy(soap->arraySize, tp->value, sizeof(soap->arraySize) - 1); + soap_strcpy(soap->arraySize, sizeof(soap->arraySize), tp->value); else if (!soap_match_tag(soap, tp->name, "SOAP-ENV:mustUnderstand") && (!strcmp(tp->value, "1") || !strcmp(tp->value, "true"))) soap->mustUnderstand = 1; @@ -11033,6 +12313,7 @@ soap_peek_element(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void @@ -11044,6 +12325,7 @@ soap_retry(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void @@ -11059,21 +12341,68 @@ soap_revert(struct soap *soap) #endif /******************************************************************************/ + +#ifndef PALM_2 +SOAP_FMAC1 +int +SOAP_FMAC2 +soap_ignore(struct soap *soap) +{ int n = 0; + soap_wchar c; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Ignoring XML content at level=%u\n", soap->level)); +#ifdef WITH_DOM + if ((soap->mode & SOAP_XML_DOM) && soap->dom) + { if (!soap_string_in(soap, -1, -1, -1, NULL)) + return soap->error; + return SOAP_OK; + } +#endif + for (;;) + { c = soap_get(soap); + switch (c) + { case SOAP_TT: + if (n == 0) + goto end; + n--; + break; + case SOAP_LT: + n++; + break; + case '/': + if (n > 0) + { c = soap_getchar(soap); + if (c == '>') + n--; + } + break; + default: + if ((int)c == EOF) + goto end; + } + } +end: + soap_unget(soap, c); + return SOAP_OK; +} +#endif + +/******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap *soap, const char *s, int flag) -{ register const char *t; - register soap_wchar c; - register soap_wchar mask = (soap_wchar)0xFFFFFF80UL; +{ const char *t; + soap_wchar c; + soap_wchar mask = (soap_wchar)0xFFFFFF80UL; #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { soap->dom->data = soap_strdup(soap, s); + { soap->dom->text = soap_strdup(soap, s); return SOAP_OK; } #endif - if (flag == 2 || soap->mode & SOAP_C_UTFSTRING) + if (flag == 2 || (soap->mode & SOAP_C_UTFSTRING)) mask = 0; t = s; while ((c = *t++)) @@ -11093,11 +12422,6 @@ soap_string_out(struct soap *soap, const char *s, int flag) s = t; } break; - case 0x0D: - if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "
", 5)) - return soap->error; - s = t; - break; case '&': if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "&", 5)) return soap->error; @@ -11122,12 +12446,17 @@ soap_string_out(struct soap *soap, const char *s, int flag) s = t; } break; + case 0x7F: + if (soap_send_raw(soap, s, t - s - 1) || soap_send_raw(soap, "", 6)) + return soap->error; + s = t; + break; default: #ifndef WITH_LEANER #ifdef HAVE_MBTOWC if (soap->mode & SOAP_C_MBSTRING) { wchar_t wc; - register int m = mbtowc(&wc, t - 1, MB_CUR_MAX); + int m = mbtowc(&wc, t - 1, MB_CUR_MAX); if (m > 0 && !((soap_wchar)wc == c && m == 1 && c < 0x80)) { if (soap_send_raw(soap, s, t - s - 1) || soap_pututf8(soap, (unsigned long)wc)) return soap->error; @@ -11151,47 +12480,51 @@ soap_string_out(struct soap *soap, const char *s, int flag) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 char * SOAP_FMAC2 -soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) -{ register char *s; +soap_string_in(struct soap *soap, int flag, long minlen, long maxlen, const char *pattern) +{ char *s; char *t = NULL; - register size_t i; - register long l = 0; - register int n = 0, f = 0, m = 0; - register soap_wchar c; + size_t i; + long l = 0; + int n = 0, f = 0, m = 0; + soap_wchar c; #if !defined(WITH_LEANER) && defined(HAVE_WCTOMB) char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8]; #else char buf[8]; #endif - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading string content, flag=%d\n", flag)); - if (soap->peeked && *soap->tag) + if (maxlen < 0 && soap->maxlength > 0) + maxlen = soap->maxlength; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reading string content, flag=%d\n", flag)); + if (flag <= 0 && soap->peeked && *soap->tag) { #ifndef WITH_LEAN struct soap_attribute *tp; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String content includes tag '%s' and attributes\n", soap->tag)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "String content includes tag '%s' and attributes\n", soap->tag)); t = soap->tmpbuf; *t = '<'; - strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 2); - t[sizeof(soap->tmpbuf) - 1] = '\0'; + soap_strcpy(t + 1, sizeof(soap->tmpbuf) - 1, soap->tag); t += strlen(t); for (tp = soap->attributes; tp; tp = tp->next) { if (tp->visible) - { if (t >= soap->tmpbuf + sizeof(soap->tmpbuf) - 2) - break; + { size_t l = strlen(tp->name); + if (t + l + 1 >= soap->tmpbuf + sizeof(soap->tmpbuf)) + break; /* too many or attribute values to large */ *t++ = ' '; - strcpy(t, tp->name); - t += strlen(t); - if (t >= soap->tmpbuf + sizeof(soap->tmpbuf) - 2) - break; /* too many or large attribute values */ + soap_strncpy(t, sizeof(soap->tmpbuf) - (t - soap->tmpbuf), tp->name, l); + t += l; if (tp->value) - { *t++ = '='; + { l = strlen(tp->value); + if (t + l + 3 >= soap->tmpbuf + sizeof(soap->tmpbuf)) + break; /* too many or attribute values to large */ + *t++ = '='; *t++ = '"'; - strcpy(t, tp->value); - t += strlen(t); + soap_strncpy(t, sizeof(soap->tmpbuf) - (t - soap->tmpbuf), tp->value, l); + t += l; *t++ = '"'; } } @@ -11209,10 +12542,10 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) soap->peeked = 0; } #ifdef WITH_CDATA - if (!flag) - { register int state = 0; + if (flag <= 0) + { int state = 0; #ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ + soap->labidx = 0; /* use look-aside buffer */ #else if (soap_new_block(soap) == NULL) return NULL; @@ -11220,20 +12553,21 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) for (;;) { #ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ + size_t k; + if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ + s = soap->labbuf + soap->labidx; /* space to populate */ + k = soap->lablen - soap->labidx; /* number of bytes available */ + soap->labidx = soap->lablen; /* claim this space */ #else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, NULL, k))) + size_t k = SOAP_BLKLEN; + s = (char*)soap_push_block(soap, NULL, k); + if (!s) return NULL; #endif for (i = 0; i < k; i++) { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ + { *s++ = *t++; /* copy multibyte characters */ m--; continue; } @@ -11245,7 +12579,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) { soap_unget(soap, c); c = soap_getutf8(soap); } - if ((c & 0x7FFFFFFF) >= 0x80 && (!flag || (soap->mode & SOAP_C_UTFSTRING))) + if ((c & 0x7FFFFFFF) >= 0x80 && (flag <= 0 || (soap->mode & SOAP_C_UTFSTRING))) { c &= 0x7FFFFFFF; t = buf; if (c < 0x0800) @@ -11303,7 +12637,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) case 5: if (c == '>') state = 0; - else if (c != ']') + else if (c != ']') state = 1; *s++ = (char)c; continue; @@ -11342,7 +12676,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) m = 1; break; case SOAP_LT: - if (f && n == 0) + if (flag == 3 || (f && n == 0)) goto end; n++; *s++ = '<'; @@ -11386,7 +12720,8 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) state = 1; } else if (c == '-') - { if ((c = soap_getchar(soap)) == '-') + { c = soap_getchar(soap); + if (c == '-') state = 2; t = (char*)"!-"; m = 2; @@ -11402,7 +12737,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) } else if (c == '?') state = 3; - else if (f && n == 0) + else if (flag == 3 || (f && n == 0)) { soap_revget1(soap); c = '<'; goto end; @@ -11422,7 +12757,13 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) #ifndef WITH_LEANER #ifdef HAVE_WCTOMB if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, (wchar_t)(c & 0x7FFFFFFF)); + { +#ifdef WIN32 + m = 0; + wctomb_s(&m, buf, sizeof(buf), (wchar_t)(c & 0x7FFFFFFF)); +#else + m = wctomb(buf, (wchar_t)(c & 0x7FFFFFFF)); +#endif if (m >= 1 && m <= (int)MB_CUR_MAX) { t = buf; *s++ = *t++; @@ -11440,7 +12781,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) } l++; if (maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); soap->error = SOAP_LENGTH; return NULL; } @@ -11449,7 +12790,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) } #endif #ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ + soap->labidx = 0; /* use look-aside buffer */ #else if (soap_new_block(soap) == NULL) return NULL; @@ -11457,62 +12798,69 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) for (;;) { #ifdef WITH_FAST - register size_t k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ + size_t k; + if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ + s = soap->labbuf + soap->labidx; /* space to populate */ + k = soap->lablen - soap->labidx; /* number of bytes available */ + soap->labidx = soap->lablen; /* claim this space */ #else - register size_t k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, NULL, k))) + size_t k = SOAP_BLKLEN; + s = (char*)soap_push_block(soap, NULL, k); + if (!s) return NULL; #endif for (i = 0; i < k; i++) { if (m > 0) - { *s++ = *t++; /* copy multibyte characters */ + { *s++ = *t++; /* copy multibyte characters */ m--; continue; } #ifndef WITH_CDATA - if (!flag) + if (flag <= 0) c = soap_getchar(soap); else #endif - if ((soap->mode & SOAP_C_UTFSTRING)) - { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < SOAP_AP) - { c &= 0x7FFFFFFF; - t = buf; - if (c < 0x0800) - *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); - else - { if (c < 0x010000) - *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); + { c = soap_getutf8(soap); + if ((soap->mode & SOAP_C_UTFSTRING)) + { if (c >= 0x80 || (c < SOAP_AP && c >= -0x7FFFFF80)) + { c &= 0x7FFFFFFF; + t = buf; + if (c < 0x0800) + *t++ = (char)(0xC0 | ((c >> 6) & 0x1F)); else - { if (c < 0x200000) - *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); + { if (c < 0x010000) + *t++ = (char)(0xE0 | ((c >> 12) & 0x0F)); else - { if (c < 0x04000000) - *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); + { if (c < 0x200000) + *t++ = (char)(0xF0 | ((c >> 18) & 0x07)); else - { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); - *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); + { if (c < 0x04000000) + *t++ = (char)(0xF8 | ((c >> 24) & 0x03)); + else + { *t++ = (char)(0xFC | ((c >> 30) & 0x01)); + *t++ = (char)(0x80 | ((c >> 24) & 0x3F)); + } + *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); } - *t++ = (char)(0x80 | ((c >> 18) & 0x3F)); + *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); } - *t++ = (char)(0x80 | ((c >> 12) & 0x3F)); + *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); } - *t++ = (char)(0x80 | ((c >> 6) & 0x3F)); + *t++ = (char)(0x80 | (c & 0x3F)); + m = (int)(t - buf) - 1; + t = buf; + *s++ = *t++; + l++; + if (maxlen >= 0 && l > maxlen) + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); + soap->error = SOAP_LENGTH; + return NULL; + } + continue; } - *t++ = (char)(0x80 | (c & 0x3F)); - m = (int)(t - buf) - 1; - t = buf; - *s++ = *t++; - continue; } } - else - c = soap_getutf8(soap); switch (c) { case SOAP_TT: @@ -11524,7 +12872,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) m = 1; break; case SOAP_LT: - if (f && n == 0) + if (flag == 3 || (f && n == 0)) goto end; n++; *s++ = '<'; @@ -11540,22 +12888,22 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) break; case '/': if (n > 0) - { if (!flag) - { c = soap_getchar(soap); - if (c == '>') - n--; - } - else - { c = soap_get(soap); + { if (flag > 0) + { c = soap_get(soap); if (c == SOAP_GT) n--; - } + } + else + { c = soap_getchar(soap); + if (c == '>') + n--; + } soap_unget(soap, c); } *s++ = '/'; break; case (soap_wchar)('<' | 0x80000000): - if (flag) + if (flag > 0) *s++ = '<'; else { *s++ = '&'; @@ -11564,7 +12912,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) } break; case (soap_wchar)('>' | 0x80000000): - if (flag) + if (flag > 0) *s++ = '>'; else { *s++ = '&'; @@ -11573,7 +12921,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) } break; case (soap_wchar)('&' | 0x80000000): - if (flag) + if (flag > 0) *s++ = '&'; else { *s++ = '&'; @@ -11582,7 +12930,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) } break; case (soap_wchar)('"' | 0x80000000): - if (flag) + if (flag > 0) *s++ = '"'; else { *s++ = '&'; @@ -11591,7 +12939,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) } break; case (soap_wchar)('\'' | 0x80000000): - if (flag) + if (flag > 0) *s++ = '\''; else { *s++ = '&'; @@ -11603,28 +12951,31 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) if ((int)c == EOF) goto end; #ifndef WITH_CDATA - if (c == '<' && !flag) - { if (f && n == 0) + if (c == '<') + { c = soap_getchar(soap); + soap_unget(soap, c); + if (c == '/') + { c = SOAP_TT; + if (n == 0) goto end; - c = soap_getchar(soap); - soap_unget(soap, c); - if (c == '/') - { c = SOAP_TT; - if (n == 0) - goto end; - n--; - } - else - n++; - *s++ = '<'; - break; + n--; + } + else + n++; + *s++ = '<'; } else #endif #ifndef WITH_LEANER #ifdef HAVE_WCTOMB if (soap->mode & SOAP_C_MBSTRING) - { m = wctomb(buf, (wchar_t)(c & 0x7FFFFFFF)); + { +#ifdef WIN32 + m = 0; + wctomb_s(&m, buf, sizeof(buf), (wchar_t)(c & 0x7FFFFFFF)); +#else + m = wctomb(buf, (wchar_t)(c & 0x7FFFFFFF)); +#endif if (m >= 1 && m <= (int)MB_CUR_MAX) { t = buf; *s++ = *t++; @@ -11642,7 +12993,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen) } l++; if (maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); soap->error = SOAP_LENGTH; return NULL; } @@ -11655,29 +13006,38 @@ end: t = soap_strdup(soap, soap->labbuf); #else soap_size_block(soap, NULL, i + 1); - t = soap_save_block(soap, NULL, 0); + t = soap_save_block(soap, NULL, NULL, 0); #endif if (l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); soap->error = SOAP_LENGTH; return NULL; } #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { if (flag == 3) - soap->dom->tail = t; + { if (flag > 0) + soap->dom->text = t; else - soap->dom->data = t; + soap->dom->code = t; } #endif if (flag == 2) - if (soap_s2QName(soap, t, &t, minlen, maxlen)) + { if (soap_s2QName(soap, t, &t, minlen, maxlen, pattern)) + return NULL; + } +#ifndef WITH_LEANER + else if (pattern && soap->fsvalidate) + { soap->error = soap->fsvalidate(soap, pattern, t); + if (soap->error) return NULL; + } +#endif return t; } #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_2 SOAP_FMAC1 @@ -11686,16 +13046,10 @@ SOAP_FMAC2 soap_wstring_out(struct soap *soap, const wchar_t *s, int flag) { const char *t; char tmp; - register soap_wchar c; + soap_wchar c; #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && soap->dom) - { wchar_t *r = (wchar_t*)s; - int n = 1; - while (*r++) - n++; - soap->dom->wide = r = (wchar_t*)soap_malloc(soap, n * sizeof(wchar_t)); - while (n--) - *r++ = *s++; + { soap->dom->text = soap_wchar2s(soap, s); return SOAP_OK; } #endif @@ -11744,7 +13098,7 @@ soap_wstring_out(struct soap *soap, const wchar_t *s, int flag) else { /* check for UTF16 encoding when wchar_t is too small to hold UCS */ if (sizeof(wchar_t) < 4 && (c & 0xFC00) == 0xD800) - { register soap_wchar d = *s++; + { soap_wchar d = *s++; if ((d & 0xFC00) == 0xDC00) c = ((c - 0xD800) << 10) + (d - 0xDC00) + 0x10000; else @@ -11764,62 +13118,65 @@ soap_wstring_out(struct soap *soap, const wchar_t *s, int flag) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_2 SOAP_FMAC1 wchar_t * SOAP_FMAC2 -soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) +soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen, const char *pattern) { wchar_t *s; - register int i, n = 0, f = 0; - register long l = 0; - register soap_wchar c; + int i, n = 0, f = 0; + long l = 0; + soap_wchar c; char *t = NULL; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n")); - if (soap->peeked) - { if (*soap->tag) - { + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reading wide string content\n")); + if (maxlen < 0 && soap->maxlength > 0) + maxlen = soap->maxlength; + if (flag <= 0 && soap->peeked && *soap->tag) + { #ifndef WITH_LEAN - struct soap_attribute *tp; - t = soap->tmpbuf; - *t = '<'; - strncpy(t + 1, soap->tag, sizeof(soap->tmpbuf) - 2); - t[sizeof(soap->tmpbuf) - 1] = '\0'; - t += strlen(t); - for (tp = soap->attributes; tp; tp = tp->next) - { if (tp->visible) - { if (t >= soap->tmpbuf + sizeof(soap->tmpbuf) - 2) - break; - *t++ = ' '; - strcpy(t, tp->name); - t += strlen(t); - if (t >= soap->tmpbuf + sizeof(soap->tmpbuf) - 2) + struct soap_attribute *tp; + t = soap->tmpbuf; + *t = '<'; + soap_strcpy(t + 1, sizeof(soap->tmpbuf) - 1, soap->tag); + t += strlen(t); + for (tp = soap->attributes; tp; tp = tp->next) + { if (tp->visible) + { size_t l = strlen(tp->name); + if (t + l + 1 >= soap->tmpbuf + sizeof(soap->tmpbuf)) + break; + *t++ = ' '; + soap_strncpy(t, sizeof(soap->tmpbuf) - (t - soap->tmpbuf), tp->name, l); + t += l; + if (tp->value) + { l = strlen(tp->value); + if (t + l + 3 >= soap->tmpbuf + sizeof(soap->tmpbuf)) break; - if (tp->value) - { *t++ = '='; - *t++ = '"'; - strcpy(t, tp->value); - t += strlen(t); - *t++ = '"'; - } + *t++ = '='; + *t++ = '"'; + soap_strncpy(t, sizeof(soap->tmpbuf) - (t - soap->tmpbuf), tp->value, l); + t += l; + *t++ = '"'; } } - if (!soap->body) - *t++ = '/'; - *t++ = '>'; - *t = '\0'; - t = soap->tmpbuf; -#endif - if (soap->body) - n = 1; - f = 1; - soap->peeked = 0; } + if (!soap->body) + *t++ = '/'; + *t++ = '>'; + *t = '\0'; + t = soap->tmpbuf; +#endif + if (soap->body) + n = 1; + f = 1; + soap->peeked = 0; } if (soap_new_block(soap) == NULL) return NULL; for (;;) - { if (!(s = (wchar_t*)soap_push_block(soap, NULL, sizeof(wchar_t)*SOAP_BLKLEN))) + { s = (wchar_t*)soap_push_block(soap, NULL, sizeof(wchar_t)*SOAP_BLKLEN); + if (!s) return NULL; for (i = 0; i < SOAP_BLKLEN; i++) { if (t) @@ -11839,7 +13196,7 @@ soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) soap_unget(soap, '/'); break; case SOAP_LT: - if (f && n == 0) + if (flag == 3 || (f && n == 0)) goto end; n++; *s++ = '<'; @@ -11863,7 +13220,7 @@ soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) *s++ = '/'; break; case '<': - if (flag) + if (flag > 0) *s++ = (soap_wchar)'<'; else { *s++ = (soap_wchar)'&'; @@ -11871,7 +13228,7 @@ soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) } break; case '>': - if (flag) + if (flag > 0) *s++ = (soap_wchar)'>'; else { *s++ = (soap_wchar)'&'; @@ -11879,7 +13236,7 @@ soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) } break; case '"': - if (flag) + if (flag > 0) *s++ = (soap_wchar)'"'; else { *s++ = (soap_wchar)'&'; @@ -11891,7 +13248,7 @@ soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) goto end; /* use UTF16 encoding when wchar_t is too small to hold UCS */ if (sizeof(wchar_t) < 4 && c > 0xFFFF) - { register soap_wchar c1, c2; + { soap_wchar c1, c2; c1 = 0xD800 - (0x10000 >> 10) + (c >> 10); c2 = 0xDC00 + (c & 0x3FF); c = c1; @@ -11901,7 +13258,7 @@ soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen) } l++; if (maxlen >= 0 && l > maxlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen)); soap->error = SOAP_LENGTH; return NULL; } @@ -11912,14 +13269,21 @@ end: *s = '\0'; soap_size_block(soap, NULL, sizeof(wchar_t) * (i + 1)); if (l < minlen) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen)); soap->error = SOAP_LENGTH; return NULL; } s = (wchar_t*)soap_save_block(soap, NULL, NULL, 0); +#ifndef WITH_LEANER + if (pattern && soap->fwvalidate) + { soap->error = soap->fwvalidate(soap, pattern, s); + if (soap->error) + return NULL; + } +#endif #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->wide = s; + soap->dom->text = soap_wchar2s(soap, s); #endif return s; } @@ -11927,6 +13291,7 @@ end: #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* @@ -11937,6 +13302,7 @@ soap_int2s(struct soap *soap, int n) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -11950,6 +13316,7 @@ soap_outint(struct soap *soap, const char *tag, int id, const int *p, const char #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -11982,6 +13349,7 @@ soap_s2int(struct soap *soap, const char *s, int *p) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int * @@ -11999,10 +13367,12 @@ soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t) soap_revert(soap); return NULL; } +#else + (void)type; #endif - p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL); + p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), NULL, NULL, NULL, NULL); if (*soap->href) - p = (int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(int), 0, NULL); + p = (int*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(int), 0, NULL, NULL); else if (p) { if (soap_s2int(soap, soap_value(soap), p)) return NULL; @@ -12014,22 +13384,19 @@ soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap *soap, long n) -{ -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "%ld", n); -#else - sprintf(soap->tmpbuf, "%ld", n); -#endif +{ (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), 20), "%ld", n); return soap->tmpbuf; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12043,6 +13410,7 @@ soap_outlong(struct soap *soap, const char *tag, int id, const long *p, const ch #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12070,6 +13438,7 @@ soap_s2long(struct soap *soap, const char *s, long *p) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 long * @@ -12087,10 +13456,12 @@ soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t soap_revert(soap); return NULL; } +#else + (void)type; #endif - p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL); + p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), NULL, NULL, NULL, NULL); if (*soap->href) - p = (long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(long), 0, NULL); + p = (long*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(long), 0, NULL, NULL); else if (p) { if (soap_s2long(soap, soap_value(soap), p)) return NULL; @@ -12102,22 +13473,19 @@ soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap *soap, LONG64 n) -{ -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), SOAP_LONG_FORMAT, n); -#else - sprintf(soap->tmpbuf, SOAP_LONG_FORMAT, n); -#endif +{ (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), 20), SOAP_LONG_FORMAT, n); return soap->tmpbuf; } #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 int @@ -12131,15 +13499,14 @@ soap_outLONG64(struct soap *soap, const char *tag, int id, const LONG64 *p, cons #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p) { if (s) - { -#ifdef HAVE_STRTOLL - char *r; + { char *r; #ifndef WITH_NOIO #ifndef WITH_LEAN soap_reset_errno; @@ -12153,11 +13520,6 @@ soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p) #endif #endif ) -#else -# ifdef HAVE_SSCANF - if (sscanf(s, SOAP_LONG_FORMAT, p) != 1) -# endif -#endif soap->error = SOAP_TYPE; } return soap->error; @@ -12165,6 +13527,7 @@ soap_s2LONG64(struct soap *soap, const char *s, LONG64 *p) #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 LONG64 * @@ -12189,9 +13552,9 @@ soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, i return NULL; } #endif - p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL); + p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), NULL, NULL, NULL, NULL); if (*soap->href) - p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(LONG64), 0, NULL); + p = (LONG64*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(LONG64), 0, NULL, NULL); else if (p) { if (soap_s2LONG64(soap, soap_value(soap), p)) return NULL; @@ -12203,6 +13566,7 @@ soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, i #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* @@ -12213,6 +13577,7 @@ soap_byte2s(struct soap *soap, char n) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12226,6 +13591,7 @@ soap_outbyte(struct soap *soap, const char *tag, int id, const char *p, const ch #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12244,6 +13610,7 @@ soap_s2byte(struct soap *soap, const char *s, char *p) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 char * @@ -12259,10 +13626,12 @@ soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t soap_revert(soap); return NULL; } +#else + (void)type; #endif - p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL); + p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), NULL, NULL, NULL, NULL); if (*soap->href) - p = (char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(char), 0, NULL); + p = (char*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(char), 0, NULL, NULL); else if (p) { if (soap_s2byte(soap, soap_value(soap), p)) return NULL; @@ -12274,6 +13643,7 @@ soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* @@ -12284,6 +13654,7 @@ soap_short2s(struct soap *soap, short n) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12297,6 +13668,7 @@ soap_outshort(struct soap *soap, const char *tag, int id, const short *p, const #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12315,6 +13687,7 @@ soap_s2short(struct soap *soap, const char *s, short *p) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 short * @@ -12331,10 +13704,12 @@ soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int soap_revert(soap); return NULL; } +#else + (void)type; #endif - p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL); + p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), NULL, NULL, NULL, NULL); if (*soap->href) - p = (short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(short), 0, NULL); + p = (short*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(short), 0, NULL, NULL); else if (p) { if (soap_s2short(soap, soap_value(soap), p)) return NULL; @@ -12346,31 +13721,31 @@ soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap *soap, float n) -{ char *s; +{ +#if !defined(WITH_C_LOCALE) || !defined(HAVE_SPRINTF_L) + char *s; +#endif if (soap_isnan((double)n)) return "NaN"; if (soap_ispinff(n)) return "INF"; if (soap_isninff(n)) return "-INF"; -#if defined(HAVE_SPRINTF_L) +#if defined(WITH_C_LOCALE) && defined(HAVE_SPRINTF_L) # ifdef WIN32 - _sprintf_s_l(soap->tmpbuf, _countof(soap->tmpbuf), soap->float_format, soap->c_locale, n); + _sprintf_s_l(soap->tmpbuf, _countof(soap->tmpbuf), soap->float_format, SOAP_LOCALE(soap), n); # else - sprintf_l(soap->tmpbuf, soap->c_locale, soap->float_format, n); + sprintf_l(soap->tmpbuf, SOAP_LOCALE(soap), soap->float_format, n); # endif #else -# ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), soap->float_format, n); -# else - sprintf(soap->tmpbuf, soap->float_format, n); -# endif - s = strchr(soap->tmpbuf, ','); /* convert decimal comma to DP */ + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), 20), soap->float_format, n); + s = strchr(soap->tmpbuf, ','); /* convert decimal comma to DP */ if (s) *s = '.'; #endif @@ -12379,6 +13754,7 @@ soap_float2s(struct soap *soap, float n) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12392,6 +13768,7 @@ soap_outfloat(struct soap *soap, const char *tag, int id, const float *p, const #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12411,38 +13788,43 @@ soap_s2float(struct soap *soap, const char *s, float *p) else { /* On some systems strtof requires -std=c99 or does not even link: so we try to use strtod first */ -#if defined(HAVE_STRTOD_L) +#if defined(WITH_C_LOCALE) && defined(HAVE_STRTOD_L) char *r; # ifdef WIN32 - *p = (float)_strtod_l(s, &r, soap->c_locale); + *p = (float)_strtod_l(s, &r, SOAP_LOCALE(soap)); # else - *p = (float)strtod_l(s, &r, soap->c_locale); + *p = (float)strtod_l(s, &r, SOAP_LOCALE(soap)); # endif if (*r) + soap->error = SOAP_TYPE; #elif defined(HAVE_STRTOD) char *r; *p = (float)strtod(s, &r); if (*r) -#elif defined(HAVE_STRTOF_L) + soap->error = SOAP_TYPE; +#elif defined(WITH_C_LOCALE) && defined(HAVE_STRTOF_L) char *r; - *p = strtof_l((char*)s, &r, soap->c_locale); + *p = strtof_l((char*)s, &r, SOAP_LOCALE(soap)); if (*r) + soap->error = SOAP_TYPE; #elif defined(HAVE_STRTOF) char *r; *p = strtof((char*)s, &r); if (*r) -#endif - { -#if defined(HAVE_SSCANF_L) && !defined(HAVE_STRTOF_L) && !defined(HAVE_STRTOD_L) - if (sscanf_l(s, soap->c_locale, "%f", p) != 1) - soap->error = SOAP_TYPE; + soap->error = SOAP_TYPE; +#elif defined(WITH_C_LOCALE) && defined(HAVE_SSCANF_L) && !defined(HAVE_STRTOF_L) && !defined(HAVE_STRTOD_L) + double n; + if (sscanf_l(s, SOAP_LOCALE(soap), "%lf", &n) != 1) + soap->error = SOAP_TYPE; + *p = (float)n; #elif defined(HAVE_SSCANF) - if (sscanf(s, "%f", p) != 1) - soap->error = SOAP_TYPE; -#else + double n; + if (sscanf(s, "%lf", &n) != 1) soap->error = SOAP_TYPE; + *p = (float)n; +#else + soap->error = SOAP_TYPE; #endif - } } } return soap->error; @@ -12450,6 +13832,7 @@ soap_s2float(struct soap *soap, const char *s, float *p) #endif /******************************************************************************/ + #ifndef WITH_LEAN static int soap_isnumeric(struct soap *soap, const char *type) { if (soap_match_tag(soap, soap->type, type) @@ -12478,6 +13861,7 @@ static int soap_isnumeric(struct soap *soap, const char *type) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 float * @@ -12488,10 +13872,12 @@ soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int #ifndef WITH_LEAN if (*soap->type != '\0' && soap_isnumeric(soap, type)) return NULL; +#else + (void)type; #endif - p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL); + p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), NULL, NULL, NULL, NULL); if (*soap->href) - p = (float*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(float), 0, NULL); + p = (float*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(float), 0, NULL, NULL); else if (p) { if (soap_s2float(soap, soap_value(soap), p)) return NULL; @@ -12503,31 +13889,31 @@ soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap *soap, double n) -{ char *s; +{ +#if !defined(WITH_C_LOCALE) || !defined(HAVE_SPRINTF_L) + char *s; +#endif if (soap_isnan(n)) return "NaN"; if (soap_ispinfd(n)) return "INF"; if (soap_isninfd(n)) return "-INF"; -#if defined(HAVE_SPRINTF_L) +#if defined(WITH_C_LOCALE) && defined(HAVE_SPRINTF_L) # ifdef WIN32 - _sprintf_s_l(soap->tmpbuf, _countof(soap->tmpbuf), soap->double_format, soap->c_locale, n); + _sprintf_s_l(soap->tmpbuf, _countof(soap->tmpbuf), soap->double_format, SOAP_LOCALE(soap), n); # else - sprintf_l(soap->tmpbuf, soap->c_locale, soap->double_format, n); + sprintf_l(soap->tmpbuf, SOAP_LOCALE(soap), soap->double_format, n); # endif #else -# ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), soap->double_format, n); -#else - sprintf(soap->tmpbuf, soap->double_format, n); -#endif - s = strchr(soap->tmpbuf, ','); /* convert decimal comma to DP */ + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), 40), soap->double_format, n); + s = strchr(soap->tmpbuf, ','); /* convert decimal comma to DP */ if (s) *s = '.'; #endif @@ -12536,6 +13922,7 @@ soap_double2s(struct soap *soap, double n) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12549,6 +13936,7 @@ soap_outdouble(struct soap *soap, const char *tag, int id, const double *p, cons #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12567,30 +13955,29 @@ soap_s2double(struct soap *soap, const char *s, double *p) *p = DBL_NAN; else { -#if defined(HAVE_STRTOD_L) +#if defined(WITH_C_LOCALE) && defined(HAVE_STRTOD_L) char *r; # ifdef WIN32 - *p = _strtod_l(s, &r, soap->c_locale); + *p = _strtod_l(s, &r, SOAP_LOCALE(soap)); # else - *p = strtod_l(s, &r, soap->c_locale); + *p = strtod_l(s, &r, SOAP_LOCALE(soap)); # endif if (*r) + soap->error = SOAP_TYPE; #elif defined(HAVE_STRTOD) char *r; *p = strtod(s, &r); if (*r) -#endif - { -#if defined(HAVE_SSCANF_L) && !defined(HAVE_STRTOF_L) && !defined(HAVE_STRTOD_L) - if (sscanf_l(s, soap->c_locale, "%lf", p) != 1) - soap->error = SOAP_TYPE; + soap->error = SOAP_TYPE; +#elif defined(WITH_C_LOCALE) && defined(HAVE_SSCANF_L) && !defined(HAVE_STRTOF_L) && !defined(HAVE_STRTOD_L) + if (sscanf_l(s, SOAP_LOCALE(soap), "%lf", p) != 1) + soap->error = SOAP_TYPE; #elif defined(HAVE_SSCANF) - if (sscanf(s, "%lf", p) != 1) - soap->error = SOAP_TYPE; -#else + if (sscanf(s, "%lf", p) != 1) soap->error = SOAP_TYPE; +#else + soap->error = SOAP_TYPE; #endif - } } } return soap->error; @@ -12598,6 +13985,7 @@ soap_s2double(struct soap *soap, const char *s, double *p) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 double * @@ -12608,10 +13996,12 @@ soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, i #ifndef WITH_LEAN if (*soap->type != '\0' && soap_isnumeric(soap, type)) return NULL; +#else + (void)type; #endif - p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL); + p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), NULL, NULL, NULL, NULL); if (*soap->href) - p = (double*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(double), 0, NULL); + p = (double*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(double), 0, NULL, NULL); else if (p) { if (soap_s2double(soap, soap_value(soap), p)) return NULL; @@ -12623,6 +14013,7 @@ soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, i #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* @@ -12633,6 +14024,7 @@ soap_unsignedByte2s(struct soap *soap, unsigned char n) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12646,16 +14038,17 @@ soap_outunsignedByte(struct soap *soap, const char *tag, int id, const unsigned #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p) { if (s) - { unsigned long n; + { long n; char *r; - n = soap_strtoul(s, &r, 10); - if (s == r || *r || n > 255) + n = soap_strtol(s, &r, 10); + if (s == r || *r || n < 0 || n > 255) soap->error = SOAP_TYPE; *p = (unsigned char)n; } @@ -12664,6 +14057,7 @@ soap_s2unsignedByte(struct soap *soap, const char *s, unsigned char *p) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 unsigned char * @@ -12679,10 +14073,12 @@ soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const soap_revert(soap); return NULL; } +#else + (void)type; #endif - p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL); + p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), NULL, NULL, NULL, NULL); if (*soap->href) - p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned char), 0, NULL); + p = (unsigned char*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(unsigned char), 0, NULL, NULL); else if (p) { if (soap_s2unsignedByte(soap, soap_value(soap), p)) return NULL; @@ -12694,6 +14090,7 @@ soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* @@ -12704,6 +14101,7 @@ soap_unsignedShort2s(struct soap *soap, unsigned short n) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12717,16 +14115,17 @@ soap_outunsignedShort(struct soap *soap, const char *tag, int id, const unsigned #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p) { if (s) - { unsigned long n; + { long n; char *r; - n = soap_strtoul(s, &r, 10); - if (s == r || *r || n > 65535) + n = soap_strtol(s, &r, 10); + if (s == r || *r || n < 0 || n > 65535) soap->error = SOAP_TYPE; *p = (unsigned short)n; } @@ -12735,6 +14134,7 @@ soap_s2unsignedShort(struct soap *soap, const char *s, unsigned short *p) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 unsigned short * @@ -12751,10 +14151,12 @@ soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, cons soap_revert(soap); return NULL; } +#else + (void)type; #endif - p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL); + p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), NULL, NULL, NULL, NULL); if (*soap->href) - p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned short), 0, NULL); + p = (unsigned short*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(unsigned short), 0, NULL, NULL); else if (p) { if (soap_s2unsignedShort(soap, soap_value(soap), p)) return NULL; @@ -12766,6 +14168,7 @@ soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, cons #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* @@ -12776,6 +14179,7 @@ soap_unsignedInt2s(struct soap *soap, unsigned int n) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12789,6 +14193,7 @@ soap_outunsignedInt(struct soap *soap, const char *tag, int id, const unsigned i #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12802,7 +14207,7 @@ soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p) #endif #endif *p = (unsigned int)soap_strtoul(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r + if (s == r || *r #ifndef WITH_NOIO #ifndef WITH_LEAN || soap_errno == SOAP_ERANGE @@ -12810,12 +14215,17 @@ soap_s2unsignedInt(struct soap *soap, const char *s, unsigned int *p) #endif ) soap->error = SOAP_TYPE; +#ifdef HAVE_STRTOUL + if (*p > 0 && strchr(s, '-')) + return soap->error = SOAP_TYPE; +#endif } return soap->error; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 unsigned int * @@ -12833,10 +14243,12 @@ soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const ch soap_revert(soap); return NULL; } +#else + (void)type; #endif - p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL); + p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), NULL, NULL, NULL, NULL); if (*soap->href) - p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned int), 0, NULL); + p = (unsigned int*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(unsigned int), 0, NULL, NULL); else if (p) { if (soap_s2unsignedInt(soap, soap_value(soap), p)) return NULL; @@ -12848,22 +14260,19 @@ soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const ch #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap *soap, unsigned long n) -{ -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "%lu", n); -#else - sprintf(soap->tmpbuf, "%lu", n); -#endif +{ (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), 20), "%lu", n); return soap->tmpbuf; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12877,6 +14286,7 @@ soap_outunsignedLong(struct soap *soap, const char *tag, int id, const unsigned #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -12890,7 +14300,7 @@ soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p) #endif #endif *p = soap_strtoul(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r + if (s == r || *r #ifndef WITH_NOIO #ifndef WITH_LEAN || soap_errno == SOAP_ERANGE @@ -12898,12 +14308,17 @@ soap_s2unsignedLong(struct soap *soap, const char *s, unsigned long *p) #endif ) soap->error = SOAP_TYPE; +#ifdef HAVE_STRTOUL + if (*p > 0 && strchr(s, '-')) + return soap->error = SOAP_TYPE; +#endif } return soap->error; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 unsigned long * @@ -12921,10 +14336,12 @@ soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const soap_revert(soap); return NULL; } +#else + (void)type; #endif - p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL); + p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), NULL, NULL, NULL, NULL); if (*soap->href) - p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(unsigned long), 0, NULL); + p = (unsigned long*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(unsigned long), 0, NULL, NULL); else if (p) { if (soap_s2unsignedLong(soap, soap_value(soap), p)) return NULL; @@ -12936,23 +14353,20 @@ soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const #endif /******************************************************************************/ -#ifndef WITH_LEAN + +#ifndef PALM_2 SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap *soap, ULONG64 n) -{ -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), SOAP_ULONG_FORMAT, n); -#else - sprintf(soap->tmpbuf, SOAP_ULONG_FORMAT, n); -#endif +{ (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), 20), SOAP_ULONG_FORMAT, n); return soap->tmpbuf; } #endif /******************************************************************************/ -#ifndef WITH_LEAN + +#ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 @@ -12965,41 +14379,38 @@ soap_outULONG64(struct soap *soap, const char *tag, int id, const ULONG64 *p, co #endif /******************************************************************************/ -#ifndef WITH_LEAN + +#ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap *soap, const char *s, ULONG64 *p) { if (s) - { -#ifdef HAVE_STRTOULL - char *r; + { char *r; #ifndef WITH_NOIO #ifndef WITH_LEAN soap_reset_errno; #endif #endif *p = soap_strtoull(s, &r, 10); - if ((s == r && (soap->mode & SOAP_XML_STRICT)) || *r + if (s == r || *r #ifndef WITH_NOIO #ifndef WITH_LEAN || soap_errno == SOAP_ERANGE #endif #endif ) -#else -#ifdef HAVE_SSCANF - if (sscanf(s, SOAP_ULONG_FORMAT, p) != 1) -#endif -#endif soap->error = SOAP_TYPE; + if (*p > 0 && strchr(s, '-')) + return soap->error = SOAP_TYPE; } return soap->error; } #endif /******************************************************************************/ -#ifndef WITH_LEAN + +#ifndef PALM_2 SOAP_FMAC1 ULONG64 * SOAP_FMAC2 @@ -13018,9 +14429,9 @@ soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, soap_revert(soap); return NULL; } - p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL); + p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), NULL, NULL, NULL, NULL); if (*soap->href) - p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(ULONG64), 0, NULL); + p = (ULONG64*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(ULONG64), 0, NULL, NULL); else if (p) { if (soap_s2ULONG64(soap, soap_value(soap), p)) return NULL; @@ -13032,47 +14443,148 @@ soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 -soap_s2string(struct soap *soap, const char *s, char **t, long minlen, long maxlen) +soap_s2char(struct soap *soap, const char *s, char **t, long minlen, long maxlen, const char *pattern) { if (s) - { long l = (long)strlen(s); - if ((maxlen >= 0 && l > maxlen) || l < minlen) - return soap->error = SOAP_LENGTH; - if (!(*t = soap_strdup(soap, s))) + { const char *r = soap_string(soap, s, minlen, maxlen, pattern); + if (r && (*t = soap_strdup(soap, r)) == NULL) return soap->error = SOAP_EOM; - if (!(soap->mode & (SOAP_ENC_LATIN | SOAP_C_UTFSTRING))) - { char *r = *t; - /* remove non-ASCII chars */ - for (s = *t; *s; s++) - if (!(*s & 0x80)) - *r++ = *s; - *r = '\0'; + } + return soap->error; +} +#endif + +/******************************************************************************/ + +#ifndef WITH_COMPAT +#ifdef __cplusplus +#ifndef PALM_2 +SOAP_FMAC1 +int +SOAP_FMAC2 +soap_s2stdchar(struct soap *soap, const char *s, std::string *t, long minlen, long maxlen, const char *pattern) +{ if (s) + { const char *r = soap_string(soap, s, minlen, maxlen, pattern); + if (r) + t->assign(r); + } + return soap->error; +} +#endif +#endif +#endif + +/******************************************************************************/ + +#ifndef PALM_2 +static const char* +soap_string(struct soap *soap, const char *s, long minlen, long maxlen, const char *pattern) +{ if (s) + { if (maxlen < 0 && soap->maxlength > 0) + maxlen = soap->maxlength; + if (minlen > 0 || maxlen >= 0) + { long l; + if ((soap->mode & SOAP_C_UTFSTRING)) + l = (long)soap_utf8len(s); + else + l = (long)strlen(s); + if ((maxlen >= 0 && l > maxlen) || l < minlen) + { soap->error = SOAP_LENGTH; + return NULL; + } } +#ifndef WITH_LEANER + if (pattern && soap->fsvalidate) + { soap->error = soap->fsvalidate(soap, pattern, s); + if (soap->error) + return NULL; + } +#else + (void)pattern; +#endif + } + return s; +} +#endif + +/******************************************************************************/ + +#ifndef PALM_2 +SOAP_FMAC1 +int +SOAP_FMAC2 +soap_s2QName(struct soap *soap, const char *s, char **t, long minlen, long maxlen, const char *pattern) +{ if (s) + { const char *r = soap_QName(soap, s, minlen, maxlen, pattern); + if (r && (*t = soap_strdup(soap, r)) == NULL) + return soap->error = SOAP_EOM; } return soap->error; } #endif /******************************************************************************/ + +#ifndef WITH_COMPAT +#ifdef __cplusplus #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 -soap_s2QName(struct soap *soap, const char *s, char **t, long minlen, long maxlen) +soap_s2stdQName(struct soap *soap, const char *s, std::string *t, long minlen, long maxlen, const char *pattern) { if (s) - { long l = (long)strlen(s); - if ((maxlen >= 0 && l > maxlen) || l < minlen) - return soap->error = SOAP_LENGTH; + { const char *r = soap_QName(soap, s, minlen, maxlen, pattern); + if (r) + t->assign(r); + } + return soap->error; +} +#endif +#endif +#endif + +/******************************************************************************/ + +#ifndef PALM_2 +static const char* +soap_QName(struct soap *soap, const char *s, long minlen, long maxlen, const char *pattern) +{ if (s) + { char *b; + if (maxlen < 0 && soap->maxlength > 0) + maxlen = soap->maxlength; + if (minlen > 0 || maxlen >= 0) + { long l; + if ((soap->mode & SOAP_C_UTFSTRING)) + l = (long)soap_utf8len(s); + else + l = (long)strlen(s); + if ((maxlen >= 0 && l > maxlen) || l < minlen) + { soap->error = SOAP_LENGTH; + return NULL; + } + } +#ifdef WITH_FAST soap->labidx = 0; +#else + if (soap_new_block(soap) == NULL) + return NULL; +#endif DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Normalized namespace(s) of QNames '%s'", s)); /* convert (by prefix normalize prefix) all QNames in s */ for (;;) { size_t n; struct soap_nlist *np; - register const char *p; + const char *p = NULL; + short flag = 0; + const char *r = NULL; + size_t m = 0; +#ifndef WITH_FAST + size_t k = 0; +#endif /* skip blanks */ while (*s && soap_blank((soap_wchar)*s)) s++; @@ -13085,7 +14597,8 @@ soap_s2QName(struct soap *soap, const char *s, char **t, long minlen, long maxle np = soap->nlist; /* if there is no namespace stack, or prefix is "#" or "xml" then copy string */ if (!np || *s == '#' || !strncmp(s, "xml:", 4)) - { soap_append_lab(soap, s, n); + { r = s; + m = n; } else /* we normalize the QName by replacing its prefix */ { const char *q; @@ -13105,49 +14618,110 @@ soap_s2QName(struct soap *soap, const char *s, char **t, long minlen, long maxle } /* replace prefix */ if (np) - { if (np->index >= 0 && soap->local_namespaces && (q = soap->local_namespaces[np->index].id)) + { if (np->index >= 0 && soap->local_namespaces && (q = soap->local_namespaces[np->index].id) != NULL) { size_t k = strlen(q); if (q[k-1] != '_') - soap_append_lab(soap, q, k); + { r = q; + m = k; + } else - { soap_append_lab(soap, "\"", 1); - soap_append_lab(soap, soap->local_namespaces[np->index].ns, strlen(soap->local_namespaces[np->index].ns)); - soap_append_lab(soap, "\"", 1); + { flag = 1; + r = soap->local_namespaces[np->index].ns; + m = strlen(r); } } else if (np->ns) - { soap_append_lab(soap, "\"", 1); - soap_append_lab(soap, np->ns, strlen(np->ns)); - soap_append_lab(soap, "\"", 1); + { flag = 1; + r = np->ns; + m = strlen(r); } else { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "\nNamespace prefix of '%s' not defined (index=%d, URI='%s')\n", s, np->index, np->ns ? np->ns : SOAP_STR_EOS)); - return soap->error = SOAP_NAMESPACE; + soap->error = SOAP_NAMESPACE; + return NULL; } } else if (s[n]) /* no namespace, part of string */ - { soap_append_lab(soap, s, n); + { r = s; + m = n; } else /* no namespace: assume "" namespace */ - { soap_append_lab(soap, "\"\"", 2); + { flag = 1; + } + } +#ifdef WITH_FAST + if ((flag && soap_append_lab(soap, "\"", 1)) + || (m && soap_append_lab(soap, r, m)) + || (flag && soap_append_lab(soap, "\"", 1)) + || (p && (soap_append_lab(soap, ":", 1) || soap_append_lab(soap, p, n - (p-s))))) + return NULL; +#else + k = 2*flag + m + (p ? n - (p-s) + 1 : 0) + (s[n] != '\0'); + b = (char*)soap_push_block(soap, NULL, k); + if (!b) + return NULL; + if (flag) + *b++ = '"'; + if (m) + { if (soap_memcpy((void*)b, k, (const void*)r, m)) + { soap->error = SOAP_EOM; + return NULL; + } + b += m; + } + if (flag) + *b++ = '"'; + if (p) + { *b++ = ':'; + if (soap_memcpy((void*)b, k - m - flag - 1, (const void*)p, n - (p-s))) + { soap->error = SOAP_EOM; + return NULL; } - soap_append_lab(soap, ":", 1); - soap_append_lab(soap, p, n - (p-s)); + b += n - (p-s); } +#endif /* advance to next and add spacing */ s += n; + while (*s && soap_blank(*s)) + s++; if (*s) - soap_append_lab(soap, " ", 1); + { +#ifdef WITH_FAST + if (soap_append_lab(soap, " ", 1)) + return NULL; +#else + *b = ' '; +#endif + } } - soap_append_lab(soap, SOAP_STR_EOS, 1); - *t = soap_strdup(soap, soap->labbuf); - DBGLOG(TEST, SOAP_MESSAGE(fdebug, " into '%s'\n", *t)); +#ifdef WITH_FAST + if (soap_append_lab(soap, SOAP_STR_EOS, 1)) + return NULL; + b = soap->labbuf; +#else + b = (char*)soap_push_block(soap, NULL, 1); + if (!b) + return NULL; + *b = '\0'; + b = (char*)soap_save_block(soap, NULL, NULL, 0); +#endif +#ifndef WITH_LEANER + if (pattern && soap->fsvalidate) + { soap->error = soap->fsvalidate(soap, pattern, b); + if (soap->error) + return NULL; + } +#else + (void)pattern; +#endif + return b; } - return soap->error; + return NULL; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char* @@ -13155,16 +14729,39 @@ SOAP_FMAC2 soap_QName2s(struct soap *soap, const char *s) { const char *t = NULL; if (s) - { soap->labidx = 0; + { +#ifdef WITH_FAST + soap->labidx = 0; +#else + char *b = NULL; + if (soap_new_block(soap) == NULL) + return NULL; +#endif for (;;) { size_t n; + const char *q = NULL; + const char *r = NULL; + size_t m = 0; +#ifndef WITH_FAST + size_t k = 0; +#endif /* skip blanks */ while (*s && soap_blank((soap_wchar)*s)) s++; if (!*s) + { +#ifdef WITH_FAST + soap->labbuf[soap->labidx > 0 ? soap->labidx - 1 : 0] = '\0'; +#else + if (!b) + return soap_strdup(soap, SOAP_STR_EOS); + --b; + *b = '\0'; +#endif break; + } /* find next QName */ - n = 1; + n = 0; while (s[n] && !soap_blank((soap_wchar)s[n])) n++; /* normal prefix: pass string as is */ @@ -13174,18 +14771,18 @@ soap_QName2s(struct soap *soap, const char *s) if ((soap->mode & SOAP_XML_CANONICAL)) soap_utilize_ns(soap, s); if ((soap->mode & SOAP_XML_DEFAULTNS)) - { const char *r = strchr(s, ':'); - if (r && soap->nlist && !strncmp(soap->nlist->id, s, r-s) && !soap->nlist->id[r-s]) - { n -= r-s + 1; + { r = strchr(s, ':'); + if (r && soap->nlist && !strncmp(soap->nlist->id, s, r - s) && !soap->nlist->id[r - s]) + { n -= r - s + 1; s = r + 1; } } #endif - soap_append_lab(soap, s, n); + r = s; + m = n + 1; } else /* URL-based string prefix */ - { const char *q; - s++; + { s++; q = strchr(s, '"'); if (q) { struct Namespace *p = soap->local_namespaces; @@ -13199,108 +14796,187 @@ soap_QName2s(struct soap *soap, const char *s) break; } } + q++; /* URL is in the namespace table? */ if (p && p->id) - { const char *r = p->id; + { r = p->id; #ifndef WITH_LEAN if ((soap->mode & SOAP_XML_DEFAULTNS) && soap->nlist && !strcmp(soap->nlist->id, r)) q++; else #endif - soap_append_lab(soap, r, strlen(r)); + m = strlen(r); } else /* not in namespace table: create xmlns binding */ - { char *r = soap_strdup(soap, s); - r[q-s] = '\0'; -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "xmlns:_%d", soap->idnum++); -#else - sprintf(soap->tmpbuf, "xmlns:_%d", soap->idnum++); -#endif - soap_set_attr(soap, soap->tmpbuf, r, 1); - soap_append_lab(soap, soap->tmpbuf + 6, strlen(soap->tmpbuf + 6)); + { char *x = soap_strdup(soap, s); + x[q - s - 1] = '\0'; + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), 27), "xmlns:_%d", soap->idnum++); + soap_set_attr(soap, soap->tmpbuf, x, 1); + r = soap->tmpbuf + 6; + m = strlen(r); } - soap_append_lab(soap, q + 1, n - (q-s) - 1); } } - /* advance to next and add spacing */ + /* copy normalized QName into buffer, including the ending blank or NUL */ +#ifdef WITH_FAST + if ((m && soap_append_lab(soap, r, m)) + || (q && soap_append_lab(soap, q, n - (q - s)))) + return NULL; +#else + k = m + (q ? n - (q - s) : 0); + b = (char*)soap_push_block(soap, NULL, k); + if (!b) + { soap->error = SOAP_EOM; + return NULL; + } + if (soap_memcpy((void*)b, k, (const void*)r, m)) + { soap->error = SOAP_EOM; + return NULL; + } + b += m; + if (q) + { if (soap_memcpy((void*)b, k - m, (const void*)q, n - (q - s))) + { soap->error = SOAP_EOM; + return NULL; + } + b += n - (q - s); + } +#endif + /* advance to next */ s += n; - if (*s) - soap_append_lab(soap, " ", 1); } - soap_append_lab(soap, SOAP_STR_EOS, 1); +#ifdef WITH_FAST t = soap_strdup(soap, soap->labbuf); +#else + t = (char*)soap_save_block(soap, NULL, NULL, 0); +#endif } return t; } #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 int SOAP_FMAC2 -soap_s2wchar(struct soap *soap, const char *s, wchar_t **t, long minlen, long maxlen) +soap_s2wchar(struct soap *soap, const char *s, wchar_t **t, long minlen, long maxlen, const char *pattern) { if (s) - { long l; - wchar_t *r; - *t = r = (wchar_t*)soap_malloc(soap, sizeof(wchar_t) * (strlen(s) + 1)); - if (!r) + { const wchar_t *r = soap_wstring(soap, s, minlen, maxlen, pattern); + if (r && (*t = soap_wstrdup(soap, r)) == NULL) return soap->error = SOAP_EOM; + } + return soap->error; +} +#endif + +/******************************************************************************/ + +#ifndef WITH_COMPAT +#ifdef __cplusplus +#ifndef WITH_LEAN +SOAP_FMAC1 +int +SOAP_FMAC2 +soap_s2stdwchar(struct soap *soap, const char *s, std::wstring *t, long minlen, long maxlen, const char *pattern) +{ if (s) + { const wchar_t *r = soap_wstring(soap, s, minlen, maxlen, pattern); + if (r) + t->assign(r); + } + return soap->error; +} +#endif +#endif +#endif + +/******************************************************************************/ + +#ifndef WITH_LEAN +static const wchar_t* +soap_wstring(struct soap *soap, const char *s, long minlen, long maxlen, const char *pattern) +{ if (s) + { long l; + wchar_t wc; + if (maxlen < 0 && soap->maxlength > 0) + maxlen = soap->maxlength; + soap->labidx = 0; if (soap->mode & SOAP_ENC_LATIN) - { while (*s) + { wchar_t *r; + if (soap_append_lab(soap, NULL, sizeof(wchar_t) * (strlen(s) + 1))) + return NULL; + r = (wchar_t*)soap->labbuf; + while (*s) *r++ = (wchar_t)*s++; } else { /* Convert UTF8 to wchar */ while (*s) - { register soap_wchar c, c1, c2, c3, c4; + { soap_wchar c, c1, c2, c3, c4; c = (unsigned char)*s++; if (c < 0x80) - *r++ = (wchar_t)c; + wc = (wchar_t)c; else { c1 = (soap_wchar)*s++ & 0x3F; if (c < 0xE0) - *r++ = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1); + wc = (wchar_t)(((soap_wchar)(c & 0x1F) << 6) | c1); else { c2 = (soap_wchar)*s++ & 0x3F; if (c < 0xF0) - *r++ = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2); + wc = (wchar_t)(((soap_wchar)(c & 0x0F) << 12) | (c1 << 6) | c2); else { c3 = (soap_wchar)*s++ & 0x3F; if (c < 0xF8) - *r++ = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3); + wc = (wchar_t)(((soap_wchar)(c & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3); else { c4 = (soap_wchar)*s++ & 0x3F; if (c < 0xFC) - *r++ = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4); + wc = (wchar_t)(((soap_wchar)(c & 0x03) << 24) | (c1 << 18) | (c2 << 12) | (c3 << 6) | c4); else - *r++ = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F)); + wc = (wchar_t)(((soap_wchar)(c & 0x01) << 30) | (c1 << 24) | (c2 << 18) | (c3 << 12) | (c4 << 6) | (soap_wchar)(*s++ & 0x3F)); } } } } + if (soap_append_lab(soap, (const char*)&wc, sizeof(wc))) + return NULL; } } - *r = L'\0'; - l = (long)(r - *t); + l = (long)(soap->labidx / sizeof(wchar_t)); + wc = L'\0'; + if (soap_append_lab(soap, (const char*)&wc, sizeof(wc))) + return NULL; if ((maxlen >= 0 && l > maxlen) || l < minlen) - return soap->error = SOAP_LENGTH; + { soap->error = SOAP_LENGTH; + return NULL; + } +#ifndef WITH_LEANER + if (pattern && soap->fwvalidate) + { soap->error = soap->fwvalidate(soap, pattern, (wchar_t*)soap->labbuf); + if (soap->error) + return NULL; + } +#endif + return (wchar_t*)soap->labbuf; } - return soap->error; + return NULL; } #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap *soap, const wchar_t *s) -{ register soap_wchar c; - register char *r, *t; +{ soap_wchar c; + char *r, *t; const wchar_t *q = s; size_t n = 0; + if (!s) + return NULL; while ((c = *q++)) { if (c > 0 && c < 0x80) n++; @@ -13345,12 +15021,13 @@ soap_wchar2s(struct soap *soap, const wchar_t *s) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); +{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n, NULL); if (id < 0) return soap->error; if (!**p && (soap->mode & SOAP_C_NILSTRING)) @@ -13364,11 +15041,12 @@ soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 char ** SOAP_FMAC2 -soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen) +soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen, const char *pattern) { (void)type; if (soap_element_begin_in(soap, tag, 1, NULL)) { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG) @@ -13376,14 +15054,15 @@ soap_instring(struct soap *soap, const char *tag, char **p, const char *type, in soap->error = SOAP_OK; } if (!p) - { if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) + { p = (char**)soap_malloc(soap, sizeof(char*)); + if (!p) return NULL; } if (soap->null) *p = NULL; else if (soap->body) - { *p = soap_string_in(soap, flag, minlen, maxlen); - if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL)) + { *p = soap_string_in(soap, flag, minlen, maxlen, pattern); + if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), NULL, NULL, NULL, NULL)) return NULL; if (!**p && tag && *tag == '-') { soap->error = SOAP_NO_TAG; @@ -13394,14 +15073,15 @@ soap_instring(struct soap *soap, const char *tag, char **p, const char *type, in { soap->error = SOAP_NO_TAG; return NULL; } - else if (!*soap->href && minlen > 0) - { soap->error = SOAP_LENGTH; - return NULL; - } - else + else if (!*soap->href) + { if (minlen > 0) + { soap->error = SOAP_LENGTH; + return NULL; + } *p = soap_strdup(soap, SOAP_STR_EOS); + } if (*soap->href) - p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0); + p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; return p; @@ -13409,13 +15089,14 @@ soap_instring(struct soap *soap, const char *tag, char **p, const char *type, in #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n) -{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n); +{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n, NULL); if (id < 0) return soap->error; if (!**p && (soap->mode & SOAP_C_NILSTRING)) @@ -13430,12 +15111,13 @@ soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, co #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_2 SOAP_FMAC1 wchar_t ** SOAP_FMAC2 -soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen) +soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen, const char *pattern) { (void)type; if (soap_element_begin_in(soap, tag, 1, NULL)) { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG) @@ -13443,12 +15125,15 @@ soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type soap->error = SOAP_OK; } if (!p) - { if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) + { p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)); + if (!p) return NULL; } - if (soap->body) - { *p = soap_wstring_in(soap, 1, minlen, maxlen); - if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL)) + if (soap->null) + *p = NULL; + else if (soap->body) + { *p = soap_wstring_in(soap, 1, minlen, maxlen, pattern); + if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), NULL, NULL, NULL, NULL)) return NULL; if (!**p && tag && *tag == '-') { soap->error = SOAP_NO_TAG; @@ -13459,12 +15144,15 @@ soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type { soap->error = SOAP_NO_TAG; return NULL; } - else if (soap->null) - *p = NULL; - else - *p = soap_wstrdup(soap, (wchar_t*)SOAP_STR_EOS); + else if (!*soap->href) + { if (minlen > 0) + { soap->error = SOAP_LENGTH; + return NULL; + } + *p = soap_wstrdup(soap, L""); + } if (*soap->href) - p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0); + p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0, NULL); if (soap->body && soap_element_end_in(soap, tag)) return NULL; return p; @@ -13473,6 +15161,89 @@ soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type #endif /******************************************************************************/ + +#ifndef WITH_LEAN +#ifdef UNDER_CE +/* WinCE mktime (based on the mingw-runtime, public domain) */ +#define __FILETIME_to_ll(f) ((long long)(f).dwHighDateTime << 32 | (long long)(f).dwLowDateTime) +static time_t +mktime(struct tm *pt) +{ SYSTEMTIME s, s1, s2; + FILETIME f, f1, f2; + long long diff; + GetSystemTime(&s1); + GetLocalTime(&s2); + SystemTimeToFileTime(&s1, &f1); + SystemTimeToFileTime(&s2, &f2); + diff = (__FILETIME_to_ll(f2) - __FILETIME_to_ll(f1)) / 10000000LL; + s.wYear = pt->tm_year + 1900; + s.wMonth = pt->tm_mon + 1; + s.wDayOfWeek = pt->tm_wday; + s.wDay = pt->tm_mday; + s.wHour = pt->tm_hour; + s.wMinute = pt->tm_min; + s.wSecond = pt->tm_sec; + s.wMilliseconds = 0; + SystemTimeToFileTime(&s, &f); + return (time_t)((__FILETIME_to_ll(f) - 116444736000000000LL) / 10000000LL) - (time_t)diff; +} +#endif +#endif + +/******************************************************************************/ + +#ifndef WITH_LEAN +#ifdef UNDER_CE +/* WinCE gmtime_r (based on the mingw-runtime, public domain) */ +#define HAVE_GMTIME_R +static struct tm* +gmtime_r(const time_t *t, struct tm *pt) +{ FILETIME f, f1, f2; + SYSTEMTIME s, s1 = {0}; + long long time = (long long)(*t) * 10000000LL + 116444736000000000LL; + f.dwHighDateTime = (DWORD)((time >> 32) & 0x00000000FFFFFFFF); + f.dwLowDateTime = (DWORD)(time & 0x00000000FFFFFFFF); + FileTimeToSystemTime(&f, &s); + pt->tm_year = s.wYear - 1900; + pt->tm_mon = s.wMonth - 1; + pt->tm_wday = s.wDayOfWeek; + pt->tm_mday = s.wDay; + s1.wYear = s.wYear; + s1.wMonth = 1; + s1.wDayOfWeek = 1; + s1.wDay = 1; + SystemTimeToFileTime(&s1, &f1); + SystemTimeToFileTime(&s, &f2); + pt->tm_yday = (((__FILETIME_to_ll(f2) - __FILETIME_to_ll(f1)) / 10000000LL) / (60 * 60 * 24)); + pt->tm_hour = s.wHour; + pt->tm_min = s.wMinute; + pt->tm_sec = s.wSecond; + pt->tm_isdst = 0; + return pt; +} +#endif +#endif + +/******************************************************************************/ + +#ifndef WITH_LEAN +#ifdef UNDER_CE +/* WinCE very simple strftime for format "%Y-%m-%dT%H:%M:%SZ", note: %F and %T not supported by MS */ +static size_t +strftime(char *buf, size_t len, const char *format, const struct tm *pT) +{ (void)len; (void)format; +#ifndef WITH_NOZONE + (SOAP_SNPRINTF(buf, len, 20), "%04d-%02d-%02dT%02d:%02d:%02dZ", pT->tm_year + 1900, pT->tm_mon + 1, pT->tm_mday, pT->tm_hour, pT->tm_min, pT->tm_sec); +#else + (SOAP_SNPRINTF(buf, len, 20), "%04d-%02d-%02dT%02d:%02d:%02d", pT->tm_year + 1900, pT->tm_mon + 1, pT->tm_mday, pT->tm_hour, pT->tm_min, pT->tm_sec); +#endif + return len; +} +#endif +#endif + +/******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 time_t @@ -13484,13 +15255,20 @@ soap_timegm(struct tm *T) #else time_t t, g, z; struct tm tm; +#ifndef HAVE_GMTIME_R + struct tm *tp; +#endif t = mktime(T); if (t == (time_t)-1) return (time_t)-1; #ifdef HAVE_GMTIME_R - gmtime_r(&t, &tm); + if (gmtime_r(&t, &tm) == SOAP_FUNC_R_ERR) + return (time_t)-1; #else - tm = *gmtime(&t); + tp = gmtime(&t); + if (!tp) + return (time_t)-1; + tm = *tp; #endif tm.tm_isdst = 0; g = mktime(&tm); @@ -13503,106 +15281,108 @@ soap_timegm(struct tm *T) #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap *soap, time_t n) { struct tm T, *pT = &T; -#if defined(HAVE_GMTIME_R) - if (gmtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_GMTIME) - if ((pT = gmtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); -#elif defined(HAVE_TM_GMTOFF) || defined(HAVE_STRUCT_TM_TM_GMTOFF) || defined(HAVE_STRUCT_TM___TM_GMTOFF) + size_t l = 0; +#if defined(HAVE_GMTIME_R) && !defined(WITH_NOZONE) + if (gmtime_r(&n, pT) != SOAP_FUNC_R_ERR) + l = strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); +#elif defined(HAVE_GMTIME) && !defined(WITH_NOZONE) + pT = gmtime(&n); + if (pT) + l = strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%SZ", pT); +#elif (defined(HAVE_TM_GMTOFF) || defined(HAVE_STRUCT_TM_TM_GMTOFF) || defined(HAVE_STRUCT_TM___TM_GMTOFF)) && !defined(WITH_NOZONE) #if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S%z", pT); - memmove(soap->tmpbuf + 23, soap->tmpbuf + 22, 3); /* 2000-03-01T02:00:00+0300 */ - soap->tmpbuf[22] = ':'; /* 2000-03-01T02:00:00+03:00 */ + if (localtime_r(&n, pT) != SOAP_FUNC_R_ERR) + { l = strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S%z", pT); + if (l) + { soap_memmove(soap->tmpbuf + 23, sizeof(soap->tmpbuf) - 23, soap->tmpbuf + 22, 3); /* 2000-03-01T02:00:00+0300 */ + soap->tmpbuf[22] = ':'; /* 2000-03-01T02:00:00+03:00 */ + } } #else - if ((pT = localtime(&n))) - { strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S%z", pT); - memmove(soap->tmpbuf + 23, soap->tmpbuf + 22, 3); /* 2000-03-01T02:00:00+0300 */ - soap->tmpbuf[22] = ':'; /* 2000-03-01T02:00:00+03:00 */ + pT = localtime(&n); + if (pT) + { l = strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S%z", pT); + if (l) + { soap_memmove(soap->tmpbuf + 23, sizeof(soap->tmpbuf) - 23, soap->tmpbuf + 22, 3); /* 2000-03-01T02:00:00+0300 */ + soap->tmpbuf[22] = ':'; /* 2000-03-01T02:00:00+03:00 */ + } } #endif -#elif defined(HAVE_GETTIMEOFDAY) - struct timezone tz; - memset((void*)&tz, 0, sizeof(tz)); +#elif defined(HAVE_GETTIMEOFDAY) && !defined(WITH_NOZONE) #if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) + if (localtime_r(&n, pT) != SOAP_FUNC_R_ERR) { struct timeval tv; + struct timezone tz; + memset((void*)&tz, 0, sizeof(tz)); gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf + strlen(soap->tmpbuf), sizeof(soap->tmpbuf) - strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); -#else - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); -#endif + l = strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); + if (l) + (SOAP_SNPRINTF(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l, 7), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); } #else - if ((pT = localtime(&n))) + pT = localtime(&n); + if (pT) { struct timeval tv; + struct timezone tz; + memset((void*)&tz, 0, sizeof(tz)); gettimeofday(&tv, &tz); - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf + strlen(soap->tmpbuf), sizeof(soap->tmpbuf) - strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); -#else - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); -#endif + l = strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); + if (l) + (SOAP_SNPRINTF(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l, 7), "%+03d:%02d", -tz.tz_minuteswest/60+(pT->tm_isdst!=0), abs(tz.tz_minuteswest)%60); } #endif -#elif defined(HAVE_FTIME) - struct timeb t; - memset((void*)&t, 0, sizeof(t)); +#elif defined(HAVE_FTIME) && !defined(WITH_NOZONE) #if defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - { + if (localtime_r(&n, pT) != SOAP_FUNC_R_ERR) + { struct timeb t; + memset((void*)&t, 0, sizeof(t)); #ifdef __BORLANDC__ ::ftime(&t); #else ftime(&t); #endif - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf + strlen(soap->tmpbuf), sizeof(soap->tmpbuf) - strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); -#else - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); -#endif + l = strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); + if (l) + (SOAP_SNPRINTF(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l, 7), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); } #else - if ((pT = localtime(&n))) - { + pT = localtime(&n); + if (pT) + { struct timeb t; + memset((void*)&t, 0, sizeof(t)); #ifdef __BORLANDC__ ::ftime(&t); #else ftime(&t); #endif - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf + strlen(soap->tmpbuf), sizeof(soap->tmpbuf) - strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); -#else - sprintf(soap->tmpbuf + strlen(soap->tmpbuf), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); -#endif + l = strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); + if (l) + (SOAP_SNPRINTF(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l, 7), "%+03d:%02d", -t.timezone/60+(pT->tm_isdst!=0), abs(t.timezone)%60); } #endif #elif defined(HAVE_LOCALTIME_R) - if (localtime_r(&n, pT)) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); + if (localtime_r(&n, pT) != SOAP_FUNC_R_ERR) + l = strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); #else - if ((pT = localtime(&n))) - strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); + pT = localtime(&n); + if (pT) + l = strftime(soap->tmpbuf, sizeof(soap->tmpbuf), "%Y-%m-%dT%H:%M:%S", pT); #endif - else - strcpy(soap->tmpbuf, "1969-12-31T23:59:59Z"); + if (!l) + soap_strcpy(soap->tmpbuf, sizeof(soap->tmpbuf), "1969-12-31T23:59:59Z"); return soap->tmpbuf; } #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 int @@ -13616,53 +15396,87 @@ soap_outdateTime(struct soap *soap, const char *tag, int id, const time_t *p, co #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap *soap, const char *s, time_t *p) -{ if (s) - { char zone[32]; +{ *p = 0; + if (s) + { char *t; + unsigned long d; struct tm T; - const char *t; - *zone = '\0'; memset((void*)&T, 0, sizeof(T)); - if (strchr(s, '-')) - t = "%d-%d-%dT%d:%d:%d%31s"; - else if (strchr(s, ':')) - t = "%4d%2d%2dT%d:%d:%d%31s"; - else /* parse non-XSD-standard alternative ISO 8601 format */ - t = "%4d%2d%2dT%2d%2d%2d%31s"; - if (sscanf(s, t, &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, zone) < 6) + d = soap_strtoul(s, &t, 10); + if (*t == '-') + { /* YYYY-MM-DD */ + T.tm_year = (int)d; + T.tm_mon = (int)soap_strtoul(t + 1, &t, 10); + T.tm_mday = (int)soap_strtoul(t + 1, &t, 10); + } + else if (!(soap->mode & SOAP_XML_STRICT)) + { /* YYYYMMDD */ + T.tm_year = (int)(d / 10000); + T.tm_mon = (int)(d / 100 % 100); + T.tm_mday = (int)(d % 100); + } + else return soap->error = SOAP_TYPE; + if (*t == 'T' || ((*t == 't' || *t == ' ') && !(soap->mode & SOAP_XML_STRICT))) + { d = soap_strtoul(t + 1, &t, 10); + if (*t == ':') + { /* Thh:mm:ss */ + T.tm_hour = (int)d; + T.tm_min = (int)soap_strtoul(t + 1, &t, 10); + T.tm_sec = (int)soap_strtoul(t + 1, &t, 10); + } + else if (!(soap->mode & SOAP_XML_STRICT)) + { /* Thhmmss */ + T.tm_hour = (int)(d / 10000); + T.tm_min = (int)(d / 100 % 100); + T.tm_sec = (int)(d % 100); + } + else + return soap->error = SOAP_TYPE; + } if (T.tm_year == 1) T.tm_year = 70; else T.tm_year -= 1900; T.tm_mon--; - if (*zone == '.') - { for (s = zone + 1; *s; s++) - if (*s < '0' || *s > '9') + if (*t == '.') + { for (t++; *t; t++) + if (*t < '0' || *t > '9') break; } - else - s = zone; - if (*s) + if (*t == ' ' && !(soap->mode & SOAP_XML_STRICT)) + t++; + if (*t) { #ifndef WITH_NOZONE - if (*s == '+' || *s == '-') - { int h = 0, m = 0; - if (s[3] == ':') + if (*t == '+' || *t == '-') + { int h, m; + m = (int)soap_strtol(t, &t, 10); + if (*t == ':') { /* +hh:mm */ - sscanf(s, "%d:%d", &h, &m); + h = m; + m = (int)soap_strtol(t + 1, &t, 10); if (h < 0) m = -m; } - else /* +hhmm */ - { m = (int)soap_strtol(s, NULL, 10); + else if (!(soap->mode & SOAP_XML_STRICT)) + { /* +hhmm */ h = m / 100; m = m % 100; } + else + { /* +hh */ + h = m; + m = 0; + } + if (*t) + return soap->error = SOAP_TYPE; T.tm_min -= m; T.tm_hour -= h; /* put hour and min in range */ @@ -13680,6 +15494,8 @@ soap_s2dateTime(struct soap *soap, const char *s, time_t *p) } /* note: day of the month may be out of range, timegm() handles it */ } + else if (*t != 'Z') + return soap->error = SOAP_TYPE; #endif *p = soap_timegm(&T); } @@ -13693,6 +15509,7 @@ soap_s2dateTime(struct soap *soap, const char *s, time_t *p) #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 time_t * @@ -13707,9 +15524,9 @@ soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, soap_revert(soap); return NULL; } - p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL); + p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), NULL, NULL, NULL, NULL); if (*soap->href) - p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, 0, sizeof(time_t), 0, NULL); + p = (time_t*)soap_id_forward(soap, soap->href, p, 0, t, t, sizeof(time_t), 0, NULL, NULL); else if (p) { if (soap_s2dateTime(soap, soap_value(soap), p)) return NULL; @@ -13721,62 +15538,46 @@ soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char *type, #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap *soap, const char *tag, char *const*p, const char *type) -{ int i; - const char *t = NULL; - if (tag && *tag != '-') - { if (soap->local_namespaces && (t = strchr(tag, ':'))) - { size_t n = t - tag; - if (n >= sizeof(soap->tmpbuf)) - n = sizeof(soap->tmpbuf) - 1; - strncpy(soap->tmpbuf, tag, n); - soap->tmpbuf[n] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - if (soap_element(soap, t, 0, type) - || soap_attribute(soap, "xmlns", soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS) - || soap_element_start_end_out(soap, NULL)) - return soap->error; - } - else - { t = tag; - if (soap_element_begin_out(soap, t, 0, type)) - return soap->error; - } - } +{ if (tag && *tag != '-') + if (soap_element_begin_out(soap, tag, 0, type)) + return soap->error; if (p && *p) - { if (soap_send(soap, *p)) /* send as-is */ + if (soap_send(soap, *p)) /* send as-is */ return soap->error; - } - if (t) - return soap_element_end_out(soap, t); + if (tag && *tag != '-') + return soap_element_end_out(soap, tag); return SOAP_OK; } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 char ** SOAP_FMAC2 soap_inliteral(struct soap *soap, const char *tag, char **p) { if (soap_element_begin_in(soap, tag, 1, NULL)) - { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT) + { if (soap->error != SOAP_NO_TAG || soap_peek(soap) == SOAP_TT) return NULL; soap->error = SOAP_OK; } if (!p) - { if (!(p = (char**)soap_malloc(soap, sizeof(char*)))) + { p = (char**)soap_malloc(soap, sizeof(char*)); + if (!p) return NULL; } if (soap->body || (tag && *tag == '-')) - { *p = soap_string_in(soap, 0, -1, -1); + { if (tag && *tag != '-') + *p = soap_string_in(soap, -1, -1, -1, NULL); + else + *p = soap_string_in(soap, 0, -1, -1, NULL); if (!*p) return NULL; if (!**p && tag && *tag == '-') @@ -13795,36 +15596,16 @@ soap_inliteral(struct soap *soap, const char *tag, char **p) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p, const char *type) -{ int i; - const char *t = NULL; - if (tag && *tag != '-') - { if (soap->local_namespaces && (t = strchr(tag, ':'))) - { size_t n = t - tag; - if (n >= sizeof(soap->tmpbuf)) - n = sizeof(soap->tmpbuf) - 1; - strncpy(soap->tmpbuf, tag, n); - soap->tmpbuf[n] = '\0'; - for (i = 0; soap->local_namespaces[i].id; i++) - if (!strcmp(soap->tmpbuf, soap->local_namespaces[i].id)) - break; - t++; - if (soap_element(soap, t, 0, type) - || soap_attribute(soap, "xmlns", soap->local_namespaces[i].ns ? soap->local_namespaces[i].ns : SOAP_STR_EOS) - || soap_element_start_end_out(soap, NULL)) - return soap->error; - } - else - { t = tag; - if (soap_element_begin_out(soap, t, 0, type)) - return soap->error; - } - } +{ if (tag && *tag != '-') + if (soap_element_begin_out(soap, tag, 0, type)) + return soap->error; if (p) { wchar_t c; const wchar_t *s = *p; @@ -13833,14 +15614,15 @@ soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p, const cha return soap->error; } } - if (t) - return soap_element_end_out(soap, t); + if (tag && *tag != '-') + return soap_element_end_out(soap, tag); return SOAP_OK; } #endif #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_2 SOAP_FMAC1 @@ -13848,16 +15630,20 @@ wchar_t ** SOAP_FMAC2 soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p) { if (soap_element_begin_in(soap, tag, 1, NULL)) - { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT) + { if (soap->error != SOAP_NO_TAG || soap_peek(soap) == SOAP_TT) return NULL; soap->error = SOAP_OK; } if (!p) - { if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)))) + { p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*)); + if (!p) return NULL; } if (soap->body) - { *p = soap_wstring_in(soap, 0, -1, -1); + { if (tag && *tag != '-') + *p = soap_wstring_in(soap, -1, -1, -1, NULL); + else + *p = soap_wstring_in(soap, 0, -1, -1, NULL); if (!*p) return NULL; if (!**p && tag && *tag == '-') @@ -13872,7 +15658,7 @@ soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p) else if (soap->null) *p = NULL; else - *p = soap_wstrdup(soap, (wchar_t*)SOAP_STR_EOS); + *p = soap_wstrdup(soap, L""); if (soap->body && soap_element_end_in(soap, tag)) return NULL; return p; @@ -13881,14 +15667,15 @@ soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 const char * SOAP_FMAC2 soap_value(struct soap *soap) -{ register size_t i; - register soap_wchar c = 0; - register char *s = soap->tmpbuf; +{ size_t i; + soap_wchar c = 0; + char *s = soap->tmpbuf; if (!soap->body) return SOAP_STR_EOS; do c = soap_get(soap); @@ -13908,26 +15695,28 @@ soap_value(struct soap *soap) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element content value='%s'\n", soap->tmpbuf)); if (c == SOAP_TT || c == SOAP_LT || (int)c == EOF) soap_unget(soap, c); - else if (soap->mode & SOAP_XML_STRICT) + else { soap->error = SOAP_LENGTH; return NULL; } #ifdef WITH_DOM if ((soap->mode & SOAP_XML_DOM) && soap->dom) - soap->dom->data = soap_strdup(soap, soap->tmpbuf); + soap->dom->text = soap_strdup(soap, soap->tmpbuf); #endif return soap->tmpbuf; /* return non-null pointer */ } #endif /******************************************************************************/ + #if !defined(WITH_LEANER) || !defined(WITH_NOHTTP) #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 -soap_getline(struct soap *soap, char *s, int len) -{ int i = len; +soap_getline(struct soap *soap, char *buf, int len) +{ char *s = buf; + int i = len; soap_wchar c = 0; for (;;) { while (--i > 0) @@ -13959,13 +15748,14 @@ soap_getline(struct soap *soap, char *s, int len) #endif /******************************************************************************/ + #ifndef PALM_1 static size_t soap_count_attachments(struct soap *soap) { #ifndef WITH_LEANER - register struct soap_multipart *content; - register size_t count = soap->count; + struct soap_multipart *content; + size_t count = soap->count; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the message size with attachments, current count=%lu\n", (unsigned long)count)); if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of DIME attachments\n")); @@ -13981,10 +15771,10 @@ soap_count_attachments(struct soap *soap) } } if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary) - { register size_t n = strlen(soap->mime.boundary); + { size_t n = strlen(soap->mime.boundary); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Calculating the size of MIME attachments\n")); for (content = soap->mime.first; content; content = content->next) - { register const char *s; + { const char *s; /* count \r\n--boundary\r\n */ count += 6 + n; /* count Content-Type: ...\r\n */ @@ -14019,6 +15809,7 @@ soap_count_attachments(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 static int @@ -14031,6 +15822,7 @@ soap_putdimefield(struct soap *soap, const char *s, size_t n) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14047,7 +15839,7 @@ soap_dime_option(struct soap *soap, unsigned short optype, const char *option) s[1] = (char)(optype & 0xFF); s[2] = (char)(n >> 8); s[3] = (char)(n & 0xFF); - strcpy(s + 4, option); + soap_strcpy(s + 4, n + 1, option); } } return s; @@ -14056,6 +15848,7 @@ soap_dime_option(struct soap *soap, unsigned short optype, const char *option) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14100,6 +15893,7 @@ soap_putdimehdr(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14116,7 +15910,7 @@ soap_putdime(struct soap *soap) soap->dime.type = content->type; soap->dime.options = content->options; soap->dime.flags = SOAP_DIME_VERSION | SOAP_DIME_MEDIA; - if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) || soap->error)) + if (soap->fdimereadopen && ((handle = soap->fdimereadopen(soap, (void*)content->ptr, content->id, content->type, content->options)) != NULL || soap->error)) { size_t size = content->size; if (!handle) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadopen failed\n")); @@ -14158,7 +15952,8 @@ soap_putdime(struct soap *soap) bufsize = size; else bufsize = sizeof(soap->tmpbuf); - if (!(bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize))) + bufsize = soap->fdimeread(soap, handle, soap->tmpbuf, bufsize); + if (!bufsize) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)content->size)); soap->error = SOAP_CHK_EOF; break; @@ -14168,7 +15963,8 @@ soap_putdime(struct soap *soap) size -= bufsize; } while (size); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); - soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3); + if (soap_send_raw(soap, SOAP_STR_PADDING, -(long)soap->dime.size&3)) + return soap->error; } DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fdimereadclose\n")); if (soap->fdimereadclose) @@ -14188,27 +15984,30 @@ soap_putdime(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 static char * soap_getdimefield(struct soap *soap, size_t n) -{ register soap_wchar c; - register size_t i; - register char *s; - register char *p = NULL; +{ soap_wchar c; + size_t i; + char *s; + char *p = NULL; if (n) { p = (char*)soap_malloc(soap, n + 1); if (p) { s = p; for (i = n; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) + { c = soap_get1(soap); + if ((int)c == EOF) { soap->error = SOAP_CHK_EOF; return NULL; } *s++ = (char)c; } - *s = '\0'; - if ((soap->error = soap_move(soap, (size_t)(-(long)n&3)))) + *s = '\0'; /* force NUL terminated */ + soap->error = soap_move(soap, (size_t)(-(long)n&3)); + if (soap->error) return NULL; } else @@ -14220,15 +16019,16 @@ soap_getdimefield(struct soap *soap, size_t n) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap *soap) -{ register soap_wchar c; - register char *s; - register int i; +{ soap_wchar c; + char *s; + int i; unsigned char tmp[12]; size_t optlen, idlen, typelen; if (!(soap->mode & SOAP_ENC_DIME)) @@ -14243,7 +16043,8 @@ soap_getdimehdr(struct soap *soap) } s = (char*)tmp; for (i = 12; i > 0; i--) - { if ((int)(c = soap_getchar(soap)) == EOF) + { c = soap_getchar(soap); + if ((int)c == EOF) return soap->error = SOAP_CHK_EOF; *s++ = (char)c; } @@ -14255,11 +16056,14 @@ soap_getdimehdr(struct soap *soap) typelen = (tmp[6] << 8) | tmp[7]; soap->dime.size = ((size_t)tmp[8] << 24) | ((size_t)tmp[9] << 16) | ((size_t)tmp[10] << 8) | ((size_t)tmp[11]); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu flags=0x%X\n", (unsigned long)soap->dime.size, soap->dime.flags)); - if (!(soap->dime.options = soap_getdimefield(soap, optlen)) && soap->error) + soap->dime.options = soap_getdimefield(soap, optlen); + if (!soap->dime.options && soap->error) return soap->error; - if (!(soap->dime.id = soap_getdimefield(soap, idlen)) && soap->error) + soap->dime.id = soap_getdimefield(soap, idlen); + if (!soap->dime.id && soap->error) return soap->error; - if (!(soap->dime.type = soap_getdimefield(soap, typelen)) && soap->error) + soap->dime.type = soap_getdimefield(soap, typelen); + if (!soap->dime.type && soap->error) return soap->error; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME id='%s', type='%s', options='%s'\n", soap->dime.id ? soap->dime.id : SOAP_STR_EOS, soap->dime.type ? soap->dime.type : "", soap->dime.options ? soap->dime.options+4 : SOAP_STR_EOS)); if (soap->dime.flags & SOAP_DIME_ME) @@ -14270,6 +16074,7 @@ soap_getdimehdr(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14285,10 +16090,10 @@ soap_getdime(struct soap *soap) if (soap_move(soap, (size_t)(((soap->dime.size+3)&(~3)) - soap_tell(soap)))) return soap->error = SOAP_EOF; for (;;) - { register struct soap_multipart *content; + { struct soap_multipart *content; if (soap_getdimehdr(soap)) break; - if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error)) + if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) != NULL || soap->error)) { const char *id, *type, *options; size_t size, n; if (!soap->dime.ptr) @@ -14302,7 +16107,8 @@ soap_getdime(struct soap *soap) { n = soap->buflen - soap->bufidx; if (size < n) n = size; - if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n))) + soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n); + if (soap->error) break; size -= n; if (!size) @@ -14339,9 +16145,9 @@ end: if (soap_new_block(soap) == NULL) return SOAP_EOM; for (;;) - { register soap_wchar c; - register size_t i; - register char *s; + { soap_wchar c; + size_t i; + char *s; if (soap->dime.size > SOAP_MAXDIMESIZE) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "DIME size=%lu exceeds SOAP_MAXDIMESIZE=%lu\n", (unsigned long)soap->dime.size, (unsigned long)SOAP_MAXDIMESIZE)); return soap->error = SOAP_DIME_ERROR; @@ -14350,7 +16156,8 @@ end: if (!s) return soap->error = SOAP_EOM; for (i = soap->dime.size; i > 0; i--) - { if ((int)(c = soap_get1(soap)) == EOF) + { c = soap_get1(soap); + if ((int)c == EOF) return soap->error = SOAP_EOF; *s++ = (char)c; } @@ -14362,7 +16169,8 @@ end: return soap->error; } soap->dime.size = soap->blist->size++; /* allocate one more byte in blist for the terminating '\0' */ - if (!(soap->dime.ptr = soap_save_block(soap, NULL, NULL, 0))) + soap->dime.ptr = soap_save_block(soap, NULL, NULL, 0); + if (!soap->dime.ptr) return soap->error; soap->dime.ptr[soap->dime.size] = '\0'; /* make 0-terminated */ soap->dime.id = id; @@ -14389,6 +16197,7 @@ end: #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14396,11 +16205,11 @@ int SOAP_FMAC2 soap_getmimehdr(struct soap *soap) { struct soap_multipart *content; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get MIME header\n")); do { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf))) return soap->error; - } - while (!*soap->msgbuf); + } while (!*soap->msgbuf); if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-') { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1; /* remove white space */ @@ -14420,11 +16229,11 @@ soap_getmimehdr(struct soap *soap) return soap->error = SOAP_EOM; content = soap->mime.last; for (;;) - { register char *key = soap->msgbuf; - register char *val; + { char *key = soap->msgbuf; + char *val; if (!*key) break; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "MIME header: %s\n", key)); val = strchr(soap->msgbuf, ':'); if (val) { *val = '\0'; @@ -14434,14 +16243,14 @@ soap_getmimehdr(struct soap *soap) content->id = soap_strdup(soap, val); else if (!soap_tag_cmp(key, "Content-Location")) content->location = soap_strdup(soap, val); - else if (!soap_tag_cmp(key, "Content-Disposition")) + else if (!content->id && !soap_tag_cmp(key, "Content-Disposition")) content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name")); else if (!soap_tag_cmp(key, "Content-Type")) content->type = soap_strdup(soap, val); else if (!soap_tag_cmp(key, "Content-Description")) content->description = soap_strdup(soap, val); else if (!soap_tag_cmp(key, "Content-Transfer-Encoding")) - content->encoding = (enum soap_mime_encoding)soap_code_int(mime_codes, val, (long)SOAP_MIME_NONE); + content->encoding = (enum soap_mime_encoding)soap_code_int(mime_codes, val, (LONG64)SOAP_MIME_NONE); } if (soap_getline(soap, key, sizeof(soap->msgbuf))) return soap->error; @@ -14452,6 +16261,7 @@ soap_getmimehdr(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14459,13 +16269,14 @@ int SOAP_FMAC2 soap_getmime(struct soap *soap) { while (soap_get_mime_attachment(soap, NULL)) - ; + continue; return soap->error; } #endif #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14478,6 +16289,7 @@ soap_post_check_mime_attachments(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14492,27 +16304,29 @@ soap_check_mime_attachments(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 struct soap_multipart * SOAP_FMAC2 soap_get_mime_attachment(struct soap *soap, void *handle) -{ register soap_wchar c = 0; - register size_t i, m = 0; - register char *s, *t = NULL; - register struct soap_multipart *content; - register short flag = 0; +{ soap_wchar c = 0; + size_t i, m = 0; + char *s, *t = NULL; + struct soap_multipart *content; + short flag = 0; if (!(soap->mode & SOAP_ENC_MIME)) return NULL; content = soap->mime.last; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get MIME (%p)\n", content)); if (!content) { if (soap_getmimehdr(soap)) return NULL; content = soap->mime.last; } else if (content != soap->mime.first) - { if (soap->fmimewriteopen && ((content->ptr = (char*)soap->fmimewriteopen(soap, (void*)handle, content->id, content->type, content->description, content->encoding)) || soap->error)) + { if (soap->fmimewriteopen && ((content->ptr = (char*)soap->fmimewriteopen(soap, (void*)handle, content->id, content->type, content->description, content->encoding)) != NULL || soap->error)) { if (!content->ptr) return NULL; } @@ -14524,10 +16338,15 @@ soap_get_mime_attachment(struct soap *soap, void *handle) } for (;;) { if (content->ptr) + { s = soap->tmpbuf; - else if (!(s = (char*)soap_push_block(soap, NULL, sizeof(soap->tmpbuf)))) - { soap->error = SOAP_EOM; - return NULL; + } + else + { s = (char*)soap_push_block(soap, NULL, sizeof(soap->tmpbuf)); + if (!s) + { soap->error = SOAP_EOM; + return NULL; + } } for (i = 0; i < sizeof(soap->tmpbuf); i++) { if (m > 0) @@ -14536,7 +16355,7 @@ soap_get_mime_attachment(struct soap *soap, void *handle) } else { if (!flag) - { c = soap_get1(soap); + { c = soap_getchar(soap); if ((int)c == EOF) { if (content->ptr && soap->fmimewriteclose) soap->fmimewriteclose(soap, (void*)content->ptr); @@ -14545,11 +16364,11 @@ soap_get_mime_attachment(struct soap *soap, void *handle) } } if (flag || c == '\r') - { t = soap->msgbuf; - memset(t, 0, sizeof(soap->msgbuf)); - strcpy(t, "\n--"); + { memset((void*)soap->msgbuf, 0, sizeof(soap->msgbuf)); + soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "\n--"); if (soap->mime.boundary) - strncat(t, soap->mime.boundary, sizeof(soap->msgbuf)-4); + soap_strncat(soap->msgbuf, sizeof(soap->msgbuf), soap->mime.boundary, sizeof(soap->msgbuf) - 4); + t = soap->msgbuf; do c = soap_getchar(soap); while (c == *t++); if ((int)c == EOF) @@ -14570,12 +16389,12 @@ soap_get_mime_attachment(struct soap *soap, void *handle) } } if (content->ptr && soap->fmimewrite) - { if ((soap->error = soap->fmimewrite(soap, (void*)content->ptr, soap->tmpbuf, i))) + { soap->error = soap->fmimewrite(soap, (void*)content->ptr, soap->tmpbuf, i); + if (soap->error) break; } } end: - *s = '\0'; /* make 0-terminated */ if (content->ptr) { if (!soap->error && soap->fmimewrite) soap->error = soap->fmimewrite(soap, (void*)content->ptr, soap->tmpbuf, i); @@ -14585,7 +16404,8 @@ end: return NULL; } else - { content->size = soap_size_block(soap, NULL, i+1) - 1; /* last block with '\0' */ + { *s = '\0'; /* make 0-terminated, just in case */ + content->size = soap_size_block(soap, NULL, i+1) - 1; /* last block with '\0' */ content->ptr = soap_save_block(soap, NULL, NULL, 0); } soap_resolve_attachment(soap, content); @@ -14614,13 +16434,14 @@ end: #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_match_cid(struct soap *soap, const char *s, const char *t) -{ register size_t n; +{ size_t n; if (!s) return 1; if (!strcmp(s, t)) @@ -14643,15 +16464,16 @@ soap_match_cid(struct soap *soap, const char *s, const char *t) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 static void soap_resolve_attachment(struct soap *soap, struct soap_multipart *content) { if (content->id) - { register struct soap_xlist **xp = &soap->xlist; + { struct soap_xlist **xp = &soap->xlist; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolving attachment data for id='%s'\n", content->id)); while (*xp) - { register struct soap_xlist *xq = *xp; + { struct soap_xlist *xq = *xp; if (!soap_match_cid(soap, xq->id, content->id)) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Found matching attachment id='%s' for content id='%s'\n", xq->id, content->id)); *xp = xq->next; @@ -14673,6 +16495,7 @@ soap_resolve_attachment(struct soap *soap, struct soap_multipart *content) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14700,6 +16523,7 @@ soap_putmimehdr(struct soap *soap, struct soap_multipart *content) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14712,7 +16536,7 @@ soap_putmime(struct soap *soap) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending MIME attachments\n")); for (content = soap->mime.first; content; content = content->next) { void *handle; - if (soap->fmimereadopen && ((handle = soap->fmimereadopen(soap, (void*)content->ptr, content->id, content->type, content->description)) || soap->error)) + if (soap->fmimereadopen && ((handle = soap->fmimereadopen(soap, (void*)content->ptr, content->id, content->type, content->description)) != NULL || soap->error)) { size_t size = content->size; if (!handle) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fmimereadopen failed\n")); @@ -14741,7 +16565,8 @@ soap_putmime(struct soap *soap) bufsize = size; else bufsize = sizeof(soap->tmpbuf); - if (!(bufsize = soap->fmimeread(soap, handle, soap->tmpbuf, bufsize))) + bufsize = soap->fmimeread(soap, handle, soap->tmpbuf, bufsize); + if (!bufsize) { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "fmimeread failed: insufficient data (%lu bytes remaining from %lu bytes)\n", (unsigned long)size, (unsigned long)content->size)); soap->error = SOAP_EOF; break; @@ -14766,6 +16591,7 @@ soap_putmime(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14780,6 +16606,7 @@ soap_set_dime(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14796,6 +16623,7 @@ soap_set_mime(struct soap *soap, const char *boundary, const char *start) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14810,6 +16638,7 @@ soap_clr_dime(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14826,11 +16655,13 @@ soap_clr_mime(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 static struct soap_multipart* soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap_multipart **last, char *ptr, size_t size) { struct soap_multipart *content; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "New MIME attachment %p (%lu)\n", ptr, (unsigned long)size)); content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart)); if (content) { content->next = NULL; @@ -14854,6 +16685,7 @@ soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14872,6 +16704,7 @@ soap_set_dime_attachment(struct soap *soap, char *ptr, size_t size, const char * #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14892,6 +16725,7 @@ soap_set_mime_attachment(struct soap *soap, char *ptr, size_t size, enum soap_mi #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 SOAP_FMAC1 @@ -14906,13 +16740,14 @@ soap_next_multipart(struct soap_multipart *content) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 static void soap_select_mime_boundary(struct soap *soap) { while (!soap->mime.boundary || soap_valid_mime_boundary(soap)) - { register char *s = soap->mime.boundary; - register size_t n = 0; + { char *s = soap->mime.boundary; + size_t n = 0; if (s) n = strlen(s); if (n < 16) @@ -14921,14 +16756,16 @@ soap_select_mime_boundary(struct soap *soap) if (!s) return; } - strcpy(s, "=="); - s += 2; + *s++ = '='; + *s++ = '='; n -= 4; while (n) { *s++ = soap_base64o[soap_random & 0x3F]; n--; } - strcpy(s, "=="); + *s++ = '='; + *s++ = '='; + *s = '\0'; } if (!soap->mime.start) soap->mime.start = "<SOAP-ENV:Envelope>"; @@ -14937,19 +16774,20 @@ soap_select_mime_boundary(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEANER #ifndef PALM_1 static int soap_valid_mime_boundary(struct soap *soap) -{ register struct soap_multipart *content; - register size_t k; +{ struct soap_multipart *content; + size_t k; if (soap->fmimeread) return SOAP_OK; k = strlen(soap->mime.boundary); for (content = soap->mime.first; content; content = content->next) { if (content->ptr && content->size >= k) - { register const char *p = (const char*)content->ptr; - register size_t i; + { const char *p = (const char*)content->ptr; + size_t i; for (i = 0; i < content->size - k; i++, p++) { if (!strncmp(p, soap->mime.boundary, k)) return SOAP_ERR; @@ -14962,6 +16800,7 @@ soap_valid_mime_boundary(struct soap *soap) #endif /******************************************************************************/ + #ifdef WITH_GZIP #ifndef PALM_1 static int @@ -14970,15 +16809,16 @@ soap_getgziphdr(struct soap *soap) soap_wchar c = 0, f = 0; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Get gzip header\n")); for (i = 0; i < 9; i++) - { if ((int)(c = soap_get1(soap) == EOF)) - return soap->error = SOAP_ZLIB_ERROR; + { c = soap_get1(soap); if (i == 1 && c == 8) soap->z_dict = 0; if (i == 2) f = c; } if (f & 0x04) /* FEXTRA */ - { for (i = soap_get1(soap) | (soap_get1(soap) << 8); i; i--) + { i = soap_get1(soap); + i |= soap_get1(soap) << 8; + while (i-- > 0) { if ((int)soap_get1(soap) == EOF) return soap->error = SOAP_ZLIB_ERROR; } @@ -14994,7 +16834,8 @@ soap_getgziphdr(struct soap *soap) while (c && (int)c != EOF); } if ((int)c != EOF && (f & 0x02)) /* skip FHCRC (CRC32 is used) */ - { if ((int)(c = soap_get1(soap)) != EOF) + { c = soap_get1(soap); + if ((int)c != EOF) c = soap_get1(soap); } if ((int)c == EOF) @@ -15005,6 +16846,7 @@ soap_getgziphdr(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -15025,7 +16867,7 @@ soap_begin_serve(struct soap *soap) { if (soap->error < SOAP_STOP) { #ifdef WITH_FASTCGI - soap_send_fault(soap); + (void)soap_send_fault(soap); #else return soap_send_fault(soap); #endif @@ -15037,18 +16879,21 @@ soap_begin_serve(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap *soap) -{ register soap_wchar c; +{ soap_wchar c; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing for input from socket=%d/fd=%d\n", soap->socket, soap->recvfd)); soap->error = SOAP_OK; - soap->filterstop = SOAP_OK; +#ifndef WITH_LEANER + soap->recverror = SOAP_OK; +#endif soap_free_temp(soap); soap_set_local_namespaces(soap); - soap->version = 0; /* don't assume we're parsing SOAP content by default */ + soap->version = 0; /* don't assume we're parsing SOAP content by default */ #ifndef WITH_NOIDREF soap_free_iht(soap); #endif @@ -15062,11 +16907,11 @@ soap_begin_recv(struct soap *soap) } if (!(soap->mode & SOAP_IO_KEEPALIVE)) soap->keep_alive = 0; + soap->shaky = 0; soap->ahead = 0; soap->peeked = 0; soap->level = 0; soap->part = SOAP_BEGIN; - soap->alloced = 0; soap->body = 1; soap->count = 0; soap->length = 0; @@ -15093,7 +16938,7 @@ soap_begin_recv(struct soap *soap) #ifdef WIN32 #ifndef UNDER_CE #ifndef WITH_FASTCGI - if (!soap_valid_socket(soap->socket) && !soap->is) /* Set win32 stdout or soap->sendfd to BINARY, e.g. to support DIME */ + if (!soap_valid_socket(soap->socket) && !soap->is && soap->recvfd >= 0) /* Set win32 stdin or soap->recvfd to BINARY, e.g. to support DIME */ #ifdef __BORLANDC__ setmode(soap->recvfd, _O_BINARY); #else @@ -15106,10 +16951,16 @@ soap_begin_recv(struct soap *soap) soap->mode &= ~SOAP_ENC_ZLIB; soap->zlib_in = SOAP_ZLIB_NONE; soap->zlib_out = SOAP_ZLIB_NONE; - soap->d_stream->next_in = Z_NULL; + if (!soap->d_stream) + { soap->d_stream = (z_stream*)SOAP_MALLOC(soap, sizeof(z_stream)); + soap->d_stream->zalloc = Z_NULL; + soap->d_stream->zfree = Z_NULL; + soap->d_stream->opaque = Z_NULL; + soap->d_stream->next_in = Z_NULL; + } soap->d_stream->avail_in = 0; soap->d_stream->next_out = (Byte*)soap->buf; - soap->d_stream->avail_out = SOAP_BUFLEN; + soap->d_stream->avail_out = sizeof(soap->buf); soap->z_ratio_in = 1.0; #endif #ifdef WITH_OPENSSL @@ -15117,7 +16968,7 @@ soap_begin_recv(struct soap *soap) ERR_clear_error(); #endif #ifndef WITH_LEANER - if (soap->fprepareinitrecv && (soap->error = soap->fprepareinitrecv(soap))) + if (soap->fprepareinitrecv && (soap->error = soap->fprepareinitrecv(soap)) != SOAP_OK) return soap->error; #endif c = soap_getchar(soap); @@ -15137,8 +16988,8 @@ soap_begin_recv(struct soap *soap) soap->z_crc = crc32(0L, NULL, 0); DBGLOG(TEST, SOAP_MESSAGE(fdebug, "gzip initialized\n")); if (!soap->z_buf) - soap->z_buf = (char*)SOAP_MALLOC(soap, SOAP_BUFLEN); - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); + soap->z_buf = (char*)SOAP_MALLOC(soap, sizeof(soap->buf)); + soap_memcpy((void*)soap->z_buf, sizeof(soap->buf), (const void*)soap->buf, sizeof(soap->buf)); /* should not chunk over plain transport, so why bother to check? */ /* if ((soap->mode & SOAP_IO) == SOAP_IO_CHUNK) */ /* soap->z_buflen = soap->bufidx; */ @@ -15161,8 +17012,9 @@ soap_begin_recv(struct soap *soap) #endif { /* skip BOM */ if (c == 0xEF && soap_get0(soap) == 0xBB) - { c = soap_get1(soap); - if ((c = soap_get1(soap)) == 0xBF) + { soap_get1(soap); + c = soap_get1(soap); + if (c == 0xBF) { soap->mode &= ~SOAP_ENC_LATIN; c = soap_getchar(soap); } @@ -15186,7 +17038,8 @@ soap_begin_recv(struct soap *soap) soap->mode &= ~SOAP_IO; soap->error = soap->fparse(soap); if (soap->error && soap->error < SOAP_STOP) - { soap->keep_alive = 0; /* force close later */ + { if (soap->error < 200 || soap->error > 202) + soap->keep_alive = 0; /* force close later if error but excluding HTTP codes 200..202 */ return soap->error; } if (soap->error == SOAP_STOP) @@ -15248,8 +17101,8 @@ soap_begin_recv(struct soap *soap) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Inflate initialized\n")); soap->mode |= SOAP_ENC_ZLIB; if (!soap->z_buf) - soap->z_buf = (char*)SOAP_MALLOC(soap, SOAP_BUFLEN); - memcpy(soap->z_buf, soap->buf, SOAP_BUFLEN); + soap->z_buf = (char*)SOAP_MALLOC(soap, sizeof(soap->buf)); + soap_memcpy((void*)soap->z_buf, sizeof(soap->buf), (const void*)soap->buf, sizeof(soap->buf)); soap->d_stream->next_in = (Byte*)(soap->z_buf + soap->bufidx); soap->d_stream->avail_in = (unsigned int)(soap->buflen - soap->bufidx); soap->z_buflen = soap->buflen; @@ -15260,14 +17113,15 @@ soap_begin_recv(struct soap *soap) if (soap->fpreparerecv && (soap->mode & SOAP_IO) != SOAP_IO_CHUNK && soap->buflen > soap->bufidx) { int r; DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Invoking fpreparerecv\n")); - if ((r = soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx))) + r = soap->fpreparerecv(soap, soap->buf + soap->bufidx, soap->buflen - soap->bufidx); + if (r) return soap->error = r; } #endif if (soap_get0(soap) == (int)EOF) - { if (soap->status == 0 || soap->status == 200) - return soap->error = SOAP_NO_DATA; /* HTTP OK: always expect data */ - return soap->error = soap->status; + { if (soap->status == 0) + return soap->error = SOAP_NO_DATA; /* server side expects data */ + return soap->error = soap->status; /* client side received HTTP status code */ } if (soap->error) { if (soap->error == SOAP_FORM && soap->fform) @@ -15282,7 +17136,8 @@ soap_begin_recv(struct soap *soap) #ifndef WITH_LEANER if (soap->mode & SOAP_ENC_MIME) { do /* skip preamble */ - { if ((int)(c = soap_getchar(soap)) == EOF) + { c = soap_getchar(soap); + if ((int)c == EOF) return soap->error = SOAP_CHK_EOF; } while (c != '-' || soap_get0(soap) != '-'); soap_unget(soap, c); @@ -15320,6 +17175,7 @@ soap_begin_recv(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -15328,8 +17184,10 @@ soap_envelope_begin_out(struct soap *soap) { #ifndef WITH_LEANER size_t n = 0; - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start && strlen(soap->mime.boundary) + strlen(soap->mime.start) < sizeof(soap->tmpbuf) - 80 ) + if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && soap->mime.start) { const char *s; + if (strlen(soap->mime.boundary) + strlen(soap->mime.start) + 140 > sizeof(soap->tmpbuf)) + return soap->error = SOAP_EOM; if ((soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) s = "application/dime"; else if (soap->version == 2) @@ -15342,17 +17200,13 @@ soap_envelope_begin_out(struct soap *soap) s = "application/xop+xml; charset=utf-8; type=\"text/xml\""; else s = "text/xml; charset=utf-8"; -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start); -#else - sprintf(soap->tmpbuf, "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start); -#endif + (SOAP_SNPRINTF_SAFE(soap->tmpbuf, sizeof(soap->tmpbuf)), "--%s\r\nContent-Type: %s\r\nContent-Transfer-Encoding: binary\r\nContent-ID: %s\r\n\r\n", soap->mime.boundary, s, soap->mime.start); n = strlen(soap->tmpbuf); if (soap_send_raw(soap, soap->tmpbuf, n)) return soap->error; } if (soap->mode & SOAP_IO_LENGTH) - soap->dime.size = soap->count; /* DIME in MIME correction */ + soap->dime.size = soap->count; /* DIME in MIME correction */ if (!(soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME)) { if (soap_putdimehdr(soap)) return soap->error; @@ -15366,6 +17220,7 @@ soap_envelope_begin_out(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -15374,16 +17229,12 @@ soap_envelope_end_out(struct soap *soap) { if (soap->version == 0) return SOAP_OK; if (soap_element_end_out(soap, "SOAP-ENV:Envelope") - || soap_send_raw(soap, "\r\n", 2)) /* 2.8: always emit \r\n */ + || soap_send_raw(soap, "\r\n", 2)) /* 2.8: always emit \r\n */ return soap->error; #ifndef WITH_LEANER if ((soap->mode & SOAP_IO_LENGTH) && (soap->mode & SOAP_ENC_DIME) && !(soap->mode & SOAP_ENC_MTOM)) - { soap->dime.size = soap->count - soap->dime.size; /* DIME in MIME correction */ -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->id, sizeof(soap->id), soap->dime_id_format, 0); -#else - sprintf(soap->id, soap->dime_id_format, 0); -#endif + { soap->dime.size = soap->count - soap->dime.size; /* DIME in MIME correction */ + (SOAP_SNPRINTF(soap->id, sizeof(soap->id), strlen(soap->dime_id_format) + 20), soap->dime_id_format, 0); soap->dime.id = soap->id; if (soap->local_namespaces) { if (soap->local_namespaces[0].out) @@ -15406,26 +17257,28 @@ soap_envelope_end_out(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_LEAN #ifndef PALM_1 SOAP_FMAC1 char* SOAP_FMAC2 soap_get_http_body(struct soap *soap, size_t *len) -{ if (len) - *len = 0; +{ #ifndef WITH_LEAN - register size_t l = 0, n = 0; - register char *s; + size_t l = 0, n = 0; + char *s; + if (len) + *len = 0; /* get HTTP body length */ if (!(soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) != SOAP_IO_CHUNK) { n = soap->length; if (!n) return NULL; } - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Parsing HTTP body (mode=0x%x,len=%lu)\n", soap->mode, (unsigned long)n)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing HTTP body (mode=0x%x,len=%lu)\n", soap->mode, (unsigned long)n)); #ifdef WITH_FAST - soap->labidx = 0; /* use look-aside buffer */ + soap->labidx = 0; /* use look-aside buffer */ #else if (soap_new_block(soap) == NULL) return NULL; @@ -15433,19 +17286,20 @@ soap_get_http_body(struct soap *soap, size_t *len) for (;;) { #ifdef WITH_FAST - register size_t i, k; - if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ + size_t i, k; + if (soap_append_lab(soap, NULL, 0)) /* allocate more space in look-aside buffer if necessary */ return NULL; - s = soap->labbuf + soap->labidx; /* space to populate */ - k = soap->lablen - soap->labidx; /* number of bytes available */ - soap->labidx = soap->lablen; /* claim this space */ + s = soap->labbuf + soap->labidx; /* space to populate */ + k = soap->lablen - soap->labidx; /* number of bytes available */ + soap->labidx = soap->lablen; /* claim this space */ #else - register size_t i, k = SOAP_BLKLEN; - if (!(s = (char*)soap_push_block(soap, NULL, k))) + size_t i, k = SOAP_BLKLEN; + s = (char*)soap_push_block(soap, NULL, k); + if (!s) return NULL; #endif for (i = 0; i < k; i++) - { register soap_wchar c; + { soap_wchar c; l++; if (n > 0 && l > n) goto end; @@ -15460,14 +17314,17 @@ end: if (len) *len = l - 1; /* len excludes terminating \0 */ #ifdef WITH_FAST - if ((s = (char*)soap_malloc(soap, l))) - memcpy(s, soap->labbuf, l); + s = (char*)soap_malloc(soap, l); + if (s) + soap_memcpy((void*)s, l, (const void*)soap->labbuf, l); #else soap_size_block(soap, NULL, i+1); - s = soap_save_block(soap, NULL, 0); + s = soap_save_block(soap, NULL, NULL, 0); #endif return s; #else + if (len) + *len = 0; return NULL; #endif } @@ -15475,50 +17332,32 @@ end: #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap *soap) -{ register struct Namespace *p; - soap->part = SOAP_IN_ENVELOPE; +{ soap->part = SOAP_IN_ENVELOPE; if (soap_element_begin_in(soap, "SOAP-ENV:Envelope", 0, NULL)) { if (soap->error == SOAP_TAG_MISMATCH) { if (!soap_element_begin_in(soap, "Envelope", 0, NULL)) soap->error = SOAP_VERSIONMISMATCH; else if (soap->status == 0 || (soap->status >= 200 && soap->status <= 299)) - return SOAP_OK; /* allow non-SOAP XML content to be captured */ + return SOAP_OK; /* allow non-SOAP (REST) XML content to be captured */ soap->error = soap->status; } else if (soap->status) soap->error = soap->status; return soap->error; } - p = soap->local_namespaces; - if (p) - { const char *ns = p[0].out; - if (!ns) - ns = p[0].ns; - if (!strcmp(ns, soap_env1)) - { soap->version = 1; /* make sure we use SOAP 1.1 */ - if (p[1].out) - SOAP_FREE(soap, p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc1)))) - strcpy(p[1].out, soap_enc1); - } - else if (!strcmp(ns, soap_env2)) - { soap->version = 2; /* make sure we use SOAP 1.2 */ - if (p[1].out) - SOAP_FREE(soap, p[1].out); - if ((p[1].out = (char*)SOAP_MALLOC(soap, sizeof(soap_enc2)))) - strcpy(p[1].out, soap_enc2); - } - } + soap_get_version(soap); return SOAP_OK; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -15532,6 +17371,7 @@ soap_envelope_end_in(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -15551,6 +17391,7 @@ soap_body_begin_out(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -15566,6 +17407,7 @@ soap_body_end_out(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -15583,6 +17425,7 @@ soap_body_begin_in(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -15598,6 +17441,7 @@ soap_body_end_in(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -15612,13 +17456,14 @@ soap_recv_header(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap *soap, const char *endpoint) -{ register const char *s; - register size_t i, n; +{ const char *s, *t; + size_t i, n; soap->endpoint[0] = '\0'; soap->host[0] = '\0'; soap->path[0] = '/'; @@ -15630,13 +17475,36 @@ soap_set_endpoint(struct soap *soap, const char *endpoint) if (!soap_tag_cmp(endpoint, "https:*")) soap->port = 443; #endif - strncpy(soap->endpoint, endpoint, sizeof(soap->endpoint)); - soap->endpoint[sizeof(soap->endpoint) - 1] = '\0'; + soap_strcpy(soap->endpoint, sizeof(soap->endpoint), endpoint); s = strchr(endpoint, ':'); if (s && s[1] == '/' && s[2] == '/') s += 3; else s = endpoint; +#if !defined(WITH_NOHTTP) || !defined(WITH_LEANER) + t = strchr(s, '@'); + if (t && *s != ':' && *s != '@') + { size_t l = t - s + 1; + char *r = (char*)soap_malloc(soap, l); + n = s - endpoint; + if (r) + { s = soap_decode(r, l, s, ":@"); + soap->userid = r; + soap->passwd = SOAP_STR_EOS; + if (*s == ':') + { s++; + if (*s != '@') + { l = t - s + 1; + r = r + strlen(r) + 1; + s = soap_decode(r, l, s, "@"); + soap->passwd = r; + } + } + } + s++; + soap_strcpy(soap->endpoint + n, sizeof(soap->endpoint) - n, s); + } +#endif n = strlen(s); if (n >= sizeof(soap->host)) n = sizeof(soap->host) - 1; @@ -15674,13 +17542,14 @@ soap_set_endpoint(struct soap *soap, const char *endpoint) break; } if (i < n && s[i]) - { strncpy(soap->path, s + i, sizeof(soap->path)); - soap->path[sizeof(soap->path) - 1] = '\0'; - } + soap_strcpy(soap->path, sizeof(soap->path), s + i); + if (soap->userid && !soap->authrealm) + soap->authrealm = soap->host; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int @@ -15691,39 +17560,44 @@ soap_connect(struct soap *soap, const char *endpoint, const char *action) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap *soap, int http_command, const char *endpoints, const char *action) -{ char *endpoint; - const char *s; - if (endpoints && (s = strchr(endpoints, ' '))) - { endpoint = (char*)SOAP_MALLOC(soap, strlen(endpoints) + 1); - for (;;) - { strncpy(endpoint, endpoints, s - endpoints); - endpoint[s - endpoints] = '\0'; - if (soap_try_connect_command(soap, http_command, endpoint, action) != SOAP_TCP_ERROR) - break; - if (!*s) - break; - soap->error = SOAP_OK; - while (*s == ' ') - s++; - endpoints = s; - s = strchr(endpoints, ' '); - if (!s) - s = endpoints + strlen(endpoints); +{ if (endpoints) + { const char *s; + s = strchr(endpoints, ' '); + if (s) + { size_t l = strlen(endpoints); + char *endpoint = (char*)SOAP_MALLOC(soap, l + 1); + for (;;) + { soap_strncpy(endpoint, l + 1, endpoints, s - endpoints); + endpoint[s - endpoints] = '\0'; + if (soap_try_connect_command(soap, http_command, endpoint, action) != SOAP_TCP_ERROR) + break; + if (!*s) + break; + soap->error = SOAP_OK; + while (*s == ' ') + s++; + endpoints = s; + s = strchr(endpoints, ' '); + if (!s) + s = endpoints + strlen(endpoints); + } + SOAP_FREE(soap, endpoint); } - SOAP_FREE(soap, endpoint); + else + soap_try_connect_command(soap, http_command, endpoints, action); } - else - soap_try_connect_command(soap, http_command, endpoints, action); return soap->error; } #endif /******************************************************************************/ + #ifndef PALM_1 static int soap_try_connect_command(struct soap *soap, int http_command, const char *endpoint, const char *action) @@ -15731,18 +17605,19 @@ soap_try_connect_command(struct soap *soap, int http_command, const char *endpoi int port; size_t count; soap->error = SOAP_OK; - strcpy(host, soap->host); /* save previous host name: if != then reconnect */ + soap_strcpy(host, sizeof(soap->host), soap->host); /* save previous host name: if != then reconnect */ port = soap->port; /* save previous port to compare */ soap->status = http_command; soap_set_endpoint(soap, endpoint); + soap->action = soap_strdup(soap, action); #ifndef WITH_LEANER if (soap->fconnect) - { if ((soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port))) + { soap->error = soap->fconnect(soap, endpoint, soap->host, soap->port); + if (soap->error) return soap->error; } else #endif - soap->action = soap_strdup(soap, action); if (soap->fopen && *soap->host) { if (!soap->keep_alive || !soap_valid_socket(soap->socket) || strcmp(soap->host, host) || soap->port != port || !soap->fpoll || soap->fpoll(soap)) { soap->error = SOAP_OK; @@ -15755,7 +17630,7 @@ soap_try_connect_command(struct soap *soap, int http_command, const char *endpoi soap->omode &= ~SOAP_IO_UDP; /* to force close */ } soap_closesock(soap); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Connect/reconnect to '%s' host='%s' path='%s' port=%d\n", endpoint?endpoint:"(null)", soap->host, soap->path, soap->port)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Connect/reconnect to '%s' host='%s' path='%s' port=%d\n", endpoint?endpoint:"(null)", soap->host, soap->path, soap->port)); if (!soap->keep_alive || !soap_valid_socket(soap->socket)) { soap->socket = soap->fopen(soap, endpoint, soap->host, soap->port); if (soap->error) @@ -15781,7 +17656,8 @@ soap_try_connect_command(struct soap *soap, int http_command, const char *endpoi soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB); if ((k & SOAP_IO) != SOAP_IO_FLUSH) soap->mode |= SOAP_IO_BUFFER; - if ((soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count))) + soap->error = soap->fpost(soap, endpoint, soap->host, soap->port, soap->path, action, count); + if (soap->error) return soap->error; #ifndef WITH_LEANER if ((k & SOAP_IO) == SOAP_IO_CHUNK) @@ -15799,6 +17675,7 @@ soap_try_connect_command(struct soap *soap, int http_command, const char *endpoi #endif /******************************************************************************/ + #ifdef WITH_NTLM #ifndef PALM_1 static int @@ -15818,15 +17695,15 @@ soap_ntlm_handshake(struct soap *soap, int command, const char *endpoint, const int s = soap->status; char *a = soap->action; short v = soap->version; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "NTLM '%s'\n", soap->ntlm_challenge)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "NTLM '%s'\n", soap->ntlm_challenge)); if (!*soap->ntlm_challenge) - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "NTLM S->C Type 1: received NTLM authentication challenge from server\n")); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "NTLM S->C Type 1: received NTLM authentication challenge from server\n")); /* S -> C 401 Unauthorized WWW-Authenticate: NTLM */ buildSmbNtlmAuthRequest(&req, userid, soap->authrealm); - soap->ntlm_challenge = soap_s2base64(soap, (unsigned char*)&req, NULL, SmbLength(&req)); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "NTLM C->S Type 2: sending NTLM authorization to server\nAuthorization: NTLM %s\n", soap->ntlm_challenge)); + soap->ntlm_challenge = soap_s2base64(soap, (unsigned char*)(void*)&req, NULL, SmbLength(&req)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "NTLM C->S Type 2: sending NTLM authorization to server\nAuthorization: NTLM %s\n", soap->ntlm_challenge)); /* C -> S GET ... Authorization: NTLM TlRMTVNTUAABAAAAA7IAAAoACgApAAAACQAJACAAAABMSUdIVENJVFlVUlNBLU1JTk9S */ @@ -15840,12 +17717,12 @@ soap_ntlm_handshake(struct soap *soap, int command, const char *endpoint, const return soap->error; soap->mode = m; soap->keep_alive = k; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "NTLM S->C Type 2: waiting on server NTLM response\n")); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "NTLM S->C Type 2: waiting on server NTLM response\n")); oldheader = soap->header; if (soap_begin_recv(soap)) if (soap->error == SOAP_EOF) return soap->error; - soap_end_recv(soap); + (void)soap_end_recv(soap); soap->header = oldheader; soap->length = l; if (soap->status != 401 && soap->status != 407) @@ -15857,8 +17734,8 @@ soap_ntlm_handshake(struct soap *soap, int command, const char *endpoint, const */ soap_base642s(soap, soap->ntlm_challenge, (char*)&ch, sizeof(tSmbNtlmAuthChallenge), NULL); buildSmbNtlmAuthResponse(&ch, &res, userid, passwd); - soap->ntlm_challenge = soap_s2base64(soap, (unsigned char*)&res, NULL, SmbLength(&res)); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "NTLM C->S Type 3: sending NTLM authorization to server\nAuthorization: NTLM %s\n", soap->ntlm_challenge)); + soap->ntlm_challenge = soap_s2base64(soap, (unsigned char*)(void*)&res, NULL, SmbLength(&res)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "NTLM C->S Type 3: sending NTLM authorization to server\nAuthorization: NTLM %s\n", soap->ntlm_challenge)); /* C -> S GET ... Authorization: NTLM TlRMTVNTUAADAAAAGAAYAHIAAAAYABgAigAAABQAFABAAAAADAAMAFQAAAASABIAYAAAAAAAAACiAAAAAYIAAFUAUgBTAEEALQBNAEkATgBPAFIAWgBhAHAAaABvAGQATABJAEcASABUAEMASQBUAFkArYfKbe/jRoW5xDxHeoxC1gBmfWiS5+iX4OAN4xBKG/IFPwfH3agtPEia6YnhsADT */ @@ -15881,14 +17758,15 @@ soap_ntlm_handshake(struct soap *soap, int command, const char *endpoint, const #endif /******************************************************************************/ -#ifndef WITH_LEAN + +#if !defined(WITH_LEAN) || defined(WITH_NTLM) SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n) -{ register int i; - register unsigned long m; - register char *p; +{ int i; + unsigned long m; + char *p; if (!t) t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1); if (!t) @@ -15923,15 +17801,16 @@ soap_s2base64(struct soap *soap, const unsigned char *s, char *t, int n) #endif /******************************************************************************/ -#ifndef WITH_LEAN + +#if !defined(WITH_LEAN) || defined(WITH_NTLM) SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n) -{ register size_t i, j; - register soap_wchar c; - register unsigned long m; - register const char *p; +{ size_t i, j; + soap_wchar c; + unsigned long m; + const char *p; if (!s || !*s) { if (n) *n = 0; @@ -15940,7 +17819,7 @@ soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n) return SOAP_NON_NULL; } if (!t) - { l = (strlen(s) + 3) / 4 * 3 + 1; /* make sure enough space for \0 */ + { l = (strlen(s) + 3) / 4 * 3 + 1; /* space for raw binary and \0 */ t = (char*)soap_malloc(soap, l); } if (!t) @@ -16004,12 +17883,13 @@ soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n) #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n) -{ register char *p; +{ char *p; if (!t) t = (char*)soap_malloc(soap, 2 * n + 1); if (!t) @@ -16018,7 +17898,7 @@ soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n) t[0] = '\0'; if (s) { for (; n > 0; n--) - { register int m = *s++; + { int m = *s++; *t++ = (char)((m >> 4) + (m > 159 ? 'a' - 10 : '0')); m &= 0x0F; *t++ = (char)(m + (m > 9 ? 'a' - 10 : '0')); @@ -16030,12 +17910,13 @@ soap_s2hex(struct soap *soap, const unsigned char *s, char *t, int n) #endif /******************************************************************************/ + #ifndef WITH_LEAN SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n) -{ register const char *p; +{ const char *p; if (!s || !*s) { if (n) *n = 0; @@ -16044,14 +17925,14 @@ soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n) return SOAP_NON_NULL; } if (!t) - { l = strlen(s) / 2 + 1; /* make sure enough space for \0 */ + { l = strlen(s) / 2 + 1; /* make sure enough space for \0 */ t = (char*)soap_malloc(soap, l); } if (!t) return NULL; p = t; while (l) - { register int d1, d2; + { int d1, d2; d1 = *s++; if (!d1) break; @@ -16070,6 +17951,7 @@ soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n) #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 SOAP_FMAC1 @@ -16077,10 +17959,11 @@ int SOAP_FMAC2 soap_puthttphdr(struct soap *soap, int status, size_t count) { if (soap->status != SOAP_GET && soap->status != SOAP_DEL && soap->status != SOAP_CONNECT) - { register const char *s = "text/xml; charset=utf-8"; - register int err = SOAP_OK; + { const char *s = "text/xml; charset=utf-8"; + int err = SOAP_OK; #ifndef WITH_LEANER - register const char *r = NULL; + const char *r = NULL; + size_t n; #endif if ((status == SOAP_FILE || soap->status == SOAP_PUT || soap->status == SOAP_POST_FILE) && soap->http_content && !strchr(s, 10) && !strchr(s, 13)) s = soap->http_content; @@ -16102,44 +17985,43 @@ soap_puthttphdr(struct soap *soap, int status, size_t count) else s = "application/dime"; } - if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary && strlen(soap->mime.boundary) + strlen(soap->mime.start ? soap->mime.start : SOAP_STR_EOS) < sizeof(soap->tmpbuf) - 80) - { register const char *t; -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "multipart/related; charset=utf-8; boundary=\"%s\"; type=\"", soap->mime.boundary); -#else - sprintf(soap->tmpbuf, "multipart/related; charset=utf-8; boundary=\"%s\"; type=\"", soap->mime.boundary); -#endif + if ((soap->mode & SOAP_ENC_MIME) && soap->mime.boundary) + { const char *t; + size_t l; + n = strlen(soap->mime.boundary); + (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), n + 53), "multipart/related; charset=utf-8; boundary=\"%s\"; type=\"", soap->mime.boundary); t = strchr(s, ';'); if (t) - strncat(soap->tmpbuf, s, t - s); + n = t - s; else - strcat(soap->tmpbuf, s); - if (soap->mime.start && strlen(soap->tmpbuf) + strlen(soap->mime.start) + 11 < sizeof(soap->tmpbuf)) - { strcat(soap->tmpbuf, "\"; start=\""); - strcat(soap->tmpbuf, soap->mime.start); + n = strlen(s); + l = strlen(soap->tmpbuf); + if (sizeof(soap->tmpbuf) - l > n) + soap_strncpy(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l, s, n); + if (soap->mime.start) + { l = strlen(soap->tmpbuf); + n = strlen(soap->mime.start); + (SOAP_SNPRINTF(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l, n + 10), "\"; start=\"%s", soap->mime.start); } - strcat(soap->tmpbuf, "\""); - if (r && strlen(soap->tmpbuf) + strlen(r) + 15 < sizeof(soap->tmpbuf)) - { strcat(soap->tmpbuf, "; start-info=\""); - strcat(soap->tmpbuf, r); - strcat(soap->tmpbuf, "\""); + if (r) + { l = strlen(soap->tmpbuf); + n = strlen(r); + (SOAP_SNPRINTF(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l, n + 15), "\"; start-info=\"%s", r); } + l = strlen(soap->tmpbuf); + if (sizeof(soap->tmpbuf) - l > 1) + soap_strncpy(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l, "\"", 1); } else - strncpy(soap->tmpbuf, s, sizeof(soap->tmpbuf)); - soap->tmpbuf[sizeof(soap->tmpbuf) - 1] = '\0'; - s = soap->tmpbuf; - if (status == SOAP_OK && soap->version == 2 && soap->action && strlen(soap->action) + strlen(s) < sizeof(soap->tmpbuf) - 80) - { -#ifdef HAVE_SNPRINTF - size_t l = strlen(s); - soap_snprintf(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l, "; action=\"%s\"", soap->action); -#else - sprintf(soap->tmpbuf + strlen(s), "; action=\"%s\"", soap->action); -#endif + soap_strcpy(soap->tmpbuf, sizeof(soap->tmpbuf), s); + if (status == SOAP_OK && soap->version == 2 && soap->action) + { size_t l = strlen(soap->tmpbuf); + n = strlen(soap->action); + (SOAP_SNPRINTF(soap->tmpbuf + l, sizeof(soap->tmpbuf) - l, n + 11), "; action=\"%s\"", soap->action); } #endif - if ((err = soap->fposthdr(soap, "Content-Type", s))) + err = soap->fposthdr(soap, "Content-Type", soap->tmpbuf); + if (err) return err; #ifdef WITH_ZLIB if ((soap->omode & SOAP_ENC_ZLIB)) @@ -16158,13 +18040,7 @@ soap_puthttphdr(struct soap *soap, int status, size_t count) err = soap->fposthdr(soap, "Transfer-Encoding", "chunked"); else #endif - if (s) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->tmpbuf, sizeof(soap->tmpbuf), "%lu", (unsigned long)count); -#else - sprintf(soap->tmpbuf, "%lu", (unsigned long)count); -#endif + { (SOAP_SNPRINTF(soap->tmpbuf, sizeof(soap->tmpbuf), 20), SOAP_ULONG_FORMAT, (ULONG64)count); err = soap->fposthdr(soap, "Content-Length", soap->tmpbuf); } if (err) @@ -16176,38 +18052,22 @@ soap_puthttphdr(struct soap *soap, int status, size_t count) #endif /******************************************************************************/ + #ifndef WITH_LEAN static const char* soap_set_validation_fault(struct soap *soap, const char *s, const char *t) { if (!t) t = SOAP_STR_EOS; if (*soap->tag) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->msgbuf, sizeof(soap->msgbuf), "Validation constraint violation: %s%s in element '%s'", s, t ? t : SOAP_STR_EOS, soap->tag); -#else - if (strlen(soap->tag) + strlen(t) < sizeof(soap->msgbuf) - 100) - sprintf(soap->msgbuf, "Validation constraint violation: %s%s in element '%s'", s, t, soap->tag); - else - sprintf(soap->msgbuf, "Validation constraint violation: %s", s); -#endif - } + (SOAP_SNPRINTF(soap->msgbuf, sizeof(soap->msgbuf), strlen(s) + strlen(t) + strlen(soap->tag) + 47), "Validation constraint violation: %s%s in element '%s'", s, t, soap->tag); else - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->msgbuf, sizeof(soap->msgbuf), "Validation constraint violation: %s%s", s, t ? t : SOAP_STR_EOS); -#else - if (strlen(soap->tag) + strlen(t) < sizeof(soap->msgbuf) - 100) - sprintf(soap->msgbuf, "Validation constraint violation: %s%s", s, t); - else - sprintf(soap->msgbuf, "Validation constraint violation: %s", s); -#endif - } + (SOAP_SNPRINTF(soap->msgbuf, sizeof(soap->msgbuf), strlen(s) + strlen(t) + 33), "Validation constraint violation: %s%s", s, t); return soap->msgbuf; } #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 void @@ -16220,8 +18080,10 @@ soap_set_fault(struct soap *soap) if (!*c) { if (soap->version == 2) *c = "SOAP-ENV:Sender"; - else + else if (soap->version == 1) *c = "SOAP-ENV:Client"; + else + *c = "at source"; } if (*s) return; @@ -16238,22 +18100,25 @@ soap_set_fault(struct soap *soap) *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL); break; case SOAP_TYPE: - *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type); + if (*soap->type) + *s = soap_set_validation_fault(soap, "type mismatch ", soap->type); + else + *s = soap_set_validation_fault(soap, "invalid value", NULL); break; case SOAP_SYNTAX_ERROR: - *s = "Well-formedness violation"; + *s = soap_set_validation_fault(soap, "syntax error", NULL); break; case SOAP_NO_TAG: - *s = "No tag: no XML root element or missing SOAP message body element"; + if (soap->version == 0 && soap->level == 0) + *s = soap_set_validation_fault(soap, "missing root element", NULL); + else if (soap->version != 0 && soap->level < 3) + *s = soap_set_validation_fault(soap, "missing SOAP message", NULL); + else + *s = soap_set_validation_fault(soap, "missing element", NULL); break; case SOAP_MUSTUNDERSTAND: *c = "SOAP-ENV:MustUnderstand"; -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->msgbuf, sizeof(soap->msgbuf), "The data in element '%s' must be understood but cannot be handled", soap->tag); -#else - strncpy(soap->msgbuf, soap->tag, sizeof(soap->msgbuf)); - soap->msgbuf[sizeof(soap->msgbuf) - 1] = '\0'; -#endif + (SOAP_SNPRINTF(soap->msgbuf, sizeof(soap->msgbuf), strlen(soap->tag) + 65), "The data in element '%s' must be understood but cannot be processed", soap->tag); *s = soap->msgbuf; break; case SOAP_VERSIONMISMATCH: @@ -16268,17 +18133,13 @@ soap_set_fault(struct soap *soap) *s = soap_set_validation_fault(soap, "namespace error", NULL); break; case SOAP_USER_ERROR: - *s = "User data error"; + *s = "User data access error"; break; case SOAP_FATAL_ERROR: - *s = "Fatal error"; + *s = "A fatal error has occurred"; break; case SOAP_NO_METHOD: -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->msgbuf, sizeof(soap->msgbuf), "Method '%s' not implemented: method name or namespace not recognized", soap->tag); -#else - sprintf(soap->msgbuf, "Method '%s' not implemented: method name or namespace not recognized", soap->tag); -#endif + (SOAP_SNPRINTF(soap->msgbuf, sizeof(soap->msgbuf), strlen(soap->tag) + 66), "Method '%s' not implemented: method name or namespace not recognized", soap->tag); *s = soap->msgbuf; break; case SOAP_NO_DATA: @@ -16348,7 +18209,7 @@ soap_set_fault(struct soap *soap) *s = "Plugin registry error"; break; case SOAP_DIME_ERROR: - *s = "DIME format error or max DIME size exceeds SOAP_MAXDIMESIZE"; + *s = "DIME format error or max DIME size exceeds SOAP_MAXDIMESIZE currently set to " SOAP_XSTRINGIFY(SOAP_MAXDIMESIZE); break; case SOAP_DIME_HREF: *s = "DIME href to missing attachment"; @@ -16370,11 +18231,7 @@ soap_set_fault(struct soap *soap) break; case SOAP_ZLIB_ERROR: #ifdef WITH_ZLIB -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->msgbuf, sizeof(soap->msgbuf), "Zlib/gzip error: '%s'", soap->d_stream->msg ? soap->d_stream->msg : SOAP_STR_EOS); -#else - sprintf(soap->msgbuf, "Zlib/gzip error: '%s'", soap->d_stream->msg ? soap->d_stream->msg : SOAP_STR_EOS); -#endif + (SOAP_SNPRINTF(soap->msgbuf, sizeof(soap->msgbuf), (soap->d_stream && soap->d_stream->msg ? strlen(soap->d_stream->msg) : 0) + 19), "Zlib/gzip error: '%s'", soap->d_stream && soap->d_stream->msg ? soap->d_stream->msg : SOAP_STR_EOS); *s = soap->msgbuf; #else *s = "Zlib/gzip not installed for (de)compression: recompile with -DWITH_GZIP"; @@ -16386,14 +18243,17 @@ soap_set_fault(struct soap *soap) case SOAP_PROHIBITED: *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL); break; - case SOAP_OCCURS: - *s = soap_set_validation_fault(soap, "occurrence violation", NULL); + case SOAP_LEVEL: + *s = "Maximum XML nesting depth level exceeded: increase maxlevel"; break; case SOAP_LENGTH: - *s = soap_set_validation_fault(soap, "content range or length violation", NULL); + *s = soap_set_validation_fault(soap, "value range or content length violation", NULL); + break; + case SOAP_OCCURS: + *s = soap_set_validation_fault(soap, "occurrence constraint violation or maxoccurs exceeded", NULL); break; case SOAP_FD_EXCEEDED: - *s = "Maximum number of open connections was reached (no define HAVE_POLL): increase FD_SETSIZE"; + *s = "Maximum number of open connections was reached: increase FD_SETSIZE or define HAVE_POLL"; break; case SOAP_UTF_ERROR: *s = "UTF content encoding error"; @@ -16407,8 +18267,15 @@ soap_set_fault(struct soap *soap) *s = soap_strerror(soap); /* *s = soap->msgbuf */ #ifndef WITH_LEAN if (strlen(soap->msgbuf) + 25 < sizeof(soap->msgbuf)) - { memmove(soap->msgbuf + 25, soap->msgbuf, strlen(soap->msgbuf) + 1); - memcpy(soap->msgbuf, "End of file or no input: ", 25); + { soap_memmove((void*)(soap->msgbuf + 25), sizeof(soap->tmpbuf) - 25, (const void*)soap->msgbuf, strlen(soap->msgbuf) + 1); + if (soap->is) +#if defined(__cplusplus) && !defined(WITH_COMPAT) + soap_memcpy((void*)soap->msgbuf, sizeof(soap->msgbuf), (const void*)"End or bad std::istream: ", 25); +#else + soap_memcpy((void*)soap->msgbuf, sizeof(soap->msgbuf), (const void*)"End at NUL buffer input: ", 25); +#endif + else + soap_memcpy((void*)soap->msgbuf, sizeof(soap->msgbuf), (const void*)"End of file or no input: ", 25); } #endif break; @@ -16419,24 +18286,15 @@ soap_set_fault(struct soap *soap) default: #ifndef WITH_NOHTTP #ifndef WITH_LEAN - if (soap->error > 200 && soap->error < 600) - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->msgbuf, sizeof(soap->msgbuf), "HTTP Error: %d %s", soap->error, http_error(soap, soap->error)); -#else - sprintf(soap->msgbuf, "HTTP Error: %d %s", soap->error, http_error(soap, soap->error)); -#endif + if (soap->error >= 200 && soap->error < 600) + { const char *t = http_error(soap, soap->error); + (SOAP_SNPRINTF(soap->msgbuf, sizeof(soap->msgbuf), strlen(t) + 54), "Error %d: HTTP %d %s", soap->error, soap->error, t); *s = soap->msgbuf; } else #endif #endif - { -#ifdef HAVE_SNPRINTF - soap_snprintf(soap->msgbuf, sizeof(soap->msgbuf), "Error %d", soap->error); -#else - sprintf(soap->msgbuf, "Error %d", soap->error); -#endif + { (SOAP_SNPRINTF(soap->msgbuf, sizeof(soap->msgbuf), 26), "Error %d", soap->error); *s = soap->msgbuf; } } @@ -16444,21 +18302,22 @@ soap_set_fault(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap *soap) -{ register int status = soap->error; +{ int status = soap->error; if (status == SOAP_OK || status == SOAP_STOP) return soap_closesock(soap); - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Sending back fault struct for error code %d\n", soap->error)); soap->keep_alive = 0; /* to terminate connection */ soap_set_fault(soap); if (soap->error < 200 && soap->error != SOAP_FAULT) soap->header = NULL; if (status != SOAP_EOF || (!soap->recv_timeout && !soap->send_timeout)) - { register int r = 1; + { int r = 1; #ifndef WITH_NOIO if (soap->fpoll && soap->fpoll(soap)) r = 0; @@ -16480,25 +18339,26 @@ soap_send_fault(struct soap *soap) soap->encodingStyle = NULL; /* no encodingStyle in Faults */ soap_serializeheader(soap); soap_serializefault(soap); - soap_begin_count(soap); + (void)soap_begin_count(soap); if (soap->mode & SOAP_IO_LENGTH) - { soap_envelope_begin_out(soap); - soap_putheader(soap); - soap_body_begin_out(soap); - soap_putfault(soap); - soap_body_end_out(soap); - soap_envelope_end_out(soap); - } - soap_end_count(soap); + { if (soap_envelope_begin_out(soap) + || soap_putheader(soap) + || soap_body_begin_out(soap) + || soap_putfault(soap) + || soap_body_end_out(soap) + || soap_envelope_end_out(soap)) + return soap_closesock(soap); + } + (void)soap_end_count(soap); if (soap_response(soap, status) || soap_envelope_begin_out(soap) || soap_putheader(soap) || soap_body_begin_out(soap) || soap_putfault(soap) || soap_body_end_out(soap) - || soap_envelope_end_out(soap)) + || soap_envelope_end_out(soap) + || soap_end_send(soap)) return soap_closesock(soap); - soap_end_send(soap); } } soap->error = status; @@ -16507,13 +18367,14 @@ soap_send_fault(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap *soap, int check) -{ register int status = soap->error; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Check if receiving SOAP Fault\n")); +{ int status = soap->status; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Check (%d) if receiving SOAP Fault (status = %d)\n", check, status)); if (!check) { /* try getfault when no tag or tag mismatched at level 2, otherwise ret */ if (soap->error != SOAP_NO_TAG @@ -16521,55 +18382,64 @@ soap_recv_fault(struct soap *soap, int check) return soap->error; } else if (soap->version == 0) /* check == 1 but no SOAP: do not parse SOAP Fault */ + { + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Not a SOAP protocol\n")); return SOAP_OK; + } soap->error = SOAP_OK; if (soap_getfault(soap)) { /* check flag set: check if SOAP Fault is present, if not just return */ - if (check && soap->error == SOAP_TAG_MISMATCH && soap->level == 2) + if (check && ((soap->error == SOAP_TAG_MISMATCH && soap->level == 2) || soap->error == SOAP_NO_TAG)) return soap->error = SOAP_OK; - DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed at level %u tag '%s'\n", soap->level, soap->tag)); + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Error: soap_get_soapfault() failed at level %u tag '%s'\n", soap->level, soap->tag)); *soap_faultcode(soap) = (soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client"); - soap->error = status; + if (status) + soap->error = status; + else + soap->error = status = SOAP_NO_DATA; soap_set_fault(soap); } else - { register const char *s = *soap_faultcode(soap); - if (!soap_match_tag(soap, s, "SOAP-ENV:Server") || !soap_match_tag(soap, s, "SOAP-ENV:Receiver")) + { const char *s = *soap_faultcode(soap); + if (!soap_match_tag(soap, s, "SOAP-ENV:Server") + || !soap_match_tag(soap, s, "SOAP-ENV:Receiver")) status = SOAP_SVR_FAULT; - else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") || !soap_match_tag(soap, s, "SOAP-ENV:Sender")) + else if (!soap_match_tag(soap, s, "SOAP-ENV:Client") + || !soap_match_tag(soap, s, "SOAP-ENV:Sender")) status = SOAP_CLI_FAULT; else if (!soap_match_tag(soap, s, "SOAP-ENV:MustUnderstand")) status = SOAP_MUSTUNDERSTAND; else if (!soap_match_tag(soap, s, "SOAP-ENV:VersionMismatch")) status = SOAP_VERSIONMISMATCH; else - { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Received SOAP Fault code %s\n", s)); + { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Received SOAP Fault code %s\n", s)); status = SOAP_FAULT; } if (!soap_body_end_in(soap)) soap_envelope_end_in(soap); } - soap_end_recv(soap); + (void)soap_end_recv(soap); soap->error = status; return soap_closesock(soap); } #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap *soap, int httpstatuscode) -{ register soap_mode m = soap->omode; +{ soap_mode m = soap->omode; if (!(m & SOAP_IO_UDP)) { soap->count = 0; if ((m & SOAP_IO) == SOAP_IO_CHUNK) soap->omode = (m & ~SOAP_IO) | SOAP_IO_BUFFER; - soap_response(soap, httpstatuscode); - soap_end_send(soap); /* force end of sends */ - soap->error = SOAP_STOP; /* stops the server (from returning a response) */ + (void)soap_response(soap, httpstatuscode); + (void)soap_end_send(soap); /* force end of sends */ + soap->error = SOAP_STOP; /* stops the server (from returning another response */ soap->omode = m; } return soap_closesock(soap); @@ -16578,6 +18448,7 @@ soap_send_empty_response(struct soap *soap, int httpstatuscode) #endif /******************************************************************************/ + #ifndef WITH_NOHTTP #ifndef PALM_1 SOAP_FMAC1 @@ -16586,14 +18457,28 @@ SOAP_FMAC2 soap_recv_empty_response(struct soap *soap) { if (!(soap->omode & SOAP_IO_UDP)) { if (!soap_begin_recv(soap)) - { + { if (soap->body) + { if ((soap->status != 400 && soap->status != 500) + || soap_envelope_begin_in(soap) + || soap_recv_header(soap) + || soap_body_begin_in(soap)) + { #ifndef WITH_LEAN - if (soap->body) - soap_get_http_body(soap, NULL); /* read (empty?) HTTP body and discard */ + const char *s = soap_get_http_body(soap, NULL); +#endif + (void)soap_end_recv(soap); +#ifndef WITH_LEAN + if (s) + soap_set_receiver_error(soap, "HTTP Error", s, soap->status); #endif - soap_end_recv(soap); + } + else + return soap_recv_fault(soap, 1); + } + else + (void)soap_end_recv(soap); } - else if (soap->error == SOAP_NO_DATA || soap->error == 202) + else if (soap->error == SOAP_NO_DATA || soap->error == 200 || soap->error == 202) soap->error = SOAP_OK; } return soap_closesock(soap); @@ -16602,17 +18487,18 @@ soap_recv_empty_response(struct soap *soap) #endif /******************************************************************************/ + #ifndef WITH_NOIO #ifndef PALM_1 static const char* soap_strerror(struct soap *soap) -{ register int err = soap->errnum; +{ int err = soap->errnum; *soap->msgbuf = '\0'; if (err) { #ifndef WIN32 # ifdef HAVE_STRERROR_R -# ifdef _GNU_SOURCE +# if defined(_GNU_SOURCE) && !defined(__ANDROID__) return strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* GNU-specific */ # else strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ @@ -16639,12 +18525,13 @@ soap_strerror(struct soap *soap) #endif } else - { char *s = soap->msgbuf; + { int rt = soap->recv_timeout, st = soap->send_timeout; #ifndef WITH_LEAN - int rt = soap->recv_timeout, st = soap->send_timeout; int ru = ' ', su = ' '; #endif - strcpy(s, "Operation interrupted or timed out"); + soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "message transfer interrupted"); + if (rt || st) + soap_strcpy(soap->msgbuf + 28, sizeof(soap->msgbuf) - 28, " or timed out"); #ifndef WITH_LEAN if (rt < 0) { rt = -rt; @@ -16655,22 +18542,12 @@ soap_strerror(struct soap *soap) su = 'u'; } if (rt) - { -#ifdef HAVE_SNPRINTF - size_t l = strlen(s); - soap_snprintf(s + l, sizeof(soap->msgbuf) - l, " (%d%cs recv delay)", rt, ru); -#else - sprintf(s + strlen(s), " (%d%cs recv delay)", rt, ru); -#endif + { size_t l = strlen(soap->msgbuf); + (SOAP_SNPRINTF(soap->msgbuf + l, sizeof(soap->msgbuf) - l, 36), " (%d%cs recv delay)", rt, ru); } if (st) - { -#ifdef HAVE_SNPRINTF - size_t l = strlen(s); - soap_snprintf(s + l, sizeof(soap->msgbuf) - l, " (%d%cs send delay)", st, su); -#else - sprintf(s + strlen(s), " (%d%cs send delay)", st, su); -#endif + { size_t l = strlen(soap->msgbuf); + (SOAP_SNPRINTF(soap->msgbuf + l, sizeof(soap->msgbuf) - l, 36), " (%d%cs send delay)", st, su); } #endif } @@ -16680,6 +18557,7 @@ soap_strerror(struct soap *soap) #endif /******************************************************************************/ + #ifndef PALM_2 static int soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcodeQName, const char *faultstring, const char *faultdetailXML, int soaperror) @@ -16688,7 +18566,7 @@ soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcod *soap_faultsubcode(soap) = faultsubcodeQName; *soap_faultstring(soap) = faultstring; if (faultdetailXML && *faultdetailXML) - { register const char **s = soap_faultdetail(soap); + { const char **s = soap_faultdetail(soap); if (s) *s = faultdetailXML; } @@ -16697,26 +18575,29 @@ soap_set_error(struct soap *soap, const char *faultcode, const char *faultsubcod #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap *soap, const char *faultstring, const char *faultdetailXML, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", NULL, faultstring, faultdetailXML, soaperror); +{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Sender" : soap->version == 1 ? "SOAP-ENV:Client" : "at source", NULL, faultstring, faultdetailXML, soaperror); } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *faultdetailXML, int soaperror) -{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", NULL, faultstring, faultdetailXML, soaperror); +{ return soap_set_error(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : soap->version == 1 ? "SOAP-ENV:Server" : "is internal", NULL, faultstring, faultdetailXML, soaperror); } #endif /******************************************************************************/ + #ifndef PALM_2 static int soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubcodeQName, const char *faultstring, const char *faultdetailXML) @@ -16732,6 +18613,7 @@ soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultsubco #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -16742,16 +18624,18 @@ soap_sender_fault(struct soap *soap, const char *faultstring, const char *faultd #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap *soap, const char *faultsubcodeQName, const char *faultstring, const char *faultdetailXML) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : "SOAP-ENV:Client", faultsubcodeQName, faultstring, faultdetailXML); +{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Sender" : soap->version == 1 ? "SOAP-ENV:Client" : "at source", faultsubcodeQName, faultstring, faultdetailXML); } #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int @@ -16762,16 +18646,18 @@ soap_receiver_fault(struct soap *soap, const char *faultstring, const char *faul #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap *soap, const char *faultsubcodeQName, const char *faultstring, const char *faultdetailXML) -{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : "SOAP-ENV:Server", faultsubcodeQName, faultstring, faultdetailXML); +{ return soap_copy_fault(soap, soap->version == 2 ? "SOAP-ENV:Receiver" : soap->version == 1 ? "SOAP-ENV:Server" : "is internal", faultsubcodeQName, faultstring, faultdetailXML); } #endif /******************************************************************************/ + #ifndef PALM_2 #ifndef WITH_NOSTDLIB SOAP_FMAC1 @@ -16779,23 +18665,26 @@ void SOAP_FMAC2 soap_print_fault(struct soap *soap, FILE *fd) { if (soap_check_state(soap)) - fprintf(fd, "Error: soap struct state not initialized\n"); + fprintf(fd, "Error: soap struct state not initialized with soap_init\n"); else if (soap->error) { const char **c, *v = NULL, *s, *d; c = soap_faultcode(soap); if (!*c) - soap_set_fault(soap); + { soap_set_fault(soap); + c = soap_faultcode(soap); + } if (soap->version == 2) v = soap_check_faultsubcode(soap); s = *soap_faultstring(soap); d = soap_check_faultdetail(soap); - fprintf(fd, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, *c, v ? v : "no subcode", s ? s : "[no reason]", d ? d : "[no detail]"); + fprintf(fd, "%s%d fault %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, *c, v ? v : "no subcode", s ? s : "[no reason]", d ? d : "[no detail]"); } } #endif #endif /******************************************************************************/ + #ifdef __cplusplus #ifndef WITH_LEAN #ifndef WITH_NOSTDLIB @@ -16805,19 +18694,21 @@ void SOAP_FMAC2 soap_stream_fault(struct soap *soap, std::ostream& os) { if (soap_check_state(soap)) - os << "Error: soap struct state not initialized\n"; + os << "Error: soap struct state not initialized with soap_init\n"; else if (soap->error) { const char **c, *v = NULL, *s, *d; c = soap_faultcode(soap); if (!*c) - soap_set_fault(soap); + { soap_set_fault(soap); + c = soap_faultcode(soap); + } if (soap->version == 2) v = soap_check_faultsubcode(soap); s = *soap_faultstring(soap); d = soap_check_faultdetail(soap); os << (soap->version ? "SOAP 1." : "Error ") << (soap->version ? (int)soap->version : soap->error) - << " fault: " << *c + << " fault " << *c << "[" << (v ? v : "no subcode") << "]" << std::endl << "\"" << (s ? s : "[no reason]") << "\"" @@ -16832,6 +18723,7 @@ soap_stream_fault(struct soap *soap, std::ostream& os) #endif /******************************************************************************/ + #ifndef WITH_LEAN #ifndef WITH_NOSTDLIB SOAP_FMAC1 @@ -16839,28 +18731,20 @@ char* SOAP_FMAC2 soap_sprint_fault(struct soap *soap, char *buf, size_t len) { if (soap_check_state(soap)) - { strncpy(buf, "Error: soap struct not initialized", len); - buf[len - 1] = '\0'; + { soap_strcpy(buf, len, "Error: soap struct not initialized with soap_init"); } else if (soap->error) { const char **c, *v = NULL, *s, *d; c = soap_faultcode(soap); if (!*c) - soap_set_fault(soap); + { soap_set_fault(soap); + c = soap_faultcode(soap); + } if (soap->version == 2) - v = *soap_faultsubcode(soap); + v = soap_check_faultsubcode(soap); s = *soap_faultstring(soap); d = soap_check_faultdetail(soap); -#ifdef HAVE_SNPRINTF - soap_snprintf(buf, len, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, *c, v ? v : "no subcode", s ? s : "[no reason]", d ? d : "[no detail]"); -#else - if (len > 40 + (v ? strlen(v) : 0) + (s ? strlen(s) : 0) + (d ? strlen(d) : 0)) - sprintf(buf, "%s%d fault: %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, *c, v ? v : "no subcode", s ? s : "[no reason]", d ? d : "[no detail]"); - else if (len > 40) - sprintf(buf, "%s%d fault: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, *c); - else - buf[0] = '\0'; -#endif + (SOAP_SNPRINTF(buf, len, strlen(*c) + strlen(v) + strlen(s) + strlen(d) + 72), "%s%d fault %s [%s]\n\"%s\"\nDetail: %s\n", soap->version ? "SOAP 1." : "Error ", soap->version ? (int)soap->version : soap->error, *c, v ? v : "no subcode", s ? s : "[no reason]", d ? d : "[no detail]"); } return buf; } @@ -16868,6 +18752,7 @@ soap_sprint_fault(struct soap *soap, char *buf, size_t len) #endif /******************************************************************************/ + #ifndef PALM_1 #ifndef WITH_NOSTDLIB SOAP_FMAC1 @@ -16877,7 +18762,7 @@ soap_print_fault_location(struct soap *soap, FILE *fd) { #ifndef WITH_LEAN int i, j, c1, c2; - if (soap->error && soap->error != SOAP_STOP && soap->bufidx <= soap->buflen && soap->buflen > 0 && soap->buflen <= SOAP_BUFLEN) + if (soap->error && soap->error != SOAP_STOP && soap->bufidx <= soap->buflen && soap->buflen > 0 && soap->buflen <= sizeof(soap->buf)) { i = (int)soap->bufidx - 1; if (i <= 0) i = 0; @@ -16895,20 +18780,25 @@ soap_print_fault_location(struct soap *soap, FILE *fd) soap->buf[i] = (char)c1; soap->buf[j] = (char)c2; } +#else + (void)soap; + (void)fd; #endif } #endif #endif /******************************************************************************/ + #ifndef PALM_1 SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void *arg) -{ register struct soap_plugin *p; - register int r; - if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin)))) +{ struct soap_plugin *p; + int r; + p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin)); + if (!p) return soap->error = SOAP_EOM; p->id = NULL; p->data = NULL; @@ -16928,10 +18818,11 @@ soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct #endif /******************************************************************************/ + #ifndef PALM_1 static void * fplugin(struct soap *soap, const char *id) -{ register struct soap_plugin *p; +{ struct soap_plugin *p; for (p = soap->plugins; p; p = p->next) if (p->id == id || !strcmp(p->id, id)) return p->data; @@ -16940,6 +18831,7 @@ fplugin(struct soap *soap, const char *id) #endif /******************************************************************************/ + #ifndef PALM_2 SOAP_FMAC1 void * @@ -16950,23 +18842,29 @@ soap_lookup_plugin(struct soap *soap, const char *id) #endif /******************************************************************************/ + #ifdef __cplusplus } #endif /******************************************************************************\ * - * C++ soap struct methods + * C++ soap struct methods * \******************************************************************************/ #ifdef __cplusplus soap::soap() { soap_init(this); + /* no logs to prevent leaks when user calls soap_init() on this context */ + soap_set_test_logfile(this, NULL); + soap_set_sent_logfile(this, NULL); + soap_set_recv_logfile(this, NULL); } #endif /******************************************************************************/ + #ifdef __cplusplus soap::soap(soap_mode m) { soap_init1(this, m); @@ -16974,6 +18872,7 @@ soap::soap(soap_mode m) #endif /******************************************************************************/ + #ifdef __cplusplus soap::soap(soap_mode im, soap_mode om) { soap_init2(this, im, om); @@ -16981,6 +18880,7 @@ soap::soap(soap_mode im, soap_mode om) #endif /******************************************************************************/ + #ifdef __cplusplus soap::soap(const struct soap& soap) { soap_copy_context(this, &soap); @@ -16988,11 +18888,19 @@ soap::soap(const struct soap& soap) #endif /******************************************************************************/ + +#ifdef __cplusplus +struct soap& soap::operator=(const struct soap& soap) +{ soap_copy_context(this, &soap); + return *this; +} +#endif + +/******************************************************************************/ + #ifdef __cplusplus soap::~soap() -{ soap_destroy(this); - soap_end(this); - soap_done(this); +{ soap_done(this); } #endif diff --git a/dep/gsoap/stdsoap2.h b/dep/gsoap/stdsoap2.h index 31aece07f1a..7b1a0eb8b77 100644 --- a/dep/gsoap/stdsoap2.h +++ b/dep/gsoap/stdsoap2.h @@ -1,10 +1,10 @@ /* - stdsoap2.h 2.8.17r + stdsoap2.h 2.8.33 - gSOAP runtime engine + gSOAP runtime engine gSOAP XML Web services tools -Copyright (C) 2000-2013, Robert van Engelen, Genivia Inc., All Rights Reserved. +Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc., All Rights Reserved. This part of the software is released under ONE of the following licenses: GPL, or the gSOAP public license, or Genivia's license for commercial use. -------------------------------------------------------------------------------- @@ -24,7 +24,7 @@ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Initial Developer of the Original Code is Robert A. van Engelen. -Copyright (C) 2000-2013, Robert van Engelen, Genivia Inc., All Rights Reserved. +Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc., All Rights Reserved. -------------------------------------------------------------------------------- GPL license. @@ -51,10 +51,10 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com -------------------------------------------------------------------------------- */ -#define GSOAP_VERSION 20817 +#define GSOAP_VERSION 20833 #ifdef WITH_SOAPDEFS_H -# include "soapdefs.h" /* include user-defined stuff */ +# include "soapdefs.h" /* include user-defined stuff in soapdefs.h */ #endif #ifndef _THREAD_SAFE @@ -67,43 +67,63 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif #endif -#ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */ +#ifdef WIN32 +# ifdef SOAP_STD_EXPORTS /* dllexport the API functions and classes */ +# ifndef SOAP_STD_API +# define SOAP_STD_API __declspec(dllexport) +# endif +# ifndef SOAP_CMAC +# define SOAP_CMAC SOAP_STD_API /* export soap struct and generated classes */ +# endif +# ifndef SOAP_FMAC1 +# define SOAP_FMAC1 SOAP_STD_API /* export stdsoap2.cpp API */ +# endif +# ifndef SOAP_FMAC3 +# define SOAP_FMAC3 SOAP_STD_API /* export soapC.cpp serializers API */ +# endif +# ifndef SOAP_FMAC5 +# define SOAP_FMAC5 SOAP_STD_API /* export soapClient.cpp and soapServer.cpp API */ +# endif +# endif +#endif + +#ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */ # define SOAP_FMAC1 #endif -#ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */ +#ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */ # define SOAP_FMAC2 #endif -#ifndef SOAP_FMAC3 /* (de)serializer declaration macro */ +#ifndef SOAP_FMAC3 /* (de)serializer declaration macro */ # define SOAP_FMAC3 #endif -#ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */ +#ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */ # define SOAP_FMAC3S SOAP_FMAC3 #endif -#ifndef SOAP_FMAC4 /* (de)serializer declaration macro */ +#ifndef SOAP_FMAC4 /* (de)serializer declaration macro */ # define SOAP_FMAC4 #endif -#ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */ +#ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */ # define SOAP_FMAC4S SOAP_FMAC4 #endif -#ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */ +#ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */ # define SOAP_FMAC5 #endif -#ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */ +#ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */ # define SOAP_FMAC6 #endif -#ifndef SOAP_CMAC /* class declaration macro */ +#ifndef SOAP_CMAC /* class declaration macro */ # define SOAP_CMAC #endif -#ifndef SOAP_NMAC /* namespace table declaration macro */ +#ifndef SOAP_NMAC /* namespace table declaration macro */ # define SOAP_NMAC #endif @@ -111,14 +131,16 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define SOAP_SOURCE_STAMP(str) #endif -/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */ -#ifndef WITH_FAST -# define WITH_FAST -#endif - #ifndef STDSOAP_H #define STDSOAP_H +#define SOAP_XSTRINGIFY(s) SOAP_STRINGIFY(s) +#define SOAP_STRINGIFY(s) #s + +#ifdef SOAPDEFS_H +# include SOAP_XSTRINGIFY(SOAPDEFS_H) /* include user-defined "SOAPDEFS_H" */ +#endif + #if defined(__vxworks) || defined(__VXWORKS__) # ifndef VXWORKS # define VXWORKS @@ -131,7 +153,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif #endif -/* for legacy purposes we use WIN32 macro even though 64 bit is supported */ +/* for legacy purposes we use WIN32 macro, even when WIN64 is supported */ #ifdef _WIN64 # ifndef WIN32 # define WIN32 @@ -193,6 +215,12 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif #endif +#if defined(__sun) && defined(__SVR4) +# ifndef SUN_OS +# define SUN_OS +# endif +#endif + #ifdef HAVE_CONFIG_H # include "config.h" # if defined(WITH_OPENSSL) @@ -213,7 +241,13 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif #else # if defined(UNDER_CE) -# define WITH_LEAN +# define SOAP_BUFLEN (2048) +# define SOAP_PTRHASH (32) +# define SOAP_IDHASH (19) +# define SOAP_BLKLEN (32) +# define SOAP_TAGLEN (128) +# define SOAP_HDRLEN (1024) +# define SOAP_MAXDIMS (4) # define HAVE_SSCANF # elif defined(WIN32) # if _MSC_VER >= 1400 @@ -227,8 +261,8 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define HAVE_STRTOL # define HAVE_STRTOUL # if _MSC_VER >= 1300 -# define HAVE_STRTOLL /* use _strtoi64 */ -# define HAVE_STRTOULL /* use _strtoui64 */ +# define HAVE_STRTOLL /* use _strtoi64 */ +# define HAVE_STRTOULL /* use _strtoui64 */ # endif # define HAVE_SYS_TIMEB_H # define HAVE_FTIME @@ -256,6 +290,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # elif defined(__APPLE__) # define HAVE_POLL # define HAVE_SNPRINTF +# define HAVE_STRLCPY # define HAVE_STRRCHR # define HAVE_STRTOD # define HAVE_SSCANF @@ -264,6 +299,8 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define HAVE_SPRINTF_L # define HAVE_STRTOL # define HAVE_STRTOUL +# define HAVE_STRTOLL +# define HAVE_STRTOULL # define HAVE_RAND_R # define HAVE_GMTIME_R # define HAVE_TM_GMTOFF @@ -299,12 +336,19 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define HAVE_WCTOMB # define HAVE_MBTOWC # elif defined(HP_UX) +# include <sys/_inttypes.h> +extern intmax_t __strtoll(const char*, char**, int); +extern intmax_t __strtoull(const char*, char**, int); +# define strtoll __strtoll +# define strtoull __strtoull # define HAVE_SNPRINTF # define HAVE_STRRCHR # define HAVE_STRTOD # define HAVE_SSCANF # define HAVE_STRTOL # define HAVE_STRTOUL +# define HAVE_STRTOLL +# define HAVE_STRTOULL # define HAVE_SYS_TIMEB_H # define HAVE_FTIME # define HAVE_RAND_R @@ -316,6 +360,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # elif defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) # define HAVE_POLL # define HAVE_SNPRINTF +# define HAVE_STRLCPY # define HAVE_STRRCHR # define HAVE_STRTOD # define HAVE_SSCANF @@ -415,7 +460,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # elif defined(PALM) # define WITH_LEAN # define HAVE_STRTOD /* strtod() is defined in palmFunctions.h */ -# include <stdlib.h> /* Needs to be included before unix headers */ +# include <stdlib.h> /* Needs to be included before unix headers */ # include <sys_types.h> # define IGNORE_STDIO_STUBS # include <StdIOPalm.h> @@ -425,7 +470,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # elif defined(SYMBIAN) # define WITH_LEAN # define WITH_NONAMESPACES -# define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */ +# define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */ # include <e32def.h> # include <sys/ioctl.h> # elif defined(VXWORKS) @@ -478,6 +523,8 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define HAVE_SSCANF # define HAVE_STRTOL # define HAVE_STRTOUL +# define HAVE_STRTOLL +# define HAVE_STRTOULL # define HAVE_SYS_TIMEB_H # define HAVE_FTIME # define HAVE_RAND_R @@ -500,14 +547,15 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define HAVE_GETHOSTBYNAME_R # define HAVE_GMTIME_R # define HAVE_LOCALTIME_R -# else -/* Default assumptions for supported functions */ +# else /* Default assumptions for supported library functions when not including config.h */ # define HAVE_SNPRINTF # define HAVE_STRRCHR # define HAVE_STRTOD # define HAVE_SSCANF # define HAVE_STRTOL # define HAVE_STRTOUL +# define HAVE_STRTOLL +# define HAVE_STRTOULL # define HAVE_SYS_TIMEB_H # define HAVE_FTIME # define HAVE_RAND_R @@ -522,8 +570,17 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif #endif -/* gSOAP 2.7.15 and higher: always retain CDATA in literal XML, unless WITH_LEAN or WITH_NOCDATA */ +#ifdef WITH_LEANER +# ifndef WITH_LEAN +# define WITH_LEAN +# endif +#endif + +/* gSOAP 2.7.15 and higher: always use FAST and retain CDATA in literal XML, unless WITH_LEAN or WITH_NOCDATA */ #ifndef WITH_LEAN +# ifndef WITH_FAST +# define WITH_FAST +# endif # ifndef WITH_NOCDATA # ifndef WITH_CDATA # define WITH_CDATA @@ -531,34 +588,28 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif #endif -#ifdef WITH_LEANER -# ifndef WITH_LEAN -# define WITH_LEAN -# endif -#endif - #ifdef WITH_LEAN # ifdef WITH_COOKIES # error "Cannot build WITH_LEAN code WITH_COOKIES enabled" # endif #endif -/* native Win, HP-UX, and AIX compilers don't like empty structs */ -#if defined(WIN32) || defined(HP_UX) || defined(_AIX) || defined(AIX) || defined(VXWORKS) +/* allowing empty struct/union in C is a GNU extension */ +#if !defined(__GNU__) # define WITH_NOEMPTYSTRUCT #endif +/* silence clang's C99 variadic macro warnings */ +#ifdef __clang__ +# pragma clang diagnostic ignored "-Wvariadic-macros" +#endif + #ifdef WITH_PURE_VIRTUAL # define SOAP_PURE_VIRTUAL = 0 #else # define SOAP_PURE_VIRTUAL #endif -#ifdef HP_UX -# undef HAVE_STRTOLL -# undef HAVE_STRTOULL -#endif - /* older OpenVMS TCP/IP stacks cannot handle 65536 bytes */ #ifdef __VMS # ifndef SOAP_BUFLEN @@ -566,12 +617,14 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif #endif -/* if we have xlocale.h we use it to avoid decimal point conversion issues */ +/* if we have xlocale.h then we can use it WITH_C_LOCALE enabled to avoid decimal point conversion issues */ #ifdef WITH_C_LOCALE # ifdef WIN32 # include <locale.h> +# define SOAP_LOCALE(soap) ((soap)->c_locale ? (soap)->c_locale : ((soap)->c_locale = _create_locale(LC_ALL, "C"))) # else # include <xlocale.h> +# define SOAP_LOCALE(soap) ((soap)->c_locale ? (soap)->c_locale : ((soap)->c_locale = newlocale(LC_ALL_MASK, "C", NULL))) # endif #else # undef HAVE_STRTOF_L @@ -589,7 +642,6 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # define LONG64 long long # define ULONG64 long long # define DBL_PINFTY (1.1579208923716189e77) -# define WITH_NOEMPTYSTRUCT # undef HAVE_WCTOMB # undef HAVE_MBTOWC # undef HAVE_GMTIME_R @@ -622,8 +674,20 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # include <stdio.h> # include <string.h> # endif -# include <ctype.h> -# include <limits.h> +# if !defined(HAVE_CONFIG_H) || defined(HAVE_CTYPE_H) +# include <ctype.h> +# endif +# if !defined(HAVE_CONFIG_H) || defined(HAVE_LIMITS_H) +# include <limits.h> /* for MB_LEN_MAX */ +# endif +# if !defined(HAVE_CONFIG_H) || defined(HAVE_FLOAT_H) +# include <float.h> /* for INFINITY */ +# endif +# if !defined(HAVE_CONFIG_H) || defined(HAVE_MATH_H) +# ifndef PALM +# include <math.h> /* for isnan() and isinf() */ +# endif +# endif #endif #ifdef WITH_NTLM @@ -634,9 +698,13 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # include <poll.h> #endif -#if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT) -# include <string> -# include <iostream> +#if defined(__cplusplus) +# include <new> +# include <memory> +# if !defined(WITH_COMPAT) +# include <string> +# include <iostream> +# endif #endif #ifdef WITH_NOHTTP @@ -659,7 +727,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif # ifndef WITH_LEAN # ifdef HAVE_SYS_TIMEB_H -# include <sys/timeb.h> /* for ftime() */ +# include <sys/timeb.h> /* for ftime() */ # endif # include <time.h> # endif @@ -689,8 +757,8 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif # endif # ifdef SUN_OS -# include <sys/stream.h> /* SUN */ -# include <sys/socketvar.h> /* SUN < 2.8 (?) */ +# include <sys/stream.h> /* SUN */ +# include <sys/socketvar.h> /* only needed with SUN < 2.8 ? */ # endif # ifdef VXWORKS # ifdef _WRS_KERNEL @@ -703,7 +771,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # ifdef OS390 # include <netinet/tcp_var.h> # else -# include <netinet/tcp.h> /* TCP_NODELAY */ +# include <netinet/tcp.h> /* TCP_NODELAY, TCP_FASTOPEN */ # endif # include <arpa/inet.h> # endif @@ -798,6 +866,10 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com # endif #endif +#ifdef WITH_SYSTEMSSL +# include <gskssl.h> +#endif + #ifdef WITH_GZIP # ifndef WITH_ZLIB # define WITH_ZLIB @@ -805,21 +877,15 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com #endif #ifdef WITH_CASEINSENSITIVETAGS -# define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ +# define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ #else -# define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ +# define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ #endif #ifdef WITH_ZLIB # include <zlib.h> #endif -#ifndef WITH_NOSTDLIB -# ifndef PALM -# include <math.h> /* for isnan() */ -# endif -#endif - /* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and internal operations (in file TEST.log) */ /* #define DEBUG_STAMP */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and time-stamped operations (in file TEST.log) */ @@ -828,7 +894,7 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com extern "C" { #endif -/* Portability: define SOAP_SOCKLEN_T */ +/* Portability (X/Open, BSD sockets etc): define SOAP_SOCKLEN_T as socklen_t or int or ... */ #if defined(_AIX) || defined(AIX) # if defined(_AIX43) # define SOAP_SOCKLEN_T socklen_t @@ -837,14 +903,21 @@ extern "C" { # endif #elif defined(SOCKLEN_T) # define SOAP_SOCKLEN_T SOCKLEN_T -#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) || defined(__QNX__) || defined(QNX) || defined(OS390) || defined(__ANDROID__) +#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) || defined(__QNX__) || defined(QNX) || defined(OS390) || defined(__ANDROID__) || defined(_XOPEN_SOURCE) # define SOAP_SOCKLEN_T socklen_t #elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) || defined(HP_UX) # define SOAP_SOCKLEN_T int -#else +#elif !defined(SOAP_SOCKLEN_T) # define SOAP_SOCKLEN_T size_t #endif +/* AIX DCE threads portability: define SOAP_FUNC_R_ERR gmtime_r and localtime_r err ret val as -1 */ +#ifdef _AIX32_THREADS +# define SOAP_FUNC_R_ERR (-1) +#elif !defined(SOAP_FUNC_R_ERR) +# define SOAP_FUNC_R_ERR (NULL) +#endif + #ifndef SOAP_SOCKET # ifdef WIN32 # define SOAP_SOCKET SOCKET @@ -858,8 +931,8 @@ extern "C" { #define SOAP_INVALID_SOCKET ((SOAP_SOCKET)-1) #define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET) -#define SOAP_SHUT_WR 1 -#define SOAP_SHUT_RDWR 2 +#define SOAP_SHUT_WR (1) +#define SOAP_SHUT_RDWR (2) #ifndef SOAP_GAI_STRERROR # define SOAP_GAI_STRERROR gai_strerror @@ -884,6 +957,17 @@ extern "C" { #if defined(SYMBIAN) # define LONG64 long # define ULONG64 unsigned LONG64 +#elif !defined(__cplusplus) && defined(__STDC__) && !defined(__STDC_VERSION__) /* C90? */ +# define LONG64 long +# define ULONG64 unsigned LONG64 +# ifndef SOAP_LONG_FORMAT +# define SOAP_LONG_FORMAT "%ld" +# endif +# ifndef SOAP_ULONG_FORMAT +# define SOAP_ULONG_FORMAT "%lu" +# endif +# define soap_strtoll soap_strtol +# define soap_strtoull soap_strtoul #elif !defined(WIN32) || defined(CYGWIN) || defined(__GLIBC__) || defined(__GNU__) # ifndef LONG64 # if defined(HAVE_INTTYPES_H) @@ -942,11 +1026,11 @@ extern "C" { #endif #ifndef SOAP_LONG_FORMAT -# define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ +# define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ #endif #ifndef SOAP_ULONG_FORMAT -# define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ +# define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ #endif #if defined(WIN32) && !defined(CYGWIN) @@ -972,11 +1056,17 @@ extern "C" { # define SOAP_EWOULDBLOCK WSAEWOULDBLOCK # define SOAP_EINPROGRESS WSAEINPROGRESS # define SOAP_EADDRINUSE WSAEADDRINUSE +# define SOAP_ECONNREFUSED WSAECONNREFUSED #else -# define SOAP_ERANGE ERANGE +# ifdef ERANGE +# define SOAP_ERANGE ERANGE +# else +# define SOAP_ERANGE (34) +# endif # define SOAP_EINTR EINTR # define SOAP_EAGAIN EAGAIN # define SOAP_EADDRINUSE EADDRINUSE +# define SOAP_ECONNREFUSED ECONNREFUSED # ifdef SYMBIAN # define SOAP_EWOULDBLOCK 9898 # define SOAP_EINPROGRESS 9899 @@ -1056,45 +1146,109 @@ extern "C" { # define SOAP_HDRLEN (1024) # endif #endif +#ifndef SOAP_TMPLEN +# ifndef WITH_LEAN +# define SOAP_TMPLEN (1024) /* maximum length of msgbuf and tmpbuf short message buffers, must be >=1024 */ +# else +# define SOAP_TMPLEN (1024) +# endif +#endif #ifndef SOAP_MAXDIMS # ifndef WITH_LEAN -# define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ +# define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ # else -# define SOAP_MAXDIMS (4) +# define SOAP_MAXDIMS (4) +# endif +#endif +#ifndef SOAP_MAXPTRS +# ifndef WITH_LEAN +# define SOAP_MAXPTRS (4) /* maximum depth + 1 of id-ref deserialized pointer types (int* has depth 0, int*** has depth 2) */ +# else +# define SOAP_MAXPTRS (2) # endif #endif #ifndef SOAP_MAXLOGS -# define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */ +# define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */ # define SOAP_INDEX_RECV (0) # define SOAP_INDEX_SENT (1) # define SOAP_INDEX_TEST (2) #endif +/* Tag name of multiref elements in SOAP 1.1 encoding */ +#ifndef SOAP_MULTIREFTAG +# define SOAP_MULTIREFTAG "id" +#endif + +/* href-id value base name in multiref SOAP encoding */ +#ifndef SOAP_BASEREFNAME +# define SOAP_BASEREFNAME "_" +#endif + /* Max number of EINTR while poll/select on a socket */ /* Each EINTR can lengthen the I/O blocking time by at most one second */ #ifndef SOAP_MAXEINTR # define SOAP_MAXEINTR (10) #endif -/* Max iterations in soap_serve() to keep server connection alive */ +/* SOAP_MAXKEEPALIVE: Max iterations in soap_serve() to keep server connection alive */ #ifndef SOAP_MAXKEEPALIVE # define SOAP_MAXKEEPALIVE (100) #endif -/* Trusted max size of inbound SOAP array for compound array allocation. - Increase if necessary to allow larger arrays. +/* SOAP_MAXARRAYSIZE: Trusted total max size of an inbound SOAP Array. + Arrays of larger size are not pre-allocated, but deserialized + on an element-by-element basis until XML validation contrains kick in. + This macro only affects the efficiency of parsing SOAP arrays. */ #ifndef SOAP_MAXARRAYSIZE -# define SOAP_MAXARRAYSIZE (1000000) +# define SOAP_MAXARRAYSIZE (100000) #endif -/* Trusted max size of inbound DIME data. +/* SOAP_MAXDIMESIZE: Trusted max size of inbound DIME data. Increase if necessary to allow larger attachments, or decrease when server resources are limited. */ #ifndef SOAP_MAXDIMESIZE -# define SOAP_MAXDIMESIZE (8388608) /* 8 MB */ +# define SOAP_MAXDIMESIZE (8*1048576) /* 8 MB */ +#endif + +/* SOAP_MAXINFLATESIZE: Trusted inflated content size. + Larger content is subject to the SOAP_MINDEFLATERATIO constraint. + If SOAP_MINDEFLATERATIO is 1.0, SOAP_MAXINFLATESIZE is always the max + size of uncompressed content. +*/ +#ifndef SOAP_MAXINFLATESIZE +# define SOAP_MAXINFLATESIZE (1*1048576) /* 1 MB */ +#endif + +/* SOAP_MINDEFLATERATIO: Trusted deflation ratio after SOAP_MAXINFLATESIZE is reached. + Trust when compressed / deflated > SOAP_MINDEFLATERATIO + Sets a ratio > 0.00096899224806 (1032:1) + According to the zlib site: the limit (1032:1) comes from the fact that one + length/distance pair can represent at most 258 output bytes. A length + requires at least one bit and a distance requires at least one bit, so two + bits in can give 258 bytes out, or eight bits in give 1032 bytes out. A + dynamic block has no length restriction, so you could get arbitrarily close + to the limit of 1032:1. +*/ +#ifndef SOAP_MINDEFLATERATIO +# define SOAP_MINDEFLATERATIO (1.0/1032.0) /* ratio of deflated/inflated */ +#endif + +/* maximum XML nesting depth level allowed for inbound XML parsing, must be greater than zero (0) */ +#ifndef SOAP_MAXLEVEL +# define SOAP_MAXLEVEL (10000) +#endif + +/* maximum string content length if not already constrained by XML schema validation maxLength constraints, zero or negative means unlimited string lengths are allowed unless restricted by XML schema maxLength */ +#ifndef SOAP_MAXLENGTH +# define SOAP_MAXLENGTH (0) +#endif + +/* maximum number of array or container elements, must be greater than zero (0) */ +#ifndef SOAP_MAXOCCURS +# define SOAP_MAXOCCURS (100000) #endif #ifdef VXWORKS @@ -1116,7 +1270,6 @@ extern "C" { #endif #ifdef WIN32 -# include <float.h> # ifndef HAVE_ISNAN # define HAVE_ISNAN # endif @@ -1168,7 +1321,9 @@ extern const char soap_base64o[], soap_base64i[]; #endif #ifndef FLT_PINFTY -# if defined(FLT_MAX) +# if defined(INFINITY) +# define FLT_PINFTY INFINITY +# elif defined(FLT_MAX) # define FLT_PINFTY FLT_MAX # elif defined(HUGE_VALF) # define FLT_PINFTY (float)HUGE_VALF @@ -1190,7 +1345,9 @@ extern const char soap_base64o[], soap_base64i[]; #endif #ifndef DBL_PINFTY -# if defined(DBL_MAX) +# if defined(INFINITY) +# define DBL_PINFTY INFINITY +# elif defined(DBL_MAX) # define DBL_PINFTY DBL_MAX # elif defined(HUGE_VALF) # define DBL_PINFTY (double)HUGE_VALF @@ -1228,75 +1385,132 @@ extern const char soap_base64o[], soap_base64i[]; #define soap_isninfd(n) ((n) < 0 && soap_isinf(n)) #define soap_isninff(n) ((n) < 0 && soap_isinf(n)) -#ifdef HAVE_SNPRINTF -# ifdef WIN32 -# define soap_snprintf(buf, len, ...) (_snprintf((buf), (len), __VA_ARGS__), (buf)[(len)-1] = '\0') +/* Safer str & mem functions */ + +/* The gSOAP code uses guards to ensure that these functions are well behaved + and do not raise errors. Therefore, the WIN _s functions should never + execute the "invalid parameter handler". +*/ + +/* use safer snprintf if possible or guard sprintf against overrun (assumes no variadic macros) */ +# ifdef HAVE_SNPRINTF +# if _MSC_VER >= 1400 +# define SOAP_SNPRINTF(buf, len, num) void)_snprintf_s((buf), (len), _TRUNCATE +# define SOAP_SNPRINTF_SAFE(buf, len) void)_snprintf_s((buf), (len), _TRUNCATE +# else +# define SOAP_SNPRINTF(buf, len, num) void)snprintf((buf), (len) +# define SOAP_SNPRINTF_SAFE(buf, len) void)snprintf((buf), (len) +# endif # else -# define soap_snprintf snprintf +# define SOAP_SNPRINTF(buf, len, num) (len) <= (num)) ? (void)((buf)[0] = '\0') : (void)sprintf((buf) +# define SOAP_SNPRINTF_SAFE(buf, len) void)sprintf((buf) # endif + +/* copy string (truncating the result) */ +#if _MSC_VER >= 1400 +# define soap_strcpy(buf, len, src) (void)strncpy_s((buf), (len), (src), _TRUNCATE) +#elif defined(HAVE_STRLCPY) +# define soap_strcpy(buf, len, src) (void)strlcpy((buf), (src), (len)) +#else +# define soap_strcpy(buf, len, src) (void)((buf) == NULL || (len) <= 0 || (strncpy((buf), (src), (len) - 1), (buf)[(len) - 1] = '\0') || 1) +#endif + +/* copy string up to n chars (nul on overrun) */ +#if _MSC_VER >= 1400 +# define soap_strncpy(buf, len, src, num) (void)strncpy_s((buf), (len), (src), (num)) +#else +# define soap_strncpy(buf, len, src, num) (void)((buf) == NULL || ((size_t)(len) > (size_t)(num) ? (strncpy((buf), (src), (num)), (buf)[(size_t)(num)] = '\0') : ((buf)[0] = '\0')) || 1) +#endif + +/* concat string up to n chars (nul on overrun) */ +#if _MSC_VER >= 1400 +# define soap_strncat(buf, len, src, num) (void)strncat_s((buf), (len), (src), (num)) +#else +# define soap_strncat(buf, len, src, num) (void)((buf) == NULL || ((size_t)(len) > strlen((buf)) + (size_t)(num) ? (strncat((buf), (src), (num)), (buf)[(size_t)(len) - 1] = '\0') : ((buf)[0] = '\0')) || 1) +#endif + +/* copy memory (error on overrun) */ +#if _MSC_VER >= 1400 +# define soap_memcpy(buf, len, src, num) ((buf) && (size_t)(len) >= (size_t)(num) ? memcpy_s((buf), (len), (src), (num)) : SOAP_ERANGE) +#else +# define soap_memcpy(buf, len, src, num) ((buf) && (size_t)(len) >= (size_t)(num) ? !memcpy((buf), (src), (num)) : SOAP_ERANGE) +#endif + +/* move memory (error on overrun) */ +#if _MSC_VER >= 1400 +# define soap_memmove(buf, len, src, num) ((buf) && (size_t)(len) >= (size_t)(num) ? memmove_s((buf), (len), (src), (num)) : SOAP_ERANGE) +#else +# define soap_memmove(buf, len, src, num) ((buf) && (size_t)(len) >= (size_t)(num) ? !memmove((buf), (src), (num)) : SOAP_ERANGE) #endif /* gSOAP status/error codes */ typedef soap_int32 soap_status; -#define SOAP_EOF EOF -#define SOAP_ERR EOF -#define SOAP_OK 0 -#define SOAP_CLI_FAULT 1 -#define SOAP_SVR_FAULT 2 -#define SOAP_TAG_MISMATCH 3 -#define SOAP_TYPE 4 -#define SOAP_SYNTAX_ERROR 5 -#define SOAP_NO_TAG 6 -#define SOAP_IOB 7 -#define SOAP_MUSTUNDERSTAND 8 -#define SOAP_NAMESPACE 9 -#define SOAP_USER_ERROR 10 -#define SOAP_FATAL_ERROR 11 -#define SOAP_FAULT 12 -#define SOAP_NO_METHOD 13 -#define SOAP_NO_DATA 14 -#define SOAP_GET_METHOD 15 -#define SOAP_PUT_METHOD 16 -#define SOAP_DEL_METHOD 17 /* deprecated */ -#define SOAP_HEAD_METHOD 18 /* deprecated */ -#define SOAP_HTTP_METHOD 19 -#define SOAP_EOM 20 -#define SOAP_MOE 21 -#define SOAP_HDR 22 -#define SOAP_NULL 23 -#define SOAP_DUPLICATE_ID 24 -#define SOAP_MISSING_ID 25 -#define SOAP_HREF 26 -#define SOAP_UDP_ERROR 27 -#define SOAP_TCP_ERROR 28 -#define SOAP_HTTP_ERROR 29 -#define SOAP_SSL_ERROR 30 -#define SOAP_ZLIB_ERROR 31 -#define SOAP_DIME_ERROR 32 -#define SOAP_DIME_HREF 33 -#define SOAP_DIME_MISMATCH 34 -#define SOAP_DIME_END 35 -#define SOAP_MIME_ERROR 36 -#define SOAP_MIME_HREF 37 -#define SOAP_MIME_END 38 -#define SOAP_VERSIONMISMATCH 39 -#define SOAP_PLUGIN_ERROR 40 -#define SOAP_DATAENCODINGUNKNOWN 41 -#define SOAP_REQUIRED 42 -#define SOAP_PROHIBITED 43 -#define SOAP_OCCURS 44 -#define SOAP_LENGTH 45 -#define SOAP_FD_EXCEEDED 46 -#define SOAP_UTF_ERROR 47 -#define SOAP_NTLM_ERROR 48 - -#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_NO_TAG || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF) +#define SOAP_EOF EOF +#define SOAP_ERR EOF +#define SOAP_OK 0 +#define SOAP_CLI_FAULT 1 +#define SOAP_SVR_FAULT 2 +#define SOAP_TAG_MISMATCH 3 +#define SOAP_TYPE 4 +#define SOAP_SYNTAX_ERROR 5 +#define SOAP_NO_TAG 6 +#define SOAP_IOB 7 +#define SOAP_MUSTUNDERSTAND 8 +#define SOAP_NAMESPACE 9 +#define SOAP_USER_ERROR 10 +#define SOAP_FATAL_ERROR 11 +#define SOAP_FAULT 12 +#define SOAP_NO_METHOD 13 +#define SOAP_NO_DATA 14 +#define SOAP_GET_METHOD 15 +#define SOAP_PUT_METHOD 16 +#define SOAP_DEL_METHOD 17 /* deprecated */ +#define SOAP_HEAD_METHOD 18 /* deprecated */ +#define SOAP_HTTP_METHOD 19 +#define SOAP_EOM 20 +#define SOAP_MOE 21 +#define SOAP_HDR 22 +#define SOAP_NULL 23 +#define SOAP_DUPLICATE_ID 24 +#define SOAP_MISSING_ID 25 +#define SOAP_HREF 26 +#define SOAP_UDP_ERROR 27 +#define SOAP_TCP_ERROR 28 +#define SOAP_HTTP_ERROR 29 +#define SOAP_SSL_ERROR 30 +#define SOAP_ZLIB_ERROR 31 +#define SOAP_DIME_ERROR 32 +#define SOAP_DIME_HREF 33 +#define SOAP_DIME_MISMATCH 34 +#define SOAP_DIME_END 35 +#define SOAP_MIME_ERROR 36 +#define SOAP_MIME_HREF 37 +#define SOAP_MIME_END 38 +#define SOAP_VERSIONMISMATCH 39 +#define SOAP_PLUGIN_ERROR 40 +#define SOAP_DATAENCODINGUNKNOWN 41 +#define SOAP_REQUIRED 42 +#define SOAP_PROHIBITED 43 +#define SOAP_OCCURS 44 +#define SOAP_LENGTH 45 +#define SOAP_PATTERN 46 +#define SOAP_FD_EXCEEDED 47 +#define SOAP_UTF_ERROR 48 +#define SOAP_NTLM_ERROR 49 +#define SOAP_LEVEL 50 + +#define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_NO_TAG || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_TYPE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_LEVEL || (e) == SOAP_PATTERN || (e) == SOAP_NULL || (e) == SOAP_HREF) + #define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD) + #define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR) + #define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR) + #define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR) + #define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_NO_DATA || ((e) >= SOAP_GET_METHOD && (e) <= SOAP_HTTP_METHOD) || ((e) >= 100 && (e) < 600)) /* gSOAP HTTP response status codes 100 to 599 are reserved */ @@ -1305,132 +1519,137 @@ typedef soap_int32 soap_status; /* Exceptional gSOAP HTTP server response status codes >= 1000 */ -#define SOAP_STOP 1000 /* No HTTP response */ -#define SOAP_FORM 1001 /* Request (form) data is present, no HTTP response */ -#define SOAP_HTML 1002 /* Custom HTML response */ -#define SOAP_FILE 1003 /* Custom file-based response */ +#define SOAP_STOP 1000 /* No HTTP response */ +#define SOAP_FORM 1001 /* Request (form) data is present, no HTTP response */ +#define SOAP_HTML 1002 /* Custom HTML response */ +#define SOAP_FILE 1003 /* Custom file-based response */ /* gSOAP HTTP method codes (client) */ -#define SOAP_POST 2000 /* POST request */ -#define SOAP_POST_FILE 2001 /* Custom file-based POST request */ -#define SOAP_GET 2002 /* GET request */ -#define SOAP_PUT 2003 /* PUT request */ -#define SOAP_DEL 2004 /* DELETE request */ -#define SOAP_CONNECT 2005 /* CONNECT request */ +#define SOAP_POST 2000 /* POST request */ +#define SOAP_POST_FILE 2001 /* Custom file-based POST request */ +#define SOAP_GET 2002 /* GET request */ +#define SOAP_PUT 2003 /* PUT request */ +#define SOAP_DEL 2004 /* DELETE request */ +#define SOAP_CONNECT 2005 /* CONNECT request */ /* gSOAP DIME */ -#define SOAP_DIME_CF 0x01 -#define SOAP_DIME_ME 0x02 -#define SOAP_DIME_MB 0x04 -#define SOAP_DIME_VERSION 0x08 /* DIME version 1 */ -#define SOAP_DIME_MEDIA 0x10 -#define SOAP_DIME_ABSURI 0x20 +#define SOAP_DIME_CF 0x01 +#define SOAP_DIME_ME 0x02 +#define SOAP_DIME_MB 0x04 +#define SOAP_DIME_VERSION 0x08 /* DIME version 1 */ +#define SOAP_DIME_MEDIA 0x10 +#define SOAP_DIME_ABSURI 0x20 /* gSOAP ZLIB */ -#define SOAP_ZLIB_NONE 0x00 -#define SOAP_ZLIB_DEFLATE 0x01 -#define SOAP_ZLIB_INFLATE 0x02 -#define SOAP_ZLIB_GZIP 0x02 +#define SOAP_ZLIB_NONE 0x00 +#define SOAP_ZLIB_DEFLATE 0x01 +#define SOAP_ZLIB_INFLATE 0x02 +#define SOAP_ZLIB_GZIP 0x02 /* gSOAP transport, connection, and content encoding modes */ typedef soap_int32 soap_mode; -#define SOAP_IO 0x00000003 /* IO mask */ -#define SOAP_IO_FLUSH 0x00000000 /* flush output immediately, no buffering */ -#define SOAP_IO_BUFFER 0x00000001 /* buffer output in packets of size SOAP_BUFLEN */ -#define SOAP_IO_STORE 0x00000002 /* store entire output to determine length for transport */ -#define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */ - -#define SOAP_IO_UDP 0x00000004 /* TCP or UDP */ -#define SOAP_IO_LENGTH 0x00000008 /* calc message length (internal) */ -#define SOAP_IO_KEEPALIVE 0x00000010 /* keep connection alive */ - -#define SOAP_ENC 0x00000FFF /* IO and ENC mask */ -#define SOAP_ENC_LATIN 0x00000020 /* in: accept iso-8859-1 */ -#define SOAP_ENC_XML 0x00000040 /* out: plain XML encoding, no HTTP header */ -#define SOAP_ENC_DIME 0x00000080 -#define SOAP_ENC_MIME 0x00000100 -#define SOAP_ENC_MTOM 0x00000200 -#define SOAP_ENC_ZLIB 0x00000400 -#define SOAP_ENC_SSL 0x00000800 - -#define SOAP_XML_STRICT 0x00001000 /* in: strict validation */ -#define SOAP_XML_INDENT 0x00002000 /* out: emit indented XML */ -#define SOAP_XML_IGNORENS 0x00004000 /* in: ignore namespaces */ -#define SOAP_XML_DEFAULTNS 0x00008000 /* out: emit xmlns="..." */ -#define SOAP_XML_CANONICAL 0x00010000 /* out: excC14N canonical XML */ -#define SOAP_XML_TREE 0x00020000 /* in/out: XML tree (no id/ref) */ -#define SOAP_XML_NIL 0x00040000 /* out: NULLs as xsi:nil */ -#define SOAP_XML_NOTYPE 0x00080000 /* out: do not add xsi:type */ - -#define SOAP_DOM_TREE 0x00100000 /* see DOM manual */ -#define SOAP_DOM_NODE 0x00200000 -#define SOAP_DOM_ASIS 0x00400000 - -#define SOAP_C_NOIOB 0x01000000 /* don't fault on array index out of bounds (just ignore) */ -#define SOAP_C_UTFSTRING 0x02000000 /* (de)serialize strings with UTF8 content */ -#define SOAP_C_MBSTRING 0x04000000 /* (de)serialize strings with multi-byte content */ -#define SOAP_C_NILSTRING 0x08000000 /* serialize empty strings as nil (omitted) */ - -#define SOAP_XML_DOM 0x10000000 /* enable internal DOM */ -#define SOAP_XML_GRAPH 0x20000000 /* force id-ref XML graph */ - -#define SOAP_MIME_POSTCHECK 0x40000000 /* MIME flag (internal) */ - -#define SOAP_SEC_WSUID 0x80000000 /* Add Body wsu:Id */ +#define SOAP_IO 0x00000003 /* IO mask */ +#define SOAP_IO_FLUSH 0x00000000 /* flush output immediately, no buffering */ +#define SOAP_IO_BUFFER 0x00000001 /* buffer output in packets of size SOAP_BUFLEN */ +#define SOAP_IO_STORE 0x00000002 /* store entire output to determine length for transport */ +#define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */ + +#define SOAP_IO_UDP 0x00000004 /* TCP or UDP */ +#define SOAP_IO_LENGTH 0x00000008 /* calc message length (internal) */ +#define SOAP_IO_KEEPALIVE 0x00000010 /* keep connection alive */ + +#define SOAP_ENC 0x00000FFF /* IO and ENC mask */ +#define SOAP_ENC_LATIN 0x00000020 /* in: accept iso-8859-1 */ +#define SOAP_ENC_XML 0x00000040 /* out: plain (XML or other) body, no HTTP header */ +#define SOAP_ENC_DIME 0x00000080 +#define SOAP_ENC_MIME 0x00000100 +#define SOAP_ENC_MTOM 0x00000200 +#define SOAP_ENC_ZLIB 0x00000400 +#define SOAP_ENC_SSL 0x00000800 + +#define SOAP_XML_STRICT 0x00001000 /* in: strict validation */ +#define SOAP_XML_INDENT 0x00002000 /* out: emit indented XML */ +#define SOAP_XML_IGNORENS 0x00004000 /* in: ignore namespaces */ +#define SOAP_XML_DEFAULTNS 0x00008000 /* out: emit xmlns="..." */ +#define SOAP_XML_CANONICAL 0x00010000 /* out: excC14N canonical XML */ +#define SOAP_XML_TREE 0x00020000 /* in/out: XML tree (no id/ref) */ +#define SOAP_XML_NIL 0x00040000 /* out: all NULLs as xsi:nil */ +#define SOAP_XML_NOTYPE 0x00080000 /* out: do not add xsi:type */ + +#define SOAP_DOM_TREE 0x00100000 /* see DOM manual */ +#define SOAP_DOM_NODE 0x00200000 +#define SOAP_DOM_ASIS 0x00400000 + +#define SOAP_RESERVED 0x00800000 /* reserved for future use */ + +#define SOAP_C_NOIOB 0x01000000 /* don't fault on array index out of bounds (just ignore) */ +#define SOAP_C_UTFSTRING 0x02000000 /* (de)serialize strings with UTF8 content */ +#define SOAP_C_MBSTRING 0x04000000 /* (de)serialize strings with multi-byte content */ +#define SOAP_C_NILSTRING 0x08000000 /* serialize empty strings as nil (omitted) */ + +#define SOAP_XML_DOM 0x10000000 /* enable internal DOM */ +#define SOAP_XML_GRAPH 0x20000000 /* force id-ref XML graph */ + +#define SOAP_MIME_POSTCHECK 0x40000000 /* MIME flag (internal) */ + +#define SOAP_SEC_WSUID 0x80000000 /* Add Body wsu:Id flag (internal) */ /* WITH_XMLNS backward compatibility: always use XML default namespaces */ #ifdef WITH_XMLNS -# define SOAP_IO_DEFAULT (SOAP_IO_FLUSH | SOAP_XML_DEFAULTNS) +# define SOAP_IO_DEFAULT (SOAP_IO_FLUSH | SOAP_XML_DEFAULTNS) #else -# define SOAP_IO_DEFAULT SOAP_IO_FLUSH +# define SOAP_IO_DEFAULT SOAP_IO_FLUSH #endif /* SSL client/server authentication settings */ -#define SOAP_SSL_NO_AUTHENTICATION 0x00 /* for testing purposes */ -#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */ -#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */ -#define SOAP_SSL_SKIP_HOST_CHECK 0x04 /* client does not check the common name of the host in certificate */ -#define SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE 0x08 /* client does not check the expiration date of the host certificate */ -#define SOAP_SSL_NO_DEFAULT_CA_PATH 0x10 /* don't use default_verify_paths */ -#define SOAP_SSL_RSA 0x20 /* use RSA */ -#define SOAP_SSLv3 0x40 /* SSL v3 only */ -#define SOAP_TLSv1 0x80 /* TLS v1 only */ -#define SOAP_SSLv3_TLSv1 0x00 /* SSL v3 and TLS v1 support by default (no SSL v1/v2) */ -#define SOAP_SSL_CLIENT 0x100 /* client context */ - -#define SOAP_SSL_DEFAULT (SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION | SOAP_SSLv3_TLSv1) +#define SOAP_SSL_NO_AUTHENTICATION 0x0000 /* for testing purposes */ +#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x0001 /* client requires server to authenticate (default) */ +#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x0002 /* server requires client to authenticate */ +#define SOAP_SSL_SKIP_HOST_CHECK 0x0004 /* client skips common name check against host name */ +#define SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE 0x0008 /* allow self-signed and expired certificates and those w/o CRL */ +#define SOAP_SSL_NO_DEFAULT_CA_PATH 0x0010 /* don't use default_verify_paths */ +#define SOAP_SSL_RSA 0x0020 /* use RSA */ +#define SOAP_TLSv1 0x0000 /* enable TLS v1.0/1.1/1.2 only (default) */ +#define SOAP_SSLv3_TLSv1 0x0040 /* enable SSL v3 and TLS v1.0/1.1/1.2 */ +#define SOAP_SSLv3 0x0080 /* only SSL v3 */ +#define SOAP_TLSv1_0 0x0100 /* only TLS v1.0 */ +#define SOAP_TLSv1_1 0x0200 /* only TLS v1.1 */ +#define SOAP_TLSv1_2 0x0400 /* only TLS v1.2 */ +#define SOAP_SSL_CLIENT 0x1000 /* client context */ + +#define SOAP_SSL_DEFAULT (SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION | SOAP_TLSv1) /* state */ -#define SOAP_NONE 0 -#define SOAP_INIT 1 -#define SOAP_COPY 2 +#define SOAP_NONE 0 +#define SOAP_INIT 1 +#define SOAP_COPY 2 #define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY)) /* parts */ -#define SOAP_BEGIN 0 -#define SOAP_IN_ENVELOPE 2 -#define SOAP_IN_HEADER 3 -#define SOAP_END_HEADER 4 -#define SOAP_NO_BODY 5 -#define SOAP_IN_BODY 6 -#define SOAP_END_BODY 7 -#define SOAP_END_ENVELOPE 8 -#define SOAP_END 9 +#define SOAP_BEGIN 0 +#define SOAP_IN_ENVELOPE 2 +#define SOAP_IN_HEADER 3 +#define SOAP_END_HEADER 4 +#define SOAP_NO_BODY 5 +#define SOAP_IN_BODY 6 +#define SOAP_END_BODY 7 +#define SOAP_END_ENVELOPE 8 +#define SOAP_END 9 /* events */ -#define SOAP_SEC_BEGIN 1 -#define SOAP_SEC_SIGN 2 -#define SOAP_SEC_DECRYPT 3 +#define SOAP_SEC_BEGIN 1 +#define SOAP_SEC_SIGN 2 +#define SOAP_SEC_DECRYPT 3 /* DEBUG macros */ @@ -1452,27 +1671,29 @@ typedef soap_int32 soap_mode; #ifdef SOAP_MEM_DEBUG # ifndef SOAP_MALLOC -# define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size) +# define SOAP_MALLOC(soap, size) soap_track_malloc((soap), __FILE__, __LINE__, (size)) # endif # ifndef SOAP_FREE -# define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr) +# define SOAP_FREE(soap, ptr) soap_track_free((soap), __FILE__, __LINE__, (void*)(ptr)) # endif #endif -#ifndef SOAP_MALLOC /* use libc malloc */ +#ifndef SOAP_MALLOC /* use libc malloc */ # define SOAP_MALLOC(soap, size) malloc(size) #endif -#ifndef SOAP_FREE /* use libc free */ -# define SOAP_FREE(soap, ptr) free(ptr) +#ifndef SOAP_FREE /* use libc free */ +# define SOAP_FREE(soap, ptr) free((void*)(ptr)) #endif -#if defined(__GNUC__) && (__GNUC__ <= 2) -# define SOAP_NOTHROW -#elif !defined(WITH_LEAN) && !defined(WITH_COMPAT) && !defined(SOAP_NOTHROW) -# define SOAP_NOTHROW (std::nothrow) -#else -# define SOAP_NOTHROW +#ifndef SOAP_NOTHROW +# if defined(__GNUC__) && (__GNUC__ <= 2) +# define SOAP_NOTHROW +# elif defined(WITH_LEAN) || defined(WITH_COMPAT) +# define SOAP_NOTHROW +# else +# define SOAP_NOTHROW (std::nothrow) +# endif #endif #if (defined(__GNUC__) && (__GNUC__ <= 2) && !defined(__BORLANDC__)) || defined(__clang__) || defined(_AIX) || defined(AIX) @@ -1499,15 +1720,15 @@ typedef soap_int32 soap_mode; # endif #endif -#ifndef SOAP_NEW_COPY /* use C++ new operator for ::copy() */ +#ifndef SOAP_NEW_COPY /* use C++ new operator for ::copy() */ # define SOAP_NEW_COPY(clas) new SOAP_NOTHROW clas #endif -#ifndef SOAP_DELETE /* use C++ delete operator */ +#ifndef SOAP_DELETE /* use C++ delete operator */ # define SOAP_DELETE(obj) delete obj #endif -#ifndef SOAP_DELETE_ARRAY /* use C++ delete[] operator */ +#ifndef SOAP_DELETE_ARRAY /* use C++ delete[] operator */ # define SOAP_DELETE_ARRAY(obj) delete[] obj #endif @@ -1570,7 +1791,7 @@ typedef soap_int32 soap_mode; { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\ if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ - { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\ + { fwrite((void*)(MSG), 1, (size_t)(LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\ fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ }\ }\ @@ -1623,27 +1844,30 @@ struct soap_nlist unsigned int level; /* nesting depth level */ short index; /* corresponding entry in ns mapping table */ const char *ns; /* only set when parsed ns URI is not in the ns mapping table */ - char id[1]; /* the actual string value flows into the allocated region below this struct */ + char id[1]; /* the actual string value flows into the allocated region id[0...] below this struct */ +}; + +/* block header, the data flows into the allocated region below this struct */ +struct soap_bhead +{ struct soap_bhead *next; + size_t size; }; /* block stack for nested block allocations */ struct soap_blist { struct soap_blist *next; - char *ptr; + struct soap_bhead *head; size_t size; -}; - -/* array layout */ -struct soap_array -{ void *__ptr; - int __size; + size_t item; }; /* pointer serialization management */ struct soap_plist { struct soap_plist *next; const void *ptr; - const struct soap_array *array; + void *dup; + const void *array; /* array pointer */ + int size; /* array size */ int type; int id; char mark1; /* 0=single-ref, 1=embedded-multi-ref (SOAP1.1), 2=multi-ref, 3=attachment */ @@ -1672,14 +1896,14 @@ struct soap_clist { struct soap_clist *next; void *ptr; int type; - int size; + int size; /* array size */ int (*fdelete)(struct soap_clist*); }; /* attributes */ struct soap_attribute { struct soap_attribute *next; - short flag; /* soap_set_attr: 1 = normal, 2 = utf content */ + short flag; /* soap_set_attr: 1 = normal, 2 = utf content */ char *value; size_t size; const char *ns; @@ -1694,13 +1918,13 @@ struct soap_cookie char *value; char *domain; char *path; - time_t expire; /* client-side: local time to expire */ - long maxage; /* server-side: seconds to expire */ + time_t expire; /* client-side: local time to expire */ + long maxage; /* server-side: seconds to expire */ unsigned int version; short secure; - short session; /* server-side */ - short env; /* server-side: got cookie from client and should not be (re)send */ - short modified; /* server-side: client cookie was modified and should be send */ + short session; /* server-side */ + short env; /* server-side: got cookie from client and should not be (re)send */ + short modified; /* server-side: client cookie was modified and should be send */ }; #endif @@ -1709,7 +1933,8 @@ SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_mul #ifdef __cplusplus class soap_multipart_iterator -{ public: +{ + public: struct soap_multipart *content; bool operator==(const soap_multipart_iterator& iter) const { return (bool)(content == iter.content); } @@ -1724,6 +1949,7 @@ class soap_multipart_iterator soap_multipart_iterator(struct soap_multipart *p) : content(p) { } }; + #endif #ifndef WITH_LEANER @@ -1737,8 +1963,8 @@ struct soap_dime const char *id; const char *type; const char *options; - struct soap_multipart *list; /* list of DIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ + struct soap_multipart *list; /* list of DIME attachments received */ + struct soap_multipart *first, *last; /* temporary in/out queue */ #ifdef __cplusplus soap_multipart_iterator begin() { soap_multipart_iterator iter(list); return iter; }; @@ -1750,10 +1976,10 @@ struct soap_dime #ifndef WITH_LEANER struct soap_mime -{ char *boundary; /* MIME boundary */ - const char *start; /* MIME start ID */ - struct soap_multipart *list; /* list of MIME attachments received */ - struct soap_multipart *first, *last; /* temporary in/out queue */ +{ char *boundary; /* MIME boundary */ + const char *start; /* MIME start ID */ + struct soap_multipart *list; /* list of MIME attachments received */ + struct soap_multipart *first, *last; /* temporary in/out queue */ #ifdef __cplusplus soap_multipart_iterator begin() { soap_multipart_iterator iter(list); return iter; }; @@ -1781,14 +2007,14 @@ enum soap_mime_encoding /* DIME/MIME multipart list */ struct soap_multipart { struct soap_multipart *next; - char *ptr; /* points to raw data content */ - size_t size; /* size of data content */ - const char *id; /* DIME/MIME content ID or form data name */ - const char *type; /* DIME/MIME type (MIME type format) */ - const char *options; /* DIME options */ - enum soap_mime_encoding encoding; /* MIME Content-Transfer-Encoding */ - const char *location; /* MIME Content-Location (optional) */ - const char *description; /* MIME Content-Description (optional) */ + char *ptr; /* points to raw data content */ + size_t size; /* size of data content */ + const char *id; /* DIME/MIME content ID or form data name */ + const char *type; /* DIME/MIME type (MIME type format) */ + const char *options; /* DIME options */ + enum soap_mime_encoding encoding; /* MIME Content-Transfer-Encoding */ + const char *location; /* MIME Content-Location (optional) */ + const char *description; /* MIME Content-Description (optional) */ #ifdef __cplusplus typedef soap_multipart_iterator iterator; #endif @@ -1810,16 +2036,155 @@ struct soap_xlist /******************************************************************************/ #ifndef WITH_LEANER + +/* dom.c[pp] functions (optional, compile and link dom.c[pp] */ +struct SOAP_CMAC soap; +struct SOAP_CMAC soap_dom_element; +struct SOAP_CMAC soap_dom_attribute; + +/* soap_dom_element construction */ + +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_new(struct soap *soap, const char *ns, const char *tag); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_new_w(struct soap *soap, const char *ns, const wchar_t *tag); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_set(struct soap_dom_element *elt, const char *ns, const char *tag); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_set_w(struct soap_dom_element *elt, const char *ns, const wchar_t *tag); + +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att(struct soap_dom_element *elt, const char *ns, const char *tag); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_w(struct soap_dom_element *elt, const char *ns, const wchar_t *tag); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt(struct soap_dom_element *elt, const char *ns, const char *tag); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_w(struct soap_dom_element *elt, const char *ns, const wchar_t *tag); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_nth_elt(struct soap_dom_element *elt, const char *ns, const char *tag, size_t n); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_nth_elt_w(struct soap_dom_element *elt, const char *ns, const wchar_t *tag, size_t n); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_nth(struct soap_dom_element *elt, size_t n); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_add_att(struct soap_dom_element *elt, const struct soap_dom_attribute *node); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_add_elt(struct soap_dom_element *elt, const struct soap_dom_element *node); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_add_atts(struct soap_dom_element *elt, const struct soap_dom_attribute *atts); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_add_elts(struct soap_dom_element *elt, const struct soap_dom_element *elts); + +/* soap_dom_element assignment */ + +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_bool(struct soap_dom_element *elt, LONG64 b); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_int(struct soap_dom_element *elt, LONG64 n); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_double(struct soap_dom_element *elt, double x); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_text(struct soap_dom_element *elt, const char *text); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_text_w(struct soap_dom_element *elt, const wchar_t *text); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_node(struct soap_dom_element *elt, const void *node, int type); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_copy(struct soap_dom_element *elt, const struct soap_dom_element *node); + +/* soap_dom_element properties */ + +SOAP_FMAC1 int SOAP_FMAC2 soap_elt_match(const struct soap_dom_element *elt, const char *ns, const char *patt); +SOAP_FMAC1 int SOAP_FMAC2 soap_elt_match_w(const struct soap_dom_element *elt, const char *ns, const wchar_t *patt); +SOAP_FMAC1 const char * SOAP_FMAC2 soap_elt_get_ns(const struct soap_dom_element *elt); +SOAP_FMAC1 const char * SOAP_FMAC2 soap_elt_get_tag(const struct soap_dom_element *elt); +SOAP_FMAC1 int SOAP_FMAC2 soap_elt_is_true(const struct soap_dom_element *elt); +SOAP_FMAC1 int SOAP_FMAC2 soap_elt_is_false(const struct soap_dom_element *elt); +SOAP_FMAC1 int SOAP_FMAC2 soap_elt_get_int(const struct soap_dom_element *elt); +SOAP_FMAC1 long SOAP_FMAC2 soap_elt_get_long(const struct soap_dom_element *elt); +SOAP_FMAC1 LONG64 SOAP_FMAC2 soap_elt_get_LONG64(const struct soap_dom_element *elt); +SOAP_FMAC1 double SOAP_FMAC2 soap_elt_get_double(const struct soap_dom_element *elt); +SOAP_FMAC1 const char * SOAP_FMAC2 soap_elt_get_text(const struct soap_dom_element *elt); +SOAP_FMAC1 const void * SOAP_FMAC2 soap_elt_get_node(const struct soap_dom_element *elt, int type); +SOAP_FMAC1 int SOAP_FMAC2 soap_elt_get_type(const struct soap_dom_element *elt, const void **node); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_parent(const struct soap_dom_element *elt); +SOAP_FMAC1 size_t SOAP_FMAC2 soap_elt_depth(const struct soap_dom_element *elt); +SOAP_FMAC1 size_t SOAP_FMAC2 soap_elt_index(const struct soap_dom_element *elt); +SOAP_FMAC1 size_t SOAP_FMAC2 soap_elt_len(const struct soap_dom_element *elt); +SOAP_FMAC1 size_t SOAP_FMAC2 soap_elt_nth(const struct soap_dom_element *elt); + +/* soap_dom_attribute construction */ + +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_new(struct soap *soap, const char *ns, const char *tag); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_new_w(struct soap *soap, const char *ns, const wchar_t *tag); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_set(struct soap_dom_attribute *att, const char *ns, const char *tag); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_set_w(struct soap_dom_attribute *att, const char *ns, const wchar_t *tag); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_add(struct soap_dom_attribute *att, const char *ns, const char *tag); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_add_w(struct soap_dom_attribute *att, const char *ns, const wchar_t *tag); + +/* soap_dom_attribute assignment */ + +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_bool(struct soap_dom_attribute *att, LONG64 b); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_int(struct soap_dom_attribute *att, LONG64 n); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_double(struct soap_dom_attribute *att, double x); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_text(struct soap_dom_attribute *att, const char *text); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_text_w(struct soap_dom_attribute *att, const wchar_t *text); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_copy(struct soap_dom_attribute *att, const struct soap_dom_attribute *node); + +/* soap_dom_attribute properties */ + +SOAP_FMAC1 int SOAP_FMAC2 soap_att_match(const struct soap_dom_attribute *att, const char *ns, const char *patt); +SOAP_FMAC1 int SOAP_FMAC2 soap_att_match_w(const struct soap_dom_attribute *att, const char *ns, const wchar_t *patt); +SOAP_FMAC1 const char * SOAP_FMAC2 soap_att_get_ns(const struct soap_dom_attribute *att); +SOAP_FMAC1 const char * SOAP_FMAC2 soap_att_get_tag(const struct soap_dom_attribute *att); +SOAP_FMAC1 int SOAP_FMAC2 soap_att_is_true(const struct soap_dom_attribute *att); +SOAP_FMAC1 int SOAP_FMAC2 soap_att_is_false(const struct soap_dom_attribute *att); +SOAP_FMAC1 int SOAP_FMAC2 soap_att_get_int(const struct soap_dom_attribute *att); +SOAP_FMAC1 long SOAP_FMAC2 soap_att_get_long(const struct soap_dom_attribute *att); +SOAP_FMAC1 LONG64 SOAP_FMAC2 soap_att_get_LONG64(const struct soap_dom_attribute *att); +SOAP_FMAC1 double SOAP_FMAC2 soap_att_get_double(const struct soap_dom_attribute *att); +SOAP_FMAC1 const char * SOAP_FMAC2 soap_att_get_text(const struct soap_dom_attribute *att); + +/* DOM local traversal */ + +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_first(struct soap_dom_element *elt); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_next(const struct soap_dom_attribute *att); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_first(struct soap_dom_element *elt); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_next(const struct soap_dom_element *elt); + +/* DOM local retrieval */ + +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_get(const struct soap_dom_element *elt, const char *ns, const char *tag); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_get_w(const struct soap_dom_element *elt, const char *ns, const wchar_t *tag); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_get(const struct soap_dom_element *elt, const char *ns, const char *tag); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_get_w(const struct soap_dom_element *elt, const char *ns, const wchar_t *tag); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_get_next(const struct soap_dom_element *elt); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_get_nth(struct soap_dom_element *elt, size_t n); + +/* DOM local search */ + +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_find(struct soap_dom_element *elt, const char *ns, const char *patt); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_att_find_next(const struct soap_dom_attribute *att, const char *ns, const char *patt); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_find(struct soap_dom_element *elt, const char *ns, const char *patt); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_find_next(const struct soap_dom_element *elt, const char *ns, const char *patt); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_find_type(struct soap_dom_element *elt, const char *ns, const char *patt, int type); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_elt_find_next_type(const struct soap_dom_element *elt, const char *ns, const char *patt, int type); + +/* DOM size of local search results */ + +SOAP_FMAC1 size_t SOAP_FMAC2 soap_att_size(struct soap_dom_element *elt, const char *ns, const char *patt); +SOAP_FMAC1 size_t SOAP_FMAC2 soap_elt_size(struct soap_dom_element *elt, const char *ns, const char *patt); +SOAP_FMAC1 size_t SOAP_FMAC2 soap_elt_size_type(struct soap_dom_element *elt, const char *ns, const char *patt, int type); + +/* DOM deep traversal */ + +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(const struct soap_dom_attribute *att); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(const struct soap_dom_element *elt, const struct soap_dom_element *end); + +/* DOM deep search */ + +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_find(struct soap_dom_element *begin, const struct soap_dom_element *end, const char *ns, const char *patt, int type); +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_find_next(const struct soap_dom_element *elt, const struct soap_dom_element *end, const char *ns, const char *patt, int type); + +#endif + +#if defined(__cplusplus) +} +#endif + +#ifndef WITH_LEANER #ifdef __cplusplus -class soap_dom_attribute_iterator -{ public: - struct soap_dom_attribute *att; +class SOAP_CMAC soap_dom_attribute_iterator +{ + public: + struct soap_dom_attribute *iter; const char *nstr; const char *name; bool operator==(const soap_dom_attribute_iterator&) const; bool operator!=(const soap_dom_attribute_iterator&) const; - struct soap_dom_attribute &operator*() const; - soap_dom_attribute_iterator &operator++(); + struct soap_dom_attribute& operator*() const; + struct soap_dom_attribute *operator->() const; + soap_dom_attribute_iterator& operator++(); + soap_dom_attribute_iterator operator++(int); soap_dom_attribute_iterator(); soap_dom_attribute_iterator(struct soap_dom_attribute*); ~soap_dom_attribute_iterator(); @@ -1828,41 +2193,100 @@ class soap_dom_attribute_iterator #endif #ifndef WITH_LEANER -struct soap_dom_attribute +struct SOAP_CMAC soap_dom_attribute { struct soap_dom_attribute *next; const char *nstr; - char *name; - char *data; - wchar_t *wide; + const char *name; + const char *text; struct soap *soap; #ifdef __cplusplus typedef soap_dom_attribute_iterator iterator; - struct soap_dom_attribute &set(const char *nstr, const char *name); /* set namespace and name */ - struct soap_dom_attribute &set(const char *data); /* set data */ - soap_dom_attribute_iterator begin(); - soap_dom_attribute_iterator end(); - soap_dom_attribute_iterator find(const char *nstr, const char *name); - void unlink(); - soap_dom_attribute(); - soap_dom_attribute(struct soap *soap); - soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data); + soap_dom_attribute(struct soap *soap = NULL); + soap_dom_attribute(const soap_dom_attribute& att); + soap_dom_attribute(struct soap *soap, const char *tag); + soap_dom_attribute(struct soap *soap, const wchar_t *tag); + soap_dom_attribute(struct soap *soap, const char *ns, const char *tag, const char *text); + soap_dom_attribute(struct soap *soap, const char *ns, const char *tag, const wchar_t *text); + soap_dom_attribute(struct soap *soap, const char *ns, const wchar_t *tag, const char *text); + soap_dom_attribute(struct soap *soap, const char *ns, const wchar_t *tag, const wchar_t *text); + soap_dom_attribute(struct soap *soap, const char *ns, const char *tag, const std::string& text); + soap_dom_attribute(struct soap *soap, const char *ns, const char *tag, const std::wstring& text); + soap_dom_attribute(struct soap *soap, const char *ns, const wchar_t *tag, const std::string& text); + soap_dom_attribute(struct soap *soap, const char *ns, const wchar_t *tag, const std::wstring& text); ~soap_dom_attribute(); + soap_dom_attribute& set(const char *ns, const char *tag) { return *soap_att_set(this, ns, tag); } + soap_dom_attribute& set(const char *ns, const wchar_t *tag) { return *soap_att_set_w(this, ns, tag); } + soap_dom_attribute& set(bool b) { return *soap_att_bool(this, b); } + soap_dom_attribute& set(int n) { return *soap_att_int(this, n); } + soap_dom_attribute& set(LONG64 n) { return *soap_att_int(this, n); } + soap_dom_attribute& set(float x) { return *soap_att_double(this, x); } + soap_dom_attribute& set(double x) { return *soap_att_double(this, x); } + soap_dom_attribute& set(const char *text) { return *soap_att_text(this, text); } + soap_dom_attribute& set(const wchar_t *text) { return *soap_att_text_w(this, text); } +#ifndef WITH_COMPAT + soap_dom_attribute& set(const std::string& text) { return *soap_att_text(this, text.c_str()); } + soap_dom_attribute& set(const std::wstring& text) { return *soap_att_text_w(this, text.c_str()); } +#endif + soap_dom_attribute& operator=(bool b) { return *soap_att_bool(this, b); } + soap_dom_attribute& operator=(int n) { return *soap_att_int(this, n); } + soap_dom_attribute& operator=(LONG64 n) { return *soap_att_int(this, n); } + soap_dom_attribute& operator=(float x) { return *soap_att_double(this, x); } + soap_dom_attribute& operator=(double x) { return *soap_att_double(this, x); } + soap_dom_attribute& operator=(const char *text) { return *soap_att_text(this, text); } + soap_dom_attribute& operator=(const wchar_t *text) { return *soap_att_text_w(this, text); } +#ifndef WITH_COMPAT + soap_dom_attribute& operator=(const std::string& text) { return *soap_att_text(this, text.c_str()); } + soap_dom_attribute& operator=(const std::wstring& text) { return *soap_att_text_w(this, text.c_str()); } +#endif + soap_dom_attribute& operator=(const soap_dom_attribute& att) { return *soap_att_copy(this, &att); } + soap_dom_attribute& att(const char *tag) { return *soap_att_add(this, NULL, tag); } + soap_dom_attribute& att(const wchar_t *tag) { return *soap_att_add_w(this, NULL, tag); } + soap_dom_attribute& att(const char *ns, const char *tag) { return *soap_att_add(this, ns, tag); } + soap_dom_attribute& att(const char *ns, const wchar_t *tag) { return *soap_att_add_w(this, ns, tag); } + bool match(const char *patt) const { return soap_att_match(this, NULL, patt) != 0; } + bool match(const wchar_t *patt) const { return soap_att_match_w(this, NULL, patt) != 0; } + bool match(const char *ns, const char *patt) const { return soap_att_match(this, ns, patt) != 0; } + bool match(const char *ns, const wchar_t *patt) const { return soap_att_match_w(this, ns, patt) != 0; } + const char *ns() const { return this->nstr; } + const char *tag() const { return this->name; } + bool is_true() const { return soap_att_is_true(this) != 0; } + bool is_false() const { return soap_att_is_false(this) != 0; } + LONG64 get_int() const { return soap_att_get_LONG64(this); } + double get_double() const { return soap_att_get_double(this); } + const char *get_text() const { return this->text; } + operator bool() const { return soap_att_is_true(this) != 0; } + operator int() const { return soap_att_get_int(this); } + operator LONG64() const { return soap_att_get_LONG64(this); } + operator double() const { return soap_att_get_double(this); } + operator const char*() const { return this->text; } + soap_dom_attribute_iterator att_begin() { return soap_dom_attribute_iterator(this); } + soap_dom_attribute_iterator att_end() { return soap_dom_attribute_iterator(NULL); } + soap_dom_attribute_iterator att_find(const char *patt) { return att_find(NULL, patt); } + soap_dom_attribute_iterator att_find(const wchar_t *patt) { return att_find(NULL, patt); } + soap_dom_attribute_iterator att_find(const char *ns, const char *patt); + soap_dom_attribute_iterator att_find(const char *ns, const wchar_t *patt); + void unlink(); #endif }; #endif #ifndef WITH_LEANER #ifdef __cplusplus -class soap_dom_element_iterator -{ public: - struct soap_dom_element *elt; +class SOAP_CMAC soap_dom_element_iterator +{ + public: + struct soap_dom_element *iter; + struct soap_dom_element *stop; const char *nstr; const char *name; int type; + bool deep; bool operator==(const soap_dom_element_iterator&) const; bool operator!=(const soap_dom_element_iterator&) const; - struct soap_dom_element &operator*() const; - soap_dom_element_iterator &operator++(); + struct soap_dom_element& operator*() const; + struct soap_dom_element *operator->() const; + soap_dom_element_iterator& operator++(); + soap_dom_element_iterator operator++(int); soap_dom_element_iterator(); soap_dom_element_iterator(struct soap_dom_element*); ~soap_dom_element_iterator(); @@ -1871,121 +2295,249 @@ class soap_dom_element_iterator #endif #ifndef WITH_LEANER -struct soap_dom_element -{ struct soap_dom_element *next; /* next sibling */ - struct soap_dom_element *prnt; /* parent */ - struct soap_dom_element *elts; /* list of child elements */ - struct soap_dom_attribute *atts; /* list of attributes */ - const char *nstr; /* namespace string */ - char *name; /* element tag name */ - char *data; /* element content data (with SOAP_C_UTFSTRING flag set) */ - wchar_t *wide; /* element content data */ - int type; /* optional: serialized C/C++ data type */ - void *node; /* optional: pointer to serialized C/C++ data */ - char *head; /* leading content before start tag */ - char *tail; /* leading content before end tag */ - struct soap *soap; /* soap context that manages this node */ +struct SOAP_CMAC soap_dom_element +{ struct soap_dom_element *next; + struct soap_dom_element *prnt; + struct soap_dom_element *elts; + struct soap_dom_attribute *atts; + const char *nstr; + const char *name; + const char *lead; + const char *text; + const char *code; + const char *tail; + const void *node; + int type; + struct soap *soap; #ifdef __cplusplus typedef soap_dom_element_iterator iterator; - struct soap_dom_element &set(const char *nstr, const char *name); - struct soap_dom_element &set(const char *data); - struct soap_dom_element &set(void *node, int type); - struct soap_dom_element &add(struct soap_dom_element*); - struct soap_dom_element &add(struct soap_dom_element&); - struct soap_dom_element &add(struct soap_dom_attribute*); - struct soap_dom_element &add(struct soap_dom_attribute&); + soap_dom_element(struct soap *soap = NULL); + soap_dom_element(const soap_dom_element& elt); + soap_dom_element(struct soap *soap, const char *tag); + soap_dom_element(struct soap *soap, const wchar_t *tag); + soap_dom_element(struct soap *soap, const char *ns, const char *tag); + soap_dom_element(struct soap *soap, const char *ns, const wchar_t *tag); + soap_dom_element(struct soap *soap, const char *ns, const char *tag, const char *text); + soap_dom_element(struct soap *soap, const char *ns, const char *tag, const wchar_t *text); + soap_dom_element(struct soap *soap, const char *ns, const wchar_t *tag, const char *text); + soap_dom_element(struct soap *soap, const char *ns, const wchar_t *tag, const wchar_t *text); +#ifndef WITH_COMPAT + soap_dom_element(struct soap *soap, const char *ns, const char *tag, const std::string& text); + soap_dom_element(struct soap *soap, const char *ns, const char *tag, const std::wstring& text); + soap_dom_element(struct soap *soap, const char *ns, const wchar_t *tag, const std::string& text); + soap_dom_element(struct soap *soap, const char *ns, const wchar_t *tag, const std::wstring& text); +#endif + soap_dom_element(struct soap *soap, const char *ns, const char *tag, const void *node, int type); + soap_dom_element(struct soap *soap, const char *ns, const wchar_t *tag, const void *node, int type); + ~soap_dom_element(); + soap_dom_element& set(const char *ns, const char *tag) { return *soap_elt_set(this, ns, tag); } + soap_dom_element& set(const char *ns, const wchar_t *tag) { return *soap_elt_set_w(this, ns, tag); } + soap_dom_element& set(bool b) { return *soap_elt_bool(this, b); } + soap_dom_element& set(int n) { return *soap_elt_int(this, n); } + soap_dom_element& set(LONG64 n) { return *soap_elt_int(this, n); } + soap_dom_element& set(float x) { return *soap_elt_double(this, x); } + soap_dom_element& set(double x) { return *soap_elt_double(this, x); } + soap_dom_element& set(const char *text) { return *soap_elt_text(this, text); } + soap_dom_element& set(const wchar_t *text) { return *soap_elt_text_w(this, text); } +#ifndef WITH_COMPAT + soap_dom_element& set(const std::string& text) { return *soap_elt_text(this, text.c_str()); } + soap_dom_element& set(const std::wstring& text) { return *soap_elt_text_w(this, text.c_str()); } +#endif + soap_dom_element& set(const void *node, int type) { return *soap_elt_node(this, node, type); } + soap_dom_element& add(soap_dom_element& elt) { return *soap_add_elt(this, &elt); } + soap_dom_element& add(soap_dom_element *elt) { return *soap_add_elt(this, elt); } + soap_dom_element& add(soap_dom_attribute& att) { return *soap_add_att(this, &att); } + soap_dom_element& add(soap_dom_attribute *att) { return *soap_add_att(this, att); } + soap_dom_element& adds(soap_dom_element& elts) { return *soap_add_elts(this, &elts); } + soap_dom_element& adds(soap_dom_element *elts) { return *soap_add_elts(this, elts); } + soap_dom_element& adds(soap_dom_attribute& atts) { return *soap_add_atts(this, &atts); } + soap_dom_element& adds(soap_dom_attribute *atts) { return *soap_add_atts(this, atts); } + soap_dom_element& operator=(bool b) { return *soap_elt_bool(this, b); } + soap_dom_element& operator=(int n) { return *soap_elt_int(this, n); } + soap_dom_element& operator=(LONG64 n) { return *soap_elt_int(this, n); } + soap_dom_element& operator=(float x) { return *soap_elt_double(this, x); } + soap_dom_element& operator=(double x) { return *soap_elt_double(this, x); } + soap_dom_element& operator=(const char *text) { return *soap_elt_text(this, text); } + soap_dom_element& operator=(const wchar_t *text) { return *soap_elt_text_w(this, text); } +#ifndef WITH_COMPAT + soap_dom_element& operator=(const std::string& text) { return *soap_elt_text(this, text.c_str()); } + soap_dom_element& operator=(const std::wstring& text) { return *soap_elt_text_w(this, text.c_str()); } +#endif + soap_dom_element& operator=(const soap_dom_element& elt) { return *soap_elt_copy(this, &elt); } + template<class T> soap_dom_element& operator=(const T& node) { return this->set(&node, node.soap_type()); } + template<class T> soap_dom_element& operator=(const T *node) { return this->set(node, node->soap_type()); } + template<class T> soap_dom_element& operator=(T *node) { return this->set(node, node->soap_type()); } + soap_dom_attribute& att(const char *tag) { return *soap_att(this, NULL, tag); } + soap_dom_attribute& att(const wchar_t *tag) { return *soap_att_w(this, NULL, tag); } + soap_dom_attribute& att(const char *ns, const char *tag) { return *soap_att(this, ns, tag); } + soap_dom_attribute& att(const char *ns, const wchar_t *tag) { return *soap_att_w(this, ns, tag); } + soap_dom_element& elt() { return *soap_elt(this, NULL, NULL); } + soap_dom_element& elt(const char *tag) { return *soap_elt(this, NULL, tag); } + soap_dom_element& elt(const wchar_t *tag) { return *soap_elt_w(this, NULL, tag); } + soap_dom_element& elt(const char *ns, const char *tag) { return *soap_elt(this, ns, tag); } + soap_dom_element& elt(const char *ns, const wchar_t *tag) { return *soap_elt_w(this, ns, tag); } + soap_dom_element& operator[](const char *tag) { return *soap_elt(this, NULL, tag); } + soap_dom_element& operator[](const wchar_t *tag) { return *soap_elt_w(this, NULL, tag); } + soap_dom_element& operator[](size_t n) { return *soap_nth(this, n); } + soap_dom_attribute *att_get(const char *tag) const { return soap_att_get(this, NULL, tag); } + soap_dom_attribute *att_get(const wchar_t *tag) const { return soap_att_get_w(this, NULL, tag); } + soap_dom_attribute *att_get(const char *ns, const char *tag) const { return soap_att_get(this, ns, tag); } + soap_dom_attribute *att_get(const char *ns, const wchar_t *tag) const { return soap_att_get_w(this, ns, tag); } + soap_dom_element *elt_get() const { return soap_elt_get(this, NULL, NULL); } + soap_dom_element *elt_get(const char *tag) const { return soap_elt_get(this, NULL, tag); } + soap_dom_element *elt_get(const wchar_t *tag) const { return soap_elt_get_w(this, NULL, tag); } + soap_dom_element *elt_get(const char *ns, const char *tag) const { return soap_elt_get(this, ns, tag); } + soap_dom_element *elt_get(const char *ns, const wchar_t *tag) const { return soap_elt_get_w(this, ns, tag); } + soap_dom_element *get_next() const { return soap_elt_get_next(this); } + soap_dom_element *get_nth(size_t n) { return soap_elt_get_nth(this, n); } + bool match(const char *patt) const { return soap_elt_match(this, NULL, patt) != 0; } + bool match(const wchar_t *patt) const { return soap_elt_match_w(this, NULL, patt) != 0; } + bool match(const char *ns, const char *patt) const { return soap_elt_match(this, ns, patt) != 0; } + bool match(const char *ns, const wchar_t *patt) const { return soap_elt_match_w(this, ns, patt) != 0; } + const char *ns() const { return this->nstr; } + const char *tag() const { return this->name; } + soap_dom_element *parent() { return this->prnt; } + size_t depth() const { return soap_elt_depth(this); } + size_t index() const { return soap_elt_index(this); } + size_t len() const { return soap_elt_len(this); } + size_t nth() const { return soap_elt_nth(this); } + size_t elt_size() { return soap_elt_size(this, NULL, NULL); } + size_t elt_size(const char *patt, int type = 0) { return elt_size(NULL, patt, type); } + size_t elt_size(const char *ns, const char *patt, int type = 0) { return soap_elt_size_type(this, ns, patt, type); } + size_t att_size() { return soap_att_size(this, NULL, NULL); } + size_t att_size(const char *patt) { return att_size(NULL, patt); } +#ifndef WITH_COMPAT + size_t att_size(const std::string& patt) { return att_size(NULL, patt); } +#endif + size_t att_size(const char *ns, const char *patt) { return soap_att_size(this, ns, patt); } +#ifndef WITH_COMPAT + size_t att_size(const char *ns, const std::string& patt) { return soap_att_size(this, ns, patt.c_str()); } +#endif + bool is_true() const { return soap_elt_is_true(this) != 0; } + bool is_false() const { return soap_elt_is_false(this) != 0; } + LONG64 get_int() const { return soap_elt_get_LONG64(this); } + double get_double() const { return soap_elt_get_double(this); } + const char *get_text() const { return this->text; } + const void *get_node(int type) const { return soap_elt_get_node(this, type); } + int get_type(const void **node) const { return soap_elt_get_type(this, node); } + operator bool() const { return soap_elt_is_true(this) != 0; } + operator int() const { return soap_elt_get_int(this); } + operator LONG64() const { return soap_elt_get_LONG64(this); } + operator double() const { return soap_elt_get_double(this); } + operator const char*() const { return this->text; } soap_dom_element_iterator begin(); - soap_dom_element_iterator end(); - soap_dom_element_iterator find(const char *nstr, const char *name); + soap_dom_element_iterator end() { return soap_dom_element_iterator(NULL); } + soap_dom_element_iterator elt_begin() { return soap_dom_element_iterator(this->elts); } + soap_dom_element_iterator elt_end() { return soap_dom_element_iterator(NULL); } + soap_dom_attribute_iterator att_begin() { return soap_dom_attribute_iterator(this->atts); } + soap_dom_attribute_iterator att_end() { return soap_dom_attribute_iterator(NULL); } + soap_dom_element_iterator find(const char *patt, int type = 0) { return find(NULL, patt, type); } + soap_dom_element_iterator find(const wchar_t *patt, int type = 0) { return find(NULL, patt, type); } + soap_dom_element_iterator find(const char *ns, const char *patt, int type = 0); + soap_dom_element_iterator find(const char *ns, const wchar_t *patt, int type = 0); soap_dom_element_iterator find(int type); + soap_dom_element_iterator elt_find(const char *patt, int type = 0) { return elt_find(NULL, patt, type); } + soap_dom_element_iterator elt_find(const wchar_t *patt, int type = 0) { return elt_find(NULL, patt, type); } + soap_dom_element_iterator elt_find(const char *ns, const char *patt, int type = 0); + soap_dom_element_iterator elt_find(const char *ns, const wchar_t *patt, int type = 0); + soap_dom_element_iterator elt_find(int type); + soap_dom_attribute_iterator att_find(const char *patt) { return att_find(NULL, patt); } + soap_dom_attribute_iterator att_find(const wchar_t *patt) { return att_find(NULL, patt); } + soap_dom_attribute_iterator att_find(const char *ns, const char *patt); + soap_dom_attribute_iterator att_find(const char *ns, const wchar_t *patt); void unlink(); - soap_dom_element(); - soap_dom_element(struct soap *soap); - soap_dom_element(struct soap *soap, const char *nstr, const char *name); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data); - soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type); - ~soap_dom_element(); #endif }; -SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt); -SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att); #endif -#if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT) -} +#ifndef WITH_LEANER +SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dup_xsd__anyType(struct soap *soap, struct soap_dom_element *d, const struct soap_dom_element *a); +SOAP_FMAC1 void SOAP_FMAC2 soap_del_xsd__anyType(const struct soap_dom_element *a); +SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dup_xsd__anyAttribute(struct soap *soap, struct soap_dom_attribute *d, const struct soap_dom_attribute *a); +SOAP_FMAC1 void SOAP_FMAC2 soap_del_xsd__anyAttribute(const struct soap_dom_attribute *a); +SOAP_FMAC1 int SOAP_FMAC2 soap_dom_call(struct soap *soap, const char *endpoint, const char *action, const struct soap_dom_element *in, struct soap_dom_element *out); +#endif + +#ifndef WITH_LEANER +#if defined(__cplusplus) && !defined(WITH_COMPAT) extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&); extern std::istream &operator>>(std::istream&, struct soap_dom_element&); + +SOAP_FMAC1 int SOAP_FMAC2 soap_dom_call(struct soap *soap, const char *endpoint, const char *action, const struct soap_dom_element& in, struct soap_dom_element& out); +SOAP_FMAC1 int SOAP_FMAC2 soap_dom_call(struct soap *soap, const char *endpoint, const char *action, const struct soap_dom_element *in, struct soap_dom_element& out); +SOAP_FMAC1 int SOAP_FMAC2 soap_dom_call(struct soap *soap, const char *endpoint, const char *action, const struct soap_dom_element& in, struct soap_dom_element *out); +#endif +#endif + +#if defined(__cplusplus) extern "C" { #endif /******************************************************************************/ -#ifdef WIN32 -# ifdef SOAP_STD_EXPORTS -# define SOAP_STD_API __declspec(dllexport) -# else -# define SOAP_STD_API -# endif -#else -# define SOAP_STD_API -#endif - -struct SOAP_STD_API soap -{ short state; /* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */ - short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table), 0 indicates non-SOAP content */ +struct SOAP_CMAC soap +{ short state; /* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */ + short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table), 0 indicates non-SOAP content */ soap_mode mode; soap_mode imode; soap_mode omode; - const char *float_format; /* user-definable format string for floats (<1024 chars) */ - const char *double_format; /* user-definable format string for doubles (<1024 chars) */ - const char *dime_id_format; /* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */ - const char *http_version; /* HTTP version used "1.0" or "1.1" */ - const char *http_content; /* optional custom response content type (with SOAP_FILE) */ - const char *encodingStyle; /* default = "" which means that SOAP encoding is used */ - const char *actor; /* SOAP-ENV:actor or role attribute value */ - const char *lang; /* xml:lang attribute value of SOAP-ENV:Text */ - int recv_timeout; /* when > 0, gives socket recv timeout in seconds, < 0 in usec */ - int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */ - int connect_timeout; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */ - int accept_timeout; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */ - int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */ - int connect_flags; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */ - int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */ - int accept_flags; /* accept() SOL_SOCKET sockopt flags */ - unsigned short linger_time; /* linger time for SO_LINGER option */ - const struct Namespace *namespaces; /* Pointer to global namespace mapping table */ - struct Namespace *local_namespaces; /* Local namespace mapping table */ - struct soap_nlist *nlist; /* namespace stack */ - struct soap_blist *blist; /* block allocation stack */ - struct soap_clist *clist; /* class instance allocation list */ - void *alist; /* memory allocation (malloc) list */ -#if !defined(WITH_LEAN) || !defined(WITH_NOIDREF) + const char *float_format; /* user-definable format string for floats (<1024 chars) */ + const char *double_format; /* user-definable format string for doubles (<1024 chars) */ + const char *long_double_format; /* user-definable format string for long doubles (<1024 chars) */ + const char *dime_id_format; /* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */ + int recv_timeout; /* user-definable, when > 0, gives socket recv timeout in seconds, < 0 in usec */ + int send_timeout; /* user-definable, when > 0, gives socket send timeout in seconds, < 0 in usec */ + int connect_timeout; /* user-definable, when > 0, gives socket connect() timeout in seconds, < 0 in usec */ + int accept_timeout; /* user-definable, when > 0, gives socket accept() timeout in seconds, < 0 in usec */ + int socket_flags; /* user-definable socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */ + int connect_flags; /* user-definable connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */ + int bind_flags; /* user-definable bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */ + int accept_flags; /* user-definable accept() SOL_SOCKET sockopt flags */ + int sndbuf; /* user-definable SO_SNFBUF setsockopt */ + int rcvbuf; /* user-definable SO_SNFBUF setsockopt */ + unsigned short linger_time; /* user-definable linger time for SO_LINGER option */ + unsigned int maxlevel; /* user-definable max XML nesting depth levels, initialized to SOAP_MAXLEVEL */ + long maxlength; /* user-definable max string length, initialized to SOAP_MAXLENGTH, maxlength<=0 is unbounded */ + size_t maxoccurs; /* user-definable max array/container size, initialized to SOAP_MAXOCCURS */ + const char *http_version; /* HTTP version used "1.0" or "1.1" */ + const char *http_content; /* optional custom response content type (with SOAP_FILE) */ + const char *encodingStyle; /* default = "" which means that SOAP encoding is used */ + const char *actor; /* SOAP-ENV:actor or role attribute value */ + const char *lang; /* user-definable xml:lang attribute value of SOAP-ENV:Text */ + const struct Namespace *namespaces; /* Pointer to global namespace mapping table */ + struct Namespace *local_namespaces; /* Local namespace mapping table */ + struct soap_nlist *nlist; /* namespace stack */ + struct soap_blist *blist; /* block allocation stack */ + struct soap_clist *clist; /* class instance allocation list */ + void *alist; /* memory allocation (malloc) list */ + short shaky; /* objects in reallocatable containers are on shaky grounds */ +#if !defined(WITH_LEANER) || !defined(WITH_NOIDREF) struct soap_ilist *iht[SOAP_IDHASH]; - struct soap_plist *pht[SOAP_PTRHASH]; - struct soap_pblk *pblk; /* plist block allocation */ - short pidx; /* plist block allocation */ #endif + struct soap_plist *pht[SOAP_PTRHASH]; + struct soap_pblk *pblk; /* plist block allocation */ + short pidx; /* plist block allocation */ struct SOAP_ENV__Header *header; struct SOAP_ENV__Fault *fault; int idnum; - void *user; /* for user to pass user-defined data */ - void *data[4]; /* extension data = {smdevp, mecevp, ...} */ - struct soap_plugin *plugins; /* linked list of plug-in data */ - const char *userid; /* HTTP Basic authorization userid */ - const char *passwd; /* HTTP Basic authorization passwd */ - const char *authrealm; /* HTTP authentication realm (NTLM domain) */ + void *user; /* for user to pass user-defined data to callbacks */ + void *data[4]; /* extension data = {smdevp, mecevp, ...} */ + struct soap_plugin *plugins; /* linked list of plug-in data */ + const char *userid; /* HTTP Basic authorization userid */ + const char *passwd; /* HTTP Basic authorization passwd */ + const char *authrealm; /* HTTP authentication realm (and NTLM domain) */ #if !defined(WITH_LEAN) || defined(WITH_NTLM) - const char *ntlm_challenge; /* HTTP NTLM challenge key string */ - short ntlm_auth; /* HTTP NTLM authentication type */ - short ntlm_stage; /* HTTP NTLM stage 0..3 */ + const char *ntlm_challenge; /* HTTP NTLM challenge key string */ + short ntlm_auth; /* HTTP NTLM authentication type */ + short ntlm_stage; /* HTTP NTLM stage 0..3 */ #endif int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t); - int (*fget)(struct soap*); /* HTTP GET hook (not set by default) */ - int (*fput)(struct soap*); /* HTTP PUT hook (handled as POST by default) */ - int (*fdel)(struct soap*); /* HTTP DELETE hook (not set by default) */ - int (*fopt)(struct soap*); /* HTTP OPTIONS hook (not set by default) */ - int (*fhead)(struct soap*); /* HTTP HEAD hook (not set by default) */ - int (*fform)(struct soap*); /* HTTP/HTML form handler for plugins */ + int (*fget)(struct soap*); /* HTTP GET hook (not set by default) */ + int (*fput)(struct soap*); /* HTTP PUT hook (handled as POST by default) */ + int (*fdel)(struct soap*); /* HTTP DELETE hook (not set by default) */ + int (*fopt)(struct soap*); /* HTTP OPTIONS hook (not set by default) */ + int (*fhead)(struct soap*); /* HTTP HEAD hook (not set by default) */ + int (*fform)(struct soap*); /* HTTP/HTML form handler for plugins */ int (*fposthdr)(struct soap*, const char*, const char*); int (*fresponse)(struct soap*, int, size_t); int (*fparse)(struct soap*); @@ -2008,6 +2560,8 @@ struct SOAP_STD_API soap void *(*fplugin)(struct soap*, const char*); void *(*fmalloc)(struct soap*, size_t); #ifndef WITH_LEANER + int (*fsvalidate)(struct soap*, const char*, const char*); + int (*fwvalidate)(struct soap*, const char*, const wchar_t*); int (*feltbegin)(struct soap*, const char*); int (*feltendin)(struct soap*, const char*, const char*); int (*feltbegout)(struct soap*, const char*); @@ -2018,7 +2572,7 @@ struct SOAP_STD_API soap int (*fpreparerecv)(struct soap*, const char*, size_t); int (*fpreparefinalsend)(struct soap*); int (*fpreparefinalrecv)(struct soap*); - int filterstop; + int recverror; /* last soap_recv_raw error code for filterrecv */ int (*ffiltersend)(struct soap*, const char**, size_t*); int (*ffilterrecv)(struct soap*, char*, size_t*, size_t); void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*); @@ -2034,38 +2588,38 @@ struct SOAP_STD_API soap size_t (*fmimeread)(struct soap*, void*, char*, size_t); int (*fmimewrite)(struct soap*, void*, const char*, size_t); #endif - SOAP_SOCKET master; /* socket bound to TCP/IP port */ - SOAP_SOCKET socket; /* socket to send and receive */ - SOAP_SOCKET sendsk; /* socket to send (overrides ::socket) */ - SOAP_SOCKET recvsk; /* socket to receive (overrides ::socket) */ -#if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT) - std::ostream *os; /* stream to send */ - std::istream *is; /* stream to receive */ + SOAP_SOCKET master; /* socket bound to TCP/IP port */ + SOAP_SOCKET socket; /* socket to send and receive */ + SOAP_SOCKET sendsk; /* socket to send (overrides ::socket) */ + SOAP_SOCKET recvsk; /* socket to receive (overrides ::socket) */ +#if defined(__cplusplus) && !defined(WITH_COMPAT) + std::ostream *os; /* C++ only: ostream to send */ + std::istream *is; /* C++ only: istream to receive */ #else - void *os; /* preserve struct size */ - void *is; /* preserve struct size */ + const char **os; /* C only: pointer to a const char*, will be set to point to the string output */ + const char *is; /* C only: a const char* to read from (soap->is will advance) */ #endif #ifndef UNDER_CE - int sendfd; /* WinCE FD to send */ - int recvfd; /* WinCE FD to receive */ + int sendfd; /* int file descriptor for sending */ + int recvfd; /* int file descriptor for receiving */ #else - FILE *sendfd; /* FD to send */ - FILE *recvfd; /* FD to receive */ -#endif - size_t bufidx; /* index in soap.buf[] */ - size_t buflen; /* length of soap.buf[] content */ - soap_wchar ahead; /* parser lookahead */ - short cdata; /* CDATA parser state */ - short body; /* HTTP or XML element has a body (1) or not (0) */ - unsigned int level; /* XML nesting level */ - size_t count; /* message length counter */ - size_t length; /* message length as set by HTTP header */ - char *labbuf; /* look-aside buffer */ - size_t lablen; /* look-aside buffer allocated length */ - size_t labidx; /* look-aside buffer index to available part */ + FILE *sendfd; /* WinCE FILE* to send */ + FILE *recvfd; /* WinCE FILE* to receive */ +#endif + size_t bufidx; /* index in soap.buf[] */ + size_t buflen; /* length of soap.buf[] content */ + soap_wchar ahead; /* parser lookahead */ + short cdata; /* CDATA parser state */ + short body; /* HTTP or XML element has a body (1) or not (0) */ + unsigned int level; /* XML nesting level */ + size_t count; /* message length counter */ + size_t length; /* message length as set by HTTP header */ + char *labbuf; /* look-aside buffer */ + size_t lablen; /* look-aside buffer allocated length */ + size_t labidx; /* look-aside buffer index to available part */ char buf[SOAP_BUFLEN];/* send and receive buffer */ - char msgbuf[1024]; /* in/out buffer for HTTP/MIME headers >=1024 bytes */ - char tmpbuf[1024]; /* in/out buffer for HTTP/MIME headers, simpleType values, element and attribute tag names, and DIME must be >=1024 bytes */ + char msgbuf[SOAP_TMPLEN]; /* in/out buffer for HTTP/MIME headers and short messages, must be >=1024 bytes */ + char tmpbuf[SOAP_TMPLEN]; /* in/out buffer for HTTP/MIME headers, simpleType values, element and attribute tag names, and DIME must be >=1024 bytes */ char tag[SOAP_TAGLEN]; char id[SOAP_TAGLEN]; char href[SOAP_TAGLEN]; @@ -2077,38 +2631,38 @@ struct SOAP_STD_API soap short root; int position; int positions[SOAP_MAXDIMS]; - struct soap_attribute *attributes; /* attribute list */ - short encoding; /* when set, output encodingStyle */ - short mustUnderstand; /* a mustUnderstand element was parsed or is output */ - short null; /* parsed XML is xsi:nil */ - short ns; /* when not set, output full xmlns bindings */ - short part; /* SOAP part state (header or body) */ - short event; /* engine events and states for use by plugins */ - unsigned int evlev; /* event level */ - short alloced; + struct soap_attribute *attributes; /* attribute list */ + short encoding; /* when set, output encodingStyle */ + short mustUnderstand; /* a mustUnderstand element was parsed or is output */ + short null; /* parsed XML is xsi:nil */ + short ns; /* zero to output all xmlns */ + short part; /* SOAP part state (header or body) */ + short event; /* engine events and states for use by plugins */ short peeked; + unsigned int evlev; /* event level */ + int alloced; size_t chunksize; size_t chunkbuflen; char endpoint[SOAP_TAGLEN]; char path[SOAP_TAGLEN]; char host[SOAP_TAGLEN]; char *action; - char *prolog; /* XML declaration prolog */ - unsigned long ip; /* IP number */ - int port; /* port number */ - short keep_alive; /* connection should be kept open */ - short tcp_keep_alive; /* enable SO_KEEPALIVE */ - unsigned int tcp_keep_idle; /* set TCP_KEEPIDLE */ - unsigned int tcp_keep_intvl; /* set TCP_KEEPINTVL */ - unsigned int tcp_keep_cnt; /* set TCP_KEEPCNT */ + const char *prolog; /* XML declaration prolog */ + unsigned long ip; /* IP number */ + int port; /* port number */ + short keep_alive; /* connection should be kept open */ + short tcp_keep_alive; /* enable SO_KEEPALIVE */ + unsigned int tcp_keep_idle; /* set TCP_KEEPIDLE */ + unsigned int tcp_keep_intvl; /* set TCP_KEEPINTVL */ + unsigned int tcp_keep_cnt; /* set TCP_KEEPCNT */ unsigned int max_keep_alive; /* maximum keep-alive session (default=100) */ const char *proxy_http_version;/* HTTP version of proxy "1.0" or "1.1" */ - const char *proxy_host; /* Proxy Server host name */ - int proxy_port; /* Proxy Server port (default = 8080) */ - const char *proxy_userid; /* Proxy Authorization user name */ - const char *proxy_passwd; /* Proxy Authorization password */ - const char *proxy_from; /* X-Forwarding-For header returned by proxy */ - int status; /* -1 when request, else error code to be returned by server */ + const char *proxy_host; /* Proxy Server host name */ + int proxy_port; /* Proxy Server port (default = 8080) */ + const char *proxy_userid; /* Proxy Authorization user name */ + const char *proxy_passwd; /* Proxy Authorization password */ + const char *proxy_from; /* X-Forwarding-For header returned by proxy */ + int status; /* -1 when request, else error code to be returned by server */ int error; int errmode; int errnum; @@ -2124,8 +2678,9 @@ struct SOAP_STD_API soap struct soap_mlist *mht[SOAP_PTRHASH]; #endif #ifndef WITH_LEAN - const char *wsuid; /* space-separated string of element tags */ - const char *c14nexclude; /* space-separated string of prefixes */ + const char *wsuid; /* space-separated string of element tags */ + const char *c14nexclude; /* space-separated string of prefixes for c14n exclusion */ + const char *c14ninclude; /* space-separated string of prefixes for c14n inclusion */ struct soap_cookie *cookies; const char *cookie_domain; const char *cookie_path; @@ -2135,14 +2690,14 @@ struct SOAP_STD_API soap unsigned int ipv6_multicast_if; /* in_addr_t in6addr->sin6_scope_id IPv6 value */ char* ipv4_multicast_if; /* IP_MULTICAST_IF IPv4 setsockopt interface_addr */ unsigned char ipv4_multicast_ttl; /* IP_MULTICAST_TTL value 0..255 */ -#ifdef WITH_IPV6 - struct sockaddr_storage peer; /* IPv6: set by soap_accept and by UDP recv */ -#else - struct sockaddr_in peer; /* IPv4: set by soap_connect/soap_accept and by UDP recv */ -#endif + union + { struct sockaddr addr; + struct sockaddr_in in; + struct sockaddr_storage storage; + } peer; /* set by soap_connect/soap_accept and by UDP recv */ #endif size_t peerlen; -#if defined(WITH_OPENSSL) /* OpenSSL */ +#if defined(WITH_OPENSSL) /* OpenSSL */ int (*fsslauth)(struct soap*); int (*fsslverify)(int, X509_STORE_CTX*); BIO *bio; @@ -2151,17 +2706,26 @@ struct SOAP_STD_API soap SSL_SESSION *session; const char *dhfile; const char *randfile; -#elif defined(WITH_GNUTLS) /* GNUTLS */ +#elif defined(WITH_GNUTLS) /* GNUTLS */ int (*fsslauth)(struct soap*); void *fsslverify; - gnutls_certificate_credentials_t xcred; /* cert pointer */ - gnutls_anon_client_credentials_t acred; /* anon pointer */ - gnutls_priority_t cache; /* priority cache pointer */ - gnutls_session_t session; /* session pointer */ + gnutls_certificate_credentials_t xcred; /* cert pointer */ + gnutls_anon_client_credentials_t acred; /* anon pointer */ + gnutls_priority_t cache; /* priority cache pointer */ + gnutls_session_t session; /* session pointer */ gnutls_dh_params_t dh_params; gnutls_rsa_params_t rsa_params; -#else /* No SSL/TLS */ - void *fsslauth; /* dummy members, to preserve struct size */ +#elif defined(WITH_SYSTEMSSL) /* SYSTEM SSL */ + int (*fsslauth)(struct soap*); + void *fsslverify; /* N/A */ + void *bio; /* N/A */ + gsk_handle ctx; /* environment */ + gsk_handle ssl; /* ssl socket */ + void *session; /* N/A */ + const char *dhfile; /* N/A */ + const char *randfile; /* N/A */ +#else /* No SSL/TLS */ + void *fsslauth; /* dummy members, to preserve struct size */ void *fsslverify; void *bio; void *ssl; @@ -2181,31 +2745,31 @@ struct SOAP_STD_API soap int session_port; #ifdef WITH_C_LOCALE # ifdef WIN32 - _locale_t c_locale; /* set to C locale by default */ + _locale_t c_locale; /* set to C locale by default */ # else - locale_t c_locale; /* set to C locale by default */ + locale_t c_locale; /* set to C locale by default */ # endif #else void *c_locale; #endif #ifdef WITH_ZLIB - z_stream *d_stream; /* decompression stream */ - uLong z_crc; /* internal gzip crc */ + z_stream *d_stream; /* decompression stream */ + uLong z_crc; /* internal gzip crc */ #else - void *d_stream; /* dummy members, to preserve struct size */ + void *d_stream; /* dummy members, to preserve struct size */ soap_int32 z_crc; #endif - const char *z_dict; /* support for zlib static dictionaries */ + const char *z_dict; /* support for zlib static dictionaries */ unsigned int z_dict_len; - short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */ - short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ - char *z_buf; /* buffer */ + short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */ + short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ + short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ + char *z_buf; /* buffer */ size_t z_buflen; - unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */ - float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */ - float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */ -#ifdef WMW_RPM_IO /* VxWorks */ + unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */ + float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */ + float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */ +#ifdef WMW_RPM_IO /* VxWorks */ void *rpmreqid; #endif #ifdef __cplusplus @@ -2213,14 +2777,13 @@ struct SOAP_STD_API soap soap(soap_mode); soap(soap_mode, soap_mode); soap(const struct soap&); - virtual ~soap(); -#else - void (*dummy)(void); + struct soap& operator=(const struct soap&); + ~soap(); /* no virtual methods, so sizeof(soap) should be the same in C and C++ */ #endif }; struct soap_code_map -{ long code; +{ LONG64 code; const char *string; }; @@ -2230,8 +2793,8 @@ struct soap_flist int type; void *ptr; unsigned int level; - size_t len; - void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t); + size_t index; + void (*finsert)(struct soap*, int, int, void*, size_t, const void*, void**); }; /* id-ref forwarding list */ @@ -2239,11 +2802,13 @@ struct soap_ilist { struct soap_ilist *next; int type; size_t size; + void *ptr; + void **spine; void *link; void *copy; struct soap_flist *flist; - void *ptr; - unsigned int level; + void *smart; + short shaky; char id[1]; /* the actual id string value flows into the allocated region below this struct */ }; @@ -2265,10 +2830,7 @@ soap_wchar soap_get0(struct soap*); soap_wchar soap_get1(struct soap*); #endif -#define SOAP_XSTRINGIFY(s) SOAP_STRINGIFY(s) -#define SOAP_STRINGIFY(s) #s - -#define soap_versioning_paste(name, ext) name##_LIBRARY_VERSION_REQUIRED_##ext +#define soap_versioning_paste(name, ext) name##_REQUIRE_lib_v##ext #define soap_versioning_ext(name, ext) soap_versioning_paste(name, ext) #define soap_versioning(name) soap_versioning_ext(name, GSOAP_VERSION) @@ -2282,6 +2844,7 @@ soap_wchar soap_get1(struct soap*); #define soap_revget1(soap) ((soap)->bufidx--) #define soap_unget(soap, c) ((soap)->ahead = c) +#define soap_peek(soap) ((soap)->ahead = soap_get(soap)) #define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL) #define soap_mode(soap, n) ((soap)->mode = (soap)->imode = (soap)->omode = (n)) #define soap_imode(soap, n) ((soap)->imode = (n)) @@ -2290,10 +2853,12 @@ soap_wchar soap_get1(struct soap*); #define soap_clr_imode(soap, n) ((soap)->imode &= ~(n)) #define soap_set_omode(soap, n) ((soap)->omode |= (n)) #define soap_clr_omode(soap, n) ((soap)->omode &= ~(n)) -#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n)) -#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n)) +#define soap_set_mode(soap, n) ((soap)->mode |= (n), (soap)->imode |= (n), (soap)->omode |= (n)) +#define soap_clr_mode(soap, n) ((soap)->mode &= ~(n), (soap)->imode &= ~(n), (soap)->omode &= ~(n)) #define soap_destroy(soap) soap_delete((soap), NULL) +#define SOAP_NO_LINK_TO_DELETE (-2) /* pass to soap_link() as size n: do not manage, smart pointers are self-managing */ + #ifdef HAVE_STRRCHR # define soap_strrchr(s, t) strrchr(s, t) #else @@ -2303,24 +2868,24 @@ soap_wchar soap_get1(struct soap*); #ifdef HAVE_STRTOL # define soap_strtol(s, t, b) strtol(s, t, b) #else - SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b); + SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char*, char**, int); #endif #ifdef HAVE_STRTOUL # define soap_strtoul(s, t, b) strtoul(s, t, b) #else - SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b); + SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char*, char**, int); #endif -#if defined(WIN32) && !defined(__MINGW32__) +#if defined(WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) # define soap_strtoll _strtoi64 -#else +#elif !defined(soap_strtoll) # define soap_strtoll strtoll #endif -#if defined(WIN32) && !defined(__MINGW32__) +#if defined(WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) # define soap_strtoull _strtoui64 -#else +#elif !defined(soap_strtoull) # define soap_strtoull strtoull #endif @@ -2334,19 +2899,22 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_rand(void); #endif #ifdef WITH_NOIDREF -# define soap_embedded(s, p, t) (0) -# define soap_id_lookup(s, i, p, t, n, k) (p) -# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p) -# define soap_reference(s, a, t) (1) -# define soap_array_reference(s, p, a, n, t) (1) -# define soap_embed(s, p, a, n, t, pp) (0) -# define soap_embedded_id(s, i, p, t) (i) -# define soap_is_embedded(s, p) (0) -# define soap_is_single(s, p) (1) -# define soap_lookup_type(s, i) (0) -# define soap_getindependent(s) (0) -# define soap_putindependent(s) (0) -# define soap_markelement(s, p, n) (0) +# define soap_embedded(s, p, t) ((void)(s), 0) +# define soap_id_lookup(s, i, p, t, n, k, fb) ((void)(s), (p)) +# define soap_id_forward(s, h, p, i, t, tt, n, k, fi, fb) ((void)(s), (p)) +# define soap_id_nullify(s, i) ((void)(s), (i)) +# define soap_reference(s, a, t) ((void)(s), 1) +# define soap_array_reference(s, p, a, n, t) ((void)(s), 1) +# define soap_embed(s, p, a, n, t) ((void)(s), 0) +# define soap_embedded_id(s, i, p, t) ((void)(s), (void)(t), i) +# define soap_is_embedded(s, p) ((void)(s), 0) +# define soap_is_single(s, p) ((void)(s), 1) +# define soap_lookup_type(s, i) ((void)(s), 0) +# define soap_getindependent(s) ((void)(s), 0) +# define soap_putindependent(s) ((void)(s), 0) +# define soap_markelement(s, p, t) ((void)(s), 0) +# define soap_begin_shaky(s) ((void)(s), 0) +# define soap_end_shaky(s, f) ((void)(s), (void)(f), 0) #endif /* soap_traverse() traversal/walker routines take walker function arguments */ @@ -2372,6 +2940,7 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*); SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init(void); +SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_noinit(void); SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*); SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*); @@ -2379,6 +2948,7 @@ SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int) SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2 soap_accept(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*); SOAP_FMAC1 const char * SOAP_FMAC2 soap_ssl_error(struct soap*, int); +SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_crl(struct soap*, const char*); #if defined(VXWORKS) && defined(WM_SECURE_KEY_STORAGE) SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap *soap, unsigned short flags, const char *keyfile, const char *keyid, const char *password, const char *cafile, const char *capath, const char *dhfile, const char *randfile, const char *sid); @@ -2421,6 +2991,7 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, con SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long); SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*); +SOAP_FMAC1 size_t SOAP_FMAC2 soap_utf8len(const char*); SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int); SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int); @@ -2429,26 +3000,31 @@ SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*); #ifndef WITH_LEANER SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**); -SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**); +SOAP_FMAC1 int SOAP_FMAC2 soap_attachment_forward(struct soap*, unsigned char**, int*, char**, char**, char**); #endif +SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**); +SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const void *a, int n, int t, struct soap_plist**); +SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const void *a, int n, int t, struct soap_plist**); #ifndef WITH_NOIDREF SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); -SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type); +SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const void *a, int n, int type); SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*); -SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*); +SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*, int, size_t); SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*); SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t); SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t); -SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t); +SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const void *a, int n, int t); SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t); SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*); SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*); SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*); #endif +SOAP_FMAC1 int SOAP_FMAC2 soap_check_and_mark(struct soap *soap, const void *p, int t, char **mark); +SOAP_FMAC1 void * SOAP_FMAC2 soap_mark_lookup(struct soap *soap, const void *p, int t, struct soap_plist **pp, char **mark); +SOAP_FMAC1 int SOAP_FMAC2 soap_mark_cycle(struct soap *soap, struct soap_plist *pp); +SOAP_FMAC1 void SOAP_FMAC2 soap_mark_dup(struct soap *soap, void *a, struct soap_plist *pp); +SOAP_FMAC1 void SOAP_FMAC2 soap_unmark(struct soap *soap, char *mark); SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*); @@ -2457,9 +3033,9 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_end_send_flush(struct soap*); SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char*); -SOAP_FMAC1 long SOAP_FMAC2 soap_code_int(const struct soap_code_map*, const char*, long); +SOAP_FMAC1 LONG64 SOAP_FMAC2 soap_code_int(const struct soap_code_map*, const char*, LONG64); SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_str(const struct soap_code_map*, long); -SOAP_FMAC1 long SOAP_FMAC2 soap_code_bits(const struct soap_code_map*, const char*); +SOAP_FMAC1 LONG64 SOAP_FMAC2 soap_code_bits(const struct soap_code_map*, const char*); SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_list(struct soap*, const struct soap_code_map*, long); SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int); @@ -2479,22 +3055,22 @@ SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void* #ifndef WITH_NOIDREF SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k); -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t len, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t)); +SOAP_FMAC1 short SOAP_FMAC2 soap_begin_shaky(struct soap*); +SOAP_FMAC1 void SOAP_FMAC2 soap_end_shaky(struct soap*, short); +SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k, int (*fbase)(int, int)); +SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, size_t i, int t, int tt, size_t n, unsigned int k, void(*finsert)(struct soap*, int, int, void*, size_t, const void*, void**), int (*fbase)(int, int)); +SOAP_FMAC1 int SOAP_FMAC2 soap_id_nullify(struct soap*, const char*); #endif -SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)); -SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n); +SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*), int (*fbase)(int, int)); +SOAP_FMAC1 void** SOAP_FMAC2 soap_id_smart(struct soap *soap, const char*, int, size_t); -SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int); +SOAP_FMAC1 size_t SOAP_FMAC2 soap_size(const int *, int); +SOAP_FMAC1 size_t SOAP_FMAC2 soap_getsizes(const char *, int *, int); SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *); -SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int); + SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int); SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int); -SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int); SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int); SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*); @@ -2526,6 +3102,7 @@ SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int); SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *); +SOAP_FMAC1 int SOAP_FMAC2 soap_match_att(struct soap*, const char*, const char *); SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*); SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*); @@ -2535,7 +3112,7 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val); SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type); SOAP_FMAC1 int SOAP_FMAC2 soap_element_nil(struct soap*, const char *tag); -SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n); +SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const void *a, int n, const char *type, int t, char **mark); SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag); SOAP_FMAC1 void SOAP_FMAC2 soap_check_result(struct soap*, const char *tag); SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag); @@ -2551,28 +3128,34 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*); SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*); SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*); +SOAP_FMAC1 int SOAP_FMAC2 soap_ignore(struct soap*); +SOAP_FMAC1 void* SOAP_FMAC2 soap_memdup(struct soap*, const void*, size_t); SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*); SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstrdup(struct soap*, const wchar_t*); +SOAP_FMAC1 char* SOAP_FMAC2 soap_strtrim(struct soap*, char*); +SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstrtrim(struct soap*, wchar_t*); SOAP_FMAC1 const char * SOAP_FMAC2 soap_tagsearch(const char *big, const char *little); SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag); -SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long); +SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long, const char*); #ifndef WITH_LEANER SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag); -SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long); +SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long, const char*); #endif SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, size_t n1, size_t n2); SOAP_FMAC1 void SOAP_FMAC2 soap_set_version(struct soap*, short); +SOAP_FMAC1 void SOAP_FMAC2 soap_get_version(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, const struct Namespace*); SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*); SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*); SOAP_FMAC1 struct soap_nlist* SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag); +SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace_tag(struct soap *soap, const char *tag); +SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace_att(struct soap *soap, const char *tag); SOAP_FMAC1 struct soap_nlist* SOAP_FMAC2 soap_lookup_ns(struct soap *soap, const char *tag, size_t n); @@ -2581,6 +3164,7 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t); SOAP_FMAC1 struct soap_blist* SOAP_FMAC2 soap_new_block(struct soap*); SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, struct soap_blist*, size_t); +SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block_max(struct soap*, struct soap_blist*, size_t); SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*, struct soap_blist*); SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, struct soap_blist*, size_t); SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*, struct soap_blist*); @@ -2588,7 +3172,7 @@ SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*, struct soap_blist*); SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*, struct soap_blist*); SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, struct soap_blist*, char*, int); SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*, struct soap_blist*); -SOAP_FMAC1 void SOAP_FMAC2 soap_update_pointers(struct soap *soap, char *start, char *end, char *p1, char *p2); +SOAP_FMAC1 void SOAP_FMAC2 soap_update_pointers(struct soap *soap, const char *dst, const char *src, size_t len); SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*); SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_out(struct soap*); @@ -2639,11 +3223,19 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsign SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*); SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*); SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**, long minlen, long maxlen); -SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**, long minlen, long maxlen); +SOAP_FMAC1 int SOAP_FMAC2 soap_s2char(struct soap*, const char*, char**, long minlen, long maxlen, const char *pattern); +SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**, long minlen, long maxlen, const char *pattern); -#ifndef WITH_LEAN -SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**, long minlen, long maxlen); +#ifndef WITH_COMPAT +#ifdef __cplusplus +SOAP_FMAC1 int SOAP_FMAC2 soap_s2stdQName(struct soap*, const char*, std::string*, long minlen, long maxlen, const char *pattern); +SOAP_FMAC1 int SOAP_FMAC2 soap_s2stdchar(struct soap*, const char*, std::string*, long minlen, long maxlen, const char *pattern); +SOAP_FMAC1 int SOAP_FMAC2 soap_s2stdwchar(struct soap*, const char*, std::wstring*, long minlen, long maxlen, const char *pattern); +#endif +#endif + +#if !defined(WITH_LEAN) || defined(WITH_NTLM) +SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**, long minlen, long maxlen, const char *pattern); SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*); SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int); SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int); @@ -2663,7 +3255,7 @@ SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned lon SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64); SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*); -#ifndef WITH_LEAN +#if !defined(WITH_LEAN) || defined(WITH_NTLM) SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*); SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t); SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*); @@ -2683,7 +3275,7 @@ SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const c SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int); SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int); SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int); -SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long); +SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long, const char*); SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p); #ifndef WITH_LEAN @@ -2692,7 +3284,7 @@ SOAP_FMAC1 time_t SOAP_FMAC2 soap_timegm(struct tm*); #endif #ifndef WITH_LEANER -SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long); +SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long, const char*); SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p); #endif @@ -2721,7 +3313,7 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_ #endif #ifndef WITH_LEANER -SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int); +SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const void*, int, const char*, const char*, const char*, const char*, int); SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, size_t); SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*); SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*); @@ -2752,7 +3344,8 @@ SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value, int flag); SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap); -SOAP_FMAC1 const char* SOAP_FMAC2 soap_url(struct soap *soap, const char*, const char*); +SOAP_FMAC1 const char* SOAP_FMAC2 soap_extend_url(struct soap *soap, const char*, const char*); +SOAP_FMAC1 const char* SOAP_FMAC2 soap_extend_url_query(struct soap *soap, const char*, const char*); SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_url(const char*, char*, size_t); SOAP_FMAC1 const char* SOAP_FMAC2 soap_encode_url_string(struct soap*, const char*); #ifdef WITH_COOKIES @@ -2777,4 +3370,49 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_putcookies(struct soap *soap, const char *domain, } /* extern "C" */ #endif +#ifdef __cplusplus + +/* C++ templates (for generated C++ only, not needed nor used in generated C code) */ + +template<class T> +struct soap_block +{ static T *push(struct soap *soap, struct soap_blist *b) + { if (!b) + b = soap->blist; + if (!b) + return NULL; + T *p = (T*)soap_push_block_max(soap, b, sizeof(T)); + if (p) + SOAP_PLACEMENT_NEW(p, T); + return p; + } + static void pop(struct soap *soap, struct soap_blist *b) + { if (!b) + b = soap->blist; + if (!b || !b->head) + return; + ((T*)(b->head + 1))->T::~T(); + soap_pop_block(soap, b); + } + static void save(struct soap *soap, struct soap_blist *b, T *p) + { if (!b) + b = soap->blist; + for (T *q = (T*)soap_first_block(soap, b); q; q = (T*)soap_next_block(soap, b)) + { soap_update_pointers(soap, (const char*)p, (const char*)q, sizeof(T)); + *p++ = *q; + q->T::~T(); + } + soap_end_block(soap, b); + } + static void end(struct soap *soap, struct soap_blist *b) + { if (!b) + b = soap->blist; + for (T *p = (T*)soap_first_block(soap, b); p; p = (T*)soap_next_block(soap, b)) + p->T::~T(); + soap_end_block(soap, b); + } +}; + +#endif + #endif /* STDSOAP_H */ diff --git a/dep/gsoap/tc_changes.diff b/dep/gsoap/tc_changes.diff deleted file mode 100644 index e5c47c66b78..00000000000 --- a/dep/gsoap/tc_changes.diff +++ /dev/null @@ -1,16 +0,0 @@ -diff -r 830b8f9ed332 dep/gsoap/stdsoap2.cpp ---- a/dep/gsoap/stdsoap2.cpp Tue Dec 21 10:07:43 2010 -0500 -+++ b/dep/gsoap/stdsoap2.cpp Tue Dec 21 10:07:55 2010 -0500 -@@ -15038,10 +15038,12 @@ - } - s = soap->tmpbuf; - } -+/* - else if (status == SOAP_OK && soap->action && strlen(soap->action) < sizeof(soap->tmpbuf) - 80) - { sprintf(soap->tmpbuf, "%s; action=\"%s\"", s, soap->action); - s = soap->tmpbuf; - } -+*/ - #endif - if (s && (err = soap->fposthdr(soap, "Content-Type", s))) - return err; diff --git a/dep/gsoap/tc_upgrades.txt b/dep/gsoap/tc_upgrades.txt index 04298b2ae82..cda096cd0f9 100644 --- a/dep/gsoap/tc_upgrades.txt +++ b/dep/gsoap/tc_upgrades.txt @@ -1,5 +1,5 @@ * Generate new headers based on TrinityCore soap-services stub: -gsoap/bin/linux386/soapcpp2 -1 -S -L -w -x -y soap.stub +gsoap/bin/linux386/soapcpp2 -1 -S -L -w -x -y -c++11 gsoap.stub * Copy the following files from the gsoap package: gsoap/stdsoap2.h @@ -7,6 +7,5 @@ gsoap/stdsoap2.cpp * Remove the following files after generation: ns1.nsmap -soapObject.h * Test compile and see if SOAP works... diff --git a/dep/recastnavigation/CMakeLists.txt b/dep/recastnavigation/CMakeLists.txt index 4a406f7833c..dd28884eb1f 100644 --- a/dep/recastnavigation/CMakeLists.txt +++ b/dep/recastnavigation/CMakeLists.txt @@ -1,4 +1,4 @@ -# +# Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> # Copyright (C) 2005-2011 MaNGOS project <http://getmangos.com/> # # This program is free software; you can redistribute it and/or modify diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index b0a120bae63..05d2acbe0e8 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -375,7 +375,7 @@ CREATE TABLE `rbac_linked_permissions` ( LOCK TABLES `rbac_linked_permissions` WRITE; /*!40000 ALTER TABLE `rbac_linked_permissions` DISABLE KEYS */; -INSERT INTO `rbac_linked_permissions` VALUES (192,21),(192,42),(192,43),(192,193),(192,196),(192,778),(192,779),(192,780),(192,781),(192,782),(192,783),(192,784),(192,785),(192,786),(192,787),(192,788),(192,789),(192,790),(192,791),(192,792),(192,793),(192,794),(192,795),(192,796),(192,835),(193,48),(193,194),(193,197),(194,1),(194,2),(194,11),(194,13),(194,14),(194,15),(194,16),(194,17),(194,18),(194,19),(194,20),(194,22),(194,23),(194,25),(194,26),(194,27),(194,28),(194,29),(194,30),(194,31),(194,32),(194,33),(194,34),(194,35),(194,36),(194,37),(194,38),(194,39),(194,40),(194,41),(194,44),(194,46),(194,47),(194,51),(194,195),(194,198),(194,632),(194,798),(195,3),(195,4),(195,5),(195,6),(195,24),(195,49),(195,199),(196,200),(196,201),(196,226),(196,227),(196,230),(196,231),(196,233),(196,234),(196,235),(196,238),(196,239),(196,240),(196,241),(196,242),(196,243),(196,244),(196,245),(196,246),(196,247),(196,248),(196,249),(196,250),(196,251),(196,252),(196,253),(196,254),(196,255),(196,256),(196,257),(196,258),(196,259),(196,260),(196,261),(196,262),(196,264),(196,265),(196,266),(196,267),(196,268),(196,269),(196,270),(196,271),(196,272),(196,279),(196,280),(196,283),(196,287),(196,288),(196,289),(196,290),(196,291),(196,292),(196,293),(196,294),(196,295),(196,296),(196,297),(196,298),(196,299),(196,302),(196,303),(196,304),(196,305),(196,306),(196,307),(196,308),(196,309),(196,310),(196,313),(196,314),(196,319),(196,320),(196,321),(196,322),(196,323),(196,324),(196,325),(196,326),(196,327),(196,328),(196,329),(196,330),(196,331),(196,332),(196,333),(196,334),(196,335),(196,336),(196,337),(196,338),(196,339),(196,340),(196,341),(196,342),(196,343),(196,344),(196,345),(196,346),(196,347),(196,348),(196,349),(196,350),(196,351),(196,352),(196,353),(196,354),(196,355),(196,356),(196,357),(196,358),(196,359),(196,360),(196,361),(196,362),(196,363),(196,364),(196,365),(196,366),(196,373),(196,375),(196,400),(196,401),(196,402),(196,403),(196,404),(196,405),(196,406),(196,407),(196,417),(196,418),(196,419),(196,420),(196,421),(196,422),(196,423),(196,424),(196,425),(196,426),(196,427),(196,428),(196,429),(196,434),(196,435),(196,436),(196,437),(196,438),(196,439),(196,440),(196,441),(196,442),(196,443),(196,444),(196,445),(196,446),(196,447),(196,448),(196,449),(196,450),(196,451),(196,452),(196,453),(196,454),(196,455),(196,456),(196,457),(196,458),(196,459),(196,461),(196,463),(196,464),(196,465),(196,472),(196,473),(196,474),(196,475),(196,476),(196,477),(196,478),(196,488),(196,489),(196,491),(196,492),(196,493),(196,495),(196,497),(196,498),(196,499),(196,500),(196,502),(196,503),(196,505),(196,508),(196,511),(196,513),(196,514),(196,516),(196,519),(196,522),(196,523),(196,526),(196,527),(196,529),(196,530),(196,533),(196,535),(196,536),(196,537),(196,538),(196,539),(196,540),(196,541),(196,556),(196,581),(196,582),(196,592),(196,593),(196,596),(196,602),(196,603),(196,604),(196,605),(196,606),(196,607),(196,608),(196,609),(196,610),(196,611),(196,612),(196,613),(196,614),(196,615),(196,616),(196,617),(196,618),(196,619),(196,620),(196,621),(196,622),(196,623),(196,624),(196,625),(196,626),(196,627),(196,628),(196,629),(196,630),(196,631),(196,633),(196,634),(196,635),(196,636),(196,637),(196,638),(196,639),(196,640),(196,641),(196,642),(196,643),(196,644),(196,645),(196,646),(196,647),(196,648),(196,649),(196,650),(196,651),(196,652),(196,653),(196,654),(196,655),(196,656),(196,657),(196,658),(196,659),(196,660),(196,661),(196,662),(196,663),(196,664),(196,665),(196,666),(196,667),(196,668),(196,669),(196,670),(196,671),(196,672),(196,673),(196,674),(196,675),(196,676),(196,677),(196,678),(196,679),(196,680),(196,681),(196,682),(196,683),(196,684),(196,685),(196,686),(196,687),(196,688),(196,689),(196,690),(196,691),(196,692),(196,693),(196,694),(196,695),(196,696),(196,697),(196,698),(196,699),(196,700),(196,701),(196,702),(196,703),(196,704),(196,705),(196,706),(196,707),(196,708),(196,709),(196,710),(196,711),(196,712),(196,713),(196,714),(196,715),(196,716),(196,717),(196,718),(196,719),(196,721),(196,722),(196,723),(196,724),(196,725),(196,726),(196,727),(196,728),(196,729),(196,730),(196,733),(196,734),(196,735),(196,736),(196,738),(196,739),(196,748),(196,753),(196,757),(196,773),(196,777),(196,836),(196,837),(196,838),(196,839),(196,840),(197,232),(197,236),(197,237),(197,273),(197,274),(197,275),(197,276),(197,277),(197,284),(197,285),(197,286),(197,301),(197,311),(197,387),(197,388),(197,389),(197,390),(197,391),(197,392),(197,393),(197,394),(197,395),(197,396),(197,397),(197,398),(197,399),(197,479),(197,480),(197,481),(197,482),(197,485),(197,486),(197,487),(197,494),(197,506),(197,509),(197,510),(197,517),(197,518),(197,521),(197,542),(197,543),(197,550),(197,558),(197,568),(197,571),(197,572),(197,573),(197,574),(197,575),(197,576),(197,577),(197,578),(197,579),(197,580),(197,583),(197,584),(197,585),(197,586),(197,587),(197,588),(197,589),(197,590),(197,591),(197,594),(197,595),(197,601),(197,743),(197,750),(197,758),(197,761),(197,762),(197,763),(197,764),(197,765),(197,766),(197,767),(197,768),(197,769),(197,770),(197,771),(197,772),(197,774),(198,218),(198,300),(198,312),(198,315),(198,316),(198,317),(198,318),(198,367),(198,368),(198,369),(198,370),(198,371),(198,372),(198,374),(198,376),(198,377),(198,378),(198,379),(198,380),(198,381),(198,382),(198,383),(198,384),(198,385),(198,386),(198,408),(198,409),(198,410),(198,411),(198,412),(198,413),(198,414),(198,415),(198,416),(198,430),(198,431),(198,432),(198,433),(198,462),(198,466),(198,467),(198,468),(198,469),(198,470),(198,471),(198,483),(198,484),(198,490),(198,504),(198,512),(198,515),(198,520),(198,524),(198,528),(198,531),(198,532),(198,544),(198,545),(198,546),(198,547),(198,548),(198,549),(198,551),(198,552),(198,553),(198,554),(198,555),(198,557),(198,559),(198,560),(198,561),(198,562),(198,563),(198,564),(198,565),(198,566),(198,567),(198,569),(198,570),(198,597),(198,598),(198,599),(198,600),(198,737),(198,740),(198,741),(198,742),(198,744),(198,745),(198,746),(198,747),(198,749),(198,751),(198,752),(198,754),(198,755),(198,756),(198,759),(198,760),(199,217),(199,221),(199,222),(199,223),(199,225),(199,263),(199,496),(199,501),(199,507),(199,525),(199,534),(199,797); +INSERT INTO `rbac_linked_permissions` VALUES (192,21),(192,42),(192,43),(192,193),(192,196),(192,778),(192,779),(192,780),(192,781),(192,782),(192,783),(192,784),(192,785),(192,786),(192,787),(192,788),(192,789),(192,790),(192,791),(192,792),(192,793),(192,794),(192,795),(192,796),(192,835),(193,48),(193,194),(193,197),(194,1),(194,2),(194,11),(194,13),(194,14),(194,15),(194,16),(194,17),(194,18),(194,19),(194,20),(194,22),(194,23),(194,25),(194,26),(194,27),(194,28),(194,29),(194,30),(194,31),(194,32),(194,33),(194,34),(194,35),(194,36),(194,37),(194,38),(194,39),(194,40),(194,41),(194,44),(194,46),(194,47),(194,51),(194,195),(194,198),(194,632),(194,798),(195,3),(195,4),(195,5),(195,6),(195,24),(195,49),(195,199),(196,200),(196,201),(196,226),(196,227),(196,230),(196,231),(196,233),(196,234),(196,235),(196,238),(196,239),(196,240),(196,241),(196,242),(196,243),(196,244),(196,245),(196,246),(196,247),(196,248),(196,249),(196,250),(196,251),(196,252),(196,253),(196,254),(196,255),(196,256),(196,257),(196,258),(196,259),(196,260),(196,261),(196,262),(196,264),(196,265),(196,266),(196,267),(196,268),(196,269),(196,270),(196,271),(196,272),(196,279),(196,280),(196,283),(196,287),(196,288),(196,289),(196,290),(196,291),(196,292),(196,293),(196,294),(196,295),(196,296),(196,297),(196,298),(196,299),(196,302),(196,303),(196,304),(196,305),(196,306),(196,307),(196,308),(196,309),(196,310),(196,313),(196,314),(196,319),(196,320),(196,321),(196,322),(196,323),(196,324),(196,325),(196,326),(196,327),(196,328),(196,329),(196,330),(196,331),(196,332),(196,333),(196,334),(196,335),(196,336),(196,337),(196,338),(196,339),(196,340),(196,341),(196,342),(196,343),(196,344),(196,345),(196,346),(196,347),(196,348),(196,349),(196,350),(196,351),(196,352),(196,353),(196,354),(196,355),(196,356),(196,357),(196,358),(196,359),(196,360),(196,361),(196,362),(196,363),(196,364),(196,365),(196,366),(196,373),(196,375),(196,400),(196,401),(196,402),(196,403),(196,404),(196,405),(196,406),(196,407),(196,417),(196,418),(196,419),(196,420),(196,421),(196,422),(196,423),(196,424),(196,425),(196,426),(196,427),(196,428),(196,429),(196,434),(196,435),(196,436),(196,437),(196,438),(196,439),(196,440),(196,441),(196,442),(196,443),(196,444),(196,445),(196,446),(196,447),(196,448),(196,449),(196,450),(196,451),(196,452),(196,453),(196,454),(196,455),(196,456),(196,457),(196,458),(196,459),(196,461),(196,463),(196,464),(196,465),(196,472),(196,473),(196,474),(196,475),(196,476),(196,477),(196,478),(196,488),(196,489),(196,491),(196,492),(196,493),(196,495),(196,497),(196,498),(196,499),(196,500),(196,502),(196,503),(196,505),(196,508),(196,511),(196,513),(196,514),(196,516),(196,519),(196,522),(196,523),(196,526),(196,527),(196,529),(196,530),(196,533),(196,535),(196,536),(196,537),(196,538),(196,539),(196,540),(196,541),(196,556),(196,581),(196,582),(196,592),(196,593),(196,596),(196,602),(196,603),(196,604),(196,605),(196,606),(196,607),(196,608),(196,609),(196,610),(196,611),(196,612),(196,613),(196,614),(196,615),(196,616),(196,617),(196,618),(196,619),(196,620),(196,621),(196,622),(196,623),(196,624),(196,625),(196,626),(196,627),(196,628),(196,629),(196,630),(196,631),(196,633),(196,634),(196,635),(196,636),(196,637),(196,638),(196,639),(196,640),(196,641),(196,642),(196,643),(196,644),(196,645),(196,646),(196,647),(196,648),(196,649),(196,650),(196,651),(196,652),(196,653),(196,654),(196,655),(196,656),(196,657),(196,658),(196,659),(196,660),(196,661),(196,662),(196,663),(196,664),(196,665),(196,666),(196,667),(196,668),(196,669),(196,670),(196,671),(196,672),(196,673),(196,674),(196,675),(196,676),(196,677),(196,678),(196,679),(196,680),(196,681),(196,682),(196,683),(196,684),(196,685),(196,686),(196,687),(196,688),(196,689),(196,690),(196,691),(196,692),(196,693),(196,694),(196,695),(196,696),(196,697),(196,698),(196,699),(196,700),(196,701),(196,702),(196,703),(196,704),(196,705),(196,706),(196,707),(196,708),(196,709),(196,710),(196,711),(196,712),(196,713),(196,714),(196,715),(196,716),(196,717),(196,718),(196,719),(196,721),(196,722),(196,723),(196,724),(196,725),(196,726),(196,727),(196,728),(196,729),(196,730),(196,733),(196,734),(196,735),(196,736),(196,738),(196,739),(196,748),(196,753),(196,757),(196,773),(196,777),(196,836),(196,837),(196,838),(196,839),(196,840),(196,841),(197,232),(197,236),(197,237),(197,273),(197,274),(197,275),(197,276),(197,277),(197,284),(197,285),(197,286),(197,301),(197,311),(197,387),(197,388),(197,389),(197,390),(197,391),(197,392),(197,393),(197,394),(197,395),(197,396),(197,397),(197,398),(197,399),(197,479),(197,480),(197,481),(197,482),(197,485),(197,486),(197,487),(197,494),(197,506),(197,509),(197,510),(197,517),(197,518),(197,521),(197,542),(197,543),(197,550),(197,558),(197,568),(197,571),(197,572),(197,573),(197,574),(197,575),(197,576),(197,577),(197,578),(197,579),(197,580),(197,583),(197,584),(197,585),(197,586),(197,587),(197,588),(197,589),(197,590),(197,591),(197,594),(197,595),(197,601),(197,743),(197,750),(197,758),(197,761),(197,762),(197,763),(197,764),(197,765),(197,766),(197,767),(197,768),(197,769),(197,770),(197,771),(197,772),(197,774),(198,218),(198,300),(198,312),(198,315),(198,316),(198,317),(198,318),(198,367),(198,368),(198,369),(198,370),(198,371),(198,372),(198,374),(198,376),(198,377),(198,378),(198,379),(198,380),(198,381),(198,382),(198,383),(198,384),(198,385),(198,386),(198,408),(198,409),(198,410),(198,411),(198,412),(198,413),(198,414),(198,415),(198,416),(198,430),(198,431),(198,432),(198,433),(198,462),(198,466),(198,467),(198,468),(198,469),(198,470),(198,471),(198,483),(198,484),(198,490),(198,504),(198,512),(198,515),(198,520),(198,524),(198,528),(198,531),(198,532),(198,544),(198,545),(198,546),(198,547),(198,548),(198,549),(198,551),(198,552),(198,553),(198,554),(198,555),(198,557),(198,559),(198,560),(198,561),(198,562),(198,563),(198,564),(198,565),(198,566),(198,567),(198,569),(198,570),(198,597),(198,598),(198,599),(198,600),(198,737),(198,740),(198,741),(198,742),(198,744),(198,745),(198,746),(198,747),(198,749),(198,751),(198,752),(198,754),(198,755),(198,756),(198,759),(198,760),(199,217),(199,221),(199,222),(199,223),(199,225),(199,263),(199,496),(199,501),(199,507),(199,525),(199,534),(199,797); /*!40000 ALTER TABLE `rbac_linked_permissions` ENABLE KEYS */; UNLOCK TABLES; @@ -399,7 +399,7 @@ CREATE TABLE `rbac_permissions` ( LOCK TABLES `rbac_permissions` WRITE; /*!40000 ALTER TABLE `rbac_permissions` DISABLE KEYS */; -INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(51,'Allow trading between factions'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(202,'Command: rbac account list'),(203,'Command: rbac account grant'),(204,'Command: rbac account deny'),(205,'Command: rbac account revoke'),(206,'Command: rbac list'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(400,'debug transport'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: broadcast_text'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(631,'Command: reload battleground_template'),(632,'Command: .mutehistory'),(633,'Command: reload creature_linked_respawn'),(634,'Command: reload creature_loot_template'),(635,'Command: reload creature_onkill_reputation'),(636,'Command: reload creature_questender'),(637,'Command: reload creature_queststarter'),(638,'Command: reload creature_summon_groups'),(639,'Command: reload creature_template'),(640,'Command: reload creature_text'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'),(777,'Command: mailbox'),(778,'Command: ahbot'),(779,'Command: ahbot items'),(780,'Command: ahbot items gray'),(781,'Command: ahbot items white'),(782,'Command: ahbot items green'),(783,'Command: ahbot items blue'),(784,'Command: ahbot items purple'),(785,'Command: ahbot items orange'),(786,'Command: ahbot items yellow'),(787,'Command: ahbot ratio'),(788,'Command: ahbot ratio alliance'),(789,'Command: ahbot ratio horde'),(790,'Command: ahbot ratio neutral'),(791,'Command: ahbot rebuild'),(792,'Command: ahbot reload'),(793,'Command: ahbot status'),(794,'Command: .guild info'),(795,'Command: .instance setbossstate'),(796,'Command: instance getbossstate'),(797,'Command: pvpstats'),(798,'Command: .mod xp'),(835,'Command: debug loadcells'),(836,'Command: .debug boundary'),(837,'Command: .npc evade'),(838,'Command: .pet level'),(839,'Command: .server shutdown force'),(840,'Command: .server restart force'); +INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(51,'Allow trading between factions'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(202,'Command: rbac account list'),(203,'Command: rbac account grant'),(204,'Command: rbac account deny'),(205,'Command: rbac account revoke'),(206,'Command: rbac list'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(400,'debug transport'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: broadcast_text'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(631,'Command: reload battleground_template'),(632,'Command: .mutehistory'),(633,'Command: reload creature_linked_respawn'),(634,'Command: reload creature_loot_template'),(635,'Command: reload creature_onkill_reputation'),(636,'Command: reload creature_questender'),(637,'Command: reload creature_queststarter'),(638,'Command: reload creature_summon_groups'),(639,'Command: reload creature_template'),(640,'Command: reload creature_text'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'),(777,'Command: mailbox'),(778,'Command: ahbot'),(779,'Command: ahbot items'),(780,'Command: ahbot items gray'),(781,'Command: ahbot items white'),(782,'Command: ahbot items green'),(783,'Command: ahbot items blue'),(784,'Command: ahbot items purple'),(785,'Command: ahbot items orange'),(786,'Command: ahbot items yellow'),(787,'Command: ahbot ratio'),(788,'Command: ahbot ratio alliance'),(789,'Command: ahbot ratio horde'),(790,'Command: ahbot ratio neutral'),(791,'Command: ahbot rebuild'),(792,'Command: ahbot reload'),(793,'Command: ahbot status'),(794,'Command: .guild info'),(795,'Command: .instance setbossstate'),(796,'Command: instance getbossstate'),(797,'Command: pvpstats'),(798,'Command: .mod xp'),(835,'Command: debug loadcells'),(836,'Command: .debug boundary'),(837,'Command: .npc evade'),(838,'Command: .pet level'),(839,'Command: .server shutdown force'),(840,'Command: .server restart force'),(841,'Command: .neargraveyard'); /*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */; UNLOCK TABLES; @@ -486,7 +486,7 @@ CREATE TABLE `updates` ( LOCK TABLES `updates` WRITE; /*!40000 ALTER TABLE `updates` DISABLE KEYS */; -INSERT INTO `updates` VALUES ('2014_11_10_00_auth.sql','0E3CB119442D09DD88E967015319BBC8DAFBBFE0','ARCHIVED','2015-03-21 21:44:12',0),('2014_11_10_01_auth.sql','327E77A1DA3546D5275AB249915DD57EDD6FDD3D','ARCHIVED','2015-03-21 21:44:12',0),('2014_12_10_00_auth.sql','821703A96D80F9080074852B5A46E2909C9562EA','ARCHIVED','2015-03-21 21:44:12',0),('2014_12_21_00_auth.sql','CE2E5D2CD82E79C25294539ADED27A1429105B43','ARCHIVED','2015-03-21 21:44:12',0),('2015_03_20_00_auth.sql','E8C5B74BB45F0F35DEC182C72BACF435C7066FB0','ARCHIVED','2015-03-21 21:44:12',0),('2015_03_20_01_auth.sql','862961815354DA2746F5F71FBC8155F57CBE75AB','ARCHIVED','2015-03-21 21:44:12',0),('2015_03_20_02_auth.sql','33E4F94086590768EF5D4855DD43D7DE7C06ADA4','ARCHIVED','2015-03-21 21:44:51',0),('2015_08_21_00_auth.sql','C31A9E1D28E11B60BE8F8198637DD51F6D75123F','ARCHIVED','2015-10-05 23:16:19',0),('2015_11_07_00_auth.sql','0ACDD35EC9745231BCFA701B78056DEF94D0CC53','ARCHIVED','2016-04-11 00:42:36',92),('2016_01_13_00_auth.sql','24615CC69B3CD7BB4699874647C35BA86E8A93FD','ARCHIVED','2016-01-13 00:00:00',0),('2016_04_11_00_auth.sql','0ACDD35EC9745231BCFA701B78056DEF94D0CC53','RELEASED','2016-04-11 03:18:17',0),('2016_05_11_00_auth.sql','95B66235B8D67BF1CA216EB09F313C1F8F393B47','RELEASED','2016-04-16 13:17:11',0); +INSERT INTO `updates` VALUES ('2014_11_10_00_auth.sql','0E3CB119442D09DD88E967015319BBC8DAFBBFE0','ARCHIVED','2015-03-21 21:44:12',0),('2014_11_10_01_auth.sql','327E77A1DA3546D5275AB249915DD57EDD6FDD3D','ARCHIVED','2015-03-21 21:44:12',0),('2014_12_10_00_auth.sql','821703A96D80F9080074852B5A46E2909C9562EA','ARCHIVED','2015-03-21 21:44:12',0),('2014_12_21_00_auth.sql','CE2E5D2CD82E79C25294539ADED27A1429105B43','ARCHIVED','2015-03-21 21:44:12',0),('2015_03_20_00_auth.sql','E8C5B74BB45F0F35DEC182C72BACF435C7066FB0','ARCHIVED','2015-03-21 21:44:12',0),('2015_03_20_01_auth.sql','862961815354DA2746F5F71FBC8155F57CBE75AB','ARCHIVED','2015-03-21 21:44:12',0),('2015_03_20_02_auth.sql','33E4F94086590768EF5D4855DD43D7DE7C06ADA4','ARCHIVED','2015-03-21 21:44:51',0),('2015_08_21_00_auth.sql','C31A9E1D28E11B60BE8F8198637DD51F6D75123F','ARCHIVED','2015-10-05 23:16:19',0),('2015_11_07_00_auth.sql','0ACDD35EC9745231BCFA701B78056DEF94D0CC53','ARCHIVED','2016-04-11 00:42:36',92),('2016_01_13_00_auth.sql','24615CC69B3CD7BB4699874647C35BA86E8A93FD','ARCHIVED','2016-01-13 00:00:00',0),('2016_04_11_00_auth.sql','0ACDD35EC9745231BCFA701B78056DEF94D0CC53','RELEASED','2016-04-11 03:18:17',0),('2016_05_11_00_auth.sql','95B66235B8D67BF1CA216EB09F313C1F8F393B47','RELEASED','2016-04-16 13:17:11',0),('2016_06_06_00_auth.sql','57603BB68C340A8C919FB424452C282C47A193F7','RELEASED','2016-06-06 18:20',0); /*!40000 ALTER TABLE `updates` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/base/dev/README.TXT b/sql/base/dev/README.TXT new file mode 100644 index 00000000000..2717026f35b --- /dev/null +++ b/sql/base/dev/README.TXT @@ -0,0 +1 @@ +The file world_database.sql is intended to be used only by travis compile test system, don't import it, you will break your core. diff --git a/sql/updates/auth/3.3.5/2016_06_06_00_auth.sql b/sql/updates/auth/3.3.5/2016_06_06_00_auth.sql new file mode 100644 index 00000000000..0e203d847ae --- /dev/null +++ b/sql/updates/auth/3.3.5/2016_06_06_00_auth.sql @@ -0,0 +1,5 @@ +DELETE FROM `rbac_permissions` WHERE `id` = 841; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES (841, 'Command: .debug neargraveyard'); + +DELETE FROM `rbac_linked_permissions` WHERE `id` = 196 AND `linkedId` = 841; +INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES (196, 841); diff --git a/sql/updates/world/3.3.5/2016_04_17_04_world.sql b/sql/updates/world/3.3.5/2016_04_17_04_world.sql index c03969b14b3..b284dca323e 100644 --- a/sql/updates/world/3.3.5/2016_04_17_04_world.sql +++ b/sql/updates/world/3.3.5/2016_04_17_04_world.sql @@ -4,7 +4,7 @@ UPDATE `creature_template_addon` SET `auras`=45771 WHERE `entry`=25596; UPDATE `creature_template` SET `spell1`=45876, `spell2`=45877 WHERE `entry`=25596; UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=25607; DELETE FROM `smart_scripts` WHERE `entryorguid` IN (25596, 25607) AND `source_type`=0; -DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22560700) AND `source_type`=9; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2560700) AND `source_type`=9; 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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (25596, 0, 0, 0, 0, 0, 100, 0, 10000, 12000, 20000, 22000, 11, 45876, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Infected Kodo Beast - In Combat - Cast \'Stampede\''), (25596, 0, 1, 0, 4, 0, 100, 0, 0, 0, 0, 0, 91, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Infected Kodo Beast - On Aggro - Remove Flag Standstate Dead'), diff --git a/sql/updates/world/3.3.5/2016_04_24_00_world_335.sql b/sql/updates/world/3.3.5/2016_04_24_00_world_335.sql index 065c31601cd..b6b42fb0846 100644 --- a/sql/updates/world/3.3.5/2016_04_24_00_world_335.sql +++ b/sql/updates/world/3.3.5/2016_04_24_00_world_335.sql @@ -1,3 +1,4 @@ -- -- spell aura effect 53055 from Hand of Salvation should not break invisibility +DELETE FROM `spell_custom_attr` WHERE `entry`=53055 AND `attributes`=64; INSERT INTO `spell_custom_attr` (`entry`,`attributes`) VALUES (53055, 64); diff --git a/sql/updates/world/3.3.5/2016_05_11_01_world.sql b/sql/updates/world/3.3.5/2016_05_11_01_world.sql new file mode 100644 index 00000000000..95fa08ab742 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_11_01_world.sql @@ -0,0 +1,16 @@ +ALTER TABLE `spell_proc` + CHANGE `spellId` `SpellId` int(11) NOT NULL DEFAULT 0 FIRST, + CHANGE `schoolMask` `SchoolMask` tinyint(3) unsigned NOT NULL DEFAULT 0 AFTER `SpellId`, + CHANGE `spellFamilyName` `SpellFamilyName` smallint(5) unsigned NOT NULL DEFAULT 0 AFTER `SchoolMask`, + CHANGE `spellFamilyMask0` `SpellFamilyMask0` int(10) unsigned NOT NULL DEFAULT 0 AFTER `SpellFamilyName`, + CHANGE `spellFamilyMask1` `SpellFamilyMask1` int(10) unsigned NOT NULL DEFAULT 0 AFTER `SpellFamilyMask0`, + CHANGE `spellFamilyMask2` `SpellFamilyMask2` int(10) unsigned NOT NULL DEFAULT 0 AFTER `SpellFamilyMask1`, + CHANGE `typeMask` `ProcFlags` int(10) unsigned NOT NULL DEFAULT 0 AFTER `SpellFamilyMask2`, + CHANGE `spellTypeMask` `SpellTypeMask` int(10) unsigned NOT NULL DEFAULT 0 AFTER `ProcFlags`, + CHANGE `spellPhaseMask` `SpellPhaseMask` int(10) unsigned NOT NULL DEFAULT 0 AFTER `SpellTypeMask`, + CHANGE `hitMask` `HitMask` int(10) unsigned NOT NULL DEFAULT 0 AFTER `SpellPhaseMask`, + CHANGE `attributesMask` `AttributesMask` int(10) unsigned NOT NULL DEFAULT 0 AFTER `HitMask`, + CHANGE `ratePerMinute` `ProcsPerMinute` float NOT NULL DEFAULT 0 AFTER `AttributesMask`, + CHANGE `chance` `Chance` float NOT NULL DEFAULT 0 AFTER `ProcsPerMinute`, + CHANGE `cooldown` `Cooldown` int(10) unsigned NOT NULL DEFAULT 0 AFTER `Chance`, + CHANGE `charges` `Charges` tinyint(3) unsigned NOT NULL DEFAULT 0 AFTER `Cooldown`; diff --git a/sql/updates/world/3.3.5/2016_05_20_00_world.sql b/sql/updates/world/3.3.5/2016_05_20_00_world.sql new file mode 100644 index 00000000000..67fc3e7a5d7 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_20_00_world.sql @@ -0,0 +1,37 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` IN +('spell_mage_blazing_speed','spell_pri_blessed_recovery','spell_dru_forms_trinket','spell_dru_t9_feral_relic', +'spell_sha_nature_guardian','spell_warl_nether_protection','spell_hun_piercing_shots','spell_hun_t9_4p_bonus', +'spell_sha_lightning_shield','spell_dk_acclimation','spell_dk_advantage_t10_4p','spell_dk_improved_blood_presence_triggered', +'spell_rog_t10_2p_bonus','spell_pal_illumination','spell_item_soul_preserver','spell_item_death_choice', +'spell_item_lightning_capacitor','spell_item_thunder_capacitor','spell_item_toc25_normal_caster_trinket','spell_item_toc25_heroic_caster_trinket', +'spell_igb_battle_experience_check','spell_gen_blood_reserve','spell_item_darkmoon_card_greatness', +'spell_item_charm_witch_doctor','spell_item_mana_drain'); + +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(-49200, 'spell_dk_acclimation'), -- DK Acclimation +(70656, 'spell_dk_advantage_t10_4p'), -- DK Advantage t10 4p melee +(63611, 'spell_dk_improved_blood_presence_triggered'), -- DK Improved blood Presence Triggered +(37336, 'spell_dru_forms_trinket'), -- Druid Forms Trinket +(67353, 'spell_dru_t9_feral_relic'), -- Druid T9 Feral Relic (Idol of Mutilation) +(64568, 'spell_gen_blood_reserve'), -- Blood Reserve (weapon enchant proc) +(-53234, 'spell_hun_piercing_shots'), -- Hunter Piercing Shots +(-67151, 'spell_hun_t9_4p_bonus'), -- Hunter T9 Bonus +(71201, 'spell_igb_battle_experience_check'), -- Battle Experience (Gunship - ICC) +(60510, 'spell_item_soul_preserver'), -- Soul Preserver +(67702, 'spell_item_death_choice'), -- Death Choice Trinket +(67771, 'spell_item_death_choice'), -- Death Choice Trinket +(37657, 'spell_item_lightning_capacitor'), -- Lightning Capcitor +(54841, 'spell_item_thunder_capacitor'), -- Thunder Capacitor +(67712, 'spell_item_toc25_normal_caster_trinket'), -- Item - Coliseum 25 Normal Caster Trinket +(67758, 'spell_item_toc25_heroic_caster_trinket'), -- Item - Coliseum 25 Heroic Caster Trinket +(57345, 'spell_item_darkmoon_card_greatness'), -- Darkmoon Card: Greatness +(43820, 'spell_item_charm_witch_doctor'), -- Charm of the Witch Doctor +(27522, 'spell_item_mana_drain'), -- Mana Drain +(40336, 'spell_item_mana_drain'), -- Mana Drain +(-31641, 'spell_mage_blazing_speed'), -- Mage Blazing Speed +(-20210, 'spell_pal_illumination'), -- Paladin Illumination (for Holy Shock) +(-27811, 'spell_pri_blessed_recovery'), -- Priest Blessed Recovery +(70805, 'spell_rog_t10_2p_bonus'), -- Rogue T10 2P bonus +(-30881, 'spell_sha_nature_guardian'), -- Shaman Nature's Guardian +(-324, 'spell_sha_lightning_shield'), -- Shaman Lightning Shield +(-30299, 'spell_warl_nether_protection'); -- Warlock Nether protection diff --git a/sql/updates/world/3.3.5/2016_05_23_00_world.sql b/sql/updates/world/3.3.5/2016_05_23_00_world.sql new file mode 100644 index 00000000000..b2b9b9b0b34 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_23_00_world.sql @@ -0,0 +1,225 @@ +SET @CGUID:=145211; + +-- Add missing creature spawns in Ghostlands & Eversong Woods +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+215; +INSERT INTO `creature` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`) VALUES +(@CGUID+0 , 1420, 530, 6785.898, -7607.692, 128.1121, 3.815103, 120, 0), -- Toad +(@CGUID+1 , 1420, 530, 6753.482, -7647.198, 128.3187, 3.793595, 120, 0), -- 1420 (Area: -1) +(@CGUID+2 , 2914, 530, 6830.517, -7396.761, 46.36444, 2.204267, 120, 0), -- Snake +(@CGUID+3 , 2914, 530, 6967.708, -7464.932, 47.05861, 1.433785, 120, 0), -- 2914 (Area: 3508) +(@CGUID+4 , 2914, 530, 6764.093, -7363.276, 50.46708, 2.048597, 120, 0), -- 2914 (Area: 3517) +(@CGUID+5 , 2914, 530, 6703.647, -7402.308, 51.60884, 5.743487, 120, 0), -- 2914 (Area: 3517) +(@CGUID+6 , 2914, 530, 9898.549, -6844.095, 21.79119, 5.635744, 120, 0), -- 2914 (Area: 0) +(@CGUID+7 , 2914, 530, 9200.372, -7787.419, 114.7875, 3.199877, 120, 0), -- 2914 (Area: 3480) +(@CGUID+8 , 2914, 530, 9155.745, -7848.188, 106.3085, 5.677832, 120, 0), -- 2914 (Area: 3480) (possible waypoints or random movement) +(@CGUID+9 , 2914, 530, 8850.941, -7711.045, 142.8265, 0.9482585, 120, 0), -- 2914 (Area: 0) +(@CGUID+10 , 2914, 530, 8728.21, -7871.131, 167.5767, 3.596344, 120, 0), -- 2914 (Area: 3476) +(@CGUID+11 , 2914, 530, 8637.07, -8030.312, 172.4991, 0.7605414, 120, 0), -- 2914 (Area: 3476) (possible waypoints or random movement) +(@CGUID+12 , 2914, 530, 8105.803, -7868.944, 182.6229, 3.106677, 120, 0), -- 2914 (Area: 3476) +(@CGUID+13 , 13321, 530, 6804.864, -7692.796, 123.9494, 1.613627, 120, 0), -- Frog +(@CGUID+14 , 13321, 530, 7139.874, -6836.952, 42.78193, 3.004393, 120, 0), -- 13321 (Area: 0) +(@CGUID+15 , 13321, 530, 6874.098, -6292.956, 28.83097, 2.986305, 120, 0), -- 13321 (Area: 0) +(@CGUID+16 , 13321, 530, 6896.695, -6237.083, 27.97087, 3.193066, 120, 0), -- 13321 (Area: 0) +(@CGUID+17 , 16355, 530, 6590.018, -6665.895, 47.47748, 3.028023, 120, 0), -- Lesser Scourgebat +(@CGUID+18 , 16355, 530, 6615.374, -6649.544, 47.67059, 2.618959, 120, 0), -- 16355 (Area: 3861) +(@CGUID+19 , 16355, 530, 6678.834, -6669.411, 46.41251, 2.527587, 120, 0), -- 16355 (Area: 3861) +(@CGUID+20 , 16355, 530, 6751.53, -6650.502, 40.92892, 3.361847, 120, 0), -- 16355 (Area: 3861) +(@CGUID+21 , 16355, 530, 6694.581, -6614.153, 42.82938, 1.788726, 120, 0), -- 16355 (Area: 3861) +(@CGUID+22 , 16355, 530, 6746.584, -6637.266, 40.26681, 1.167443, 120, 0), -- 16355 (Area: 3861) +(@CGUID+23 , 16355, 530, 6613.917, -6613.427, 45.56771, 1.741399, 120, 0), -- 16355 (Area: 0) +(@CGUID+24 , 16355, 530, 6709.029, -6582.425, 38.43601, 3.079052, 120, 0), -- 16355 (Area: 0) +(@CGUID+25 , 16355, 530, 6655.542, -6584.168, 47.69909, 1.860139, 120, 0), -- 16355 (Area: 0) +(@CGUID+26 , 16355, 530, 6777.141, -6576.169, 22.53009, 2.004029, 120, 0), -- 16355 (Area: 5779) +(@CGUID+27 , 16355, 530, 6820.745, -6629.127, 29.34797, 4.576158, 120, 0), -- 16355 (Area: 0) +(@CGUID+28 , 16355, 530, 6913.5, -6392.067, 32.9911, 1.252754, 120, 0), -- 16355 (Area: 3514) +(@CGUID+29 , 16355, 530, 6786.887, -6389.533, 33.69895, 1.401155, 120, 0), -- 16355 (Area: 3514) +(@CGUID+30 , 16355, 530, 6834.158, -6266.923, 28.88157, 0.7696482, 120, 0), -- 16355 (Area: 0) +(@CGUID+31 , 16355, 530, 6811.086, -6309.688, 32.27558, 6.07257, 120, 0), -- 16355 (Area: 0) +(@CGUID+32 , 16355, 530, 6746.925, -6374.906, 38.59792, 0.9527051, 120, 0), -- 16355 (Area: 0) +(@CGUID+33 , 16355, 530, 6743.388, -6254.041, 35.68666, 0.4505479, 120, 0), -- 16355 (Area: 0) +(@CGUID+34 , 16352, 530, 6607.711, -7228.053, 47.55958, 2.182768, 120, 0), -- Greater Spindleweb +(@CGUID+35 , 16352, 530, 6840.333, -6911.398, 80.30796, 5.87111, 120, 0), -- 16352 (Area: 0) +(@CGUID+36 , 16352, 530, 6950.854, -6882.652, 51.16842, 4.52, 120, 0), -- 16352 (Area: 3506) +(@CGUID+37 , 16352, 530, 6768.055, -6851.429, 87.48727, 5.528165, 120, 0), -- 16352 (Area: 0) +(@CGUID+38 , 16352, 530, 6770.479, -6850.35, 87.49597, 3.62482, 120, 0), -- 16352 (Area: 0) +(@CGUID+39 , 16352, 530, 6559.612, -6826.08, 105.455, 4.570914, 120, 0), -- 16352 (Area: 0) +(@CGUID+40 , 16352, 530, 6601.431, -6767.694, 109.1149, 4.307267, 120, 0), -- 16352 (Area: 0) +(@CGUID+41 , 16352, 530, 6599.975, -6751.242, 116.5198, 3.551486, 120, 0), -- 16352 (Area: 0) +(@CGUID+42 , 16352, 530, 7008.281, -6705.673, 28.26144, 4.884287, 120, 0), -- 16352 (Area: 0) +(@CGUID+43 , 16352, 530, 6871.393, -6317.614, 32.46682, 3.043771, 120, 0), -- 16352 (Area: 3514) +(@CGUID+44 , 16352, 530, 6878.775, -6305.776, 31.08891, 5.672717, 120, 0), -- 16352 (Area: 3514) +(@CGUID+45 , 16352, 530, 6843.483, -6281.33, 26.38034, 3.213944, 120, 0), -- 16352 (Area: 0) +(@CGUID+46 , 16352, 530, 6876.344, -6120.826, 27.65071, 0.7722683, 120, 0), -- 16352 (Area: 0) +(@CGUID+47 , 16352, 530, 6918.788, -6012.118, 16.0651, 0.2698549, 120, 0), -- 16352 (Area: 0) +(@CGUID+48 , 16352, 530, 6780.824, -5914.694, 55.04383, 4.475933, 120, 0), -- 16352 (Area: 0) +(@CGUID+49 , 16352, 530, 6833.493, -5866.168, 14.88271, 0.9358938, 120, 0), -- 16352 (Area: 0) +(@CGUID+50 , 16352, 530, 6840.229, -5885.817, 18.84746, 0.9175394, 120, 0), -- 16352 (Area: 0) +(@CGUID+51 , 16352, 530, 6880.296, -5831.833, 12.60031, 4.379216, 120, 0), -- 16352 (Area: 0) +(@CGUID+52 , 16352, 530, 6921.029, -5888.282, 11.06036, 3.010598, 120, 0), -- 16352 (Area: 0) +(@CGUID+53 , 16349, 530, 6889.151, -7353.237, 48.22483, 4.51504, 120, 0), -- Ghostclaw Ravager +(@CGUID+54 , 16349, 530, 6842.837, -7303.427, 54.16766, 1.288876, 120, 0), -- 16349 (Area: 3517) +(@CGUID+55 , 16349, 530, 6546.021, -7284.988, 56.26369, 1.260878, 120, 0), -- 16349 (Area: 3517) +(@CGUID+56 , 16349, 530, 6679.54, -7225.896, 45.35223, 4.113977, 120, 0), -- 16349 (Area: 3517) +(@CGUID+57 , 16349, 530, 6643.776, -7193.75, 54.53874, 0, 120, 0), -- 16349 (Area: 3517) +(@CGUID+58 , 16349, 530, 6814.677, -6882.684, 88.09016, 2.293302, 120, 0), -- 16349 (Area: 0) +(@CGUID+59 , 16349, 530, 6721.141, -6838.881, 103.265, 6.057627, 120, 0), -- 16349 (Area: 0) +(@CGUID+60 , 16349, 530, 6697.734, -6834.776, 102.7457, 6.008372, 120, 0), -- 16349 (Area: 0) +(@CGUID+61 , 16349, 530, 6650.794, -6857.804, 114.3118, 2.645206, 120, 0), -- 16349 (Area: 0) +(@CGUID+62 , 16349, 530, 6848.059, -6343.108, 31.09843, 4.492753, 120, 0), -- 16349 (Area: 3514) +(@CGUID+63 , 16349, 530, 6946.989, -6384.78, 39.4313, 4.954051, 120, 0), -- 16349 (Area: 3514) +(@CGUID+64 , 16349, 530, 6912.969, -6363.86, 34.72787, 3.331182, 120, 0), -- 16349 (Area: 3514) +(@CGUID+65 , 16349, 530, 6766.795, -6363.485, 39.13235, 0.5625338, 120, 0), -- 16349 (Area: 0) +(@CGUID+66 , 16349, 530, 6946.226, -6247.874, 32.41405, 5.925901, 120, 0), -- 16349 (Area: 0) +(@CGUID+67 , 16349, 530, 6788.563, -6065.623, 76.42849, 3.921466, 120, 0), -- 16349 (Area: 0) +(@CGUID+68 , 16349, 530, 6792.339, -6061.395, 74.22968, 3.969122, 120, 0), -- 16349 (Area: 0) +(@CGUID+69 , 16349, 530, 6810.644, -5954.92, 53.78344, 3.796812, 120, 0), -- 16349 (Area: 0) +(@CGUID+70 , 16348, 530, 7063.472, -7130.528, 46.0153, 6.204991, 120, 0), -- Ghostclaw Lynx +(@CGUID+71 , 16348, 530, 7284.161, -6991.957, 49.69464, 1.443535, 120, 0), -- 16348 (Area: 0) +(@CGUID+72 , 16348, 530, 7213.42, -6959.183, 48.15844, 1.778343, 120, 0), -- 16348 (Area: 0) +(@CGUID+73 , 16348, 530, 7250.096, -6969.17, 47.61874, 1.986341, 120, 0), -- 16348 (Area: 0) +(@CGUID+74 , 16348, 530, 7050.619, -6915.433, 49.37156, 2.73385, 120, 0), -- 16348 (Area: 0) +(@CGUID+75 , 16348, 530, 7451.216, -7814.882, 147.9057, 3.899374, 120, 0), -- 16348 (Area: 3516) +(@CGUID+76 , 16348, 530, 7396.958, -7735.421, 126.7814, 2.59045, 120, 0), -- 16348 (Area: 3516) +(@CGUID+77 , 16348, 530, 7340.802, -7687.29, 114.7227, 0.2125256, 120, 0), -- 16348 (Area: 3516) +(@CGUID+78 , 16348, 530, 7183.236, -7268.509, 46.15837, 4.739726, 120, 0), -- 16348 (Area: -1) +(@CGUID+79 , 16348, 530, 7229.547, -7256.011, 50.49553, 3.413854, 120, 0), -- 16348 (Area: -1) +(@CGUID+80 , 16348, 530, 7087.505, -7228.648, 47.83735, 2.820592, 120, 0), -- 16348 (Area: -1) +(@CGUID+81 , 16348, 530, 7216.22, -6980.535, 45.21544, 2.602345, 120, 0), -- 16348 (Area: -1) +(@CGUID+82 , 16348, 530, 7314.215, -6966.182, 50.0986, 1.607889, 120, 0), -- 16348 (Area: 0) +(@CGUID+83 , 16348, 530, 7330.698, -6964.013, 48.61691, 2.429726, 120, 0), -- 16348 (Area: 0) +(@CGUID+84 , 16348, 530, 7381.186, -6840.756, 49.09549, 5.203093, 120, 0), -- 16348 (Area: 0) +(@CGUID+85 , 16348, 530, 7338.635, -6880.206, 47.74126, 3.243301, 120, 0), -- 16348 (Area: 0) +(@CGUID+86 , 16348, 530, 7245.959, -6846.432, 44.47991, 3.107588, 120, 0), -- 16348 (Area: 0) +(@CGUID+87 , 16348, 530, 7271.94, -6770.036, 41.23086, 3.766337, 120, 0), -- 16348 (Area: 0) +(@CGUID+88 , 16348, 530, 7214.612, -6826.908, 47.06087, 1.656858, 120, 0), -- 16348 (Area: 0) +(@CGUID+89 , 16354, 530, 7076.276, -6972.893, 46.59879, 5.554435, 120, 0), -- Vampiric Mistbat +(@CGUID+90 , 16354, 530, 7017.884, -6890.591, 51.47795, 0.1461384, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+91 , 16354, 530, 7113.623, -6924.28, 47.51407, 1.275599, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+92 , 16354, 530, 7120.204, -6986.206, 46.46815, 3.014331, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+93 , 16354, 530, 7042.884, -7063.796, 47.43617, 0.2345574, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+94 , 16354, 530, 7126.826, -6958.08, 46.08292, 1.337121, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+95 , 16354, 530, 7014.953, -7154.451, 44.05517, 4.580289, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+96 , 16354, 530, 7049.035, -7179.571, 44.51942, 2.854439, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+97 , 16354, 530, 7192.258, -6990.721, 45.789, 6.118358, 120, 0), -- 16354 (Area: 3493) (Auras: 29363 - 29363) +(@CGUID+98 , 16354, 530, 7297.3, -6952.889, 48.22968, 0.04103268, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+99 , 16354, 530, 7256.268, -6915.919, 49.01978, 6.275373, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+100, 16354, 530, 7100.769, -6852.027, 48.50787, 3.594324, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+101, 16354, 530, 7115.031, -6797.596, 43.95771, 4.893901, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+102, 16354, 530, 7046.083, -6001.001, 5.373741, 1.707996, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+103, 16354, 530, 7657.632, -7820.115, 155.0192, 0.007812341, 120, 0), -- 16354 (Area: 5780) (Auras: 29363 - 29363) +(@CGUID+104, 16354, 530, 7625.615, -7846.144, 163.4028, 4.013608, 120, 0), -- 16354 (Area: 5780) (Auras: 29363 - 29363) +(@CGUID+105, 16354, 530, 7122.203, -7253.339, 46.5706, 5.714052, 120, 0), -- 16354 (Area: -1) (Auras: 29363 - 29363) +(@CGUID+106, 16354, 530, 7217.567, -6982.356, 45.42596, 2.619296, 120, 0), -- 16354 (Area: -1) (Auras: 29363 - 29363) +(@CGUID+107, 16354, 530, 7117.631, -7009.641, 45.96103, 1.385088, 120, 0), -- 16354 (Area: -1) (Auras: 29363 - 29363) +(@CGUID+108, 16354, 530, 7166.285, -6976.54, 44.8732, 4.951204, 120, 0), -- 16354 (Area: -1) (Auras: 29363 - 29363) +(@CGUID+109, 16354, 530, 7312.727, -6912.875, 50.63189, 4.525721, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+110, 16354, 530, 7320.769, -6873.548, 46.65247, 4.479732, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+111, 16354, 530, 7280.374, -6883.919, 46.72137, 2.94094, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+112, 16354, 530, 7311.557, -6785.887, 42.1341, 3.170881, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+113, 16354, 530, 7346.644, -6818.584, 45.92062, 3.949025, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+114, 16354, 530, 7288.737, -6849.499, 44.25882, 4.882647, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+115, 16354, 530, 7377.227, -6753.976, 31.68961, 0.03127035, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+116, 16354, 530, 7416.598, -6716.583, 28.30837, 0.7370265, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+117, 16354, 530, 7353.333, -6720.048, 30.60197, 2.399705, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+118, 16354, 530, 7259.75, -6787.555, 40.84682, 6.201098, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+119, 16354, 530, 7108.942, -6779.335, 39.96529, 5.709267, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+120, 16354, 530, 7133.71, -6917.99, 50.83417, 2.893063, 120, 0), -- 16354 (Area: 0) (Auras: 29363 - 29363) +(@CGUID+121, 16405, 530, 6988.21, -5644.906, -3.24633, 3.193715, 120, 0), -- Whitetail Frenzy (fishy!) +(@CGUID+122, 16405, 530, 7185.634, -5581.585, -7.89854, 1.237991, 120, 0), -- 16405 (Area: 3455) (possible waypoints or random movement) +(@CGUID+123, 16405, 530, 7125.062, -5516.672, -5.845787, 0.05448707, 120, 0), -- 16405 (Area: 3455) +(@CGUID+124, 16405, 530, 7250.163, -5645.383, -4.686822, 1.609466, 120, 0), -- 16405 (Area: 3455) (possible waypoints or random movement) +(@CGUID+125, 16405, 530, 7251.583, -5518.657, -14.82046, 5.090523, 120, 0), -- 16405 (Area: 3455) +(@CGUID+126, 16405, 530, 7319, -5583.684, -5.345567, 4.631339, 120, 0), -- 16405 (Area: 3455) +(@CGUID+127, 16405, 530, 7385.255, -5514.504, -23.83957, 4.482534, 120, 0), -- 16405 (Area: 3455) +(@CGUID+128, 16404, 530, 7453.585, -5582.35, -4.679311, 1.291544, 120, 0), -- Yellowgill Frenzy (fishy!) +(@CGUID+129, 16404, 530, 7650.671, -5514.592, -49.15406, 0.4712389, 120, 0), -- 16404 (Area: 3455) +(@CGUID+130, 16404, 530, 7584.502, -5583.413, -24.85344, 3.455752, 120, 0), -- 16404 (Area: 3455) +(@CGUID+131, 16404, 530, 7583.759, -5452.181, -46.03991, 2.70526, 120, 0), -- 16404 (Area: 3455) +(@CGUID+132, 16404, 530, 7714.01, -5449.991, -64.69885, 5.61996, 120, 0), -- 16404 (Area: 3455) +(@CGUID+133, 16404, 530, 7646.778, -5386.804, -65.33501, 3.752458, 120, 0), -- 16404 (Area: 3455) +(@CGUID+134, 16404, 530, 7782.522, -5520.318, -25.0596, 2.251475, 120, 0), -- 16404 (Area: 3455) +(@CGUID+135, 16404, 530, 7851.458, -5451.522, -47.55369, 0.6981317, 120, 0), -- 16404 (Area: 3455) +(@CGUID+136, 16404, 530, 7916.752, -5518.634, -40.62648, 0.08726646, 120, 0), -- 16404 (Area: 3455) +(@CGUID+137, 16404, 530, 7981.461, -5584.885, -4.679321, 2.984513, 120, 0), -- 16404 (Area: 3455) +(@CGUID+138, 16404, 530, 7981.47, -5453.279, -45.36422, 2.443461, 120, 0), -- 16404 (Area: 3455) +(@CGUID+139, 16404, 530, 8049.632, -5517.96, -25.7112, 5.201081, 120, 0), -- 16404 (Area: 3455) +(@CGUID+140, 16404, 530, 8116.961, -5448.617, -46.06174, 0.6981317, 120, 0), -- 16404 (Area: 3455) +(@CGUID+141, 16404, 530, 8115.655, -5582.934, -4.67935, 3.071779, 120, 0), -- 16404 (Area: 3455) +(@CGUID+142, 16404, 530, 8181.515, -5517.779, -21.47383, 3.996804, 120, 0), -- 16404 (Area: 3455) +(@CGUID+143, 33712, 530, 8581.657, -5615.35, -1.142317, 1.903857, 120, 0), -- Golden Crawler +(@CGUID+144, 33712, 530, 8504.382, -5543.861, -1.478864, 3.13378, 120, 0), -- 33712 (Area: 3460) +(@CGUID+145, 33712, 530, 8514.937, -5619.518, -0.04902005, 2.168977, 120, 0), -- 33712 (Area: 3460) +(@CGUID+146, 33712, 530, 8415.799, -5584.587, -1.309665, 0, 120, 0), -- 33712 (Area: 3460) +(@CGUID+147, 33712, 530, 8332.279, -5641.95, -1.466211, 2.25529, 120, 0), -- 33712 (Area: 3460) +(@CGUID+148, 33712, 530, 8283.341, -5648.665, -1.085784, 0, 120, 0), -- 33712 (Area: 3460) +(@CGUID+149, 33712, 530, 8282.833, -5682.408, 1.912665, 1.05757, 120, 0), -- 33712 (Area: 3460) +(@CGUID+150, 33712, 530, 8293.516, -5772.522, 0.8719814, 5.366834, 120, 0), -- 33712 (Area: 3460) +(@CGUID+151, 33712, 530, 8308.861, -5862.752, 0.241255, 6.083331, 120, 0), -- 33712 (Area: 3460) +(@CGUID+152, 33712, 530, 9197.843, -5831.596, -1.436119, 3.801267, 120, 0), -- 33712 (Area: 3911) +(@CGUID+153, 33712, 530, 9354.067, -5992.446, 0.5006291, 4.806949, 120, 0), -- 33712 (Area: 3911) +(@CGUID+154, 33712, 530, 9355.795, -6054.746, -10.57742, 5.58345, 120, 0), -- 33712 (Area: 3911) +(@CGUID+155, 15372, 530, 10655.46, -6208.573, 44.35903, 3.352107, 120, 0), -- 15372 (Area: 3431) +(@CGUID+156, 15372, 530, 10664.23, -6132.04, 28.6685, 2.430012, 120, 0), -- 15372 (Area: 3431) +(@CGUID+157, 15372, 530, 10680.05, -6169.8, 39.0421, 1.041597, 120, 0), -- 15372 (Area: 3431) +(@CGUID+158, 721, 530, 8518.23, -5731.495, 13.00602, 3.633779, 120, 0), -- Rabbit +(@CGUID+159, 721, 530, 8639.186, -5761.18, 11.46758, 3.938846, 120, 0), -- 721 (Area: 3460) +(@CGUID+160, 721, 530, 8778.733, -5847.375, 7.75886, 4.726789, 120, 0), -- 721 (Area: 3460) +(@CGUID+161, 721, 530, 8984.896, -5983.854, 19.71628, 4.000124, 120, 0), -- 721 (Area: 3911) +(@CGUID+162, 721, 530, 9145.909, -5946.4, 28.77039, 2.019282, 120, 0), -- 721 (Area: 3911) +(@CGUID+163, 721, 530, 9231.008, -6160.386, 25.5099, 0.5819958, 120, 0), -- 721 (Area: 3911) +(@CGUID+164, 721, 530, 9452.181, -7939.893, 11.60837, 3.357151, 120, 0), -- 721 (Area: 3472) +(@CGUID+165, 721, 530, 9438.168, -7889.708, 21.39819, 2.464021, 120, 0), -- 721 (Area: 3472) +(@CGUID+166, 721, 530, 9396.646, -7802.477, 55.43135, 0.6543702, 120, 0), -- 721 (Area: 3480) +(@CGUID+167, 4075, 530, 6658.765, -6295.493, 29.20658, 2.160989, 120, 0), -- Rat +(@CGUID+168, 4075, 530, 7113.27, -5958.493, 12.98514, 1.957865, 120, 0), -- 4075 (Area: 0) +(@CGUID+169, 4075, 530, 7308.667, -5989.029, 16.2368, 2.572109, 120, 0), -- 4075 (Area: 3491) +(@CGUID+170, 15649, 530, 10060.82, -6872.714, 24.29431, 4.285359, 120, 0), -- Feral Dragonhawk Hatchling +(@CGUID+171, 15651, 530, 8653.924, -5784.069, 18.15051, 3.120111, 120, 0), -- Springpaw Stalker +(@CGUID+172, 15651, 530, 10048.03, -6717.27, 31.03372, 4.651473, 120, 0), -- 15651 (Area: 3533) +(@CGUID+173, 15651, 530, 10116.2, -7079.959, 11.65078, 5.202464, 120, 0), -- 15651 (Area: 0) +(@CGUID+174, 15651, 530, 10119.57, -7117.229, 11.13619, 5.610377, 120, 0), -- 15651 (Area: 0) +(@CGUID+175, 15651, 530, 10245.07, -7154.263, 5.379348, 3.824573, 120, 0), -- 15651 (Area: 0) +(@CGUID+176, 15651, 530, 10312.5, -7285.686, 10.4436, 3.958998, 120, 0), -- 15651 (Area: 0) +(@CGUID+177, 15651, 530, 0155.74, -7315.172, 46.89272, 1.747505, 120, 0), -- 15651 (Area: 0) +(@CGUID+178, 15651, 530, 10212.78, -7312.304, 43.83004, 2.297004, 120, 0), -- 15651 (Area: 0) +(@CGUID+179, 15651, 530, 10120.49, -7380.654, 41.25549, 3.739351, 120, 0), -- 15651 (Area: 0) +(@CGUID+180, 15651, 530, 10222.12, -7377.514, 42.6799, 6.21672, 120, 0), -- 15651 (Area: 0) +(@CGUID+181, 15651, 530, 10287.61, -7510.908, 45.47846, 4.328416, 120, 0), -- 15651 (Area: 0) +(@CGUID+182, 15651, 530, 10307.25, -7600.326, 27.67019, 1.3225, 120, 0), -- 15651 (Area: 0) +(@CGUID+183, 15651, 530, 10261.34, -7483.148, 64.01847, 4.310963, 120, 0), -- 15651 (Area: 0) +(@CGUID+184, 15651, 530, 10222.87, -7613.924, 61.70162, 2.482553, 120, 0), -- 15651 (Area: 0) +(@CGUID+185, 15650, 530, 10279.31, -7324.253, 33.49329, 4.19599, 120, 0), -- Crazed Dragonhawk +(@CGUID+186, 15650, 530, 10192.26, -7320.828, 45.92649, 5.882011, 120, 0), -- 15650 (Area: 0) (Auras: 29119 - 29119) +(@CGUID+187, 15650, 530, 10171.51, -7404.468, 48.17466, 5.125631, 120, 0), -- 15650 (Area: 0) (Auras: 29119 - 29119) +(@CGUID+188, 15650, 530, 10225.49, -7453.733, 75.07253, 4.820997, 120, 0), -- 15650 (Area: 0) (Auras: 29119 - 29119) +(@CGUID+189, 15650, 530, 10095.22, -7399.66, 33.8582, 1.982334, 120, 0), -- 15650 (Area: 0) (Auras: 29119 - 29119) +(@CGUID+190, 15650, 530, 10089.92, -7352.991, 24.48084, 3.473843, 120, 0), -- 15650 (Area: 0) (Auras: 29119 - 29119) +(@CGUID+191, 15650, 530, 10304.47, -7592.876, 23.93329, 4.038411, 120, 0), -- 15650 (Area: 0) (Auras: 29119 - 29119) +(@CGUID+192, 15650, 530, 9840.896, -7878.327, 39.42878, 0.1114382, 120, 0), -- 15650 (Area: 3472) (Auras: 29119 - 29119) +(@CGUID+193, 15650, 530, 9008.495, -8056.905, 185.9688, 1.125495, 120, 0), -- 15650 (Area: 0) (Auras: 29119 - 29119) +(@CGUID+194, 15650, 530, 9009.816, -7833.289, 159.5567, 4.887175, 120, 0), -- 15650 (Area: 0) (Auras: 29119 - 29119) +(@CGUID+195, 15650, 530, 9015.15, -7667.337, 140.8466, 4.705554, 120, 0), -- 15650 (Area: 0) (Auras: 29119 - 29119) +(@CGUID+196, 15650, 530, 8824.381, -7819.187, 175.3332, 3.444827, 120, 0), -- 15650 (Area: 0) (Auras: 29119 - 29119) +(@CGUID+197, 15650, 530, 8785.419, -7913.549, 175.9667, 0.7577809, 120, 0), -- 15650 (Area: 3476) (Auras: 29119 - 29119) +(@CGUID+198, 15650, 530, 8848.306, -7942.777, 220.488, 5.064994, 120, 0), -- 15650 (Area: 3476) (Auras: 29119 - 29119) +(@CGUID+199, 15650, 530, 8333.768, -8008.462, 206.4037, 2.313344, 120, 0), -- 15650 (Area: 3476) (Auras: 29119 - 29119) +(@CGUID+200, 15650, 530, 8269.027, -8019.356, 224.7379, 5.511599, 120, 0), -- 15650 (Area: 3476) (Auras: 29119 - 29119) +(@CGUID+201, 15650, 530, 8213.844, -7896.639, 190.6529, 2.801, 120, 0), -- 15650 (Area: 3476) (Auras: 29119 - 29119) +(@CGUID+202, 15650, 530, 8216.283, -7952.173, 209.498, 1.65485, 120, 0), -- 15650 (Area: 3476) (Auras: 29119 - 29119) +(@CGUID+203, 16541, 530, 7244.089, -7125.762, 61.12453, 0.4067548, 120, 0), -- Ghostlands Guardian +(@CGUID+204, 16541, 530, 7182.639, -7079.073, 56.25724, 2.565634, 120, 0), -- 16541 (Area: 0) +(@CGUID+205, 16541, 530, 7168.553, -7095.772, 56.25724, 2.426008, 120, 0), -- 16541 (Area: 0) +(@CGUID+206, 14881, 530, 6908.589, -7112.601, 45.76462, 0.250855, 120, 0), -- Spider +(@CGUID+207, 14881, 530, 7087.832, -7109.549, 46.94461, 3.255385, 120, 0), -- 14881 (Area: 0) +(@CGUID+208, 14881, 530, 6913.161, -6316.999, 33.59887, 5.188184, 120, 0), -- 14881 (Area: 3514) +(@CGUID+209, 14881, 530, 7177.549, -7263.504, 45.25873, 4.996254, 120, 0), -- 14881 (Area: -1) (possible waypoints or random movement) +(@CGUID+210, 14881, 530, 7295.609, -7026.236, 48.24609, 0.2017749, 120, 0), -- 14881 (Area: -1) (possible waypoints or random movement) +(@CGUID+211, 14881, 530, 7120.973, -6668.307, 45.87799, 1.187052, 120, 0), -- 14881 (Area: 0) +(@CGUID+212, 33713, 530, 6896.669, -5765.082, -2.75388, 1.12993, 120, 0), -- 33713 (Area: 0) +(@CGUID+213, 33713, 530, 6853.869, -5738.312, -9.519895, 1.390244, 120, 0), -- 33713 (Area: 0) +(@CGUID+214, 33713, 530, 7173.716, -5696.389, -4.92298, 4.901935, 120, 0), -- 33713 (Area: 3491) +(@CGUID+215, 33713, 530, 7336.688, -5723.884, 0.3463151, 6.180531, 120, 0); -- 33713 (Area: 3491) + +-- Update movement +UPDATE `creature` SET `spawndist`=15, `MovementType`=1 WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+215; +UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `guid` IN (@CGUID+203, @CGUID+204, @CGUID+205, @CGUID+206); diff --git a/sql/updates/world/3.3.5/2016_05_24_00_world.sql b/sql/updates/world/3.3.5/2016_05_24_00_world.sql new file mode 100644 index 00000000000..b07a3288642 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_24_00_world.sql @@ -0,0 +1,14 @@ +SET @OGUID:=85056; + +-- Add missing objects spawns in Ghostlands & Eversong Woods +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+8; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0, 191460, 530, 1, 1, 6947.801, -7648.626, 131.9498, 0.2191041, 0, 0, 0.1093339, 0.9940051, 120, 255, 1), -- 191460 (Area: -1) -- Bonfire +(@OGUID+1, 181326, 530, 1, 1, 6772.437, -7350.587, 48.96166, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181326 (Area: 3517) -- Bonfire +(@OGUID+2, 191460, 530, 1, 1, 6663.345, -7398.321, 57.63737, 2.111147, 0, 0, 0.8701838, 0.4927272, 120, 255, 1), -- 191460 (Area: 3517) -- Bonfire +(@OGUID+3, 181327, 530, 1, 1, 6610.271, -7352.757, 54.1082, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181327 (Area: 3517) -- Cauldron +(@OGUID+4, 181362, 530, 1, 1, 6773.446, -7150.986, 48.90046, 3.141534, 0, 0, 0, 1, 120, 255, 1), -- 181362 (Area: 0) -- Campfire +(@OGUID+5, 181352, 530, 1, 1, 6785.604, -7192.486, 25.77958, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181352 (Area: 0) -- Campfire +(@OGUID+6, 181319, 530, 1, 1, 7150.752, -6823.163, 43.91896, 3.141326, 0, 0, 0, 1, 120, 255, 1), -- 181319 (Area: 0) -- Campfire +(@OGUID+7, 191460, 530, 1, 1, 7410.167, -7966.508, 161.3317, 2.984498, 0, 0, 0.9969173, 0.07845911, 120, 255, 1), -- 191460 (Area: 3516) -- Bonfire +(@OGUID+8, 191460, 530, 1, 1, 7274.042, -7768.146, 150.1007, 0.7679439, 0, 0, 0.3746067, 0.9271838, 120, 255, 1); -- 191460 (Area: 3516) -- Bonfire diff --git a/sql/updates/world/3.3.5/2016_05_24_01_world.sql b/sql/updates/world/3.3.5/2016_05_24_01_world.sql new file mode 100644 index 00000000000..58ac4b0a40e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_24_01_world.sql @@ -0,0 +1,5 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dru_eclipse'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(-48516, 'spell_dru_eclipse'); + +UPDATE `spell_proc_event` SET `Cooldown`=0 WHERE `entry`=-48516; -- set cooldown to 0, handled by a script diff --git a/sql/updates/world/3.3.5/2016_05_25_00_world.sql b/sql/updates/world/3.3.5/2016_05_25_00_world.sql new file mode 100644 index 00000000000..401f374d81a --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_25_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `spell_script_names` SET `spell_id`=67151 WHERE (`ScriptName`='spell_hun_t9_4p_bonus'); diff --git a/sql/updates/world/3.3.5/2016_05_25_01_world_335.sql b/sql/updates/world/3.3.5/2016_05_25_01_world_335.sql new file mode 100644 index 00000000000..603e8921a69 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_25_01_world_335.sql @@ -0,0 +1,592 @@ +RENAME TABLE `game_graveyard_zone` TO `graveyard_zone`; +ALTER TABLE `graveyard_zone` CHANGE `id` `ID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE `graveyard_zone` CHANGE `ghost_zone` `GhostZone` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE `graveyard_zone` CHANGE `faction` `Faction` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE `graveyard_zone` ADD COLUMN `Comment` TEXT AFTER `Faction`; + +UPDATE `command` SET `help`='Syntax: .reload all area\n\nReload areatrigger_teleport, areatrigger_tavern, graveyard_zone tables.' WHERE `permission`=613; +UPDATE `command` SET `name`='reload graveyard_zone', `help`='Syntax: .reload graveyard_zone\nReload graveyard_zone table.' WHERE `permission`=645; + +UPDATE `graveyard_zone` SET `Comment`='Redridge Mountains - Redridge Mountains' WHERE `ID`=2; +UPDATE `graveyard_zone` SET `Comment`='Duskwood, Darkshire - Duskwood' WHERE `ID`=3; +UPDATE `graveyard_zone` SET `Comment`='Westfall, Sentinel Hill GY - Westfall' WHERE `ID`=4; +UPDATE `graveyard_zone` SET `Comment`='Loch Modan, Thelsamar - Loch Modan' WHERE `ID`=6; +UPDATE `graveyard_zone` SET `Comment`='Wetlands, Crossroads GY' WHERE `ID`=7; +UPDATE `graveyard_zone` SET `Comment`='Badlands, Graveyard NE' WHERE `ID`=8; +UPDATE `graveyard_zone` SET `Comment`='The Barrens, The Crossroads - Northern Barrens' WHERE `ID`=10; +UPDATE `graveyard_zone` SET `Comment`='Desolace, Ethel Rethor GY' WHERE `ID`=31; +UPDATE `graveyard_zone` SET `Comment`='Durotar, Razor Hill GY' WHERE `ID`=32; +UPDATE `graveyard_zone` SET `Comment`='Mulgore, Red Cloud Mesa GY - Mulgore' WHERE `ID`=34; +UPDATE `graveyard_zone` SET `Comment`='Darkshore, New Auberdine GY - Darkshore' WHERE `ID`=35; +UPDATE `graveyard_zone` SET `Comment`='Deadwind Pass, Morgan''s Plot' WHERE `ID`=36; +UPDATE `graveyard_zone` SET `Comment`='Silithus, Valor''s Rest - Silithus' WHERE `ID`=70; +UPDATE `graveyard_zone` SET `Comment`='Mulgore, Bloodhoof Village GY - Mulgore' WHERE `ID`=89; +UPDATE `graveyard_zone` SET `Comment`='Teldrassil, Darnassus GY' WHERE `ID`=90; +UPDATE `graveyard_zone` SET `Comment`='Teldrassil, Dolanaar GY - Teldrassil' WHERE `ID`=91; +UPDATE `graveyard_zone` SET `Comment`='Ashenvale, Astranaar GY - Ashenvale' WHERE `ID`=92; +UPDATE `graveyard_zone` SET `Comment`='Teldrassil, Aldrassil GY - Teldrassil' WHERE `ID`=93; +UPDATE `graveyard_zone` SET `Comment`='Tirisfal Glades, Deathknell - Tirisfal Glades' WHERE `ID`=94; +UPDATE `graveyard_zone` SET `Comment`='Tirisfal Glades, Undercity' WHERE `ID`=96; +UPDATE `graveyard_zone` SET `Comment`='Silverpine Forest, The Sepulcher - Silverpine Forest' WHERE `ID`=97; +UPDATE `graveyard_zone` SET `Comment`='Hillsbrad Foothills, Tarren Mill - Hillsbrad Foothills' WHERE `ID`=98; +UPDATE `graveyard_zone` SET `Comment`='Arathi Highlands, Eastern Road - Arathi Highlands' WHERE `ID`=99; +UPDATE `graveyard_zone` SET `Comment`='Dun Morogh, Anvilmar - Dun Morogh' WHERE `ID`=100; +UPDATE `graveyard_zone` SET `Comment`='Dun Morogh, Kharanos' WHERE `ID`=101; +UPDATE `graveyard_zone` SET `Comment`='Badlands, Kargath - Badlands' WHERE `ID`=103; +UPDATE `graveyard_zone` SET `Comment`='Redridge Mountains, Lakeshire' WHERE `ID`=104; +UPDATE `graveyard_zone` SET `Comment`='Elwynn Forest, Northshire - Elwynn Forest' WHERE `ID`=105; +UPDATE `graveyard_zone` SET `Comment`='Elwynn Forest, Goldshire - Elwynn Forest' WHERE `ID`=106; +UPDATE `graveyard_zone` SET `Comment`='Elwynn Forest, Stormwind' WHERE `ID`=107; +UPDATE `graveyard_zone` SET `Comment`='Swamp of Sorrows, Stonard GY' WHERE `ID`=108; +UPDATE `graveyard_zone` SET `Comment`='Stranglethorn Vale, Booty Bay GY - Stranglethorn Vale' WHERE `ID`=109; +UPDATE `graveyard_zone` SET `Comment`='Teldrassil, Rut''theran Village GY - Teldrassil' WHERE `ID`=129; +UPDATE `graveyard_zone` SET `Comment`='Hillsbrad Foothills, Southshore' WHERE `ID`=149; +UPDATE `graveyard_zone` SET `Comment`='Alterac Valley, Snowfall Graveyard (Mid) - Alterac Valley' WHERE `ID`=169; +UPDATE `graveyard_zone` SET `Comment`='Dustwallow Marsh, Theramore Isle GY - Dustwallow Marsh' WHERE `ID`=189; +UPDATE `graveyard_zone` SET `Comment`='Tanaris, Gadgetzan GY' WHERE `ID`=209; +UPDATE `graveyard_zone` SET `Comment`='The Barrens, Camp Taurajo GY - Southern Barrens' WHERE `ID`=229; +UPDATE `graveyard_zone` SET `Comment`='The Barrens, Ratchet' WHERE `ID`=249; +UPDATE `graveyard_zone` SET `Comment`='Tirisfal Glades, Brill - Tirisfal Glades' WHERE `ID`=289; +UPDATE `graveyard_zone` SET `Comment`='Feralas, New Feathermoon Stronghold GY (A) - Feralas' WHERE `ID`=309; +UPDATE `graveyard_zone` SET `Comment`='Feralas, Camp Mojache GY (H) - Feralas' WHERE `ID`=310; +UPDATE `graveyard_zone` SET `Comment`='Thousand Needles, Splithoof Heights GY (MOVED) - Thousand Needles' WHERE `ID`=329; +UPDATE `graveyard_zone` SET `Comment`='The Hinterlands, Aerie Peak - The Hinterlands' WHERE `ID`=349; +UPDATE `graveyard_zone` SET `Comment`='Azshara, Northern Azshara GY - Azshara' WHERE `ID`=369; +UPDATE `graveyard_zone` SET `Comment`='Blasted Lands, Dreadmaul Hold GY - Blasted Lands' WHERE `ID`=370; +UPDATE `graveyard_zone` SET `Comment`='Blasted Lands, Dreadmaul Hold GY - Swamp of Sorrows' WHERE `ID`=370; +UPDATE `graveyard_zone` SET `Comment`='Stranglethorn Vale, Northern Stranglethorn GY - Stranglethorn Vale' WHERE `ID`=389; +UPDATE `graveyard_zone` SET `Comment`='Stonetalon Mountains, Webwinder Path GY - Stonetalon Mountains' WHERE `ID`=409; +UPDATE `graveyard_zone` SET `Comment`='Felwood, Morlos''Aran - Felwood' WHERE `ID`=449; +UPDATE `graveyard_zone` SET `Comment`='Un''Goro Crater, The Marshlands - Un''Goro Crater' WHERE `ID`=450; +UPDATE `graveyard_zone` SET `Comment`='Darkshore, Twilight Vale GY' WHERE `ID`=469; +UPDATE `graveyard_zone` SET `Comment`='Wetlands, Baradin Bay GY - Wetlands' WHERE `ID`=489; +UPDATE `graveyard_zone` SET `Comment`='Western Plaguelands, Chillwind Camp - Western Plaguelands' WHERE `ID`=509; +UPDATE `graveyard_zone` SET `Comment`='Eastern Plaguelands, Pestilent Scar - Eastern Plaguelands' WHERE `ID`=510; +UPDATE `graveyard_zone` SET `Comment`='Winterspring, Everlook GY - Winterspring' WHERE `ID`=511; +UPDATE `graveyard_zone` SET `Comment`='Ashenvale, Kargathia GY' WHERE `ID`=512; +UPDATE `graveyard_zone` SET `Comment`='Programmer Isle - Programmer Isle' WHERE `ID`=529; +UPDATE `graveyard_zone` SET `Comment`='Western Plaguelands, Bulwark' WHERE `ID`=569; +UPDATE `graveyard_zone` SET `Comment`='Azshara, (Overlooks) The Shattered Strand GY - Azshara' WHERE `ID`=609; +UPDATE `graveyard_zone` SET `Comment`='Alterac Valley, Horde Safe - Alterac Valley' WHERE `ID`=610; +UPDATE `graveyard_zone` SET `Comment`='Alterac Valley, Alliance Safe - Alterac Valley' WHERE `ID`=611; +UPDATE `graveyard_zone` SET `Comment`='TEST for GM Client Only - Do Not Bug - Tirisfal Glades' WHERE `ID`=629; +UPDATE `graveyard_zone` SET `Comment`='Azshara, Bitter Reaches GY - Azshara' WHERE `ID`=630; +UPDATE `graveyard_zone` SET `Comment`='Dustwallow Marsh, Brackenwall Village GY - Dustwallow Marsh' WHERE `ID`=631; +UPDATE `graveyard_zone` SET `Comment`='Moonglade GY - Moonglade' WHERE `ID`=633; +UPDATE `graveyard_zone` SET `Comment`='Eastern Plaguelands, Darrowshire - Eastern Plaguelands' WHERE `ID`=634; +UPDATE `graveyard_zone` SET `Comment`='Felwood, Irontree Woods - Felwood' WHERE `ID`=635; +UPDATE `graveyard_zone` SET `Comment`='Searing Gorge, Thorium Point - Searing Gorge' WHERE `ID`=636; +UPDATE `graveyard_zone` SET `Comment`='Durotar, Sen''jin Village GY - Durotar' WHERE `ID`=649; +UPDATE `graveyard_zone` SET `Comment`='Programmer Isle, Bucklers Cemetery 2 - Programmer Isle' WHERE `ID`=669; +UPDATE `graveyard_zone` SET `Comment`='Programmer Isle, Bucklers Cemetery 1 - Programmer Isle' WHERE `ID`=670; +UPDATE `graveyard_zone` SET `Comment`='Programmer Isle, Bucklers Cemetery 3 - Programmer Isle' WHERE `ID`=671; +UPDATE `graveyard_zone` SET `Comment`='Alterac Valley, Stormpike Graveyard (Hi) - Alterac Valley' WHERE `ID`=689; +UPDATE `graveyard_zone` SET `Comment`='Durotar, Valley of Trials GY - Durotar' WHERE `ID`=709; +UPDATE `graveyard_zone` SET `Comment`='Alterac Valley, PvP Alliance Choke Graveyard (A-choke) - Alterac Valley' WHERE `ID`=729; +UPDATE `graveyard_zone` SET `Comment`='Alterac Valley, PvP Horde Choke Graveyard (H-choke) - Alterac Valley' WHERE `ID`=749; +UPDATE `graveyard_zone` SET `Comment`='Alterac Valley, Frostwolf Relief Hut (H-base) - Alterac Valley' WHERE `ID`=750; +UPDATE `graveyard_zone` SET `Comment`='Alterac Valley, Stormpike Aid Station (A-base) - Alterac Valley' WHERE `ID`=751; +UPDATE `graveyard_zone` SET `Comment`='Warsong Gulch - Alliance Enter Loc - Warsong Gulch' WHERE `ID`=769; +UPDATE `graveyard_zone` SET `Comment`='Warsong Gulch - Horde Enter Loc - Warsong Gulch' WHERE `ID`=770; +UPDATE `graveyard_zone` SET `Comment`='Warsong Gulch - Alliance Rez Loc - Warsong Gulch' WHERE `ID`=771; +UPDATE `graveyard_zone` SET `Comment`='Warsong Gulch - Horde Rez Loc - Warsong Gulch' WHERE `ID`=772; +UPDATE `graveyard_zone` SET `Comment`='The Hinterlands, The Overlook Cliffs - The Hinterlands' WHERE `ID`=789; +UPDATE `graveyard_zone` SET `Comment`='Warsong Gulch - Horde Exit Loc - Warsong Gulch' WHERE `ID`=809; +UPDATE `graveyard_zone` SET `Comment`='Warsong Gulch - Alliance Exit Loc - Warsong Gulch' WHERE `ID`=810; +UPDATE `graveyard_zone` SET `Comment`='Alterac Valley, Alliance Exit' WHERE `ID`=829; +UPDATE `graveyard_zone` SET `Comment`='Alterac Valley, Horde Exit - Alterac Valley' WHERE `ID`=830; +UPDATE `graveyard_zone` SET `Comment`='Feralas, Dire Maul Stonemaul Hold GY - Feralas' WHERE `ID`=849; +UPDATE `graveyard_zone` SET `Comment`='Durotar, Northern Durotar GY' WHERE `ID`=850; +UPDATE `graveyard_zone` SET `Comment`='Mulgore, Thunder Bluff GY' WHERE `ID`=851; +UPDATE `graveyard_zone` SET `Comment`='Dun Morogh, Gates of Ironforge - Dun Morogh' WHERE `ID`=852; +UPDATE `graveyard_zone` SET `Comment`='Elwynn Forest, Eastvale Logging Camp' WHERE `ID`=854; +UPDATE `graveyard_zone` SET `Comment`='Western Plaguelands, Caer Darrow - Western Plaguelands' WHERE `ID`=869; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Horde Entrance - Arathi Basin' WHERE `ID`=889; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Alliance Entrance - Arathi Basin' WHERE `ID`=890; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Horde Exit - Arathi Basin' WHERE `ID`=891; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Alliance Exit - Arathi Basin' WHERE `ID`=892; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Graveyard, H-Mid (Farm) - Arathi Basin' WHERE `ID`=893; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Graveyard, Mid (Blacksmith) - Arathi Basin' WHERE `ID`=894; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Graveyard, A-Mid (Stables) - Arathi Basin' WHERE `ID`=895; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Graveyard, ALT-N (Gold Mine) - Arathi Basin' WHERE `ID`=896; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Graveyard, ALT-S (Lumber Mill) - Arathi Basin' WHERE `ID`=897; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Graveyard, A-Base (Trollbane Hall) - Arathi Basin' WHERE `ID`=898; +UPDATE `graveyard_zone` SET `Comment`='Arathi Basin - Graveyard, H-Base (Defiler''s Den) - Arathi Basin' WHERE `ID`=899; +UPDATE `graveyard_zone` SET `Comment`='Eastern Plaguelands, Blackwood Lake - Eastern Plaguelands' WHERE `ID`=909; +UPDATE `graveyard_zone` SET `Comment`='Eastern Plaguelands, Blackwood Lake - Stratholme' WHERE `ID`=909; +UPDATE `graveyard_zone` SET `Comment`='Silithus, Cenarion Hold - Ruins of Ahn''Qiraj' WHERE `ID`=910; +UPDATE `graveyard_zone` SET `Comment`='Silithus, Cenarion Hold - Silithus' WHERE `ID`=910; +UPDATE `graveyard_zone` SET `Comment`='Duskwood, Ravenhill - Duskwood' WHERE `ID`=911; +UPDATE `graveyard_zone` SET `Comment`='Eversong Woods, Sunstrider Isle - Eversong Woods' WHERE `ID`=912; +UPDATE `graveyard_zone` SET `Comment`='Silithus, Scarab Wall (AQ Only)' WHERE `ID`=913; +UPDATE `graveyard_zone` SET `Comment`='Eversong Woods, Farstrider Lodge GY - Eversong Woods' WHERE `ID`=914; +UPDATE `graveyard_zone` SET `Comment`='Ghostlands, Tranquillien - Ghostlands' WHERE `ID`=915; +UPDATE `graveyard_zone` SET `Comment`='Ghostlands, Sanctum - Ghostlands' WHERE `ID`=916; +UPDATE `graveyard_zone` SET `Comment`='Ghostlands, Amani Pass' WHERE `ID`=917; +UPDATE `graveyard_zone` SET `Comment`='Azuremyst Isle, Ammen Vale' WHERE `ID`=918; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Thrallmar' WHERE `ID`=919; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Honor Hold' WHERE `ID`=920; +UPDATE `graveyard_zone` SET `Comment`='Eversong Woods, Silvermoon City' WHERE `ID`=921; +UPDATE `graveyard_zone` SET `Comment`='Azuremyst, Azure Watch GY - Azuremyst Isle' WHERE `ID`=923; +UPDATE `graveyard_zone` SET `Comment`='Azuremyst, Stillpine GY' WHERE `ID`=924; +UPDATE `graveyard_zone` SET `Comment`='Bloodmyst, Blood Watch GY - Bloodmyst Isle' WHERE `ID`=925; +UPDATE `graveyard_zone` SET `Comment`='Bloodmyst, Wilderness GY' WHERE `ID`=926; +UPDATE `graveyard_zone` SET `Comment`='Eastern Plaguelands, Graveyard CG Tower - Eastern Plaguelands' WHERE `ID`=927; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Zabra''jin GY' WHERE `ID`=928; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, SE Graveyard - Nagrand' WHERE `ID`=930; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Temple - Hellfire Peninsula' WHERE `ID`=933; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Falcon Watch - Hellfire Peninsula' WHERE `ID`=934; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 001 - Twisting Nether' WHERE `ID`=942; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 002 - Twisting Nether' WHERE `ID`=943; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 003 - Twisting Nether' WHERE `ID`=944; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 005 - Twisting Nether' WHERE `ID`=945; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 006 - Twisting Nether' WHERE `ID`=946; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 007 - Twisting Nether' WHERE `ID`=947; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 008 - Twisting Nether' WHERE `ID`=948; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 009 - Twisting Nether' WHERE `ID`=949; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 010 - Twisting Nether' WHERE `ID`=950; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 011 - Twisting Nether' WHERE `ID`=951; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 012 - Twisting Nether' WHERE `ID`=952; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 013 - Twisting Nether' WHERE `ID`=953; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 014 - Twisting Nether' WHERE `ID`=954; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 015 - Twisting Nether' WHERE `ID`=955; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 016 - Twisting Nether' WHERE `ID`=956; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 017 - Twisting Nether' WHERE `ID`=957; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 018 - Twisting Nether' WHERE `ID`=958; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 019 - Twisting Nether' WHERE `ID`=959; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 020 - Twisting Nether' WHERE `ID`=960; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 021 - Twisting Nether' WHERE `ID`=961; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 022 - Twisting Nether' WHERE `ID`=962; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 023 - Twisting Nether' WHERE `ID`=963; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 024 - Twisting Nether' WHERE `ID`=964; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 025 - Twisting Nether' WHERE `ID`=965; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 026 - Twisting Nether' WHERE `ID`=966; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 027 - Twisting Nether' WHERE `ID`=967; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Corpse Location 028 - Twisting Nether' WHERE `ID`=968; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, PvP GY' WHERE `ID`=969; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Telredor GY' WHERE `ID`=970; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 006 - Twisting Nether' WHERE `ID`=972; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Cenarion GY - Zangarmarsh' WHERE `ID`=973; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 001 - Twisting Nether' WHERE `ID`=974; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 002 - Twisting Nether' WHERE `ID`=975; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 003 - Twisting Nether' WHERE `ID`=976; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 004 - Twisting Nether' WHERE `ID`=977; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 008 - Twisting Nether' WHERE `ID`=978; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 005 - Twisting Nether' WHERE `ID`=979; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 007 - Twisting Nether' WHERE `ID`=980; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 009 - Twisting Nether' WHERE `ID`=981; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 011 - Twisting Nether' WHERE `ID`=982; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 010 - Twisting Nether' WHERE `ID`=983; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 012 - Twisting Nether' WHERE `ID`=984; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 013 - Twisting Nether' WHERE `ID`=985; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 014 - Twisting Nether' WHERE `ID`=986; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 016 - Twisting Nether' WHERE `ID`=987; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 015 - Twisting Nether' WHERE `ID`=988; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 017 - Twisting Nether' WHERE `ID`=989; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 018 - Twisting Nether' WHERE `ID`=990; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Corpse Location 019 - Twisting Nether' WHERE `ID`=991; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Northwind Cleft - Nagrand' WHERE `ID`=992; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Halaa GY - Nagrand' WHERE `ID`=993; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Shattrath GY' WHERE `ID`=994; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Wilderness GY - Terokkar Forest' WHERE `ID`=995; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 001 - Twisting Nether' WHERE `ID`=999; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 002 - Twisting Nether' WHERE `ID`=1000; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 003 - Twisting Nether' WHERE `ID`=1001; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 004 - Twisting Nether' WHERE `ID`=1002; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 005 - Twisting Nether' WHERE `ID`=1003; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 006 - Twisting Nether' WHERE `ID`=1004; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 007 - Twisting Nether' WHERE `ID`=1005; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 008 - Twisting Nether' WHERE `ID`=1006; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 009 - Twisting Nether' WHERE `ID`=1007; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 010 - Twisting Nether' WHERE `ID`=1008; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 011 - Twisting Nether' WHERE `ID`=1009; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 012 - Twisting Nether' WHERE `ID`=1010; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 013 - Twisting Nether' WHERE `ID`=1011; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Corpse Location 014 - Twisting Nether' WHERE `ID`=1012; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 001 - Twisting Nether' WHERE `ID`=1013; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 002 - Twisting Nether' WHERE `ID`=1014; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 003 - Twisting Nether' WHERE `ID`=1015; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 004 - Twisting Nether' WHERE `ID`=1016; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 005 - Twisting Nether' WHERE `ID`=1017; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 006 - Twisting Nether' WHERE `ID`=1018; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 007 - Twisting Nether' WHERE `ID`=1019; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 008 - Twisting Nether' WHERE `ID`=1020; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 009 - Twisting Nether' WHERE `ID`=1021; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 010 - Twisting Nether' WHERE `ID`=1022; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 011 - Twisting Nether' WHERE `ID`=1023; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 001 - Twisting Nether' WHERE `ID`=1024; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 002 - Twisting Nether' WHERE `ID`=1025; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 003 - Twisting Nether' WHERE `ID`=1026; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 004 - Twisting Nether' WHERE `ID`=1027; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 016 - Twisting Nether' WHERE `ID`=1028; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 017 - Twisting Nether' WHERE `ID`=1029; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 018 - Twisting Nether' WHERE `ID`=1030; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 019 - Twisting Nether' WHERE `ID`=1031; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 020 - Twisting Nether' WHERE `ID`=1032; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 021 - Twisting Nether' WHERE `ID`=1033; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 022 - Twisting Nether' WHERE `ID`=1034; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Corpse Location 023 - Twisting Nether' WHERE `ID`=1035; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Portal Plateau - Nagrand' WHERE `ID`=1037; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, Elemental Plateau - Nagrand' WHERE `ID`=1038; +UPDATE `graveyard_zone` SET `Comment`='Nagrand, SW Graveyard - Nagrand' WHERE `ID`=1039; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Throne of Kil''Jaedan - Hellfire Peninsula' WHERE `ID`=1040; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Dark Portal - Hellfire Peninsula' WHERE `ID`=1041; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Bone Wastes GY' WHERE `ID`=1042; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Harborage GY - Zangarmarsh' WHERE `ID`=1043; +UPDATE `graveyard_zone` SET `Comment`='Zangarmarsh, Sporeggar GY - Zangarmarsh' WHERE `ID`=1044; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm, Stormspire GY - Netherstorm' WHERE `ID`=1045; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm, Area 52 GY - Netherstorm' WHERE `ID`=1046; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon Valley, Shadowmoon Village GY - Shadowmoon Valley' WHERE `ID`=1047; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon Valley, Wildhammer GY - Shadowmoon Valley' WHERE `ID`=1048; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Sylvanaar GY - Blade''s Edge Mountains' WHERE `ID`=1049; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Thunderlord GY - Blade''s Edge Mountains' WHERE `ID`=1050; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Skettis GY - Terokkar Forest' WHERE `ID`=1051; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 005 - Twisting Nether' WHERE `ID`=1052; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 006 - Twisting Nether' WHERE `ID`=1053; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 007 - Twisting Nether' WHERE `ID`=1054; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 008 - Twisting Nether' WHERE `ID`=1055; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 009 - Twisting Nether' WHERE `ID`=1056; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 010 - Twisting Nether' WHERE `ID`=1057; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 011 - Twisting Nether' WHERE `ID`=1058; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 012 - Twisting Nether' WHERE `ID`=1059; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 013 - Twisting Nether' WHERE `ID`=1060; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 014 - Twisting Nether' WHERE `ID`=1061; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 015 - Twisting Nether' WHERE `ID`=1062; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 016 - Twisting Nether' WHERE `ID`=1063; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 017 - Twisting Nether' WHERE `ID`=1064; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 018 - Twisting Nether' WHERE `ID`=1065; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 019 - Twisting Nether' WHERE `ID`=1066; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 020 - Twisting Nether' WHERE `ID`=1067; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 021 - Twisting Nether' WHERE `ID`=1068; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 022 - Twisting Nether' WHERE `ID`=1069; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon, Corpse Location 023 - Twisting Nether' WHERE `ID`=1070; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 000 - Twisting Nether' WHERE `ID`=1072; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 001 - Twisting Nether' WHERE `ID`=1073; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 002 - Twisting Nether' WHERE `ID`=1074; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 003 - Twisting Nether' WHERE `ID`=1075; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 004 - Twisting Nether' WHERE `ID`=1076; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 005 - Twisting Nether' WHERE `ID`=1077; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 006 - Twisting Nether' WHERE `ID`=1078; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 007 - Twisting Nether' WHERE `ID`=1079; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 008 - Twisting Nether' WHERE `ID`=1080; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 009 - Twisting Nether' WHERE `ID`=1081; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 010 - Twisting Nether' WHERE `ID`=1082; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 011 - Twisting Nether' WHERE `ID`=1083; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 012 - Twisting Nether' WHERE `ID`=1084; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 013 - Twisting Nether' WHERE `ID`=1085; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 014 - Twisting Nether' WHERE `ID`=1086; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 015 - Twisting Nether' WHERE `ID`=1087; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 016 - Twisting Nether' WHERE `ID`=1088; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 017 - Twisting Nether' WHERE `ID`=1089; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 018 - Twisting Nether' WHERE `ID`=1090; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 019 - Twisting Nether' WHERE `ID`=1091; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 020 - Twisting Nether' WHERE `ID`=1092; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 021 - Twisting Nether' WHERE `ID`=1093; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 022 - Twisting Nether' WHERE `ID`=1094; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 023 - Twisting Nether' WHERE `ID`=1095; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 024 - Twisting Nether' WHERE `ID`=1096; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 025 - Twisting Nether' WHERE `ID`=1097; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 026 - Twisting Nether' WHERE `ID`=1098; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 027 - Twisting Nether' WHERE `ID`=1099; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 028 - Twisting Nether' WHERE `ID`=1100; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 029 - Twisting Nether' WHERE `ID`=1101; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Corpse Location 030 - Twisting Nether' WHERE `ID`=1102; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 000 - Twisting Nether' WHERE `ID`=1134; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 001 - Twisting Nether' WHERE `ID`=1135; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 002 - Twisting Nether' WHERE `ID`=1136; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 003 - Twisting Nether' WHERE `ID`=1137; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 004 - Twisting Nether' WHERE `ID`=1138; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 005 - Twisting Nether' WHERE `ID`=1139; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 006 - Twisting Nether' WHERE `ID`=1140; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 007 - Twisting Nether' WHERE `ID`=1141; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 008 - Twisting Nether' WHERE `ID`=1142; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 009 - Twisting Nether' WHERE `ID`=1143; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 010 - Twisting Nether' WHERE `ID`=1144; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 011 - Twisting Nether' WHERE `ID`=1145; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 012 - Twisting Nether' WHERE `ID`=1146; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 013 - Twisting Nether' WHERE `ID`=1147; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 014 - Twisting Nether' WHERE `ID`=1148; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 015 - Twisting Nether' WHERE `ID`=1149; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 016 - Twisting Nether' WHERE `ID`=1150; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 017 - Twisting Nether' WHERE `ID`=1151; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 018 - Twisting Nether' WHERE `ID`=1152; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 019 - Twisting Nether' WHERE `ID`=1153; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 020 - Twisting Nether' WHERE `ID`=1154; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 021 - Twisting Nether' WHERE `ID`=1155; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 022 - Twisting Nether' WHERE `ID`=1156; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 023 - Twisting Nether' WHERE `ID`=1157; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 024 - Twisting Nether' WHERE `ID`=1158; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 025 - Twisting Nether' WHERE `ID`=1159; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 026 - Twisting Nether' WHERE `ID`=1160; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 027 - Twisting Nether' WHERE `ID`=1161; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 028 - Twisting Nether' WHERE `ID`=1162; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 029 - Twisting Nether' WHERE `ID`=1163; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 030 - Twisting Nether' WHERE `ID`=1164; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 031 - Twisting Nether' WHERE `ID`=1165; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 032 - Twisting Nether' WHERE `ID`=1166; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 033 - Twisting Nether' WHERE `ID`=1167; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 034 - Twisting Nether' WHERE `ID`=1168; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 035 - Twisting Nether' WHERE `ID`=1169; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 036 - Twisting Nether' WHERE `ID`=1170; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 037 - Twisting Nether' WHERE `ID`=1171; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 038 - Twisting Nether' WHERE `ID`=1172; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 039 - Twisting Nether' WHERE `ID`=1173; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 040 - Twisting Nether' WHERE `ID`=1174; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 041 - Twisting Nether' WHERE `ID`=1175; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 042 - Twisting Nether' WHERE `ID`=1176; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 043 - Twisting Nether' WHERE `ID`=1177; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 044 - Twisting Nether' WHERE `ID`=1178; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 045 - Twisting Nether' WHERE `ID`=1179; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 046 - Twisting Nether' WHERE `ID`=1180; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 047 - Twisting Nether' WHERE `ID`=1181; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 048 - Twisting Nether' WHERE `ID`=1182; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 049 - Twisting Nether' WHERE `ID`=1183; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 050 - Twisting Nether' WHERE `ID`=1184; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 051 - Twisting Nether' WHERE `ID`=1185; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 052 - Twisting Nether' WHERE `ID`=1186; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 053 - Twisting Nether' WHERE `ID`=1187; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 054 - Twisting Nether' WHERE `ID`=1188; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 055 - Twisting Nether' WHERE `ID`=1189; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 056 - Twisting Nether' WHERE `ID`=1190; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 057 - Twisting Nether' WHERE `ID`=1191; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 058 - Twisting Nether' WHERE `ID`=1192; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 059 - Twisting Nether' WHERE `ID`=1193; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 060 - Twisting Nether' WHERE `ID`=1194; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 061 - Twisting Nether' WHERE `ID`=1195; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 062 - Twisting Nether' WHERE `ID`=1196; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 063 - Twisting Nether' WHERE `ID`=1197; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 064 - Twisting Nether' WHERE `ID`=1198; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 065 - Twisting Nether' WHERE `ID`=1199; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 066 - Twisting Nether' WHERE `ID`=1200; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 067 - Twisting Nether' WHERE `ID`=1201; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 068 - Twisting Nether' WHERE `ID`=1202; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 069 - Twisting Nether' WHERE `ID`=1203; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 070 - Twisting Nether' WHERE `ID`=1204; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 071 - Twisting Nether' WHERE `ID`=1205; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 072 - Twisting Nether' WHERE `ID`=1206; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 073 - Twisting Nether' WHERE `ID`=1207; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 074 - Twisting Nether' WHERE `ID`=1208; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 075 - Twisting Nether' WHERE `ID`=1209; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 076 - Twisting Nether' WHERE `ID`=1210; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 077 - Twisting Nether' WHERE `ID`=1211; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 078 - Twisting Nether' WHERE `ID`=1212; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 079 - Twisting Nether' WHERE `ID`=1213; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 080 - Twisting Nether' WHERE `ID`=1214; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 081 - Twisting Nether' WHERE `ID`=1215; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 082 - Twisting Nether' WHERE `ID`=1216; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 083 - Twisting Nether' WHERE `ID`=1217; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 084 - Twisting Nether' WHERE `ID`=1218; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 085 - Twisting Nether' WHERE `ID`=1219; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 086 - Twisting Nether' WHERE `ID`=1220; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 087 - Twisting Nether' WHERE `ID`=1221; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 088 - Twisting Nether' WHERE `ID`=1222; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 089 - Twisting Nether' WHERE `ID`=1223; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 090 - Twisting Nether' WHERE `ID`=1224; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 091 - Twisting Nether' WHERE `ID`=1225; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 092 - Twisting Nether' WHERE `ID`=1226; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 093 - Twisting Nether' WHERE `ID`=1227; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 094 - Twisting Nether' WHERE `ID`=1228; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 095 - Twisting Nether' WHERE `ID`=1229; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 096 - Twisting Nether' WHERE `ID`=1230; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 097 - Twisting Nether' WHERE `ID`=1231; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 098 - Twisting Nether' WHERE `ID`=1232; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 099 - Twisting Nether' WHERE `ID`=1233; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 100 - Twisting Nether' WHERE `ID`=1234; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 101 - Twisting Nether' WHERE `ID`=1235; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 102 - Twisting Nether' WHERE `ID`=1236; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 103 - Twisting Nether' WHERE `ID`=1237; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 104 - Twisting Nether' WHERE `ID`=1238; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm - Corpse Catcher 105 - Twisting Nether' WHERE `ID`=1239; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Force Camps (Alliance) - Hellfire Peninsula' WHERE `ID`=1240; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Evergrove GY' WHERE `ID`=1241; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, North Ridge GY - Blade''s Edge Mountains' WHERE `ID`=1242; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, West Ridge GY - Blade''s Edge Mountains' WHERE `ID`=1243; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, East Ridge GY - Blade''s Edge Mountains' WHERE `ID`=1244; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm, Cosmowrench GY' WHERE `ID`=1247; +UPDATE `graveyard_zone` SET `Comment`='Hellfire Peninsula, Spinebreaker GY - Hellfire Peninsula' WHERE `ID`=1248; +UPDATE `graveyard_zone` SET `Comment`='Tanaris, CoT GY' WHERE `ID`=1249; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon Valley, Altar GY - Shadowmoon Valley' WHERE `ID`=1250; +UPDATE `graveyard_zone` SET `Comment`='Shadowmoon Valley, Sanctum GY - Shadowmoon Valley' WHERE `ID`=1251; +UPDATE `graveyard_zone` SET `Comment`='Netherstorm, Kirin''Var GY - Netherstorm' WHERE `ID`=1252; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Toshley GY - Blade''s Edge Mountains' WHERE `ID`=1253; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, Raven Wood GY - Blade''s Edge Mountains' WHERE `ID`=1254; +UPDATE `graveyard_zone` SET `Comment`='Blade''s Edge, NE Ridge GY - Blade''s Edge Mountains' WHERE `ID`=1255; +UPDATE `graveyard_zone` SET `Comment`='Silverpine Forest, South GY - Silverpine Forest' WHERE `ID`=1256; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Ogre GY - Terokkar Forest' WHERE `ID`=1257; +UPDATE `graveyard_zone` SET `Comment`='Black Temple, Alliance GY - Black Temple' WHERE `ID`=1261; +UPDATE `graveyard_zone` SET `Comment`='Black Temple, Horde GY - Black Temple' WHERE `ID`=1262; +UPDATE `graveyard_zone` SET `Comment`='Dustwallow Marsh, Tabetha''s GY - Dustwallow Marsh' WHERE `ID`=1264; +UPDATE `graveyard_zone` SET `Comment`='Dustwallow Marsh, Mudsprocket GY - Onyxia''s Lair' WHERE `ID`=1265; +UPDATE `graveyard_zone` SET `Comment`='Dustwallow Marsh, Mudsprocket GY - Dustwallow Marsh' WHERE `ID`=1265; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, Northwest GY - Howling Fjord' WHERE `ID`=1266; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, Tuskarr GY - Howling Fjord' WHERE `ID`=1267; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, Island GY - Howling Fjord' WHERE `ID`=1268; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, Central GY - Howling Fjord' WHERE `ID`=1269; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, North GY - Howling Fjord' WHERE `ID`=1270; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, Vengance GY - Howling Fjord' WHERE `ID`=1271; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, Southeast GY - Howling Fjord' WHERE `ID`=1272; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, South Beach GY - Howling Fjord' WHERE `ID`=1273; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, South GY - Howling Fjord' WHERE `ID`=1274; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, Valgarde GY - Howling Fjord' WHERE `ID`=1275; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, Northeast GY - Howling Fjord' WHERE `ID`=1276; +UPDATE `graveyard_zone` SET `Comment`='Un''Goro Crater, Central GY - Un''Goro Crater' WHERE `ID`=1277; +UPDATE `graveyard_zone` SET `Comment`='Un''Goro Crater, Marshal''s GY - Un''Goro Crater' WHERE `ID`=1278; +UPDATE `graveyard_zone` SET `Comment`='Stonetalon Mountains, Charred Vale GY - Stonetalon Mountains' WHERE `ID`=1279; +UPDATE `graveyard_zone` SET `Comment`='Stonetalon Mountains, Peak GY - Stonetalon Mountains' WHERE `ID`=1280; +UPDATE `graveyard_zone` SET `Comment`='Tanaris, Pirate GY - Tanaris' WHERE `ID`=1281; +UPDATE `graveyard_zone` SET `Comment`='Tanaris, Central GY - Tanaris' WHERE `ID`=1282; +UPDATE `graveyard_zone` SET `Comment`='Winterspring, South GY - Winterspring' WHERE `ID`=1283; +UPDATE `graveyard_zone` SET `Comment`='Winterspring, West GY - Winterspring' WHERE `ID`=1284; +UPDATE `graveyard_zone` SET `Comment`='Western Plaguelands, Central GY - Western Plaguelands' WHERE `ID`=1286; +UPDATE `graveyard_zone` SET `Comment`='Searing Gorge, SE GY - Searing Gorge' WHERE `ID`=1287; +UPDATE `graveyard_zone` SET `Comment`='Badlands, South GY - Badlands' WHERE `ID`=1288; +UPDATE `graveyard_zone` SET `Comment`='The Barrens, South GY - Southern Barrens' WHERE `ID`=1289; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Tuskar GY - Borean Tundra' WHERE `ID`=1290; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Razorthorn Rise GY - Terokkar Forest' WHERE `ID`=1291; +UPDATE `graveyard_zone` SET `Comment`='Isle of Quel''Danas, Staging Area GY - Isle of Quel''Danas' WHERE `ID`=1292; +UPDATE `graveyard_zone` SET `Comment`='Isle of Quel''Danas, Staging Area GY - Magisters'' Terrace' WHERE `ID`=1293; +UPDATE `graveyard_zone` SET `Comment`='Isle of Quel''Danas, Staging Area GY - Sunwell Plateau' WHERE `ID`=1293; +UPDATE `graveyard_zone` SET `Comment`='Terokkar Forest, Lake Jorune GY - Terokkar Forest' WHERE `ID`=1298; +UPDATE `graveyard_zone` SET `Comment`='Grizzly Hills, Vileprey GY - Grizzly Hills' WHERE `ID`=1300; +UPDATE `graveyard_zone` SET `Comment`='Grizzly Hills, Amberpine GY - Grizzly Hills' WHERE `ID`=1301; +UPDATE `graveyard_zone` SET `Comment`='Grizzly Hills, Westfall GY - Grizzly Hills' WHERE `ID`=1302; +UPDATE `graveyard_zone` SET `Comment`='Grizzly Hills, Eastern GY - Grizzly Hills' WHERE `ID`=1303; +UPDATE `graveyard_zone` SET `Comment`='Grizzly Hills, Northwestern GY - Grizzly Hills' WHERE `ID`=1304; +UPDATE `graveyard_zone` SET `Comment`='Grizzly Hills, Southwestern GY - Grizzly Hills' WHERE `ID`=1305; +UPDATE `graveyard_zone` SET `Comment`='Grizzly Hills, Central GY - Grizzly Hills' WHERE `ID`=1306; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Northeastern GY - Dragonblight' WHERE `ID`=1307; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Wintergarde GY - Naxxramas' WHERE `ID`=1308; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Wintergarde GY - Dragonblight' WHERE `ID`=1308; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Forsaken East GY - Naxxramas' WHERE `ID`=1309; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Agmar''s Hammer GY - Dragonblight' WHERE `ID`=1310; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Star''s Rest GY - Dragonblight' WHERE `ID`=1311; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Moa''ki Harbor GY - Dragonblight' WHERE `ID`=1312; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Borean Border GY - Dragonblight' WHERE `ID`=1313; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Wyrmrest GY - Dragonblight' WHERE `ID`=1314; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Wrathgate Horde GY - Dragonblight' WHERE `ID`=1315; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Wrathgate Alliance GY - Dragonblight' WHERE `ID`=1316; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Warsong Hold GY - Borean Tundra' WHERE `ID`=1317; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Riplash GY - Borean Tundra' WHERE `ID`=1318; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Coldarra GY' WHERE `ID`=1319; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Amber Ledge GY - Borean Tundra' WHERE `ID`=1320; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Fizzcrank GY - Borean Tundra' WHERE `ID`=1321; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Bor''Gorok GY - Borean Tundra' WHERE `ID`=1322; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Death''s Stand GY - Borean Tundra' WHERE `ID`=1323; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Taunka''le GY - Borean Tundra' WHERE `ID`=1324; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Coast of Echoes GY - Borean Tundra' WHERE `ID`=1325; +UPDATE `graveyard_zone` SET `Comment`='Borean Tundra, Valiance Keep GY - Borean Tundra' WHERE `ID`=1326; +UPDATE `graveyard_zone` SET `Comment`='Wintergrasp, Fortress (West) - Wintergrasp' WHERE `ID`=1328; +UPDATE `graveyard_zone` SET `Comment`='Wintergrasp, Siege Factory (Defense NE) - Wintergrasp' WHERE `ID`=1329; +UPDATE `graveyard_zone` SET `Comment`='Wintergrasp, Siege Factory (Defense NW) - Wintergrasp' WHERE `ID`=1330; +UPDATE `graveyard_zone` SET `Comment`='Wintergrasp, Horde Starting Area - Wintergrasp' WHERE `ID`=1331; +UPDATE `graveyard_zone` SET `Comment`='Wintergrasp, Alliance Starting Area - Wintergrasp' WHERE `ID`=1332; +UPDATE `graveyard_zone` SET `Comment`='Wintergrasp, Siege Factory (SE) - Wintergrasp' WHERE `ID`=1333; +UPDATE `graveyard_zone` SET `Comment`='Wintergrasp, Siege Factory (SW) - Wintergrasp' WHERE `ID`=1334; +UPDATE `graveyard_zone` SET `Comment`='Sholazar Basin, South GY - Sholazar Basin' WHERE `ID`=1336; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, Utgarde GY - Utgarde Pinnacle' WHERE `ID`=1337; +UPDATE `graveyard_zone` SET `Comment`='Sholazar Basin, Nesingwary GY - Sholazar Basin' WHERE `ID`=1341; +UPDATE `graveyard_zone` SET `Comment`='Sholazar Basin, Central GY - Sholazar Basin' WHERE `ID`=1342; +UPDATE `graveyard_zone` SET `Comment`='Sholazar Basin, Northwest GY - Sholazar Basin' WHERE `ID`=1343; +UPDATE `graveyard_zone` SET `Comment`='Sholazar Basin, Northeast GY - Sholazar Basin' WHERE `ID`=1344; +UPDATE `graveyard_zone` SET `Comment`='Sholazar Basin, East GY - Sholazar Basin' WHERE `ID`=1345; +UPDATE `graveyard_zone` SET `Comment`='Zul''Drak, Western GY - Zul''Drak' WHERE `ID`=1352; +UPDATE `graveyard_zone` SET `Comment`='Zul''Drak, Northwestern GY - Zul''Drak' WHERE `ID`=1353; +UPDATE `graveyard_zone` SET `Comment`='Zul''Drak, Southwestern GY - Zul''Drak' WHERE `ID`=1354; +UPDATE `graveyard_zone` SET `Comment`='Zul''Drak, Southern GY - Zul''Drak' WHERE `ID`=1355; +UPDATE `graveyard_zone` SET `Comment`='Zul''Drak, Central GY - Zul''Drak' WHERE `ID`=1356; +UPDATE `graveyard_zone` SET `Comment`='Zul''Drak, Southeastern GY - Zul''Drak' WHERE `ID`=1357; +UPDATE `graveyard_zone` SET `Comment`='Zul''Drak, Gun''Drak GY - Zul''Drak' WHERE `ID`=1358; +UPDATE `graveyard_zone` SET `Comment`='Crystalsong Forest, Dalaran GY' WHERE `ID`=1359; +UPDATE `graveyard_zone` SET `Comment`='Ebon Hold GY - Chapter I - Plaguelands: The Scarlet Enclave' WHERE `ID`=1360; +UPDATE `graveyard_zone` SET `Comment`='Eastern Plaguelands, Ebon Hold GY - Eastern Plaguelands' WHERE `ID`=1369; +UPDATE `graveyard_zone` SET `Comment`='Ebon Hold GY - Chapter II/III - Plaguelands: The Scarlet Enclave' WHERE `ID`=1370; +UPDATE `graveyard_zone` SET `Comment`='Ebon Hold GY - Chapter IV - Plaguelands: The Scarlet Enclave' WHERE `ID`=1371; +UPDATE `graveyard_zone` SET `Comment`='Un''Goro Crater, Shaper''s Terrace GY - Un''Goro Crater' WHERE `ID`=1372; +UPDATE `graveyard_zone` SET `Comment`='Howling Fjord, Utgarde 2 GY - Utgarde Keep' WHERE `ID`=1376; +UPDATE `graveyard_zone` SET `Comment`='Sholazar Basin, Stormwright GY - Sholazar Basin' WHERE `ID`=1379; +UPDATE `graveyard_zone` SET `Comment`='Crystalsong Forest, Alliance GY - Crystalsong Forest' WHERE `ID`=1380; +UPDATE `graveyard_zone` SET `Comment`='Icecrown, Argent Vanguard - Icecrown' WHERE `ID`=1381; +UPDATE `graveyard_zone` SET `Comment`='Storm Peaks, Valkyrion GY - The Storm Peaks' WHERE `ID`=1383; +UPDATE `graveyard_zone` SET `Comment`='Storm Peaks, Ulduar GY - The Storm Peaks' WHERE `ID`=1384; +UPDATE `graveyard_zone` SET `Comment`='Storm Peaks, Temple East GY - The Storm Peaks' WHERE `ID`=1385; +UPDATE `graveyard_zone` SET `Comment`='Storm Peaks, Temple West GY - The Storm Peaks' WHERE `ID`=1387; +UPDATE `graveyard_zone` SET `Comment`='Storm Peaks, Frostfield GY - The Storm Peaks' WHERE `ID`=1388; +UPDATE `graveyard_zone` SET `Comment`='Crystalsong Forest, West GY - Crystalsong Forest' WHERE `ID`=1391; +UPDATE `graveyard_zone` SET `Comment`='Crystalsong Forest, Horde GY - Crystalsong Forest' WHERE `ID`=1392; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Naxxramas GY - Dragonblight' WHERE `ID`=1393; +UPDATE `graveyard_zone` SET `Comment`='Dragonblight, Icemist GY - Dragonblight' WHERE `ID`=1394; +UPDATE `graveyard_zone` SET `Comment`='Icecrown Glacier, Quarry GY - Icecrown' WHERE `ID`=1395; +UPDATE `graveyard_zone` SET `Comment`='Icecrown Glacier, Vrykul Central GY - Icecrown' WHERE `ID`=1396; +UPDATE `graveyard_zone` SET `Comment`='Icecrown Glacier, Northeast Ice GY - Icecrown' WHERE `ID`=1397; +UPDATE `graveyard_zone` SET `Comment`='Grizzly Hills, Drak''tharon GY - Grizzly Hills' WHERE `ID`=1398; +UPDATE `graveyard_zone` SET `Comment`='Storm Peaks, Temple of the Makers GY - The Storm Peaks' WHERE `ID`=1400; +UPDATE `graveyard_zone` SET `Comment`='Storm Peaks, Snowdrift GY - The Storm Peaks' WHERE `ID`=1401; +UPDATE `graveyard_zone` SET `Comment`='Storm Peaks, Temple of Storms GY - The Storm Peaks' WHERE `ID`=1402; +UPDATE `graveyard_zone` SET `Comment`='Storm Peaks, K3 GY - The Storm Peaks' WHERE `ID`=1403; +UPDATE `graveyard_zone` SET `Comment`='Sholazar Basin, Frenzyheart GY - Sholazar Basin' WHERE `ID`=1404; +UPDATE `graveyard_zone` SET `Comment`='Eastern Plaguelands: Acherus - Eastern Plaguelands' WHERE `ID`=1405; +UPDATE `graveyard_zone` SET `Comment`='Icecrown Glacier, Jotunheim GY - Icecrown' WHERE `ID`=1407; +UPDATE `graveyard_zone` SET `Comment`='Storm Peaks, Foot Steppes GY - The Storm Peaks' WHERE `ID`=1408; +UPDATE `graveyard_zone` SET `Comment`='Undercity - Alliance - Wrath Gate - Tirisfal Glades' WHERE `ID`=1409; +UPDATE `graveyard_zone` SET `Comment`='Alterac Mountains - Central GY - Hillsbrad Foothills' WHERE `ID`=1411; +UPDATE `graveyard_zone` SET `Comment`='Winterspring, Wintersaber GY - Winterspring' WHERE `ID`=1416; +UPDATE `graveyard_zone` SET `Comment`='Winterspring, Crossroad GY - Winterspring' WHERE `ID`=1417; +UPDATE `graveyard_zone` SET `Comment`='Winterspring, Darkwhisper GY - Winterspring' WHERE `ID`=1418; +UPDATE `graveyard_zone` SET `Comment`='Azshara, Southern Azshara GY - Azshara' WHERE `ID`=1419; +UPDATE `graveyard_zone` SET `Comment`='Azshara, Bilgewater Harbor GY - Azshara' WHERE `ID`=1420; +UPDATE `graveyard_zone` SET `Comment`='Desolace, Ghost Walker Post GY - Desolace' WHERE `ID`=1421; +UPDATE `graveyard_zone` SET `Comment`='Desolace, Sar''theris Strand GY - Desolace' WHERE `ID`=1422; +UPDATE `graveyard_zone` SET `Comment`='Desolace, Mannoroc Coven GY - Desolace' WHERE `ID`=1423; +UPDATE `graveyard_zone` SET `Comment`='Desolace, Magram Village GY - Desolace' WHERE `ID`=1424; +UPDATE `graveyard_zone` SET `Comment`='Desolace, Roadside GY - Desolace' WHERE `ID`=1425; +UPDATE `graveyard_zone` SET `Comment`='Ashenvale, Shrine of Aessina GY - Ashenvale' WHERE `ID`=1426; +UPDATE `graveyard_zone` SET `Comment`='Ashenvale, Nightsong GY - Ashenvale' WHERE `ID`=1427; +UPDATE `graveyard_zone` SET `Comment`='Stonetalon Mountains, Windshear Crag GY - Stonetalon Mountains' WHERE `ID`=1428; +UPDATE `graveyard_zone` SET `Comment`='Stonetalon Mountains, Mirkfallon GY - Stonetalon Mountains' WHERE `ID`=1429; +UPDATE `graveyard_zone` SET `Comment`='The Barrens, Forgotten Pools - Northern Barrens' WHERE `ID`=1430; +UPDATE `graveyard_zone` SET `Comment`='The Barrens, North GY - Northern Barrens' WHERE `ID`=1431; +UPDATE `graveyard_zone` SET `Comment`='The Barrens, Raptor Grounds - Southern Barrens' WHERE `ID`=1432; +UPDATE `graveyard_zone` SET `Comment`='The Barrens, Central GY - Southern Barrens' WHERE `ID`=1433; +UPDATE `graveyard_zone` SET `Comment`='The Barrens, East GY - Northern Barrens' WHERE `ID`=1434; +UPDATE `graveyard_zone` SET `Comment`='Mulgore, Southeast GY - Mulgore' WHERE `ID`=1435; +UPDATE `graveyard_zone` SET `Comment`='Mulgore, Red Rocks GY - Mulgore' WHERE `ID`=1436; +UPDATE `graveyard_zone` SET `Comment`='Thousand Needles, Freewind Post GY (MOVED) - Thousand Needles' WHERE `ID`=1437; +UPDATE `graveyard_zone` SET `Comment`='Thousand Needles, Speed Barge GY (MOVED) - Thousand Needles' WHERE `ID`=1438; +UPDATE `graveyard_zone` SET `Comment`='Tanaris, Southwest GY - Tanaris' WHERE `ID`=1439; +UPDATE `graveyard_zone` SET `Comment`='Tanaris, Abyssal Sands GY - Tanaris' WHERE `ID`=1440; +UPDATE `graveyard_zone` SET `Comment`='Feralas, Ruins of Isildien GY - Feralas' WHERE `ID`=1441; +UPDATE `graveyard_zone` SET `Comment`='Feralas, Lower Wilds GY - Feralas' WHERE `ID`=1442; +UPDATE `graveyard_zone` SET `Comment`='Feralas, Twin Colossals GY - Feralas' WHERE `ID`=1443; +UPDATE `graveyard_zone` SET `Comment`='Silithus, Hive''Regal - Silithus' WHERE `ID`=1444; +UPDATE `graveyard_zone` SET `Comment`='Silithus, Twilight Base Camp - Silithus' WHERE `ID`=1445; +UPDATE `graveyard_zone` SET `Comment`='Arathi Highlands, Stromgarde - Arathi Highlands' WHERE `ID`=1446; +UPDATE `graveyard_zone` SET `Comment`='Hillsbrad Foothills, Thoradin''s Wall - Hillsbrad Foothills' WHERE `ID`=1447; +UPDATE `graveyard_zone` SET `Comment`='Eastern Plaguelands, Northdale - Eastern Plaguelands' WHERE `ID`=1448; +UPDATE `graveyard_zone` SET `Comment`='Eastern Plaguelands, Stratholme - Eastern Plaguelands' WHERE `ID`=1449; +UPDATE `graveyard_zone` SET `Comment`='Eastern Plaguelands, West GY - Eastern Plaguelands' WHERE `ID`=1450; +UPDATE `graveyard_zone` SET `Comment`='Western Plaguelands, Hearthglen - Eastern Plaguelands' WHERE `ID`=1451; +UPDATE `graveyard_zone` SET `Comment`='Hillsbrad Foothills, Hillsbrad Fields GY - Hillsbrad Foothills' WHERE `ID`=1452; +UPDATE `graveyard_zone` SET `Comment`='The Hinterlands, Seradane - The Hinterlands' WHERE `ID`=1453; +UPDATE `graveyard_zone` SET `Comment`='The Hinterlands, Shadra''Alor - The Hinterlands' WHERE `ID`=1454; +UPDATE `graveyard_zone` SET `Comment`='Wetlands, Sundown Marsh GY - Wetlands' WHERE `ID`=1455; +UPDATE `graveyard_zone` SET `Comment`='Wetlands, South Road GY - Wetlands' WHERE `ID`=1456; +UPDATE `graveyard_zone` SET `Comment`='Wetlands, Raptor Ridge GY - Wetlands' WHERE `ID`=1457; +UPDATE `graveyard_zone` SET `Comment`='AAA - Arena (Dev Test) - Stranglethorn Vale' WHERE `ID`=1458; +UPDATE `graveyard_zone` SET `Comment`='Stranglethorn Vale, Central GY - Stranglethorn Vale' WHERE `ID`=1459; +UPDATE `graveyard_zone` SET `Comment`='Stranglethorn Vale, Savage Coast GY - Stranglethorn Vale' WHERE `ID`=1460; +UPDATE `graveyard_zone` SET `Comment`='Duskwood, Central GY - Duskwood' WHERE `ID`=1461; +UPDATE `graveyard_zone` SET `Comment`='Westfall, Dagger Hills GY - Westfall' WHERE `ID`=1462; +UPDATE `graveyard_zone` SET `Comment`='Westfall, Longshore - Westfall' WHERE `ID`=1463; +UPDATE `graveyard_zone` SET `Comment`='Blasted Lands, Dark Portal GY - Blasted Lands' WHERE `ID`=1464; +UPDATE `graveyard_zone` SET `Comment`='Swamp of Sorrows, Alliance Hub GY - Swamp of Sorrows' WHERE `ID`=1465; +UPDATE `graveyard_zone` SET `Comment`='Swamp of Sorrows, Splinterspear GY - Swamp of Sorrows' WHERE `ID`=1466; +UPDATE `graveyard_zone` SET `Comment`='Redridge Mountains, Stonewatch - Redridge Mountains' WHERE `ID`=1467; +UPDATE `graveyard_zone` SET `Comment`='Elwynn Forest, Tower of Azora - Elwynn Forest' WHERE `ID`=1468; +UPDATE `graveyard_zone` SET `Comment`='Burning Steppes, Blackrock Mountain - Blackrock Mountain' WHERE `ID`=1469; +UPDATE `graveyard_zone` SET `Comment`='Burning Steppes, East GY - Burning Steppes' WHERE `ID`=1470; +UPDATE `graveyard_zone` SET `Comment`='Dun Morogh, Iceflow Lake - Dun Morogh' WHERE `ID`=1471; +UPDATE `graveyard_zone` SET `Comment`='Dun Morogh, East Road - Dun Morogh' WHERE `ID`=1472; +UPDATE `graveyard_zone` SET `Comment`='Loch Modan, The Loch - Loch Modan' WHERE `ID`=1473; +UPDATE `graveyard_zone` SET `Comment`='Wintergrasp, Fortress Graveyard (Indoors) - Vault of Archavon' WHERE `ID`=1474; +UPDATE `graveyard_zone` SET `Comment`='Icecrown, Argent Tournament GY' WHERE `ID`=1478; +UPDATE `graveyard_zone` SET `Comment`='Icecrown Glacier, Citadel GY' WHERE `ID`=1682; diff --git a/sql/updates/world/3.3.5/2016_05_26_00_world.sql b/sql/updates/world/3.3.5/2016_05_26_00_world.sql new file mode 100644 index 00000000000..39e16aba39e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_26_00_world.sql @@ -0,0 +1,19 @@ +-- Localized name for gameobject entry 1638 and 2035 (English name "Deathknell") +DELETE FROM `gameobject_template_locale` WHERE `entry` IN (1638,2035); +INSERT INTO `gameobject_template_locale` (`entry`,`locale`,`name`,`castBarCaption`,`VerifiedBuild`) VALUES +(1638,'deDE','Todesend','',0), +(1638,'esES','Camposanto','',0), +(1638,'esMX','Camposanto','',0), +(1638,'frFR','Le Glas','',0), +(1638,'koKR','죽음의 종소리 마을','',0), +(1638,'ruRU','Похоронный Звон','',0), +(1638,'zhCN','丧钟镇','',0), +(1638,'zhTW','喪鐘鎮','',0), +(2035,'deDE','Todesend','',0), +(2035,'esES','Camposanto','',0), +(2035,'esMX','Camposanto','',0), +(2035,'frFR','Le Glas','',0), +(2035,'koKR','죽음의 종소리 마을','',0), +(2035,'ruRU','Похоронный Звон','',0), +(2035,'zhCN','丧钟镇','',0), +(2035,'zhTW','喪鐘鎮','',0); diff --git a/sql/updates/world/3.3.5/2016_05_26_01_world.sql b/sql/updates/world/3.3.5/2016_05_26_01_world.sql new file mode 100644 index 00000000000..343bc6f0a17 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_26_01_world.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=18794 AND `id`=34; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(18794,0,34,0,1,0,100,0,0,0,0,0,11,32958,0,0,0,0,0,1,0,0,0,0,0,0,0,"Cabal Ritualist - Out of Combat - Cast 'Crystal Channel'"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=32958; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,32958,0,0,31,0,3,18793,0,0,"","Crystal Channel – Effect 0 - Cast only on Invisible Target 18793."); diff --git a/sql/updates/world/3.3.5/2016_05_26_02_world.sql b/sql/updates/world/3.3.5/2016_05_26_02_world.sql new file mode 100644 index 00000000000..4cacdc73a47 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_26_02_world.sql @@ -0,0 +1,2 @@ +-- Fix bounding radius for 'Ice Tomb' +UPDATE `creature_model_info` SET `BoundingRadius`=7.5, `CombatReach`=6 WHERE `DisplayID`=30890; diff --git a/sql/updates/world/3.3.5/2016_05_26_03_world.sql b/sql/updates/world/3.3.5/2016_05_26_03_world.sql new file mode 100644 index 00000000000..f3a419e9bd0 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_26_03_world.sql @@ -0,0 +1,21 @@ +-- Pathing for Clam Master K Entry: 25800 'TDB FORMAT' +SET @NPC := 114803; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=2342.325,`position_y`=5050.552,`position_z`=-21.01424 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,2342.325,5050.552,-21.01424,0,0,0,0,100,0), -- 06:32:15 +(@PATH,2,2338.003,5044.308,-22.64446,0,0,0,0,100,0), -- 06:32:22 +(@PATH,3,2336.804,5029.821,-26.94789,0,0,0,0,100,0), -- 06:32:27 +(@PATH,4,2341.884,5018.865,-30.1459,0,0,0,0,100,0), -- 06:32:33 +(@PATH,5,2348.352,5002.221,-30.94783,0,0,0,0,100,0), -- 06:32:40 +(@PATH,6,2349.925,4993.154,-32.16956,0,0,0,0,100,0), -- 06:32:45 +(@PATH,7,2354.025,4983.295,-33.4639,0,0,0,0,100,0), -- 06:32:50 +(@PATH,8,2357.896,4977.057,-33.84595,0,0,0,0,100,0), -- 06:32:53 +(@PATH,9,2353.561,4983.914,-33.77616,0,0,0,0,100,0), -- 06:33:00 +(@PATH,10,2349.806,4994.94,-31.05927,0,0,0,0,100,0), -- 06:33:04 +(@PATH,11,2346.473,5009.516,-31.52969,0,0,0,0,100,0), -- 06:33:08 +(@PATH,12,2338.316,5025.714,-28.18582,0,0,0,0,100,0), -- 06:33:13 +(@PATH,13,2334.683,5038.239,-23.58451,0,0,0,0,100,0); -- 06:33:20 diff --git a/sql/updates/world/3.3.5/2016_05_26_04_world.sql b/sql/updates/world/3.3.5/2016_05_26_04_world.sql new file mode 100644 index 00000000000..00ae15af434 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_26_04_world.sql @@ -0,0 +1,27 @@ +-- Pathing for Houndmaster Grebmar Entry: 9319 'TDB FORMAT' +SET @NPC := 46284; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=594.4585,`position_y`=-178.3237,`position_z`=-84.23994 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,594.4585,-178.3237,-84.23994,0,0,0,0,100,0), +(@PATH,2,598.2085,-180.3237,-84.23994,0,0,0,0,100,0), +(@PATH,3,601.2085,-182.3237,-84.23994,0,0,0,0,100,0), +(@PATH,4,605.1209,-184.6363,-84.23941,0,0,0,0,100,0), +(@PATH,5,608.8709,-188.1363,-84.23941,0,0,0,0,100,0), +(@PATH,6,612.06,-191.0042,-84.23634,0,0,0,0,100,0), +(@PATH,7,611.81,-184.0042,-84.23634,0,0,0,0,100,0), +(@PATH,8,611.5181,-178.7817,-84.23982,0,0,0,0,100,0), +(@PATH,9,606.7681,-173.7817,-84.23982,0,0,0,0,100,0), +(@PATH,10,601.315,-167.8244,-84.23912,0,0,0,0,100,0), +(@PATH,11,594.565,-168.8244,-84.23912,0,0,0,0,100,0), +(@PATH,12,585.8881,-169.7204,-84.24162,0,0,0,0,100,0), +(@PATH,13,582.8881,-176.2204,-84.24162,0,0,0,0,100,0), +(@PATH,14,579.5485,-182.8368,-84.24379,0,0,0,0,100,0), +(@PATH,15,583.2985,-189.3368,-84.24379,0,0,0,0,100,0), +(@PATH,16,586.8497,-196.4224,-84.24238,0,0,0,0,100,0), +(@PATH,17,587.5997,-187.1724,-84.24238,0,0,0,0,100,0), +(@PATH,18,591.6155,-181.6407,-84.24092,0,0,0,0,100,0), +(@PATH,19,594.4585,-178.3237,-84.23994,0,0,0,0,100,0); diff --git a/sql/updates/world/3.3.5/2016_05_26_05_world.sql b/sql/updates/world/3.3.5/2016_05_26_05_world.sql new file mode 100644 index 00000000000..192ea0893d3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_26_05_world.sql @@ -0,0 +1,3 @@ +-- DB/Creature: Add flag guard Deathguard Elite +-- creature is a guard (Will ignore feign death and vanish) +UPDATE `creature_template` SET `flags_extra`=32768 WHERE `entry`=7980; diff --git a/sql/updates/world/3.3.5/2016_05_26_06_world_335.sql b/sql/updates/world/3.3.5/2016_05_26_06_world_335.sql new file mode 100644 index 00000000000..0b8903f527d --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_26_06_world_335.sql @@ -0,0 +1,5 @@ +-- Anvilrage Overseer SAI (3.3.5 Only) +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=8889; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8889 AND `source_type`=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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(8889, 0, 0, 0, 0, 0, 100, 2, 4000, 6000, 7000, 9000, 11, 15580, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Anvilrage Overseer - In Combat - Cast \'Strike\' (Normal Dungeon)'); diff --git a/sql/updates/world/3.3.5/2016_05_26_07_world.sql b/sql/updates/world/3.3.5/2016_05_26_07_world.sql new file mode 100644 index 00000000000..0749f080581 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_26_07_world.sql @@ -0,0 +1,5 @@ +-- DB/Creature: Add missing Ornery Plainstrider SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=3245; +DELETE FROM `smart_scripts` WHERE `entryorguid`=3245 AND `source_type`=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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(3245, 0, 0, 0, 2, 0, 100, 1, 0, 40, 0, 0, 11, 3019, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ornery Plainstrider - Between 0-40% Health - Cast \'Frenzy\' (No Repeat)'); diff --git a/sql/updates/world/3.3.5/2016_05_26_08_world.sql b/sql/updates/world/3.3.5/2016_05_26_08_world.sql new file mode 100644 index 00000000000..af1d7a3d515 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_26_08_world.sql @@ -0,0 +1 @@ +UPDATE `quest_offer_reward` SET `RewardText`= "I can't believe it! It was the gnome all along... I should have known!" WHERE `id` = 9531; diff --git a/sql/updates/world/3.3.5/2016_05_26_09_world.sql b/sql/updates/world/3.3.5/2016_05_26_09_world.sql new file mode 100644 index 00000000000..0ad751a01d4 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_26_09_world.sql @@ -0,0 +1,14 @@ +-- Mebok Mizzyrix, NPC entry 3446 +SET @ENTRY := 3446; + +DELETE FROM `creature_text` WHERE `entry`= @ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(@ENTRY,0,0,"Now let's try it...", 12,0,100, 7,0,0,2078,0,'Mebok Mizzyrix on Quest 865 rewarded'), +(@ENTRY,1,0,"Ugh! That's terrible!",12,0,100,33,0,0,2079,0,'Mebok Mizzyrix on Quest 865 rewarded'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry`= @ENTRY; + +DELETE FROM `smart_scripts` WHERE `source_type`= 0 AND `entryorguid`= @ENTRY; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,1,20,0,100,0,865,0,0,0,1,0,4000,0,0,0,0,1,0,0,0,0,0,0,0,'Mebok Mizzyrix - on Quest 865 Rewarded - Say Line 0'), +(@ENTRY,0,1,0,61,0,100,0, 0,0,0,0,1,1,4000,0,0,0,0,1,0,0,0,0,0,0,0,'Mebok Mizzyrix - on Quest 865 Rewarded - Say Line 1'); diff --git a/sql/updates/world/3.3.5/2016_05_28_00_world.sql b/sql/updates/world/3.3.5/2016_05_28_00_world.sql new file mode 100644 index 00000000000..602f7834cd8 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_28_00_world.sql @@ -0,0 +1 @@ +UPDATE `creature_addon` SET `auras`=55701 WHERE `guid`=100071; diff --git a/sql/updates/world/3.3.5/2016_05_28_01_world.sql b/sql/updates/world/3.3.5/2016_05_28_01_world.sql new file mode 100644 index 00000000000..0ce802fd363 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_28_01_world.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_ioc_seaforium_blast_credit'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(66676, 'spell_ioc_seaforium_blast_credit'), +(66672, 'spell_ioc_seaforium_blast_credit'); diff --git a/sql/updates/world/3.3.5/2016_05_28_02_world_335.sql b/sql/updates/world/3.3.5/2016_05_28_02_world_335.sql new file mode 100644 index 00000000000..b0db2e7c4e9 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_28_02_world_335.sql @@ -0,0 +1,240 @@ +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN(19671,19672,19673); +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(19671,19672,19673,19666) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(1966600,1967200,1967100,1967101,1967102,1967103,1967104,1967105,1967106,1967107,1967108) AND `source_type`=9; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=18311 AND `source_type`=0 AND `id`=5; +DELETE FROM `smart_scripts` WHERE `entryorguid`=18312 AND `source_type`=0 AND `id`=6; +DELETE FROM `smart_scripts` WHERE `entryorguid`=18313 AND `source_type`=0 AND `id`=16; +DELETE FROM `smart_scripts` WHERE `entryorguid`=18315 AND `source_type`=0 AND `id`=5; +DELETE FROM `smart_scripts` WHERE `entryorguid`=19307 AND `source_type`=0 AND `id`=4; + +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18311, 0, 5, 0, 54, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 19671, 0, 0, 0, 0, 0, 0, 'Ethereal Crypt Raider - On Just Summoned - Start Attack'), +(18312, 0, 6, 0, 54, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 19671, 0, 0, 0, 0, 0, 0, 'Ethereal Spellbinder - On Just Summoned - Start Attack'), +(18313, 0, 16, 0, 54, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 19671, 0, 0, 0, 0, 0, 0, 'Ethereal Sorcerer - On Just Summoned - Start Attack'), +(18315, 0, 5, 0, 54, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 19671, 0, 0, 0, 0, 0, 0, 'Ethereal Theurgist - On Just Summoned - Start Attack'), +(19307, 0, 4, 0, 54, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 19671, 0, 0, 0, 0, 0, 0, 'Nexus Terror - On Just Summoned - Start Attack'), +(19672, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 80, 1967200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Consortium Laborer - On Just Summoned - Run Script'), +(19673, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 80, 1967200, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Consortium Engineer - On Just Summoned - Run Script'), +(19672, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Consortium Laborer - On Just Summoned - Set Emote State'), +(19673, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Consortium Engineer - On Just Summoned - Set Emote State'), +(19666, 0, 1, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, 1966600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - On Just Summoned - Run Script'), +(19666, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 19671, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - On Death - Set Data'), +(19671, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, 1967100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Just Summoned - Run Script'), +(19671, 0, 1, 2, 19, 0, 100, 1, 10218, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Quest Accept Ancient Spirit - Store Targetlist'), +(19671, 0, 2, 0, 61, 0, 100, 0, 10218, 0, 0, 0, 80, 1967101, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Quest Accept Ancient Spirit - Store Targetlist'), +(19671, 0, 3, 0, 40, 0, 100, 0, 1, 1967101, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP2 (Path 2) - Say Line 4'), +(19671, 0, 4, 0, 40, 0, 100, 0, 2, 1967101, 0, 0, 80, 1967102, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP4 (Path 2) - Run Script 3'), +(19671, 0, 5, 0, 40, 0, 100, 0, 9, 1967101, 0, 0, 80, 1967103, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP11 (Path 2) - Run Script 4'), +(19671, 0, 6, 7, 40, 0, 100, 0, 16, 1967101, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP18 (Path 2) - Say Line 8'), +(19671, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 54, 7000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP18 (Path 2) - Pause WP'), +(19671, 0, 8, 20, 40, 0, 100, 0, 17, 1967101, 0, 0, 1, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP19 (Path 2) - Say Line 9'), +(19671, 0, 9, 0, 40, 0, 100, 0, 20, 1967101, 0, 0, 80, 1967104, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP22 (Path 2) - Run Script 5'), +(19671, 0, 10, 0, 40, 0, 100, 0, 31, 1967101, 0, 0, 80, 1967108, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP29 (Path 2) - Run Script 9'), +(19671, 0, 13, 0, 40, 0, 100, 0, 36, 1967101, 0, 0, 80, 1967105, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP34 (Path 2) - Run Script 6'), +(19671, 0, 14, 0, 40, 0, 100, 0, 43, 1967101, 0, 0, 80, 1967106, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP41 (Path 2) - Run Script 7'), +(19671, 0, 15, 0, 6, 0, 100, 0, 0, 0, 0, 0, 6, 10218, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Death - Fail Quest'), +(19671, 0, 16, 0, 38, 0, 100, 0, 1, 1, 0, 0, 80, 1967107, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Data Set - Run Script 8'), +(19671, 0, 17, 0, 0, 1, 100, 0, 2000, 3000, 3000, 5000, 11, 13901, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - IC (Phase 1) - Cast Arcane Bolt'), +(19671, 0, 18, 0, 9, 1, 100, 0, 0, 10, 15000, 23000, 11, 22938, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Range (Phase 1) - Cast Arcane Explosion'), +(19671, 0, 19, 0, 4, 1, 100, 0, 0, 0, 0, 0, 11, 33839, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Agro (Phase 1) - Cast Vir aani Concentration'), +(19671, 0, 20, 0, 61, 0, 100, 0, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Link - Turn run on'), +(19671, 0, 22, 0, 40, 0, 100, 0, 5, 1967101, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP5 Turn run on'), +(19671, 0, 23, 0, 40, 0, 100, 0, 12, 1967101, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On reached WP12 - Turn run off'), +(19671, 0, 24, 0, 40, 0, 100, 0, 15, 1967101, 0, 0, 59, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On reached WP15 - Turn run off'), +(19671, 0, 25, 0, 40, 0, 100, 0, 4, 1967101, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reached WP4 - Set NPC Flags'), +(19671, 0, 26, 0, 25, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - On Reset - Set Phase 1'), +(1966600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - Script - Say Line 0'), +(1966600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - Script - Set Unit Flags'), +(1966600, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 1, 19666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - Script - Start WP'), +(1966600, 9, 3, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - Script - Say Line 1'), +(1966600, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 14, 0, 0, 0, 0, 0, 19, 19671, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - Script - Say Line 14 on Cryo-Engineer Sha heen'), +(1966600, 9, 5, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - Script - Say Line 2'), +(1966600, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - Script - Set Unit Flags'), +(1966600, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 2, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - Script - Set Hostile'), +(1966600, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - Script - Set Aggressive'), +(1966600, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 19671, 0, 0, 0, 0, 0, 0, 'Shadow Lord Xiraxis - Script - Start Attack'), +(1967200, 9, 0, 0, 0, 0, 100, 0, 500, 500, 0, 0, 11, 12980, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Consortium Laborer - Script - Cast Simple Teleport'), +(1967100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Set Phase 2'), +(1967100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Rempve NPC Flags'), +(1967100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 33839, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Cast Vir aani Concentration'), +(1967100, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Say Line 0'), +(1967100, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Say Line 1'), +(1967100, 9, 5, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 53, 0, 1967100, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Start WP'), +(1967100, 9, 6, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Say Line 1'), +(1967100, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 17, 234, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Set Emote State'), +(1967100, 9, 8, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Set Emote State'), +(1967100, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Set NPC Flags'), +(1967100, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 107, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Summon Group 4'), +(1967100, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Disable Auto Attack'), +(1967100, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script - Set Phase 1'), +(1967101, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 2 - Say Line 3'), +(1967101, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 2, 495, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 2 - Set Faction'), +(1967101, 9, 2, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 53, 0, 1967101, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 2 - Start WP'), +(1967102, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Set Phase 2'), +(1967102, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Disable Combat Movement'), +(1967102, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Set Passive'), +(1967102, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 54, 10000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Pause WP'), +(1967102, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 17, 233, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Set Emotestate'), +(1967102, 9, 5, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Set Emotestate'), +(1967102, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Enable Combat Movement'), +(1967102, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Set Phase 1'), +(1967102, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Say Line 5'), +(1967102, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Set Defensive'), +(1967102, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 3 - Turn Run Off'), +(1967103, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Set Phase 2'), +(1967103, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Disable Combat Movemet'), +(1967103, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Set Passive'), +(1967103, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0.2617994, 'Cryo-Engineer Sha heen - Script 4 - Set Orientation'), +(1967103, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 54, 10000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Pause WP'), +(1967103, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 17, 233, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Set Emotestate'), +(1967103, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Say Line 6'), +(1967103, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 107, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Summon Group 0'), +(1967103, 9, 8, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Say Line 6'), +(1967103, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Set Emotestate'), +(1967103, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Set Phase 1'), +(1967103, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Set Defensive'), +(1967103, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Enable Combat Movemet'), +(1967103, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Set Run Off'), +(1967104, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Set Phase 2'), +(1967104, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Set Passive'), +(1967104, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Disable Combat Movement'), +(1967104, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0.1396263, 'Cryo-Engineer Sha heen - Script 5 - Set Orientation'), +(1967104, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 54, 10000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Pause WP'), +(1967104, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 17, 233, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Set Emotestate'), +(1967104, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 107, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 4 - Summon Group 1'), +(1967104, 9, 7, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Set Emotestate'), +(1967104, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Enable Combat Movement'), +(1967104, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Set Phase 1'), +(1967104, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Set Defensive'), +(1967104, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Turn run off'), +(1967105, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Set Phase 2'), +(1967105, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Set Passive'), +(1967105, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Disable Combat Movement'), +(1967105, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 6.091199, 'Cryo-Engineer Sha heen - Script 6 - Set Orientation'), +(1967105, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 54, 30000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Pause WP'), +(1967105, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 17, 233, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Set Emotestate'), +(1967105, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Say Line 11'), +(1967105, 9, 7, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Set Emotestate'), +(1967105, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 8, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Set Defensive'), +(1967105, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Set Phase 1'), +(1967105, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Enable Combat Movement'), +(1967105, 9, 11, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Say Line 12'), +(1967105, 9, 12, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 6 - Say Line 13'), +(1967105, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 5 - Say Line 11'), +(1967106, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 54, 10000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 7 - Pause WP'), +(1967106, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 107, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 7 - Summon Group 3'), +(1967106, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 7 - Summon Group 3'), +(1967107, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 15, 10218, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 8 - Complete Quest'), +(1967107, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 15, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 8 - Say Line 15'), +(1967107, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 8 - Say Line 16'), +(1967107, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 15000, 0, 0, 0, 0, 0, 9, 19672, 0, 100, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 8 - Despawn'), +(1967107, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 15000, 0, 0, 0, 0, 0, 9, 19673, 0, 100, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 8 - Despawn'), +(1967107, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 15000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 8 - Despawn'), +(1967108, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 9 - Say Line 10'), +(1967108, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 107, 5, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 9 - Summon Group 5'), +(1967108, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 107, 2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 9 - SUmmon Group 2'), +(1967108, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cryo-Engineer Sha heen - Script 9 - Turn Run On'); + + + + + +DELETE FROM `creature_text` WHERE `entry`=19666 AND `groupid`>0 AND `id`=0; + +DELETE FROM `creature_text` WHERE `entry`=19671; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(19671, 0, 0, '%s checks to make sure his body is intact.', 16, 0, 100, 0, 0, 0, 17228, 0, 'Cryo-Engineer Sha heen'), +(19671, 1, 0, 'You made it! Well done, $r. Now if you''ll excuse me, I have to get the rest of our crew inside.', 12, 0, 100, 1, 0, 0, 17229, 0, 'Cryo-Engineer Sha heen'), +(19671, 2, 0, '%s expertly manipulates the control panel.', 16, 0, 100, 0, 0, 0, 17230, 0, 'Cryo-Engineer Sha heen'), +(19671, 3, 0, 'Let''s not waste any time! Take anything that isn''t nailed down to the floor and teleport directly to Stormspire! Chop chop!', 12, 0, 100, 1, 0, 0, 17231, 0, 'Cryo-Engineer Sha heen'), +(19671, 4, 0, 'This should''t take very long. Just watch my back as I empty these nether collectors.', 12, 0, 100, 1, 0, 0, 17246, 0, 'Cryo-Engineer Sha heen'), +(19671, 5, 0, 'Fantastic! Let''s move on, shall we?', 12, 0, 100, 1, 0, 0, 17248, 0, 'Cryo-Engineer Sha heen'), +(19671, 6, 0, 'Looking at these energy levels, Shaffar was set to make a killing!', 12, 0, 100, 1, 0, 0, 17249, 0, 'Cryo-Engineer Sha heen'), +(19671, 7, 0, 'That should do it...', 12, 0, 100, 1, 0, 0, 17251, 0, 'Cryo-Engineer Sha heen'), +(19671, 8, 0, 'Hrm, now where is the next collector?', 12, 0, 100, 1, 0, 0, 17252, 0, 'Cryo-Engineer Sha heen'), +(19671, 9, 0, 'Ah, there it is. Follow me, fleshling.', 12, 0, 100, 1, 0, 0, 17254, 0, 'Cryo-Engineer Sha heen'), +(19671, 10, 0, 'What do we have here? I thought you said the area was secure? This is now the third attack? If we make it out of here, I will definitely be deducting this from your reward. Now don''t just stand there, destroy them so I can get to that collector.', 12, 0, 100, 1, 0, 0, 17256, 0, 'Cryo-Engineer Sha heen'), +(19671, 11, 0, 'We''re close to the exit. I''ll let you rest for about thirty seconds, but then we''re out of here.', 12, 0, 100, 1, 0, 0, 17258, 0, 'Cryo-Engineer Sha heen'), +(19671, 12, 0, 'Are you ready to go?', 12, 0, 100, 1, 0, 0, 17260, 0, 'Cryo-Engineer Sha heen'), +(19671, 13, 0, 'Ok break time is OVER. Let''s go!', 12, 0, 100, 1, 0, 0, 17261, 0, 'Cryo-Engineer Sha heen'), +(19671, 14, 0, 'Oh really? And what might that be?', 12, 0, 100, 1, 0, 0, 17263, 0, 'Cryo-Engineer Sha heen'), +(19671, 15, 0, 'He was right, you know. I''ll have to take that tag-line for my own… It''s not like he''ll have a use for it anymore!', 12, 0, 100, 1, 0, 0, 17264, 0, 'Cryo-Engineer Sha heen'), +(19671, 16, 0, 'Thanks and good luck!', 12, 0, 100, 1, 0, 0, 17265, 0, 'Cryo-Engineer Sha heen'), +(19666, 1, 0, 'Bravo! Bravo! Good show… I couldn''t convince you to work for me, could I? No, I suppose the needless slaughter of my employees might negatively impact your employment application.', 14, 0, 100, 0, 0, 0, 17241, 0, 'Shadow Lord Xiraxis'), +(19666, 2, 0, 'Your plan was a good one, Sha''heen, and you would have gotten away with it if not for one thing...', 12, 0, 100, 327, 0, 0, 17243, 0, 'Shadow Lord Xiraxis'), +(19666, 3, 0, 'Never underestimate the other ethereal''s greed!', 12, 0, 100, 1, 0, 0, 17244, 0, 'Shadow Lord Xiraxis'); + +DELETE FROM `waypoints` WHERE `entry` IN(1967100,1967101,19666); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(19666, 1, -68.40214, -19.7878, -0.9529961, 'Shadow Lord Xiraxis'), +(19666, 2, -67.83204, -48.33409, -0.9552881, 'Shadow Lord Xiraxis'), +(19666, 3, -67.78506, -75.71738, -0.9389226, 'Shadow Lord Xiraxis'), +(1967100, 1, -354.443, -65.6078, -0.9741728, 'Cryo-Engineer Sha heen'), +(1967101, 1, -366.7985 ,-72.95073 ,-0.1383943, 'Cryo-Engineer Sha heen'), +(1967101, 2, -370.5689 ,-73.03973 ,0.7014256, 'Cryo-Engineer Sha heen'), +(1967101, 3, -363.5802 ,-72.44846 ,-0.9587624, 'Cryo-Engineer Sha heen'), +(1967101, 4, -371.8158 ,-86.79798 ,-0.958762, 'Cryo-Engineer Sha heen'), +(1967101, 5, -372.8067 ,-115.3902 ,-0.9587386, 'Cryo-Engineer Sha heen'), +(1967101, 6, -373.5266 ,-149.3968 ,-0.9787918, 'Cryo-Engineer Sha heen'), +(1967101, 7, -382.3674 ,-163.1939 ,-0.9493812, 'Cryo-Engineer Sha heen'), +(1967101, 8, -378.7728 ,-164.4431 ,-0.1216383, 'Cryo-Engineer Sha heen'), +(1967101, 9, -375.3421 ,-164.1911 ,0.7157794, 'Cryo-Engineer Sha heen'), +(1967101, 10, -377.8079 ,-164.3831 ,0.09416915, 'Cryo-Engineer Sha heen'), +(1967101, 11, -381.8036 ,-167.0499 ,-0.9587629, 'Cryo-Engineer Sha heen'), +(1967101, 12, -374.2704 ,-195.67 ,-0.9876157, 'Cryo-Engineer Sha heen'), +(1967101, 13, -371.0522 ,-221.1154 ,-0.957548, 'Cryo-Engineer Sha heen'), +(1967101, 14, -357.3525 ,-224.1118 ,-0.9591594, 'Cryo-Engineer Sha heen'), +(1967101, 15, -327.2074 ,-223.1011 ,-0.958185, 'Cryo-Engineer Sha heen'), +(1967101, 16, -317.373 ,-220.9346 ,-0.953047, 'Cryo-Engineer Sha heen'), +(1967101, 17, -302.139 ,-201.6109 ,-0.9018583, 'Cryo-Engineer Sha heen'), +(1967101, 18, -291.9838 ,-190.2706 ,-0.9321695, 'Cryo-Engineer Sha heen'), +(1967101, 19, -272.2044 ,-165.1142 ,-1.962067, 'Cryo-Engineer Sha heen'), +(1967101, 20, -260.8738 ,-158.3423 ,-1.20301, 'Cryo-Engineer Sha heen'), +(1967101, 21, -260.8686 ,-160.7864 ,-1.202524, 'Cryo-Engineer Sha heen'), +(1967101, 22, -246.7021 ,-160.2355 ,-0.9534798, 'Cryo-Engineer Sha heen'), +(1967101, 23, -238.4669 ,-174.3582 ,-0.953746, 'Cryo-Engineer Sha heen'), +(1967101, 24, -237.8523 ,-188.0232 ,-0.9510807, 'Cryo-Engineer Sha heen'), +(1967101, 25, -218.7323 ,-207.1752 ,0.04777823, 'Cryo-Engineer Sha heen'), +(1967101, 26, -207.835, -211.8027, 1.176572, 'Cryo-Engineer Sha heen'), +(1967101, 27, -195.085, -217.8027, 0.4265722, 'Cryo-Engineer Sha heen'), +(1967101, 28, -190.835, -219.5527, -0.5734278, 'Cryo-Engineer Sha heen'), +(1967101, 29, -183.5801 ,-223.2924 ,-0.9551997, 'Cryo-Engineer Sha heen'), +(1967101, 30, -147.253 ,-222.2017 ,-0.7159179, 'Cryo-Engineer Sha heen'), +(1967101, 31, -114.5249 ,-221.926 ,0.4013355, 'Cryo-Engineer Sha heen'), +(1967101, 32, -89.60782 ,-222.852 ,-0.5187308, 'Cryo-Engineer Sha heen'), +(1967101, 33, -67.58874 ,-223.6537 ,-0.405379, 'Cryo-Engineer Sha heen'), +(1967101, 34, -56.8648 ,-223.1615 ,0.02639319, 'Cryo-Engineer Sha heen'), +(1967101, 35, -20.5673 ,-224.0332 ,0.5167194, 'Cryo-Engineer Sha heen'), +(1967101, 36, -12.58579 ,-222.5067 ,1.786049, 'Cryo-Engineer Sha heen'), +(1967101, 37, -29.4036 ,-223.2606 ,0.01665334, 'Cryo-Engineer Sha heen'), +(1967101, 38, -53.08645 ,-219.6514 ,0.2137061, 'Cryo-Engineer Sha heen'), +(1967101, 39, -64.90977 ,-210.4424 ,-0.292502, 'Cryo-Engineer Sha heen'), +(1967101, 40, -66.85043 ,-179.138 ,-1.307152, 'Cryo-Engineer Sha heen'), +(1967101, 41, -67.13032 ,-133.7884 ,-1.034937, 'Cryo-Engineer Sha heen'), +(1967101, 42, -67.16659 ,-112.9431 ,-0.7426757, 'Cryo-Engineer Sha heen'), +(1967101, 43, -67.0159 ,-87.2571 ,-1.276771, 'Cryo-Engineer Sha heen'); + +DELETE FROM `creature_summon_groups` WHERE `summonerId`=19671; +INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`) VALUES +(19671, 0, 0, 18312, -370.7318, -134.3002, -0.9618373, 4.572175, 6, 60000), +(19671, 0, 0, 18315, -374.4721, -194.6065, -0.9929181, 1.529337, 6, 60000), +(19671, 0, 0, 18312, -369.9984, -194.276, -0.9705924, 1.623082, 6, 60000), +(19671, 0, 0, 18315, -375.2323, -133.8772, -0.968161, 4.922849, 6, 60000), +(19671, 0, 1, 18311, -238.7594, -186.9294, -0.9510754, 1.999699, 6, 60000), +(19671, 0, 1, 18313, -225.0942, -172.4903, -1.055191, 2.76561, 6, 60000), +(19671, 0, 1, 18313, -288.748, -178.6396, -0.5875124, 0.6407801, 6, 60000), +(19671, 0, 1, 18313, -283.9628, -188.2815, -0.3590364, 0.9258388, 6, 60000), +(19671, 0, 2, 19307, -13.30131, -220.9802, 0.8455964, 3.126897, 6, 60000), +(19671, 0, 3, 19666, -36.36667, 1.317166, -0.9543327, 3.285605, 6, 60000), +(19671, 0, 4, 19673, -386.8928, -60.84314, -0.8754397, 3.368485, 6, 60000), +(19671, 0, 4, 19672, -386.847, -72.83556, -0.8754347, 2.635447, 6, 60000), +(19671, 0, 4, 19673, -375.7296, -88.8795, -0.8754307, 3.385939, 6, 60000), +(19671, 0, 4, 19672, -360.1015, -67.55888, -0.8754327, 0.2094395, 6, 60000), +(19671, 0, 4, 19673, -358.8426, -74.0751, -0.8726627, 0.6806784, 6, 60000), +(19671, 0, 4, 19672, -370.8748, -82.77579, -0.8754287, 0.08726646, 6, 60000), +(19671, 0, 4, 19673, -374.6943, -63.50459, -0.8754317, 0.5759587, 6, 60000), +(19671, 0, 4, 19672, -358.8426, -74.0751, -0.8726627, 0.6806784, 6, 60000), +(19671, 0, 4, 19673, -375.8055, -86.87415, -0.9587618, 1.608575, 6, 60000), +(19671, 0, 4, 19673, -386.8928, -60.84314, -0.8754397, 3.368485, 6, 60000), +(19671, 0, 5, 19307, -47.63387, -223.8948, -0.1993168, 3.440399, 6, 60000); diff --git a/sql/updates/world/3.3.5/2016_05_28_03_world.sql b/sql/updates/world/3.3.5/2016_05_28_03_world.sql new file mode 100644 index 00000000000..69ee8803260 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_28_03_world.sql @@ -0,0 +1,25 @@ +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=22139; +UPDATE `smart_scripts` SET `target_param1`=22139, `target_param2`=100, `action_param2`=64 WHERE `entryorguid`=22138 AND `source_type`=0 AND `id`=0; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=38469 AND `ElseGroup`=0; +DELETE FROM `gameobject` WHERE `id`=184750; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (22137); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22137) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22138) AND `source_type`=0 AND id IN(1,2); + +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(22137, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 75, 38457, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,0,'Summoned Old God - On reset - Add Transparency'), +(22137, 0, 1, 0, 1, 8, 100, 0, 0, 0, 240000, 240000, 50, 184750, 240, 0, 0, 0, 0, 8, 0, 0, 0, -4161.259277, 1985.773804, 59.094448, 6.210211,'Summoned Old God - OOC (Phase 4) - spawn spell focus'), +(22137, 0, 2, 0, 38, 0, 100, 0, 1, 1, 0, 0, 23, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'Summoned Old God - On Data Set 1 1 - Increment Phase'), +(22137, 0, 3, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'Summoned Old God - On Data Set 2 2 - Set Phase 0'), +(22137, 0, 4, 0, 11, 0, 100, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'Summoned Old God - On Spawn Set Active'), +(22137, 0, 5, 6, 8, 0, 100, 0, 38482, 0, 0, 0, 33, 22137, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0,'Summoned Old God - On Spellhit - Give Kill Credit'), +(22137, 0, 6, 7, 61, 0, 0, 0, 0, 0, 0, 0, 11, 37281, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'Summoned Old God - On Spellhit - Cast Infernal Oversouls Wrath'), +(22137, 0, 7, 8, 61, 0, 0, 0, 0, 0, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 19, 22146, 0, 0, 0, 0, 0, 0,'Summoned Old God - On Spellhit - Despawn Summoning Voidstorm'), +(22138, 0, 1, 0, 6, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 22137, 100, 0, 0, 0, 0,0,'Dark Conclave Ritualist - On Death - Set Data'), +(22138, 0, 2, 0, 11, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 22137, 100, 0, 0, 0, 0,0,'Dark Conclave Ritualist - On Respawn - Set Data'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=37281 AND `SourceId`=0 AND `ElseGroup`IN(2,3); + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 37281, 0, 2, 31, 0, 3, 22137, 0, 0, 0, 0, '', 'Infernal Oversouls Wrath targets Summoned Old God'), +(13, 1, 37281, 0, 3, 31, 0, 3, 22146, 0, 0, 0, 0, '', 'Infernal Oversouls Wrath targets Summoning Voidstorm'); diff --git a/sql/updates/world/3.3.5/2016_05_30_00_world.sql b/sql/updates/world/3.3.5/2016_05_30_00_world.sql new file mode 100644 index 00000000000..b6fdc5f3b89 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `ExclusiveGroup` = 11211 WHERE `ID` IN (11211,11214,11215); diff --git a/sql/updates/world/3.3.5/2016_05_30_01_world.sql b/sql/updates/world/3.3.5/2016_05_30_01_world.sql new file mode 100644 index 00000000000..a18ffe23ed5 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID`=11261; diff --git a/sql/updates/world/3.3.5/2016_05_30_02_world.sql b/sql/updates/world/3.3.5/2016_05_30_02_world.sql new file mode 100644 index 00000000000..2742f9c8ca9 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_02_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `quest_template_addon` WHERE `MaxLevel` = 0 AND `AllowableClasses` = 0 AND `SourceSpellID` = 0 AND `PrevQuestID` = 0 AND `NextQuestID` = 0 AND `ExclusiveGroup` = 0 AND `RewardMailTemplateID` = 0 AND `RewardMailDelay` = 0 AND `RequiredSkillID` = 0 AND `RequiredSkillPoints` = 0 AND `RequiredMinRepFaction` = 0 AND `RequiredMaxRepFaction` = 0 AND `RequiredMinRepValue` = 0 AND `RequiredMaxRepValue` = 0 AND `ProvidedItemCount` = 0 AND `SpecialFlags` = 0; diff --git a/sql/updates/world/3.3.5/2016_05_30_03_world.sql b/sql/updates/world/3.3.5/2016_05_30_03_world.sql new file mode 100644 index 00000000000..eeaa7bf6d7b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_03_world.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=50232; +INSERT INTO `conditions` VALUES +(13, 1, 50232, 0, 1, 31, 0, 3, 28236, 0, 0, 0, 0, "", "Searing Wrath target can be Azure Ring Captain"), +(13, 1, 50232, 0, 2, 31, 0, 3, 27638, 0, 0, 0, 0, "", "Searing Wrath target can be Azure Ring Guardian"), +(13, 1, 50232, 0, 3, 31, 0, 3, 28276, 0, 0, 0, 0, "", "Searing Wrath target can be Greater Lay Whelp"), +(13, 1, 50232, 0, 4, 31, 0, 3, 27656, 0, 0, 0, 0, "", "Searing Wrath target can be Eregos"); diff --git a/sql/updates/world/3.3.5/2016_05_30_04_world.sql b/sql/updates/world/3.3.5/2016_05_30_04_world.sql new file mode 100644 index 00000000000..0fc9244c100 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_04_world.sql @@ -0,0 +1,2 @@ +-- Change the Text <Name> to $N +UPDATE `quest_request_items` SET `CompletionText`= "Back so soon? In case I didn\'t make myself clear we need you to kill 10 Stonesplinter Shaman and 10 Stonesplinter Bonesnappers, $N. Now go get\'em, Trogg-Slayer!" WHERE `id` = 263; diff --git a/sql/updates/world/3.3.5/2016_05_30_05_world.sql b/sql/updates/world/3.3.5/2016_05_30_05_world.sql new file mode 100644 index 00000000000..7209b3d8745 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_05_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `quest_template_addon` SET `SpecialFlags` = 1 WHERE `Id` = 13845; +DELETE FROM `conditions` WHERE `SourceEntry` = 46004 AND `SourceTypeOrReferenceId` = 10; diff --git a/sql/updates/world/3.3.5/2016_05_30_06_world.sql b/sql/updates/world/3.3.5/2016_05_30_06_world.sql new file mode 100644 index 00000000000..5c81fcd5419 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_06_world.sql @@ -0,0 +1,12 @@ +-- +DELETE FROM `gameobject_queststarter` WHERE `quest` IN (4722,4723,4725,4727,4728,4730,4731,4732,4733); +INSERT INTO `gameobject_queststarter` VALUES +(176190, 4722), +(175233, 4723), +(176197, 4725), +(176196, 4727), +(175226, 4728), +(175227, 4730), +(176198, 4731), +(176191, 4732), +(175230, 4733); diff --git a/sql/updates/world/3.3.5/2016_05_30_07_world.sql b/sql/updates/world/3.3.5/2016_05_30_07_world.sql new file mode 100644 index 00000000000..c8130b023af --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_07_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `achievement_criteria_data` SET `value1`=8 WHERE `criteria_id`=4958 AND `type`=8; diff --git a/sql/updates/world/3.3.5/2016_05_30_08_world.sql b/sql/updates/world/3.3.5/2016_05_30_08_world.sql new file mode 100644 index 00000000000..134617b0380 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_08_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=17071 AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(17071,0,0,0,20,0,100,0,9312,0,0,0,80,1707100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Technician Zhanaa - On Quest 'The Emitter' Finished - Run Script"); diff --git a/sql/updates/world/3.3.5/2016_05_30_09_world.sql b/sql/updates/world/3.3.5/2016_05_30_09_world.sql new file mode 100644 index 00000000000..3ec588d0982 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_09_world.sql @@ -0,0 +1,5 @@ +UPDATE `quest_template_addon` SET `SpecialFlags`=2 WHERE `ID`=1144; +UPDATE `creature_template` SET `flags_extra`=64 WHERE `entry` IN(28111,28112,28078,28079,23667, 23668, 32669,28844,28843,24199,24198,23564); +UPDATE `reference_loot_template` SET `GroupId`=2 WHERE `Entry`=34203 AND `Item`=43959; +UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid`=2735500 AND `source_type`=9 AND `id`=5 AND `link`=0; +UPDATE `gameobject` SET `position_x`=5445.057129, `position_y`=4908.831543, `position_z`=-189.508224 WHERE `guid`=99748; diff --git a/sql/updates/world/3.3.5/2016_05_30_10_world.sql b/sql/updates/world/3.3.5/2016_05_30_10_world.sql new file mode 100644 index 00000000000..b8dbe0b94a6 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_30_10_world.sql @@ -0,0 +1,26 @@ +DELETE FROM `gameobject_loot_template` WHERE `Entry`=26782; +INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(26782, 44724, 0, 100, 0, 1, 1, 1, 1, NULL), -- Everfrost Chip +(26782, 44725, 0, 19, 0, 1, 2, 1, 1, NULL), -- Everfrost Chip (Quest Starter) +(26782, 44729, 0, 81, 0, 1, 2, 1, 1, NULL); -- Everfrost Powder + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=4 AND `SourceGroup`=26782; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(4, 26782, 44724, 0, 1, 8, 0, 13420, 0, 0, 0, 0, 0, '', NULL), -- Everfrost Chip only drops if player is rewarded for ever frost, +(4, 26782, 44729, 0, 0, 9, 0, 13420, 0, 0, 1, 0, 0, '', NULL), -- Everfrost powder only drops if player has not taken or completed Everfrost, +(4, 26782, 44729, 0, 0, 8, 0, 13420, 0, 0, 1, 0, 0, '', NULL), -- Everfrost powder only drops if player has not taken or completed Everfrost, +(4, 26782, 44725, 0, 0, 9, 0, 13420, 0, 0, 1, 0, 0, '', NULL), -- Everfrost Chip (Quest Starter) only drops if player has not taken or completed Everfrost, +(4, 26782, 44725, 0, 0, 8, 0, 13420, 0, 0, 1, 0, 0, '', NULL), -- Everfrost Chip (Quest Starter) only drops if player has not taken or completed Everfrost, +(4, 26782, 44725, 0, 0, 5, 0, 1119, 8, 0, 0, 0, 0, '', NULL); -- Everfrost Chip (Quest Starter) only drops if player is friendly with Sons of Hodir, + +UPDATE `quest_template_addon` SET `SpecialFlags`=1 WHERE `ID`=13421; + +DELETE FROM `creature_questender` WHERE `quest`=13421; +INSERT INTO `creature_questender` (`id`, `quest`) VALUES +(32594, 13421); + +DELETE FROM `creature_queststarter` WHERE `quest`=13421; +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(32594, 13421); + +UPDATE `quest_template_addon` SET `PrevQuestID`=13420 WHERE `ID`=13421; diff --git a/sql/updates/world/3.3.5/2016_05_31_00_world.sql b/sql/updates/world/3.3.5/2016_05_31_00_world.sql new file mode 100644 index 00000000000..29a29413167 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_00_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature` SET `position_x`= -3739.09, `position_y`= 5405.21, `position_z`=-3.33350, `orientation`=2.70103, `MovementType`=0, `spawndist`=0 WHERE `guid`=78837 AND `id`=22464; +UPDATE `creature` SET `position_x`= -3743.46, `position_y`= 5403.87, `position_z`=-3.33635, `orientation`=1.16950, `MovementType`=0, `spawndist`=0 WHERE `guid`=78838 AND `id`=22464; +UPDATE `creature` SET `position_x`= -3746.42, `position_y`= 5405.33, `position_z`=-3.33737, `orientation`=0.39587, `MovementType`=0, `spawndist`=0 WHERE `guid`=78839 AND `id`=22464; +UPDATE `creature` SET `position_x`= -3750.65, `position_y`= 5408.94, `position_z`=-3.33391, `orientation`=2.54786, `MovementType`=0, `spawndist`=0 WHERE `guid`=78840 AND `id`=22464; +UPDATE `creature` SET `position_x`= -3741.11, `position_y`= 5403.61, `position_z`=-3.33493, `orientation`=1.9117 WHERE `guid`=78818 AND `id`=22458; diff --git a/sql/updates/world/3.3.5/2016_05_31_01_world_335.sql b/sql/updates/world/3.3.5/2016_05_31_01_world_335.sql new file mode 100644 index 00000000000..2d92a9fc537 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_01_world_335.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry` IN (6545, 6546, 6547) AND `SourceTypeOrReferenceId` IN (19, 20); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 6545, 0, 0, 9, 0, 6543, 0, 0, 0, 0, 0, "", "Quest 'Warsong Runner Update' - Can accept if player has quest 'The Warsong Reports' in quest log"), +(20, 0, 6545, 0, 0, 9, 0, 6543, 0, 0, 0, 0, 0, "", "Quest 'Warsong Runner Update' - Can accept if player has quest 'The Warsong Reports' in quest log"), +(19, 0, 6546, 0, 0, 9, 0, 6543, 0, 0, 0, 0, 0, "", "Quest 'Warsong Outrider Update' - Can accept if player has quest 'The Warsong Reports' in quest log"), +(20, 0, 6546, 0, 0, 9, 0, 6543, 0, 0, 0, 0, 0, "", "Quest 'Warsong Outrider Update' - Can accept if player has quest 'The Warsong Reports' in quest log"), +(19, 0, 6547, 0, 0, 9, 0, 6543, 0, 0, 0, 0, 0, "", "Quest 'Warsong Scout Update' - Can accept if player has quest 'The Warsong Reports' in quest log"), +(20, 0, 6547, 0, 0, 9, 0, 6543, 0, 0, 0, 0, 0, "", "Quest 'Warsong Scout Update' - Can accept if player has quest 'The Warsong Reports' in quest log"); diff --git a/sql/updates/world/3.3.5/2016_05_31_02_world.sql b/sql/updates/world/3.3.5/2016_05_31_02_world.sql new file mode 100644 index 00000000000..09674385ab4 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_02_world.sql @@ -0,0 +1,19 @@ +-- +UPDATE `creature` SET `spawndist`=0, `MovementType`=0, `unit_flags`=537133824 WHERE `guid` IN (103024, 103025, 103026, 103027, 103028); + +DELETE FROM `creature_addon` WHERE `guid` IN (103024, 103025, 103026, 103027, 103028); +INSERT INTO `creature_addon` (`guid`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(103024, 0, 0x0, 0x1, '29266'), -- 25680 - 29266 - 29266 +(103025, 0, 0x0, 0x1, '29266'), -- 25680 - 29266 - 29266 +(103026, 0, 0x0, 0x1, '29266'), -- 25680 - 29266 - 29266 +(103027, 0, 0x0, 0x1, '29266'), -- 25680 - 29266 - 29266 +(103028, 0, 0x0, 0x1, '29266'); -- 25680 - 29266 - 29266 + +UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `id`=29546; + +DELETE FROM `creature_template_addon` WHERE `entry` IN (24196, 29546); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(24196, 0, 0x0, 0x1, '29266'), -- 24196 - 29266 +(29546, 0, 0x0, 0x1, '29266'); -- 29546 - 29266 + +DELETE FROM `creature_addon` WHERE `guid`=105491; diff --git a/sql/updates/world/3.3.5/2016_05_31_03_world.sql b/sql/updates/world/3.3.5/2016_05_31_03_world.sql new file mode 100644 index 00000000000..60c07d15735 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_03_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `conditions` SET `ConditionValue1`=11248, `Comment`='Winterskorn mobs drop item 33314 only if Quest 11248 has been rewarded' WHERE `SourceTypeOrReferenceId`=1 AND `SourceEntry`=33314; +UPDATE `conditions` SET `ConditionValue1`=11256, `Comment`='Winterskorn mobs drop item 33345 only if Quest 11256 has been rewarded' WHERE `SourceTypeOrReferenceId`=1 AND `SourceEntry`=33345; diff --git a/sql/updates/world/3.3.5/2016_05_31_04_world.sql b/sql/updates/world/3.3.5/2016_05_31_04_world.sql new file mode 100644 index 00000000000..d3ddfcfa05c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_04_world.sql @@ -0,0 +1,15 @@ +-- +DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5187, 5190); +INSERT INTO `areatrigger_scripts` VALUES +(5187, "SmartTrigger"), +(5190, "SmartTrigger"); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (5187, 5190) AND `source_type`=2; +INSERT INTO `smart_scripts` VALUES +(5187, 2, 0, 0, 46, 0, 100, 0, 0, 0, 0, 0, 62, 571, 0, 0, 0, 0, 0, 7, 0, 0, 0, 6150.7563, -1071.3817, 402.7154, 2.1916, "Areatrigger - On Trigger - Teleport"), +(5190, 2, 0, 0, 46, 0, 100, 0, 0, 0, 0, 0, 62, 571, 0, 0, 0, 0, 0, 7, 0, 0, 0, 6314.1860, -1758.2946, 457.0714, 1.6787, "Areatrigger - On Trigger - Teleport"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceId`=2 AND SourceEntry IN (5187, 5190); +INSERT INTO `conditions` VALUES +(22, 1, 5187, 2, 0, 8, 0, 12821, 0, 0, 0, 0, 0, "", "Event requires quest rewarded"), +(22, 1, 5190, 2, 0, 8, 0, 12821, 0, 0, 0, 0, 0, "", "Event requires quest rewarded"); diff --git a/sql/updates/world/3.3.5/2016_05_31_05_world.sql b/sql/updates/world/3.3.5/2016_05_31_05_world.sql new file mode 100644 index 00000000000..18bbf61baa4 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_05_world.sql @@ -0,0 +1,12 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `Id`=12836; + +DELETE FROM `conditions` WHERE `SourceEntry`=12828 AND `SourceTypeOrReferenceId` IN (19, 20); +INSERT INTO `conditions` VALUES +(19, 0, 12828, 0, 0, 8, 0, 12827, 0, 0, 0, 0, 0, "", "Show mark for quest 'Ample Inspiration' only if quest 'Reclaimed Rations' is rewarded"), +(20, 0, 12828, 0, 0, 8, 0, 12827, 0, 0, 0, 0, 0, "", "Can accept quest 'Ample Inspiration' only if quest 'Reclaimed Rations' is rewarded"); + +DELETE FROM `quest_template_addon` WHERE `ID` IN (12862, 13060); +INSERT INTO `quest_template_addon` (`ID`, `PrevQuestId`) VALUES +(12862, 12824), +(13060, 12824); diff --git a/sql/updates/world/3.3.5/2016_05_31_06_world.sql b/sql/updates/world/3.3.5/2016_05_31_06_world.sql new file mode 100644 index 00000000000..46d8b875c82 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_06_world.sql @@ -0,0 +1,10 @@ +-- +-- remove mis-spawned Mistbat (entry: 16353) +DELETE FROM `creature` WHERE `guid`=57016; + +-- remove one too many spawned Elder Springpaw (entry: 15651) +DELETE FROM `creature` WHERE `guid`=55946; + +-- set random movement and spawn distance to the common value for that creature +UPDATE `creature` SET `spawndist`=5, `MovementType`=1 WHERE `guid`=55942; +UPDATE `creature` SET `spawndist`=5, `MovementType`=1 WHERE `guid`=55945; diff --git a/sql/updates/world/3.3.5/2016_05_31_07_world.sql b/sql/updates/world/3.3.5/2016_05_31_07_world.sql new file mode 100644 index 00000000000..7ed017ff1cd --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_07_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_loot_template` SET `MinCount`=1, `MaxCount`=1 WHERE `Item`=11509; diff --git a/sql/updates/world/3.3.5/2016_05_31_08_world.sql b/sql/updates/world/3.3.5/2016_05_31_08_world.sql new file mode 100644 index 00000000000..2cf3fbcdfc4 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_08_world.sql @@ -0,0 +1,13 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry`=23359 AND `SourceTypeOrReferenceId`=17; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`, `ErrorType`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17, 0, 23359, 0, 0, 31, 1, 3, 5357, 0, 0, 0, 0, "", "Transmogrify! target can be Land Walker"), +(17, 0, 23359, 0, 0, 36, 1, 0, 0, 0, 0, 0, 0, "", "Transmogrify! target must be alive"), +(17, 0, 23359, 0, 1, 31, 1, 3, 5358, 0, 0, 0, 0, "", "Transmogrify! target can be Cliff Giant"), +(17, 0, 23359, 0, 1, 36, 1, 0, 0, 0, 0, 0, 0, "", "Transmogrify! target must be alive"), +(17, 0, 23359, 0, 2, 31, 1, 3, 5359, 0, 0, 0, 0, "", "Transmogrify! target can be Shore Strider"), +(17, 0, 23359, 0, 2, 36, 1, 0, 0, 0, 0, 0, 0, "", "Transmogrify! target must be alive"), +(17, 0, 23359, 0, 3, 31, 1, 3, 5360, 0, 0, 0, 0, "", "Transmogrify! target can be Deep Strider"), +(17, 0, 23359, 0, 3, 36, 1, 0, 0, 0, 0, 0, 0, "", "Transmogrify! target must be alive"), +(17, 0, 23359, 0, 4, 31, 1, 3, 5361, 0, 0, 0, 0, "", "Transmogrify! target can be Wave Strider"), +(17, 0, 23359, 0, 4, 36, 1, 0, 0, 0, 0, 0, 0, "", "Transmogrify! target must be alive"); diff --git a/sql/updates/world/3.3.5/2016_05_31_09_world.sql b/sql/updates/world/3.3.5/2016_05_31_09_world.sql new file mode 100644 index 00000000000..73d62a92772 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_09_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template` SET `speed_run`=0.42857 WHERE `entry` IN (16027); +UPDATE `smart_scripts` SET `action_param1`=22 WHERE `entryorguid`=16027 AND `source_type`=0 AND `id`=3 AND `link`=4; diff --git a/sql/updates/world/3.3.5/2016_05_31_10_world.sql b/sql/updates/world/3.3.5/2016_05_31_10_world.sql new file mode 100644 index 00000000000..e7536b3a51a --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_10_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `creature_loot_template` WHERE `Item`=31245; diff --git a/sql/updates/world/3.3.5/2016_05_31_11_world.sql b/sql/updates/world/3.3.5/2016_05_31_11_world.sql new file mode 100644 index 00000000000..e5d35f5eb42 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_11_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `reference_loot_template` SET `Item`=49667, `Chance`=10 WHERE `Item`=48679; diff --git a/sql/updates/world/3.3.5/2016_05_31_12_world_335.sql b/sql/updates/world/3.3.5/2016_05_31_12_world_335.sql new file mode 100644 index 00000000000..b20c38b36ba --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_12_world_335.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=155 WHERE `ID`=214; diff --git a/sql/updates/world/3.3.5/2016_05_31_13_world.sql b/sql/updates/world/3.3.5/2016_05_31_13_world.sql new file mode 100644 index 00000000000..6dd3d984c1c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_13_world.sql @@ -0,0 +1,23 @@ +-- +UPDATE `quest_template_addon` SET `ExclusiveGroup`=8747 WHERE `Id` IN (8747, 8752, 8757); + +UPDATE `quest_template_addon` SET `PrevQuestId`=0, `SpecialFlags`=1 WHERE `Id` IN (8764, 8765, 8766); + +DELETE FROM `conditions` WHERE `SourceEntry` IN (8764, 8765, 8766); +INSERT INTO `conditions` VALUES +(19, 0, 8764, 0, 0, 2, 0, 21200, 1, 1, 0, 0, 0, "", "Quest 8764 is available only if player has item 21200 in bags or bank"), +(20, 0, 8764, 0, 0, 2, 0, 21200, 1, 1, 0, 0, 0, "", "Show question mark for quest 8764 only if player has item 21200 in bags or bank"), + +(19, 0, 8765, 0, 0, 2, 0, 21210, 1, 1, 0, 0, 0, "", "Quest 8765 is available only if player has item 21210 in bags or bank"), +(20, 0, 8765, 0, 0, 2, 0, 21210, 1, 1, 0, 0, 0, "", "Show question mark for quest 8765 only if player has item 21210 in bags or bank"), + +(19, 0, 8766, 0, 0, 2, 0, 21205, 1, 1, 0, 0, 0, "", "Quest 8766 is available only if player has item 21205 in bags or bank"), +(20, 0, 8766, 0, 0, 2, 0, 21205, 1, 1, 0, 0, 0, "", "Show question mark for quest 8766 only if player has item 21205 in bags or bank"); + +DELETE FROM `quest_offer_reward` WHERE `ID` IN (8747, 8752, 8757); +INSERT INTO `quest_offer_reward` (`ID`,`Emote1`,`Emote2`,`Emote3`,`Emote4`,`EmoteDelay1`,`EmoteDelay2`,`EmoteDelay3`,`EmoteDelay4`,`RewardText`,`VerifiedBuild`) VALUES +(8747,1,0,0,0,0,0,0,0,(SELECT `CompletionText` FROM `quest_request_items` WHERE `ID`=8747),12340), +(8752,1,0,0,0,0,0,0,0,(SELECT `CompletionText` FROM `quest_request_items` WHERE `ID`=8752),12340), +(8757,1,0,0,0,0,0,0,0,(SELECT `CompletionText` FROM `quest_request_items` WHERE `ID`=8757),12340); + +UPDATE `quest_request_items` SET `CompletionText` = "Never have I seen such tenacity! The Bronze Flight grants you one final enchantment. The Timeless One himself has requested it so!$B$BHand me your signet ring so that I may make the necessary adjustments." WHERE `ID` IN (8751, 8756, 8761); diff --git a/sql/updates/world/3.3.5/2016_05_31_14_world_335.sql b/sql/updates/world/3.3.5/2016_05_31_14_world_335.sql new file mode 100644 index 00000000000..496a9645bda --- /dev/null +++ b/sql/updates/world/3.3.5/2016_05_31_14_world_335.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `unit_flags`=33536 WHERE `entry`=24117; diff --git a/sql/updates/world/3.3.5/2016_06_01_00_world.sql b/sql/updates/world/3.3.5/2016_06_01_00_world.sql new file mode 100644 index 00000000000..5f4e7dbb01c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template` SET `AllowableRaces`=1024 WHERE `ID`=9429; diff --git a/sql/updates/world/3.3.5/2016_06_01_01_world.sql b/sql/updates/world/3.3.5/2016_06_01_01_world.sql new file mode 100644 index 00000000000..80ecabe34aa --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_01_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `creature` SET `position_x`=3154.581, `position_y`=-3126.18, `position_z`=293.5911, `orientation`=4.430199 WHERE `guid`=76311; +UPDATE `creature` SET `position_x`=3128.622, `position_y`=-3119.604, `position_z`=293.4113, `orientation`=4.738929 WHERE `guid`=76312; +UPDATE `creature` SET `position_x`=3175.281, `position_y`=-3134.764, `position_z`=293.4368, `orientation`=4.244924 WHERE `guid`=76313; +UPDATE `smart_scripts` SET `action_param1`=34 WHERE `entryorguid`=16027 AND `source_type`=0 AND `id`=3 AND `link`=4; diff --git a/sql/updates/world/3.3.5/2016_06_01_02_world.sql b/sql/updates/world/3.3.5/2016_06_01_02_world.sql new file mode 100644 index 00000000000..e2c27b15339 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=985 WHERE `ID`=986; diff --git a/sql/updates/world/3.3.5/2016_06_01_03_world.sql b/sql/updates/world/3.3.5/2016_06_01_03_world.sql new file mode 100644 index 00000000000..54beb26b15c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_03_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `AllowableClasses`=256 WHERE `ID`=397; diff --git a/sql/updates/world/3.3.5/2016_06_01_04_world.sql b/sql/updates/world/3.3.5/2016_06_01_04_world.sql new file mode 100644 index 00000000000..1de1716102b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_04_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template` SET `AllowableRaces`=512 WHERE `ID`=9425; diff --git a/sql/updates/world/3.3.5/2016_06_01_05_world.sql b/sql/updates/world/3.3.5/2016_06_01_05_world.sql new file mode 100644 index 00000000000..3d7a32ac308 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_05_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `item_loot_template` SET `Chance`=100 WHERE `Entry`=24336; diff --git a/sql/updates/world/3.3.5/2016_06_01_06_world.sql b/sql/updates/world/3.3.5/2016_06_01_06_world.sql new file mode 100644 index 00000000000..9344147e067 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_06_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template` SET `AllowableRaces`=0 WHERE `ID`=1486; diff --git a/sql/updates/world/3.3.5/2016_06_01_07_world.sql b/sql/updates/world/3.3.5/2016_06_01_07_world.sql new file mode 100644 index 00000000000..9c159c54cb6 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_07_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_queststarter` WHERE `quest`=249; +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(313, 249); diff --git a/sql/updates/world/3.3.5/2016_06_01_08_world.sql b/sql/updates/world/3.3.5/2016_06_01_08_world.sql new file mode 100644 index 00000000000..356c0561bf2 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_08_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_loot_template` SET `Chance`=100 WHERE `Item`=29795; diff --git a/sql/updates/world/3.3.5/2016_06_01_09_world.sql b/sql/updates/world/3.3.5/2016_06_01_09_world.sql new file mode 100644 index 00000000000..5cf06521a19 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_09_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `quest_template_addon` WHERE `ID`=768; +INSERT INTO `quest_template_addon` (`ID`, `RequiredSkillID`, `RequiredSkillPoints`) VALUES +(768, 393, 1); diff --git a/sql/updates/world/3.3.5/2016_06_01_10_world.sql b/sql/updates/world/3.3.5/2016_06_01_10_world.sql new file mode 100644 index 00000000000..abc358431e3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_10_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `SpecialFlags`=`SpecialFlags`|1 WHERE `ID` IN (961, 3375, 3382, 3483); diff --git a/sql/updates/world/3.3.5/2016_06_01_11_world.sql b/sql/updates/world/3.3.5/2016_06_01_11_world.sql new file mode 100644 index 00000000000..dc0b7b05a33 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_11_world.sql @@ -0,0 +1,81 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry`=254 AND `SourceTypeOrReferenceId`=20 AND `ConditionTypeOrReference` IN (8, 28); +INSERT INTO `conditions` VALUES +(20, 0, 254, 0, 0, 8, 0, 253, 0, 0, 1, 0, 0, "", "Show question mark for quest 'Digging Through the Dirt' only if quest 'Bride of the Embalmer' is not rewarded"), +(20, 0, 254, 0, 0, 28, 0, 253, 0, 0, 1, 0, 0, "", "Show question mark for quest 'Digging Through the Dirt' only if quest 'Bride of the Embalmer' is not completed"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (19, 20) AND `SourceEntry` IN (349, 410, 431, 593, 779, 795, 813, 926, 961, 1191, 1462, 1463, 1464, 1714, 1789, 1790, 4041, 6581, 7645, 8508, 8732, 9483, 10850, 10919); +INSERT INTO `conditions` VALUES +(19, 0, 349, 0, 0, 9, 0, 348, 0, 0, 0, 0, 0, "", "Show quest 'Stranglethorn Fever' only if quest 'Stranglethorn Fever' is accepted but not completed"), +(20, 0, 349, 0, 0, 9, 0, 348, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Stranglethorn Fever' only if quest 'Stranglethorn Fever' is accepted but not completed"), + +(19, 0, 410, 0, 0, 9, 0, 409, 0, 0, 0, 0, 0, "", "Show quest 'The Dormant Shade' only if quest 'Proving Allegiance' is accepted but not completed"), +(20, 0, 410, 0, 0, 9, 0, 409, 0, 0, 0, 0, 0, "", "Show question mark for quest 'The Dormant Shade' only if quest 'Proving Allegiance' is accepted but not completed"), + +(19, 0, 431, 0, 0, 9, 0, 409, 0, 0, 0, 0, 0, "", "Show quest 'Candles of Beckoning' only if quest 'Proving Allegiance' is accepted but not completed"), +(20, 0, 431, 0, 0, 9, 0, 409, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Candles of Beckoning' only if quest 'Proving Allegiance' is accepted but not completed"), + +(19, 0, 593, 0, 0, 9, 0, 592, 0, 0, 0, 0, 0, "", "Show quest 'Filling the Soul Gem' only if quest 'Saving Yenniku' is accepted but not completed"), +(20, 0, 593, 0, 0, 9, 0, 592, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Filling the Soul Gem' only if quest 'Saving Yenniku' is accepted but not completed"), + +(19, 0, 779, 0, 0, 9, 0, 717, 0, 0, 0, 0, 0, "", "Show quest 'Seal of the Earth' only if quest 'Tremors of the Earth' is accepted but not completed"), +(20, 0, 779, 0, 0, 9, 0, 717, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Seal of the Earth' only if quest 'Tremors of the Earth' is accepted but not completed"), + +(19, 0, 795, 0, 0, 9, 0, 793, 0, 0, 0, 0, 0, "", "Show quest 'Seal of the Earth' only if quest 'Broken Alliances' is accepted but not completed"), +(20, 0, 795, 0, 0, 9, 0, 793, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Seal of the Earth' only if quest 'Broken Alliances' is accepted but not completed"), + +(19, 0, 813, 0, 0, 9, 0, 812, 0, 0, 0, 0, 0, "", "Show quest 'Finding the Antidote' only if quest 'Need for a Cure' is accepted"), +(20, 0, 813, 0, 0, 9, 0, 812, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Finding the Antidote' only if quest 'Need for a Cure' is accepted but not completed"), + +(19, 0, 926, 0, 0, 9, 0, 924, 0, 0, 0, 0, 0, "", "Show quest 'Flawed Power Stone' only if quest 'The Demon Seed' is accepted but not completed"), +(20, 0, 926, 0, 0, 9, 0, 924, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Flawed Power Stone' only if quest 'The Demon Seed' is accepted but not completed"), + +(19, 0, 961, 0, 0, 9, 0, 944, 0, 0, 0, 0, 0, "", "Show quest 'Onu is Meditating' only if quest 'The Demon Seed' is accepted but not completed OR"), +(20, 0, 961, 0, 0, 9, 0, 944, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Onu is Meditating' only if quest 'The Demon Seed' is accepted but not completed OR"), +(19, 0, 961, 0, 1, 9, 0, 949, 0, 0, 0, 0, 0, "", "Show quest 'Onu is Meditating' only if quest 'The Twilight Camp' is accepted but not completed"), +(20, 0, 961, 0, 1, 9, 0, 949, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Onu is Meditating' only if quest 'The Twilight Camp' is accepted but not completed"), + +(19, 0, 1191, 0, 0, 9, 0, 1190, 0, 0, 0, 0, 0, "", "Show quest 'Zamek's Distraction' only if quest 'Keeping Pace' is accepted but not completed"), +(20, 0, 1191, 0, 0, 9, 0, 1190, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Zamek's Distraction' only if quest 'Keeping Pace' is accepted but not completed"), + +(19, 0, 1462, 0, 0, 28, 0, 1520, 0, 0, 0, 0, 0, "", "Show quest 'Earth Sapta' only if quest 'Call of Earth' is completed"), +(20, 0, 1462, 0, 0, 28, 0, 1520, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Earth Sapta' only if quest 'Call of Earth' is completed"), + +(19, 0, 1463, 0, 0, 28, 0, 1517, 0, 0, 0, 0, 0, "", "Show quest 'Earth Sapta' only if quest 'Call of Earth' is ompleted"), +(20, 0, 1463, 0, 0, 28, 0, 1517, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Earth Sapta' only if quest 'Call of Earth' is completed"), + +(19, 0, 1464, 0, 0, 9, 0, 1526, 0, 0, 0, 0, 0, "", "Show quest 'Fire Sapta' only if quest 'Call of Fire' is accepted but not completed"), +(20, 0, 1464, 0, 0, 9, 0, 1526, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Fire Sapta' only if quest 'Call of Fire' is accepted but not completed"), + +(19, 0, 1714, 0, 0, 9, 0, 1712, 0, 0, 0, 0, 0, "", "Show quest 'Essence of the Exile' only if quest 'Cyclonian' is accepted but not completed"), +(20, 0, 1714, 0, 0, 9, 0, 1712, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Essence of the Exile' only if quest 'Cyclonian' is accepted but not completed"), + +(19, 0, 1789, 0, 0, 9, 0, 1783, 0, 0, 0, 0, 0, "", "Show quest 'The Symbol of Life' only if quest 'The Tome of Divinity' is accepted but not completed"), +(20, 0, 1789, 0, 0, 9, 0, 1783, 0, 0, 0, 0, 0, "", "Show question mark for quest 'The Symbol of Life' only if quest 'The Tome of Divinity' is accepted but not completed"), + +(19, 0, 1790, 0, 0, 9, 0, 1786, 0, 0, 0, 0, 0, "", "Show quest 'The Symbol of Life' only if quest 'The Tome of Divinity' is accepted but not completed"), +(20, 0, 1790, 0, 0, 9, 0, 1786, 0, 0, 0, 0, 0, "", "Show question mark for quest 'The Symbol of Life' only if quest 'The Tome of Divinity' is accepted but not completed"), + +(19, 0, 4041, 0, 0, 9, 0, 3909, 0, 0, 0, 0, 0, "", "Show quest 'The Videre Elixir' only if quest 'The Videre Elixir' is accepted but not completed"), +(20, 0, 4041, 0, 0, 9, 0, 3909, 0, 0, 0, 0, 0, "", "Show question mark for quest 'The Videre Elixir' only if quest 'The Videre Elixir' is accepted but not completed"), + +(19, 0, 6581, 0, 0, 9, 0, 6571, 0, 0, 0, 0, 0, "", "Show quest 'Warsong Saw Blades' only if quest 'Warsong Supplies' is accepted but not completed"), +(20, 0, 6581, 0, 0, 9, 0, 6571, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Warsong Saw Blades' only if quest 'Warsong Supplies' is accepted but not completed"), + +(19, 0, 7645, 0, 0, 9, 0, 7643, 0, 0, 0, 0, 0, "", "Show quest 'Manna-Enriched Horse Feed' only if quest 'Ancient Equine Spirit' is accepted but not completed"), +(20, 0, 7645, 0, 0, 9, 0, 7643, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Manna-Enriched Horse Feed' only if quest 'Ancient Equine Spirit' is accepted but not completed"), + +(19, 0, 8508, 0, 0, 9, 0, 8507, 0, 0, 0, 0, 0, "", "Show quest 'Field Duty Papers' only if quest 'Field Duty' is accepted but not completed"), +(20, 0, 8508, 0, 0, 9, 0, 8507, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Field Duty Papers' only if quest 'Field Duty' is accepted but not completed"), + +(19, 0, 8732, 0, 0, 9, 0, 8731, 0, 0, 0, 0, 0, "", "Show quest 'Field Duty Papers' only if quest 'Field Duty' is accepted but not completed"), +(20, 0, 8732, 0, 0, 9, 0, 8731, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Field Duty Papers' only if quest 'Field Duty' is accepted but not completed"), + +(19, 0, 9483, 0, 0, 9, 0, 9472, 0, 0, 0, 0, 0, "", "Show quest 'Life's Finer Pleasures' only if quest 'Arelion's Mistress' is accepted but not completed"), +(20, 0, 9483, 0, 0, 9, 0, 9472, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Life's Finer Pleasures' only if quest 'Arelion's Mistress' is accepted but not completed"), + +(19, 0, 10850, 0, 0, 9, 0, 10855, 0, 0, 0, 0, 0, "", "Show quest 'Nether Gas In a Fel Fire Engine' only if quest 'Fel Reavers, No Thanks!' is accepted but not completed"), +(20, 0, 10850, 0, 0, 9, 0, 10855, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Nether Gas In a Fel Fire Engine' only if quest 'Fel Reavers, No Thanks!' is accepted but not completed"), + +(19, 0, 10919, 0, 0, 9, 0, 10916, 0, 0, 0, 0, 0, "", "Show quest 'Fei Fei's Treat' only if quest 'Digging for Prayer Beads' is accepted but not completed"), +(20, 0, 10919, 0, 0, 9, 0, 10916, 0, 0, 0, 0, 0, "", "Show question mark for quest 'Fei Fei's Treat' only if quest 'Digging for Prayer Beads' is accepted but not completed"); diff --git a/sql/updates/world/3.3.5/2016_06_01_12_world.sql b/sql/updates/world/3.3.5/2016_06_01_12_world.sql new file mode 100644 index 00000000000..f6fb906bb70 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_01_12_world.sql @@ -0,0 +1,4 @@ +-- +UPDATE `conditions` SET `SourceEntry`=49667 WHERE `SourceEntry`=48679 AND `SourceTypeOrReferenceId`=10 AND `SourceGroup`=10016; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=22137 AND `source_type`=0 AND `id`=7; +UPDATE `creature_text` SET `emote`=0 WHERE `entry`=19666 AND `groupid`=2 AND `id`=0; diff --git a/sql/updates/world/3.3.5/2016_06_02_00_world.sql b/sql/updates/world/3.3.5/2016_06_02_00_world.sql new file mode 100644 index 00000000000..b192efa6814 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_02_00_world.sql @@ -0,0 +1,20 @@ +DELETE FROM `spell_script_names` where `ScriptName` IN ('spell_jormungars_burning_spray','spell_jormungars_paralytic_spray','spell_jormungars_paralytic_toxin','spell_jormungars_paralysis'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(66902,'spell_jormungars_burning_spray'), -- Burning Spray 10m normal +(67627,'spell_jormungars_burning_spray'), -- Burning Spray 25m normal +(67628,'spell_jormungars_burning_spray'), -- Burning Spray 10m heroic +(67629,'spell_jormungars_burning_spray'), -- Burning Spray 25m heroic +(66901,'spell_jormungars_paralytic_spray'), -- Paralytic Spray 10m normal +(67615,'spell_jormungars_paralytic_spray'), -- Paralytic Spray 25m normal +(67616,'spell_jormungars_paralytic_spray'), -- Paralytic Spray 10m heroic +(67617,'spell_jormungars_paralytic_spray'), -- Paralytic Spray 25m heroic +(66823,'spell_jormungars_paralytic_toxin'), -- Paralytic Toxin 10m normal +(67618,'spell_jormungars_paralytic_toxin'), -- Paralytic Toxin 25m normal +(67619,'spell_jormungars_paralytic_toxin'), -- Paralytic Toxin 10m heroic +(67620,'spell_jormungars_paralytic_toxin'), -- Paralytic Toxin 25m heroic +(66830,'spell_jormungars_paralysis'); -- Paralysis + +-- Acidmaw missing text +DELETE FROM `creature_text` where entry = 35144 AND groupid = 1; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(35144,1,0,'You have been infected with a Paralytic Toxin!',42,0,100,0,0,0,36323,0,'Acidmaw - Special Attack'); diff --git a/sql/updates/world/3.3.5/2016_06_02_01_world.sql b/sql/updates/world/3.3.5/2016_06_02_01_world.sql new file mode 100644 index 00000000000..792f221e344 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_02_01_world.sql @@ -0,0 +1,10 @@ +DELETE FROM `spell_script_names` where `ScriptName` IN ('spell_fel_streak_visual'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(66493,'spell_fel_streak_visual'); + +DELETE FROM `creature_template_addon` WHERE `entry` IN (34815,35262,35263,35264); +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(34815,0,0,0,1,0,'66327'), +(35262,0,0,0,1,0,'66327'), +(35263,0,0,0,1,0,'66327'), +(35264,0,0,0,1,0,'66327'); diff --git a/sql/updates/world/3.3.5/2016_06_04_00_world.sql b/sql/updates/world/3.3.5/2016_06_04_00_world.sql new file mode 100644 index 00000000000..e44fe54de55 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_04_00_world.sql @@ -0,0 +1,19 @@ +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=6556; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=6556 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=6557 AND `source_type`=0 AND `id`=7; +DELETE FROM `smart_scripts` WHERE `entryorguid`=6559 AND `source_type`=0 AND `id`=1; + +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(6556, 0, 0, 0, 8, 0, 100, 1, 15702, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muculent Ooze - On Spell Hit (Filling Empty Jar) - Despawn'), +(6557, 0, 7, 0, 8, 0, 100, 1, 15702, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Primal Ooze - On Spell Hit (Filling Empty Jar) - Despawn'), +(6559, 0, 1, 0, 8, 0, 100, 1, 15702, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Glutinous Ooze - On Spell Hit (Filling Empty Jar) - Despawn'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=15702; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 15702, 0, 0, 31, 1, 3, 6556, 0, 0, 0, 0, '', 'Filling Empty Jar can be used on Muculent Ooze'), +(17, 0, 15702, 0, 1, 31, 1, 3, 6557, 0, 0, 0, 0, '', 'Filling Empty Jar can be used on Muculent Ooze'), +(17, 0, 15702, 0, 2, 31, 1, 3, 6559, 0, 0, 0, 0, '', 'Filling Empty Jar can be used on Muculent Ooze'), +(17, 0, 15702, 0, 0, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Target must be dead'), +(17, 0, 15702, 0, 1, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Target must be dead'), +(17, 0, 15702, 0, 2, 36, 1, 0, 0, 0, 1, 0, 0, '', 'Target must be dead'); diff --git a/sql/updates/world/3.3.5/2016_06_04_01_world.sql b/sql/updates/world/3.3.5/2016_06_04_01_world.sql new file mode 100644 index 00000000000..fb048449d40 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_04_01_world.sql @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS `playercreateinfo_cast_spell`; +CREATE TABLE IF NOT EXISTS `playercreateinfo_cast_spell` ( + `raceMask` INT(10) UNSIGNED NOT NULL DEFAULT '0', + `classMask` INT(10) UNSIGNED NOT NULL DEFAULT '0', + `spell` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', + `note` VARCHAR(255) DEFAULT NULL +) ENGINE=MYISAM DEFAULT CHARSET=utf8; + +DELETE FROM `playercreateinfo_cast_spell` WHERE `spell` IN (48266, 2457); +INSERT INTO `playercreateinfo_cast_spell` (`racemask`, `classmask`, `spell`, `note`) VALUES +(0, 32, 48266, 'Death Knight - Blood Presence'), +(0, 1, 2457, 'Warrior - Battle Stance'); diff --git a/sql/updates/world/3.3.5/2016_06_05_00_world.sql b/sql/updates/world/3.3.5/2016_06_05_00_world.sql new file mode 100644 index 00000000000..6da2282d424 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `page_text` SET `Text`="Westfall Stew$B$B3 parts Stringy Vulture Meat$B3 Goretusk Snouts$B3 Murloc Eyes$B3 Okra$B$BMix together and bring to a boil. Let simmer for at least two hours before serving." WHERE `ID`=213; diff --git a/sql/updates/world/3.3.5/2016_06_05_01_world.sql b/sql/updates/world/3.3.5/2016_06_05_01_world.sql new file mode 100644 index 00000000000..444a5be17ed --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `page_text` SET `Text`="Osric,$B$BPlease find below the list of armor of which we are in need:$B$B10 Mail shirts$B20 Helms$B30 Armor Patches$B15 Mail Boots$B$BWe are, as always, in your debt. And should Westfall ever be free of the thieves who threaten it, it would ease the guilt in my heart if I could invite you to my family's home, for a fine meal cooked from the bounty this land was once so well known.$B$B-Lewis$BQuartermaster, Sentinel Hill" WHERE `ID`=2512; diff --git a/sql/updates/world/3.3.5/2016_06_05_02_world.sql b/sql/updates/world/3.3.5/2016_06_05_02_world.sql new file mode 100644 index 00000000000..cab093eb88f --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `page_text` SET `Text`="Grelin,$B$BMy time is short and many matters press on my time, and I hope that your investigation of the trolls will not be one of them. Therefore I will allow you to use my authority in dealing with the trolls in whatever fashion you deem necessary, more so if you are able to find an expedient solution.$B$BMagni Bronzebeard" WHERE `ID`=80; diff --git a/sql/updates/world/3.3.5/2016_06_05_03_world.sql b/sql/updates/world/3.3.5/2016_06_05_03_world.sql new file mode 100644 index 00000000000..d9bd5ecab2c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_03_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=315 WHERE `ID`=415; diff --git a/sql/updates/world/3.3.5/2016_06_05_04_world.sql b/sql/updates/world/3.3.5/2016_06_05_04_world.sql new file mode 100644 index 00000000000..fdf6b535f8d --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_04_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_offer_reward` SET `RewardText`="The Malt is brewed, the Boars are dead$BAnd before all is done and anything said$BWe will have to fight for first dibs$BOn these savory Beer Basted Boar Ribs!" WHERE `ID`=384; diff --git a/sql/updates/world/3.3.5/2016_06_05_05_world.sql b/sql/updates/world/3.3.5/2016_06_05_05_world.sql new file mode 100644 index 00000000000..9c69b2d7639 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_05_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=8328 WHERE `ID`=10068; +UPDATE `quest_template_addon` SET `PrevQuestID`=9676 WHERE `ID`=10069; +UPDATE `quest_template_addon` SET `PrevQuestID`=9393 WHERE `ID`=10070; +UPDATE `quest_template_addon` SET `PrevQuestID`=8564 WHERE `ID`=10072; diff --git a/sql/updates/world/3.3.5/2016_06_05_06_world.sql b/sql/updates/world/3.3.5/2016_06_05_06_world.sql new file mode 100644 index 00000000000..5d63a2c7e37 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_06_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=8325 WHERE `ID` IN (9393, 8328, 9676, 8564, 9392, 8563); diff --git a/sql/updates/world/3.3.5/2016_06_05_07_world.sql b/sql/updates/world/3.3.5/2016_06_05_07_world.sql new file mode 100644 index 00000000000..71d39603080 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_07_world.sql @@ -0,0 +1,4 @@ +-- add missing localization for item "Bamboo Cage Key" (entry: 12301) +DELETE FROM `locales_item` WHERE `entry`=12301; +INSERT INTO `locales_item` (`entry`, `name_loc2`, `name_loc3`, `name_loc6`, `name_loc7`, `name_loc8`) VALUES +(12301, 'Clé de la cage en bambou', 'Bambuskäfigschlüssel', 'Llave de jaula de bambú', 'Llave de jaula de bambú', 'Ключ от бамбуковой клетки'); diff --git a/sql/updates/world/3.3.5/2016_06_05_08_world.sql b/sql/updates/world/3.3.5/2016_06_05_08_world.sql new file mode 100644 index 00000000000..a2f5c580f92 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_08_world.sql @@ -0,0 +1,2 @@ +-- adding a key requirement for gameobject "Cage Door" (entry: 143979) at Kurzen's Compound by closing it +UPDATE `gameobject` SET `state`=1 WHERE `guid`=10673; diff --git a/sql/updates/world/3.3.5/2016_06_05_09_world.sql b/sql/updates/world/3.3.5/2016_06_05_09_world.sql new file mode 100644 index 00000000000..98f707aafcd --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_09_world.sql @@ -0,0 +1,9 @@ +-- Plague Scientist SAI +SET @ENTRY := 37023; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,2000,3000,23000,24000,11,71103,0,0,0,0,0,6,0,0,0,0,0,0,0,"Plague Scientist - In Combat - Cast 'Combobulating Spray'"), +(@ENTRY,0,1,0,0,0,100,0,5000,6000,5000,6000,11,73079,0,0,0,0,0,2,0,0,0,0,0,0,0,"Plague Scientist - In Combat - Cast 'Plague Blast'"), +(@ENTRY,0,2,0,0,0,100,0,9000,10000,25000,26000,11,69871,0,0,0,0,0,9,0,0,30,0,0,0,0,"Plague Scientist - In Combat - Cast 'Plague Stream'"), +(@ENTRY,0,3,0,1,0,100,0,2000,3000,10000,10000,11,69871,0,0,0,0,0,9,10404,0,10,0,0,0,0,"Plague Scientist - Out of Combat - Cast 'Plague Stream'"); diff --git a/sql/updates/world/3.3.5/2016_06_05_10_world.sql b/sql/updates/world/3.3.5/2016_06_05_10_world.sql new file mode 100644 index 00000000000..66c6e8dbc7c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_10_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_area` WHERE `spell` IN (74092, 74310); +INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`) VALUES +(74092,368,25495,25445,0,0,2,1,74), +(74310,133,25287,25393,0,0,2,1,74); diff --git a/sql/updates/world/3.3.5/2016_06_05_11_world.sql b/sql/updates/world/3.3.5/2016_06_05_11_world.sql new file mode 100644 index 00000000000..3a76d73f9ab --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_11_world.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN(13,17) AND `SourceEntry`=58912; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,58912,0,0,31,1,3,31254,0,0,0,0,'','Deathstorm requires target Lordaeron Footsoldier'), +(17,0,58912,0,1,31,1,3,32414,0,0,0,0,'','Deathstorm requires target Lordaeron Captain'), +(13,1,58912,0,0,31,0,3,31254,0,0,0,0,'','Deathstorm can hit Lordaeron Footsoldier'), +(13,1,58912,0,1,31,0,3,32414,0,0,0,0,'','Deathstorm can hit Lordaeron Captain'); diff --git a/sql/updates/world/3.3.5/2016_06_05_12_world.sql b/sql/updates/world/3.3.5/2016_06_05_12_world.sql new file mode 100644 index 00000000000..a446260985f --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_05_12_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `InhabitType` = 1 WHERE `entry` = 17312; diff --git a/sql/updates/world/3.3.5/2016_06_06_00_world.sql b/sql/updates/world/3.3.5/2016_06_06_00_world.sql new file mode 100644 index 00000000000..61d93dab677 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_06_00_world.sql @@ -0,0 +1,83 @@ +-- ghoul_base_stats +DELETE FROM `pet_levelstats` WHERE creature_entry = 26125; +INSERT INTO `pet_levelstats` (`creature_entry`, `level`, `hp`, `mana`, `armor`, `str`, `agi`, `sta`, `inte`, `spi`) VALUES +(26125,1,48,80,10,20,16,13,20,8), +(26125,2,105,106,67,22,17,14,21,9), +(26125,3,162,132,124,24,18,15,22,10), +(26125,4,219,158,181,26,19,16,23,11), +(26125,5,276,184,238,28,20,17,24,12), +(26125,6,333,210,295,30,21,18,25,13), +(26125,7,390,236,352,32,22,19,26,14), +(26125,8,447,262,409,34,23,20,27,15), +(26125,9,504,288,466,36,24,21,28,16), +(26125,10,561,314,523,38,25,22,29,17), +(26125,11,618,340,580,40,26,23,30,18), +(26125,12,675,366,637,42,27,24,31,19), +(26125,13,732,392,694,44,28,25,32,20), +(26125,14,789,418,751,46,29,26,33,21), +(26125,15,846,444,808,48,30,27,34,22), +(26125,16,903,470,865,50,31,28,35,23), +(26125,17,960,496,922,52,32,29,36,24), +(26125,18,1017,522,979,54,33,30,37,25), +(26125,19,1074,548,1036,56,34,31,38,26), +(26125,20,1131,574,1093,58,35,32,39,27), +(26125,21,1188,600,1150,60,36,33,40,28), +(26125,22,1245,626,1207,62,37,34,41,29), +(26125,23,1302,652,1264,64,38,35,42,30), +(26125,24,1359,678,1321,66,39,36,43,31), +(26125,25,1416,704,1378,68,40,37,44,32), +(26125,26,1473,730,1435,70,41,38,45,33), +(26125,27,1530,756,1492,72,42,39,46,34), +(26125,28,1587,782,1549,74,43,40,47,35), +(26125,29,1644,808,1606,76,44,41,48,36), +(26125,30,1701,834,1663,78,45,42,49,37), +(26125,31,1758,860,1720,80,46,43,50,38), +(26125,32,1815,886,1777,82,47,44,51,39), +(26125,33,1872,912,1834,84,48,45,52,40), +(26125,34,1929,938,1891,86,49,46,53,41), +(26125,35,1986,964,1948,88,50,47,54,42), +(26125,36,2043,990,2005,90,51,48,55,43), +(26125,37,2100,1016,2062,92,52,49,56,44), +(26125,38,2157,1042,2119,94,53,50,57,45), +(26125,39,2214,1068,2176,96,54,51,58,46), +(26125,40,2271,1094,2233,98,55,52,59,47), +(26125,41,2328,1120,2290,100,56,53,60,48), +(26125,42,2385,1146,2347,102,57,54,61,49), +(26125,43,2442,1172,2404,104,58,55,62,50), +(26125,44,2499,1198,2461,106,59,56,63,51), +(26125,45,2556,1224,2518,108,60,57,64,52), +(26125,46,2613,1250,2575,110,61,58,65,53), +(26125,47,2670,1276,2632,112,62,59,66,54), +(26125,48,2727,1302,2689,114,63,60,67,55), +(26125,49,2784,1328,2746,116,64,61,68,56), +(26125,50,2841,1354,2803,118,65,62,69,57), +(26125,51,2898,1380,2860,120,66,63,70,58), +(26125,52,2955,1406,2917,122,67,64,71,59), +(26125,53,3012,1432,2974,124,68,65,72,60), +(26125,54,3069,1458,3031,126,69,66,73,61), +(26125,55,3126,1484,3088,128,70,67,74,62), +(26125,56,3183,1510,3145,130,71,68,75,63), +(26125,57,3240,1536,3202,132,72,69,76,64), +(26125,58,3297,1562,3259,134,73,70,77,65), +(26125,59,3354,1588,3316,136,74,71,78,66), +(26125,60,3411,1614,3373,138,75,72,79,67), +(26125,61,3468,1640,3430,140,76,73,80,68), +(26125,62,3525,1666,3487,142,77,74,81,69), +(26125,63,3582,1692,3544,144,78,75,82,70), +(26125,64,3639,1718,3601,146,79,76,83,71), +(26125,65,3696,1744,3658,148,80,77,84,72), +(26125,66,3753,1770,3715,150,81,78,85,73), +(26125,67,3810,1796,3772,152,82,79,86,74), +(26125,68,3867,1822,3829,154,83,80,87,75), +(26125,69,3924,1848,3886,156,84,81,88,76), +(26125,70,3981,1874,3943,158,85,82,89,77), +(26125,71,4038,1900,4000,160,86,83,90,78), +(26125,72,4095,1926,4057,162,87,84,91,79), +(26125,73,4152,1952,4114,164,88,85,92,80), +(26125,74,4209,1978,4171,166,89,86,93,81), +(26125,75,4266,2004,4228,168,90,87,94,82), +(26125,76,4323,2030,4285,170,91,88,95,83), +(26125,77,4380,2056,4342,172,92,89,96,84), +(26125,78,4437,2082,4399,174,93,90,97,85), +(26125,79,4494,2108,4456,176,94,91,98,86), +(26125,80,4551,2134,4513,331,95,92,99,87); diff --git a/sql/updates/world/3.3.5/2016_06_06_01_world.sql b/sql/updates/world/3.3.5/2016_06_06_01_world.sql new file mode 100644 index 00000000000..fc47dc4bf14 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_06_01_world.sql @@ -0,0 +1,8 @@ +DELETE FROM `command` WHERE `name` = 'debug neargraveyard'; +INSERT INTO `command` (`name`, `permission`, `help`) VALUES +('debug neargraveyard', 841, 'Syntax: .debug neargraveyard [linked]\nFind the nearest graveyard from dbc or db (if linked)'); + +DELETE FROM `trinity_string` WHERE `entry` IN (82, 83); +INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc6`, `content_loc7`) VALUES +(82, 'Nearest graveyard found: %u (%.3f %.3f %.3f)', 'Cementerio mas cercano encontrado: %u (%.3f %.3f %.3f)', 'Cementerio mas cercano encontrado: %u (%.3f %.3f %.3f)'), +(83, 'There are no graveyards near', 'No se ha encontrado ningun cementerio cerca', 'No se ha encontrado ningun cementerio cerca'); diff --git a/sql/updates/world/3.3.5/2016_06_07_00_world.sql b/sql/updates/world/3.3.5/2016_06_07_00_world.sql new file mode 100644 index 00000000000..fbe7c362718 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_07_00_world.sql @@ -0,0 +1,2 @@ +-- remove incorrect trigger flag from hodir ice blocks that prevents encounter from starting +UPDATE `creature_template` SET `flags_extra`=(`flags_extra`&~128) WHERE `entry` IN (32938,33353); diff --git a/sql/updates/world/3.3.5/2016_06_07_01_world.sql b/sql/updates/world/3.3.5/2016_06_07_01_world.sql new file mode 100644 index 00000000000..09e86bc0396 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_07_01_world.sql @@ -0,0 +1,622 @@ +-- +-- Waypoints for Ghostlands +-- +-- Pathing for Deatholme Acolyte Entry: 16315 'TDB FORMAT' +SET @NPC := 82514; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=6980.597,`position_y`=-5898.018,`position_z`=28.76383 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,6980.597,-5898.018,28.76383,0,0,0,0,100,0), -- 23:05:14 +(@PATH,2,6980.413,-5864.207,38.00547,0,0,0,0,100,0), -- 23:05:31 +(@PATH,3,6985.412,-5841.971,49.12637,0,0,0,0,100,0), -- 23:05:46 +(@PATH,4,6996.224,-5824.525,58.95233,0,0,0,0,100,0), -- 23:05:56 +(@PATH,5,7008.987,-5810.714,68.33813,0,0,0,0,100,0), -- 23:06:05 +(@PATH,6,7018.887,-5796.988,77.02762,0,0,0,0,100,0), -- 23:06:14 +(@PATH,7,7023.633,-5785.236,83.22521,0,0,0,0,100,0), -- 23:06:21 +(@PATH,8,7025.083,-5767.624,91.65661,0,0,0,0,100,0), -- 23:06:27 +(@PATH,9,7023.818,-5754.515,99.82605,0,0,0,0,100,0), -- 23:06:35 +(@PATH,10,7021.463,-5739.864,105.2905,0,0,0,0,100,0), -- 23:06:42 +(@PATH,11,7023.037,-5750.744,102.3329,0,0,0,0,100,0), -- 23:06:50 +(@PATH,12,7024.833,-5765.023,93.1219,0,0,0,0,100,0), -- 23:06:54 +(@PATH,13,7024.46,-5781.898,84.79234,0,0,0,0,100,0), -- 23:07:01 +(@PATH,14,7021.089,-5792.683,79.57092,0,0,0,0,100,0), -- 23:07:09 +(@PATH,15,7010.271,-5809.296,69.25038,0,0,0,0,100,0), -- 23:07:14 +(@PATH,16,6998.258,-5822.302,60.71892,0,0,0,0,100,0), -- 23:07:23 +(@PATH,17,6986.333,-5840.401,49.7908,0,0,0,0,100,0), -- 23:07:31 +(@PATH,18,6980.666,-5861.458,39.13383,0,0,0,0,100,0); -- 23:07:40 + +-- Pathing for Deatholme Acolyte Entry: 16315 'TDB FORMAT' +SET @NPC := 82536; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=6997.067,`position_y`=-5687.621,`position_z`=102.8226 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,6997.067,-5687.621,102.8226,0,0,0,0,100,0), -- 23:06:27 +(@PATH,2,6990.939,-5688.242,101.8386,0,0,0,0,100,0), -- 23:06:32 +(@PATH,3,6976.603,-5693.576,96.38464,0,0,0,0,100,0), -- 23:06:36 +(@PATH,4,6970.503,-5700.29,92.63046,0,0,0,0,100,0), -- 23:06:41 +(@PATH,5,6967.743,-5712.647,88.57698,0,0,0,0,100,0), -- 23:06:45 +(@PATH,6,6970.009,-5720.242,85.64739,0,0,0,0,100,0), -- 23:06:50 +(@PATH,7,6971.563,-5723.634,84.75957,0,0,0,0,100,0), -- 23:06:55 +(@PATH,8,6979.354,-5724.356,84.26402,0,0,0,0,100,0), -- 23:06:57 +(@PATH,9,6979.47,-5714.573,84.58974,0,0,0,0,100,0), -- 23:07:00 +(@PATH,10,6979.149,-5705.578,84.45787,0,0,0,0,100,0), -- 23:07:05 +(@PATH,11,6979.545,-5714.578,84.56152,0,0,0,0,100,0), -- 23:09:00 +(@PATH,12,6979.16,-5705.374,84.45621,0,0,0,0,100,0), -- 23:09:04 +(@PATH,13,6980.682,-5682.834,82.93341,0,0,0,0,100,0), -- 23:09:11 +(@PATH,14,6985.518,-5671.094,82.00629,0,0,0,0,100,0), -- 23:09:17 +(@PATH,15,6990.438,-5665.75,81.61432,0,0,0,0,100,0), -- 23:09:22 +(@PATH,16,6995.886,-5661.015,81.00694,0,0,0,0,100,0), -- 23:09:26 +(@PATH,17,6995.958,-5660.979,80.95592,0,0,0,0,100,0), -- 23:09:29 +(@PATH,18,6990.574,-5665.602,81.49225,0,0,0,0,100,0), -- 23:09:30 +(@PATH,19,6985.71,-5671.139,81.79518,0,0,0,0,100,0), -- 23:09:33 +(@PATH,20,6979.59,-5690.713,83.48748,0,0,0,0,100,0), -- 23:09:38 +(@PATH,21,6979.259,-5705.457,84.32413,0,0,0,0,100,0), -- 23:09:44 +(@PATH,22,6980.716,-5719.662,84.53703,0,0,0,0,100,0), -- 23:09:52 +(@PATH,23,6978.376,-5725.388,84.53719,0,0,0,0,100,0), -- 23:09:56 +(@PATH,24,6977.495,-5726.067,84.54002,0,0,0,0,100,0), -- 23:09:58 +(@PATH,25,6968.405,-5716.007,87.3763,0,0,0,0,100,0), -- 23:10:01 +(@PATH,26,6967.94,-5709.555,89.84632,0,0,0,0,100,0), -- 23:10:06 +(@PATH,27,6974.01,-5696.171,94.75365,0,0,0,0,100,0), -- 23:10:09 +(@PATH,28,6984.721,-5690.32,99.80565,0,0,0,0,100,0); -- 23:10:14 + +-- Pathing for Deatholme Acolyte Entry: 16315 'TDB FORMAT' +SET @NPC := 82537; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7010.643,`position_y`=-5693.538,`position_z`=102.6286 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7010.643,-5693.538,102.6286,0,0,0,0,100,0), -- 23:06:47 +(@PATH,2,7016.285,-5693.483,102.6231,0,0,0,0,100,0), -- 23:06:49 +(@PATH,3,7018.219,-5692.301,102.6074,0,0,0,0,100,0), -- 23:06:50 +(@PATH,4,7021.005,-5689.024,102.3725,0,0,0,0,100,0), -- 23:06:53 +(@PATH,5,7018.614,-5679.159,102.6098,0,0,0,0,100,0), -- 23:06:56 +(@PATH,6,7014.545,-5677.964,102.6143,0,0,0,0,100,0), -- 23:06:57 +(@PATH,7,7010.401,-5678.611,102.6134,0,0,0,0,100,0), -- 23:07:00 +(@PATH,8,7007.026,-5681.029,102.6129,0,0,0,0,100,0), -- 23:07:02 +(@PATH,9,7004.883,-5684.334,102.6098,0,0,0,0,100,0), -- 23:07:05 +(@PATH,10,7005.852,-5689.117,102.6089,0,0,0,0,100,0); -- 23:07:07 + +-- Pathing for Deatholme Acolyte Entry: 16315 'TDB FORMAT' +SET @NPC := 82540; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7029.595,`position_y`=-5682.818,`position_z`=102.658 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7029.595,-5682.818,102.658,0,0,0,0,100,0), -- 23:06:56 +(@PATH,2,7035.782,-5681.29,102.0026,0,0,0,0,100,0), -- 23:07:01 +(@PATH,3,7045.729,-5681.199,98.82371,0,0,0,0,100,0), -- 23:07:03 +(@PATH,4,7056.35,-5684.523,93.90004,0,0,0,0,100,0), -- 23:07:07 +(@PATH,5,7045.667,-5681.057,98.76253,0,0,0,0,100,0), -- 23:09:05 +(@PATH,6,7056.332,-5684.539,93.80215,0,0,0,0,100,0), -- 23:09:09 +(@PATH,7,7060.951,-5689.726,91.59099,0,0,0,0,100,0), -- 23:09:13 +(@PATH,8,7064.874,-5703.865,86.7645,0,0,0,0,100,0), -- 23:09:17 +(@PATH,9,7063.655,-5709.466,84.63042,0,0,0,0,100,0), -- 23:09:22 +(@PATH,10,7058.803,-5714.256,84.48442,0,0,0,0,100,0), -- 23:09:27 +(@PATH,11,7057.9,-5714.272,84.27392,0,0,0,0,100,0), -- 23:09:28 +(@PATH,12,7054.177,-5703.301,84.48618,0,0,0,0,100,0), -- 23:09:30 +(@PATH,13,7052.994,-5694.213,84.35367,0,0,0,0,100,0), -- 23:09:37 +(@PATH,14,7043.341,-5673.357,82.8222,0,0,0,0,100,0), -- 23:09:43 +(@PATH,15,7035.741,-5663.536,81.92133,0,0,0,0,100,0), -- 23:09:49 +(@PATH,16,7029.659,-5659.765,81.63133,0,0,0,0,100,0), -- 23:09:52 +(@PATH,17,7022.754,-5657.553,81.0175,0,0,0,0,100,0), -- 23:09:56 +(@PATH,18,7022.701,-5657.519,80.93935,0,0,0,0,100,0), -- 23:10:00 +(@PATH,19,7029.343,-5659.941,81.43478,0,0,0,0,100,0), -- 23:10:01 +(@PATH,20,7038.872,-5666.699,82.0325,0,0,0,0,100,0), -- 23:10:05 +(@PATH,21,7047.313,-5680.742,83.38,0,0,0,0,100,0), -- 23:10:08 +(@PATH,22,7052.837,-5694.202,84.4315,0,0,0,0,100,0), -- 23:10:14 +(@PATH,23,7053.863,-5703.065,84.7151,0,0,0,0,100,0), -- 23:10:20 +(@PATH,24,7054.707,-5709.983,84.50665,0,0,0,0,100,0), -- 23:10:26 +(@PATH,25,7057.84,-5714.267,84.24426,0,0,0,0,100,0), -- 23:10:29 +(@PATH,26,7064.392,-5706.512,85.34109,0,0,0,0,100,0), -- 23:10:30 +(@PATH,27,7063.626,-5695.099,89.8451,0,0,0,0,100,0), -- 23:10:34 +(@PATH,28,7059.115,-5687.389,92.43468,0,0,0,0,100,0), -- 23:10:39 +(@PATH,29,7048.491,-5681.79,97.46969,0,0,0,0,100,0), -- 23:10:43 +(@PATH,30,7038.716,-5681.117,100.7739,0,0,0,0,100,0); -- 23:10:48 + +-- Pathing for Grimscale Oracle Entry: 15669 'TDB FORMAT' +SET @NPC := 56234; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=8878.816,`position_y`=-5749.102,`position_z`=0.5971264 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,8878.816,-5749.102,0.5971264,0,0,0,0,100,0), -- 23:32:50 +(@PATH,2,8872.123,-5724.519,0.5082448,0,0,0,0,100,0), -- 23:33:17 +(@PATH,3,8858.525,-5719.116,0.797046,0,0,0,0,100,0), -- 23:33:23 +(@PATH,4,8820.211,-5718.883,-1.039287,0,0,0,0,100,0), -- 23:33:33 +(@PATH,5,8797.094,-5711.732,0.5297012,0,0,0,0,100,0), -- 23:33:43 +(@PATH,6,8789.655,-5709.307,0.9552886,0,0,0,0,100,0), -- 23:33:53 +(@PATH,7,8771.264,-5697.327,1.041862,0,0,0,0,100,0), -- 23:34:01 +(@PATH,8,8754.51,-5692.826,0.9234784,0,0,0,0,100,0), -- 23:34:08 +(@PATH,9,8754.548,-5692.86,0.8107796,0,0,0,0,100,0), -- 23:34:17 +(@PATH,10,8754.832,-5692.778,1.003729,0,0,0,0,100,0), -- 23:34:22 +(@PATH,11,8771.507,-5697.777,0.8035664,0,0,0,0,100,0), -- 23:34:29 +(@PATH,12,8806.005,-5714.252,-1.612888,0,0,0,0,100,0), -- 23:34:38 +(@PATH,13,8829.296,-5721.84,1.24645,0,0,0,0,100,0), -- 23:34:48 +(@PATH,14,8847.945,-5721.054,0.8082525,0,0,0,0,100,0), -- 23:34:57 +(@PATH,15,8858.877,-5719.242,0.7433279,0,0,0,0,100,0), -- 23:35:07 +(@PATH,16,8872.451,-5724.64,0.7027312,0,0,0,0,100,0); -- 23:35:13 + +-- Pathing for Grimscale Oracle Entry: 15669 'TDB FORMAT' +SET @NPC := 56221; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=8777.075,`position_y`=-5755.628,`position_z`=0.7944576 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,8777.075,-5755.628,0.7944576,0,0,0,0,100,0), -- 23:25:41 +(@PATH,2,8744.947,-5758.729,1.44137,0,0,0,0,100,0), -- 23:26:14 +(@PATH,3,8723.646,-5744.492,0.7795044,0,0,0,0,100,0), -- 23:26:24 +(@PATH,4,8711.309,-5729.942,1.035426,0,0,0,0,100,0), -- 23:26:32 +(@PATH,5,8691.229,-5710.955,0.2195589,0,0,0,0,100,0), -- 23:26:39 +(@PATH,6,8687.803,-5701.443,-0.1464095,0,0,0,0,100,0), -- 23:26:48 +(@PATH,7,8653.561,-5676.286,1.293998,0,0,0,0,100,0), -- 23:27:01 +(@PATH,8,8641.836,-5678.255,1.193712,0,0,0,0,100,0), -- 23:27:12 +(@PATH,9,8641.773,-5678.348,1.107449,0,0,0,0,100,0), -- 23:27:23 +(@PATH,10,8667.416,-5673.973,0.01454574,0,0,0,0,100,0), -- 23:27:32 +(@PATH,11,8675.772,-5684.51,0.2002553,0,0,0,0,100,0), -- 23:27:43 +(@PATH,12,8690.506,-5709.449,0.5053282,0,0,0,0,100,0), -- 23:27:56 +(@PATH,13,8694.455,-5720.396,0.996207,0,0,0,0,100,0), -- 23:28:04 +(@PATH,14,8711.694,-5730.25,0.9948567,0,0,0,0,100,0), -- 23:28:12 +(@PATH,15,8732.313,-5750.292,1.464421,0,0,0,0,100,0), -- 23:28:20 +(@PATH,16,8751.975,-5757.997,0.9221863,0,0,0,0,100,0), -- 23:28:30 +(@PATH,17,8777.087,-5755.516,0.800478,0,0,0,0,100,0); -- 23:28:43 + +-- Pathing for Grimscale Forager Entry: 15670 'TDB FORMAT' +SET @NPC := 56242; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=9071.955,`position_y`=-5877.383,`position_z`=0.6975139 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,9071.955,-5877.383,0.6975139,0,0,0,0,100,0), -- 23:37:45 +(@PATH,2,9059.324,-5868.073,-1.393102,0,0,0,0,100,0), -- 23:38:00 +(@PATH,3,9029.121,-5854.314,0.6379914,0,0,0,0,100,0), -- 23:38:11 +(@PATH,4,9026.947,-5821.172,1.145625,0,0,0,0,100,0), -- 23:38:21 +(@PATH,5,9027.102,-5820.248,1.393944,0,0,0,0,100,0), -- 23:38:35 +(@PATH,6,9032.799,-5775.275,0.952391,0,0,0,0,100,0), -- 23:38:44 +(@PATH,7,9031.125,-5767.591,0.8471048,0,0,0,0,100,0), -- 23:38:56 +(@PATH,8,9008.104,-5754.679,0.8015774,0,0,0,0,100,0), -- 23:39:07 +(@PATH,9,8966.937,-5741.705,1.29663,0,0,0,0,100,0), -- 23:39:17 +(@PATH,10,8962.295,-5740.867,1.235597,0,0,0,0,100,0), -- 23:39:27 +(@PATH,11,8927.979,-5767.035,0.04672858,0,0,0,0,100,0), -- 23:39:37 +(@PATH,12,8938.715,-5761.229,1.038244,0,0,0,0,100,0), -- 23:39:45 +(@PATH,13,8943.727,-5758.281,0.968925,0,0,0,0,100,0), -- 23:39:52 +(@PATH,14,8981.834,-5744.667,0.7889291,0,0,0,0,100,0), -- 23:40:02 +(@PATH,15,8986.465,-5746.015,0.8002989,0,0,0,0,100,0), -- 23:40:12 +(@PATH,16,9008.296,-5754.792,0.820213,0,0,0,0,100,0), -- 23:40:21 +(@PATH,17,9036.458,-5792.002,1.43752,0,0,0,0,100,0), -- 23:40:32 +(@PATH,18,9028.837,-5817.06,1.559729,0,0,0,0,100,0), -- 23:40:45 +(@PATH,19,9023.854,-5848.162,1.221549,0,0,0,0,100,0), -- 23:40:54 +(@PATH,20,9042.734,-5857.301,-2.073786,0,0,0,0,100,0); -- 23:41:08 + +-- Pathing for Grimscale Seer Entry: 15950 'TDB FORMAT' +SET @NPC := 56391; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=9037.592,`position_y`=-5766.527,`position_z`=0.5168767 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,9037.592,-5766.527,0.5168767,0,0,0,0,100,0), -- 23:42:42 +(@PATH,2,9048.254,-5784.458,0.9698197,0,0,0,0,100,0), -- 23:42:51 +(@PATH,3,9059.32,-5798.216,-0.9207587,0,0,0,0,100,0), -- 23:42:59 +(@PATH,4,9076.928,-5813.567,0.3946522,0,0,0,0,100,0), -- 23:43:10 +(@PATH,5,9080.393,-5815.896,0.6621327,0,0,0,0,100,0), -- 23:43:18 +(@PATH,6,9088.405,-5809.686,0.7750955,0,0,0,0,100,0), -- 23:43:21 +(@PATH,7,9106.832,-5804.949,0.821775,0,0,0,0,100,0), -- 23:43:28 +(@PATH,8,9123.148,-5807.707,0.8019806,0,0,0,0,100,0), -- 23:43:36 +(@PATH,9,9135.586,-5821.801,0.7773802,0,0,0,0,100,0), -- 23:43:43 +(@PATH,10,9149.662,-5822.438,0.7227378,0,0,0,0,100,0), -- 23:43:49 +(@PATH,11,9167.805,-5833.559,0.5458255,0,0,0,0,100,0), -- 23:43:58 +(@PATH,12,9167.66,-5833.448,0.4231594,0,0,0,0,100,0), -- 23:44:11 +(@PATH,13,9167.701,-5833.285,0.7127371,0,0,0,0,100,0), -- 23:44:23 +(@PATH,14,9149.432,-5822.394,0.7666007,0,0,0,0,100,0), -- 23:44:32 +(@PATH,15,9135.407,-5821.695,0.8019806,0,0,0,0,100,0), -- 23:44:38 +(@PATH,16,9123.027,-5807.496,0.8282324,0,0,0,0,100,0), -- 23:44:45 +(@PATH,17,9106.761,-5805.003,0.785993,0,0,0,0,100,0), -- 23:44:51 +(@PATH,18,9088.161,-5809.791,0.7095211,0,0,0,0,100,0), -- 23:45:00 +(@PATH,19,9071.598,-5809.765,-0.6348054,0,0,0,0,100,0), -- 23:45:03 +(@PATH,20,9050.107,-5787.132,0.9787122,0,0,0,0,100,0), -- 23:45:10 +(@PATH,21,9049.096,-5785.835,1.078146,0,0,0,0,100,0); -- 23:45:20 + +-- Pathing for Ghostlands Guardian Entry: 16541 'TDB FORMAT' +SET @NPC := 145414; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7150.675,`position_y`=-7072.731,`position_z`=55.28159 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7150.675,-7072.731,55.28159,0,0,0,0,100,0), -- 11:51:25 +(@PATH,2,7140.165,-7095.667,56.32489,0,0,0,0,100,0), -- 11:51:41 +(@PATH,3,7134.295,-7111.137,58.849,0,0,0,0,100,0), -- 11:51:51 +(@PATH,4,7149.599,-7137.551,55.19991,0,0,0,0,100,0), -- 11:51:59 +(@PATH,5,7183.908,-7143.587,56.03042,0,0,0,0,100,0), -- 11:52:11 +(@PATH,6,7218.184,-7136.882,58.99335,0,0,0,0,100,0), -- 11:52:25 +(@PATH,7,7235.5,-7129.492,60.65919,0,0,0,0,100,0), -- 11:52:39 +(@PATH,8,7243.874,-7125.855,61.10926,0,30000,0,0,100,0), -- 11:52:51 +(@PATH,9,7243.135,-7095.02,61.9528,0,0,0,0,100,0), -- 11:53:38 +(@PATH,10,7224.584,-7078.627,58.69924,0,0,0,0,100,0), -- 11:54:28 +(@PATH,11,7189.417,-7063.731,58.10524,0,0,0,0,100,0); -- 11:54:29 + +-- Pathing for Ghostlands Guardian Entry: 16541 'TDB FORMAT' +SET @NPC := 81743; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7483.415,`position_y`=-6898.222,`position_z`=96.65485 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7483.415,-6898.222,96.65485,0,0,0,0,100,0), -- 22:01:51 +(@PATH,2,7490.502,-6889.069,94.41743,0,0,0,0,100,0), -- 22:01:59 +(@PATH,3,7481.624,-6866.266,88.67288,0,0,0,0,100,0), -- 22:02:05 +(@PATH,4,7480.969,-6837.274,77.65476,0,0,0,0,100,0), -- 22:02:16 +(@PATH,5,7480.024,-6797.451,76.10669,0,0,0,0,100,0), -- 22:02:28 +(@PATH,6,7478.713,-6785.392,77.4765,0,0,0,0,100,0), -- 22:02:43 +(@PATH,7,7479.419,-6793.053,76.67186,0,0,0,0,100,0), -- 22:02:54 +(@PATH,8,7480.9,-6834.077,76.25935,0,0,0,0,100,0), -- 22:03:02 +(@PATH,9,7480.634,-6861.903,86.81428,0,0,0,0,100,0), -- 22:03:17 +(@PATH,10,7490.069,-6885.811,93.34169,0,0,0,0,100,0); -- 22:03:30 + +-- Pathing for Ghostlands Guardian Entry: 16541 'TDB FORMAT' +SET @NPC := 81737; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7546.458,`position_y`=-6726.992,`position_z`=80.78694 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7546.458,-6726.992,80.78694,0,0,0,0,100,0), -- 22:05:54 +(@PATH,2,7527.194,-6732.486,80.58603,0,0,0,0,100,0), -- 22:06:08 +(@PATH,3,7604.331,-6767.942,85.9845,0,0,0,0,100,0), -- 22:09:49 +(@PATH,4,7593.505,-6753.936,89.24313,0,0,0,0,100,0), -- 22:09:59 +(@PATH,5,7575.111,-6734.221,84.59973,0,0,0,0,100,0); -- 22:10:07 + +-- Pathing for Ghostlands Guardian Entry: 16541 'TDB FORMAT' +SET @NPC := 81723; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7640.057,`position_y`=-6821.591,`position_z`=80.17661 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7640.057,-6821.591,80.17661,0,0,0,0,100,0), -- 22:05:42 +(@PATH,2,7633.815,-6796.717,78.65404,0,0,0,0,100,0), -- 22:05:51 +(@PATH,3,7615.372,-6775.387,80.24687,0,0,0,0,100,0), -- 22:06:00 +(@PATH,4,7632.267,-6793.745,77.46573,0,0,0,0,100,0), -- 22:06:15 +(@PATH,5,7634.777,-6800.083,79.74638,0,0,0,0,100,0), -- 22:06:27 +(@PATH,6,7649.132,-6834.647,83.15082,0,0,0,0,100,0), -- 22:06:37 +(@PATH,7,7656.086,-6858.044,87.99471,0,0,0,0,100,0), -- 22:06:45 +(@PATH,8,7651.524,-6839.359,84.67632,0,0,0,0,100,0), -- 22:06:56 +(@PATH,9,7640.049,-6821.556,80.16749,0,0,0,0,100,0); -- 22:07:05 + +-- Pathing for Ghostlands Guardian Entry: 16541 'TDB FORMAT' +SET @NPC := 81719; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7563.64,`position_y`=-6881.709,`position_z`=112.1673 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7563.64,-6881.709,112.1673,0,0,0,0,100,0), -- 18:53:33 +(@PATH,2,7551.659,-6901.236,112.1663,0,0,0,0,100,0), -- 18:53:38 +(@PATH,3,7555.867,-6910.663,111.9691,0,0,0,0,100,0), -- 18:56:12 +(@PATH,4,7565.996,-6914.735,108.4578,0,0,0,0,100,0), -- 18:53:51 +(@PATH,5,7579.56,-6906.405,103.1527,0,0,0,0,100,0), -- 18:54:00 +(@PATH,6,7591.544,-6890.522,95.51781,0,0,0,0,100,0), -- 18:54:08 +(@PATH,7,7595.471,-6871.276,94.72267,0,0,0,0,100,0), -- 18:54:18 +(@PATH,8,7586.251,-6861.987,93.77134,0,0,0,0,100,0), -- 18:54:24 +(@PATH,9,7577.42,-6854.581,93.04897,0,0,0,0,100,0), -- 18:55:26 +(@PATH,10,7578.87,-6826.335,87.31084,0,0,0,0,100,0), -- 18:54:34 +(@PATH,11,7578.864,-6821.618,86.92613,0,0,0,0,100,0), -- 18:54:47 +(@PATH,12,7561.332,-6803.103,87.30068,0,0,0,0,100,0), -- 18:55:15 +(@PATH,13,7560.291,-6799.682,87.58893,0,0,0,0,100,0), -- 18:55:08 +(@PATH,14,7556.946,-6782.622,89.82014,0,0,0,0,100,0), -- 18:54:58 +(@PATH,15,7560.291,-6799.682,87.58893,0,0,0,0,100,0), -- 18:55:08 +(@PATH,16,7561.332,-6803.103,87.30068,0,0,0,0,100,0), -- 18:55:15 +(@PATH,17,7578.864,-6821.618,86.92613,0,0,0,0,100,0), -- 18:54:47 +(@PATH,18,7578.87,-6826.335,87.31084,0,0,0,0,100,0), -- 18:54:34 +(@PATH,19,7577.42,-6854.581,93.04897,0,0,0,0,100,0), -- 18:55:26 +(@PATH,20,7588.399,-6863.539,93.97005,0,0,0,0,100,0), -- 18:55:39 +(@PATH,21,7593.956,-6877.988,95.42189,0,0,0,0,100,0), -- 18:55:48 +(@PATH,22,7583.048,-6903.001,101.4519,0,0,0,0,100,0), -- 18:55:55 +(@PATH,23,7570.524,-6913.488,106.4994,0,0,0,0,100,0), -- 18:56:05 +(@PATH,24,7555.867,-6910.663,111.9691,0,0,0,0,100,0), -- 18:56:12 +(@PATH,25,7551.659,-6901.236,112.1663,0,0,0,0,100,0), -- 18:53:38 +(@PATH,26,7563.374,-6882.594,112.1059,0,0,0,0,100,0); -- 18:56:20 + +-- Pathing for Ghostlands Guardian Entry: 16541 'TDB FORMAT' +SET @NPC := 81745; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7493.75,`position_y`=-6888.333,`position_z`=94.14599 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7493.75,-6888.333,94.14599,0,0,0,0,100,0), -- 21:57:19 +(@PATH,2,7481.219,-6899.196,97.32906,0,0,0,0,100,0), -- 21:57:29 +(@PATH,3,7455.676,-6912.633,103.082,0,0,0,0,100,0), -- 21:57:36 +(@PATH,4,7435.434,-6934.373,107.2755,0,0,0,0,100,0), -- 21:57:49 +(@PATH,5,7429.151,-6957.596,112.5967,0,0,0,0,100,0), -- 21:58:00 +(@PATH,6,7409.229,-6988.246,112.3306,0,0,0,0,100,0), -- 21:58:16 +(@PATH,7,7398.064,-7006.403,105.4191,0,0,0,0,100,0), -- 21:58:24 +(@PATH,8,7379.978,-7023.313,98.34062,0,0,0,0,100,0), -- 21:58:33 +(@PATH,9,7368.91,-7048.285,91.6894,0,0,0,0,100,0), -- 21:58:44 +(@PATH,10,7362.03,-7076.459,81.8666,0,0,0,0,100,0), -- 21:58:55 +(@PATH,11,7335.145,-7098.242,66.09917,0,0,0,0,100,0), -- 21:59:07 +(@PATH,12,7304.179,-7104.348,54.56339,0,0,0,0,100,0), -- 21:59:23 +(@PATH,13,7332.545,-7099.682,64.96516,0,0,0,0,100,0), -- 21:59:41 +(@PATH,14,7360.992,-7078.073,81.13574,0,0,0,0,100,0), -- 21:59:57 +(@PATH,15,7367.925,-7051.186,90.94432,0,0,0,0,100,0), -- 22:00:12 +(@PATH,16,7376.316,-7028.957,96.4644,0,0,0,0,100,0), -- 22:00:25 +(@PATH,17,7397.015,-7007.736,104.9266,0,0,0,0,100,0), -- 22:00:35 +(@PATH,18,7408.008,-6990.256,111.4358,0,0,0,0,100,0), -- 22:00:46 +(@PATH,19,7411.379,-6986.646,112.7126,0,0,0,0,100,0), -- 22:00:56 +(@PATH,20,7429.151,-6957.596,112.5967,0,0,0,0,100,0), -- 21:58:00 +(@PATH,21,7433.051,-6937.843,108.0633,0,0,0,0,100,0), -- 22:01:05 +(@PATH,22,7445.005,-6922.467,103.7956,0,0,0,0,100,0), -- 22:01:28 +(@PATH,23,7450.903,-6915.155,103.3749,0,0,0,0,100,0), -- 22:01:28 +(@PATH,24,7450.903,-6915.155,103.3749,0,0,0,0,100,0), -- 22:01:28 +(@PATH,25,7477.773,-6901.932,98.37746,0,0,0,0,100,0), -- 22:01:33 +(@PATH,26,7493.729,-6888.343,94.15305,0,0,0,0,100,0); -- 22:01:45 + +-- Pathing for Blacksmith Frances Entry: 17655 'TDB FORMAT' +SET @NPC := 81724; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7604.855,`position_y`=-6905.621,`position_z`=93.76188 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7604.855,-6905.621,93.76188,0.8203048,60000,0,0,100,0), -- 22:07:38 +(@PATH,2,7600.523,-6904.995,93.88599,0,0,0,0,100,0), -- 22:08:19 +(@PATH,3,7600.523,-6904.995,93.88599,1.780236,0,0,0,100,0), -- 22:08:21 +(@PATH,4,7600.064,-6907.846,93.76472,0,0,0,0,100,0), -- 22:09:30 +(@PATH,5,7600.523,-6904.995,93.88599,0,30000,0,0,100,0), -- 22:10:03 +(@PATH,6,7600.523,-6904.995,93.88599,1.780236,0,0,0,100,0), -- 22:10:04 +(@PATH,7,7598.409,-6904.81,94.34996,0,60000,0,0,100,0), -- 22:10:58 +(@PATH,8,7596.794,-6905.625,94.31394,3.996804,0,0,0,100,0), -- 22:10:59 +(@PATH,9,7600.523,-6904.995,93.88599,0,0,0,0,100,0), -- 22:11:26 +(@PATH,10,7600.523,-6904.995,93.88599,1.780236,0,0,0,100,0), -- 22:11:27 +(@PATH,11,7598.409,-6904.81,94.34996,0,60000,0,0,100,0), -- 22:12:20 +(@PATH,12,7596.794,-6905.625,94.31394,3.996804,0,0,0,100,0), -- 22:12:22 +(@PATH,13,7600.523,-6904.995,93.88599,0,0,0,0,100,0), -- 22:12:42 +(@PATH,14,7600.523,-6904.995,93.88599,1.780236,0,0,0,100,0), -- 22:12:44 +(@PATH,15,7604.855,-6905.621,93.76188,0,120000,0,0,100,0), -- 22:14:00 +(@PATH,16,7604.855,-6905.621,93.76188,0.8203048,0,0,0,100,0); -- 22:14:02 + +-- Pathing for Rathis Tomber Entry: 16224 'TDB FORMAT' +SET @NPC := 81720; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7638.232,`position_y`=-6842.241,`position_z`=84.2546 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7638.232,-6842.241,84.2546,2.076942,0,0,0,100,0), -- 22:09:02 +(@PATH,2,7636.98,-6839.962,83.24476,0,0,0,0,100,0), -- 22:09:36 +(@PATH,3,7637.41,-6837.574,82.88759,0,0,0,0,100,0), -- 22:09:38 +(@PATH,4,7639.8,-6835.542,82.59454,0,0,0,0,100,0), -- 22:09:39 +(@PATH,5,7643.04,-6835.119,82.58206,0,0,0,0,100,0), -- 22:09:40 +(@PATH,6,7644.657,-6837.574,83.20168,0,0,0,0,100,0), -- 22:09:41 +(@PATH,7,7644.05,-6838.9,83.9032,0,60000,0,0,100,0), +(@PATH,8,7645.192,-6836.052,83.1027,0,0,0,0,100,0), -- 22:09:50 +(@PATH,9,7642.421,-6834.729,82.59531,0,0,0,0,100,0), -- 22:09:51 +(@PATH,10,7639.884,-6835.1,82.53012,0,0,0,0,100,0), -- 22:09:52 +(@PATH,11,7637.52,-6837.243,82.75238,0,0,0,0,100,0), -- 22:09:53 +(@PATH,12,7636.066,-6839.554,82.94509,0,0,0,0,100,0), -- 22:09:55 +(@PATH,13,7637.412,-6842.98,83.70974,0,10000,0,0,100,0), -- 22:09:56 +(@PATH,14,7638.232,-6842.241,84.2546,0,0,0,0,100,0), -- 22:10:06 +(@PATH,15,7638.232,-6842.241,84.2546,2.076942,60000,0,0,100,0); -- 22:10:06 + +-- Pathing for Sentinel Infiltrator Entry: 16333 'TDB FORMAT' +SET @NPC := 85939; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=6826.52,`position_y`=-7216.635,`position_z`=26.2077 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,6826.52,-7216.635,26.2077,0,0,0,0,100,0), -- 18:25:44 +(@PATH,2,6840.17,-7215.392,27.32393,0,0,0,0,100,0), -- 18:25:48 +(@PATH,3,6842.315,-7214.781,27.5872,0,0,0,0,100,0), -- 18:25:52 +(@PATH,4,6847.95,-7208.919,27.60912,0,0,0,0,100,0), -- 18:25:54 +(@PATH,5,6846.517,-7200.238,27.39073,0,0,0,0,100,0), -- 18:25:58 +(@PATH,6,6836.5,-7187.716,26.55817,0,0,0,0,100,0), -- 18:26:01 +(@PATH,7,6829.814,-7187.942,25.16908,0,0,0,0,100,0), -- 18:26:05 +(@PATH,8,6828.214,-7188.198,24.70531,0,0,0,0,100,0), -- 18:26:08 +(@PATH,9,6820.545,-7191.426,24.19164,0,0,0,0,100,0), -- 18:26:11 +(@PATH,10,6816.887,-7196.539,24.25371,0,0,0,0,100,0), -- 18:26:15 +(@PATH,11,6816.825,-7206.355,24.66104,0,0,0,0,100,0), -- 18:26:18 +(@PATH,12,6824.003,-7215.546,25.92787,0,0,0,0,100,0); -- 18:26:22 + +-- Pathing for Sentinel Infiltrator Entry: 16333 'TDB FORMAT' +-- Needs SAI scripting +SET @NPC := 85810; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=6834.944,`position_y`=-7216.469,`position_z`=26.75792 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,6834.944,-7216.469,26.75792,0,0,0,0,100,0), -- 18:21:32 +(@PATH,2,6826.208,-7222.83,27.19634,0,0,0,0,100,0), -- 18:21:40 +(@PATH,3,6817.325,-7206.505,24.92965,0,0,0,0,100,0), -- 18:21:52 +(@PATH,4,6819.723,-7180.195,25.83248,0,0,0,0,100,0), -- 18:22:00 +(@PATH,5,6811.1,-7153.327,37.85592,0,0,0,0,100,0), -- 18:22:11 +(@PATH,6,6794.896,-7138.714,44.19709,0,0,0,0,100,0), -- 18:22:24 +(@PATH,7,6778.596,-7138.577,47.74215,0,0,0,0,100,0), -- 18:22:34 +(@PATH,8,6770.257,-7144.743,49.66928,0,0,0,0,100,0), -- 18:22:40 +(@PATH,9,6786.903,-7138.087,45.32982,0,0,0,0,100,0), -- 18:22:53 +(@PATH,10,6817.342,-7166.106,30.71012,0,0,0,0,100,0), -- 18:23:03 +(@PATH,11,6823.649,-7165.904,28.29505,0,0,0,0,100,0), -- 18:23:20 +(@PATH,12,6835.131,-7148.97,30.26661,0,0,0,0,100,0), -- 18:23:27 +(@PATH,13,6835.175,-7162.583,27.79875,0,0,0,0,100,0), -- 18:23:38 +(@PATH,14,6835.874,-7170.188,26.83617,0,0,0,0,100,0), -- 18:23:45 +(@PATH,15,6827.219,-7186.351,24.99562,0,0,0,0,100,0), -- 18:23:49 +(@PATH,16,6818.312,-7181.476,25.84511,0,0,0,0,100,0), -- 18:23:56 +(@PATH,17,6813.708,-7178.023,26.07334,0,0,0,0,100,0), -- 18:24:03 +(@PATH,18,6800.086,-7180.936,26.13367,0,0,0,0,100,0), -- 18:24:08 +(@PATH,19,6788.234,-7196.194,26.14623,0,0,0,0,100,0), -- 18:24:16 +(@PATH,20,6784.672,-7191.459,26.15236,0,0,0,0,100,0), -- 18:25:03 +(@PATH,21,6802.208,-7180.021,26.09461,0,0,0,0,100,0), -- 18:25:13 +(@PATH,22,6821.094,-7186.088,24.97617,0,0,0,0,100,0), -- 18:25:20 +(@PATH,23,6836.174,-7190.566,26.19097,0,0,0,0,100,0), -- 18:25:24 +(@PATH,24,6844.302,-7187.855,27.69562,0,0,0,0,100,0), -- 18:25:32 +(@PATH,25,6846.742,-7212.095,27.73918,0,0,0,0,100,0); -- 18:25:45 + +-- Pathing for Sentinel Infiltrator Entry: 16333 'TDB FORMAT' +-- Needs SAI scripting +SET @NPC := 85876; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=6814.882,`position_y`=-7163.52,`position_z`=33.06502 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,6814.882,-7163.52,33.06502,0,0,0,0,100,0), -- 18:26:55 +(@PATH,2,6796.829,-7138.427,44.13749,0,0,0,0,100,0), -- 18:27:03 +(@PATH,3,6778.327,-7138.773,48.00482,0,0,0,0,100,0), -- 18:27:16 +(@PATH,4,6776.107,-7139.004,48.73849,0,0,0,0,100,0), -- 18:27:24 +(@PATH,5,6783.224,-7137.825,46.49815,0,0,0,0,100,0), -- 18:27:51 +(@PATH,6,6794.398,-7137.108,44.60288,0,0,0,0,100,0), -- 18:27:56 +(@PATH,7,6800.035,-7146.845,40.49599,0,0,0,0,100,0), -- 18:28:01 +(@PATH,8,6795.779,-7165.81,32.8607,0,0,0,0,100,0), -- 18:28:05 +(@PATH,9,6794.719,-7181.562,26.63479,0,0,0,0,100,0), -- 18:28:14 +(@PATH,10,6794.198,-7190.434,25.95545,0,0,0,0,100,0), -- 18:28:24 +(@PATH,11,6789.857,-7191.004,25.8968,0,0,0,0,100,0), -- 18:28:38 +(@PATH,12,6789.924,-7190.855,26.1468,0,0,0,0,100,0), -- 18:28:41 +(@PATH,13,6801.363,-7179.81,25.90792,0,0,0,0,100,0), -- 18:28:54 +(@PATH,14,6801.586,-7179.51,26.09436,0,0,0,0,100,0), -- 18:29:01 +(@PATH,15,6817.118,-7187.298,24.99203,0,0,0,0,100,0), -- 18:29:06 +(@PATH,16,6818.806,-7191.954,24.44993,0,0,0,0,100,0), -- 18:29:13 +(@PATH,17,6819.498,-7215.1,25.45433,0,0,0,0,100,0), -- 18:29:18 +(@PATH,18,6817.387,-7217.657,26.22639,0,0,0,0,100,0), -- 18:29:24 +(@PATH,19,6815.59,-7207.964,25.15621,0,0,0,0,100,0), -- 18:29:35 +(@PATH,20,6816.641,-7195.688,24.46806,0,0,0,0,100,0), -- 18:29:44 +(@PATH,21,6830.292,-7179.979,26.3147,0,0,0,0,100,0), -- 18:29:50 +(@PATH,22,6823.895,-7177.721,26.77645,0,0,0,0,100,0); -- 18:30:03 + +-- Pathing for Shadowpine Catlord Entry: 16345 'TDB FORMAT' +SET @NPC := 85833; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=6825.845,`position_y`=-7407.999,`position_z`=47.05538 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,6825.845,-7407.999,47.05538,0,0,0,0,100,0), -- 18:03:11 +(@PATH,2,6819.822,-7407.742,47.8176,0,0,0,0,100,0), -- 18:03:23 +(@PATH,3,6797.965,-7395.941,47.85873,0,0,0,0,100,0), -- 18:03:32 +(@PATH,4,6790.372,-7391.337,48.14279,0,0,0,0,100,0), -- 18:05:27 +(@PATH,5,6785.934,-7382.063,48.67854,0,0,0,0,100,0), -- 18:05:12 +(@PATH,6,6780.216,-7369.419,49.53757,0,0,0,0,100,0), -- 18:03:44 +(@PATH,7,6762.875,-7356.745,49.3274,0,0,0,0,100,0), -- 18:03:59 +(@PATH,8,6757.482,-7359.899,49.68204,0,0,0,0,100,0), -- 18:04:51 +(@PATH,9,6752.945,-7365.431,51.41992,0,0,0,0,100,0), -- 18:04:05 +(@PATH,10,6736.967,-7385.644,51.58582,0,0,0,0,100,0), -- 18:04:20 +(@PATH,11,6707.192,-7407.871,51.19869,0,0,0,0,100,0), -- 18:04:48 +(@PATH,12,6706.392,-7408.471,51.19869,0,0,0,0,100,0), -- 18:04:48 +(@PATH,13,6736.911,-7385.608,51.53582,0,0,0,0,100,0), -- 18:04:48 +(@PATH,14,6752.945,-7365.431,51.41992,0,0,0,0,100,0), -- 18:04:05 +(@PATH,15,6757.482,-7359.899,49.68204,0,0,0,0,100,0), -- 18:04:51 +(@PATH,16,6765.563,-7357.226,49.71237,0,0,0,0,100,0), -- 18:05:06 +(@PATH,17,6780.216,-7369.419,49.53757,0,0,0,0,100,0), -- 18:03:44 +(@PATH,18,6785.934,-7382.063,48.67854,0,0,0,0,100,0), -- 18:05:12 +(@PATH,19,6790.372,-7391.337,48.14279,0,0,0,0,100,0), -- 18:05:27 +(@PATH,20,6797.965,-7395.941,47.85873,0,0,0,0,100,0), -- 18:03:32 +(@PATH,21,6819.822,-7407.742,47.8176,0,0,0,0,100,0); -- 18:03:23 + +-- Pathing for Shadowpine Catlord Entry: 16345 'TDB FORMAT' +SET @NPC := 85899; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=6642.614,`position_y`=-7403.334,`position_z`=65.37686 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,6642.614,-7403.334,65.37686,0,0,0,0,100,0), -- 18:12:02 +(@PATH,2,6655.589,-7402.668,65.25717,0,0,0,0,100,0), -- 18:12:07 +(@PATH,3,6659.145,-7404.814,64.66093,0,0,0,0,100,0), -- 18:12:13 +(@PATH,4,6666.81,-7405.762,59.45066,0,0,0,0,100,0), -- 18:12:16 +(@PATH,5,6670.078,-7400.617,57.92281,0,0,0,0,100,0), -- 18:12:19 +(@PATH,6,6683.644,-7387.567,57.7993,0,0,0,0,100,0), -- 18:12:25 +(@PATH,7,6694.211,-7385.182,53.51888,0,0,0,0,100,0), -- 18:12:30 +(@PATH,8,6701.323,-7375.21,53.19016,0,0,0,0,100,0), -- 18:12:39 +(@PATH,9,6706.042,-7306.476,52.34984,0,0,0,0,100,0), -- 18:12:56 +(@PATH,10,6698.629,-7306.6,52.3459,0,0,0,0,100,0), -- 18:13:09 +(@PATH,11,6658.128,-7346.422,53.5539,0,0,0,0,100,0), -- 18:13:25 +(@PATH,12,6663.863,-7357.194,55.34796,0,0,0,0,100,0), -- 18:13:40 +(@PATH,13,6687.574,-7370.823,53.74558,0,0,0,0,100,0), -- 18:13:48 +(@PATH,14,6692.782,-7383.596,54.75917,0,0,0,0,100,0), -- 18:14:00 +(@PATH,15,6679.604,-7389.391,57.81517,0,0,0,0,100,0), -- 18:14:09 +(@PATH,16,6668.09,-7405,57.93337,0,0,0,0,100,0), -- 18:14:14 +(@PATH,17,6663.221,-7406.32,61.86858,0,0,0,0,100,0), -- 18:14:20 +(@PATH,18,6657.667,-7403.231,64.99197,0,0,0,0,100,0), -- 18:14:23 +(@PATH,19,6646.945,-7407.651,65.2119,0,0,0,0,100,0), -- 18:14:27 +(@PATH,20,6642.138,-7401.195,67.02313,0,0,0,0,100,0), -- 18:14:32 +(@PATH,21,6643.672,-7393.591,70.57539,0,0,0,0,100,0), -- 18:14:37 +(@PATH,22,6648.191,-7390.153,70.75128,0,0,0,0,100,0), -- 18:14:41 +(@PATH,23,6655.95,-7390.098,70.72308,0,0,0,0,100,0), -- 18:14:45 +(@PATH,24,6672.11,-7389.826,70.80399,0,0,0,0,100,0), -- 18:14:49 +(@PATH,25,6674.516,-7400.391,70.78954,0,0,0,0,100,0), -- 18:14:54 +(@PATH,26,6670.333,-7405.347,70.74722,0,0,0,0,100,0), -- 18:14:58 +(@PATH,27,6655.763,-7405.991,70.77985,0,0,0,0,100,0), -- 18:15:03 +(@PATH,28,6652.884,-7398.17,70.53949,0,0,0,0,100,0), -- 18:15:08 +(@PATH,29,6648.519,-7390.229,70.74633,0,0,0,0,100,0), -- 18:15:14 +(@PATH,30,6643.527,-7393.528,70.72253,0,0,0,0,100,0), -- 18:15:17 +(@PATH,31,6642.74,-7403.402,65.47425,0,0,0,0,100,0); -- 18:15:22 + +-- Pathing for Shadowpine Hexxer Entry: 16346 'TDB FORMAT' +SET @NPC := 85922; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=6544.311,`position_y`=-7415.042,`position_z`=66.8414 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,6544.311,-7415.042,66.8414,0,0,0,0,100,0), -- 18:12:06 +(@PATH,2,6557.531,-7398.131,62.547,0,0,0,0,100,0), -- 18:12:18 +(@PATH,3,6584.465,-7368.215,56.64576,0,0,0,0,100,0), -- 18:12:52 +(@PATH,4,6589.184,-7361.762,55.35123,0,0,0,0,100,0), -- 18:12:52 +(@PATH,5,6593.902,-7355.309,54.72623,0,0,0,0,100,0), -- 18:12:52 +(@PATH,6,6598.534,-7348.974,54.28678,0,0,0,0,100,0), -- 18:12:52 +(@PATH,7,6603.207,-7346.335,54.47303,0,0,0,0,100,0), -- 18:15:13 +(@PATH,8,6609.078,-7343.148,54.03077,0,0,0,0,100,0), -- 18:12:53 +(@PATH,9,6619.535,-7340.988,53.94233,0,0,0,0,100,0), -- 18:15:00 +(@PATH,10,6636.512,-7345.48,53.38771,0,0,0,0,100,0), -- 18:13:02 +(@PATH,11,6650.978,-7350.788,53.67146,0,0,0,0,100,0), -- 18:14:42 +(@PATH,12,6679.457,-7366.645,54.62379,0,0,0,0,100,0), -- 18:13:15 +(@PATH,13,6688.482,-7368.755,53.68621,0,0,0,0,100,0), -- 18:13:31 +(@PATH,14,6707.076,-7373.765,53.0295,0,0,0,0,100,0), -- 18:14:20 +(@PATH,15,6724.337,-7391.231,52.32455,0,0,0,0,100,0), -- 18:13:40 +(@PATH,16,6742.169,-7407.499,51.53728,0,0,0,0,100,0), -- 18:13:54 +(@PATH,17,6740.595,-7406.18,51.4976,0,0,0,0,100,0), -- 18:14:08 +(@PATH,18,6724.337,-7391.231,52.32455,0,0,0,0,100,0), -- 18:13:40 +(@PATH,19,6707.076,-7373.765,53.0295,0,0,0,0,100,0), -- 18:14:20 +(@PATH,20,6686.671,-7368.761,53.71722,0,0,0,0,100,0), -- 18:14:34 +(@PATH,21,6679.457,-7366.645,54.62379,0,0,0,0,100,0), -- 18:13:15 +(@PATH,22,6650.978,-7350.788,53.67146,0,0,0,0,100,0), -- 18:14:42 +(@PATH,23,6636.512,-7345.48,53.38771,0,0,0,0,100,0), -- 18:13:02 +(@PATH,24,6619.535,-7340.988,53.94233,0,0,0,0,100,0), -- 18:15:00 +(@PATH,25,6609.078,-7343.148,54.03077,0,0,0,0,100,0), -- 18:12:53 +(@PATH,26,6603.207,-7346.335,54.47303,0,0,0,0,100,0), -- 18:15:13 +(@PATH,27,6598.534,-7348.974,54.28678,0,0,0,0,100,0), -- 18:12:52 +(@PATH,28,6593.902,-7355.309,54.72623,0,0,0,0,100,0), -- 18:12:52 +(@PATH,29,6586.425,-7365.703,56.44064,0,0,0,0,100,0), -- 18:15:20 +(@PATH,30,6560.438,-7394.56,61.59495,0,0,0,0,100,0), -- 18:15:30 +(@PATH,31,6544.499,-7415.031,66.93755,0,0,0,0,100,0); -- 18:15:45 diff --git a/sql/updates/world/3.3.5/2016_06_09_00_world.sql b/sql/updates/world/3.3.5/2016_06_09_00_world.sql new file mode 100644 index 00000000000..f3a8ec3d6e8 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_09_00_world.sql @@ -0,0 +1,33 @@ +-- Mountaineer Pebblebitty (creature_template.entry 3836) +SET @ENTRY := 3836; + +UPDATE `creature_template` SET `AIName`= "SmartAI", `ScriptName`= '' WHERE `entry`= @ENTRY; + +-- Correct gossip_menu_options for Quest 3181 gossip +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1201,1202,1203,1204,1205,1206) AND `id` = 0; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(1201, 0,0, "What's the worst that could happen?", 4266, 1,1, 1202, 0,0,0,'',0), +(1202, 0,0, "Another way? Do tell...", 4268, 1,1, 1203, 0,0,0,'',0), +(1203, 0,0, "Orcs? Badlands? I'm invulnerable!", 4270, 1,1, 1204, 0,0,0,'',0), +(1204, 0,0, "Absolutely!", 4272, 1,1, 1205, 0,0,0,'',0), +(1205, 0,0, "My apologies, Pebblebitty.", 4274, 1,1, 1206, 0,0,0,'',0), +(1206, 0,0, "Done, done, and done.", 4276, 1,1, 0, 0,0,0,'',0); + +-- Link gossip_menu_option.menu_id to npc_text.ID (1201,1833 already in TDB) +DELETE FROM `gossip_menu` WHERE `entry` IN (1202,1203,1204,1205,1206); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(1202,1834), +(1203,1835), +(1204,1836), +(1205,1837), +(1206,1838); + +-- Mountaineer Pebblebitty gossip SAI for quest 3181 (gossip has to be closed) +DELETE FROM `smart_scripts` WHERE `entryorguid`= @ENTRY AND `source_type` = 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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,62,0,100,0,1206,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Mountaineer Pebblebitty - on Gossip Menu Option 1206 selected - Close Gossip"); + +-- Condition for gossip_menu_option 1201 and Quest 3181 (The Horn of the Beast) +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup`= 1201; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15, 1201,0, 0,0, 28,0, 3181,0,0, 0,0,0, '', 'Show gossip menu option 1201 only if Quest 3181 is completed'); diff --git a/sql/updates/world/3.3.5/2016_06_09_01_world.sql b/sql/updates/world/3.3.5/2016_06_09_01_world.sql new file mode 100644 index 00000000000..b29242b6038 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_09_01_world.sql @@ -0,0 +1,14 @@ +-- Majordomo Executus' gossip when friendly (entry 12018 in 3.3.5) +UPDATE `creature_template` SET `gossip_menu_id` = 4093 WHERE `entry` = 12018; + +DELETE FROM `gossip_menu` WHERE `entry` IN (4108,4109,4093) AND `text_id` IN (4995,5011,5012); +INSERT INTO gossip_menu (`entry`,`text_id`) VALUES +(4093, 4995), -- 54404 (Majordomo Executus' DB entry ID from retail) +(4109, 5011), -- 54404 (Majordomo Executus' DB entry ID from retail) +(4108, 5012); -- 54404 (Majordomo Executus' DB entry ID from retail) + +DELETE FROM `gossip_menu_option` WHERE (`menu_id`=4108 AND `id`=0) OR (`menu_id`=4109 AND `id`=0) OR (`menu_id`=4093 AND `id`=0); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(4093,0,0, 'Tell me more.', 7675,1,1,4109,0,0,0,'',0), -- menu_id + text in TDB 6.04 +(4109,0,0, 'What else do you have to say?', 7673,1,1,4108,0,0,0,'',0), -- menu_id + text in TDB 6.04 +(4108,0,0, 'You challenged us and we have come. Where is this master you speak of?\n', 7646,1,1, 0,0,0,0,'',0); -- menu_id + text in TDB 6.04 diff --git a/sql/updates/world/3.3.5/2016_06_09_02_world.sql b/sql/updates/world/3.3.5/2016_06_09_02_world.sql new file mode 100644 index 00000000000..b2a7d985a9f --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_09_02_world.sql @@ -0,0 +1,21 @@ +-- Correct gossip menu option lines, text found in broadcast_text: +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (6186,6185,6187,6208,6209,6210,6211); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(6186, 0,0, "I am ready to discover where my fortune lies!",10047,1,1,6185,0,0,0,'',0), +(6185, 0,0, "I slay the man on the spot as my liege would expect me to do, as he is nothing more than a thief and a liar.", 10049,1,1,6187,0,0,0,'',0), +(6185, 1,0, "I turn over the man to my liege for punishment, as he has broken the law of the land and it is my sworn duty to enforce it.", 10050,1,1,6187,0,0,0,'',0), +(6185, 2,0, "I confiscate the corn he has stolen, warn him that stealing is a path towards doom and destruction, but I let him go to return to his family.", 10051,1,1,6187,0,0,0,'',0), +(6185, 3,0, "I allow the man to take enough corn to feed his family for a couple of days, encouraging him to leave the land.", 10052,1,1,6187,0,0,0,'',0), +(6187, 0,0, "I execute him as per my liege's instructions, and do it in such a manner that he suffers painfully before he dies as retribution for his crimes against my people.", 10075,1,1,6208,0,0,0,'',0), +(6187, 1,0, "I execute him as per my liege's instructions, but doing so in as painless of a way as possible. Justice must be served, but I can show some compassion.", 10076,1,1,6208,0,0,0,'',0), +(6187, 2,0, "I risk my own life and free him so that he may prove his innocence. If I can, I'll help him in any way.", 10077,1,1,6208,0,0,0,'',0), +(6208, 0,0, "I confront the ruler on his malicious behavior, upholding my liege's honor at the risk of any future diplomacy.", 10079,1,1,6209,0,0,0,'',0), +(6208, 1,0, "I not-so-quietly ignore the insult, hoping to instill a fear in the ruler that he may have gaffed. I then inform my liege of the insult when I return.", 10080,1,1,6209,0,0,0,'',0), +(6208, 2,0, "I quietly ignore the insult. I will not tell my liege, as I am to secure peace at all costs. It's only an insult - not a declaration of war.", 10081,1,1,6209,0,0,0,'',0), +(6209, 0,0, "I would speak against my brother joining the order, rushing a permanent breach in our relationship. He would be a danger to himself and those around him, and that is too great a risk hoping he would improve over time.", 10083,1,1,6210,0,0,0,'',0), +(6209, 1,0, "I would speak for my brother joining the order, potentially risking the safety of the order. I could help him with the order's regimens, and I'd have faith in his ability to adapt and learn.", 10084,1,1,6210,0,0,0,'',0), +(6209, 2,0, "I would create some surreptitious means to keep my brother out of the order. I can keep him out without him being any bit wiser, thereby saving our familial bonds.", 10085,1,1,6210,0,0,0,'',0), +(6210, 0,0, "I would show my liege the beast's ear and claim the beast's death as my own, taking the reward for my own use. It is wrong to claim a deed as your own that someone else in fact did.", 10086,1,1,6211,0,0,0,'',0), +(6210, 1,0, "I would show my liege the beast's ear and claim the beast's death as my own - after all, I did slay it. I would then offer some of the reward to the destitute knight to help his family.", 10088,1,1,6211,0,0,0,'',0), +(6210, 2,0, "I would remain silent about the kill and allow the knight to claim the reward to aid his family.", 10089,1,1,6211,0,0,0,'',0), +(6211, 0,0, "I'd love to get one of those written fortunes you mentioned! I've got the space in my inventory for it.", 10091,1,1,0,0,0,0,'',0); diff --git a/sql/updates/world/3.3.5/2016_06_09_03_world_335.sql b/sql/updates/world/3.3.5/2016_06_09_03_world_335.sql new file mode 100644 index 00000000000..c4be18500b9 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_09_03_world_335.sql @@ -0,0 +1,23 @@ +-- Remove outdated ScriptName from NPC 7775 Gregan Brewspewer +UPDATE `creature_template` SET `ScriptName`= '' WHERE `entry`= 7775; + +-- Remove broadcast_text link from Gregan's default gossip "What can I do for ya?" +-- to enable npc_text.ID 2433 "Hi there! The name's Gregan. What can I do for ya?" +-- This mixup is caused by invalid duplicate use of BroadcastTextID0 = 8275, +-- duplicate of npc_text.ID 5695, used by NPC entry 5167 Fenthwick <Rogue Trainer> +-- Lookup queries to verify this information: +-- SELECT * FROM `npc_text` WHERE `BroadcastTextID0`= 8275; -- (ID 2433 + 5695) +-- SELECT * FROM `gossip_menu` WHERE `text_id`= 5695; -- (4561,5695) +-- SELECT * FROM `gossip_menu_option` WHERE `menu_id`= 4561; -- (id 0,1,2,4) "I'm lookin' for rogue trainin'." +-- SELECT * FROM `creature_template` WHERE `gossip_menu_id`= 4561; -- (5167 Fenthwick <Rogue Trainer>) + +UPDATE `npc_text` SET `BroadcastTextID0`= 0 WHERE `ID`= 2433; -- old (invalid) BroadcastTextID0 : 8275 + +-- Activate selection of the next gossip menus in the gossip dialogue +UPDATE `gossip_menu_option` SET `action_menu_id`= 1801 WHERE `menu_id`= 1802 AND `id`= 0; +UPDATE `gossip_menu_option` SET `action_menu_id`= 1915 WHERE `menu_id`= 1801 AND `id`= 0; + +-- Condition for gossip_menu_option.menu_id 1802, shown in Gregan Brewspewer's default gossip menu 2433 +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup`= 1802 AND `SourceEntry`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15, 1802, 0, 0, 0, 9, 0, 3909, 0, 0, 0, 0, 0, "", "Show Gossip Menu Option menu_id 1802 id 0 if Quest 3909 is taken (active)"); diff --git a/sql/updates/world/3.3.5/2016_06_09_04_world.sql b/sql/updates/world/3.3.5/2016_06_09_04_world.sql new file mode 100644 index 00000000000..ecff9eb7ce6 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_09_04_world.sql @@ -0,0 +1,6 @@ +-- NPC ID 17603 Grandmother gossip_menu_option (new rows) +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (7441,7442,7443); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(7441,0,0,"Oh, grandmother, what big ears you have.", 14217,0,0,7442,0,0,0,'',0), +(7442,0,0,"Oh, grandmother, what big eyes you have.", 14219,0,0,7443,0,0,0,'',0), +(7443,0,0,"Oh, grandmother, what phat lewts you have.",14221,0,0, 0,0,0,0,'',0); diff --git a/sql/updates/world/3.3.5/2016_06_09_05_world.sql b/sql/updates/world/3.3.5/2016_06_09_05_world.sql new file mode 100644 index 00000000000..50c99117c03 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_09_05_world.sql @@ -0,0 +1,82 @@ +-- NPC entry 29665 (Pazik "The Pick" Prylock), 29725 (Benik Boltshear) and 29728 (Walter Soref) +SET @MENU_ID := 9823; +SET @Pazik := 29665; +SET @Benik := 29725; +SET @Walter := 29728; + +-- Corrected gossip menu options based on text found in broadcast_text: +DELETE FROM `gossip_menu_option` WHERE `menu_id` = @MENU_ID; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(@MENU_ID, 0,0, "I've lost my key to Scholomance.", 30315,1,1,0,0,0,0,'',0), +(@MENU_ID, 1,0, "I've lost my key to The Arcatraz.", 30316,1,1,0,0,0,0,'',0), +(@MENU_ID, 2,0, "I've lost my key to The Shattered Halls.", 30317,1,1,0,0,0,0,'',0), +(@MENU_ID, 3,0, "I've lost my key to Searing Gorge.", 30318,1,1,0,0,0,0,'',0), +(@MENU_ID, 4,0, "I've lost my Shadowforge Key.", 30319,1,1,0,0,0,0,'',0), +(@MENU_ID, 5,0, "I've lost The Eye of Haramad.", 30320,1,1,0,0,0,0,'',0), +(@MENU_ID, 6,0, "I've lost my key to Karazhan.", 30321,1,1,0,0,0,0,'',0), +(@MENU_ID, 7,0, "I've lost my key to the Violet Hold.", 35500,1,1,0,0,0,0,'',0), +(@MENU_ID, 8,0, "I've lost my Essence-Infused Moonstone. Can you replace it?", 20969,1,1,0,0,0,0,'',0); + +-- Walter Soref is missing his npcflag for gossip (the other 2 locksmiths are OK) +UPDATE `creature` SET `npcflag`=(`npcflag`|1) WHERE `id` = @Walter; + +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName`= '' WHERE `entry` IN (@Pazik,@Benik,@Walter); + +DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` IN (@Pazik,@Benik,@Walter); +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@Pazik, 0,0,9,62,0,100,0,9823,0,0,0,11,54883,0,0,0,0,0,7,0,0,0,0,0,0,0,"Pazik \"The Pick\" Prylock - on Gossip Option 0 selected - cast 'Create Skeleton Key'"), +(@Pazik, 0,1,9,62,0,100,0,9823,1,0,0,11,54881,0,0,0,0,0,7,0,0,0,0,0,0,0,"Pazik \"The Pick\" Prylock - on Gossip Option 1 selected - cast 'Create Key to the Arcatraz'"), +(@Pazik, 0,2,9,62,0,100,0,9823,2,0,0,11,54884,0,0,0,0,0,7,0,0,0,0,0,0,0,"Pazik \"The Pick\" Prylock - on Gossip Option 2 selected - cast 'Create Shattered Halls Key'"), +(@Pazik, 0,3,9,62,0,100,0,9823,3,0,0,11,54880,0,0,0,0,0,7,0,0,0,0,0,0,0,"Pazik \"The Pick\" Prylock - on Gossip Option 3 selected - cast 'Create Key to Searing Gorge'"), +(@Pazik, 0,4,9,62,0,100,0,9823,4,0,0,11,54882,0,0,0,0,0,7,0,0,0,0,0,0,0,"Pazik \"The Pick\" Prylock - on Gossip Option 4 selected - cast 'Create Shadowforge Key'"), +(@Pazik, 0,5,9,62,0,100,0,9823,5,0,0,11,54887,0,0,0,0,0,7,0,0,0,0,0,0,0,"Pazik \"The Pick\" Prylock - on Gossip Option 5 selected - cast 'Create They Eye of Haramad'"), +(@Pazik, 0,6,9,62,0,100,0,9823,6,0,0,11,54885,0,0,0,0,0,7,0,0,0,0,0,0,0,"Pazik \"The Pick\" Prylock - on Gossip Option 6 selected - cast 'Create The Master's Key'"), +(@Pazik, 0,7,9,62,0,100,0,9823,7,0,0,11,67253,0,0,0,0,0,7,0,0,0,0,0,0,0,"Pazik \"The Pick\" Prylock - on Gossip Option 7 selected - cast 'Create The Violet Hold Key'"), +(@Pazik, 0,8,9,62,0,100,0,9823,8,0,0,11,40173,0,0,0,0,0,7,0,0,0,0,0,0,0,"Pazik \"The Pick\" Prylock - on Gossip Option 8 selected - cast 'Create Essence-Infused Moonstone'"), +(@Pazik, 0,9,0,61,0,100,0, 0,0,0,0,72, 0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Pazik \"The Pick\" Prylock - on Gossip Option * selected - close Gossip"), +(@Benik, 0,0,9,62,0,100,0,9823,0,0,0,11,54883,0,0,0,0,0,7,0,0,0,0,0,0,0,"Benik Boltshear - on Gossip Option 0 selected - cast 'Create Skeleton Key'"), +(@Benik, 0,1,9,62,0,100,0,9823,1,0,0,11,54881,0,0,0,0,0,7,0,0,0,0,0,0,0,"Benik Boltshear - on Gossip Option 1 selected - cast 'Create Key to the Arcatraz'"), +(@Benik, 0,2,9,62,0,100,0,9823,2,0,0,11,54884,0,0,0,0,0,7,0,0,0,0,0,0,0,"Benik Boltshear - on Gossip Option 2 selected - cast 'Create Shattered Halls Key'"), +(@Benik, 0,3,9,62,0,100,0,9823,3,0,0,11,54880,0,0,0,0,0,7,0,0,0,0,0,0,0,"Benik Boltshear - on Gossip Option 3 selected - cast 'Create Key to Searing Gorge'"), +(@Benik, 0,4,9,62,0,100,0,9823,4,0,0,11,54882,0,0,0,0,0,7,0,0,0,0,0,0,0,"Benik Boltshear - on Gossip Option 4 selected - cast 'Create Shadowforge Key'"), +(@Benik, 0,5,9,62,0,100,0,9823,5,0,0,11,54887,0,0,0,0,0,7,0,0,0,0,0,0,0,"Benik Boltshear - on Gossip Option 5 selected - cast 'Create They Eye of Haramad'"), +(@Benik, 0,6,9,62,0,100,0,9823,6,0,0,11,54885,0,0,0,0,0,7,0,0,0,0,0,0,0,"Benik Boltshear - on Gossip Option 6 selected - cast 'Create The Master's Key'"), +(@Benik, 0,7,9,62,0,100,0,9823,7,0,0,11,67253,0,0,0,0,0,7,0,0,0,0,0,0,0,"Benik Boltshear - on Gossip Option 7 selected - cast 'Create The Violet Hold Key'"), +(@Benik, 0,8,9,62,0,100,0,9823,8,0,0,11,40173,0,0,0,0,0,7,0,0,0,0,0,0,0,"Benik Boltshear - on Gossip Option 8 selected - cast 'Create Essence-Infused Moonstone'"), +(@Benik, 0,9,0,61,0,100,0, 0,0,0,0,72, 0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Benik Boltshear - on Gossip Option * selected - close Gossip"), +(@Walter,0,0,9,62,0,100,0,9823,0,0,0,11,54883,0,0,0,0,0,7,0,0,0,0,0,0,0,"Walter Soref - on Gossip Option 0 selected - cast 'Create Skeleton Key'"), +(@Walter,0,1,9,62,0,100,0,9823,1,0,0,11,54881,0,0,0,0,0,7,0,0,0,0,0,0,0,"Walter Soref - on Gossip Option 1 selected - cast 'Create Key to the Arcatraz'"), +(@Walter,0,2,9,62,0,100,0,9823,2,0,0,11,54884,0,0,0,0,0,7,0,0,0,0,0,0,0,"Walter Soref - on Gossip Option 2 selected - cast 'Create Shattered Halls Key'"), +(@Walter,0,3,9,62,0,100,0,9823,3,0,0,11,54880,0,0,0,0,0,7,0,0,0,0,0,0,0,"Walter Soref - on Gossip Option 3 selected - cast 'Create Key to Searing Gorge'"), +(@Walter,0,4,9,62,0,100,0,9823,4,0,0,11,54882,0,0,0,0,0,7,0,0,0,0,0,0,0,"Walter Soref - on Gossip Option 4 selected - cast 'Create Shadowforge Key'"), +(@Walter,0,5,9,62,0,100,0,9823,5,0,0,11,54887,0,0,0,0,0,7,0,0,0,0,0,0,0,"Walter Soref - on Gossip Option 5 selected - cast 'Create They Eye of Haramad'"), +(@Walter,0,6,9,62,0,100,0,9823,6,0,0,11,54885,0,0,0,0,0,7,0,0,0,0,0,0,0,"Walter Soref - on Gossip Option 6 selected - cast 'Create The Master's Key'"), +(@Walter,0,7,9,62,0,100,0,9823,7,0,0,11,67253,0,0,0,0,0,7,0,0,0,0,0,0,0,"Walter Soref - on Gossip Option 7 selected - cast 'Create The Violet Hold Key'"), +(@Walter,0,8,9,62,0,100,0,9823,8,0,0,11,40173,0,0,0,0,0,7,0,0,0,0,0,0,0,"Walter Soref - on Gossip Option 8 selected - cast 'Create Essence-Infused Moonstone'"), +(@Walter,0,9,0,61,0,100,0, 0,0,0,0,72, 0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Walter Soref - on Gossip Option * selected - close Gossip"); + +-- conditions for gossip_menu_option.menu_id 9823: +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup`= @MENU_ID; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@MENU_ID,0,0, 0, 8,0, 5505,0,0, 0,0,0,'',"Show gossip option 9823 id 0 if quest 5505 is rewarded AND player does NOT have item 13704."), +(15,@MENU_ID,0,0, 0, 2,0,13704,1,0, 1,0,0,'',"Show gossip option 9823 id 0 if player does NOT have item 13704 AND quest 5505 is rewarded."), +(15,@MENU_ID,0,0, 1, 8,0, 5511,0,0, 0,0,0,'',"Show gossip option 9823 id 0 if quest 5511 is rewarded AND player does NOT have item 13704."), +(15,@MENU_ID,0,0, 1, 2,0,13704,1,0, 1,0,0,'',"Show gossip option 9823 id 0 if player does NOT have item 13704 AND quest 5511 is rewarded."), +(15,@MENU_ID,1,0, 0, 8,0,10704,0,0, 0,0,0,'',"Show gossip option 9823 id 1 if quest 10704 is rewarded AND player does NOT have item 31084."), +(15,@MENU_ID,1,0, 0, 2,0,31084,1,0, 1,0,0,'',"Show gossip option 9823 id 1 if player does NOT have item 31084 AND quest 10704 is rewarded."), +(15,@MENU_ID,2,0, 0, 8,0,10758,0,0, 0,0,0,'',"Show gossip option 9823 id 2 if quest 10758 is rewarded AND player does NOT have item 28395."), +(15,@MENU_ID,2,0, 0, 2,0,28395,1,0, 1,0,0,'',"Show gossip option 9823 id 2 if player does NOT have item 28395 AND quest 10758 is rewarded."), +(15,@MENU_ID,2,0, 1, 8,0,10764,0,0, 0,0,0,'',"Show gossip option 9823 id 2 if quest 10764 is rewarded AND player does NOT have item 28395."), +(15,@MENU_ID,2,0, 1, 2,0,28395,1,0, 1,0,0,'',"Show gossip option 9823 id 2 if player does NOT have item 28395 AND quest 10764 is rewarded."), +(15,@MENU_ID,3,0, 0, 8,0, 3201,0,0, 0,0,0,'',"Show gossip option 9823 id 3 if quest 3201 is rewarded AND player does NOT have item 5396."), +(15,@MENU_ID,3,0, 0, 2,0, 5396,1,0, 1,0,0,'',"Show gossip option 9823 id 3 if player does NOT have item 5396 AND quest 3201 is rewarded."), +(15,@MENU_ID,4,0, 0, 8,0, 3802,0,0, 0,0,0,'',"Show gossip option 9823 id 4 if quest 3802 is rewarded AND player does NOT have item 11000."), +(15,@MENU_ID,4,0, 0, 2,0,11000,1,0, 1,0,0,'',"Show gossip option 9823 id 4 if player does NOT have item 11000 AND quest 3802 is rewarded."), +(15,@MENU_ID,5,0, 0, 8,0,10982,0,0, 0,0,0,'',"Show gossip option 9823 id 5 if quest 10982 is rewarded AND player does NOT have item 32092."), +(15,@MENU_ID,5,0, 0, 2,0,32092,1,0, 1,0,0,'',"Show gossip option 9823 id 5 if player does NOT have item 32092 AND quest 10982 is rewarded."), +(15,@MENU_ID,6,0, 0, 8,0, 9837,0,0, 0,0,0,'',"Show gossip option 9823 id 6 if quest 9837 is rewarded AND player does NOT have item 24490."), +(15,@MENU_ID,6,0, 0, 2,0,24490,1,0, 1,0,0,'',"Show gossip option 9823 id 6 if player does NOT have item 24490 AND quest 9837 is rewarded."), +(15,@MENU_ID,7,0, 0, 8,0,13159,0,0, 0,0,0,'',"Show gossip option 9823 id 7 if quest 13159 is rewarded AND player does NOT have item 42482."), +(15,@MENU_ID,7,0, 0, 2,0,42482,1,0, 1,0,0,'',"Show gossip option 9823 id 7 if player does NOT have item 42482 AND quest 13159 is rewarded."), +(15,@MENU_ID,8,0, 0, 8,0,11011,0,0, 0,0,0,'',"Show gossip option 9823 id 8 if quest 11011 is rewarded AND player does NOT have item 32449."), +(15,@MENU_ID,8,0, 0, 2,0,32449,1,0, 1,0,0,'',"Show gossip option 9823 id 8 if player does NOT have item 32449 AND quest 11011 is rewarded."); diff --git a/sql/updates/world/3.3.5/2016_06_09_06_world.sql b/sql/updates/world/3.3.5/2016_06_09_06_world.sql new file mode 100644 index 00000000000..9037a2a2fe5 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_09_06_world.sql @@ -0,0 +1,3 @@ +-- Wrong respawntimer for Quest GameObjects +-- Bingles's Toolbucket, Bingles's Blastencapper +UPDATE `gameobject` SET `spawntimesecs` = 10 WHERE `id` IN (104564,104569,104574,104575); diff --git a/sql/updates/world/3.3.5/2016_06_11_00_world.sql b/sql/updates/world/3.3.5/2016_06_11_00_world.sql new file mode 100644 index 00000000000..ea81a3ce563 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_00_world.sql @@ -0,0 +1,3 @@ +-- Creature entry 19871 World Trigger (Not Immune NPC) +-- set InhabitType [Flying] to enable hover mode for this creature +UPDATE `creature_template` SET `InhabitType`= 4 WHERE `entry` = 19871; diff --git a/sql/updates/world/3.3.5/2016_06_11_01_world.sql b/sql/updates/world/3.3.5/2016_06_11_01_world.sql new file mode 100644 index 00000000000..c7185f6642c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_01_world.sql @@ -0,0 +1,2 @@ +-- Correct page text for item 9568, Rune-Inscribed Parchment +UPDATE `page_text` SET `Text` = "Lok'tar, $g brother:sister;. The elements beckon you closer and bid me to show you the path of the shaman. The spirits of our ancestors watch from beyond and swell with pride knowing you have joined our ranks.$B$BWhen you are ready, seek me out near the entrance to the Den. It is there that I will be training others of our kind. Until then, may the wind be at your back.$B$B-Shikrik, Shaman Trainer" WHERE `ID`= 2461; diff --git a/sql/updates/world/3.3.5/2016_06_11_02_world.sql b/sql/updates/world/3.3.5/2016_06_11_02_world.sql new file mode 100644 index 00000000000..ac5d1f6037c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_02_world.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry`=6383 AND SourceTypeOrReferenceId IN(19, 20); +INSERT INTO `conditions` VALUES +(19, 0, 6383, 0, 0, 28, 0, 235, 0, 0, 1, 0, 0, "", "Show quest 'The Ashenvale Hunt' if quest 'The Ashenvale Hunt' (breadcrumb) is not completed"), +(20, 0, 6383, 0, 0, 28, 0, 235, 0, 0, 1, 0, 0, "", "Show quest 'The Ashenvale Hunt' if quest 'The Ashenvale Hunt' (breadcrumb) is not completed"), +(19, 0, 6383, 0, 0, 28, 0, 742, 0, 0, 1, 0, 0, "", "Show quest 'The Ashenvale Hunt' if quest 'The Ashenvale Hunt' (breadcrumb) is not completed"), +(20, 0, 6383, 0, 0, 28, 0, 742, 0, 0, 1, 0, 0, "", "Show quest 'The Ashenvale Hunt' if quest 'The Ashenvale Hunt' (breadcrumb) is not completed"), +(19, 0, 6383, 0, 0, 28, 0, 6382, 0, 0, 1, 0, 0, "", "Show quest 'The Ashenvale Hunt' if quest 'The Ashenvale Hunt' (breadcrumb) is not completed"), +(20, 0, 6383, 0, 0, 28, 0, 6382, 0, 0, 1, 0, 0, "", "Show quest 'The Ashenvale Hunt' if quest 'The Ashenvale Hunt' (breadcrumb) is not completed"); diff --git a/sql/updates/world/3.3.5/2016_06_11_03_world.sql b/sql/updates/world/3.3.5/2016_06_11_03_world.sql new file mode 100644 index 00000000000..47e3aefa366 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_03_world.sql @@ -0,0 +1,5 @@ +-- fix string in trinity_string incorrectly implying character customization is forced at login +UPDATE `trinity_string` SET `content_default`='customization for player %s will be requested at next login.' WHERE `entry`=345; +UPDATE `trinity_string` SET `content_default`='customization for player %s (GUID #%u) will be requested at next login.' WHERE `entry`=346; + +UPDATE `trinity_string` SET `content_default`='You already have a pet.' WHERE `entry`=344; -- add missing article diff --git a/sql/updates/world/3.3.5/2016_06_11_04_world.sql b/sql/updates/world/3.3.5/2016_06_11_04_world.sql new file mode 100644 index 00000000000..f45f868006b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_04_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `quest_request_items` SET `CompletionText`="So, Motega Firemane sends word of Arikara... well now that is grave news.$B$B<Magatha looks around.>$B$BArikara is a deadly creature born only to seek vengeance against those who have committed heinous acts.$B$B<Magatha smiles.>" WHERE `ID`=5062; +UPDATE `quest_offer_reward` SET `RewardText`="You have returned from Desolace more than successful, $N. Thank you.$B$BThank you for your efforts, your time, and your understanding to my plea. Thrall understands and desires peace between the Horde and Alliance, and by taking measures to insure our appearance is acceptable, we will not provoke any further threats of unnecessary violence." WHERE `ID`=1436; +UPDATE `quest_offer_reward` SET `RewardText`="Ah, this horn belongs to a Tauren, Roon Wildmane. My father spoke often of the good times they had together hunting the beasts of Desolace. So Roon is inviting me to join him, is he?$B$BWe're neck deep in the jungle right now, but thank you, $N. Perhaps my next expedition will take me to Desolace, the land of the centaurs." WHERE `ID`=5763; +UPDATE `quest_offer_reward` SET `RewardText`="This does not make sense. Why would Arikara be after Cairne Bloodhoof? Magatha could not be wrong, she is our most powerful shaman.$B$B<Motega shakes his head.>$B$BRegardless, your great deed to the Horde shall not go unnoticed - please, choose one of these as a reward for your aid." WHERE `ID`=5088; diff --git a/sql/updates/world/3.3.5/2016_06_11_05_world.sql b/sql/updates/world/3.3.5/2016_06_11_05_world.sql new file mode 100644 index 00000000000..8c088c6f139 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_05_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `creature_queststarter` WHERE `quest`=1361; +INSERT INTO `creature_queststarter` VALUES +(2229, 1361), +(10540, 1361), +(4485, 1361); diff --git a/sql/updates/world/3.3.5/2016_06_11_06_world.sql b/sql/updates/world/3.3.5/2016_06_11_06_world.sql new file mode 100644 index 00000000000..12def3cc386 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_06_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `quest_template_addon` WHERE `ID`=680; +INSERT INTO `quest_template_addon` (`ID`, `PrevQuestID`) VALUES +(680, 678); diff --git a/sql/updates/world/3.3.5/2016_06_11_07_world.sql b/sql/updates/world/3.3.5/2016_06_11_07_world.sql new file mode 100644 index 00000000000..2e05fbac8fc --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_07_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `quest_template_addon` SET `SpecialFlags`=0 WHERE `ID` IN (8552, 3785); + +DELETE FROM `quest_template_addon` WHERE `ID`=2882; +INSERT INTO `quest_template_addon` (`ID`, `SpecialFlags`) VALUES +(2882, 1); diff --git a/sql/updates/world/3.3.5/2016_06_11_08_world.sql b/sql/updates/world/3.3.5/2016_06_11_08_world.sql new file mode 100644 index 00000000000..be72014d0ba --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_08_world.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry`=1127 AND `SourceTypeOrReferenceId` IN (19, 20); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19, 0, 1127, 0, 0, 9, 0, 1119, 0, 0, 0, 0, 0, "", "Quest 'Fool's Stout' - Can accept if player has quest 'Zanzil's Mixture and a Fool's Stout'"), +(20, 0, 1127, 0, 0, 9, 0, 1119, 0, 0, 0, 0, 0, "", "Quest 'Fool's Stout' - Can accept if player has quest 'Zanzil's Mixture and a Fool's Stout'"); + +DELETE FROM `quest_template_addon` WHERE `ID`=1127; +INSERT INTO `quest_template_addon` (`ID`, `SpecialFlags`) VALUES +(1127, 1); diff --git a/sql/updates/world/3.3.5/2016_06_11_09_world.sql b/sql/updates/world/3.3.5/2016_06_11_09_world.sql new file mode 100644 index 00000000000..71368bfb9c2 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_09_world.sql @@ -0,0 +1,7 @@ +-- +UPDATE `quest_template_addon` SET `SpecialFlags`=1 WHERE `id`=1463; +DELETE FROM `conditions` WHERE `SourceEntry`=1463 AND `SourceTypeOrReferenceId` IN (20, 19) AND `ConditionTypeOrReference` IN (2); +INSERT INTO `conditions` VALUES +(19, 0, 1463, 0, 0, 2, 0, 6635, 1, 1, 1, 0, 0, "", "Show quest 'Earth Sapta' only if the item 'earth-sapta' is not in player's bags or bank"), +(20, 0, 1463, 0, 0, 2, 0, 6635, 1, 1, 1, 0, 0, "", "Show question mark for quest 'Earth Sapta' only if the item 'earth-sapta' is not in player's bags or bank"); +UPDATE `quest_request_items` SET `CompletionText`="I give you one in good faith. You already proved yourself once, but me tinkin' you should be more careful in the future." WHERE `ID`= 1463; diff --git a/sql/updates/world/3.3.5/2016_06_11_10_world.sql b/sql/updates/world/3.3.5/2016_06_11_10_world.sql new file mode 100644 index 00000000000..68f5151dc87 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_10_world.sql @@ -0,0 +1,50 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry` IN (403, 308) AND `SourceTypeOrReferenceId` IN (19, 20); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(19, 0, 403, 0, 0, 28, 0, 310, 0, 0, 0, 0, 0, "", "Show quest 'Guarded Thunderbrew Barrel' if quest 'Bitter Rivals' is completed"), +(20, 0, 403, 0, 0, 28, 0, 310, 0, 0, 0, 0, 0, "", "Show quest 'Guarded Thunderbrew Barrel' if quest 'Bitter Rivals' is completed"), +(19, 0, 308, 0, 0, 8, 0, 403, 0, 0, 0, 0, 0, "", "Show quest 'Distracting Jarven' if quest 'Guarded Thunderbrew Barrel' is rewarded"), +(20, 0, 308, 0, 0, 8, 0, 403, 0, 0, 0, 0, 0, "", "Show quest 'Distracting Jarven' if quest 'Guarded Thunderbrew Barrel' is rewarded"), +(19, 0, 308, 0, 0, 28, 0, 310, 0, 0, 0, 0, 0, "", "Show quest 'Distracting Jarven' if quest 'Bitter Rivals' is completed"), +(20, 0, 308, 0, 0, 28, 0, 310, 0, 0, 0, 0, 0, "", "Show quest 'Distracting Jarven' if quest 'Bitter Rivals' is completed"); + +DELETE FROM `creature_text` WHERE `entry`=1373 AND `groupid`=0; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(1373, 0, 0, (SELECT `MaleText` FROM `broadcast_text` WHERE `id`=127), 12, 7, 100, 1, 0, 0, 127, 0, "Jarven Thunderbrew"); + +UPDATE `gameobject` SET `position_x`=-5607.24, `position_y`=-547.934, `position_z`=392.985 WHERE `id`=270; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1373, 137300); +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(1373, 0, 0, 1, 20, 0, 100, 0, 308, 0, 0, 0, 53, 0, 1373, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On Quest Rewarded - Start WP"), +(1373, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On Quest Rewarded - Remove Questgiver Flag"), +(1373, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On Quest Rewarded - Say Line 0"), +(1373, 0, 3, 4, 40, 0, 100, 0, 2, 0, 0, 0, 41, 44, 0, 0, 0, 0, 0, 14, 1037, 269, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On WP 2 Reached - Despawn Closest Gameobject \'Guarded Thunder Ale Barrel\'"), +(1373, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 70, 45, 0, 0, 0,0, 0, 14, 35875, 270, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On WP 2 Reached - Respawn Closest Gameobject \'Unguarded Thunder Ale Barrel\'"), +(1373, 0, 5, 6, 40, 0, 100, 0, 8, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On WP 8 Reached - Say Line 1"), +(1373, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 5.6724, "Jarven Thunderbrew - On WP 8 Reached - Turn"), +(1373, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 54, 10000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On WP 8 Reached - Pause WP for 10 seconds"), +(1373, 0, 8, 0, 40, 0, 100, 0, 15, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On WP 15 Reached - Say Line 2"), +(1373, 0, 9, 10, 58, 0, 100, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On WP Ended - Say Line 3"), +(1373, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On WP Ended - Add Questgiver Flag"), +(1373, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jarven Thunderbrew - On WP Ended - Reset Orientation"); + +DELETE FROM `waypoints` WHERE `entry`= 1373; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(1373, 1, -5601.64, -541.38, 392.42, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 2, -5597.94, -542.04, 392.42, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 3, -5597.95, -548.43, 395.48, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 4, -5605.31, -549.33, 399.09, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 5, -5607.55, -546.63, 399.09, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 6, -5597.52, -538.75, 399.09, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 7, -5597.62, -530.24, 399.65, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 8, -5603.67, -529.91, 399.65, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 9, -5603.67, -529.91, 399.65, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 10, -5597.62, -530.24, 399.65, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 11, -5597.52, -538.75, 399.09, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 12, -5607.55, -546.63, 399.09, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 13, -5605.31, -549.33, 399.09, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 14, -5597.95, -548.43, 395.48, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 15, -5597.94, -542.04, 392.42, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 16, -5601.64, -541.38, 392.42, 'Jarven Thunderbrew - Quest 308 Waypoint movement'), +(1373, 17, -5605.96, -544.45, 392.43, 'Jarven Thunderbrew - Quest 308 Waypoint movement'); diff --git a/sql/updates/world/3.3.5/2016_06_11_11_world.sql b/sql/updates/world/3.3.5/2016_06_11_11_world.sql new file mode 100644 index 00000000000..86e6fa082b2 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_11_world.sql @@ -0,0 +1,32 @@ +-- +-- Mebok Mizzyrix SAI + +SET @ENTRY := 3446; +DELETE FROM `creature_text` WHERE `entry`= @ENTRY AND `GroupId`=2; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(@ENTRY,2,0,"Hey $n! Don't forget to grab a crate, a manual and a command stick!", 12,0,100,0,0,0,1788,0,'Mebok Mizzyrix on Quest 1221 taken'); + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,20,0,100,0,865,0,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mebok Mizzyrix - On Quest 'Raptor Horns' Finished - Run Script"), +(@ENTRY,0,1,0,19,0,100,0,1221,0,0,0,80,@ENTRY*100+01,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mebok Mizzyrix - On Quest 'Blueleaf Tubers' Taken - Run Script"); + +-- Actionlist SAI +SET @ENTRY := 344600; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mebok Mizzyrix - On Script - Say Line 0"), +(@ENTRY,9,1,0,0,0,100,0,2000,2000,0,0,11,17550,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mebok Mizzyrix - On Script - Cast 'Purification'"), +(@ENTRY,9,2,0,0,0,100,0,4000,4000,0,0,5,34,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mebok Mizzyrix - On Script - Play Emote 34"), +(@ENTRY,9,3,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mebok Mizzyrix - On Script - Say Line 1"); + +-- Actionlist SAI +SET @ENTRY := 344601; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,"Mebok Mizzyrix - On Script - Say Line 2"), +(@ENTRY,9,1,0,0,0,100,0,2000,2000,0,0,69,0,0,0,0,0,0,8,0,0,0,-929.023,-3696.98,7.97395,1.7352,"Mebok Mizzyrix - On Script - Move To Position"), +(@ENTRY,9,2,0,0,0,100,0,3000,3000,0,0,5,25,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mebok Mizzyrix - On Script - Play Emote 25"), +(@ENTRY,9,3,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-928.778,-3697.25,7.99705,6.17741,"Mebok Mizzyrix - On Script - Move To Position"), +(@ENTRY,9,4,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,-928.982,-3697.23,8.06642,3.08923,"Mebok Mizzyrix - On Script - Move To Position"); diff --git a/sql/updates/world/3.3.5/2016_06_11_12_world.sql b/sql/updates/world/3.3.5/2016_06_11_12_world.sql new file mode 100644 index 00000000000..be2587e862a --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_11_12_world.sql @@ -0,0 +1,24 @@ +-- +UPDATE `creature_template` SET `InhabitType`=4 WHERE `Entry` IN (21159, 18793, 20654); +DELETE FROM `smart_scripts` WHERE `entryorguid`=18794; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18794, 0, 0, 0, 1, 0, 100, 7, 1000, 1000, 0, 0, 11, 32958, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - Out of Combat - Cast \'Crystal Channel\ (Dungeon)'), +(18794, 0, 1, 0, 1, 0, 100, 5, 0, 0, 0, 0, 30, 1, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - Out of Combat - Set Random Phase(1, 4) (No Repeat) (Dungeon)'), +(18794, 0, 2, 0, 0, 0, 100, 2, 6000, 10000, 4000, 6000, 11, 20795, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - In Combat - Cast \'Fire Blast\' (Normal Dungeon)'), +(18794, 0, 3, 0, 0, 0, 100, 4, 6000, 10000, 4000, 6000, 11, 14145, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - In Combat - Cast \'Fire Blast\' (Heroic Dungeon)'), +(18794, 0, 4, 0, 0, 0, 100, 6, 2000, 2000, 10000, 12000, 11, 9574, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - In Combat - Cast \'Flame Buffet\' (Dungeon)'), +(18794, 0, 5, 0, 0, 0, 100, 6, 4000, 4000, 6000, 8000, 11, 12540, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - In Combat - Cast \'Gouge\' (Dungeon)'), +(18794, 0, 6, 0, 4, 1, 100, 6, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - On Aggro - Increment Phase By 1 (Phase 1) (No Repeat) (Dungeon)'), +(18794, 0, 7, 0, 0, 1, 100, 2, 0, 0, 2400, 3800, 11, 15497, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - Combat CMC - Cast \'Frostbolt\' (Phase 1) (Normal Dungeon)'), +(18794, 0, 8, 0, 0, 1, 100, 4, 0, 0, 2400, 3800, 11, 12675, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - Combat CMC - Cast \'Frostbolt\' (Phase 1) (Heroic Dungeon)'), +(18794, 0, 9, 0, 0, 1, 100, 2, 7000, 7000, 7000, 12000, 11, 15532, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - In Combat - Cast \'Frost Nova\' (Phase 1) (Normal Dungeon)'), +(18794, 0, 10, 0, 0, 1, 100, 4, 7000, 7000, 7000, 12000, 11, 15063, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - In Combat - Cast \'Frost Nova\' (Phase 1) (Heroic Dungeon)'), +(18794, 0, 11, 0, 0, 2, 100, 6, 4000, 4000, 6000, 8000, 11, 12540, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - In Combat - Cast \'Gouge\' (Phase 2) (Dungeon)'), +(18794, 0, 12, 0, 3, 2, 100, 6, 30, 100, 100, 100, 23, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - Between 30-100% Mana - Decrement Phase By 1 (Phase 2) (Dungeon)'), +(18794, 0, 13, 0, 4, 4, 100, 0, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - On Aggro - Increment Phase By 1 (Phase 4) (Dungeon)'), +(18794, 0, 14, 0, 0, 4, 100, 2, 0, 0, 2400, 3800, 11, 33833, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - Combat CMC - Cast \'Arcane Missiles\' (Phase 4) (Normal Dungeon)'), +(18794, 0, 15, 0, 0, 4, 100, 4, 0, 0, 2400, 3800, 11, 38264, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - Combat CMC - Cast \'Arcane Missiles\' (Phase 4) (Heroic Dungeon)'), +(18794, 0, 16, 0, 3, 4, 100, 0, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - Between 0-15% Mana - Increment Phase By 1 (Phase 4) (No Repeat) (Dungeon)'), +(18794, 0, 17, 0, 0, 4, 100, 6, 9000, 12000, 12000, 16000, 11, 33487, 1, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - In Combat - Cast \'Addle Humanoid\' (Phase 4) (Dungeon)'), +(18794, 0, 18, 0, 0, 8, 100, 6, 4000, 4000, 6000, 8000, 11, 12540, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - In Combat - Cast \'Gouge\' (Phase 8) (Dungeon)'), +(18794, 0, 19, 0, 3, 8, 100, 6, 30, 100, 100, 100, 23, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Cabal Ritualist - Between 30-100% Mana - Decrement Phase By 1 (Phase 8) (Dungeon)'); diff --git a/sql/updates/world/3.3.5/2016_06_12_00_world_335.sql b/sql/updates/world/3.3.5/2016_06_12_00_world_335.sql new file mode 100644 index 00000000000..7e96065243c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_12_00_world_335.sql @@ -0,0 +1,27 @@ +-- +SET @Entry := 17093; + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@Entry; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Entry, @Entry*100); +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@Entry , 0, 0, 0, 20, 0, 100, 0, 9434, 0, 0, 0, 80, @Entry*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Quest \"Testing the Tonic\" rewarded - Run script"), +(@Entry*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 83, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Remove questgiver flag"), +(@Entry*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Talk (0)"), +(@Entry*100, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 11, 60888, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - cast cosmetic emote"), +(@Entry*100, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Talk (1)"), +(@Entry*100, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Talk (2)"), +(@Entry*100, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 17, 64, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Change emote state"), +(@Entry*100, 9, 6, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 3, 17162, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Change model"), +(@Entry*100, 9, 7, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Talk (3)"), +(@Entry*100, 9, 8, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Talk (4)"), +(@Entry*100, 9, 9, 0, 0, 0, 100, 0, 20000, 20000, 0, 0, 3, 17093, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Change Entry"), +(@Entry*100, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 17, 30, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Change emote state"), +(@Entry*100, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 82, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Magistrix Elosai - On Script - Add questgiver flag"); + +DELETE FROM `creature_text` WHERE `entry`=@Entry; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(@Entry, 0, 0, (SELECT `FemaleText` FROM `broadcast_text` WHERE `ID`=13508), 16, 0, 100, 0, 0, 0, 13508, 0, ""), +(@Entry, 1, 0, (SELECT `FemaleText` FROM `broadcast_text` WHERE `ID`=13509), 12, 0, 100, 7, 0, 0, 13509, 0, ""), +(@Entry, 2, 0, (SELECT `FemaleText` FROM `broadcast_text` WHERE `ID`=13510), 12, 0, 100, 0, 0, 0, 13510, 0, ""), +(@Entry, 3, 0, (SELECT `FemaleText` FROM `broadcast_text` WHERE `ID`=13511), 12, 0, 100, 0, 0, 0, 13511, 0, ""), +(@Entry, 4, 0, (SELECT `FemaleText` FROM `broadcast_text` WHERE `ID`=14318), 12, 0, 100, 0, 0, 0, 14318, 0, ""); diff --git a/sql/updates/world/3.3.5/2016_06_12_01_world.sql b/sql/updates/world/3.3.5/2016_06_12_01_world.sql new file mode 100644 index 00000000000..62e2c2cc600 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_12_01_world.sql @@ -0,0 +1,45 @@ +-- +-- Add missing Emote & Say lines for NPC entry 20098(Jane), 20100(Jessel) and 20244(Nova) +SET @Jane := 20098; +SET @Jessel := 20100; +SET @Nova := 20244; + +-- Set random movement around a new set spawndist for Nova +UPDATE `creature` SET `position_x`= 10512.0615,`position_y`= -6499.652,`position_z`= 3.6119,`orientation`= 0.855017,`spawndist`= 8,`MovementType`= 1 WHERE `id`= @Nova; +UPDATE `creature` SET `position_x`= 10512.0615,`position_y`= -6499.652,`position_z`= 3.6119,`orientation`= 0.855017,`spawndist`= 8,`MovementType`= 1 WHERE `id`= 20246; +UPDATE `creature` SET `MovementType`=1, `spawndist`=8 WHERE `id` IN (20098,20247,20246); + +DELETE FROM `creature_text` WHERE `entry`= @Jane AND `groupid`= 1 AND `id`= 0; +DELETE FROM `creature_text` WHERE `entry`= @Jessel AND `groupid`= 2 AND `id`= 0; +DELETE FROM `creature_text` WHERE `entry`= @Nova AND `groupid` IN (0,1) AND `id` IN (0,1,2,3); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(@Jessel,2,0,'%s wakes up, startled.', 16,10,100,0,0,0,17595,0,'Jessel'), +(@Jane, 1,0,'%s resumes playing on the beach.', 16,10,100,0,0,0,17599,0,'Jane'), +(@Nova, 1,0,'I think I can see the Sunwell from here!', 12,10,100,1,0,0,17918,0,'Nova'), +(@Nova, 1,1,'Can you really hear the ocean from one of these shells?',12,10,100,1,0,0,17919,0,'Nova'), +(@Nova, 1,2,'Oooh! Look, a shiny one!', 12,10,100,1,0,0,17920,0,'Nova'), +(@Nova, 1,3,'Jane will love this one!', 12,10,100,1,0,0,17921,0,'Nova'), +(@Nova, 0,0,'%s picks up a sea shell.', 16,10,100,0,0,0,17922,0,'Nova'), +(@Nova, 0,1,'%s holds a sea shell up to her ear.', 16,10,100,0,0,0,17923,0,'Nova'), +(@Nova, 0,2,'%s shakes the dirt loose from the shell.', 16,10,100,0,0,0,17924,0,'Nova'); + +-- Add SmartAI script lines for Jane, Jessel and Nova +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= @Nova; +DELETE FROM `smart_scripts` WHERE `entryorguid`= @Jane AND `source_type`= 0; +DELETE FROM `smart_scripts` WHERE `entryorguid`= @Jessel AND `source_type`= 0; +DELETE FROM `smart_scripts` WHERE `entryorguid`= @Jessel*100 AND `source_type`= 9; +DELETE FROM `smart_scripts` WHERE `entryorguid`= @Nova AND `source_type`= 0 AND `id` IN (0,1); +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Nova, 0,0,0,1,0,100,0, 10000, 10000, 25000, 60000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nova - Out Of Combat - Say Line'), +(@Nova, 0,1,0,1,0,100,0, 11000, 11000, 25000, 60000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nova - Out Of Combat - Say Line'), +(20100, 0, 0, 0, 1, 0, 100, 0, 0, 0, 300000, 300000, 80, 2010000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jessel - Ooc - Action list"), +(2010000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 50917, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jessel - Action list - Cast sleep aura"), +(2010000, 9, 1, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 28, 50917, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jessel - Action list - rrmove sleep aura"), +(2010000, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jessel - Action list - Say Line 2"), +(2010000, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jessel - Action list - Set bytes 1"), +(2010000, 9, 4, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jessel - Action list - Say Line 0"), +(2010000, 9, 5, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, @Jane, 50, 0, 0, 0, 0, 0, "Jessel - Action list - Say Line 0"), +(2010000, 9, 6, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jessel - Action list - Say Line 1"), +(2010000, 9, 7, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, @Jane, 50, 0, 0, 0, 0, 0, "Jessel - Action list - Say Line 1"), +(2010000, 9, 8, 6, 0, 0, 100, 0, 3000, 3000, 0, 0, 91, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jessel - Action list - remove bytes 1"), +(2010000, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 50917, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Jessel - Action list - Cast sleep"); diff --git a/sql/updates/world/3.3.5/2016_06_12_02_world.sql b/sql/updates/world/3.3.5/2016_06_12_02_world.sql new file mode 100644 index 00000000000..dc1709d6d2f --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_12_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`= 2010000 AND `source_type`= 9; diff --git a/sql/updates/world/3.3.5/2016_06_12_03_world.sql b/sql/updates/world/3.3.5/2016_06_12_03_world.sql new file mode 100644 index 00000000000..c1864e88bc3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_12_03_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_loot_template` SET `chance`=5.4 WHERE `entry` IN (3100, 3196, 3244, 3123, 3196, 3268) AND `item`=6514; +UPDATE `creature_loot_template` SET `chance`=0.7 WHERE `entry`=3100 AND `item`=4663; diff --git a/sql/updates/world/3.3.5/2016_06_12_04_world.sql b/sql/updates/world/3.3.5/2016_06_12_04_world.sql new file mode 100644 index 00000000000..718394bc63b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_12_04_world.sql @@ -0,0 +1,3 @@ +-- +-- Set CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ on Iron Sentinel Credit & Iron Dwarf Assailant & Corpulent Horror Credit +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2097152 WHERE `entry` IN (30296,30297,30696); diff --git a/sql/updates/world/3.3.5/2016_06_12_05_world_335.sql b/sql/updates/world/3.3.5/2016_06_12_05_world_335.sql new file mode 100644 index 00000000000..18ac159672b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_12_05_world_335.sql @@ -0,0 +1,2 @@ +-- +UPDATE `locales_quest` SET `Title_loc2`='Nessa Chantelombre', `Title_loc3`='Nessa Schattensang', `Title_loc6`='Nessa Cantosombrío', `Title_loc7`='Nessa Cantosombrío', `Title_loc8`='Несса Песня Теней', `Details_loc2`="Une de mes amies, Nessa Chantelombre, est une marchande de poissons, dans le village de Rut'theran. Elle a besoin qu'un colis soit apporté à Sombrivage, et cherche quelqu'un qui serait d'accord pour l'aider.$B$BSi cela vous intéresse et que vous souhaitez rencontrer Nessa, il vous faut prendre le portail qui relie Darnassus et Rut'theran. Vous le trouverez à l'ouest des jardins du temple.", `Details_loc3`="Eine Freundin von mir, Nessa Schattensang, vertreibt Angelzubehör in Rut'theran. Sie hat ein Paket, das dringend nach Dunkelküste gebracht werden muss, und sucht jemanden, der ihr hilft.$B$BWenn Ihr Interesse habt, dann durchschreitet das Portal in Darnassus nach Rut'theran. Ihr findet das Portal westlich der Tempelgärten. ", `Details_loc6`="Una amiga mía, Nessa Cantosombrío, comercia con pescado en la Aldea Rut'theran. Necesita entregar un paquete en Costa Oscura y está buscando a alguien que le ayude.$B$BSi te interesa, coge el portal en Darnassus hasta la Aldea Rut'theran para ir a verla. Encontrarás el portal al oeste de Los Jardines del Templo. ", `Details_loc7`="Una amiga mía, Nessa Cantosombrío, comercia con pescado en la Aldea Rut'theran. Necesita entregar un paquete en Costa Oscura y está buscando a alguien que le ayude.$B$BSi te interesa, coge el portal en Darnassus hasta la Aldea Rut'theran para ir a verla. Encontrarás el portal al oeste de Los Jardines del Templo. ", `Details_loc8`="Моя подруга, Несса Песня Теней, торгует рыбой в деревне Рут'теран. Ей нужно доставить посылку на Темные берега, и она ищет кого-нибудь, кто мог бы ей помочь.$B$BЕсли вы хотите помочь Нессе, то ступайте в деревню Рут'теран через портал в Дарнасе. Портал находится к западу от Храмовых садов.", `Objectives_loc2`='Parler à Nessa Chantelombre.', `Objectives_loc3`='Sprecht mit Nessa Schattensang.', `Objectives_loc6`=' Habla con Nessa Cantosombrío.', `Objectives_loc7`=' Habla con Nessa Cantosombrío.', `Objectives_loc8`='Поговорите с Нессой Песня Теней.' WHERE `Id`=6344; diff --git a/sql/updates/world/3.3.5/2016_06_12_06_world.sql b/sql/updates/world/3.3.5/2016_06_12_06_world.sql new file mode 100644 index 00000000000..d3522334766 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_12_06_world.sql @@ -0,0 +1,52 @@ +-- Bunthen Plainswind (NPC 11798) and Silva Fil'naveth (NPC 11800), Moonglade Druid Flight Masters +UPDATE `creature_template` SET `AIName`= 'SmartAI', `ScriptName`= '' WHERE `entry` IN (11798,11800); + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (4041,4042); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(4041,0,0,"I'd like to fly to Rut'theran Village.", 7573,1,1, 0,0,0,0,'',0), +(4041,1,0,"Do you know where I may find the Half Pendant of Aquatic Agility?", 8035,1,1,4225,0,0,0,'',0), +(4041,2,0,"Do you know where I may find the Half Pendant of Aquatic Agility?", 8035,1,1,4226,0,0,0,'',0), +(4042,0,0,"I'd like to fly to Thunder Bluff.", 12804,1,1, 0,0,0,0,'',0), +(4042,1,0,"Do you know where I may find the Half Pendant of Aquatic Endurance?",8036,1,1,4223,0,0,0,'',0), +(4042,2,0,"Do you know where I may find the Half Pendant of Aquatic Endurance?",8036,1,1,4224,0,0,0,'',0); + +-- Add gossip_menu entries to be linked to text_id gossip text (npc_text.id) +DELETE FROM `gossip_menu` WHERE `text_id` IN (4917,4918,5373,5374,5375,5376); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(4042,4917), +(4042,4918), +(4223,5373), +(4224,5374), +(4225,5375), +(4226,5376); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup` IN (4041,4042); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +-- conditions for Silva's gossip menus +(14,4041,4913,0, 0, 15,0,1024,0,0, 1, 0,0,'', "Show Gossip Menu entry 4041 text_id 4913 if player is NOT a Druid"), +(14,4041,4914,0, 1, 15,0,1024,0,0, 0, 0,0,'', "Show Gossip Menu entry 4041 text_id 4914 if player is a Druid"), +(14,4041,4914,0, 1, 6,0, 469,0,0, 0, 0,0,'', "Show Gossip Menu entry 4041 text_id 4914 if player is Alliance"), +(14,4041,4915,0, 2, 15,0,1024,0,0, 0, 0,0,'', "Show Gossip Menu entry 4041 text_id 4915 if player is a Druid"), +(14,4041,4915,0, 2, 6,0, 469,0,0, 1, 0,0,'', "Show Gossip Menu entry 4041 text_id 4915 if player is NOT Alliance"), +(15,4041, 0,0, 3, 15,0,1024,0,0, 0, 0,0,'', "Show Gossip Menu Option menu_id 4041 id 0 if player is a Druid"), +(15,4041, 0,0, 3, 6,0, 469,0,0, 0, 0,0,'', "Show Gossip Menu Option menu_id 4041 id 0 if player is Alliance"), +(15,4041, 1,0, 0, 9,0, 272,0,0, 0, 0,0,'', "Show Gossip Menu Option menu_id 4041 id 1 if Quest 272 is taken"), +(15,4041, 2,0, 0, 9,0, 30,0,0, 0, 0,0,'', "Show Gossip Menu Option menu_id 4041 id 2 if Quest 30 is taken"), +-- conditions for Bunthen's gossip menus +(14,4042,4916,0, 0, 15,0,1024,0,0, 1, 0,0,'', "Show Gossip Menu entry 4042 text_id 4916 if player is NOT a Druid"), +(14,4042,4918,0, 4, 15,0,1024,0,0, 0, 0,0,'', "Show Gossip Menu entry 4042 text_id 4918 if player is a Druid"), +(14,4042,4918,0, 4, 6,0, 67,0,0, 0, 0,0,'', "Show Gossip Menu entry 4042 text_id 4918 if player is Horde"), +(14,4042,4917,0, 5, 15,0,1024,0,0, 0, 0,0,'', "Show Gossip Menu entry 4042 text_id 4917 if player is a Druid"), +(14,4042,4917,0, 5, 6,0, 67,0,0, 1, 0,0,'', "Show Gossip Menu entry 4042 text_id 4917 if player is NOT Horde"), +(15,4042, 0,0, 6, 15,0,1024,0,0, 0, 0,0,'', "Show Gossip Menu Option menu_id 4042 id 0 if player is a Druid"), +(15,4042, 0,0, 6, 6,0, 67,0,0, 0, 0,0,'', "Show Gossip Menu Option menu_id 4042 id 0 if player is Horde"), +(15,4042, 1,0, 0, 9,0, 272,0,0, 0, 0,0,'', "Show Gossip Menu Option menu_id 4042 id 1 if Quest 272 is taken"), +(15,4042, 2,0, 0, 9,0, 30,0,0, 0, 0,0,'', "Show Gossip Menu Option menu_id 4042 id 2 if Quest 30 is taken"); + +-- SmartAI for Bunthen & Silva +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (11798, 11800) AND `source_type` = 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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(11798,0,0,1,62,0,100,0,4042,0,0,0,72, 0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Bunthen Plainswind - on Gossip Menu Option 4042 id 0 selected - close Gossip"), +(11798,0,1,0,61,0,100,0, 0,0,0,0,52,316,0,0,0,0,0,7,0,0,0,0,0,0,0,"Bunthen Plainswind - on Gossip Menu Option 4042 id 0 selected - activate Taxi Path 316(Moonglade - Thunder Bluff)"), +(11800,0,2,3,62,0,100,0,4041,0,0,0,72, 0,0,0,0,0,0,7,0,0,0,0,0,0,0, "Silva Fil'naveth - on Gossip Menu Option 4041 id 0 selected - close Gossip"), +(11800,0,3,0,61,0,100,0, 0,0,0,0,52,315,0,0,0,0,0,7,0,0,0,0,0,0,0, "Silva Fil'naveth - on Gossip Menu Option 4041 id 0 selected - activate Taxi Path 315(Moonglade - Rut'theran Village)"); diff --git a/sql/updates/world/3.3.5/2016_06_12_07_world.sql b/sql/updates/world/3.3.5/2016_06_12_07_world.sql new file mode 100644 index 00000000000..259975e8f14 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_12_07_world.sql @@ -0,0 +1,33 @@ +-- "Plucky" Johnson (Magus Tirth's assistant) in quest 1950 "Get the Scoop": +SET @CHICKEN := 6626; +SET @HUMAN := 6666; + +UPDATE `creature_template` SET `gossip_menu_id`= 231, `AIName`= 'SmartAI' WHERE `entry`= @HUMAN; +UPDATE `creature_template` SET `AIName`= 'SmartAI', `ScriptName`= '' WHERE `entry`= @CHICKEN; + +DELETE FROM `gossip_menu` WHERE `entry` IN (231,232) AND `text_id` IN (720,738); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(231, 720), +(232, 738); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`= 231 AND `OptionBroadcastTextID`= 2707; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(231, 0, 0, "Tell me the phrase to Tirth's lockbox.", 2707, 1, 1, 232, 0, 0, 0, '', 0); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@CHICKEN,@HUMAN) AND `source_type`= 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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`comment`) VALUES +(@CHICKEN,0,0,1,22,0,100,0, 22,0,0,0,11, 9192, 2,0,0,0,0,1,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 22 - Cast "Plucky" Resumes Human Form'), +(@CHICKEN,0,1,2,61,0,100,0, 0,0,0,0, 3, @HUMAN,6194,0,0,0,0,1,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 22 - Morph To Creature "Plucky" Johnson\'s Human Form'), +(@CHICKEN,0,2,3,61,0,100,0, 0,0,0,0, 5, 3, 0,0,0,0,0,1,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 22 - Play Emote 3'), +(@CHICKEN,0,3,4,61,0,100,0, 0,0,0,0,11, 9220, 0,0,0,0,0,1,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 22 - Cast "Plucky" Resumes Chicken Form'), +(@CHICKEN,0,4,0,61,0,100,0, 0,0,0,0, 3,@CHICKEN,5369,0,0,0,0,1,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 22 - Morph To Creature "Plucky" Johnson'), +(@CHICKEN,0,5,6,22,0,100,0, 7,0,0,0,11, 9192, 2,0,0,0,0,1,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 7 - Cast "Plucky" Resumes Human Form'), +(@CHICKEN,0,6,7,61,0,100,0, 0,0,0,0, 3, @HUMAN,6194,0,0,0,0,1,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 7 - Morph To Creature "Plucky" Johnson\'s Human Form'), +(@CHICKEN,0,7,8,61,0,100,0, 0,0,0,0,82, 1, 0,0,0,0,0,1,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 7 - Add Npc Flags Gossip'), +(@CHICKEN,0,8,0,61,0,100,0, 0,0,0,0,69, 0, 0,0,0,0,0,7,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 7 - Move To Invoker'), +(@HUMAN, 0,0,1,62,0,100,0,231,0,0,0,72, 0, 0,0,0,0,0,7,0,0,0,0,0,0,'"Plucky" Johnson\'s Human Form - On Gossip Option 0 Selected - Close Gossip'), +(@HUMAN, 0,1,0,61,0,100,0, 0,0,0,0,15, 1950, 0,0,0,0,0,7,0,0,0,0,0,0,'"Plucky" Johnson\'s Human Form - On Gossip Option 0 Selected - Credit Quest 1950'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup`= 231; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,231,0, 0,0,9,0,1950,0,0,0,0,0,'', 'Show gossip menu option 231 only if Quest 1950 is taken (active)'); diff --git a/sql/updates/world/3.3.5/2016_06_12_08_world.sql b/sql/updates/world/3.3.5/2016_06_12_08_world.sql new file mode 100644 index 00000000000..c39e59c7ec8 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_12_08_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `quest_template` SET `AllowableRaces`=512 WHERE `ID` IN (8325, 9393, 8328, 9676, 8564, 9392, 8563, 8326, 8327, 8330, 8345, 8336, 8334, 8335, 8338, 8347, 9428, 9189); +UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID`=9704; diff --git a/sql/updates/world/3.3.5/2016_06_12_09_world.sql b/sql/updates/world/3.3.5/2016_06_12_09_world.sql new file mode 100644 index 00000000000..19772c101ab --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_12_09_world.sql @@ -0,0 +1,35 @@ +-- +SET @GUID := -65109; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=18211; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GUID AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@GUID,0,0,0,6,0,100,0,0,0,0,0,45,0,1,0,0,0,0,9,18211,0,10,0,0,0,0,"Murkblood Brute - On Just Died - Set Data 0 1"), +(@GUID,0,1,0,38,0,100,0,0,1,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Murkblood Brute - On Data Set 0 1 - Set Event Phase 1"), +(@GUID,0,2,0,6,1,100,0,0,0,0,0,82,2,0,0,0,0,0,9,18210,0,10,0,0,0,0,"Murkblood Brute - On Just Died - Add Npc Flag Questgiver (Phase 1)"), +(@GUID,0,3,0,1,0,100,0,0,0,500,1000,81,0,0,0,0,0,0,9,18210,0,10,0,0,0,0,"Murkblood Brute - On Respawn - Remove Npc Flag Questgiver"); + +SET @GUID := -65110; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GUID AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@GUID,0,0,0,6,0,100,0,0,0,0,0,45,0,1,0,0,0,0,9,18211,0,10,0,0,0,0,"Murkblood Brute - On Just Died - Set Data 0 1"), +(@GUID,0,1,0,38,0,100,0,0,1,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Murkblood Brute - On Data Set 0 1 - Set Event Phase 1"), +(@GUID,0,2,0,6,1,100,0,0,0,0,0,82,2,0,0,0,0,0,9,18210,0,10,0,0,0,0,"Murkblood Brute - On Just Died - Add Npc Flag Questgiver (Phase 1)"), +(@GUID,0,3,0,1,0,100,0,0,0,500,1000,81,0,0,0,0,0,0,9,18210,0,10,0,0,0,0,"Murkblood Brute - On Respawn - Remove Npc Flag Questgiver"); + + +SET @GUID := -28663; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=18203; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GUID AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@GUID,0,0,0,6,0,100,0,0,0,0,0,45,0,1,0,0,0,0,9,18203,0,10,0,0,0,0,"Murkblood Raider - On Just Died - Set Data 0 1"), +(@GUID,0,1,0,38,0,100,0,0,1,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Murkblood Raider - On Data Set 0 1 - Set Event Phase 1"), +(@GUID,0,2,0,6,1,100,0,0,0,0,0,82,2,0,0,0,0,0,9,18209,0,10,0,0,0,0,"Murkblood Raider - On Just Died - Add Npc Flag Questgiver (Phase 1)"), +(@GUID,0,3,0,1,0,100,0,0,0,500,1000,81,0,0,0,0,0,0,9,18209,0,10,0,0,0,0,"Murkblood Raider - On Respawn - Remove Npc Flag Questgiver"); + +SET @GUID := -28664; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GUID AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@GUID,0,0,0,6,0,100,0,0,0,0,0,45,0,1,0,0,0,0,9,18203,0,10,0,0,0,0,"Murkblood Raider - On Just Died - Set Data 0 1"), +(@GUID,0,1,0,38,0,100,0,0,1,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Murkblood Raider - On Data Set 0 1 - Set Event Phase 1"), +(@GUID,0,2,0,6,1,100,0,0,0,0,0,82,2,0,0,0,0,0,9,18209,0,10,0,0,0,0,"Murkblood Raider - On Just Died - Add Npc Flag Questgiver (Phase 1)"), +(@GUID,0,3,0,1,0,100,0,0,0,500,1000,81,0,0,0,0,0,0,9,18209,0,10,0,0,0,0,"Murkblood Raider - On Respawn - Remove Npc Flag Questgiver"); diff --git a/sql/updates/world/3.3.5/2016_06_13_00_world.sql b/sql/updates/world/3.3.5/2016_06_13_00_world.sql new file mode 100644 index 00000000000..287fb53747e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_13_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid`= 5710 AND `source_type`= 0 AND `id`= 0 AND `link`= 1; diff --git a/sql/updates/world/3.3.5/2016_06_13_01_world.sql b/sql/updates/world/3.3.5/2016_06_13_01_world.sql new file mode 100644 index 00000000000..85d48c5a742 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_13_01_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 19512; +INSERT INTO `spell_linked_spell` VALUES (19512, -19502, 1, 'Apply Salve - Sickly Critter Aura'); diff --git a/sql/updates/world/3.3.5/2016_06_13_02_world_335.sql b/sql/updates/world/3.3.5/2016_06_13_02_world_335.sql new file mode 100644 index 00000000000..ff2313c700b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_13_02_world_335.sql @@ -0,0 +1,2 @@ +-- +UPDATE `spell_proc_event` SET `Cooldown`=15 WHERE `entry`=-57470; diff --git a/sql/updates/world/3.3.5/2016_06_13_03_world_335.sql b/sql/updates/world/3.3.5/2016_06_13_03_world_335.sql new file mode 100644 index 00000000000..c4d80e13405 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_13_03_world_335.sql @@ -0,0 +1,4 @@ +-- +UPDATE `gameobject_loot_template` SET `Chance`=50, `MaxCount`=6 WHERE `Item`=2835 AND `Entry` IN (1502, 1735, 2626, 18092); +UPDATE `gameobject_loot_template` SET `Chance`=50, `MaxCount`=8 WHERE `Item`=2836 AND `Entry` IN (1503, 1736, 2627, 18093); +UPDATE `gameobject_loot_template` SET `MaxCount`=4 WHERE `Item` IN (2770, 2771) AND `Entry` IN (1502, 1503, 1735, 1736, 2626, 2627, 18092, 18093); diff --git a/sql/updates/world/3.3.5/2016_06_13_04_world.sql b/sql/updates/world/3.3.5/2016_06_13_04_world.sql new file mode 100644 index 00000000000..d2ad9c21b39 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_13_04_world.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `AIName`='' WHERE `entry`=28092; +DELETE FROM `smart_scripts` WHERE `entryorguid`=28092 AND `source_type`=0; diff --git a/sql/updates/world/3.3.5/2016_06_13_05_world.sql b/sql/updates/world/3.3.5/2016_06_13_05_world.sql new file mode 100644 index 00000000000..b19f167a81a --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_13_05_world.sql @@ -0,0 +1,55 @@ +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=34320; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=34320 AND `source_type`=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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(34320, 0, 0, 0, 8, 0, 100, 0, 65258, 0, 2000, 2000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Venomhide Hatchling - On Spellhit (Feed Venomhide Hatchling) - Say'), +(34320, 0, 1, 0, 8, 0, 100, 0, 65265, 0, 2000, 2000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Venomhide Hatchling - On Spellhit (Feed Venomhide Hatchling) - Say'), +(34320, 0, 2, 0, 8, 0, 100, 0, 65200, 0, 2000, 2000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Venomhide Hatchling - On Spellhit (Feed Venomhide Hatchling) - Say'); + + +DELETE FROM `creature_text` WHERE `entry`=34320; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(34320, 0, 0, 'The %s''s strong jaws tear into the food.', 16, 0, 100, 0, 0, 0, 34521, 0, 'Venomhide Hatchling'), +(34320, 0, 1, 'The %s quickly finishes the food and glances around for more.', 16, 0, 100, 0, 0, 0, 34522, 0, 'Venomhide Hatchling'), +(34320, 0, 2, 'The %s devours the food.', 16, 0, 100, 0, 0, 0, 34519, 0, 'Venomhide Hatchling'), +(34320, 0, 3, 'The %s catches the food in its mouth and swallows it in one gulp.', 16, 0, 100, 0, 0, 0, 34520, 0, 'Venomhide Hatchling'); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=20747; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=20747 AND `source_type`=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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20747, 0, 0, 1, 2, 0, 100, 1, 0, 20, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Silkwing Larva - On Less Than 20% HP - Say Line 0 (No repeat)'), +(20747, 0, 1, 0,61, 0, 100, 1, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Silkwing Larva - On Less Than 20% HP - Set Phase 2'), +(20747, 0, 2, 3, 0, 2, 100, 1, 4000, 4000, 0, 0, 11, 36948, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Silkwing Larva - IC (Phase 2) - Cast Silkwing (No repeat)'), +(20747, 0, 3, 0,61, 0, 100, 1, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Silkwing Larva - IC (Phase 2) - Die'); + +DELETE FROM `creature_text` WHERE `entry`=20747; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(20747, 0, 0, '%s begins to metamorphose...', 16, 0, 100, 0, 0, 0, 18589, 0, 'Silkwing Larva'); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=26452; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=26452 AND `source_type`=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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(26452, 0, 0, 1, 8, 0, 100, 0, 47170, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Leviroth - On Spellhit (Impale Leviroth) - Remove Unit flags (Immune to PC)'), +(26452, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 11, 46767, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Leviroth - On Spellhit (Impale Leviroth) - Cast Cosmetic - Underwater Blood'), +(26452, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Leviroth - On Spellhit (Impale Leviroth) - Start Attack'); + +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=8400 AND `source_type`=0 AND `id`=0 AND `link`=1; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=3127100 AND `source_type`=9 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid`=3127700 AND `source_type`=9 AND `id`=5; +DELETE FROM `smart_scripts` WHERE `entryorguid`=1468800 AND `source_type`=9 AND `id`=3; + +UPDATE `smart_scripts` SET `event_param1`=10000, `event_param2`=10000 WHERE `entryorguid`=31271 AND `source_type`=0 AND `id`=4 AND `link`=0; +UPDATE `smart_scripts` SET `event_param1`=1000, `event_param2`=1000 WHERE `entryorguid`=3127700 AND `source_type`=9 AND `id`=3 AND `link`=0; +UPDATE `smart_scripts` SET `event_param1`=7500, `event_param2`=7500 WHERE `entryorguid`=1468800 AND `source_type`=9 AND `id`=2 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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(3127100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Carnage - OOC script 1 - Remove Unit Flags'), +(3127700, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Thane Banahogg - OOC script 1 - Remove Unit Flags'), +(1468800, 9, 3, 0, 1, 0, 100, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Sandoval - OOC script 1 - Remove Unit Flags'); + diff --git a/sql/updates/world/3.3.5/2016_06_13_06_world.sql b/sql/updates/world/3.3.5/2016_06_13_06_world.sql new file mode 100644 index 00000000000..4ca697f1266 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_13_06_world.sql @@ -0,0 +1,5 @@ +DELETE FROM `gameobject_loot_template` WHERE `Entry` in(2515,2514) AND `Item`=2452; + +INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(2515, 2452, 0, 40, 0, 1, 0, 1, 2, NULL), +(2514, 2452, 0, 20, 0, 1, 0, 1, 2, NULL); diff --git a/sql/updates/world/3.3.5/2016_06_14_00_world.sql b/sql/updates/world/3.3.5/2016_06_14_00_world.sql new file mode 100644 index 00000000000..536298da2f9 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_14_00_world.sql @@ -0,0 +1,78 @@ +-- Add missing world.command from auth.rbac_permissions +DELETE FROM `command` WHERE `permission` IN (200,201,221,232,256,257,264,273,277,301,305,306,307,308,309,310,311,312,315,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,341,342,345,348,349,358,395,397,418,419,430,451,463,464,483,580,594,601,632,657,671,729,731,747,749,750,754,755,756,757,761,765,767,771,778); +INSERT INTO `command` (`name`, `permission`, `help`) VALUES +('rbac', 200, 'Syntax: bf $subcommand\n Type .rbac to see a list of possible subcommands\n or .help bf $subcommand to see info on the subcommand.'), +('rbac account', 201, 'Syntax: rbac account $subcommand\n Type .rbac account to see a list of possible subcommands\n or .help rbac account $subcommand to see info on the subcommand.'), +('account lock', 221, 'Syntax: .account lock [on|off]\n\n Allow login from account only from current used IP or remove this requirement.'), +('arena', 232, 'Syntax: arena $subcommand\n Type .arena to see a list of possible subcommands\n or .help arena $subcommand to see info on the subcommand.'), +('unban playeraccount', 256, 'Syntax: '), +('bf', 257, 'Syntax: bf $subcommand\n Type .bf to see a list of possible subcommands\n or .help bf $subcommand to see info on the subcommand.'), +('account set sec', 264, 'Syntax: '), +('character', 273, 'Syntax: character $subcommand\n Type .character to see a list of possible subcommands\n or .help character $subcommand to see info on the subcommand.'), +('character deleted', 277, 'Syntax: character deleted $subcommand\n Type .character deleted to see a list of possible subcommands\n or .help character deleted $subcommand to see info on the subcommand.'), +('debug anim', 301, 'Syntax: '), +('debug entervehicle', 305, 'Syntax: '), +('debug getitemstate', 306, 'Syntax: '), +('debug getitemvalue', 307, 'Syntax: '), +('debug getvalue', 308, 'Syntax: '), +('debug hostil', 309, 'Syntax: '), +('debug itemexpire', 310, 'Syntax: '), +('debug lootrecipient', 311, 'Syntax: '), +('debug los', 312, 'Syntax: '), +('debug play', 315, 'Syntax: '), +('debug send', 319, 'Syntax: '), +('debug send buyerror', 320, 'Syntax: '), +('debug send channelnotify', 321, 'Syntax: '), +('debug send chatmessage', 322, 'Syntax: '), +('debug send equiperror', 323, 'Syntax: '), +('debug send largepacket', 324, 'Syntax: '), +('debug send opcode', 325, 'Syntax: '), +('debug send qinvalidmsg', 326, 'Syntax: '), +('debug send qpartymsg', 327, 'Syntax: '), +('debug send sellerror', 328, 'Syntax: '), +('debug send setphaseshift', 329, 'Syntax: '), +('debug send spellfail', 330, 'Syntax: '), +('debug setaurastate', 331, 'Syntax: '), +('debug setbit', 332, 'Syntax: '), +('debug setitemvalue', 333, 'Syntax: '), +('debug setvalue', 334, 'Syntax: '), +('debug setvid', 335, 'Syntax: '), +('debug spawnvehicle', 336, 'Syntax: '), +('debug threat', 337, 'Syntax: '), +('debug update', 338, 'Syntax: '), +('debug uws', 339, 'Syntax: '), +('deserter', 341, 'Syntax: deserter $subcommand\n Type .deserter to see a list of possible subcommands\n or .help deserter $subcommand to see info on the subcommand.'), +('deserter bg', 342, 'Syntax: '), +('deserter instance', 345, 'Syntax: '), +('disable', 348, 'Syntax: disable $subcommand\n Type .disable to see a list of possible subcommands\n or .help disable $subcommand to see info on the subcommand.'), +('disable add', 349, 'Syntax: '), +('disable remove', 358, 'Syntax: '), +('gobject set', 395, 'Syntax: '), +('gobject set state', 397, 'Syntax: '), +('learn all', 418, 'Syntax: '), +('learn all my', 419, 'Syntax: '), +('lfg', 430, 'Syntax: lfg $subcommand\n Type .lfg to see a list of possible subcommands\n or .help lfg $subcommand to see info on the subcommand.'), +('lookup player', 451, 'Syntax: '), +('channel', 463, 'Syntax: channel $subcommand\n Type .channel to see a list of possible subcommands\n or .help channel $subcommand to see info on the subcommand.'), +('channel set', 464, 'Syntax: '), +('send', 483, 'Syntax: send $subcommand\n Type .send to see a list of possible subcommands\n or .help send $subcommand to see info on the subcommand.'), +('npc set', 580, 'Syntax: '), +('npc near', 594, 'Syntax: '), +('npc tame', 601, 'Syntax: '), +('mutehistory', 632, 'Syntax: '), +('reload locales_achievement_reward', 657, 'Syntax: '), +('reload npc_spellclick_spells', 671, 'Syntax: '), +('server set', 729, 'Syntax: '), +('server set difftime', 731, 'Syntax: '), +('ticket complete', 747, 'Syntax: '), +('ticket escalate', 749, 'Syntax: '), +('ticket escalatedlist', 750, 'Syntax: '), +('ticket response', 754, 'Syntax: '), +('ticket response append', 755, 'Syntax: '), +('ticket response appendln', 756, 'Syntax: '), +('ticket togglesystem', 757, 'Syntax: '), +('titles', 761, 'Syntax: '), +('titles set', 765, 'Syntax: '), +('wp', 767, 'Syntax: wp $subcommand\n Type .wp to see a list of possible subcommands\n or .help wp $subcommand to see info on the subcommand.'), +('wp modify', 771, 'Syntax: '), +('ahbot', 778, 'Syntax: ahbot $subcommand\n Type .ahbot to see a list of possible subcommands\n or .help ahbot $subcommand to see info on the subcommand.'); diff --git a/sql/updates/world/3.3.5/2016_06_14_01_world.sql b/sql/updates/world/3.3.5/2016_06_14_01_world.sql new file mode 100644 index 00000000000..63bc2f9d00b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_14_01_world.sql @@ -0,0 +1,104 @@ +-- +UPDATE `creature_template` SET `mechanic_immune_mask`= mechanic_immune_mask +|1 -- CHARM +|2 -- DISORIENTED +|4 -- DISARM +|8 -- DISTRACT +|16 -- FEAR +|32 -- GRIP +|64 -- ROOT +|256 -- SILENCE +|512 -- SLEEP +|1024 -- SNARE +|2048 -- STUN +|4096 -- FREEZE +|8192 -- KNOCKOUT +|65536 -- POLYMORPH +|131072 -- BANISH +|524288 -- SHACKLE +|4194304 -- TURN +|8388608 -- HORROR +|67108864 -- DAZE +|536870912 -- SAPPED +WHERE `entry` IN +-- Utgarde Keep +(23953,30748, -- Prince Keleseth +27390,31680, -- Skarvald the Constructor +27389,31657, -- Dalronn the Controller +23954,31673, -- Ingvar the Plunderer + +-- The Nexus +26731,30510, -- Grand Magus Telestra +26763,30529, -- Anomalus +26794,30532, -- Ormorok the Tree-Shaper +26723,30540, -- Keristrasza +26796,30398, -- Commander Stoutbeard +26798,30397, -- Commander Kolurg + +-- Azjol-Nerub +28684,31612, -- Krik'thir the Gatewatcher +28921,31611, -- Hadronox +29120,31610, -- Anub'arak + +-- Ahn'kahet: The Old Kingdom +29309,31456, -- Elder Nadox +29308,31469, -- Prince Taldaram +29310,31465, -- Jedoga Shadowseeker +29311,31464, -- Herald Volazj +30258,31463, -- Amanitar + +-- Drak'Tharon Keep +26630,31362, -- Trollgore +26631,31350, -- Novos the Summoner +27483,31349, -- King Dred +26632,31360, -- The Prophet Tharon'ja + +-- The Violet Hold +29315,31507, -- Erekem +29316,31510, -- Moragg +29313,31508, -- Ichoron +29266,31511, -- Xevozz +29312,31509, -- Lavanthor +29314,31512, -- Zuramat the Obliterator +31134,31506, -- Cyanigosa + +-- Gundrak +29304,31370, -- Slad'ran +29307,31365, -- Drakkari Colossus +29573,31367, -- Drakkari Elemental +29305,30530, -- Moorabi +29306,31368, -- Gal'darah +29932, -- Eck the Ferocious + +-- Halls of Stone +27975,31384, -- Maiden of Grief +27977,31381, -- Krystallus +27978,31386, -- Sjonnir The Ironshaper + +-- The Culling of Stratholme +26529,31211, -- Meathook +26530,31212, -- Salramm the Fleshcrafter +26532,31215, -- Chrono-Lord Epoch +26533,31217, -- Mal'Ganis +32273,32313, -- Infinite Corruptor + +-- Halls of Lightning +28586,31533, -- General Bjarngrim +28587,31536, -- Volkhan +28546,31537, -- Ionar +28923,31538, -- Loken + +-- The Oculus +27654,31558, -- Drakos the Interrogator +27447,31559, -- Varos Cloudstrider +27655,31560, -- Mage-Lord Urom +27656,31561, -- Ley-Guardian Eregos + +-- Utgarde Pinnacle +26668,30810, -- Svala Sorrowgrave +26687,30774, -- Gortok Palehoof +26693,30807, -- Skadi the Ruthless +26861,30788, -- King Ymiron + +-- The Forge of Souls +36497,36498); -- Bronjahm diff --git a/sql/updates/world/3.3.5/2016_06_14_02_world.sql b/sql/updates/world/3.3.5/2016_06_14_02_world.sql new file mode 100644 index 00000000000..eea9c0e6ac1 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_14_02_world.sql @@ -0,0 +1,14 @@ +-- "Plucky" Johnson (Magus Tirth's assistant) in quest 1950 "Get the Scoop": +UPDATE `creature_template` SET `gossip_menu_id`= 231, `AIName`= 'SmartAI', `ScriptName`= '' WHERE `entry`= 6626; +UPDATE `creature_template` SET `gossip_menu_id`= 0, `AIName`= '' WHERE `entry`= 6666; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (6626,6666) AND `source_type`= 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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(6626,0,0,1,22,0,100,0, 22,0,0,0,11, 9192, 2,0,0,0,0,1,0,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 22 - Cast "Plucky" Resumes Human Form'), +(6626,0,1,2,61,0,100,0, 0,0,0,0, 5, 3, 0,0,0,0,0,1,0,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 22 - Play Emote 3'), +(6626,0,2,0,61,0,100,0, 0,0,0,0,11, 9220, 2,0,0,0,0,1,0,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 22 - Cast "Plucky" Resumes Chicken Form'), +(6626,0,3,4,22,0,100,0, 7,0,0,0,11, 9192, 2,0,0,0,0,1,0,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 7 - Cast "Plucky" Resumes Human Form'), +(6626,0,4,5,61,0,100,0, 0,0,0,0,82, 1, 0,0,0,0,0,1,0,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 7 - Add npcflags Gossip'), +(6626,0,5,0,61,0,100,0, 0,0,0,0,69, 0, 0,0,0,0,0,7,0,0,0,0,0,0,0,'"Plucky" Johnson - Received Emote 7 - Move To Invoker'), +(6626,0,6,7,62,0,100,0,231,0,0,0,72, 0, 0,0,0,0,0,7,0,0,0,0,0,0,0,'"Plucky" Johnson\'s Human Form - On Gossip Option 0 Selected - Close Gossip'), +(6626,0,7,0,61,0,100,0, 0,0,0,0,15, 1950, 0,0,0,0,0,7,0,0,0,0,0,0,0,'"Plucky" Johnson\'s Human Form - On Gossip Option 0 Selected - Credit Quest 1950'); diff --git a/sql/updates/world/3.3.5/2016_06_14_03_world.sql b/sql/updates/world/3.3.5/2016_06_14_03_world.sql new file mode 100644 index 00000000000..922182468dd --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_14_03_world.sql @@ -0,0 +1,385 @@ +SET @CGUID:= 145427; -- 69 GUIDs required +SET @OGUID:= 73587; -- 13 GUIDs required +SET @OG_PORTAL:= 193206; +SET @OG_TELEPORTSPELL:= 59064; +SET @UCTELEPORTSPELL:= 59439; +SET @HORDE_BUILDING1:= 193219; +SET @HORDE_BUILDING2:= 193217; +SET @HORDE_BUILDING3:= 193218; +SET @HORDE_BUILDING4:= 193216; +SET @HORDE_BUILDING5:= 193215; +SET @REFUGEE1:= 31437; +SET @REFUGEE2:= 31467; +SET @MOUNTEDORC:= 31564; -- mounted on frostwolf +SET @MOUNTEDORC2:= 31563; -- mounted on brown wolf +SET @KORKRONGUARDS:= 31417; -- guards within thrall building +SET @NPC_GRYSHKA:= 31433; +SET @NPC_OVERLORD_RUNTHAK:= 31431; +SET @NPC_OLVIA:= 31425; +SET @NPC_SANA:= 31429; +SET @NPC_FELIKA:= 31427; +SET @NPC_THUNG:= 31430; +SET @NPC_KAJA:= 31423; +SET @NPC_GAMON:= 31424; +SET @NPC_COMMONER:= 31434; +SET @NPC_THRALL:= 31412; +SET @PORTAL_STORMWIND:= 31640; +SET @NPC_SYLVANAS:= 31419; +SET @NPC_JAINA:= 31418; +SET @UC_THRALL:= 31650; +SET @UC_SYLVANAS:= 31651; +SET @VOLJIN:= 31649; +SET @UCPORTAL:= 193425; -- orgrimmar + +UPDATE `creature` SET `PhaseMask` = 65 WHERE `GUID` IN (6565, 10351, 3390, 3387, 10450, 8526, 6564, 8522, 6560, 11792, 7395, 6557, 6548, 3373, 3372, 6550, 6555, 3371, 6552, 6556, 6551, 3378, 7396, 3380, 3376, 3379, 3375, 6553); +UPDATE `creature_template` SET `unit_flags` = 788 WHERE `entry` = @NPC_GAMON; +UPDATE `creature_template` SET `ScriptName` = 'npc_overlord_runthak_orgrimmar' WHERE `entry` = @NPC_OVERLORD_RUNTHAK; +UPDATE `creature_template` SET `ScriptName` = 'npc_thrall_herald_of_war' WHERE `entry` = @NPC_THRALL; +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = @NPC_SYLVANAS; +UPDATE `creature_template` SET `unit_flags` = 768 WHERE `entry` = @NPC_JAINA; + +DELETE FROM `smart_scripts` WHERE `entryorguid` = @NPC_SYLVANAS; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@NPC_SYLVANAS, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sylvanas - on reset - set byte kneel'), +(@NPC_SYLVANAS, 0, 1, 0, 34, 0, 100, 0, 8, 2, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Sylvanas - on movement inform - set byte kneel'); + +DELETE FROM `areatrigger_scripts` WHERE `entry` = 5279; +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES +(5279, "areatrigger_orgrimmar_herald_of_war"); + +DELETE FROM `creature_text` WHERE `entry` IN (@NPC_GRYSHKA, @NPC_OLVIA, @NPC_FELIKA, @NPC_THUNG, @NPC_SANA, @NPC_KAJA, @NPC_OVERLORD_RUNTHAK, @NPC_THRALL, @NPC_SYLVANAS, @NPC_JAINA); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(@NPC_GRYSHKA, 0, 0, "When can we reopen our shops? I'm losing gold here!", 12, 0, 100, 0, 0, 0, 32237, 0, "inkeeper gryshka - herald of war"), +(@NPC_GRYSHKA, 1, 0, "This is an outrage!", 12, 0, 100, 0, 0, 0, 32238, 0, "inkeeper gryshka - herald of war"), + +(@NPC_OLVIA, 0, 0, "Where is the Warchief?", 12, 0, 100, 0, 0, 0, 32236, 0, "olvia - herald of war"), +(@NPC_OLVIA, 1, 0, "What are all these Forsaken doing here?", 12, 0, 100, 0, 0, 0, 32233, 0, "olvia - herald of war"), + +(@NPC_FELIKA, 0, 0, "What is going on?", 12, 0, 100, 0, 0, 0, 45914, 0, "felika - herald of war"), +(@NPC_FELIKA, 1, 0, "This is an outrage!", 12, 0, 100, 0, 0, 0, 46620, 0, "felika - herald of war"), + +(@NPC_THUNG, 0, 0, "What is going on?", 12, 0, 100, 0, 0, 0, 32232, 0, "auctioneer thathung - herald of war"), + +(@NPC_KAJA, 0, 0, "Why is Thrall allowing this to happen to our city?", 12, 0, 100, 0, 0, 0, 32239, 0, "Kaja - herald of war"), + +(@NPC_SANA, 0, 0, "We demand answers!", 12, 0, 100, 0, 0, 0, 32235, 0, "Sana - herald of war"), + +(@NPC_OVERLORD_RUNTHAK, 0, 0, "SILENCE!", 12, 0, 100, 0, 0, 0, 32240, 0, "Overlord runthak - herald of war"), +(@NPC_OVERLORD_RUNTHAK, 1, 0, "We are on the brink of all out war with the Alliance!", 12, 0, 100, 0, 0, 0, 32241, 0, "Overlord runthak - herald of war"), +(@NPC_OVERLORD_RUNTHAK, 2, 0, "Tragic events have unfolded in Northrend. The Warchief is doing all that he can to keep us safe.", 12, 0, 100, 0, 0, 0, 32242, 0, "Overlord runthak - herald of war"), +(@NPC_OVERLORD_RUNTHAK, 3, 0, "All services and shops are to remain closed until further notice! That is all!", 12, 0, 100, 0, 0, 0, 32243, 0, "Overlord runthak - herald of war"), + +(@NPC_THRALL, 0, 0, "Kor'kron, stand down!", 12, 0, 100, 0, 0, 16222, 32286, 0, "Thrall - herald of war"), +(@NPC_THRALL, 1, 0, "Jaina...", 12, 0, 100, 0, 0, 16223, 32287, 0, "Thrall - herald of war"), +(@NPC_THRALL, 2, 0, "Jaina, what happened at the Wrathgate. It was a betrayal from within...", 12, 0, 100, 0, 0, 16224, 32289, 0, "Thrall - herald of war"), +(@NPC_THRALL, 3, 0, "The Horde has lost the Undercity.", 12, 0, 100, 1, 0, 16225, 32292, 0, "Thrall - herald of war"), +(@NPC_THRALL, 4, 0, "We now prepare to lay siege to the city and bring the perpetrators of this unforgivable crime to justice.", 12, 0, 100, 378, 0, 16226, 32293, 0, "Thrall - herald of war"), +(@NPC_THRALL, 5, 0, "If we are forced into a conflict, the Lich King will destroy our divided forces in Northrend.", 12, 0, 100, 378, 0, 16227, 32294, 0, "Thrall - herald of war"), +(@NPC_THRALL, 6, 0, "We will make this right, Jaina. Tell your king all that you have learned here.", 12, 0, 100, 378, 0, 16228, 32295, 0, "Thrall - herald of war"), +(@NPC_THRALL, 7, 0, "Kor'kron, prepare transport to the Undercity.", 12, 0, 100, 378, 0, 16229, 32300, 0, "Thrall - herald of war"), + +(@NPC_SYLVANAS, 0, 0, "Lady Proudmoore, the Warchief speaks the truth. This subterfuge was set in motion by Varimathras and Grand Apothecary Putress. It was not the Horde's doing.", 12, 0, 100, 0, 0, 16315, 32290, 0, "Sylvanas - herald of war"), +(@NPC_SYLVANAS, 1, 0, "As the combined Horde and Alliance forces began their assault upon the Wrath Gate, an uprising broke out in the Undercity. Varimathras and hordes of his demonic brethren attacked. Hundreds of my people were slain in the coup. I barely managed to escape with my life.", 12, 0, 100, 0, 0, 16316, 32291, 0, "Sylvanas - herald of war"), + +(@NPC_JAINA, 0, 0, "Thrall, what has happened? The King is preparing for war...", 12, 0, 100, 0, 0, 16129, 32288, 0, "Jaina - herald of war"), +(@NPC_JAINA, 1, 0, "I will deliver this information to King Wrynn, Thrall, but...", 12, 0, 100, 378, 0, 16130, 32296, 0, "Jaina - herald of war"), +(@NPC_JAINA, 2, 0, "Bolvar was like a brother to him. In the King's absence, Bolvar kept the Alliance united. He found strength for our people in our darkest hours. He watched over Anduin, raising him as his own.", 12, 0, 100, 378, 0, 16131, 32297, 0, "Jaina - herald of war"), +(@NPC_JAINA, 3, 0, "I fear that the rage will consume him, Thrall. I remain hopeful that reason will prevail, but we must prepare for the worst... for war.", 12, 0, 100, 378, 0, 16132, 32298, 0, "Jaina - herald of war"), +(@NPC_JAINA, 4, 0, "Farewell, Warchief. I pray that the next time we meet it will be as allies.", 12, 0, 100, 0, 0, 16133, 32299, 0, "Jaina - herald of war"); + +DELETE FROM `gameobject` WHERE `id` IN (@OG_PORTAL, @HORDE_BUILDING5, @HORDE_BUILDING4, @HORDE_BUILDING2, @HORDE_BUILDING3, @UCPORTAL); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES +(@OGUID, @OG_PORTAL, 571, 3537, 4129, 1, 1, 2830.01, 6179.37, 84.66, 4.16, 0, 0, 0.715875, -0.698228, 120, 100, 1, 0), +(@OGUID + 1, @HORDE_BUILDING5, 1, 14, 14, 1, 64, 1339.00, -4413.98, 27.25, 2.29, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 2, @HORDE_BUILDING5, 1, 1637, 1637, 1, 64, 1508.90, -4429.49, 21.95, 6.13, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 3, @HORDE_BUILDING4, 1, 14, 14, 1, 64, 1290.05, -4417.47, 26.61, 0.72, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 4, @HORDE_BUILDING4, 1, 14, 14, 1, 64, 1346.67, -4343.90, 27.23, 4.48, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 5, @HORDE_BUILDING2, 1, 14, 14, 1, 64, 1376.69, -4355.44, 26.24, 1.15, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 6, @HORDE_BUILDING2, 1, 1637, 1637, 1, 64, 1437.96, -4365.91, 25.46, 0.41, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 7, @HORDE_BUILDING3, 1, 1637, 1637, 1, 64, 1425.65, -4356.49, 25.46, 4.84, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 8, @HORDE_BUILDING3, 1, 1637, 1637, 1, 64, 1441.50, -4432.17, 25.46, 0.05, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 9, @HORDE_BUILDING2, 1, 1637, 1637, 1, 64, 1429.12, -4423.08, 25.46, 3.28, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 10, @HORDE_BUILDING4, 1, 1637, 1637, 1, 64, 1501.42, -4392.46, 22.69, 4.83, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 11, @UCPORTAL, 1, 1637, 1637, 1, 64, 1912.070923, -4151.778809, 40.637005, 1.635784, 0, 0, 0, 0, 600, 0, 1, 0), +(@OGUID + 12, @UCPORTAL, 1, 1637, 1637, 1, 64, 1931.545288, -4149.240723, 40.600616, 1.804645, 0, 0, 0, 0, 600, 0, 1, 0); + +DELETE FROM `creature` WHERE `GUID` BETWEEN @CGUID AND @CGUID + 68; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@CGUID, @REFUGEE1, 1, 14, 14, 1, 64, 0, 0, 1313.62, -4504.06, 22.9198, 1.60753, 300, 0, 0, 1, 0, 2, 0, 0, 0, 0), +(@CGUID + 1, @REFUGEE1, 1, 14, 14, 1, 64, 0, 0, 1317.69, -4499.57, 25.0943, 1.60753, 300, 0, 0, 1, 0, 2, 0, 0, 0, 0), +(@CGUID + 2, @REFUGEE2, 1, 14, 14, 1, 64, 0, 0, 1310.69, -4504.17, 22.2043, 1.60753, 300, 0, 0, 1, 0, 2, 0, 0, 0, 0), +(@CGUID + 3, @REFUGEE2, 1, 14, 14, 1, 64, 0, 0, 1311.13, -4518.5, 22.2047, 1.55255, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting + +(@CGUID + 4, @REFUGEE1, 1, 14, 14, 1, 64, 0, 0, 1345.48, -4419.18, 27.4299, 2.28297, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 5, @REFUGEE1, 1, 14, 14, 1, 64, 0, 0, 1343.1, -4411.76, 27.6054, 2.31831, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 6, @REFUGEE2, 1, 14, 14, 1, 64, 0, 0, 1338.59, -4416.07, 27.143, 2.25548, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting + +(@CGUID + 7, @REFUGEE1, 1, 14, 14, 1, 64, 0, 0, 1348.62, -4339.38, 27.2402, 5.19288, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 8, @REFUGEE2, 1, 14, 14, 1, 64, 0, 0, 1344.26, -4341.66, 27.2953, 5.19288, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting + +(@CGUID + 9, @REFUGEE1, 1, 14, 14, 1, 64, 0, 0, 1373.44, -4354.1, 26.3845, 4.51351, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 10, @REFUGEE2, 1, 14, 14, 1, 64, 0, 0, 1377.47, -4355.02, 26.2234, 4.48603, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), + +(@CGUID + 11, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1426.94, -4355.01, 25.4626, 4.82374, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@CGUID + 12, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1439.5, -4368.21, 25.4626, 3.35504, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@CGUID + 13, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1423.99, -4355.34, 25.4626, 4.82374, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 14, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1438.59, -4363.16, 25.4626, 3.44536, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), + +(@CGUID + 15, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1442.41, -4382.73, 28.0943, 3.24115, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 16, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1418.21, -4354.67, 28.1022, 4.91012, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping + +(@CGUID + 17, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1425.6, -4423.85, 25.4629, 6.16282, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 18, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1428.84, -4420.12, 25.4629, 6.16282, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 19, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1440.43, -4431.69, 25.4629, 1.87456, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 20, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1428.35, -4424.18, 25.4629, 6.16282, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 21, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1425.12, -4421.19, 25.4629, 6.16282, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 22, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1444.34, -4433.12, 25.4629, 1.87456, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting + +(@CGUID + 23, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1506.86, -4436.01, 23.113, 1.97747, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 24, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1503.98, -4392.84, 21.9971, 5.36252, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 25, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1499.08, -4393.03, 23.3294, 5.3154, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 26, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1513.89, -4429.5, 20.4131, 1.76542, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 27, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1508.19, -4430.54, 22.2681, 1.89108, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 28, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1499.22, -4387.96, 23.339, 5.07193, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 29, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1503.9, -4386.66, 22.0753, 5.31148, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 30, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1512.58, -4435.7, 21.1882, 1.85966, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping + +(@CGUID + 31, @REFUGEE1, 1, 14, 14, 1, 64, 0, 0, 1345.22, -4407.99, 27.9504, 1.99711, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sleeping +(@CGUID + 32, @REFUGEE2, 1, 14, 14, 1, 64, 0, 0, 1336.65, -4409.31, 27.3459, 1.86359, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 33, @REFUGEE1, 1, 14, 14, 1, 64, 0, 0, 1290.52, -4419.55, 26.6016, 1.35857, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 34, @REFUGEE1, 1, 14, 14, 1, 64, 0, 0, 1286.92, -4415.25, 26.5606, 1.23683, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@CGUID + 35, @REFUGEE2, 1, 14, 14, 1, 64, 0, 0, 1287.15, -4418.59, 26.5876, 1.29181, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), -- sitting +(@CGUID + 36, @REFUGEE2, 1, 14, 14, 1, 64, 0, 0, 1294.74, -4416.27, 26.6432, 3.06289, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), + +(@CGUID + 37, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1655.2, -4416.18, 16.7609, 3.19012, 300, 0, 0, 1, 0, 2, 0, 0, 0, 0), +(@CGUID + 38, @REFUGEE1, 1, 1637, 1637, 1, 64, 0, 0, 1550.75, -4411.13, 9.02373, 3.24117, 300, 0, 0, 1, 0, 2, 0, 0, 0, 0), +(@CGUID + 39, @REFUGEE2, 1, 1637, 1637, 1, 64, 0, 0, 1588.68, -4440.77, 5.6737, 2.90345, 300, 0, 0, 1, 0, 2, 0, 0, 0, 0), +(@CGUID + 40, @NPC_THRALL, 1, 1637, 1637, 1, 64, 0, 0, 1913.81, -4127.87, 43.23, 0.147480, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@CGUID + 41, @NPC_SYLVANAS, 1, 1637, 1637, 1, 64, 0, 0, 1920.589233, -4130.980469, 43.090080, 1.741838, 300, 0, 0, 1, 0, 0, 0, 0, 0, 0), +(@CGUID + 42, @KORKRONGUARDS, 1, 1637, 1637, 1, 64, 0, 1, 1944.779541, -4136.510254, 41.157078, 3.683755, 300, 0, 0, 63000, 0, 0, 0, 0, 0, 0), +(@CGUID + 43, @KORKRONGUARDS, 1, 1637, 1637, 1, 64, 0, 1, 1938.338501, -4215.597168, 42.321674, 3.534525, 300, 0, 0, 63000, 0, 0, 0, 0, 0, 0), +(@CGUID + 44, @KORKRONGUARDS, 1, 1637, 1637, 1, 64, 0, 1, 1926.85, -4134.75, 40.6305, 4.6753, 300, 0, 0, 63000, 0, 0, 0, 0, 0, 0), +(@CGUID + 45, @KORKRONGUARDS, 1, 1637, 1637, 1, 64, 0, 1, 1913.69, -4135.14, 40.6359, 4.79468, 300, 0, 0, 63000, 0, 0, 0, 0, 0, 0), +(@CGUID + 46, @KORKRONGUARDS, 1, 1637, 1637, 1, 64, 0, 1, 1913.99, -4122.2, 43.2624, 4.84964, 300, 0, 0, 63000, 0, 0, 0, 0, 0, 0), +(@CGUID + 47, @KORKRONGUARDS, 1, 1637, 1637, 1, 64, 0, 1, 1925.71, -4121.88, 43.2014, 4.73577, 300, 0, 0, 63000, 0, 0, 0, 0, 0, 0), + +(@CGUID + 48, @MOUNTEDORC, 1, 1637, 1637, 1, 64, 0, 0, 1527.04, -4398.42, 14.4175, 3.54668, 300, 0, 0, 31905, 0, 2, 0, 0, 0, 0), +(@CGUID + 49, @MOUNTEDORC, 1, 1637, 1637, 1, 64, 0, 0, 1434.51, -4399.44, 25.4631, 1.64601, 300, 0, 0, 31905, 0, 2, 0, 0, 0, 0), + +(@CGUID + 50, @MOUNTEDORC2, 1, 14, 14, 1, 64, 0, 1, 1370.59, -4377.64, 26.0629, 3.47206, 300, 0, 0, 42540, 0, 2, 0, 0, 0, 0), +(@CGUID + 51, @MOUNTEDORC2, 1, 1637, 1637, 1, 64, 0, 1, 1539.24, -4435.88, 12.4312, 1.64208, 300, 0, 0, 42540, 0, 2, 0, 0, 0, 0), + +(@CGUID + 52, @NPC_GAMON, 1, 1637, 1637, 1, 64, 0, 0, 1596.91, -4398.47, 7.63585, 0.605362, 300, 0, 0, 247, 0, 0, 0, 0, 0, 0), +(@CGUID + 53, @NPC_OLVIA, 1, 1637, 1637, 1, 64, 0, 1, 1599.6, -4399.69, 8.52417, 0.687829, 300, 0, 0, 2769, 0, 0, 0, 0, 0, 0), +(@CGUID + 54, @NPC_KAJA, 1, 1637, 1637, 1, 64, 0, 1, 1598.06, -4400.97, 7.78653, 0.687829, 300, 0, 0, 1003, 0, 0, 0, 0, 0, 0), +(@CGUID + 55, @NPC_FELIKA, 1, 1637, 1637, 1, 64, 0, 1, 1601.15, -4401.67, 9.1794, 0.801712, 300, 0, 0, 1003, 0, 0, 0, 0, 0, 0), +(@CGUID + 56, @NPC_SANA, 1, 1637, 1637, 1, 64, 0, 0, 1598.94, -4397.32, 8.49337, 0.664267, 300, 0, 0, 1003, 0, 0, 0, 0, 0, 0), +(@CGUID + 57, @NPC_GRYSHKA, 1, 1637, 1637, 1, 64, 0, 1, 1597.02, -4395.84, 8.61465, 0.664267, 300, 0, 0, 1003, 0, 0, 0, 0, 0, 0), +(@CGUID + 58, @NPC_THUNG, 1, 1637, 1637, 1, 64, 0, 0, 1594.9, -4395.75, 8.23313, 0.664267, 300, 0, 0, 126, 0, 0, 0, 0, 0, 0), +(@CGUID + 59, @NPC_COMMONER, 1, 1637, 1637, 1, 64, 0, 0, 1596.92, -4404.38, 7.44287, 0.664267, 300, 0, 0, 1395, 0, 0, 0, 0, 0, 0), +(@CGUID + 60, @NPC_COMMONER, 1, 1637, 1637, 1, 64, 0, 0, 1599.55, -4403.68, 8.18324, 0.664267, 300, 0, 0, 2292, 0, 0, 0, 0, 0, 0), +(@CGUID + 61, @NPC_COMMONER, 1, 1637, 1637, 1, 64, 0, 0, 1595.14, -4402.1, 6.89729, 0.664267, 300, 0, 0, 1110, 0, 0, 0, 0, 0, 0), +(@CGUID + 62, @NPC_COMMONER, 1, 1637, 1637, 1, 64, 0, 0, 1594.08, -4399.7, 6.717, 0.664267, 300, 0, 0, 955, 0, 0, 0, 0, 0, 0), +(@CGUID + 63, @NPC_COMMONER, 1, 1637, 1637, 1, 64, 0, 0, 1592.45, -4397.61, 7.12726, 0.664267, 300, 0, 0, 247, 0, 0, 0, 0, 0, 0), +(@CGUID + 64, @NPC_COMMONER, 1, 1637, 1637, 1, 64, 0, 0, 1592.86, -4394.45, 7.90426, 0.218946, 300, 0, 0, 71, 0, 0, 0, 0, 0, 0), +(@CGUID + 65, @NPC_OVERLORD_RUNTHAK, 1, 1637, 1637, 1, 64, 0, 1, 1606.09, -4396.1, 10.1268, 3.7446, 300, 0, 0, 48832, 0, 0, 0, 0, 0, 0), +(@CGUID + 66, @UC_SYLVANAS, 0, 85, 153, 1, 64, 0, 1, 1943.76, 237.566, 44.276, 3.09834, 300, 0, 0, 6972500, 0, 0, 0, 0, 0, 0), +(@CGUID + 67, @VOLJIN, 0, 85, 153, 1, 64, 0, 1, 1944.09, 245.315, 44.2522, 3.09834, 300, 0, 0, 3585186, 0, 0, 0, 134217728, 0, 0), +(@CGUID + 68, @UC_THRALL, 0, 85, 153, 1, 64, 0, 1, 1943.59, 233.699, 44.3204, 3.09834, 300, 0, 0, 7925544, 0, 0, 0, 134217728, 0, 0); + +-- pathing is pure guess, there is no sniff of this event. Seen lots of videos and everybody ignores those fuckers ;[ +DELETE FROM `waypoint_data` WHERE `id` IN ((@CGUID + 37) * 10, (@CGUID + 38) * 10, (@CGUID + 39) * 10, @CGUID * 10, (@CGUID + 2) * 10, (@CGUID + 1) * 10, (@CGUID + 51) * 10, (@CGUID + 49) * 10, (@CGUID + 48) * 10, (@CGUID + 50) * 10, (@CGUID + 65) * 10, (@CGUID + 40) * 10); +INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES +((@CGUID + 37) * 10, 1, 1636.727661, -4419.891113, 15.754716, 3.374689, 0, 0, 0, 100, 0), +((@CGUID + 37) * 10, 2, 1597.315430, -4436.729004, 6.685284, 3.547476, 0, 0, 0, 100, 0), +((@CGUID + 37) * 10, 3, 1532.198364, -4418.569824, 12.707468, 2.803703, 0, 0, 0, 100, 0), +((@CGUID + 37) * 10, 4, 1439.670654, -4423.134277, 25.462461, 3.070738, 0, 0, 0, 100, 0), +((@CGUID + 37) * 10, 5, 1428.224976, -4366.074707, 25.462461, 1.739488, 0, 0, 0, 100, 0), +((@CGUID + 37) * 10, 6, 1359.062012, -4372.103516, 26.125994, 3.259234, 0, 0, 0, 100, 0), +((@CGUID + 37) * 10, 7, 1301.137085, -4391.241699, 26.268190, 3.479145, 0, 0, 0, 100, 0), +((@CGUID + 37) * 10, 8, 1359.062012, -4372.103516, 26.125994, 3.259234, 0, 0, 0, 100, 0), -- 6 +((@CGUID + 37) * 10, 9, 1428.224976, -4366.074707, 25.462461, 1.739488, 0, 0, 0, 100, 0), -- 5 +((@CGUID + 37) * 10, 10, 1439.670654, -4423.134277, 25.462461, 3.070738, 0, 0, 0, 100, 0), -- 4 +((@CGUID + 37) * 10, 11, 1532.198364, -4418.569824, 12.707468, 2.803703, 0, 0, 0, 100, 0), -- 3 +((@CGUID + 37) * 10, 12, 1597.315430, -4436.729004, 6.685284, 3.547476, 0, 0, 0, 100, 0), -- 2 +((@CGUID + 37) * 10, 13, 1636.727661, -4419.891113, 15.754716, 3.374689, 0, 0, 0, 100, 0), -- 1 +((@CGUID + 37) * 10, 14, 1661.776733, -4411.652832, 17.281466, 0.494632, 0, 0, 0, 100, 0), + +((@CGUID + 38) * 10, 1, 1510.770508, -4415.110840, 19.337944, 3.245882, 0, 0, 0, 100, 0), +((@CGUID + 38) * 10, 2, 1440.086914, -4422.711426, 25.462467, 3.249809, 0, 0, 0, 100, 0), +((@CGUID + 38) * 10, 3, 1424.909790, -4370.168457, 25.462467, 2.820196, 0, 0, 0, 100, 0), +((@CGUID + 38) * 10, 4, 1360.981689, -4377.626953, 26.084114, 3.323637, 0, 0, 0, 100, 0), +((@CGUID + 38) * 10, 5, 1341.317139, -4405.867188, 27.853329, 4.383916, 0, 0, 0, 100, 0), +((@CGUID + 38) * 10, 6, 1312.769043, -4491.074707, 22.622589, 4.560626, 3000, 0, 0, 100, 0), +((@CGUID + 38) * 10, 7, 1341.317139, -4405.867188, 27.853329, 4.383916, 0, 0, 0, 100, 0), -- 5 +((@CGUID + 38) * 10, 8, 1360.981689, -4377.626953, 26.084114, 3.323637, 0, 0, 0, 100, 0), -- 4 +((@CGUID + 38) * 10, 9, 1424.909790, -4370.168457, 25.462467, 2.820196, 0, 0, 0, 100, 0), -- 3 +((@CGUID + 38) * 10, 10, 1440.086914, -4422.711426, 25.462467, 3.249809, 0, 0, 0, 100, 0), -- 2 +((@CGUID + 38) * 10, 11, 1510.770508, -4415.110840, 19.337944, 3.245882, 0, 0, 0, 100, 0), -- 1 + +((@CGUID + 39) * 10, 1, 1519.227173, -4420.032715, 17.018894, 2.832764, 0, 0, 0, 100, 0), +((@CGUID + 39) * 10, 2, 1504.174561, -4397.063477, 21.904577, 1.835307, 4000, 0, 0, 100, 0), +((@CGUID + 39) * 10, 3, 1475.047607, -4416.577637, 25.462658, 3.688848, 0, 0, 0, 100, 0), +((@CGUID + 39) * 10, 4, 1432.220093, -4422.998535, 25.462658, 3.321281, 2500, 0, 0, 100, 0), +((@CGUID + 39) * 10, 5, 1427.358276, -4369.822754, 25.462658, 1.896568, 0, 0, 0, 100, 0), +((@CGUID + 39) * 10, 6, 1378.408691, -4357.613281, 26.151247, 2.623062, 3000, 0, 0, 100, 0), +((@CGUID + 39) * 10, 7, 1352.227661, -4360.893066, 26.748661, 1.684511, 0, 0, 0, 100, 0), +((@CGUID + 39) * 10, 8, 1348.345459, -4345.072754, 27.216478, 1.818029, 2000, 0, 0, 100, 0), +((@CGUID + 39) * 10, 9, 1362.780273, -4367.947266, 26.153179, 5.547090, 0, 0, 0, 100, 0), +((@CGUID + 39) * 10, 10, 1424.892334, -4363.779785, 25.462536, 0.076789, 0, 0, 0, 100, 0), +((@CGUID + 39) * 10, 11, 1449.072754, -4425.893555, 25.462536, 5.519594, 0, 0, 0, 100, 0), +((@CGUID + 39) * 10, 12, 1496.059570, -4419.106445, 23.187777, 0.163175, 0, 0, 0, 100, 0), +((@CGUID + 39) * 10, 13, 1564.113159, -4412.110352, 7.560035, 0.171029, 0, 0, 0, 100, 0), + +(@CGUID * 10, 1, 1314.228394, -4472.458496, 23.983208, 1.540771, 0, 0, 0, 100, 0), +(@CGUID * 10, 2, 1315.020996, -4391.339355, 26.246040, 1.591822, 0, 0, 0, 100, 0), +(@CGUID * 10, 3, 1381.445679, -4373.530762, 26.022976, 0.193814, 0, 0, 0, 100, 0), +(@CGUID * 10, 4, 1425.371216, -4371.731445, 25.462433, 5.196810, 0, 0, 0, 100, 0), +(@CGUID * 10, 5, 1437.288330, -4423.067383, 25.462433, 5.133973, 0, 0, 0, 100, 0), +(@CGUID * 10, 6, 1488.331787, -4418.357422, 24.094090, 0.166324, 0, 0, 0, 100, 0), +(@CGUID * 10, 7, 1599.124756, -4407.760742, 7.388023, 0.376025, 10000, 0, 0, 100, 0), +(@CGUID * 10, 8, 1488.331787, -4418.357422, 24.094090, 0.166324, 0, 0, 0, 100, 0), -- 6 +(@CGUID * 10, 9, 1437.288330, -4423.067383, 25.462433, 5.133973, 0, 0, 0, 100, 0), -- 5 +(@CGUID * 10, 10, 1425.371216, -4371.731445, 25.462433, 5.196810, 0, 0, 0, 100, 0), -- 4 +(@CGUID * 10, 11, 1381.445679, -4373.530762, 26.022976, 0.193814, 0, 0, 0, 100, 0), -- 3 +(@CGUID * 10, 12, 1315.020996, -4391.339355, 26.246040, 1.591822, 0, 0, 0, 100, 0), -- 2 +(@CGUID * 10, 13, 1314.228394, -4472.458496, 23.983208, 1.540771, 0, 0, 0, 100, 0), + +((@CGUID + 2) * 10, 1, 1311.382813, -4472.563477, 24.082273, 1.557264, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 2, 1314.851563, -4387.514160, 26.244619, 1.616169, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 3, 1381.291992, -4370.146484, 26.023146, 1.616169, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 4, 1429.167358, -4371.299805, 25.462433, 4.840226, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 5, 1438.546509, -4419.699707, 25.462433, 6.037951, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 6, 1488.069946, -4415.084961, 23.924955, 0.084631, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 7, 1594.640869, -4406.261719, 6.956670,0.752219, 10500, 0, 0, 100, 0), +((@CGUID + 2) * 10, 8, 1488.069946, -4415.084961, 23.924955, 0.084631, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 9, 1438.546509, -4419.699707, 25.462433, 6.037951, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 10, 1429.167358, -4371.299805, 25.462433, 4.840226, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 11, 1381.291992, -4370.146484, 26.023146, 1.616169, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 12, 1314.851563, -4387.514160, 26.244619, 1.616169, 0, 0, 0, 100, 0), +((@CGUID + 2) * 10, 13, 1311.382813, -4472.563477, 24.082273, 1.557264, 0, 0, 0, 100, 0), + +((@CGUID + 1) * 10, 1, 1324.306641, -4474.051758, 25.471981, 1.623239, 1000, 0, 0, 100, 0), +((@CGUID + 1) * 10, 2, 1294.313599, -4423.655762, 26.651222, 2.200507, 2000, 0, 0, 100, 0), +((@CGUID + 1) * 10, 3, 1336.517456, -4413.115723, 27.156092, 0.119199, 2000, 0, 0, 100, 0), +((@CGUID + 1) * 10, 4, 1350.187622, -4346.205078, 27.194891, 1.474011, 2000, 0, 0, 100, 0), +((@CGUID + 1) * 10, 5, 1325.687866, -4406.854980, 27.066034, 4.489942, 0, 0, 0, 100, 0), +((@CGUID + 1) * 10, 6, 1312.286133, -4514.444336, 22.207296, 4.427111, 3000, 0, 0, 100, 0), + +((@CGUID + 48) * 10, 1, 1503.223022, -4413.273926, 21.462757, 3.743015, 0, 0, 0, 100, 0), +((@CGUID + 48) * 10, 2, 1551.767456, -4439.213867, 10.344376, 5.917779, 0, 0, 0, 100, 0), +((@CGUID + 48) * 10, 3, 1571.801270, -4415.120605, 7.094321, 0.950135, 0, 0, 0, 100, 0), +((@CGUID + 48) * 10, 4, 1530.485962, -4394.278809, 14.629207, 2.725135, 0, 0, 0, 100, 0), + +((@CGUID + 49) * 10, 1, 1428.319946, -4368.334961, 25.462538, 1.801508, 0, 0, 0, 100, 0), +((@CGUID + 49) * 10, 2, 1379.236084, -4371.864258, 26.023857, 3.317327, 0, 0, 0, 100, 0), +((@CGUID + 49) * 10, 3, 1317.712158, -4389.084473, 26.241236, 3.439064, 0, 0, 0, 100, 0), +((@CGUID + 49) * 10, 4, 1312.412354, -4495.200684, 22.253731, 4.683920, 0, 0, 0, 100, 0), +((@CGUID + 49) * 10, 5, 1317.712158, -4389.084473, 26.241236, 3.439064, 0, 0, 0, 100, 0), +((@CGUID + 49) * 10, 6, 1379.236084, -4371.864258, 26.023857, 3.317327, 0, 0, 0, 100, 0), +((@CGUID + 49) * 10, 7, 1428.319946, -4368.334961, 25.462538, 1.801508, 0, 0, 0, 100, 0), + +((@CGUID + 50) * 10, 1, 1350.657959, -4349.023926, 27.158371, 2.154161, 2000, 0, 0, 100, 0), +((@CGUID + 50) * 10, 2, 1328.607300, -4387.384277, 26.224094, 3.992004, 0, 0, 0, 100, 0), +((@CGUID + 50) * 10, 3, 1298.629150, -4412.804688, 26.687563, 3.768165, 0, 0, 0, 100, 0), +((@CGUID + 50) * 10, 4, 1292.821533, -4392.992188, 26.284231, 1.781106, 4000, 0, 0, 100, 0), +((@CGUID + 50) * 10, 5, 1379.779419, -4372.537598, 26.023079, 0.182821, 0, 0, 0, 100, 0), +((@CGUID + 50) * 10, 6, 1423.772461, -4367.567871, 25.462664, 0.061084, 0, 0, 0, 100, 0), +((@CGUID + 50) * 10, 7, 1438.552124, -4420.987793, 25.462664, 4.926629, 0, 0, 0, 100, 0), +((@CGUID + 50) * 10, 8, 1524.945923, -4410.342285, 14.457470, 0.163185, 0, 0, 0, 100, 0), +((@CGUID + 50) * 10, 9, 1582.459229, -4406.155273, 6.063486, 0.602228, 10000, 0, 0, 100, 0), +((@CGUID + 50) * 10, 10, 1524.945923, -4410.342285, 14.457470, 0.163185, 0, 0, 0, 100, 0), +((@CGUID + 50) * 10, 11, 1438.552124, -4420.987793, 25.462664, 4.926629, 0, 0, 0, 100, 0), +((@CGUID + 50) * 10, 12, 1423.772461, -4367.567871, 25.462664, 0.061084, 0, 0, 0, 100, 0), +((@CGUID + 50) * 10, 13, 1379.779419, -4372.537598, 26.023079, 0.182821, 0, 0, 0, 100, 0), + +((@CGUID + 51) * 10, 1, 1535.931396, -4416.078125, 11.668506, 1.755966, 0, 0, 0, 100, 0), +((@CGUID + 51) * 10, 2, 1580.108887, -4405.557617, 5.750760, 0.267636, 0, 0, 0, 100, 0), +((@CGUID + 51) * 10, 3, 1651.950684, -4417.000488, 16.760706, 6.232729, 0, 0, 0, 100, 0), +((@CGUID + 51) * 10, 4, 1556.471802, -4436.006348, 8.810843, 3.083283, 0, 0, 0, 100, 0), + +((@CGUID + 65) * 10, 1, 1601.677856, -4390.092773, 10.024803, 3.693547, 0, 0, 0, 100, 0), +((@CGUID + 65) * 10, 2, 1607.239624, -4397.162109, 10.247937, 2.237402, 0, 0, 0, 100, 0), + +((@CGUID + 40) * 10, 1, 1923.388672, -4126.897949, 43.180893, 6.057603, 0, 0, 0, 100, 0), +((@CGUID + 40) * 10, 2, 1916.156494, -4127.158691, 43.197136, 3.186971, 0, 0, 0, 100, 0); + +DELETE FROM `creature_addon` WHERE `guid` IN (@CGUID + 4, @CGUID + 6, @CGUID + 8, @CGUID + 10, @CGUID + 11 , @CGUID + 12, @CGUID + 14, @CGUID + 18, @CGUID + 19, @CGUID + 21, @CGUID + 22, @CGUID + 23, @CGUID + 25, @CGUID + 27, @CGUID + 29, @CGUID + 32, @CGUID + 5, @CGUID + 7, @CGUID + 9, @CGUID + 13, @CGUID + 15, @CGUID + 16, @CGUID + 17, @CGUID + 20, @CGUID + 24, @CGUID + 26, @CGUID + 28, @CGUID + 30, @CGUID + 31, @CGUID + 35, @CGUID + 33, @CGUID + 34, @CGUID + 3); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +-- sitting +(@CGUID + 4, 0, 0, 1, 0, 0, ""), +(@CGUID + 6, 0, 0, 1, 0, 0, ""), +(@CGUID + 8, 0, 0, 1, 0, 0, ""), +(@CGUID + 10, 0, 0, 1, 0, 0, ""), +(@CGUID + 11, 0, 0, 1, 0, 0, ""), +(@CGUID + 12, 0, 0, 1, 0, 0, ""), +(@CGUID + 14, 0, 0, 1, 0, 0, ""), +(@CGUID + 18, 0, 0, 1, 0, 0, ""), +(@CGUID + 19, 0, 0, 1, 0, 0, ""), +(@CGUID + 21, 0, 0, 1, 0, 0, ""), +(@CGUID + 22, 0, 0, 1, 0, 0, ""), +(@CGUID + 23, 0, 0, 1, 0, 0, ""), +(@CGUID + 25, 0, 0, 1, 0, 0, ""), +(@CGUID + 27, 0, 0, 1, 0, 0, ""), +(@CGUID + 29, 0, 0, 1, 0, 0, ""), +(@CGUID + 32, 0, 0, 1, 0, 0, ""), +(@CGUID + 35, 0, 0, 1, 0, 0, ""), +(@CGUID + 33, 0, 0, 1, 0, 0, ""), +(@CGUID + 3, 0, 0, 1, 0, 0, ""), + +-- sleeping +(@CGUID + 5, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 7, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 9, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 13, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 15, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 16, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 17, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 20, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 24, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 26, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 28, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 30, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 31, 0, 0, 3, 0, 0, "42648"), +(@CGUID + 34, 0, 0, 3, 0, 0, "42648"); + +-- pathing and mounts +DELETE FROM `creature_addon` WHERE `guid` IN (@CGUID + 37, @CGUID + 38, @CGUID + 39, @CGUID, @CGUID + 2, @CGUID + 1, @CGUID + 51, @CGUID + 48, @CGUID + 49, @CGUID + 50); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(@CGUID + 37, (@CGUID + 37) * 10, 0, 0, 0, 0, ""), +(@CGUID + 38, (@CGUID + 38) * 10, 0, 0, 0, 0, ""), +(@CGUID + 39, (@CGUID + 39) * 10, 0, 0, 0, 0, ""), +(@CGUID, @CGUID * 10, 0, 0, 0, 0, ""), +(@CGUID + 2, (@CGUID + 2) * 10, 0, 0, 0, 0, ""), +(@CGUID + 1, (@CGUID + 1) * 10, 0, 0, 0, 0, ""), +(@CGUID + 51, (@CGUID + 51) * 10, 29283, 0, 0, 0, ""), +(@CGUID + 50, (@CGUID + 50) * 10, 29283, 0, 0, 0, ""), +(@CGUID + 48, (@CGUID + 48) * 10, 29260, 0, 0, 0, ""), +(@CGUID + 49, (@CGUID + 49) * 10, 29260, 0, 0, 0, ""); + +DELETE FROM `gameobject_addon` WHERE `guid` IN (@OGUID, @OGUID + 11, @OGUID + 12); +INSERT INTO `gameobject_addon` (`guid`, `invisibilityType`, `invisibilityValue`) VALUES +(@OGUID, 7, 1000), +(@OGUID + 11, 7, 1000), +(@OGUID + 12, 7, 1000); + +DELETE FROM `spell_area` WHERE `spell` IN (60943, 59062); +INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES +(60943, 4129, 13257, 13257, 0, 690, 2, 1, 2, 2), +(59062, 14, 13257, 13267, 0, 690, 2, 1, 66, 11), +(59062, 1637, 13257, 13267, 0, 690, 2, 1, 66, 11), +(60943, 1637, 13266, 0, 0, 690, 2, 1, 2, 0), + +(59062, 85, 13257, 13267, 0, 690, 2, 1, 64, 11), -- tirisfal glades +(59062, 1497, 13257, 13267, 0, 690, 2, 1, 64, 11); -- undercity + +DELETE FROM `spell_script_names` WHERE `spell_id` IN (@OG_TELEPORTSPELL, @UCTELEPORTSPELL); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(@OG_TELEPORTSPELL, 'spell_59064_59439_portals'), +(@UCTELEPORTSPELL, 'spell_59064_59439_portals'); + +-- Its not sniff verified, if anyone got any info about it, you're more than welcome to correct it +DELETE FROM `spell_target_position` WHERE `ID` IN (58419, 59448); +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES +(58419, 0, 1, 1336.34, -4374.32, 26.19, 0.09, 0), +(59448, 0, 0, 1962.69, 235.92, 39.77, 3.09, 0); diff --git a/sql/updates/world/3.3.5/2016_06_14_05_world.sql b/sql/updates/world/3.3.5/2016_06_14_05_world.sql new file mode 100644 index 00000000000..2b34562e4bb --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_14_05_world.sql @@ -0,0 +1,18 @@ +-- Add sniffed gossip text to menu +DELETE FROM `gossip_menu_option` WHERE `menu_id` = 8207; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(8207, 0, 0, 'I need a new phase disruptor, Professor.', 18635,1,1,0,0,0,0,'',0); + +-- Migrate NPC to use SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 20907; + +-- Create SmartAI for Dabiri +DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = 20907); +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(20907,0, 0, 1, 62, 0, 100, 0, 8207, 0,0,0, 85, 35780, 0,0,0,0,0, 7, 0,0,0,0,0,0,0, "Professor Dabiri - On Gossip Option 0 Selected - Invoker Cast 'Summon Phase Disruptor'"), +(20907,0, 1, 0, 61, 0, 100, 0, 0, 0,0,0, 72, 0, 0,0,0,0,0, 7, 0,0,0,0,0,0,0, 'Professor Dabiri - On Linked Actions - Close Gossip'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 8207; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,8207,0,0,0,2,0,29778,1,0,1,0,'','Professor Dabiri - Show gossip option 0 if player does not have item 29778 in inventory'), +(15,8207,0,0,0,9,0,10438,0,0,0,0,'','Professor Dabiri - Show gossip option 0 if player has accepted quest 10438'); diff --git a/sql/updates/world/3.3.5/2016_06_15_00_world.sql b/sql/updates/world/3.3.5/2016_06_15_00_world.sql new file mode 100644 index 00000000000..286d86dd7d3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_00_world.sql @@ -0,0 +1,7 @@ +-- +UPDATE `quest_template` SET `AllowableRaces`=32 WHERE `ID`=748; + +UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID`=364; +UPDATE `quest_template` SET `AllowableRaces`=0 WHERE `ID` IN (364, 3901); + +UPDATE `quest_template` SET `AllowableRaces`=0 WHERE `ID` IN (367, 368, 369, 492); diff --git a/sql/updates/world/3.3.5/2016_06_15_01_world.sql b/sql/updates/world/3.3.5/2016_06_15_01_world.sql new file mode 100644 index 00000000000..74e50e55785 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_01_world.sql @@ -0,0 +1,8 @@ +-- +SET @OGUID := 6409; +DELETE FROM `gameobject` WHERE `guid` IN (@OGUID+0,@OGUID+1,@OGUID+2,@OGUID+3); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@OGUID+0,193988,615,3,1,3246.47,515.266,58.6196,1.54789,0,0,0.698963,0.715158,-300,0,1), +(@OGUID+1,193988,615,3,1,3154.78,515.889,90.9767,3.18872,0,0,0.999722,-0.0235612,-300,0,1), +(@OGUID+2,193988,615,3,1,3216.13,648.325,87.0783,0.693027,0,0,0.339621,0.940562,-300,0,1), +(@OGUID+3,193988,615,3,1,3383.81,532.522,96.971,3.43866,0,0,0.988989,-0.147986,-300,0,1); diff --git a/sql/updates/world/3.3.5/2016_06_15_02_world.sql b/sql/updates/world/3.3.5/2016_06_15_02_world.sql new file mode 100644 index 00000000000..b94af5ec293 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_02_world.sql @@ -0,0 +1,18 @@ +-- +DELETE FROM `item_loot_template` WHERE `Entry` IN (50301,54218); +INSERT INTO `item_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(50301,46779,0,36.36,0,1,1,50,50,'Landro\'s Pet Box, Path of Cenarius'), +(50301,35223,0,36.36,0,1,1,50,50,'Landro\'s Pet Box, Papa Hummel\'s Old-Fashioned Pet Biscuit'), +(50301,45047,0,27.28,0,1,1,50,50,'Landro\'s Pet Box, Sandbox Tiger'), +(50301,32588,0,0.45,0,1,2,1,1,'Landro\'s Pet Box, Banana Charm'), +(50301,38050,0,0.45,0,1,2,1,1,'Landro\'s Pet Box, Soul-Trader Beacon'), +(50301,34493,0,0.10,0,1,2,1,1,'Landro\'s Pet Box, Dragon Kite'), +(54218,46779,0,36.36,0,1,1,50,50,'Landro\'s Gift Box, Path of Cenarius'), +(54218,35223,0,36.36,0,1,1,50,50,'Landro\'s Gift Box, Papa Hummel\'s Old-Fashioned Pet Biscuit'), +(54218,45047,0,27.28,0,1,1,50,50,'Landro\'s Gift Box, Sandbox Tiger'), +(54218,23720,0,0.50,0,1,2,1,1,'Landro\'s Gift Box, Riding Turtle'), +(54218,49284,0,0.30,0,1,2,1,1,'Landro\'s Gift Box, Reins of the Swift Spectral Tiger'), +(54218,49283,0,0.30,0,1,2,1,1,'Landro\'s Gift Box, Reins of the Spectral Tiger'), +(54218,49286,0,0.30,0,1,2,1,1,'Landro\'s Gift Box, X-51 Nether-Rocket X-TREME'), +(54218,49285,0,0.10,0,1,2,1,1,'Landro\'s Gift Box, X-51 Nether-Rocket'), +(54218,49282,0,0.20,0,1,2,1,1,'Landro\'s Gift Box, Big Battle Bear'); diff --git a/sql/updates/world/3.3.5/2016_06_15_03_world.sql b/sql/updates/world/3.3.5/2016_06_15_03_world.sql new file mode 100644 index 00000000000..edc42a33642 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_03_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `creature_template_addon` WHERE `entry`= 29403; -- Onslaught Gryphon +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(29403, 0, 0, 0, 1, 0, 54422); -- add aura 'Flying' to Onslaught Gryphon diff --git a/sql/updates/world/3.3.5/2016_06_15_04_world.sql b/sql/updates/world/3.3.5/2016_06_15_04_world.sql new file mode 100644 index 00000000000..f976ba3093b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_04_world.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `creature_template_addon` WHERE `entry`=24783; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(24783, 0, 0, 0, 1, 0, 43775); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN(13,17) AND `SourceEntry`=44422; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,44422,0,0,30,0,186946,5,0,0,0,0,'',"Spell 'Scavenge' target GameObject 'Fjord Hawk Egg'"), +(13,1,44422,0,0,31,0,5,186946,0,0,0,0,'',"Spell 'Scavenge' target GameObject 'Fjord Hawk Egg'"); diff --git a/sql/updates/world/3.3.5/2016_06_15_05_world.sql b/sql/updates/world/3.3.5/2016_06_15_05_world.sql new file mode 100644 index 00000000000..1524c2f2a5e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_05_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `skill_fishing_base_level` WHERE `entry` IN (4100,4987); +INSERT INTO `skill_fishing_base_level` (`entry`, `skill`) VALUES +(4987, 480), +(4100, 450); diff --git a/sql/updates/world/3.3.5/2016_06_15_06_world.sql b/sql/updates/world/3.3.5/2016_06_15_06_world.sql new file mode 100644 index 00000000000..1f8a50b65a3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_06_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestId`=0 WHERE `id`=9409; +UPDATE `quest_template_addon` SET `PrevQuestId`=9409 WHERE `id`=9371; +UPDATE `quest_template_addon` SET `ExclusiveGroup`=9280 WHERE `ID` IN (9280, 9369); +UPDATE `quest_template` SET `RewardNextQuest`=9409 WHERE `ID`=9280; diff --git a/sql/updates/world/3.3.5/2016_06_15_07_world.sql b/sql/updates/world/3.3.5/2016_06_15_07_world.sql new file mode 100644 index 00000000000..a3ceba435dc --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_07_world.sql @@ -0,0 +1,18 @@ +-- +UPDATE `quest_request_items` SET `CompletionText`="Did you find the Syndicate Shadow Mages, and collect from them the blood?" WHERE `ID`=1066; + +UPDATE `quest_request_items` SET CompletionText="Did you secure the books? They need to be kept out of the wrong hands." WHERE ID = 14356; +UPDATE `quest_offer_reward` SET RewardText="Good, $C. You've done well. I'll keep these safe from prying eyes; the last thing we need is a strong Shadow Council rising up again.$B$BCheck back with me in the future; there's always something that needs doing around here, apparently, and I might need another able body." WHERE ID = 14356; + +UPDATE `page_text` SET `Text`="Supervisor Fizsprocket, please find enclosed a list of the equipment you have requisitioned, approved by President Razdunk.$B$BHe has asked me to remind and to emphasize to you of the Venture Company's vested interest in setting up operations throughout Kalimdor. Our drilling and mining outposts in the Barrens have proven profitable and efficient, but we still await sufficient production numbers from Mulgore, your jurisdiction.$B$BThe advisory board understands the difficulties in establishing" WHERE `ID`=352; +UPDATE `page_text` SET `Text`="a large scale operation so close to the tauren homeland, but do not feel that they pose a large impediment to our overall business plan in the area.$B$BWe are pleased to hear that mining has begun in the mineral rich plains of Mulgore. Because of this the board has approved your equipment request. In addition to mining, we feel that Mulgore also has much to offer in the way of lumber, thus you will also be provided with several of our newest model shredders and raw materials to construct a mill.", `NextPageID`=0 WHERE `ID`=353; +DELETE FROM `page_text` WHERE ID = 354; + +UPDATE `page_text` SET `Text`="Deathstalker Mission Report$B$BAgents: Rane Yorick, Quinn Yorick, Erland McKree$B$BPrimary mission: perform reconnaissance through northern silverpine, and determine threat levels of wildlife and Scourge." WHERE `ID`=380; +UPDATE `page_text` SET `Text`="Agents commenced sweep, finding significant worg presence. Recommend hunting squads dispatched to reduce this threat.$B$BUndead gnolls were found at the farm steading dubbed The Dead Field. Their purpose at the farm is not known, though their movements and level of readiness suggest imminent military action. In the time they were observed, no notable leaders were found among the gnolls. It is assumed they await the arrival of leadership or reinforcements." WHERE `ID`=381; +UPDATE `page_text` SET `Text`="Continuing the sweep, our agents were detained at Ivar's farm. Ivar, most of his family and his workers had succumbed to the Scourge and become its minions.$B$BOur agents were attacked and although successful in defeating their ambushers, they sustained serious injuries, particularly agent Quinn." WHERE `ID`=382; +UPDATE `page_text` SET `Text`="A defensive position was taken in Ivar's old house, and while Rane kept watch for future attacks, Erland continued the reconnaissance mission.$B$BErland was then pinned by Worgs in a northern orchard, only escaping with the aid of another Forsaken agent. That agent is the bearer of this report." WHERE `ID`=383; +UPDATE `page_text` SET `Text`="It should be noted here that this report bearer was instrumental in not only the success of our mission, but also in the defeat of Ivar the Foul, the rescue of Erland, and the deliverance of this report.$B$BWe extend our gratitude, and recommend that command acknowledges this individual with awards befitting such meritorious conduct as was displayed in the field.$B$B-Deathstalker Rane Yorick,$BMission Leader" WHERE `ID`=386; + +UPDATE `page_text` SET `NextPageID`=571, `Text`="The Bleeding Sparrow: Manifest$B$B(20) barrels rum. Destination: Theramore$B(50) sacks flour. Destination: Theramore$B(2) crates assorted gnome tools. Destination: Ratchet$B(30) bolts cotton cloth. Destination: Theramore$B(4) crates spices. Destination: Theramore$B(3) passengers. Destination: Theramore" WHERE `ID`=527; +UPDATE `page_text` SET `NextPageID`=0, `Text`="Captain,$B$BI wish you fortune in your journeys. Regrettably, fortune did not favor our first abduction attempt.$B$BWhen our team made contact with the target in the Stormwind/Ironforge tunnels, they found only a decoy. It appears he showed more wisdom than we accredited him.$B$BBut our second plan is already in motion. Defias agents are prepared to intercept the target as he approaches Theramore. Soon Stormwind will feel our bite all too keenly..$B$B-M" WHERE `ID`=571; diff --git a/sql/updates/world/3.3.5/2016_06_15_08_world.sql b/sql/updates/world/3.3.5/2016_06_15_08_world.sql new file mode 100644 index 00000000000..49d3fbc4643 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_08_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `creature_queststarter` WHERE `quest` IN (615, 8551); +UPDATE `quest_template` SET `AllowableRaces`=0 WHERE `ID`=614; diff --git a/sql/updates/world/3.3.5/2016_06_15_09_world_335.sql b/sql/updates/world/3.3.5/2016_06_15_09_world_335.sql new file mode 100644 index 00000000000..51ab052ef56 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_09_world_335.sql @@ -0,0 +1,11 @@ +DELETE FROM `creature_queststarter` WHERE `quest`IN(8143,8144); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(14905, 8143), +(14905, 8144); + +DELETE FROM `creature_questender` WHERE `quest`IN(8143,8144); +INSERT INTO `creature_questender` (`id`, `quest`) VALUES +(14905, 8143), +(14905, 8144); + +UPDATE `quest_template` SET `AllowableRaces`=0 WHERE `ID`=8144; diff --git a/sql/updates/world/3.3.5/2016_06_15_10_world.sql b/sql/updates/world/3.3.5/2016_06_15_10_world.sql new file mode 100644 index 00000000000..6033ee9446c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_10_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `gameobject` WHERE `guid`=5537; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `spawntimesecs`, `state`) VALUES +(5537,4090,530,-2518.51001,7360.100098,10.6223,120,1); diff --git a/sql/updates/world/3.3.5/2016_06_15_11_world.sql b/sql/updates/world/3.3.5/2016_06_15_11_world.sql new file mode 100644 index 00000000000..5409a886b28 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_11_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM creature_template_addon WHERE `entry` IN (26514); +INSERT INTO creature_template_addon (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(26514, 0, 0, 0, 1, 0, '29266'); diff --git a/sql/updates/world/3.3.5/2016_06_15_12_world.sql b/sql/updates/world/3.3.5/2016_06_15_12_world.sql new file mode 100644 index 00000000000..16919326b48 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_12_world.sql @@ -0,0 +1,99 @@ +-- +SET @CGUID := 87945; -- 15 required +SET @OGUID := 64102; -- 15 required + +-- Set Earthen Ring Elder ID: 26221 friendly to both factions +UPDATE `creature_template` SET `faction`=35 WHERE `entry`=26221; +DELETE FROM `creature_queststarter` WHERE `id` IN (26221,25975,25324); +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID AND @CGUID+14; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(@CGUID, 25866, 1, 1, 1, 0, 0, 3886.6, 771.658, 5.00204, 3.78625, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+1, 25866, 1, 1, 1, 0, 0, 3873.34, 786.567, 3.15877, 1.19364, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+2, 25866, 1, 1, 1, 0, 0, 3886.25, 820.325, 1.23753, 1.74656, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+3, 25866, 1, 1, 1, 0, 0, 3922.2, 795.453, 9.05771, 3.07546, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+4, 25863, 1, 1, 1, 0, 0, 3956.09, 767.42, 7.88992, 5.17483, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+5, 25863, 1, 1, 1, 0, 0, 3988.96, 790.529, 6.19678, 0.208762, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+6, 25863, 1, 1, 1, 0, 0, 3899.13, 764.193, 6.01616, 5.62487, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+7, 25863, 1, 1, 1, 0, 0, 3923.53, 840.173, 2.29151, 2.07879, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+8, 25924, 1, 1, 1, 0, 0, 3916.05, 783.268, 9.0577, 0.717698, 300, 0, 0, 44, 0, 0, 0, 0, 0), +(@CGUID+9, 25866, 1, 1, 1, 0, 0, 3900.86, 799.587, 7.80664, 1.37978, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+10, 25866, 1, 1, 1, 0, 0, 3950.07, 846.313, 7.9843, 4.16433, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+11, 25866, 1, 1, 1, 0, 0, 3982.71, 816.306, 8.04045, 4.0481, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+12, 25866, 1, 1, 1, 0, 0, 3918.32, 760.473, 7.77712, 1.94087, 300, 30, 0, 42, 0, 1, 0, 0, 0), +(@CGUID+13, 25863, 1, 1, 1, 0, 0, 3922.62, 811.827, 7.79205, 2.56369, 300, 0, 0, 42, 0, 0, 0, 0, 0), +(@CGUID+14, 25949, 1, 1, 1, 0, 0, 4196.1, 1172.44, 6.68073, 0.688985, 300, 0, 0, 486, 1357, 0, 0, 0, 0); +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID AND @OGUID+14; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID, 187989, 1, 1, 1, 3955.77, 862.105, 0.1785, 3.93579, 0, 0, 0.922187, -0.386745, 300, 0, 1), +(@OGUID+1, 187989, 1, 1, 1, 3880.54, 795.812, 2.67948, 0.589994, 0, 0, 0.290737, 0.956803, 300, 0, 1), +(@OGUID+2, 187989, 1, 1, 1, 3923.8, 748.779, 8.05033, 2.67052, 0, 0, 0.972389, 0.233364, 300, 0, 1), +(@OGUID+3, 187989, 1, 1, 1, 3959.24, 760.694, 6.12531, 2.76477, 0, 0, 0.982303, 0.1873, 300, 0, 1), +(@OGUID+4, 187989, 1, 1, 1, 3998.39, 815.017, 4.22604, 3.56744, 0, 0, 0.977417, -0.21132, 300, 0, 1), +(@OGUID+5, 187989, 1, 1, 1, 3953.32, 808.406, 9.07383, 0.295474, 0, 0, 0.1472, 0.989107, 300, 0, 1), +(@OGUID+6, 187989, 1, 1, 1, 3944.4, 817.924, 9.05937, 2.23541, 0, 0, 0.899098, 0.437748, 300, 0, 1), +(@OGUID+7, 187918, 1, 1, 1, 3891.73, 795.127, 7.70466, 3.57844, 0, 0, 0.97624, -0.216691, 300, 0, 1), +(@OGUID+8, 187918, 1, 1, 1, 3928.2, 818.467, 8.38597, 0.711076, 0, 0, 0.348095, 0.937459, 300, 0, 1), +(@OGUID+9, 187918, 1, 1, 1, 3956.23, 854.015, 7.9829, 1.18232, 0, 0, 0.557323, 0.830296, 300, 0, 1), +(@OGUID+10, 187918, 1, 1, 1, 3988.24, 819.46, 8.01849, 5.47452, 0, 0, 0.393407, -0.919365, 300, 0, 1), +(@OGUID+11, 187918, 1, 1, 1, 3923.81, 758.498, 7.77727, 4.57321, 0, 0, 0.754564, -0.656226, 300, 0, 1), +(@OGUID+12, 187918, 1, 1, 1, 3947.51, 812.939, 9.06439, 0.920322, 0, 0, 0.444092, 0.895981, 300, 0, 1), +(@OGUID+13, 187989, 1, 1, 1, 3924.28, 779.525, 9.05821, 2.43535, 0, 0, 0.938298, 0.345828, 300, 0, 1), +(@OGUID+14, 187989, 1, 1, 1, 3912.78, 792.797, 9.05821, 2.43771, 0, 0, 0.938704, 0.344723, 300, 0, 1); +-- SAI and loot for Twilight Firesworn, Twilight Flameguard and Twilight Speaker Viktor +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (25863,25924,25866); +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25863,0,0,0,0,0,100,0,0,1000,7000,7500,11,20793,0,0,0,0,0,2,0,0,0,0,0,0,0,'Firesworn - IC - Cast spell Fireball on victim'), +(25863,0,1,0,4,0,100,0,0,0,0,0,11,184,0,0,0,0,0,1,0,0,0,0,0,0,0,'Firesworn - On aggro - Cast fire shield on self'), +(25863,0,2,0,4,0,100,0,0,0,0,0,1,0,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Firesworn - On aggro - Say Text 0'), +(25924,0,0,0,0,0,100,0,0,1000,7000,7500,11,20793,0,0,0,0,0,2,0,0,0,0,0,0,0,'Speaker Viktor - IC - Cast spell Fireball on victim'), +(25924,0,1,0,4,0,100,0,0,0,0,0,1,0,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Speaker Viktor - On aggro - Say Text 0'), +(25866,0,0,0,4,0,100,0,0,0,0,0,1,0,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Flameguard - On aggro - Say Text 0'); +UPDATE `creature_template` SET `lootid`=25866,`AIName`= 'SmartAI' WHERE `entry`=25866; +UPDATE `creature_template` SET `lootid`=25863,`unit_class`=8,`AIName`= 'SmartAI' WHERE `entry`=25863; +UPDATE `creature_template` SET `AIName`= 'SmartAI',`lootid` =25924,`unit_class`=8 WHERE `entry`=25924; +DELETE FROM `creature_loot_template` WHERE `entry`IN (25866,25863,25924); +INSERT INTO `creature_loot_template` VALUES +(25866,35277,0,100,1,1,0,1,1,'Twilight Correspondence'), +(25863,35277,0,100,1,1,0,1,1,'Twilight Correspondence'), +(25924,35277,0,100,1,1,0,1,1,'Twilight Correspondence'); +-- Add SAI for quest "Unusual activity" +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN (26534,25324); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (26534,25324); +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(26534,0,0,0,1,0,100,1,6000,10000,0,0,12,25324,3,60000,0,0,0,23,0,0,0,0,0,0,0,'Totem - On event update - Summon guide'), +(25324,0,0,0,54,0,100,0,0,0,0,0,29,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Earthen ring Guide - On just summonned - Follow Totem'), +(25324,0,1,0,64,0,100,0,0,0,0,0,1,0,1500,0,0,0,0,1,0,0,0,0,0,0,0,'Earthen ring Guide - On gossip hello - Say text 0'); +-- Earthen Ring Guide text +DELETE FROM `creature_text` WHERE `entry` IN (25324,25863,25924,25866); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(25324,0,1,'What is it you need?',12,0,100,1,1500,0,'Earthen ring guide',25739), +(25324,0,2,'Have you discovered something?',12,0,100,1,1500,0,'Earthen ring guide',25740), +(25324,0,3,'The elemental spirits are restless...',12,0,100,1,1500,0,'Earthen ring guide',25741), +(25863,0,0,'You are not allowed to interfere!',12,0,100,1,1500,0,'Twilight Firesworn',25098), +(25924,0,0,'Our vision will be realized!',12,0,100,1,1500,0,'Twilight Speaker Viktor',25099), +(25866,0,0,'The elements will crush you!',12,0,100,1,1500,0,'Twilight Speaker Viktor',25100); +-- SAI for Briatha +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=25949; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25949; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=2594900; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25949,0,0,0,10,0,100,0,1,20,40000,40000,80,2594900,2,0,0,0,0,1,0,0,0,0,0,0,0,'Briatha - OOC LOS - Call Timed ActionList'), +(2594900,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Briatha - Action list - Talk0'), +(2594900,9,1,0,0,0,100,0,6000,6000,0,0,1,0,4000,0,0,0,0,9,25951,0,15,0,0,0,0,'Emissary - Action list - Say text 0'), +(2594900,9,2,0,0,0,100,0,6000,6000,0,0,1,1,4000,0,0,0,0,1,0,0,0,0,0,0,0,'Briatha - Action list - Say text 1'), +(2594900,9,3,0,0,0,100,0,6000,6000,0,0,1,1,4000,0,0,0,0,9,25951,0,15,0,0,0,0,'Emissary - Action list - Say text 1'), +(2594900,9,4,0,0,0,100,0,6000,6000,0,0,1,2,3500,0,0,0,0,1,0,0,0,0,0,0,0,'Briatha - Action list - Say text 2'), +(2594900,9,5,0,0,0,100,0,0,0,0,0,11,46375,0,0,0,0,0,1,0,0,0,0,0,0,0,'Briatha - Action list - Cast spell quest credit'); +-- Briatha and Heretic Emissary text +DELETE FROM `creature_text` WHERE `entry` IN (25949,25951); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(25949,0,0,'These stones should be the last of them. Our coordination with Neptulon''s forces will be impeccable.',12,0,100,1,0,0,'Briatha',25123), +(25949,1,0,'And your own preparations? Will the Frost Lord have a path to the portal?',12,0,100,1,0,0,'Briatha',25126), +(25949,2,0,'The ritual in Coilfang will bring Ahune through once he is fully prepared, and the resulting clash between Firelord and Frostlord will rend the foundations of this world. Our ultimate goals are in reach at last....',12,0,100,1,0,0,'Briatha',25128), +(25951,0,0,'Yess. The Tidehunter will be pleased at this development. The Firelord\'s hold will weaken.',12,0,100,1,0,0,'Heretic Emissary',25124), +(25951,1,0,'Skar\'this has informed us well. We have worked our way into the slave pens and await your cryomancerss.',12,0,100,1,0,0,'Heretic Emissary',25127); + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+14 AND `eventEntry`=1; +INSERT INTO `game_event_creature` SELECT 1, creature.guid FROM `creature` WHERE creature.guid BETWEEN @CGUID+0 AND @CGUID+14; +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+14 AND `eventEntry`=1; +INSERT INTO `game_event_gameobject` SELECT 1, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+14; diff --git a/sql/updates/world/3.3.5/2016_06_15_13_world_335.sql b/sql/updates/world/3.3.5/2016_06_15_13_world_335.sql new file mode 100644 index 00000000000..b38b0ff1cb3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_13_world_335.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `gameobject_template` WHERE `entry` IN (181290); +INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `AIName`, `ScriptName`, `VerifiedBuild`) VALUES +(181290,6,0,'Midsummer Bonfire Spawn Trap','','','',0,0,1,0,0,0,28784,0,0,-1,0,0,0,0,0,0,'','',0); diff --git a/sql/updates/world/3.3.5/2016_06_15_14_world.sql b/sql/updates/world/3.3.5/2016_06_15_14_world.sql new file mode 100644 index 00000000000..410ae76253d --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_14_world.sql @@ -0,0 +1,27 @@ +-- Creature entry 20243, Scrapped Fel Reaver, Quest "It's a Fel Reaver, But with Heart" +SET @FEL := 20243; -- Scrapped Fel Reaver +SET @Zaxxis := 20287; -- Zaxxis Ambusher + +DELETE FROM `creature_text` WHERE `entry` = @FEL; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(@FEL,0,0,"The %s's mechanical heart begins to beat softly.",16,0,100,0,0,0,18271,0,"Scrapped Fel Reaver - Zapped Emote"); + +DELETE FROM `smart_scripts` WHERE `entryorguid` = @FEL AND `source_type` = 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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@FEL,0, 0,1, 8, 0,100,0, 35282, 0, 0, 0, 19, 256, 0, 0, 0,0,0, 1, 0, 0, 0, 0, 0, 0, 0, "Scrapped Fel Reaver - On Spellhit 'Fel Zapper' - Remove Flags Immune To Players"), +(@FEL,0, 1,2, 61, 0,100,0, 0, 0, 0, 0, 1, 0, 1000, 0, 0,0,0, 1, 0, 0, 0, 0, 0, 0, 0, "Scrapped Fel Reaver - On Spellhit 'Fel Zapper' - Say Line 0"), +(@FEL,0, 2,0, 61, 0,100,0, 0, 0, 0, 0, 18, 131076, 0, 0, 0,0,0, 1, 0, 0, 0, 0, 0, 0, 0, "Scrapped Fel Reaver - On Spellhit 'Fel Zapper' - Set Flags Disable Movement & Pacified"), +(@FEL,0, 3,0, 0, 0,100,0, 2000, 2000, 30000, 30000, 12,@Zaxxis, 2, 180000, 1,0,0, 8, 0, 0, 0, 2547.08, 3982.24, 131.39, 2.01, "Scrapped Fel Reaver - In Combat - Summon Creature 'Zaxxis Ambusher'"), +(@FEL,0, 4,0, 0, 0,100,0, 17000, 17000, 45000, 45000, 12,@Zaxxis, 2, 180000, 1,0,0, 8, 0, 0, 0, 2537.70, 3975.96, 130.40, 1.58, "Scrapped Fel Reaver - In Combat - Summon Creature 'Zaxxis Ambusher'"), +(@FEL,0, 5,0, 0, 0,100,0, 32000, 32000, 45000, 45000, 12,@Zaxxis, 2, 180000, 1,0,0, 8, 0, 0, 0, 2506.46, 4008.93, 133.80, 6.19, "Scrapped Fel Reaver - In Combat - Summon Creature 'Zaxxis Ambusher'"), +(@FEL,0, 6,0, 0, 0,100,0, 60000, 60000, 45000, 45000, 12,@Zaxxis, 2, 180000, 1,0,0, 8, 0, 0, 0, 2537.30, 4027.11, 135.50, 4.30, "Scrapped Fel Reaver - In Combat - Summon Creature 'Zaxxis Ambusher'"), +(@FEL,0, 7,0, 6, 0,100,0, 0, 0, 0, 0, 51, 0, 0, 0, 0,0,0, 9,@Zaxxis, 0, 150, 0, 0, 0, 0, "Scrapped Fel Reaver - On Just Died - Kill Target"), +(@FEL,0, 8,0, 7, 0,100,0, 0, 0, 0, 0, 51, 0, 0, 0, 0,0,0, 9,@Zaxxis, 0, 150, 0, 0, 0, 0, "Scrapped Fel Reaver - On Evade - Kill Target"), +(@FEL,0, 9,0, 11, 0,100,0, 0, 0, 0, 0, 75, 39311, 0, 0, 0,0,0, 1, 0, 0, 0, 0, 0, 0, 0, "Scrapped Fel Reaver - On Respawn - Add Aura 'Scrapped Fel Reaver Transform'"); + +-- Creature entry 20287, Zaxxis Ambusher +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = @Zaxxis; + +DELETE FROM `smart_scripts` WHERE `entryorguid` = @Zaxxis AND `source_type` = 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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Zaxxis,0, 0,0, 54, 0,100,0, 0,0,0,0, 49, 0,0,0,0,0,0, 21, 85, 0,0,0,0,0,0, 'Zaxxis Ambusher - On Just Summoned - Start Attacking'); diff --git a/sql/updates/world/3.3.5/2016_06_15_15_world_335.sql b/sql/updates/world/3.3.5/2016_06_15_15_world_335.sql new file mode 100644 index 00000000000..34b28152f28 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_15_15_world_335.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `type_flags`=0 WHERE `entry` IN (33557,33555,33553,33556,33554,33657,33653,33307,33310,33650); diff --git a/sql/updates/world/3.3.5/2016_06_16_00_world.sql b/sql/updates/world/3.3.5/2016_06_16_00_world.sql new file mode 100644 index 00000000000..f6958ad4dc7 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_16_00_world.sql @@ -0,0 +1,16 @@ +-- delete frogger spawn locations from `creature`, move them to `creature_summon_groups` +SET @FROGGER = 16027; +DELETE FROM `creature` WHERE `id` = @FROGGER; +DELETE FROM `creature_summon_groups` WHERE `summonerId`=533 AND `summonerType`=2; +INSERT INTO `creature_summon_groups` (`summonerType`,`summonerId`,`groupId`,`entry`,`position_x`,`position_y`,`position_z`,`orientation`,`summonType`,`summonTime`) VALUES +(2,533,0,@FROGGER,3175.281,-3134.764,293.4368,4.244924,3,7500), +(2,533,1,@FROGGER,3154.581,-3126.18 ,293.5911,4.430199,3,7500), +(2,533,2,@FROGGER,3128.622,-3119.604,293.4113,4.738929,3,7500); +DELETE FROM `waypoint_data` WHERE `id` BETWEEN @FROGGER*10+0 AND @FROGGER*10+2; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES +(@FROGGER*10+0,1,3158.253,-3163.889,293.3027), +(@FROGGER*10+1,1,3145.881,-3158.563,293.3215), +(@FROGGER*10+2,1,3130.79 ,-3156.624,293.3239); +DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN -76313 AND -76311 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@FROGGER AND `source_type`=0 AND `id` BETWEEN 2 AND 5; +UPDATE `creature_template` SET `unit_flags`=(`unit_flags`|256) WHERE `entry`=@FROGGER; diff --git a/sql/updates/world/3.3.5/2016_06_17_00_world.sql b/sql/updates/world/3.3.5/2016_06_17_00_world.sql new file mode 100644 index 00000000000..33094fd818a --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_17_00_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (48778, 73313); +INSERT INTO `spell_linked_spell` (`spell_trigger` ,`spell_effect`, `type`, `comment`) VALUES +(48778, 50772, 0, 'Acherus Deathcharger - Summon Unholy Mount Visual'), +(73313, 50772, 0, 'Crimson Deathcharger - Summon Unholy Mount Visual'); diff --git a/sql/updates/world/3.3.5/2016_06_18_00_world.sql b/sql/updates/world/3.3.5/2016_06_18_00_world.sql new file mode 100644 index 00000000000..8135c5e64b0 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_18_00_world.sql @@ -0,0 +1,134 @@ +-- Fjord Hawk Matriarch +UPDATE `creature_template` SET `InhabitType`='5' WHERE `entry`=24787; +-- Pathing for Entry: 24787 'TDB FORMAT' +SET @NPC := 115835; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=491.5974,`position_y`=-6158.39,`position_z`=144.1042 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '43775'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,491.5974,-6158.39,144.1042,0,0,1,0,100,0), +(@PATH,2,509.5939,-6162.629,111.2709,0,0,1,0,100,0), +(@PATH,3,526.574,-6162.785,95.60418,0,0,1,0,100,0), +(@PATH,4,574.4791,-6163.997,95.60418,0,0,1,0,100,0), +(@PATH,5,603.0228,-6169.135,135.1598,0,0,1,0,100,0), +(@PATH,6,621.6965,-6158.342,152.5963,0,0,1,0,100,0), +(@PATH,7,637.6,-6155.499,154.6354,0,0,1,0,100,0), +(@PATH,8,663.0421,-6125.693,179.4132,0,0,1,0,100,0), +(@PATH,9,656.72,-6138.115,215.4652,0,0,1,0,100,0), +(@PATH,10,639.1322,-6143.215,215.4652,0,0,1,0,100,0), +(@PATH,11,618.7733,-6150.35,208.0208,0,0,1,0,100,0), +(@PATH,12,588.9388,-6145.327,208.0208,0,0,1,0,100,0), +(@PATH,13,554.6487,-6152.367,187.5208,0,0,1,0,100,0), +(@PATH,14,528.2413,-6138.124,166.6597,0,0,1,0,100,0), +(@PATH,15,497.937,-6157.058,187.5208,0,0,1,0,100,0), +(@PATH,16,482.7061,-6146.376,174.6875,0,0,1,0,100,0), +(@PATH,17,491.5974,-6158.39,144.1042,0,0,1,0,100,0); + +-- Pathing for Entry: 24787 'TDB FORMAT' +SET @NPC := 115836; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=520.6224,`position_y`=-6137.84,`position_z`=169.3022 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '43775'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,520.6224,-6137.84,169.3022,0,0,1,0,100,0), +(@PATH,2,539.8384,-6131.232,149.1912,0,0,1,0,100,0), +(@PATH,3,520.709,-6158.917,160.4134,0,0,1,0,100,0), +(@PATH,4,485.8767,-6155.685,160.4134,0,0,1,0,100,0), +(@PATH,5,438.8145,-6158.287,160.4134,0,0,1,0,100,0), +(@PATH,6,419.3206,-6156.742,160.4134,0,0,1,0,100,0), +(@PATH,7,390.6546,-6143.165,160.4134,0,0,1,0,100,0), +(@PATH,8,377.2733,-6114.98,160.4134,0,0,1,0,100,0), +(@PATH,9,383.0898,-6128.999,185.83,0,0,0,1,100,0), +(@PATH,10,417.4906,-6154.904,185.83,0,0,1,0,100,0), +(@PATH,11,452.2428,-6147.803,185.83,0,0,1,0,100,0), +(@PATH,12,497.4655,-6150.674,185.83,0,0,1,0,100,0), +(@PATH,13,520.6224,-6137.84,169.3022,0,0,1,0,100,0); + +-- Pathing for Entry: 24787 'TDB FORMAT' +SET @NPC := 115837; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=596.8774,`position_y`=-6114.975,`position_z`=271.1343 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '43775'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,596.8774,-6114.975,271.1343,0,0,1,0,100,0), +(@PATH,2,595.4591,-6109.405,278.3748,0,0,1,0,100,0), +(@PATH,3,571.2776,-6109.743,290.4025,0,0,1,0,100,0), +(@PATH,4,556.7193,-6108.814,297.3566,0,0,1,0,100,0), +(@PATH,5,517.0029,-6104.844,297.3566,0,0,1,0,100,0), +(@PATH,6,503.9214,-6117.692,297.3566,0,0,1,0,100,0), +(@PATH,7,466.3313,-6107.801,271.1343,0,0,1,0,100,0), +(@PATH,8,475.6375,-6120.523,271.1343,0,0,1,0,100,0), +(@PATH,9,500.4033,-6130.543,271.1343,0,0,1,0,100,0), +(@PATH,10,542.1522,-6114.92,271.1343,0,0,1,0,100,0), +(@PATH,11,567.1166,-6129.524,271.1343,0,0,1,0,100,0), +(@PATH,12,596.8774,-6114.975,271.1343,0,0,1,0,100,0); + +-- Pathing for Entry: 24787 'TDB FORMAT' +SET @NPC := 115843; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=290.8945,`position_y`=-6070.151,`position_z`=84.36917 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '43775'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,290.8945,-6070.151,84.36917,0,0,1,0,100,0), +(@PATH,2,273.076,-6034.628,84.36917,0,0,1,0,100,0), +(@PATH,3,268.3575,-6009.71,121.8221,0,0,1,0,100,0), +(@PATH,4,282.7736,-6034.701,150.6469,0,0,1,0,100,0), +(@PATH,5,297.921,-6060.3,111.1191,0,0,1,0,100,0), +(@PATH,6,324.4433,-6101.173,115.008,0,0,1,0,100,0), +(@PATH,7,351.7174,-6115.625,115.008,0,0,1,0,100,0), +(@PATH,8,380.059,-6146.51,102.4525,0,0,1,0,100,0), +(@PATH,9,381.592,-6162.233,80.36916,0,0,1,0,100,0), +(@PATH,10,363.2276,-6145.913,80.36916,0,0,1,0,100,0), +(@PATH,11,338.3981,-6105.44,80.36916,0,0,1,0,100,0), +(@PATH,12,319.2164,-6096.714,84.36917,0,0,1,0,100,0), +(@PATH,13,290.8945,-6070.151,84.36917,0,0,1,0,100,0); + +-- Pathing for Entry: 24787 'TDB FORMAT' +SET @NPC := 115845; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=360.9156,`position_y`=-6061.682,`position_z`=302.8403 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '43775'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,360.9156,-6061.682,302.8403,0,0,1,0,100,0), +(@PATH,2,389.247,-6078.495,302.8403,0,0,1,0,100,0), +(@PATH,3,392.2037,-6094.839,296.007,0,0,1,0,100,0), +(@PATH,4,374.589,-6096.534,288.5903,0,0,1,0,100,0), +(@PATH,5,358.6935,-6082.393,274.9237,0,0,1,0,100,0), +(@PATH,6,338.8949,-6049.761,274.9237,0,0,1,0,100,0), +(@PATH,7,320.3495,-6021.407,274.9237,0,0,1,0,100,0), +(@PATH,8,306.0276,-5998.132,285.257,0,0,1,0,100,0), +(@PATH,9,313.4884,-5983.751,285.2291,0,0,1,0,100,0), +(@PATH,10,320.7385,-5972.151,286.1277,0,0,1,0,100,0), +(@PATH,11,330.6828,-6007.996,302.8403,0,0,1,0,100,0), +(@PATH,12,349.4529,-6033.62,302.8403,0,0,1,0,100,0), +(@PATH,13,360.9156,-6061.682,302.8403,0,0,1,0,100,0); + +-- Pathing for Entry: 24787 'TDB FORMAT' +SET @NPC := 115844; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=389.949,`position_y`=-6113.926,`position_z`=217.1557 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, '43775'); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,389.949,-6113.926,217.1557,0,0,1,0,100,0), +(@PATH,2,365.9727,-6083.048,249.1279,0,0,1,0,100,0), +(@PATH,3,348.9503,-6058.797,249.1279,0,0,1,0,100,0), +(@PATH,4,334.4755,-6041.239,249.1279,0,0,1,0,100,0), +(@PATH,5,306.4679,-6010.077,240.8223,0,0,1,0,100,0), +(@PATH,6,305.4742,-6011.148,217.1557,0,0,1,0,100,0), +(@PATH,7,308.0244,-6019.713,217.1557,0,0,1,0,100,0), +(@PATH,8,331.7084,-6052.974,217.1557,0,0,1,0,100,0), +(@PATH,9,350.9348,-6071.563,217.1557,0,0,1,0,100,0), +(@PATH,10,371.7133,-6102.678,217.1557,0,0,1,0,100,0), +(@PATH,11,389.949,-6113.926,217.1557,0,0,1,0,100,0); diff --git a/sql/updates/world/3.3.5/2016_06_18_01_world.sql b/sql/updates/world/3.3.5/2016_06_18_01_world.sql new file mode 100644 index 00000000000..1a9d8fbce85 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_18_01_world.sql @@ -0,0 +1,8 @@ +DELETE FROM `conditions` WHERE `SourceEntry`=42490 AND `SourceTypeOrReferenceId`=13; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 42490, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, "", "Spell 'Energized!' targets players"), +(13, 1, 42490, 0, 1, 31, 0, 3, 23832, 0, 0, 0, 0, "", "Spell 'Energized!' targets creature 'Zeppelin Power Core'"); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=-18587; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +('-18587','0','0','0','63','0','100','0','0','0','0','0','11','42491','2','0','0','0','0','1','0','0','0','0','0','0','0',"Zeppelin Power Core - On Reset - Cast 'Energized Periodic'"); diff --git a/sql/updates/world/3.3.5/2016_06_18_02_world.sql b/sql/updates/world/3.3.5/2016_06_18_02_world.sql new file mode 100644 index 00000000000..7b49e7c25f3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_18_02_world.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `gossip_menu_id`=10497,`npcflag`=3 WHERE `entry`=34320; + +DELETE FROM `gossip_menu` WHERE `entry`=10497; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(10497, 14527); -- 34320 diff --git a/sql/updates/world/3.3.5/2016_06_20_00_world.sql b/sql/updates/world/3.3.5/2016_06_20_00_world.sql new file mode 100644 index 00000000000..d14f0042fa7 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_20_00_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `creature_queststarter` WHERE `quest` IN (6131, 6606); +DELETE FROM `creature_questender` WHERE `quest`=6606; diff --git a/sql/updates/world/3.3.5/2016_06_20_01_world.sql b/sql/updates/world/3.3.5/2016_06_20_01_world.sql new file mode 100644 index 00000000000..eb8ebef9293 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_20_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `SpecialFlags`=0 WHERE `ID`=7846; diff --git a/sql/updates/world/3.3.5/2016_06_20_02_world.sql b/sql/updates/world/3.3.5/2016_06_20_02_world.sql new file mode 100644 index 00000000000..9bb24fa9b60 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_20_02_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_loot_template` SET `Chance`=100 WHERE `Item` IN (5884, 11503, 29590); +UPDATE `creature_loot_template` SET `Chance`=80 WHERE `Item`=31347; diff --git a/sql/updates/world/3.3.5/2016_06_20_03_world.sql b/sql/updates/world/3.3.5/2016_06_20_03_world.sql new file mode 100644 index 00000000000..3d94c0ace5f --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_20_03_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template` SET `RewardNextQuest`=6610 WHERE `ID` IN (6611, 6612); diff --git a/sql/updates/world/3.3.5/2016_06_20_04_world.sql b/sql/updates/world/3.3.5/2016_06_20_04_world.sql new file mode 100644 index 00000000000..da0d6b05919 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_20_04_world.sql @@ -0,0 +1,6 @@ +-- +SET @CGUID := 87945; -- 15 required +SET @OGUID := 64102; -- 15 required + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+14 AND `eventEntry`=14; +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+14 AND `eventEntry`=14; diff --git a/sql/updates/world/3.3.5/2016_06_22_00_world.sql b/sql/updates/world/3.3.5/2016_06_22_00_world.sql new file mode 100644 index 00000000000..fd2d4d8743b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_22_00_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `creature_queststarter` WHERE `quest` IN (SELECT `quest` FROM `game_event_creature_quest`); diff --git a/sql/updates/world/3.3.5/2016_06_22_01_world.sql b/sql/updates/world/3.3.5/2016_06_22_01_world.sql new file mode 100644 index 00000000000..bf11bee736b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_22_01_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `quest_template_addon` WHERE `ID` IN (9796, 10105); +INSERT INTO `quest_template_addon` (`ID`, `ExclusiveGroup`) VALUES +(9796, 9796), +(10105, 9796); diff --git a/sql/updates/world/3.3.5/2016_06_22_02_world.sql b/sql/updates/world/3.3.5/2016_06_22_02_world.sql new file mode 100644 index 00000000000..f73b0f6a6f6 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_22_02_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `quest_template_addon` SET `NextQuestId`=10389, `ExclusiveGroup`=-10392 WHERE `ID` IN (10392, 10393); +UPDATE `quest_template_addon` SET `PrevQuestId`=0 WHERE `ID`=10389; diff --git a/sql/updates/world/3.3.5/2016_06_22_03_world.sql b/sql/updates/world/3.3.5/2016_06_22_03_world.sql new file mode 100644 index 00000000000..5c7b71e479a --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_22_03_world.sql @@ -0,0 +1,3321 @@ +-- Hordes's Honor the Flame quests full data support + spawned missing camps/or individual gameojbect and npcs, also corrected creature_templates/ +UPDATE `gameobject_template` SET `data2`=5 WHERE `entry`=181376; -- makes bonfires hit with little fire on right range in when jump to it /was too little before/ +-- Add missing creature_quesrelation and involvedrealation that were blocking quests +-- The Flame Keeper of Kalimdor - {Achievement=1026} +DELETE FROM `creature_queststarter` WHERE `quest` IN (11846,11845,11852,11839,11859,11841,11849,11861,11847); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(25929, 11846), -- Durotar +(25928, 11845), -- Desolace +(25936, 11852), -- Mulgore +(25922, 11839), -- Winterspring +(25943, 11859), -- Barrens +(25932, 11849), -- Feralas +(25884, 11841), -- Ashenvale +(25930, 11847), -- Dustwallow marsh +(25945, 11861); -- Thousand Needles +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID` IN (11846, 11852, 11859, 11838, 11841, 11839, 11845, 11861, 11849, 11847, 11836, 11856); +-- The Flame Keeper of Outland - {Achievement=1027} +DELETE FROM `creature_queststarter` WHERE `quest` IN (11851,11855,11835,11858,11863,11821,11854); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(25934, 11851), -- Hellfire Peninsula +(25938, 11855), -- Shadowmoon Valley +(25918, 11835), -- Netherstorm +(25942, 11858), -- Terokkar +(25947, 11863), -- Zangarmarsh +(25937, 11854); -- Nagrand +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID` IN (11851, 11855, 11854, 11835, 11843, 11858, 11863); +-- Flame Keeper of Northrend +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID` IN (13500,13493,13494,13495,13496,13497,13498,13499); +DELETE FROM `creature_queststarter` WHERE `quest` IN (13500,13493,13494,13495,13496,13497,13498,13499); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(32816, 13500), -- Zul'Drak +(32809, 13493), -- Borean Tundra +(32810, 13494), -- Sholazar Basin +(32811, 13495), -- Dragonblight +(32815, 13499), -- Crystalsong Forest +(32814, 13498), -- Storm Peaks +(32813, 13497), -- Grizzly Hills +(32812, 13496); -- Howling Fjords +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID` IN (13500, 13493, 13494, 13495, 13499, 13498, 13497, 13496); +-- Flame Keeper of Eastern Kingdom? {Achievement=1025} +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID` IN (11850,11848,11853,11857,11837,11844,11860,11584,11862,11842,11840); +DELETE FROM `creature_queststarter` WHERE `quest` IN (11850,11848,11853,11857,11837,11844,11860,11584,11862,11842,11840); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(25933, 11850), -- Ghostland +(25931, 11848), -- Eversong woods +(25935, 11853), -- Hillsbrad Foothills +(25941, 11857), -- Swamp of sorrows +(25920, 11837), -- Cape of Stranglethorn +(25927, 11844), -- Burning Steppes +(25944, 11860), -- The Hinterlands +(25939, 11584), -- Silverpine Forest +(25946, 11862), -- Tirisfal Glades +(25925, 11842), -- Badlands +(25923, 11840); -- Arathi Highlands +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID` IN (11850, 11848, 11853, 11857, 11837, 11844, 11860, 11584, 11862, 11842, 11840); + +-- Add missing camps, npcs, gobject in general, corrected npc data for Horde/Kalimdor,Eastern Kingdoms,Outland/ +-- The ids below are deleting duplicate doubles spawns from Tanaris horde fire camp and reuse the guids to recreate another one + few extra objects +-- Update creature_template for some creatures +UPDATE `creature_template` SET `faction`=35 WHERE `entry`=16781; -- the celebrants should be friendly to all, ignore the 17++ faction it is a blizzard bug +UPDATE `creature_template` SET `minlevel`=30,`maxlevel`=30,`faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25929); -- Durotar +UPDATE `creature_template` SET `minlevel`=20,`maxlevel`=20,`faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25936); -- Mulgore +UPDATE `creature_template` SET `minlevel`=25,`maxlevel`=25,`faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25946,25931); -- Tirisfal Glades and Eversong Woods +UPDATE `creature_template` SET `minlevel`=30,`maxlevel`=30,`faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25933); -- Ghostlands +UPDATE `creature_template` SET `minlevel`=74,`maxlevel`=74,`faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32811); -- Dragonblight +UPDATE `creature_template` SET `minlevel`=75,`maxlevel`=75,`faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32813); -- Grizzly Hills +UPDATE `creature_template` SET `minlevel`=72,`maxlevel`=72,`faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32812); -- Howling Fjord +UPDATE `creature_template` SET `minlevel`=77,`maxlevel`=77,`faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32816); -- Zul'Drak +-- Add npcs for the Midsummer Festival Camp in Mulgore +DELETE FROM `creature` WHERE `guid` IN (94696,94723,94698,94724,94513,86426,94792,127358); -- Remove double spawned unused npc from Tanaris horde fire camp +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(94696, 16781, 1, 1, 1, 16446, 0, -2336.91, -619.347, -7.48957, 1.3426, 300, 0, 0, 3942, 0, 0, 0, 0, 0), +(94723, 16781, 1, 1, 1, 16438, 0, -2333.01, -607.47, -8.5825, 4.26458, 300, 0, 0, 3427, 0, 0, 0, 0, 0), +(94698, 16781, 1, 1, 1, 16445, 0, -2336.15, -605.978, -8.47793, 5.03898, 300, 0, 0, 3834, 0, 0, 0, 0, 0), +(94724, 16781, 1, 1, 1, 16438, 0, -2336.28, -611.022, -8.02869, 1.1973, 300, 0, 0, 2138, 0, 0, 0, 0, 0), +(94513, 25994, 1, 1, 1, 0, 1, -2344.99, -615.533, -7.06313, 0.976602, 300, 0, 0, 2871, 0, 0, 0, 0, 0), +(86426, 25936, 1, 1, 1, 0, 0, -2321.77, -614.483, -9.27059, 5.80089, 300, 0, 0, 484, 0, 0, 0, 0, 0); +-- Add objects for the Midsummer Festival Camp in Mulgore +DELETE FROM `gameobject` WHERE `guid` IN (51596,52357,50996,50855,50750,50747,52277,52467,51350,50692,52548,52284,51349,6537,6538,6539); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(51596, 181355, 1, 1, 1, -2335.13, -621.407, -7.62503, 5.5, 0, 0, 0.414693, 0.909961, 180, 100, 1), +(52357, 188020, 1, 1, 1, -2327.16, -631.314, -8.68343, 5.5, 0, 0, 0.398749, 0.91706, 180, 100, 1), +(50996, 181605, 1, 1, 1, -2342.39, -609.245, -7.76984, 5.5, 0, 0, 0.25038, -0.968148, 0, 100, 1), +(50855, 181306, 1, 1, 1, -2323.77, -610.206, -9.16689, 5.5, 0, 0, 0.843391, 0.5373, 180, 100, 1), +(50750, 181302, 1, 1, 1, -2326.25, -610.633, -8.98158, 1.58409, 0, 0, 0.711791, 0.702392, 180, 100, 1), +(50747, 181302, 1, 1, 1, -2325.28, -608.627, -9.18096, 1.58409, 0, 0, 0.711791, 0.702392, 180, 100, 1), +(52277, 188020, 1, 1, 1, -2318.53, -608.976, -9.42005, 5.5, 0, 0, 0.469472, 0.882948, 180, 100, 1), +(52467, 188021, 1, 1, 1, -2326.65, -613.461, -8.78372, 1.19925, 0, 0, 0.564334, 0.825546, 180, 100, 1), +(51350, 181355, 1, 1, 1, -2330.4, -606.562, -8.87822, 5.5, 0, 0, 0.414693, 0.909961, 180, 100, 1), +(50692, 187965, 1, 1, 1, -2329.42, -624.806, -8.27507, 5.5, 0, 0, 0.766044, -0.642788, 0, 100, 1), +(52548, 181376, 1, 1, 1, -2329.42, -624.806, -6.27507, 5.5, 0, 0, -0.34202, 0.939693, 180, 0, 1), +(52284, 188020, 1, 1, 1, -2337.14, -602.794, -8.71659, 5.5, 0, 0, 0.477159, 0.878817, 180, 100, 1), +(51349, 181355, 1, 1, 1, -2320.03, -612.344, -9.38502, 5.5, 0, 0, 0.21644, -0.976296, 180, 100, 1), +(6537, 188020, 1, 1, 1, -2348.37, -615.991, -6.85173, 5.82288, 0, 0, 0.228128, -0.973631, 300, 0, 1), +(6538, 181305, 1, 1, 1, -2330.42, -611.458, -8.53482, 6.06204, 0, 0, 0.110346, -0.993893, 300, 0, 1), +(6539, 181307, 1, 1, 1, -2330.98, -609.979, -7.54302, 5.68898, 0, 0, 0.292752, -0.956188, 300, 0, 1); +-- Fix few Burning Steppes camp objects and npcs +DELETE FROM `gameobject` WHERE `guid` IN (52517,50934,12654,12655); -- fix pavilion, mug, table and crate +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(52517, 188021, 0, 1, 1, -7596.67, -2079.81, 125.968, 3.20786, 0, 0, 0.999451, -0.0331301, 180, 100, 1), +(50934, 181307, 0, 1, 1, -7591.5, -2080.49, 126.518, 0.593412, 0, 0, 0.292372, 0.956305, 180, 100, 1), +(12654, 181305, 0, 1, 1, -7591.14, -2081, 125.519, 3.49137, 0, 0, 0.984746, -0.174, 300, 0, 1), +(12655, 181302, 0, 1, 1, -7594.62, -2076.47, 126.604, 3.71993, 0, 0, 0.958482, -0.285154, 300, 0, 1); +-- Fix Tirisfal Glade Flamekeeper orientation +DELETE FROM `creature` WHERE `guid` IN (202758); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(202758, 25946, 0, 1, 1, 0, 0, 2278.37, 447.68, 34.0328, 3.14884, 120, 0, 0, 1, 0, 0, 0, 0, 0); +-- Add missing objects in Badlands camp +DELETE FROM `gameobject` WHERE `guid` IN (12656,12657,12658); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(12656, 181355, 0, 1, 1, -6685.84, -2205.18, 249.466, 3.56287, 0, 0, 0.977897, -0.209085, 300, 0, 1), +(12657, 181355, 0, 1, 1, -6685.35, -2190.66, 247.391, 4.19511, 0, 0, 0.864441, -0.502734, 300, 0, 1), +(12658, 181355, 0, 1, 1, -6710.1, -2202.15, 248.991, 6.13819, 0, 0, 0.0724366, -0.997373, 300, 0, 1); +-- Add missing pavilion in Hillsbrad Foothills +DELETE FROM `gameobject` WHERE `guid` IN (21499); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(21499, 188021, 0, 1, 1, -140.643, -811.518, 55.3504, 2.31117, 0, 0, 0.915031, 0.403384, 300, 0, 1); +-- Add whole missing camp in Shadowmoon valley and remove doubles spawns from Stranglethorn one +UPDATE `creature_template` SET `minlevel`=40,`maxlevel`=40,`faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25938); -- Shadowmoon Valley Flamekeeper +DELETE FROM `gameobject` WHERE `guid` IN (51791,50690,52560,52333,52329,52511,50740,50741,50869,52399,52334,21500,21501,21502,21503,21504,21505); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(51791, 188021, 530, 1, 1, -3065.99, 2385.69, 62.3736, 2.08047, 0, 0, 0.862523, 0.506019, 300, 0, 1), +(50690, 188020, 530, 1, 1, -3045.07, 2384.62, 62.3369, 3.34888, 0, 0, 0.994634, -0.10346, 300, 0, 1), +(52560, 181605, 530, 1, 1, -3045.53, 2393.71, 61.5344, 3.48476, 0, 0, 0.985316, -0.170741, 300, 0, 1), +(52333, 181355, 530, 1, 1, -3051.54, 2384.15, 62.8406, 3.5845, 0, 0, 0.975579, -0.21965, 300, 0, 1), +(52329, 181376, 530, 1, 1, -3059.17, 2374.85, 65.1011, 2.03334, 0, 0, 0.850361, 0.526199, 300, 0, 1), +(52511, 187967, 530, 1, 1, -3059.17, 2374.85, 63.1011, 2.03334, 0, 0, 0.850361, 0.526199, 300, 0, 1), +(50740, 188020, 530, 1, 1, -3082.82, 2371.64, 62.3845, 0.325101, 0, 0, 0.161836, 0.986818, 300, 0, 1), +(50741, 181305, 530, 1, 1, -3067.53, 2387.47, 62.1022, 2.2666, 0, 0, 0.905816, 0.423671, 300, 0, 1), +(50869, 181307, 530, 1, 1, -3066.21, 2387.82, 63.0923, 2.58076, 0, 0, 0.96094, 0.276755, 300, 0, 1), +(52399, 181306, 530, 1, 1, -3061.06, 2385.06, 62.9053, 3.68032, 0, 0, 0.963941, -0.266117, 300, 0, 1), +(52334, 181302, 530, 1, 1, -3062.49, 2384.41, 62.8574, 3.88531, 0, 0, 0.931654, -0.363346, 300, 0, 1), +(21500, 181302, 530, 1, 1, -3062.11, 2386.29, 62.7605, 3.23892, 0, 0, 0.998816, -0.0486467, 300, 0, 1), +(21501, 181355, 530, 1, 1, -3083.01, 2388.64, 62.5579, 5.67117, 0, 0, 0.301252, -0.953545, 300, 0, 1), +(21502, 181355, 530, 1, 1, -3075.49, 2375.19, 61.7323, 5.22193, 0, 0, 0.506076, -0.862489, 300, 0, 1), +(21503, 181355, 530, 1, 1, -3065.87, 2401.47, 61.8687, 5.24138, 0, 0, 0.497663, -0.86737, 300, 0, 1), +(21504, 188020, 530, 1, 1, -3088.61, 2389.5, 61.8999, 0.53056, 0, 0, 0.26218, 0.965019, 300, 0, 1), +(21505, 188020, 530, 1, 1, -3062.43, 2404.35, 61.4089, 3.57398, 0, 0, 0.976721, -0.214514, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (94710,94518,94656,94694,11001,11002, 127362); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(94710, 25938, 530, 1, 1, 0, 0, -3069.81, 2382.73, 61.8417, 3.90071, 300, 0, 0, 42, 0, 0, 0, 0, 0), +(94518, 16781, 530, 1, 1, 21085, 0, -3061.44, 2392.12, 62.0978, 0.0381287, 300, 0, 0, 3834, 0, 0, 0, 0, 0), +(94656, 16781, 530, 1, 1, 16438, 0, -3058.96, 2387.94, 62.7011, 1.21073, 300, 0, 0, 2292, 0, 0, 0, 0, 0), +(94694, 16781, 530, 1, 1, 16443, 0, -3055.48, 2394.64, 61.4168, 3.79155, 300, 0, 0, 1716, 0, 0, 0, 0, 0), +(11001, 16781, 530, 1, 1, 16432, 0, -3047.02, 2383.16, 62.5462, 2.35427, 300, 0, 0, 3427, 0, 0, 0, 0, 0), +(11002, 25994, 530, 1, 1, 0, 1, -3050.94, 2390.53, 61.9839, 0.536069, 300, 0, 0, 2453, 0, 0, 0, 0, 0); +-- Add missing Blade's Edge camp +UPDATE `creature_template` SET `minlevel`=65,`maxlevel`=65,`faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25926); -- Blade's Edge Flamekeeper +DELETE FROM `gameobject` WHERE `guid` BETWEEN 65164 AND 65180; + +DELETE FROM `gameobject` WHERE `guid` IN (65169,65165,21498,21496,21480,21479,21478,21481, 21494, 21495, 21484, 21482, 21497); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(65164, 188021, 530, 1, 1, 2297.41, 6129.3, 135.503, 2.66739, 0, 0, 0.972023, 0.234886, 300, 0, 1), +(65166, 181355, 530, 1, 1, 2267.92, 6124.56, 137.287, 6.13852, 0, 0, 0.0722688, -0.997385, 300, 0, 1), +(65167, 181376, 530, 1, 1, 2282.43, 6134.5, 136.337, 6.01364, 0, 0, 0.134365, -0.990932, 300, 0, 1), +(65168, 187955, 530, 1, 1, 2282.43, 6134.5, 136.337, 6.01364, 0, 0, 0.134365, -0.990932, 300, 0, 1), +(65170, 181355, 530, 1, 1, 2271.19, 6164.05, 138.481, 5.89111, 0, 0, 0.194785, -0.980846, 300, 0, 1), +(65171, 188020, 530, 1, 1, 2311.24, 6163.44, 135.095, 3.22861, 0, 0, 0.999054, -0.0434958, 300, 0, 1), +(65172, 181355, 530, 1, 1, 2308.2, 6167.38, 135.411, 3.45245, 0, 0, 0.987945, -0.154804, 300, 0, 1), +(65173, 188020, 530, 1, 1, 2314.15, 6140.14, 134.04, 3.13044, 0, 0, 0.999984, 0.00557797, 300, 0, 1), +(65174, 181355, 530, 1, 1, 2311.99, 6135.23, 134.223, 2.95765, 0, 0, 0.995774, 0.0918422, 300, 0, 1), +(65175, 181605, 530, 1, 1, 2286.62, 6163.9, 136.412, 4.79359, 0, 0, 0.677824, -0.735224, 300, 0, 1), +(65176, 181305, 530, 1, 1, 2301.15, 6129.99, 135.447, 3.79771, 0, 0, 0.94667, -0.322204, 300, 0, 1), +(65177, 181307, 530, 1, 1, 2302.43, 6129.19, 136.444, 0.67575, 0, 0, 0.331483, 0.943461, 300, 0, 1), +(65178, 181302, 530, 1, 1, 2293.44, 6127.34, 135.515, 0.934927, 0, 0, 0.450623, 0.892714, 300, 0, 1), +(65179, 181302, 530, 1, 1, 2295.65, 6126.58, 135.553, 0.663179, 0, 0, 0.325546, 0.945526, 300, 0, 1), +(65180, 181306, 530, 1, 1, 2293.88, 6125.2, 135.587, 0.923931, 0, 0, 0.445708, 0.895178, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (209666,209667,209668,209669,209670,209673,209675, 127367); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(209666, 16781, 530, 1, 1, 16444, 0, 2269.74, 6134.05, 137.055, 6.04866, 300, 0, 0, 2699, 0, 0, 0, 0, 0), +(209667, 16781, 530, 1, 1, 16442, 0, 2271.41, 6128.35, 137.214, 0.679679, 300, 0, 0, 1990, 0, 0, 0, 0, 0), +(209668, 16781, 530, 1, 1, 21085, 0, 2271.34, 6158.77, 138.457, 0.683606, 300, 0, 0, 2371, 0, 0, 0, 0, 0), +(209669, 16781, 530, 1, 1, 16436, 0, 2300.8, 6167.7, 136.322, 5.55072, 300, 0, 0, 1651, 0, 0, 0, 0, 0), +(209670, 16781, 530, 1, 1, 21086, 0, 2304.68, 6161.6, 134.924, 1.72976, 300, 0, 0, 2062, 0, 0, 0, 0, 0), +(209673, 25994, 530, 1, 1, 0, 1, 2279.56, 6162.76, 137.703, 0.112621, 300, 0, 0, 2961, 0, 0, 0, 0, 0), +(209675, 25926, 530, 1, 1, 0, 0, 2298.33, 6134.3, 135.674, 1.15799, 300, 0, 0, 42, 0, 0, 0, 0, 0); +-- Add missing Netherstorm camp +UPDATE `creature_template` SET `minlevel`=70,`maxlevel`=70, `faction`=83,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25918); -- Netherstorm +DELETE FROM `gameobject` WHERE `guid` IN (164459,164460,164461,164462,164463,164464,164466,164468,164470,164473,164474,164476,164479,164480,164481,164482,164483); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164459, 188021, 530, 1, 1, 2930.82, 3700.62, 143.562, 2.68546, 0, 0, 0.974105, 0.226094, 300, 0, 1), +(164460, 188020, 530, 1, 1, 2939, 3710.42, 143.775, 5.91502, 0, 0, 0.183045, -0.983104, 300, 0, 1), +(164461, 188020, 530, 1, 1, 2929.71, 3714.03, 144.258, 5.84826, 0, 0, 0.215752, -0.976448, 300, 0, 1), +(164462, 188020, 530, 1, 1, 2926.49, 3680.92, 143.656, 5.85611, 0, 0, 0.211916, -0.977288, 300, 0, 1), +(164463, 188020, 530, 1, 1, 2914.81, 3686.23, 144.3, 5.85611, 0, 0, 0.211916, -0.977288, 300, 0, 1), +(164464, 181355, 530, 1, 1, 2916.61, 3688.95, 144.099, 5.95036, 0, 0, 0.165644, -0.986186, 300, 0, 1), +(164466, 181355, 530, 1, 1, 2936.48, 3709.34, 143.92, 1.22619, 0, 0, 0.575402, 0.817871, 300, 0, 1), +(164468, 181355, 530, 1, 1, 2930.48, 3712.12, 144.464, 5.82155, 0, 0, 0.228773, -0.97348, 300, 0, 1), +(164470, 181355, 530, 1, 1, 2924.86, 3684.41, 143.645, 5.79079, 0, 0, 0.243717, -0.969846, 300, 0, 1), +(164473, 181376, 530, 1, 1, 2921.26, 3690.47, 145.838, 5.94709, 0, 0, 0.167258, -0.985913, 300, 0, 1), +(164474, 187949, 530, 1, 1, 2922.17, 3690.15, 143.809, 5.94709, 0, 0, 0.167258, -0.985913, 300, 0, 1), +(164476, 181605, 530, 1, 1, 2917.63, 3677.32, 144.166, 1.11217, 0, 0, 0.527867, 0.849327, 300, 0, 1), +(164479, 181305, 530, 1, 1, 2929.17, 3694.77, 143.652, 3.48177, 0, 0, 0.98557, -0.169269, 300, 0, 1), +(164480, 181307, 530, 1, 1, 2927.52, 3695.79, 144.646, 6.06337, 0, 0, 0.109686, -0.993966, 300, 0, 1), +(164481, 181302, 530, 1, 1, 2934.2, 3699.41, 143.281, 5.29132, 0, 0, 0.475852, -0.879525, 300, 0, 1), +(164482, 181302, 530, 1, 1, 2932.66, 3699.09, 143.42, 3.97499, 0, 0, 0.91443, -0.404745, 300, 0, 1), +(164483, 181306, 530, 1, 1, 2933.35, 3701.68, 143.353, 4.69363, 0, 0, 0.713707, -0.700444, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (209925,209926,209927,209928,209929,209930, 127369); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(209925, 25918, 530, 1, 1, 0, 0, 2927.71, 3702.01, 143.705, 2.80239, 300, 0, 0, 42, 0, 0, 0, 0, 0), +(209926, 16781, 530, 1, 1, 16432, 0, 2933.41, 3708.45, 144.048, 5.94399, 300, 0, 0, 3624, 0, 0, 0, 0, 0), +(209927, 16781, 530, 1, 1, 16431, 0, 2935.32, 3705.25, 143.374, 1.8505, 300, 0, 0, 2371, 0, 0, 0, 0, 0), +(209928, 16781, 530, 1, 1, 16442, 0, 2917.5, 3683.52, 144.197, 0.0558533, 300, 0, 0, 1524, 0, 0, 0, 0, 0), +(209929, 16781, 530, 1, 1, 16436, 0, 2922.56, 3684.94, 143.823, 3.96478, 300, 0, 0, 3624, 0, 0, 0, 0, 0), +(209930, 25994, 530, 1, 1, 0, 0, 2919.92, 3676.76, 144.123, 1.41695, 300, 0, 0, 1848, 0, 0, 0, 0, 0); +-- Northrend +-- Add Borean tundra camp +DELETE FROM `gameobject` WHERE `guid` IN (164507,164509,164510,164511,164512,164513,164514,164515,164515,164516,164517,164518,164519,164520,164521,164522,164524,164525); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164507, 188021, 571, 1, 1, 4454.99, 5625.29, 56.8959, 4.29074, 0, 0, 0.839423, -0.543479, 300, 0, 1), +(164509, 188020, 571, 1, 1, 4425.93, 5623.18, 54.1981, 1.06747, 0, 0, 0.508751, 0.860913, 300, 0, 1), +(164510, 188020, 571, 1, 1, 4438.21, 5646.36, 59.8882, 4.28367, 0, 0, 0.841339, -0.540508, 300, 0, 1), +(164511, 188020, 571, 1, 1, 4476.71, 5632.46, 60.6755, 4.46182, 0, 0, 0.789922, -0.613208, 300, 0, 1), +(164512, 188020, 571, 1, 1, 4470.92, 5609.85, 56.8847, 4.46182, 0, 0, 0.789922, -0.613208, 300, 0, 1), +(164513, 181605, 571, 1, 1, 4470.25, 5621.62, 58.661, 1.19849, 0, 0, 0.56402, 0.825761, 300, 0, 1), +(164514, 181355, 571, 1, 1, 4472.86, 5630.19, 59.8352, 4.29296, 0, 0, 0.838819, -0.54441, 300, 0, 1), +(164515, 181355, 571, 1, 1, 4468.37, 5613.21, 57.1389, 1.30374, 0, 0, 0.606674, 0.794951, 300, 0, 1), +(164516, 181355, 571, 1, 1, 4429.57, 5625.52, 54.9768, 1.37443, 0, 0, 0.634385, 0.773017, 300, 0, 1), +(164517, 181355, 571, 1, 1, 4438.18, 5641.68, 58.4478, 1.00136, 0, 0, 0.480023, 0.877256, 300, 0, 1), +(164518, 194033, 571, 1, 1, 4441.05, 5627.71, 56.3487, 4.54665, 0, 0, 0.763211, -0.646149, 300, 0, 1), +(164519, 181376, 571, 1, 1, 4441.05, 5627.71, 58.3487, 4.69194, 0, 0, 0.714298, -0.699841, 300, 0, 1), +(164520, 181305, 571, 1, 1, 4457.34, 5627.04, 57.2747, 0.298436, 0, 0, 0.148665, 0.988888, 300, 0, 1), +(164521, 181307, 571, 1, 1, 4457.69, 5628.67, 58.2895, 4.7218, 0, 0, 0.703772, -0.710426, 300, 0, 1), +(164522, 181302, 571, 1, 1, 4450.11, 5628.14, 56.7657, 1.65482, 0, 0, 0.73618, 0.676786, 300, 0, 1), +(164524, 181302, 571, 1, 1, 4451.86, 5626.77, 56.7422, 0.725691, 0, 0, 0.354936, 0.934891, 300, 0, 1), +(164525, 181306, 571, 1, 1, 4450.1, 5626.02, 56.6652, 1.32259, 0, 0, 0.614141, 0.789196, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (210411,210412,210413,210414,210415,210416,210420, 127341); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(210411, 16781, 571, 1, 1, 16438, 0, 4464.65, 5615.53, 56.9756, 0.761036, 300, 0, 0, 3427, 0, 0, 0, 0, 0), +(210412, 16781, 571, 1, 1, 16443, 0, 4463.64, 5619.44, 57.2937, 0.348702, 300, 0, 0, 3237, 0, 0, 0, 0, 0), +(210413, 16781, 571, 1, 1, 16432, 0, 4468.31, 5631.88, 59.2365, 4.61106, 300, 0, 0, 2292, 0, 0, 0, 0, 0), +(210414, 16781, 571, 1, 1, 16438, 0, 4431.68, 5629.68, 55.7222, 0.687992, 300, 0, 0, 3144, 0, 0, 0, 0, 0), +(210415, 16781, 571, 1, 1, 16444, 0, 4437.48, 5636.46, 57.3127, 4.94564, 300, 0, 0, 3524, 0, 0, 0, 0, 0), +(210416, 25994, 571, 1, 1, 0, 0, 4469.26, 5627.85, 59.0877, 4.69872, 300, 0, 0, 2138, 0, 0, 0, 0, 0), +(210420, 32809, 571, 1, 1, 0, 0, 4451.59, 5621.71, 56.6329, 4.04133, 300, 0, 0, 9610, 0, 0, 0, 0, 0); +-- Add Dragonblight camp +DELETE FROM `gameobject` WHERE `guid` IN (164527,164528,164529,164530,164531,164532,164534,164535,164536,164537,164538,164539,164540,165334); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164527, 188021, 571, 1, 1, 3776.27, 1479.31, 91.7672, 3.0495, 0, 0, 0.99894, 0.0460317, 300, 0, 1), +(164528, 188020, 571, 1, 1, 3773.6, 1491.79, 90.9616, 4.7656, 0, 0, 0.688046, -0.725667, 300, 0, 1), +(164529, 188020, 571, 1, 1, 3779.89, 1492.12, 90.4649, 4.7656, 0, 0, 0.688046, -0.725667, 300, 0, 1), +(164530, 181355, 571, 1, 1, 3778.33, 1469.59, 92.0022, 4.64779, 0, 0, 0.729573, -0.683903, 300, 0, 1), +(164531, 181355, 571, 1, 1, 3771.26, 1470.33, 92.3044, 1.40802, 0, 0, 0.64728, 0.762252, 300, 0, 1), +(164532, 194037, 571, 1, 1, 3773.85, 1464.02, 92.4174, 6.10863, 0, 0, 0.087167, -0.996194, 300, 0, 1), +(164534, 181376, 571, 1, 1, 3773.85, 1464.02, 94.4174, 6.10863, 0, 0, 0.087167, -0.996194, 300, 0, 1), +(164535, 181305, 571, 1, 1, 3781.69, 1479.45, 91.1799, 3.55216, 0, 0, 0.979003, -0.203846, 300, 0, 1), +(164536, 181307, 571, 1, 1, 3781.29, 1478.05, 92.1919, 4.88734, 0, 0, 0.642628, -0.766178, 300, 0, 1), +(164537, 181302, 571, 1, 1, 3777.92, 1483, 91.6054, 3.43435, 0, 0, 0.989306, -0.145857, 300, 0, 1), +(164538, 181302, 571, 1, 1, 3776.35, 1482.86, 91.7922, 4.69099, 0, 0, 0.714632, -0.699501, 300, 0, 1), +(164539, 181306, 571, 1, 1, 3777.17, 1481, 91.7202, 2.13923, 0, 0, 0.877016, 0.480461, 300, 0, 1), +(164540, 181605, 571, 1, 1, 3776.57, 1488.67, 91.3695, 0.109765, 0, 0, 0.0548551, 0.998494, 300, 0, 1), +(165334, 181358, 571, 1, 1, 3807.96, 1478.17, 90.0332, 3.09271, 0, 0, 0.999701, 0.0244413, 300, 0, 1); -- hanging decoration +DELETE FROM `creature` WHERE `guid` IN (210425,210426,210427,210428,210429,127344); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(210425, 25994, 571, 1, 1, 0, 1, 3779.24, 1486.12, 91.2991, 1.70099, 300, 0, 0, 2699, 0, 0, 0, 0, 0), +(210426, 16781, 571, 1, 1, 16436, 0, 3769.56, 1489.51, 91.3562, 6.25787, 300, 0, 0, 3052, 0, 0, 0, 0, 0), +(210427, 16781, 571, 1, 1, 16432, 0, 3769.51, 1485.73, 92.0116, 0.944649, 300, 0, 0, 3728, 0, 0, 0, 0, 0), +(210428, 16781, 571, 1, 1, 16443, 0, 3781.98, 1488.53, 90.6925, 3.65584, 300, 0, 0, 3524, 0, 0, 0, 0, 0), +(210429, 32811, 571, 1, 1, 0, 0, 3771.49, 1478.74, 92.3424, 3.16654, 300, 0, 0, 42, 0, 0, 0, 0, 0); +-- Add Grizzly Hills camp +DELETE FROM `gameobject` WHERE `guid` IN (164564,164565,164566,164567,164568,164571,164572,164573,164575,164577,164577,164578,164579,164580,164581,164582,164583,164584, 127348); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164564, 188021, 571, 1, 1, 3367.71, -2126.35, 124.935, 0.20145, 0, 0, 0.100555, 0.994932, 300, 0, 1), +(164565, 188020, 571, 1, 1, 3378.53, -2152.36, 124.326, 1.7272, 0, 0, 0.760187, 0.649704, 300, 0, 1), +(164566, 188020, 571, 1, 1, 3364.78, -2153.98, 124.066, 1.67615, 0, 0, 0.743357, 0.668895, 300, 0, 1), +(164567, 188020, 571, 1, 1, 3368.13, -2094.44, 122.167, 4.85309, 0, 0, 0.655653, -0.755062, 300, 0, 1), +(164568, 188020, 571, 1, 1, 3358.46, -2095.84, 122.702, 4.85702, 0, 0, 0.65417, -0.756348, 300, 0, 1), +(164571, 181355, 571, 1, 1, 3360.44, -2102.71, 123.301, 4.93556, 0, 0, 0.623972, -0.781447, 300, 0, 1), +(164572, 181355, 571, 1, 1, 3366.44, -2142.59, 124.385, 0.12135, 0, 0, 0.060638, 0.99816, 300, 0, 1), +(164573, 181355, 571, 1, 1, 3372.23, -2141.88, 124.779, 0.12135, 0, 0, 0.060638, 0.99816, 300, 0, 1), +(164575, 181305, 571, 1, 1, 3368.46, -2120.32, 124.972, 4.52273, 0, 0, 0.770885, -0.636974, 300, 0, 1), +(164577, 181307, 571, 1, 1, 3367.51, -2120.73, 125.963, 0.112713, 0, 0, 0.0563269, 0.998412, 300, 0, 1), +(164578, 181302, 571, 1, 1, 3364.09, -2126.28, 124.594, 1.64817, 0, 0, 0.733926, 0.67923, 300, 0, 1), +(164579, 181302, 571, 1, 1, 3363.96, -2124.64, 124.71, 0.774805, 0, 0, 0.377785, 0.925894, 300, 0, 1), +(164580, 181306, 571, 1, 1, 3365.8, -2125.85, 124.807, 4.92171, 0, 0, 0.629368, -0.777107, 300, 0, 1), +(164581, 181355, 571, 1, 1, 3368.61, -2102.49, 122.991, 3.15926, 0, 0, 0.999961, -0.00883358, 300, 0, 1), +(164582, 181605, 571, 1, 1, 3370.82, -2150.59, 124.43, 1.7102, 0, 0, 0.754638, 0.656142, 300, 0, 1), +(164583, 194042, 571, 1, 1, 3368.48, -2135.25, 124.53, 0.20224, 0, 0, 0.100948, 0.994892, 300, 0, 1), +(164584, 181376, 571, 1, 1, 3366.29, -2135.71, 126.592, 0.275273, 0, 0, 0.137202, 0.990543, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (210677,210682,210683,210684,210685,210686); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(210677, 32813, 571, 1, 1, 0, 0, 3371.86, -2126.5, 124.993, 0.184933, 300, 0, 0, 42, 0, 0, 0, 0, 0), +(210682, 16781, 571, 1, 1, 21086, 0, 3361.63, -2146.48, 124.113, 6.12412, 300, 0, 0, 2453, 0, 0, 0, 0, 0), +(210683, 16781, 571, 1, 1, 16442, 0, 3362.85, -2143.59, 124.017, 5.52722, 300, 0, 0, 3331, 0, 0, 0, 0, 0), +(210684, 16781, 571, 1, 1, 16445, 0, 3365.06, -2149.12, 124.395, 2.17279, 300, 0, 0, 3331, 0, 0, 0, 0, 0), +(210685, 16781, 571, 1, 1, 16438, 0, 3376.29, -2142.8, 124.829, 3.63755, 300, 0, 0, 1919, 0, 0, 0, 0, 0), +(210686, 25994, 571, 1, 1, 0, 1, 3374.3, -2153.8, 123.999, 2.2042, 300, 0, 0, 2533, 0, 0, 0, 0, 0); +-- Add Howling Fjords camp +DELETE FROM `gameobject` WHERE `guid` IN (164608,164609,164610,164612,164613,164614,164615,164616,164617,164618,164620,164621,164622,164623,164624,164625,164626); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164608, 188021, 571, 1, 1, 2598.68, -4341.88, 275.709, 4.15841, 0, 0, 0.873519, -0.48679, 300, 0, 1), +(164609, 188020, 571, 1, 1, 2568.84, -4325.53, 277.908, 0.773361, 0, 0, 0.377116, 0.926166, 300, 0, 1), +(164610, 181355, 571, 1, 1, 2573.18, -4321.63, 277.706, 5.89809, 0, 0, 0.191362, -0.981519, 300, 0, 1), +(164612, 181355, 571, 1, 1, 2585.37, -4330.36, 276.802, 5.59728, 0, 0, 0.336267, -0.941767, 300, 0, 1), +(164613, 188020, 571, 1, 1, 2583.94, -4336.2, 275.877, 4.28332, 0, 0, 0.841436, -0.540357, 300, 0, 1), +(164614, 194039, 571, 1, 1, 2579.72, -4325.59, 276.934, 5.77529, 0, 0, 0.251227, -0.967928, 300, 0, 1), +(164615, 181376, 571, 1, 1, 2577.57, -4325.97, 278.995, 0.226445, 0, 0, 0.112981, 0.993597, 300, 0, 1), +(164616, 188020, 571, 1, 1, 2601.28, -4351.41, 275.622, 3.9414, 0, 0, 0.921098, -0.389331, 300, 0, 1), +(164617, 188020, 571, 1, 1, 2610.63, -4359.39, 276.012, 3.96889, 0, 0, 0.91566, -0.401954, 300, 0, 1), +(164618, 181355, 571, 1, 1, 2585.83, -4354.56, 276.176, 0.915263, 0, 0, 0.441825, 0.897101, 300, 0, 1), +(164620, 181355, 571, 1, 1, 2593.08, -4361.44, 275.514, 2.42794, 0, 0, 0.93701, 0.349302, 300, 0, 1), +(164621, 181605, 571, 1, 1, 2584.82, -4363.27, 275.305, 0.908194, 0, 0, 0.438651, 0.898658, 300, 0, 1), +(164622, 181302, 571, 1, 1, 2598.83, -4338.72, 276.13, 1.4619, 0, 0, 0.667577, 0.744541, 300, 0, 1), +(164623, 181302, 571, 1, 1, 2597, -4339.46, 275.976, 1.84439, 0, 0, 0.796929, 0.604073, 300, 0, 1), +(164624, 181306, 571, 1, 1, 2598.77, -4340.42, 275.851, 3.60996, 0, 0, 0.972704, -0.23205, 300, 0, 1), +(164625, 181305, 571, 1, 1, 2602.92, -4344.35, 275.756, 3.60446, 0, 0, 0.973338, -0.229375, 300, 0, 1), +(164626, 181307, 571, 1, 1, 2603.7, -4344.96, 276.749, 3.60446, 0, 0, 0.973338, -0.229375, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (210944,210946,210947,210948,210949,210950,210951, 127346); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(210944, 32812, 571, 1, 1, 0, 0, 2597.28, -4345.41, 275.49, 3.92805, 300, 0, 0, 42, 0, 0, 0, 0, 0), +(210946, 16781, 571, 1, 1, 16436, 0, 2611.27, -4353.51, 276.147, 2.90625, 300, 0, 0, 3942, 0, 0, 0, 0, 0), +(210947, 16781, 571, 1, 1, 16442, 0, 2607.34, -4349.77, 275.811, 4.8831, 300, 0, 0, 3427, 0, 0, 0, 0, 0), +(210948, 16781, 571, 1, 1, 16431, 0, 2591.12, -4366.18, 275.385, 1.70773, 300, 0, 0, 2533, 0, 0, 0, 0, 0), +(210949, 16781, 571, 1, 1, 16443, 0, 2589.82, -4356.76, 275.862, 4.90509, 300, 0, 0, 1524, 0, 0, 0, 0, 0), +(210950, 16781, 571, 1, 1, 21086, 0, 2582.78, -4356.01, 276.146, 6.05884, 300, 0, 0, 2533, 0, 0, 0, 0, 0), +(210951, 25994, 571, 1, 1, 0, 1, 2586.97, -4359.34, 275.729, 4.3074, 300, 0, 0, 2614, 0, 0, 0, 0, 0); +-- Add Zul'Drak camp +DELETE FROM `gameobject` WHERE `guid` IN (164628,164629,164630,164631,164632,164633,164634,164635,164638,164639,164640,164641,164642,164643,164644); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164628, 188021, 571, 1, 1, 5285.44, -2771.26, 292.418, 2.22832, 0, 0, 0.897541, 0.440932, 300, 0, 1), +(164629, 188020, 571, 1, 1, 5305.23, -2759.31, 292.211, 2.32649, 0, 0, 0.918095, 0.396361, 300, 0, 1), +(164630, 188020, 571, 1, 1, 5300.14, -2753.37, 292.419, 2.27937, 0, 0, 0.908502, 0.417882, 300, 0, 1), +(164631, 188020, 571, 1, 1, 5272.4, -2788.86, 292.419, 2.16077, 0, 0, 0.88214, 0.470987, 300, 0, 1), +(164632, 188020, 571, 1, 1, 5267.47, -2781.49, 292.419, 2.16077, 0, 0, 0.88214, 0.470987, 300, 0, 1), +(164633, 181605, 571, 1, 1, 5276.31, -2779.24, 292.419, 0.767265, 0, 0, 0.374292, 0.927311, 300, 0, 1), +(164634, 181355, 571, 1, 1, 5273.81, -2783.22, 292.419, 2.0506, 0, 0, 0.854871, 0.518841, 300, 0, 1), +(164635, 181355, 571, 1, 1, 5280.99, -2777.12, 292.419, 2.19198, 0, 0, 0.88938, 0.457168, 300, 0, 1), +(164638, 181376, 571, 1, 1, 5294.92, -2761.88, 292.419, 2.12359, 0, 0, 0.873231, 0.487306, 300, 0, 1), +(164639, 194048, 571, 1, 1, 5294.92, -2761.88, 292.419, 2.12359, 0, 0, 0.873231, 0.487306, 300, 0, 1), +(164640, 181305, 571, 1, 1, 5289.89, -2768.68, 292.419, 6.05528, 0, 0, 0.113708, -0.993514, 300, 0, 1), +(164641, 181307, 571, 1, 1, 5290.46, -2768.24, 293.42, 0.654878, 0, 0, 0.321619, 0.946869, 300, 0, 1), +(164642, 181302, 571, 1, 1, 5285.31, -2775.88, 292.419, 1.63505, 0, 0, 0.729456, 0.684028, 300, 0, 1), +(164643, 181302, 571, 1, 1, 5282.75, -2774.74, 292.419, 2.02383, 0, 0, 0.847848, 0.53024, 300, 0, 1), +(164644, 181306, 571, 1, 1, 5283.45, -2776.25, 292.419, 5.98302, 0, 0, 0.149522, -0.988758, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (210982,210983,210984,210985, 127354); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(210982, 32816, 571, 1, 1, 0, 0, 5282.69, -2767.44, 292.419, 1.95942, 300, 0, 0, 42, 0, 0, 0, 0, 0), +(210983, 16781, 571, 1, 1, 16446, 0, 5271.7, -2776.47, 292.419, 5.91363, 300, 0, 0, 2533, 0, 0, 0, 0, 0), +(210984, 16781, 571, 1, 1, 16438, 0, 5271.27, -2780.54, 292.419, 1.37088, 300, 0, 0, 1919, 0, 0, 0, 0, 0), +(210985, 25994, 571, 1, 1, 0, 1, 5276.13, -2771.1, 292.419, 4.75359, 300, 0, 0, 2533, 0, 0, 0, 0, 0); +-- Sholazar Basin +DELETE FROM `gameobject` WHERE `guid` IN (165359,164668,164670,164672,164673,164674,164675,164676,164677,164678,164679,164680,164681,164682,164683); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164668, 188021, 571, 1, 1, 5504.05, 4879.15, -198.169, 6.24464, 0, 0, 0.0192691, -0.999814, 300, 0, 1), +(164670, 194034, 571, 1, 1, 5499.12, 4869.82, -197.467, 5.88414, 0, 0, 0.198201, -0.980161, 300, 0, 1), +(165359, 181376, 571, 1, 1, 5497.1, 4868.86, -195.368, 0.418565, 0, 0, 0.207758, 0.97818, 300, 0, 1), +(164672, 188020, 571, 1, 1, 5500.69, 4859.37, -197.247, 0.114598, 0, 0, 0.0572678, 0.998359, 300, 0, 1), +(164673, 188020, 571, 1, 1, 5525.06, 4861.98, -197.564, 0.106744, 0, 0, 0.0533468, 0.998576, 300, 0, 1), +(164674, 188020, 571, 1, 1, 5516.82, 4892.55, -196.273, 3.38578, 0, 0, 0.992556, -0.121792, 300, 0, 1), +(164675, 188020, 571, 1, 1, 5496.17, 4892.9, -198.774, 3.03235, 0, 0, 0.998509, 0.0545924, 300, 0, 1), +(164676, 181355, 571, 1, 1, 5495.91, 4883.4, -198.56, 6.25326, 0, 0, 0.0149618, -0.999888, 300, 0, 1), +(164677, 181355, 571, 1, 1, 5515.37, 4883.68, -197.054, 0.0242677, 0, 0, 0.0121336, 0.999926, 300, 0, 1), +(164678, 181605, 571, 1, 1, 5515.33, 4863.4, -198.357, 4.06043, 0, 0, 0.896311, -0.443427, 300, 0, 1), +(164679, 181302, 571, 1, 1, 5507.71, 4879.47, -198.299, 0.657298, 0, 0, 0.322765, 0.946479, 300, 0, 1), +(164680, 181302, 571, 1, 1, 5505.69, 4877.91, -198.203, 0.292873, 0, 0, 0.145914, 0.989297, 300, 0, 1), +(164681, 181306, 571, 1, 1, 5507.58, 4877.19, -198.261, 2.40952, 0, 0, 0.933753, 0.357918, 300, 0, 1), +(164682, 181305, 571, 1, 1, 5505.18, 4882.54, -198.365, 3.11481, 0, 0, 0.99991, 0.0133924, 300, 0, 1), +(164683, 181307, 571, 1, 1, 5505.92, 4882.53, -197.375, 3.13444, 0, 0, 0.999994, 0.00357527, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (211249,211256,211257,211258,211259,211260,211261,127342); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(211249, 32810, 571, 1, 1, 0, 0, 5499.31, 4878.6, -197.97, 3.13758, 300, 0, 0, 11770, 0, 0, 0, 0, 0), +(211256, 16781, 571, 1, 1, 16436, 0, 5508.26, 4891.52, -197.537, 3.49338, 300, 0, 0, 1919, 0, 0, 0, 0, 0), +(211257, 16781, 571, 1, 1, 16442, 0, 5503.99, 4886.98, -198.356, 1.25892, 300, 0, 0, 2961, 0, 0, 0, 0, 0), +(211258, 16781, 571, 1, 1, 16445, 0, 5500.44, 4895, -198.054, 5.57939, 300, 0, 0, 2453, 0, 0, 0, 0, 0), +(211259, 16781, 571, 1, 1, 16436, 0, 5513.58, 4886.29, -197.178, 2.68991, 300, 0, 0, 2614, 0, 0, 0, 0, 0), +(211260, 16781, 571, 1, 1, 16444, 0, 5511.2, 4870.94, -198.257, 4.65341, 300, 0, 0, 3728, 0, 0, 0, 0, 0), +(211261, 25994, 571, 1, 1, 0, 1, 5509.13, 4864.95, -198.144, 6.08048, 300, 0, 0, 1919, 0, 0, 0, 0, 0); +-- Crystalsong Forest +DELETE FROM `gameobject` WHERE `guid` IN (164727,164728,164729,164730,164731,164732,164733,164735,164736,164737,164738,164739,164740,164741,164742); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164727, 188021, 571, 1, 1, 5537.66, -737.121, 149.903, 3.31719, 0, 0, 0.996148, -0.0876849, 300, 0, 1), +(164728, 188020, 571, 1, 1, 5545.47, -751.288, 152.872, 3.29205, 0, 0, 0.997172, -0.0751598, 300, 0, 1), +(164729, 188020, 571, 1, 1, 5534.63, -751.743, 152.043, 6.26479, 0, 0, 0.0091994, -0.999958, 300, 0, 1), +(164730, 188020, 571, 1, 1, 5528.85, -718.125, 149.06, 0.120616, 0, 0, 0.0602714, 0.998182, 300, 0, 1), +(164731, 188020, 571, 1, 1, 5538.1, -716.912, 150.739, 0.277696, 0, 0, 0.138402, 0.990376, 300, 0, 1), +(164732, 181355, 571, 1, 1, 5521.75, -729.266, 148.2, 0.10176, 0, 0, 0.050858, 0.998706, 300, 0, 1), +(164733, 181355, 571, 1, 1, 5523.81, -747.375, 150.338, 6.06293, 0, 0, 0.109904, -0.993942, 300, 0, 1), +(164735, 181376, 571, 1, 1, 5531.08, -726.827, 148.981, 5.3977, 0, 0, 0.428418, -0.903581, 300, 0, 1), +(164736, 194046, 571, 1, 1, 5530.53, -726.151, 148.904, 5.3977, 0, 0, 0.428418, -0.903581, 300, 0, 1), +(164737, 181605, 571, 1, 1, 5539.79, -749.386, 152.047, 1.77309, 0, 0, 0.774893, 0.632092, 300, 0, 1), +(164738, 181302, 571, 1, 1, 5540.05, -734.53, 149.889, 1.3152, 0, 0, 0.611221, 0.79146, 300, 0, 1), +(164739, 181302, 571, 1, 1, 5539.56, -736.342, 150.01, 0.0978369, 0, 0, 0.048899, 0.998804, 300, 0, 1), +(164740, 181306, 571, 1, 1, 5541.73, -735.983, 150.224, 2.34957, 0, 0, 0.922608, 0.385739, 300, 0, 1), +(164741, 181305, 571, 1, 1, 5544.59, -739.644, 150.773, 3.64391, 0, 0, 0.968625, -0.248527, 300, 0, 1), +(164742, 181307, 571, 1, 1, 5544.71, -740.658, 151.776, 4.72383, 0, 0, 0.70305, -0.711141, 300, 0, 1); + +DELETE FROM `creature` WHERE `guid` IN (211540,211541,211542,211543,211544,211545,211546, 127353, 127352); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(211540, 16781, 571, 1, 1, 16446, 0, 5523.19, -720.827, 148.211, 5.25948, 300, 0, 0, 2961, 0, 0, 0, 0, 0), +(211541, 16781, 571, 1, 1, 16438, 0, 5520.46, -724.236, 148.091, 0.741081, 300, 0, 0, 3427, 0, 0, 0, 0, 0), +(211542, 16781, 571, 1, 1, 16443, 0, 5525.58, -732.861, 148.853, 5.66631, 300, 0, 0, 3624, 0, 0, 0, 0, 0), +(211543, 16781, 571, 1, 1, 16438, 0, 5535.22, -748.433, 151.399, 5.70637, 300, 0, 0, 1585, 0, 0, 0, 0, 0), +(211544, 16781, 571, 1, 1, 16438, 0, 5540.74, -753.426, 153.249, 2.39199, 300, 0, 0, 3427, 0, 0, 0, 0, 0), +(211545, 25994, 571, 1, 1, 0, 1, 5544.48, -746.126, 151.578, 3.61956, 300, 0, 0, 2371, 0, 0, 0, 0, 0), +(211546, 32815, 571, 1, 1, 0, 0, 5532.98, -735.849, 149.538, 3.17817, 300, 0, 0, 12600, 0, 0, 0, 0, 0); +-- The Storm Peaks +DELETE FROM `gameobject` WHERE `guid` IN (164707,164708,164711,164712,164713,164714,164715,164716,164717,164718,164719,164720,164721,164722,164723,164726); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164707, 188021, 571, 1, 1, 6151.36, -1017.1, 407.519, 1.69575, 0, 0, 0.749875, 0.66158, 300, 0, 1), +(164708, 188020, 571, 1, 1, 6132.71, -1015.73, 409.439, 1.61878, 0, 0, 0.723865, 0.689942, 300, 0, 1), +(164711, 188020, 571, 1, 1, 6132.91, -1025.75, 409.86, 1.60476, 0, 0, 0.719011, 0.694998, 300, 0, 1), +(164712, 188020, 571, 1, 1, 6175.57, -1021.52, 408.539, 1.75031, 0, 0, 0.767644, 0.640876, 300, 0, 1), +(164713, 188020, 571, 1, 1, 6173.75, -1011.53, 407.582, 1.75031, 0, 0, 0.767644, 0.640876, 300, 0, 1), +(164714, 181355, 571, 1, 1, 6159.65, -1016.22, 407.636, 3.2465, 0, 0, 0.998625, -0.0524288, 300, 0, 1), +(164715, 181355, 571, 1, 1, 6136.52, -1021.34, 409.514, 3.30462, 0, 0, 0.99668, -0.0814223, 300, 0, 1), +(164716, 181355, 571, 1, 1, 6153.47, -1027.3, 408.786, 1.79116, 0, 0, 0.780572, 0.625066, 300, 0, 1), +(164717, 181302, 571, 1, 1, 6150.61, -1022.3, 408.201, 1.04268, 0, 0, 0.498041, 0.867154, 300, 0, 1), +(164718, 181302, 571, 1, 1, 6151.6, -1020.59, 407.992, 2.47524, 0, 0, 0.945009, 0.327045, 300, 0, 1), +(164719, 181306, 571, 1, 1, 6152.41, -1022.41, 408.186, 3.21273, 0, 0, 0.999367, -0.0355623, 300, 0, 1), +(164720, 181305, 571, 1, 1, 6155.09, -1017.04, 407.54, 0.888738, 0, 0, 0.429888, 0.902882, 300, 0, 1), +(164721, 181307, 571, 1, 1, 6155.22, -1018.19, 408.53, 1.70398, 0, 0, 0.752593, 0.658486, 300, 0, 1), +(164722, 181605, 571, 1, 1, 6169.62, -1017.84, 408.118, 3.12084, 0, 0, 0.999946, 0.0103772, 300, 0, 1), +(164723, 181376, 571, 1, 1, 6142.18, -1020.42, 408.493, 1.81865, 0, 0, 0.789088, 0.61428, 300, 0, 1), +(164726, 194043, 571, 1, 1, 6142.19, -1020.44, 408.496, 1.91604, 0, 0, 0.818053, 0.575142, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (211513,211520,211521,211522,211523,211524, 127350); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(211513, 32814, 571, 1, 1, 0, 0, 6150.65, -1012.62, 406.944, 1.65607, 300, 0, 0, 12600, 0, 0, 0, 0, 0), +(211520, 16781, 571, 1, 1, 16438, 0, 6166.94, -1008.14, 407.495, 4.42539, 300, 0, 0, 3834, 0, 0, 0, 0, 0), +(211521, 16781, 571, 1, 1, 16442, 0, 6161.54, -1013.07, 407.498, 6.11635, 300, 0, 0, 3624, 0, 0, 0, 0, 0), +(211522, 16781, 571, 1, 1, 21086, 0, 6164.34, -1020.92, 408.305, 1.35684, 300, 0, 0, 2292, 0, 0, 0, 0, 0), +(211523, 16781, 571, 1, 1, 29243, 0, 6150.78, -1024.97, 408.505, 2.09119, 300, 0, 0, 3237, 0, 0, 0, 0, 0), +(211524, 25994, 571, 1, 1, 0, 1, 6171.72, -1022.75, 408.506, 1.97024, 300, 0, 0, 2699, 0, 0, 0, 0, 0); +-- Add SAI support for all flamekeepers to cast summon Scorchling on spawn +-- Eeastern Kingdoms +DELETE FROM `creature` WHERE `id`=26520; +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25933; -- Ghostland +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25933; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25933,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25931; -- Eversong woods +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25931; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25931,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25935; -- Hillsbrad Foothills +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25935; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25935,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25941; -- Swamp of sorrows +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25941; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25941,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25920; -- Cape of Stranglethorn +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25920; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25920,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25927; -- Burning Steppes +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25927; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25927,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25944; -- The Hinterlands +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25944; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25944,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25939; -- Silverpine Forest +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25939; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25939,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25946; -- Tirisfal Glades +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25946; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25946,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25925; -- Badlands +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25925; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25925,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25923; -- Arathi Highlands +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25923; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25923,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +-- Kalimdor +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25929; -- Durotar +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25929; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25929,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25928; -- Desolace +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25928; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25928,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25936; -- Mulgore +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25936; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25936,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25922; -- Winterspring +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25922; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25922,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25943; -- Barrens +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25943; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25943,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25932; -- Feralas +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25932; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25932,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25884; -- Ashenvale +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25884; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25884,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25930; -- Dustwallow marsh +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25930; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25930,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25945; -- Thousand Needles +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25945; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25945,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25919; -- Silithus +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25919; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25919,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25921; -- Tanaris +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25921; +-- Outland +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25921,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25934; -- Hellfire Peninsula +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25934; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25934,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25938; -- Shadowmoon Valley +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25938; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25938,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25918; -- Netherstorm +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25918; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25918,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25942; -- Terokkar +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25942; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25942,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25947; -- Zangarmarsh +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25947; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25947,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25937; -- Nagrand +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25937; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25937,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25926; -- Blade's Edge Mountain +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25926; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25926,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +-- Northrend +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32816; -- Zul'Drak +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32816; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32816,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32809; -- Borean Tundra +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32809; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32809,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32810; -- Sholazar Basin +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32810; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32810,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32811; -- Dragonblight +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32811; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32811,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32815; -- Crystalsong Forest +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32815; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32815,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32814; -- Storm Peaks +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32814; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32814,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32813; -- Grizzly Hills +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32813; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32813,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32812; -- Howling Fjords +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32812; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32812,0,0,0,25,0,100,0,0,0,0,0,11,47123,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +-- Allieance's Honor the Flame quests full data + spawned missing camps/or individual gameojbect and npcs, also corrected creature_templates/ +DELETE FROM `creature` where `id`=26401; -- scorchlings are spawned by spells not manualy +-- Add missing creature_quesrelation and involvedrealation that were blocking quests +-- The Flame Warden of Kalimdor - {Achievement=1026} +DELETE FROM `creature_queststarter` WHERE `quest` IN (11805,11812,11815,11834,11833,11831,11817,11811,11806,11809,11826,11824); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(25883, 11805), -- Ashenvale +(25894, 11812), -- Desolace +(25897, 11815), -- Dustwallow Marsh +(25917, 11834), -- Winterspring +(25916, 11833), -- Tanaris +(25914, 11831), -- Silithus +(25899, 11817), -- Feralas +(25893, 11811), -- Darkshore +(25888, 11806), -- Azuremyst Isle +(25891, 11809), -- Bloodmyst Isle +(25906, 11824); -- Teldrassil +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `ID` IN (11805, 11812, 11815, 11834, 11833, 11831, 11817, 11811, 11806, 11809, 11824); +-- Flame Warden of Eastern Kingdoms {Achievement=1025} +DELETE FROM `creature_queststarter` WHERE `quest` IN (11826,11827,11819,11583,11828,11816,11810,11808,11804,11832,11813,11814,11820,11822); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(25908, 11826), -- The Hinterlands +(25909, 11827), -- The Western Plaguelands +(25901, 11819), -- Hillsbrad Foothills +(25910, 11583), -- Westfall +(25911, 11828), -- Wetlands +(25898, 11816), -- Elwynn Forest +(25892, 11810), -- Burning Steppes +(25890, 11808), -- Blasted Lands +(25887, 11804), -- Arathi Highlands +(25915, 11832), -- Cape of Stranglethorn +(25895, 11813), -- Dun Morogh +(25896, 11814), -- Duskwood +(25902, 11820), -- Loch Modan +(25904, 11822); -- Redridge Mountains + +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `ID` IN (11826,11827,11819,11583,11828,11816,11810,11808,11804,11832,11813,11814,11820,11822); +-- The Flame Warden of Northrend +DELETE FROM `creature_queststarter` WHERE `quest` IN (13485,13487,13489,13488,13492,13490,13486,13491); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(32801, 13485), -- Borean Tundra +(32803, 13487), -- Dragonblight +(32805, 13489), -- Grizzly Hills +(32804, 13488), -- Howling Fjord +(32808, 13492), -- Zul'Drak +(32806, 13490), -- The Storm Peaks +(32802, 13486), -- Sholazar Basin +(32807, 13491); -- Crystalsong Forest +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `ID` IN (13485,13487,13489,13488,13492,13490,13486,13491); + +-- The Flame Warden of Outland - {Achievement=1027} +DELETE FROM `creature_queststarter` WHERE `quest` IN (11823,11821,11830,11818,11825,11807,11829); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(25905, 11823), -- Shadowmoon Valley +(25903, 11821), -- Nagrand +(25913, 11830), -- Netherstorm +(25900, 11818), -- Hellfire Peninsula +(25907, 11825), -- Terokkar +(25889, 11807), -- Blade's Edge +(25912, 11829); -- Zangarmarsh +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `ID` IN (11823,11821,11830,11818,11825,11807,11829); + + +-- Add missing camps, npcs, gobject in general, corrected npc data for Alliance/Kalimdor,Eastern Kingdoms,Outland/ +-- Update creature_template for some creatures +UPDATE `creature_template` SET `minlevel`=50,`maxlevel`=50,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25892); -- Burning Steppes +UPDATE `creature_template` SET `minlevel`=65,`maxlevel`=65,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25909); -- Western Plaguelands +UPDATE `creature_template` SET `minlevel`=20,`maxlevel`=20,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25891); -- Bloodmyst Isle +UPDATE `creature_template` SET `minlevel`=25,`maxlevel`=25,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25888); -- Azuremyst Isle +UPDATE `creature_template` SET `minlevel`=70,`maxlevel`=70,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25913); -- Netherstorm +UPDATE `creature_template` SET `minlevel`=65,`maxlevel`=65,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25889); -- Blade's Edge Mountains +UPDATE `creature_template` SET `minlevel`=70,`maxlevel`=70,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25903); -- Nagrand +UPDATE `creature_template` SET `minlevel`=70,`maxlevel`=70,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25905); -- Shadowmoon valley +UPDATE `creature_template` SET `minlevel`=65,`maxlevel`=65,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25912); -- Zangarmarsh +UPDATE `creature_template` SET `minlevel`=65,`maxlevel`=65,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (25907); -- Terokkar +UPDATE `creature_template` SET `minlevel`=72,`maxlevel`=72,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32801); -- Borean Tundra +UPDATE `creature_template` SET `minlevel`=74,`maxlevel`=74,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32803); -- Dragonblight +UPDATE `creature_template` SET `minlevel`=75,`maxlevel`=75,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32805); -- Grizzly Hills +UPDATE `creature_template` SET `minlevel`=72,`maxlevel`=72,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32804); -- Howling Fjord +UPDATE `creature_template` SET `minlevel`=77,`maxlevel`=77,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32808); -- Zul'Drak +UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32806); -- The Storm Peaks +UPDATE `creature_template` SET `minlevel`=78,`maxlevel`=78,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32802); -- Sholazar Basin +UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`faction`=84,`dynamicflags`=8,`unit_flags`=37632,`npcflag`=3 WHERE `entry` IN (32807); -- Crystalsong Forest +-- Add npcs for the Midsummer Festival Camp in Burning Steppes +DELETE FROM `gameobject` WHERE `guid` IN (164766,164767,164768,164769,164770,164771,164772,164773,164774,164775,164776,164778,164779,164780,164781,164783,164784,164785,164786,164787,164788,17834); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164775, 181376, 0, 1, 1, -8245.62, -2623.9, 133.155, 4.04776, 0, 0, 0.899102, -0.43774, 300, 0, 1), +(164776, 187922, 0, 1, 1, -8245.62, -2623.9, 133.155, 4.04776, 0, 0, 0.899102, -0.43774, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (211790,211791,211792,211793,211794,211797); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(211790, 25892, 0, 1, 1, 0, 0, -8254.28, -2625.62, 133.159, 1.29179, 300, 0, 0, 1524, 0, 0, 0, 0, 0), +(211791, 16781, 0, 1, 1, 21083, 0, -8255.11, -2614.33, 133.154, 0.508745, 300, 0, 0, 2784, 0, 0, 0, 0, 0), +(211792, 16781, 0, 1, 1, 16413, 0, -8253.26, -2611.61, 133.154, 4.93446, 300, 0, 0, 3524, 0, 0, 0, 0, 0), +(211793, 16781, 0, 1, 1, 16412, 0, -8262.75, -2643.66, 133.39, 5.27218, 300, 0, 0, 3144, 0, 0, 0, 0, 0), +(211794, 16781, 0, 1, 1, 16435, 0, -8259.55, -2650.01, 133.476, 2.09132, 300, 0, 0, 1919, 0, 0, 0, 0, 0), +(211797, 25962, 0, 1, 1, 0, 1, -8245.74, -2607.85, 133.155, 3.51183, 300, 0, 0, 2533, 0, 0, 0, 0, 0); +-- Add npcs for the Midsummer Festival Camp in Western Plaguelands +DELETE FROM `gameobject` WHERE `guid` IN (164812,164813,164814,164815,164816,164817,164818,164819,164820,164821,164822,164823,164825,164826,164827); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164812, 188021, 0, 1, 1, 1001.53, -1449.68, 61.5049, 5.19952, 0, 0, 0.515706, -0.856766, 300, 0, 1), +(164813, 188020, 0, 1, 1, 979.325, -1460, 61.2327, 0.184752, 0, 0, 0.0922449, 0.995736, 300, 0, 1), +(164814, 188020, 0, 1, 1, 976.518, -1452.56, 63.6489, 0.312772, 0, 0, 0.155749, 0.987797, 300, 0, 1), +(164815, 181355, 0, 1, 1, 979.858, -1454.79, 62.3009, 0.417231, 0, 0, 0.207105, 0.978319, 300, 0, 1), +(164816, 188020, 0, 1, 1, 1020.23, -1447.65, 62.7199, 3.3342, 0, 0, 0.995366, -0.0961551, 300, 0, 1), +(164817, 188020, 0, 1, 1, 1017.55, -1438.45, 63.4337, 3.48735, 0, 0, 0.985093, -0.17202, 300, 0, 1), +(164818, 181355, 0, 1, 1, 1009.52, -1446.07, 62.2457, 3.52662, 0, 0, 0.981526, -0.191327, 300, 0, 1), +(164819, 181302, 0, 1, 1, 999.693, -1442.64, 62.6698, 4.58298, 0, 0, 0.751349, -0.659905, 300, 0, 1), +(164820, 181302, 0, 1, 1, 1000.27, -1440.61, 62.97, 3.38682, 0, 0, 0.992493, -0.122305, 300, 0, 1), +(164821, 181306, 0, 1, 1, 1000.89, -1443.8, 62.3705, 1.42489, 0, 0, 0.653687, 0.756765, 300, 0, 1), +(164822, 181305, 0, 1, 1, 998.898, -1448.43, 61.636, 5.72102, 0, 0, 0.277395, -0.960756, 300, 0, 1), +(164823, 181307, 0, 1, 1, 999.225, -1446.96, 62.6326, 3.82978, 0, 0, 0.941381, -0.337345, 300, 0, 1), +(164825, 181605, 0, 1, 1, 995.265, -1436.64, 64.3036, 5.13434, 0, 0, 0.543351, -0.839505, 300, 0, 1), +(164826, 181376, 0, 1, 1, 989.562, -1453.47, 61.0011, 4.9859, 0, 0, 0.604106, -0.796904, 300, 0, 1), +(164827, 187939, 0, 1, 1, 989.562, -1453.47, 61.0011, 4.9105, 0, 0, 0.633713, -0.773569, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (212038,212039,212040,212041,212042,212043); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(212038, 25962, 0, 1, 1, 0, 1, 992.05, -1438.97, 64.3942, 5.22073, 300, 0, 0, 1782, 0, 0, 0, 0, 0), +(212039, 16781, 0, 1, 1, 16435, 0, 989.633, -1444.97, 63.2034, 0.579809, 300, 0, 0, 3427, 0, 0, 0, 0, 0), +(212040, 16781, 0, 1, 1, 16447, 0, 1003.8, -1434.55, 63.5274, 3.86513, 300, 0, 0, 3052, 0, 0, 0, 0, 0), +(212041, 16781, 0, 1, 1, 16412, 0, 997.675, -1428.17, 65.905, 4.35443, 300, 0, 0, 2138, 0, 0, 0, 0, 0), +(212042, 16781, 0, 1, 1, 16431, 0, 1007.68, -1441.76, 62.6307, 2.69567, 300, 0, 0, 2784, 0, 0, 0, 0, 0), +(212043, 25909, 0, 1, 1, 16339, 0, 1002.08, -1454.41, 61.1954, 5.05265, 300, 0, 0, 42, 0, 0, 0, 0, 0); +-- Delete double spawns from Arathi camp +DELETE FROM `gameobject` WHERE `guid` IN (52335,51814,52409,51573,51014,51554,51579,51981,52412,52407,51578,50931,52481,52542,50836,51580,50553,51820,50802,50897,50803,165383); +DELETE FROM `creature` WHERE `guid` IN (94557,94605,90490,94556,94704); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165383, 187945, 1, 1, 1, -7216.15, -3859.66, 11.9664, 4.00788, 0, 0, 0.907652, -0.419724, 300, 0, 1); +-- Delete double spawns from Stranglethorn camp +DELETE FROM `gameobject` WHERE `guid` IN (52393,52541,50682,51782,52325,51028,51797,51028,51798,50784,50871,50785,51545,52331,52509,165384); +DELETE FROM `creature` WHERE `guid` IN (94553,94551,86711,94554,94555); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165384, 187943, 1, 1, 1, -6771.96, 527.151, -1.40004, 3.1949, 0, 0, 0.999645, -0.0266517, 300, 0, 1); +-- Add Bloodmyst camp +DELETE FROM `gameobject` WHERE `guid` IN (164852,164853,164854,164855,164856,164857,164858,164859,164861,164862,164863,164864,164865,164866,164867,164868,164869,164870); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164852, 188021, 530, 1, 1, -2238.65, -11884.9, 27.2942, 5.0887, 0, 0, 0.562366, -0.826888, 300, 0, 1), +(164853, 181355, 530, 1, 1, -2247.36, -11891.2, 27.273, 5.12561, 0, 0, 0.547009, -0.837127, 300, 0, 1), +(164854, 181376, 530, 1, 1, -2254.78, -11896.3, 27.4979, 5.24028, 0, 0, 0.498141, -0.867096, 300, 0, 1), +(164855, 187921, 530, 1, 1, -2254.78, -11896.3, 27.4979, 5.24028, 0, 0, 0.498141, -0.867096, 300, 0, 1), +(164856, 181355, 530, 1, 1, -2263.35, -11897.7, 27.4214, 4.9112, 0, 0, 0.633442, -0.77379, 300, 0, 1), +(164857, 188020, 530, 1, 1, -2267.6, -11910.3, 26.5801, 3.82107, 0, 0, 0.942842, -0.333239, 300, 0, 1), +(164858, 181305, 530, 1, 1, -2234.49, -11884.7, 29.2704, 2.36494, 0, 0, 0.925544, 0.378641, 300, 0, 1), +(164859, 181307, 530, 1, 1, -2233.15, -11884.7, 30.2608, 3.17861, 0, 0, 0.999829, -0.0185081, 300, 0, 1), +(164861, 181605, 530, 1, 1, -2232.01, -11915.4, 26.5822, 1.82694, 0, 0, 0.791628, 0.611003, 300, 0, 1), +(164862, 188020, 530, 1, 1, -2246.85, -11930.2, 27.0976, 3.92552, 0, 0, 0.92416, -0.382005, 300, 0, 1), +(164863, 181355, 530, 1, 1, -2229.91, -11931.1, 29.9614, 2.41049, 0, 0, 0.933927, 0.357465, 300, 0, 1), +(164864, 188020, 530, 1, 1, -2206.14, -11905.5, 29.0653, 0.581295, 0, 0, 0.286573, 0.958058, 300, 0, 1), +(164865, 188020, 530, 1, 1, -2218.01, -11884.8, 29.2497, 3.56425, 0, 0, 0.977754, -0.209757, 300, 0, 1), +(164866, 181355, 530, 1, 1, -2207.24, -11920.6, 31.7791, 1.97971, 0, 0, 0.835947, 0.548811, 300, 0, 1), +(164867, 181355, 530, 1, 1, -2224.91, -11879.8, 29.7914, 1.97971, 0, 0, 0.835947, 0.548811, 300, 0, 1), +(164868, 181302, 530, 1, 1, -2243.58, -11886.5, 28.3418, 0.455247, 0, 0, 0.225663, 0.974205, 300, 0, 1), +(164869, 181302, 530, 1, 1, -2241.55, -11887.8, 28.4584, 1.37809, 0, 0, 0.635801, 0.771853, 300, 0, 1), +(164870, 181306, 530, 1, 1, -2243.06, -11888.3, 28.1292, 1.35453, 0, 0, 0.626664, 0.77929, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (212289,212290,212291,212292,212293,212295); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(212289, 16781, 530, 1, 1, 16414, 0, -2227.85, -11887.9, 28.3225, 4.4168, 300, 0, 0, 1716, 0, 0, 0, 0, 0), +(212290, 16781, 530, 1, 1, 16434, 0, -2230.5, -11891.1, 27.6743, 0.651601, 300, 0, 0, 3728, 0, 0, 0, 0, 0), +(212291, 16781, 530, 1, 1, 16412, 0, -2246.13, -11921, 25.4183, 6.15017, 300, 0, 0, 1919, 0, 0, 0, 0, 0), +(212292, 16781, 530, 1, 1, 21083, 0, -2240.57, -11922.3, 26.6757, 2.72819, 300, 0, 0, 3144, 0, 0, 0, 0, 0), +(212293, 25962, 530, 1, 1, 0, 1, -2224.37, -11912.7, 26.95, 2.63237, 300, 0, 0, 2784, 0, 0, 0, 0, 0), +(212295, 25891, 530, 1, 1, 0, 0, -2238.78, -11890.3, 28.0834, 4.91003, 300, 0, 0, 1524, 0, 0, 0, 0, 0); +-- Add Feralas camp +DELETE FROM `gameobject` WHERE `guid` IN (164894,164895,164896,164897,164898,164899,164900,164901,164902,164903,164904,164905); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164894, 188020, 1, 1, 1, -4397.96, 3483.41, 11.6035, 0.0273144, 0, 0, 0.0136568, 0.999907, 300, 0, 1), +(164895, 188020, 1, 1, 1, -4426.01, 3485.49, 15.1689, 6.18994, 0, 0, 0.0466055, -0.998913, 300, 0, 1), +(164896, 188020, 1, 1, 1, -4431.3, 3458.68, 18.2034, 6.16324, 0, 0, 0.0599382, -0.998202, 300, 0, 1), +(164897, 181355, 1, 1, 1, -4404.42, 3477.56, 12.3551, 6.17894, 0, 0, 0.052098, -0.998642, 300, 0, 1), +(164898, 181605, 1, 1, 1, -4417.13, 3455.78, 14.9771, 5.72732, 0, 0, 0.274366, -0.961625, 300, 0, 1), +(164899, 181305, 1, 1, 1, -4414.79, 3466.24, 12.9118, 0.476933, 0, 0, 0.236213, 0.971701, 300, 0, 1), +(164900, 181307, 1, 1, 1, -4415.03, 3464.71, 13.9024, 0.516203, 0, 0, 0.255246, 0.966876, 300, 0, 1), +(164901, 181302, 1, 1, 1, -4411.8, 3462.72, 13.1523, 0.397609, 0, 0, 0.197498, 0.980303, 300, 0, 1), +(164902, 181302, 1, 1, 1, -4413.43, 3462.26, 13.1455, 5.04874, 0, 0, 0.578774, -0.815488, 300, 0, 1), +(164903, 181306, 1, 1, 1, -4411.95, 3460.55, 13.3287, 1.76734, 0, 0, 0.773073, 0.634317, 300, 0, 1), +(164904, 181376, 1, 1, 1, -4412.02, 3480.24, 12.6312, 6.12709, 0, 0, 0.0779694, -0.996956, 300, 0, 1), +(164905, 187929, 1, 1, 1, -4412.02, 3480.24, 12.6312, 6.12709, 0, 0, 0.0779694, -0.996956, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (212536,212537,212538,212539,212540,212541); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(212536, 25899, 1, 1, 1, 0, 0, -4405.5, 3466.01, 12.818, 0.172199, 300, 0, 0, 1524, 0, 0, 0, 0, 0), +(212537, 25962, 1, 1, 1, 0, 1, -4426.59, 3463.45, 14.9376, 6.14436, 300, 0, 0, 2138, 0, 0, 0, 0, 0), +(212538, 16781, 1, 1, 1, 16433, 0, -4406.22, 3458.47, 13.1618, 2.99649, 300, 0, 0, 3524, 0, 0, 0, 0, 0), +(212539, 16781, 1, 1, 1, 16447, 0, -4408.65, 3454.41, 14.0291, 1.02042, 300, 0, 0, 1585, 0, 0, 0, 0, 0), +(212540, 16781, 1, 1, 1, 16414, 0, -4411.13, 3457.27, 13.6321, 6.03912, 300, 0, 0, 2215, 0, 0, 0, 0, 0), +(212541, 16781, 1, 1, 1, 16413, 0, -4417.18, 3487.8, 12.7708, 5.29378, 300, 0, 0, 2138, 0, 0, 0, 0, 0); +-- Add Azuremyst Isle camp +DELETE FROM `gameobject` WHERE `guid` IN (164906,164907,164908,164909,164910,164911,164913,164914,164915,164916,164917,164918,164919,164920,164921,164922,164923,164924); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164906, 188021, 530, 1, 1, -4213.9, -12294, 1.92798, 5.8395, 0, 0, 0.220026, -0.975494, 300, 0, 1), +(164907, 181376, 530, 1, 1, -4219.28, -12303.5, 2.90522, 5.69342, 0, 0, 0.290628, -0.956836, 300, 0, 1), +(164908, 187917, 530, 1, 1, -4219.28, -12303.5, 2.90522, 5.69342, 0, 0, 0.290628, -0.956836, 300, 0, 1), +(164909, 181355, 530, 1, 1, -4208.46, -12282.1, 3.21486, 1.92744, 0, 0, 0.821318, 0.57047, 300, 0, 1), +(164910, 181355, 530, 1, 1, -4197.32, -12277.3, 1.88286, 2.5746, 0, 0, 0.960084, 0.279712, 300, 0, 1), +(164911, 181605, 530, 1, 1, -4198.35, -12312.5, 1.07796, 2.84635, 0, 0, 0.989124, 0.147085, 300, 0, 1), +(164913, 188020, 530, 1, 1, -4236.15, -12336.3, 5.75984, 1.06449, 0, 0, 0.507467, 0.861671, 300, 0, 1), +(164914, 188020, 530, 1, 1, -4213.2, -12341.7, 4.5449, 1.15166, 0, 0, 0.544533, 0.83874, 300, 0, 1), +(164915, 188020, 530, 1, 1, -4176.14, -12281.3, 0.011331, 4.10634, 0, 0, 0.885897, -0.463882, 300, 0, 1), +(164916, 188020, 530, 1, 1, -4191.53, -12268.3, 1.30263, 4.11027, 0, 0, 0.884984, -0.465621, 300, 0, 1), +(164917, 181355, 530, 1, 1, -4179.3, -12286.9, -0.144273, 4.14876, 0, 0, 0.875859, -0.482566, 300, 0, 1), +(164918, 181355, 530, 1, 1, -4207.73, -12332.2, 2.70515, 4.14954, 0, 0, 0.87567, -0.48291, 300, 0, 1), +(164919, 181355, 530, 1, 1, -4228.71, -12323.4, 3.0214, 2.66043, 0, 0, 0.971199, 0.238268, 300, 0, 1), +(164920, 181305, 530, 1, 1, -4212.47, -12291.7, 1.64004, 0.517075, 0, 0, 0.255667, 0.966765, 300, 0, 1), +(164921, 181307, 530, 1, 1, -4212.91, -12290.5, 2.64394, 4.74173, 0, 0, 0.696657, -0.717404, 300, 0, 1), +(164922, 181302, 530, 1, 1, -4217.7, -12294.9, 2.66322, 5.99994, 0, 0, 0.14115, -0.989988, 300, 0, 1), +(164923, 181302, 530, 1, 1, -4219.81, -12294.4, 2.97659, 0.62389, 0, 0, 0.30691, 0.951738, 300, 0, 1), +(164924, 181306, 530, 1, 1, -4218.2, -12293.3, 2.44695, 3.98539, 0, 0, 0.912313, -0.409495, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (212598,212599,212600,212601,212602,212603,212604); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(212598, 16781, 530, 1, 1, 16413, 0, -4204.91, -12289.1, 1.57936, 1.63705, 300, 0, 0, 3834, 0, 0, 0, 0, 0), +(212599, 16781, 530, 1, 1, 16412, 0, -4205.15, -12284.2, 2.51655, 4.81948, 300, 0, 0, 1585, 0, 0, 0, 0, 0), +(212600, 16781, 530, 1, 1, 21084, 0, -4204.2, -12322.9, 2.18588, 1.49174, 300, 0, 0, 3834, 0, 0, 0, 0, 0), +(212601, 16781, 530, 1, 1, 16433, 0, -4204.16, -12316.3, 1.96402, 4.73543, 300, 0, 0, 3144, 0, 0, 0, 0, 0), +(212602, 16781, 530, 1, 1, 16448, 0, -4194.72, -12303.8, 0.665216, 3.58718, 300, 0, 0, 3624, 0, 0, 0, 0, 0), +(212603, 25888, 530, 1, 1, 0, 0, -4210.83, -12297.8, 1.66611, 0.00183678, 300, 0, 0, 1524, 0, 0, 0, 0, 0), +(212604, 25962, 530, 1, 1, 0, 1, -4189.94, -12310.1, -0.885672, 3.28087, 300, 0, 0, 2138, 0, 0, 0, 0, 0); + + +-- Delete extra spawns from Silithus camp +DELETE FROM `gameobject` WHERE `guid` IN (50680); +-- Outland +-- Netherstorm +DELETE FROM `gameobject` WHERE `guid` IN (164974,164975,164976,164977,164978,164979,164980,164981,164982,164983,164984,164985,165408); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(164974, 188020, 530, 1, 1, 3124.32, 3767.21, 141.72, 6.15712, 0, 0, 0.0629915, -0.998014, 300, 0, 1), +(164975, 188020, 530, 1, 1, 3118.47, 3768.31, 142, 5.99611, 0, 0, 0.143044, -0.989716, 300, 0, 1), +(164976, 188020, 530, 1, 1, 3128.04, 3723.67, 142.125, 3.6241, 0, 0, 0.971039, -0.238921, 300, 0, 1), +(164977, 181355, 530, 1, 1, 3129.41, 3728.35, 141.836, 3.15679, 0, 0, 0.999971, -0.00759801, 300, 0, 1), +(164978, 181355, 530, 1, 1, 3118.56, 3728.18, 145.543, 3.26674, 0, 0, 0.998043, -0.0625352, 300, 0, 1), +(164979, 181355, 530, 1, 1, 3106.03, 3725.62, 144.981, 3.3335, 0, 0, 0.9954, -0.0958082, 300, 0, 1), +(164980, 181605, 530, 1, 1, 3113, 3717.87, 144.699, 1.34645, 0, 0, 0.62351, 0.781815, 300, 0, 1), +(164981, 181302, 530, 1, 1, 3119, 3742.2, 142.069, 1.01658, 0, 0, 0.486685, 0.873577, 300, 0, 1), +(164982, 181302, 530, 1, 1, 3120.72, 3741.49, 141.941, 1.31503, 0, 0, 0.611153, 0.791512, 300, 0, 1), +(164983, 181306, 530, 1, 1, 3119.22, 3739.92, 141.977, 1.78627, 0, 0, 0.779042, 0.626972, 300, 0, 1), +(164984, 181376, 530, 1, 1, 3121.5, 3753.88, 141.851, 5.85856, 0, 0, 0.21072, -0.977546, 300, 0, 1), +(164985, 187942, 530, 1, 1, 3121.5, 3753.88, 141.851, 5.85856, 0, 0, 0.21072, -0.977546, 300, 0, 1), +(165408, 188021, 530, 1, 1, 3124.08, 3743.19, 141.84, 0.373246, 0, 0, 0.185542, 0.982636, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (212847,212848,212849,212850,212851,212852); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(212847, 16781, 530, 1, 1, 21084, 0, 3105.5, 3720.48, 144.815, 0.250816, 300, 0, 0, 4050, 0, 0, 0, 0, 0), +(212848, 16781, 530, 1, 1, 16435, 0, 3115.55, 3726.49, 145.316, 4.10869, 300, 0, 0, 2961, 0, 0, 0, 0, 0), +(212849, 16781, 530, 1, 1, 16447, 0, 3120.66, 3721, 145.281, 2.74995, 300, 0, 0, 1990, 0, 0, 0, 0, 0), +(212850, 16781, 530, 1, 1, 16412, 0, 3125.3, 3727.87, 142.621, 5.58132, 300, 0, 0, 3237, 0, 0, 0, 0, 0), +(212851, 25962, 530, 1, 1, 0, 1, 3106.88, 3712.88, 144.328, 0.980452, 300, 0, 0, 2371, 0, 0, 0, 0, 0), +(212852, 25913, 530, 1, 1, 0, 0, 3127.12, 3744.35, 141.695, 5.94888, 300, 0, 0, 42, 0, 0, 0, 0, 0); +-- Nagrand +DELETE FROM `gameobject` WHERE `guid` IN (165034,165038,165039,165040,165041,165042,165043,165044,165045,165046,165047,165048,165049,165050,165051,165052,165053); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165034, 188021, 530, 1, 1, -2518.07, 7554.87, -1.84913, 5.25355, 0, 0, 0.492375, -0.870383, 300, 0, 1), +(165038, 188020, 530, 1, 1, -2503.95, 7557.49, -1.08408, 5.53944, 0, 0, 0.363359, -0.931649, 300, 0, 1), +(165039, 181355, 530, 1, 1, -2508.99, 7559.45, -1.49399, 5.21507, 0, 0, 0.509029, -0.860749, 300, 0, 1), +(165040, 181305, 530, 1, 1, -2514.58, 7556.29, -1.9083, 3.55317, 0, 0, 0.9789, -0.204338, 300, 0, 1), +(165041, 181307, 530, 1, 1, -2514.36, 7557.85, -0.918236, 4.60717, 0, 0, 0.743311, -0.668946, 300, 0, 1), +(165042, 181302, 530, 1, 1, -2521.68, 7558.76, -1.93354, 5.38786, 0, 0, 0.43286, -0.901461, 300, 0, 1), +(165043, 181302, 530, 1, 1, -2520.13, 7560.14, -1.93178, 4.59147, 0, 0, 0.748542, -0.663088, 300, 0, 1), +(165044, 181306, 530, 1, 1, -2519.97, 7558.77, -1.99031, 3.1212, 0, 0, 0.999948, 0.0101965, 300, 0, 1), +(165045, 188020, 530, 1, 1, -2528.76, 7534.67, -0.445196, 5.47583, 0, 0, 0.392805, -0.919622, 300, 0, 1), +(165046, 181355, 530, 1, 1, -2530.75, 7540.66, -2.24676, 5.41692, 0, 0, 0.419715, -0.907656, 300, 0, 1), +(165047, 181376, 530, 1, 1, -2526.69, 7548.83, -2.23534, 5.32817, 0, 0, 0.459565, -0.888144, 300, 0, 1), +(165048, 187933, 530, 1, 1, -2526.69, 7548.83, -2.23534, 5.32817, 0, 0, 0.459565, -0.888144, 300, 0, 1), +(165049, 188020, 530, 1, 1, -2511.48, 7518.87, -1.20825, 2.42299, 0, 0, 0.936142, 0.351621, 300, 0, 1), +(165050, 181355, 530, 1, 1, -2506.01, 7514.91, -3.26091, 2.33267, 0, 0, 0.919314, 0.393525, 300, 0, 1), +(165051, 181355, 530, 1, 1, -2485.85, 7534.2, -1.6549, 2.33267, 0, 0, 0.919314, 0.393525, 300, 0, 1), +(165052, 188020, 530, 1, 1, -2489.07, 7542.57, -0.865097, 2.31931, 0, 0, 0.916666, 0.399654, 300, 0, 1), +(165053, 181605, 530, 1, 1, -2502.95, 7522.09, -2.46418, 2.29811, 0, 0, 0.912378, 0.40935, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (213103,213104,213105,213106,213108,213109); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(213103, 16781, 530, 1, 1, 16412, 0, -2504.03, 7528.3, -0.64438, 0.776008, 300, 0, 0, 1782, 0, 0, 0, 0, 0), +(213104, 16781, 530, 1, 1, 16447, 0, -2500.29, 7532.45, -0.97989, 2.51488, 300, 0, 0, 4050, 0, 0, 0, 0, 0), +(213105, 16781, 530, 1, 1, 16413, 0, -2507.02, 7550.21, -0.997479, 1.49936, 300, 0, 0, 3052, 0, 0, 0, 0, 0), +(213106, 16781, 530, 1, 1, 16431, 0, -2508.9, 7555.52, -1.63478, 4.96375, 300, 0, 0, 3834, 0, 0, 0, 0, 0), +(213108, 25962, 530, 1, 1, 0, 1, -2488.89, 7531.11, -2.0437, 2.29261, 300, 0, 0, 2371, 0, 0, 0, 0, 0), +(213109, 25903, 530, 1, 1, 0, 0, -2515.71, 7550.71, -1.47649, 4.94805, 300, 0, 0, 3052, 0, 0, 0, 0, 0); +-- Shadowmoon Valley +DELETE FROM `gameobject` WHERE `guid` IN (165054,165055,165056,165057,165058,165059,165060,165062,165063,165064,165066,165067,165068,165069); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165054, 188021, 530, 1, 1, -3953.72, 2048.88, 95.0652, 4.6418, 0, 0, 0.731618, -0.681714, 300, 0, 1), +(165055, 181376, 530, 1, 1, -3941.98, 2048.49, 95.0656, 4.87742, 0, 0, 0.646421, -0.762981, 300, 0, 1), +(165056, 187935, 530, 1, 1, -3941.98, 2048.49, 95.0656, 4.87742, 0, 0, 0.646421, -0.762981, 300, 0, 1), +(165057, 181355, 530, 1, 1, -3959.23, 2040.55, 95.0649, 1.26694, 0, 0, 0.591944, 0.805979, 300, 0, 1), +(165058, 181605, 530, 1, 1, -3965.24, 2039.3, 95.0659, 1.35098, 0, 0, 0.625278, 0.780402, 300, 0, 1), +(165059, 188020, 530, 1, 1, -3951.26, 2032.03, 95.1979, 1.40988, 0, 0, 0.647988, 0.761651, 300, 0, 1), +(165060, 181355, 530, 1, 1, -3947.07, 2032.04, 96.8815, 1.47585, 0, 0, 0.672754, 0.739866, 300, 0, 1), +(165062, 188020, 530, 1, 1, -3932.45, 2051.71, 95.072, 0.10612, 0, 0, 0.0530353, 0.998593, 300, 0, 1), +(165063, 188020, 530, 1, 1, -3931.76, 2044.1, 95.1721, 6.1741, 0, 0, 0.054514, -0.998513, 300, 0, 1), +(165064, 181305, 530, 1, 1, -3951.84, 2053.02, 95.0649, 4.37555, 0, 0, 0.815632, -0.578571, 300, 0, 1), +(165066, 181307, 530, 1, 1, -3953.39, 2052.79, 96.0565, 0.143821, 0, 0, 0.0718485, 0.997416, 300, 0, 1), +(165067, 181302, 530, 1, 1, -3956.31, 2051.68, 95.0653, 4.80752, 0, 0, 0.672688, -0.739927, 300, 0, 1), +(165068, 181302, 530, 1, 1, -3956.72, 2051.26, 96.3085, 0.346454, 0, 0, 0.172362, 0.985034, 300, 0, 1), +(165069, 181306, 530, 1, 1, -3958.88, 2051.04, 95.0648, 6.24637, 0, 0, 0.0184091, -0.999831, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (213113,213114,213115,213116,213117,213118); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(213113, 16781, 530, 1, 1, 16431, 0, -3965.57, 2049.6, 95.0651, 0.431277, 300, 0, 0, 2784, 0, 0, 0, 0, 0), +(213114, 16781, 530, 1, 1, 21084, 0, -3960.94, 2053.54, 95.0651, 3.89645, 300, 0, 0, 2215, 0, 0, 0, 0, 0), +(213115, 16781, 530, 1, 1, 16434, 0, -3972.67, 2034.69, 95.0653, 0.376299, 300, 0, 0, 2699, 0, 0, 0, 0, 0), +(213116, 16781, 530, 1, 1, 16447, 0, -3968.36, 2038.44, 95.0653, 3.94672, 300, 0, 0, 2699, 0, 0, 0, 0, 0), +(213117, 25962, 530, 1, 1, 0, 1, -3962.59, 2045.64, 95.0653, 4.66928, 300, 0, 0, 1716, 0, 0, 0, 0, 0), +(213118, 25905, 530, 1, 1, 0, 0, -3953.29, 2043.81, 95.0653, 4.37634, 300, 0, 0, 42, 0, 0, 0, 0, 0); +-- Zangarmarsh +DELETE FROM `gameobject` WHERE `guid` IN (165070,165071,165072,165074,165075,165077,165078,165079,165080,165081,165105,165106,165107,165108,165109,165110,165111); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165070, 188021, 530, 1, 1, 192.163, 6006.97, 22.1, 6.08217, 0, 0, 0.100341, -0.994953, 300, 0, 1), +(165071, 181376, 530, 1, 1, 194.982, 6019.23, 21.9713, 6.05151, 0, 0, 0.115576, -0.993299, 300, 0, 1), +(165072, 187941, 530, 1, 1, 192.209, 6015.13, 22.1067, 0.00709009, 0, 0, 0.00354504, 0.999994, 300, 0, 1), +(165074, 188020, 530, 1, 1, 179.856, 6024.08, 22.3978, 3.98117, 0, 0, 0.913175, -0.407568, 300, 0, 1), +(165075, 181355, 530, 1, 1, 182.649, 6013.91, 22.7399, 3.85237, 0, 0, 0.937511, -0.347954, 300, 0, 1), +(165077, 181305, 530, 1, 1, 191.325, 6003.18, 24.2265, 1.22679, 0, 0, 0.575647, 0.817698, 300, 0, 1), +(165078, 181307, 530, 1, 1, 190.107, 6002.77, 25.2167, 1.22679, 0, 0, 0.575647, 0.817698, 300, 0, 1), +(165079, 181302, 530, 1, 1, 187.76, 6009.34, 23.9554, 6.21407, 0, 0, 0.0345506, -0.999403, 300, 0, 1), +(165080, 181302, 530, 1, 1, 187.695, 6007.28, 24.1424, 0.567843, 0, 0, 0.280122, 0.959964, 300, 0, 1), +(165081, 181306, 530, 1, 1, 190.136, 6008.65, 23.9259, 4.04009, 0, 0, 0.900774, -0.434289, 300, 0, 1), +(165105, 181355, 530, 1, 1, 199.014, 6031.23, 20.5566, 3.50209, 0, 0, 0.983799, -0.179273, 300, 0, 1), +(165106, 188020, 530, 1, 1, 201.225, 6033.47, 20.1022, 3.0819, 0, 0, 0.999555, 0.0298411, 300, 0, 1), +(165107, 188020, 530, 1, 1, 201.553, 5989.88, 20.7907, 3.02849, 0, 0, 0.998401, 0.0565203, 300, 0, 1), +(165108, 181355, 530, 1, 1, 199.671, 5991.72, 21.7141, 0.161778, 0, 0, 0.0808006, 0.99673, 300, 0, 1), +(165109, 181605, 530, 1, 1, 188.262, 5991.39, 23.7141, 3.08425, 0, 0, 0.999589, 0.0286686, 300, 0, 1), +(165110, 188020, 530, 1, 1, 177.593, 5991.78, 22.1575, 6.11588, 0, 0, 0.0835527, -0.996503, 300, 0, 1), +(165111, 181355, 530, 1, 1, 180.409, 5994.73, 22.8062, 5.91168, 0, 0, 0.184688, -0.982797, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (85192,85193,85194,85195,85196,85197); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(85192, 16781, 530, 1, 1, 16434, 0, 183.656, 6001.85, 23.9098, 5.76245, 300, 0, 0, 3834, 0, 0, 0, 0, 0), +(85193, 16781, 530, 1, 1, 16433, 0, 183.666, 5998.61, 23.7887, 1.12075, 300, 0, 0, 3144, 0, 0, 0, 0, 0), +(85194, 16781, 530, 1, 1, 16435, 0, 181.842, 5991.56, 22.9939, 0.808944, 300, 0, 0, 2871, 0, 0, 0, 0, 0), +(85195, 16781, 530, 1, 1, 16433, 0, 184.16, 5995.16, 23.7236, 4.20658, 300, 0, 0, 2453, 0, 0, 0, 0, 0), +(85196, 25962, 530, 1, 1, 0, 1, 191.919, 5998.19, 24.2443, 4.56315, 300, 0, 0, 2453, 0, 0, 0, 0, 0), +(85197, 25912, 530, 1, 1, 0, 0, 195.944, 6003.78, 23.5325, 5.86299, 300, 0, 0, 42, 0, 0, 0, 0, 0); +-- Blade's Edge +DELETE FROM `gameobject` WHERE `guid` IN (165009,165010,165012,165013,165014,165015,165016,165019,165020,165021,165022,165023,165024,165025,165026,165027,165028,165029,165030,165031,165032,165033); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165009, 188020, 530, 1, 1, 2027.6, 6566, 133.42, 1.47266, 0, 0, 0.671574, 0.740938, 300, 0, 1), +(165010, 188020, 530, 1, 1, 2042.68, 6565.84, 133.415, 4.54986, 0, 0, 0.762173, -0.647374, 300, 0, 1), +(165012, 181355, 530, 1, 1, 2045.62, 6568.03, 134.354, 0.139063, 0, 0, 0.0694754, 0.997584, 300, 0, 1), +(165013, 181355, 530, 1, 1, 2050.79, 6579.78, 136.412, 1.58284, 0, 0, 0.711351, 0.702837, 300, 0, 1), +(165014, 181355, 530, 1, 1, 2018.03, 6580.28, 134.434, 1.33936, 0, 0, 0.620737, 0.784019, 300, 0, 1), +(165015, 181355, 530, 1, 1, 2023.32, 6573.3, 133.994, 1.56432, 0, 0, 0.704815, 0.709392, 300, 0, 1), +(165016, 181355, 530, 1, 1, 2045.55, 6573.74, 134.924, 0.0665667, 0, 0, 0.0332772, 0.999446, 300, 0, 1), +(165019, 181376, 530, 1, 1, 2019.7, 6587.14, 134.985, 6.23705, 0, 0, 0.023068, -0.999734, 300, 0, 1), +(165020, 187919, 530, 1, 1, 2019.7, 6587.14, 134.985, 6.23705, 0, 0, 0.023068, -0.999734, 300, 0, 1), +(165021, 188021, 530, 1, 1, 2019.32, 6604.34, 136.902, 6.24568, 0, 0, 0.01875, -0.999824, 300, 0, 1), +(165022, 181305, 530, 1, 1, 2014.67, 6605.07, 137.254, 6.08075, 0, 0, 0.101046, -0.994882, 300, 0, 1), +(165023, 181307, 530, 1, 1, 2014.07, 6606.01, 138.244, 5.27886, 0, 0, 0.481324, -0.876543, 300, 0, 1), +(165024, 181302, 530, 1, 1, 2018.4, 6602.44, 136.665, 0.432949, 0, 0, 0.214788, 0.976661, 300, 0, 1), +(165025, 181302, 530, 1, 1, 2020.24, 6602.73, 136.605, 1.1351, 0, 0, 0.537566, 0.843222, 300, 0, 1), +(165026, 181306, 530, 1, 1, 2019.32, 6600.75, 136.353, 1.1351, 0, 0, 0.537566, 0.843222, 300, 0, 1), +(165027, 181605, 530, 1, 1, 2049.6, 6588.34, 136.213, 3.18184, 0, 0, 0.999797, -0.020124, 300, 0, 1), +(165028, 188020, 530, 1, 1, 2047.82, 6623.09, 140.822, 4.54372, 0, 0, 0.764156, -0.645031, 300, 0, 1), +(165029, 188020, 530, 1, 1, 2036.31, 6623.38, 139.917, 4.61833, 0, 0, 0.739567, -0.673083, 300, 0, 1), +(165030, 181355, 530, 1, 1, 2032.89, 6620.83, 139.426, 4.42198, 0, 0, 0.80198, -0.597351, 300, 0, 1), +(165031, 181355, 530, 1, 1, 2025.48, 6616.34, 138.909, 4.42198, 0, 0, 0.80198, -0.597351, 300, 0, 1), +(165032, 181355, 530, 1, 1, 2056.26, 6611.74, 139.958, 4.68352, 0, 0, 0.71724, -0.696826, 300, 0, 1), +(165033, 181355, 530, 1, 1, 2050.81, 6619.04, 140.428, 4.6144, 0, 0, 0.740889, -0.671627, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (213096,213097,213098,213099,213100,213101); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(213096, 25962, 530, 1, 1, 0, 1, 2050.24, 6603.09, 138.073, 3.04753, 300, 0, 0, 1651, 0, 0, 0, 0, 0), +(213097, 16781, 530, 1, 1, 16412, 0, 2048.81, 6582.75, 135.962, 2.2637, 300, 0, 0, 3524, 0, 0, 0, 0, 0), +(213098, 16781, 530, 1, 1, 16434, 0, 2044.15, 6588.86, 135.588, 5.3888, 300, 0, 0, 2062, 0, 0, 0, 0, 0), +(213099, 16781, 530, 1, 1, 16448, 0, 2035.12, 6612.1, 138.394, 1.97939, 300, 0, 0, 2138, 0, 0, 0, 0, 0), +(213100, 16781, 530, 1, 1, 16433, 0, 2031.53, 6616.98, 138.934, 5.30162, 300, 0, 0, 3728, 0, 0, 0, 0, 0), +(213101, 25889, 530, 1, 1, 0, 0, 2024.17, 6601.49, 136.211, 6.05482, 300, 0, 0, 1524, 0, 0, 0, 0, 0); +-- Terokkar +DELETE FROM `gameobject` WHERE `guid` IN (165112,165115,165116,165117,165118,165119,165120,165121); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165112, 188021, 530, 1, 1, -3005.53, 4160.88, 4.18469, 0.149162, 0, 0, 0.0745119, 0.99722, 300, 0, 1), +(165115, 181376, 530, 1, 1, -3004.07, 4152.48, 3.64988, 1.75455, 0, 0, 0.769001, 0.639247, 300, 0, 1), +(165116, 187937, 530, 1, 1, -3004.07, 4152.48, 3.64988, 1.75455, 0, 0, 0.769001, 0.639247, 300, 0, 1), +(165117, 188020, 530, 1, 1, -3007.02, 4177.26, 4.07658, 4.79326, 0, 0, 0.677945, -0.735112, 300, 0, 1), +(165118, 181355, 530, 1, 1, -3006.14, 4169.56, 3.93771, 6.15906, 0, 0, 0.0620252, -0.998075, 300, 0, 1), +(165119, 181355, 530, 1, 1, -3000.22, 4138.67, 2.05751, 1.71684, 0, 0, 0.756811, 0.653634, 300, 0, 1), +(165120, 188020, 530, 1, 1, -2996.65, 4116.85, 4.33362, 1.75611, 0, 0, 0.769498, 0.638649, 300, 0, 1), +(165121, 181605, 530, 1, 1, -2988.84, 4126.66, 4.88284, 3.26329, 0, 0, 0.998149, -0.0608107, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (78648,78649,78650,78651,78652); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(78648, 25962, 530, 1, 1, 0, 1, -2986.96, 4130.72, 5.04767, 2.64597, 300, 0, 0, 2533, 0, 0, 0, 0, 0), +(78649, 16781, 530, 1, 1, 16448, 0, -2999.23, 4136.4, 2.31857, 4.96681, 300, 0, 0, 1716, 0, 0, 0, 0, 0), +(78650, 16781, 530, 1, 1, 16434, 0, -2997.71, 4131.23, 3.04313, 1.92339, 300, 0, 0, 2699, 0, 0, 0, 0, 0), +(78651, 16781, 530, 1, 1, 16442, 0, -2992.17, 4134.37, 3.88179, 3.20281, 300, 0, 0, 3052, 0, 0, 0, 0, 0), +(78652, 25907, 530, 1, 1, 16339, 0, -3000.43, 4160.95, 4.82476, 6.12213, 300, 0, 0, 42, 0, 0, 0, 0, 0); +-- Northrend +DELETE FROM `creature` WHERE `guid` IN (213720,213727,213728,213729,213731,213732,213733,213737,213738,213739,213740,213741,213742,213746,213747,213748,213749,213751,213752,213790,213791,213792,213793,213794,213795,213796,213797,213798,213799,213800,213801,213802,213803,213804,213805,213806,213807,213808,213809,213810,213811,213812,213813,213814,213815,213816,213817); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(213720, 32801, 571, 1, 1, 0, 0, 4127.57, 5395.95, 27.1605, 3.70375, 300, 0, 0, 9610, 0, 0, 0, 0, 0), -- borean +(213727, 25962, 571, 1, 1, 0, 1, 4141.22, 5399.12, 26.8254, 0.573149, 300, 0, 0, 2215, 0, 0, 0, 0, 0), +(213728, 16781, 571, 1, 1, 16434, 0, 4142.22, 5389.34, 26.5072, 1.07266, 300, 0, 0, 1524, 0, 0, 0, 0, 0), +(213729, 16781, 571, 1, 1, 16435, 0, 4141.25, 5394.58, 27.4716, 5.24156, 300, 0, 0, 2961, 0, 0, 0, 0, 0), +(213731, 16781, 571, 1, 1, 16412, 0, 4147.28, 5407.75, 28.0446, 1.51327, 300, 0, 0, 1848, 0, 0, 0, 0, 0), +(213732, 16781, 571, 1, 1, 16413, 0, 4145.26, 5412.3, 28.2783, 5.25177, 300, 0, 0, 3237, 0, 0, 0, 0, 0), +(213733, 16781, 571, 1, 1, 21084, 0, 3946.4, -634.725, 242.332, 2.18478, 300, 0, 0, 1990, 0, 0, 0, 0, 0), -- dragonblight +(213737, 16781, 571, 1, 1, 16435, 0, 3944.54, -631.516, 242.718, 5.2062, 300, 0, 0, 3834, 0, 0, 0, 0, 0), +(213738, 16781, 571, 1, 1, 16434, 0, 3942.9, -606.703, 241.48, 2.36464, 300, 0, 0, 2871, 0, 0, 0, 0, 0), +(213739, 16781, 571, 1, 1, 21083, 0, 3940.65, -603.007, 241.622, 5.10253, 300, 0, 0, 1524, 0, 0, 0, 0, 0), +(213740, 32803, 571, 1, 1, 16338, 0, 3937.7, -597.263, 241.288, 5.88322, 300, 0, 0, 42, 0, 0, 0, 0, 0), +(213741, 25962, 571, 1, 1, 0, 1, 3954.38, -609.752, 240.94, 3.62441, 300, 0, 0, 2138, 0, 0, 0, 0, 0), +(213742, 25962, 571, 1, 1, 0, 1, 3417.9, -2882.62, 201.901, 2.50837, 300, 0, 0, 2699, 0, 0, 0, 0, 0), -- grizzly +(213746, 16781, 571, 1, 1, 21083, 0, 3410.97, -2879.33, 201.095, 0.0940601, 300, 0, 0, 2062, 0, 0, 0, 0, 0), +(213747, 16781, 571, 1, 1, 16435, 0, 3413.05, -2875.08, 200.954, 4.47815, 300, 0, 0, 2215, 0, 0, 0, 0, 0), +(213748, 16781, 571, 1, 1, 16414, 0, 3416.95, -2876.6, 201.513, 3.22073, 300, 0, 0, 1651, 0, 0, 0, 0, 0), +(213749, 32805, 571, 1, 1, 0, 0, 3408.45, -2883.72, 201.054, 2.20128, 300, 0, 0, 42, 0, 0, 0, 0, 0), +(213751, 32808, 571, 1, 1, 16339, 0, 5613.85, -2621.07, 292.419, 1.40597, 300, 0, 0, 42, 0, 0, 0, 0, 0), -- zul'drak +(213752, 25962, 571, 1, 1, 0, 1, 5605.14, -2622.99, 292.418, 3.07023, 300, 0, 0, 1782, 0, 0, 0, 0, 0), +(213790, 16781, 571, 1, 1, 21083, 0, 5598.5, -2620.43, 292.418, 3.79122, 300, 0, 0, 1716, 0, 0, 0, 0, 0), +(213791, 16781, 571, 1, 1, 16412, 0, 5595.44, -2624.43, 292.418, 0.957505, 300, 0, 0, 2215, 0, 0, 0, 0, 0), +(213792, 16781, 571, 1, 1, 16448, 0, 5591.45, -2618.79, 292.418, 5.53402, 300, 0, 0, 2961, 0, 0, 0, 0, 0), +(213793, 16781, 571, 1, 1, 16414, 0, 5608.18, -2627.1, 292.38, 2.59506, 300, 0, 0, 2961, 0, 0, 0, 0, 0), +(213794, 16781, 571, 1, 1, 16433, 0, 5350.19, 4865.15, -189.023, 5.81181, 300, 0, 0, 2614, 0, 0, 0, 0, 0), -- sholazar +(213795, 16781, 571, 1, 1, 21084, 0, 5349.94, 4860.03, -189.519, 5.81181, 300, 0, 0, 1716, 0, 0, 0, 0, 0), +(213796, 16781, 571, 1, 1, 16412, 0, 5359.3, 4851.5, -195.433, 2.15971, 300, 0, 0, 2453, 0, 0, 0, 0, 0), +(213797, 16781, 571, 1, 1, 16434, 0, 5361.68, 4857.43, -195.012, 2.85086, 300, 0, 0, 1919, 0, 0, 0, 0, 0), +(213798, 25962, 571, 1, 1, 0, 1, 5359.25, 4865.19, -192.408, 4.29363, 300, 0, 0, 2215, 0, 0, 0, 0, 0), +(213799, 32802, 571, 1, 1, 0, 0, 5361.63, 4834.87, -196.682, 6.2634, 300, 0, 0, 11770, 0, 0, 0, 0, 0), +(213800, 16781, 571, 1, 1, 21084, 0, 2475.51, -4899.2, 264.631, 4.34609, 300, 0, 0, 2215, 0, 0, 0, 0, 0), -- howling +(213801, 16781, 571, 1, 1, 16412, 0, 2473.2, -4903.93, 264.472, 1.13459, 300, 0, 0, 1585, 0, 0, 0, 0, 0), +(213802, 16781, 571, 1, 1, 16434, 0, 2470.25, -4897.93, 264.079, 5.37967, 300, 0, 0, 2614, 0, 0, 0, 0, 0), +(213803, 16781, 571, 1, 1, 16435, 0, 2460.73, -4908.81, 263.856, 1.98283, 300, 0, 0, 1919, 0, 0, 0, 0, 0), +(213804, 25962, 571, 1, 1, 0, 1, 2474.94, -4910.43, 265.088, 1.51708, 300, 0, 0, 2453, 0, 0, 0, 0, 0), +(213805, 32804, 571, 1, 1, 0, 0, 2464.21, -4903.28, 263.834, 1.87601, 300, 0, 0, 42, 0, 0, 0, 0, 0), +(213806, 16781, 571, 1, 1, 16448, 0, 5158.08, -705.974, 168.467, 3.02341, 300, 0, 0, 1919, 0, 0, 0, 0, 0), -- crystal song +(213807, 16781, 571, 1, 1, 16434, 0, 5156.52, -702.266, 168.843, 4.44812, 300, 0, 0, 2871, 0, 0, 0, 0, 0), +(213808, 16781, 571, 1, 1, 16433, 0, 5151.8, -705.612, 169.955, 0.254876, 300, 0, 0, 3728, 0, 0, 0, 0, 0), +(213809, 16781, 571, 1, 1, 21084, 0, 5128.25, -708.394, 173.711, 1.15808, 300, 0, 0, 3144, 0, 0, 0, 0, 0), +(213810, 25962, 571, 1, 1, 0, 1, 5145.91, -709.484, 170.821, 0.499922, 300, 0, 0, 1585, 0, 0, 0, 0, 0), +(213811, 32807, 571, 1, 1, 0, 0, 5136.13, -707.254, 172.487, 4.90051, 300, 0, 0, 12600, 0, 0, 0, 0, 0), +(213812, 32806, 571, 1, 1, 0, 0, 6070.88, -1104.53, 419.715, 1.83449, 300, 0, 0, 12600, 0, 0, 0, 0, 0), -- storm peaks +(213813, 16781, 571, 1, 1, 16434, 0, 6065.56, -1113.57, 420.54, 4.16241, 300, 0, 0, 3427, 0, 0, 0, 0, 0), +(213814, 16781, 571, 1, 1, 16412, 0, 6066.28, -1119.17, 420.628, 1.60201, 300, 0, 0, 2871, 0, 0, 0, 0, 0), +(213815, 16781, 571, 1, 1, 16442, 0, 6061.11, -1119.26, 420.736, 0.384647, 300, 0, 0, 1919, 0, 0, 0, 0, 0), +(213816, 16781, 571, 1, 1, 16447, 0, 6057.52, -1108.18, 421.177, 5.5188, 300, 0, 0, 3237, 0, 0, 0, 0, 0), +(213817, 25962, 571, 1, 1, 0, 1, 6055.79, -1113.41, 420.965, 0.639908, 300, 0, 0, 2614, 0, 0, 0, 0, 0); +DELETE FROM `gameobject` WHERE `guid` IN (165358,165145,165146,165147,165148,165149,165150,165151,165152,165153,165154,165156,165157,165160,165161,165162,165163,165164,165165,165166,165167,165168,165169,165170,165171,165172,165173,165174,165175,165176,165177,165178,165179,165180,165181,165182,165183,165184,165185,165186,165187,165188,165189,165190,165191,165192,165193,165194,165195,165196,165197,165198,165199,165200,165201,165202,165203,165204,165205,165206,165208,165209,165210,165211,165212,165213,165214,165215,165216,165217,165218,165219,165220,165221,165222,165223,165224,165225,165226,165227,165229,165230,165231,165232,165233,165234,165235,165236,165237,165238,165239,165240,165241,165242,165243,165244,165245,165246,165247,165248,165249,165250,165251,165252,165253,165254,165255,165256,165257,165259,165260); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165145, 188021, 571, 1, 1, 4132.22, 5395.21, 25.7191, 5.17561, 0, 0, 0.525913, -0.850539, 300, 0, 1), -- borean +(165146, 181376, 571, 1, 1, 4122.37, 5390.27, 27.8408, 5.32484, 0, 0, 0.461047, -0.887376, 300, 0, 1), +(165147, 194032, 571, 1, 1, 4122.37, 5390.27, 27.8408, 5.32484, 0, 0, 0.461047, -0.887376, 300, 0, 1), +(165148, 188020, 571, 1, 1, 4129.22, 5405.02, 28.1789, 0.481285, 0, 0, 0.238326, 0.971185, 300, 0, 1), +(165149, 188020, 571, 1, 1, 4151.06, 5414.97, 28.6058, 3.52863, 0, 0, 0.981333, -0.192314, 300, 0, 1), +(165150, 181355, 571, 1, 1, 4156.95, 5401.1, 26.3092, 3.55219, 0, 0, 0.979, -0.203861, 300, 0, 1), +(165151, 181355, 571, 1, 1, 4146.21, 5396.35, 26.6994, 3.55219, 0, 0, 0.979, -0.203861, 300, 0, 1), +(165152, 181355, 571, 1, 1, 4142.18, 5405.59, 27.1525, 3.55219, 0, 0, 0.979, -0.203861, 300, 0, 1), +(165153, 181355, 571, 1, 1, 4153.32, 5410.39, 28.7987, 3.52313, 0, 0, 0.981858, -0.189615, 300, 0, 1), +(165154, 181605, 571, 1, 1, 4150.05, 5405.28, 27.8774, 5.08058, 0, 0, 0.565718, -0.824599, 300, 0, 1), +(165156, 181305, 571, 1, 1, 4135.12, 5397.23, 25.5887, 3.85927, 0, 0, 0.936306, -0.351186, 300, 0, 1), +(165157, 181307, 571, 1, 1, 4135.05, 5398.94, 26.5787, 4.14594, 0, 0, 0.876539, -0.481331, 300, 0, 1), +(165160, 181306, 571, 1, 1, 4129.8, 5391.77, 26.5704, 0.0579356, 0, 0, 0.0289637, 0.99958, 300, 0, 1), +(165161, 181302, 571, 1, 1, 4131.99, 5391.45, 26.3998, 2.4746, 0, 0, 0.944904, 0.327349, 300, 0, 1), +(165162, 181302, 571, 1, 1, 4131.99, 5391.45, 27.643, 2.4746, 0, 0, 0.944904, 0.327349, 300, 0, 1), +(165163, 188020, 571, 1, 1, 3931.83, -573.606, 240.92, 4.44752, 0, 0, 0.794288, -0.607542, 300, 0, 1), -- dragonblight +(165164, 188021, 571, 1, 1, 3935.16, -604.422, 242.038, 0.314754, 0, 0, 0.156728, 0.987642, 300, 0, 1), +(165165, 188020, 571, 1, 1, 3945.42, -581.269, 241.426, 3.2757, 0, 0, 0.997753, -0.0670037, 300, 0, 1), +(165166, 194036, 571, 1, 1, 3936.15, -583.456, 240.5, 4.0611, 0, 0, 0.896162, -0.443727, 300, 0, 1), +(165167, 181605, 571, 1, 1, 3943.7, -620.329, 242.649, 4.94546, 0, 0, 0.620095, -0.784527, 300, 0, 1), +(165168, 181355, 571, 1, 1, 3939.36, -612.531, 242.424, 0.532305, 0, 0, 0.263021, 0.96479, 300, 0, 1), +(165169, 181355, 571, 1, 1, 3935.15, -599.189, 241.726, 3.43592, 0, 0, 0.989191, -0.146634, 300, 0, 1), +(165170, 181302, 571, 1, 1, 3932.46, -602.261, 241.839, 4.80251, 0, 0, 0.674536, -0.738242, 300, 0, 1), +(165171, 181302, 571, 1, 1, 3933.35, -604.422, 242.14, 5.11746, 0, 0, 0.550417, -0.83489, 300, 0, 1), +(165172, 181306, 571, 1, 1, 3930.72, -604.611, 242.786, 0.606916, 0, 0, 0.298822, 0.954309, 300, 0, 1), +(165173, 181305, 571, 1, 1, 3937.87, -603.327, 241.851, 0.273907, 0, 0, 0.136526, 0.990636, 300, 0, 1), +(165174, 181307, 571, 1, 1, 3937.11, -604.845, 242.841, 1.2478, 0, 0, 0.584205, 0.811606, 300, 0, 1), +(165175, 188020, 571, 1, 1, 3951.62, -594.388, 242.067, 3.25449, 0, 0, 0.998407, -0.0564201, 300, 0, 1), +(165176, 188020, 571, 1, 1, 3956.41, -622.677, 240.615, 3.44377, 0, 0, 0.988608, -0.150516, 300, 0, 1), +(165358, 181376, 571, 1, 1, 3938.9, -583.532, 241.562, 3.02279, 0, 0, 0.998236, 0.0593654, 300, 0, 1), +(165177, 188020, 571, 1, 1, 3395.09, -2897.63, 202.415, 3.91647, 0, 0, 0.92588, -0.377817, 300, 0, 1), -- grizzly +(165178, 188020, 571, 1, 1, 3386.89, -2887.49, 201.433, 3.52822, 0, 0, 0.981373, -0.192111, 300, 0, 1), +(165179, 188021, 571, 1, 1, 3411.02, -2887.95, 200.943, 2.32304, 0, 0, 0.917409, 0.397946, 300, 0, 1), +(165180, 181376, 571, 1, 1, 3403.4, -2896.41, 201.988, 2.32303, 0, 0, 0.917408, 0.397948, 300, 0, 1), +(165181, 194040, 571, 1, 1, 3403.4, -2896.41, 201.988, 2.32303, 0, 0, 0.917408, 0.397948, 300, 0, 1), +(165182, 188020, 571, 1, 1, 3407.51, -2863.88, 200.72, 0.993352, 0, 0, 0.476506, 0.879171, 300, 0, 1), +(165183, 188020, 571, 1, 1, 3417.07, -2866.24, 201.045, 1.32715, 0, 0, 0.615936, 0.787796, 300, 0, 1), +(165184, 181355, 571, 1, 1, 3402.62, -2873.88, 201.036, 5.86281, 0, 0, 0.208643, -0.977992, 300, 0, 1), +(165185, 181355, 571, 1, 1, 3420.67, -2873.09, 201.803, 6.15576, 0, 0, 0.0636678, -0.997971, 300, 0, 1), +(165186, 181605, 571, 1, 1, 3418.83, -2879.6, 202.108, 2.79897, 0, 0, 0.985362, 0.170475, 300, 0, 1), +(165187, 181305, 571, 1, 1, 3412.23, -2891.48, 201.275, 5.57692, 0, 0, 0.345838, -0.938294, 300, 0, 1), +(165188, 181307, 571, 1, 1, 3411.04, -2891.93, 202.266, 5.61226, 0, 0, 0.329204, -0.944259, 300, 0, 1), +(165189, 181302, 571, 1, 1, 3413.25, -2886.38, 200.913, 5.401, 0, 0, 0.426929, -0.904285, 300, 0, 1), +(165190, 181302, 571, 1, 1, 3415.21, -2887.65, 201.016, 0.378376, 0, 0, 0.188062, 0.982157, 300, 0, 1), +(165191, 181306, 571, 1, 1, 3415.86, -2885.54, 201.257, 2.86024, 0, 0, 0.990121, 0.140215, 300, 0, 1), +(165192, 188021, 571, 1, 1, 5613.46, -2625.78, 292.419, 1.55992, 0, 0, 0.703251, 0.710942, 300, 0, 1), -- zul'drak +(165193, 181355, 571, 1, 1, 5603.68, -2629.45, 293.617, 4.60018, 0, 0, 0.745644, -0.666345, 300, 0, 1), +(165194, 181355, 571, 1, 1, 5626.09, -2630.44, 292.882, 1.48451, 0, 0, 0.675952, 0.736946, 300, 0, 1), +(165195, 188020, 571, 1, 1, 5636.45, -2626.42, 292.419, 6.27937, 0, 0, 0.00190917, -0.999998, 300, 0, 1), +(165196, 188020, 571, 1, 1, 5636.13, -2618.64, 292.199, 0.0786426, 0, 0, 0.0393112, 0.999227, 300, 0, 1), +(165197, 188020, 571, 1, 1, 5582.98, -2620.34, 292.42, 0.0385866, 0, 0, 0.0192921, 0.999814, 300, 0, 1), +(165198, 188020, 571, 1, 1, 5581.71, -2626.78, 292.419, 6.27386, 0, 0, 0.00466193, -0.999989, 300, 0, 1), +(165199, 181605, 571, 1, 1, 5587.73, -2625.06, 292.41, 0.0409415, 0, 0, 0.0204693, 0.99979, 300, 0, 1), +(165200, 181305, 571, 1, 1, 5616.57, -2625.53, 292.41, 0.749368, 0, 0, 0.365978, 0.930623, 300, 0, 1), +(165201, 181307, 571, 1, 1, 5616.55, -2626.93, 293.402, 1.55676, 0, 0, 0.702126, 0.712053, 300, 0, 1), +(165202, 181302, 571, 1, 1, 5611.85, -2625.48, 292.361, 4.696, 0, 0, 0.712879, -0.701287, 300, 0, 1), +(165203, 181302, 571, 1, 1, 5609.81, -2625.66, 292.34, 5.23792, 0, 0, 0.499163, -0.866508, 300, 0, 1), +(165204, 181306, 571, 1, 1, 5610.02, -2623.6, 292.418, 0.308762, 0, 0, 0.153769, 0.988107, 300, 0, 1), +(165205, 181376, 571, 1, 1, 5626.92, -2622.29, 292.417, 1.6785, 0, 0, 0.744143, 0.668021, 300, 0, 1), +(165206, 194049, 571, 1, 1, 5626.92, -2622.29, 292.417, 1.6785, 0, 0, 0.744143, 0.668021, 300, 0, 1), +(165208, 188021, 571, 1, 1, 5357.4, 4835.99, -195.101, 1.59976, 0, 0, 0.717272, 0.696793, 300, 0, 1), -- sholazar +(165209, 181376, 571, 1, 1, 5369.18, 4842.41, -197.357, 4.53948, 0, 0, 0.765523, -0.643408, 300, 0, 1), +(165210, 194035, 571, 1, 1, 5369.18, 4842.41, -197.357, 4.53948, 0, 0, 0.765523, -0.643408, 300, 0, 1), +(165211, 181355, 571, 1, 1, 5359.07, 4827.41, -197.019, 0.176586, 0, 0, 0.0881781, 0.996105, 300, 0, 1), +(165212, 181355, 571, 1, 1, 5357.57, 4845.13, -195.788, 1.41909, 0, 0, 0.651487, 0.75866, 300, 0, 1), +(165213, 181605, 571, 1, 1, 5357.67, 4855.99, -193.827, 2.00813, 0, 0, 0.843662, 0.536875, 300, 0, 1), +(165214, 188020, 571, 1, 1, 5364.57, 4869.43, -193.105, 4.59916, 0, 0, 0.745985, -0.665963, 300, 0, 1), +(165215, 188020, 571, 1, 1, 5354.34, 4871.09, -189.818, 4.65099, 0, 0, 0.728478, -0.685069, 300, 0, 1), +(165216, 188021, 571, 1, 1, 2464.17, -4907.57, 263.922, 1.71737, 0, 0, 0.756984, 0.653433, 300, 0, 1), -- howling +(165217, 181305, 571, 1, 1, 2466.21, -4913.1, 264.166, 1.87838, 0, 0, 0.807079, 0.590443, 300, 0, 1), +(165218, 181307, 571, 1, 1, 2466.44, -4913.46, 265.097, 2.75802, 0, 0, 0.981666, 0.190611, 300, 0, 1), +(165219, 181302, 571, 1, 1, 2461.97, -4910.5, 263.936, 2.04881, 0, 0, 0.854405, 0.519608, 300, 0, 1), +(165220, 181302, 571, 1, 1, 2462.99, -4912.18, 264.014, 2.58759, 0, 0, 0.96188, 0.273472, 300, 0, 1), +(165221, 181306, 571, 1, 1, 2460.13, -4911.21, 263.948, 0.18113, 0, 0, 0.0904413, 0.995902, 300, 0, 1), +(165222, 181376, 571, 1, 1, 2454.19, -4910.31, 263.893, 1.66082, 0, 0, 0.738208, 0.674573, 300, 0, 1), +(165223, 194038, 571, 1, 1, 2454.19, -4910.31, 263.893, 1.66082, 0, 0, 0.738208, 0.674573, 300, 0, 1), +(165224, 188020, 571, 1, 1, 2440.82, -4917.07, 264.587, 3.04862, 0, 0, 0.99892, 0.0464672, 300, 0, 1), +(165225, 188020, 571, 1, 1, 2438.66, -4906.68, 263.066, 3.01328, 0, 0, 0.997943, 0.0641126, 300, 0, 1), +(165226, 188020, 571, 1, 1, 2484.02, -4906.27, 266.191, 3.40989, 0, 0, 0.991016, -0.133745, 300, 0, 1), +(165227, 188020, 571, 1, 1, 2480.96, -4899.1, 265.064, 3.50885, 0, 0, 0.983188, -0.182596, 300, 0, 1), +(165229, 181605, 571, 1, 1, 2477.58, -4905.4, 265.055, 3.54262, 0, 0, 0.979964, -0.199174, 300, 0, 1), +(165230, 181355, 571, 1, 1, 2444.4, -4912.06, 263.951, 4.8615, 0, 0, 0.652474, -0.757811, 300, 0, 1), +(165231, 181355, 571, 1, 1, 2479.59, -4904.05, 265.144, 5.29976, 0, 0, 0.472136, -0.881526, 300, 0, 1), +(165232, 188021, 571, 1, 1, 5136.25, -701.964, 172.182, 5.14116, 0, 0, 0.540484, -0.841354, 300, 0, 1), -- crystalsong +(165233, 181376, 571, 1, 1, 5144.94, -695.736, 171.284, 5.22017, 0, 0, 0.506833, -0.862045, 300, 0, 1), +(165234, 194045, 571, 1, 1, 5144.94, -695.736, 171.284, 5.22017, 0, 0, 0.506833, -0.862045, 300, 0, 1), +(165235, 188020, 571, 1, 1, 5157.7, -692.213, 168.342, 3.56062, 0, 0, 0.978132, -0.207985, 300, 0, 1), +(165236, 181355, 571, 1, 1, 5153.61, -694.632, 169.363, 0.505421, 0, 0, 0.250029, 0.968238, 300, 0, 1), +(165237, 188020, 571, 1, 1, 5122.22, -708.294, 175.114, 0.416673, 0, 0, 0.206832, 0.978376, 300, 0, 1), +(165238, 181355, 571, 1, 1, 5126.09, -706.472, 174.339, 3.55198, 0, 0, 0.979021, -0.203758, 300, 0, 1), +(165239, 181605, 571, 1, 1, 5151.54, -709.361, 169.826, 2.02988, 0, 0, 0.849448, 0.527672, 300, 0, 1), +(165240, 181305, 571, 1, 1, 5133.04, -698.409, 172.585, 2.84669, 0, 0, 0.989149, 0.146918, 300, 0, 1), +(165241, 181307, 571, 1, 1, 5134.11, -697.857, 173.575, 3.61874, 0, 0, 0.971676, -0.236315, 300, 0, 1), +(165242, 181302, 571, 1, 1, 5130.8, -703.896, 173.441, 0.0954414, 0, 0, 0.0477026, 0.998862, 300, 0, 1), +(165243, 181302, 571, 1, 1, 5130.87, -703.854, 174.684, 0.535265, 0, 0, 0.264449, 0.9644, 300, 0, 1), +(165244, 181306, 571, 1, 1, 5131.38, -705.369, 173.303, 0.248594, 0, 0, 0.123977, 0.992285, 300, 0, 1), +(165245, 188021, 571, 1, 1, 6071.62, -1109.83, 419.2, 0.405097, 0, 0, 0.201166, 0.979557, 300, 0, 1), -- storm peaks +(165246, 181305, 571, 1, 1, 6068.33, -1111.01, 420.335, 0.181236, 0, 0, 0.0904939, 0.995897, 300, 0, 1), +(165247, 181307, 571, 1, 1, 6068.13, -1112.28, 421.326, 1.41274, 0, 0, 0.649077, 0.760723, 300, 0, 1), +(165248, 181302, 571, 1, 1, 6075.71, -1107.72, 419.811, 0.0485033, 0, 0, 0.0242493, 0.999706, 300, 0, 1), +(165249, 181302, 571, 1, 1, 6074.48, -1109.44, 419.993, 0.613205, 0, 0, 0.301821, 0.953365, 300, 0, 1), +(165250, 181306, 571, 1, 1, 6076.77, -1109.03, 419.873, 0.174952, 0, 0, 0.0873647, 0.996176, 300, 0, 1), +(165251, 188020, 571, 1, 1, 6087.35, -1102.33, 417.415, 1.96409, 0, 0, 0.831634, 0.555324, 300, 0, 1), +(165252, 181355, 571, 1, 1, 6088.04, -1106.9, 418.348, 3.61421, 0, 0, 0.972209, -0.234116, 300, 0, 1), +(165253, 181355, 571, 1, 1, 6083.72, -1098.45, 417.139, 3.61421, 0, 0, 0.972209, -0.234116, 300, 0, 1), +(165254, 188020, 571, 1, 1, 6052.44, -1113.82, 420.864, 1.8769, 0, 0, 0.806644, 0.591038, 300, 0, 1), +(165255, 181355, 571, 1, 1, 6052.45, -1106.76, 421.632, 0.193794, 0, 0, 0.0967457, 0.995309, 300, 0, 1), +(165256, 181355, 571, 1, 1, 6056.56, -1118.19, 420.868, 0.130963, 0, 0, 0.0654346, 0.997857, 300, 0, 1), +(165257, 181605, 571, 1, 1, 6061.69, -1112.97, 420.771, 5.40099, 0, 0, 0.426933, -0.904283, 300, 0, 1), +(165259, 181376, 571, 1, 1, 6081.58, -1107.81, 419.498, 5.2117, 0, 0, 0.510478, -0.859891, 300, 0, 1), +(165260, 194044, 571, 1, 1, 6081.58, -1107.81, 419.498, 5.2117, 0, 0, 0.510478, -0.859891, 300, 0, 1); +-- Add SAI support for all flame wardens to cast summon Scorchling on spawn +-- Eeastern Kingdoms +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25908; -- The Hinterlands +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25908; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25908,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25909; -- The Western Plaguelands +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25909; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25909,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25901; -- Hillsbrad Foothills +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25901; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25901,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25910; -- Westfall +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25910; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25910,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25911; -- Wetlands +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25911; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25911,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25898; -- Elwynn Forest +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25898; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25898,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25892; -- Burning Steppes +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25892; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25892,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25890; -- Blasted Lands +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25890; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25890,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25887; -- Arathi Highlands +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25887; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25887,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25915; -- Cape of Stranglethorn +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25915; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25915,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25895; -- Dun Morogh +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25895; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25895,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25896; -- Duskwood +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25896; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25896,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25902; -- Loch Modan +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25902; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25902,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25904; -- Redridge Mountains +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25904; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25904,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +-- Kalimdor +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25883; -- Ashenvale +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25883; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25883,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25894; -- Desolace +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25894; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25894,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25897; -- Dustwallow Marsh +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25897; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25897,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25917; -- Winterspring +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25917; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25917,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25916; -- Tanaris +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25916; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25916,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25914; -- Silithus +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25914; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25914,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25899; -- Feralas +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25899; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25899,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25893; -- Darkshore +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25893; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25893,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25888; -- Azuremyst Isle +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25888; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25888,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25891; -- Bloodmyst Isle +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25891; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25891,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25906; -- Teldrassil +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25906; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25906,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +-- Outland +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25905; -- Shadowmoon Valley +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25905; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25905,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25903; -- Nagrand +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25903; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25903,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25913; -- Netherstorm +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25913; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25913,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25900; -- Hellfire Peninsula +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25900; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25900,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25907; -- Terokkar +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25907; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25907,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25889; -- Blade's Edge +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25889; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25889,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25912; -- Zangarmarsh +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25912; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25912,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +-- Northrend +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32808; -- Zul'Drak +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32808; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32808,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32801; -- Borean Tundra +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32801; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32801,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32802; -- Sholazar Basin +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32802; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32802,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32803; -- Dragonblight +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32803; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32803,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32807; -- Crystalsong Forest +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32807; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32807,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32806; -- Storm Peaks +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32806; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32806,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32805; -- Grizzly Hills +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32805; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32805,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 32804; -- Howling Fjords +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=32804; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(32804,0,0,0,25,0,100,0,0,0,0,0,11,46972,0,0,0,0,0,1,0,0,0,0,0,0,0,'FK - On spawn - Cast summon scorchling'); +-- Remove unused guids from creature_addon after removal of some double spawns /that would give warning on start-up/ +DELETE FROM `creature_addon` WHERE `guid` IN (86376,86895,94735,94734,94716,94733,86321,94649,94738,86704,94700,94579); +-- Alliance - Desecrate the flame fix + all achs related from /Desecration of the Horde 1035/ +-- Add missing gameobject_questrelation and involvedrelation that were blocking quests +-- Extinguishing Kalimdor - {Achievement=1029} +DELETE FROM `gameobject_queststarter` WHERE `id` IN (187958,187952,187953,187950,187973,187971,187968,187965,187961,187957,187959,187948); +INSERT INTO `gameobject_queststarter` (`id`, `quest`) VALUES +(187958, 11770), -- Durotar +(187957, 11769), -- Desolace +(187965, 11777), -- Mulgore +(187953, 11803), -- Winterspring +(187971, 11783), -- Barrens +(187961, 11773), -- Feralas +(187948, 11765), -- Ashenvale +(187959, 11771), -- Dustwallow marsh +(187973, 11785), -- Thousand Needles +(187950, 11800), -- Silithus +(187968, 11780), -- Stonetalon Mountains +(187952, 11802); -- Tanaris +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `ID` IN (11770, 11777, 11783, 11802, 11765, 11803, 11769, 11785, 11773, 11771, 11800, 11780); +-- Extinguishing Outland - {Achievement=1030} +DELETE FROM `gameobject_queststarter` WHERE `id` IN (187963,187967,187949,187970,187975,187966,187955); +INSERT INTO `gameobject_queststarter` (`id`, `quest`) VALUES +(187963, 11775), -- Hellfire Peninsula +(187967, 11779), -- Shadowmoon Valley +(187949, 11799), -- Netherstorm +(187970, 11782), -- Terokkar +(187975, 11787), -- Zangarmarsh +(187955, 11767), -- Blade' Edge +(187966, 11778); -- Nagrand +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `ID` IN (11775,11779,11799,11782,11787,11767,11778); +-- Extinguishing Northrend +DELETE FROM `gameobject_queststarter` WHERE `id` IN (194048,194033,194034,194037,194046,194043,194042,194039); +INSERT INTO `gameobject_queststarter` (`id`, `quest`) VALUES +(194048, 13458), -- Zul'Drak +(194033, 13441), -- Borean Tundra +(194034, 13450), -- Sholazar Basin +(194037, 13451), -- Dragonblight +(194046, 13457), -- Crystalsong Forest +(194043, 13455), -- Storm Peaks +(194042, 13454), -- Grizzly Hills +(194039, 13453); -- Howling Fjords +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `ID` IN (13458,13441,13450,13451,13457,13455,13454,13453); +-- Extinguishing Eastern Kingdoms {Achievement=1028} +DELETE FROM `gameobject_queststarter` WHERE `id` IN (187962,187960,187964,187969,187951,187956,187972,187559,187974,187954,187947); +INSERT INTO `gameobject_queststarter` (`id`, `quest`) VALUES +(187962, 11774), -- Ghostland +(187960, 11772), -- Eversong woods +(187964, 11776), -- Hillsbrad Foothills +(187969, 11781), -- Swamp of sorrows +(187951, 11801), -- Cape of Stranglethorn +(187956, 11768), -- Burning Steppes +(187972, 11784), -- The Hinterlands +(187559, 11580), -- Silverpine Forest +(187974, 11786), -- Tirisfal Glades +(187954, 11766), -- Badlands +(187947, 11764); -- Arathi Highlands +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `ID` IN (11774,11772,11776,11781,11801,11768,11784,11580,11786,11766,11764); + +-- Horde - Desecrate the flame fix + all achs related from /Desecration of the Alliance 1037/ +-- Add missing gameobject_questrelation and involvedrelation that were blocking quests +-- Extinguishing Kalimdor - {Achievement=1029} +DELETE FROM `gameobject_queststarter` WHERE `id` IN (187916,187924,187927,187946,187945,187943,187929,187923,187917,187921,187936); +INSERT INTO `gameobject_queststarter` (`id`, `quest`) VALUES +(187916, 11734), -- Ashenvale +(187924, 11741), -- Desolace +(187927, 11744), -- Dustwallow Marsh +(187946, 11763), -- Winterspring +(187945, 11762), -- Tanaris +(187943, 11760), -- Silithus +(187929, 11746), -- Feralas +(187923, 11740), -- Darkshore +(187917, 11735), -- Azuremyst Isle +(187921, 11738), -- Bloodmyst Isle +(187936, 11753); -- Teldrassil +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID` IN (11734,11741,11744,11763,11762,11760,11746,11740,11735,11738,11753); + +-- Extinguishing Eastern Kingdoms +DELETE FROM `gameobject_queststarter` WHERE `id` IN (187938,187939,187931,187564,187940,187928,187922,187920,187914,187944,187925,187926,187932,187934); +INSERT INTO `gameobject_queststarter` (`id`, `quest`) VALUES +(187938, 11755), -- The Hinterlands +(187939, 11756), -- The Western Plaguelands +(187931, 11748), -- Hillsbrad Foothills +(187564, 11581), -- Westfall +(187940, 11757), -- Wetlands +(187928, 11745), -- Elwynn Forest +(187922, 11739), -- Burning Steppes +(187920, 11737), -- Blasted Lands +(187914, 11732), -- Arathi Highlands +(187944, 11761), -- Cape of Stranglethorn +(187925, 11742), -- Dun Morogh +(187926, 11743), -- Duskwood +(187932, 11749), -- Loch Modan +(187934, 11751); -- Redridge Mountains +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID` IN (11755,11756,11748,11581,11757,11745,11739,11737,11732,11761,11742,11743,11749,11751); +-- Extinguishing Northrend +DELETE FROM `gameobject_queststarter` WHERE `id` IN (194032,194036,194040,194038,194049,194044,194035,194045); +INSERT INTO `gameobject_queststarter` (`id`, `quest`) VALUES +(194032, 13440), -- Borean Tundra +(194036, 13443), -- Dragonblight +(194040, 13445), -- Grizzly +(194038, 13444), -- Howling Fjord +(194049, 13449), -- Zul'Drak +(194044, 13446), -- The Storm Peaks +(194035, 13442), -- Sholazar Basin +(194045, 13447); -- Crystalsong Forest +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID` IN (13440,13443,13445,13444,13449,13446,13442,13447); +-- Extinguishing Outland +DELETE FROM `gameobject_queststarter` WHERE `id` IN (187935,187933,187942,187930,187937,187919,187941); +INSERT INTO `gameobject_queststarter` (`id`, `quest`) VALUES +(187935, 11752), -- Shadowmoon Valley +(187933, 11750), -- Nagrand +(187942, 11759), -- Netherstorm +(187930, 11747), -- Hellfire Peninsula +(187937, 11754), -- Terokkar +(187919, 11736), -- Blade's Edge +(187941, 11758); -- Zangarmarsh +UPDATE `quest_template` SET `AllowableRaces`=690 WHERE `ID` IN (11752,11750,11759,11747,11754,11736,11758); +-- #1 +-- Add SAI for Horde Flame Eater /Didn't want to take guids for action list, since events can do it fine/ and add for now data for celebrants text +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25994; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25994; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25994,0,0,0,60,0,100,0,15000,15000,36000,36000,5,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flame Eater - On event update - Play emote drink'), +(25994,0,1,0,60,0,100,0,16000,16000,37000,37000,11,46332,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flame Eater - On event update - Cast flame breath'), +(25994,0,2,0,60,0,100,0,17500,17500,38500,38500,11,46332,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flame Eater - On event update - Cast flame breath'), +(25994,0,3,0,60,0,100,0,19000,19000,40000,40000,11,46332,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flame Eater - On event update - Cast flame breath'); +-- Add SAI for Alliance Fire Eater /Didn't want to take guids for action list, since events can do it fine/ +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 25962; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=25962; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25962,0,0,0,60,0,100,0,15000,15000,36000,36000,5,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flame Eater - On event update - Play emote drink'), +(25962,0,1,0,60,0,100,0,16000,16000,37000,37000,11,46332,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flame Eater - On event update - Cast flame breath'), +(25962,0,2,0,60,0,100,0,17500,17500,38500,38500,11,46332,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flame Eater - On event update - Cast flame breath'), +(25962,0,3,0,60,0,100,0,19000,19000,40000,40000,11,46332,0,0,0,0,0,1,0,0,0,0,0,0,0,'Flame Eater - On event update - Cast flame breath'); +-- Note: When he drinks the flask dissapear from hands and it shouldn't, maybe there is spell, but I can't find it after checking ~ spells, needs a sniff, to be fully blizzlike /all I know is the visua like, when Flask of North is being consumed, but the flask must be with yellowgreen liquid, not blue/ or maybe the creature addon shouldn't ignore equipment while performing drink. +-- Midsummer Celebrant texts - this will be scripted when some bugs are sorted out with core +DELETE FROM `creature_text` WHERE `entry`=16781; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(16781,0,0,'The Horde fires will never be extinguished!',12,1,100,1,0,0,'Celebrant for the Horde',24534), +(16781,1,0,'I''d like to see the Alliance try to steal our flame.',12,1,100,1,0,0,'Celebrant - Horde speech',24533), +(16781,2,0,"The Horde have tried to steal our flames. I hope we return the favor.",12,7,100,1,0,0,'Celebrant - Alliance speech', 24531), +(16781,3,0,"The Alliance fires burn strong and true!",12,7,100,1,0,0,'Celebrant - Alliance speech', 24532), +(16781,4,0,"Midsummer Fire Festival is a great time to celebrate the summer!",12,0,100,1,0,0,'Celebrant - speech', 24535), +(16781,5,0,"I love the firework show at the end of Midsummer Firefestival.",12,0,100,1,0,0,'Celebrant - speech', 24536); +-- #2 +-- Fix quests for stealing 9325/TB/,9326/UC/,9324/Org/,9332/Darnassus/,9331/Ironforge/,9330/SW/ Flames by using linked_spells to conjure the proper items on using the capital's flames from the cleansing fires that hit players +DELETE FROM `spell_scripts` WHERE `id` IN (29137,29135,29126,46671,29139,29138,29136,46672); +INSERT INTO `spell_scripts` (`id`, `effIndex`,`command`, `datalong`, `datalong2`) VALUES +(29137, 2, 15,29101, 2), +(29135, 2, 15,29102, 2), +(29126, 2, 15,29099, 2), +(46671, 2, 15,46690, 2), +(29139, 2, 15,29133, 2), +(29136, 2, 15,29130, 2), +(29138, 2, 15,29132, 2), +(46672, 2, 15,46689, 2); +-- Add missing gameobject_questrelation and involvedrelation that were blocking quests for {Q} A Thief'S Reward /H/A/ - 9339,9365 and the achievement accordingly +DELETE FROM `creature_queststarter` WHERE `quest` IN (9365,9339); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(16817, 9365), -- Alliance +(16818, 9339); -- Horde +DELETE FROM `game_event_creature_quest` WHERE `quest` IN (9365,9339); +INSERT INTO `game_event_creature_quest` (`eventEntry`, `id`, `quest`) VALUES +(1, 16817, 9365), -- Alliance +(1, 16818, 9339); -- Horde +UPDATE `quest_template` SET `LogDescription`='', `QuestDescription`='' WHERE `Id` IN (9339, 9365); -- text here was wrong or such should not even exist, can't find any info, if there is another one. +-- #3 +-- Add the missing burning bonfires, there should be 1 for quest and 1 with wood on top of it, both have different types and fuctions +DELETE FROM `gameobject` WHERE `guid` IN (165409,165410,165411,165409,49313,165412,165413,165414,165415,165416,165417,165418,165419,165420,165421,165422,165423,165424,165425,165426,165427,165428,165429,165430,165431,165432,165433,165434,165435,165436,165437,165438,165439,165440,165441,165442,165443,165444,165445,165446,165447,165448,165449,165450,165451,165452,165453,165454,165455,165456,165457,165458,165459,165460,165461,165462,165463,165464,165465,165466,165467,165468,165469,165470,165471,165472,165473,165474,165475,165476,165477,165478,165479,165480,165481,165482,165483,165484,165485); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165409, 181288, 1, 1, 1, 145.521, -4713.82, 18.129, -2.53, 0, 0, 0, 0, 120, 0, 1), +(165410, 181288, 1, 1, 1, -7122.51, -3657.11, 8.82202, -1.74533, 0, 0, 0.766044, -0.642788, 180, 100, 1), +(165411, 181288, 1, 1, 1, 6855.99, -4564.4, 708.51, 0.855211, 0, 0, 0.414693, 0.909961, 180, 100, 1), +(49313, 181288, 1, 1, 1, -7000.75, 918.851, 8.93831, -2.23402, 0, 0, 0.898794, -0.438371, 900, 100, 1), -- Using the guid since it is double spawn +(165412, 181288, 1, 1, 1, -5513.93, -2299.73, -58.0752, 2.44346, 0, 0, 0.939693, 0.34202, 180, 100, 1), +(165413, 181288, 1, 1, 1, -273.242, -2662.82, 91.695, -1.8675, 0, 0, 0.803857, -0.594823, 180, 100, 1), +(165414, 181288, 1, 1, 1, 952.992, 776.968, 104.474, -1.55334, 0, 0, 0.700909, -0.71325, 180, 100, 1), +(165415, 181288, 1, 1, 1, -2329.42, -624.806, -8.27507, 5.5, 0, 0, 0.766044, -0.642788, 0, 100, 1), +(165416, 181288, 1, 1, 1, -4573.22, 407.388, 41.5461, 2.46091, 0, 0, 0.942641, 0.333807, 180, 100, 1), +(165417, 181288, 1, 1, 1, -1862.36, 3055.71, 0.744157, 2.49582, 0, 0, 0.948324, 0.317305, 180, 100, 1), +(165418, 181288, 1, 1, 1, -3110.59, -2722.41, 33.4626, 0.226893, 0, 0, 0.113203, 0.993572, 180, 100, 1), +(165419, 181288, 1, 1, 1, 2014.65, -2337.84, 89.5211, 2.37365, 0, 0, 0.927184, 0.374607, 180, 100, 1), +(165420, 181288, 530, 1, 1, 41.2448, 2587.44, 68.3453, -2.28638, 0, 0, 0.909961, -0.414693, 180, 100, 1), +(165421, 181288, 530, 1, 1, -3059.17, 2374.85, 63.1011, 2.03334, 0, 0, 0.850361, 0.526199, 300, 0, 1), +(165422, 181288, 530, 1, 1, 2922.17, 3690.15, 143.809, 5.94709, 0, 0, 0.167258, -0.985913, 300, 0, 1), +(165423, 181288, 530, 1, 1, -2553.32, 4277.61, 20.614, -1.36136, 0, 0, 0.629321, -0.777146, 180, 100, 1), +(165424, 181288, 530, 1, 1, 200.9, 7686.96, 22.508, -0.506145, 0, 0, 0.25038, -0.968148, 180, 100, 1), +(165425, 181288, 530, 1, 1, -1211.01, 7474.44, 21.9953, -2.02458, 0, 0, 0.848048, -0.529919, 180, 100, 1), +(165426, 181288, 530, 1, 1, 2282.43, 6134.5, 136.337, 6.01364, 0, 0, 0.134365, -0.990932, 300, 0, 1), +(165427, 181288, 571, 1, 1, 5294.92, -2761.88, 292.419, 2.12359, 0, 0, 0.873231, 0.487306, 300, 0, 1), +(165428, 181288, 571, 1, 1, 4441.05, 5627.71, 56.3487, 4.54665, 0, 0, 0.763211, -0.646149, 300, 0, 1), +(165429, 181288, 571, 1, 1, 5499.12, 4869.82, -197.467, 5.88414, 0, 0, 0.198201, -0.980161, 300, 0, 1), +(165430, 181288, 571, 1, 1, 3773.85, 1464.02, 92.4174, 6.10863, 0, 0, 0.087167, -0.996194, 300, 0, 1), +(165431, 181288, 571, 1, 1, 5530.53, -726.151, 148.904, 5.3977, 0, 0, 0.428418, -0.903581, 300, 0, 1), +(165432, 181288, 571, 1, 1, 6142.19, -1020.44, 408.496, 1.91604, 0, 0, 0.818053, 0.575142, 300, 0, 1), +(165433, 181288, 571, 1, 1, 3368.48, -2135.25, 124.53, 0.20224, 0, 0, 0.100948, 0.994892, 300, 0, 1), +(165434, 181288, 571, 1, 1, 2579.72, -4325.59, 276.934, 5.77529, 0, 0, 0.251227, -0.967928, 300, 0, 1), +(165435, 181288, 530, 1, 1, 7693.53, -6836.51, 77.787, 2.7052, 0, 0, 0, 0, 120, 0, 1), +(165436, 181288, 530, 1, 1, 9386.86, -6772.24, 14.412, -2.9146, 0, 0, 0, 0, 120, 0, 1), +(165437, 181288, 0, 1, 1, -134.688, -802.767, 55.0147, -1.62316, 0, 0, 0.725374, -0.688354, 180, 100, 1), +(165438, 181288, 0, 1, 1, -10331.4, -3297.73, 21.9992, -2.89725, 0, 0, 0.992546, -0.121869, 180, 100, 1), +(165439, 181288, 0, 1, 1, -14376.7, 115.921, 1.4532, 2.11185, 0, 0, 0.870356, 0.492424, 180, 100, 1), +(165440, 181288, 0, 1, 1, -7596.42, -2086.6, 125.17, -0.942478, 0, 0, 0.453991, -0.891006, 180, 100, 1), +(165441, 181288, 0, 1, 1, -447.95, -4527.65, 8.59595, 1.53589, 0, 0, 0.694658, 0.71934, 180, 100, 1), +(165442, 181288, 0, 1, 1, 587.056, 1365.02, 90.4778, 2.6529, 0, 0, 0.970296, 0.241922, 180, 100, 1), +(165443, 181288, 0, 1, 1, 2279.25, 456.009, 33.867, 0.3665, 0, 0, 0, 0, 120, 0, 1), +(165444, 181288, 0, 1, 1, -6704.48, -2200.91, 248.609, 0.017453, 0, 0, 0.008727, 0.999962, 180, 100, 1), +(165445, 181288, 0, 1, 1, -1134.84, -3531.81, 51.0719, -0.820305, 0, 0, 0.398749, -0.91706, 180, 100, 1), +(165446, 181288, 1, 1, 1, 2558.73, -481.666, 109.821, -2.47837, 0, 0, 0.945519, -0.325568, 180, 100, 1), +(165447, 181288, 1, 1, 1, -55.5039, 1271.35, 91.9489, 1.5708, 0, 0, 0.707107, 0.707107, 180, 100, 1), +(165448, 181288, 1, 1, 1, -3447.55, -4231.67, 10.6645, 0.802851, 0, 0, 0.390731, 0.920505, 180, 100, 1), +(165449, 181288, 1, 1, 1, 6860.03, -4767.11, 696.833, -2.63545, 0, 0, 0.968148, -0.25038, 180, 100, 1), +(165450, 181288, 1, 1, 1, -7216.15, -3859.66, 11.9664, 4.00788, 0, 0, 0.907652, -0.419724, 300, 0, 1), +(165451, 181288, 1, 1, 1, -6771.96, 527.151, -1.40004, 3.1949, 0, 0, 0.999645, -0.0266517, 300, 0, 1), +(165452, 181288, 1, 1, 1, -4412.02, 3480.24, 12.6312, 6.12709, 0, 0, 0.0779694, -0.996956, 300, 0, 1), +(165453, 181288, 1, 1, 1, 6327.68, 512.61, 17.4723, 0.034907, 0, 0, 0.017452, 0.999848, 180, 100, 1), +(165454, 181288, 530, 1, 1, -4219.28, -12303.5, 2.90522, 5.69342, 0, 0, 0.290628, -0.956836, 300, 0, 1), +(165455, 181288, 530, 1, 1, -2254.78, -11896.3, 27.4979, 5.24028, 0, 0, 0.498141, -0.867096, 300, 0, 1), +(165456, 181288, 1, 1, 1, 9778.64, 1019.38, 1299.79, 0.261799, 0, 0, 0.130526, 0.991445, 180, 100, 1), +(165457, 181288, 0, 1, 1, 188.243, -2132.53, 102.674, -1.37881, 0, 0, 0.636078, -0.771625, 180, 100, 1), +(165458, 181288, 0, 1, 1, 989.562, -1453.47, 61.0011, 4.9105, 0, 0, 0.633713, -0.773569, 300, 0, 1), +(165459, 181288, 0, 1, 1, -604.148, -545.813, 36.579, 0.698132, 0, 0, 0.34202, 0.939693, 180, 100, 1), +(165460, 181288, 0, 1, 1, -10657.1, 1054.63, 32.6733, 2.47837, 0, 0, 0.945519, 0.325568, 180, 100, 1), +(165461, 181288, 0, 1, 1, -3448.2, -938.102, 10.6583, 0.034907, 0, 0, 0.017452, 0.999848, 180, 100, 1), +(165462, 181288, 0, 1, 1, -9394.21, 37.5017, 59.882, 1.15192, 0, 0, 0.544639, 0.838671, 180, 100, 1), +(165463, 181288, 0, 1, 1, -8245.62, -2623.9, 133.155, 4.04776, 0, 0, 0.899102, -0.43774, 300, 0, 1), +(165464, 181288, 0, 1, 1, -10951.5, -3218.1, 41.3475, 1.91986, 0, 0, 0.819152, 0.573576, 180, 100, 1), +(165465, 181288, 0, 1, 1, -1211.6, -2676.88, 45.3612, -0.645772, 0, 0, 0.317305, -0.948324, 180, 100, 1), +(165466, 181288, 0, 1, 1, -14288.1, 61.8062, 0.68836, 1.37881, 0, 0, 0.636078, 0.771625, 180, 100, 1), +(165467, 181288, 0, 1, 1, -5404.93, -492.299, 395.597, -0.506145, 0, 0, 0.25038, -0.968148, 180, 100, 1), +(165468, 181288, 0, 1, 1, -10704.8, -1146.38, 24.7909, 2.09439, 0, 0, 0.866025, 0.5, 180, 100, 1), +(165469, 181288, 0, 1, 1, -5233.16, -2893.37, 337.286, -0.226893, 0, 0, 0.113203, -0.993572, 180, 100, 1), +(165470, 181288, 0, 1, 1, -9434.3, -2110.36, 65.8038, 0.349066, 0, 0, 0.173648, 0.984808, 180, 100, 1), +(165471, 181288, 571, 1, 1, 4122.37, 5390.27, 27.8408, 5.32484, 0, 0, 0.461047, -0.887376, 300, 0, 1), +(165472, 181288, 571, 1, 1, 3936.15, -583.456, 240.5, 4.0611, 0, 0, 0.896162, -0.443727, 300, 0, 1), +(165473, 181288, 571, 1, 1, 3403.4, -2896.41, 201.988, 2.32303, 0, 0, 0.917408, 0.397948, 300, 0, 1), +(165474, 181288, 571, 1, 1, 2454.19, -4910.31, 263.893, 1.66082, 0, 0, 0.738208, 0.674573, 300, 0, 1), +(165475, 181288, 571, 1, 1, 5626.92, -2622.29, 292.417, 1.6785, 0, 0, 0.744143, 0.668021, 300, 0, 1), +(165476, 181288, 571, 1, 1, 6081.58, -1107.81, 419.498, 5.2117, 0, 0, 0.510478, -0.859891, 300, 0, 1), +(165477, 181288, 571, 1, 1, 5369.18, 4842.41, -197.357, 4.53948, 0, 0, 0.765523, -0.643408, 300, 0, 1), +(165478, 181288, 571, 1, 1, 5144.94, -695.736, 171.284, 5.22017, 0, 0, 0.506833, -0.862045, 300, 0, 1), +(165479, 181288, 530, 1, 1, -3941.98, 2048.49, 95.0656, 4.87742, 0, 0, 0.646421, -0.762981, 300, 0, 1), +(165480, 181288, 530, 1, 1, -2526.69, 7548.83, -2.23534, 5.32817, 0, 0, 0.459565, -0.888144, 300, 0, 1), +(165481, 181288, 530, 1, 1, 3121.5, 3753.88, 141.851, 5.85856, 0, 0, 0.21072, -0.977546, 300, 0, 1), +(165482, 181288, 530, 1, 1, -528.509, 2339.11, 38.7252, 2.14675, 0, 0, 0.878817, 0.477159, 180, 100, 1), +(165483, 181288, 530, 1, 1, -3004.07, 4152.48, 3.64988, 1.75455, 0, 0, 0.769001, 0.639247, 300, 0, 1), +(165484, 181288, 530, 1, 1, 2019.7, 6587.14, 134.985, 6.23705, 0, 0, 0.023068, -0.999734, 300, 0, 1), +(165485, 181288, 530, 1, 1, 192.209, 6015.13, 22.1067, 0.00709009, 0, 0, 0.00354504, 0.999994, 300, 0, 1); +-- #4 +-- Add the missing burning bonfires the npcs* /upon which on quest complete steam is casted upon +DELETE FROM `creature` WHERE `guid` IN (152327,152328,152329,152330,152331,152332,152333,152334,152335,152336,152337,152338,152339,152340,152341,152342,152343,152344,152345,152346,152347,152348,152349,152350,152351,152352,152353,152354,152355,152356,152357,152358,152359,152360,152361,152362,152363,152364,152365,152366,152367,152368,152369,152370,152371,152372,152373,152374,152375,152376,152377,152378,152379,152380,152381,152382,152383,152384,152385,152386,152387,152388,152389,152390,152391,152392,152393,152394,152395,152396,152397,152398,152399,152400,152401,152402,152403,152404); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`,`orientation`) VALUES +(152327, 16592, 1, 1, 1, 145.521, -4713.82, 18.129, -2.53), +(152328, 16592, 1, 1, 1, -7122.51, -3657.11, 8.82202, -1.74533), +(152329, 16592, 1, 1, 1, 6855.99, -4564.4, 708.51, 0.855211), +(152330, 16592, 1, 1, 1, -7000.75, 918.851, 8.93831, -2.23402), +(152331, 16592, 1, 1, 1, -5513.93, -2299.73, -58.0752, 2.44346), +(152332, 16592, 1, 1, 1, -273.242, -2662.82, 91.695, -1.8675), +(152333, 16592, 1, 1, 1, 952.992, 776.968, 104.474, -1.55334), +(152334, 16592, 1, 1, 1, -2329.42, -624.806, -8.27507, 5.5), +(152335, 16592, 1, 1, 1, -4573.22, 407.388, 41.5461, 2.46091), +(152336, 16592, 1, 1, 1, -1862.36, 3055.71, 0.744157, 2.49582), +(152337, 16592, 1, 1, 1, -3110.59, -2722.41, 33.4626, 0.226893), +(152338, 16592, 1, 1, 1, 2014.65, -2337.84, 89.5211, 2.37365), +(152339, 16592, 530, 1, 1, 41.2448, 2587.44, 68.3453, -2.28638), +(152340, 16592, 530, 1, 1, -3059.17, 2374.85, 63.1011, 2.03334), +(152341, 16592, 530, 1, 1, 2922.17, 3690.15, 143.809, 5.94709), +(152342, 16592, 530, 1, 1, -2553.32, 4277.61, 20.614, -1.36136), +(152343, 16592, 530, 1, 1, 200.9, 7686.96, 22.508, -0.506145), +(152344, 16592, 530, 1, 1, -1211.01, 7474.44, 21.9953, -2.02458), +(152345, 16592, 530, 1, 1, 2282.43, 6134.5, 136.337, 6.01364), +(152346, 16592, 571, 1, 1, 5294.92, -2761.88, 292.419, 2.12359), +(152347, 16592, 571, 1, 1, 4441.05, 5627.71, 56.3487, 4.54665), +(152348, 16592, 571, 1, 1, 5499.12, 4869.82, -197.467, 5.88414), +(152349, 16592, 571, 1, 1, 3773.85, 1464.02, 92.4174, 6.10863), +(152350, 16592, 571, 1, 1, 5530.53, -726.151, 148.904, 5.3977), +(152351, 16592, 571, 1, 1, 6142.19, -1020.44, 408.496, 1.91604), +(152352, 16592, 571, 1, 1, 3368.48, -2135.25, 124.53, 0.20224), +(152353, 16592, 571, 1, 1, 2579.72, -4325.59, 276.934, 5.77529), +(152354, 16592, 530, 1, 1, 7693.53, -6836.51, 77.787, 2.7052), +(152355, 16592, 530, 1, 1, 9386.86, -6772.24, 14.412, -2.9146), +(152356, 16592, 0, 1, 1, -134.688, -802.767, 55.0147, -1.62316), +(152357, 16592, 0, 1, 1, -10331.4, -3297.73, 21.9992, -2.89725), +(152358, 16592, 0, 1, 1, -14376.7, 115.921, 1.4532, 2.11185), +(152359, 16592, 0, 1, 1, -7596.42, -2086.6, 125.17, -0.942478), +(152360, 16592, 0, 1, 1, -447.95, -4527.65, 8.59595, 1.53589), +(152361, 16592, 0, 1, 1, 587.056, 1365.02, 90.4778, 2.6529), +(152362, 16592, 0, 1, 1, 2279.25, 456.009, 33.867, 0.3665), +(152363, 16592, 0, 1, 1, -6704.48, -2200.91, 248.609, 0.017453), +(152364, 16592, 0, 1, 1, -1134.84, -3531.81, 51.0719, -0.820305), +(152365, 16592, 1, 1, 1, 2558.73, -481.666, 109.821, -2.47837), +(152366, 16592, 1, 1, 1, -55.5039, 1271.35, 91.9489, 1.5708), +(152367, 16592, 1, 1, 1, -3447.55, -4231.67, 10.6645, 0.802851), +(152368, 16592, 1, 1, 1, 6860.03, -4767.11, 696.833, -2.63545), +(152369, 16592, 1, 1, 1, -7216.15, -3859.66, 11.9664, 4.00788), +(152370, 16592, 1, 1, 1, -6771.96, 527.151, -1.40004, 3.1949), +(152371, 16592, 1, 1, 1, -4412.02, 3480.24, 12.6312, 6.12709), +(152372, 16592, 1, 1, 1, 6327.68, 512.61, 17.4723, 0.034907), +(152373, 16592, 530, 1, 1, -4219.28, -12303.5, 2.90522, 5.69342), +(152374, 16592, 530, 1, 1, -2254.78, -11896.3, 27.4979, 5.24028), +(152375, 16592, 1, 1, 1, 9778.64, 1019.38, 1299.79, 0.261799), +(152376, 16592, 0, 1, 1, 188.243, -2132.53, 102.674, -1.37881), +(152377, 16592, 0, 1, 1, 989.562, -1453.47, 61.0011, 4.9105), +(152378, 16592, 0, 1, 1, -604.148, -545.813, 36.579, 0.698132), +(152379, 16592, 0, 1, 1, -10657.1, 1054.63, 32.6733, 2.47837), +(152380, 16592, 0, 1, 1, -3448.2, -938.102, 10.6583, 0.034907), +(152381, 16592, 0, 1, 1, -9394.21, 37.5017, 59.882, 1.15192), +(152382, 16592, 0, 1, 1, -8245.62, -2623.9, 133.155, 4.04776), +(152383, 16592, 0, 1, 1, -10951.5, -3218.1, 41.3475, 1.91986), +(152384, 16592, 0, 1, 1, -1211.6, -2676.88, 45.3612, -0.645772), +(152385, 16592, 0, 1, 1, -14288.1, 61.8062, 0.68836, 1.37881), +(152386, 16592, 0, 1, 1, -5404.93, -492.299, 395.597, -0.506145), +(152387, 16592, 0, 1, 1, -10704.8, -1146.38, 24.7909, 2.09439), +(152388, 16592, 0, 1, 1, -5233.16, -2893.37, 337.286, -0.226893), +(152389, 16592, 0, 1, 1, -9434.3, -2110.36, 65.8038, 0.349066), +(152390, 16592, 571, 1, 1, 4122.37, 5390.27, 27.8408, 5.32484), +(152391, 16592, 571, 1, 1, 3936.15, -583.456, 240.5, 4.0611), +(152392, 16592, 571, 1, 1, 3403.4, -2896.41, 201.988, 2.32303), +(152393, 16592, 571, 1, 1, 2454.19, -4910.31, 263.893, 1.66082), +(152394, 16592, 571, 1, 1, 5626.92, -2622.29, 292.417, 1.6785), +(152395, 16592, 571, 1, 1, 6081.58, -1107.81, 419.498, 5.2117), +(152396, 16592, 571, 1, 1, 5369.18, 4842.41, -197.357, 4.53948), +(152397, 16592, 571, 1, 1, 5144.94, -695.736, 171.284, 5.22017), +(152398, 16592, 530, 1, 1, -3941.98, 2048.49, 95.0656, 4.87742), +(152399, 16592, 530, 1, 1, -2526.69, 7548.83, -2.23534, 5.32817), +(152400, 16592, 530, 1, 1, 3121.5, 3753.88, 141.851, 5.85856), +(152401, 16592, 530, 1, 1, -528.509, 2339.11, 38.7252, 2.14675), +(152402, 16592, 530, 1, 1, -3004.07, 4152.48, 3.64988, 1.75455), +(152403, 16592, 530, 1, 1, 2019.7, 6587.14, 134.985, 6.23705), +(152404, 16592, 530, 1, 1, 192.209, 6015.13, 22.1067, 0.00709009); +-- #5 +-- Remove unused guids from creature_addon after removal of some double spawns /that would give warning on start-up/ +DELETE FROM `creature_addon` WHERE `guid` IN (86232,86242,86243,86244,86245,86246,86247,86248,86249,86250,86251,86252,86253,86254,86255,86256,86258,86259,86260,86261,86262,86264,86265,86266,86267,86268,86329,86711,90490,94551,94553,94554,94555,94556,94557,94605,94704,94777,94778,94779,94780,94781,94782,94783,94784,94785,94787,94788,94789,94790,94791,94792,94793,94794,94795,94796,94797,94798,94799,94800); +-- #6 +-- Add correct data for Midsummer Bonfire +UPDATE `gameobject_template` SET `type`=8, `data0`=1365, `data1`=10, `data10`=0, `data12`=0 WHERE `entry`=181288; -- /this is blizzard data I know is a WDB edit, but it won't hurt to stay here for people that will use it someday or till we get parsed outside of 12340./ +-- #7 + +-- #8 +-- Add condition for Stamp Out fire steam to target bunnies only on complete of any of the Desecrate the Fires quests +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=45437; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,45437,0,0,31,0,3,16592,0,0,0,'','Steam can only target bunnies'); +-- #9 +-- Set Eearthen Ring Elder ID: 26221 friendly to both factions as it should be +UPDATE `creature_template` SET `faction`=1727 WHERE `entry`=26221; +-- #10 +-- Add proper level requirements, remove disables /flag no idea why it was set/ for Earthern ring daillies and chain fix up of some quest relations +UPDATE `quest_template` SET `QuestType`=2 WHERE `Id`=11917; -- Striking Back +UPDATE `quest_template` SET `QuestType`=2 WHERE `Id`=11947; -- -//- +UPDATE `quest_template` SET `QuestType`=2 WHERE `Id`=11948; -- -//- +UPDATE `quest_template` SET `QuestType`=2 WHERE `Id`=11952; -- -//- +UPDATE `quest_template` SET `QuestType`=2 WHERE `Id`=11953; -- -//- +UPDATE `quest_template` SET `QuestType`=2 WHERE `Id`=11954; -- -//- +UPDATE `quest_template` SET `QuestType`=2 WHERE `Id`=11955; -- Ahune, the Frost Lord +UPDATE `quest_template_addon` SET `PrevQuestId`=12012,`MaxLevel`=28 WHERE `Id`=11917; -- Striking Back +UPDATE `quest_template_addon` SET `PrevQuestId`=12012,`MaxLevel`=38 WHERE `Id`=11947; -- -//- +UPDATE `quest_template_addon` SET `PrevQuestId`=12012,`MaxLevel`=48 WHERE `Id`=11948; -- -//- +UPDATE `quest_template_addon` SET `PrevQuestId`=12012,`MaxLevel`=55 WHERE `Id`=11952; -- -//- +UPDATE `quest_template_addon` SET `PrevQuestId`=12012,`MaxLevel`=63 WHERE `Id`=11953; -- -//- +UPDATE `quest_template_addon` SET `PrevQuestId`=12012 WHERE `Id`=11954; -- -//- +UPDATE `quest_template_addon` SET `PrevQuestId`=12012 WHERE `Id`=11955; -- Ahune, the Frost Lord +UPDATE `quest_template_addon` SET `PrevQuestId`=11955 WHERE `Id`=11696; -- Ahune is here! + + +-- #12 +-- Disable deprecated quests /in 2008/ from Midsummer Fire Festival +DELETE FROM `disables` WHERE `sourceType` = 1 AND `entry` in (9388,9322,9389,9323); +INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES +(1,9388,0,0,0,'Disable quest Flickering Flames in Kalimdor /Deprecated after 2008/'), +(1,9322,0,0,0,'Disable quest Wild Fires in Kalimdor /Deprecated after 2008/'), +(1,9389,0,0,0,'Disable quest Flickering Flames in the Eastern Kingdoms /Deprecated after 2008/'), +(1,9323,0,0,0,'Disable quest Wild Fires in Eastern Kingdoms /Deprecated after 2008/'); +-- #13 +-- Fix relations of More Torch Tossing and Catching quests +UPDATE `quest_template_addon` SET `PrevQuestId`=11731 WHERE `Id`=11921; -- More Torch Tossing /A/ +UPDATE `quest_template_addon` SET `PrevQuestId`=11922 WHERE `Id`=11926; -- More Torch Tossing /H/ +UPDATE `quest_template_addon` SET `PrevQuestId`=11657 WHERE `Id`=11924; -- More Torch Catching /A/ +UPDATE `quest_template_addon` SET `PrevQuestId`=11923 WHERE `Id`=11925; -- More Torch Catching /H/ +-- Add missing quest relations for the mentioned above quest's questgivers +DELETE FROM `creature_queststarter` WHERE `quest` IN (11921,11924,11925,11926); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(25975, 11921), -- Master fire eater +(25975, 11924), -- Master fire eater +(26113, 11925), -- Master flame eater +(26113, 11926); -- Master flame eater + +-- #14 +-- Add missing objects and creatures from capital cities and fix some minor misc on already spawned ones +-- The Exodar +DELETE FROM `gameobject` WHERE `guid` IN (165509,165510,165511,165512,165513,165514,165515,165516,165517,165518,165519,165520,165521,165522,165523,165524,165525); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165509, 181376, 530, 1, 1, -3794.02, -11502.1, -134.74, 5.00689, 0, 0, 0.59571, -0.8032, 300, 0, 1), +(165510, 188128, 530, 1, 1, -3794.02, -11502.1, -134.74, 5.00689, 0, 0, 0.59571, -0.8032, 300, 0, 1), +(165511, 181305, 530, 1, 1, -3794.46, -11519.8, -134.94, 1.89985, 0, 0, 0.813373, 0.581743, 300, 0, 1), +(165512, 181307, 530, 1, 1, -3795.81, -11519.3, -133.928, 0.0211825, 0, 0, 0.010591, 0.999944, 300, 0, 1), +(165513, 181302, 530, 1, 1, -3800.48, -11515.8, -134.966, 6.21562, 0, 0, 0.0337776, -0.999429, 300, 0, 1), +(165514, 181302, 530, 1, 1, -3800.87, -11517.1, -135.02, 2.979, 0, 0, 0.996697, 0.0812088, 300, 0, 1), +(165515, 181302, 530, 1, 1, -3800.86, -11516.4, -133.722, 2.56666, 0, 0, 0.958966, 0.283523, 300, 0, 1), +(165516, 181306, 530, 1, 1, -3799.04, -11517.6, -134.986, 3.29551, 0, 0, 0.99704, -0.0768831, 300, 0, 1), +(165517, 188020, 530, 1, 1, -3793.84, -11533.9, -134.975, 5.90226, 0, 0, 0.189314, -0.981916, 300, 0, 1), +(165518, 188020, 530, 1, 1, -3774.53, -11496.2, -134.493, 2.69547, 0, 0, 0.975225, 0.221214, 300, 0, 1), +(165519, 181355, 530, 1, 1, -3772.21, -11491.7, -134.447, 4.23172, 0, 0, 0.855095, -0.518471, 300, 0, 1), +(165520, 181355, 530, 1, 1, -3797.16, -11540.5, -134.957, 1.12154, 0, 0, 0.531839, 0.846846, 300, 0, 1), +(165521, 187708, 530, 1, 1, -3768.73, -11511.2, -134.479, 2.70805, 0, 0, 0.976597, 0.215078, 300, 0, 1), +(165522, 187708, 530, 1, 1, -3773.26, -11519.4, -134.56, 2.53526, 0, 0, 0.954396, 0.298543, 300, 0, 1), +(165523, 187708, 530, 1, 1, -3776.32, -11511.5, -134.569, 5.69256, 0, 0, 0.291037, -0.956712, 300, 0, 1), +(165524, 187708, 530, 1, 1, -3775.23, -11506.7, -134.539, 5.79074, 0, 0, 0.243745, -0.969839, 300, 0, 1), +(165525, 187708, 530, 1, 1, -3780.47, -11514.1, -134.626, 5.66115, 0, 0, 0.30603, -0.952022, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (152405,152406,152407); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(152405, 26221, 530, 1, 1, 0, 1, -3796.67, -11496.8, -134.748, 2.2101, 300, 0, 0, 8982, 3155, 0, 0, 0, 0), +(152406, 16781, 530, 1, 1, 0, 0, -3814.35, -11505.7, -138.534, 2.81721, 120, 0, 0, 1, 0, 0, 0, 0, 0), +(152407, 16781, 530, 1, 1, 0, 0, -3816.08, -11510.3, -138.573, 1.88337, 120, 0, 0, 1, 0, 0, 0, 0, 0); +UPDATE `creature` SET `modelid`=21084 WHERE `guid`=202765; +UPDATE `gameobject_template` SET `faction`=1735 WHERE `entry`=188128; -- Set faction for Exodar flame so it can be looted only by alliance +-- Silvermoon +DELETE FROM `creature` WHERE `guid` IN (152408); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(152408, 26124, 530, 1, 1, 0, 0, 9790.85, -7250.58, 26.1002, 5.48896, 300, 0, 0, 3524, 0, 0, 0, 0, 0); +DELETE FROM `gameobject` WHERE `guid` IN (165550,165551,165552,165553,165554,165555,165556,165557); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165550, 181306, 530, 1, 1, 9791.79, -7248.75, 26.0815, 4.80477, 0, 0, 0.673703, -0.739003, 300, 0, 1), +(165551, 187708, 530, 1, 1, 9817.67, -7227.84, 26.1104, 3.89843, 0, 0, 0.929251, -0.36945, 300, 0, 1), +(165552, 187708, 530, 1, 1, 9810.38, -7226.95, 26.0582, 0.898206, 0, 0, 0.434157, 0.900837, 300, 0, 1), +(165553, 187708, 530, 1, 1, 9819.87, -7234.51, 26.1176, 0.898206, 0, 0, 0.434157, 0.900837, 300, 0, 1), +(165554, 187708, 530, 1, 1, 9823.56, -7229.12, 26.1209, 3.78847, 0, 0, 0.948148, -0.317829, 300, 0, 1), +(165555, 187708, 530, 1, 1, 9817.55, -7221.36, 26.1142, 3.80025, 0, 0, 0.946259, -0.323409, 300, 0, 1), +(165556, 188020, 530, 1, 1, 9819.17, -7251.91, 26.1485, 5.37496, 0, 0, 0.438667, -0.89865, 300, 0, 1), +(165557, 188020, 530, 1, 1, 9795.99, -7270.21, 26.3648, 2.06541, 0, 0, 0.858689, 0.512496, 300, 0, 1); +UPDATE `creature` SET `modelid`=21085 WHERE `guid`=202746; +UPDATE `creature` SET `modelid`=21086 WHERE `guid`=202749; +UPDATE `creature` SET `modelid`=16436 WHERE `guid`=202748; +UPDATE `gameobject_template` SET `faction`=1732 WHERE `entry`=188129; -- Set faction for Silvermoon flame so it can be looted only by horde +-- Undercity and Ironforge missing stuff and double spawns +DELETE FROM `gameobject` WHERE `guid` IN (165581,165582,165583); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165581, 188021, 0, 1, 1, 1802.13, 222.644, 59.9682, 1.02433, 0, 0, 0.490064, 0.871686, 300,100,1), +(165582, 188021, 0, 1, 1, -4711.33, -1224.68, 501.66, 3.95557, 0, 0, 0.918317, -0.395846, 300,100,1), +(165583, 181376, 0, 1, 1, -4700.28, -1224.34, 501.659, -2.14675, 0, 0, 0.878817, -0.477159, 180,100,1); +DELETE FROM `creature` WHERE `guid` IN (202858,202859,202863,202861,202860,86165,202862); +DELETE FROM `creature_addon` WHERE `guid` IN (202858,202859,202863,202861,202860,86165,202862); +-- Stormwind and Darnassus +DELETE FROM `gameobject` WHERE `guid` IN (165607,165608,165609,165610,165612,165613,165614,165615,165616,165617,165618); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165607, 181305, 0, 1, 1, -8833.44, 875.047, 98.5645, 3.04849, 0, 0, 0.998917, 0.0465366, 300, 0, 1), +(165608, 181307, 0, 1, 1, -8832.66, 876.386, 99.5549, 4.18967, 0, 0, 0.865805, -0.500381, 300, 0, 1), +(165609, 181302, 0, 1, 1, -8831.75, 880.124, 98.4636, 4.62321, 0, 0, 0.737923, -0.674885, 300, 0, 1), +(165610, 181302, 0, 1, 1, -8829.84, 879.278, 98.5062, 5.90498, 0, 0, 0.187978, -0.982173, 300, 0, 1), +(165612, 181302, 0, 1, 1, -8830.09, 879.49, 99.7495, 3.72942, 0, 0, 0.957117, -0.289703, 300, 0, 1), +(165613, 181306, 0, 1, 1, -8830.36, 881.029, 98.4529, 4.14019, 0, 0, 0.877919, -0.478809, 300, 0, 1), +(165614, 187708, 0, 1, 1, -8816.54, 854.183, 98.882, 4.34518, 0, 0, 0.824323, -0.56612, 300, 0, 1), +(165615, 187708, 0, 1, 1, -8815.11, 860.487, 98.96, 4.75751, 0, 0, 0.690976, -0.722877, 300, 0, 1), +(165616, 187708, 0, 1, 1, -8818.01, 865.253, 98.9761, 4.47084, 0, 0, 0.787149, -0.616763, 300, 0, 1), +(165617, 181306, 1, 1, 1, 8705.34, 970.3, 12.2316, 5.19882, 0, 0, 0.516009, -0.856583, 300, 0, 1), +(165618, 181307, 1, 1, 1, 8703.78, 967.116, 13.6598, 4.10868, 0, 0, 0.885353, -0.46492, 300, 0, 1); +DELETE FROM `creature` WHERE `guid` IN (165584,165585,165586,165587,165588,165589,94739); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(165584, 16781, 0, 1, 1, 16434, 0, -8823.33, 857.655, 99.0305, 1.57502, 300, 0, 0, 2614, 0, 0, 0, 0, 0), +(165585, 16781, 0, 1, 1, 16433, 0, -8824.21, 861.431, 98.9968, 4.82972, 300, 0, 0, 4050, 0, 0, 0, 0, 0), +(165586, 16781, 0, 1, 1, 16433, 0, -8826.99, 859.058, 99.0299, 0.149527, 300, 0, 0, 3331, 0, 0, 0, 0, 0), +(165587, 26221, 0, 1, 1, 0, 1, -8832.81, 861.687, 98.8931, 0.880735, 300, 0, 0, 8982, 3155, 0, 0, 0, 0), +(165588, 26123, 0, 1, 1, 0, 0, -8827.68, 875.783, 98.6689, 4.60823, 300, 0, 0, 3524, 0, 0, 0, 0, 0), +(165589, 16817, 0, 1, 1, 0, 0, -8831.73, 854.756, 99.1285, 5.71407, 300, 0, 0, 3052, 0, 0, 0, 0, 0), +(94739, 16781, 1, 1, 1, 16434, 0, 8720.84, 963.484, 11.851, 1.43676, 300, 0, 0, 1524, 0, 0, 0, 0, 0); +-- #15 +-- Add SAIS for all of mentioned above /data taken from Blua project specific .lua and BrantX creator/ +SET @Flameguard := 25866; +SET @Firesworn := 25863; +SET @Viktor := 25924; +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=25866; -- set levels for Twilight Flameguards +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=25863; -- set levels for Twilight Firesworns +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=25924; -- set levels for Twilight Speaker Viktor +-- Firesworn +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Firesworn; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Firesworn,0,0,0,0,0,100,0,0,1000,7000,7500,11,20793,0,0,0,0,0,2,0,0,0,0,0,0,0,'Firesworn - IC - Cast spell Fireball on victim'), +(@Firesworn,0,1,0,4,0,100,0,0,0,0,0,11,184,0,0,0,0,0,1,0,0,0,0,0,0,0,'Firesworn - On aggro - Cast fiire shield on self /no need for remove aura event, sice it is only 1 minute long/'); +-- Viktor +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Viktor; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Viktor,0,0,0,0,0,100,0,0,1000,7000,7500,11,20793,0,0,0,0,0,2,0,0,0,0,0,0,0,'Viktor - IC - Cast spell Fireball on victim'); +-- #16 +-- #18 +-- Full support for quests with name Striking Back and full support for everything they are connected with +-- General support for Striking Back quests = tons of things + SAIs... Add missing object from gameobject_template +DELETE FROM `gameobject_template` WHERE `entry` IN (188134,188135,188139,188145,188146,188147); +INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `size`, `name`, `data1`, `data2`, `data3`, `data6`, `VerifiedBuild`) VALUES +(188134, 2, 7666, 1, 'Ice Stone', 0, 3, 9258, 0, 11723), -- /Ice stone/ this is a proven missing gameobject and the data is as of 11723 same model one taken from +(188135, 2, 7666, 1, 'Ice Stone', 0, 3, 9259, 0, 11723), -- /Ice stone/ this is a proven missing gameobject and the data is as of 11723 same model one taken from +(188139, 2, 7666, 1, 'Ice Stone', 0, 3, 9260, 0, 11723), -- /Ice stone/ this is a proven missing gameobject and the data is as of 11723 same model one taken from +(188145, 2, 7666, 1, 'Ice Stone', 0, 3, 9266, 0, 11723), -- /Ice stone/ this is a proven missing gameobject and the data is as of 11723 same model one taken from +(188146, 2, 7666, 1, 'Ice Stone', 0, 3, 9267, 0, 11723), -- /Ice stone/ this is a proven missing gameobject and the data is as of 11723 same model one taken from +(188147, 2, 7666, 1, 'Ice Stone', 0, 3, 9268, 0, 11723); -- /Ice stone/ this is a proven missing gameobject and the data is as of 11723 same model one taken from +-- Add missing gossip menus and options//I still don't get the idea for all the gossips and even different for same functions, but I'm just following the WDB example +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9258,9259,9260,9266,9267,9268,9213,9256,9257,9264,9265,9269,9271,9272,9273,9274,9275,9276); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`, `OptionBroadcastTextID`) VALUES +(9258,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), -- Desolace +(9259,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9260,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9266,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), -- Searing Gorge +(9267,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9268,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9213,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), -- Ashenvale +(9256,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9257,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9264,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), -- Stranglethorn +(9265,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9269,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), -- Silithus +(9271,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9272,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9273,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), -- Hellfire +(9274,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9275,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218), +(9276,0,0, 'Lay your hand on the Ice Stone.',1,1,0,0,0,0, '',25218); +DELETE FROM `gossip_menu` WHERE `entry` IN (9258,9259,9260,9266,9267,9268,9213,9256,9257,9264,9265,9269,9271,9272,9273,9274,9275,9276); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(9258,12524), +(9259,12524), +(9260,12524), +(9266,12524), +(9267,12524), +(9268,12524), +(9213,12524), +(9256,12524), +(9257,12524), +(9264,12524), +(9265,12524), +(9269,12524), +(9271,12524), +(9272,12524), +(9273,12524), +(9274,12524), +(9275,12524), +(9276,12524); +-- Add conditions for gossip menus +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (9258,9259,9260,9266,9267,9268,9213,9256,9257,9264,9265,9269,9271,9272,9273,9274,9275,9276); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,9213,0,0,0,9,0,11917,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Ashenvale/'), +(15,9256,0,0,0,9,0,11917,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Ashenvale/'), +(15,9257,0,0,0,9,0,11917,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Ashenvale/'), +(15,9258,0,0,0,9,0,11947,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Desolace/'), +(15,9259,0,0,0,9,0,11947,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Desolace/'), +(15,9260,0,0,0,9,0,11947,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Desolace/'), +(15,9264,0,0,0,9,0,11948,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Stranglethorn/'), +(15,9265,0,0,0,9,0,11948,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Stranglethorn/'), +(15,9266,0,0,0,9,0,11952,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Searing Gorge/'), +(15,9267,0,0,0,9,0,11952,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Searing Gorge/'), +(15,9268,0,0,0,9,0,11952,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Searing Gorge/'), +(15,9269,0,0,0,9,0,11953,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Silithus/'), +(15,9271,0,0,0,9,0,11953,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Silithus/'), +(15,9272,0,0,0,9,0,11953,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Silithus/'), +(15,9273,0,0,0,9,0,11954,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Hellfire/'), +(15,9274,0,0,0,9,0,11954,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Hellfire/'), +(15,9275,0,0,0,9,0,11954,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Hellfire/'), +(15,9276,0,0,0,9,0,11954,0,0,0,0,'','Ice Stone - For Gossip player must have Striking back /Hellfire/'); +-- Add all missing go spawns for Striking Back quests and decorations connected with it +DELETE FROM `gameobject` WHERE `guid` IN (165715,165723,165747,165748,165749,165773,165774,165800,165801,165802,165803,165827,165828,165829,165830,165831,165832,165833,165834,165835,165837,165838,165839,165840,165841,165842,165843,165844,165845,165846,165847,165848,165849,165850,165851,165852,165853,165854,165855,165856,165857,165858,165859,165860,165862,165886,165887,165888,165889,165890,165914,165915,165916,165917,165918,165919,165920,165921,165922,165923,165924,165925,165926,165951,165952,165953,165954,165955,165956,165957,165958,165959,165960,165961,165962,165963,165964); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(165715, 188048, 1, 1, 1, -461.769, 2472.11, 104.848, 4.40434, 0, 0, 0.807217, -0.590254, 300, 0, 1), +(165723, 188048, 0, 1, 1, -12196, 887.421, 0.59987, 0.486257, 0, 0, 0.24074, 0.97059, 300, 0, 1), +(165747, 188050, 0, 1, 1, -12196.5, 887.828, 2.72441, 1.8615, 0, 0, 0.802067, 0.597233, 300, 0, 1), +(165748, 188143, 0, 1, 1, -12196.5, 887.828, 2.72441, 1.8615, 0, 0, 0.802067, 0.597233, 300, 0, 1), +(165749, 188048, 0, 1, 1, -12170.1, 860.773, 19.0948, 1.7209, 0, 0, 0.758137, 0.652095, 300, 0, 1), +(165773, 188050, 0, 1, 1, -12169.5, 860.835, 21.2184, 3.2917, 0, 0, 0.997185, -0.0749834, 300, 0, 1), +(165774, 188144, 0, 1, 1, -12169.5, 860.835, 21.2184, 3.2917, 0, 0, 0.997185, -0.0749834, 300, 0, 1), +(165800, 188050, 1, 1, 1, -462.112, 2472.26, 106.971, 5.9398, 0, 0, 0.170852, -0.985297, 300, 0, 1), +(165801, 188134, 1, 1, 1, -462.112, 2472.26, 106.571, 5.9398, 0, 0, 0.170852, -0.985297, 300, 0, 1), +(165802, 188048, 1, 1, 1, -438.441, 2451.37, 103.147, 1.53371, 0, 0, 0.693872, 0.720098, 300, 0, 1), +(165803, 188048, 1, 1, 1, -465.8, 2452.56, 100.004, 5.15439, 0, 0, 0.534909, -0.84491, 300, 0, 1), +(165827, 188050, 1, 1, 1, -437.932, 2451.39, 105.271, 3.04952, 0, 0, 0.99894, 0.0460223, 300, 0, 1), +(165828, 188135, 1, 1, 1, -437.932, 2451.39, 105.271, 3.04952, 0, 0, 0.99894, 0.0460223, 300, 0, 1), +(165829, 188050, 1, 1, 1, -466.49, 2452.25, 102.127, 0.38702, 0, 0, 0.192305, 0.981335, 300, 0, 1), +(165830, 188139, 1, 1, 1, -466.49, 2452.25, 102.127, 0.38702, 0, 0, 0.192305, 0.981335, 300, 0, 1), +(165831, 187989, 1, 1, 1, -437.406, 2438.64, 106.645, 2.94349, 0, 0, 0.995098, 0.0988888, 300, 0, 1), +(165832, 187989, 1, 1, 1, -480.744, 2434.37, 99.8844, 0.284917, 0, 0, 0.141977, 0.98987, 300, 0, 1), +(165833, 187989, 1, 1, 1, -475.681, 2367.79, 96.9422, 4.35126, 0, 0, 0.822596, -0.568627, 300, 0, 1), +(165834, 187989, 1, 1, 1, -509.534, 2404.15, 97.0855, 0.344939, 0, 0, 0.171616, 0.985164, 300, 0, 1), +(165835, 187989, 1, 1, 1, -451.373, 2483.46, 111.352, 4.62147, 0, 0, 0.738511, -0.674241, 300, 0, 1), +(165837, 187918, 1, 1, 1, -479.677, 2420.32, 94.6018, 3.65464, 0, 0, 0.967278, -0.253719, 300, 0, 1), +(165838, 187918, 1, 1, 1, -451.718, 2430.49, 98.9137, 0.354041, 0, 0, 0.176097, 0.984373, 300, 0, 1), +(165839, 187918, 0, 1, 1, -12189.7, 842.621, 10.5679, 6.20423, 0, 0, 0.0394675, -0.999221, 300, 0, 1), +(165840, 187918, 0, 1, 1, -12168.5, 835.455, 11.7295, 5.8885, 0, 0, 0.196064, -0.980591, 300, 0, 1), +(165841, 187989, 0, 1, 1, -12178.2, 801.785, 2.18033, 3.98705, 0, 0, 0.911973, -0.410251, 300, 0, 1), +(165842, 187989, 0, 1, 1, -12236.1, 837.722, 2.50857, 0.752642, 0, 0, 0.367501, 0.930023, 300, 0, 1), +(165843, 187989, 0, 1, 1, -12156.2, 934.719, 2.21955, 4.7244, 0, 0, 0.702848, -0.71134, 300, 0, 1), +(165844, 187989, 0, 1, 1, -12112.9, 870.413, 9.49334, 2.21505, 0, 0, 0.894596, 0.446876, 300, 0, 1), +(165845, 188048, 0, 1, 1, -6636.4, -665.27, 233.754, 5.32295, 0, 0, 0.461881, -0.886942, 300, 0, 1), +(165846, 188050, 0, 1, 1, -6637.01, -665.525, 235.876, 0.528097, 0, 0, 0.260991, 0.965341, 300, 0, 1), +(165847, 188145, 0, 1, 1, -6637.01, -665.525, 235.876, 0.528097, 0, 0, 0.260991, 0.965341, 300, 0, 1), +(165848, 188048, 0, 1, 1, -6603.47, -644.717, 233.754, 2.32509, 0, 0, 0.917816, 0.397006, 300, 0, 1), +(165849, 188050, 0, 1, 1, -6603.16, -644.701, 235.877, 3.89824, 0, 0, 0.929285, -0.369364, 300, 0, 1), +(165850, 188146, 0, 1, 1, -6603.16, -644.701, 235.877, 3.89824, 0, 0, 0.929285, -0.369364, 300, 0, 1), +(165851, 188048, 0, 1, 1, -6620.78, -624.053, 233.755, 3.24086, 0, 0, 0.998768, -0.0496152, 300, 0, 1), +(165852, 188050, 0, 1, 1, -6620.71, -623.62, 235.878, 4.71892, 0, 0, 0.704796, -0.70941, 300, 0, 1), +(165853, 188147, 0, 1, 1, -6620.71, -623.62, 235.878, 4.71892, 0, 0, 0.704796, -0.70941, 300, 0, 1), +(165854, 187989, 0, 1, 1, -6595.95, -663.852, 238.42, 5.19351, 0, 0, 0.518277, -0.855213, 300, 0, 1), +(165855, 187989, 0, 1, 1, -6602.66, -667.151, 238.82, 3.59601, 0, 0, 0.974298, -0.225261, 300, 0, 1), +(165856, 187989, 0, 1, 1, -6595.89, -691.631, 244.639, 4.34765, 0, 0, 0.823623, -0.567138, 300, 0, 1), +(165857, 187989, 0, 1, 1, -6609.54, -690.698, 243.926, 3.1939, 0, 0, 0.999658, -0.0261491, 300, 0, 1), +(165858, 187989, 0, 1, 1, -6611.29, -717.496, 247.221, 4.26282, 0, 0, 0.846928, -0.531708, 300, 0, 1), +(165859, 187989, 0, 1, 1, -6621.53, -714.911, 247.568, 4.22355, 0, 0, 0.857204, -0.514977, 300, 0, 1), +(165860, 187918, 0, 1, 1, -6637.37, -651.561, 241.749, 5.72995, 0, 0, 0.273105, -0.961984, 300, 0, 1), +(165862, 188157, 530, 1, 1, -156.232, 1137.98, 26.5052, 0.537575, 0, 0, 0.265563, 0.964094, 300, 0, 1), +(165886, 188156, 530, 1, 1, -155.708, 1136.65, 41.5227, 1.07635, 0, 0, 0.512571, 0.858645, 300, 0, 1), +(165887, 188151, 530, 1, 1, -155.708, 1136.65, 41.5227, 1.07635, 0, 0, 0.512571, 0.858645, 300, 0, 1), +(165888, 188157, 530, 1, 1, -350.997, 1130.78, 25.645, 2.66284, 0, 0, 0.971486, 0.237097, 300, 0, 1), +(165889, 188157, 530, 1, 1, -132.353, 1203.6, 26.5964, 3.86685, 0, 0, 0.934967, -0.354735, 300, 0, 1), +(165890, 188157, 530, 1, 1, -356.812, 1209.86, 24.809, 1.975, 0, 0, 0.374167, -0.927362, 300, 0, 1), +(165914, 188156, 530, 1, 1, -349.997, 1132.78, 40.645, 0.0623619, 0, 0, 0.0311759, 0.999514, 300, 0, 1), +(165915, 188152, 530, 1, 1, -349.997, 1132.18, 40.645, 0.0623619, 0, 0, 0.0311759, 0.999514, 300, 0, 1), +(165916, 188156, 530, 1, 1, -133.263, 1204.24, 41.6632, 3.20002, 0, 0, 0.999573, -0.0292117, 300, 0, 1), +(165917, 188153, 530, 1, 1, -133.263, 1204.24, 41.6632, 3.20002, 0, 0, 0.999573, -0.0292117, 300, 0, 1), +(165918, 188156, 530, 1, 1, -355.812, 1209.86, 39.809, 1.975, 0, 0, 0.657948, -0.753063, 300, 0, 1), +(165919, 188154, 530, 1, 1, -355.812, 1209.86, 39.809, 1.975, 0, 0, 0.657948, -0.753063, 300, 0, 1), +(165920, 187989, 530, 1, 1, -168.654, 1223.93, 39.5249, 5.54051, 0, 0, 0.362863, -0.931843, 300, 0, 1), +(165921, 187989, 530, 1, 1, -134.98, 1219.16, 39.9083, 4.46029, 0, 0, 0.790393, -0.6126, 300, 0, 1), +(165922, 187989, 530, 1, 1, -164.647, 1183.49, 41.5094, 3.56022, 0, 0, 0.978174, -0.207788, 300, 0, 1), +(165923, 187989, 530, 1, 1, -134.178, 1162.87, 41.4418, 4.88283, 0, 0, 0.644354, -0.764728, 300, 0, 1), +(165924, 187989, 530, 1, 1, -157.004, 1100.52, 41.6002, 4.75795, 0, 0, 0.690816, -0.723031, 300, 0, 1), +(165925, 187989, 530, 1, 1, -106.606, 1106.62, 47.2494, 6.25021, 0, 0, 0.0164877, -0.999864, 300, 0, 1), +(165926, 187989, 530, 1, 1, -164.571, 1126.64, 50.9746, 1.11604, 0, 0, 0.52951, 0.848304, 300, 0, 1), +(165951, 187918, 530, 1, 1, -341.539, 1149.69, 41.516, 1.49258, 0, 0, 0.678919, 0.734213, 300, 0, 1), +(165952, 187989, 530, 1, 1, -346.156, 1149.88, 41.4797, 1.74469, 0, 0, 0.765839, 0.643032, 300, 0, 1), +(165953, 187918, 530, 1, 1, -312.724, 1109.74, 41.6732, 3.11521, 0, 0, 0.999913, 0.0131916, 300, 0, 1), +(165954, 187918, 530, 1, 1, -342.656, 1109.48, 41.8743, 3.19845, 0, 0, 0.999596, -0.0284273, 300, 0, 1), +(165955, 187918, 530, 1, 1, -364.933, 1103.83, 45.7432, 0.55952, 0, 0, 0.276125, 0.961122, 300, 0, 1), +(165956, 187989, 530, 1, 1, -370.16, 1104.04, 47.8775, 0.147176, 0, 0, 0.0735218, 0.997294, 300, 0, 1), +(165957, 187918, 530, 1, 1, -371.512, 1154.24, 44.431, 3.18689, 0, 0, 0.999744, -0.0226447, 300, 0, 1), +(165958, 187989, 530, 1, 1, -375.946, 1154.04, 45.4371, 3.18689, 0, 0, 0.999744, -0.0226447, 300, 0, 1), +(165959, 187918, 530, 1, 1, -311.412, 1157.12, 41.3469, 3.19238, 0, 0, 0.999678, -0.0253915, 300, 0, 1), +(165960, 187989, 530, 1, 1, -328.448, 1168.73, 41.6186, 3.31726, 0, 0, 0.996145, -0.0877198, 300, 0, 1), +(165961, 187918, 530, 1, 1, -366.923, 1194.76, 41.3963, 3.25757, 0, 0, 0.998319, -0.0579546, 300, 0, 1), +(165962, 187918, 530, 1, 1, -370.988, 1223.35, 38.3536, 5.61533, 0, 0, 0.327755, -0.944763, 300, 0, 1), +(165963, 187989, 530, 1, 1, -337.191, 1228.54, 37.9438, 4.89356, 0, 0, 0.640242, -0.768173, 300, 0, 1), +(165964, 187989, 530, 1, 1, -359.076, 1221.14, 38.6201, 0.0453942, 0, 0, 0.0226952, 0.999742, 300, 0, 1); +-- Add SAIs for the all the Ice Stones +-- Desolace +SET @Script := 18813400; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188134; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188134; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188134,1,0,0,62,0,100,0,9258,0,0,0,80,@Script,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 00 +(@Script,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script,9,1,0,0,0,100,0,1000,1000,0,0,12,26178,3,120000,0,0,0,8,0,0,0,-458.956787,2471.237061,106.895035,5.979829,'Actionlist - On action 1 - Summon Hailstone Lieutenant'), +(@Script,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script1 := 18813500; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188135; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188135; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script1; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188135,1,0,0,62,0,100,0,9259,0,0,0,80,@Script1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 01 +(@Script1,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script1,9,1,0,0,0,100,0,1000,1000,0,0,12,26178,3,120000,0,0,0,8,0,0,0,-441.233276,2451.243164,105.240685,2.942712,'Actionlist - On action 1 - Summon Hailstone Lieutenant'), +(@Script1,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script2 := 18813900; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188139; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188139; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script2; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188139,1,0,0,62,0,100,0,9260,0,0,0,80,@Script2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 02 +(@Script2,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script2,9,1,0,0,0,100,0,1000,1000,0,0,12,26178,3,120000,0,0,0,8,0,0,0,-463.070892,2454.063965,102.002838,0.519758,'Actionlist - On action 1 - Summon Hailstone Lieutenant'), +(@Script2,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Hailstone := 26178; +UPDATE `creature_template` SET `resistance3`=1000, `AIName`= 'SmartAI' WHERE `entry`=@Hailstone; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Hailstone; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Hailstone,0,0,0,0,0,100,0,7500,15000,15000,25000,11,5164,0,0,0,0,0,2,0,0,0,0,0,0,0,'Hailstone Lieutenant - IC - Cast Knockback'), +(@Hailstone,0,1,0,2,0,100,1,20,60,0,0,11,5276,0,0,0,0,0,2,0,0,0,0,0,0,0,'Hailstone Lieutenant - On HP %/20-60/ - Cast Freeze'), +(@Hailstone,0,2,0,4,0,100,1,0,0,0,0,1,0,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Hailstone Lieutenant - On aggro - Say text 0'); +-- Hailstone Lieutenant texts +DELETE FROM `creature_text` WHERE `entry`= @Hailstone; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@Hailstone,0,0,'You will not stop the Frost Lord from entering this world, mortal. The Tidehunter''s might will crush that of Ragnaros once and for all, leaving your land a frozen paradise!',12,0,100,1,2000,0,'Hailstone Lieutenant intro speech', 25372); +-- Missing spawns for Heretic Crystal Guards + fix creature_template data +SET @Guard := 26166; +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@Guard; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Guard; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Guard,0,0,0,4,0,100,0,0,0,0,0,11,7165,0,0,0,0,0,1,0,0,0,0,0,0,0,'Heretic Crystal Guard - On Aggro - Cast Battlestance'), +(@Guard,0,1,0,0,0,100,0,0,10000,20000,25000,11,7947,0,0,0,0,0,2,0,0,0,0,0,0,0,'Heretic Crystal Guard - IC - Localized Toxin'), +(@Guard,0,2,0,0,0,100,0,0,5000,5000,10000,11,9080,0,0,0,0,0,2,0,0,0,0,0,0,0,'Heretic Crystal Guard - IC - Cast Hamstring'), +(@Guard,0,3,0,0,0,100,0,3500,15000,15500,20000,11,11977,0,0,0,0,0,2,0,0,0,0,0,0,0,'Heretic Crystal Guard - IC - Cast Rend'); +DELETE FROM `creature` WHERE `guid` IN (165590,165591,165592,165593,165594,165595); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(165590, @Guard, 1, 1, 1, 0, 1, -475.005, 2420.72, 95.1794, 4.42751, 300, 30, 0, 46, 0, 1, 0, 0, 0), +(165591, @Guard, 1, 1, 1, 0, 1, -455.597, 2430.45, 98.5554, 1.74145, 300, 30, 0, 46, 0, 1, 0, 0, 0), +(165592, @Guard, 1, 1, 1, 0, 1, -462.329, 2445.08, 100.308, 0.379569, 300, 30, 0, 46, 0, 1, 0, 0, 0), +(165593, @Guard, 1, 1, 1, 0, 1, -444.525, 2455.68, 104.292, 5.14615, 300, 30, 0, 46, 0, 1, 0, 0, 0), +(165594, @Guard, 1, 1, 1, 0, 1, -465.311, 2461.88, 104.4, 5.86479, 300, 30, 0, 46, 0, 1, 0, 0, 0), +(165595, @Guard, 1, 1, 1, 0, 1, -482.672, 2389.5, 91.1305, 2.51664, 300, 30, 0, 46, 0, 1, 0, 0, 0); +-- Searing Gorge +SET @Script3 := 18814500; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188145; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188145; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script3; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188145,1,0,0,62,0,100,0,9266,0,0,0,80,@Script3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 03 +(@Script3,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script3,9,1,0,0,0,100,0,1000,1000,0,0,12,26214,3,120000,0,0,0,8,0,0,0,-6631.123047,-661.677856,234.803894,0.500000,'Actionlist - On action 1 - Summon Frigid Lieutenant'), +(@Script3,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script4 := 18814600; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188146; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188146; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script4; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188146,1,0,0,62,0,100,0,9267,0,0,0,80,@Script4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 04 +(@Script4,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script4,9,1,0,0,0,100,0,1000,1000,0,0,12,26214,3,120000,0,0,0,8,0,0,0,-6607.436035,-648.119690,235.142166,3.400006,'Actionlist - On action 1 - Summon Frigid Lieutenant'), +(@Script4,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script5 := 18814700; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188147; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188147; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script5; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188147,1,0,0,62,0,100,0,9268,0,0,0,80,@Script5,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 05 +(@Script5,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script5,9,1,0,0,0,100,0,1000,1000,0,0,12,26214,3,120000,0,0,0,8,0,0,0,-6620.220215,-631.247192,234.565582,4.944000,'Actionlist - On action 1 - Summon Frigid Lieutenant'), +(@Script5,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Frigid := 26214; +UPDATE `creature_template` SET `resistance3`=1000, `AIName`= 'SmartAI' WHERE `entry`=@Frigid; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Frigid; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Frigid,0,0,0,0,0,100,0,1000,5000,10000,11000,11,3131,0,0,0,0,0,2,0,0,0,0,0,0,0,'Frigid Lieutenant - IC - Cast Frost Breath'), +(@Frigid,0,1,0,4,0,100,1,0,0,0,0,1,0,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Frigid Lieutenant - On aggro - Say text 0'); +-- Frigid Lieutenant texts +DELETE FROM `creature_text` WHERE `entry`= @Frigid; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@Frigid,0,0,'You will not stop the Frost Lord from entering this world, mortal. The Tidehunter''s might will crush that of Ragnaros once and for all, leaving your land a frozen paradise!',12,0,100,1,2000,0,'Frigid Lieutenant intro speech',25372); +-- Ashenvale +SET @Script6 := 18804900; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188049; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188049; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script6; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188049,1,0,0,62,0,100,0,9213,0,0,0,80,@Script6,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 06 +(@Script6,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script6,9,1,0,0,0,100,0,1000,1000,0,0,12,26116,3,120000,0,0,0,8,0,0,0,4203.157227,1147.510376,8.549132,2.018310,'Actionlist - On action 1 - Summon Frostwave Lieutenant'), +(@Script6,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script7 := 18813700; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188137; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188137; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script7; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188137,1,0,0,62,0,100,0,9256,0,0,0,80,@Script7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 07 +(@Script7,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script7,9,1,0,0,0,100,0,1000,1000,0,0,12,26116,3,120000,0,0,0,8,0,0,0,4228.956055,1167.375854,8.095765,2.707110,'Actionlist - On action 1 - Summon Frostwave Lieutenant'), +(@Script7,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script8 := 18813800; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188138; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188138; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script8; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188138,1,0,0,62,0,100,0,9257,0,0,0,80,@Script8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 08 +(@Script8,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script8,9,1,0,0,0,100,0,1000,1000,0,0,12,26116,3,120000,0,0,0,8,0,0,0,4240.973145,1144.133179,10.043564,2.702398,'Actionlist - On action 1 - Summon Frostwave Lieutenant'), +(@Script8,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Frostwave := 26178; +UPDATE `creature_template` SET `resistance3`=1000,`AIName`= 'SmartAI' WHERE `entry`=@Frostwave; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Frostwave; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Frostwave,0,0,0,0,0,100,0,1000,5000,8000,9000,11,8056,0,0,0,0,0,2,0,0,0,0,0,0,0,'Frostwave Lieutenant - IC - Cast Frost Shock'), +(@Frostwave,0,1,0,0,0,100,0,6000,10000,10000,12000,11,122,0,0,0,0,0,2,0,0,0,0,0,0,0,'Frostwave Lieutenant - IC - Cast Frost Nova'), +(@Frostwave,0,2,0,4,0,100,1,0,0,0,0,1,0,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Frostwave Lieutenant - On aggro - Say text 0'); +-- Frostwave Lieutenant texts +DELETE FROM `creature_text` WHERE `entry`= @Frostwave; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@Frostwave,0,0,'You will not stop the Frost Lord from entering this world, mortal. The Tidehunter''s might will crush that of Ragnaros once and for all, leaving your land a frozen paradise!',12,0,100,1,2000,0,'Frostwave Lieutenant intro speech',25372); +-- Silithus +SET @Script9 := 18814800; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188148; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188148; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script9; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188148,1,0,0,62,0,100,0,9269,0,0,0,80,@Script9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 09 +(@Script9,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script9,9,1,0,0,0,100,0,1000,1000,0,0,12,26215,3,120000,0,0,0,8,0,0,0,-6439.836914,215.265793,5.144650,3.776884,'Actionlist - On action 1 - Summon Glacial Lieutenant'), +(@Script9,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script10 := 18814900; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188149; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188149; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script10; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188149,1,0,0,62,0,100,0,9271,0,0,0,80,@Script10,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 10 +(@Script10,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script10,9,1,0,0,0,100,0,1000,1000,0,0,12,26215,3,120000,0,0,0,8,0,0,0,-6424.708008,190.182739,7.241127,0.689485,'Actionlist - On action 1 - Summon Glacial Lieutenant'), +(@Script10,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script11 := 18815000; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188150; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188150; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script11; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188150,1,0,0,62,0,100,0,9272,0,0,0,80,@Script11,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 11 +(@Script11,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script11,9,1,0,0,0,100,0,1000,1000,0,0,12,26215,3,120000,0,0,0,8,0,0,0,-6395.992676,204.004852,4.293016,2.75155,'Actionlist - On action 1 - Summon Glacial Lieutenant'), +(@Script11,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Glacial := 26215; +UPDATE `creature_template` SET `resistance3`=1000, `AIName`= 'SmartAI' WHERE `entry`=@Glacial; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Glacial; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Glacial,0,0,0,0,0,100,0,1000,5000,8000,9000,11,15089,0,0,0,0,0,2,0,0,0,0,0,0,0,'Glacial Lieutenant - IC - Cast Frost Shock'), +(@Glacial,0,1,0,0,0,100,0,6000,10000,10000,12000,11,14907,0,0,0,0,0,2,0,0,0,0,0,0,0,'Glacial Lieutenant - IC - Cast Frost Nova'), +(@Glacial,0,2,0,4,0,100,1,0,0,0,0,1,0,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Glacial Lieutenant - On aggro - Say text 0'); +-- Glacial Lieutenant texts +DELETE FROM `creature_text` WHERE `entry`= @Glacial; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@Glacial,0,0,'You will not stop the Frost Lord from entering this world, mortal. The Tidehunter''s might will crush that of Ragnaros once and for all, leaving your land a frozen paradise!',12,0,100,1,2000,0,'Glacial Lieutenant intro speech',25372); +-- Stranglethorn vale +SET @Script12 := 18814300; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188143; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188143; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script12; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188143,1,0,0,62,0,100,0,9264,0,0,0,80,@Script12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 12 +(@Script12,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script12,9,1,0,0,0,100,0,1000,1000,0,0,12,26204,3,120000,0,0,0,8,0,0,0,-12199.167969,893.045044,1.343297,1.343297,'Actionlist - On action 1 - Summon Chillwind Lieutenant'), +(@Script12,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script13 := 18814400; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188144; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188144; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script13; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188144,1,0,0,62,0,100,0,9265,0,0,0,80,@Script13,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 13 +(@Script13,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script13,9,1,0,0,0,100,0,1000,1000,0,0,12,26204,3,120000,0,0,0,8,0,0,0,-12176.784180,860.724365,19.763479,-1.849757,'Actionlist - On action 1 - Summon Chillwind Lieutenant'), +(@Script13,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Chillwind := 26204; +UPDATE `creature_template` SET `resistance3`=1000,`AIName`= 'SmartAI' WHERE `entry`=@Chillwind; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Chillwind; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Chillwind,0,0,0,0,0,100,0,1000,5000,8000,9000,11,23115,0,0,0,0,0,2,0,0,0,0,0,0,0,'Chillwind Lieutenant - IC - Cast Frost Shock'), +(@Chillwind,0,1,0,0,0,100,0,10000,10000,12000,15000,11,6982,0,0,0,0,0,2,0,0,0,0,0,0,0,'Chillwind Lieutenant - IC - Cast Rend'), +(@Chillwind,0,2,0,4,0,100,1,0,0,0,0,1,0,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Chillwind Lieutenant - On aggro - Say text 0'); +-- Chillwind Lieutenant texts +DELETE FROM `creature_text` WHERE `entry`= @Chillwind; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@Chillwind,0,0,'You will not stop the Frost Lord from entering this world, mortal. The Tidehunter''s might will crush that of Ragnaros once and for all, leaving your land a frozen paradise!',12,0,100,1,2000,0,'Chillwind Lieutenant intro speech', 25372); +-- Hellfire Peninsula +SET @Script14 := 18815100; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188151; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188151; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script14; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188151,1,0,0,62,0,100,0,9273,0,0,0,80,@Script14,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 14 +(@Script14,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script14,9,1,0,0,0,100,0,1000,1000,0,0,12,26216,3,120000,0,0,0,8,0,0,0,-153.333008,1142.613159,41.497719,0.898327,'Actionlist - On action 1 - Summon Templar'), +(@Script14,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script15 := 18815200; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188152; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188152; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script15; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188152,1,0,0,62,0,100,0,9274,0,0,0,80,@Script15,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 15 +(@Script15,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script15,9,1,0,0,0,100,0,1000,1000,0,0,12,26216,3,120000,0,0,0,8,0,0,0,-349.365326,1135.743896,40.712578,2.448330,'Actionlist - On action 1 - Summon Templar'), +(@Script15,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script16 := 18815300; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188153; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188153; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script16; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188153,1,0,0,62,0,100,0,9275,0,0,0,80,@Script16,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 16 +(@Script16,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script16,9,1,0,0,0,100,0,1000,1000,0,0,12,26216,3,120000,0,0,0,8,0,0,0,-133.914488,1199.369141,41.514484,4.365863,'Actionlist - On action 1 - Summon Templar'), +(@Script16,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Script17 := 18815400; +UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=188154; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=188154; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script17; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(188154,1,0,0,62,0,100,0,9276,0,0,0,80,@Script17,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ice Stone - On gossip option select - Run script'), +-- Script 17 +(@Script17,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Actionlist - On action 0 - Close gossip'), +(@Script17,9,1,0,0,0,100,0,1000,1000,0,0,12,26216,3,120000,0,0,0,8,0,0,0,-355.553406,1204.580444,40.349644,1.815675,'Actionlist - On action 1 - Summon Templar'), +(@Script17,9,2,0,0,0,100,0,1000,1000,0,0,70,100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Linked with event 0 - Respawn object /make it reappear after 100 secs/'); +SET @Templar:= 26216; +UPDATE `creature_template` SET `resistance3`=1000,`AIName`= 'SmartAI' WHERE `entry`=@Templar; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Templar; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Templar,0,0,0,0,0,100,0,1000,5000,8000,9000,11,15089,0,0,0,0,0,2,0,0,0,0,0,0,0,'Templar - IC - Cast Frost Shock'), +(@Templar,0,1,0,0,0,100,0,6000,10000,10000,12000,11,14907,0,0,0,0,0,2,0,0,0,0,0,0,0,'Templar - IC - Cast Frost Nova'), +(@Templar,0,2,0,0,0,100,0,7500,15000,15000,25000,11,5164,0,0,0,0,0,2,0,0,0,0,0,0,0,'Templar - IC - Cast Knockback'), +(@Templar,0,3,0,4,0,100,1,0,0,0,0,1,0,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Templar - On aggro - Say text 0'); +-- Templar texts +DELETE FROM `creature_text` WHERE `entry`= @Templar; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(@Templar,0,0,'You will not stop the Frost Lord from entering this world, mortal. The Tidehunter''s might will crush that of Ragnaros once and for all, leaving your land a frozen paradise!',12,0,100,1,2000,0,'Templar intro speech', 25372); +-- Add missing Twillight units for Hellfire's Twilight camp + data + SAI support +DELETE FROM `creature` WHERE `guid` IN (165596, 165597, 165598, 165599, 165600, 165601, 165602, 165603, 165604, 165605, 165606, 165607, 165608, 165609, 165610, 165611, 165612, 165613, 165614, 165615, 165616); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(165596, 26222, 530, 1, 1, 0, 1, -145.864, 1132.05, 41.5023, 1.53449, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165597, 26222, 530, 1, 1, 0, 1, -143.941, 1162.68, 41.4552, 4.23704, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165598, 26222, 530, 1, 1, 0, 1, -159.973, 1194.15, 41.2539, 5.30047, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165599, 26222, 530, 1, 1, 0, 1, -140.188, 1196.53, 41.3586, 4.13494, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165600, 26222, 530, 1, 1, 0, 1, -111.405, 1132.85, 41.6071, 2.77148, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165601, 26222, 530, 1, 1, 0, 1, -357.383, 1135.48, 41.6245, 2.04735, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165602, 26222, 530, 1, 1, 0, 1, -368.085, 1156.21, 43.6638, 2.04735, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165603, 26222, 530, 1, 1, 0, 1, -368.382, 1184.77, 42.1961, 0.422359, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165604, 26222, 530, 1, 1, 0, 1, -343.397, 1204.57, 40.4944, 3.76894, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165605, 26222, 530, 1, 1, 0, 1, -371.037, 1107.27, 47.9595, 0.709027, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165606, 26222, 530, 1, 1, 0, 1, -147.599, 1102.24, 42.7401, 0.371305, 300, 30, 0, 3239, 6229, 1, 0, 0, 0), +(165607, 26223, 530, 1, 1, 0, 1, -142.396, 1110.21, 44.0022, 4.0454, 300, 30, 0, 3997, 0, 1, 0, 0, 0), +(165608, 26223, 530, 1, 1, 0, 1, -140.525, 1139.81, 41.4874, 3.79407, 300, 30, 0, 3997, 0, 1, 0, 0, 0), +(165609, 26223, 530, 1, 1, 0, 1, -119.467, 1135.69, 41.4797, 5.91936, 300, 30, 0, 3997, 0, 1, 0, 0, 0), +(165610, 26223, 530, 1, 1, 0, 1, -151.996, 1157.21, 41.473, 0.438849, 300, 30, 0, 3997, 0, 1, 0, 0, 0), +(165611, 26223, 530, 1, 1, 0, 1, -148.783, 1193.1, 41.2043, 1.53684, 300, 30, 0, 3997, 0, 1, 0, 0, 0), +(165612, 26223, 530, 1, 1, 0, 1, -368.17, 1110.18, 46.4436, 3.85612, 300, 30, 0, 3997, 0, 1, 0, 0, 0), +(165613, 26223, 530, 1, 1, 0, 1, -353.873, 1148.84, 41.5226, 4.61717, 300, 30, 0, 3997, 0, 1, 0, 0, 0), +(165614, 26223, 530, 1, 1, 0, 1, -367.485, 1169.15, 43.1463, 4.74676, 300, 30, 0, 3997, 0, 1, 0, 0, 0), +(165615, 26223, 530, 1, 1, 0, 1, -360.011, 1195.66, 41.1995, 4.1043, 300, 30, 0, 3997, 0, 1, 0, 0, 0), +(165616, 26223, 530, 1, 1, 0, 1, -348.858, 1207.35, 40.1246, 5.18501, 300, 30, 0, 3997, 0, 1, 0, 0, 0); +SET @Cryomancer:= 26222; +UPDATE `creature_template` SET `resistance3`=1000,`AIName`= 'SmartAI' WHERE `entry`=@Cryomancer; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Cryomancer; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Cryomancer,0,0,0,4,0,100,1,0,0,0,0,11,12544,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cryomancer - On aggro - Cast Frost Armor'), +(@Cryomancer,0,1,0,0,0,100,0,0,6000,3000,8000,11,9672,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cryomancer - IC - Cast Frostbolt'), +(@Cryomancer,0,2,0,0,0,100,0,6000,10000,10000,12000,11,11831,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cryomancer - IC - Cast Frost Nova'), +(@Cryomancer,0,3,0,25,0,100,0,0,0,0,0,28,12544,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cryomancer - On reset - Remove auras from frost armor'); +SET @Frostblade:= 26223; +UPDATE `creature_template` SET `resistance3`=1000,`AIName`= 'SmartAI' WHERE `entry`=@Frostblade; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Frostblade; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Frostblade,0,0,0,0,0,100,0,0,1000,120000,120000,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0,'Frostblade - IC - Cast Enrage'), +(@Frostblade,0,1,0,0,0,100,0,2500,12000,5000,15000,11,23600,0,0,0,0,0,2,0,0,0,0,0,0,0,'Frostblade - IC - Cast Piercing Howl'), +(@Frostblade,0,2,0,9,0,100,0,8,25,1000,2000,11,22911,0,0,0,0,0,2,0,0,0,0,0,0,0,'Frostblade - In Range - Charge'); +-- #19 +-- Fix quests Incense for Summer Scorchlings and Incense for Fire Scorchlings/Add SAI support for quest end event +SET @Scorchling:= 26520; +SET @ScorchlingA:= 26401; +SET @Talespinner:= 16818; +SET @Loremaster:= 16817; +SET @Script:= 2652000; +SET @Script1:= 2640100; +-- SAI for Telespinner +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@Talespinner; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Talespinner; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Talespinner,0,0,0,19,0,100,0,11966,0,0,0,15,11966,0,0,0,0,0,7,0,0,0,0,0,0,0,'Festival Talespinner - On target quest accepted - Call quest complete'); +-- SAI for Loremaster +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@Loremaster; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Loremaster; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Loremaster,0,0,0,19,0,100,0,11964,0,0,0,15,11964,0,0,0,0,0,7,0,0,0,0,0,0,0,'Festival Loremaster - On target quest accepted - Call quest complete'); +-- SAI Schorchling /Horde side/ +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@Scorchling; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Scorchling; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Scorchling,0,0,0,8,0,100,0,47104,0,0,0,80,@Script,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - On spell hit by Get Incense - Run script 00'), +(@Script,9,1,0,0,0,100,0,0,0,0,0,1,0,2000,0,0,0,0,21,3,0,0,0,0,0,0,'Actionlist - Action 1 - Say text 0'), +(@Script,9,2,0,0,0,100,0,1000,1000,0,0,1,8,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 2 - Say text 8'), +(@Script,9,3,0,0,0,100,0,2000,2000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 3 - Cast grow'), +(@Script,9,4,0,0,0,100,0,0,0,0,0,1,1,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 4 - Say text 1'), +(@Script,9,5,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 5 - Cast grow'), +(@Script,9,6,0,0,0,100,0,0,0,0,0,1,2,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 6 - Say text 2'), +(@Script,9,7,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 7 - Cast grow'), +(@Script,9,8,0,0,0,100,0,0,0,0,0,1,3,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 8 - Say text 3'), +(@Script,9,9,0,0,0,100,0,1000,1000,0,0,1,9,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 9 - Say text 9'), +(@Script,9,10,0,0,0,100,0,2000,2000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 10 - Cast grow'), +(@Script,9,11,0,0,0,100,0,0,0,0,0,1,4,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 11 - Say text 4'), +(@Script,9,12,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 12 - Cast grow'), +(@Script,9,13,0,0,0,100,0,0,0,0,0,1,5,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 13 - Say text 5'), +(@Script,9,14,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 14 - Cast grow'), +(@Script,9,15,0,0,0,100,0,0,0,0,0,1,6,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 15 - Say text 6'), +(@Script,9,16,0,0,0,100,0,0,0,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 16 - Cast grow'), +(@Script,9,17,0,0,0,100,0,0,0,0,0,1,10,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 17 - Say text 7'), +(@Script,9,18,0,0,0,100,0,0,0,0,0,11,45889,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 18 - Cast Scorchling Blast'), +(@Script,9,19,0,0,0,100,0,0,0,0,0,11,46660,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 19 - Cast Extinguished'), +(@Script,9,20,0,0,0,100,0,0,0,0,0,28,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 20 - Remove aura from grow'), +(@Script,9,21,0,0,0,100,0,3000,3000,0,0,1,7,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 21 - Say text 7'); +-- Scorchling texts +DELETE FROM `creature_text` WHERE `entry`= @Scorchling; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@Scorchling,0,0,'Thank you again, $N, for this delectable incense.',12,0,100,1,1000,0,'Scorchling event with incense', 25699), +(@Scorchling,1,0,'So good! So packed with energy!',12,0,100,1,1000,0,'Scorchling event with incense', 25718), +(@Scorchling,2,0,'It has everything a growing scorchling needs!',12,0,100,1,1000,0,'Scorchling event with incense', 25719), +(@Scorchling,3,0,'I can feel the power SURGING within me!',12,0,100,1,1000,0,'Scorchling event with incense', 25730), +(@Scorchling,4,0,'Now! Finally! Our plans can take effect!',12,0,100,1,1000,0,'Scorchling event with incense', 25721), +(@Scorchling,5,0,'KNEEL, LITTLE MORTAL! KNEEL BEFORE THE MIGHT OF THE HERALD OF RAGNAROS!',12,0,100,1,1000,0,'Scorchling event with incense', 25722), +(@Scorchling,6,0,'YOU WILL ALL PERISH IN FLAMES!',12,0,100,1,1000,0,'Scorchling event with incense', 25723), +(@Scorchling,7,0,'Ah. I was merely jesting...',12,0,100,1,1000,0,'Scorchling event with incense', 25725), +(@Scorchling,8,0,'%s devours the incense. It''s ravenous!',16,0,100,1,1000,0,'Scorchling event with incense', 25717), +(@Scorchling,9,0,'%s bellows with laughter!',16,0,100,1,1000,0,'Scorchling event with incense', 25720), +(@Scorchling,10,0,'%s blinks...',16,0,100,1,1000,0,'Scorchling event with incense', 25724); +-- SAI Schorchling /Alliance side/ +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ScorchlingA; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ScorchlingA; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script1; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ScorchlingA,0,0,0,8,0,100,0,47104,0,0,0,80,@Script1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - On spell hit by Get Incense - Run script 00'), +(@Script1,9,1,0,0,0,100,0,0,0,0,0,1,0,2000,0,0,0,0,21,3,0,0,0,0,0,0,'Actionlist - Action 1 - Say text 0'), +(@Script1,9,2,0,0,0,100,0,1000,1000,0,0,1,8,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 2 - Say text 8'), +(@Script1,9,3,0,0,0,100,0,2000,2000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 3 - Cast grow'), +(@Script1,9,4,0,0,0,100,0,0,0,0,0,1,1,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 4 - Say text 1'), +(@Script1,9,5,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 5 - Cast grow'), +(@Script1,9,6,0,0,0,100,0,0,0,0,0,1,2,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 6 - Say text 2'), +(@Script1,9,7,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 7 - Cast grow'), +(@Script1,9,8,0,0,0,100,0,0,0,0,0,1,3,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 8 - Say text 3'), +(@Script1,9,9,0,0,0,100,0,1000,1000,0,0,1,9,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 9 - Say text 9'), +(@Script1,9,10,0,0,0,100,0,2000,2000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 10 - Cast grow'), +(@Script1,9,11,0,0,0,100,0,0,0,0,0,1,4,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 11 - Say text 4'), +(@Script1,9,12,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 12 - Cast grow'), +(@Script1,9,13,0,0,0,100,0,0,0,0,0,1,5,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 13 - Say text 5'), +(@Script1,9,14,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 14 - Cast grow'), +(@Script1,9,15,0,0,0,100,0,0,0,0,0,1,6,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 15 - Say text 6'), +(@Script1,9,16,0,0,0,100,0,0,0,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 16 - Cast grow'), +(@Script1,9,17,0,0,0,100,0,0,0,0,0,1,10,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 17 - Say text 7'), +(@Script1,9,18,0,0,0,100,0,0,0,0,0,11,45889,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 18 - Cast Scorchling Blast'), +(@Script1,9,19,0,0,0,100,0,0,0,0,0,11,46660,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 19 - Cast Extinguished'), +(@Script1,9,20,0,0,0,100,0,0,0,0,0,28,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 20 - Remove aura from grow'), +(@Script1,9,21,0,0,0,100,0,3000,3000,0,0,1,7,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 21 - Say text 7'); +-- Scorchling texts /Alliance/ +DELETE FROM `creature_text` WHERE `entry`= @ScorchlingA; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextId`) VALUES +(@ScorchlingA,0,0,'Thank you again, $N, for this delectable incense.',12,0,100,1,1000,0,'Scorchling event with incense', 25699), +(@ScorchlingA,1,0,'So good! So packed with energy!',12,0,100,1,1000,0,'Scorchling event with incense', 25718), +(@ScorchlingA,2,0,'It has everything a growing scorchling needs!',12,0,100,1,1000,0,'Scorchling event with incense', 25719), +(@ScorchlingA,3,0,'I can feel the power SURGING within me!',12,0,100,1,1000,0,'Scorchling event with incense', 25730), +(@ScorchlingA,4,0,'Now! Finally! Our plans can take effect!',12,0,100,1,1000,0,'Scorchling event with incense', 25721), +(@ScorchlingA,5,0,'KNEEL, LITTLE MORTAL! KNEEL BEFORE THE MIGHT OF THE HERALD OF RAGNAROS!',12,0,100,1,1000,0,'Scorchling event with incense', 25722), +(@ScorchlingA,6,0,'YOU WILL ALL PERISH IN FLAMES!',12,0,100,1,1000,0,'Scorchling event with incense', 25723), +(@ScorchlingA,7,0,'Ah. I was merely jesting...',12,0,100,1,1000,0,'Scorchling event with incense', 25725), +(@ScorchlingA,8,0,'%s devours the incense. It''s ravenous!',16,0,100,1,1000,0,'Scorchling event with incense', 25717), +(@ScorchlingA,9,0,'%s bellows with laughter!',16,0,100,1,1000,0,'Scorchling event with incense', 25720), +(@ScorchlingA,10,0,'%s blinks...',16,0,100,1,1000,0,'Scorchling event with incense', 25724); +-- Add conditions for Scorchling Gets Incense spell +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47104; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,47104,0,1,31,0,3,26520,0,0,0,'','Scorching gets incense can only hit Scorchling /Horde side/'), +(13,1,47104,0,2,31,0,3,26401,0,0,0,'','Scorching gets incense can only hit Scorchling /Alliance side/'); + +DELETE FROM `creature_queststarter` WHERE `quest` IN (SELECT `quest` FROM `game_event_creature_quest`); +DELETE FROM `gameobject_queststarter` WHERE `quest` IN (SELECT `quest` FROM `game_event_gameobject_quest`); + +DELETE FROM `creature_equip_template` WHERE `CreatureID`=25962; +INSERT INTO `creature_equip_template` (`CreatureID`,`ID`,`itemID1`,`itemID2`,`itemID3`) VALUES +(25962,1,2200,0,0); + +DELETE FROM `game_event_gameobject` WHERE `guid` IN (21478,21479,21480,21481,21482,21484,21494,21495,21496,21497,21498,50680); + + + + + + + + + +DELETE FROM `creature` WHERE `guid` IN (86242,86243,86244,86245,86246,86247,86248,86249,86250,86251,86252,86253,86254,86255,86256,86258,86259,86260,86261,86262,86264,86265,86266,86267,86268,94777,94778,94779,94780,94781,94782,94783,94784,94785,94786,94787,94788,94789,94790,94791,94792,94793,94794,94795,94796,94797,94798,94799,94800,127340,127341,127342,127343,127344,127345,127346,127347,127348,127349,127350,127351,127352,127353,127354,127355,127356, 127358,127359, 127360, 127361, 127362, 127363, 127364,127365, 127366,127367,127368,127369); +DELETE FROM `game_event_gameobject` WHERE `guid` IN (17834,86242,86243,86244,86245,86246,86247,86248,86249,86250,86251,86252,86253,86254,86255,86256,86258,86259,86260,86261,86262,86264,86265,86266,86267,86268,94777,94778,94779,94780,94781,94782,94783,94784,94785,94786,94787,94788,94789,94790,94791,94792,94793,94794,94795,94796,94797,94798,94799,94800,127340,127341,127342,127343,127344,127345,127346,127347,127348,127349,127350,127351,127352,127353,127354,127355,127356, 127358,127359, 127360, 127361, 127362, 127363, 127364,127365, 127366,127367,127368,127369); +DELETE FROM `game_event_gameobject` WHERE `guid` IN (165112,165115,165116,165117,165118,165119,165120,165121,165009,165010,165012,165013,165014,165015,165016,165019,165020,165021,165022,165023,165024,165025,165026,165027,165028,165029,165030,165031,165032,165033,165070,165071,165072,165074,165075,165077,165078,165079,165080,165081,165105,165106,165054,165107,165055,165108,165056,165109,165057,165110,165058,165111,165059,165060,165062,165063,165064,165066,165067,165068,165069,165034,165038,165039,165040,165041,165042,165043,165044,165045,165046,165047,165048,165049,165050,165051,165052,165053,164974,164975,164976,164977,164978,164979,164980,164981,164982,164983,164984,164985,165408,164906,164907,164908,164909,164910,164911,164913,164914,164915,164916,164917,164918,164919,164920,164921,164922,164923,164924,164894,164895,164896,164897,164898,164899,164900,164901,164902,164903,164904,164905,164852,164853,164854,164855,164856,164857,164858,164859,164861,164862,164863,164864,164865,164866,164867,164868,164869,164870,165384,165383,164812,164813,164814,164815,164816,164817,164818,164819,164820,164821,164822,164823,164825,164826,164827,164775,164776,51596,52357,50996,50855,50750,50747,52277,52467,51350,50692,52548,52284,51349,6537,6538,6539,52517,50934,12654,12655,12656,12657,12658,21499,51791,50690,52560,52333,52329,52511,50740,50741,50869,52399,52334,21500,21501,21502,21503,21504,21505,65164,65166,65167,65168,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,164459,164460,164461,164462,164463,164464,164466,164468,164470,164473,164474,164476,164479,164480,164481,164482,164483,164507,164509,164510,164511,164512,164513,164514,164515,164516,164517,164518,164519,164520,164521,164522,164524,164525,164527,164528,164529,164530,164531,164532,164534,164535,164536,164537,164538,164539,164540,165334,164564,164565,164566,164567,164568,164571,164572,164573,164575,164577,164578,164579,164580,164581,164582,164583,164584,164608,164609,164610,164612,164613,164614,164615,164616,164617,164618,164620,164621,164622,164623,164624,164625,164626,164628,164629,164630,164631,164632,164633,164634,164635,164638,164639,164640,164641,164642,164643,164644,164668,164670,165359,164672,164673,164674,164675,164676,164677,164678,164679,164680,164681,164682,164683,164727,164728,164729,164730,164731,164732,164733,164735,164736,164737,164738,164739,164740,164741,164742,164707,164708,164711,164712,164713,164714,164715,164716,164717,164718,164719,164720,164721,164722,164723,164726,165145,165146,165147,165148,165149,165150,165151,165152,165153,165154,165156,165157,165160,165161,165162,165163,165164,165165,165166,165167,165168,165169,165170,165171,165172,165173,165174,165175,165176,165358,165177,165178,165179,165180,165181,165182,165183,165184,165185,165186,165187,165188,165189,165190,165191,165192,165193,165194,165195,165196,165197,165198,165199,165200,165201,165202,165203,165204,165205,165206,165208,165209,165210,165211,165212,165213,165214,165215,165216,165217,165218,165219,165220,165221,165222,165223,165224,165225,165226,165227,165229,165230,165231,165232,165233,165234,165235,165236,165237,165238,165239,165240,165241,165242,165243,165244,165245,165246,165247,165248,165249,165250,165251,165252,165253,165254,165255,165256,165257,165259,165260,165409,165410,165411,49313, 165412,165413,165414,165415,165416,165417,165418,165419,165420,165421,165422,165423,165424,165425,165426,165427,165428,165429,165430,165431,165432,165433,165434,165435,165436,165437,165438,165439,165440,165441,165442,165443,165444,165445,165446,165447,165448,165449,165450,165451,165452,165453,165454,165455,165456,165457,165458,165459,165460,165461,165462,165463,165464,165465,165466,165467,165468,165469,165470,165471,165472,165473,165474,165475,165476,165477,165478,165479,165480,165481,165482,165483,165484,165485,165509,165510,165511,165512,165513,165514,165515,165516,165517,165518,165519,165520,165521,165522,165523,165524,165525,165550,165551,165552,165553,165554,165555,165556,165557,165581,165582,165583,165607,165608,165609,165610,165612,165613,165614,165615,165616,165617,165618,165715,165723,165747,165748,165749,165773,165774,165800,165801,165802,165803,165827,165828,165829,165830,165831,165832,165833,165834,165835,165837,165838,165839,165840,165841,165842,165843,165844,165845,165846,165847,165848,165849,165850,165851,165852,165853,165854,165855,165856,165857,165858,165859,165860,165862,165886,165887,165888,165889,165890,165914,165915,165916,165917,165918,165919,165920,165921,165922,165923,165924,165925,165926,165951,165952,165953,165954,165955,165956,165957,165958,165959,165960,165961,165962,165963,165964); +INSERT INTO `game_event_gameobject` (`eventEntry`, `guid`) VALUES +(1, 165112), +(1, 165115), +(1, 165116), +(1, 165117), +(1, 165118), +(1, 165119), +(1, 165120), +(1, 165121), +(1, 165009), +(1, 165010), +(1, 165012), +(1, 165013), +(1, 165014), +(1, 165015), +(1, 165016), +(1, 165019), +(1, 165020), +(1, 165021), +(1, 165022), +(1, 165023), +(1, 165024), +(1, 165025), +(1, 165026), +(1, 165027), +(1, 165028), +(1, 165029), +(1, 165030), +(1, 165031), +(1, 165032), +(1, 165033), +(1, 165070), +(1, 165071), +(1, 165072), +(1, 165074), +(1, 165075), +(1, 165077), +(1, 165078), +(1, 165079), +(1, 165080), +(1, 165081), +(1, 165105), +(1, 165106), +(1, 165054), +(1, 165107), +(1, 165055), +(1, 165108), +(1, 165056), +(1, 165109), +(1, 165057), +(1, 165110), +(1, 165058), +(1, 165111), +(1, 165059), +(1, 165060), +(1, 165062), +(1, 165063), +(1, 165064), +(1, 165066), +(1, 165067), +(1, 165068), +(1, 165069), +(1, 165034), +(1, 165038), +(1, 165039), +(1, 165040), +(1, 165041), +(1, 165042), +(1, 165043), +(1, 165044), +(1, 165045), +(1, 165046), +(1, 165047), +(1, 165048), +(1, 165049), +(1, 165050), +(1, 165051), +(1, 165052), +(1, 165053), +(1, 164974), +(1, 164975), +(1, 164976), +(1, 164977), +(1, 164978), +(1, 164979), +(1, 164980), +(1, 164981), +(1, 164982), +(1, 164983), +(1, 164984), +(1, 164985), +(1, 165408), +(1, 164906), +(1, 164907), +(1, 164908), +(1, 164909), +(1, 164910), +(1, 164911), +(1, 164913), +(1, 164914), +(1, 164915), +(1, 164916), +(1, 164917), +(1, 164918), +(1, 164919), +(1, 164920), +(1, 164921), +(1, 164922), +(1, 164923), +(1, 164924), +(1, 164894), +(1, 164895), +(1, 164896), +(1, 164897), +(1, 164898), +(1, 164899), +(1, 164900), +(1, 164901), +(1, 164902), +(1, 164903), +(1, 164904), +(1, 164905), +(1, 164852), +(1, 164853), +(1, 164854), +(1, 164855), +(1, 164856), +(1, 164857), +(1, 164858), +(1, 164859), +(1, 164861), +(1, 164862), +(1, 164863), +(1, 164864), +(1, 164865), +(1, 164866), +(1, 164867), +(1, 164868), +(1, 164869), +(1, 164870), +(1, 165384), +(1, 165383), +(1, 164812), +(1, 164813), +(1, 164814), +(1, 164815), +(1, 164816), +(1, 164817), +(1, 164818), +(1, 164819), +(1, 164820), +(1, 164821), +(1, 164822), +(1, 164823), +(1, 164825), +(1, 164826), +(1, 164827), +(1, 164775), +(1, 164776), +(1, 51596), +(1, 52357), +(1, 50996), +(1, 50855), +(1, 50750), +(1, 50747), +(1, 52277), +(1, 52467), +(1, 51350), +(1, 50692), +(1, 52548), +(1, 52284), +(1, 51349), +(1, 6537), +(1, 6538), +(1, 6539), +(1, 52517), +(1, 50934), +(1, 12654), +(1, 12655), +(1, 12656), +(1, 12657), +(1, 12658), +(1, 21499), +(1, 51791), +(1, 50690), +(1, 52560), +(1, 52333), +(1, 52329), +(1, 52511), +(1, 50740), +(1, 50741), +(1, 50869), +(1, 52399), +(1, 52334), +(1, 21500), +(1, 21501), +(1, 21502), +(1, 21503), +(1, 21504), +(1, 21505), +(1, 65164), +(1, 65166), +(1, 65167), +(1, 65168), +(1, 65170), +(1, 65171), +(1, 65172), +(1, 65173), +(1, 65174), +(1, 65175), +(1, 65176), +(1, 65177), +(1, 65178), +(1, 65179), +(1, 65180), +(1, 164459), +(1, 164460), +(1, 164461), +(1, 164462), +(1, 164463), +(1, 164464), +(1, 164466), +(1, 164468), +(1, 164470), +(1, 164473), +(1, 164474), +(1, 164476), +(1, 164479), +(1, 164480), +(1, 164481), +(1, 164482), +(1, 164483), +(1, 164507), +(1, 164509), +(1, 164510), +(1, 164511), +(1, 164512), +(1, 164513), +(1, 164514), +(1, 164515), +(1, 164516), +(1, 164517), +(1, 164518), +(1, 164519), +(1, 164520), +(1, 164521), +(1, 164522), +(1, 164524), +(1, 164525), +(1, 164527), +(1, 164528), +(1, 164529), +(1, 164530), +(1, 164531), +(1, 164532), +(1, 164534), +(1, 164535), +(1, 164536), +(1, 164537), +(1, 164538), +(1, 164539), +(1, 164540), +(1, 165334), +(1, 164564), +(1, 164565), +(1, 164566), +(1, 164567), +(1, 164568), +(1, 164571), +(1, 164572), +(1, 164573), +(1, 164575), +(1, 164577), +(1, 164578), +(1, 164579), +(1, 164580), +(1, 164581), +(1, 164582), +(1, 164583), +(1, 164584), +(1, 164608), +(1, 164609), +(1, 164610), +(1, 164612), +(1, 164613), +(1, 164614), +(1, 164615), +(1, 164616), +(1, 164617), +(1, 164618), +(1, 164620), +(1, 164621), +(1, 164622), +(1, 164623), +(1, 164624), +(1, 164625), +(1, 164626), +(1, 164628), +(1, 164629), +(1, 164630), +(1, 164631), +(1, 164632), +(1, 164633), +(1, 164634), +(1, 164635), +(1, 164638), +(1, 164639), +(1, 164640), +(1, 164641), +(1, 164642), +(1, 164643), +(1, 164644), +(1, 164668), +(1, 164670), +(1, 165359), +(1, 164672), +(1, 164673), +(1, 164674), +(1, 164675), +(1, 164676), +(1, 164677), +(1, 164678), +(1, 164679), +(1, 164680), +(1, 164681), +(1, 164682), +(1, 164683), +(1, 164727), +(1, 164728), +(1, 164729), +(1, 164730), +(1, 164731), +(1, 164732), +(1, 164733), +(1, 164735), +(1, 164736), +(1, 164737), +(1, 164738), +(1, 164739), +(1, 164740), +(1, 164741), +(1, 164742), +(1, 164707), +(1, 164708), +(1, 164711), +(1, 164712), +(1, 164713), +(1, 164714), +(1, 164715), +(1, 164716), +(1, 164717), +(1, 164718), +(1, 164719), +(1, 164720), +(1, 164721), +(1, 164722), +(1, 164723), +(1, 164726), +(1, 165145), +(1, 165146), +(1, 165147), +(1, 165148), +(1, 165149), +(1, 165150), +(1, 165151), +(1, 165152), +(1, 165153), +(1, 165154), +(1, 165156), +(1, 165157), +(1, 165160), +(1, 165161), +(1, 165162), +(1, 165163), +(1, 165164), +(1, 165165), +(1, 165166), +(1, 165167), +(1, 165168), +(1, 165169), +(1, 165170), +(1, 165171), +(1, 165172), +(1, 165173), +(1, 165174), +(1, 165175), +(1, 165176), +(1, 165358), +(1, 165177), +(1, 165178), +(1, 165179), +(1, 165180), +(1, 165181), +(1, 165182), +(1, 165183), +(1, 165184), +(1, 165185), +(1, 165186), +(1, 165187), +(1, 165188), +(1, 165189), +(1, 165190), +(1, 165191), +(1, 165192), +(1, 165193), +(1, 165194), +(1, 165195), +(1, 165196), +(1, 165197), +(1, 165198), +(1, 165199), +(1, 165200), +(1, 165201), +(1, 165202), +(1, 165203), +(1, 165204), +(1, 165205), +(1, 165206), +(1, 165208), +(1, 165209), +(1, 165210), +(1, 165211), +(1, 165212), +(1, 165213), +(1, 165214), +(1, 165215), +(1, 165216), +(1, 165217), +(1, 165218), +(1, 165219), +(1, 165220), +(1, 165221), +(1, 165222), +(1, 165223), +(1, 165224), +(1, 165225), +(1, 165226), +(1, 165227), +(1, 165229), +(1, 165230), +(1, 165231), +(1, 165232), +(1, 165233), +(1, 165234), +(1, 165235), +(1, 165236), +(1, 165237), +(1, 165238), +(1, 165239), +(1, 165240), +(1, 165241), +(1, 165242), +(1, 165243), +(1, 165244), +(1, 165245), +(1, 165246), +(1, 165247), +(1, 165248), +(1, 165249), +(1, 165250), +(1, 165251), +(1, 165252), +(1, 165253), +(1, 165254), +(1, 165255), +(1, 165256), +(1, 165257), +(1, 165259), +(1, 165260), +(1, 165409), +(1, 165410), +(1, 165411), +(1, 49313), +(1, 165412), +(1, 165413), +(1, 165414), +(1, 165415), +(1, 165416), +(1, 165417), +(1, 165418), +(1, 165419), +(1, 165420), +(1, 165421), +(1, 165422), +(1, 165423), +(1, 165424), +(1, 165425), +(1, 165426), +(1, 165427), +(1, 165428), +(1, 165429), +(1, 165430), +(1, 165431), +(1, 165432), +(1, 165433), +(1, 165434), +(1, 165435), +(1, 165436), +(1, 165437), +(1, 165438), +(1, 165439), +(1, 165440), +(1, 165441), +(1, 165442), +(1, 165443), +(1, 165444), +(1, 165445), +(1, 165446), +(1, 165447), +(1, 165448), +(1, 165449), +(1, 165450), +(1, 165451), +(1, 165452), +(1, 165453), +(1, 165454), +(1, 165455), +(1, 165456), +(1, 165457), +(1, 165458), +(1, 165459), +(1, 165460), +(1, 165461), +(1, 165462), +(1, 165463), +(1, 165464), +(1, 165465), +(1, 165466), +(1, 165467), +(1, 165468), +(1, 165469), +(1, 165470), +(1, 165471), +(1, 165472), +(1, 165473), +(1, 165474), +(1, 165475), +(1, 165476), +(1, 165477), +(1, 165478), +(1, 165479), +(1, 165480), +(1, 165481), +(1, 165482), +(1, 165483), +(1, 165484), +(1, 165485), +(1, 165509), +(1, 165510), +(1, 165511), +(1, 165512), +(1, 165513), +(1, 165514), +(1, 165515), +(1, 165516), +(1, 165517), +(1, 165518), +(1, 165519), +(1, 165520), +(1, 165521), +(1, 165522), +(1, 165523), +(1, 165524), +(1, 165525), +(1, 165550), +(1, 165551), +(1, 165552), +(1, 165553), +(1, 165554), +(1, 165555), +(1, 165556), +(1, 165557), +(1, 165581), +(1, 165582), +(1, 165583), +(1, 165607), +(1, 165608), +(1, 165609), +(1, 165610), +(1, 165612), +(1, 165613), +(1, 165614), +(1, 165615), +(1, 165616), +(1, 165617), +(1, 165618), +(1, 165715), +(1, 165723), +(1, 165747), +(1, 165748), +(1, 165749), +(1, 165773), +(1, 165774), +(1, 165800), +(1, 165801), +(1, 165802), +(1, 165803), +(1, 165827), +(1, 165828), +(1, 165829), +(1, 165830), +(1, 165831), +(1, 165832), +(1, 165833), +(1, 165834), +(1, 165835), +(1, 165837), +(1, 165838), +(1, 165839), +(1, 165840), +(1, 165841), +(1, 165842), +(1, 165843), +(1, 165844), +(1, 165845), +(1, 165846), +(1, 165847), +(1, 165848), +(1, 165849), +(1, 165850), +(1, 165851), +(1, 165852), +(1, 165853), +(1, 165854), +(1, 165855), +(1, 165856), +(1, 165857), +(1, 165858), +(1, 165859), +(1, 165860), +(1, 165862), +(1, 165886), +(1, 165887), +(1, 165888), +(1, 165889), +(1, 165890), +(1, 165914), +(1, 165915), +(1, 165916), +(1, 165917), +(1, 165918), +(1, 165919), +(1, 165920), +(1, 165921), +(1, 165922), +(1, 165923), +(1, 165924), +(1, 165925), +(1, 165926), +(1, 165951), +(1, 165952), +(1, 165953), +(1, 165954), +(1, 165955), +(1, 165956), +(1, 165957), +(1, 165958), +(1, 165959), +(1, 165960), +(1, 165961), +(1, 165962), +(1, 165963), +(1, 165964); + +DELETE FROM `game_event_creature` WHERE `guid` IN (86242,86243,86244,86245,86246,86247,86248,86249,86250,86251,86252,86253,86254,86255,86256,86258,86259,86260,86261,86262,86264,86265,86266,86267,86268,94777,94778,94779,94780,94781,94782,94783,94784,94785,94786,94787,94788,94789,94790,94791,94792,94793,94794,94795,94796,94797,94798,94799,94800,127340,127341,127342,127343,127344,127345,127346,127347,127348,127349,127350,127351,127352,127353,127354,127355,127356,127358,127359,127360,127361,127362,127363,127364,127365,127366,127367,127368,127369,94696,94723,94698,94724,94513,86426,202758,94710,94518,94656,94694,11001,11002,209666,209667,209668,209669,209670,209673,209675,209925,209926,209927,209928,209929,209930,210411,210412,210413,210414,210415,210416,210420,210425,210426,210427,210428,210429,210677,210682,210683,210684,210685,210686,210944,210946,210947,210948,210949,210950,210951,210982,210983,210984,210985,211249,211256,211257,211258,211259,211260,211261,211540,211541,211542,211543,211544,211545,211546,211513,211520,211521,211522,211523,211524,211790,211791,211792,211793,211794,211797,212038,212039,212040,212041,212042,212043,212289,212290,212291,212292,212293,212295,212536,212537,212538,212539,212540,212541,212598,212599,212600,212601,212602,212603,212604,212847,212848,212849,212850,212851,212852,213103,213104,213105,213106,213108,213109,213113,213114,213115,213116,213117,213118,85192,85193,85194,85195,85196,85197,213096,213097,213098,213099,213100,213101,78648,78649,78650,78651,78652,213720,213727,213728,213729,213731,213732,213733,213737,213738,213739,213740,213741,213742,213746,213747,213748,213749,213751,213752,213790,213791,213792,213793,213794,213795,213796,213797,213798,213799,213800,213801,213802,213803,213804,213805,213806,213807,213808,213809,213810,213811,213812,213813,213814,213815,213816,213817,152327,152328,152329,152330,152331,152332,152333,152334,152335,152336,152337,152338,152339,152340,152341,152342,152343,152344,152345,152346,152347,152348,152349,152350,152351,152352,152353,152354,152355,152356,152357,152358,152359,152360,152361,152362,152363,152364,152365,152366,152367,152368,152369,152370,152371,152372,152373,152374,152375,152376,152377,152378,152379,152380,152381,152382,152383,152384,152385,152386,152387,152388,152389,152390,152391,152392,152393,152394,152395,152396,152397,152398,152399,152400,152401,152402,152403,152404,152405,152406,152407,152408,165584,165585,165586,165587,165588,165589,94739, 165590,165591,165592,165593,165594,165595,165596,165597,165598,165599,165600,165601,165602,165603,165604,165605,165606,165607,165608,165609,165610,165611,165612,165613,165614,165615,165616); +INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES +(1, 94696), +(1, 94723), +(1, 94698), +(1, 94724), +(1, 94513), +(1, 86426), +(1, 202758), +(1, 94710), +(1, 94518), +(1, 94656), +(1, 94694), +(1, 11001), +(1, 11002), +(1, 209666), +(1, 209667), +(1, 209668), +(1, 209669), +(1, 209670), +(1, 209673), +(1, 209675), +(1, 209925), +(1, 209926), +(1, 209927), +(1, 209928), +(1, 209929), +(1, 209930), +(1, 210411), +(1, 210412), +(1, 210413), +(1, 210414), +(1, 210415), +(1, 210416), +(1, 210420), +(1, 210425), +(1, 210426), +(1, 210427), +(1, 210428), +(1, 210429), +(1, 210677), +(1, 210682), +(1, 210683), +(1, 210684), +(1, 210685), +(1, 210686), +(1, 210944), +(1, 210946), +(1, 210947), +(1, 210948), +(1, 210949), +(1, 210950), +(1, 210951), +(1, 210982), +(1, 210983), +(1, 210984), +(1, 210985), +(1, 211249), +(1, 211256), +(1, 211257), +(1, 211258), +(1, 211259), +(1, 211260), +(1, 211261), +(1, 211540), +(1, 211541), +(1, 211542), +(1, 211543), +(1, 211544), +(1, 211545), +(1, 211546), +(1, 211513), +(1, 211520), +(1, 211521), +(1, 211522), +(1, 211523), +(1, 211524), +(1, 211790), +(1, 211791), +(1, 211792), +(1, 211793), +(1, 211794), +(1, 211797), +(1, 212038), +(1, 212039), +(1, 212040), +(1, 212041), +(1, 212042), +(1, 212043), +(1, 212289), +(1, 212290), +(1, 212291), +(1, 212292), +(1, 212293), +(1, 212295), +(1, 212536), +(1, 212537), +(1, 212538), +(1, 212539), +(1, 212540), +(1, 212541), +(1, 212598), +(1, 212599), +(1, 212600), +(1, 212601), +(1, 212602), +(1, 212603), +(1, 212604), +(1, 212847), +(1, 212848), +(1, 212849), +(1, 212850), +(1, 212851), +(1, 212852), +(1, 213103), +(1, 213104), +(1, 213105), +(1, 213106), +(1, 213108), +(1, 213109), +(1, 213113), +(1, 213114), +(1, 213115), +(1, 213116), +(1, 213117), +(1, 213118), +(1, 85192), +(1, 85193), +(1, 85194), +(1, 85195), +(1, 85196), +(1, 85197), +(1, 213096), +(1, 213097), +(1, 213098), +(1, 213099), +(1, 213100), +(1, 213101), +(1, 78648), +(1, 78649), +(1, 78650), +(1, 78651), +(1, 78652), +(1, 213720), +(1, 213727), +(1, 213728), +(1, 213729), +(1, 213731), +(1, 213732), +(1, 213733), +(1, 213737), +(1, 213738), +(1, 213739), +(1, 213740), +(1, 213741), +(1, 213742), +(1, 213746), +(1, 213747), +(1, 213748), +(1, 213749), +(1, 213751), +(1, 213752), +(1, 213790), +(1, 213791), +(1, 213792), +(1, 213793), +(1, 213794), +(1, 213795), +(1, 213796), +(1, 213797), +(1, 213798), +(1, 213799), +(1, 213800), +(1, 213801), +(1, 213802), +(1, 213803), +(1, 213804), +(1, 213805), +(1, 213806), +(1, 213807), +(1, 213808), +(1, 213809), +(1, 213810), +(1, 213811), +(1, 213812), +(1, 213813), +(1, 213814), +(1, 213815), +(1, 213816), +(1, 213817), +(1, 152327), +(1, 152328), +(1, 152329), +(1, 152330), +(1, 152331), +(1, 152332), +(1, 152333), +(1, 152334), +(1, 152335), +(1, 152336), +(1, 152337), +(1, 152338), +(1, 152339), +(1, 152340), +(1, 152341), +(1, 152342), +(1, 152343), +(1, 152344), +(1, 152345), +(1, 152346), +(1, 152347), +(1, 152348), +(1, 152349), +(1, 152350), +(1, 152351), +(1, 152352), +(1, 152353), +(1, 152354), +(1, 152355), +(1, 152356), +(1, 152357), +(1, 152358), +(1, 152359), +(1, 152360), +(1, 152361), +(1, 152362), +(1, 152363), +(1, 152364), +(1, 152365), +(1, 152366), +(1, 152367), +(1, 152368), +(1, 152369), +(1, 152370), +(1, 152371), +(1, 152372), +(1, 152373), +(1, 152374), +(1, 152375), +(1, 152376), +(1, 152377), +(1, 152378), +(1, 152379), +(1, 152380), +(1, 152381), +(1, 152382), +(1, 152383), +(1, 152384), +(1, 152385), +(1, 152386), +(1, 152387), +(1, 152388), +(1, 152389), +(1, 152390), +(1, 152391), +(1, 152392), +(1, 152393), +(1, 152394), +(1, 152395), +(1, 152396), +(1, 152397), +(1, 152398), +(1, 152399), +(1, 152400), +(1, 152401), +(1, 152402), +(1, 152403), +(1, 152404), +(1, 152405), +(1, 152406), +(1, 152407), +(1, 152408), +(1, 165584), +(1, 165585), +(1, 165586), +(1, 165587), +(1, 165588), +(1, 165589), +(1, 94739), +(1, 165590), +(1, 165591), +(1, 165592), +(1, 165593), +(1, 165594), +(1, 165595), +(1, 165596), +(1, 165597), +(1, 165598), +(1, 165599), +(1, 165600), +(1, 165601), +(1, 165602), +(1, 165603), +(1, 165604), +(1, 165605), +(1, 165606), +(1, 165607), +(1, 165608), +(1, 165609), +(1, 165610), +(1, 165611), +(1, 165612), +(1, 165613), +(1, 165614), +(1, 165615), +(1, 165616); diff --git a/sql/updates/world/3.3.5/2016_06_23_00_world.sql b/sql/updates/world/3.3.5/2016_06_23_00_world.sql new file mode 100644 index 00000000000..49ec67454a3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_23_00_world.sql @@ -0,0 +1,50 @@ +-- +SET @OGUID := 85065; -- 32 Required +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID AND @OGUID+31; +INSERT INTO `gameobject` (`guid`, `id`, `map`,`zoneId`,`areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`,`VerifiedBuild`) VALUES +(@OGUID,181371,1,0,0,1,1,1916.260620, -4339.434082, 21.460556, 2.969551,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+1,181371,1,0,0,1,1,1913.254395, -4333.927246, 21.604612, 4.351851,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+2,181371,1,0,0,1,1,1907.401245, -4337.044434, 21.677332, 6.107213,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+3,181371,1,0,0,1,1,1910.640137, -4342.747070, 21.676716, 5.887306,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+4,181371,1,0,0,1,1,-1028.846680, 293.187408, 135.844879, 1.204641,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+5,181371,1,0,0,1,1,-1030.881104, 297.332916, 136.117874, 6.148724,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+6,181371,1,0,0,1,1,-1027.052002, 299.510010, 136.164764, 4.558297,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+7,181371,1,0,0,1,1,-1024.677979, 295.472260, 136.143784, 3.823951,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+8,181371,1,0,0,1,1,8695.066406, 932.137634, 15.345254, 6.110,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+10,181371,1,0,0,1,1,8700.012695, 936.332153, 14.836842, 4.664,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+9,181371,1,0,0,1,1,8704.493164, 931.790894, 15.463143, 3.133,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+11,181371,1,0,0,1,1,8700.567383, 927.612854, 15.892158, 1.338,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+12,181371,0,0,0,1,1,-8833.281250, 855.614441, 99.411079, 2.575616,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+13,181371,0,0,0,1,1,-8834.824219, 861.003784, 99.434731, 3.883833,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+14,181371,0,0,0,1,1,-8840.805664, 860.021912, 99.391479, 4.602470,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+15,181371,0,0,0,1,1,-8839.428711, 853.691956, 99.298836, 0.486980,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+16,181371,0,0,0,1,1,-4701.214355, -1219.862183, 502.268250, 4.783111,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+17,181371,0,0,0,1,1,-4696.379395, -1224.597412, 502.304504, 2.941357,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+18,181371,0,0,0,1,1,-4702.767090, -1228.114258, 502.267609, 1.284167,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+19,181371,0,0,0,1,1,-4704.313477, -1222.943359, 502.269287, 1.830019,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+20,181371,0,0,0,1,1,1825.027954, 221.371674, 60.629555, 3.934886,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+21,181371,0,0,0,1,1,1823.459106, 214.621674, 60.507618, 2.686104,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+22,181371,0,0,0,1,1,1818.975342, 216.522690, 60.553699, 1.229190,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+23,181371,0,0,0,1,1,1819.281616, 221.073471, 60.566326, 5.925872,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+24,181371,530,0,0,1,1,9806.342773, -7244.069336, 26.683933, 1.731536,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+25,181371,530,0,0,1,1,9809.258789, -7237.612793, 26.686577, 2.387343,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+26,181371,530,0,0,1,1,9803.005859, -7236.524902, 26.655304, 3.757864,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+27,181371,530,0,0,1,1,9802.109375, -7242.179688, 26.474823, 5.874507,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+28,181371,530,0,0,1,1,-3790.196777, -11504.259766, -134.122711, 2.506965,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+29,181371,530,0,0,1,1,-3791.924805, -11498.497070, -134.097641, 4.148447,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+30,181371,530,0,0,1,1,-3797.747803, -11500.220703, -134.086700, 5.915591,0,0,0.945519,0.325568,180,100,0,0), +(@OGUID+31,181371,530,0,0,1,1,-3793.995361, -11506.169922, -134.113098, 6.198332,0,0,0.945519,0.325568,180,100,0,0); +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+31 AND `eventEntry`=1; +INSERT INTO `game_event_gameobject` SELECT 1, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+31; + +DELETE FROM `gameobject` WHERE `guid` IN (49312,165383,164812,164813,164814,164815,164816,164817,164818,164819,164820,164821,164822,164823,164825,164826,164827); +DELETE FROM `gameobject` WHERE `guid` IN (164906,164907,164908,164909,164910,164911,164913,164914,164915,164916,164917,164918,164919,164920,164921,164922,164923,164924); +DELETE FROM `game_event_gameobject` WHERE `guid` IN (49312,165383,164812,164813,164814,164815,164816,164817,164818,164819,164820,164821,164822,164823,164825,164826,164827); +DELETE FROM `game_event_gameobject` WHERE `guid` IN (164906,164907,164908,164909,164910,164911,164913,164914,164915,164916,164917,164918,164919,164920,164921,164922,164923,164924); +UPDATE `creature` SET `position_x`=1008.565002, `position_y`=-1452.775513, `position_z`=61.660973, `orientation`=5.272540 WHERE `guid`=212043; +UPDATE `gameobject` SET `position_x`=989.562012, `position_y`=-1453.469971, `position_z`=61.001099, `orientation`=4.9105 WHERE `guid`=17857; +UPDATE `gameobject` SET `position_x`=988.2767, `position_y`=-1440.3270, `position_z`=64.52133 WHERE `guid`=17853; +UPDATE `gameobject` SET `position_x`=984.8693, `position_y`=-1445.037, `position_z`=63.92835 WHERE `guid`=17860; +UPDATE `gameobject` SET `position_x`=-4223.839844, `position_y`=-12318.400391, `position_z`=2.47695 WHERE `guid`=165454; +UPDATE `creature` SET `position_x`=-4223.839844, `position_y`=-12318.400391, `position_z`=2.47695 WHERE `guid`=152373; +UPDATE `creature` SET `position_x`=-4217.176, `position_y`=-12309.458008, `position_z`=2.144819, `orientation`=5.988677 WHERE `guid`=212603; diff --git a/sql/updates/world/3.3.5/2016_06_25_00_world.sql b/sql/updates/world/3.3.5/2016_06_25_00_world.sql new file mode 100644 index 00000000000..f1337038533 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_25_00_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template` SET `unit_flags`=2147746560 WHERE `entry` BETWEEN 33608 AND 33615; +UPDATE `creature_template_addon` SET `auras`="28782" WHERE `entry` BETWEEN 33608 AND 33615; diff --git a/sql/updates/world/3.3.5/2016_06_25_01_world.sql b/sql/updates/world/3.3.5/2016_06_25_01_world.sql new file mode 100644 index 00000000000..a318c821fb9 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_25_01_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature_template` SET `unit_flags`=33554944 WHERE `entry`=20143; +DELETE FROM `smart_scripts` WHERE `entryorguid`=20143; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20143,0,0,0,25,0,100,0,0,0,0,0,3,0,18684,0,0,0,0,1,0,0,0,0,0,0,0,"Void Spawner - Quest - Warp Rifts - On Reset - Change modelID"), +(20143,0,1,0,1,0,100,0,2000,5000,15000,23000,11,34943,0,0,0,0,0,1,0,0,0,0,0,0,0,"Void Spawner - Quest - Warp Rifts - Out of Combat - Cast 'Summon Unstable Voidwalker' (No Repeat)"); diff --git a/sql/updates/world/3.3.5/2016_06_25_02_world.sql b/sql/updates/world/3.3.5/2016_06_25_02_world.sql new file mode 100644 index 00000000000..cf4e814d813 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_25_02_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `creature_template` SET `unit_flags`=2147746560 WHERE `entry` IN (33616, 33617, 33618, 33619, 33621, 33623); +UPDATE `creature_template_addon` SET `auras`="28782" WHERE `entry` IN (33616, 33617, 33618, 33619, 33621, 33623); diff --git a/sql/updates/world/3.3.5/2016_06_25_03_world.sql b/sql/updates/world/3.3.5/2016_06_25_03_world.sql new file mode 100644 index 00000000000..d193f38a922 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_25_03_world.sql @@ -0,0 +1,19 @@ +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=19440 AND `id`=0; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=38530 AND `ElseGroup`>0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 38530, 0, 1, 31, 0, 3, 16873, 0, 0, 0, 0, '', NULL), +(13, 1, 38530, 0, 2, 31, 0, 3, 16907, 0, 0, 0, 0, '', NULL), +(13, 1, 38530, 0, 3, 31, 0, 3, 19422, 0, 0, 0, 0, '', NULL), +(13, 1, 38530, 0, 3, 31, 0, 3, 19424, 0, 0, 0, 0, '', NULL); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=16873 AND `source_type`=0 AND `id`=17; +DELETE FROM `smart_scripts` WHERE `entryorguid`=16907 AND `source_type`=0 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid`=19422 AND `source_type`=0 AND `id`=15; +DELETE FROM `smart_scripts` WHERE `entryorguid`=19424 AND `source_type`=0 AND `id`=4; + +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(16873, 0, 17, 0, 8, 0, 100, 1, 38530, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Bleeding Hollow Dark Shaman - On Spellhit - Start Attack'), +(16907, 0, 1, 0, 8, 0, 100, 1, 38530, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Bleeding Hollow Peon - On Spellhit - Start Attack'), +(19422, 0, 15, 0, 8, 0, 100, 1, 38530, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Bleeding Hollow Necrolyte - On Spellhit - Start Attack'), +(19424, 0, 4, 0, 8, 0, 100, 1, 38530, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Bleeding Hollow Tormentor - On Spellhit - Start Attack'); diff --git a/sql/updates/world/3.3.5/2016_06_26_00_world.sql b/sql/updates/world/3.3.5/2016_06_26_00_world.sql new file mode 100644 index 00000000000..1551f6a646e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_26_00_world.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `unit_flags`=64 WHERE `entry`=25740; +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=45947; +DELETE FROM `creature_template_addon` WHERE `entry`=25754; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(25754,0,0,1,1,0,NULL); diff --git a/sql/updates/world/3.3.5/2016_06_26_01_world.sql b/sql/updates/world/3.3.5/2016_06_26_01_world.sql new file mode 100644 index 00000000000..b9ab8f12a54 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_26_01_world.sql @@ -0,0 +1,10 @@ +-- Link Dancer Check Aura and Visual to Ribbon Pole Channel +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (29531,45390); +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(29531,45390,0, 'Ribbon Pole - Dancer Check Aura'), +(45390,45406,2, 'Ribbon Pole - Periodic Visual'); + +-- Spell Script +DELETE FROM `spell_script_names` WHERE `spell_id`=45390; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(45390, 'spell_gen_ribbon_pole_dancer_check'); diff --git a/sql/updates/world/3.3.5/2016_06_26_02_world.sql b/sql/updates/world/3.3.5/2016_06_26_02_world.sql new file mode 100644 index 00000000000..0e5064b33c1 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_26_02_world.sql @@ -0,0 +1,8 @@ +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(25342,25343) AND `source_type`=0 AND `id`>2; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid` IN(25342,25343) AND `source_type`=0 AND `id`=2 AND `link`=3; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25342, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 50, 182071, 30, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Guard - On Spellhit \'Ragefist\'s Torch\' - Spawn GO Small Chapel Fire'), +(25343, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 50, 182071, 30, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Worker - On Spellhit \'Ragefist\'s Torch\' - Spawn GO Small Chapel Fire'), +(25342, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 30000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Guard - On Spellhit \'Ragefist\'s Torch\' - Despawn after 30 seconds'), +(25343, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 30000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dead Caravan Worker - On Spellhit \'Ragefist\'s Torch\' - Despawn after 30 seconds'); +UPDATE `creature_template_addon` SET `auras`='48602' WHERE `entry`=27292; diff --git a/sql/updates/world/3.3.5/2016_06_27_00_world.sql b/sql/updates/world/3.3.5/2016_06_27_00_world.sql new file mode 100644 index 00000000000..d84c8158542 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_27_00_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `gameobject` WHERE `guid` IN (165009,165010,165012,165013,165014,165015,165016,165019,165020,165021,165022,165023,165024,165025,165026,165027,165028,165029,165030,165031,165032,165033); +UPDATE `gameobject` SET `position_x`=2019.6999, `position_y`=6587.1401, `position_z`=134.985001, `orientation`=6.237050 WHERE `guid`=70594; diff --git a/sql/updates/world/3.3.5/2016_06_27_01_world.sql b/sql/updates/world/3.3.5/2016_06_27_01_world.sql new file mode 100644 index 00000000000..6f7d3a34127 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_27_01_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (25324) AND `id`=2; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(25324,0,2,0,25,0,100,0,0,0,0,0,3,0,23114,0,0,0,0,1,0,0,0,0,0,0,0,'Earthen ring Guide - On reset - morph to model'); diff --git a/sql/updates/world/3.3.5/2016_06_27_02_world.sql b/sql/updates/world/3.3.5/2016_06_27_02_world.sql new file mode 100644 index 00000000000..6484f75afc4 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_27_02_world.sql @@ -0,0 +1,107 @@ +-- +-- Fix quests Incense for the Festival Scorchlings and Incense for the Summer Scorchlings +DELETE FROM `creature_queststarter` WHERE `quest`=11964; +-- SAI for Festival Talespinner +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=16818; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=16818; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(16818,0,0,0,19,0,100,0,11966,0,0,0,11,46826,0,0,0,0,0,7,0,0,0,0,0,0,0,'Festival Talespinner - On target quest accepted - Cast Flame Keeper Breadcrumb'); +-- SAI for Festival Loremaster +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=16817; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=16817; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(16817,0,0,0,19,0,100,0,11964,0,0,0,11,46825,0,0,0,0,0,7,0,0,0,0,0,0,0,'Festival Loremaster - On target quest accepted - Cast Flame Warden Breadcrumb'); +-- Whisp of Ragnaros flag not selectable +UPDATE `creature_template` SET `unit_flags`=33554432 WHERE `entry`=26502; +-- SAI for Festival Schorchling +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=26520; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=26520; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=2652000; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(26520,0,0,0,8,0,100,0,47104,0,0,0,80,2652000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - On spell hit - Run script '), +(2652000,9,1,0,0,0,100,0,0,0,0,0,1,0,2000,0,0,0,0,21,3,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 0'), +(2652000,9,2,0,0,0,100,0,1000,1000,0,0,1,1,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 1'), +(2652000,9,3,0,0,0,100,0,2000,2000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Cast grow'), +(2652000,9,4,0,0,0,100,0,0,0,0,0,1,2,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 2'), +(2652000,9,5,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Cast grow'), +(2652000,9,6,0,0,0,100,0,0,0,0,0,1,3,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 3'), +(2652000,9,7,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Cast grow'), +(2652000,9,8,0,0,0,100,0,0,0,0,0,1,4,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 4'), +(2652000,9,9,0,0,0,100,0,1000,1000,0,0,1,5,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 5'), +(2652000,9,10,0,0,0,100,0,2000,2000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Cast grow'), +(2652000,9,11,0,0,0,100,0,0,0,0,0,1,6,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 6'), +(2652000,9,12,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Cast grow'), +(2652000,9,13,0,0,0,100,0,0,0,0,0,1,7,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 7'), +(2652000,9,14,0,0,0,100,0,0,0,0,0,11,47120,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Summon Whisp of Ragnaros'), +(2652000,9,15,0,0,0,100,0,0,0,0,0,75,45889,0,0,0,0,0,11,26502,10,0,0,0,0,0,'Festival Scorchling - Action list - Aura Scorchling Blast'), +(2652000,9,16,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Cast grow'), +(2652000,9,17,0,0,0,100,0,0,0,0,0,41,0,0,0,0,0,0,11,26502,10,0,0,0,0,0,'Festival Scorchling - Action list - Despawn Whisp of Ragnaros '), +(2652000,9,18,0,0,0,100,0,0,0,0,0,1,8,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 8'), +(2652000,9,19,0,0,0,100,0,0,0,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Cast grow'), +(2652000,9,20,0,0,0,100,0,0,0,0,0,1,9,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 9'), +(2652000,9,21,0,0,0,100,0,1000,1000,0,0,11,46660,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Cast Extinguished'), +(2652000,9,22,0,0,0,100,0,0,0,0,0,28,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Remove aura from grow'), +(2652000,9,23,0,0,0,100,0,3000,3000,0,0,1,10,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Festival Scorchling - Action list - Say text 10'); +-- Festival Scorchling texts +DELETE FROM `creature_text` WHERE `entry`= 26520; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(26520,0,0,'Thank you again, $n, for this delectable incense.',12,0,100,1,1000,0,'Festival Scorchling',25699), +(26520,1,0,'%s devours the incense. It\'s ravenous!',16,0,100,1,1000,0,'Festival Scorchling',25717), +(26520,2,0,'So good! So packed with energy!',12,0,100,1,1000,0,'Festival Scorchling',25718), +(26520,3,0,'It has everything a growing scorchling needs!',12,0,100,1,1000,0,'Festival Scorchling',25719), +(26520,4,0,'I can feel the power SURGING within me!',12,0,100,1,1000,0,'Festival Scorchling',25730), +(26520,5,0,'%s bellows with laughter!',16,0,100,1,1000,0,'Festival Scorchling',25720), +(26520,6,0,'Now! Finally! Our plans can take effect!',12,0,100,1,1000,0,'Festival Scorchling',25721), +(26520,7,0,'KNEEL, LITTLE MORTAL! KNEEL BEFORE THE MIGHT OF THE HERALD OF RAGNAROS!',12,0,100,1,1000,0,'Festival Scorchling',25722), +(26520,8,0,'YOU WILL ALL PERISH IN FLAMES!',12,0,100,1,1000,0,'Festival Scorchling',25723), +(26520,9,0,'%s blinks...',16,0,100,1,1000,0,'Festival Scorchling',25724), +(26520,10,0,'Ah. I was merely jesting...',12,0,100,1,1000,0,'Festival Scorchling',25725); +-- SAI for Summer Schorchling +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=26401; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=26401; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=2640100; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(26401,0,0,0,8,0,100,0,47104,0,0,0,80,2640100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - On spell hit - Start script'), +(2640100,9,1,0,0,0,100,0,0,0,0,0,1,0,2000,0,0,0,0,21,3,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 0'), +(2640100,9,2,0,0,0,100,0,1000,1000,0,0,1,1,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 1'), +(2640100,9,3,0,0,0,100,0,2000,2000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Cast grow'), +(2640100,9,4,0,0,0,100,0,0,0,0,0,1,2,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 2'), +(2640100,9,5,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Actionlist - Action 5 - Cast grow'), +(2640100,9,6,0,0,0,100,0,0,0,0,0,1,3,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 3'), +(2640100,9,7,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Cast grow'), +(2640100,9,8,0,0,0,100,0,0,0,0,0,1,4,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 4'), +(2640100,9,9,0,0,0,100,0,1000,1000,0,0,1,5,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 5'), +(2640100,9,10,0,0,0,100,0,2000,2000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Cast grow'), +(2640100,9,11,0,0,0,100,0,0,0,0,0,1,6,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 6'), +(2640100,9,12,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Cast grow'), +(2640100,9,13,0,0,0,100,0,0,0,0,0,1,7,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 7'), +(2640100,9,14,0,0,0,100,0,0,0,0,0,11,47120,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Summon Whisp of Ragnaros'), +(2640100,9,15,0,0,0,100,0,0,0,0,0,75,45889,0,0,0,0,0,11,26502,10,0,0,0,0,0,'Summer Scorchling - Action list - Aura Scorchling Blast'), +(2640100,9,16,0,0,0,100,0,3000,3000,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Cast grow'), +(2640100,9,17,0,0,0,100,0,0,0,0,0,41,0,0,0,0,0,0,11,26502,10,0,0,0,0,0,'Summer Scorchling - Action list - Despawn Whisp of Ragnaros '), +(2640100,9,18,0,0,0,100,0,0,0,0,0,1,8,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 8'), +(2640100,9,19,0,0,0,100,0,0,0,0,0,11,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Cast grow'), +(2640100,9,20,0,0,0,100,0,0,0,0,0,1,9,1000,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 9'), +(2640100,9,21,0,0,0,100,0,1000,1000,0,0,11,46660,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Cast Extinguished'), +(2640100,9,22,0,0,0,100,0,0,0,0,0,28,47114,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Remove aura from grow'), +(2640100,9,23,0,0,0,100,0,3000,3000,0,0,1,10,2000,0,0,0,0,1,0,0,0,0,0,0,0,'Summer Scorchling - Action list - Say text 10'); +-- Summer Scorchling texts +DELETE FROM `creature_text` WHERE `entry`= 26401; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`,`BroadcastTextId`) VALUES +(26401,0,0,'Thank you again, $n, for this delectable incense.',12,0,100,1,1000,0,'Summer Scorchling',25699), +(26401,1,0,'%s devours the incense. It\'s ravenous!',16,0,100,1,1000,0,'Summer Scorchling',25717), +(26401,2,0,'So good! So packed with energy!',12,0,100,1,1000,0,'Summer Scorchling',25718), +(26401,3,0,'It has everything a growing scorchling needs!',12,0,100,1,1000,0,'Summer Scorchling',25719), +(26401,4,0,'I can feel the power SURGING within me!',12,0,100,1,1000,0,'Summer Scorchling',25730), +(26401,5,0,'%s bellows with laughter!',16,0,100,1,1000,0,'Summer Scorchling',25720), +(26401,6,0,'Now! Finally! Our plans can take effect!',12,0,100,1,1000,0,'Summer Scorchling',25721), +(26401,7,0,'KNEEL, LITTLE MORTAL! KNEEL BEFORE THE MIGHT OF THE HERALD OF RAGNAROS!',12,0,100,1,1000,0,'Summer Scorchling',25722), +(26401,8,0,'YOU WILL ALL PERISH IN FLAMES!',12,0,100,1,1000,0,'Summer Scorchling',25723), +(26401,9,0,'%s blinks...',16,0,100,1,1000,0,'Summer Scorchling',25724), +(26401,10,0,'Ah. I was merely jesting...',12,0,100,1,1000,0,'Summer Scorchling',25725); + +-- Add conditions for spell Scorchling Gets Incense +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47104; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,47104,0,1,31,0,3,26520,0,0,0,'','Scorchling gets incense can hit Festival Scorchling'), +(13,1,47104,0,2,31,0,3,26401,0,0,0,'','Scorchling gets incense can hit Summer Scorchling'); diff --git a/sql/updates/world/3.3.5/2016_06_29_00_world.sql b/sql/updates/world/3.3.5/2016_06_29_00_world.sql new file mode 100644 index 00000000000..b4dcaf7c15e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_29_00_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `game_event_gameobject` WHERE `guid` IN (165009,165010,165012,165013,165014,165015,165016,165019,165020,165021,165022,165023,165024,165025,165026,165027,165028,165029,165030,165031,165032,165033); diff --git a/sql/updates/world/3.3.5/2016_06_29_01_world.sql b/sql/updates/world/3.3.5/2016_06_29_01_world.sql new file mode 100644 index 00000000000..4ffabf4b0a8 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_29_01_world.sql @@ -0,0 +1,2702 @@ +SET @OGUID:=87978; +SET @Event:=1; + +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+2691; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0 , 187572, 530, 1, 1, -241.8369, 5429.573, 24.37494, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3565) +(@OGUID+1 , 187572, 530, 1, 1, -243.9615, 5443.92, 25.26089, 5.98648, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3565) +(@OGUID+2 , 187572, 530, 1, 1, -252.851, 5437.038, 25.89111, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3565) +(@OGUID+3 , 187572, 530, 1, 1, -224.2356, 5516.909, 28.54368, 5.689774, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3565) +(@OGUID+4 , 187572, 530, 1, 1, -165.054, 5518.109, 31.18534, 1.221729, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3565) +(@OGUID+5 , 187572, 530, 1, 1, 274.8896, 6057.858, 131.4415, 4.084071, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3644) +(@OGUID+6 , 187572, 530, 1, 1, 277.9382, 6049.539, 131.4333, 3.490667, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3644) +(@OGUID+7 , 187572, 530, 1, 1, 282, 6048.846, 131.4411, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3644) +(@OGUID+8 , 187572, 530, 1, 1, 288.1331, 6056.699, 131.4345, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3644) +(@OGUID+9 , 187572, 530, 1, 1, 282.4333, 6063.334, 131.4415, 5.899214, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3644) +(@OGUID+10 , 187572, 530, 1, 1, 1039.835, 7363.489, 40.09451, 4.747296, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3766) +(@OGUID+11 , 187572, 530, 1, 1, 1050.579, 7360.472, 40.28421, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3766) +(@OGUID+12 , 187572, 530, 1, 1, 1048.977, 7358.21, 40.21627, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3766) +(@OGUID+13 , 187572, 530, 1, 1, 1045.045, 7366.596, 40.2879, 2.251473, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3766) +(@OGUID+14 , 187572, 530, 1, 1, 1042.174, 7364.971, 40.18074, 6.126106, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3766) +(@OGUID+15 , 187572, 530, 1, 1, 1047.144, 7355.711, 40.11453, 5.235988, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3766) +(@OGUID+16 , 187572, 530, 1, 1, 3057.186, 3708.671, 143.9881, 1.378809, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+17 , 187572, 530, 1, 1, 3054.319, 3706.454, 143.966, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+18 , 187572, 530, 1, 1, 3058.017, 3698.433, 143.8841, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+19 , 187572, 530, 1, 1, 3062.03, 3710.77, 143.9977, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+20 , 187572, 530, 1, 1, 3055.256, 3703.665, 143.9852, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+21 , 187572, 530, 1, 1, 3056.405, 3700.777, 144.005, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+22 , 187572, 530, 1, 1, 3070.169, 3714.774, 143.9962, 6.143561, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+23 , 187572, 530, 1, 1, 3064.977, 3685.611, 143.7038, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+24 , 187572, 530, 1, 1, 3073.896, 3715.572, 143.9741, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+25 , 187572, 530, 1, 1, 3062.429, 3690.319, 143.739, 5.340709, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+26 , 187572, 530, 1, 1, 3063.754, 3687.763, 143.681, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+27 , 187572, 530, 1, 1, 3066.316, 3712.954, 143.9952, 1.989672, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+28 , 187572, 530, 1, 1, 3073.009, 3686.083, 143.9886, 3.979355, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+29 , 187572, 530, 1, 1, 3070.123, 3684.238, 143.9739, 3.368496, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+30 , 187572, 530, 1, 1, 3076.475, 3712.604, 143.9648, 4.555311, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+31 , 187572, 530, 1, 1, 3067.167, 3683.273, 143.8312, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+32 , 187572, 530, 1, 1, 3078.454, 3709.075, 143.9676, 0.06981169, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+33 , 187572, 530, 1, 1, 3083.626, 3699.835, 143.9755, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+34 , 187572, 530, 1, 1, 3085.193, 3697.061, 143.9655, 5.253442, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+35 , 187572, 530, 1, 1, 3079.557, 3690.007, 143.9812, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+36 , 187572, 530, 1, 1, 3085.981, 3694.047, 143.961, 6.248279, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+37 , 187572, 530, 1, 1, 3083.373, 3691.876, 143.9724, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+38 , 187572, 530, 1, 1, 3076.299, 3688.263, 143.9803, 4.590216, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+39 , 187572, 530, 1, 1, 3081.989, 3702.521, 143.9719, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+40 , 187572, 530, 1, 1, 3080.312, 3705.64, 143.9753, 4.450591, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3712) +(@OGUID+41 , 187572, 530, 1, 1, -2937.644, 4002.613, 2.06225, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+42 , 187572, 530, 1, 1, -2943.523, 3989.1, 0.545542, 3.57793, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+43 , 187572, 530, 1, 1, -2942.966, 3986.944, 3.025976, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+44 , 187572, 530, 1, 1, -2939.915, 3989.186, 0.54576, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+45 , 187572, 530, 1, 1, -2936.816, 4004.084, 2.03728, 4.625124, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+46 , 187572, 530, 1, 1, -2939.37, 3984.464, 3.025977, 2.687807, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+47 , 187572, 530, 1, 1, -2945.822, 3986.863, 0.551942, 3.246347, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+48 , 187572, 530, 1, 1, -2943.989, 3985.416, 3.025977, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+49 , 187572, 530, 1, 1, -2937.538, 3986.691, 0.568022, 3.979355, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+50 , 187572, 530, 1, 1, -2941.231, 3987.247, 3.025977, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+51 , 187572, 530, 1, 1, -2943.693, 3983.661, 3.025977, 0.6108634, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+52 , 187572, 530, 1, 1, -2939.676, 3986.295, 3.025977, 4.171338, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+53 , 187572, 530, 1, 1, -2945.819, 3983.282, 0.565527, 0.7679439, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+54 , 187572, 530, 1, 1, -2943.34, 3980.825, 0.567986, 0.06981169, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+55 , 187572, 530, 1, 1, -2939.93, 3980.845, 0.569154, 2.548179, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+56 , 187572, 530, 1, 1, -2942.087, 3982.628, 3.025977, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+57 , 187572, 530, 1, 1, -2937.55, 3983.1, 0.56814, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+58 , 187572, 530, 1, 1, -2940.342, 3982.971, 3.025977, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3684) +(@OGUID+59 , 187572, 530, 1, 1, 225.2546, 8509.239, 26.65809, 3.001947, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+60 , 187572, 530, 1, 1, 206.8793, 8515.106, 26.21783, 0.383971, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+61 , 187572, 530, 1, 1, 225.1708, 8507.408, 25.51025, 4.81711, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+62 , 187572, 530, 1, 1, 211.4542, 8508.43, 25.87837, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+63 , 187572, 530, 1, 1, 229.2561, 8514.614, 25.6382, 4.153885, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+64 , 187572, 530, 1, 1, 214.8837, 8529.985, 25.71218, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+65 , 187572, 530, 1, 1, 228.41, 8521.593, 24.48324, 0.4712385, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+66 , 187572, 530, 1, 1, 221.5685, 8528.777, 25.17912, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+67 , 187572, 530, 1, 1, 219.8215, 8519.024, 26.14288, 5.899214, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+68 , 187572, 530, 1, 1, 216.2591, 8521.201, 27.35521, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+69 , 187572, 530, 1, 1, 212.9643, 8518.036, 28.48465, 3.543024, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+70 , 187572, 530, 1, 1, 211.0715, 8528.457, 25.71797, 1.378809, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+71 , 187572, 530, 1, 1, 221.6456, 8527.546, 25.35055, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+72 , 187572, 530, 1, 1, 207.398, 8521.497, 26.20726, 0.6283169, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+73 , 187572, 530, 1, 1, -3025.772, 2557.571, 81.67224, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3744) +(@OGUID+74 , 187572, 530, 1, 1, -3025.11, 2559.661, 80.91459, 4.625124, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3744) +(@OGUID+75 , 187572, 530, 1, 1, -3026.945, 2561.112, 81.63725, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3744) +(@OGUID+76 , 187572, 530, 1, 1, -3018.662, 2544.411, 80.34085, 4.921829, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3744) +(@OGUID+77 , 187572, 530, 1, 1, -4015.03, 2153.216, 106.7785, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3745) +(@OGUID+78 , 187572, 530, 1, 1, -4009.631, 2150.075, 106.7804, 4.607672, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3745) +(@OGUID+79 , 187572, 530, 1, 1, -4081.995, 2166.591, 112.2705, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3745) +(@OGUID+80 , 187572, 530, 1, 1, -4081.902, 2162.457, 111.6688, 1.256636, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3745) +(@OGUID+81 , 187572, 530, 1, 1, -4078.799, 2168.082, 109.4882, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3745) +(@OGUID+82 , 187572, 571, 1, 1, 5231.799, -1312.145, 242.4062, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 66) +(@OGUID+83 , 187572, 571, 1, 1, 5219.131, -1294.844, 243.2324, 3.525572, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 66) +(@OGUID+84 , 187572, 571, 1, 1, 5220.16, -1332.954, 242.3486, 0.3490652, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 66) +(@OGUID+85 , 187572, 571, 1, 1, 5228.342, -1302.892, 242.7808, 4.433136, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 66) +(@OGUID+86 , 187572, 571, 1, 1, 5205.623, -1333.328, 243.4024, 2.583081, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 66) +(@OGUID+87 , 187572, 571, 1, 1, 5212.926, -1294.726, 242.5768, 5.637414, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 66) +(@OGUID+88 , 187572, 571, 1, 1, 5190.682, -1317.712, 244.4336, 3.892087, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4312) +(@OGUID+89 , 187572, 571, 1, 1, 5196.662, -1297.77, 244.9721, 2.932139, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4312) +(@OGUID+90 , 187572, 571, 1, 1, 5191.56, -1305.979, 244.4355, 5.410522, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4312) +(@OGUID+91 , 187572, 571, 1, 1, 5187.832, -2189, 237.5006, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+92 , 187572, 571, 1, 1, 5176.379, -2197.998, 237.5495, 2.862335, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+93 , 187572, 571, 1, 1, 5179.248, -2198.358, 238.4526, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+94 , 187572, 571, 1, 1, 5187.784, -2191.967, 238.5997, 1.06465, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+95 , 187572, 571, 1, 1, 5187.786, -2195.117, 239.4474, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4317) +(@OGUID+96 , 187572, 571, 1, 1, 5182.681, -2198.434, 239.399, 3.735006, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4317) +(@OGUID+97 , 187572, 571, 1, 1, 5767.042, -3564.952, 388.1387, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4323) +(@OGUID+98 , 187572, 571, 1, 1, 5759.857, -3567.817, 388.3598, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4323) +(@OGUID+99 , 187572, 571, 1, 1, 5767.813, -3565.605, 388.1718, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4323) +(@OGUID+100 , 187572, 571, 1, 1, 5774.695, -3602.46, 389.2473, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4323) +(@OGUID+101 , 187572, 571, 1, 1, 7802.333, -2954.012, 1258.015, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4441) +(@OGUID+102 , 187572, 571, 1, 1, 7807.708, -2956.999, 1258.036, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4441) +(@OGUID+103 , 187572, 571, 1, 1, 7803.764, -2952.953, 1257.529, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4441) +(@OGUID+104 , 187572, 571, 1, 1, 7807.827, -2955.189, 1257.591, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4441) +(@OGUID+105 , 187572, 571, 1, 1, 3854.739, -4497.549, 214.1914, 4.276057, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4205) +(@OGUID+106 , 187572, 571, 1, 1, 3854.873, -4497.049, 214.1632, 0.4537851, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4205) +(@OGUID+107 , 187572, 571, 1, 1, 3862.255, -4495.877, 214.0401, 2.059488, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4205) +(@OGUID+108 , 187572, 571, 1, 1, 3883.803, -4518.698, 219.4198, 5.951575, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4205) +(@OGUID+109 , 187572, 571, 1, 1, 3846.244, -4514.318, 213.0963, 5.619962, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+110 , 187572, 571, 1, 1, 3846.859, -4514.041, 213.0314, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+111 , 187572, 571, 1, 1, 3851.367, -4529.999, 210.2527, 6.248279, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+112 , 187572, 571, 1, 1, 3846.599, -4507.069, 213.362, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+113 , 187572, 571, 1, 1, 3855.264, -4538.323, 210.3319, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+114 , 187572, 571, 1, 1, 3871.819, -4548.663, 211.196, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+115 , 187572, 571, 1, 1, 3844.863, -4537.382, 210.5569, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+116 , 187572, 571, 1, 1, 3851.176, -4541.075, 210.2534, 0.7853968, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+117 , 187572, 571, 1, 1, 3862.344, -4548.556, 211.4609, 5.113817, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+118 , 187572, 571, 1, 1, 3868.193, -4566.316, 215.3402, 5.916668, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+119 , 187572, 571, 1, 1, 3867.665, -4565.772, 215.3505, 0.4014249, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+120 , 187572, 571, 1, 1, 3866.146, -4556.351, 217.2647, 1.780234, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+121 , 187572, 571, 1, 1, 3408.634, -2804.354, 212.2962, 5.637414, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+122 , 187572, 571, 1, 1, 3400.878, -2792.271, 212.3842, 4.153885, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+123 , 187572, 571, 1, 1, 3398.95, -2792.49, 212.3258, 2.652894, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+124 , 187572, 571, 1, 1, 3407.376, -2802.615, 212.3642, 2.303831, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+125 , 187572, 571, 1, 1, 3400.26, -2792.18, 212.3036, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+126 , 187572, 571, 1, 1, 3397.087, -2788.766, 212.2994, 4.258607, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4204) +(@OGUID+127 , 187572, 571, 1, 1, 3399.973, -2790.529, 212.3376, 5.096362, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4204) +(@OGUID+128 , 187572, 571, 1, 1, 3263.72, -2270.777, 115.3641, 4.101525, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4248) +(@OGUID+129 , 187572, 571, 1, 1, 3242.611, -2233.558, 115.1097, 6.143561, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4248) +(@OGUID+130 , 187572, 571, 1, 1, 3268.989, -2233.57, 116.2734, 3.438303, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4248) +(@OGUID+131 , 187572, 571, 1, 1, 3266.978, -2238.066, 115.6821, 4.642576, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4248) +(@OGUID+132 , 187572, 571, 1, 1, 3246.168, -2225.112, 116.2689, 0, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4248) +(@OGUID+133 , 187572, 571, 1, 1, 3265.178, -2242.466, 115.056, 2.042035, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4248) +(@OGUID+134 , 187572, 571, 1, 1, 3244.594, -2228.536, 115.6822, 0.802851, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4248) +(@OGUID+135 , 187572, 571, 1, 1, 1431.97, -3278.05, 175.8965, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4071) +(@OGUID+136 , 187572, 571, 1, 1, 1421.823, -3274.434, 175.8965, 0.4537851, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4071) +(@OGUID+137 , 187572, 571, 1, 1, 1424.238, -3271.245, 175.8965, 2.303831, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4071) +(@OGUID+138 , 187572, 571, 1, 1, 1425.976, -3282.05, 175.8965, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4071) +(@OGUID+139 , 187572, 571, 1, 1, 1421.333, -3278.195, 175.8965, 3.47321, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4071) +(@OGUID+140 , 187572, 571, 1, 1, 1429.63, -3280.972, 175.8965, 5.794494, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4071) +(@OGUID+141 , 187572, 571, 1, 1, 727.2495, -2932.994, 7.874049, 3.839725, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3987) +(@OGUID+142 , 187572, 571, 1, 1, 730.0959, -2931.596, 7.918657, 4.799657, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3987) +(@OGUID+143 , 187572, 571, 1, 1, 732.0202, -2926.204, 7.921756, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3987) +(@OGUID+144 , 187572, 571, 1, 1, 732.6984, -2930.365, 7.934427, 1.727875, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3987) +(@OGUID+145 , 187572, 571, 1, 1, 710.6893, -2929.116, -2.16061, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3987) +(@OGUID+146 , 187572, 571, 1, 1, 725.784, -2925.61, 7.901932, 0.8726639, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3987) +(@OGUID+147 , 187572, 571, 1, 1, 729.1365, -2925.896, 7.908826, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3987) +(@OGUID+148 , 187572, 571, 1, 1, 711.5972, -2934.622, -2.181822, 1.082103, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3987) +(@OGUID+149 , 187572, 571, 1, 1, 588.3549, -4954.631, 27.2703, 1.815142, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3981) +(@OGUID+150 , 187572, 571, 1, 1, 592.91, -4950.143, 27.2703, 2.705255, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3981) +(@OGUID+151 , 187572, 571, 1, 1, 592.2098, -4945.239, 27.2703, 5.113817, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3981) +(@OGUID+152 , 187572, 571, 1, 1, 583.0338, -4950.212, 27.2703, 4.520406, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3981) +(@OGUID+153 , 187572, 571, 1, 1, 578.659, -4944.729, 18.32809, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3981) +(@OGUID+154 , 187572, 571, 1, 1, 576.8945, -4944.993, 17.68654, 0.122173, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3981) +(@OGUID+155 , 187572, 571, 1, 1, 577.5501, -4940.387, 18.30996, 3.368496, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3981) +(@OGUID+156 , 187572, 571, 1, 1, 575.9412, -4940.815, 17.56364, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 3981) +(@OGUID+157 , 187572, 571, 1, 1, 3220.349, -685.9569, 167.1892, 3.612838, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+158 , 187572, 571, 1, 1, 3223.984, -684.1493, 167.24, 4.799657, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+159 , 187572, 571, 1, 1, 3222.427, -687.5139, 167.1181, 3.630291, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+160 , 187572, 571, 1, 1, 3221.639, -683.0989, 167.1992, 5.113817, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+161 , 187572, 571, 1, 1, 3205.693, -680.2454, 167.5366, 1.483528, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4186) +(@OGUID+162 , 187572, 571, 1, 1, 3212.055, -681.3081, 174.8388, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4186) +(@OGUID+163 , 187572, 571, 1, 1, 3209.019, -676.864, 167.5366, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4186) +(@OGUID+164 , 187572, 571, 1, 1, 3568.101, 255.9918, 45.70592, 3.630291, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4161) +(@OGUID+165 , 187572, 571, 1, 1, 3539.059, 247.203, 45.70501, 4.223697, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4161) +(@OGUID+166 , 187572, 571, 1, 1, 3519.824, 270.4999, 45.70507, 5.026549, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4161) +(@OGUID+167 , 187572, 571, 1, 1, 3570.456, 285.7692, 45.76595, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4161) +(@OGUID+168 , 187572, 571, 1, 1, 3534.701, 297.3186, 45.70494, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4161) +(@OGUID+169 , 187572, 571, 1, 1, 2775.393, 930.8277, 22.25009, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+170 , 187572, 571, 1, 1, 2779.236, 917.7034, 22.35922, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+171 , 187572, 571, 1, 1, 2785.635, 921.6565, 22.35873, 4.32842, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+172 , 187572, 571, 1, 1, 2647.045, 878.9326, 4.849034, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+173 , 187572, 571, 1, 1, 2656.301, 871.572, 4.834126, 3.630291, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+174 , 187572, 571, 1, 1, 2645.948, 874.8683, 4.83767, 4.921829, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+175 , 187572, 571, 1, 1, 2651.81, 856.4553, 4.84759, 5.113817, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+176 , 187572, 571, 1, 1, 2654.594, 866.0796, 4.808696, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+177 , 187572, 571, 1, 1, 2653.362, 862.1208, 4.809918, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+178 , 187572, 571, 1, 1, 2657.637, 875.5178, 4.844224, 5.009095, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+179 , 187572, 571, 1, 1, 2650.517, 852.668, 4.834447, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+180 , 187572, 571, 1, 1, 2644.318, 869.2494, 4.805964, 4.869471, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+181 , 187572, 571, 1, 1, 2640.068, 855.8304, 4.842837, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+182 , 187572, 571, 1, 1, 2643.018, 865.1339, 4.813616, 1.256636, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+183 , 187572, 571, 1, 1, 2638.512, 850.2684, 4.888963, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+184 , 187572, 571, 1, 1, 2637.107, 846.332, 4.828626, 4.223697, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+185 , 187572, 571, 1, 1, 2641.241, 859.7672, 4.846929, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+186 , 187572, 571, 1, 1, 2647.614, 843.0643, 4.812499, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+187 , 187572, 571, 1, 1, 2648.869, 847.0348, 4.817444, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4152) +(@OGUID+188 , 187572, 571, 1, 1, 3831.97, 1516.262, 92.38146, 0.01745246, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+189 , 187572, 571, 1, 1, 3831.801, 1519.576, 91.51768, 0.05235888, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+190 , 187572, 571, 1, 1, 3831.554, 1524.541, 90.93062, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+191 , 187572, 571, 1, 1, 3831.325, 1529.669, 90.37012, 2.652894, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+192 , 187572, 571, 1, 1, 3851.648, 1516.306, 92.34167, 5.201083, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+193 , 187572, 571, 1, 1, 3852.458, 1529.622, 90.37012, 4.380776, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4165) +(@OGUID+194 , 187572, 571, 1, 1, 3852.2, 1524.579, 90.92751, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4165) +(@OGUID+195 , 187572, 571, 1, 1, 3851.949, 1520.867, 91.51768, 3.839725, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4165) +(@OGUID+196 , 187572, 571, 1, 1, 3502.552, 1966.383, 66.30372, 1.867502, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+197 , 187572, 571, 1, 1, 3502.825, 1971.287, 66.33058, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+198 , 187572, 571, 1, 1, 3491.12, 1972.526, 66.79745, 5.044002, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+199 , 187572, 571, 1, 1, 3498.157, 1963.667, 66.98794, 0.3316107, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+200 , 187572, 571, 1, 1, 3499.447, 1986.641, 66.0871, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+201 , 187572, 571, 1, 1, 3522.465, 1993.206, 66.59767, 0.802851, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+202 , 187572, 571, 1, 1, 3465.634, 1994.535, 65.82655, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+203 , 187572, 571, 1, 1, 3472.561, 1990.535, 65.79995, 0.6457717, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+204 , 187572, 571, 1, 1, 3494.791, 1994.783, 65.50302, 5.044002, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+205 , 187572, 571, 1, 1, 3521.992, 1997.143, 66.58281, 3.752462, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+206 , 187572, 571, 1, 1, 3518.091, 1995.668, 66.5723, 4.869471, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+207 , 187572, 571, 1, 1, 3474.955, 2004.583, 64.86234, 0.383971, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+208 , 187572, 571, 1, 1, 3509.424, 2016.74, 66.59296, 3.892087, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+209 , 187572, 571, 1, 1, 3506.767, 2013.933, 66.58628, 5.305802, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+210 , 187572, 571, 1, 1, 3488.441, 2015.385, 66.21159, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+211 , 187572, 571, 1, 1, 3506.027, 2018.911, 66.59167, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+212 , 187572, 571, 1, 1, 5590.792, 5741.47, -69.95851, 1.047198, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+213 , 187572, 571, 1, 1, 5540.601, 5734.986, -74.41019, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+214 , 187572, 571, 1, 1, 5575.648, 5744.854, -74.17106, 0.6108634, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+215 , 187572, 571, 1, 1, 5579.48, 5743.395, -72.77816, 1.082103, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+216 , 187572, 571, 1, 1, 5580.207, 5754.729, -74.17179, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+217 , 187572, 571, 1, 1, 5534.636, 5748.279, -76.63572, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+218 , 187572, 571, 1, 1, 5582.845, 5753.317, -72.5528, 2.91469, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+219 , 187572, 571, 1, 1, 5558.958, 5761.582, -76.67675, 2.809975, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+220 , 187572, 571, 1, 1, 5563.845, 5763.661, -74.10222, 4.956738, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 0) +(@OGUID+221 , 187572, 571, 1, 1, 3438.272, 4175.789, 15.59595, 4.520406, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+222 , 187572, 571, 1, 1, 3440.938, 4170, 16.75948, 3.892087, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+223 , 187572, 571, 1, 1, 3435.048, 4176.098, 14.48878, 2.216565, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+224 , 187572, 571, 1, 1, 3436.364, 4170.425, 15.11012, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+225 , 187572, 571, 1, 1, 3434.688, 4170.593, 14.47091, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+226 , 187572, 571, 1, 1, 3441.158, 4175.78, 17.07891, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+227 , 187572, 571, 1, 1, 3439.237, 4170.084, 16.16713, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+228 , 187572, 571, 1, 1, 3437.843, 4170.2, 15.68182, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+229 , 187572, 571, 1, 1, 3439.49, 4175.847, 16.23158, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+230 , 187572, 571, 1, 1, 3436.933, 4175.96, 15.01061, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+231 , 187572, 571, 1, 1, 3465.623, 4140.512, 16.15235, 4.555311, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+232 , 187572, 571, 1, 1, 3460.051, 4140.799, 16.05406, 5.724681, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4037) +(@OGUID+233 , 187572, 571, 1, 1, 3003.013, 4061.593, 26.25469, 0.3665176, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4113) +(@OGUID+234 , 187572, 571, 1, 1, 3007.808, 4061.098, 26.37004, 5.096362, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4113) +(@OGUID+235 , 187572, 571, 1, 1, 2279.073, 5186.723, 21.08973, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4115) +(@OGUID+236 , 187572, 571, 1, 1, 2274.589, 5181.036, 21.08973, 5.811947, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4115) +(@OGUID+237 , 187572, 571, 1, 1, 2277.779, 5183.217, 21.08973, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4115) +(@OGUID+238 , 187572, 571, 1, 1, 2268.911, 5183.354, 21.08973, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4032) +(@OGUID+239 , 187572, 571, 1, 1, 2268.171, 5187.125, 21.08973, 4.171338, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4032) +(@OGUID+240 , 187572, 571, 1, 1, 2269.356, 5190.188, 21.08973, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4032) +(@OGUID+241 , 187572, 571, 1, 1, 2294.182, 5274.35, 13.35742, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4032) +(@OGUID+242 , 187572, 571, 1, 1, 2297.376, 5281.584, 13.34355, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4032) +(@OGUID+243 , 187572, 571, 1, 1, 2293.466, 5281.179, 13.21161, 5.026549, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4032) +(@OGUID+244 , 187572, 571, 1, 1, 2291.847, 5277.312, 13.39523, 3.525572, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4032) +(@OGUID+245 , 187572, 571, 1, 1, 2299.923, 5278.224, 13.3505, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4032) +(@OGUID+246 , 187572, 571, 1, 1, 2298.162, 5274.419, 13.35744, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 4032) +(@OGUID+247 , 187572, 0, 1, 1, -8989.75, 845.233, 29.6206, 5.707228, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 5154) +(@OGUID+248 , 187572, 0, 1, 1, -8988.32, 846.486, 29.6206, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 187572 (Area: 5154) +(@OGUID+249 , 187573, 530, 1, 1, -238.8798, 5437.085, 24.65068, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3565) +(@OGUID+250 , 187573, 530, 1, 1, -250.4899, 5441.73, 24.82839, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3565) +(@OGUID+251 , 187573, 530, 1, 1, -248.4952, 5431.159, 24.78823, 6.178466, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3565) +(@OGUID+252 , 187573, 530, 1, 1, -210.9728, 5419.913, 22.73365, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3565) +(@OGUID+253 , 187573, 530, 1, 1, -228.8186, 5515.436, 28.778, 1.762782, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3565) +(@OGUID+254 , 187573, 530, 1, 1, -176.5589, 5530.886, 31.1645, 0.4886912, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3565) +(@OGUID+255 , 187573, 530, 1, 1, 275.2674, 6052.903, 131.4272, 0.3316107, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3644) +(@OGUID+256 , 187573, 530, 1, 1, 287.0955, 6051.264, 131.4273, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3644) +(@OGUID+257 , 187573, 530, 1, 1, 286.9392, 6061.178, 131.4276, 4.049168, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3644) +(@OGUID+258 , 187573, 530, 1, 1, 277.5903, 6062.521, 131.4277, 5.305802, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3644) +(@OGUID+259 , 187573, 530, 1, 1, 1043.888, 7365.904, 40.23934, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3766) +(@OGUID+260 , 187573, 530, 1, 1, 1041.082, 7364.274, 40.12274, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3766) +(@OGUID+261 , 187573, 530, 1, 1, 1045.886, 7354.14, 40.03497, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3766) +(@OGUID+262 , 187573, 530, 1, 1, 1049.768, 7359.408, 40.2437, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3766) +(@OGUID+263 , 187573, 530, 1, 1, 1038.146, 7362.734, 40.0191, 5.183629, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3766) +(@OGUID+264 , 187573, 530, 1, 1, 1047.906, 7356.96, 40.14259, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3766) +(@OGUID+265 , 187573, 530, 1, 1, -2941.41, 3986.282, 4.736197, 4.485497, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+266 , 187573, 530, 1, 1, -2942.449, 3986.07, 4.736196, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+267 , 187573, 530, 1, 1, -2941.786, 3989.554, 0.537406, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+268 , 187573, 530, 1, 1, -2944.944, 3987.97, 0.570116, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+269 , 187573, 530, 1, 1, -2937.137, 3985.113, 0.555474, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+270 , 187573, 530, 1, 1, -2940.374, 3984.695, 4.736196, 2.91469, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+271 , 187573, 530, 1, 1, -2946.097, 3984.941, 0.56581, 0, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+272 , 187573, 530, 1, 1, -2943.021, 3985.159, 4.736197, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+273 , 187573, 530, 1, 1, -2941.996, 3983.637, 4.736197, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+274 , 187573, 530, 1, 1, -2938.622, 3988.276, 0.563272, 3.961899, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+275 , 187573, 530, 1, 1, -2940.543, 3985.717, 4.736197, 3.700105, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+276 , 187573, 530, 1, 1, -2942.833, 3984.146, 4.736197, 0.6283169, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+277 , 187573, 530, 1, 1, -2940.881, 3983.838, 4.736197, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+278 , 187573, 530, 1, 1, -2938.413, 3982.022, 0.589959, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+279 , 187573, 530, 1, 1, -2944.666, 3981.645, 0.566747, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+280 , 187573, 530, 1, 1, -2941.608, 3980.53, 0.570047, 1.605702, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3684) +(@OGUID+281 , 187573, 530, 1, 1, 207.2742, 8513.318, 26.09295, 2.652894, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+282 , 187573, 530, 1, 1, 226.3656, 8508.611, 25.50576, 5.724681, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+283 , 187573, 530, 1, 1, 211.9016, 8507.246, 25.61444, 0.6108634, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+284 , 187573, 530, 1, 1, 206.3761, 8518.894, 25.77999, 4.415683, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+285 , 187573, 530, 1, 1, 215.9412, 8514.26, 26.64105, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+286 , 187573, 530, 1, 1, 214.8054, 8514.59, 28.14054, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+287 , 187573, 530, 1, 1, 219.2324, 8504.75, 26.13801, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+288 , 187573, 530, 1, 1, 218.3474, 8513.957, 27.7103, 5.637414, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+289 , 187573, 530, 1, 1, 206.1108, 8520.148, 25.86143, 3.700105, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+290 , 187573, 530, 1, 1, 217.8517, 8504.657, 25.45178, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+291 , 187573, 530, 1, 1, 212.179, 8517.118, 28.13404, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+292 , 187573, 530, 1, 1, 210.3614, 8507.658, 26.04743, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+293 , 187573, 530, 1, 1, 220.4575, 8527.881, 26.32528, 4.276057, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+294 , 187573, 530, 1, 1, 206.7841, 8524.708, 26.24488, 2.792518, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+295 , 187573, 530, 1, 1, 209.6522, 8527.366, 25.38888, 1.326448, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+296 , 187573, 530, 1, 1, 227.9758, 8522.56, 24.8175, 0.6457717, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+297 , 187573, 530, 1, 1, 227.0161, 8523.277, 24.87525, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+298 , 187573, 530, 1, 1, 210.1593, 8528.237, 24.98867, 3.316144, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+299 , 187573, 530, 1, 1, 220.4873, 8529.452, 25.43293, 0.05235888, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+300 , 187573, 530, 1, 1, -3028.058, 2558.158, 81.58592, 4.991644, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3744) +(@OGUID+301 , 187573, 530, 1, 1, -3025.336, 2563.36, 80.77316, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3744) +(@OGUID+302 , 187573, 530, 1, 1, -3017.158, 2544.05, 80.85657, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3744) +(@OGUID+303 , 187573, 530, 1, 1, -4069.756, 2169.192, 108.0575, 1.727875, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3745) +(@OGUID+304 , 187573, 530, 1, 1, -4077.366, 2168.902, 108.0576, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3745) +(@OGUID+305 , 187573, 530, 1, 1, -4077.484, 2166.82, 109.4927, 0.122173, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3745) +(@OGUID+306 , 187573, 571, 1, 1, 5218.292, -1294.741, 243.2421, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 66) +(@OGUID+307 , 187573, 571, 1, 1, 5231.457, -1307.585, 242.9928, 3.926996, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 66) +(@OGUID+308 , 187573, 571, 1, 1, 5223.798, -1297.246, 242.7465, 3.001947, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 66) +(@OGUID+309 , 187573, 571, 1, 1, 5231.501, -1317.645, 242.3579, 1.169369, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 66) +(@OGUID+310 , 187573, 571, 1, 1, 5214.561, -1333.356, 242.8055, 5.218536, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 66) +(@OGUID+311 , 187573, 571, 1, 1, 5201.846, -1295.413, 244.2645, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4312) +(@OGUID+312 , 187573, 571, 1, 1, 5194.785, -1301.008, 244.9712, 6.056293, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4312) +(@OGUID+313 , 187573, 571, 1, 1, 5190.522, -1312.11, 244.0397, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4312) +(@OGUID+314 , 187573, 571, 1, 1, 5200.819, -1331.565, 243.3316, 3.735006, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4312) +(@OGUID+315 , 187573, 571, 1, 1, 5187.799, -2187.275, 237.0019, 3.769912, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+316 , 187573, 571, 1, 1, 5177.904, -2198.184, 237.9583, 1.867502, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+317 , 187573, 571, 1, 1, 5174.574, -2198.058, 237.0945, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+318 , 187573, 571, 1, 1, 5187.775, -2193.543, 239.013, 3.47321, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+319 , 187573, 571, 1, 1, 5187.847, -2190.572, 237.9477, 1.832595, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+320 , 187573, 571, 1, 1, 5180.932, -2198.266, 238.9099, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4317) +(@OGUID+321 , 187573, 571, 1, 1, 5760.56, -3565.656, 388.2643, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4323) +(@OGUID+322 , 187573, 571, 1, 1, 5762.455, -3566.792, 388.3224, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4323) +(@OGUID+323 , 187573, 571, 1, 1, 5769.333, -3567.343, 388.2628, 2.251473, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4323) +(@OGUID+324 , 187573, 571, 1, 1, 5774.232, -3603.223, 389.2473, 0.2443456, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4323) +(@OGUID+325 , 187573, 571, 1, 1, 7801.777, -2955.337, 1258.213, 5.253442, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4441) +(@OGUID+326 , 187573, 571, 1, 1, 7807.081, -2958.003, 1258.148, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4441) +(@OGUID+327 , 187573, 571, 1, 1, 7803.43, -2953.615, 1257.581, 4.084071, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4441) +(@OGUID+328 , 187573, 571, 1, 1, 7807.363, -2955.934, 1257.554, 0.5934101, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4441) +(@OGUID+329 , 187573, 571, 1, 1, 3872.092, -4497.994, 214.228, 3.735006, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4205) +(@OGUID+330 , 187573, 571, 1, 1, 3862.335, -4496.452, 213.9947, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4205) +(@OGUID+331 , 187573, 571, 1, 1, 3854.382, -4497.912, 214.2029, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4205) +(@OGUID+332 , 187573, 571, 1, 1, 3848.718, -4530.234, 210.0516, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+333 , 187573, 571, 1, 1, 3845.773, -4506.672, 213.3141, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+334 , 187573, 571, 1, 1, 3845.863, -4507.249, 213.2718, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+335 , 187573, 571, 1, 1, 3854.817, -4532.222, 210.2647, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+336 , 187573, 571, 1, 1, 3855.825, -4536.71, 210.2953, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+337 , 187573, 571, 1, 1, 3873.255, -4548.749, 211.2182, 4.310966, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+338 , 187573, 571, 1, 1, 3847.103, -4540.545, 210.2771, 0.6283169, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+339 , 187573, 571, 1, 1, 3867.704, -4566.387, 215.409, 6.213374, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+340 , 187573, 571, 1, 1, 3865.873, -4555.702, 217.196, 4.747296, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+341 , 187573, 571, 1, 1, 3865.743, -4556.893, 217.2975, 2.094393, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+342 , 187573, 571, 1, 1, 3406.807, -2802.695, 212.3929, 1.867502, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+343 , 187573, 571, 1, 1, 3407.849, -2803.387, 213.6421, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+344 , 187573, 571, 1, 1, 3411.797, -2803.392, 212.6309, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+345 , 187573, 571, 1, 1, 3400.698, -2791.797, 212.2621, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+346 , 187573, 571, 1, 1, 3399.636, -2791.851, 212.2687, 4.34587, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+347 , 187573, 571, 1, 1, 3399.944, -2790.934, 212.2374, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4204) +(@OGUID+348 , 187573, 571, 1, 1, 3398.436, -2790.138, 212.3292, 5.707228, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4204) +(@OGUID+349 , 187573, 571, 1, 1, 3262.343, -2271.046, 115.3901, 0.01745246, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4248) +(@OGUID+350 , 187573, 571, 1, 1, 3245.255, -2227.15, 116.2699, 5.724681, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4248) +(@OGUID+351 , 187573, 571, 1, 1, 3243.214, -2232.216, 115.6821, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4248) +(@OGUID+352 , 187573, 571, 1, 1, 3267.605, -2236.559, 116.2713, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4248) +(@OGUID+353 , 187573, 571, 1, 1, 3265.578, -2241.444, 115.6822, 1.169369, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4248) +(@OGUID+354 , 187573, 571, 1, 1, 1430.809, -3279.443, 175.8965, 0.3490652, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4071) +(@OGUID+355 , 187573, 571, 1, 1, 1421.832, -3279.826, 175.8964, 1.204277, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4071) +(@OGUID+356 , 187573, 571, 1, 1, 1421.365, -3276.445, 175.8965, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4071) +(@OGUID+357 , 187573, 571, 1, 1, 1427.807, -3281.708, 175.8964, 3.665196, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4071) +(@OGUID+358 , 187573, 571, 1, 1, 1423.193, -3272.82, 175.8964, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4071) +(@OGUID+359 , 187573, 571, 1, 1, 1424.53, -3281.957, 175.8965, 1.884953, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4071) +(@OGUID+360 , 187573, 571, 1, 1, 728.5954, -2932.345, 7.899311, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3987) +(@OGUID+361 , 187573, 571, 1, 1, 725.778, -2933.188, 7.98472, 0.4188786, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3987) +(@OGUID+362 , 187573, 571, 1, 1, 731.3762, -2931.187, 7.874074, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3987) +(@OGUID+363 , 187573, 571, 1, 1, 727.5428, -2925.693, 7.892454, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3987) +(@OGUID+364 , 187573, 571, 1, 1, 730.603, -2926.013, 7.90405, 6.126106, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3987) +(@OGUID+365 , 187573, 571, 1, 1, 724.4731, -2925.879, 8.002373, 3.403396, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3987) +(@OGUID+366 , 187573, 571, 1, 1, 691.7236, -2938.802, -2.142258, 4.502952, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3987) +(@OGUID+367 , 187573, 571, 1, 1, 690.4618, -2931.701, -2.140142, 0.1047193, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3987) +(@OGUID+368 , 187573, 571, 1, 1, 590.8006, -4953.907, 27.2703, 0.1745321, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3981) +(@OGUID+369 , 187573, 571, 1, 1, 584.3661, -4952.655, 27.2703, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3981) +(@OGUID+370 , 187573, 571, 1, 1, 592.7435, -4947.684, 27.2703, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3981) +(@OGUID+371 , 187573, 571, 1, 1, 577.9507, -4944.862, 17.89478, 0.4712385, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3981) +(@OGUID+372 , 187573, 571, 1, 1, 579.667, -4944.608, 18.67778, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3981) +(@OGUID+373 , 187573, 571, 1, 1, 582.3306, -4947.667, 27.2703, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3981) +(@OGUID+374 , 187573, 571, 1, 1, 578.5413, -4940.095, 18.67357, 0.8377575, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3981) +(@OGUID+375 , 187573, 571, 1, 1, 576.8389, -4940.611, 17.8643, 0.7679439, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 3981) +(@OGUID+376 , 187573, 571, 1, 1, 3222.819, -683.441, 167.1934, 4.76475, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+377 , 187573, 571, 1, 1, 3225.311, -685.1146, 167.2393, 2.059488, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+378 , 187573, 571, 1, 1, 3223.978, -687.8472, 167.1376, 6.056293, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+379 , 187573, 571, 1, 1, 3221.145, -686.8906, 167.1059, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+380 , 187573, 571, 1, 1, 3207.472, -680.3905, 167.5366, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4186) +(@OGUID+381 , 187573, 571, 1, 1, 3208.13, -675.4476, 167.5366, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4186) +(@OGUID+382 , 187573, 571, 1, 1, 3212.646, -680.04, 174.8388, 0.4363316, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4186) +(@OGUID+383 , 187573, 571, 1, 1, 3568.515, 256.3788, 45.83984, 5.148723, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4161) +(@OGUID+384 , 187573, 571, 1, 1, 3539.575, 246.702, 45.88269, 0.087266, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4161) +(@OGUID+385 , 187573, 571, 1, 1, 3570.373, 286.3419, 45.93883, 4.258607, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4161) +(@OGUID+386 , 187573, 571, 1, 1, 3534.149, 297.4759, 45.83553, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4161) +(@OGUID+387 , 187573, 571, 1, 1, 3519.518, 269.9622, 45.84327, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4161) +(@OGUID+388 , 187573, 571, 1, 1, 2787.9, 919.5675, 22.35308, 0.5759573, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+389 , 187573, 571, 1, 1, 2779.605, 915.4742, 22.3654, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+390 , 187573, 571, 1, 1, 2777.909, 931.191, 22.25009, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+391 , 187573, 571, 1, 1, 2650.791, 914.241, 4.894161, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+392 , 187573, 571, 1, 1, 2645.884, 922.8932, 4.901317, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+393 , 187573, 571, 1, 1, 2647.992, 919.4376, 4.902209, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+394 , 187573, 571, 1, 1, 2653.07, 910.7157, 4.905365, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+395 , 187573, 571, 1, 1, 2643.723, 905.2086, 4.899257, 3.316144, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+396 , 187573, 571, 1, 1, 2641.788, 908.7531, 4.885656, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+397 , 187573, 571, 1, 1, 2635.687, 939.923, 4.900528, 0.9599299, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+398 , 187573, 571, 1, 1, 2638.673, 913.8153, 4.863067, 5.166176, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+399 , 187573, 571, 1, 1, 2628.321, 930.7235, 4.880824, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+400 , 187573, 571, 1, 1, 2631.383, 925.7955, 4.897779, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+401 , 187573, 571, 1, 1, 2633.318, 922.2076, 4.915955, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+402 , 187573, 571, 1, 1, 2637.789, 936.4579, 4.902726, 6.248279, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+403 , 187573, 571, 1, 1, 2640.679, 931.2507, 4.902224, 3.281239, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+404 , 187573, 571, 1, 1, 2636.47, 917.1949, 4.885477, 1.815142, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+405 , 187573, 571, 1, 1, 2626.034, 934.2613, 4.898267, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+406 , 187573, 571, 1, 1, 2642.781, 927.8379, 4.907436, 0.7330382, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4152) +(@OGUID+407 , 187573, 571, 1, 1, 3831.902, 1517.429, 91.51768, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+408 , 187573, 571, 1, 1, 3832.146, 1514.425, 92.53931, 3.246347, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+409 , 187573, 571, 1, 1, 3831.676, 1520.898, 90.92908, 0.157079, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+410 , 187573, 571, 1, 1, 3831.508, 1525.937, 90.37012, 1.623156, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+411 , 187573, 571, 1, 1, 3851.638, 1514.683, 92.4583, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+412 , 187573, 571, 1, 1, 3851.653, 1517.668, 91.51768, 6.03884, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+413 , 187573, 571, 1, 1, 3851.953, 1522.166, 90.93674, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4165) +(@OGUID+414 , 187573, 571, 1, 1, 3852.301, 1526.04, 90.37012, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4165) +(@OGUID+415 , 187573, 571, 1, 1, 3488.589, 1973.783, 66.59254, 0.8203033, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+416 , 187573, 571, 1, 1, 3497.365, 1963.606, 66.93625, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+417 , 187573, 571, 1, 1, 3499.461, 1967.509, 66.33823, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+418 , 187573, 571, 1, 1, 3504.412, 1968.746, 66.27369, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+419 , 187573, 571, 1, 1, 3499.829, 1970.681, 66.37333, 2.809975, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+420 , 187573, 571, 1, 1, 3474.247, 1975.943, 65.55033, 1.623156, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+421 , 187573, 571, 1, 1, 3497.175, 1986.859, 66.07224, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+422 , 187573, 571, 1, 1, 3469.649, 1992.181, 65.77794, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+423 , 187573, 571, 1, 1, 3518.384, 1993.599, 66.57746, 5.044002, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+424 , 187573, 571, 1, 1, 3520.4, 1992.353, 66.58147, 3.490667, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+425 , 187573, 571, 1, 1, 3523.218, 1995.243, 66.57938, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+426 , 187573, 571, 1, 1, 3519.827, 1997.372, 66.58945, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+427 , 187573, 571, 1, 1, 3504.783, 2015.089, 66.59443, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+428 , 187573, 571, 1, 1, 3504.489, 2017.339, 66.59454, 3.42085, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+429 , 187573, 571, 1, 1, 3488.406, 2016.174, 66.24207, 1.047198, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+430 , 187573, 571, 1, 1, 3508.786, 2014.839, 66.59763, 3.595379, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+431 , 187573, 571, 1, 1, 3508.152, 2018.778, 66.58207, 2.687807, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+432 , 187573, 571, 1, 1, 5577.259, 5744.397, -73.41306, 2.897245, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+433 , 187573, 571, 1, 1, 5540.335, 5733.044, -75.04021, 0.157079, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+434 , 187573, 571, 1, 1, 5581.268, 5753.967, -73.41984, 1.97222, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+435 , 187573, 571, 1, 1, 5533.86, 5752.435, -76.68381, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+436 , 187573, 571, 1, 1, 5564.51, 5764.215, -74.11523, 4.310966, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+437 , 187573, 571, 1, 1, 5557.555, 5761.386, -76.69409, 3.508117, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+438 , 187573, 571, 1, 1, 5543.19, 5771.249, -76.01951, 2.91469, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 0) +(@OGUID+439 , 187573, 571, 1, 1, 3495.241, 4173.272, 14.71328, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+440 , 187573, 571, 1, 1, 3490.698, 4173.471, 16.36332, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+441 , 187573, 571, 1, 1, 3493.623, 4173.028, 15.33519, 5.410522, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+442 , 187573, 571, 1, 1, 3490.759, 4167.651, 16.33138, 6.108654, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+443 , 187573, 571, 1, 1, 3489.254, 4167.413, 17.13385, 2.984498, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+444 , 187573, 571, 1, 1, 3492.343, 4173.275, 15.8522, 5.951575, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+445 , 187573, 571, 1, 1, 3492.034, 4167.671, 15.9009, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+446 , 187573, 571, 1, 1, 3489.076, 4173.691, 16.91642, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+447 , 187573, 571, 1, 1, 3497.022, 4173.399, 14.05571, 4.97419, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+448 , 187573, 571, 1, 1, 3495.101, 4167.443, 14.67529, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+449 , 187573, 571, 1, 1, 3497.104, 4167.036, 14.14581, 0.05235888, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+450 , 187573, 571, 1, 1, 3493.452, 4167.565, 15.12018, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+451 , 187573, 571, 1, 1, 3465.767, 4142.241, 16.7223, 0.383971, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+452 , 187573, 571, 1, 1, 3459.901, 4142.745, 16.77447, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+453 , 187573, 571, 1, 1, 3460.115, 4139.464, 15.57746, 4.502952, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+454 , 187573, 571, 1, 1, 3465.497, 4139.097, 15.685, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4037) +(@OGUID+455 , 187573, 571, 1, 1, 3002.771, 4059.933, 26.68754, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4113) +(@OGUID+456 , 187573, 571, 1, 1, 3007.46, 4059.381, 26.91751, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4113) +(@OGUID+457 , 187573, 571, 1, 1, 2278.325, 5184.817, 21.08973, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4115) +(@OGUID+458 , 187573, 571, 1, 1, 2276.303, 5181.947, 21.08973, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4115) +(@OGUID+459 , 187573, 571, 1, 1, 2272.885, 5180.684, 21.08973, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4115) +(@OGUID+460 , 187573, 571, 1, 1, 2268.475, 5184.938, 21.08973, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4032) +(@OGUID+461 , 187573, 571, 1, 1, 2269.955, 5181.83, 21.08973, 0.5934101, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4032) +(@OGUID+462 , 187573, 571, 1, 1, 2268.833, 5188.483, 21.08973, 4.415683, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4032) +(@OGUID+463 , 187573, 571, 1, 1, 2299.509, 5276.083, 13.3505, 0.157079, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4032) +(@OGUID+464 , 187573, 571, 1, 1, 2299.592, 5280.373, 13.3505, 3.089183, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4032) +(@OGUID+465 , 187573, 571, 1, 1, 2296.215, 5273.702, 13.35049, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4032) +(@OGUID+466 , 187573, 571, 1, 1, 2292.182, 5279.494, 13.3505, 1.640607, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4032) +(@OGUID+467 , 187573, 571, 1, 1, 2295.349, 5281.834, 13.3505, 6.056293, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 4032) +(@OGUID+468 , 187573, 0, 1, 1, -8985.27, 848.675, 29.6207, 0.9773831, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 5154) +(@OGUID+469 , 187573, 0, 1, 1, -8984.09, 849.971, 29.6206, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 5154) +(@OGUID+470 , 187573, 0, 1, 1, -9021.08, 887.325, 29.6183, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 187573 (Area: 5154) +(@OGUID+471 , 181354, 530, 1, 1, 1961.764, 6885.375, 162.7591, 1.082103, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3771) +(@OGUID+472 , 181354, 530, 1, 1, 1965.24, 6884.419, 162.7591, 4.206246, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3772) +(@OGUID+473 , 181354, 530, 1, 1, 1964.663, 6887.743, 162.7591, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3772) +(@OGUID+474 , 181354, 530, 1, 1, 2095.012, 6821.211, 174.8731, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3772) +(@OGUID+475 , 181354, 530, 1, 1, 2097.025, 6825.342, 174.8524, 4.380776, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3772) +(@OGUID+476 , 181354, 530, 1, 1, 2092.416, 6825.399, 174.8686, 0.3316107, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3772) +(@OGUID+477 , 181354, 530, 1, 1, 2089.096, 6768.958, 164.8599, 4.049168, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3772) +(@OGUID+478 , 181354, 530, 1, 1, 2093.987, 6769.731, 164.8697, 1.308995, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3772) +(@OGUID+479 , 181354, 530, 1, 1, 2092.187, 6765.44, 164.8475, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3772) +(@OGUID+480 , 181354, 530, 1, 1, 2991.37, 5483.188, 144.6114, 0.4188786, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3951) +(@OGUID+481 , 181354, 530, 1, 1, 2991.238, 5478.47, 144.5909, 5.759588, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3951) +(@OGUID+482 , 181354, 530, 1, 1, 2986.906, 5481.471, 144.5909, 1.012289, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3951) +(@OGUID+483 , 181354, 530, 1, 1, 3030.463, 5492.013, 147.1473, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3951) +(@OGUID+484 , 181354, 530, 1, 1, 3012.275, 5442.078, 147.5007, 4.415683, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3951) +(@OGUID+485 , 181354, 530, 1, 1, 3034.872, 5490.722, 147.1473, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3951) +(@OGUID+486 , 181354, 530, 1, 1, 3008.707, 5438.396, 147.5007, 6.0912, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3951) +(@OGUID+487 , 181354, 530, 1, 1, 3011.45, 5435.751, 147.5007, 1.919862, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3951) +(@OGUID+488 , 181354, 571, 1, 1, 2558.805, -1994.658, 0, 5.078908, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+489 , 181354, 571, 1, 1, 2571.232, -1981.536, 0, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+490 , 181354, 571, 1, 1, 2530.056, -2001.654, 0, 3.508117, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+491 , 181354, 571, 1, 1, 2564.62, -1902.94, 0, 1.204277, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+492 , 181354, 571, 1, 1, 2578.922, -1926.984, 0, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+493 , 181354, 571, 1, 1, 2604.877, -1833.523, 0, 1.099556, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+494 , 181354, 571, 1, 1, 2600.202, -1864.442, 0, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+495 , 181354, 571, 1, 1, 2604.255, -1901.251, 0, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+496 , 181354, 571, 1, 1, 2600.614, -1814.094, 0, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+497 , 181354, 571, 1, 1, 2415.667, -1854.533, 0, 2.687807, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+498 , 181354, 571, 1, 1, 2407.166, -1845.278, 0, 2.268925, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+499 , 181354, 571, 1, 1, 2414.991, -1875.148, 0, 4.258607, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+500 , 181354, 571, 1, 1, 2404.097, -1864.177, 0, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4242) +(@OGUID+501 , 181354, 571, 1, 1, 767.0814, -2846.513, 0, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3988) +(@OGUID+502 , 181354, 571, 1, 1, 793.7769, -2840.536, 0, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3988) +(@OGUID+503 , 181354, 571, 1, 1, 796.1247, -2842.772, 0, 1.658062, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3988) +(@OGUID+504 , 181354, 571, 1, 1, 794.0623, -2848.875, 0, 1.378809, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3988) +(@OGUID+505 , 181354, 571, 1, 1, 754.5249, -2854.845, 0, 2.932139, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3988) +(@OGUID+506 , 181354, 571, 1, 1, 765.928, -2820.402, 0, 5.794494, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3988) +(@OGUID+507 , 181354, 571, 1, 1, 2455.453, -5133.994, 275.5138, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4003) +(@OGUID+508 , 181354, 571, 1, 1, 2455.139, -5131.472, 275.5138, 3.769912, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4003) +(@OGUID+509 , 181354, 571, 1, 1, 2459.948, -5130.551, 275.5138, 0.3141584, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4003) +(@OGUID+510 , 181354, 571, 1, 1, 2380.471, -5088.479, 248.5613, 2.617989, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4003) +(@OGUID+511 , 181354, 571, 1, 1, 2485.646, -5000.984, 274.5577, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4003) +(@OGUID+512 , 181354, 571, 1, 1, 2502.854, -5015.77, 275.4288, 0.5759573, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4003) +(@OGUID+513 , 181354, 571, 1, 1, 2485.411, -5004.169, 274.5456, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4003) +(@OGUID+514 , 181354, 571, 1, 1, 2369.498, -5004.655, 248.5613, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4003) +(@OGUID+515 , 181354, 571, 1, 1, 2375.392, -5002.363, 248.5613, 1.658062, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4003) +(@OGUID+516 , 181354, 571, 1, 1, 2717.166, 869.525, 0, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+517 , 181354, 571, 1, 1, 2717.919, 866.1157, 0, 2.251473, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+518 , 181354, 571, 1, 1, 2700.923, 919.1116, 0, 1.308995, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+519 , 181354, 571, 1, 1, 2702.725, 934.8021, 0, 1.780234, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+520 , 181354, 571, 1, 1, 2668.09, 872.3976, 0, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+521 , 181354, 571, 1, 1, 2658.5, 918.8054, 0, 4.310966, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+522 , 181354, 571, 1, 1, 2666.374, 918.7291, 0, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+523 , 181354, 571, 1, 1, 2670.15, 871.2205, 0, 1.274088, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+524 , 181354, 571, 1, 1, 2626.058, 889.1933, 0, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+525 , 181354, 571, 1, 1, 2627.73, 887.0659, 0, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+526 , 181354, 571, 1, 1, 2627.751, 895.2178, 0, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4152) +(@OGUID+527 , 181354, 571, 1, 1, 3496.388, 1977.59, 65.96105, 5.969027, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 0) +(@OGUID+528 , 181354, 571, 1, 1, 3495.364, 1981.665, 66.03764, 5.235988, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 0) +(@OGUID+529 , 181354, 571, 1, 1, 3490.632, 1980.51, 65.99807, 5.113817, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 0) +(@OGUID+530 , 181354, 571, 1, 1, 5478.349, 4771.299, -198.9465, 3.892087, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4291) +(@OGUID+531 , 181354, 571, 1, 1, 5469.406, 4742.04, -198.9063, 4.97419, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4291) +(@OGUID+532 , 181354, 571, 1, 1, 5469.105, 4760.201, -198.9201, 0.2443456, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4291) +(@OGUID+533 , 181354, 571, 1, 1, 5467.913, 4754.535, -198.9201, 4.34587, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4291) +(@OGUID+534 , 181354, 571, 1, 1, 5445.94, 4761.356, -199.0263, 0.4537851, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4383) +(@OGUID+535 , 181354, 571, 1, 1, 5450.431, 4755.577, -198.9201, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4383) +(@OGUID+536 , 181354, 571, 1, 1, 5500.563, 5787.042, -82.11499, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4284) +(@OGUID+537 , 181354, 571, 1, 1, 5513.074, 5766.733, -84.07557, 1.099556, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4284) +(@OGUID+538 , 181354, 571, 1, 1, 5513.78, 5795.364, -80.6015, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4284) +(@OGUID+539 , 181354, 571, 1, 1, 5509.842, 5766.954, -84.06371, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4284) +(@OGUID+540 , 181354, 571, 1, 1, 5567.791, 5826.353, -73.64291, 5.759588, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4284) +(@OGUID+541 , 181354, 571, 1, 1, 5510.346, 5761.825, -84.18658, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4284) +(@OGUID+542 , 181354, 571, 1, 1, 5562.381, 5829.076, -73.01419, 4.520406, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4284) +(@OGUID+543 , 181354, 571, 1, 1, 5501.959, 5802.074, -79.23232, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4284) +(@OGUID+544 , 181354, 571, 1, 1, 2855.777, 4009.293, 0, 3.892087, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4113) +(@OGUID+545 , 181354, 571, 1, 1, 2916.701, 3999.391, 0, 2.216565, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4113) +(@OGUID+546 , 181354, 571, 1, 1, 2847.156, 4043.428, 0, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4113) +(@OGUID+547 , 181354, 571, 1, 1, 2909.401, 3987.22, 0, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4113) +(@OGUID+548 , 181354, 571, 1, 1, 2855.984, 4049.023, 0, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4113) +(@OGUID+549 , 181354, 571, 1, 1, 2848.714, 4049.8, 0, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 4113) +(@OGUID+550 , 181354, 530, 1, 1, 9890.715, -7214.22, 31.86613, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+551 , 181354, 530, 1, 1, 9850.549, -7216.786, 32.0508, 1.850049, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+552 , 181354, 530, 1, 1, 9883.755, -7223.828, 31.89215, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+553 , 181354, 530, 1, 1, 9850.072, -7193.472, 31.8566, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+554 , 181354, 530, 1, 1, 9861.693, -7203.565, 31.98161, 3.316144, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+555 , 181354, 530, 1, 1, 9871.146, -7211.522, 31.98824, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+556 , 181354, 530, 1, 1, 9889.951, -7200.953, 31.86972, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+557 , 181354, 530, 1, 1, 9860.642, -7225.191, 32.14094, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+558 , 181354, 530, 1, 1, 9857.701, -7186.151, 31.82882, 5.777041, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+559 , 181354, 530, 1, 1, 9881.252, -7191.335, 31.84415, 5.445428, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+560 , 181354, 530, 1, 1, 9870.332, -7184.636, 31.87049, 2.042035, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+561 , 181354, 530, 1, 1, 9825.888, -7237.287, 27.19095, 1.797689, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+562 , 181354, 530, 1, 1, 9830.139, -7251.79, 27.23245, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+563 , 181354, 530, 1, 1, 9838.824, -7231.604, 27.25398, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+564 , 181354, 530, 1, 1, 9848.271, -7239.6, 27.20893, 1.221729, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+565 , 181354, 530, 1, 1, 9844.719, -7253.453, 27.27034, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+566 , 181354, 530, 1, 1, 9561.597, -7129.251, 16.33114, 6.03884, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+567 , 181354, 530, 1, 1, 9558.121, -7144.923, 16.34306, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+568 , 181354, 530, 1, 1, 9552.82, -7127.345, 16.37856, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+569 , 181354, 530, 1, 1, 9548.759, -7142.452, 16.37524, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+570 , 181354, 530, 1, 1, 9564.466, -7138.307, 16.38212, 1.308995, 0, 0, 0, 1, 120, 255, 1), -- 181354 (Area: 3487) +(@OGUID+571 , 181358, 571, 1, 1, 5353.096, -2653.161, 310.5197, 3.857183, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 4275) +(@OGUID+572 , 181358, 571, 1, 1, 5391.959, -2692.568, 310.2863, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 4275) +(@OGUID+573 , 181358, 571, 1, 1, 3771.654, 1596.684, 107.9985, 5.009095, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 4165) +(@OGUID+574 , 181358, 571, 1, 1, 3787.579, 1624.979, 107.0998, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 4165) +(@OGUID+575 , 181358, 571, 1, 1, 2754.732, 6279.374, 181.2734, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 4129) +(@OGUID+576 , 181358, 530, 1, 1, 9698.271, -7053.018, 22.76448, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 3487) +(@OGUID+577 , 181358, 0, 1, 1, -8532.075, 1059.335, 28.8618, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 5409) +(@OGUID+578 , 181358, 0, 1, 1, -8475.304, 1051.581, 29.42984, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 0) +(@OGUID+579 , 181358, 530, 1, 1, -3989.117, -11849.08, 25.73339, 4.171338, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 0) +(@OGUID+580 , 181358, 530, 1, 1, -3864.285, -11742.65, -84.61896, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 0) +(@OGUID+581 , 181358, 530, 1, 1, -3966.45, -11587.63, -97.81689, 2.164206, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 0) +(@OGUID+582 , 181358, 530, 1, 1, -3966.363, -11588.18, -97.23402, 5.305802, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 0) +(@OGUID+583 , 181358, 530, 1, 1, -4011.885, -11672.07, -97.32943, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 0) +(@OGUID+584 , 181358, 530, 1, 1, -4014.815, -11671.7, -97.84743, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 181358 (Area: 0) +(@OGUID+585 , 181390, 530, 1, 1, -4063.597, 2172.937, 112.3214, 0.1047193, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 3745) +(@OGUID+586 , 181390, 530, 1, 1, -3006.309, 859.5955, -5.977011, 3.612838, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 3754) +(@OGUID+587 , 181390, 571, 1, 1, 7802.567, -2958.528, 1264.482, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 4441) +(@OGUID+588 , 181390, 571, 1, 1, 3281.508, -2289.553, 109.7592, 1.06465, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 4206) +(@OGUID+589 , 181390, 571, 1, 1, 3272.445, -2284.55, 109.6323, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 4206) +(@OGUID+590 , 181390, 571, 1, 1, 3194.855, -2292.016, 108.0624, 0.1745321, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 4206) +(@OGUID+591 , 181390, 571, 1, 1, 3264.85, -2273.001, 109.3768, 4.799657, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 4248) +(@OGUID+592 , 181390, 571, 1, 1, 2309.714, 5207.694, 20.94551, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 4115) +(@OGUID+593 , 181390, 571, 1, 1, 2296.557, 5212.993, 20.75707, 1.169369, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 4032) +(@OGUID+594 , 181390, 571, 1, 1, 2282.703, 5218.596, 20.9829, 1.221729, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 4032) +(@OGUID+595 , 181390, 571, 1, 1, 2264.359, 5199.473, 21.16698, 2.792518, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 4032) +(@OGUID+596 , 181390, 530, 1, 1, 9647.629, -7156.846, 35.76045, 4.590216, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 3487) +(@OGUID+597 , 181390, 530, 1, 1, 9669.65, -7135.431, 35.5114, 0.01745246, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 3487) +(@OGUID+598 , 181390, 530, 1, 1, 9627.514, -7135.065, 35.41454, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 3487) +(@OGUID+599 , 181390, 530, 1, 1, 9648.775, -7114.69, 35.3508, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 3487) +(@OGUID+600 , 181390, 0, 1, 1, -8805.121, 868.1832, 109.9552, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5390) +(@OGUID+601 , 181390, 0, 1, 1, -8745.31, 860.752, 111.098, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5390) +(@OGUID+602 , 181390, 0, 1, 1, -8857.83, 931.661, 113.084, 0.5759573, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5390) +(@OGUID+603 , 181390, 0, 1, 1, -8999.5, 865.915, 129.676, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5154) +(@OGUID+604 , 181390, 0, 1, 1, -9013.96, 872.141, 113.3, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5154) +(@OGUID+605 , 181390, 0, 1, 1, -9006.26, 877.905, 116.466, 1.448622, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5154) +(@OGUID+606 , 181390, 0, 1, 1, -9003.77, 862.552, 129.857, 5.026549, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5154) +(@OGUID+607 , 181390, 0, 1, 1, -8680.8, 461.089, 105.228, 5.375615, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5390) +(@OGUID+608 , 181390, 0, 1, 1, -8633.32, 421.481, 104.761, 2.216565, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5390) +(@OGUID+609 , 181390, 0, 1, 1, -8640.89, 415.503, 104.791, 2.216565, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5390) +(@OGUID+610 , 181390, 0, 1, 1, -8408.65, 635.033, 101.409, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5150) +(@OGUID+611 , 181390, 0, 1, 1, -8343.89, 654.082, 100.36, 3.892087, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5150) +(@OGUID+612 , 187576, 530, 1, 1, -158.5099, 5535.154, 31.47245, 3.525572, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3565) +(@OGUID+613 , 187576, 530, 1, 1, -154.7856, 5523.646, 31.50904, 3.47321, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3565) +(@OGUID+614 , 187576, 530, 1, 1, 1044.723, 7368.755, 43.1856, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3766) +(@OGUID+615 , 187576, 530, 1, 1, 1052.611, 7359.699, 42.62963, 0.8726639, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3766) +(@OGUID+616 , 187576, 530, 1, 1, 2016.857, 6885.055, 182.8496, 4.223697, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3772) +(@OGUID+617 , 187576, 530, 1, 1, 2944.679, 5466.702, 150.6358, 0, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3828) +(@OGUID+618 , 187576, 530, 1, 1, 3013.267, 5429.971, 148.0764, 0.5759573, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3951) +(@OGUID+619 , 187576, 530, 1, 1, 2188.357, 4795.172, 158.674, 4.921829, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+620 , 187576, 530, 1, 1, 2181.066, 4706.845, 159.5976, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+621 , 187576, 530, 1, 1, 2165.546, 4727.486, 159.5631, 2.268925, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+622 , 187576, 530, 1, 1, 2045.43, 4686.257, 153.306, 1.029743, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3844) +(@OGUID+623 , 187576, 530, 1, 1, 2032.304, 4663.961, 153.4191, 4.171338, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3844) +(@OGUID+624 , 187576, 530, 1, 1, -3009.571, 3998.962, 5.706537, 4.537859, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3684) +(@OGUID+625 , 187576, 530, 1, 1, -3002.449, 3997.882, 5.743727, 4.520406, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3684) +(@OGUID+626 , 187576, 530, 1, 1, -2991.61, 3988.035, 5.85871, 4.572764, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3684) +(@OGUID+627 , 187576, 530, 1, 1, -3026.769, 2565.998, 80.07526, 0.1396245, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3744) +(@OGUID+628 , 187576, 530, 1, 1, -3012.218, 2548.628, 79.43921, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3744) +(@OGUID+629 , 187576, 530, 1, 1, -2979.819, 2565.84, 79.82945, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3744) +(@OGUID+630 , 187576, 530, 1, 1, -2963.231, 2558.747, 80.31774, 2.617989, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3744) +(@OGUID+631 , 187576, 530, 1, 1, -3977.41, 2165.698, 106.9871, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3745) +(@OGUID+632 , 187576, 530, 1, 1, -4069.704, 2183.112, 108.5346, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3745) +(@OGUID+633 , 187576, 530, 1, 1, -4075.49, 2189.597, 111.462, 4.76475, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3745) +(@OGUID+634 , 187576, 530, 1, 1, -4064.588, 1124.245, 43.41816, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3938) +(@OGUID+635 , 187576, 530, 1, 1, -3061.328, 737.1945, -8.771701, 1.448622, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+636 , 187576, 571, 1, 1, 5820.163, 557.1407, 653.0472, 1.919862, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4395) +(@OGUID+637 , 187576, 571, 1, 1, 5813.242, 555.0104, 653.1141, 1.832595, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4395) +(@OGUID+638 , 187576, 571, 1, 1, 5828.393, 518.7396, 659.42, 5.026549, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4395) +(@OGUID+639 , 187576, 571, 1, 1, 5982.965, 599.3807, 651.8081, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4618) +(@OGUID+640 , 187576, 571, 1, 1, 5988.552, 613.9961, 651.6794, 2.687807, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4618) +(@OGUID+641 , 187576, 571, 1, 1, 5985.754, 606.6982, 651.8865, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4618) +(@OGUID+642 , 187576, 571, 1, 1, 5625.892, 702.7949, 653.3616, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4568) +(@OGUID+643 , 187576, 571, 1, 1, 5619.527, 688.4839, 653.2624, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4568) +(@OGUID+644 , 187576, 571, 1, 1, 5622.715, 695.6467, 653.2054, 5.864307, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4568) +(@OGUID+645 , 187576, 571, 1, 1, 5141.983, -2154.615, 244.3087, 0.05235888, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+646 , 187576, 571, 1, 1, 5179.932, -2192.024, 239.8268, 2.897245, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+647 , 187576, 571, 1, 1, 5111.679, -2201.835, 243.7792, 1.082103, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+648 , 187576, 571, 1, 1, 5196.897, -2215.816, 243.9398, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4317) +(@OGUID+649 , 187576, 571, 1, 1, 5193.838, -2203.542, 239.8356, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4317) +(@OGUID+650 , 187576, 571, 1, 1, 5526.034, -2669.764, 304.289, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4275) +(@OGUID+651 , 187576, 571, 1, 1, 5762.96, -3526.665, 391.1757, 3.979355, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+652 , 187576, 571, 1, 1, 5746.468, -3556.428, 390.0896, 6.056293, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4323) +(@OGUID+653 , 187576, 571, 1, 1, 5768.534, -3620.057, 389.5159, 3.42085, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4323) +(@OGUID+654 , 187576, 571, 1, 1, 5778.518, -3600.462, 387.3365, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4323) +(@OGUID+655 , 187576, 571, 1, 1, 6122.76, -1081.095, 406.5847, 4.76475, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4418) +(@OGUID+656 , 187576, 571, 1, 1, 6133.952, -1074.677, 406.6819, 1.483528, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4418) +(@OGUID+657 , 187576, 571, 1, 1, 6139.989, -1079.811, 405.7787, 0.087266, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4418) +(@OGUID+658 , 187576, 571, 1, 1, 6121.725, -1096.696, 406.5187, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4418) +(@OGUID+659 , 187576, 571, 1, 1, 6105.763, -1080.907, 407.3781, 3.228859, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4418) +(@OGUID+660 , 187576, 571, 1, 1, 6111.217, -1074.599, 407.2788, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4418) +(@OGUID+661 , 187576, 571, 1, 1, 6122.866, -1073.905, 407.455, 1.640607, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4418) +(@OGUID+662 , 187576, 571, 1, 1, 6193.209, -1053.005, 410.5604, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4418) +(@OGUID+663 , 187576, 571, 1, 1, 7856.078, -735.8157, 1178.389, 0.122173, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+664 , 187576, 571, 1, 1, 8433.876, -362.944, 908.5649, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+665 , 187576, 571, 1, 1, 8418.453, -349.0424, 909.3304, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+666 , 187576, 571, 1, 1, 8473.581, -342.7954, 906.4036, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+667 , 187576, 571, 1, 1, 8863.629, -1319.788, 1033.377, 4.886924, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4445) +(@OGUID+668 , 187576, 571, 1, 1, 7795.137, -2808.116, 1217.756, 4.415683, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4463) +(@OGUID+669 , 187576, 571, 1, 1, 7817.069, -2963.269, 1259.725, 0.5410506, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4441) +(@OGUID+670 , 187576, 571, 1, 1, 4608.65, -4233.896, 181.3112, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+671 , 187576, 571, 1, 1, 4583.46, -4214.486, 178.712, 5.096362, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+672 , 187576, 571, 1, 1, 4588.769, -4259.397, 183.0127, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+673 , 187576, 571, 1, 1, 4545.505, -4198.653, 174.6676, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+674 , 187576, 571, 1, 1, 4525.026, -4220.745, 171.4343, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+675 , 187576, 571, 1, 1, 4524.598, -4165.28, 174.0965, 2.879789, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4159) +(@OGUID+676 , 187576, 571, 1, 1, 4516.881, -4237.698, 172.0961, 3.316144, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4159) +(@OGUID+677 , 187576, 571, 1, 1, 4530.678, -4141.924, 175.9093, 2.321287, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4159) +(@OGUID+678 , 187576, 571, 1, 1, 4456.922, -4314.456, 160.9202, 4.572764, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4159) +(@OGUID+679 , 187576, 571, 1, 1, 3876.39, -4523.813, 218.0925, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4205) +(@OGUID+680 , 187576, 571, 1, 1, 3454.602, -2802.049, 202.4846, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+681 , 187576, 571, 1, 1, 3259.021, -2267.587, 114.378, 2.007128, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4248) +(@OGUID+682 , 187576, 571, 1, 1, 3263.253, -2264.287, 115.0179, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4206) +(@OGUID+683 , 187576, 571, 1, 1, 3095.98, -2049.74, 86.23113, 3.089183, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4206) +(@OGUID+684 , 187576, 571, 1, 1, 3096.859, -2049.747, 86.25437, 6.248279, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4206) +(@OGUID+685 , 187576, 571, 1, 1, 737.0417, -2925.07, 7.038448, 5.969027, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3987) +(@OGUID+686 , 187576, 571, 1, 1, 737.8021, -2929.837, 6.96212, 0.5934101, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3987) +(@OGUID+687 , 187576, 571, 1, 1, 789.0579, -2887.322, 6.061472, 4.276057, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3987) +(@OGUID+688 , 187576, 571, 1, 1, 2472.168, -5058.874, 292.4872, 6.178466, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4003) +(@OGUID+689 , 187576, 571, 1, 1, 2472.029, -5066.281, 286.0714, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4003) +(@OGUID+690 , 187576, 571, 1, 1, 2474.881, -5069.709, 286.0041, 3.839725, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4003) +(@OGUID+691 , 187576, 571, 1, 1, 2499.964, -5059.02, 286.9637, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4003) +(@OGUID+692 , 187576, 571, 1, 1, 2491.536, -5071.006, 298.8146, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4003) +(@OGUID+693 , 187576, 571, 1, 1, 2653.467, -4398.361, 284.5294, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+694 , 187576, 571, 1, 1, 2645.279, -4389.678, 283.9462, 0.1047193, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+695 , 187576, 571, 1, 1, 3647.875, -707.9075, 217.1875, 6.178466, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4177) +(@OGUID+696 , 187576, 571, 1, 1, 3644.348, -723.9233, 218.8718, 1.448622, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4177) +(@OGUID+697 , 187576, 571, 1, 1, 3658.615, -719.4378, 218.7648, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4177) +(@OGUID+698 , 187576, 571, 1, 1, 3720.316, -705.8351, 216.0074, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4177) +(@OGUID+699 , 187576, 571, 1, 1, 3713.571, -686.2274, 216.503, 4.450591, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4177) +(@OGUID+700 , 187576, 571, 1, 1, 2791.102, 904.5616, 23.04511, 1.256636, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4152) +(@OGUID+701 , 187576, 571, 1, 1, 2787.111, 910.8663, 32.01936, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4152) +(@OGUID+702 , 187576, 571, 1, 1, 2798.089, 941.0677, 24.67208, 0.3141584, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4152) +(@OGUID+703 , 187576, 571, 1, 1, 2792.32, 944.9219, 23.26566, 1.151916, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4152) +(@OGUID+704 , 187576, 571, 1, 1, 2756.885, 920.0313, 24.40833, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4152) +(@OGUID+705 , 187576, 571, 1, 1, 2756.815, 926.7635, 23.2116, 2.984498, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4152) +(@OGUID+706 , 187576, 571, 1, 1, 2742.9, 887.7947, 6.358366, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4152) +(@OGUID+707 , 187576, 571, 1, 1, 2713.987, 894.1632, 16.31461, 2.059488, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4152) +(@OGUID+708 , 187576, 571, 1, 1, 2732.103, 881.1441, 6.379679, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4152) +(@OGUID+709 , 187576, 571, 1, 1, 3612.027, 1412.47, 92.60597, 4.852017, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4154) +(@OGUID+710 , 187576, 571, 1, 1, 3827.736, 1496.177, 95.10645, 6.213374, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+711 , 187576, 571, 1, 1, 3827.11, 1482.655, 95.12893, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+712 , 187576, 571, 1, 1, 3825.417, 1465.946, 95.10252, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+713 , 187576, 571, 1, 1, 3842.333, 1481.939, 97.79363, 1.640607, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+714 , 187576, 571, 1, 1, 3859.411, 1466.078, 94.9991, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+715 , 187576, 571, 1, 1, 3857.144, 1496.144, 95.12449, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+716 , 187576, 571, 1, 1, 3857.466, 1482.773, 96.1758, 1.623156, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+717 , 187576, 571, 1, 1, 3770.23, 1602.427, 95.77409, 5.044002, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4165) +(@OGUID+718 , 187576, 571, 1, 1, 3781.036, 1623.459, 95.58131, 0.4363316, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4165) +(@OGUID+719 , 187576, 571, 1, 1, 3553.18, 1827.47, 81.077, 4.310966, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+720 , 187576, 571, 1, 1, 3643.384, 1884.3, 80.81538, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+721 , 187576, 571, 1, 1, 4967.139, 1265.599, 227.7066, 4.869471, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4170) +(@OGUID+722 , 187576, 571, 1, 1, 4971.71, 1267.167, 228.3888, 5.096362, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4170) +(@OGUID+723 , 187576, 571, 1, 1, 5009.385, 1205.95, 231.4591, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4170) +(@OGUID+724 , 187576, 571, 1, 1, 4942.589, 1170.193, 239.8133, 4.97419, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4170) +(@OGUID+725 , 187576, 571, 1, 1, 4951.857, 1167.702, 240.1477, 4.206246, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4170) +(@OGUID+726 , 187576, 571, 1, 1, 4937.846, 1158.604, 240.5038, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4170) +(@OGUID+727 , 187576, 571, 1, 1, 5482.611, 4728.695, -191.6311, 1.221729, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4291) +(@OGUID+728 , 187576, 571, 1, 1, 4475.266, 5707.764, 82.36211, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4122) +(@OGUID+729 , 187576, 571, 1, 1, 4470.285, 5710.635, 82.27143, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4122) +(@OGUID+730 , 187576, 571, 1, 1, 4111.603, 5303.919, 31.3832, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+731 , 187576, 571, 1, 1, 3449.408, 4085.986, 17.83682, 1.815142, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4037) +(@OGUID+732 , 187576, 571, 1, 1, 3026.245, 4045.878, 28.50895, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4113) +(@OGUID+733 , 187576, 571, 1, 1, 2980.379, 4053.99, 28.38085, 3.089183, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4113) +(@OGUID+734 , 187576, 571, 1, 1, 3007.164, 4071.765, 35.89487, 1.553341, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4113) +(@OGUID+735 , 187576, 571, 1, 1, 2279.208, 5188.578, 16.22224, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4115) +(@OGUID+736 , 187576, 571, 1, 1, 2288.109, 5196.549, 14.44638, 1.169369, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4115) +(@OGUID+737 , 187576, 571, 1, 1, 2924.559, 6242.063, 209.8437, 2.687807, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4129) +(@OGUID+738 , 187576, 571, 1, 1, 2924.903, 6244.5, 210.3616, 3.42085, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 4129) +(@OGUID+739 , 187576, 530, 1, 1, -4227.08, -12484.05, 47.71632, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+740 , 187576, 530, 1, 1, -4231.724, -12498.08, 47.24671, 2.635444, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 0) +(@OGUID+741 , 187576, 530, 1, 1, -4207.997, -12557.59, 46.31153, 4.886924, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3576) +(@OGUID+742 , 187576, 530, 1, 1, -4183.172, -12564.08, 45.20827, 4.502952, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3576) +(@OGUID+743 , 187576, 530, 1, 1, -4122.453, -12463.12, 48.0975, 3.842447, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3576) +(@OGUID+744 , 187576, 530, 1, 1, -4105.227, -12501.2, 47.79556, 0.5759573, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3576) +(@OGUID+745 , 187576, 530, 1, 1, -4107.671, -12483.03, 47.42568, 6.213374, 0, 0, 0, 1, 120, 255, 1), -- 187576 (Area: 3576) +(@OGUID+746 , 181401, 530, 1, 1, -2138.824, 5148.72, -8.640973, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 0) +(@OGUID+747 , 181401, 530, 1, 1, -2013.85, 5671.153, 104.9756, 3.595379, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3898) +(@OGUID+748 , 181401, 530, 1, 1, -1934.761, 5896.532, 150.6684, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 0) +(@OGUID+749 , 181401, 530, 1, 1, -1942.879, 5914.961, 156.5788, 5.166176, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 0) +(@OGUID+750 , 181401, 530, 1, 1, -341.6888, 5481.863, 37.94325, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3521) +(@OGUID+751 , 181401, 530, 1, 1, -337.4103, 5481.802, 37.91649, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3521) +(@OGUID+752 , 181401, 530, 1, 1, -175.3683, 5512.138, 33.37462, 5.026549, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3565) +(@OGUID+753 , 181401, 530, 1, 1, -186.2492, 5519.735, 33.73346, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3565) +(@OGUID+754 , 181401, 530, 1, 1, -181.5449, 5532.257, 33.22929, 1.884953, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3565) +(@OGUID+755 , 181401, 530, 1, 1, -159.9268, 5517.314, 33.24236, 5.026549, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3565) +(@OGUID+756 , 181401, 530, 1, 1, -155.342, 5529.741, 33.96249, 0.3141584, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3565) +(@OGUID+757 , 181401, 530, 1, 1, -166.1566, 5537.293, 33.22692, 1.884953, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3565) +(@OGUID+758 , 181401, 530, 1, 1, 1044.882, 7361.025, 45.56539, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3766) +(@OGUID+759 , 181401, 530, 1, 1, 2085.431, 6890.104, 190.4657, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3772) +(@OGUID+760 , 181401, 530, 1, 1, 2095.052, 6899.62, 190.4382, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3772) +(@OGUID+761 , 181401, 530, 1, 1, 2944.296, 5533.428, 163.821, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3828) +(@OGUID+762 , 181401, 530, 1, 1, 2940.299, 5415.802, 165.9382, 4.084071, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3951) +(@OGUID+763 , 181401, 530, 1, 1, 3085.633, 5473.628, 162.5824, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3951) +(@OGUID+764 , 181401, 530, 1, 1, 2090.407, 4769.771, 175.6497, 4.921829, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3844) +(@OGUID+765 , 181401, 530, 1, 1, 2078.747, 4789.831, 175.6968, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3844) +(@OGUID+766 , 181401, 530, 1, 1, 2092.127, 4792.164, 175.6362, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3844) +(@OGUID+767 , 181401, 530, 1, 1, 2098.946, 4779.432, 175.5325, 6.178466, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3844) +(@OGUID+768 , 181401, 530, 1, 1, 2948.536, 3719.698, 150.2694, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 0) +(@OGUID+769 , 181401, 530, 1, 1, 3018.137, 3748.76, 151.2779, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3712) +(@OGUID+770 , 181401, 530, 1, 1, 3116.458, 3688.845, 150.6044, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3712) +(@OGUID+771 , 181401, 530, 1, 1, 4118.572, 2954.05, 360.3641, 1.605702, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3738) +(@OGUID+772 , 181401, 530, 1, 1, 4116.873, 3058.359, 349.9748, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3738) +(@OGUID+773 , 181401, 530, 1, 1, 4184.254, 3009.556, 349.8448, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3738) +(@OGUID+774 , 181401, 530, 1, 1, 2969.402, 1791.448, 145.6347, 3.769912, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3728) +(@OGUID+775 , 181401, 530, 1, 1, 2984.813, 1803.785, 146.0861, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3728) +(@OGUID+776 , 181401, 530, 1, 1, -699.2603, 2709.337, 101.0987, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3538) +(@OGUID+777 , 181401, 530, 1, 1, -690.3901, 2717.364, 101.012, 0, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3538) +(@OGUID+778 , 181401, 530, 1, 1, -716.8414, 2735.047, 100.798, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3538) +(@OGUID+779 , 181401, 530, 1, 1, -717.3152, 2750.212, 100.8153, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3538) +(@OGUID+780 , 181401, 530, 1, 1, -690.6761, 2732.448, 100.9171, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3538) +(@OGUID+781 , 181401, 530, 1, 1, 203.049, 4333.749, 125.1613, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3552) +(@OGUID+782 , 181401, 530, 1, 1, -3099.529, 2512.387, 75.96468, 3.490667, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+783 , 181401, 530, 1, 1, -3097.624, 2522.847, 75.95374, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+784 , 181401, 530, 1, 1, -3088.047, 2526.28, 75.9549, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+785 , 181401, 530, 1, 1, -3081.95, 2509.127, 75.9601, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+786 , 181401, 530, 1, 1, -3092.005, 2502.068, 76.35168, 4.555311, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+787 , 181401, 530, 1, 1, -3080.017, 2519.666, 75.95196, 0.3490652, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+788 , 181401, 530, 1, 1, -2980.738, 2565.908, 97.9761, 2.705255, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+789 , 181401, 530, 1, 1, -2963.106, 2578.467, 97.77729, 1.658062, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+790 , 181401, 530, 1, 1, -2978.653, 2545.87, 97.51945, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+791 , 181401, 530, 1, 1, -2944.712, 2569.651, 97.11517, 0.6108634, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+792 , 181401, 530, 1, 1, -2960.054, 2536.851, 96.74974, 4.81711, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+793 , 181401, 530, 1, 1, -2943.146, 2549.089, 96.68553, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3744) +(@OGUID+794 , 181401, 530, 1, 1, -4053.135, 2167.243, 117.8958, 0.01745246, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3745) +(@OGUID+795 , 181401, 530, 1, 1, -4063.405, 2159.092, 117.9386, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3745) +(@OGUID+796 , 181401, 530, 1, 1, -4063.29, 2183.958, 117.962, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3745) +(@OGUID+797 , 181401, 530, 1, 1, -4044.765, 2237.184, 118.0772, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3745) +(@OGUID+798 , 181401, 530, 1, 1, -3956.793, 2241.567, 107.9687, 4.572764, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3745) +(@OGUID+799 , 181401, 530, 1, 1, -4114.495, 1119.618, 52.38124, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3938) +(@OGUID+800 , 181401, 530, 1, 1, -3006.023, 795.2581, -1.891022, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3754) +(@OGUID+801 , 181401, 571, 1, 1, 5427.162, -2601.81, 310.7791, 1.553341, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+802 , 181401, 571, 1, 1, 5427.37, -2617.239, 310.7862, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+803 , 181401, 571, 1, 1, 5465.976, -2609.939, 310.7266, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+804 , 181401, 571, 1, 1, 5418.945, -2609.535, 310.7752, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+805 , 181401, 571, 1, 1, 5474.365, -2602.701, 310.6908, 1.553341, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+806 , 181401, 571, 1, 1, 5435.416, -2610.136, 310.76, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+807 , 181401, 571, 1, 1, 5473.117, -2618.065, 310.7838, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+808 , 181401, 571, 1, 1, 5482.347, -2610.531, 310.6789, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+809 , 181401, 571, 1, 1, 5426.538, -2647.546, 310.7589, 1.553341, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+810 , 181401, 571, 1, 1, 5418.217, -2654.892, 310.6752, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+811 , 181401, 571, 1, 1, 5472.982, -2649.109, 310.3139, 1.623156, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+812 , 181401, 571, 1, 1, 5481.421, -2655.851, 310.4912, 0, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4275) +(@OGUID+813 , 181401, 571, 1, 1, 5779.607, -3647.157, 397.0788, 4.81711, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4323) +(@OGUID+814 , 181401, 571, 1, 1, 3415.612, -2804.818, 207.8745, 5.340709, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 0) +(@OGUID+815 , 181401, 571, 1, 1, 3426.07, -2797.111, 207.806, 5.340709, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 0) +(@OGUID+816 , 181401, 571, 1, 1, 3404.855, -2779.617, 207.3744, 2.216565, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4204) +(@OGUID+817 , 181401, 571, 1, 1, 3248.334, -2376.13, 125.8163, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4217) +(@OGUID+818 , 181401, 571, 1, 1, 3220.808, -2360.816, 129.0979, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4217) +(@OGUID+819 , 181401, 571, 1, 1, 3272.992, -2376.118, 126.1801, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4217) +(@OGUID+820 , 181401, 571, 1, 1, 3313.64, -2339.259, 135.3806, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 0) +(@OGUID+821 , 181401, 571, 1, 1, 3207.483, -2339.074, 129.0386, 0.5410506, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 0) +(@OGUID+822 , 181401, 571, 1, 1, 3194.915, -2304.803, 131.4482, 0.157079, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4206) +(@OGUID+823 , 181401, 571, 1, 1, 3191.102, -2279.254, 131.5012, 0.1396245, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4248) +(@OGUID+824 , 181401, 571, 1, 1, 3331.027, -2305.595, 137.5376, 2.705255, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4248) +(@OGUID+825 , 181401, 571, 1, 1, 3342.094, -2281.307, 137.6798, 2.705255, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4248) +(@OGUID+826 , 181401, 571, 1, 1, 3351.668, -2245.885, 137.426, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4206) +(@OGUID+827 , 181401, 571, 1, 1, 3325.675, -2187.142, 134.1245, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4206) +(@OGUID+828 , 181401, 571, 1, 1, 2495.748, -1930.493, 18.89087, 0.5934101, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4242) +(@OGUID+829 , 181401, 571, 1, 1, 2510.754, -1823.163, 18.16746, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4242) +(@OGUID+830 , 181401, 571, 1, 1, 2508.891, -1811.156, 18.57204, 0.802851, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4242) +(@OGUID+831 , 181401, 571, 1, 1, 2482.121, -1838.097, 19.10611, 3.926996, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4242) +(@OGUID+832 , 181401, 571, 1, 1, 2493.719, -1840.646, 18.18876, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4242) +(@OGUID+833 , 181401, 571, 1, 1, 2502.159, -1831.973, 18.18279, 5.480334, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4242) +(@OGUID+834 , 181401, 571, 1, 1, 4568.499, 1399.641, 198.2307, 0.01745246, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4169) +(@OGUID+835 , 181401, 571, 1, 1, 4522.387, 5716.762, 86.95365, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4122) +(@OGUID+836 , 181401, 571, 1, 1, 4505.328, 5718.376, 87.04783, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4122) +(@OGUID+837 , 181401, 571, 1, 1, 4520.103, 5699.374, 86.98763, 5.375615, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4122) +(@OGUID+838 , 181401, 571, 1, 1, 4502.594, 5701.009, 86.9327, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 4122) +(@OGUID+839 , 181401, 530, 1, 1, 9954.997, -7098.571, 59.86189, 3.996807, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3487) +(@OGUID+840 , 181401, 530, 1, 1, 10007.34, -7030.903, 57.97285, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3487) +(@OGUID+841 , 181401, 530, 1, 1, 10002.23, -7202.467, 44.06782, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3487) +(@OGUID+842 , 181401, 530, 1, 1, 9992.33, -7205.063, 44.06255, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3487) +(@OGUID+843 , 181401, 530, 1, 1, 10010.68, -7199.167, 44.22095, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3487) +(@OGUID+844 , 181401, 530, 1, 1, 9952.419, -7232.268, 43.9028, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3487) +(@OGUID+845 , 181401, 530, 1, 1, 9945.498, -7242.049, 43.90578, 2.792518, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 3487) +(@OGUID+846 , 181401, 0, 1, 1, -8892.52, 867.236, 109.002, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5390) +(@OGUID+847 , 181401, 0, 1, 1, -8914.21, 995.188, 129.577, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5390) +(@OGUID+848 , 181401, 0, 1, 1, -8937.31, 861.234, 119.3, 6.213374, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5154) +(@OGUID+849 , 181401, 0, 1, 1, -8948.17, 861.865, 119.265, 2.967041, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5154) +(@OGUID+850 , 181401, 0, 1, 1, -8623, 413.575, 114.802, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5390) +(@OGUID+851 , 181401, 0, 1, 1, -8616.79, 405.722, 114.684, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5390) +(@OGUID+852 , 181401, 0, 1, 1, -8610.86, 398.378, 114.794, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5390) +(@OGUID+853 , 181401, 0, 1, 1, -8605.4, 391.313, 114.686, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5149) +(@OGUID+854 , 181401, 0, 1, 1, -8341.17, 615.349, 104.273, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5150) +(@OGUID+855 , 181401, 0, 1, 1, -8523.936, 930.3209, 108.977, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5346) +(@OGUID+856 , 181401, 0, 1, 1, -8630.926, 945.2589, 136.5359, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5151) +(@OGUID+857 , 181401, 0, 1, 1, -8578.42, 986.8, 133.948, 0.6806767, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 5151) +(@OGUID+858 , 181389, 530, 1, 1, -263.8385, 5499.673, 50.41258, 3.717554, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3565) +(@OGUID+859 , 181389, 530, 1, 1, -260.162, 5513.389, 50.63232, 2.164206, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3565) +(@OGUID+860 , 181389, 530, 1, 1, -250.3394, 5496.269, 50.57555, 5.305802, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3565) +(@OGUID+861 , 181389, 530, 1, 1, -247.4611, 5509.375, 50.50355, 0.5759573, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3565) +(@OGUID+862 , 181389, 530, 1, 1, 282.604, 6088.575, 141.4437, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+863 , 181389, 530, 1, 1, -655.4515, 2575.622, 83.57739, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+864 , 181389, 530, 1, 1, -632.5417, 2590.197, 83.52296, 5.305802, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+865 , 181389, 530, 1, 1, -761.4095, 2621.017, 118.6791, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3538) +(@OGUID+866 , 181389, 530, 1, 1, -784.1385, 2658.919, 119.216, 0.5410506, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3538) +(@OGUID+867 , 181389, 530, 1, 1, -2603.052, 4419.237, 49.35944, 5.096362, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+868 , 181389, 530, 1, 1, -2649.044, 4426.315, 49.63846, 3.979355, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3683) +(@OGUID+869 , 181389, 530, 1, 1, -2591.57, 4496.896, 49.60318, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3683) +(@OGUID+870 , 181389, 530, 1, 1, -2665.083, 4468.276, 49.83411, 2.984498, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3683) +(@OGUID+871 , 181389, 530, 1, 1, -2637.212, 4503.528, 49.73413, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3683) +(@OGUID+872 , 181389, 530, 1, 1, -2996.48, 3977.195, 18.39971, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3684) +(@OGUID+873 , 181389, 530, 1, 1, -2991.834, 3970.603, 18.19912, 6.143561, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3684) +(@OGUID+874 , 181389, 530, 1, 1, -2997.844, 3965.778, 18.08171, 4.555311, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3684) +(@OGUID+875 , 181389, 530, 1, 1, -3002.288, 3972.225, 18.59078, 3.001947, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3684) +(@OGUID+876 , 181389, 530, 1, 1, -2969.582, 2560.962, 107.134, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3744) +(@OGUID+877 , 181389, 530, 1, 1, -3882.012, 2085.141, 99.7375, 5.759588, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3745) +(@OGUID+878 , 181389, 530, 1, 1, -3891.201, 2089.942, 100.3711, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3745) +(@OGUID+879 , 181389, 530, 1, 1, -3923.835, 2072.333, 100.5962, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3745) +(@OGUID+880 , 181389, 530, 1, 1, -3922.777, 2062.049, 100.1208, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3745) +(@OGUID+881 , 181389, 571, 1, 1, 5606.066, -662.3932, 232.8057, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4557) +(@OGUID+882 , 181389, 571, 1, 1, 5422.828, -2574.388, 314.5182, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4275) +(@OGUID+883 , 181389, 571, 1, 1, 5490.349, -2575.417, 313.0533, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4275) +(@OGUID+884 , 181389, 571, 1, 1, 4524.684, -4252.019, 177.0246, 2.687807, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+885 , 181389, 571, 1, 1, 4532.347, -4148.53, 182.7989, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4159) +(@OGUID+886 , 181389, 571, 1, 1, 3881.886, -4516.897, 223.7292, 3.211419, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4205) +(@OGUID+887 , 181389, 571, 1, 1, 3431.319, -2776.561, 215.7577, 0.6457717, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4204) +(@OGUID+888 , 181389, 571, 1, 1, 3282.833, -2368.123, 117.8988, 3.42085, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4217) +(@OGUID+889 , 181389, 571, 1, 1, 3293.471, -2350.238, 117.6907, 1.884953, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4217) +(@OGUID+890 , 181389, 571, 1, 1, 3311.093, -2361.425, 117.9167, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4217) +(@OGUID+891 , 181389, 571, 1, 1, 3300.602, -2378.899, 117.8947, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4217) +(@OGUID+892 , 181389, 571, 1, 1, 3193.161, -2253.913, 117.8538, 1.727875, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4248) +(@OGUID+893 , 181389, 571, 1, 1, 3191.496, -2233.637, 117.8115, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4248) +(@OGUID+894 , 181389, 571, 1, 1, 3207.165, -2204.585, 142.3003, 5.253442, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4206) +(@OGUID+895 , 181389, 571, 1, 1, 3187.294, -2198.184, 141.9457, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4206) +(@OGUID+896 , 181389, 571, 1, 1, 3346.118, -2225.082, 119.375, 2.042035, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4206) +(@OGUID+897 , 181389, 571, 1, 1, 3336.534, -2207.365, 120.0341, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4206) +(@OGUID+898 , 181389, 571, 1, 1, 3193.716, -2178.347, 141.7413, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4206) +(@OGUID+899 , 181389, 571, 1, 1, 1390.88, -3366.663, 194.8545, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3998) +(@OGUID+900 , 181389, 571, 1, 1, 1350.993, -3356.948, 196.8577, 1.343901, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 3998) +(@OGUID+901 , 181389, 571, 1, 1, 3232.417, -718.9236, 167.9964, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+902 , 181389, 571, 1, 1, 3599.903, -757.4666, 199.1967, 4.76475, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+903 , 181389, 571, 1, 1, 3557.501, -768.2603, 203.7256, 5.113817, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+904 , 181389, 571, 1, 1, 3641.374, -671.6805, 245.1112, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+905 , 181389, 571, 1, 1, 3628.027, -668.0167, 244.9439, 3.892087, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+906 , 181389, 571, 1, 1, 3647.813, -648.9062, 243.9453, 0.7679439, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+907 , 181389, 571, 1, 1, 3634.617, -644.8275, 244.1315, 1.797689, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+908 , 181389, 571, 1, 1, 3650.591, -754.5084, 201.8451, 4.555311, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+909 , 181389, 571, 1, 1, 3695.235, -765.3697, 202.1208, 4.415683, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+910 , 181389, 571, 1, 1, 3767.403, -747.8274, 211.6567, 4.34587, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+911 , 181389, 571, 1, 1, 3743.8, -773.8577, 209.3841, 0.7853968, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+912 , 181389, 571, 1, 1, 3800.189, -817.2236, 208.8302, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+913 , 181389, 571, 1, 1, 3815.78, -754.2736, 213.8814, 4.81711, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+914 , 181389, 571, 1, 1, 3779.269, -809.5614, 209.6387, 0.802851, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+915 , 181389, 571, 1, 1, 3826.977, -809.4998, 208.5766, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+916 , 181389, 571, 1, 1, 3809.892, -826.8338, 208.5438, 4.433136, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+917 , 181389, 571, 1, 1, 3816.917, -800.0577, 208.6812, 1.308995, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+918 , 181389, 571, 1, 1, 3847.43, -835.5692, 200.8211, 5.096362, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+919 , 181389, 571, 1, 1, 3807.228, -855.2426, 203.9786, 5.201083, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+920 , 181389, 571, 1, 1, 3797.328, -852.065, 204.1598, 3.630291, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+921 , 181389, 571, 1, 1, 3893.384, -829.6746, 205.0926, 5.218536, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+922 , 181389, 571, 1, 1, 3928.128, -732.9033, 262.2497, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+923 , 181389, 571, 1, 1, 3893.759, -696.3032, 261.979, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+924 , 181389, 571, 1, 1, 3966.297, -733.6108, 257.4371, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+925 , 181389, 571, 1, 1, 3905.213, -659.3301, 257.8033, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4177) +(@OGUID+926 , 181389, 571, 1, 1, 3635.294, 245.6354, 58.86659, 0.06981169, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4161) +(@OGUID+927 , 181389, 571, 1, 1, 3465.233, 228.1736, 59.31886, 3.263772, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4161) +(@OGUID+928 , 181389, 571, 1, 1, 3457.301, 300.75, 59.31886, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4161) +(@OGUID+929 , 181389, 571, 1, 1, 3628.324, 318.184, 59.31886, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4161) +(@OGUID+930 , 181389, 571, 1, 1, 3665.188, 265.6042, -109.3723, 0.1745321, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4161) +(@OGUID+931 , 181389, 571, 1, 1, 3661.484, 303.9514, -109.4306, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4161) +(@OGUID+932 , 181389, 571, 1, 1, 3775.937, 1543.239, 90.97485, 5.096362, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+933 , 181389, 571, 1, 1, 3784.709, 1522.594, 91.5054, 2.007128, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+934 , 181389, 571, 1, 1, 3865.47, 1634.12, 93.62034, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4165) +(@OGUID+935 , 181389, 571, 1, 1, 3876.293, 1616.893, 93.54786, 2.059488, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4165) +(@OGUID+936 , 181389, 571, 1, 1, 3466.604, 4204.274, 36.17081, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4037) +(@OGUID+937 , 181389, 571, 1, 1, 2330.237, 5169.872, 25.637, 1.832595, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4115) +(@OGUID+938 , 181389, 571, 1, 1, 2288.474, 5160.943, 25.54812, 4.34587, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4115) +(@OGUID+939 , 181389, 571, 1, 1, 2293.54, 5174.718, 25.11965, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4115) +(@OGUID+940 , 181389, 571, 1, 1, 2362.819, 5195.901, 19.76927, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4115) +(@OGUID+941 , 181389, 571, 1, 1, 2373.82, 5235.902, 20.25008, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4032) +(@OGUID+942 , 181389, 571, 1, 1, 2361.502, 5274.709, 25.85167, 3.525572, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 4032) +(@OGUID+943 , 181389, 530, 1, 1, -4036.067, -11724.26, -125.3355, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+944 , 181389, 530, 1, 1, -4129.516, -11792.52, -122.0234, 2.268925, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+945 , 181389, 530, 1, 1, -3907.011, -11840.65, -17.3894, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+946 , 181389, 530, 1, 1, -3949.172, -11719.73, -231.7634, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+947 , 181389, 530, 1, 1, -3906.889, -11740.66, -247.1549, 1.448622, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+948 , 181389, 530, 1, 1, -3845.706, -11764.55, -72.85789, 5.375615, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+949 , 181389, 530, 1, 1, -3838.579, -11819.76, -46.66968, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+950 , 181389, 530, 1, 1, -3794.911, -11730.61, -93.07029, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+951 , 181389, 530, 1, 1, -3861.939, -11726.7, -264.6633, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+952 , 181389, 530, 1, 1, -3840.368, -11683.53, -278.9308, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+953 , 181389, 530, 1, 1, -3855.357, -11639.21, -293.8783, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+954 , 181389, 530, 1, 1, -3855.823, -11639.53, -169.8095, 3.961899, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+955 , 181389, 530, 1, 1, -3783.918, -11674.64, -93.70945, 3.246347, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+956 , 181389, 530, 1, 1, -3905.837, -11628.61, -302.9813, 6.178466, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+957 , 181389, 530, 1, 1, -3897.788, -11618.37, -185.5837, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+958 , 181389, 530, 1, 1, -3942.769, -11633, -199.4732, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+959 , 181389, 530, 1, 1, -3964.059, -11674.84, -216.94, 0.1047193, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+960 , 181389, 530, 1, 1, -3905.153, -11333.2, -121.9205, 5.183629, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+961 , 181389, 530, 1, 1, -3871.696, -11319.82, -121.6228, 5.078908, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+962 , 181389, 530, 1, 1, -3662.133, -11453.98, -113.087, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 0) +(@OGUID+963 , 181393, 530, 1, 1, -2282.402, 5556.487, 71.11912, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+964 , 181393, 530, 1, 1, -2274.591, 5580.758, 71.46299, 5.427975, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+965 , 181393, 530, 1, 1, -183.2504, 5514.362, 30.78355, 0.4712385, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3565) +(@OGUID+966 , 181393, 530, 1, 1, -186.922, 5525.658, 30.37905, 0.3665176, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3565) +(@OGUID+967 , 181393, 530, 1, 1, 282.4311, 5967.021, 156.1607, 4.607672, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+968 , 181393, 530, 1, 1, 225.7361, 6059.827, 155.2052, 2.879789, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+969 , 181393, 530, 1, 1, 2947.151, 5538.044, 149.536, 2.617989, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3828) +(@OGUID+970 , 181393, 530, 1, 1, 2941.788, 5528.235, 149.5077, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3828) +(@OGUID+971 , 181393, 530, 1, 1, 2935.668, 5418.931, 149.9498, 4.206246, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3951) +(@OGUID+972 , 181393, 530, 1, 1, 2945.663, 5412.689, 150.0003, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3951) +(@OGUID+973 , 181393, 530, 1, 1, 3083.157, 5479.303, 146.7212, 0.3316107, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3951) +(@OGUID+974 , 181393, 530, 1, 1, 3087.416, 5468.229, 146.6802, 0.4014249, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3951) +(@OGUID+975 , 181393, 530, 1, 1, 2148.146, 4823.462, 153.2521, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3844) +(@OGUID+976 , 181393, 530, 1, 1, 2127.926, 4832.968, 153.8778, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3844) +(@OGUID+977 , 181393, 530, 1, 1, 2137.614, 4828.306, 155.2136, 1.169369, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3844) +(@OGUID+978 , 181393, 530, 1, 1, 4109.984, 3055.683, 343.4562, 4.991644, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3738) +(@OGUID+979 , 181393, 530, 1, 1, 4123.076, 3061.348, 343.5373, 5.166176, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3738) +(@OGUID+980 , 181393, 530, 1, 1, 2951.238, 1778.57, 143.2276, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3728) +(@OGUID+981 , 181393, 530, 1, 1, -706.2856, 2715.499, 95.24024, 1.623156, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3538) +(@OGUID+982 , 181393, 530, 1, 1, 76.68159, 4292.62, 107.9898, 0.4188786, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+983 , 181393, 530, 1, 1, 66.88628, 4352.609, 109.049, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+984 , 181393, 530, 1, 1, 67.68761, 4313.362, 103.2934, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+985 , 181393, 530, 1, 1, 67.80838, 4313.379, 109.1878, 3.211419, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+986 , 181393, 530, 1, 1, 74.12413, 4313.422, 107.8744, 0.05235888, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+987 , 181393, 530, 1, 1, 66.69315, 4352.594, 103.5399, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+988 , 181393, 530, 1, 1, 73.21702, 4352.617, 107.5482, 0.01745246, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+989 , 181393, 530, 1, 1, 158.0313, 4313.944, 115.8598, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3552) +(@OGUID+990 , 181393, 530, 1, 1, 158.0299, 4353.155, 116.1294, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3552) +(@OGUID+991 , 181393, 530, 1, 1, 160.362, 4290.866, 115.9002, 3.490667, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3552) +(@OGUID+992 , 181393, 530, 1, 1, 208.2989, 4340.905, 122.2671, 5.98648, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3552) +(@OGUID+993 , 181393, 530, 1, 1, 208.1318, 4326.834, 122.3028, 0.1396245, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3552) +(@OGUID+994 , 181393, 530, 1, 1, 237.0347, 4327.787, 122.8105, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3552) +(@OGUID+995 , 181393, 530, 1, 1, 237.1911, 4339.148, 122.6282, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3552) +(@OGUID+996 , 181393, 530, 1, 1, -2910.031, 4035.109, 1.929951, 4.485497, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3684) +(@OGUID+997 , 181393, 530, 1, 1, -2927.013, 4021.806, 4.196482, 3.595379, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3684) +(@OGUID+998 , 181393, 530, 1, 1, -2923.233, 4027.322, 2.017109, 6.03884, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3684) +(@OGUID+999 , 181393, 530, 1, 1, -2921.817, 4013.159, 4.221461, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3684) +(@OGUID+1000, 181393, 530, 1, 1, -2915.338, 4014.013, 1.949319, 1.308995, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3684) +(@OGUID+1001, 181393, 530, 1, 1, -2902.193, 4021.935, 1.9572, 2.862335, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3684) +(@OGUID+1002, 181393, 530, 1, 1, -2742.369, 7297.826, 47.88564, 2.094393, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3626) +(@OGUID+1003, 181393, 530, 1, 1, -2772.801, 7324.949, 63.32422, 5.794494, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3626) +(@OGUID+1004, 181393, 530, 1, 1, -2732.494, 7320.932, 47.57973, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3626) +(@OGUID+1005, 181393, 530, 1, 1, -2738.571, 7309.452, 63.32978, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3626) +(@OGUID+1006, 181393, 530, 1, 1, -3026.055, 2626.86, 81.10643, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1007, 181393, 530, 1, 1, -3020.87, 2621.106, 81.12374, 2.82743, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1008, 181393, 530, 1, 1, -3124.819, 2572.863, 66.77592, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1009, 181393, 530, 1, 1, -3123.647, 2558.357, 67.05743, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3744) +(@OGUID+1010, 181393, 530, 1, 1, -2980.038, 2568.41, 79.19615, 2.792518, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3744) +(@OGUID+1011, 181393, 530, 1, 1, -2982.046, 2563.972, 79.34058, 2.897245, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3744) +(@OGUID+1012, 181393, 530, 1, 1, -4130.577, 1117.598, 46.67734, 1.780234, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3938) +(@OGUID+1013, 181393, 530, 1, 1, -4121.725, 1129.575, 50.64345, 4.869471, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3938) +(@OGUID+1014, 181393, 530, 1, 1, -4120.059, 1134.973, 47.51078, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3938) +(@OGUID+1015, 181393, 571, 1, 1, 5745.579, -3534.724, 396.685, 5.026549, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1016, 181393, 571, 1, 1, 5769.655, -3530.542, 396.8302, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4323) +(@OGUID+1017, 181393, 571, 1, 1, 6113.523, -1046.297, 406.5891, 0.05235888, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4418) +(@OGUID+1018, 181393, 571, 1, 1, 6127.377, -1046.22, 405.7823, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4418) +(@OGUID+1019, 181393, 571, 1, 1, 3854.253, -4497.099, 208.4463, 2.635444, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4205) +(@OGUID+1020, 181393, 571, 1, 1, 3876.38, -4541.031, 209.7021, 4.520406, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1021, 181393, 571, 1, 1, 3845.263, -4506.483, 208.0879, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1022, 181393, 571, 1, 1, 3858.301, -4564.549, 210.1741, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1023, 181393, 571, 1, 1, 3865.145, -4556.175, 211.0864, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1024, 181393, 571, 1, 1, 1421.958, -3261.318, 175.9854, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4071) +(@OGUID+1025, 181393, 571, 1, 1, 724.0819, -2929.729, 7.998729, 0.1396245, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3987) +(@OGUID+1026, 181393, 571, 1, 1, 437.3842, -4539.971, 252.3735, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3991) +(@OGUID+1027, 181393, 571, 1, 1, 438.4343, -4546.447, 249.3452, 3.001947, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3991) +(@OGUID+1028, 181393, 571, 1, 1, 447.4662, -4556.945, 252.1781, 4.398232, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3991) +(@OGUID+1029, 181393, 571, 1, 1, 442.4383, -4552.802, 249.542, 4.415683, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3991) +(@OGUID+1030, 181393, 571, 1, 1, 481.2321, -4523.523, 260.9968, 3.700105, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3991) +(@OGUID+1031, 181393, 571, 1, 1, 592.2986, -4952.793, 23.01477, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3981) +(@OGUID+1032, 181393, 571, 1, 1, 585.9739, -4954.365, 22.9537, 4.310966, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3981) +(@OGUID+1033, 181393, 571, 1, 1, 572.9479, -4943.799, 27.1676, 3.47321, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3981) +(@OGUID+1034, 181393, 571, 1, 1, 1889.537, -6174.26, 27.78375, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4000) +(@OGUID+1035, 181393, 571, 1, 1, 1886.857, -6181.003, 26.00835, 4.32842, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4000) +(@OGUID+1036, 181393, 571, 1, 1, 1883.005, -6173.481, 30.73777, 1.867502, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4000) +(@OGUID+1037, 181393, 571, 1, 1, 1896.369, -6177.458, 28.25126, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4000) +(@OGUID+1038, 181393, 571, 1, 1, 1900.714, -6182.306, 31.16157, 0.4014249, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4000) +(@OGUID+1039, 181393, 571, 1, 1, 1892.778, -6183.736, 25.80629, 4.310966, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4000) +(@OGUID+1040, 181393, 571, 1, 1, 1869.91, -6225.537, 14.98773, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4000) +(@OGUID+1041, 181393, 571, 1, 1, 2482.825, -5081.014, 288.1022, 4.625124, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4003) +(@OGUID+1042, 181393, 571, 1, 1, 2472.029, -5069.097, 290.739, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4003) +(@OGUID+1043, 181393, 571, 1, 1, 2715.438, 895.9642, 10.36512, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4152) +(@OGUID+1044, 181393, 571, 1, 1, 2714.575, 895.9132, 10.34969, 3.42085, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4152) +(@OGUID+1045, 181393, 571, 1, 1, 3109.58, 1232.019, 161.7771, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4154) +(@OGUID+1046, 181393, 571, 1, 1, 3109.565, 1232.781, 161.7827, 1.623156, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4154) +(@OGUID+1047, 181393, 571, 1, 1, 3500.457, 1971.03, 67.74579, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1048, 181393, 571, 1, 1, 3492.437, 1968.104, 68.17338, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1049, 181393, 571, 1, 1, 3518.783, 1993.761, 67.34436, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1050, 181393, 571, 1, 1, 3505.422, 2014.635, 68.21996, 3.961899, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1051, 181393, 571, 1, 1, 3519.55, 2023.388, 67.93623, 0.122173, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1052, 181393, 571, 1, 1, 3466.472, 4192.884, 28.92045, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4037) +(@OGUID+1053, 181393, 571, 1, 1, 3491.174, 4170.668, 27.20992, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4037) +(@OGUID+1054, 181393, 571, 1, 1, 3437.626, 4173.683, 27.00562, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4037) +(@OGUID+1055, 181393, 571, 1, 1, 3462.824, 4143.795, 26.00627, 4.642576, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4037) +(@OGUID+1056, 181393, 571, 1, 1, 3001.963, 4042.354, 29.05371, 1.483528, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4113) +(@OGUID+1057, 181393, 571, 1, 1, 2786.774, 6151.367, 89.29953, 0.802851, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4020) +(@OGUID+1058, 181393, 571, 1, 1, 2798.918, 6138.153, 89.22512, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4020) +(@OGUID+1059, 181393, 571, 1, 1, 2794.336, 6171.501, 88.10828, 5.445428, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4020) +(@OGUID+1060, 181393, 571, 1, 1, 2819.27, 6144.357, 87.87657, 2.303831, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4020) +(@OGUID+1061, 181393, 571, 1, 1, 2815.826, 6166.08, 94.54527, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4129) +(@OGUID+1062, 181393, 571, 1, 1, 3615.738, 5895.031, 180.1675, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4023) +(@OGUID+1063, 181393, 571, 1, 1, 3644.961, 5913.442, 180.1508, 4.468043, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4023) +(@OGUID+1064, 181393, 571, 1, 1, 3634.594, 5865.391, 179.9925, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4023) +(@OGUID+1065, 181393, 571, 1, 1, 3664.062, 5884.241, 180.022, 2.91469, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 4023) +(@OGUID+1066, 181393, 530, 1, 1, 9982.938, -7094.17, 55.73647, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1067, 181393, 530, 1, 1, 9971.994, -7098.172, 51.63682, 1.97222, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1068, 181393, 530, 1, 1, 9950.984, -7081.828, 51.59273, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1069, 181393, 530, 1, 1, 9825.279, -7214.288, 34.39079, 4.206246, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1070, 181393, 530, 1, 1, 9867.815, -7250.419, 34.28242, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1071, 181393, 530, 1, 1, 9842.312, -7339.947, 33.42025, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1072, 181393, 530, 1, 1, 9858.424, -7340.051, 33.53955, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1073, 181393, 530, 1, 1, 9888.206, -7440.489, 18.43325, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1074, 181393, 530, 1, 1, 9881.708, -7445.709, 18.44877, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1075, 181393, 530, 1, 1, 9820.213, -7445.313, 18.36214, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1076, 181393, 530, 1, 1, 9813.948, -7440.063, 18.53376, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1077, 181393, 530, 1, 1, 9800.513, -7459.873, 21.58522, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1078, 181393, 530, 1, 1, 9788.535, -7459.793, 21.5471, 4.747296, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1079, 181393, 530, 1, 1, 9787.977, -7515.988, 21.1214, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1080, 181393, 530, 1, 1, 9776.338, -7459.713, 21.53671, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1081, 181393, 530, 1, 1, 9799.942, -7516.057, 21.14704, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1082, 181393, 530, 1, 1, 9775.622, -7515.917, 21.18118, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1083, 181393, 530, 1, 1, 9702.63, -7494.749, 20.87424, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1084, 181393, 530, 1, 1, 9648.485, -7397.347, 19.71108, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1085, 181393, 530, 1, 1, 9664.004, -7494.526, 21.30559, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1086, 181393, 530, 1, 1, 9710.682, -7517.241, 24.60951, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1087, 181393, 530, 1, 1, 9655.724, -7516.808, 24.74897, 0.122173, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1088, 181393, 530, 1, 1, 9628.701, -7397.234, 19.89468, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1089, 181393, 530, 1, 1, 9575.924, -7474.412, 20.00644, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1090, 181393, 530, 1, 1, 9577.849, -7444.63, 20.28195, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1091, 181393, 530, 1, 1, 9578.052, -7454.913, 20.29773, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1092, 181393, 530, 1, 1, 9576.13, -7425.43, 20.0839, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1093, 181393, 530, 1, 1, 9626.567, -7252.648, 18.88096, 4.555311, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1094, 181393, 530, 1, 1, 9616.16, -7252.588, 18.90923, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1095, 181393, 530, 1, 1, 9657.013, -7150.79, 19.11701, 2.042035, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1096, 181393, 530, 1, 1, 9639.584, -7150.563, 19.08469, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1097, 181393, 530, 1, 1, 9633.485, -7144.688, 18.93979, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1098, 181393, 530, 1, 1, 9663.479, -7144.868, 19.02398, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1099, 181393, 530, 1, 1, 9663.398, -7126.579, 19.17594, 3.543024, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1100, 181393, 530, 1, 1, 9633.681, -7126.534, 19.35443, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1101, 181393, 530, 1, 1, 9640.129, -7120.771, 19.24785, 5.061456, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1102, 181393, 530, 1, 1, 9657.051, -7120.849, 19.23065, 4.380776, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1103, 181393, 530, 1, 1, 9575.294, -7071.046, 21.81329, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1104, 181393, 530, 1, 1, 9585.785, -7071.107, 21.8504, 4.642576, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1105, 181393, 530, 1, 1, 9560.381, -7195.122, 19.30699, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1106, 181393, 530, 1, 1, 9576.513, -7195.214, 19.32236, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1107, 181393, 530, 1, 1, 9522.363, -7245.137, 20.03247, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1108, 181393, 530, 1, 1, 9542.478, -7245.922, 19.69782, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1109, 181393, 530, 1, 1, 9536.9, -7291.12, 18.49589, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1110, 181393, 530, 1, 1, 9546.85, -7291.168, 18.46919, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1111, 181393, 530, 1, 1, 9556.167, -7309.81, 18.62683, 4.607672, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1112, 181393, 530, 1, 1, 9555.695, -7291.208, 18.44218, 1.640607, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1113, 181393, 530, 1, 1, 9546.783, -7309.744, 18.7086, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1114, 181393, 530, 1, 1, 9536.851, -7309.674, 18.88877, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1115, 181393, 530, 1, 1, 9487.176, -7335.846, 18.74969, 0.01745246, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1116, 181393, 530, 1, 1, 9486.544, -7355.187, 18.55445, 5.98648, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3487) +(@OGUID+1117, 181393, 530, 1, 1, -3759.184, -11686.47, -100.7426, 6.178466, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1118, 181393, 530, 1, 1, -3758.17, -11705.32, -100.7183, 0.087266, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1119, 181393, 530, 1, 1, -3740.868, -11676.38, -98.68883, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1120, 181393, 530, 1, 1, -3738.775, -11714.7, -99.08512, 1.378809, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1121, 181393, 530, 1, 1, -3720.252, -11684.94, -94.64872, 3.630291, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1122, 181393, 530, 1, 1, -3719.035, -11703.56, -95.14524, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 0) +(@OGUID+1123, 181393, 530, 1, 1, -4084.942, -13760.45, 75.98574, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3526) +(@OGUID+1124, 181393, 530, 1, 1, -4087.579, -13767.74, 75.97815, 0.06981169, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 3526) +(@OGUID+1125, 187667, 530, 1, 1, 266.4354, 6094.357, 133.5182, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1126, 187667, 530, 1, 1, 276.0255, 6085.296, 135.0984, 4.886924, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1127, 187667, 530, 1, 1, 261.8294, 6096.237, 133.3653, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1128, 187667, 530, 1, 1, 270.995, 6092.489, 133.5649, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1129, 187667, 530, 1, 1, 289.163, 6085.788, 135.125, 4.747296, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1130, 187667, 530, 1, 1, 239.3766, 7930.089, 27.83519, 2.809975, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3645) +(@OGUID+1131, 187667, 530, 1, 1, 223.9831, 7923.57, 27.90063, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3645) +(@OGUID+1132, 187667, 530, 1, 1, 228.6397, 7945.422, 29.25893, 5.235988, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3645) +(@OGUID+1133, 187667, 530, 1, 1, 3058.398, 3696.026, 144.8155, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3712) +(@OGUID+1134, 187667, 530, 1, 1, 3057.197, 3694.741, 145.4213, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3712) +(@OGUID+1135, 187667, 530, 1, 1, 3058.831, 3691.601, 145.45, 3.508117, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3712) +(@OGUID+1136, 187667, 530, 1, 1, 3060.614, 3691.763, 144.8515, 0.6457717, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3712) +(@OGUID+1137, 187667, 530, 1, 1, -2954.958, 2567.078, 81.00614, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3744) +(@OGUID+1138, 187667, 530, 1, 1, -2963.262, 2557.669, 96.95348, 3.403396, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3744) +(@OGUID+1139, 187667, 530, 1, 1, -2961.015, 2557.951, 93.87666, 6.213374, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3744) +(@OGUID+1140, 187667, 530, 1, 1, -2961.582, 2546.881, 79.93132, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3744) +(@OGUID+1141, 187667, 530, 1, 1, -4074.347, 2162.13, 111.4437, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3745) +(@OGUID+1142, 187667, 530, 1, 1, -4072.622, 2162.176, 111.4297, 1.658062, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3745) +(@OGUID+1143, 187667, 530, 1, 1, -4076.15, 2162.084, 111.4253, 1.605702, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3745) +(@OGUID+1144, 187667, 530, 1, 1, -2974.166, 852.9896, -5.184109, 1.884953, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3754) +(@OGUID+1145, 187667, 530, 1, 1, -2979.535, 851.0223, -5.23692, 1.658062, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3754) +(@OGUID+1146, 187667, 571, 1, 1, 5855.43, 634.2999, 649.2884, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4395) +(@OGUID+1147, 187667, 571, 1, 1, 5838.521, 520.3542, 659.7874, 2.652894, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4395) +(@OGUID+1148, 187667, 571, 1, 1, 5858.512, 638.0903, 649.1016, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4395) +(@OGUID+1149, 187667, 571, 1, 1, 5819.291, 514.2288, 659.8239, 1.099556, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4395) +(@OGUID+1150, 187667, 571, 1, 1, 5855.882, 661.2175, 649.2011, 3.839725, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4395) +(@OGUID+1151, 187667, 571, 1, 1, 5852.286, 664.1205, 649.1534, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4395) +(@OGUID+1152, 187667, 571, 1, 1, 5766.1, 706.9418, 619.6938, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4739) +(@OGUID+1153, 187667, 571, 1, 1, 5730.19, 682.8389, 648.4232, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4739) +(@OGUID+1154, 187667, 571, 1, 1, 5769.932, 711.6566, 619.6014, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4739) +(@OGUID+1155, 187667, 571, 1, 1, 5726.839, 678.6988, 648.3967, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4739) +(@OGUID+1156, 187667, 571, 1, 1, 5906.59, 480.6752, 643.4434, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4616) +(@OGUID+1157, 187667, 571, 1, 1, 5904.753, 489.8196, 643.4774, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4616) +(@OGUID+1158, 187667, 571, 1, 1, 5863.507, 473.3883, 642.9924, 0.01745246, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4616) +(@OGUID+1159, 187667, 571, 1, 1, 5864.693, 467.3737, 643.1257, 0.122173, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4616) +(@OGUID+1160, 187667, 571, 1, 1, 5796.578, -3553.885, 388.331, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4323) +(@OGUID+1161, 187667, 571, 1, 1, 6120.367, -1076.484, 404.6041, 4.886924, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4418) +(@OGUID+1162, 187667, 571, 1, 1, 6120.694, -1074.873, 405.0674, 1.413715, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4418) +(@OGUID+1163, 187667, 571, 1, 1, 6124.218, -1074.936, 405.0566, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4418) +(@OGUID+1164, 187667, 571, 1, 1, 6124.213, -1076.51, 404.6239, 4.625124, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4418) +(@OGUID+1165, 187667, 571, 1, 1, 7806.432, -2962.629, 1261.428, 1.012289, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4441) +(@OGUID+1166, 187667, 571, 1, 1, 7797.768, -2957.828, 1261.514, 1.204277, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4441) +(@OGUID+1167, 187667, 571, 1, 1, 3416.354, -2799.535, 203.6574, 2.042035, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1168, 187667, 571, 1, 1, 3421.742, -2795.542, 203.7708, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1169, 187667, 571, 1, 1, 3410.07, -2779.702, 203.9763, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4204) +(@OGUID+1170, 187667, 571, 1, 1, 3404.744, -2783.643, 203.9436, 5.532695, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4204) +(@OGUID+1171, 187667, 571, 1, 1, 1454.493, -3273.58, 168.5273, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4071) +(@OGUID+1172, 187667, 571, 1, 1, 1445.74, -3257.578, 169.2403, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4071) +(@OGUID+1173, 187667, 571, 1, 1, 1438.028, -3267.566, 169.513, 5.637414, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4071) +(@OGUID+1174, 187667, 571, 1, 1, 1437.135, -3266.915, 169.5058, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4071) +(@OGUID+1175, 187667, 571, 1, 1, 1429.582, -3265.274, 169.2192, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4071) +(@OGUID+1176, 187667, 571, 1, 1, 1431.483, -3274.533, 169.1915, 1.047198, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4071) +(@OGUID+1177, 187667, 571, 1, 1, 1427.002, -3268.351, 169.1821, 5.707228, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4071) +(@OGUID+1178, 187667, 571, 1, 1, 440.0521, -4547.913, 248.6341, 3.839725, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3991) +(@OGUID+1179, 187667, 571, 1, 1, 455.1633, -4536.68, 247.5673, 3.857183, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3991) +(@OGUID+1180, 187667, 571, 1, 1, 441.8183, -4550.703, 248.5898, 3.57793, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3991) +(@OGUID+1181, 187667, 571, 1, 1, 458.6449, -4542.124, 247.7258, 3.612838, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3991) +(@OGUID+1182, 187667, 571, 1, 1, 581.4718, -4943.683, 20.63075, 0.383971, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3981) +(@OGUID+1183, 187667, 571, 1, 1, 586.2632, -4934.662, 20.74441, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3981) +(@OGUID+1184, 187667, 571, 1, 1, 587.3395, -4934.356, 20.82388, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3981) +(@OGUID+1185, 187667, 571, 1, 1, 580.5126, -4939.842, 20.76777, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3981) +(@OGUID+1186, 187667, 571, 1, 1, 1872.679, -6195.768, 26.33468, 5.777041, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4000) +(@OGUID+1187, 187667, 571, 1, 1, 1891.333, -6175.724, 26.62351, 0.9075702, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4000) +(@OGUID+1188, 187667, 571, 1, 1, 1894.171, -6177.047, 26.61499, 1.256636, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4000) +(@OGUID+1189, 187667, 571, 1, 1, 1890.348, -6204.115, 26.52463, 2.617989, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4000) +(@OGUID+1190, 187667, 571, 1, 1, 2425.66, -5166.585, 282.1942, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4055) +(@OGUID+1191, 187667, 571, 1, 1, 2482.925, -5077.249, 291.7695, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4003) +(@OGUID+1192, 187667, 571, 1, 1, 2472.532, -5054.136, 292.9761, 0, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4003) +(@OGUID+1193, 187667, 571, 1, 1, 2681.623, -4397.512, 285.5597, 0.9599299, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1194, 187667, 571, 1, 1, 2678.708, -4395.557, 285.5654, 0.8377575, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1195, 187667, 571, 1, 1, 2677.323, -4386.643, 290.0943, 5.689774, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1196, 187667, 571, 1, 1, 3217.361, -685.8459, 169.8989, 1.047198, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1197, 187667, 571, 1, 1, 3219.979, -680.9132, 169.6687, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1198, 187667, 571, 1, 1, 3207.445, -675.2426, 170.4363, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4186) +(@OGUID+1199, 187667, 571, 1, 1, 3205.08, -679.9858, 170.4128, 6.03884, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4186) +(@OGUID+1200, 187667, 571, 1, 1, 3635.864, -710.7761, 215.8188, 4.869471, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4177) +(@OGUID+1201, 187667, 571, 1, 1, 3640.115, -711.2604, 215.9585, 4.398232, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4177) +(@OGUID+1202, 187667, 571, 1, 1, 3651.599, -711.7225, 216.8413, 4.747296, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4177) +(@OGUID+1203, 187667, 571, 1, 1, 3665.587, -710.9298, 217.4738, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4177) +(@OGUID+1204, 187667, 571, 1, 1, 3666.347, -703.8602, 217.6456, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4177) +(@OGUID+1205, 187667, 571, 1, 1, 2770.71, 934.493, 25.70063, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4152) +(@OGUID+1206, 187667, 571, 1, 1, 2777.521, 938.1545, 25.58711, 4.34587, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4152) +(@OGUID+1207, 187667, 571, 1, 1, 3480.165, 1977.29, 70.61582, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1208, 187667, 571, 1, 1, 3472.212, 1983.86, 69.00069, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1209, 187667, 571, 1, 1, 3476.039, 2008.531, 68.95277, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1210, 187667, 571, 1, 1, 3484.333, 2013.51, 68.88947, 5.044002, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1211, 187667, 571, 1, 1, 4176.385, 5285.042, 28.29611, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4108) +(@OGUID+1212, 187667, 571, 1, 1, 4178.876, 5273.907, 40.73148, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4108) +(@OGUID+1213, 187667, 571, 1, 1, 4176.302, 5277.055, 28.09965, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4108) +(@OGUID+1214, 187667, 571, 1, 1, 4171.795, 5282.206, 41.54663, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4108) +(@OGUID+1215, 187667, 571, 1, 1, 2299.134, 5198.044, 13.93274, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4115) +(@OGUID+1216, 187667, 571, 1, 1, 2280.926, 5198.394, 14.63274, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4032) +(@OGUID+1217, 187667, 571, 1, 1, 2281.226, 5199.101, 14.57226, 1.221729, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4032) +(@OGUID+1218, 187667, 571, 1, 1, 2271.331, 5194.442, 14.39653, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4032) +(@OGUID+1219, 187667, 571, 1, 1, 2272.831, 5198.149, 14.36126, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4032) +(@OGUID+1220, 187667, 571, 1, 1, 2789.38, 6177.33, 88.61863, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4020) +(@OGUID+1221, 187667, 571, 1, 1, 2792.786, 6176.63, 88.45963, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4129) +(@OGUID+1222, 187667, 571, 1, 1, 2824.468, 6139.032, 88.58996, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4129) +(@OGUID+1223, 187667, 571, 1, 1, 2824.102, 6142.47, 88.44103, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4129) +(@OGUID+1224, 187667, 571, 1, 1, 3570.061, 6648.111, 197.2132, 0.383971, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4024) +(@OGUID+1225, 187667, 571, 1, 1, 3568.583, 6652.051, 197.2804, 0.4188786, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4024) +(@OGUID+1226, 187667, 571, 1, 1, 3580.081, 6671.506, 197.7762, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4024) +(@OGUID+1227, 187667, 571, 1, 1, 3576.648, 6667.775, 197.6963, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 4024) +(@OGUID+1228, 187667, 530, 1, 1, -4207.088, -12473.58, 46.58454, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1229, 187667, 530, 1, 1, -4216.502, -12480.64, 48.98628, 6.213374, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1230, 187667, 530, 1, 1, -4192.907, -12467.66, 46.6215, 5.794494, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1231, 187667, 530, 1, 1, -4212.782, -12506.34, 46.88014, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1232, 187667, 530, 1, 1, -4212.281, -12515.08, 50.44548, 0.3141584, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1233, 187667, 530, 1, 1, -4208.398, -12519.56, 47.62306, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 0) +(@OGUID+1234, 187667, 530, 1, 1, -4163.363, -12455.46, 47.14916, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3576) +(@OGUID+1235, 187667, 530, 1, 1, -4160.896, -12457.07, 47.62824, 4.153885, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3576) +(@OGUID+1236, 187667, 530, 1, 1, -4152.799, -12480.7, 45.96771, 2.844883, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3576) +(@OGUID+1237, 187667, 530, 1, 1, -4167.781, -12537.14, 48.95461, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3576) +(@OGUID+1238, 187667, 530, 1, 1, -4149.234, -12485.86, 50.90091, 3.859896, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3576) +(@OGUID+1239, 187667, 530, 1, 1, -4150.61, -12525.97, 49.39287, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3576) +(@OGUID+1240, 187667, 530, 1, 1, -4164.37, -12536.8, 48.27224, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3576) +(@OGUID+1241, 187667, 530, 1, 1, -4144.596, -12490.33, 45.72705, 4.607672, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3576) +(@OGUID+1242, 187667, 530, 1, 1, -4153.813, -12532.33, 49.37784, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3576) +(@OGUID+1243, 187667, 530, 1, 1, -4173.694, -13729.01, 76.77699, 2.809975, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3526) +(@OGUID+1244, 187667, 530, 1, 1, -4047.493, -13771.29, 76.13934, 6.19592, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3527) +(@OGUID+1245, 187667, 530, 1, 1, -4050.141, -13778.29, 76.35183, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 187667 (Area: 3527) +(@OGUID+1246, 181355, 530, 1, 1, -1674.443, 5406.264, -40.40601, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1247, 181355, 530, 1, 1, -1993.964, 5686.367, 117.6628, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3898) +(@OGUID+1248, 181355, 530, 1, 1, -1990.117, 5678.112, 117.6628, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3898) +(@OGUID+1249, 181355, 530, 1, 1, -1962.946, 5684.213, 117.6628, 2.984498, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1250, 181355, 530, 1, 1, -1974.76, 5703.745, 117.6628, 4.223697, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1251, 181355, 530, 1, 1, -324.4565, 5466.785, 22.66969, 1.326448, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3521) +(@OGUID+1252, 181355, 530, 1, 1, -344.9888, 5492.374, 22.00702, 3.57793, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3521) +(@OGUID+1253, 181355, 530, 1, 1, -306.1548, 5479.317, 22.28877, 2.35619, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3521) +(@OGUID+1254, 181355, 530, 1, 1, -253.026, 5481.032, 24.94352, 5.480334, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3565) +(@OGUID+1255, 181355, 530, 1, 1, -196.088, 5525.092, 22.81344, 3.612838, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3565) +(@OGUID+1256, 181355, 530, 1, 1, -192.4105, 5510.174, 22.67085, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3565) +(@OGUID+1257, 181355, 530, 1, 1, -184.6291, 5506.406, 29.47097, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3565) +(@OGUID+1258, 181355, 530, 1, 1, -213.9051, 5547.442, 24.07233, 3.57793, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3565) +(@OGUID+1259, 181355, 530, 1, 1, -192.6228, 5531.502, 29.45192, 3.769912, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3565) +(@OGUID+1260, 181355, 530, 1, 1, 261.4174, 5980.111, 132.9563, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1261, 181355, 530, 1, 1, 278.5881, 5966.778, 150.1677, 5.375615, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1262, 181355, 530, 1, 1, 269.9623, 5956.735, 26.43292, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1263, 181355, 530, 1, 1, 272.3167, 5944.75, 26.52184, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1264, 181355, 530, 1, 1, 296.5285, 5941.624, 26.55748, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1265, 181355, 530, 1, 1, 298.2953, 5957.52, 26.42815, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1266, 181355, 530, 1, 1, 280.785, 6008.137, 144.7295, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1267, 181355, 530, 1, 1, 301.7136, 5979.073, 132.4598, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1268, 181355, 530, 1, 1, 307.1656, 6055.835, 131.5718, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3644) +(@OGUID+1269, 181355, 530, 1, 1, 217.2829, 6078.526, 148.3125, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1270, 181355, 530, 1, 1, 208.3886, 6049.729, 148.32, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1271, 181355, 530, 1, 1, 222.1361, 6049.518, 148.3132, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1272, 181355, 530, 1, 1, 227.5588, 6070.599, 148.3118, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1273, 181355, 530, 1, 1, 275.337, 6082.517, 131.545, 4.886924, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1274, 181355, 530, 1, 1, 276.2028, 6122.649, 142.509, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1275, 181355, 530, 1, 1, 290.4184, 6083.181, 131.5468, 4.590216, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1276, 181355, 530, 1, 1, 261.7739, 7872.234, 23.73318, 5.113817, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1277, 181355, 530, 1, 1, 1003.335, 7429.998, 28.07676, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3667) +(@OGUID+1278, 181355, 530, 1, 1, 971.3665, 7408.698, 29.54321, 5.026549, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1279, 181355, 530, 1, 1, 1021.34, 7392.521, 36.32355, 3.490667, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1280, 181355, 530, 1, 1, 1058.58, 7386.76, 39.58334, 4.276057, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1281, 181355, 530, 1, 1, 1052.856, 7384.014, 39.65503, 4.468043, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1282, 181355, 530, 1, 1, 964.8279, 7387.548, 28.52687, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1283, 181355, 530, 1, 1, 1036.931, 7385.866, 40.72616, 5.201083, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1284, 181355, 530, 1, 1, 937.6202, 7360.125, 26.74729, 1.378809, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1285, 181355, 530, 1, 1, 957.7293, 7355.671, 29.15186, 0.4363316, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1286, 181355, 530, 1, 1, 945.5008, 7392.224, 26.72158, 4.380776, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1287, 181355, 530, 1, 1, 993.2974, 7345.906, 35.77085, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1288, 181355, 530, 1, 1, 1006.334, 7322.549, 41.04741, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1289, 181355, 530, 1, 1, 1033.736, 7322.608, 40.50263, 4.049168, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1290, 181355, 530, 1, 1, 1042.453, 7348.262, 36.65906, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1291, 181355, 530, 1, 1, 1068.558, 7349.528, 40.72983, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1292, 181355, 530, 1, 1, 1072.741, 7372.522, 39.58335, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1293, 181355, 530, 1, 1, 1069.436, 7366.63, 39.64074, 3.246347, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3766) +(@OGUID+1294, 181355, 530, 1, 1, 2017.319, 6873.481, 178.983, 4.24115, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3772) +(@OGUID+1295, 181355, 530, 1, 1, 2007.013, 6878.822, 178.9834, 4.24115, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3772) +(@OGUID+1296, 181355, 530, 1, 1, 2161.682, 6783.048, 183.4536, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3772) +(@OGUID+1297, 181355, 530, 1, 1, 2950.829, 5486.531, 144.1427, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3828) +(@OGUID+1298, 181355, 530, 1, 1, 3011.185, 5493.75, 145.0009, 0.6806767, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3951) +(@OGUID+1299, 181355, 530, 1, 1, 2969.01, 5459.725, 144.6972, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3951) +(@OGUID+1300, 181355, 530, 1, 1, 2087.611, 4782.989, 157.7814, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3844) +(@OGUID+1301, 181355, 530, 1, 1, 2019.061, 4700.482, 150.2378, 0.4363316, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3844) +(@OGUID+1302, 181355, 530, 1, 1, 2923.397, 3708.21, 144.1105, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1303, 181355, 530, 1, 1, 2946.058, 3725.089, 143.1839, 3.089183, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1304, 181355, 530, 1, 1, 2914.001, 3699.492, 143.6809, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1305, 181355, 530, 1, 1, 2945.531, 3714.857, 143.1773, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1306, 181355, 530, 1, 1, 2910.409, 3676.454, 144.3202, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1307, 181355, 530, 1, 1, 2923.083, 3674.278, 144.2727, 0.5410506, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1308, 181355, 530, 1, 1, 2984.193, 3711.066, 142.8784, 2.932139, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1309, 181355, 530, 1, 1, 2947.035, 3659.529, 132.5782, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1310, 181355, 530, 1, 1, 2947.682, 3649.331, 132.5782, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1311, 181355, 530, 1, 1, 2972.385, 3659.229, 144.8418, 0, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1312, 181355, 530, 1, 1, 3004.393, 3656.724, 143.8046, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1313, 181355, 530, 1, 1, 2972.166, 3648.618, 144.8469, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1314, 181355, 530, 1, 1, 3014.989, 3753.323, 144.3842, 1.256636, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1315, 181355, 530, 1, 1, 3003.333, 3637.782, 143.8042, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1316, 181355, 530, 1, 1, 3025.728, 3750.257, 144.7281, 1.326448, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1317, 181355, 530, 1, 1, 3058.527, 3663.685, 143.0369, 2.042035, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1318, 181355, 530, 1, 1, 3037.129, 3606.581, 144.4336, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1319, 181355, 530, 1, 1, 3120.857, 3684.906, 143.2626, 0.5759573, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1320, 181355, 530, 1, 1, 3115.857, 3694.574, 144.0382, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1321, 181355, 530, 1, 1, 3105.762, 3723.047, 144.983, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1322, 181355, 530, 1, 1, 3117.033, 3727.915, 145.4815, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1323, 181355, 530, 1, 1, 3129.166, 3726.417, 141.9053, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3712) +(@OGUID+1324, 181355, 530, 1, 1, 4114.772, 2967.272, 352.1837, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1325, 181355, 530, 1, 1, 4122.787, 2967.157, 352.2287, 1.605702, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1326, 181355, 530, 1, 1, 4113.936, 3050.741, 339.3003, 5.899214, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1327, 181355, 530, 1, 1, 4177.452, 3004.381, 339.1197, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1328, 181355, 530, 1, 1, 4123.493, 3055.268, 339.3098, 4.520406, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1329, 181355, 530, 1, 1, 4082.152, 3077.441, 339.3883, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1330, 181355, 530, 1, 1, 4178.088, 3015.381, 339.1293, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1331, 181355, 530, 1, 1, 4200.194, 3075.751, 335.8202, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1332, 181355, 530, 1, 1, 4177.695, 3093.462, 335.8202, 5.445428, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1333, 181355, 530, 1, 1, 4126.727, 3096.481, 339.3884, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1334, 181355, 530, 1, 1, 4099.208, 3107.681, 339.3884, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1335, 181355, 530, 1, 1, 4114.827, 3105.379, 339.3884, 1.169369, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1336, 181355, 530, 1, 1, 4092.646, 3104.921, 339.3883, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1337, 181355, 530, 1, 1, 4105.933, 3108.072, 339.3884, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1338, 181355, 530, 1, 1, 4083.412, 3091.455, 339.3883, 2.879789, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1339, 181355, 530, 1, 1, 4087.922, 3100.24, 339.3883, 2.530723, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3738) +(@OGUID+1340, 181355, 530, 1, 1, 293.5556, 2757.308, 85.24716, 0.9773831, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3549) +(@OGUID+1341, 181355, 530, 1, 1, 177.3938, 2641.12, 87.18604, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3536) +(@OGUID+1342, 181355, 530, 1, 1, 184.4233, 2683.703, 88.28799, 3.001947, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3536) +(@OGUID+1343, 181355, 530, 1, 1, 49.26655, 2658.362, 78.4103, 0.4712385, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3536) +(@OGUID+1344, 181355, 530, 1, 1, -684.1902, 2664.04, 90.97864, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1345, 181355, 530, 1, 1, -681.7703, 2653.848, 90.5937, 6.108654, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1346, 181355, 530, 1, 1, -695.8323, 2638.751, 90.97626, 4.81711, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1347, 181355, 530, 1, 1, -685.2488, 2644.338, 90.4667, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1348, 181355, 530, 1, 1, -708.6624, 2640.041, 91.84985, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1349, 181355, 530, 1, 1, -690.535, 2673.585, 92.20389, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3538) +(@OGUID+1350, 181355, 530, 1, 1, -717.8087, 2647.749, 93.05632, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3538) +(@OGUID+1351, 181355, 530, 1, 1, -702.0106, 2676.552, 93.48396, 1.727875, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3538) +(@OGUID+1352, 181355, 530, 1, 1, -714.3968, 2671.541, 93.92791, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3538) +(@OGUID+1353, 181355, 530, 1, 1, -720.9301, 2658.757, 93.7806, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3538) +(@OGUID+1354, 181355, 530, 1, 1, -699.3879, 2717.673, 94.73693, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3538) +(@OGUID+1355, 181355, 530, 1, 1, -597.0756, 4097.25, 91.20135, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3543) +(@OGUID+1356, 181355, 530, 1, 1, 82.60951, 4318.784, 102.0311, 0.383971, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1357, 181355, 530, 1, 1, 80.49339, 4347.601, 102.071, 5.183629, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1358, 181355, 530, 1, 1, 136.032, 4345.664, 106.6182, 4.799657, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3552) +(@OGUID+1359, 181355, 530, 1, 1, 134.9947, 4319.371, 106.7541, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3552) +(@OGUID+1360, 181355, 530, 1, 1, 152.2135, 4318.471, 106.2541, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3552) +(@OGUID+1361, 181355, 530, 1, 1, 140.73, 4269.448, 107.4208, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3552) +(@OGUID+1362, 181355, 530, 1, 1, 151.8665, 4348.405, 107.2158, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3552) +(@OGUID+1363, 181355, 530, 1, 1, 147.9486, 4275.235, 107.2797, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3552) +(@OGUID+1364, 181355, 530, 1, 1, 181.2025, 4317.459, 119.9638, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3552) +(@OGUID+1365, 181355, 530, 1, 1, 181.4662, 4350.056, 119.962, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3552) +(@OGUID+1366, 181355, 530, 1, 1, 196.2876, 4328.141, 116.8841, 2.548179, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3552) +(@OGUID+1367, 181355, 530, 1, 1, 196.4538, 4339.529, 116.9748, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3552) +(@OGUID+1368, 181355, 530, 1, 1, -2993.023, 4149.779, 5.160716, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3697) +(@OGUID+1369, 181355, 530, 1, 1, -2966.667, 4073.203, 2.960989, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1370, 181355, 530, 1, 1, -2926.811, 4019.083, 0.413682, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3684) +(@OGUID+1371, 181355, 530, 1, 1, -2924.175, 4014.802, 0.424108, 3.368496, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3684) +(@OGUID+1372, 181355, 530, 1, 1, -2904.558, 4017.979, 0.378337, 2.82743, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3684) +(@OGUID+1373, 181355, 530, 1, 1, -2942.975, 3949.947, 0.906697, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1374, 181355, 530, 1, 1, -2943.432, 3903.176, 3.423485, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3684) +(@OGUID+1375, 181355, 530, 1, 1, -2956.34, 3907.056, 3.423482, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3684) +(@OGUID+1376, 181355, 530, 1, 1, -2975.988, 3877.033, 9.545059, 3.769912, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3684) +(@OGUID+1377, 181355, 530, 1, 1, -2987.699, 3860.738, 8.660349, 1.308995, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3684) +(@OGUID+1378, 181355, 530, 1, 1, -2626.202, 7216.55, 20.35766, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1379, 181355, 530, 1, 1, -2600.806, 7237.711, 12.91722, 0.3490652, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1380, 181355, 530, 1, 1, -2596.802, 7228.939, 13.47051, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1381, 181355, 530, 1, 1, -2630.099, 7224.425, 19.74051, 3.717554, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1382, 181355, 530, 1, 1, -2528.435, 7266.286, 16.27025, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1383, 181355, 530, 1, 1, -2534.468, 7256.75, 16.26636, 2.530723, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1384, 181355, 530, 1, 1, -2605.266, 7291.263, 19.8158, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1385, 181355, 530, 1, 1, -2570.705, 7291.29, 14.81433, 0.5410506, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1386, 181355, 530, 1, 1, -2614.92, 7297.726, 20.7448, 4.398232, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1387, 181355, 530, 1, 1, -2602.271, 7282.346, 19.39945, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1388, 181355, 530, 1, 1, -2670.031, 7211.863, 23.66941, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1389, 181355, 530, 1, 1, -2678.989, 7214.03, 23.95701, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1390, 181355, 530, 1, 1, -2573.72, 7300.305, 13.90452, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1391, 181355, 530, 1, 1, -2625.71, 7298.209, 21.14083, 4.799657, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1392, 181355, 530, 1, 1, -2702.841, 7293.721, 88.63655, 2.82743, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1393, 181355, 530, 1, 1, -2692.656, 7296.979, 42.78501, 5.427975, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1394, 181355, 530, 1, 1, -2697.95, 7284.061, 42.72089, 6.108654, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1395, 181355, 530, 1, 1, -2762.166, 7267.401, 40.26734, 5.724681, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1396, 181355, 530, 1, 1, -2755.534, 7275.691, 40.27126, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1397, 181355, 530, 1, 1, -2752.121, 7315.08, 43.48479, 5.689774, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1398, 181355, 530, 1, 1, -2755.324, 7317.081, 56.35859, 2.617989, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1399, 181355, 530, 1, 1, -2721.762, 7343.454, 39.44633, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1400, 181355, 530, 1, 1, -2720.994, 7355.896, 39.75894, 6.03884, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1401, 181355, 530, 1, 1, -2614.572, 7330.876, 24.21089, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1402, 181355, 530, 1, 1, -2624.408, 7331.686, 24.46344, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1403, 181355, 530, 1, 1, -2618.061, 7338.908, 23.65936, 4.956738, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1404, 181355, 530, 1, 1, -2611.334, 7343.457, 23.60636, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1405, 181355, 530, 1, 1, -2561.666, 7378.96, 10.5709, 2.967041, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1406, 181355, 530, 1, 1, -2571.461, 7378.03, 11.05957, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3626) +(@OGUID+1407, 181355, 530, 1, 1, -2505.922, 7527.336, 0.043322, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3705) +(@OGUID+1408, 181355, 530, 1, 1, -2511.847, 7563.294, -1.760557, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1409, 181355, 530, 1, 1, -2497.057, 7536.151, -0.614676, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1410, 181355, 530, 1, 1, -1307.797, 6960.474, 32.26982, 4.223697, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3613) +(@OGUID+1411, 181355, 530, 1, 1, -1254.381, 7007.266, 36.623, 4.537859, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3613) +(@OGUID+1412, 181355, 530, 1, 1, -1241.754, 7003.594, 36.79386, 4.537859, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3613) +(@OGUID+1413, 181355, 530, 1, 1, -1296.558, 6953.973, 33.24513, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3613) +(@OGUID+1414, 181355, 530, 1, 1, -1184.679, 7246.92, 35.14313, 2.82743, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3613) +(@OGUID+1415, 181355, 530, 1, 1, 201.9845, 8489.734, 24.44587, 0.6457717, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1416, 181355, 530, 1, 1, 253.3038, 8489.067, 23.37944, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1417, 181355, 530, 1, 1, 265.287, 8514.346, 23.52993, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1418, 181355, 530, 1, 1, 223.5183, 8562.453, 23.26412, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1419, 181355, 530, 1, 1, -3031.269, 2631.006, 76.54335, 4.485497, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1420, 181355, 530, 1, 1, -3081.042, 2598.579, 61.74963, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1421, 181355, 530, 1, 1, -3104.677, 2582.695, 61.977, 4.642576, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1422, 181355, 530, 1, 1, -3107.003, 2545.114, 62.05597, 1.029743, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1423, 181355, 530, 1, 1, -3065.579, 2555.547, 65.75816, 3.752462, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1424, 181355, 530, 1, 1, -2970.731, 2573.003, 76.54335, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1425, 181355, 530, 1, 1, -3006.598, 2549.313, 78.11643, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1426, 181355, 530, 1, 1, -2979.335, 2554.049, 76.54335, 3.926996, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1427, 181355, 530, 1, 1, -2986.574, 2565.178, 76.54335, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1428, 181355, 530, 1, 1, -2956.544, 2554.592, 126.6191, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1429, 181355, 530, 1, 1, -3052.811, 2481.651, 66.65688, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1430, 181355, 530, 1, 1, -2921.617, 2644.625, 94.40192, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1431, 181355, 530, 1, 1, -3073.645, 2392.152, 62.55545, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1432, 181355, 530, 1, 1, -3050.082, 2384.462, 62.71082, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1433, 181355, 530, 1, 1, -3060.834, 2401.809, 61.1662, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3744) +(@OGUID+1434, 181355, 530, 1, 1, -3930.809, 2115.148, 96.81004, 3.508117, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1435, 181355, 530, 1, 1, -3937.474, 2043.296, 95.10289, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1436, 181355, 530, 1, 1, -3936.5, 2054.585, 95.0647, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1437, 181355, 530, 1, 1, -3947.098, 2032.833, 96.91352, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1438, 181355, 530, 1, 1, -3959.747, 2043.662, 95.06471, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1439, 181355, 530, 1, 1, -3981.395, 2150.587, 105.0282, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1440, 181355, 530, 1, 1, -3948.719, 2165.375, 100.8409, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1441, 181355, 530, 1, 1, -3966.465, 2185.426, 101.8951, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1442, 181355, 530, 1, 1, -4008.345, 2172.325, 105.0965, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1443, 181355, 530, 1, 1, -3984.704, 2162.162, 105.4418, 4.380776, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1444, 181355, 530, 1, 1, -4026.63, 2188.58, 109.1173, 2.251473, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1445, 181355, 530, 1, 1, -4062.359, 2190.83, 109.8543, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1446, 181355, 530, 1, 1, -4047.156, 2228.053, 112.0462, 5.951575, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1447, 181355, 530, 1, 1, -4035.944, 2238.973, 112.2723, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3745) +(@OGUID+1448, 181355, 530, 1, 1, -4130.572, 1173.389, 49.58154, 5.777041, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3938) +(@OGUID+1449, 181355, 530, 1, 1, -4084.195, 1138.926, 44.43298, 4.537859, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3938) +(@OGUID+1450, 181355, 530, 1, 1, -4062.444, 1135.474, 43.18277, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3938) +(@OGUID+1451, 181355, 530, 1, 1, -4088.488, 1139.846, 44.42666, 4.572764, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3938) +(@OGUID+1452, 181355, 530, 1, 1, -4065.08, 1138.295, 43.1756, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3938) +(@OGUID+1453, 181355, 530, 1, 1, -4135.374, 1128.675, 54.58289, 4.223697, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3938) +(@OGUID+1454, 181355, 530, 1, 1, -4114.819, 1116.677, 44.53127, 0.1745321, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3938) +(@OGUID+1455, 181355, 530, 1, 1, -4112.096, 1121.578, 44.54679, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3938) +(@OGUID+1456, 181355, 530, 1, 1, -3079.415, 748.1234, -10.33996, 6.248279, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1457, 181355, 530, 1, 1, -3089.802, 837.7723, -19.92381, 1.867502, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1458, 181355, 530, 1, 1, -3055.614, 812.4755, -9.506436, 0.4363316, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1459, 181355, 530, 1, 1, -3010.563, 770.086, -6.933084, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1460, 181355, 530, 1, 1, -3080.772, 825.7006, -11.35703, 1.029743, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1461, 181355, 530, 1, 1, -3040.775, 806.6836, -9.706291, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1462, 181355, 530, 1, 1, -3016.658, 795.0476, -9.916844, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1463, 181355, 530, 1, 1, -3009.987, 803.8392, -10.3957, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1464, 181355, 530, 1, 1, -3028.215, 823.3273, -9.546359, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1465, 181355, 530, 1, 1, -3041.075, 832.1203, -9.484895, 4.607672, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1466, 181355, 530, 1, 1, -2983.705, 809.1548, -6.9079, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1467, 181355, 530, 1, 1, -3007.626, 853.5888, -10.48604, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1468, 181355, 530, 1, 1, -3012.275, 861.4301, -10.48986, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1469, 181355, 530, 1, 1, -2983.507, 869.4686, -7.479865, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1470, 181355, 530, 1, 1, -3061.827, 853.1981, -11.37245, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1471, 181355, 530, 1, 1, -3075.424, 858.7751, -20.02081, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3754) +(@OGUID+1472, 181355, 571, 1, 1, 5797.108, 551.8475, 661.095, 0.5759573, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1473, 181355, 571, 1, 1, 5843.04, 581.1298, 651.76, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1474, 181355, 571, 1, 1, 5803.461, 547.2244, 660.9998, 1.308995, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1475, 181355, 571, 1, 1, 5763.885, 572.2188, 649.8002, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1476, 181355, 571, 1, 1, 5864.823, 610.4653, 650.7043, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1477, 181355, 571, 1, 1, 5745.615, 586.7101, 649.3102, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1478, 181355, 571, 1, 1, 5839.251, 641.2769, 647.5121, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1479, 181355, 571, 1, 1, 5789.479, 641.6511, 647.4436, 0.6283169, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1480, 181355, 571, 1, 1, 5761.894, 592.8934, 613.7905, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1481, 181355, 571, 1, 1, 5807.717, 654.8577, 647.4246, 5.427975, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1482, 181355, 571, 1, 1, 5846.925, 644.6152, 658.404, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1483, 181355, 571, 1, 1, 5825.186, 655.9732, 647.5557, 4.223697, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1484, 181355, 571, 1, 1, 5776.402, 530.3011, 641.5594, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1485, 181355, 571, 1, 1, 5748.025, 626.0618, 660.9924, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1486, 181355, 571, 1, 1, 5845.924, 652.1758, 658.404, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1487, 181355, 571, 1, 1, 5743.978, 624.6772, 648.4809, 3.543024, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1488, 181355, 571, 1, 1, 5735.165, 606.0434, 647.9391, 1.518436, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1489, 181355, 571, 1, 1, 5746.787, 636.5056, 660.9924, 5.916668, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1490, 181355, 571, 1, 1, 5833.373, 645.4617, 609.1575, 2.530723, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1491, 181355, 571, 1, 1, 5840.909, 508.295, 657.4862, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1492, 181355, 571, 1, 1, 5822.227, 502.8376, 657.378, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1493, 181355, 571, 1, 1, 5898.554, 629.4965, 646.7423, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4395) +(@OGUID+1494, 181355, 571, 1, 1, 5805.41, 708.4702, 641.4802, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1495, 181355, 571, 1, 1, 5796.696, 707.4605, 641.7041, 1.762782, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1496, 181355, 571, 1, 1, 5751.683, 681.7147, 613.2468, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1497, 181355, 571, 1, 1, 5867.476, 689.2825, 643.1117, 4.049168, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1498, 181355, 571, 1, 1, 5750.272, 691.2866, 618.5539, 5.375615, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1499, 181355, 571, 1, 1, 5845.667, 696.0077, 610.6929, 4.153885, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1500, 181355, 571, 1, 1, 5826.764, 723.2586, 641.2166, 3.979355, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1501, 181355, 571, 1, 1, 5734.079, 690.025, 646.5366, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1502, 181355, 571, 1, 1, 5773.907, 718.0335, 618.5657, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1503, 181355, 571, 1, 1, 5904.524, 663.1807, 643.8438, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1504, 181355, 571, 1, 1, 5756.162, 712.4989, 618.5643, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1505, 181355, 571, 1, 1, 5771.891, 737.5848, 641.4211, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4739) +(@OGUID+1506, 181355, 571, 1, 1, 5823.329, 760.0555, 640.327, 4.258607, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4613) +(@OGUID+1507, 181355, 571, 1, 1, 5914.837, 700.7205, 641.8951, 2.879789, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4613) +(@OGUID+1508, 181355, 571, 1, 1, 5892.815, 743.408, 639.8414, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4613) +(@OGUID+1509, 181355, 571, 1, 1, 5929.599, 639.7736, 645.5601, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1510, 181355, 571, 1, 1, 5943.547, 636.654, 652.9702, 3.246347, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1511, 181355, 571, 1, 1, 5921.778, 619.2034, 645.9958, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1512, 181355, 571, 1, 1, 5944.347, 617.7059, 650.5828, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1513, 181355, 571, 1, 1, 5958.763, 626.1614, 650.6269, 5.98648, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1514, 181355, 571, 1, 1, 5934.438, 611.9415, 652.9656, 2.007128, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1515, 181355, 571, 1, 1, 5953.268, 610.4814, 650.6269, 5.951575, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1516, 181355, 571, 1, 1, 5947.679, 626.1014, 650.5775, 3.438303, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1517, 181355, 571, 1, 1, 5803.736, 772.4315, 661.2783, 4.468043, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1518, 181355, 571, 1, 1, 5787.012, 774.6193, 661.2783, 4.380776, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1519, 181355, 571, 1, 1, 5808.237, 791.7759, 632.587, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4620) +(@OGUID+1520, 181355, 571, 1, 1, 5988.101, 621.1797, 650.6269, 3.490667, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4618) +(@OGUID+1521, 181355, 571, 1, 1, 5978.208, 595.1833, 650.6149, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4618) +(@OGUID+1522, 181355, 571, 1, 1, 5886.956, 526.6721, 642.1017, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4613) +(@OGUID+1523, 181355, 571, 1, 1, 5890.065, 519.4915, 641.9147, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4613) +(@OGUID+1524, 181355, 571, 1, 1, 5882.65, 517.4098, 641.9064, 5.427975, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4613) +(@OGUID+1525, 181355, 571, 1, 1, 5845.724, 435.9962, 657.6264, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4616) +(@OGUID+1526, 181355, 571, 1, 1, 5788.177, 425.141, 657.5775, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4616) +(@OGUID+1527, 181355, 571, 1, 1, 5694.438, 614.2162, 646.6755, 0.5235979, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4567) +(@OGUID+1528, 181355, 571, 1, 1, 5676.881, 659.645, 647.1504, 0.157079, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1529, 181355, 571, 1, 1, 5663.002, 663.5723, 654.331, 0.3316107, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1530, 181355, 571, 1, 1, 5659.298, 673.91, 651.942, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1531, 181355, 571, 1, 1, 5663.514, 682.673, 651.9452, 4.991644, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1532, 181355, 571, 1, 1, 5673.695, 687.83, 654.3299, 4.834563, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1533, 181355, 571, 1, 1, 5685.707, 679.8306, 646.3728, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1534, 181355, 571, 1, 1, 5648.303, 675.3729, 651.9927, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1535, 181355, 571, 1, 1, 5654.433, 690.0082, 651.9927, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1536, 181355, 571, 1, 1, 5668.66, 718.72, 653.374, 0.3665176, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1537, 181355, 571, 1, 1, 5620.479, 681.7556, 651.9917, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1538, 181355, 571, 1, 1, 5716.991, 723.6447, 641.6827, 0.9075702, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1539, 181355, 571, 1, 1, 5630.848, 705.8953, 651.9803, 5.096362, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1540, 181355, 571, 1, 1, 5710.433, 728.6938, 641.7766, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1541, 181355, 571, 1, 1, 5677.676, 730.4684, 653.3763, 4.380776, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1542, 181355, 571, 1, 1, 5704.065, 734.105, 641.7964, 0.8377575, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1543, 181355, 571, 1, 1, 5739.42, 737.81, 656.8243, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1544, 181355, 571, 1, 1, 5642.215, 754.7111, 641.5667, 3.961899, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1545, 181355, 571, 1, 1, 5740.807, 738.6092, 641.7399, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4568) +(@OGUID+1546, 181355, 571, 1, 1, 5604.811, -585.7176, 190.7496, 3.769912, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1547, 181355, 571, 1, 1, 5584.251, -629.2432, 200.8343, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1548, 181355, 571, 1, 1, 5599.725, -657.509, 206.5477, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1549, 181355, 571, 1, 1, 5625.548, -686.5305, 206.7068, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4558) +(@OGUID+1550, 181355, 571, 1, 1, 5580.268, -697.3196, 206.5641, 0.2443456, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4558) +(@OGUID+1551, 181355, 571, 1, 1, 5589.943, -703.3426, 206.5078, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4558) +(@OGUID+1552, 181355, 571, 1, 1, 5586.114, -689.245, 206.4881, 5.166176, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4558) +(@OGUID+1553, 181355, 571, 1, 1, 5606.221, -679.8115, 206.6132, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4558) +(@OGUID+1554, 181355, 571, 1, 1, 5588.058, -679.0422, 206.6395, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4558) +(@OGUID+1555, 181355, 571, 1, 1, 5625.443, -713.1502, 206.2666, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4558) +(@OGUID+1556, 181355, 571, 1, 1, 5607.554, -712.7868, 206.22, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4558) +(@OGUID+1557, 181355, 571, 1, 1, 5536.639, -725.7694, 149.5032, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4558) +(@OGUID+1558, 181355, 571, 1, 1, 5138.901, -690.0164, 170.9514, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1559, 181355, 571, 1, 1, 5073.382, -609.6163, 219.526, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1560, 181355, 571, 1, 1, 5075.984, -598.5662, 219.9713, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1561, 181355, 571, 1, 1, 5136.48, -723.6473, 172.1055, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1562, 181355, 571, 1, 1, 5053.332, -577.4028, 219.9713, 6.126106, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1563, 181355, 571, 1, 1, 5071.924, -583.3045, 219.9861, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1564, 181355, 571, 1, 1, 5054.523, -617.343, 219.3136, 0.6981314, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1565, 181355, 571, 1, 1, 5051.946, -596.0672, 220.2646, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4557) +(@OGUID+1566, 181355, 571, 1, 1, 5059.967, -556.7086, 220.0492, 6.108654, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4559) +(@OGUID+1567, 181355, 571, 1, 1, 5074.282, -550.5836, 219.9259, 3.438303, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4559) +(@OGUID+1568, 181355, 571, 1, 1, 5046.622, -548.3624, 222.002, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4559) +(@OGUID+1569, 181355, 571, 1, 1, 5027.92, -522.6423, 226.9366, 0.4188786, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4559) +(@OGUID+1570, 181355, 571, 1, 1, 5035.096, -526.5712, 225.6855, 1.483528, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4559) +(@OGUID+1571, 181355, 571, 1, 1, 5034.275, -512.3834, 225.9249, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4559) +(@OGUID+1572, 181355, 571, 1, 1, 5048.662, -524.6389, 220.05, 5.899214, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4559) +(@OGUID+1573, 181355, 571, 1, 1, 5235.554, -1320.319, 242.1471, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 66) +(@OGUID+1574, 181355, 571, 1, 1, 5233.944, -1309.333, 242.7248, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 66) +(@OGUID+1575, 181355, 571, 1, 1, 5228.022, -1298.785, 242.8026, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 66) +(@OGUID+1576, 181355, 571, 1, 1, 5221.921, -1337.251, 241.8586, 5.253442, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 66) +(@OGUID+1577, 181355, 571, 1, 1, 5209.904, -1336.67, 242.6071, 4.572764, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 66) +(@OGUID+1578, 181355, 571, 1, 1, 5197.744, -1301.545, 244.1698, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4312) +(@OGUID+1579, 181355, 571, 1, 1, 5135.955, -2183.239, 236.8366, 5.689774, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1580, 181355, 571, 1, 1, 5174.28, -2190.904, 236.5399, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1581, 181355, 571, 1, 1, 5170.655, -2175.094, 236.524, 3.979355, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1582, 181355, 571, 1, 1, 5135.756, -2204.338, 236.5436, 0.383971, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1583, 181355, 571, 1, 1, 5196.799, -2208.144, 239.3988, 2.932139, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4317) +(@OGUID+1584, 181355, 571, 1, 1, 5153.606, -2216.569, 236.805, 1.919862, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4317) +(@OGUID+1585, 181355, 571, 1, 1, 5190.787, -2215.081, 239.3982, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4317) +(@OGUID+1586, 181355, 571, 1, 1, 5406.375, -2612.042, 303.9539, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1587, 181355, 571, 1, 1, 5436.389, -2618.382, 306.5511, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1588, 181355, 571, 1, 1, 5464.559, -2619.046, 306.5511, 3.717554, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1589, 181355, 571, 1, 1, 5382.32, -2632.782, 303.9539, 0.087266, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1590, 181355, 571, 1, 1, 5408.356, -2679.761, 303.9539, 1.012289, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1591, 181355, 571, 1, 1, 5302.596, -2755.095, 292.2518, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1592, 181355, 571, 1, 1, 5500.086, -2657.195, 303.9539, 6.126106, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1593, 181355, 571, 1, 1, 5526.226, -2674.84, 303.9539, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1594, 181355, 571, 1, 1, 5528.214, -2651.125, 303.9539, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1595, 181355, 571, 1, 1, 5527.774, -2637.863, 303.9539, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1596, 181355, 571, 1, 1, 5606.558, -2623.187, 292.2171, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1597, 181355, 571, 1, 1, 5615.992, -2629.843, 293.4687, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1598, 181355, 571, 1, 1, 5636.928, -2630.586, 293.3238, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4275) +(@OGUID+1599, 181355, 571, 1, 1, 5648.471, -2623.089, 292.4185, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1600, 181355, 571, 1, 1, 5268.589, -2787.73, 292.4185, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1601, 181355, 571, 1, 1, 5282.011, -2787.762, 293.2, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1602, 181355, 571, 1, 1, 5764.8, -3532.155, 388.3556, 4.450591, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1603, 181355, 571, 1, 1, 5750.8, -3535.454, 389.0267, 5.532695, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1604, 181355, 571, 1, 1, 5790.555, -3548.062, 387.1112, 3.735006, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4323) +(@OGUID+1605, 181355, 571, 1, 1, 5758.551, -3620.203, 385.8352, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4323) +(@OGUID+1606, 181355, 571, 1, 1, 5783.694, -3600.81, 387.7156, 2.35619, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4323) +(@OGUID+1607, 181355, 571, 1, 1, 5789.338, -3595.79, 388.8241, 2.967041, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4323) +(@OGUID+1608, 181355, 571, 1, 1, 5774.17, -3614.33, 387.6901, 3.316144, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4323) +(@OGUID+1609, 181355, 571, 1, 1, 5794.01, -3586.305, 388.6537, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4323) +(@OGUID+1610, 181355, 571, 1, 1, 6087.308, -1119.368, 420.1114, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4418) +(@OGUID+1611, 181355, 571, 1, 1, 6132.971, -1080.292, 402.5479, 3.211419, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4418) +(@OGUID+1612, 181355, 571, 1, 1, 6075.46, -1113.703, 420.0166, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4418) +(@OGUID+1613, 181355, 571, 1, 1, 6143.565, -1062.889, 402.4637, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4418) +(@OGUID+1614, 181355, 571, 1, 1, 6128.463, -1071.167, 402.915, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4418) +(@OGUID+1615, 181355, 571, 1, 1, 6181.414, -1060.371, 410.6938, 1.343901, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4418) +(@OGUID+1616, 181355, 571, 1, 1, 6195.851, -1050.231, 410.5798, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4418) +(@OGUID+1617, 181355, 571, 1, 1, 6105.885, -1064.441, 403.3065, 5.759588, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4418) +(@OGUID+1618, 181355, 571, 1, 1, 6104.259, -1076.63, 403.506, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4418) +(@OGUID+1619, 181355, 571, 1, 1, 6158.618, -1034.013, 409.6059, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4418) +(@OGUID+1620, 181355, 571, 1, 1, 7879.499, -759.5701, 1175.366, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4429) +(@OGUID+1621, 181355, 571, 1, 1, 7856.442, -742.1389, 1177.688, 6.108654, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4429) +(@OGUID+1622, 181355, 571, 1, 1, 7850.471, -793.3299, 1183.955, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4429) +(@OGUID+1623, 181355, 571, 1, 1, 8436.615, -338.5281, 906.6075, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1624, 181355, 571, 1, 1, 8471.394, -348.3333, 906.9317, 1.815142, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1625, 181355, 571, 1, 1, 8442.052, -343.1962, 906.6075, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1626, 181355, 571, 1, 1, 8477.151, -325.8229, 905.8746, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1627, 181355, 571, 1, 1, 8856.849, -1321.51, 1033.438, 6.021387, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4445) +(@OGUID+1628, 181355, 571, 1, 1, 8894.639, -1370.033, 1033.83, 2.548179, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4445) +(@OGUID+1629, 181355, 571, 1, 1, 8861.067, -1331.563, 1032.665, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4445) +(@OGUID+1630, 181355, 571, 1, 1, 8875.349, -1375.627, 1034.185, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4445) +(@OGUID+1631, 181355, 571, 1, 1, 7816.585, -2769.492, 1188.78, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4463) +(@OGUID+1632, 181355, 571, 1, 1, 7791.917, -2804.668, 1216.788, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4441) +(@OGUID+1633, 181355, 571, 1, 1, 7776.338, -2838.651, 1217.121, 0.9773831, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4441) +(@OGUID+1634, 181355, 571, 1, 1, 7825.241, -2903.613, 1240.885, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4441) +(@OGUID+1635, 181355, 571, 1, 1, 7794.875, -2944.564, 1257.248, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4441) +(@OGUID+1636, 181355, 571, 1, 1, 7819.583, -2965.007, 1257.747, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4441) +(@OGUID+1637, 181355, 571, 1, 1, 7784.97, -2964.539, 1259, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4441) +(@OGUID+1638, 181355, 571, 1, 1, 7807.439, -2977.434, 1258.977, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4441) +(@OGUID+1639, 181355, 571, 1, 1, 4604.299, -4216.11, 178.7165, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1640, 181355, 571, 1, 1, 4585.377, -4225.431, 178.0588, 2.548179, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1641, 181355, 571, 1, 1, 4578.913, -4263.682, 182.0264, 1.221729, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1642, 181355, 571, 1, 1, 4574.175, -4252.902, 182.2079, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1643, 181355, 571, 1, 1, 4554.03, -4232.887, 170.6884, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1644, 181355, 571, 1, 1, 4549.178, -4253.708, 170.7494, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1645, 181355, 571, 1, 1, 4550.191, -4182.836, 173.4989, 1.518436, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1646, 181355, 571, 1, 1, 4544.073, -4208.386, 170.6733, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1647, 181355, 571, 1, 1, 4531.979, -4176.561, 173.4836, 6.178466, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4159) +(@OGUID+1648, 181355, 571, 1, 1, 3854.53, -4499.983, 208.0386, 2.82743, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4205) +(@OGUID+1649, 181355, 571, 1, 1, 3883.566, -4522.057, 217.378, 2.635444, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4205) +(@OGUID+1650, 181355, 571, 1, 1, 3848.002, -4506.846, 207.7856, 1.867502, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4205) +(@OGUID+1651, 181355, 571, 1, 1, 3844.868, -4517.594, 210.5048, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1652, 181355, 571, 1, 1, 3866.024, -4531.325, 209.7259, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1653, 181355, 571, 1, 1, 3835.15, -4527.149, 210.6371, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1654, 181355, 571, 1, 1, 3847.246, -4556.365, 210.1268, 0.8377575, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1655, 181355, 571, 1, 1, 3871.145, -4567.245, 207.5447, 5.619962, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1656, 181355, 571, 1, 1, 3415.254, -2872.224, 200.8262, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1657, 181355, 571, 1, 1, 3413.37, -2812.231, 200.4576, 5.078908, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1658, 181355, 571, 1, 1, 3399.997, -2879.164, 201.2327, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1659, 181355, 571, 1, 1, 3432.563, -2829.036, 201.7036, 1.97222, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1660, 181355, 571, 1, 1, 3414.616, -2778.184, 201.5204, 5.201083, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4204) +(@OGUID+1661, 181355, 571, 1, 1, 3428.656, -2766.984, 200.3678, 2.251473, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4204) +(@OGUID+1662, 181355, 571, 1, 1, 3441.72, -2747.261, 199.3887, 4.799657, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4204) +(@OGUID+1663, 181355, 571, 1, 1, 3457.128, -2785.357, 201.2523, 0.1745321, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4204) +(@OGUID+1664, 181355, 571, 1, 1, 3452.198, -2755.466, 199.3946, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4204) +(@OGUID+1665, 181355, 571, 1, 1, 3302.054, -2350.771, 108.8892, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4217) +(@OGUID+1666, 181355, 571, 1, 1, 3316.353, -2328.825, 111.0914, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1667, 181355, 571, 1, 1, 3225.829, -2298.399, 107.2934, 0.8377575, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4206) +(@OGUID+1668, 181355, 571, 1, 1, 3267.523, -2271.925, 114.2197, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4248) +(@OGUID+1669, 181355, 571, 1, 1, 3237.112, -2271.502, 113.9172, 1.605702, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4248) +(@OGUID+1670, 181355, 571, 1, 1, 3323.304, -2296.872, 110.1093, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4248) +(@OGUID+1671, 181355, 571, 1, 1, 3183.712, -2235.236, 114.8628, 3.926996, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4248) +(@OGUID+1672, 181355, 571, 1, 1, 3184.458, -2253.973, 114.8628, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4248) +(@OGUID+1673, 181355, 571, 1, 1, 3294.673, -2261.47, 111.9283, 3.926996, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4248) +(@OGUID+1674, 181355, 571, 1, 1, 3248.892, -2223.04, 116.8297, 4.799657, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4248) +(@OGUID+1675, 181355, 571, 1, 1, 3268.585, -2230.661, 116.8297, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4248) +(@OGUID+1676, 181355, 571, 1, 1, 3308.395, -2221.642, 115.808, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4206) +(@OGUID+1677, 181355, 571, 1, 1, 3352.523, -2221.079, 119.4523, 0.4014249, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4206) +(@OGUID+1678, 181355, 571, 1, 1, 3286.429, -2201.523, 117.3726, 3.839725, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4206) +(@OGUID+1679, 181355, 571, 1, 1, 3344.212, -2203.41, 119.4523, 0.3316107, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4206) +(@OGUID+1680, 181355, 571, 1, 1, 3364.74, -2139.107, 124.0401, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4206) +(@OGUID+1681, 181355, 571, 1, 1, 3097.866, -2272.845, 96.25359, 3.490667, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4206) +(@OGUID+1682, 181355, 571, 1, 1, 3093.765, -2252.836, 97.05368, 3.490667, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4206) +(@OGUID+1683, 181355, 571, 1, 1, 3363.374, -2105.042, 123.5086, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1684, 181355, 571, 1, 1, 3377.798, -2136.68, 124.9248, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1685, 181355, 571, 1, 1, 2538.165, -1999.59, 8.439572, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1686, 181355, 571, 1, 1, 2549.787, -1992.145, 8.439572, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1687, 181355, 571, 1, 1, 2503.962, -1936.449, 10.39561, 1.012289, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1688, 181355, 571, 1, 1, 2493.727, -1921.882, 10.72953, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1689, 181355, 571, 1, 1, 2553.7, -1912.366, 2.313859, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1690, 181355, 571, 1, 1, 2554.446, -1931.769, 3.000129, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1691, 181355, 571, 1, 1, 2546.487, -1837.444, 10.57294, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1692, 181355, 571, 1, 1, 2559.23, -1828.403, 10.51216, 2.321287, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1693, 181355, 571, 1, 1, 2600.053, -1802.445, 10.64246, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1694, 181355, 571, 1, 1, 2595.78, -1789.134, 10.64246, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1695, 181355, 571, 1, 1, 2491.829, -1845.16, 10.7064, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1696, 181355, 571, 1, 1, 2497.92, -1838.303, 10.55219, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1697, 181355, 571, 1, 1, 2485.413, -1882.31, 9.955285, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1698, 181355, 571, 1, 1, 2485.737, -1895.543, 10.02251, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1699, 181355, 571, 1, 1, 2444.651, -1838.691, 1.022343, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1700, 181355, 571, 1, 1, 2438.875, -1853.441, 1.204814, 0.2443456, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4242) +(@OGUID+1701, 181355, 571, 1, 1, 2109.816, -2988.45, 148.3804, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4070) +(@OGUID+1702, 181355, 571, 1, 1, 2117.118, -2965.382, 148.6169, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4070) +(@OGUID+1703, 181355, 571, 1, 1, 2140.401, -2968.399, 148.3356, 4.433136, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1704, 181355, 571, 1, 1, 2142.096, -2984.892, 148.9165, 1.937312, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1705, 181355, 571, 1, 1, 1435.889, -3265.063, 178.2813, 0.1396245, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4071) +(@OGUID+1706, 181355, 571, 1, 1, 1428.256, -3256.8, 165.615, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4071) +(@OGUID+1707, 181355, 571, 1, 1, 1401.351, -3262.329, 163.0069, 2.251473, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4071) +(@OGUID+1708, 181355, 571, 1, 1, 1458.753, -3200.1, 165.5917, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4071) +(@OGUID+1709, 181355, 571, 1, 1, 1408.13, -3251.247, 162.0143, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4071) +(@OGUID+1710, 181355, 571, 1, 1, 1394.399, -3307.07, 166.7923, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1711, 181355, 571, 1, 1, 1349.468, -3297.907, 174.7129, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1712, 181355, 571, 1, 1, 1352.596, -3284.401, 174.7101, 3.508117, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1713, 181355, 571, 1, 1, 1370.036, -3334.958, 173.685, 4.852017, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1714, 181355, 571, 1, 1, 1341.442, -3276.221, 174.6177, 4.537859, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1715, 181355, 571, 1, 1, 1400.156, -3458.59, 174.5718, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1716, 181355, 571, 1, 1, 1351.665, -3457.366, 175.9246, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1717, 181355, 571, 1, 1, 1355.771, -3193.905, 162.8225, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1718, 181355, 571, 1, 1, 1371.299, -3185.653, 162.8225, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1719, 181355, 571, 1, 1, 1416.06, -3120.286, 167.5702, 4.34587, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1720, 181355, 571, 1, 1, 1429.037, -3131.07, 167.7346, 3.543024, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1721, 181355, 571, 1, 1, 1389.093, -3096.109, 167.4995, 3.700105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1722, 181355, 571, 1, 1, 1431.132, -3152.292, 164.8159, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3998) +(@OGUID+1723, 181355, 571, 1, 1, 811.6979, -2925.72, 7.491168, 3.47321, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1724, 181355, 571, 1, 1, 784.9827, -2956.3, 8.627842, 4.171338, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1725, 181355, 571, 1, 1, 765.1684, -2962.793, 9.955372, 6.021387, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1726, 181355, 571, 1, 1, 807.6268, -2945.674, 6.90544, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1727, 181355, 571, 1, 1, 731.5729, -2945.844, 9.658432, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1728, 181355, 571, 1, 1, 728.2534, -2936.78, 8.08532, 0.9773831, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1729, 181355, 571, 1, 1, 738.8159, -2917.706, 7.83575, 5.777041, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1730, 181355, 571, 1, 1, 708.9809, -2939.207, -3.255977, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1731, 181355, 571, 1, 1, 726.3077, -2921.696, 7.548036, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1732, 181355, 571, 1, 1, 706.6024, -2924.741, -3.165701, 3.996807, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1733, 181355, 571, 1, 1, 733.0174, -2896.646, 7.161568, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1734, 181355, 571, 1, 1, 786.5696, -2895.316, 7.331877, 2.652894, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3987) +(@OGUID+1735, 181355, 571, 1, 1, 785.8663, -2882.146, 4.527083, 3.979355, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3988) +(@OGUID+1736, 181355, 571, 1, 1, 775.6638, -2854.298, 4.683801, 4.607672, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3988) +(@OGUID+1737, 181355, 571, 1, 1, 785.3965, -2856.019, 4.484005, 4.415683, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3988) +(@OGUID+1738, 181355, 571, 1, 1, 434.1599, -4539.468, 245.8032, 2.967041, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3991) +(@OGUID+1739, 181355, 571, 1, 1, 404.2422, -4538.7, 245.8211, 3.769912, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3991) +(@OGUID+1740, 181355, 571, 1, 1, 400.0066, -4535.086, 246.1532, 4.258607, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3991) +(@OGUID+1741, 181355, 571, 1, 1, 446.3067, -4559.884, 245.5032, 4.363324, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3991) +(@OGUID+1742, 181355, 571, 1, 1, 493.6993, -4605.006, 243.6478, 3.316144, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3991) +(@OGUID+1743, 181355, 571, 1, 1, 403.795, -4652.395, 243.9677, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3991) +(@OGUID+1744, 181355, 571, 1, 1, 412.7631, -4658.49, 246.6353, 0.3490652, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3991) +(@OGUID+1745, 181355, 571, 1, 1, 641.0491, -5019.355, 4.459393, 3.211419, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3981) +(@OGUID+1746, 181355, 571, 1, 1, 563.828, -5017.783, 11.59005, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3981) +(@OGUID+1747, 181355, 571, 1, 1, 569.194, -5003.27, 11.0998, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3981) +(@OGUID+1748, 181355, 571, 1, 1, 604.1622, -5108.14, 4.842274, 1.623156, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3981) +(@OGUID+1749, 181355, 571, 1, 1, 575.377, -5101.069, 5.191134, 0.6981314, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3981) +(@OGUID+1750, 181355, 571, 1, 1, 577.2066, -4954.415, 18.2157, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3981) +(@OGUID+1751, 181355, 571, 1, 1, 584.0461, -4934.744, 29.65519, 1.029743, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3981) +(@OGUID+1752, 181355, 571, 1, 1, 569.7136, -4931.643, 17.79272, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3981) +(@OGUID+1753, 181355, 571, 1, 1, 540.1192, -4999.92, 10.53384, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3981) +(@OGUID+1754, 181355, 571, 1, 1, 1882.581, -6170.531, 23.82956, 0.8377575, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4000) +(@OGUID+1755, 181355, 571, 1, 1, 1899.31, -6178.332, 24.02914, 1.151916, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4000) +(@OGUID+1756, 181355, 571, 1, 1, 1919.915, -6182.599, 24.47692, 1.727875, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4000) +(@OGUID+1757, 181355, 571, 1, 1, 1927.329, -6186.836, 24.11248, 1.727875, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4000) +(@OGUID+1758, 181355, 571, 1, 1, 2021.995, -6214.678, 7.750907, 2.094393, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4000) +(@OGUID+1759, 181355, 571, 1, 1, 2429.503, -5159.25, 277.0016, 5.061456, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4055) +(@OGUID+1760, 181355, 571, 1, 1, 2429.847, -5168.776, 277.1109, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4055) +(@OGUID+1761, 181355, 571, 1, 1, 2438.945, -5120.976, 275.9086, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4003) +(@OGUID+1762, 181355, 571, 1, 1, 2417.962, -5122.142, 276.594, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4003) +(@OGUID+1763, 181355, 571, 1, 1, 2422.845, -5074.851, 272.2427, 0, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4003) +(@OGUID+1764, 181355, 571, 1, 1, 2476.26, -5072.812, 283.0372, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4003) +(@OGUID+1765, 181355, 571, 1, 1, 2464.117, -5036.913, 283.7561, 0.7330382, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4003) +(@OGUID+1766, 181355, 571, 1, 1, 2462.827, -5023.975, 283.7139, 5.410522, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4003) +(@OGUID+1767, 181355, 571, 1, 1, 2451.606, -4908.155, 263.5596, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4003) +(@OGUID+1768, 181355, 571, 1, 1, 2455.862, -4913.752, 264.1513, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4003) +(@OGUID+1769, 181355, 571, 1, 1, 2455.862, -4913.752, 264.1513, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4003) +(@OGUID+1770, 181355, 571, 1, 1, 2451.606, -4908.155, 263.5596, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4003) +(@OGUID+1771, 181355, 571, 1, 1, 2461.599, -4898.379, 262.9199, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1772, 181355, 571, 1, 1, 2469.49, -4907.808, 264.066, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1773, 181355, 571, 1, 1, 2657.285, -4403.338, 283.9217, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1774, 181355, 571, 1, 1, 2654.31, -4365.038, 277.5075, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1775, 181355, 571, 1, 1, 2642.45, -4384.394, 283.2693, 6.03884, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1776, 181355, 571, 1, 1, 2681.611, -4385.324, 284.4337, 4.555311, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1777, 181355, 571, 1, 1, 2681.398, -4378.912, 282.9612, 1.989672, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1778, 181355, 571, 1, 1, 2675.206, -4331.749, 289.7764, 0.8203033, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4018) +(@OGUID+1779, 181355, 571, 1, 1, 2620.654, -4361.461, 276.4902, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4018) +(@OGUID+1780, 181355, 571, 1, 1, 2596.458, -4358.913, 275.6402, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4018) +(@OGUID+1781, 181355, 571, 1, 1, 2588.766, -4349.194, 275.7753, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4018) +(@OGUID+1782, 181355, 571, 1, 1, 2571.572, -4316.572, 278.0044, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4018) +(@OGUID+1783, 181355, 571, 1, 1, 3261.053, -755.9268, 174.2897, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1784, 181355, 571, 1, 1, 3274.188, -755.2222, 168.0432, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1785, 181355, 571, 1, 1, 3260.281, -749.4948, 168.42, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1786, 181355, 571, 1, 1, 3309.448, -746.7072, 179.006, 3.892087, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1787, 181355, 571, 1, 1, 3296.599, -736.467, 176.1194, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1788, 181355, 571, 1, 1, 3216.764, -730.0927, 173.64, 3.700105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1789, 181355, 571, 1, 1, 3235.794, -713.0104, 167.6716, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1790, 181355, 571, 1, 1, 3281.076, -720.5919, 175.8908, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1791, 181355, 571, 1, 1, 3270.005, -719.1215, 168.8549, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1792, 181355, 571, 1, 1, 3266.31, -712.2863, 172.5281, 4.450591, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1793, 181355, 571, 1, 1, 3267.798, -689.1566, 173.7582, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1794, 181355, 571, 1, 1, 3257.232, -695.9045, 167.3684, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1795, 181355, 571, 1, 1, 3209.856, -708.0291, 173.0501, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1796, 181355, 571, 1, 1, 3254.467, -668.7876, 174.1768, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1797, 181355, 571, 1, 1, 3249.678, -674.059, 167.3249, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1798, 181355, 571, 1, 1, 3215.154, -685.1657, 174.8388, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1799, 181355, 571, 1, 1, 3216.414, -654.4945, 173.1659, 0.8203033, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4186) +(@OGUID+1800, 181355, 571, 1, 1, 3201.649, -673.1436, 172.2877, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4186) +(@OGUID+1801, 181355, 571, 1, 1, 3202.44, -689.5214, 171.9362, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4186) +(@OGUID+1802, 181355, 571, 1, 1, 3649.295, -702.2972, 215.0318, 6.19592, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1803, 181355, 571, 1, 1, 3632.087, -711.0179, 214.2405, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1804, 181355, 571, 1, 1, 3658.59, -706.5002, 224.446, 3.490667, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1805, 181355, 571, 1, 1, 3676.882, -702.1511, 214.3667, 5.427975, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1806, 181355, 571, 1, 1, 3674.527, -739.8177, 213.8958, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1807, 181355, 571, 1, 1, 3698.531, -714.2257, 214.151, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1808, 181355, 571, 1, 1, 3697.376, -742.7101, 213.797, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1809, 181355, 571, 1, 1, 3704.834, -687.1371, 215.5728, 5.148723, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1810, 181355, 571, 1, 1, 3716.316, -708.1945, 215.473, 2.268925, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1811, 181355, 571, 1, 1, 3749.342, -769.8768, 197.4349, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1812, 181355, 571, 1, 1, 3781.028, -803.4545, 197.2077, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1813, 181355, 571, 1, 1, 3794.07, -804.0314, 197.3381, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1814, 181355, 571, 1, 1, 3803.82, -793.8429, 197.2356, 2.251473, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1815, 181355, 571, 1, 1, 3862.428, -745.8948, 221.1198, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1816, 181355, 571, 1, 1, 3843.911, -763.369, 219.3806, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1817, 181355, 571, 1, 1, 3858.99, -724.03, 221.2304, 3.752462, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1818, 181355, 571, 1, 1, 3822.775, -695.2535, 223.0013, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1819, 181355, 571, 1, 1, 3866.354, -771.1376, 220.3779, 1.169369, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1820, 181355, 571, 1, 1, 3826.776, -685.0971, 223.0013, 5.235988, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1821, 181355, 571, 1, 1, 3951.355, -780.9128, 244.63, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4177) +(@OGUID+1822, 181355, 571, 1, 1, 3562.132, 193.3676, 52.28502, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1823, 181355, 571, 1, 1, 3548.806, 191.4957, 52.29362, 0.1047193, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1824, 181355, 571, 1, 1, 3576.012, 201.1324, -120.133, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1825, 181355, 571, 1, 1, 3543.596, 229.0154, 116.7898, 0.157079, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1826, 181355, 571, 1, 1, 3557.755, 230.3309, 116.7897, 3.228859, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1827, 181355, 571, 1, 1, 3563.86, 208.5335, 52.2564, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1828, 181355, 571, 1, 1, 3604.824, 221.3126, -120.0548, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1829, 181355, 571, 1, 1, 3565.379, 213.0888, 116.8406, 4.607672, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1830, 181355, 571, 1, 1, 3542.329, 206.0333, 52.2564, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1831, 181355, 571, 1, 1, 3539.345, 210.2894, 116.8406, 4.834563, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1832, 181355, 571, 1, 1, 3532.222, 198.4992, -120.1445, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1833, 181355, 571, 1, 1, 3501.747, 212.1927, -120.1452, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4254) +(@OGUID+1834, 181355, 571, 1, 1, 3565.646, 245.8031, 117.1294, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1835, 181355, 571, 1, 1, 3517.434, 257.0187, 117.1313, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1836, 181355, 571, 1, 1, 3579.191, 264.8907, 117.1309, 2.897245, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1837, 181355, 571, 1, 1, 3535.776, 241.7472, 117.1205, 1.256636, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1838, 181355, 571, 1, 1, 3520.52, 258.9779, 47.3175, 0.4886912, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1839, 181355, 571, 1, 1, 3538.464, 244.5366, 47.31742, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1840, 181355, 571, 1, 1, 3561.06, 247.0676, 47.31746, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1841, 181355, 571, 1, 1, 3575.862, 264.2621, 47.31741, 2.844883, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1842, 181355, 571, 1, 1, 3613.162, 267.1122, 52.27297, 1.815142, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1843, 181355, 571, 1, 1, 3573.319, 287.2054, 47.31745, 3.630291, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1844, 181355, 571, 1, 1, 3483.588, 254.1247, 52.26856, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1845, 181355, 571, 1, 1, 3518.373, 281.8263, 47.31754, 5.98648, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1846, 181355, 571, 1, 1, 3576.934, 290.0081, 117.1281, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1847, 181355, 571, 1, 1, 3466.395, 254.6163, 52.29464, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1848, 181355, 571, 1, 1, 3595.918, 285.1813, -120.1526, 5.916668, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1849, 181355, 571, 1, 1, 3532.95, 299.9154, 47.31733, 5.183629, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1850, 181355, 571, 1, 1, 3559.003, 305.3416, 117.1257, 4.32842, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1851, 181355, 571, 1, 1, 3527.995, 301.947, 117.1261, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1852, 181355, 571, 1, 1, 3477.063, 249.0635, -120.1415, 0.4363316, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1853, 181355, 571, 1, 1, 3597.307, 271.0546, -120.1526, 0.3490652, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1854, 181355, 571, 1, 1, 3555.46, 301.8236, 47.3174, 4.415683, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1855, 181355, 571, 1, 1, 3514.207, 282.3757, 117.1297, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1856, 181355, 571, 1, 1, 3628.7, 289.4008, 52.28633, 4.81711, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1857, 181355, 571, 1, 1, 3530.838, 337.9557, 52.25639, 6.19592, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1858, 181355, 571, 1, 1, 3480.771, 279.4473, 52.26998, 4.939284, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1859, 181355, 571, 1, 1, 3535.763, 316.0141, 116.7898, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1860, 181355, 571, 1, 1, 3646.115, 260.8871, 52.25636, 0.6806767, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1861, 181355, 571, 1, 1, 3553.869, 335.9773, 116.7962, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1862, 181355, 571, 1, 1, 3527.488, 332.789, 116.7998, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1863, 181355, 571, 1, 1, 3551.697, 340.1284, 52.2564, 3.403396, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1864, 181355, 571, 1, 1, 3463.682, 274.7737, 52.29326, 4.886924, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1865, 181355, 571, 1, 1, 3610.144, 292.3628, 52.27081, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1866, 181355, 571, 1, 1, 3492.134, 322.4423, -120.1445, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1867, 181355, 571, 1, 1, 3630.185, 272.4107, 52.28997, 1.797689, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1868, 181355, 571, 1, 1, 3471.14, 281.1834, -120.1448, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1869, 181355, 571, 1, 1, 3549.406, 317.3907, 116.7898, 3.281239, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1870, 181355, 571, 1, 1, 3562.234, 345.9385, -120.1445, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1871, 181355, 571, 1, 1, 3592.655, 332.8689, -120.1448, 4.310966, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1872, 181355, 571, 1, 1, 3515.109, 342.4366, -120.1445, 5.375615, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1873, 181355, 571, 1, 1, 3531.985, 349.9049, 52.27657, 0.01745246, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1874, 181355, 571, 1, 1, 3546.336, 351.4997, 52.27733, 3.368496, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1875, 181355, 571, 1, 1, 3675.714, 259.1941, 52.25635, 6.126106, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1876, 181355, 571, 1, 1, 3639.994, 308.4146, 52.25637, 5.724681, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1877, 181355, 571, 1, 1, 3658.891, 275.3087, -120.1445, 0.9075702, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1878, 181355, 571, 1, 1, 3656.756, 292.7126, -120.1445, 5.98648, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4161) +(@OGUID+1879, 181355, 571, 1, 1, 2837.893, 884.1483, 15.9367, 2.164206, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1880, 181355, 571, 1, 1, 2802.756, 890.1584, 12.88576, 4.97419, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1881, 181355, 571, 1, 1, 2801.712, 908.5086, 22.29059, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1882, 181355, 571, 1, 1, 2815.472, 918.7995, 20.88776, 3.857183, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1883, 181355, 571, 1, 1, 2771.326, 914.0045, 22.36399, 5.619962, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1884, 181355, 571, 1, 1, 2793.773, 931.6573, 22.35705, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1885, 181355, 571, 1, 1, 2772.131, 928.7278, 22.78977, 0.7330382, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1886, 181355, 571, 1, 1, 2787.118, 905.9583, 22.15631, 1.308995, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1887, 181355, 571, 1, 1, 2781.197, 933.6979, 22.78251, 3.543024, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1888, 181355, 571, 1, 1, 2784.236, 959.4688, 22.49838, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1889, 181355, 571, 1, 1, 2795.232, 971.2288, 22.84727, 3.787367, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1890, 181355, 571, 1, 1, 2754.224, 894.7058, 5.906912, 4.76475, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1891, 181355, 571, 1, 1, 2763.372, 862.8993, 6.277842, 5.777041, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1892, 181355, 571, 1, 1, 2720.492, 904.6319, 5.697, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1893, 181355, 571, 1, 1, 2722.365, 888.5219, 5.181851, 0.4014249, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1894, 181355, 571, 1, 1, 2743.732, 851.4514, 6.691175, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1895, 181355, 571, 1, 1, 2731.755, 930.2222, 0.360353, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1896, 181355, 571, 1, 1, 2659.202, 906.3993, 4.293646, 4.852017, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1897, 181355, 571, 1, 1, 2645.363, 884.6476, 4.748452, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1898, 181355, 571, 1, 1, 2663.845, 880.2552, 4.281791, 1.850049, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1899, 181355, 571, 1, 1, 2643.082, 897.5799, 4.501051, 6.021387, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4152) +(@OGUID+1900, 181355, 571, 1, 1, 3766.468, 1474.748, 92.95084, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1901, 181355, 571, 1, 1, 3775.184, 1476.524, 91.86177, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1902, 181355, 571, 1, 1, 3756.168, 1518.429, 88.89409, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1903, 181355, 571, 1, 1, 3772.201, 1518.562, 87.60015, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1904, 181355, 571, 1, 1, 3763.406, 1539.296, 87.04375, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1905, 181355, 571, 1, 1, 3837.253, 1460.372, 91.84299, 3.001947, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1906, 181355, 571, 1, 1, 3805.442, 1540.334, 89.73431, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1907, 181355, 571, 1, 1, 3826.221, 1467.968, 91.71698, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1908, 181355, 571, 1, 1, 3827.208, 1483.951, 92.06059, 0.05235888, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1909, 181355, 571, 1, 1, 3838.928, 1434.694, 90.64106, 5.375615, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1910, 181355, 571, 1, 1, 3833.705, 1420.332, 90.87871, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1911, 181355, 571, 1, 1, 3826.889, 1531.865, 95.81321, 0.9773831, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1912, 181355, 571, 1, 1, 3847.981, 1459.16, 91.84016, 0.05235888, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1913, 181355, 571, 1, 1, 3847.046, 1434.552, 90.64103, 4.450591, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1914, 181355, 571, 1, 1, 3856.728, 1468.202, 92.05556, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1915, 181355, 571, 1, 1, 3799.489, 1569.15, 89.72446, 3.612838, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1916, 181355, 571, 1, 1, 3828.599, 1550.87, 89.65501, 1.448622, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1917, 181355, 571, 1, 1, 3842.612, 1551.831, 89.72446, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1918, 181355, 571, 1, 1, 3807.621, 1601.288, 89.72446, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1919, 181355, 571, 1, 1, 3857.379, 1532.047, 95.73104, 2.007128, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1920, 181355, 571, 1, 1, 3781.226, 1617.937, 87.15925, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1921, 181355, 571, 1, 1, 3804.344, 1618.123, 89.31889, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1922, 181355, 571, 1, 1, 3856.719, 1587.243, 89.60239, 0.5934101, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1923, 181355, 571, 1, 1, 3825.676, 1611.223, 89.72446, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1924, 181355, 571, 1, 1, 3853.099, 1601.293, 89.72446, 0.157079, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1925, 181355, 571, 1, 1, 3869.433, 1563.036, 89.7524, 2.687807, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1926, 181355, 571, 1, 1, 3873.578, 1603.196, 90.13206, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1927, 181355, 571, 1, 1, 3852.562, 1420.469, 90.91337, 4.24115, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4165) +(@OGUID+1928, 181355, 571, 1, 1, 3515.828, 1981.839, 64.86245, 2.548179, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1929, 181355, 571, 1, 1, 3463.338, 1991.168, 64.61589, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1930, 181355, 571, 1, 1, 3487.095, 1996.391, 64.86275, 3.228859, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1931, 181355, 571, 1, 1, 3503.747, 2013.127, 64.86234, 3.403396, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1932, 181355, 571, 1, 1, 3533.275, 2028.212, 67.83712, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1933, 181355, 571, 1, 1, 4576.1, 1411.883, 192.813, 6.143561, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1934, 181355, 571, 1, 1, 4592.099, 1465.794, 194.402, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1935, 181355, 571, 1, 1, 4570.489, 1446.241, 189.2318, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1936, 181355, 571, 1, 1, 4616.955, 1458.385, 180.9932, 5.183629, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1937, 181355, 571, 1, 1, 4605.558, 1414.259, 194.6597, 4.642576, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1938, 181355, 571, 1, 1, 4571.249, 1421.148, 189.204, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1939, 181355, 571, 1, 1, 4690.823, 1517.44, 261.1075, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1940, 181355, 571, 1, 1, 4613.751, 1415.247, 194.6607, 4.485497, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1941, 181355, 571, 1, 1, 4616.932, 1401.385, 195.1734, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1942, 181355, 571, 1, 1, 4618.971, 1409.788, 194.7806, 3.508117, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1943, 181355, 571, 1, 1, 4692.931, 1529.158, 261.0022, 5.689774, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4167) +(@OGUID+1944, 181355, 571, 1, 1, 4570.071, 1394.947, 193.0704, 0, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4169) +(@OGUID+1945, 181355, 571, 1, 1, 4591.207, 1394.502, 193.8047, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4169) +(@OGUID+1946, 181355, 571, 1, 1, 4569.673, 1388.654, 192.915, 4.921829, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4169) +(@OGUID+1947, 181355, 571, 1, 1, 4866.249, 1289.011, 222.6894, 3.735006, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4171) +(@OGUID+1948, 181355, 571, 1, 1, 4896.076, 1252.84, 227.6416, 0.2443456, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4171) +(@OGUID+1949, 181355, 571, 1, 1, 4908.99, 1241.123, 226.8822, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4171) +(@OGUID+1950, 181355, 571, 1, 1, 4950.565, 1309.806, 235.062, 3.368496, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4171) +(@OGUID+1951, 181355, 571, 1, 1, 4919.086, 1318.598, 229.563, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4171) +(@OGUID+1952, 181355, 571, 1, 1, 4925.459, 1257.523, 226.8904, 1.326448, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4171) +(@OGUID+1953, 181355, 571, 1, 1, 4958.919, 1196.348, 226.8051, 1.797689, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4170) +(@OGUID+1954, 181355, 571, 1, 1, 4967.222, 1205.661, 227.3895, 2.548179, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4170) +(@OGUID+1955, 181355, 571, 1, 1, 4978.83, 1243.004, 227.4904, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4170) +(@OGUID+1956, 181355, 571, 1, 1, 4985.378, 1269.712, 229.3461, 3.246347, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4170) +(@OGUID+1957, 181355, 571, 1, 1, 4980.446, 1205.421, 227.7068, 1.117009, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4170) +(@OGUID+1958, 181355, 571, 1, 1, 5019.801, 1236.83, 230.0975, 3.961899, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4170) +(@OGUID+1959, 181355, 571, 1, 1, 4948.565, 1174.379, 239.7921, 4.485497, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4170) +(@OGUID+1960, 181355, 571, 1, 1, 4986.674, 1189.043, 227.4761, 5.98648, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4170) +(@OGUID+1961, 181355, 571, 1, 1, 5003.663, 1190.19, 227.3823, 2.792518, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4170) +(@OGUID+1962, 181355, 571, 1, 1, 4956.751, 1164.542, 239.6501, 4.258607, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4170) +(@OGUID+1963, 181355, 571, 1, 1, 5499.655, 4733.096, -194.545, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4291) +(@OGUID+1964, 181355, 571, 1, 1, 5480.355, 4744.158, -196.4283, 0.087266, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4291) +(@OGUID+1965, 181355, 571, 1, 1, 5480.522, 4749.844, -197.1695, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4291) +(@OGUID+1966, 181355, 571, 1, 1, 5489.249, 4730.626, -194.7575, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4291) +(@OGUID+1967, 181355, 571, 1, 1, 5478.019, 4730.707, -195.1084, 0.7853968, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4291) +(@OGUID+1968, 181355, 571, 1, 1, 5362.962, 4851.477, -196.1002, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4290) +(@OGUID+1969, 181355, 571, 1, 1, 5367.597, 4870.541, -193.5737, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4290) +(@OGUID+1970, 181355, 571, 1, 1, 5356.69, 4843.208, -195.7224, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4290) +(@OGUID+1971, 181355, 571, 1, 1, 5412.587, 4907.621, -194.4221, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4290) +(@OGUID+1972, 181355, 571, 1, 1, 5498.481, 4883.382, -198.6777, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4290) +(@OGUID+1973, 181355, 571, 1, 1, 5512.88, 4877.948, -197.8936, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4290) +(@OGUID+1974, 181355, 571, 1, 1, 5511.93, 4885.334, -197.5141, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4290) +(@OGUID+1975, 181355, 571, 1, 1, 5538.608, 5734.042, -76.70612, 3.316144, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1976, 181355, 571, 1, 1, 5594.934, 5715.648, -72.77393, 4.084071, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1977, 181355, 571, 1, 1, 5547.863, 5726.392, -76.03914, 4.502952, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1978, 181355, 571, 1, 1, 5575.626, 5710.971, -76.69463, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1979, 181355, 571, 1, 1, 5565.491, 5758.583, -75.22591, 5.794494, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1980, 181355, 571, 1, 1, 5584.725, 5752.109, -72.06274, 3.612838, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1981, 181355, 571, 1, 1, 5581.773, 5765.792, -74.64859, 5.061456, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1982, 181355, 571, 1, 1, 5590.33, 5779.955, -71.88873, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1983, 181355, 571, 1, 1, 5533.617, 5764.573, -78.64155, 0.802851, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1984, 181355, 571, 1, 1, 5623.018, 5797.692, -71.15307, 1.605702, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4284) +(@OGUID+1985, 181355, 571, 1, 1, 5591.747, 5812.308, -69.85215, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4284) +(@OGUID+1986, 181355, 571, 1, 1, 5609.327, 5807.859, -70.49896, 0.6457717, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4284) +(@OGUID+1987, 181355, 571, 1, 1, 4503.089, 5725.708, 81.28325, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4122) +(@OGUID+1988, 181355, 571, 1, 1, 4509.733, 5758.892, 81.67448, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4122) +(@OGUID+1989, 181355, 571, 1, 1, 4496.206, 5716.174, 81.43398, 1.221729, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4122) +(@OGUID+1990, 181355, 571, 1, 1, 4518.926, 5710.135, 81.47955, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4122) +(@OGUID+1991, 181355, 571, 1, 1, 4504.061, 5681.631, 81.48656, 3.543024, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4122) +(@OGUID+1992, 181355, 571, 1, 1, 4474.953, 5701.296, 81.26831, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4122) +(@OGUID+1993, 181355, 571, 1, 1, 4464.801, 5710.149, 81.19541, 0.4886912, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4122) +(@OGUID+1994, 181355, 571, 1, 1, 4477.252, 5619.131, 59.0644, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4122) +(@OGUID+1995, 181355, 571, 1, 1, 4470.023, 5611.964, 57.05235, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4122) +(@OGUID+1996, 181355, 571, 1, 1, 4436.702, 5642.711, 58.46593, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4122) +(@OGUID+1997, 181355, 571, 1, 1, 4153.679, 5394.383, 25.56959, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1998, 181355, 571, 1, 1, 4148.606, 5402.479, 27.19845, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+1999, 181355, 571, 1, 1, 4143.483, 5389.272, 26.23728, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2000, 181355, 571, 1, 1, 4140.316, 5399.663, 26.79937, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2001, 181355, 571, 1, 1, 4174.55, 5310.481, 25.4746, 2.809975, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2002, 181355, 571, 1, 1, 4124.854, 5302.798, 29.50037, 1.623156, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2003, 181355, 571, 1, 1, 4047.685, 5298.593, 24.65438, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2004, 181355, 571, 1, 1, 4064.177, 5287.178, 28.33383, 0.4886912, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2005, 181355, 571, 1, 1, 4079.892, 5272.371, 27.84729, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2006, 181355, 571, 1, 1, 4038.373, 5295.928, 24.80445, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2007, 181355, 571, 1, 1, 4116.859, 5260.454, 24.72842, 1.658062, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4108) +(@OGUID+2008, 181355, 571, 1, 1, 4133.651, 5261.081, 25.0436, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4108) +(@OGUID+2009, 181355, 571, 1, 1, 4166.071, 5288.284, 26.37672, 2.82743, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4108) +(@OGUID+2010, 181355, 571, 1, 1, 4188.307, 5253.252, 26.37672, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4108) +(@OGUID+2011, 181355, 571, 1, 1, 4203.514, 5258.505, 32.30191, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4108) +(@OGUID+2012, 181355, 571, 1, 1, 4245.934, 5261.749, 70.84612, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4108) +(@OGUID+2013, 181355, 571, 1, 1, 3460.45, 4186.23, 18.21275, 6.143561, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2014, 181355, 571, 1, 1, 3472.248, 4185.592, 18.24646, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2015, 181355, 571, 1, 1, 3484.245, 4164.788, 17.17531, 1.483528, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2016, 181355, 571, 1, 1, 3484.917, 4176.376, 17.19302, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2017, 181355, 571, 1, 1, 3444.581, 4167.645, 17.16287, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2018, 181355, 571, 1, 1, 3445, 4178.582, 17.15816, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2019, 181355, 571, 1, 1, 3469.884, 4115.7, 16.70656, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2020, 181355, 571, 1, 1, 3455.853, 4140.363, 15.27709, 5.235988, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2021, 181355, 571, 1, 1, 3468.707, 4138.945, 15.28419, 4.276057, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2022, 181355, 571, 1, 1, 3429.658, 4124.901, 16.82856, 5.253442, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2023, 181355, 571, 1, 1, 3437.819, 4086.14, 17.09811, 1.518436, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2024, 181355, 571, 1, 1, 3409.352, 4091.084, 18.57693, 4.468043, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2025, 181355, 571, 1, 1, 3419, 4110.042, 17.55773, 6.021387, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2026, 181355, 571, 1, 1, 3473.787, 4089.247, 17.13011, 3.961899, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2027, 181355, 571, 1, 1, 3426.033, 4071.888, 18.0825, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2028, 181355, 571, 1, 1, 3458.691, 4082.395, 17.32234, 0.4537851, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4037) +(@OGUID+2029, 181355, 571, 1, 1, 2997.857, 4049.579, 26.61824, 6.213374, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2030, 181355, 571, 1, 1, 3017.189, 4065.652, 26.77533, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2031, 181355, 571, 1, 1, 2998.711, 4070.604, 26.91523, 1.047198, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2032, 181355, 571, 1, 1, 3008.427, 4048.363, 26.36823, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2033, 181355, 571, 1, 1, 2927.117, 4077.872, 2.141783, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2034, 181355, 571, 1, 1, 2959.034, 3995.016, 1.879538, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2035, 181355, 571, 1, 1, 2922.883, 4037.388, 1.768461, 1.483528, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2036, 181355, 571, 1, 1, 2904.64, 4073.7, 1.964231, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2037, 181355, 571, 1, 1, 2910.194, 4046.256, 1.670829, 0.122173, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2038, 181355, 571, 1, 1, 2899.832, 4067.156, 1.7923, 6.0912, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2039, 181355, 571, 1, 1, 2875.328, 4035.009, 5.441031, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2040, 181355, 571, 1, 1, 2872.569, 4041.228, 5.269434, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4113) +(@OGUID+2041, 181355, 571, 1, 1, 2352.742, 5196.42, 7.632045, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4115) +(@OGUID+2042, 181355, 571, 1, 1, 2366.833, 5211.396, 7.632044, 2.705255, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4115) +(@OGUID+2043, 181355, 571, 1, 1, 2302.698, 5237.8, 11.3397, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2044, 181355, 571, 1, 1, 2248.404, 5206.861, 14.71353, 0.5235979, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2045, 181355, 571, 1, 1, 2238.36, 5132.744, 5.344914, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2046, 181355, 571, 1, 1, 2238.517, 5180.176, 14.71353, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2047, 181355, 571, 1, 1, 2255.31, 5225.856, 14.71353, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2048, 181355, 571, 1, 1, 2288.013, 5313.147, 14.71353, 5.044002, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2049, 181355, 571, 1, 1, 2276.32, 5282.166, 15.66975, 5.811947, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2050, 181355, 571, 1, 1, 2234.987, 5298.379, 15.05626, 2.687807, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2051, 181355, 571, 1, 1, 2208.51, 5319.641, 23.37515, 2.897245, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2052, 181355, 571, 1, 1, 2213.95, 5333.778, 23.37515, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2053, 181355, 571, 1, 1, 2202.939, 5302.733, 23.37515, 2.82743, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2054, 181355, 571, 1, 1, 2226.791, 5136.915, 5.344575, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2055, 181355, 571, 1, 1, 2207.053, 5222.542, 14.10005, 2.705255, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2056, 181355, 571, 1, 1, 2187.269, 5257.097, 23.37515, 2.932139, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2057, 181355, 571, 1, 1, 2192.255, 5270.982, 24.45937, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2058, 181355, 571, 1, 1, 2214.695, 5241.333, 14.10005, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2059, 181355, 571, 1, 1, 2197.986, 5288.558, 24.45936, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2060, 181355, 571, 1, 1, 2157.476, 5301.414, 24.66485, 2.809975, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2061, 181355, 571, 1, 1, 2151.343, 5284.071, 24.66521, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2062, 181355, 571, 1, 1, 2122.561, 5320.263, 32.77589, 4.398232, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2063, 181355, 571, 1, 1, 2112.85, 5291.524, 32.77574, 1.239183, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4032) +(@OGUID+2064, 181355, 571, 1, 1, 2805.134, 6135.274, 84.65132, 1.134463, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4020) +(@OGUID+2065, 181355, 571, 1, 1, 2788.66, 6162.68, 84.8553, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4020) +(@OGUID+2066, 181355, 571, 1, 1, 2799.835, 6186.328, 84.08407, 2.809975, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2067, 181355, 571, 1, 1, 2815.305, 6174.101, 121.9518, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2068, 181355, 571, 1, 1, 2823.609, 6165.092, 121.9373, 2.251473, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2069, 181355, 571, 1, 1, 2861.186, 6199.252, 208.7366, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2070, 181355, 571, 1, 1, 2853.404, 6207.334, 208.7359, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2071, 181355, 571, 1, 1, 2860.569, 6221.081, 208.7375, 0.5410506, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2072, 181355, 571, 1, 1, 2876.308, 6204.336, 208.7393, 0.9773831, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2073, 181355, 571, 1, 1, 2902.97, 6231.561, 208.8656, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2074, 181355, 571, 1, 1, 2899.378, 6242.913, 208.8885, 3.839725, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2075, 181355, 571, 1, 1, 2888.891, 6247.602, 208.8507, 4.276057, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2076, 181355, 571, 1, 1, 2892.682, 6263.139, 209.0361, 5.201083, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2077, 181355, 571, 1, 1, 2922.968, 6238.53, 208.9055, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4129) +(@OGUID+2078, 181355, 571, 1, 1, 3519.409, 5943.527, 134.4016, 0.1396245, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2079, 181355, 571, 1, 1, 3521.802, 5957.627, 134.0744, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2080, 181355, 571, 1, 1, 3584.385, 5975.644, 136.2158, 6.248279, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4023) +(@OGUID+2081, 181355, 571, 1, 1, 3612.38, 5919.877, 136.0995, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4023) +(@OGUID+2082, 181355, 571, 1, 1, 3605.886, 5989.136, 136.2162, 4.084071, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4023) +(@OGUID+2083, 181355, 571, 1, 1, 3624.637, 5926.569, 136.2162, 2.617989, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4023) +(@OGUID+2084, 181355, 571, 1, 1, 3623.188, 5947.213, 136.2162, 3.368496, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4023) +(@OGUID+2085, 181355, 571, 1, 1, 3633.385, 5887.483, 140.0765, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4023) +(@OGUID+2086, 181355, 571, 1, 1, 3647.803, 5882.226, 174.4943, 0.9773831, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4023) +(@OGUID+2087, 181355, 571, 1, 1, 3578.23, 6633.554, 195.1779, 6.213374, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4024) +(@OGUID+2088, 181355, 571, 1, 1, 3585.12, 6674.991, 195.1799, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4024) +(@OGUID+2089, 181355, 571, 1, 1, 3948.234, -593.3984, 241.733, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4175) +(@OGUID+2090, 181355, 571, 1, 1, 3943.947, -610.4957, 241.5294, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4175) +(@OGUID+2091, 181355, 571, 1, 1, 3935.917, -598.2784, 241.3665, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4175) +(@OGUID+2092, 181355, 571, 1, 1, 3932.653, -576.1534, 240.7002, 0.8552105, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 4175) +(@OGUID+2093, 181355, 530, 1, 1, 9654.513, -7165.117, 14.32294, 1.553341, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2094, 181355, 530, 1, 1, 9678.808, -7129.612, 14.323, 3.403396, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2095, 181355, 530, 1, 1, 9642.193, -7165.241, 14.32294, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2096, 181355, 530, 1, 1, 9678.796, -7142.301, 14.32305, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2097, 181355, 530, 1, 1, 9618.231, -7141.752, 14.32299, 1.413715, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2098, 181355, 530, 1, 1, 9618.2, -7129.268, 14.32341, 4.363324, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2099, 181355, 530, 1, 1, 9720.848, -7098.167, 14.37494, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2100, 181355, 530, 1, 1, 9716.24, -7078.561, 14.3665, 1.151916, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2101, 181355, 530, 1, 1, 9707.404, -7059.029, 14.43248, 0.06981169, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2102, 181355, 530, 1, 1, 9642.688, -7106.293, 14.32302, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2103, 181355, 530, 1, 1, 9655.052, -7106.376, 14.32302, 2.897245, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2104, 181355, 530, 1, 1, 9688.935, -7057.635, 14.38305, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2105, 181355, 530, 1, 1, 9571.572, -7081.525, 16.54363, 4.101525, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2106, 181355, 530, 1, 1, 9589.414, -7081.651, 16.54936, 5.183629, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2107, 181355, 530, 1, 1, 9579.722, -7178.49, 14.23274, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3487) +(@OGUID+2108, 181355, 530, 1, 1, -3929.128, -11744.82, -138.6122, 0.6283169, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2109, 181355, 530, 1, 1, -3970.78, -11722.88, -138.8356, 1.518436, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2110, 181355, 530, 1, 1, -3848.473, -11713.9, -106.9602, 4.869471, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2111, 181355, 530, 1, 1, -3832.714, -11732.29, -106.8447, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2112, 181355, 530, 1, 1, -3838.553, -11690.54, -106.755, 3.57793, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2113, 181355, 530, 1, 1, -3839.154, -11664.52, -116.0718, 5.969027, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2114, 181355, 530, 1, 1, -3817.688, -11688.14, -107.0981, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2115, 181355, 530, 1, 1, -3928.31, -11712.54, -135.2059, 5.148723, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2116, 181355, 530, 1, 1, -3877.953, -11647.35, -134.3679, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2117, 181355, 530, 1, 1, -3943.487, -11689.1, -135.2892, 0.6108634, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2118, 181355, 530, 1, 1, -3819.228, -11660.32, -115.6466, 5.969027, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2119, 181355, 530, 1, 1, -3938.107, -11702.05, -135.2763, 1.500983, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2120, 181355, 530, 1, 1, -3856.057, -11632.63, -134.0159, 2.583081, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2121, 181355, 530, 1, 1, -3891.189, -11640.65, -134.4907, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2122, 181355, 530, 1, 1, -3919.52, -11641.97, -134.8313, 0.2094394, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2123, 181355, 530, 1, 1, -3905.643, -11638.75, -134.6634, 5.864307, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2124, 181355, 530, 1, 1, -3931.237, -11649.39, -135.003, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2125, 181355, 530, 1, 1, -3903.503, -11599.64, -137.7858, 3.926996, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2126, 181355, 530, 1, 1, -3935.253, -11599.68, -138.455, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2127, 181355, 530, 1, 1, -3974.517, -11624.75, -138.8757, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2128, 181355, 530, 1, 1, -3943.941, -11674.08, -135.2386, 3.595379, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2129, 181355, 530, 1, 1, -3939.98, -11660.92, -135.1454, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2130, 181355, 530, 1, 1, -3988.478, -11651.17, -139.0434, 0.383971, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2131, 181355, 530, 1, 1, -3985.045, -11695.91, -139.3659, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2132, 181355, 530, 1, 1, -3657.605, -11491.42, -119.0973, 1.989672, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2133, 181355, 530, 1, 1, -3640.533, -11468.59, -118.8086, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2134, 181355, 530, 1, 1, -4212.527, -12510.34, 45.44406, 0.2268925, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2135, 181355, 530, 1, 1, -4209.379, -12517.65, 45.81722, 0.3316107, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2136, 181355, 530, 1, 1, -4185.712, -12504.83, 44.36132, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3576) +(@OGUID+2137, 181355, 530, 1, 1, -4176.958, -12493.97, 44.361, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3576) +(@OGUID+2138, 181355, 530, 1, 1, -4171.624, -12506.62, 44.36132, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3576) +(@OGUID+2139, 181355, 530, 1, 1, -4158.644, -12533.33, 45.45204, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3576) +(@OGUID+2140, 181355, 530, 1, 1, -4158.139, -12463.08, 45.08138, 3.717554, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3576) +(@OGUID+2141, 181355, 530, 1, 1, -4153.742, -12484.6, 44.51342, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3576) +(@OGUID+2142, 181355, 530, 1, 1, -4048.503, -13778.93, 75.01585, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 3527) +(@OGUID+2143, 181388, 530, 1, 1, -258.9341, 5512.862, 67.77477, 0.4188786, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2144, 181388, 530, 1, 1, -261.8974, 5511.051, 67.76839, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2145, 181388, 530, 1, 1, -263.5012, 5501.786, 67.77054, 1.274088, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2146, 181388, 530, 1, 1, -249.4451, 5498.099, 67.77216, 6.143561, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2147, 181388, 530, 1, 1, -261.6719, 5498.666, 67.76727, 5.427975, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2148, 181388, 530, 1, 1, -252.3171, 5496.113, 67.77038, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2149, 181388, 530, 1, 1, -247.7021, 5507.62, 67.76896, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2150, 181388, 530, 1, 1, -249.5854, 5510.579, 67.77278, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2151, 181388, 530, 1, 1, -143.5471, 5538.288, 32.38039, 0.7504908, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2152, 181388, 530, 1, 1, -140.7353, 5529.81, 32.37604, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2153, 181388, 530, 1, 1, -139.3287, 5531.163, 32.36538, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3565) +(@OGUID+2154, 181388, 530, 1, 1, 267.5295, 6098.781, 133.5178, 0.06981169, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2155, 181388, 530, 1, 1, 291.2011, 6097.795, 133.3371, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2156, 181388, 530, 1, 1, 285.8843, 6123.674, 143.5187, 5.113817, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2157, 181388, 530, 1, 1, 3016.262, 5430.181, 148.0061, 4.380776, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3951) +(@OGUID+2158, 181388, 530, 1, 1, 2042.164, 4667.055, 151.2627, 2.007128, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3844) +(@OGUID+2159, 181388, 530, 1, 1, 3060.135, 3699.842, 143.7799, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3712) +(@OGUID+2160, 181388, 530, 1, 1, 3064.48, 3691.506, 143.6662, 3.508117, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3712) +(@OGUID+2161, 181388, 530, 1, 1, -695.2222, 2715.149, 95.88277, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3538) +(@OGUID+2162, 181388, 530, 1, 1, -708.1202, 2724.893, 94.95054, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3538) +(@OGUID+2163, 181388, 530, 1, 1, -705.0544, 2721.336, 95.51184, 5.218536, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3538) +(@OGUID+2164, 181388, 530, 1, 1, -701.3524, 2721.361, 95.51174, 1.553341, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3538) +(@OGUID+2165, 181388, 530, 1, 1, -713.004, 2733.563, 95.85148, 4.049168, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3538) +(@OGUID+2166, 181388, 530, 1, 1, -701.2917, 2728.885, 95.50826, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3538) +(@OGUID+2167, 181388, 530, 1, 1, -704.9379, 2728.994, 95.55511, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3538) +(@OGUID+2168, 181388, 530, 1, 1, -695.9877, 2721.337, 95.2422, 5.707228, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3538) +(@OGUID+2169, 181388, 530, 1, 1, -698.7853, 2728.216, 95.19359, 1.326448, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3538) +(@OGUID+2170, 181388, 530, 1, 1, -2904.197, 4031.597, 5.614199, 3.368496, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3684) +(@OGUID+2171, 181388, 530, 1, 1, -2902.589, 4029.068, 5.627097, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3684) +(@OGUID+2172, 181388, 530, 1, 1, -2760.969, 7304.01, 44.88898, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3626) +(@OGUID+2173, 181388, 530, 1, 1, -2756.89, 7304.197, 44.86131, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3626) +(@OGUID+2174, 181388, 530, 1, 1, -2765.625, 7302.786, 44.92822, 3.996807, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3626) +(@OGUID+2175, 181388, 530, 1, 1, -2956.992, 2566.443, 79.33119, 4.136433, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3744) +(@OGUID+2176, 181388, 530, 1, 1, -2955.877, 2547.723, 92.74033, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3744) +(@OGUID+2177, 181388, 530, 1, 1, -3976.32, 2143.523, 105.8609, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3745) +(@OGUID+2178, 181388, 530, 1, 1, -4051.087, 2170.193, 111.616, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3745) +(@OGUID+2179, 181388, 530, 1, 1, -4052.169, 2163.663, 111.6861, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3745) +(@OGUID+2180, 181388, 530, 1, 1, -4082.781, 2168.835, 112.2728, 6.178466, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3745) +(@OGUID+2181, 181388, 530, 1, 1, -4082.235, 2188.566, 108.3726, 0.7679439, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3745) +(@OGUID+2182, 181388, 530, 1, 1, -4143.162, 1122.724, 45.38457, 4.32842, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3938) +(@OGUID+2183, 181388, 530, 1, 1, -4140.739, 1120.926, 45.42784, 5.148723, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3938) +(@OGUID+2184, 181388, 530, 1, 1, -2980.903, 856.316, -6.719138, 4.555311, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3754) +(@OGUID+2185, 181388, 530, 1, 1, -2970.08, 861.2813, -6.318128, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3754) +(@OGUID+2186, 181388, 571, 1, 1, 5071.415, -592.7192, 221.034, 2.583081, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4557) +(@OGUID+2187, 181388, 571, 1, 1, 5062.768, -549.4098, 219.9563, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4559) +(@OGUID+2188, 181388, 571, 1, 1, 5058.464, -542.483, 219.9259, 4.34587, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4559) +(@OGUID+2189, 181388, 571, 1, 1, 5061.948, -545.0692, 219.9297, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4559) +(@OGUID+2190, 181388, 571, 1, 1, 5029.646, -527.3734, 228.6926, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4559) +(@OGUID+2191, 181388, 571, 1, 1, 5137.096, -2201.546, 237.8019, 4.485497, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2192, 181388, 571, 1, 1, 5177.153, -2180.084, 236.5424, 4.555311, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2193, 181388, 571, 1, 1, 5157.259, -2201.744, 237.5309, 6.073746, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2194, 181388, 571, 1, 1, 5141.539, -2211.604, 238.1585, 0.2967052, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4317) +(@OGUID+2195, 181388, 571, 1, 1, 5192.435, -2209.911, 239.3982, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4317) +(@OGUID+2196, 181388, 571, 1, 1, 5157.712, -2215.265, 238.4418, 1.553341, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4317) +(@OGUID+2197, 181388, 571, 1, 1, 3874.093, -4541.467, 210.1389, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2198, 181388, 571, 1, 1, 3877.073, -4546.678, 210.972, 0.4537851, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2199, 181388, 571, 1, 1, 3838.456, -4544.684, 209.2909, 2.530723, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2200, 181388, 571, 1, 1, 3412.483, -2783.082, 202.9972, 3.57793, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4204) +(@OGUID+2201, 181388, 571, 1, 1, 3407.589, -2786.686, 202.9973, 5.637414, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4204) +(@OGUID+2202, 181388, 571, 1, 1, 3424.167, -2769.674, 201.4191, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4204) +(@OGUID+2203, 181388, 571, 1, 1, 1432.413, -3253.822, 166.571, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4071) +(@OGUID+2204, 181388, 571, 1, 1, 1422.948, -3265.153, 165.6199, 4.32842, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4071) +(@OGUID+2205, 181388, 571, 1, 1, 1425.667, -3261.837, 165.5927, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4071) +(@OGUID+2206, 181388, 571, 1, 1, 701.6729, -2935.085, -3.068489, 1.623156, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3987) +(@OGUID+2207, 181388, 571, 1, 1, 701.3621, -2933.383, -3.068485, 0.5235979, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3987) +(@OGUID+2208, 181388, 571, 1, 1, 3629.777, -714.9827, 215.4509, 3.281239, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2209, 181388, 571, 1, 1, 3629.591, -716.7711, 215.4509, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2210, 181388, 571, 1, 1, 3630.091, -711.7509, 215.451, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2211, 181388, 571, 1, 1, 3630.212, -709.9004, 215.4509, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2212, 181388, 571, 1, 1, 3653.071, -692.7104, 223.6275, 0.6457717, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4177) +(@OGUID+2213, 181388, 571, 1, 1, 3660.452, -698.0406, 223.6275, 2.809975, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4177) +(@OGUID+2214, 181388, 571, 1, 1, 3658.893, -693.3231, 223.6275, 1.413715, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4177) +(@OGUID+2215, 181388, 571, 1, 1, 3655.911, -710.7966, 227.4318, 3.525572, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4177) +(@OGUID+2216, 181388, 571, 1, 1, 3652.148, -720.3037, 216.2393, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4177) +(@OGUID+2217, 181388, 571, 1, 1, 3650.309, -697.8465, 223.6275, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4177) +(@OGUID+2218, 181388, 571, 1, 1, 3653.49, -720.2332, 216.2393, 2.809975, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4177) +(@OGUID+2219, 181388, 571, 1, 1, 3658.077, -721.1656, 216.2393, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4177) +(@OGUID+2220, 181388, 571, 1, 1, 3655.506, -720.5035, 216.2393, 1.448622, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4177) +(@OGUID+2221, 181388, 571, 1, 1, 3560.058, 249.0957, 45.70548, 0.9773831, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4161) +(@OGUID+2222, 181388, 571, 1, 1, 3529.886, 252.3539, 45.7051, 3.316144, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4161) +(@OGUID+2223, 181388, 571, 1, 1, 3573.747, 275.6775, 45.70752, 5.061456, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4161) +(@OGUID+2224, 181388, 571, 1, 1, 3521.046, 280.9596, 45.70491, 0.5585039, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4161) +(@OGUID+2225, 181388, 571, 1, 1, 3555.038, 299.0926, 45.70468, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4161) +(@OGUID+2226, 181388, 571, 1, 1, 3497.954, 1962.59, 67.00489, 5.148723, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2227, 181388, 571, 1, 1, 3489.518, 1973.308, 66.71261, 4.171338, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2228, 181388, 571, 1, 1, 3472.785, 1978.688, 66.46651, 1.274088, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2229, 181388, 571, 1, 1, 3498.045, 1985.921, 66.4942, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2230, 181388, 571, 1, 1, 3515.049, 1995.76, 66.57986, 5.515242, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2231, 181388, 571, 1, 1, 5543.533, 5732.819, -75.00607, 4.450591, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2232, 181388, 571, 1, 1, 5546.444, 5741.974, -75.40535, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2233, 181388, 571, 1, 1, 5592.455, 5748.157, -70.19862, 0.4537851, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2234, 181388, 571, 1, 1, 5558.145, 5760.761, -76.66797, 2.286379, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2235, 181388, 571, 1, 1, 5565.401, 5770.03, -74.08703, 5.689774, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2236, 181388, 571, 1, 1, 5564.951, 5763.742, -74.10497, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2237, 181388, 571, 1, 1, 4502.473, 5716.374, 83.2963, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4122) +(@OGUID+2238, 181388, 571, 1, 1, 2292.771, 5195.491, 16.54581, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4115) +(@OGUID+2239, 181388, 571, 1, 1, 2295.146, 5194.604, 16.54581, 3.752462, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4115) +(@OGUID+2240, 181388, 571, 1, 1, 3572.129, 6647.487, 197.2582, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4024) +(@OGUID+2241, 181388, 571, 1, 1, 3572.212, 6646.873, 197.2582, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4024) +(@OGUID+2242, 181388, 571, 1, 1, 3572.679, 6647.372, 197.2582, 5.759588, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 4024) +(@OGUID+2243, 181388, 530, 1, 1, 9644.521, -7140.054, 16.77326, 4.991644, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3487) +(@OGUID+2244, 181388, 530, 1, 1, 9652.589, -7140.016, 16.77326, 4.625124, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3487) +(@OGUID+2245, 181388, 530, 1, 1, 9587.118, -7206.618, 17.41128, 2.33874, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3487) +(@OGUID+2246, 181388, 530, 1, 1, 9644.567, -7131.666, 16.77325, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3487) +(@OGUID+2247, 181388, 530, 1, 1, 9652.462, -7131.681, 16.77325, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3487) +(@OGUID+2248, 181388, 0, 1, 1, -8895.29, 618.686, 101.258, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 5148) +(@OGUID+2249, 181388, 530, 1, 1, -4026.65, -11731.49, -150.8, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2250, 181388, 530, 1, 1, -4022.252, -11739.32, -150.7981, 0.06981169, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2251, 181388, 530, 1, 1, -3740.327, -11688.57, -104.6048, 4.97419, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2252, 181388, 530, 1, 1, -3744.044, -11692.36, -104.6063, 3.42085, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2253, 181388, 530, 1, 1, -3743.692, -11697.82, -104.624, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2254, 181388, 530, 1, 1, -3739.73, -11701.29, -104.5924, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2255, 181388, 530, 1, 1, -3913.77, -11545.52, -148.9983, 0.4712385, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2256, 181388, 530, 1, 1, -3918.321, -11545.52, -149.0445, 0.4712385, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2257, 181388, 530, 1, 1, -3919.778, -11545.48, -149.061, 0.1047193, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2258, 181388, 530, 1, 1, -3924.433, -11545.48, -149.1109, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2259, 181388, 530, 1, 1, -3794.177, -11519.92, -133.9687, 3.281239, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2260, 181388, 530, 1, 1, -4206.351, -12449.98, 47.50156, 4.921829, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2261, 181388, 530, 1, 1, -4225.53, -12524.83, 45.94211, 1.221729, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 0) +(@OGUID+2262, 181388, 530, 1, 1, -4155.963, -12472.56, 45.63326, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3576) +(@OGUID+2263, 181388, 530, 1, 1, -4168.263, -12538.89, 46.0363, 0.087266, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3576) +(@OGUID+2264, 181388, 530, 1, 1, -4126.576, -13723.57, 77.2606, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3526) +(@OGUID+2265, 181388, 530, 1, 1, -4129.112, -13723.48, 77.24871, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3526) +(@OGUID+2266, 181388, 530, 1, 1, -4089.863, -13747.79, 76.39077, 5.707228, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3526) +(@OGUID+2267, 181388, 530, 1, 1, -4070.501, -13748.16, 77.0448, 4.34587, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3526) +(@OGUID+2268, 181388, 530, 1, 1, -4068.368, -13749, 77.03782, 2.059488, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3526) +(@OGUID+2269, 181388, 530, 1, 1, -4087.652, -13776.27, 78.02085, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 181388 (Area: 3526) +(@OGUID+2270, 181391, 530, 1, 1, -1896.941, 5765.268, 132.268, 0, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2271, 181391, 530, 1, 1, -1903.978, 5768.571, 132.8429, 0.4014249, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2272, 181391, 530, 1, 1, -264.1175, 5509.565, 67.62336, 2.024579, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3565) +(@OGUID+2273, 181391, 530, 1, 1, -264.9229, 5504.081, 67.62596, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3565) +(@OGUID+2274, 181391, 530, 1, 1, -260.1642, 5496.425, 67.61719, 3.665196, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3565) +(@OGUID+2275, 181391, 530, 1, 1, -247.0731, 5499.689, 67.61514, 5.183629, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3565) +(@OGUID+2276, 181391, 530, 1, 1, -254.7681, 5494.834, 67.62044, 5.393069, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3565) +(@OGUID+2277, 181391, 530, 1, 1, -256.5921, 5514.343, 67.6306, 2.216565, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3565) +(@OGUID+2278, 181391, 530, 1, 1, -251.0405, 5512.968, 67.62232, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3565) +(@OGUID+2279, 181391, 530, 1, 1, -246.2811, 5505.374, 67.62595, 2.216565, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3565) +(@OGUID+2280, 181391, 530, 1, 1, 270.007, 6098.651, 133.5972, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2281, 181391, 530, 1, 1, 289.8021, 6098.125, 133.3653, 3.665196, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2282, 181391, 530, 1, 1, 285.9621, 6122.088, 143.566, 3.839725, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2283, 181391, 530, 1, 1, 298.2251, 6094.872, 133.0421, 0.05235888, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2284, 181391, 530, 1, 1, 3017.863, 5435.411, 147.4366, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3951) +(@OGUID+2285, 181391, 530, 1, 1, 3026.327, 5430.919, 148.4493, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3951) +(@OGUID+2286, 181391, 530, 1, 1, 3027.365, 5431.576, 148.4505, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3951) +(@OGUID+2287, 181391, 530, 1, 1, 2173.999, 4726.616, 157.7524, 3.979355, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2288, 181391, 530, 1, 1, 2045.745, 4731.155, 151.8487, 4.81711, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3844) +(@OGUID+2289, 181391, 530, 1, 1, -2903.531, 4030.889, 5.633335, 3.700105, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3684) +(@OGUID+2290, 181391, 530, 1, 1, -2903.005, 4029.934, 5.655087, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3684) +(@OGUID+2291, 181391, 530, 1, 1, -1229.269, 7157.398, 58.43764, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3613) +(@OGUID+2292, 181391, 530, 1, 1, -1224.05, 7154.102, 58.44301, 5.777041, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3613) +(@OGUID+2293, 181391, 530, 1, 1, -1220.818, 7159.29, 58.45349, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3613) +(@OGUID+2294, 181391, 530, 1, 1, -1226.033, 7162.578, 58.45142, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3613) +(@OGUID+2295, 181391, 530, 1, 1, -2955.542, 2564.842, 79.53258, 3.543024, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3744) +(@OGUID+2296, 181391, 530, 1, 1, -2954.607, 2547.318, 92.76526, 0, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3744) +(@OGUID+2297, 181391, 530, 1, 1, -3977.75, 2144.866, 105.8777, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3745) +(@OGUID+2298, 181391, 530, 1, 1, -4050.742, 2163.796, 111.6861, 3.263772, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3745) +(@OGUID+2299, 181391, 530, 1, 1, -4052.369, 2168.782, 111.6152, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3745) +(@OGUID+2300, 181391, 530, 1, 1, -4073.993, 2183.056, 108.3961, 0.4014249, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3745) +(@OGUID+2301, 181391, 530, 1, 1, -4082.026, 2186.264, 108.3727, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3745) +(@OGUID+2302, 181391, 530, 1, 1, -4141.914, 1121.718, 45.45483, 0.9599299, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3938) +(@OGUID+2303, 181391, 530, 1, 1, -2970.285, 860.4757, -6.325652, 2.583081, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3754) +(@OGUID+2304, 181391, 530, 1, 1, -2981.595, 858.2934, -6.682398, 0.8377575, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3754) +(@OGUID+2305, 181391, 530, 1, 1, -2979.788, 854.0434, -6.907697, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3754) +(@OGUID+2306, 181391, 571, 1, 1, 5584.315, -666.3698, 205.8847, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4557) +(@OGUID+2307, 181391, 571, 1, 1, 5589.941, -687.0692, 207.7939, 3.57793, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4558) +(@OGUID+2308, 181391, 571, 1, 1, 5587.695, -670.3691, 206.4425, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4558) +(@OGUID+2309, 181391, 571, 1, 1, 5589.274, -675.4409, 206.7487, 0.1396245, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4558) +(@OGUID+2310, 181391, 571, 1, 1, 5625.167, -709.793, 208.3863, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4558) +(@OGUID+2311, 181391, 571, 1, 1, 5148.001, -2198.408, 237.614, 5.707228, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2312, 181391, 571, 1, 1, 5134.635, -2201.145, 238.8165, 0.4014249, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2313, 181391, 571, 1, 1, 5173.95, -2179.033, 236.5379, 6.143561, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2314, 181391, 571, 1, 1, 5143.447, -2210.877, 237.8243, 0.157079, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4317) +(@OGUID+2315, 181391, 571, 1, 1, 5190.736, -2212.201, 239.3978, 2.513274, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4317) +(@OGUID+2316, 181391, 571, 1, 1, 5435.949, -2590.28, 304.9167, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4275) +(@OGUID+2317, 181391, 571, 1, 1, 5407.927, -2617.18, 305.2808, 2.984498, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4275) +(@OGUID+2318, 181391, 571, 1, 1, 5465.895, -2590.533, 304.9167, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4275) +(@OGUID+2319, 181391, 571, 1, 1, 5492.885, -2617.632, 305.2991, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4275) +(@OGUID+2320, 181391, 571, 1, 1, 5410.432, -2652.655, 306.231, 2.635444, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4275) +(@OGUID+2321, 181391, 571, 1, 1, 5407.522, -2646.742, 305.2902, 3.141593, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4275) +(@OGUID+2322, 181391, 571, 1, 1, 5492.635, -2649.156, 305.2701, 3.089183, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4275) +(@OGUID+2323, 181391, 571, 1, 1, 5380.456, -2636.633, 304.966, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4275) +(@OGUID+2324, 181391, 571, 1, 1, 5500.449, -2662.013, 304.9659, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4275) +(@OGUID+2325, 181391, 571, 1, 1, 5524.156, -2679.053, 305.1702, 1.291542, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4275) +(@OGUID+2326, 181391, 571, 1, 1, 5794.419, -3557.554, 388.8964, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4323) +(@OGUID+2327, 181391, 571, 1, 1, 5759.467, -3565.396, 388.2509, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4323) +(@OGUID+2328, 181391, 571, 1, 1, 5768.993, -3564.651, 388.132, 1.675514, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4323) +(@OGUID+2329, 181391, 571, 1, 1, 5800.075, -3557.563, 389.7701, 0.3316107, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4323) +(@OGUID+2330, 181391, 571, 1, 1, 5760.941, -3580.523, 388.6815, 4.66003, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4323) +(@OGUID+2331, 181391, 571, 1, 1, 5767.891, -3581.12, 388.5618, 4.747296, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4323) +(@OGUID+2332, 181391, 571, 1, 1, 5796.288, -3573.157, 388.1471, 3.211419, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4323) +(@OGUID+2333, 181391, 571, 1, 1, 5801.048, -3572.997, 389.0887, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4323) +(@OGUID+2334, 181391, 571, 1, 1, 5771.673, -3602.202, 388.4206, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4323) +(@OGUID+2335, 181391, 571, 1, 1, 7809.753, -2956.811, 1259.647, 0.8377575, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4441) +(@OGUID+2336, 181391, 571, 1, 1, 3873.443, -4541.185, 210.1433, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2337, 181391, 571, 1, 1, 3862.321, -4549.055, 211.5898, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2338, 181391, 571, 1, 1, 3876.738, -4547.531, 210.9673, 5.183629, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2339, 181391, 571, 1, 1, 3408.684, -2785.898, 202.9841, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4204) +(@OGUID+2340, 181391, 571, 1, 1, 3411.444, -2783.841, 202.9332, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4204) +(@OGUID+2341, 181391, 571, 1, 1, 3421.057, -2770.74, 201.4035, 5.340709, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4204) +(@OGUID+2342, 181391, 571, 1, 1, 3313.647, -2337.281, 112.4452, 0.157079, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2343, 181391, 571, 1, 1, 3201.634, -2297.767, 109.0517, 0.2792516, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4206) +(@OGUID+2344, 181391, 571, 1, 1, 3240.247, -2236.566, 117.1561, 4.607672, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4248) +(@OGUID+2345, 181391, 571, 1, 1, 1454.438, -3273.762, 173.5819, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4071) +(@OGUID+2346, 181391, 571, 1, 1, 1458.552, -3277.082, 173.5854, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4071) +(@OGUID+2347, 181391, 571, 1, 1, 1457.29, -3270.155, 173.5816, 5.567601, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4071) +(@OGUID+2348, 181391, 571, 1, 1, 1456.939, -3279.144, 173.5854, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4071) +(@OGUID+2349, 181391, 571, 1, 1, 1445.814, -3264.554, 168.441, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4071) +(@OGUID+2350, 181391, 571, 1, 1, 1445.745, -3269.811, 179.7056, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4071) +(@OGUID+2351, 181391, 571, 1, 1, 1447.377, -3267.913, 179.7009, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4071) +(@OGUID+2352, 181391, 571, 1, 1, 1447.826, -3262.189, 168.441, 5.550147, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4071) +(@OGUID+2353, 181391, 571, 1, 1, 607.8849, -4925.905, 24.95922, 3.298687, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3981) +(@OGUID+2354, 181391, 571, 1, 1, 593.6772, -4929.414, 31.07939, 3.351047, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3981) +(@OGUID+2355, 181391, 571, 1, 1, 589.4217, -4926.301, 19.81484, 3.368496, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3981) +(@OGUID+2356, 181391, 571, 1, 1, 600.7967, -4920.292, 24.95571, 3.368496, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3981) +(@OGUID+2357, 181391, 571, 1, 1, 606.9359, -4923.435, 24.95922, 1.919862, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3981) +(@OGUID+2358, 181391, 571, 1, 1, 601.9346, -4924.686, 24.95571, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3981) +(@OGUID+2359, 181391, 571, 1, 1, 582.0108, -4933.257, 31.07901, 0.1919852, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3981) +(@OGUID+2360, 181391, 571, 1, 1, 588.7018, -4923.256, 19.81484, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3981) +(@OGUID+2361, 181391, 571, 1, 1, 2688.802, -4390.23, 285.7001, 2.949595, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2362, 181391, 571, 1, 1, 2676.617, -4381.395, 285.7596, 5.131269, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2363, 181391, 571, 1, 1, 3645.812, -721.0574, 216.172, 6.19592, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4177) +(@OGUID+2364, 181391, 571, 1, 1, 3646.148, -718.1918, 216.172, 6.0912, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4177) +(@OGUID+2365, 181391, 571, 1, 1, 3659.441, -693.8284, 223.6275, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4177) +(@OGUID+2366, 181391, 571, 1, 1, 3650.23, -698.5431, 223.6275, 0.03490625, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4177) +(@OGUID+2367, 181391, 571, 1, 1, 3652.268, -693.3177, 223.6275, 5.305802, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4177) +(@OGUID+2368, 181391, 571, 1, 1, 3652.888, -712.5886, 215.9271, 3.665196, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4177) +(@OGUID+2369, 181391, 571, 1, 1, 3660.472, -699.2101, 223.6275, 2.967041, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4177) +(@OGUID+2370, 181391, 571, 1, 1, 3652.607, -715.2568, 215.9243, 5.445428, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4177) +(@OGUID+2371, 181391, 571, 1, 1, 3572.839, 265.1823, 45.7056, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4161) +(@OGUID+2372, 181391, 571, 1, 1, 3522.945, 260.2353, 45.7145, 0.5061446, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4161) +(@OGUID+2373, 181391, 571, 1, 1, 3549.799, 245.6209, 45.70576, 4.642576, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4161) +(@OGUID+2374, 181391, 571, 1, 1, 3526.266, 290.7282, 45.74524, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4161) +(@OGUID+2375, 181391, 571, 1, 1, 3564.303, 294.1375, 45.70594, 3.996807, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4161) +(@OGUID+2376, 181391, 571, 1, 1, 2796.748, 906.8901, 22.3641, 2.164206, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4152) +(@OGUID+2377, 181391, 571, 1, 1, 2751.04, 907.9393, 6.67607, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4152) +(@OGUID+2378, 181391, 571, 1, 1, 3490.325, 1972.804, 66.7719, 1.06465, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2379, 181391, 571, 1, 1, 3474.909, 1975.443, 65.53431, 4.32842, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2380, 181391, 571, 1, 1, 3499.607, 1984.679, 66.15468, 3.246347, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2381, 181391, 571, 1, 1, 3494.898, 1995.773, 65.53641, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2382, 181391, 571, 1, 1, 3467.421, 1988.05, 66.54556, 1.151916, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2383, 181391, 571, 1, 1, 3490.95, 2015.379, 65.60335, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2384, 181391, 571, 1, 1, 5509.478, 4741.979, -194.4338, 2.111848, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4291) +(@OGUID+2385, 181391, 571, 1, 1, 5510.404, 4753.548, -194.4338, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4291) +(@OGUID+2386, 181391, 571, 1, 1, 5502.957, 4741.273, -194.4338, 1.326448, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4291) +(@OGUID+2387, 181391, 571, 1, 1, 5513.061, 4747.659, -194.4338, 2.932139, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4291) +(@OGUID+2388, 181391, 571, 1, 1, 5503.827, 4755.526, -194.4338, 4.904376, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4291) +(@OGUID+2389, 181391, 571, 1, 1, 5498.593, 4745.716, -194.4338, 0.5235979, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4291) +(@OGUID+2390, 181391, 571, 1, 1, 5479.872, 4726.03, -194.3498, 4.049168, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4291) +(@OGUID+2391, 181391, 571, 1, 1, 5498.836, 4751.918, -194.4338, 5.899214, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4291) +(@OGUID+2392, 181391, 571, 1, 1, 5547.074, 5741.959, -75.40535, 0.8203033, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2393, 181391, 571, 1, 1, 5591.068, 5747.466, -70.53605, 2.059488, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2394, 181391, 571, 1, 1, 5564.963, 5765.209, -74.12182, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2395, 181391, 571, 1, 1, 5555.885, 5763.052, -76.68349, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2396, 181391, 571, 1, 1, 3472.41, 4163.705, 19.30917, 1.623156, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4037) +(@OGUID+2397, 181391, 571, 1, 1, 3455.599, 4164.834, 19.33243, 1.483528, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4037) +(@OGUID+2398, 181391, 571, 1, 1, 3458.478, 4132.48, 17.17745, 4.97419, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4037) +(@OGUID+2399, 181391, 571, 1, 1, 2303.144, 5193.458, 18.77864, 5.899214, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4115) +(@OGUID+2400, 181391, 571, 1, 1, 2300.871, 5202.066, 18.77514, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4115) +(@OGUID+2401, 181391, 571, 1, 1, 2290.591, 5201.154, 24.89418, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4115) +(@OGUID+2402, 181391, 571, 1, 1, 2291.031, 5196.256, 16.54581, 1.169369, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4115) +(@OGUID+2403, 181391, 571, 1, 1, 2304.009, 5195.689, 18.77864, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4115) +(@OGUID+2404, 181391, 571, 1, 1, 2296.923, 5193.869, 16.54581, 1.221729, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4115) +(@OGUID+2405, 181391, 571, 1, 1, 2289.666, 5198.88, 24.89883, 2.722713, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4115) +(@OGUID+2406, 181391, 571, 1, 1, 2288.108, 5203.884, 13.63426, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4032) +(@OGUID+2407, 181391, 571, 1, 1, 2276.774, 5199.534, 24.8946, 4.258607, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4032) +(@OGUID+2408, 181391, 571, 1, 1, 2278.045, 5202.725, 24.89859, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4032) +(@OGUID+2409, 181391, 571, 1, 1, 2289.229, 5206.759, 13.6345, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4032) +(@OGUID+2410, 181391, 571, 1, 1, 2789.675, 6148.044, 86.64036, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4020) +(@OGUID+2411, 181391, 571, 1, 1, 2817.585, 6154.644, 86.02152, 3.525572, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 4129) +(@OGUID+2412, 181391, 530, 1, 1, -4043.153, -11563, -136.8524, 5.358162, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2413, 181391, 530, 1, 1, -4182.415, -12436.82, 44.64597, 5.253442, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2414, 181391, 530, 1, 1, -4198.411, -12462.25, 47.02858, 1.06465, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2415, 181391, 530, 1, 1, -4206.79, -12467.33, 47.01455, 5.427975, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2416, 181391, 530, 1, 1, -4222.02, -12521.07, 47.00111, 1.361356, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 0) +(@OGUID+2417, 181391, 530, 1, 1, -4163.938, -12541.48, 45.87748, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3576) +(@OGUID+2418, 181391, 530, 1, 1, -4134.745, -12494.92, 46.35612, 3.839725, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3576) +(@OGUID+2419, 181391, 530, 1, 1, -4044.267, -13771.41, 75.88164, 5.078908, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 3527) +(@OGUID+2420, 181300, 530, 1, 1, -2037.28, 5275.622, -39.58699, 0.5410506, 0, 0, 0, 1, 120, 255, 1), -- 181300 (Area: 0) +(@OGUID+2421, 187653, 530, 1, 1, -3943.586, 2116.151, 96.86256, 1.954769, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2422, 187653, 530, 1, 1, -3947.631, 2139.387, 98.95597, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2423, 187653, 530, 1, 1, -3976.474, 2192.468, 101.89, 4.101525, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2424, 187653, 530, 1, 1, -3952.103, 2178.58, 101.6065, 4.502952, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2425, 187653, 530, 1, 1, -3947.441, 2195.89, 101.9546, 1.797689, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2426, 187653, 530, 1, 1, -3962.669, 2179.875, 101.4113, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2427, 187653, 530, 1, 1, -3975.666, 2183.826, 102.0339, 0.4886912, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2428, 187653, 530, 1, 1, -4054.807, 2175.517, 110.4941, 5.602507, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2429, 187653, 530, 1, 1, -4039.186, 2197.357, 110.4058, 0.2617982, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2430, 187653, 530, 1, 1, -4043.826, 2199.081, 110.6511, 2.007128, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2431, 187653, 530, 1, 1, -3975.99, 2200.106, 101.8627, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2432, 187653, 530, 1, 1, -4036.585, 2201.172, 110.5763, 3.839725, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2433, 187653, 530, 1, 1, -4043.816, 2202.357, 110.7311, 1.326448, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2434, 187653, 530, 1, 1, -4040.059, 2204.321, 110.729, 6.178466, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2435, 187653, 530, 1, 1, -3999.656, 2223.364, 105.7338, 4.852017, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2436, 187653, 530, 1, 1, -3958.839, 2204.563, 101.8769, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2437, 187653, 530, 1, 1, -3955.339, 2215.828, 102.0366, 1.797689, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3745) +(@OGUID+2438, 187653, 530, 1, 1, -3078.534, 758.6424, -10.39434, 1.780234, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 0) +(@OGUID+2439, 187653, 530, 1, 1, -3075.44, 738.8243, -10.36887, 0.06981169, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 0) +(@OGUID+2440, 187653, 530, 1, 1, -3039.37, 787.0753, -10.12921, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3754) +(@OGUID+2441, 187653, 530, 1, 1, -3025.438, 832.5914, -10.05208, 5.166176, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3754) +(@OGUID+2442, 187653, 530, 1, 1, -3034.829, 838.422, -9.614153, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3754) +(@OGUID+2443, 187653, 530, 1, 1, -3017.362, 842.7576, -10.2879, 0.9599299, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3754) +(@OGUID+2444, 187653, 530, 1, 1, -3025.444, 849.413, -10.2078, 0.8726639, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3754) +(@OGUID+2445, 187653, 530, 1, 1, -2995.243, 834.5243, -9.96244, 3.857183, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 3754) +(@OGUID+2446, 187653, 571, 1, 1, 5592.357, -656.3683, 204.9975, 3.874631, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4557) +(@OGUID+2447, 187653, 571, 1, 1, 5593.49, -638.1299, 201.8387, 1.012289, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4557) +(@OGUID+2448, 187653, 571, 1, 1, 5609.004, -716.6079, 206.0215, 3.647741, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4558) +(@OGUID+2449, 187653, 571, 1, 1, 5614.904, -750.4766, 202.3785, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4558) +(@OGUID+2450, 187653, 571, 1, 1, 5604.041, -742.2601, 201.0262, 0.8726639, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4558) +(@OGUID+2451, 187653, 571, 1, 1, 5075.036, -564.8768, 220.1215, 0.4537851, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4557) +(@OGUID+2452, 187653, 571, 1, 1, 5046.612, -520.1337, 220.6882, 4.188792, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4559) +(@OGUID+2453, 187653, 571, 1, 1, 5052.197, -513.4913, 220.6307, 2.391098, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4559) +(@OGUID+2454, 187653, 571, 1, 1, 3578.621, 5886.384, 128.054, 5.253442, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 0) +(@OGUID+2455, 187653, 571, 1, 1, 3584.229, 5927.863, 130.1893, 4.572764, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 0) +(@OGUID+2456, 187653, 571, 1, 1, 3620.697, 5927.822, 136.2143, 1.518436, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4023) +(@OGUID+2457, 187653, 571, 1, 1, 3597.911, 5943.361, 136.2162, 5.044002, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4023) +(@OGUID+2458, 187653, 571, 1, 1, 3598.844, 5919.046, 135.6739, 1.884953, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4023) +(@OGUID+2459, 187653, 571, 1, 1, 3588.142, 6004.501, 136.2208, 4.310966, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4023) +(@OGUID+2460, 187653, 571, 1, 1, 3603.936, 5993.001, 136.2162, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4023) +(@OGUID+2461, 187653, 571, 1, 1, 3591.344, 5841.902, 128.4036, 0.6981314, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4023) +(@OGUID+2462, 187653, 0, 1, 1, -8568.11, 1195.979, 5.486749, 2.932139, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 5409) +(@OGUID+2463, 187653, 0, 1, 1, -8581.88, 1195.669, 5.435182, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 5409) +(@OGUID+2464, 187653, 0, 1, 1, -8353.875, 1196.183, 5.640672, 5.916668, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4411) +(@OGUID+2465, 187653, 0, 1, 1, -8308.013, 1196.14, 5.626017, 6.108654, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4411) +(@OGUID+2466, 187653, 0, 1, 1, -8294.278, 1196.099, 5.625349, 0.9773831, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4411) +(@OGUID+2467, 187653, 0, 1, 1, -8213.142, 1196.279, 5.642607, 5.497789, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4411) +(@OGUID+2468, 187653, 0, 1, 1, -8199.484, 1196.293, 5.615571, 3.159062, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4411) +(@OGUID+2469, 187653, 0, 1, 1, -8367.961, 1196.207, 5.625067, 5.98648, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4411) +(@OGUID+2470, 187653, 0, 1, 1, -8413.324, 1195.787, 5.620813, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4411) +(@OGUID+2471, 187653, 0, 1, 1, -8427.168, 1195.69, 5.460219, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4411) +(@OGUID+2472, 187653, 0, 1, 1, -8487.134, 1195.98, 5.574959, 3.228859, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4411) +(@OGUID+2473, 187653, 0, 1, 1, -8473.291, 1195.89, 5.668799, 5.375615, 0, 0, 0, 1, 120, 255, 1), -- 187653 (Area: 4411) +(@OGUID+2474, 188174, 530, 1, 1, -1748.72, 5333.596, -12.42814, 4.398232, 0, 0, 0, 1, 120, 255, 1), -- 188174 (Area: 0) +(@OGUID+2475, 188174, 530, 1, 1, 9794.822, -7248.741, 26.09736, 3.68265, 0, 0, 0, 1, 120, 255, 1), -- 188174 (Area: 3487) +(@OGUID+2476, 188174, 0, 1, 1, -8836.604, 866.36, 98.71682, 2.094393, 0, 0, 0, 1, 120, 255, 1), -- 188174 (Area: 5390) +(@OGUID+2477, 188174, 530, 1, 1, -3798.689, -11508.98, -134.8212, 5.061456, 0, 0, 0, 1, 120, 255, 1), -- 188174 (Area: 0) +(@OGUID+2478, 181392, 530, 1, 1, -249.9205, 5495.466, 36.7147, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3565) +(@OGUID+2479, 181392, 530, 1, 1, 282.6363, 6085.975, 137.649, 4.747296, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2480, 181392, 530, 1, 1, 2009.813, 6871.413, 188.1808, 4.24115, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3772) +(@OGUID+2481, 181392, 530, 1, 1, 2163.694, 6745.077, 172.4085, 4.049168, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3772) +(@OGUID+2482, 181392, 530, 1, 1, 2168.956, 6752.182, 172.4387, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3772) +(@OGUID+2483, 181392, 530, 1, 1, 2162.737, 6751.214, 172.4385, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3772) +(@OGUID+2484, 181392, 530, 1, 1, 2169.925, 6745.97, 172.4366, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3772) +(@OGUID+2485, 181392, 530, 1, 1, 3016.612, 5445.069, 151.877, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3951) +(@OGUID+2486, 181392, 530, 1, 1, 3026.51, 5497.439, 151.5307, 3.700105, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3951) +(@OGUID+2487, 181392, 530, 1, 1, 2155.25, 4720.381, 160.9449, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2488, 181392, 530, 1, 1, 2154.756, 4716.656, 160.9547, 3.001947, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3844) +(@OGUID+2489, 181392, 530, 1, 1, 2035.05, 4693.116, 154.7217, 1.850049, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3844) +(@OGUID+2490, 181392, 530, 1, 1, 2031.468, 4692.11, 154.7591, 1.884953, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3844) +(@OGUID+2491, 181392, 530, 1, 1, 2962.525, 3697.009, 150.2677, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2492, 181392, 530, 1, 1, 3061.875, 3647.259, 149.6342, 2.373644, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3712) +(@OGUID+2493, 181392, 530, 1, 1, 4103.79, 3058.691, 345.6179, 3.525572, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3738) +(@OGUID+2494, 181392, 530, 1, 1, 4125.446, 3068.064, 345.6248, 3.525572, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3738) +(@OGUID+2495, 181392, 530, 1, 1, -709.4097, 2704.609, 99.62894, 4.694937, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3538) +(@OGUID+2496, 181392, 530, 1, 1, -716.9244, 2718.473, 100.4844, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3538) +(@OGUID+2497, 181392, 530, 1, 1, -717.0001, 2714.823, 100.4722, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3538) +(@OGUID+2498, 181392, 530, 1, 1, -716.8802, 2742.702, 100.7903, 3.176533, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3538) +(@OGUID+2499, 181392, 530, 1, 1, -690.7932, 2724.943, 100.9289, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3538) +(@OGUID+2500, 181392, 530, 1, 1, -2987.704, 4030.75, 7.28573, 2.478367, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3684) +(@OGUID+2501, 181392, 530, 1, 1, -2923.89, 4017.942, 8.344274, 3.665196, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3684) +(@OGUID+2502, 181392, 530, 1, 1, -2967.964, 4020.805, 7.264894, 5.67232, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3684) +(@OGUID+2503, 181392, 530, 1, 1, -2982.132, 3981.363, 8.745137, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3684) +(@OGUID+2504, 181392, 530, 1, 1, -2931.291, 3931.274, 8.816035, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2505, 181392, 530, 1, 1, -2677.658, 7203.919, 32.99669, 1.204277, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3626) +(@OGUID+2506, 181392, 530, 1, 1, -2698.241, 7291.552, 49.91637, 5.969027, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3626) +(@OGUID+2507, 181392, 530, 1, 1, -2713.36, 7298.445, 51.91501, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3626) +(@OGUID+2508, 181392, 530, 1, 1, -2730.689, 7306.021, 51.7765, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3626) +(@OGUID+2509, 181392, 530, 1, 1, -2775.226, 7326.033, 51.77103, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3626) +(@OGUID+2510, 181392, 530, 1, 1, 195.0323, 8490.546, 35.5514, 0.6632232, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2511, 181392, 530, 1, 1, 264.8356, 8492.754, 34.60779, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2512, 181392, 530, 1, 1, 272.1655, 8509.436, 32.72204, 3.700105, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2513, 181392, 530, 1, 1, 219.5999, 8569.107, 33.13798, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2514, 181392, 530, 1, 1, -3022.694, 2624.565, 85.78185, 3.909541, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2515, 181392, 530, 1, 1, -2972.565, 2562.675, 83.66947, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3744) +(@OGUID+2516, 181392, 530, 1, 1, -2955.605, 2554.495, 110.3285, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3744) +(@OGUID+2517, 181392, 530, 1, 1, -4010.367, 2155.552, 109.9921, 1.06465, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3745) +(@OGUID+2518, 181392, 530, 1, 1, -4058.762, 2175.685, 117.8552, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3745) +(@OGUID+2519, 181392, 571, 1, 1, 5915.079, 710.2083, 646.6064, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4613) +(@OGUID+2520, 181392, 571, 1, 1, 5915.948, 728.4288, 646.2543, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4620) +(@OGUID+2521, 181392, 571, 1, 1, 5665.726, 718.7106, 647.9514, 3.368496, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4568) +(@OGUID+2522, 181392, 571, 1, 1, 6122.517, -1074.911, 407.3852, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4418) +(@OGUID+2523, 181392, 571, 1, 1, 7801.471, -2961.203, 1263.813, 1.082103, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4441) +(@OGUID+2524, 181392, 571, 1, 1, 7799.634, -2964.866, 1264.699, 4.171338, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4441) +(@OGUID+2525, 181392, 571, 1, 1, 4596.626, -4237.616, 181.8922, 2.303831, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2526, 181392, 571, 1, 1, 4551.28, -4238.457, 173.6895, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2527, 181392, 571, 1, 1, 3388.071, -2808.053, 207.0942, 3.717554, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2528, 181392, 571, 1, 1, 3396.49, -2809.565, 207.4137, 5.323256, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2529, 181392, 571, 1, 1, 3389.364, -2800.435, 207.4506, 2.18166, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2530, 181392, 571, 1, 1, 3407.778, -2803.883, 205.8443, 4.520406, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2531, 181392, 571, 1, 1, 3403.195, -2797.129, 217.5549, 0.6806767, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2532, 181392, 571, 1, 1, 3422.459, -2783.034, 207.0113, 3.804818, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4204) +(@OGUID+2533, 181392, 571, 1, 1, 3431.648, -2776.44, 207.109, 0.6108634, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4204) +(@OGUID+2534, 181392, 571, 1, 1, 3270.23, -2299.017, 105.3505, 1.047198, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4206) +(@OGUID+2535, 181392, 571, 1, 1, 3253.434, -2199.932, 127.3124, 5.93412, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4206) +(@OGUID+2536, 181392, 571, 1, 1, 3280.345, -2211.232, 127.4082, 2.705255, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4206) +(@OGUID+2537, 181392, 571, 1, 1, 3272.255, -2192.748, 127.4287, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4206) +(@OGUID+2538, 181392, 571, 1, 1, 2124.927, -2955.563, 154.9684, 1.850049, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4070) +(@OGUID+2539, 181392, 571, 1, 1, 2127.25, -2962.019, 155.3076, 4.991644, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4070) +(@OGUID+2540, 181392, 571, 1, 1, 2122.887, -2959.943, 155.2807, 3.47321, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4070) +(@OGUID+2541, 181392, 571, 1, 1, 2129.331, -2957.729, 155.2842, 0.3665176, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4070) +(@OGUID+2542, 181392, 571, 1, 1, 2132.394, -2996.245, 155.8432, 0.122173, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2543, 181392, 571, 1, 1, 2125.529, -2997.12, 155.7463, 3.33359, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2544, 181392, 571, 1, 1, 2128.509, -2993.269, 155.7663, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2545, 181392, 571, 1, 1, 2129.307, -3000.026, 155.8247, 4.852017, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2546, 181392, 571, 1, 1, 1465.599, -3290.57, 178.7285, 3.961899, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4071) +(@OGUID+2547, 181392, 571, 1, 1, 1474.518, -3279.563, 178.9401, 0.8203033, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4071) +(@OGUID+2548, 181392, 571, 1, 1, 1461.297, -3264.238, 183.4601, 0.8377575, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4071) +(@OGUID+2549, 181392, 571, 1, 1, 1449.89, -3254.639, 183.1299, 0.9075702, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4071) +(@OGUID+2550, 181392, 571, 1, 1, 1425.031, -3316.349, 173.5113, 2.094393, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4071) +(@OGUID+2551, 181392, 571, 1, 1, 1428.773, -3274.498, 181.0417, 4.01426, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4071) +(@OGUID+2552, 181392, 571, 1, 1, 1431.548, -3252.894, 183.7873, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4071) +(@OGUID+2553, 181392, 571, 1, 1, 1426.495, -3265.443, 172.1592, 2.426008, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4071) +(@OGUID+2554, 181392, 571, 1, 1, 713.499, -2931.399, 2.876178, 0.1396245, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3987) +(@OGUID+2555, 181392, 571, 1, 1, 454.9619, -4528.652, 251.8441, 5.270896, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3991) +(@OGUID+2556, 181392, 571, 1, 1, 463.7049, -4534.563, 254.9479, 3.717554, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3991) +(@OGUID+2557, 181392, 571, 1, 1, 465.882, -4545.663, 251.8806, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3991) +(@OGUID+2558, 181392, 571, 1, 1, 486.4948, -4520.141, 239.7659, 3.735006, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3991) +(@OGUID+2559, 181392, 571, 1, 1, 445.4201, -4640.561, 253.3178, 2.076939, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3991) +(@OGUID+2560, 181392, 571, 1, 1, 639.2745, -5012.341, 11.1266, 3.38594, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3981) +(@OGUID+2561, 181392, 571, 1, 1, 597.412, -5011.138, 9.712256, 6.003934, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3981) +(@OGUID+2562, 181392, 571, 1, 1, 587.5087, -4945.893, 32.49911, 4.886924, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3981) +(@OGUID+2563, 181392, 571, 1, 1, 548.7562, -5021.973, 17.47475, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3981) +(@OGUID+2564, 181392, 571, 1, 1, 578.7986, -4942.297, 23.31465, 3.403396, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3981) +(@OGUID+2565, 181392, 571, 1, 1, 1960.26, -6117.287, 41.52031, 3.996807, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4000) +(@OGUID+2566, 181392, 571, 1, 1, 1955.997, -6111.83, 41.53107, 4.084071, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4000) +(@OGUID+2567, 181392, 571, 1, 1, 1949.33, -6147.306, 31.00299, 2.862335, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4000) +(@OGUID+2568, 181392, 571, 1, 1, 1872.579, -6219.774, 42.40208, 1.099556, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4000) +(@OGUID+2569, 181392, 571, 1, 1, 1933.835, -6188.439, 30.40494, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4000) +(@OGUID+2570, 181392, 571, 1, 1, 1881.401, -6201.038, 33.84504, 1.169369, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4000) +(@OGUID+2571, 181392, 571, 1, 1, 1966.471, -6119.723, 41.52581, 4.06662, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4000) +(@OGUID+2572, 181392, 571, 1, 1, 1971.802, -6102.198, 73.7106, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4000) +(@OGUID+2573, 181392, 571, 1, 1, 2477.306, -5073.561, 291.6375, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4003) +(@OGUID+2574, 181392, 571, 1, 1, 2475.982, -5063.151, 289.1608, 4.607672, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4003) +(@OGUID+2575, 181392, 571, 1, 1, 2469.7, -5056.41, 296.0691, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4003) +(@OGUID+2576, 181392, 571, 1, 1, 2485.302, -5048.401, 296.4124, 1.466076, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4003) +(@OGUID+2577, 181392, 571, 1, 1, 2496.864, -5066.933, 302.6931, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4003) +(@OGUID+2578, 181392, 571, 1, 1, 2501.505, -5059.525, 285.9003, 6.161013, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4003) +(@OGUID+2579, 181392, 571, 1, 1, 2483.536, -5065.366, 301.6975, 3.071766, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4003) +(@OGUID+2580, 181392, 571, 1, 1, 2673.549, -4383.29, 290.4919, 2.600535, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2581, 181392, 571, 1, 1, 3230.017, -756.3438, 174.0186, 5.288348, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2582, 181392, 571, 1, 1, 3215.221, -748.2292, 173.9813, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2583, 181392, 571, 1, 1, 3243.007, -716.868, 174.0614, 1.151916, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2584, 181392, 571, 1, 1, 3226.663, -687.4913, 176.1088, 5.794494, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2585, 181392, 571, 1, 1, 3221.048, -666.5087, 175.2865, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4186) +(@OGUID+2586, 181392, 571, 1, 1, 3212.471, -667.382, 175.2803, 2.617989, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4186) +(@OGUID+2587, 181392, 571, 1, 1, 3203.728, -675.9549, 175.5281, 2.635444, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4186) +(@OGUID+2588, 181392, 571, 1, 1, 3654.854, -700.4598, 228.6396, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4177) +(@OGUID+2589, 181392, 571, 1, 1, 3665.362, -707.243, 221.1085, 6.126106, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4177) +(@OGUID+2590, 181392, 571, 1, 1, 3667.354, -727.1337, 218.3601, 6.126106, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4177) +(@OGUID+2591, 181392, 571, 1, 1, 3668.153, -722.3611, 218.7, 6.108654, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4177) +(@OGUID+2592, 181392, 571, 1, 1, 3663.722, -720.0434, 224.0076, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4177) +(@OGUID+2593, 181392, 571, 1, 1, 3668.486, -717.066, 218.9095, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4177) +(@OGUID+2594, 181392, 571, 1, 1, 3577.127, 249.5916, 53.55267, 2.460913, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4161) +(@OGUID+2595, 181392, 571, 1, 1, 3521.09, 240.6755, 53.60065, 0.8901166, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4161) +(@OGUID+2596, 181392, 571, 1, 1, 3570.422, 301.9106, 53.45552, 4.031712, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4161) +(@OGUID+2597, 181392, 571, 1, 1, 3515.238, 299.4315, 53.53123, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4161) +(@OGUID+2598, 181392, 571, 1, 1, 4986.635, 1237.804, 232.5177, 4.293513, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4170) +(@OGUID+2599, 181392, 571, 1, 1, 5013.381, 1244.962, 238.3039, 5.969027, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4170) +(@OGUID+2600, 181392, 571, 1, 1, 5006.911, 1195.97, 235.5182, 2.44346, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4170) +(@OGUID+2601, 181392, 571, 1, 1, 5027.053, 1209.406, 240.235, 1.082103, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4170) +(@OGUID+2602, 181392, 571, 1, 1, 5027.013, 1209.431, 233.9405, 0.9773831, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4170) +(@OGUID+2603, 181392, 571, 1, 1, 5544.886, 5730.654, -72.89562, 4.153885, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2604, 181392, 571, 1, 1, 5550.921, 5732.03, -72.89473, 5.742135, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2605, 181392, 571, 1, 1, 5543.419, 5736.716, -72.88883, 2.583081, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2606, 181392, 571, 1, 1, 5549.516, 5738.056, -72.93507, 0.9948372, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2607, 181392, 571, 1, 1, 5569.917, 5759.858, -69.32285, 4.677484, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2608, 181392, 571, 1, 1, 5584.953, 5748.914, -68.31659, 3.281239, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2609, 181392, 571, 1, 1, 5577.761, 5766.71, -69.34008, 6.230826, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2610, 181392, 571, 1, 1, 5562.838, 5767.768, -69.31071, 3.036838, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2611, 181392, 571, 1, 1, 5570.901, 5774.635, -69.3968, 1.448622, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 0) +(@OGUID+2612, 181392, 571, 1, 1, 4172.988, 5271.836, 40.90479, 2.565632, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4108) +(@OGUID+2613, 181392, 571, 1, 1, 4165.883, 5280.938, 31.36931, 3.089183, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4108) +(@OGUID+2614, 181392, 571, 1, 1, 4174.368, 5270.975, 41.0957, 5.637414, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4108) +(@OGUID+2615, 181392, 571, 1, 1, 4173.983, 5280.55, 30.62882, 6.213374, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4108) +(@OGUID+2616, 181392, 571, 1, 1, 3464.886, 4177.207, 24.38719, 4.642576, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4037) +(@OGUID+2617, 181392, 571, 1, 1, 2320.047, 5198.47, 23.71446, 1.151916, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4115) +(@OGUID+2618, 181392, 571, 1, 1, 2314.894, 5185.276, 23.48018, 4.363324, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4115) +(@OGUID+2619, 181392, 571, 1, 1, 2303.014, 5208.549, 27.68204, 1.186823, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4115) +(@OGUID+2620, 181392, 571, 1, 1, 2274.934, 5189.169, 26.13615, 4.258607, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4032) +(@OGUID+2621, 181392, 571, 1, 1, 2288.641, 5214.336, 27.50825, 1.169369, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4032) +(@OGUID+2622, 181392, 571, 1, 1, 2270.879, 5210.542, 28.94806, 2.757613, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4032) +(@OGUID+2623, 181392, 571, 1, 1, 2270.002, 5197.174, 17.32868, 2.740162, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4032) +(@OGUID+2624, 181392, 571, 1, 1, 2769.89, 6123.314, 96.68723, 3.822273, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4020) +(@OGUID+2625, 181392, 571, 1, 1, 2815.303, 6165.526, 90.96311, 3.944446, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4129) +(@OGUID+2626, 181392, 571, 1, 1, 3624.583, 5913.436, 144.8049, 2.094393, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4023) +(@OGUID+2627, 181392, 571, 1, 1, 3569.432, 6650.181, 201.2051, 0.3141584, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4024) +(@OGUID+2628, 181392, 571, 1, 1, 3578.573, 6669.501, 200.2971, 5.585054, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4024) +(@OGUID+2629, 181392, 530, 1, 1, 9790.945, -7316.393, 35.23556, 2.234018, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2630, 181392, 530, 1, 1, 9799.123, -7310.608, 35.23363, 2.199115, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2631, 181392, 530, 1, 1, 9757.145, -7186.155, 23.50618, 2.897245, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2632, 181392, 530, 1, 1, 9752.514, -7336.514, 34.97601, 1.919862, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2633, 181392, 530, 1, 1, 9734.03, -7343.019, 35.02362, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2634, 181392, 530, 1, 1, 9743.402, -7339.749, 34.94567, 1.902409, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2635, 181392, 530, 1, 1, 9724.499, -7346.248, 34.95547, 1.919862, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2636, 181392, 530, 1, 1, 9767.383, -7495.052, 28.28906, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2637, 181392, 530, 1, 1, 9767.382, -7480.58, 28.18164, 3.194002, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2638, 181392, 530, 1, 1, 9694.368, -7495.957, 25.62033, 1.605702, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2639, 181392, 530, 1, 1, 9672.388, -7495.991, 25.67016, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2640, 181392, 530, 1, 1, 9683.361, -7495.406, 26.99795, 1.53589, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2641, 181392, 530, 1, 1, 9638.369, -7397.279, 22.68563, 4.782203, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2642, 181392, 530, 1, 1, 9648.386, -7152.304, 23.26344, 1.570796, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2643, 181392, 530, 1, 1, 9665.867, -7135.831, 23.16022, 3.106652, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2644, 181392, 530, 1, 1, 9648.528, -7119.087, 23.2984, 4.729844, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2645, 181392, 530, 1, 1, 9631.138, -7135.575, 23.11801, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2646, 181392, 530, 1, 1, 9485.029, -7132.405, 24.43083, 0, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3487) +(@OGUID+2647, 181392, 0, 1, 1, -8260.668, 1204.398, 16.41504, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4411) +(@OGUID+2648, 181392, 0, 1, 1, -8276.106, 1193.003, 16.38176, 2.495818, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4411) +(@OGUID+2649, 181392, 0, 1, 1, -8268.55, 1200.73, 16.45654, 2.146753, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4411) +(@OGUID+2650, 181392, 0, 1, 1, -8238.383, 1200.478, 16.38265, 0.9424766, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4411) +(@OGUID+2651, 181392, 0, 1, 1, -8246.669, 1204.407, 16.31734, 1.378809, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4411) +(@OGUID+2652, 181392, 0, 1, 1, -8512.316, 1200.338, 16.39689, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4411) +(@OGUID+2653, 181392, 0, 1, 1, -8504.936, 1192.633, 16.33525, 0.5410506, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4411) +(@OGUID+2654, 181392, 0, 1, 1, -8520.524, 1204.205, 16.42972, 1.396262, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4411) +(@OGUID+2655, 181392, 0, 1, 1, -8542.321, 1200.581, 16.43208, 2.129301, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4411) +(@OGUID+2656, 181392, 0, 1, 1, -8534.486, 1204.204, 16.40989, 1.745327, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 4411) +(@OGUID+2657, 181392, 530, 1, 1, -4205.994, -12527.13, 50.12775, 0.7155849, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3576) +(@OGUID+2658, 181392, 530, 1, 1, -4152.035, -12529.42, 49.52319, 2.670348, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3576) +(@OGUID+2659, 181392, 530, 1, 1, -4171.053, -13734.39, 82.08741, 2.775069, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3526) +(@OGUID+2660, 181392, 530, 1, 1, -4054.646, -13772.28, 84.39475, 5.881761, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 3527) +(@OGUID+2661, 181390, 1, 1, 1, 7460.37, -2500.04, 464.727, 1.658062, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 493) +(@OGUID+2662, 181390, 1, 1, 1, 7470.38, -2496.05, 464.297, 2.408554, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 493) +(@OGUID+2663, 181390, 1, 1, 1, 7446.36, -2483.69, 464.979, 6.265733, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 493) +(@OGUID+2664, 181390, 1, 1, 1, 7447.76, -2494.9, 464.509, 0.7330382, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 493) +(@OGUID+2665, 181355, 1, 1, 1, 7466.35, -2478.93, 462.023, 4.049168, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 493) +(@OGUID+2666, 181355, 1, 1, 1, 7477.78, -2130.38, 492.102, 2.321287, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 0) +(@OGUID+2667, 181390, 1, 1, 1, -1057.544, -259.6851, 168.6741, 1.710422, 0, 0, 0, 1, 120, 255, 1), -- 181390 (Area: 5345) +(@OGUID+2668, 181401, 1, 1, 1, -2281.77, -330.859, 0.345907, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 222) +(@OGUID+2669, 181392, 1, 1, 1, -2181, -409.815, 0.081098, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 223) +(@OGUID+2670, 181392, 1, 1, 1, -2401.17, -390.563, 1.97371, 0.1745321, 0, 0, 0, 1, 120, 255, 1), -- 181392 (Area: 222) +(@OGUID+2671, 181401, 1, 1, 1, -2281.77, -330.859, 0.345907, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 181401 (Area: 222) +(@OGUID+2672, 181389, 1, 1, 1, -2329.6, -389.712, -4.72049, 4.049168, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 222) +(@OGUID+2673, 181389, 1, 1, 1, -2329.57, -389.557, 13.5391, 4.118979, 0, 0, 0, 1, 120, 255, 1), -- 181389 (Area: 222) +(@OGUID+2674, 181393, 1, 1, 1, -2281.92, -445.378, -2.27773, 5.654869, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 222) +(@OGUID+2675, 181393, 1, 1, 1, -2346.1, -362.669, -6.45486, 5.899214, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 222) +(@OGUID+2676, 181393, 1, 1, 1, -2304.88, -420.427, -2.17656, 2.059488, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 222) +(@OGUID+2677, 181393, 1, 1, 1, -2341.52, -359.36, 5.71917, 5.811947, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 222) +(@OGUID+2678, 181393, 1, 1, 1, -2319.4, -423.796, -2.1298, 1.448622, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 222) +(@OGUID+2679, 181393, 1, 1, 1, -2342.03, -353.915, -6.13459, 5.916668, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 222) +(@OGUID+2680, 181393, 1, 1, 1, -2319.47, -466.969, -2.06943, 3.560473, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 222) +(@OGUID+2681, 181393, 1, 1, 1, -2286.41, -459.533, -2.33718, 6.248279, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 222) +(@OGUID+2682, 181393, 1, 1, 1, -2329.6, -456.064, -2.42455, 4.258607, 0, 0, 0, 1, 120, 255, 1), -- 181393 (Area: 222) +(@OGUID+2683, 181355, 1, 1, 1, -2280.82, -338.377, -9.42493, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 222) +(@OGUID+2684, 181355, 1, 1, 1, -2289.85, -331.87, -9.42493, 4.642576, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 222) +(@OGUID+2685, 181355, 1, 1, 1, -2333.27, -386.84, -7.97007, 2.967041, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 222) +(@OGUID+2686, 181355, 1, 1, 1, -2325.58, -391.288, -7.98294, 5.026549, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 222) +(@OGUID+2687, 181355, 1, 1, 1, -2371.6, -344.483, -8.95699, 5.829401, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 222) +(@OGUID+2688, 181355, 1, 1, 1, -2387.83, -329.752, 0.278125, 4.555311, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 222) +(@OGUID+2689, 181355, 1, 1, 1, -2393.57, -342.369, 0.274165, 1.151916, 0, 0, 0, 1, 120, 255, 1), -- 181355 (Area: 222) +(@OGUID+2690, 181391, 1, 1, 1, -1224.425, 81.43978, 133.7147, 1.588249, 0, 0, 0, 1, 120, 255, 1), -- 181391 (Area: 5345) +(@OGUID+2691, 181391, 1, 1, 1, -1228.749, 45.35286, 131.0965, 3.769912, 0, 0, 0, 1, 120, 255, 1); -- 181391 (Area: 5345) + +DELETE FROM `game_event_gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+2691 AND `eventEntry`=@Event; +INSERT INTO `game_event_gameobject` SELECT @Event, gameobject.guid FROM `gameobject` WHERE gameobject.guid BETWEEN @OGUID+0 AND @OGUID+2691; + +DELETE FROM `gameobject` WHERE `guid` IN (14100, 14101, 14103, 15114, 15196, 18521, 18523, 18874, 18891, 20978, 20985, 20993, 27068, 27072, 27322, 27553, 28155, 28191, 28195, 28197, 28201, 28202, 28206, 28240, 28242, 28249, 28254); diff --git a/sql/updates/world/3.3.5/2016_06_30_00_world_335.sql b/sql/updates/world/3.3.5/2016_06_30_00_world_335.sql new file mode 100644 index 00000000000..a31825e40a5 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_06_30_00_world_335.sql @@ -0,0 +1,103 @@ +-- +SET @CGUID:=145496; -- 42 Cguid required +SET @Event:=1; +DELETE FROM `creature` WHERE `id` = 25535 AND `guid` BETWEEN @CGUID+0 AND @CGUID+34; +DELETE FROM `creature` WHERE `id` = 25536 AND `guid` BETWEEN @CGUID+35 AND @CGUID+41; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 25535, 1, 1, 1, -1048.8474, 299.9913, 136.2018, 0, 300, 0, 0), -- Thunderbluff +(@CGUID+1, 25535, 1, 1, 1, -1049.0593, 306.6115, 134.7332, 0, 300, 0, 0), -- Thunderbluff +(@CGUID+2, 25535, 1, 1, 1, -1042.5935, 306.5972, 136.2431, 0, 300, 0, 0), -- Thunderbluff +(@CGUID+3, 25535, 1, 1, 1, -1041.5727, 313.1235, 135.0733, 0, 300, 0, 0), -- Thunderbluff +(@CGUID+4, 25535, 1, 1, 1, -1035.8431, 312.5713, 136.4550, 0, 300, 0, 0), -- Thunderbluff +(@CGUID+5, 25535, 1, 1, 1, 1915.7028, -4320.4287, 23.6215, 0, 300, 0, 0), -- Orgrimmar +(@CGUID+6, 25535, 1, 1, 1, 1918.0462, -4314.7939, 24.6562, 0, 300, 0, 0), -- Orgrimmar +(@CGUID+7, 25535, 1, 1, 1, 1920.3363, -4319.1167, 23.6321, 0, 300, 0, 0), -- Orgrimmar +(@CGUID+8, 25535, 1, 1, 1, 1923.9064, -4315.2817, 24.2867, 0, 300, 0, 0), -- Orgrimmar +(@CGUID+9, 25535, 1, 1, 1, 1925.2815, -4321.3115, 23.4577, 0, 300, 0, 0), -- Orgrimmar +(@CGUID+10, 25535, 0, 1, 1, 1837.1390, 225.5553, 62.0426, 0, 300, 0, 0), -- Undercity +(@CGUID+11, 25535, 0, 1, 1, 1840.1717, 222.4032, 62.0145, 0, 300, 0, 0), -- Undercity +(@CGUID+12, 25535, 0, 1, 1, 1838.1589, 218.8164, 61.9465, 0, 300, 0, 0), -- Undercity +(@CGUID+13, 25535, 0, 1, 1, 1840.9129, 216.1996, 61.8722, 0, 300, 0, 0), -- Undercity +(@CGUID+14, 25535, 0, 1, 1, 1837.3494, 213.0867, 62.1371, 0, 300, 0, 0), -- Undercity +(@CGUID+15, 25535, 530, 1, 1, 9817.4580, -7221.3481, 27.9115, 0, 300, 0, 0), -- Silvermoon +(@CGUID+16, 25535, 530, 1, 1, 9823.5303, -7229.1431, 27.9129, 0, 300, 0, 0), -- Silvermoon +(@CGUID+17, 25535, 530, 1, 1, 9817.6719, -7227.8506, 27.9026, 0, 300, 0, 0), -- Silvermoon +(@CGUID+18, 25535, 530, 1, 1, 9819.8994, -7234.4990, 27.9108, 0, 300, 0, 0), -- Silvermoon +(@CGUID+19, 25535, 530, 1, 1, 9810.4434, -7226.9809, 27.8514, 0, 300, 0, 0), -- Silvermoon +(@CGUID+20, 25535, 530, 1, 1, -3768.7754, -11511.2832, -132.6796, 0, 300, 0, 0), -- Exodar +(@CGUID+21, 25535, 530, 1, 1, -3773.2346, -11519.4140, -132.7663, 0, 300, 0, 0), -- Exodar +(@CGUID+22, 25535, 530, 1, 1, -3776.4026, -11511.5449, -132.7721, 0, 300, 0, 0), -- Exodar +(@CGUID+23, 25535, 530, 1, 1, -3780.6101, -11514.2666, -132.8303, 0, 300, 0, 0), -- Exodar +(@CGUID+24, 25535, 530, 1, 1, -3775.3208, -11506.5390, -132.7359, 0, 300, 0, 0), -- Exodar +(@CGUID+25, 25535, 0, 1, 1, -8818.0068, 865.1570, 100.7713, 0, 300, 0, 0), -- Stormwind +(@CGUID+26, 25535, 0, 1, 1, -8815.1103, 860.5714, 100.7542, 0, 300, 0, 0), -- Stormwind +(@CGUID+27, 25535, 0, 1, 1, -8816.6211, 854.2422, 100.6779, 0, 300, 0, 0), -- Stormwind +(@CGUID+28, 25535, 0, 1, 1, -8825.8057, 845.7718, 100.8559, 0, 300, 0, 0), -- Stormwind +(@CGUID+29, 25535, 0, 1, 1, -8819.5478, 848.5115, 100.7441, 0, 300, 0, 0), -- Stormwind +(@CGUID+30, 25535, 0, 1, 1, -4683.9575, -1232.5522, 503.4600, 0, 300, 0, 0), -- Ironforge +(@CGUID+31, 25535, 0, 1, 1, -4677.2891, -1229.7531, 503.4604, 0, 300, 0, 0), -- Ironforge +(@CGUID+32, 25535, 0, 1, 1, -4675.4248, -1224.6980, 503.4550, 0, 300, 0, 0), -- Ironforge +(@CGUID+33, 25535, 0, 1, 1, -4678.7412, -1219.3196, 503.4550, 0, 300, 0, 0), -- Ironforge +(@CGUID+34, 25535, 0, 1, 1, -4686.2109, -1219.0109, 503.4662, 0, 300, 0, 0), -- Ironforge +(@CGUID+35, 25536, 1, 1, 1, -1044.1012, 308.1366, 133.8391, 0, 300, 0, 0), -- Thunderbluff +(@CGUID+36, 25536, 1, 1, 1, 1921.2700, -4316.9766, 22.6557, 0, 300, 0, 0), -- Orgrimmar +(@CGUID+37, 25536, 0, 1, 1, 1841.7195, 220.2958, 60.8116, 0, 300, 0, 0), -- Undercity +(@CGUID+38, 25536, 530, 1, 1, 9815.7236, -7229.8100, 26.0966, 0, 300, 0, 0), -- Silvermoon +(@CGUID+39, 25536, 530, 1, 1, -3772.0854, -11514.6992, -134.5330, 0, 300, 0, 0), -- Exodar +(@CGUID+40, 25536, 0, 1, 1, -8819.7685, 856.8655, 99.0269, 0, 300, 0, 0), -- Stormwind +(@CGUID+41, 25536, 0, 1, 1, -4681.69, -1225.61, 501.66, 0, 300, 0, 0); -- Ironforge + +DELETE FROM `game_event_creature` WHERE `eventEntry` = 1 AND `guid` BETWEEN @CGUID+0 AND @CGUID+41; +INSERT INTO `game_event_creature` SELECT @Event, `creature`.`guid` FROM `creature` WHERE `creature`.`guid` BETWEEN @CGUID+0 AND @CGUID+41; + +DELETE FROM `creature_addon` WHERE `guid`=46339; +DELETE FROM `creature_addon` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+34; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@CGUID+0,0,0,0,4097,0,45723), +(@CGUID+1,0,0,0,4097,0,''), +(@CGUID+2,0,0,0,4097,0,''), +(@CGUID+3,0,0,0,4097,0,''), +(@CGUID+4,0,0,0,4097,0,''), +(@CGUID+5,0,0,0,4097,0,45723), +(@CGUID+6,0,0,0,4097,0,''), +(@CGUID+7,0,0,0,4097,0,''), +(@CGUID+8,0,0,0,4097,0,''), +(@CGUID+9,0,0,0,4097,0,''), +(@CGUID+10,0,0,0,4097,0,45723), +(@CGUID+11,0,0,0,4097,0,''), +(@CGUID+12,0,0,0,4097,0,''), +(@CGUID+13,0,0,0,4097,0,''), +(@CGUID+14,0,0,0,4097,0,''), +(@CGUID+15,0,0,0,4097,0,45723), +(@CGUID+16,0,0,0,4097,0,''), +(@CGUID+17,0,0,0,4097,0,''), +(@CGUID+18,0,0,0,4097,0,''), +(@CGUID+19,0,0,0,4097,0,''), +(@CGUID+20,0,0,0,4097,0,45723), +(@CGUID+21,0,0,0,4097,0,''), +(@CGUID+22,0,0,0,4097,0,''), +(@CGUID+23,0,0,0,4097,0,''), +(@CGUID+24,0,0,0,4097,0,''), +(@CGUID+25,0,0,0,4097,0,45723), +(@CGUID+26,0,0,0,4097,0,''), +(@CGUID+27,0,0,0,4097,0,''), +(@CGUID+28,0,0,0,4097,0,''), +(@CGUID+29,0,0,0,4097,0,''), +(@CGUID+30,0,0,0,4097,0,45723), +(@CGUID+31,0,0,0,4097,0,''), +(@CGUID+32,0,0,0,4097,0,''), +(@CGUID+33,0,0,0,4097,0,''), +(@CGUID+34,0,0,0,4097,0,''); + +DELETE FROM `game_event_creature` WHERE `guid` IN (46906,46908,46909,46910,46911,46914,46807,47614,1882); +INSERT INTO `game_event_creature` (`eventEntry`,`guid`) VALUES +(1, 46906), +(1, 46908), +(1, 46909), +(1, 46910), +(1, 46911), +(1, 46914), +(1, 46807), +(1, 47614), +(1, 1882); +DELETE FROM `creature` WHERE `id`=26188; diff --git a/sql/updates/world/3.3.5/2016_07_04_00_world.sql b/sql/updates/world/3.3.5/2016_07_04_00_world.sql new file mode 100644 index 00000000000..d5c0e5fc05d --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_00_world.sql @@ -0,0 +1,6 @@ +-- +SET @GUID =6028; +UPDATE `gameobject` SET `spawnMask`=3, `spawntimesecs`=604800 WHERE `guid`=55974; +DELETE FROM `gameobject` WHERE `guid`=@GUID; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`)VALUES +(@GUID, 195036, 603, 3, 1, 1757.896, 87.201, 342.384, 0.649495, 0, 0, 0, 1, 604800, 255, 1); diff --git a/sql/updates/world/3.3.5/2016_07_04_01_world.sql b/sql/updates/world/3.3.5/2016_07_04_01_world.sql new file mode 100644 index 00000000000..28f18ef6987 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `SpecialFlags`=0 WHERE `ID`=6962; diff --git a/sql/updates/world/3.3.5/2016_07_04_02_world.sql b/sql/updates/world/3.3.5/2016_07_04_02_world.sql new file mode 100644 index 00000000000..5282ae12337 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `skill_fishing_base_level` SET `skill`=430 WHERE `entry`=4197; diff --git a/sql/updates/world/3.3.5/2016_07_04_03_world.sql b/sql/updates/world/3.3.5/2016_07_04_03_world.sql new file mode 100644 index 00000000000..106953e74d7 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_03_world.sql @@ -0,0 +1,12 @@ +-- +UPDATE `creature_template` SET `VehicleId`=732, `unit_flags`=33554432, `InhabitType`=4 WHERE `entry`=40246; + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (74890, -75731); +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(74890, 75055, 0, "Instant Statue"), +(-75731, -75055, 0, "Instant Statue"), +(-75731, -74890, 0, "Instant Statue"); + +DELETE FROM `spell_custom_attr` WHERE `entry`=75731; +INSERT INTO `spell_custom_attr` (`entry`, `attributes`) VALUES +(75731, 4096); diff --git a/sql/updates/world/3.3.5/2016_07_04_04_world.sql b/sql/updates/world/3.3.5/2016_07_04_04_world.sql new file mode 100644 index 00000000000..0b87d47f638 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_04_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template` SET `QuestType`=2 WHERE `Id`=13070; diff --git a/sql/updates/world/3.3.5/2016_07_04_05_world.sql b/sql/updates/world/3.3.5/2016_07_04_05_world.sql new file mode 100644 index 00000000000..d19e8862b45 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_05_world.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `creature_queststarter` WHERE `quest`=10888; + +DELETE FROM `quest_template_addon` WHERE `ID` IN (10888, 13430); +INSERT INTO `quest_template_addon` (`ID`, `ExclusiveGroup`) VALUES +(10888, 10888), +(13430, 10888); + +UPDATE `quest_template_addon` SET `NextQuestID`=13430 WHERE `ID` IN (10884, 10885, 10886); diff --git a/sql/updates/world/3.3.5/2016_07_04_06_world.sql b/sql/updates/world/3.3.5/2016_07_04_06_world.sql new file mode 100644 index 00000000000..6cc2a01d03c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_06_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID` IN (11526, 11877); +UPDATE `quest_template_addon` SET `RequiredSkillID`=762, `RequiredSkillPoints`=225 WHERE `ID`=11526; diff --git a/sql/updates/world/3.3.5/2016_07_04_07_world.sql b/sql/updates/world/3.3.5/2016_07_04_07_world.sql new file mode 100644 index 00000000000..ae262760873 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_07_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `creature_queststarter` WHERE `quest` IN (11520, 11532, 11535, 11538, 11539, 11542, 11545); + +DELETE FROM `creature_queststarter` WHERE `quest`=11534; +INSERT INTO `creature_queststarter` VALUES +(25034, 11534); diff --git a/sql/updates/world/3.3.5/2016_07_04_08_world.sql b/sql/updates/world/3.3.5/2016_07_04_08_world.sql new file mode 100644 index 00000000000..3af82274a98 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_08_world.sql @@ -0,0 +1,13 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestId`=0 WHERE `Id`=11875; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (19, 20) AND `SourceEntry`=11875; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 11875, 0, 0, 25, 0, 29354, 0, 0, 0, 0, 0, "", "Quest Gaining the Advantage requires Master Mining learned OR"), +(20, 0, 11875, 0, 0, 25, 0, 29354, 0, 0, 0, 0, 0, "", "Quest Gaining the Advantage requires Master Mining learned OR"), + +(19, 0, 11875, 0, 1, 25, 0, 32678, 0, 0, 0, 0, 0, "", "Quest Gaining the Advantage requires Master Skinning learned OR"), +(20, 0, 11875, 0, 1, 25, 0, 32678, 0, 0, 0, 0, 0, "", "Quest Gaining the Advantage requires Master Skinning learned OR"), + +(19, 0, 11875, 0, 2, 25, 0, 28695, 0, 0, 0, 0, 0, "", "Quest Gaining the Advantage requires Master Herbalism learned"), +(20, 0, 11875, 0, 2, 25, 0, 28695, 0, 0, 0, 0, 0, "", "Quest Gaining the Advantage requires Master Herbalism learned"); diff --git a/sql/updates/world/3.3.5/2016_07_04_09_world.sql b/sql/updates/world/3.3.5/2016_07_04_09_world.sql new file mode 100644 index 00000000000..29cb4809078 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_09_world.sql @@ -0,0 +1,12 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry` IN (22777, 22776, 22775) AND `SourceTypeOrReferenceId`=23; +INSERT INTO `conditions` VALUES +(23, 16444, 22777, 0, 0, 9, 0, 9067, 0, 0, 0, 0, 0, "", "Bundle of Fireworks can be bought only if on quest 'The Party Never Ends'"), +(23, 16443, 22776, 0, 0, 9, 0, 9067, 0, 0, 0, 0, 0, "", "Springpaw Appetizers can be bought only if on quest 'The Party Never Ends'"), +(23, 16442, 22775, 0, 0, 9, 0, 9067, 0, 0, 0, 0, 0, "", "Suntouched Special Reserve can be bought only if on quest 'The Party Never Ends'"); + +DELETE FROM `conditions` WHERE `SourceEntry` IN (1939, 1941, 1942) AND `SourceTypeOrReferenceId`=23; +INSERT INTO `conditions` VALUES +(23, 465, 1939, 0, 0, 9, 0, 116, 0, 0, 0, 0, 0, "", "Skin of Sweet Rum can be bought only if on quest 'Dry Times'"), +(23, 277, 1941, 0, 0, 9, 0, 116, 0, 0, 0, 0, 0, "", "Cask of Merlot can be bought only if on quest 'Dry Times'"), +(23, 274, 1942, 0, 0, 9, 0, 116, 0, 0, 0, 0, 0, "", "Bottle of Moonshine can be bought only if on quest 'Dry Times'"); diff --git a/sql/updates/world/3.3.5/2016_07_04_10_world.sql b/sql/updates/world/3.3.5/2016_07_04_10_world.sql new file mode 100644 index 00000000000..564f03ac93b --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_10_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `SpecialFlags`=0 WHERE `Id`=75; diff --git a/sql/updates/world/3.3.5/2016_07_04_11_world.sql b/sql/updates/world/3.3.5/2016_07_04_11_world.sql new file mode 100644 index 00000000000..e8989d28544 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_11_world.sql @@ -0,0 +1,20 @@ +-- +SET @ENTRY_THE_LICH_KING := 25462; +SET @QUEST_IN_SERVICE_OF_THE_LICH_KING := 12593; + +-- The Lich King Timed Actionlist +DELETE FROM `smart_scripts` WHERE (source_type = 9 AND entryorguid = @ENTRY_THE_LICH_KING * 100); +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY_THE_LICH_KING * 100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 4, 14970, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Script - Play Sound 14970'), +(@ENTRY_THE_LICH_KING * 100, 9, 1, 0, 0, 0, 100, 0, 21000, 21000, 0, 0, 4, 14971, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Script - Play Sound 14971'), +(@ENTRY_THE_LICH_KING * 100, 9, 2, 0, 0, 0, 100, 0, 26000, 26000, 0, 0, 4, 14972, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Script - Play Sound 14972'); + +-- The Lich King Timed Actionlist Trigger +DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = @ENTRY_THE_LICH_KING); +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(@ENTRY_THE_LICH_KING, 0, 0, 0, 19, 0, 100, 0, @QUEST_IN_SERVICE_OF_THE_LICH_KING, 0, 0, 0, 80, 2546200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Quest \'In service of The Lich King Taken\' - Run Script'); + +-- 'In service of The Lich King' quest details +DELETE FROM `quest_details` WHERE `ID` = @QUEST_IN_SERVICE_OF_THE_LICH_KING; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `EmoteDelay1`, `VerifiedBuild`) VALUES +(@QUEST_IN_SERVICE_OF_THE_LICH_KING, 396, 397, 396, 396, 500, 1000, 1000, 1000, 20886); diff --git a/sql/updates/world/3.3.5/2016_07_04_12_world.sql b/sql/updates/world/3.3.5/2016_07_04_12_world.sql new file mode 100644 index 00000000000..ea56bab8e79 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_12_world.sql @@ -0,0 +1,27 @@ +-- Add sniffed gossip text to menu +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (8356, 8371); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(8356, 0, 0, 'Reclaim Flanis\'s pack.', 19326,1,1,0,0,0,0,'',0), +(8371, 0, 0, 'Search the corpse for Kagrosh\'s pack.', 19400,1,1,0,0,0,0,'',0); + +-- Migrate NPCs to use SmartAI / remove from C++ script +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN (21727, 21725, 22112); +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` = 23489; + +-- Create SmartAI +DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid IN (21727, 21725, 22112)); +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(21727, 0, 0, 1, 62, 0, 100, 0, 8356, 0, 0, 0, 11, 37244, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Flanis Swiftwing - On Gossip Option 0 Selected - Cast Spell'), +(21727, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Flanis Swiftwing - On Linked Action - Close Gossip'), +(21725, 0, 0, 1, 62, 0, 100, 0, 8371, 0, 0, 0, 11, 37245, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kagrosh - On Gossip Option 0 Selected - Cast Spell'), +(21725, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Kagrosh - On Linked Action - Close Gossip'), +(22112, 0, 0, 0, 19, 0, 100, 0, 10866, 0, 0, 0, 12, 11980, 1, 300000, 0, 0, 0, 8, 0, 0, 0, -4204.94, 316.397, 122.508, 1.309, 'Karynaku - On Quest Accepted - Summon Creature \'Zuluhed the Whacked\''), +(22112, 0, 1, 0, 19, 0, 100, 0, 10870, 0, 0, 0, 52, 649, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Karynaku - On Quest Accepted - Activate Taxi Path 649'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` IN (8356, 8371, 8754); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,8356,0,0,0,2,0,30658,1,0,1,0,'','Flanis Swiftwing - Show gossip option 0 if player does not have item 30658 in inventory'), +(15,8356,0,0,0,9,0,10583,0,0,0,0,'','Flanis Swiftwing - Show gossip option 0 if player has accepted quest 10583'), +(15,8371,0,0,0,2,0,30659,1,0,1,0,'','Kagrosh - Show gossip option 0 if player does not have item 30659 in inventory'), +(15,8371,0,0,0,9,0,10601,0,0,0,0,'','Kagrosh - Show gossip option 0 if player has accepted quest 10601'), +(15,8754,0,0,0,5,0,1015,128,0,0,0,'','Drake Dealer Hurlunk - Show gossip option 0 if player is exalted with faction 1015'); diff --git a/sql/updates/world/3.3.5/2016_07_04_13_world.sql b/sql/updates/world/3.3.5/2016_07_04_13_world.sql new file mode 100644 index 00000000000..cc46a42cbb0 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_13_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature` SET `phaseMask`=194 WHERE `id`=30657; diff --git a/sql/updates/world/3.3.5/2016_07_04_14_world.sql b/sql/updates/world/3.3.5/2016_07_04_14_world.sql new file mode 100644 index 00000000000..d639b5eefe7 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_04_14_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (26022, 26023); +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(26022, 61417, 2, "Pursuit of Justice Mounted Movement Speed Increase"), +(26023, 61418, 2, "Pursuit of Justice Mounted Movement Speed Increase"); diff --git a/sql/updates/world/3.3.5/2016_07_05_00_world.sql b/sql/updates/world/3.3.5/2016_07_05_00_world.sql new file mode 100644 index 00000000000..c2eb2c5118c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_05_00_world.sql @@ -0,0 +1,21 @@ +SET @CGUID := 11003; + +UPDATE `spell_dbc` SET `EffectBasePoints1`=20 WHERE `Id`=70507; +UPDATE `creature_template` SET `unit_flags`=32832 WHERE `entry` IN(40142,40143,40144,40145); +UPDATE `creature_template` SET `flags_extra`=128 WHERE `entry` IN (40081,40470,40471,40472); + +DELETE FROM `creature` WHERE `guid`=@CGUID; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@CGUID, 40146, 724, 0, 0, 15, 33, 0, 0, 3156.037, 533.2656, 72.97205, 0, 604800, 0, 0, 0, 0, 0, 0, 0, 0, 0); + +DELETE FROM `spell_script_names` WHERE `ScriptName` IN( 'spell_halion_blazing_aura','spell_halion_combustion_consumption_periodic'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(75886, 'spell_halion_blazing_aura'), +(75887, 'spell_halion_blazing_aura'), +(74803, 'spell_halion_combustion_consumption_periodic'), +(74629, 'spell_halion_combustion_consumption_periodic'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(75886,75887); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 2, 75886, 0, 0, 31, 0, 3, 40683, 0, 0, 0, 0, '', 'Blazing Aura can only target Living Embers'), +(13, 2, 75887, 0, 0, 31, 0, 3, 40683, 0, 0, 0, 0, '', 'Blazing Aura can only target Living Embers'); diff --git a/sql/updates/world/3.3.5/2016_07_05_01_world.sql b/sql/updates/world/3.3.5/2016_07_05_01_world.sql new file mode 100644 index 00000000000..f0319889412 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_05_01_world.sql @@ -0,0 +1,5 @@ +SET @CGUID := 11003; + +DELETE FROM `creature` WHERE `id`=40146; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@CGUID, 40146, 724, 0, 0, 15, 33, 0, 0, 3156.037, 533.2656, 72.97205, 0, 604800, 0, 0, 0, 0, 0, 0, 0, 0, 0); diff --git a/sql/updates/world/3.3.5/2016_07_05_02_world.sql b/sql/updates/world/3.3.5/2016_07_05_02_world.sql new file mode 100644 index 00000000000..2921c19b0c1 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_05_02_world.sql @@ -0,0 +1 @@ +UPDATE `command` SET `help` = 'Syntax: .cometome\nMake selected creature come to your current location (new position not saved to DB).' WHERE `command`.`name` = 'cometome'; diff --git a/sql/updates/world/3.3.5/2016_07_05_03_world.sql b/sql/updates/world/3.3.5/2016_07_05_03_world.sql new file mode 100644 index 00000000000..6a91e39c26c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_05_03_world.sql @@ -0,0 +1,22 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (29531, 45390, 29726); +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(29726, 45406, 1, "Holiday - Midsummer, Ribbon Pole Periodic Visual"); + +DELETE FROM `spell_script_names` WHERE `spell_id` IN (45390, 45406); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(45406, "spell_gen_ribbon_pole_dancer_check"); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=29726; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 29726, 0, 0, 31, 0, 3, 17066, 0, 0, 0, 0, "", "Spell 'Test Ribbon Pole Channel' targets creature 'Ribbon Pole Debug Target'"); +UPDATE `gameobject_template` SET `ScriptName`="go_midsummer_ribbon_pole" WHERE `entry`=181605; + +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry` IN (46836, 46842); +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(0, 46836, 64, 0, "", "Spell Flame Patch - Ignore LOS"), +(0, 46842, 64, 0, "", "Spell Flame Ring - Ignore LOS"); + +UPDATE `creature_template_addon` SET `bytes1`=33554688 WHERE `entry`=17066; +DELETE FROM `creature_addon` WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id`=17066); +UPDATE `creature` SET `MovementType`=0, `spawndist`=0 WHERE `id`=17066; +UPDATE `creature_template` SET `ScriptName`="npc_midsummer_bunny_pole" WHERE `entry`=17066; diff --git a/sql/updates/world/3.3.5/2016_07_06_00_world.sql b/sql/updates/world/3.3.5/2016_07_06_00_world.sql new file mode 100644 index 00000000000..3875299dde0 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_06_00_world.sql @@ -0,0 +1,5 @@ +-- +SET @GUID := 12459; +DELETE FROM `creature` WHERE `guid` IN (@GUID); +INSERT INTO `creature` (`guid`, `id`, `map`, `SpawnMask`, `modelid`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@GUID, 6491, 571, 1, 0, 4105.362, -4818.6, 76.074, 0.149361, 7200, 0, 0); diff --git a/sql/updates/world/3.3.5/2016_07_06_01_world.sql b/sql/updates/world/3.3.5/2016_07_06_01_world.sql new file mode 100644 index 00000000000..8275d04461c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_06_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_addon` SET `bytes1`=0, `auras`=45787 WHERE `guid`=97150; diff --git a/sql/updates/world/3.3.5/2016_07_06_02_world.sql b/sql/updates/world/3.3.5/2016_07_06_02_world.sql new file mode 100644 index 00000000000..954a82b5a8e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_06_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128, `unit_flags`=`unit_flags`|768 WHERE `entry` IN (26468, 26469, 26470); diff --git a/sql/updates/world/3.3.5/2016_07_06_03_world.sql b/sql/updates/world/3.3.5/2016_07_06_03_world.sql new file mode 100644 index 00000000000..db205700124 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_06_03_world.sql @@ -0,0 +1,24 @@ +UPDATE `creature_template` SET `ScriptName`='',`AIName`='SmartAI' WHERE `entry`IN(15186,16069,15358,16445,15361); + +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(15186,16069,15358,16445,15361) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=1518600 AND `source_type`=9; + +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(15186, 0, 1, 0, 1, 0, 100, 0, 180000, 300000, 450000, 900000, 80, 1518600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Murky - OOC - Run Script'), +(15186, 0, 2, 3, 25, 0, 100, 0, 0, 0, 0, 0, 11, 24983, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Murky - On Reset - Cast Baby Murloc Passive'), +(15186, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Murky - On Reset - Set Emote State'), +(16069, 0, 1, 0, 1, 0, 100, 0, 180000, 300000, 450000, 900000, 80, 1518600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gurky - OOC - Run Script'), +(16069, 0, 2, 3, 25, 0, 100, 0, 0, 0, 0, 0, 11, 24983, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gurky - On Reset - Cast Baby Murloc Passive'), +(16069, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Gurky - On Reset - Set Emote State'), +(15358, 0, 1, 0, 1, 0, 100, 0, 180000, 300000, 450000, 900000, 80, 1518600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lurky - OOC - Run Script'), +(15358, 0, 2, 3, 25, 0, 100, 0, 0, 0, 0, 0, 11, 24983, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lurky - On Reset - Cast Baby Murloc Passive'), +(15358, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lurky - On Reset - Set Emote State'), +(16445, 0, 1, 0, 1, 0, 100, 0, 180000, 300000, 450000, 900000, 80, 1518600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terky - OOC - Run Script'), +(16445, 0, 2, 3, 25, 0, 100, 0, 0, 0, 0, 0, 11, 24983, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terky - On Reset - Cast Baby Murloc Passive'), +(16445, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terky - On Reset - Set Emote State'), +(15361, 0, 1, 0, 1, 0, 100, 0, 180000, 300000, 450000, 900000, 80, 1518600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Murki - OOC - Run Script'), +(15361, 0, 2, 3, 25, 0, 100, 0, 0, 0, 0, 0, 11, 24983, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Murki - On Reset - Cast Baby Murloc Passive'), +(15361, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Murki - On Reset - Set Emote State'), +(1518600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 17, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - Script - Set Emote State'), +(1518600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 25165, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - Script - Cast Baby Murloc Dance'), +(1518600, 9, 2, 0, 0, 0, 100, 0, 15000, 15000, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Baby Murloc - Script - Set Emote State'); diff --git a/sql/updates/world/3.3.5/2016_07_07_00_world.sql b/sql/updates/world/3.3.5/2016_07_07_00_world.sql new file mode 100644 index 00000000000..edfb3fe7c28 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_07_00_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (1986, 1994); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1986, 1994) AND `source_type`=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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(1986, 0, 0, 0, 0, 0, 100, 0, 3000, 7000, 3000, 7000, 11, 6751, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Webwood Spider - In Combat - Cast \'Weak Poison\''), +(1994, 0, 0, 0, 0, 0, 100, 0, 4000, 9000, 4000, 9000, 11, 11918, 32, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Githyiss the Vile - In Combat - Cast \'Poison\''); diff --git a/sql/updates/world/3.3.5/2016_07_07_01_world.sql b/sql/updates/world/3.3.5/2016_07_07_01_world.sql new file mode 100644 index 00000000000..e88a8173b9f --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_07_01_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry`=4170 AND `SourceTypeOrReferenceId`=13; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 4170, 0, 0, 31, 0, 3, 2775, 0, 0, 0, 0, "", "Cannon Ball can only hit \'Daggerspine Marauder\'"); diff --git a/sql/updates/world/3.3.5/2016_07_07_02_world.sql b/sql/updates/world/3.3.5/2016_07_07_02_world.sql new file mode 100644 index 00000000000..90193d3ab45 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_07_02_world.sql @@ -0,0 +1,82 @@ +-- +DELETE FROM `quest_details` WHERE `ID` IN (997, 6182, 6183, 6184, 6186, 7441, 9424, 9446, 9474, 9496, 9589, 9607, 9697, 9701, 9702, 9708, 9709, 9715, 9717, 9719, 9724, 9726, 9727, 9738, 9789, 9854, 9855, 9951, 9957, 9968, 9971, 9978, 9979, 10096,11576,11582,11587,11590,11646,11648,11663,11671,11679,11682,11900,11905,11911,11912,11914,11918,11919,11931,11936,11946,11951,11957,11984,11989,11990,11991,12037,12042,12068,12113,12114,12120,12123,12152,12190,12657,12766,264, 833, 857, 862, 1106, 9534,10177, 11538); +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(6182, 1, 1, 1, 1, 1000, 2000, 3000, 4000, 12340), +(6183, 1, 1, 1, 6, 1000, 2000, 3000, 4000, 12340), +(6184, 1, 1, 1, 1, 1000, 2000, 3000, 4000, 12340), +(6186, 33, 1, 1, 25, 1000, 2000, 3000, 4000, 12340), +(7441, 1, 1, 1, 1, 500, 1000, 1500, 2000, 12340), +(9424, 0, 0, 0, 0, 500, 0, 0, 0, 12340), +(9446, 1, 6, 0, 0, 0, 1000, 0, 0, 12340), +(9474, 1, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(9496, 1, 0, 0, 0, 0, 0, 0, 0, 12340), +(9589, 1, 1, 6, 0, 0, 1000, 1000, 0, 12340), +(9607, 1, 6, 0, 0, 0, 1000, 0, 0, 12340), +(9697, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(9701, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(9702, 6, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(9708, 1, 1, 6, 0, 0, 1000, 1000, 0, 12340), +(9709, 1, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(9715, 1, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(9717, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(9719, 1, 1, 6, 0, 0, 1000, 1000, 0, 12340), +(9724, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(9726, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(9727, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(9738, 1, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(9789, 6, 1, 11, 0, 0, 1000, 1000, 0, 12340), +(9854, 6, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(9855, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(9951, 5, 1, 5, 0, 0, 1000, 1000, 0, 12340), +(9957, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(9968, 1, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(9971, 1, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(9978, 1, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(9979, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(10096, 1, 1, 6, 0, 0, 0, 1000, 0, 12340), +(11576, 2, 1, 1, 0, 0, 500, 1000, 0, 12340), +(11582, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11587, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11590, 1, 1, 1, 0, 0, 1000, 500, 0, 12340), +(11646, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11648, 1, 1, 0, 0, 0, 500, 0, 0, 12340), +(11663, 5, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11671, 1, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(11679, 5, 1, 1, 0, 0, 1000, 500, 0, 12340), +(11682, 2, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11900, 5, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11905, 1, 5, 1, 0, 0, 500, 1000, 0, 12340), +(11911, 1, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(11912, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11914, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11918, 1, 1, 1, 0, 0, 500, 500, 0, 12340), +(11919, 1, 1, 1, 0, 0, 500, 500, 0, 12340), +(11931, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11936, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11946, 1, 1, 1, 0, 0, 1000, 500, 0, 12340), +(11951, 1, 1, 1, 0, 0, 500, 1000, 0, 12340), +(11957, 1, 1, 1, 0, 0, 1000, 1000, 0, 12340), +(11984, 1, 1, 1, 0, 0, 500, 1000, 0, 12340), +(11989, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11990, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(11991, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(12037, 1, 1, 0, 0, 0, 500, 0, 0, 12340), +(12042, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(12068, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(12113, 1, 6, 0, 0, 0, 1000, 0, 0, 12340), +(12114, 5, 1, 5, 0, 0, 1000, 0, 0, 12340), +(12120, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(12123, 273, 1, 1, 0, 2000, 0, 0, 0, 12340), +(12152, 1, 1, 0, 0, 0, 1000, 0, 0, 12340), +(12190, 1, 1, 0, 0, 0, 500, 0, 0, 12340), +(12657, 396, 15, 396, 0, 1000, 2000, 2000, 2000, 12340), +(12766, 1, 6, 1, 0, 1000, 0, 0, 0, 12340), +(997, 6, 1, 0, 0, 0, 1000, 0, 0, 15595), +(264, 1, 0, 0, 0, 0, 0, 0, 0, 12340), +(833, 4, 0, 0, 0, 0, 0, 0, 0, 12340), +(857, 4, 0, 0, 0, 0, 0, 0, 0, 12340), +(862, 4, 0, 0, 0, 0, 0, 0, 0, 12340), +(1106, 4, 0, 0, 0, 0, 0, 0, 0, 12340), +(9534, 4, 0, 0, 0, 0, 0, 0, 0, 12340), +(10177, 4, 0, 0, 0, 0, 0, 0, 0, 12340), +(11538, 4, 0, 0, 0, 0, 0, 0, 0, 12340); diff --git a/sql/updates/world/3.3.5/2016_07_07_03_world.sql b/sql/updates/world/3.3.5/2016_07_07_03_world.sql new file mode 100644 index 00000000000..3af1cdd1fb6 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_07_03_world.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `creature_queststarter` WHERE `quest` IN (3763, 3789, 3790, 3803); +INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES +(6735, 3763), +(6740, 3789), +(5111, 3790), +(4217, 3803); diff --git a/sql/updates/world/3.3.5/2016_07_07_04_world.sql b/sql/updates/world/3.3.5/2016_07_07_04_world.sql new file mode 100644 index 00000000000..0747a024a0a --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_07_04_world.sql @@ -0,0 +1,4 @@ +-- +ALTER TABLE `gossip_menu` ADD COLUMN `VerifiedBuild` SMALLINT(5) NOT NULL DEFAULT '0'; +ALTER TABLE `gossip_menu_option` ADD COLUMN `VerifiedBuild` SMALLINT(5) NOT NULL DEFAULT '0'; +UPDATE `gossip_menu` SET `VerifiedBuild`=-1 where `entry` >49999; diff --git a/sql/updates/world/3.3.5/2016_07_07_05_world.sql b/sql/updates/world/3.3.5/2016_07_07_05_world.sql new file mode 100644 index 00000000000..fa6a9ede9f7 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_07_05_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `InhabitType`=1 WHERE `entry` IN (25613, 23665); diff --git a/sql/updates/world/3.3.5/2016_07_09_00_world.sql b/sql/updates/world/3.3.5/2016_07_09_00_world.sql new file mode 100644 index 00000000000..87b6865e8a6 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_09_00_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=29420; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 29420, 0, 0, 31, 0, 3, 15644, 0, 0, 0, 0, "", "Spell 'Wretched Tap' can only be cast by creature 'Wretched Urchin'"); diff --git a/sql/updates/world/3.3.5/2016_07_10_00_world.sql b/sql/updates/world/3.3.5/2016_07_10_00_world.sql new file mode 100644 index 00000000000..06f6e89de2d --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_10_00_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `creature_loot_template` WHERE `Item` IN (5058, 5359, 6083, 33348); +UPDATE `creature_template` SET `lootid`=0 WHERE `entry`=4661; diff --git a/sql/updates/world/3.3.5/2016_07_10_01_world.sql b/sql/updates/world/3.3.5/2016_07_10_01_world.sql new file mode 100644 index 00000000000..11a04a8af30 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_10_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=882 WHERE `ID`=6382; diff --git a/sql/updates/world/3.3.5/2016_07_10_02_world.sql b/sql/updates/world/3.3.5/2016_07_10_02_world.sql new file mode 100644 index 00000000000..57ff1fd9cca --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_10_02_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `creature_loot_template` WHERE `Item` IN (2996, 2997, 4305, 4339, 14048); diff --git a/sql/updates/world/3.3.5/2016_07_10_03_world.sql b/sql/updates/world/3.3.5/2016_07_10_03_world.sql new file mode 100644 index 00000000000..a63b75d0e0f --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_10_03_world.sql @@ -0,0 +1,13 @@ +-- +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=5236 AND `id`=5; +UPDATE `smart_scripts` SET `event_param1`=1200, `comment`="Gordunni Shaman - Friendly Missing 1200 Health - Cast 'Healing Wave'" WHERE `source_type`=0 AND `entryorguid`=5236 AND `id`=4; + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=5240; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(5240,0,0,0,0,0,100,0,0,0,4000,4000,11,20298,64,0,0,0,0,2,0,0,0,0,0,0,0,"Gordunni Warlock - Combat CMC - Cast 'Shadow Bolt'"), +(5240,0,1,0,0,0,100,0,0,0,20000,25000,11,7289,65,0,0,0,0,2,0,0,0,0,0,0,0,"Gordunni Warlock - Combat CMC - Cast 'Shrink'"); + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=5237; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(5237,0,0,0,0,0,100,0,0,0,4000,4000,11,9532,64,0,0,0,0,2,0,0,0,0,0,0,0,"Gordunni Ogre Mage - Combat CMC - Cast 'Lightning Bolt'"), +(5237,0,1,0,2,0,100,1,0,30,0,0,11,6742,1,0,0,0,0,1,0,0,0,0,0,0,0,"Gordunni Ogre Mage - Between 0-30% Health - Cast 'Bloodlust' (No Repeat)"); diff --git a/sql/updates/world/3.3.5/2016_07_10_04_world.sql b/sql/updates/world/3.3.5/2016_07_10_04_world.sql new file mode 100644 index 00000000000..343b4585da9 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_10_04_world.sql @@ -0,0 +1,4 @@ +-- +UPDATE `quest_offer_reward` SET `RewardText`="Ah, a new bundle of hides. I will get to work on these immediately!$B$BThank you, $Gbrother:sister;. You have done me a great service. Here are some coins to pay for your time and travel costs." WHERE `ID`=6362; +UPDATE `quest_offer_reward` SET `RewardText`="This troll tablet must be the \"secret\" that Rin'ji was talking about.$B$BCovered with strange markings, you can not decipher what the tablet says." WHERE `ID`=2742; +UPDATE `page_text` SET `Text`="Mr. Fizzlebub,$B$BThe beverage you gave my associate was a huge success. Not only is the drink strong, causing a huge dulling of wits, it seems to have an addictive quality. I'm sure those who have tried it will crave more.$B$BWe are indebted to you, Crank.$B$BAnd I invite you to come to Shimmering Flats, or to send a confidante, to take advantage of the new gambling opportunities we have here.$B$B--Kravel" WHERE `ID`=440; diff --git a/sql/updates/world/3.3.5/2016_07_10_05_world.sql b/sql/updates/world/3.3.5/2016_07_10_05_world.sql new file mode 100644 index 00000000000..46d0cd341fe --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_10_05_world.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=3397 AND `SourceGroup`=3; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 3, 3397, 0, 0, 29, 0, 3395, 200, 0, 1, 0, 0, "", "Prevent summoning creature Verog the Dervish if already summoned"); + +UPDATE `smart_scripts` SET `action_param2`=6, `action_param3`=20000 WHERE `source_type`=0 AND `entryorguid`=3397 AND `id`=3; +UPDATE `smart_scripts` SET `event_chance`=20 WHERE `source_type`=0 AND `entryorguid`=3397 AND `id`=2; diff --git a/sql/updates/world/3.3.5/2016_07_10_06_world.sql b/sql/updates/world/3.3.5/2016_07_10_06_world.sql new file mode 100644 index 00000000000..7594560ce2a --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_10_06_world.sql @@ -0,0 +1,13 @@ +-- +UPDATE `creature_loot_template` SET `Chance`=100 WHERE `Item`=5877; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=1 AND `SourceEntry`=5877; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(1, 4130, 5877, 0, 0, 8, 0, 1147, 0, 0, 0, 0, 0, "", "Item 'Cracked Silithid Carapace' can be looted if quest 'The Swarm Grows' is taken OR"), +(1, 4131, 5877, 0, 0, 8, 0, 1147, 0, 0, 0, 0, 0, "", "Item 'Cracked Silithid Carapace' can be looted if quest 'The Swarm Grows' is taken OR"), +(1, 4132, 5877, 0, 0, 8, 0, 1147, 0, 0, 0, 0, 0, "", "Item 'Cracked Silithid Carapace' can be looted if quest 'The Swarm Grows' is taken OR"), +(1, 4133, 5877, 0, 0, 8, 0, 1147, 0, 0, 0, 0, 0, "", "Item 'Cracked Silithid Carapace' can be looted if quest 'The Swarm Grows' is taken OR"), +(1, 4130, 5877, 0, 1, 9, 0, 1147, 0, 0, 0, 0, 0, "", "Item 'Cracked Silithid Carapace' can be looted if quest 'The Swarm Grows' is rewarded"), +(1, 4131, 5877, 0, 1, 9, 0, 1147, 0, 0, 0, 0, 0, "", "Item 'Cracked Silithid Carapace' can be looted if quest 'The Swarm Grows' is rewarded"), +(1, 4132, 5877, 0, 1, 9, 0, 1147, 0, 0, 0, 0, 0, "", "Item 'Cracked Silithid Carapace' can be looted if quest 'The Swarm Grows' is rewarded"), +(1, 4133, 5877, 0, 1, 9, 0, 1147, 0, 0, 0, 0, 0, "", "Item 'Cracked Silithid Carapace' can be looted if quest 'The Swarm Grows' is rewarded"); diff --git a/sql/updates/world/3.3.5/2016_07_10_07_world.sql b/sql/updates/world/3.3.5/2016_07_10_07_world.sql new file mode 100644 index 00000000000..03fb6fd6db4 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_10_07_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_loot_template` SET `Chance`=50 WHERE `Item`=33009; diff --git a/sql/updates/world/3.3.5/2016_07_10_09_world.sql b/sql/updates/world/3.3.5/2016_07_10_09_world.sql new file mode 100644 index 00000000000..67e6ce625e9 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_10_09_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `mail_level_reward` WHERE `level`=77 AND `mailTemplateId`=265; +INSERT INTO `mail_level_reward` (`level`, `raceMask`, `mailTemplateId`, `senderEntry`) VALUES +(77, 1791, 265, 33817); diff --git a/sql/updates/world/3.3.5/2016_07_12_00_world.sql b/sql/updates/world/3.3.5/2016_07_12_00_world.sql new file mode 100644 index 00000000000..dd910e8c712 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_12_00_world.sql @@ -0,0 +1,24 @@ +-- +UPDATE `creature` SET `position_x`=-138.96708, `position_y`=2216.8854, `position_z`=35.23352 WHERE `guid`=201066; +UPDATE `creature` SET `position_x`=-139.10365, `position_y`=2206.1518, `position_z`=35.23352 WHERE `guid`=200966; +UPDATE `creature` SET `position_x`=-170.46333, `position_y`=2211.5104, `position_z`=35.23444, `orientation`=0.0573 WHERE `guid`=201107; +UPDATE `creature` SET `position_x`=-173.38168, `position_y`=2205.6416, `position_z`=35.23344, `orientation`=0.0573 WHERE `guid`=201146; +UPDATE `creature` SET `position_x`=-215.74542, `position_y`=2210.8286, `position_z`=35.23345 WHERE `guid`=201080; +UPDATE `creature` SET `spawnMask`=10, `position_x`=-240.49464, `position_y`=2216.4948, `position_z`=42.56450 WHERE `guid`=201090; + +SET @Guid:=86240; +DELETE FROM `creature` WHERE `guid` BETWEEN @Guid AND @Guid+12; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@Guid+0, 37011, 631, 0, 0, 15, 1, 0, 0, -118.939, 2191.25, 32.522, 5.48788, 300, 0, 0, 1575000, 0, 0, 0, 0, 0, 0), +(@Guid+1, 37011, 631, 0, 0, 15, 1, 0, 0, -103.527, 2211.8, 31.0923, 6.22616, 300, 0, 0, 1575000, 0, 0, 0, 0, 0, 0), +(@Guid+2, 37011, 631, 0, 0, 15, 1, 0, 0, -117.35, 2230.88, 32.3868, 0.894935, 300, 0, 0, 1575000, 0, 0, 0, 0, 0, 0), +(@Guid+3, 37011, 631, 0, 0, 15, 1, 0, 0, -172.569, 2217.53, 35.2335, 6.24856, 300, 0, 0, 1575000, 0, 0, 0, 0, 0, 0), +(@Guid+4, 37011, 631, 0, 0, 10, 1, 0, 0, -167.622, 2166.53, 37.9851, 2.00976, 300, 0, 0, 1575000, 0, 0, 0, 0, 0, 0), +(@Guid+5, 37011, 631, 0, 0, 10, 1, 0, 0, -161.425, 2256.88, 37.9853, 4.01646, 300, 0, 0, 1575000, 0, 0, 0, 0, 0, 0), +(@Guid+6, 37012, 631, 0, 0, 10, 1, 0, 1, -198.303, 2215.24, 35.2334, 0.0689005, 300, 0, 0, 1134000, 0, 0, 0, 0, 0, 0), +(@Guid+7, 37012, 631, 0, 0, 10, 1, 0, 1, -197.742, 2207.1, 35.2334, 0.0689005, 300, 0, 0, 1134000, 0, 0, 0, 0, 0, 0), +(@Guid+8, 36724, 631, 0, 0, 10, 1, 0, 0, -212.28, 2222.43, 35.2335, 6.20612, 300, 0, 0, 1260000, 99850, 0, 0, 0, 0, 0), +(@Guid+9, 36724, 631, 0, 0, 10, 1, 0, 0, -213.399, 2199.63, 35.234, 6.1472, 300, 0, 0, 1260000, 99850, 0, 0, 0, 0, 0), +(@Guid+10, 36724, 631, 0, 0, 10, 1, 0, 0, -240.447, 2207.22, 42.5645, 0.00512781, 300, 0, 0, 1260000, 99850, 0, 0, 0, 0, 0), +(@Guid+11, 37012, 631, 0, 0, 10, 1, 0, 1, -303.076, 2225.2, 41.9796, 6.12287, 300, 0, 0, 1134000, 0, 0, 0, 0, 0, 0), +(@Guid+12, 37012, 631, 0, 0, 10, 1, 0, 1, -302.821, 2198.51, 41.9806, 6.26345, 300, 0, 0, 1134000, 0, 0, 0, 0, 0, 0); diff --git a/sql/updates/world/3.3.5/2016_07_12_01_world.sql b/sql/updates/world/3.3.5/2016_07_12_01_world.sql new file mode 100644 index 00000000000..b717b3ad474 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_12_01_world.sql @@ -0,0 +1,8 @@ +-- +SET @Guid:=52664; +DELETE FROM `creature` WHERE `guid` BETWEEN @Guid AND @Guid+3; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@Guid+0, 36811, 631, 0, 0, 10, 1, 0, 1, -568.121, 2225.85, 49.4766, 3.12087, 300, 0, 0, 808800, 91600, 0, 0, 0, 0, 0), +(@Guid+1, 36811, 631, 0, 0, 10, 1, 0, 1, -568.878, 2197.52, 49.4766, 2.93833, 300, 0, 0, 808800, 91600, 0, 0, 0, 0, 0), +(@Guid+2, 36807, 631, 0, 0, 10, 1, 0, 0, -582.666, 2221.75, 49.4766, 3.32411, 300, 0, 0, 808800, 91600, 0, 0, 0, 0, 0), +(@Guid+3, 36807, 631, 0, 0, 10, 1, 0, 0, -583.898, 2200.98, 49.4766, 3.00995, 300, 0, 0, 808800, 91600, 0, 0, 0, 0, 0); diff --git a/sql/updates/world/3.3.5/2016_07_12_02_world.sql b/sql/updates/world/3.3.5/2016_07_12_02_world.sql new file mode 100644 index 00000000000..81991efe3e5 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_12_02_world.sql @@ -0,0 +1,19 @@ +-- +SET @Guid:=91573; +DELETE FROM `creature` WHERE `guid` BETWEEN @Guid AND @Guid+14; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@Guid+0, 37595, 631, 0, 0, 10, 1, 0, 1, 4517.7, 2761.09, 351.101, 0.973106, 300, 0, 0, 1294080, 91600, 0, 0, 0, 0, 0), +(@Guid+1, 37664, 631, 0, 0, 10, 1, 0, 0, 4517.5, 2777.68, 351.101, 5.28887, 300, 0, 0, 1294080, 91600, 0, 0, 0, 0, 0), +(@Guid+2, 37595, 631, 0, 0, 10, 1, 0, 1, 4624.9, 2779.31, 361.163, 2.14492, 300, 0, 0, 1294080, 91600, 0, 0, 0, 0, 0), +(@Guid+3, 37666, 631, 0, 0, 10, 1, 0, 1, 4614.96, 2792.25, 361.163, 5.36904, 300, 0, 0, 2156960, 0, 0, 0, 0, 0, 0), +(@Guid+4, 37595, 631, 0, 0, 10, 1, 0, 1, 4615.84, 2742.08, 361.165, 0.90562, 300, 0, 0, 1294080, 91600, 0, 0, 0, 0, 0), +(@Guid+5, 37595, 631, 0, 0, 10, 1, 0, 1, 4625.39, 2754.32, 361.165, 4.14067, 300, 0, 0, 1294080, 91600, 0, 0, 0, 0, 0), +(@Guid+6, 37662, 631, 0, 0, 15, 1, 0, 1, 4653.53, 2813.54, 361.173, 4.70146, 300, 0, 0, 1725440, 91600, 0, 0, 0, 0, 0), +(@Guid+7, 37665, 631, 0, 0, 15, 1, 0, 1, 4656.46, 2811.54, 361.174, 4.58836, 300, 0, 0, 1725440, 91600, 0, 0, 0, 0, 0), +(@Guid+8, 37666, 631, 0, 0, 15, 1, 0, 1, 4660.2, 2811.7, 361.178, 4.58836, 300, 0, 0, 2156960, 0, 0, 0, 0, 0, 0), +(@Guid+9, 37666, 631, 0, 0, 10, 1, 0, 1, 4573.82, 2865.49, 384.686, 4.73412, 300, 0, 0, 2156960, 0, 0, 0, 0, 0, 0), +(@Guid+10, 37666, 631, 0, 0, 10, 1, 0, 1, 4582.47, 2850.06, 384.686, 2.50044, 300, 0, 0, 2156960, 0, 0, 0, 0, 0, 0), +(@Guid+11, 37666, 631, 0, 0, 10, 1, 0, 1, 4581.6, 2688.63, 384.684, 3.81672, 300, 0, 0, 2156960, 0, 0, 0, 0, 0, 0), +(@Guid+12, 37666, 631, 0, 0, 10, 1, 0, 1, 4573.08, 2674.56, 384.684, 1.65374, 300, 0, 0, 2156960, 0, 0, 0, 0, 0, 0), +(@Guid+13, 37666, 631, 0, 0, 10, 1, 0, 1, 4531.93, 2769.49, 403.983, 3.15507, 300, 0, 0, 2156960, 0, 0, 0, 0, 0, 0), +(@Guid+14, 37666, 631, 0, 0, 10, 1, 0, 1, 4513, 2769.32, 403.983, 6.2581, 300, 0, 0, 2156960, 0, 0, 0, 0, 0, 0); diff --git a/sql/updates/world/3.3.5/2016_07_13_00_world.sql b/sql/updates/world/3.3.5/2016_07_13_00_world.sql new file mode 100644 index 00000000000..4fb83eb1eb7 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_13_00_world.sql @@ -0,0 +1,2 @@ +-- quick typo fix, thanks keader for making me look at the PR and notice this +UPDATE `trinity_string` SET `content_default` = 'VisualizeBoundary warning: Reached fail-safe flood boundary - check if your boundary is unbounded!' WHERE `entry` = 11013; diff --git a/sql/updates/world/3.3.5/2016_07_13_01_world_335.sql b/sql/updates/world/3.3.5/2016_07_13_01_world_335.sql new file mode 100644 index 00000000000..9e20aa59af7 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_13_01_world_335.sql @@ -0,0 +1,44 @@ +-- +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry`=17066; + +SET @GUID := 145538; -- Need 35 +DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+34; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(@GUID , 17066, 1, 0, 0, 1, 1, 11686, 0, 6841.91, -4747.45, 704.4439, -0.506145, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+1 , 17066, 1, 0, 0, 1, 1, 11686, 0, 146.607, -4735.15, 21.4890, -0.5061, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+2 , 17066, 530, 0, 0, 1, 1, 11686, 0, 9379.9, -6791.63, 21.5129, -0.5061, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+3 , 17066, 530, 0, 0, 1, 1, 11686, 0, 9805.37, -7255.5, 32.7329, -0.06981, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+4 , 17066, 530, 0, 0, 1, 1, 11686, 0, 7670.44, -6836.25, 86.1859, -0.506, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+5 , 17066, 0, 0, 0, 1, 1, 11686, 0, 2288.63, 422.085, 40.6129, -0.5061, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+6 , 17066, 0, 0, 0, 1, 1, 11686, 0, -8261.67, -2638.05, 139.8970, 5.77704, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+7 , 17066, 0, 0, 0, 1, 1, 11686, 0, 1002.28, -1432.47, 70.5572, 5.77704, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+8 , 17066, 1, 0, 0, 1, 1, 11686, 0, -4399.5, 2171.79, 18.3212, 5.77704, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+9 , 17066, 530, 0, 0, 1, 1, 11686, 0, -4204.67, -12321.1, 8.6988, 5.77704, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+10, 17066, 530, 0, 0, 1, 1, 11686, 0, 2046.23, 6579.71, 141.7480, 5.77704, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+11, 17066, 530, 0, 0, 1, 1, 11686, 0, 2286.62, 6163.9, 142.9120, 4.79359, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+12, 17066, 1, 0, 0, 1, 1, 11686, 0, -2342.39, -609.245, -1.2698, 5.5, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+13, 17066, 530, 0, 0, 1, 1, 11686, 0, -3045.53, 2393.71, 68.0344, 3.48476, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+14, 17066, 530, 0, 0, 1, 1, 11686, 0, 2917.63, 3677.32, 150.6660, 1.11217, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+15, 17066, 571, 0, 0, 1, 1, 11686, 0, 4470.25, 5621.62, 65.1609, 1.19849, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+16, 17066, 571, 0, 0, 1, 1, 11686, 0, 3776.57, 1488.67, 97.8694, 0.109765, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+17, 17066, 571, 0, 0, 1, 1, 11686, 0, 3370.82, -2150.59, 130.9300, 1.7102, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+18, 17066, 571, 0, 0, 1, 1, 11686, 0, 2584.82, -4363.27, 281.8049, 0.908194, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+19, 17066, 571, 0, 0, 1, 1, 11686, 0, 5276.31, -2779.24, 298.9190, 0.767265, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+20, 17066, 571, 0, 0, 1, 1, 11686, 0, 5515.33, 4863.4, -191.8569, 4.06043, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+21, 17066, 571, 0, 0, 1, 1, 11686, 0, 5539.79, -749.386, 158.5469, 1.77309, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+22, 17066, 571, 0, 0, 1, 1, 11686, 0, 6169.62, -1017.84, 414.6180, 3.12084, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+23, 17066, 530, 0, 0, 1, 1, 11686, 0, -2232.01, -11915.4, 33.0821, 1.82694, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+24, 17066, 1, 0, 0, 1, 1, 11686, 0, -4417.13, 3455.78, 21.4771, 5.72732, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+25, 17066, 530, 0, 0, 1, 1, 11686, 0, 3113, 3717.87, 151.1990, 1.34645, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+26, 17066, 530, 0, 0, 1, 1, 11686, 0, -2502.95, 7522.09, 4.0358, 2.29811, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+27, 17066, 530, 0, 0, 1, 1, 11686, 0, -3965.24, 2039.3, 101.5659, 1.35098, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+28, 17066, 530, 0, 0, 1, 1, 11686, 0, 188.262, 5991.39, 30.2140, 3.08425, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+29, 17066, 571, 0, 0, 1, 1, 11686, 0, 4150.05, 5405.28, 34.3773, 5.08058, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+30, 17066, 571, 0, 0, 1, 1, 11686, 0, 3418.83, -2879.6, 208.6080, 2.79897, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+31, 17066, 571, 0, 0, 1, 1, 11686, 0, 5587.73, -2625.06, 298.9100, 0.0409415, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+32, 17066, 571, 0, 0, 1, 1, 11686, 0, 5357.67, 4855.99, -187.3269, 2.00813, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+33, 17066, 571, 0, 0, 1, 1, 11686, 0, 2477.58, -4905.4, 271.5549, 3.54262, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0), +(@GUID+34, 17066, 571, 0, 0, 1, 1, 11686, 0, 6061.69, -1112.97, 427.2709, 5.40099, 300, 0, 0, 42, 0, 0, 0, 0, 0, 0); + +DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @GUID+0 AND @GUID+34 AND `eventEntry`=1; +INSERT INTO `game_event_creature` SELECT 1, `creature`.`guid` FROM `creature` WHERE `creature`.`guid` BETWEEN @GUID+0 AND @GUID+34; diff --git a/sql/updates/world/3.3.5/2016_07_14_00_world.sql b/sql/updates/world/3.3.5/2016_07_14_00_world.sql new file mode 100644 index 00000000000..5f45b70c942 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_14_00_world.sql @@ -0,0 +1,4 @@ +-- +UPDATE `creature_equip_template` SET `itemID3`=5870 WHERE `CreatureID` IN (701); +UPDATE `smart_scripts` SET `action_param2`=`action_param2`|2 WHERE `source_type`=0 AND `entryorguid`=7856 AND `id`=0; +UPDATE `creature_equip_template` SET `itemID3`=5856 WHERE `CreatureID` IN (1162); diff --git a/sql/updates/world/3.3.5/2016_07_15_00_world.sql b/sql/updates/world/3.3.5/2016_07_15_00_world.sql new file mode 100644 index 00000000000..6168cb638f3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_00_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `quest_template_addon` WHERE `ID` IN (9432, 10752); +INSERT INTO `quest_template_addon` (`ID`, `ExclusiveGroup`) VALUES +(9432, 990); diff --git a/sql/updates/world/3.3.5/2016_07_15_01_world.sql b/sql/updates/world/3.3.5/2016_07_15_01_world.sql new file mode 100644 index 00000000000..2a6466dd1cc --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_loot_template` SET `Chance`=5.7 WHERE `Chance` > 5 AND `Reference`=0 AND `Item` IN (1438, 2959, 2960, 2963, 2964, 2967, 2972, 2975, 3200, 3207, 3213, 3214, 3323, 3643, 4560, 4658, 4662, 4684, 4690, 6506, 6508, 6514, 6515, 6517, 6549, 6566, 6579, 7350, 7351, 9744, 9745, 9750, 9752, 9754, 9759, 9760); diff --git a/sql/updates/world/3.3.5/2016_07_15_02_world.sql b/sql/updates/world/3.3.5/2016_07_15_02_world.sql new file mode 100644 index 00000000000..dfe56542182 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_02_world.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `npc_text` WHERE `ID`=50000; +INSERT INTO `npc_text` (`ID`, `text0_0`, `VerifiedBuild`) VALUES +(50000, "The land has been good to our people, $c. We must be thankful for our good fortune.", -1); + +DELETE FROM `gossip_menu` WHERE `entry`=50000; +INSERT INTO `gossip_menu` (`entry`, `text_id`, `VerifiedBuild`) VALUES (50000, 50000, -1); + +UPDATE `creature_template` SET `gossip_menu_id`=50000 WHERE `entry`=2993; diff --git a/sql/updates/world/3.3.5/2016_07_15_03_world.sql b/sql/updates/world/3.3.5/2016_07_15_03_world.sql new file mode 100644 index 00000000000..b7a19638541 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_03_world.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `spell_target_position` WHERE `ID`=42200; +INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES +(42200, 0, 1, 5010.165039, -4554.938965, 852.146362, 0.883979, 0); + +DELETE FROM `spell_area` WHERE `spell`=42202; +INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES +(42202, 616, 0, 0, 0, 0, 2, 1, 64, 11); diff --git a/sql/updates/world/3.3.5/2016_07_15_04_world.sql b/sql/updates/world/3.3.5/2016_07_15_04_world.sql new file mode 100644 index 00000000000..e45302cde89 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_04_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_text` SET `type`=41 WHERE `entry`=31125 AND `groupid`=1 AND `id`=0; diff --git a/sql/updates/world/3.3.5/2016_07_15_05_world.sql b/sql/updates/world/3.3.5/2016_07_15_05_world.sql new file mode 100644 index 00000000000..a024b62590e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_05_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `InhabitType`=`InhabitType`|8 WHERE `entry` IN (1921, 2674, 5674, 8035, 16236, 16400, 16897, 20251, 20561, 21322, 21413, 14697, 18679, 18695, 23076, 23077, 23876, 23996, 24210, 25284, 25534, 27064, 27430, 27894, 28156, 28366, 29475, 29483, 29613, 29747, 29790, 30236, 30475, 31103, 31280, 31424, 32347, 32795, 32938, 33174, 33184, 33229, 33243, 33272, 33342, 33352, 33353, 33651, 34047, 34050, 34068, 34071, 34096, 34108, 34110, 34121, 34149, 34362, 34363); diff --git a/sql/updates/world/3.3.5/2016_07_15_06_world.sql b/sql/updates/world/3.3.5/2016_07_15_06_world.sql new file mode 100644 index 00000000000..7a5e74a50d3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_06_world.sql @@ -0,0 +1,63 @@ +-- +DELETE FROM `creature` WHERE `id`=2435; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(11004, 2435, 0, 1, 1, 0, 1, -740.538, -525.298, 21.9343, 3.9523, 3600, 0, 0, 1163, 0, 0, 0, 0, 0); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=2435; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(2435, 0, 0, 0, 11, 0, 100, 1, 5000, 5000, 5000, 5000, 53, 0, 2435, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 'Southshore Crier - On Spawn - Start Waypoint'), +(2435, 0, 1, 0, 40, 0, 100, 0, 11, 0, 0, 0, 1, 0, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Southshore Crier - On WP 11 reached - Say Line 0'), +(2435, 0, 2, 3, 40, 0, 100, 0, 12, 2435, 0, 0, 54, 30000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Southshore Crier - On WP 12 reached - Pause Waypoint'), +(2435, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1, 5000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Southshore Crier - On WP 12 reached - Say Line 1'), +(2435, 0, 4, 0, 52, 0, 100, 0, 1, 2435, 0, 0, 1, 2, 5000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Southshore Crier - On Text 1 Over - Say Line 2'), +(2435, 0, 5, 0, 52, 0, 100, 0, 2, 2435, 0, 0, 1, 3, 5000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Southshore Crier - On Text 2 Over - Say line 3'), +(2435, 0, 6, 7, 52, 0, 100, 0, 3, 2435, 0, 0, 1, 4, 500, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Southshore Crier - On Text 3 Over - Say line 4'), +(2435, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 243500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Southshore Crier - On Text 3 Over – Start Script'), +(2435, 0, 8, 9, 52, 0, 100, 0, 4, 2435, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Southshore Crier - On Text 4 Over - Say line 5'), +(2435, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Southshore Crier - On Text 4 Over - Kill self'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=243500; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(243500, 9, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -858.214, -471.187, 13.3554, 0.58591, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 1, 0, 0, 0, 100, 1, 0, 0, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -864.901, -472.452, 13.3564, 0.58591, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 2, 0, 0, 0, 100, 1, 0, 0, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -862.522, -476.413, 13.3564, 0.58591, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 3, 0, 0, 0, 100, 1, 0, 0, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -861.232, -542.347, 9.33058, 0.58591, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 4, 0, 0, 0, 100, 1, 0, 0, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -849.912, -536.618, 10.717, 0.30081, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 5, 0, 0, 0, 100, 1, 0, 0, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -842.906, -536.79, 12.5283, 6.23677, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 6, 0, 0, 0, 100, 1, 0, 0, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -843.281, -526.083, 11.1464, 0.819482, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 7, 0, 0, 0, 100, 1, 1000, 1000, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -848.99, -517.981, 12.1924, 0.819482, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 8, 0, 0, 0, 100, 1, 1000, 1000, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -867.763, -516.11, 11.3357, 0.819482, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 9, 0, 0, 0, 100, 1, 1000, 1000, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -855.221, -518.702, 11.547, 0.819482, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 10, 0, 0, 0, 100, 1, 1000, 1000, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -879.868, -538.859, 7.67274, 0.819482, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 11, 0, 0, 0, 100, 1, 1000, 1000, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -877.552, -561.351, 11.0384, 0.819482, 'Southshore Crier - On Script - Summon Shadowy Assassin'), +(243500, 9, 12, 0, 0, 0, 100, 1, 1000, 1000, 0, 0, 12, 2434, 4, 15000, 0, 0, 0, 8, 0, 0, 0, -840.952, -505.281, 14.4908, 0.819482, 'Southshore Crier - On Script - Summon Shadowy Assassin'); + +DELETE FROM `waypoints` WHERE `entry`=2435; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(2435, 1, -745.74, -530.658, 21.0302, 'Southshore Crier'), +(2435, 2, -749.623, -536.482, 19.8807, 'Southshore Crier'), +(2435, 3, -749.831, -542.323, 19.0502, 'Southshore Crier'), +(2435, 4, -751.399, -545.452, 18.7756, 'Southshore Crier'), +(2435, 5, -751.399, -545.452, 18.7756, 'Southshore Crier'), +(2435, 6, -760.746, -546.233, 18.1427, 'Southshore Crier'), +(2435, 7, -771.772, -545.382, 17.7874, 'Southshore Crier'), +(2435, 8, -787.449, -540.515, 17.7064, 'Southshore Crier'), +(2435, 9, -803.583, -531.155, 15.9356, 'Southshore Crier'), +(2435, 10, -815.697, -524.158, 14.4849, 'Southshore Crier'), +(2435, 11, -824.224, -522.261, 13.1434, 'Southshore Crier'), +(2435, 12, -840.92, -524.92, 11.2505, 'Southshore Crier'), +(2435, 13, -857.888, -532.908, 9.43952, 'Southshore Crier'), +(2435, 14, -870.759, -539.774, 8.12229, 'Southshore Crier'), +(2435, 15, -880.055, -540.594, 7.56718, 'Southshore Crier'), +(2435, 16, -898.525, -541.205, 6.87974, 'Southshore Crier'), +(2435, 17, -901.819, -547.256, 6.87974, 'Southshore Crier'), +(2435, 18, -903.291, -555.882, 6.87974, 'Southshore Crier'); + +DELETE FROM `creature_text` WHERE `entry`=2435; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(2435, 0, 0, "Hear ye! Hear ye! *pant pant* Be warned citizens of Southshore: assassins are heading to our fair town!", 12, 7, 100, 0, 0, 0, 620, 0, "Southshore Crier"), +(2435, 1, 0, "Help me! Help! Assassins in the hills! To arms! To arms!", 14, 7, 100, 22, 0, 0, 619, 0, "Southshore Crier"), +(2435, 2, 0, "Guards to your posts! They must be after the Magistrate again. He must be protected! They could come from any direction!", 12, 7, 100, 1, 0, 0, 621, 0, "Southshore Crier"), +(2435, 3, 0, "The Southshore Crier grabs the back of his neck and his eyes go wide.", 16, 0, 100, 0, 0, 0, 623, 0, "Southshore Crier"), +(2435, 4, 0, "Assassins... save... th... Magistraaa...", 12, 7, 100, 65, 0, 0, 626, 0, "Southshore Crier"), +(2435, 5, 0, "Southshore Crier dies.", 16, 0, 100, 0, 0, 0, 0, 0, "Southshore Crier"); diff --git a/sql/updates/world/3.3.5/2016_07_15_07_world.sql b/sql/updates/world/3.3.5/2016_07_15_07_world.sql new file mode 100644 index 00000000000..b44d7669386 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_07_world.sql @@ -0,0 +1,2 @@ +UPDATE `smart_scripts` SET `action_type`=114, `target_z`=`action_param1`, `action_param1`=0 WHERE `action_type` = 114 AND `action_param1` != 0; +UPDATE `smart_scripts` SET `action_type`=114, `target_y`=`action_param1`, `action_param1`=0 WHERE `action_type` = 46 AND `action_param1` != 0; diff --git a/sql/updates/world/3.3.5/2016_07_15_08_world.sql b/sql/updates/world/3.3.5/2016_07_15_08_world.sql new file mode 100644 index 00000000000..e4ea72c2173 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_08_world.sql @@ -0,0 +1,40 @@ +-- Fix requirement quest for the alliance +UPDATE `quest_template_addon` SET `PrevQuestID`=2278, `NextQuestID`=2439 WHERE `ID`=2279; + +-- Add gossip text to menu + +UPDATE `creature_template` SET `gossip_menu_id`=57000 WHERE `entry`=7918; +DELETE FROM `gossip_menu` WHERE `entry` IN (57000,57001,57002,57003,57004,57005,57006); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(57000,1674),(57001,1675),(57002,1676),(57003,1677),(57004,1678),(57005,1679); + +DELETE FROM `gossip_menu_option` WHERE (`menu_id` BETWEEN 57000 AND 57005) OR (`menu_id` IN (8072)); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(57000,0,0,'What function do you serve?',4054,1,3,57001,0,0,0,'',0,-1), +(57001,0,0,'What are the Plates of Uldum?',4056,1,3,57002,0,0,0,'',0,-1), +(57002,0,0,'Where are the Plates of Uldum?',4057,1,3,57003,0,0,0,'',0,-1), +(57003,0,0,'Excuse me? We\'ve been "rescheduled for visitation"? What does that mean?!',4058,1,3,57004,0,0,0,'',0,-1), +(57004,0,0,'So... what\'s inside Uldum?',4059,1,3,57005,0,0,0,'',0,-1), +(57005,0,0,'I will return when I have the Plates of Uldum.',4060,1,3,0,0,0,0,'',0,-1), +(8072,0,0,'Please take me to the master\'s lair.',17742,1,3,0,0,0,0,'',0,18019); + +-- Migrate NPC's to use SmartAI +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN (7918, 20142); + +-- Create SmartAI +DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid IN (7918, 20142)); +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(7918,0,0,1,62,0,100,0,57005,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stone Watcher of Norgannon - On Gossip Option 0 Selected - Close Gossip'), +(7918,0,1,0,61,0,100,0,0,0,0,0,15,2954,0,0,0,0,0,7,0,0,0,0,0,0,0,'Stone Watcher of Norgannon - On Gossip Option 0 Selected - Quest Credit 2954'), +(20142,0,0,1,62,0,100,0,8072,0,0,0,85,34891,0,0,0,0,0,7,0,0,0,0,0,0,0,'Steward of Time - On Gossip Option 0 Selected - Invoker Cast \'Flight through Caverns\''), +(20142,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Steward of Time - On Gossip Option 0 Selected - Close Gossip'), +(20142,0,2,0,19,0,100,0,10279,0,0,0,85,34891,0,0,0,0,0,7,0,0,0,0,0,0,0,'Steward of Time - On Quest 10279 Taken - Invoker Cast \'Flight through Caverns\''); + +-- Conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` IN (57000,8072); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 14 AND `SourceGroup` IN (8072); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,57000,0,0,0,9,0,2954,0,0,0,0,'','Stone Watcher of Norgannon - Show Gossip Option 0 if player has accepted quest 2954'), +(15,8072,0,0,0,8,0,10279,0,0,0,0,'','Steward of Time - Show Gossip Option 0 if Quest 10279 is not rewarded'), +(14,8072,9977,0,0,8,0,10279,0,0,1,0,'','Steward of Time - Show Gossip Menu text 9977 if Quest 10279 is not rewarded'), +(14,8072,9978,0,0,8,0,10279,0,0,0,0,'','Steward of Time - Show Gossip Menu text 9978 if Quest 10279 is rewarded'); diff --git a/sql/updates/world/3.3.5/2016_07_15_09_world.sql b/sql/updates/world/3.3.5/2016_07_15_09_world.sql new file mode 100644 index 00000000000..576d5317a4c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_09_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template` SET `AllowableRaces`=1101 WHERE `Id` IN (13603, 13757); diff --git a/sql/updates/world/3.3.5/2016_07_15_10_world.sql b/sql/updates/world/3.3.5/2016_07_15_10_world.sql new file mode 100644 index 00000000000..3b9491a1748 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_10_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=52839; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 52839, 0, 0, 29, 0, 28948, 40, 0, 1, 0, 0, "", "Spell Summon Escort Aura cannot be used if NPC Malmortis is within 40 yards."); diff --git a/sql/updates/world/3.3.5/2016_07_15_11_world.sql b/sql/updates/world/3.3.5/2016_07_15_11_world.sql new file mode 100644 index 00000000000..f0d5555af27 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_15_11_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry` IN (65200, 65258, 65265); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 65200, 0, 0, 29, 0, 34320, 5, 0, 0, 0, 0, "", "Spell 'Feed Venomhide Hatchling' (used for quest 'Hungry, Hungry Hatchling') requires NPC 'Venomhide Hatchling' to be within 5 yards"), +(17, 0, 65258, 0, 0, 29, 0, 34320, 5, 0, 0, 0, 0, "", "Spell 'Feed Venomhide Hatchling' (used for quest 'Gorishi Grub') requires NPC 'Venomhide Hatchling' to be within 5 yards"), +(17, 0, 65265, 0, 0, 29, 0, 34320, 5, 0, 0, 0, 0, "", "Spell 'Feed Venomhide Hatchling' (used for quest 'Poached, Scrambled, Or Raw?') requires NPC 'Venomhide Hatchling' to be within 5 yards"); diff --git a/sql/updates/world/3.3.5/2016_07_16_00_world.sql b/sql/updates/world/3.3.5/2016_07_16_00_world.sql new file mode 100644 index 00000000000..0dd86f346e9 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_16_00_world.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry` IN (12699, 31225); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 31225, 0, 0, 29, 0, 17768, 10, 0, 0, 0, 0, "", "Spell 'Shimmering Vessel' (used for quest 'Redeeming the Dead') requires NPC 'Blood Knight Stillblade' to be within 10 yards"), +(17, 0, 12699, 0, 0, 36, 1, 0, 0, 0, 1, 0, 0, "", "Spell 'Summon Screecher Spirit' (used for quest 'Screecher Spirits') can only be used if target is dead AND"), +(17, 0, 12699, 0, 0, 31, 1, 3, 5307, 0, 0, 0, 0, "", "Spell 'Summon Screecher Spirit' (used for quest 'Screecher Spirits') can only be used if target is NPC 'Vale Screecher'"), +(17, 0, 12699, 0, 1, 36, 1, 0, 0, 0, 1, 0, 0, "", "Spell 'Summon Screecher Spirit' (used for quest 'Screecher Spirits') can only be used if target is dead AND"), +(17, 0, 12699, 0, 1, 31, 1, 3, 5308, 0, 0, 0, 0, "", "Spell 'Summon Screecher Spirit' (used for quest 'Screecher Spirits') can only be used if target is NPC 'Rogue Vale Screecher'"); diff --git a/sql/updates/world/3.3.5/2016_07_16_01_world.sql b/sql/updates/world/3.3.5/2016_07_16_01_world.sql new file mode 100644 index 00000000000..25b0dd9a071 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_16_01_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `reference_loot_template` WHERE `Entry`=24701 AND `Item`=6661; diff --git a/sql/updates/world/3.3.5/2016_07_16_02_world.sql b/sql/updates/world/3.3.5/2016_07_16_02_world.sql new file mode 100644 index 00000000000..ab625246ea7 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_16_02_world.sql @@ -0,0 +1,6 @@ +SET @Guid:=86240; +UPDATE `creature` SET `spawntimesecs`=86400 WHERE `guid` BETWEEN @Guid AND @Guid+12; +SET @Guid:=52664; +UPDATE `creature` SET `spawntimesecs`=86400 WHERE `guid` BETWEEN @Guid AND @Guid+4; +SET @Guid:=91573; +UPDATE `creature` SET `spawntimesecs`=86400 WHERE `guid` BETWEEN @Guid AND @Guid+14; diff --git a/sql/updates/world/3.3.5/2016_07_16_03_world.sql b/sql/updates/world/3.3.5/2016_07_16_03_world.sql new file mode 100644 index 00000000000..986a96a6d57 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_16_03_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_hun_roar_of_sacrifice'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(53480, 'spell_hun_roar_of_sacrifice'); diff --git a/sql/updates/world/3.3.5/2016_07_16_04_world.sql b/sql/updates/world/3.3.5/2016_07_16_04_world.sql new file mode 100644 index 00000000000..9bdba2e4deb --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_16_04_world.sql @@ -0,0 +1,2 @@ +-- Fix Flightmaster Runetog Wildhammer, Shatter Point +UPDATE `gossip_menu_option` SET `option_id` = 4, `npc_option_npcflag` = 8192 WHERE `menu_id` = 8095; diff --git a/sql/updates/world/3.3.5/2016_07_16_05_world_335.sql b/sql/updates/world/3.3.5/2016_07_16_05_world_335.sql new file mode 100644 index 00000000000..6fd17188e7e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_16_05_world_335.sql @@ -0,0 +1,3 @@ +DELETE FROM `creature` WHERE `guid`=52668; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES +(52668, 10979, 0, 1, 1, 2709, 0, 2109.13, -1829.79, 58.1995, 3.9185, 315, 3, 0, 2964, 0, 1, 0, 0, 0, 0); diff --git a/sql/updates/world/3.3.5/2016_07_16_06_world.sql b/sql/updates/world/3.3.5/2016_07_16_06_world.sql new file mode 100644 index 00000000000..a8e9510c965 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_16_06_world.sql @@ -0,0 +1 @@ +UPDATE `command` SET `help`='Syntax: .cooldown [#spell_id]\r\n\r\nRemove all (if spell_id not provided) or #spel_id spell cooldown from selected character or their pet or you (if no selection).' WHERE `name`='cooldown'; diff --git a/sql/updates/world/3.3.5/2016_07_16_07_world.sql b/sql/updates/world/3.3.5/2016_07_16_07_world.sql new file mode 100644 index 00000000000..75af8add3d1 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_16_07_world.sql @@ -0,0 +1,5 @@ +-- enable 2 new spell scripts: spell_hallow_end_candy & spell_hallow_end_candy_pirate +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_hallow_end_candy','spell_hallow_end_candy_pirate'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(24930,'spell_hallow_end_candy'), +(24926,'spell_hallow_end_candy_pirate'); diff --git a/sql/updates/world/3.3.5/2016_07_16_08_world.sql b/sql/updates/world/3.3.5/2016_07_16_08_world.sql new file mode 100644 index 00000000000..af4db3f1567 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_16_08_world.sql @@ -0,0 +1,8 @@ +-- +UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID` IN (12692, 12695); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (19, 20) AND `SourceEntry` IN (12692, 12695); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19, 0, 12692, 0, 0, 43, 0, 12582, 0, 0, 0, 0, 0, "", "Quest 'Return of the Lich Hunter' can be accepted if daily quest 'Frenzyheart Champion' hsa been turned in"), +(20, 0, 12692, 0, 0, 43, 0, 12582, 0, 0, 0, 0, 0, "", "Quest mark for 'Return of the Lich Hunter' can be seen if daily quest 'Frenzyheart Champion' hsa been turned in"), +(19, 0, 12695, 0, 0, 43, 0, 12689, 0, 0, 0, 0, 0, "", "Quest 'Return of the Friendly Dryskin' can be accepted if daily quest 'Hand of the Oracles' has been turned in"), +(20, 0, 12695, 0, 0, 43, 0, 12689, 0, 0, 0, 0, 0, "", "Quest mark for 'Return of the Friendly Dryskin' can be accepted if daily quest 'Hand of the Oracles' has been turned in"); diff --git a/sql/updates/world/3.3.5/2016_07_18_00_world.sql b/sql/updates/world/3.3.5/2016_07_18_00_world.sql new file mode 100644 index 00000000000..7682fe310e3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_18_00_world.sql @@ -0,0 +1,13 @@ +-- +UPDATE `creature` SET `modelid`=0 WHERE `id` IN (36,46,48,92,95,98,114,115,117,121); +UPDATE `creature_addon` SET `bytes2`=257 WHERE `guid` IN (79666,79689); +UPDATE `creature_addon` SET `bytes2`=4097 WHERE `guid` IN (80190,81107); +DELETE FROM `creature_addon` WHERE `guid` IN (4312,80149,80152,80154,80158,80168,80169,80181,80182,80187, +80189,80196,80200,80205,80206,80216,80218,80222,80226,80230,80231,80237,80238,80246,80254,80255,79664,79671, +79674,79704,79730,79731,79819,79861,79864,79865,120682,120685,120686,120687,120692,80419); +UPDATE `creature` SET `modelid`=0 WHERE `id`=2345; +UPDATE `creature_addon` SET `bytes2`=4097 WHERE `guid`=16127; +UPDATE `creature` SET `modelid`=0 WHERE `id`=2346; +UPDATE `creature_addon` SET `bytes2`=4097 WHERE `guid`=16164; +UPDATE `creature` SET `modelid`=0 WHERE `id`=2458; +UPDATE `creature_addon` SET `bytes2`=4097 WHERE `guid`=14480; diff --git a/sql/updates/world/3.3.5/2016_07_18_01_world.sql b/sql/updates/world/3.3.5/2016_07_18_01_world.sql new file mode 100644 index 00000000000..47425de1744 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_18_01_world.sql @@ -0,0 +1,40 @@ +DELETE FROM `waypoints` WHERE `entry`=17893; + +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(17893, 1, -190.9255, -796.3895, 43.79932, 'Naturalist Bite'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=17893 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=1789300 AND `source_type`=9; +DELETE FROM `smart_scripts` WHERE `entryorguid`=17957 AND `source_type`=0 AND `id`=3; +DELETE FROM `smart_scripts` WHERE `entryorguid`=17960 AND `source_type`=0 AND `id`=12; +DELETE FROM `smart_scripts` WHERE `entryorguid`=17961 AND `source_type`=0 AND `id`=16; + +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(17957, 0, 3, 0, 54, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 17893, 0, 0, 0, 0, 0, 0, 'Coilfang Champion - On Just Summoned - Start Attack'), +(17960, 0, 12, 0, 54, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Coilfang Soothsayer - On Just Summoned - Start Attack'), +(17961, 0, 16, 0, 54, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Coilfang Enchantress - On Just Summoned - Start Attack'), +(17893, 0, 0, 1, 62, 0, 100, 0, 7520, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - On Gossip Select - Close Gossip'), +(17893, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 33, 17893, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - Linked with Previous Event - Give Kill Credit'), +(17893, 0, 2, 0, 10, 1, 100, 0, 1, 15, 15000, 90000, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - On Los OOC - Say Line 0 (Phase 1)'), +(17893, 0, 3, 0, 62, 0, 100, 1, 7520, 0, 0, 0, 80, 1789300, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - On Gossip Select - Run Script'), +(17893, 0, 4, 5, 40, 0, 100, 1, 1, 17893, 0, 0, 66, 0, 0, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - On Reached WP1 - Set Orientation'), +(17893, 0, 5, 6, 61, 0, 100, 1, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - On Reached WP1 - Set Home Position'), +(17893, 0, 6, 7, 61, 0, 100, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - On Reached WP1 - Say Line 1'), +(17893, 0, 7, 8, 61, 0, 100, 1, 0, 0, 0, 0, 12, 17957, 8, 0, 0, 0, 0, 8, 0, 0, 0, -117.1674, -750.9227, 37.04787, 3.476038, 'Naturalist Bite - On Reached WP1 - Summon Coilfang Champion'), +(17893, 0, 8, 9, 61, 0, 100, 1, 0, 0, 0, 0, 12, 17961, 8, 0, 0, 0, 0, 8, 0, 0, 0, -117.0361, -754.6592, 37.45506, 0.3444065, 'Naturalist Bite - On Reached WP1 - Summon Coilfang Enchantress'), +(17893, 0, 9, 10, 61, 0, 100, 1, 0, 0, 0, 0, 12, 17960, 8, 0, 0, 0, 0, 8, 0, 0, 0, -119.7346, -750.3145, 37.0497, 0.611494, 'Naturalist Bite - On Reached WP1 - Summon Coilfang Soothsayer'), +(17893, 0, 10, 11, 61, 0, 100, 1, 0, 0, 0, 0, 11, 34906, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - On Reached WP1 - Cast Mark of Bite'), +(17893, 0, 11, 0, 61, 0, 100, 1, 0, 0, 0, 0, 11, 34906, 2, 0, 0, 0, 0, 21, 100, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - On Reached WP1 - Cast Mark of Bite'), +(17893, 0, 12, 0, 11, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - On Spawn - Set Phase 1'), +(1789300, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - Script - Set Phase 0'), +(1789300, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 9, 0, 0, 0, 0, 0, 0, 20, 182094, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - Script - Activate GO'), +(1789300, 9, 2, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 2, 113, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - Script - Start WP'), +(1789300, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - Script - Set NPC Flags'), +(1789300, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - Script - Set Unit Flags'), +(1789300, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 0, 17893, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Naturalist Bite - Script - Start WP'); + +DELETE FROM `creature_text` WHERE `entry`=17893; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(17893, 0, 0, 'Hey! Over here! Yeah, over here... I\'m in this cage!!!', 14, 0, 100, 0, 0, 0, 14668, 0, 'Naturalist Bite'), +(17893, 1, 0, 'Uh oh! It would appear that all of the noise you\'ve been making has attracted some unwanted attention!', 12, 0, 100, 0, 0, 0, 14575, 0, 'Naturalist Bite'); + diff --git a/sql/updates/world/3.3.5/2016_07_19_00_world.sql b/sql/updates/world/3.3.5/2016_07_19_00_world.sql new file mode 100644 index 00000000000..ae623f25db0 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_19_00_world.sql @@ -0,0 +1,20 @@ +-- +DROP TABLE IF EXISTS `quest_mail_sender`; +CREATE TABLE `quest_mail_sender` +( + `QuestId` INT(5) UNSIGNED NOT NULL DEFAULT 0, + `RewardMailSenderEntry` INT(5) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (`QuestId`) +); + +INSERT INTO `quest_mail_sender` (`QuestId`, `RewardMailSenderEntry`) VALUES +(8729, 11811), -- Quest The Wrath of Neptulon sends mail from Narain Soothfancy +(10588, 18166), -- Quest The Cipher of Damnation sends mail from Archmage Khadgar +(12085, 5885), -- Quest A Letter for Home (Horde) sends mail from Deino +(12067, 2708), -- Quest A Letter for Home (Alliance) sends mail from Archmage Malin +(12422, 27102), -- Quest Tactical Clemency sends mail from Gorgonna +(12711, 28930), -- Quest Abandoned Mail sends mail from Dansel Adams +(22817, 10967), -- Quest Back to the Orphanage (Blood Elf) sends mail from Blood Elf Orphan +(22818, 10966), -- Quest Back to the Orphanage (Draenei) sends mail from Draenei Orphan +(28879, 33533), -- Quest Back To The Orphanage (Oracle) sends mail from Oracle Orphan +(28880, 33532); -- Quest Back To The Orphanage (Wolvar) sends mail from Wolvar Orphan diff --git a/sql/updates/world/3.3.5/2016_07_19_01_world.sql b/sql/updates/world/3.3.5/2016_07_19_01_world.sql new file mode 100644 index 00000000000..02d522f183c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_19_01_world.sql @@ -0,0 +1,21 @@ +DELETE FROM `creature` WHERE `guid`=113330; + +-- Pathing for Deathguard Molder Entry: 27320 'TDB FORMAT' +SET @NPC := 113329; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=3242.083,`position_y`=-683.1053,`position_z`=166.9898 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1 ,3234.214,-662.9944,166.701,0,60000,0,0,100,0), +(@PATH,2 ,3242.083,-683.1053,166.9898,0,0,0,0,100,0), +(@PATH,3 ,3244.742,-697.8635,167.0145,0,0,0,0,100,0), +(@PATH,4 ,3248.017,-702.5844,167.3793,0,0,0,0,100,0), +(@PATH,5 ,3252.101,-710.5942,167.6412,0,0,0,0,100,0), +(@PATH,6 ,3257.548,-721.5476,168.0425,0,0,0,0,100,0), +(@PATH,7 ,3260.511,-729.2581,168.5909,0,60000,0,0,100,0), +(@PATH,8 ,3257.548,-721.5476,168.0425,0,0,0,0,100,0), +(@PATH,9 ,3252.101,-710.5942,167.6412,0,0,0,0,100,0), +(@PATH,10,3248.017,-702.5844,167.3793,0,0,0,0,100,0), +(@PATH,11,3245.563,-698.4318,167.1446,0,0,0,0,100,0); diff --git a/sql/updates/world/3.3.5/2016_07_19_02_world.sql b/sql/updates/world/3.3.5/2016_07_19_02_world.sql new file mode 100644 index 00000000000..782178a66f8 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_19_02_world.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `creature_template_addon` WHERE `entry`=27267; +INSERT INTO `creature_template_addon` (`entry`, `bytes1`, `bytes2`, `emote`) VALUES (27267, 256, 257, 233); +UPDATE `creature_template` SET `unit_flags`=32768 WHERE `entry`=27267; +UPDATE `gossip_menu_option` SET `option_id`=3, `npc_option_npcflag`=128 WHERE `menu_id`=9487; diff --git a/sql/updates/world/3.3.5/2016_07_19_03_world.sql b/sql/updates/world/3.3.5/2016_07_19_03_world.sql new file mode 100644 index 00000000000..147095d7ea0 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_19_03_world.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=11443 AND `source_type`=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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(11443, 0, 0, 0, 4, 0, 50, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Gordok Ogre-Mage - On Aggro - Say Line 0"), +(11443, 0, 1, 0, 9, 0, 100, 0, 0, 40, 2400, 3800, 11, 20823, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Gordok Ogre-Mage - Between 0-40 Range - Cast 20823"), +(11443, 0, 2, 0, 0, 0, 100, 0, 5000, 12000, 35000, 45000, 11, 6742, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Gordok Ogre-Mage - In Combat - Cast 6742"); diff --git a/sql/updates/world/3.3.5/2016_07_19_04_world.sql b/sql/updates/world/3.3.5/2016_07_19_04_world.sql new file mode 100644 index 00000000000..449999b41e1 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_19_04_world.sql @@ -0,0 +1,4 @@ +-- +UPDATE `smart_scripts` SET `action_type`=11, `target_type`=7, target_param1=0 WHERE `entryorguid`=11832 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `action_param2`=0, `target_type`=7 WHERE `entryorguid`=30630 AND `source_type`=0 AND `id`=0; + diff --git a/sql/updates/world/3.3.5/2016_07_19_05_world.sql b/sql/updates/world/3.3.5/2016_07_19_05_world.sql new file mode 100644 index 00000000000..7363465131c --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_19_05_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `trainer_type`=2 WHERE `entry`=33639; diff --git a/sql/updates/world/3.3.5/2016_07_19_06_world.sql b/sql/updates/world/3.3.5/2016_07_19_06_world.sql new file mode 100644 index 00000000000..44fad2ffd2a --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_19_06_world.sql @@ -0,0 +1,15 @@ +-- +SET @Drak := 26919; + +-- Insert missing creature text for NPC 26919 Drak'aguul +DELETE FROM `creature_text` WHERE `entry` = @Drak; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(@Drak, 0, 0, 'Dey be stronger then I expect mon, attack dem!', 12, 0, 100, 0, 0, 0, 28896, 0, "Drak'aguul - Between 0-30% Health - Call For Help"), +(@Drak, 1, 0, 'Wait for me orders, I handle dis myself!', 12, 0, 100, 0, 0, 0, 28897, 0, "Drak'aguul - On Aggro - Order soldiers to wait"); + +UPDATE `smart_scripts` SET `link`= 3 WHERE `entryorguid`= @Drak AND `source_type`= 0 AND `id`= 0; + +DELETE FROM `smart_scripts` WHERE `entryorguid`= @Drak AND `source_type`= 0 AND `id` IN (3,4); +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Drak, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Drak'aguul - On Aggro - Say Line 1"), +(@Drak, 0, 4, 0, 4, 0, 100, 0, 0, 0, 0, 0, 1, 0, 10000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Drak'aguul - On Aggro - Say Line 2"); diff --git a/sql/updates/world/3.3.5/2016_07_19_07_world.sql b/sql/updates/world/3.3.5/2016_07_19_07_world.sql new file mode 100644 index 00000000000..6fafc733431 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_19_07_world.sql @@ -0,0 +1,79 @@ +-- +DELETE FROM `areatrigger_scripts` WHERE `entry` IN (4950); +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES +(4950,'SmartTrigger'); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (4950) AND `source_type`=2; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(4950,2,0,1,46,0,100,0,4950,0,0,0,45,1,1,0,0,0,0,10,118282,26605,0,0,0,0,0,"On Trigger - Set Data"); + +-- Anub'ar Underlord SAI +SET @GUID := -118282; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=26605; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GUID AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@GUID,0,0,1,11,0,100,1,0,0,0,0,11,34426,19,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Underlord - On Respawn - Cast 'Greater Invisibility' (No Repeat)"), +(@GUID,0,1,0,61,0,100,0,0,0,0,0,18,128,0,0,0,0,0,0,0,0,0,0,0,0,0,"Anub'ar Underlord - On Respawn - Set Flag Not Attackable (No Repeat)"), +(@GUID,0,2,0,38,0,100,1,1,1,120000,120000,80,2660500,2,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Underlord - On Data Set 1 1 - Run Script (No Repeat)"), +(@GUID,0,3,0,25,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Underlord - On Respawn - Set Reactstate Passive"); + +-- Anub'ar Underlord SAI +SET @ENTRY := 26605; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,9,0,100,0,0,8,12500,17800,11,51681,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Underlord - Within 0-8 Range - Cast 'Rearing Stomp'"); + +DELETE FROM `creature_text` WHERE `entry`=26605; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES +(26605, 0, 0, 'You have made a fatal mistake, mortal... There isss no essscape...', 12, 0, 100, 0, 0, 0, 'Anub''ar Underlord', 25860); + +-- Actionlist SAI +SET @ENTRY := 2660500; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,28,34426,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Underlord - On Script - Remove Aura 'Greater Invisibility'"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,1,0,10000,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Underlord - On Script - Say Line 0"), +(@ENTRY,9,2,0,0,0,100,0,0,0,0,0,12,26606,2,30000,0,0,0,8,0,0,0,3703.85,2164.53,37.2352,3.81021,"Anub'ar Underlord - On Script - Summon Creature 'Anub'ar Slayer'"), +(@ENTRY,9,3,0,0,0,100,0,0,0,0,0,12,26402,2,30000,0,0,0,8,0,0,0,3709.76,2158.12,37.2493,3.19637,"Anub'ar Underlord - On Script - Summon Creature 'Anub'ar Ambusher'"), +(@ENTRY,9,4,0,0,0,100,0,100,100,0,0,45,1,1,0,0,0,0,9,0,0,2,0,0,0,0,"Anub'ar Underlord - On Script - Set Data 1 1"), +(@ENTRY,9,5,0,0,0,100,0,4000,4000,0,0,45,1,1,0,0,0,0,10,98533,26653,0,0,0,0,0,"Anub'ar Underlord - On Script - Set Data 1 1"), +(@ENTRY,9,6,0,0,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Underlord - On Script - Set Reactstate Aggressive"), +(@ENTRY,9,7,0,0,0,100,0,0,0,0,0,45,1,2,0,0,0,0,9,0,0,2,0,0,0,0,"Anub'ar Underlord - On Script - Set Data 1 2"), +(@ENTRY,9,8,0,0,0,100,0,0,0,0,0,38,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Underlord - On Script - Set In Combat With Zone"); + +-- Kilix the Unraveler SAI +SET @ENTRY := 26653; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,38,0,100,0,1,1,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Kilix the Unraveler - On Data Set 1 1 - Run Script"), +(@ENTRY,0,1,0,25,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kilix the Unraveler - On Reset - Set Reactstate Passive"); + +-- Actionlist SAI +SET @ENTRY := 2665300; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,1,0,25000,0,0,0,0,1,0,0,0,0,0,0,0,"Kilix the Unraveler - On Script - Say Line 0"), +(@ENTRY,9,1,0,0,0,100,0,8000,8000,0,0,49,0,0,0,0,0,0,10,118282,26605,0,0,0,0,0,"Kilix the Unraveler - On Script - Start Attacking"); + +DELETE FROM `creature_text` WHERE `entry`=26653; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextId`) VALUES +(26653, 0, 0, 'Betrayers! The day of reckoning comes and with it comes your end! See then if your Lich King saves you from the ancient one\'s judgement! Now you die!', 12, 0, 100, 0, 0, 0, 'Kilix the Unraveler', 25861); + +-- Anub'ar Slayer SAI +SET @ENTRY := 26606; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,38,0,100,0,1,1,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Slayer - On Data Set 1 1 - Set Reactstate Passive"), +(@ENTRY,0,1,0,38,0,100,0,1,2,0,0,49,0,0,0,0,0,0,10,98533,26653,0,0,0,0,0,"Anub'ar Ambusher - On Data Set 1 2 - Start Attacking"); + +-- Anub'ar Ambusher SAI +SET @ENTRY := 26402; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,4,0,100,1,0,0,0,0,11,50347,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Ambusher - On Aggro - Cast 'Rush' (No Repeat)"), +(@ENTRY,0,1,0,38,0,100,0,1,1,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anub'ar Ambusher - On Data Set 1 1 - Set Reactstate Passive"), +(@ENTRY,0,2,0,38,0,100,0,1,2,0,0,49,0,0,0,0,0,0,10,98533,26653,0,0,0,0,0,"Anub'ar Ambusher - On Data Set 1 2 - Start Attacking"); diff --git a/sql/updates/world/3.3.5/2016_07_20_00_world_335.sql b/sql/updates/world/3.3.5/2016_07_20_00_world_335.sql new file mode 100644 index 00000000000..2bcc4f42bf2 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_20_00_world_335.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature` SET `position_z`= -265.613 WHERE `guid`= 24440 AND `id`= 14528; diff --git a/sql/updates/world/3.3.5/2016_07_20_01_world.sql b/sql/updates/world/3.3.5/2016_07_20_01_world.sql new file mode 100644 index 00000000000..47274168c85 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_20_01_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`= 11443 AND `source_type`= 0 AND `id`= 3; +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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(11443,0,3,0,0,0,100,0,1000,3000,9000,9000,11,20822,0,0,0,0,0,2,0,0,0,0,0,0,0,"Gordok Ogre-Mage - IC - Cast 'Frostbolt'"); diff --git a/sql/updates/world/3.3.5/2016_07_20_02_world.sql b/sql/updates/world/3.3.5/2016_07_20_02_world.sql new file mode 100644 index 00000000000..125fa3bd8c8 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_20_02_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `smart_scripts` SET `event_type`=0, `event_flags`=1, `event_param1`=10000,`event_param2`=10000, `action_param2`=0 WHERE `entryorguid`= 26919 AND `source_type`= 0 AND `id`= 4; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid` IN (4950) AND `source_type`=2; diff --git a/sql/updates/world/3.3.5/2016_07_22_00_world.sql b/sql/updates/world/3.3.5/2016_07_22_00_world.sql new file mode 100644 index 00000000000..9f2158cb723 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_22_00_world.sql @@ -0,0 +1,2 @@ +-- Gurgleboggle's Bauble +UPDATE `gameobject` SET `spawntimesecs` = 2 WHERE `id` IN (187885,187886); diff --git a/sql/updates/world/3.3.5/2016_07_25_00_world.sql b/sql/updates/world/3.3.5/2016_07_25_00_world.sql new file mode 100644 index 00000000000..3006fbde68d --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_25_00_world.sql @@ -0,0 +1,15 @@ +DELETE FROM `spell_dbc` WHERE `Id`=31338; +INSERT INTO `spell_dbc` (`Id`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `Stances`, `StancesNot`, `Targets`, `CastingTimeIndex`, `AuraInterruptFlags`, `ProcFlags`, `ProcChance`, `ProcCharges`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `RangeIndex`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `Effect1`, `Effect2`, `Effect3`, `EffectDieSides1`, `EffectDieSides2`, `EffectDieSides3`, `EffectRealPointsPerLevel1`, `EffectRealPointsPerLevel2`, `EffectRealPointsPerLevel3`, `EffectBasePoints1`, `EffectBasePoints2`, `EffectBasePoints3`, `EffectMechanic1`, `EffectMechanic2`, `EffectMechanic3`, `EffectImplicitTargetA1`, `EffectImplicitTargetA2`, `EffectImplicitTargetA3`, `EffectImplicitTargetB1`, `EffectImplicitTargetB2`, `EffectImplicitTargetB3`, `EffectRadiusIndex1`, `EffectRadiusIndex2`, `EffectRadiusIndex3`, `EffectApplyAuraName1`, `EffectApplyAuraName2`, `EffectApplyAuraName3`, `EffectAmplitude1`, `EffectAmplitude2`, `EffectAmplitude3`, `EffectMultipleValue1`, `EffectMultipleValue2`, `EffectMultipleValue3`, `EffectItemType1`, `EffectItemType2`, `EffectItemType3`, `EffectMiscValue1`, `EffectMiscValue2`, `EffectMiscValue3`, `EffectMiscValueB1`, `EffectMiscValueB2`, `EffectMiscValueB3`, `EffectTriggerSpell1`, `EffectTriggerSpell2`, `EffectTriggerSpell3`, `EffectSpellClassMaskA1`, `EffectSpellClassMaskA2`, `EffectSpellClassMaskA3`, `EffectSpellClassMaskB1`, `EffectSpellClassMaskB2`, `EffectSpellClassMaskB3`, `EffectSpellClassMaskC1`, `EffectSpellClassMaskC2`, `EffectSpellClassMaskC3`, `MaxTargetLevel`, `SpellFamilyName`, `SpellFamilyFlags1`, `SpellFamilyFlags2`, `SpellFamilyFlags3`, `MaxAffectedTargets`, `DmgClass`, `PreventionType`, `DmgMultiplier1`, `DmgMultiplier2`, `DmgMultiplier3`, `AreaGroupId`, `SchoolMask`, `Comment`) VALUES +(31338, 0, 0, 384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 3, 12, 0, -1, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18120, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 'Summon Ogre'); + +UPDATE `creature_template` SET `unit_flags`=33024 WHERE `entry`=30718; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=3088400 AND `source_type`=9 AND `id`=2; +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(3088400, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 19, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Slumbering Mjordin - On Script - Remove Unit Flags - Immune to pc-npc'); + +UPDATE `smart_scripts` SET `target_type`=10, `target_param1`=85139, `target_param2`=33518 WHERE `entryorguid`=33707 AND `source_type`=0 AND `id`=9 AND `link`=10; + +UPDATE `creature_template` SET `flags_extra`=2 WHERE `entry`=18206; + +UPDATE `item_template` SET `FlagsExtra`=0 WHERE `entry`=7666; diff --git a/sql/updates/world/3.3.5/2016_07_28_00_world.sql b/sql/updates/world/3.3.5/2016_07_28_00_world.sql new file mode 100644 index 00000000000..89d9d616efb --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_28_00_world.sql @@ -0,0 +1,53 @@ +SET @ATTUMEN_UNMOUNTED := 15550; +SET @ATTUMEN_MOUNTED := 16152; +SET @MIDNIGHT := 16151; +SET @GMIDNIGHT := 135159; + +DELETE FROM `creature_text` WHERE `entry` IN (@MIDNIGHT, @ATTUMEN_UNMOUNTED, @ATTUMEN_MOUNTED); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(@ATTUMEN_UNMOUNTED, 0, 0, 'It was... inevitable.', 14, 0, 100, 0, 0, 9169, 13460, 0, 'attumen SAY_KILL1'), +(@ATTUMEN_UNMOUNTED, 0, 1, 'Another trophy to add to my collection!', 14, 0, 100, 0, 0, 9300, 15333, 0,'attumen SAY_KILL2'), +(@ATTUMEN_UNMOUNTED, 1, 0, 'Such easy sport.', 14, 0, 100, 0, 0, 9170, 0, 0,'attumen SAY_RANDOM1'), +(@ATTUMEN_UNMOUNTED, 1, 1, 'Amateurs! Do not think you can best me! I kill for a living.', 14, 0, 100, 0, 0, 9304, 0, 0, 'attumen SAY_RANDOM2'), +(@ATTUMEN_UNMOUNTED, 2, 0, 'Weapons are merely a convenience for a warrior of my skill!', 14, 0, 100, 0, 0, 9166, 13490, 0, 'attumen SAY_DISARMED'), +(@ATTUMEN_UNMOUNTED, 3, 0, 'Well done, Midnight!', 14, 0, 100, 0, 0, 9173, 15334, 0, 'attumen SAY_MIDNIGHT_KILL'), +(@ATTUMEN_UNMOUNTED, 4, 0, 'Cowards! Wretches!', 14, 0, 100, 0, 0, 9167, 13459, 0, 'attumen SAY_APPEAR1'), +(@ATTUMEN_UNMOUNTED, 4, 1, 'Who dares attack the steed of the Huntsman?', 14, 0, 100, 0, 0, 9298, 15378, 0, 'attumen SAY_APPEAR2'), +(@ATTUMEN_UNMOUNTED, 4, 2, 'Perhaps you would rather test yourselves against a more formidable opponent?!', 14, 0, 100, 0, 0, 9299, 15379, 0, 'attumen SAY_APPEAR3'), +(@ATTUMEN_UNMOUNTED, 5, 0, 'Come Midnight, let\'s disperse this petty rabble!', 14, 0, 100, 0, 0, 9168, 13456, 0, 'attumen SAY_MOUNT'), + +(@ATTUMEN_MOUNTED, 0, 0, 'It was... inevitable.', 14, 0, 100, 0, 0, 9169, 13460, 0, 'attumen SAY_KILL1'), +(@ATTUMEN_MOUNTED, 0, 1, 'Another trophy to add to my collection!', 14, 0, 100, 0, 0, 9300, 15333, 0,'attumen SAY_KILL2'), +(@ATTUMEN_MOUNTED, 1, 0, 'Such easy sport.', 14, 0, 100, 0, 0, 9170, 0, 0,'attumen SAY_RANDOM1'), +(@ATTUMEN_MOUNTED, 1, 1, 'Amateurs! Do not think you can best me! I kill for a living.', 14, 0, 100, 0, 0, 9304, 0, 0, 'attumen SAY_RANDOM2'), +(@ATTUMEN_MOUNTED, 2, 0, 'Weapons are merely a convenience for a warrior of my skill!', 14, 0, 100, 0, 0, 9166, 13490, 0, 'attumen SAY_DISARMED'), +(@ATTUMEN_MOUNTED, 3, 0, 'Always knew... someday I would become... the hunted.', 14, 0, 100, 0, 0, 9165, 13462, 0, 'attumen SAY_DEATH'), + +(@MIDNIGHT, 0, 0, '%s calls for her master!', 16, 0, 100, 0, 0, 0, 13439, 0, 'midnight EMOTE_CALL_ATTUMEN'), +(@MIDNIGHT, 1, 0, '%s rushes to her master\'s aid.', 16, 0, 100, 0, 0, 0, 13455, 0, 'midnight EMOTE_MOUNT_UP'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` = 29770; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 29770, 0, 0, 31, 0, 3, 15550, 0, 0, 0, 0, '', 'Mount spell only hit Attumen the Huntsmen'); + +DELETE FROM `creature_formations` WHERE `leaderGUID` = 135159; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(@GMIDNIGHT, @GMIDNIGHT, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135828, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135836, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135829, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135839, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135833, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135840, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135834, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135830, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135841, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135842, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135831, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135837, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135838, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135832, 0, 0, 1, 0, 0), +(@GMIDNIGHT, 135835, 0, 0, 1, 0, 0); + +UPDATE `creature_template` SET `ScriptName` = 'boss_attumen', `lootid` = @ATTUMEN_MOUNTED WHERE `entry` = @ATTUMEN_MOUNTED; +UPDATE `creature_loot_template` SET `entry` = @ATTUMEN_MOUNTED WHERE `entry` = @ATTUMEN_UNMOUNTED; diff --git a/sql/updates/world/3.3.5/2016_07_29_00_world.sql b/sql/updates/world/3.3.5/2016_07_29_00_world.sql new file mode 100644 index 00000000000..89b32cd993a --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_29_00_world.sql @@ -0,0 +1,59 @@ +-- SmartAI script for creature entry 15170 Rutgar Glyphshaper and 15171 Frankal Stonebridge +SET @RUTGAR := 15170; +SET @FRANKAL := 15171; + +UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`= '' WHERE `entry` IN (@RUTGAR,@FRANKAL); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@RUTGAR,@FRANKAL) AND `source_type`= 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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@RUTGAR, 0, 0,1, 62,0,100,0,6545,0,0,0, 33,15222,0,0,0,0,0, 7,0,0,0,0,0,0,0,"Rutgar Glyphshaper - on Gossip Menu 6545 id 0 selected - Kill Credit 'Rutgar Invisible Trigger'"), +(@RUTGAR, 0, 1,0, 61,0,100,0, 0,0,0,0, 72, 0,0,0,0,0,0, 7,0,0,0,0,0,0,0,"Rutgar Glyphshaper - on Gossip Menu 6545 id 0 selected - Close Gossip"), +(@FRANKAL,0, 2,3, 62,0,100,0,6552,0,0,0, 33,15221,0,0,0,0,0, 7,0,0,0,0,0,0,0,"Frankal Stonebridge - on Gossip Menu 6552 id 0 selected - Kill Credit 'Frankal Invisible Trigger'"), +(@FRANKAL,0, 3,0, 61,0,100,0, 0,0,0,0, 72, 0,0,0,0,0,0, 7,0,0,0,0,0,0,0,"Frankal Stonebridge - on Gossip Menu 6552 id 0 selected - Close Gossip"); + +-- gossip menu options for NPC 15170 Rutgar Glyphshaper and NPC 15171 Frankal Stonebridge +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (6534,6551,6550,6549,6548,6547,6546,6545,6533,6558,6557,6556,6555,6554,6553,6552); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(6534,0,0,"Hello, Rutgar. The Commander has sent me here to gather some information about his missing wife.", 10712,1,1,6551,0,0,0,'',0), +(6551,0,0,"That sounds dangerous.", 10714,1,1,6550,0,0,0,'',0), +(6550,0,0,"What happened to her after that?", 10716,1,1,6549,0,0,0,'',0), +(6549,0,0,"Natalia?", 10718,1,1,6548,0,0,0,'',0), +(6548,0,0,"What demands?", 10720,1,1,6547,0,0,0,'',0), +(6547,0,0,"Lost it? What do you mean?", 10722,1,1,6546,0,0,0,'',0), +(6546,0,0,"Possessed by what?", 10724,1,1,6545,0,0,0,'',0), +(6545,0,0,"I'll be back once I straighten this mess out.", 10726,1,1, 0,0,0,0,'',0), +(6533,0,0,"Hello, Frankal. I've heard that you might have some information as to the whereabouts of Mistress Natalia Mar'alith.",10727,1,1,6558,0,0,0,'',0), +(6558,0,0,"That's what I like to hear.", 10729,1,1,6557,0,0,0,'',0), +(6557,0,0,"That's odd.", 10731,1,1,6556,0,0,0,'',0), +(6556,0,0,"You couldn't handle a lone night elf priestess?", 10733,1,1,6555,0,0,0,'',0), +(6555,0,0,"I've been meaning to ask you about that monkey.", 10735,1,1,6554,0,0,0,'',0), +(6554,0,0,"Then what?", 10737,1,1,6553,0,0,0,'',0), +(6553,0,0,"What a story! So she went into Hive'Regal and that was the last you saw of her?", 10739,1,1,6552,0,0,0,'',0), +(6552,0,0,"Thanks for the information, Frankal.", 10741,1,1, 0,0,0,0,'',0); + +-- conditions for Rutgar Glyphshaper's and Frankal Stonebridge's gossip menus +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup` IN (6533,6534) AND `SourceEntry` IN (0,7735,7736); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14,6533,7735,0,0,9,0,8304,0,0,0,0,0,'',"Show gossip_menu.entry 6533 text_id 7735 only if Quest 8304 is taken (active)"), +(14,6534,7736,0,0,9,0,8304,0,0,0,0,0,'',"Show gossip_menu.entry 6534 text_id 7736 only if Quest 8304 is taken (active)"), +(15,6533, 0,0,0,9,0,8304,0,0,0,0,0,'',"Show gossip_menu_option.menu_id 6533 id 0 only if Quest 8304 is taken (active)"), +(15,6534, 0,0,0,9,0,8304,0,0,0,0,0,'',"Show gossip_menu_option.menu_id 6534 id 0 only if Quest 8304 is taken (active)"); + +-- gossip menu options for gameobject_template.displayId 6425 Lesser Wind Stone, 6426 Wind Stone, 6427 Greater Wind Stone +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (6540,6542,6543) AND `id` IN (0,1,2,3,4); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`OptionBroadcastTextID`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`,`BoxBroadcastTextID`) VALUES +(6540,0,0,"I am no cultist, you monster! Come to me and face your destruction!", 10684,1,1,0,0,0,0,'',0), +(6540,1,0,"Crimson Templar! I hold your crest of beckoning. Heed my summons!", 10685,1,1,0,0,0,0,'',0), +(6540,2,0,"Azure Templar! I hold your crest of beckoning. Heed my summons!", 10692,1,1,0,0,0,0,'',0), +(6540,3,0,"Earthen Templar! I hold your crest of beckoning. Heed my summons!", 10691,1,1,0,0,0,0,'',0), +(6540,4,0,"Hoary Templar! I hold your crest of beckoning. Heed my summons!", 10690,1,1,0,0,0,0,'',0), +(6542,0,0,"You will listen to this, vile duke! I am not your Twilight's Hammer lapdog! I am here to challenge you! Come! Come, and meet your death...",10698,1,1,0,0,0,0,'',0), +(6542,1,0,"Duke of Cynders! I hold your signet! Heed my call!", 10699,1,1,0,0,0,0,'',0), +(6542,2,0,"Duke of Fathoms! I hold your signet! Heed my call!", 10702,1,1,0,0,0,0,'',0), +(6542,3,0,"Duke of Shards! I hold your signet! Heed my call!", 10701,1,1,0,0,0,0,'',0), +(6542,4,0,"Duke of Zephyrs! I hold your signet! Heed my call!", 10700,1,1,0,0,0,0,'',0), +(6543,0,0,"The day of judgement has come, fiend! I challenge you to battle!", 10707,1,1,0,0,0,0,'',0), +(6543,1,0,"Skaldrenox! I hold your scepter, and charge you to enter this world!",10708,1,1,0,0,0,0,'',0), +(6543,2,0,"Skwol! I hold your scepter! I command you to enter this world!", 10711,1,1,0,0,0,0,'',0), +(6543,3,0,"Kazum! I hold your scepter! I command you to enter this world!", 10710,1,1,0,0,0,0,'',0), +(6543,4,0,"Whirlaxis! I hold your scepter! I command you to enter this world!", 10709,1,1,0,0,0,0,'',0); diff --git a/sql/updates/world/3.3.5/2016_07_30_00_world.sql b/sql/updates/world/3.3.5/2016_07_30_00_world.sql new file mode 100644 index 00000000000..934f641f788 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_30_00_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `creature_template` SET `dmgschool` =2 WHERE `entry` IN (20703,25571); +UPDATE `creature_template` SET `dmgschool` =4 WHERE `entry` IN (20704); +UPDATE `creature_template` SET `dmgschool` =5 WHERE `entry` IN (20690,20705,20267); +UPDATE `creature_template` SET `dmgschool` =6 WHERE `entry` IN (25573,20702); diff --git a/sql/updates/world/3.3.5/2016_07_30_01_world.sql b/sql/updates/world/3.3.5/2016_07_30_01_world.sql new file mode 100644 index 00000000000..6eb896decc5 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_30_01_world.sql @@ -0,0 +1,767 @@ +ALTER TABLE `gameobject_addon` +ADD COLUMN `parent_rotation0` FLOAT NOT NULL DEFAULT '0' AFTER `guid`, +ADD COLUMN `parent_rotation1` FLOAT NOT NULL DEFAULT '0' AFTER `parent_rotation0`, +ADD COLUMN `parent_rotation2` FLOAT NOT NULL DEFAULT '0' AFTER `parent_rotation1`, +ADD COLUMN `parent_rotation3` FLOAT NOT NULL DEFAULT '1' AFTER `parent_rotation2`; + +-- Old parent_rotation fields now go to addon table +UPDATE `gameobject_addon` ga INNER JOIN `gameobject` g ON ga.`guid` = g.`guid` SET ga.`parent_rotation0` = g.`rotation0`, ga.`parent_rotation1` = g.`rotation1`, ga.`parent_rotation2` = g.`rotation2`, ga.`parent_rotation3` = g.`rotation3`; +INSERT IGNORE INTO `gameobject_addon` (`guid`, `parent_rotation0`, `parent_rotation1`, `parent_rotation2`, `parent_rotation3`) SELECT `guid`, `rotation0`, `rotation1`, `rotation2`, `rotation3` FROM `gameobject` WHERE `rotation0` != 0 OR `rotation1` != 0 OR `rotation2` != 0 OR `rotation3` != 1; + +-- Retain compatibility with old UpdateRotationFields function +UPDATE `gameobject_addon` ga INNER JOIN `gameobject` g ON ga.`guid` = g.`guid` SET ga.`parent_rotation2`= IF(g.`rotation2` != 0 OR g.`rotation3` != 0, g.`rotation2`, SIN(g.`orientation` / 2)), ga.`parent_rotation3` = IF(g.`rotation2` != 0 OR g.`rotation3` != 0, g.`rotation3`, COS(g.`orientation` / 2)); +UPDATE `gameobject` SET `rotation0`=0, `rotation1`=0, `rotation2`=SIN(`orientation`/2), `rotation3`=COS(`orientation`/2); + +-- After mass import into gameobject_addon, some rows won't be unit length, so unitize them to prevent errors when starting server +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=1341; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=1343; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=1890; +UPDATE `gameobject_addon` SET `parent_rotation0`=0.6762096538109234, `parent_rotation1`=-0.20673818018978996, `parent_rotation2`=0.7071066602321923, `parent_rotation3`=0 WHERE `guid`=4718; +UPDATE `gameobject_addon` SET `parent_rotation0`=0.6762096538109234, `parent_rotation1`=-0.20673818018978996, `parent_rotation2`=0.7071066602321923, `parent_rotation3`=0 WHERE `guid`=4958; +UPDATE `gameobject_addon` SET `parent_rotation0`=0.6762096538109234, `parent_rotation1`=-0.20673818018978996, `parent_rotation2`=0.7071066602321923, `parent_rotation3`=0 WHERE `guid`=5136; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=5306; +UPDATE `gameobject_addon` SET `parent_rotation0`=-0.0030851075994373996, `parent_rotation1`=0.7070998757516332, `parent_rotation2`=0.7071069564239378, `parent_rotation3`=0 WHERE `guid`=5496; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=10528; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0.6957902409824018, `parent_rotation2`=0.6705396463625237, `parent_rotation3`=-0.25739565499377165 WHERE `guid`=12007; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=12098; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=12597; +UPDATE `gameobject_addon` SET `parent_rotation0`=0.5416755978208309, `parent_rotation1`=-0.4545190336806428, `parent_rotation2`=-0.45451857006530766, `parent_rotation3`=0.5416759771424687 WHERE `guid`=14036; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7963742763149461, `parent_rotation3`=-0.6048041104554813 WHERE `guid`=16736; +UPDATE `gameobject_addon` SET `parent_rotation0`=0.6678291213863456, `parent_rotation1`=0.2329403984683526, `parent_rotation2`=0.6674002564812922, `parent_rotation3`=-0.23306637045797093 WHERE `guid`=20458; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=-0.8164965561474501, `parent_rotation2`=-0.2508269266233929, `parent_rotation3`=0.5200184868637047 WHERE `guid`=20459; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=21636; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=21753; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22049; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22050; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22105; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22108; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22117; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22133; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22135; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22138; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22150; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22173; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22185; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22215; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22216; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22261; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22270; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22285; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22304; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=22681; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=24650; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=24651; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=24731; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=0.7071067811865475, `parent_rotation3`=0.7071067811865475 WHERE `guid`=24732; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0.7071067811865475, `parent_rotation2`=-0.7071067811865475, `parent_rotation3`=0 WHERE `guid`=46424; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0.7071067811865475, `parent_rotation2`=-0.7071067811865475, `parent_rotation3`=0 WHERE `guid`=46425; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0.7071067811865475, `parent_rotation2`=-0.7071067811865475, `parent_rotation3`=0 WHERE `guid`=46429; +UPDATE `gameobject_addon` SET `parent_rotation0`=-0.5475785386184279, `parent_rotation1`=0.44738996187113267, `parent_rotation2`=0.7071067571883707, `parent_rotation3`=0 WHERE `guid`=67868; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0.26071837713139784, `parent_rotation2`=0.4995184262775704, `parent_rotation3`=0.8261399818645443 WHERE `guid`=99796; +UPDATE `gameobject_addon` SET `parent_rotation0`=0, `parent_rotation1`=0, `parent_rotation2`=-0.7305848035703219, `parent_rotation3`=0.6828219715212115 WHERE `guid`=151892; + +-- Import special PARENT_ROTATION values for some transports, data taken from UDB +DELETE FROM `gameobject_addon` WHERE `guid` IN (6945,6946,9290,9411,9450,14139,16760,16761,16871,16874,16875,16876,16877,18298,18435,18802,18803,18804,18805,18806,18807,20505,20639,20640,24055,24074,24075,25138,34057,35693,35694,44890,44891,44892,44893,44901,44909,44954,44962,44976,48263,55230,56744,56937,56954,56961,57132,57133,57140,57141,57799,57992,57993,57994,57995,57996,58299,58304,58305,58306,58310,58782,58824,58935,59160,59328,59336,59343,59350,59386,59762,59763,59764,59765,59766,59779,59780,59781,59782,59783,60421,60463,61053,65435,65436,65438,65439,65520,65588,66717,67873,67874,67875,67876); +INSERT INTO `gameobject_addon`(`guid`,`parent_rotation0`,`parent_rotation1`,`parent_rotation2`,`parent_rotation3`) VALUES +(6945,0,0,1,-0.0000000437114), +(6946,0,0,1,-0.0000000437114), +(9290,0,0,0.95502,0.296542), +(9411,0,0,0.678801,0.734323), +(9450,0,0,0.678801,0.734323), +(14139,0,0,1,-0.0000000437114), +(16760,0,0,-0.378575,0.92557), +(16761,0,0,-0.378575,0.92557), +(16871,0,0,0.694658,0.71934), +(16874,0,0,0.989651,0.143493), +(16875,0,0,-0.426569,0.904455), +(16876,0,0,0.989651,0.143493), +(16877,0,0,-0.426569,0.904455), +(18298,0,0,0.612217,0.79069), +(18435,0,0,0.612217,0.79069), +(18802,0,0,1,-0.0000000437114), +(18803,0,0,1,-0.0000000437114), +(18804,0,0,1,-0.0000000437114), +(18805,0,0,1,-0.0000000437114), +(18806,0,0,1,-0.0000000437114), +(18807,0,0,1,-0.0000000437114), +(20505,0,0,-0.694658,0.71934), +(20639,0,0,0.612217,0.79069), +(20640,0,0,0.612217,0.79069), +(24055,0,0,-0.526214,0.850352), +(24074,0,0,-0.526214,0.850352), +(24075,0,0,-0.526214,0.850352), +(25138,0,0,0.45399,0.891007), +(34057,0,0,0.000000325841,1), +(35693,0,0,0.989651,0.143493), +(35694,0,0,0.989651,0.143493), +(44890,0,0,-0.0043634,0.99999), +(44891,0,0,-0.0043634,0.99999), +(44892,0,0,-0.0043634,0.99999), +(44893,0,0,-0.0043634,0.99999), +(44901,0,0,-0.0043634,0.99999), +(44909,0,0,-0.0043634,0.99999), +(44954,0,0,-0.0043634,0.99999), +(44962,0,0,-0.0043634,0.99999), +(44976,0,0,-0.0043634,0.99999), +(48263,0,0,-0.522498,0.85264), +(55230,0,0,0.999048,0.0436193), +(56744,0,0,0.951057,0.309017), +(56937,0,0,0.951057,0.309017), +(56954,0,0,0.951057,0.309017), +(56961,0,0,0.999048,0.0436193), +(57132,-0.00276125,-0.00551835,-0.370553,0.928791), +(57133,0.00544418,-0.00290476,0.918772,0.394739), +(57140,-0.00276125,-0.00551835,-0.370553,0.928791), +(57141,0.00544418,-0.00290476,0.918772,0.394739), +(57799,0,0,0.999048,0.0436193), +(57992,0,0,-0.370557,0.92881), +(57993,0,0,-0.760406,0.649448), +(57994,0,0,0.915312,0.402747), +(57995,0,0,-0.748956,0.66262), +(57996,0,0,0.995805,0.0915015), +(58299,0,0,0.999048,0.0436193), +(58304,0,0,-0.263031,0.964787), +(58305,0,0,0.522499,0.85264), +(58306,0,0,0.996917,-0.0784592), +(58310,0,0,0.333807,0.942641), +(58782,0,0,0.333807,0.942641), +(58824,0,0,0.333807,0.942641), +(58935,0,0,0.932008,-0.362438), +(59160,0,0,0.99999,0.00436324), +(59328,0,0,0.99999,-0.00436333), +(59336,0,0,0.99999,-0.00436333), +(59343,0,0,0.99999,-0.00436333), +(59350,0,0,0.99999,-0.00436333), +(59386,0,0,0.99999,-0.00436333), +(59762,0,0,-0.370557,0.92881), +(59763,0,0,-0.760406,0.649448), +(59764,0,0,0.915312,0.402747), +(59765,0,0,-0.748956,0.66262), +(59766,0,0,0.995805,0.0915015), +(59779,0,0,-0.370557,0.92881), +(59780,0,0,-0.760406,0.649448), +(59781,0,0,0.915312,0.402747), +(59782,0,0,-0.748956,0.66262), +(59783,0,0,0.995805,0.0915015), +(60421,0,0,0.99999,0.00436324), +(60463,0,0,0.999048,0.0436193), +(61053,0,0,0.999048,0.0436193), +(65435,0,0,0.915312,0.402747), +(65436,0,0,0.99999,0.00436324), +(65438,0,0,0.915312,0.402747), +(65439,0,0,0.915312,0.402747), +(65520,0,0,0.99999,0.00436324), +(65588,0,0,1,-0.0000000437114), +(66717,0,0,0.999657,0.0261769), +(67873,-0.00276125,-0.00551835,-0.370553,0.928791), +(67874,0.00544418,-0.00290476,0.918772,0.394739), +(67875,-0.00276125,-0.00551835,-0.370553,0.928791), +(67876,0.00544418,-0.00290476,0.918772,0.394739); + +-- Import from mangos UDB rows with explicit rotation in X or Y set +UPDATE `gameobject` SET `rotation0`=0.00661993, `rotation1`=-0.0256987, `rotation2`=-0.913849, `rotation3`=0.405186 WHERE `guid`=31; +UPDATE `gameobject` SET `rotation0`=0.0217795, `rotation1`=0.0566788, `rotation2`=-0.998154, `rotation3`=0.00154408 WHERE `guid`=39; +UPDATE `gameobject` SET `rotation0`=0, `rotation1`=-1, `rotation2`=0, `rotation3`=0 WHERE `guid`=256; +UPDATE `gameobject` SET `rotation0`=0.0647478, `rotation1`=0.0103159, `rotation2`=-0.996012, `rotation3`=0.0605139 WHERE `guid`=422; +UPDATE `gameobject` SET `rotation0`=-0.0371165, `rotation1`=-0.0287819, `rotation2`=-0.959991, `rotation3`=0.276066 WHERE `guid`=425; +UPDATE `gameobject` SET `rotation0`=0.0527701, `rotation1`=0.0327311, `rotation2`=-0.980893, `rotation3`=0.184371 WHERE `guid`=428; +UPDATE `gameobject` SET `rotation0`=-0.0392456, `rotation1`=0.0261564, `rotation2`=0.998886, `rotation3`=0.00146484 WHERE `guid`=1643; +UPDATE `gameobject` SET `rotation0`=-0.0232878, `rotation1`=-0.0147963, `rotation2`=-0.969871, `rotation3`=0.242053 WHERE `guid`=1692; +UPDATE `gameobject` SET `rotation0`=-0.0346627, `rotation1`=-0.0136871, `rotation2`=-0.999145, `rotation3`=0.0179256 WHERE `guid`=1733; +UPDATE `gameobject` SET `rotation0`=0.681389, `rotation1`=-0.188966, `rotation2`=0.68139, `rotation3`=0.188967 WHERE `guid`=5141; +UPDATE `gameobject` SET `rotation0`=-0.316432, `rotation1`=-0.0235138, `rotation2`=-0.945716, `rotation3`=0.0702803 WHERE `guid`=5193; +UPDATE `gameobject` SET `rotation0`=0.309975, `rotation1`=-0.635543, `rotation2`=0.309974, `rotation3`=0.635543 WHERE `guid`=5205; +UPDATE `gameobject` SET `rotation0`=0.00517035, `rotation1`=-0.0122805, `rotation2`=-0.933433, `rotation3`=0.358505 WHERE `guid`=5352; +UPDATE `gameobject` SET `rotation0`=0.61994, `rotation1`=-0.340111, `rotation2`=0.619939, `rotation3`=0.34011 WHERE `guid`=5382; +UPDATE `gameobject` SET `rotation0`=0.607692, `rotation1`=-0.361538, `rotation2`=0.607693, `rotation3`=0.361539 WHERE `guid`=5398; +UPDATE `gameobject` SET `rotation0`=0.607692, `rotation1`=-0.361538, `rotation2`=0.607693, `rotation3`=0.361539 WHERE `guid`=5405; +UPDATE `gameobject` SET `rotation0`=0.147016, `rotation1`=-0.691655, `rotation2`=0.147016, `rotation3`=0.691655 WHERE `guid`=5425; +UPDATE `gameobject` SET `rotation0`=0.0828447, `rotation1`=0.0300417, `rotation2`=0.870979, `rotation3`=0.483352 WHERE `guid`=5514; +UPDATE `gameobject` SET `rotation0`=0.241845, `rotation1`=0.664462, `rotation2`=0.664463, `rotation3`=0.241847 WHERE `guid`=6166; +UPDATE `gameobject` SET `rotation0`=-0.120005, `rotation1`=0.0474339, `rotation2`=-0.901711, `rotation3`=0.412634 WHERE `guid`=6771; +UPDATE `gameobject` SET `rotation0`=-0.0218129, `rotation1`=-0.0130854, `rotation2`=-0.999676, `rotation3`=0.00117086 WHERE `guid`=6896; +UPDATE `gameobject` SET `rotation0`=-0.00554562, `rotation1`=0.00270462, `rotation2`=-0.945506, `rotation3`=0.325546 WHERE `guid`=6943; +UPDATE `gameobject` SET `rotation0`=0.00311899, `rotation1`=0.0220261, `rotation2`=-0.998138, `rotation3`=0.0567872 WHERE `guid`=6997; +UPDATE `gameobject` SET `rotation0`=-0.000787735, `rotation1`=-0.0194941, `rotation2`=-0.911526, `rotation3`=0.41078 WHERE `guid`=7016; +UPDATE `gameobject` SET `rotation0`=0.0240598, `rotation1`=-0.0310163, `rotation2`=-0.946024, `rotation3`=0.321711 WHERE `guid`=7033; +UPDATE `gameobject` SET `rotation0`=-0.517355, `rotation1`=-0.209099, `rotation2`=-0.745465, `rotation3`=0.364559 WHERE `guid`=11584; +UPDATE `gameobject` SET `rotation0`=0, `rotation1`=0.173648, `rotation2`=-0.98106, `rotation3`=0.0858351 WHERE `guid`=12045; +UPDATE `gameobject` SET `rotation0`=-0.0702071, `rotation1`=0.0758209, `rotation2`=-0.969868, `rotation3`=0.220633 WHERE `guid`=12126; +UPDATE `gameobject` SET `rotation0`=0.0112896, `rotation1`=-0.0421324, `rotation2`=-0.965006, `rotation3`=0.258575 WHERE `guid`=12153; +UPDATE `gameobject` SET `rotation0`=-0.13007, `rotation1`=0.0567751, `rotation2`=0.989808, `rotation3`=0.0117644 WHERE `guid`=13380; +UPDATE `gameobject` SET `rotation0`=-0.108055, `rotation1`=-0.0132675, `rotation2`=-0.98861, `rotation3`=0.103913 WHERE `guid`=14140; +UPDATE `gameobject` SET `rotation0`=0.045383, `rotation1`=0.0708761, `rotation2`=-0.883594, `rotation3`=0.460629 WHERE `guid`=15274; +UPDATE `gameobject` SET `rotation0`=0.045383, `rotation1`=0.0708761, `rotation2`=-0.883594, `rotation3`=0.460629 WHERE `guid`=15366; +UPDATE `gameobject` SET `rotation0`=0.00190258, `rotation1`=-0.0435772, `rotation2`=-0.998096, `rotation3`=0.0435988 WHERE `guid`=15561; +UPDATE `gameobject` SET `rotation0`=0.185185, `rotation1`=-0.389885, `rotation2`=-0.900506, `rotation3`=0.0527745 WHERE `guid`=17928; +UPDATE `gameobject` SET `rotation0`=0.171708, `rotation1`=-0.056263, `rotation2`=0.382931, `rotation3`=0.905933 WHERE `guid`=21760; +UPDATE `gameobject` SET `rotation0`=-0.0308428, `rotation1`=-0.000134468, `rotation2`=-0.704017, `rotation3`=0.709513 WHERE `guid`=21768; +UPDATE `gameobject` SET `rotation0`=-0.0229378, `rotation1`=0.0318613, `rotation2`=-0.810947, `rotation3`=0.583801 WHERE `guid`=21774; +UPDATE `gameobject` SET `rotation0`=-0.0175047, `rotation1`=0.00414562, `rotation2`=0.0124769, `rotation3`=0.99976 WHERE `guid`=21775; +UPDATE `gameobject` SET `rotation0`=0.0281639, `rotation1`=-0.00794315, `rotation2`=0.739404, `rotation3`=0.672626 WHERE `guid`=21777; +UPDATE `gameobject` SET `rotation0`=0.0193486, `rotation1`=0.00251198, `rotation2`=0.558642, `rotation3`=0.829179 WHERE `guid`=21778; +UPDATE `gameobject` SET `rotation0`=-0.00526476, `rotation1`=-0.0032177, `rotation2`=0.972073, `rotation3`=0.234599 WHERE `guid`=22676; +UPDATE `gameobject` SET `rotation0`=-0.00144768, `rotation1`=-0.00599766, `rotation2`=0.521473, `rotation3`=0.853246 WHERE `guid`=22681; +UPDATE `gameobject` SET `rotation0`=-0.00425291, `rotation1`=-0.00447083, `rotation2`=0.878231, `rotation3`=0.478197 WHERE `guid`=22682; +UPDATE `gameobject` SET `rotation0`=0.0059185, `rotation1`=0.00174522, `rotation2`=-0.999668, `rotation3`=0.025011 WHERE `guid`=22683; +UPDATE `gameobject` SET `rotation0`=0.0133157, `rotation1`=-0.0566292, `rotation2`=-0.9983, `rotation3`=0.00370258 WHERE `guid`=23388; +UPDATE `gameobject` SET `rotation0`=-0.0218129, `rotation1`=0.0130854, `rotation2`=0.999676, `rotation3`=0.00117086 WHERE `guid`=24026; +UPDATE `gameobject` SET `rotation0`=-0.0425816, `rotation1`=-0.0586815, `rotation2`=0.995896, `rotation3`=0.0541643 WHERE `guid`=24222; +UPDATE `gameobject` SET `rotation0`=-0.0627699, `rotation1`=0.0825901, `rotation2`=-0.992224, `rotation3`=0.0687813 WHERE `guid`=24223; +UPDATE `gameobject` SET `rotation0`=0.00614643, `rotation1`=-0.000543594, `rotation2`=-0.921, `rotation3`=0.389515 WHERE `guid`=24716; +UPDATE `gameobject` SET `rotation0`=0.0057869, `rotation1`=-0.002141, `rotation2`=-0.786171, `rotation3`=0.617978 WHERE `guid`=24718; +UPDATE `gameobject` SET `rotation0`=-0.00567293, `rotation1`=-0.0024271, `rotation2`=0.995696, `rotation3`=0.0924729 WHERE `guid`=24719; +UPDATE `gameobject` SET `rotation0`=0.00611162, `rotation1`=0.000849724, `rotation2`=-0.98495, `rotation3`=0.172729 WHERE `guid`=24720; +UPDATE `gameobject` SET `rotation0`=0.00600815, `rotation1`=0.00140476, `rotation2`=-0.996615, `rotation3`=0.0819735 WHERE `guid`=24722; +UPDATE `gameobject` SET `rotation0`=-0.00526476, `rotation1`=-0.0032177, `rotation2`=0.972073, `rotation3`=0.234599 WHERE `guid`=24726; +UPDATE `gameobject` SET `rotation0`=0.00599813, `rotation1`=-0.00144768, `rotation2`=-0.853245, `rotation3`=0.521474 WHERE `guid`=24742; +UPDATE `gameobject` SET `rotation0`=0.00387716, `rotation1`=-0.00479984, `rotation2`=-0.359471, `rotation3`=0.933136 WHERE `guid`=24745; +UPDATE `gameobject` SET `rotation0`=-0.00043869, `rotation1`=0.00434017, `rotation2`=-0.994905, `rotation3`=0.100727 WHERE `guid`=24760; +UPDATE `gameobject` SET `rotation0`=0.0261407, `rotation1`=-0.0523176, `rotation2`=0.998287, `rotation3`=0.00148505 WHERE `guid`=24869; +UPDATE `gameobject` SET `rotation0`=0.101759, `rotation1`=0.00521469, `rotation2`=0.9523, `rotation3`=0.28765 WHERE `guid`=25120; +UPDATE `gameobject` SET `rotation0`=0.0778918, `rotation1`=-0.124165, `rotation2`=0.683997, `rotation3`=0.714607 WHERE `guid`=25256; +UPDATE `gameobject` SET `rotation0`=0.106593, `rotation1`=-0.075654, `rotation2`=0.960539, `rotation3`=0.245519 WHERE `guid`=25257; +UPDATE `gameobject` SET `rotation0`=-0.0218129, `rotation1`=0.0130854, `rotation2`=0.999676, `rotation3`=0.00117086 WHERE `guid`=25913; +UPDATE `gameobject` SET `rotation0`=-0.59733, `rotation1`=-0.208596, `rotation2`=-0.731095, `rotation3`=0.255313 WHERE `guid`=26628; +UPDATE `gameobject` SET `rotation0`=-0.042439, `rotation1`=0.0258846, `rotation2`=-0.934402, `rotation3`=0.352734 WHERE `guid`=26846; +UPDATE `gameobject` SET `rotation0`=0.0240598, `rotation1`=-0.0310163, `rotation2`=-0.946024, `rotation3`=0.321711 WHERE `guid`=31662; +UPDATE `gameobject` SET `rotation0`=-0.00346088, `rotation1`=0.00462914, `rotation2`=0.577754, `rotation3`=0.81619 WHERE `guid`=32331; +UPDATE `gameobject` SET `rotation0`=0.118706, `rotation1`=0.0711489, `rotation2`=-0.899253, `rotation3`=0.414959 WHERE `guid`=42485; +UPDATE `gameobject` SET `rotation0`=-0.0733967, `rotation1`=-0.0395975, `rotation2`=0.686763, `rotation3`=0.722082 WHERE `guid`=42854; +UPDATE `gameobject` SET `rotation0`=0.00646782, `rotation1`=0.00192738, `rotation2`=0.999939, `rotation3`=0.00874828 WHERE `guid`=42958; +UPDATE `gameobject` SET `rotation0`=0.0646195, `rotation1`=0.0148668, `rotation2`=-0.997768, `rotation3`=0.00783916 WHERE `guid`=42985; +UPDATE `gameobject` SET `rotation0`=0.0384789, `rotation1`=0.0146103, `rotation2`=-0.999125, `rotation3`=0.00748919 WHERE `guid`=43182; +UPDATE `gameobject` SET `rotation0`=0.0646195, `rotation1`=0.0148668, `rotation2`=-0.997768, `rotation3`=0.00783916 WHERE `guid`=43193; +UPDATE `gameobject` SET `rotation0`=-0.0566726, `rotation1`=0.0261345, `rotation2`=0.998049, `rotation3`=0.00195313 WHERE `guid`=45565; +UPDATE `gameobject` SET `rotation0`=0.00597954, `rotation1`=-0.0124331, `rotation2`=-0.991918, `rotation3`=0.126131 WHERE `guid`=48526; +UPDATE `gameobject` SET `rotation0`=-0.402262, `rotation1`=-0.303519, `rotation2`=-0.679092, `rotation3`=0.533756 WHERE `guid`=48529; +UPDATE `gameobject` SET `rotation0`=-0.0139608, `rotation1`=-0.0136299, `rotation2`=-0.952168, `rotation3`=0.304953 WHERE `guid`=48551; +UPDATE `gameobject` SET `rotation0`=0.0608597, `rotation1`=-0.0783129, `rotation2`=0.995057, `rotation3`=0.00495468 WHERE `guid`=50347; +UPDATE `gameobject` SET `rotation0`=0.0022459, `rotation1`=0.0019207, `rotation2`=-0.82254, `rotation3`=0.568699 WHERE `guid`=55040; +UPDATE `gameobject` SET `rotation0`=0.064477, `rotation1`=-0.0282221, `rotation2`=-0.982747, `rotation3`=0.171039 WHERE `guid`=55077; +UPDATE `gameobject` SET `rotation0`=-0.0520096, `rotation1`=-0.0134745, `rotation2`=0.22455, `rotation3`=0.97298 WHERE `guid`=55419; +UPDATE `gameobject` SET `rotation0`=-0.00342178, `rotation1`=-0.0196419, `rotation2`=0.583972, `rotation3`=0.811529 WHERE `guid`=56066; +UPDATE `gameobject` SET `rotation0`=0.0469356, `rotation1`=-0.0745831, `rotation2`=-0.287543, `rotation3`=0.953705 WHERE `guid`=56099; +UPDATE `gameobject` SET `rotation0`=0.0234499, `rotation1`=-0.0849457, `rotation2`=-0.550198, `rotation3`=0.830372 WHERE `guid`=56106; +UPDATE `gameobject` SET `rotation0`=0.00357676, `rotation1`=0.00249863, `rotation2`=0.984033, `rotation3`=0.177935 WHERE `guid`=56122; +UPDATE `gameobject` SET `rotation0`=0.0249286, `rotation1`=-0.0845232, `rotation2`=-0.535622, `rotation3`=0.839848 WHERE `guid`=56124; +UPDATE `gameobject` SET `rotation0`=-0.00971794, `rotation1`=-0.0320435, `rotation2`=-0.997552, `rotation3`=0.0613915 WHERE `guid`=56222; +UPDATE `gameobject` SET `rotation0`=-0.0123668, `rotation1`=-0.0872507, `rotation2`=-0.835673, `rotation3`=0.542111 WHERE `guid`=56223; +UPDATE `gameobject` SET `rotation0`=-0.017982, `rotation1`=0.0323582, `rotation2`=0.703278, `rotation3`=0.709951 WHERE `guid`=56243; +UPDATE `gameobject` SET `rotation0`=0.0828447, `rotation1`=0.0300417, `rotation2`=0.870979, `rotation3`=0.483352 WHERE `guid`=56294; +UPDATE `gameobject` SET `rotation0`=0.0170689, `rotation1`=-0.00339508, `rotation2`=-0.831343, `rotation3`=0.555488 WHERE `guid`=56583; +UPDATE `gameobject` SET `rotation0`=-0.00762081, `rotation1`=-0.0171156, `rotation2`=0.70084, `rotation3`=0.713072 WHERE `guid`=56656; +UPDATE `gameobject` SET `rotation0`=-0.0153003, `rotation1`=0.0108137, `rotation2`=-0.836097, `rotation3`=0.548262 WHERE `guid`=56657; +UPDATE `gameobject` SET `rotation0`=-0.00747776, `rotation1`=0.00981712, `rotation2`=-0.636003, `rotation3`=0.771587 WHERE `guid`=56707; +UPDATE `gameobject` SET `rotation0`=0.00858116, `rotation1`=0.000598907, `rotation2`=0.70708, `rotation3`=0.707081 WHERE `guid`=56709; +UPDATE `gameobject` SET `rotation0`=-0.00108576, `rotation1`=-0.00853348, `rotation2`=-0.831438, `rotation3`=0.555551 WHERE `guid`=56710; +UPDATE `gameobject` SET `rotation0`=0.0329785, `rotation1`=0.027854, `rotation2`=-0.492602, `rotation3`=0.869183 WHERE `guid`=57528; +UPDATE `gameobject` SET `rotation0`=0.0271997, `rotation1`=0.0176859, `rotation2`=-0.837915, `rotation3`=0.544835 WHERE `guid`=57532; +UPDATE `gameobject` SET `rotation0`=0.00369692, `rotation1`=0.0233622, `rotation2`=-0.494075, `rotation3`=0.869098 WHERE `guid`=57536; +UPDATE `gameobject` SET `rotation0`=-0.0176406, `rotation1`=0.0272284, `rotation2`=0.543453, `rotation3`=0.838812 WHERE `guid`=57540; +UPDATE `gameobject` SET `rotation0`=0.0267119, `rotation1`=0.0184145, `rotation2`=-0.822888, `rotation3`=0.567276 WHERE `guid`=57567; +UPDATE `gameobject` SET `rotation0`=0.0122328, `rotation1`=-0.0124474, `rotation2`=-0.713141, `rotation3`=0.700803 WHERE `guid`=57574; +UPDATE `gameobject` SET `rotation0`=-0.0184145, `rotation1`=0.0267115, `rotation2`=0.567276, `rotation3`=0.822888 WHERE `guid`=57576; +UPDATE `gameobject` SET `rotation0`=-0.0411167, `rotation1`=0.0145597, `rotation2`=-0.333488, `rotation3`=0.941745 WHERE `guid`=57631; +UPDATE `gameobject` SET `rotation0`=0.0780907, `rotation1`=0.0286131, `rotation2`=-0.38856, `rotation3`=0.917662 WHERE `guid`=57635; +UPDATE `gameobject` SET `rotation0`=-0.00915575, `rotation1`=0.0746326, `rotation2`=0.898921, `rotation3`=0.43161 WHERE `guid`=57768; +UPDATE `gameobject` SET `rotation0`=0.0133748, `rotation1`=0.0159645, `rotation2`=0.999181, `rotation3`=0.0346989 WHERE `guid`=57778; +UPDATE `gameobject` SET `rotation0`=0.997061, `rotation1`=-0.0563049, `rotation2`=-0.00894737, `rotation3`=0.0511718 WHERE `guid`=57781; +UPDATE `gameobject` SET `rotation0`=-0.00120354, `rotation1`=-0.0202312, `rotation2`=0.999186, `rotation3`=0.0348925 WHERE `guid`=57792; +UPDATE `gameobject` SET `rotation0`=-0.010067, `rotation1`=-0.0192642, `rotation2`=-0.544604, `rotation3`=0.838411 WHERE `guid`=57794; +UPDATE `gameobject` SET `rotation0`=0.0594649, `rotation1`=0.0722637, `rotation2`=-0.99546, `rotation3`=0.0173821 WHERE `guid`=57800; +UPDATE `gameobject` SET `rotation0`=-0.0636859, `rotation1`=0.0447683, `rotation2`=0.99641, `rotation3`=0.0332605 WHERE `guid`=57845; +UPDATE `gameobject` SET `rotation0`=-0.0478525, `rotation1`=-0.0228243, `rotation2`=-0.901316, `rotation3`=0.429906 WHERE `guid`=57849; +UPDATE `gameobject` SET `rotation0`=-0.0688047, `rotation1`=-0.0223722, `rotation2`=0.993367, `rotation3`=0.0893701 WHERE `guid`=57868; +UPDATE `gameobject` SET `rotation0`=0.00230885, `rotation1`=-0.134351, `rotation2`=0.609957, `rotation3`=0.780959 WHERE `guid`=57887; +UPDATE `gameobject` SET `rotation0`=-0.101412, `rotation1`=-0.0473404, `rotation2`=0.990035, `rotation3`=0.0854701 WHERE `guid`=57888; +UPDATE `gameobject` SET `rotation0`=-0.061111, `rotation1`=-0.0142727, `rotation2`=-0.950614, `rotation3`=0.303965 WHERE `guid`=57889; +UPDATE `gameobject` SET `rotation0`=-0.00625563, `rotation1`=0.00534725, `rotation2`=-0.79151, `rotation3`=0.611101 WHERE `guid`=57977; +UPDATE `gameobject` SET `rotation0`=-0.021769, `rotation1`=0.00458431, `rotation2`=-0.304047, `rotation3`=0.952397 WHERE `guid`=57978; +UPDATE `gameobject` SET `rotation0`=0.0169549, `rotation1`=0.00413513, `rotation2`=0.999241, `rotation3`=0.0348292 WHERE `guid`=57998; +UPDATE `gameobject` SET `rotation0`=-0.00625563, `rotation1`=0.00534725, `rotation2`=-0.79151, `rotation3`=0.611101 WHERE `guid`=58003; +UPDATE `gameobject` SET `rotation0`=-0.00561047, `rotation1`=0.00602055, `rotation2`=-0.855554, `rotation3`=0.517649 WHERE `guid`=58015; +UPDATE `gameobject` SET `rotation0`=-0.00700092, `rotation1`=0.00432682, `rotation2`=-0.688617, `rotation3`=0.725079 WHERE `guid`=58033; +UPDATE `gameobject` SET `rotation0`=-0.00797653, `rotation1`=0.00202751, `rotation2`=-0.439443, `rotation3`=0.898233 WHERE `guid`=58054; +UPDATE `gameobject` SET `rotation0`=-0.0053606, `rotation1`=-0.0215902, `rotation2`=0.940907, `rotation3`=0.337935 WHERE `guid`=58137; +UPDATE `gameobject` SET `rotation0`=-0.0053606, `rotation1`=-0.0215902, `rotation2`=0.940907, `rotation3`=0.337935 WHERE `guid`=58152; +UPDATE `gameobject` SET `rotation0`=-0.0053606, `rotation1`=-0.0215902, `rotation2`=0.940907, `rotation3`=0.337935 WHERE `guid`=58175; +UPDATE `gameobject` SET `rotation0`=-0.0190578, `rotation1`=-0.0114765, `rotation2`=0.426367, `rotation3`=0.904277 WHERE `guid`=58191; +UPDATE `gameobject` SET `rotation0`=-0.0190578, `rotation1`=-0.0114765, `rotation2`=0.426367, `rotation3`=0.904277 WHERE `guid`=58208; +UPDATE `gameobject` SET `rotation0`=-0.0215907, `rotation1`=0.0053606, `rotation2`=-0.337934, `rotation3`=0.940907 WHERE `guid`=58220; +UPDATE `gameobject` SET `rotation0`=-0.0213366, `rotation1`=0.00629711, `rotation2`=-0.378653, `rotation3`=0.925272 WHERE `guid`=58225; +UPDATE `gameobject` SET `rotation0`=0.0115876, `rotation1`=0.0149164, `rotation2`=-0.972156, `rotation3`=0.233574 WHERE `guid`=58300; +UPDATE `gameobject` SET `rotation0`=-0.013093, `rotation1`=0.0179844, `rotation2`=-0.863675, `rotation3`=0.503558 WHERE `guid`=58303; +UPDATE `gameobject` SET `rotation0`=-0.0203118, `rotation1`=-0.0571537, `rotation2`=0.737972, `rotation3`=0.6721 WHERE `guid`=58307; +UPDATE `gameobject` SET `rotation0`=-0.00221872, `rotation1`=-0.00375652, `rotation2`=0.788001, `rotation3`=0.615658 WHERE `guid`=58972; +UPDATE `gameobject` SET `rotation0`=0.0625529, `rotation1`=-0.00466824, `rotation2`=0.99803, `rotation3`=0.00142357 WHERE `guid`=59047; +UPDATE `gameobject` SET `rotation0`=0.0179548, `rotation1`=-0.00972557, `rotation2`=0.999791, `rotation3`=0 WHERE `guid`=59052; +UPDATE `gameobject` SET `rotation0`=-0.00726509, `rotation1`=0.0038681, `rotation2`=-0.640481, `rotation3`=0.76793 WHERE `guid`=59053; +UPDATE `gameobject` SET `rotation0`=-0.00820541, `rotation1`=-0.000640869, `rotation2`=-0.127568, `rotation3`=0.991796 WHERE `guid`=59089; +UPDATE `gameobject` SET `rotation0`=0.0214567, `rotation1`=-0.00587368, `rotation2`=0.997311, `rotation3`=0.0698328 WHERE `guid`=59092; +UPDATE `gameobject` SET `rotation0`=-0.0145078, `rotation1`=-0.00969982, `rotation2`=0.66255, `rotation3`=0.748814 WHERE `guid`=59750; +UPDATE `gameobject` SET `rotation0`=0.0100765, `rotation1`=-0.0142488, `rotation2`=-0.765911, `rotation3`=0.64271 WHERE `guid`=59757; +UPDATE `gameobject` SET `rotation0`=-0.00212193, `rotation1`=-0.0173225, `rotation2`=-0.134826, `rotation3`=0.990716 WHERE `guid`=59769; +UPDATE `gameobject` SET `rotation0`=0.010324, `rotation1`=-0.0140705, `rotation2`=-0.777019, `rotation3`=0.629236 WHERE `guid`=59787; +UPDATE `gameobject` SET `rotation0`=-0.00570679, `rotation1`=-0.019104, `rotation2`=0.484539, `rotation3`=0.874542 WHERE `guid`=59858; +UPDATE `gameobject` SET `rotation0`=0.000127792, `rotation1`=-0.0199375, `rotation2`=0.719059, `rotation3`=0.694663 WHERE `guid`=59873; +UPDATE `gameobject` SET `rotation0`=0.0949898, `rotation1`=-0.0109949, `rotation2`=-0.438946, `rotation3`=0.893411 WHERE `guid`=60059; +UPDATE `gameobject` SET `rotation0`=0.0462666, `rotation1`=0.00813198, `rotation2`=-0.997513, `rotation3`=0.0525493 WHERE `guid`=60356; +UPDATE `gameobject` SET `rotation0`=0.000655651, `rotation1`=-0.00431347, `rotation2`=-0.99862, `rotation3`=0.0523356 WHERE `guid`=60402; +UPDATE `gameobject` SET `rotation0`=-0.00369263, `rotation1`=0.0337515, `rotation2`=-0.998056, `rotation3`=0.0522552 WHERE `guid`=60422; +UPDATE `gameobject` SET `rotation0`=-0.0572481, `rotation1`=0.0493526, `rotation2`=0.957794, `rotation3`=0.27734 WHERE `guid`=60430; +UPDATE `gameobject` SET `rotation0`=-0.00782394, `rotation1`=0.00386524, `rotation2`=0.894899, `rotation3`=0.446183 WHERE `guid`=60434; +UPDATE `gameobject` SET `rotation0`=0.0450549, `rotation1`=-0.035512, `rotation2`=0.997688, `rotation3`=0.0364277 WHERE `guid`=60443; +UPDATE `gameobject` SET `rotation0`=0.0507827, `rotation1`=-0.00883389, `rotation2`=0.998049, `rotation3`=0.0352375 WHERE `guid`=60453; +UPDATE `gameobject` SET `rotation0`=0.0323796, `rotation1`=-0.00742626, `rotation2`=0.831214, `rotation3`=0.554959 WHERE `guid`=60466; +UPDATE `gameobject` SET `rotation0`=-0.00159168, `rotation1`=-0.0173798, `rotation2`=-0.165, `rotation3`=0.986139 WHERE `guid`=60505; +UPDATE `gameobject` SET `rotation0`=0.00299168, `rotation1`=0.00317574, `rotation2`=0.465605, `rotation3`=0.884982 WHERE `guid`=60512; +UPDATE `gameobject` SET `rotation0`=0.00376463, `rotation1`=-0.00488853, `rotation2`=-0.999977, `rotation3`=0.0027729 WHERE `guid`=60670; +UPDATE `gameobject` SET `rotation0`=-0.00823879, `rotation1`=0.00287342, `rotation2`=-0.358356, `rotation3`=0.933544 WHERE `guid`=60705; +UPDATE `gameobject` SET `rotation0`=0.0208797, `rotation1`=0.0497112, `rotation2`=-0.915771, `rotation3`=0.398067 WHERE `guid`=60758; +UPDATE `gameobject` SET `rotation0`=-0.0140252, `rotation1`=-0.0223131, `rotation2`=-0.931563, `rotation3`=0.362623 WHERE `guid`=60818; +UPDATE `gameobject` SET `rotation0`=-0.0140252, `rotation1`=-0.0223131, `rotation2`=-0.931563, `rotation3`=0.362623 WHERE `guid`=60869; +UPDATE `gameobject` SET `rotation0`=-0.0112252, `rotation1`=0.019206, `rotation2`=-0.90978, `rotation3`=0.414495 WHERE `guid`=61001; +UPDATE `gameobject` SET `rotation0`=-0.0112252, `rotation1`=0.019206, `rotation2`=-0.90978, `rotation3`=0.414495 WHERE `guid`=61006; +UPDATE `gameobject` SET `rotation0`=-0.0192065, `rotation1`=-0.0112247, `rotation2`=0.414494, `rotation3`=0.90978 WHERE `guid`=61028; +UPDATE `gameobject` SET `rotation0`=-0.0192065, `rotation1`=-0.0112247, `rotation2`=0.414494, `rotation3`=0.90978 WHERE `guid`=61058; +UPDATE `gameobject` SET `rotation0`=-0.0192556, `rotation1`=-0.0111418, `rotation2`=0.41052, `rotation3`=0.91158 WHERE `guid`=61067; +UPDATE `gameobject` SET `rotation0`=-0.0192556, `rotation1`=-0.0111418, `rotation2`=0.41052, `rotation3`=0.91158 WHERE `guid`=61091; +UPDATE `gameobject` SET `rotation0`=-0.0113096, `rotation1`=0.0191565, `rotation2`=-0.907963, `rotation3`=0.41846 WHERE `guid`=61117; +UPDATE `gameobject` SET `rotation0`=-0.0113096, `rotation1`=0.0191565, `rotation2`=-0.907963, `rotation3`=0.41846 WHERE `guid`=61128; +UPDATE `gameobject` SET `rotation0`=-0.00185108, `rotation1`=-0.0210752, `rotation2`=0.926908, `rotation3`=0.374693 WHERE `guid`=61143; +UPDATE `gameobject` SET `rotation0`=-0.00629711, `rotation1`=-0.0213366, `rotation2`=0.925271, `rotation3`=0.378654 WHERE `guid`=61166; +UPDATE `gameobject` SET `rotation0`=-0.0210757, `rotation1`=0.00185108, `rotation2`=-0.374691, `rotation3`=0.926908 WHERE `guid`=61207; +UPDATE `gameobject` SET `rotation0`=-0.0213366, `rotation1`=0.00629711, `rotation2`=-0.378653, `rotation3`=0.925272 WHERE `guid`=61214; +UPDATE `gameobject` SET `rotation0`=-0.0215907, `rotation1`=0.0053606, `rotation2`=-0.337933, `rotation3`=0.940907 WHERE `guid`=61236; +UPDATE `gameobject` SET `rotation0`=-0.0215907, `rotation1`=0.0053606, `rotation2`=-0.337933, `rotation3`=0.940907 WHERE `guid`=61242; +UPDATE `gameobject` SET `rotation0`=-0.0213432, `rotation1`=0.00627518, `rotation2`=-0.377692, `rotation3`=0.925664 WHERE `guid`=61244; +UPDATE `gameobject` SET `rotation0`=-0.0553427, `rotation1`=-0.069665, `rotation2`=0.955796, `rotation3`=0.280245 WHERE `guid`=61493; +UPDATE `gameobject` SET `rotation0`=-0.00479174, `rotation1`=-0.0271702, `rotation2`=-0.655555, `rotation3`=0.754643 WHERE `guid`=61539; +UPDATE `gameobject` SET `rotation0`=0.0131559, `rotation1`=0.0326118, `rotation2`=-0.994302, `rotation3`=0.100635 WHERE `guid`=61588; +UPDATE `gameobject` SET `rotation0`=-0.00400114, `rotation1`=-0.00394249, `rotation2`=0.558556, `rotation3`=0.829448 WHERE `guid`=61665; +UPDATE `gameobject` SET `rotation0`=-0.00552464, `rotation1`=0.00101566, `rotation2`=-0.359068, `rotation3`=0.933295 WHERE `guid`=61775; +UPDATE `gameobject` SET `rotation0`=0.0938687, `rotation1`=-0.0521898, `rotation2`=-0.949377, `rotation3`=0.295209 WHERE `guid`=62004; +UPDATE `gameobject` SET `rotation0`=0.0347409, `rotation1`=-0.07829, `rotation2`=-0.81131, `rotation3`=0.578308 WHERE `guid`=62008; +UPDATE `gameobject` SET `rotation0`=-0.0624795, `rotation1`=-0.0596743, `rotation2`=0.803572, `rotation3`=0.588904 WHERE `guid`=62010; +UPDATE `gameobject` SET `rotation0`=-0.0421896, `rotation1`=-0.0416889, `rotation2`=0.747766, `rotation3`=0.661308 WHERE `guid`=62013; +UPDATE `gameobject` SET `rotation0`=-0.0421896, `rotation1`=-0.0416889, `rotation2`=0.747766, `rotation3`=0.661308 WHERE `guid`=62015; +UPDATE `gameobject` SET `rotation0`=-0.070652, `rotation1`=-0.0217209, `rotation2`=0.76553, `rotation3`=0.639141 WHERE `guid`=62017; +UPDATE `gameobject` SET `rotation0`=-0.0267367, `rotation1`=-0.0508165, `rotation2`=-0.143241, `rotation3`=0.988021 WHERE `guid`=62019; +UPDATE `gameobject` SET `rotation0`=-0.0184536, `rotation1`=-0.0218439, `rotation2`=0.515646, `rotation3`=0.856324 WHERE `guid`=62020; +UPDATE `gameobject` SET `rotation0`=0.544168, `rotation1`=0.438963, `rotation2`=-0.515592, `rotation3`=0.495336 WHERE `guid`=62022; +UPDATE `gameobject` SET `rotation0`=-0.0297956, `rotation1`=-0.103779, `rotation2`=-0.0643826, `rotation3`=0.992067 WHERE `guid`=62029; +UPDATE `gameobject` SET `rotation0`=-0.173857, `rotation1`=-0.281583, `rotation2`=0.244537, `rotation3`=0.91142 WHERE `guid`=62034; +UPDATE `gameobject` SET `rotation0`=0.0402169, `rotation1`=-0.225434, `rotation2`=-0.500674, `rotation3`=0.834798 WHERE `guid`=62037; +UPDATE `gameobject` SET `rotation0`=-0.267074, `rotation1`=0.195414, `rotation2`=-0.927796, `rotation3`=0.172276 WHERE `guid`=62039; +UPDATE `gameobject` SET `rotation0`=-0.084765, `rotation1`=0.142902, `rotation2`=0.731836, `rotation3`=0.660916 WHERE `guid`=62040; +UPDATE `gameobject` SET `rotation0`=-0.0131726, `rotation1`=-0.0648012, `rotation2`=0.134588, `rotation3`=0.988693 WHERE `guid`=62045; +UPDATE `gameobject` SET `rotation0`=-0.0770526, `rotation1`=-0.0317087, `rotation2`=0.687312, `rotation3`=0.721567 WHERE `guid`=62070; +UPDATE `gameobject` SET `rotation0`=0.0221438, `rotation1`=0.00338078, `rotation2`=-0.734296, `rotation3`=0.67846 WHERE `guid`=62071; +UPDATE `gameobject` SET `rotation0`=0.097621, `rotation1`=0.66564, `rotation2`=0.227495, `rotation3`=0.704017 WHERE `guid`=62072; +UPDATE `gameobject` SET `rotation0`=-0.0590367, `rotation1`=-0.00439453, `rotation2`=0.907238, `rotation3`=0.416431 WHERE `guid`=62074; +UPDATE `gameobject` SET `rotation0`=-0.0321445, `rotation1`=0.0484037, `rotation2`=0.955317, `rotation3`=0.289817 WHERE `guid`=62076; +UPDATE `gameobject` SET `rotation0`=-0.0091877, `rotation1`=0.0102921, `rotation2`=-0.370451, `rotation3`=0.92875 WHERE `guid`=62203; +UPDATE `gameobject` SET `rotation0`=-0.038785, `rotation1`=-0.0182981, `rotation2`=-0.371068, `rotation3`=0.927615 WHERE `guid`=62207; +UPDATE `gameobject` SET `rotation0`=0.057168, `rotation1`=0.211483, `rotation2`=-0.244818, `rotation3`=0.944495 WHERE `guid`=62211; +UPDATE `gameobject` SET `rotation0`=-0.149701, `rotation1`=-0.0807028, `rotation2`=-0.879606, `rotation3`=0.444263 WHERE `guid`=62212; +UPDATE `gameobject` SET `rotation0`=0.0538278, `rotation1`=-0.0377436, `rotation2`=0.759027, `rotation3`=0.647732 WHERE `guid`=62213; +UPDATE `gameobject` SET `rotation0`=-0.126301, `rotation1`=0.0268679, `rotation2`=-0.963754, `rotation3`=0.233463 WHERE `guid`=62214; +UPDATE `gameobject` SET `rotation0`=-0.0738959, `rotation1`=0.0277271, `rotation2`=0.986376, `rotation3`=0.144338 WHERE `guid`=62218; +UPDATE `gameobject` SET `rotation0`=0.0124745, `rotation1`=0.0353851, `rotation2`=-0.706221, `rotation3`=0.706997 WHERE `guid`=62221; +UPDATE `gameobject` SET `rotation0`=-0.00383759, `rotation1`=-0.0591726, `rotation2`=0.299043, `rotation3`=0.952396 WHERE `guid`=62276; +UPDATE `gameobject` SET `rotation0`=-0.0719967, `rotation1`=0.0297947, `rotation2`=0.786651, `rotation3`=0.612462 WHERE `guid`=62299; +UPDATE `gameobject` SET `rotation0`=-0.0790567, `rotation1`=0.0276194, `rotation2`=0.945269, `rotation3`=0.315364 WHERE `guid`=62302; +UPDATE `gameobject` SET `rotation0`=-0.0700746, `rotation1`=-0.0305157, `rotation2`=0.296399, `rotation3`=0.952001 WHERE `guid`=62344; +UPDATE `gameobject` SET `rotation0`=-0.054544, `rotation1`=-0.0291481, `rotation2`=0.562613, `rotation3`=0.824404 WHERE `guid`=62346; +UPDATE `gameobject` SET `rotation0`=-0.0337057, `rotation1`=-0.0518045, `rotation2`=0.0559473, `rotation3`=0.996519 WHERE `guid`=62348; +UPDATE `gameobject` SET `rotation0`=0.295899, `rotation1`=0.0340376, `rotation2`=0.329922, `rotation3`=0.895788 WHERE `guid`=62350; +UPDATE `gameobject` SET `rotation0`=-0.0818739, `rotation1`=0.267369, `rotation2`=0.863095, `rotation3`=0.420567 WHERE `guid`=62352; +UPDATE `gameobject` SET `rotation0`=0.0104589, `rotation1`=0.0212154, `rotation2`=-0.729574, `rotation3`=0.683492 WHERE `guid`=62353; +UPDATE `gameobject` SET `rotation0`=0.307564, `rotation1`=0.347115, `rotation2`=-0.125055, `rotation3`=0.877084 WHERE `guid`=62355; +UPDATE `gameobject` SET `rotation0`=0.00250769, `rotation1`=-0.013567, `rotation2`=0.88282, `rotation3`=0.469508 WHERE `guid`=62356; +UPDATE `gameobject` SET `rotation0`=-0.215984, `rotation1`=0.256128, `rotation2`=0.85913, `rotation3`=0.38684 WHERE `guid`=62358; +UPDATE `gameobject` SET `rotation0`=0.341446, `rotation1`=-0.304326, `rotation2`=0.602724, `rotation3`=0.653853 WHERE `guid`=62362; +UPDATE `gameobject` SET `rotation0`=0.120763, `rotation1`=-0.236484, `rotation2`=-0.909652, `rotation3`=0.319414 WHERE `guid`=62364; +UPDATE `gameobject` SET `rotation0`=-0.244493, `rotation1`=-0.195951, `rotation2`=0.949099, `rotation3`=0.0322192 WHERE `guid`=62369; +UPDATE `gameobject` SET `rotation0`=0.175162, `rotation1`=-0.601875, `rotation2`=0.694636, `rotation3`=0.352909 WHERE `guid`=62374; +UPDATE `gameobject` SET `rotation0`=0.0800338, `rotation1`=-0.00780964, `rotation2`=-0.987558, `rotation3`=0.135137 WHERE `guid`=62375; +UPDATE `gameobject` SET `rotation0`=0.0362339, `rotation1`=-0.0262403, `rotation2`=-0.94461, `rotation3`=0.325133 WHERE `guid`=62376; +UPDATE `gameobject` SET `rotation0`=-0.00289059, `rotation1`=-0.0755463, `rotation2`=-0.55819, `rotation3`=0.826261 WHERE `guid`=62377; +UPDATE `gameobject` SET `rotation0`=-0.0657239, `rotation1`=0.0171518, `rotation2`=0.896297, `rotation3`=0.43822 WHERE `guid`=62379; +UPDATE `gameobject` SET `rotation0`=-0.062573, `rotation1`=0.0657063, `rotation2`=0.994164, `rotation3`=0.0583465 WHERE `guid`=62380; +UPDATE `gameobject` SET `rotation0`=-0.103618, `rotation1`=0.0230484, `rotation2`=0.909678, `rotation3`=0.401521 WHERE `guid`=62382; +UPDATE `gameobject` SET `rotation0`=-0.0568237, `rotation1`=0.0413055, `rotation2`=0.996267, `rotation3`=0.050163 WHERE `guid`=62383; +UPDATE `gameobject` SET `rotation0`=-0.134973, `rotation1`=-0.13683, `rotation2`=-0.929156, `rotation3`=0.315798 WHERE `guid`=62384; +UPDATE `gameobject` SET `rotation0`=0.0177789, `rotation1`=-0.0288286, `rotation2`=-0.784378, `rotation3`=0.619358 WHERE `guid`=62385; +UPDATE `gameobject` SET `rotation0`=-0.078877, `rotation1`=-0.00378895, `rotation2`=0.914302, `rotation3`=0.397261 WHERE `guid`=62386; +UPDATE `gameobject` SET `rotation0`=-0.0624537, `rotation1`=0.0621939, `rotation2`=0.996101, `rotation3`=0.00367024 WHERE `guid`=62420; +UPDATE `gameobject` SET `rotation0`=0.496306, `rotation1`=0.0242853, `rotation2`=-0.867702, `rotation3`=0.0135888 WHERE `guid`=62421; +UPDATE `gameobject` SET `rotation0`=-0.0650849, `rotation1`=0.0319777, `rotation2`=0.997365, `rotation3`=0.00211432 WHERE `guid`=62422; +UPDATE `gameobject` SET `rotation0`=0.0176468, `rotation1`=-0.0565901, `rotation2`=-0.678891, `rotation3`=0.731842 WHERE `guid`=62423; +UPDATE `gameobject` SET `rotation0`=-0.0446796, `rotation1`=-0.00412178, `rotation2`=0.528811, `rotation3`=0.847553 WHERE `guid`=62427; +UPDATE `gameobject` SET `rotation0`=-0.0496626, `rotation1`=0.0201645, `rotation2`=0.826765, `rotation3`=0.559988 WHERE `guid`=62429; +UPDATE `gameobject` SET `rotation0`=-0.0713949, `rotation1`=0.0128832, `rotation2`=0.997364, `rotation3`=0.00131474 WHERE `guid`=62431; +UPDATE `gameobject` SET `rotation0`=0.0647397, `rotation1`=0.00320148, `rotation2`=-0.997896, `rotation3`=0.00131474 WHERE `guid`=62433; +UPDATE `gameobject` SET `rotation0`=-0.622238, `rotation1`=0.170283, `rotation2`=0.610718, `rotation3`=0.459182 WHERE `guid`=62438; +UPDATE `gameobject` SET `rotation0`=0.152232, `rotation1`=0.111365, `rotation2`=-0.901051, `rotation3`=0.390552 WHERE `guid`=62440; +UPDATE `gameobject` SET `rotation0`=-0.0765719, `rotation1`=0.0206394, `rotation2`=0.989102, `rotation3`=0.124046 WHERE `guid`=62442; +UPDATE `gameobject` SET `rotation0`=-0.0628777, `rotation1`=0.0141687, `rotation2`=0.971451, `rotation3`=0.228318 WHERE `guid`=62443; +UPDATE `gameobject` SET `rotation0`=0.241684, `rotation1`=0.120824, `rotation2`=-0.52985, `rotation3`=0.803896 WHERE `guid`=62444; +UPDATE `gameobject` SET `rotation0`=0.453855, `rotation1`=-0.520619, `rotation2`=0.477769, `rotation3`=0.54287 WHERE `guid`=62445; +UPDATE `gameobject` SET `rotation0`=-0.0516787, `rotation1`=0.0323219, `rotation2`=0.992534, `rotation3`=0.105648 WHERE `guid`=62450; +UPDATE `gameobject` SET `rotation0`=0.131849, `rotation1`=-0.683728, `rotation2`=-0.0452547, `rotation3`=0.716299 WHERE `guid`=62451; +UPDATE `gameobject` SET `rotation0`=0.476533, `rotation1`=-0.52781, `rotation2`=0.490279, `rotation3`=0.503944 WHERE `guid`=62452; +UPDATE `gameobject` SET `rotation0`=-0.0410066, `rotation1`=0.0257225, `rotation2`=0.922812, `rotation3`=0.382199 WHERE `guid`=62454; +UPDATE `gameobject` SET `rotation0`=-0.0262136, `rotation1`=-0.0292301, `rotation2`=0.954082, `rotation3`=0.296963 WHERE `guid`=62456; +UPDATE `gameobject` SET `rotation0`=0.05055, `rotation1`=-0.00258732, `rotation2`=-0.939903, `rotation3`=0.337668 WHERE `guid`=62457; +UPDATE `gameobject` SET `rotation0`=-0.0494318, `rotation1`=-0.00887966, `rotation2`=0.62317, `rotation3`=0.780472 WHERE `guid`=62458; +UPDATE `gameobject` SET `rotation0`=-0.000944614, `rotation1`=-0.040988, `rotation2`=-0.265645, `rotation3`=0.963199 WHERE `guid`=62462; +UPDATE `gameobject` SET `rotation0`=-0.0274858, `rotation1`=0.731253, `rotation2`=0.680927, `rotation3`=0.0291899 WHERE `guid`=62463; +UPDATE `gameobject` SET `rotation0`=-0.0713949, `rotation1`=0.0128832, `rotation2`=0.997364, `rotation3`=0.00131474 WHERE `guid`=62464; +UPDATE `gameobject` SET `rotation0`=-0.0986266, `rotation1`=-0.0312767, `rotation2`=0.69349, `rotation3`=0.712998 WHERE `guid`=62466; +UPDATE `gameobject` SET `rotation0`=-0.053257, `rotation1`=-0.0238132, `rotation2`=0.584893, `rotation3`=0.80901 WHERE `guid`=62467; +UPDATE `gameobject` SET `rotation0`=0.00172186, `rotation1`=0.496897, `rotation2`=-0.0318861, `rotation3`=0.867222 WHERE `guid`=62468; +UPDATE `gameobject` SET `rotation0`=-0.012682, `rotation1`=0.00324059, `rotation2`=-0.309, `rotation3`=0.950972 WHERE `guid`=62581; +UPDATE `gameobject` SET `rotation0`=-0.0216508, `rotation1`=0.0327387, `rotation2`=0.931026, `rotation3`=0.362837 WHERE `guid`=62591; +UPDATE `gameobject` SET `rotation0`=-0.00178766, `rotation1`=-0.00762177, `rotation2`=-0.00873852, `rotation3`=0.999931 WHERE `guid`=62593; +UPDATE `gameobject` SET `rotation0`=-0.0352879, `rotation1`=0.0307655, `rotation2`=0.736506, `rotation3`=0.67481 WHERE `guid`=62595; +UPDATE `gameobject` SET `rotation0`=-0.00647497, `rotation1`=0.0345688, `rotation2`=0.00893497, `rotation3`=0.999341 WHERE `guid`=62600; +UPDATE `gameobject` SET `rotation0`=0.0312877, `rotation1`=-0.0662994, `rotation2`=-0.82378, `rotation3`=0.562149 WHERE `guid`=62706; +UPDATE `gameobject` SET `rotation0`=0.0912547, `rotation1`=-0.0740461, `rotation2`=-0.973655, `rotation3`=0.195413 WHERE `guid`=62733; +UPDATE `gameobject` SET `rotation0`=-0.00413465, `rotation1`=0.00457954, `rotation2`=-0.0479574, `rotation3`=0.99883 WHERE `guid`=62734; +UPDATE `gameobject` SET `rotation0`=-0.101369, `rotation1`=0.0590372, `rotation2`=0.970378, `rotation3`=0.211201 WHERE `guid`=62746; +UPDATE `gameobject` SET `rotation0`=0.00691795, `rotation1`=-0.0743694, `rotation2`=-0.354098, `rotation3`=0.932221 WHERE `guid`=62754; +UPDATE `gameobject` SET `rotation0`=0.469189, `rotation1`=0.839209, `rotation2`=0.120181, `rotation3`=0.24728 WHERE `guid`=62755; +UPDATE `gameobject` SET `rotation0`=0.0654626, `rotation1`=-0.00331974, `rotation2`=-0.997606, `rotation3`=0.0220309 WHERE `guid`=62756; +UPDATE `gameobject` SET `rotation0`=0.0552759, `rotation1`=0.0188112, `rotation2`=-0.998293, `rotation3`=0.00140248 WHERE `guid`=62758; +UPDATE `gameobject` SET `rotation0`=0.0383778, `rotation1`=-0.0295868, `rotation2`=-0.915912, `rotation3`=0.398444 WHERE `guid`=62759; +UPDATE `gameobject` SET `rotation0`=-0.0766449, `rotation1`=0.025178, `rotation2`=0.947197, `rotation3`=0.310338 WHERE `guid`=62760; +UPDATE `gameobject` SET `rotation0`=0.0328836, `rotation1`=0.334789, `rotation2`=0.832582, `rotation3`=0.440047 WHERE `guid`=62761; +UPDATE `gameobject` SET `rotation0`=0.256151, `rotation1`=0.237044, `rotation2`=-0.923361, `rotation3`=0.160005 WHERE `guid`=62762; +UPDATE `gameobject` SET `rotation0`=-0.135204, `rotation1`=0.156828, `rotation2`=0.891665, `rotation3`=0.402566 WHERE `guid`=62763; +UPDATE `gameobject` SET `rotation0`=0.223603, `rotation1`=0.59363, `rotation2`=-0.256003, `rotation3`=0.72943 WHERE `guid`=62764; +UPDATE `gameobject` SET `rotation0`=0.060257, `rotation1`=0.680447, `rotation2`=-0.728232, `rotation3`=0.0551277 WHERE `guid`=62794; +UPDATE `gameobject` SET `rotation0`=0.60732, `rotation1`=0.432161, `rotation2`=-0.341002, `rotation3`=0.572815 WHERE `guid`=62795; +UPDATE `gameobject` SET `rotation0`=0.513972, `rotation1`=0.452635, `rotation2`=0.00952148, `rotation3`=0.728604 WHERE `guid`=62796; +UPDATE `gameobject` SET `rotation0`=0.611201, `rotation1`=-0.187566, `rotation2`=-0.147256, `rotation3`=0.754698 WHERE `guid`=62798; +UPDATE `gameobject` SET `rotation0`=0.0864978, `rotation1`=-0.766595, `rotation2`=-0.627791, `rotation3`=0.103578 WHERE `guid`=62800; +UPDATE `gameobject` SET `rotation0`=0.453995, `rotation1`=-0.54534, `rotation2`=-0.489407, `rotation3`=0.506927 WHERE `guid`=62802; +UPDATE `gameobject` SET `rotation0`=-0.11008, `rotation1`=-0.0325861, `rotation2`=0.971985, `rotation3`=0.2051 WHERE `guid`=62806; +UPDATE `gameobject` SET `rotation0`=-0.0574207, `rotation1`=-0.0667448, `rotation2`=0.803014, `rotation3`=0.589421 WHERE `guid`=62982; +UPDATE `gameobject` SET `rotation0`=-0.0617466, `rotation1`=-0.0747061, `rotation2`=0.240547, `rotation3`=0.965786 WHERE `guid`=63020; +UPDATE `gameobject` SET `rotation0`=-0.0421896, `rotation1`=-0.0416889, `rotation2`=0.747766, `rotation3`=0.661308 WHERE `guid`=63043; +UPDATE `gameobject` SET `rotation0`=-0.0131726, `rotation1`=-0.0648012, `rotation2`=0.134588, `rotation3`=0.988693 WHERE `guid`=63045; +UPDATE `gameobject` SET `rotation0`=-0.0740328, `rotation1`=0.00929928, `rotation2`=0.997211, `rotation3`=0.00142357 WHERE `guid`=63048; +UPDATE `gameobject` SET `rotation0`=-0.481176, `rotation1`=-0.0713978, `rotation2`=0.267664, `rotation3`=0.831702 WHERE `guid`=63049; +UPDATE `gameobject` SET `rotation0`=0.511276, `rotation1`=-0.266282, `rotation2`=0.778645, `rotation3`=0.247797 WHERE `guid`=63050; +UPDATE `gameobject` SET `rotation0`=0.0494189, `rotation1`=-0.263665, `rotation2`=0.470602, `rotation3`=0.840578 WHERE `guid`=63053; +UPDATE `gameobject` SET `rotation0`=0.0871148, `rotation1`=-0.0726948, `rotation2`=-0.45024, `rotation3`=0.885669 WHERE `guid`=63060; +UPDATE `gameobject` SET `rotation0`=-0.0000157356, `rotation1`=0.0079174, `rotation2`=0.992514, `rotation3`=0.121877 WHERE `guid`=65653; +UPDATE `gameobject` SET `rotation0`=-0.0263157, `rotation1`=0.0369759, `rotation2`=0.998969, `rotation3`=0.00100662 WHERE `guid`=65654; +UPDATE `gameobject` SET `rotation0`=-0.00622797, `rotation1`=0.00750923, `rotation2`=-0.414639, `rotation3`=0.909934 WHERE `guid`=65655; +UPDATE `gameobject` SET `rotation0`=-0.305481, `rotation1`=0.637715, `rotation2`=0.305481, `rotation3`=0.637716 WHERE `guid`=65857; +UPDATE `gameobject` SET `rotation0`=0.0129037, `rotation1`=-0.0371256, `rotation2`=0.312944, `rotation3`=0.948958 WHERE `guid`=65911; +UPDATE `gameobject` SET `rotation0`=-0.0407338, `rotation1`=-0.0906858, `rotation2`=0.957691, `rotation3`=0.270082 WHERE `guid`=65974; +UPDATE `gameobject` SET `rotation0`=0.0829248, `rotation1`=-0.210616, `rotation2`=0.47683, `rotation3`=0.849351 WHERE `guid`=65975; +UPDATE `gameobject` SET `rotation0`=0.0284739, `rotation1`=0.0860357, `rotation2`=-0.995881, `rotation3`=0.00281557 WHERE `guid`=65976; +UPDATE `gameobject` SET `rotation0`=0.0476589, `rotation1`=0.110981, `rotation2`=-0.992664, `rotation3`=0.0054153 WHERE `guid`=65977; +UPDATE `gameobject` SET `rotation0`=-0.0104766, `rotation1`=-0.0470209, `rotation2`=0.927595, `rotation3`=0.370468 WHERE `guid`=65978; +UPDATE `gameobject` SET `rotation0`=-0.0519929, `rotation1`=-0.00577831, `rotation2`=0.842955, `rotation3`=0.535435 WHERE `guid`=65982; +UPDATE `gameobject` SET `rotation0`=-0.00524759, `rotation1`=-0.0166445, `rotation2`=0.927033, `rotation3`=0.374572 WHERE `guid`=65985; +UPDATE `gameobject` SET `rotation0`=-0.0151815, `rotation1`=-0.0217628, `rotation2`=0.998057, `rotation3`=0.0563685 WHERE `guid`=65988; +UPDATE `gameobject` SET `rotation0`=0.146786, `rotation1`=-0.305458, `rotation2`=0.379759, `rotation3`=0.860774 WHERE `guid`=65992; +UPDATE `gameobject` SET `rotation0`=-0.0181217, `rotation1`=-0.116454, `rotation2`=0.978609, `rotation3`=0.168625 WHERE `guid`=65993; +UPDATE `gameobject` SET `rotation0`=-0.213069, `rotation1`=0.177652, `rotation2`=0.864994, `rotation3`=0.418123 WHERE `guid`=65994; +UPDATE `gameobject` SET `rotation0`=0.422521, `rotation1`=-0.0203085, `rotation2`=-0.134406, `rotation3`=0.896102 WHERE `guid`=65995; +UPDATE `gameobject` SET `rotation0`=-0.0131168, `rotation1`=-0.0416002, `rotation2`=0.944602, `rotation3`=0.325307 WHERE `guid`=65996; +UPDATE `gameobject` SET `rotation0`=0.000907898, `rotation1`=0.0157042, `rotation2`=-0.999266, `rotation3`=0.0349386 WHERE `guid`=65997; +UPDATE `gameobject` SET `rotation0`=-0.0140967, `rotation1`=-0.0684423, `rotation2`=0.921273, `rotation3`=0.382587 WHERE `guid`=65998; +UPDATE `gameobject` SET `rotation0`=0.016243, `rotation1`=-0.0696001, `rotation2`=0.981966, `rotation3`=0.175028 WHERE `guid`=66000; +UPDATE `gameobject` SET `rotation0`=0.0421166, `rotation1`=0.0615225, `rotation2`=-0.997213, `rotation3`=0.00258374 WHERE `guid`=66001; +UPDATE `gameobject` SET `rotation0`=0.100891, `rotation1`=0.0733604, `rotation2`=-0.95587, `rotation3`=0.265993 WHERE `guid`=66003; +UPDATE `gameobject` SET `rotation0`=-0.0622897, `rotation1`=-0.0891228, `rotation2`=0.982732, `rotation3`=0.149717 WHERE `guid`=66004; +UPDATE `gameobject` SET `rotation0`=-0.0458646, `rotation1`=-0.122612, `rotation2`=0.986681, `rotation3`=0.0965575 WHERE `guid`=66007; +UPDATE `gameobject` SET `rotation0`=0.063015, `rotation1`=-0.264695, `rotation2`=0.473343, `rotation3`=0.837802 WHERE `guid`=66013; +UPDATE `gameobject` SET `rotation0`=-0.160909, `rotation1`=0.156031, `rotation2`=0.449443, `rotation3`=0.864733 WHERE `guid`=66014; +UPDATE `gameobject` SET `rotation0`=-0.0372086, `rotation1`=-0.0788364, `rotation2`=0.991509, `rotation3`=0.0964853 WHERE `guid`=66017; +UPDATE `gameobject` SET `rotation0`=-0.061204, `rotation1`=-0.0995245, `rotation2`=-0.992772, `rotation3`=0.0274319 WHERE `guid`=66019; +UPDATE `gameobject` SET `rotation0`=-0.0430837, `rotation1`=-0.0871992, `rotation2`=0.892773, `rotation3`=0.439883 WHERE `guid`=66022; +UPDATE `gameobject` SET `rotation0`=-0.0744286, `rotation1`=-0.0784407, `rotation2`=0.956942, `rotation3`=0.269389 WHERE `guid`=66026; +UPDATE `gameobject` SET `rotation0`=-0.532122, `rotation1`=0.436562, `rotation2`=0.67231, `rotation3`=0.272507 WHERE `guid`=66028; +UPDATE `gameobject` SET `rotation0`=0.330425, `rotation1`=-0.255406, `rotation2`=-0.350611, `rotation3`=0.838248 WHERE `guid`=66030; +UPDATE `gameobject` SET `rotation0`=0.0748539, `rotation1`=0.0447206, `rotation2`=-0.892179, `rotation3`=0.443185 WHERE `guid`=66032; +UPDATE `gameobject` SET `rotation0`=0.134146, `rotation1`=-0.29005, `rotation2`=0.477654, `rotation3`=0.818366 WHERE `guid`=66034; +UPDATE `gameobject` SET `rotation0`=0.0793948, `rotation1`=-0.0132055, `rotation2`=-0.277456, `rotation3`=0.957361 WHERE `guid`=66036; +UPDATE `gameobject` SET `rotation0`=-0.0776229, `rotation1`=-0.225336, `rotation2`=0.951262, `rotation3`=0.195699 WHERE `guid`=66041; +UPDATE `gameobject` SET `rotation0`=-0.227892, `rotation1`=-0.129869, `rotation2`=0.894956, `rotation3`=0.360907 WHERE `guid`=66042; +UPDATE `gameobject` SET `rotation0`=-0.135084, `rotation1`=-0.206245, `rotation2`=0.939968, `rotation3`=0.235956 WHERE `guid`=66043; +UPDATE `gameobject` SET `rotation0`=-0.0180907, `rotation1`=-0.137054, `rotation2`=0.974839, `rotation3`=0.174864 WHERE `guid`=66044; +UPDATE `gameobject` SET `rotation0`=-0.0368748, `rotation1`=-0.0735445, `rotation2`=0.932367, `rotation3`=0.352026 WHERE `guid`=66045; +UPDATE `gameobject` SET `rotation0`=-0.0445237, `rotation1`=-0.104994, `rotation2`=0.993466, `rotation3`=0.00429854 WHERE `guid`=66046; +UPDATE `gameobject` SET `rotation0`=-0.0406528, `rotation1`=-0.150936, `rotation2`=0.906446, `rotation3`=0.392327 WHERE `guid`=66049; +UPDATE `gameobject` SET `rotation0`=-0.016573, `rotation1`=-0.0207224, `rotation2`=0.992234, `rotation3`=0.12152 WHERE `guid`=66051; +UPDATE `gameobject` SET `rotation0`=0.0159388, `rotation1`=-0.0696707, `rotation2`=0.981193, `rotation3`=0.179313 WHERE `guid`=66055; +UPDATE `gameobject` SET `rotation0`=0.0182266, `rotation1`=-0.116857, `rotation2`=0.992917, `rotation3`=0.0113151 WHERE `guid`=66057; +UPDATE `gameobject` SET `rotation0`=-0.0114007, `rotation1`=-0.115683, `rotation2`=0.981917, `rotation3`=0.149418 WHERE `guid`=66059; +UPDATE `gameobject` SET `rotation0`=-0.001297, `rotation1`=0.00416565, `rotation2`=0.329686, `rotation3`=0.94408 WHERE `guid`=66065; +UPDATE `gameobject` SET `rotation0`=-0.00108576, `rotation1`=-0.0292311, `rotation2`=0.766356, `rotation3`=0.64175 WHERE `guid`=66230; +UPDATE `gameobject` SET `rotation0`=-0.163696, `rotation1`=-0.0698996, `rotation2`=0.384427, `rotation3`=0.905833 WHERE `guid`=66259; +UPDATE `gameobject` SET `rotation0`=0.00430059, `rotation1`=0.00416565, `rotation2`=0.390713, `rotation3`=0.920493 WHERE `guid`=66260; +UPDATE `gameobject` SET `rotation0`=-0.00366974, `rotation1`=-0.00235939, `rotation2`=0.998839, `rotation3`=0.0479673 WHERE `guid`=66261; +UPDATE `gameobject` SET `rotation0`=-0.0187707, `rotation1`=-0.0138149, `rotation2`=0.544464, `rotation3`=0.83846 WHERE `guid`=66292; +UPDATE `gameobject` SET `rotation0`=0.0881805, `rotation1`=0.10418, `rotation2`=-0.501834, `rotation3`=0.854127 WHERE `guid`=66294; +UPDATE `gameobject` SET `rotation0`=0.0342517, `rotation1`=0.161542, `rotation2`=-0.986255, `rotation3`=0.00571519 WHERE `guid`=66295; +UPDATE `gameobject` SET `rotation0`=0.0212288, `rotation1`=0.0050211, `rotation2`=-0.999762, `rotation3`=0 WHERE `guid`=66296; +UPDATE `gameobject` SET `rotation0`=0.0207849, `rotation1`=0.00662231, `rotation2`=-0.999762, `rotation3`=0 WHERE `guid`=66297; +UPDATE `gameobject` SET `rotation0`=0.0415297, `rotation1`=0.0674372, `rotation2`=-0.27634, `rotation3`=0.957791 WHERE `guid`=66298; +UPDATE `gameobject` SET `rotation0`=0.0253768, `rotation1`=0.0393915, `rotation2`=-0.558539, `rotation3`=0.828153 WHERE `guid`=66299; +UPDATE `gameobject` SET `rotation0`=0.00339794, `rotation1`=0.0219831, `rotation2`=-0.876394, `rotation3`=0.48108 WHERE `guid`=66300; +UPDATE `gameobject` SET `rotation0`=-0.000585556, `rotation1`=-0.00614262, `rotation2`=-0.731327, `rotation3`=0.681999 WHERE `guid`=66301; +UPDATE `gameobject` SET `rotation0`=0.0589747, `rotation1`=0.0545664, `rotation2`=0.516011, `rotation3`=0.852805 WHERE `guid`=66302; +UPDATE `gameobject` SET `rotation0`=-0.0773177, `rotation1`=-0.035183, `rotation2`=0.572569, `rotation3`=0.815444 WHERE `guid`=66306; +UPDATE `gameobject` SET `rotation0`=0.0761347, `rotation1`=-0.0631371, `rotation2`=-0.989244, `rotation3`=0.107771 WHERE `guid`=66307; +UPDATE `gameobject` SET `rotation0`=0.00338888, `rotation1`=-0.0142326, `rotation2`=-0.913431, `rotation3`=0.40673 WHERE `guid`=66345; +UPDATE `gameobject` SET `rotation0`=-0.00172472, `rotation1`=-0.0225382, `rotation2`=-0.913224, `rotation3`=0.40683 WHERE `guid`=66347; +UPDATE `gameobject` SET `rotation0`=-0.00615454, `rotation1`=-0.00928211, `rotation2`=-0.722301, `rotation3`=0.69149 WHERE `guid`=66349; +UPDATE `gameobject` SET `rotation0`=-0.00608587, `rotation1`=-0.0101986, `rotation2`=-0.913453, `rotation3`=0.406771 WHERE `guid`=66354; +UPDATE `gameobject` SET `rotation0`=0.0448937, `rotation1`=-0.154575, `rotation2`=0.502752, `rotation3`=0.849312 WHERE `guid`=66355; +UPDATE `gameobject` SET `rotation0`=0.014133, `rotation1`=-0.00137234, `rotation2`=-0.931943, `rotation3`=0.362327 WHERE `guid`=66357; +UPDATE `gameobject` SET `rotation0`=-0.0129566, `rotation1`=0.00283623, `rotation2`=0.350251, `rotation3`=0.936562 WHERE `guid`=66366; +UPDATE `gameobject` SET `rotation0`=0.00392294, `rotation1`=0.00371265, `rotation2`=0.922192, `rotation3`=0.386696 WHERE `guid`=66375; +UPDATE `gameobject` SET `rotation0`=0.0300908, `rotation1`=-0.0217514, `rotation2`=0.99931, `rotation3`=0.00135932 WHERE `guid`=66406; +UPDATE `gameobject` SET `rotation0`=0.0405688, `rotation1`=0.0204649, `rotation2`=0.966308, `rotation3`=0.253347 WHERE `guid`=66407; +UPDATE `gameobject` SET `rotation0`=0.0554385, `rotation1`=0.0817881, `rotation2`=-0.129504, `rotation3`=0.986644 WHERE `guid`=66408; +UPDATE `gameobject` SET `rotation0`=-0.00613165, `rotation1`=0.0583906, `rotation2`=-0.707772, `rotation3`=0.703997 WHERE `guid`=66409; +UPDATE `gameobject` SET `rotation0`=-0.464443, `rotation1`=0.499267, `rotation2`=-0.661067, `rotation3`=0.313075 WHERE `guid`=66412; +UPDATE `gameobject` SET `rotation0`=-0.0148516, `rotation1`=0.0269852, `rotation2`=-0.926785, `rotation3`=0.374326 WHERE `guid`=66413; +UPDATE `gameobject` SET `rotation0`=-0.00749159, `rotation1`=0.0298777, `rotation2`=-0.991548, `rotation3`=0.126034 WHERE `guid`=66414; +UPDATE `gameobject` SET `rotation0`=0.031075, `rotation1`=-0.0419874, `rotation2`=0.998633, `rotation3`=0.00167374 WHERE `guid`=66415; +UPDATE `gameobject` SET `rotation0`=-0.0140429, `rotation1`=-0.00888062, `rotation2`=0.998916, `rotation3`=0.0434899 WHERE `guid`=66620; +UPDATE `gameobject` SET `rotation0`=0.00558281, `rotation1`=0.0118389, `rotation2`=0.845644, `rotation3`=0.533587 WHERE `guid`=66621; +UPDATE `gameobject` SET `rotation0`=-0.00416994, `rotation1`=-0.000220299, `rotation2`=0.998126, `rotation3`=0.0610488 WHERE `guid`=66622; +UPDATE `gameobject` SET `rotation0`=-0.00070858, `rotation1`=-0.00169086, `rotation2`=-0.740215, `rotation3`=0.672367 WHERE `guid`=66633; +UPDATE `gameobject` SET `rotation0`=-0.00752497, `rotation1`=-0.0114594, `rotation2`=-0.710091, `rotation3`=0.703977 WHERE `guid`=66634; +UPDATE `gameobject` SET `rotation0`=0.0395589, `rotation1`=-0.0160465, `rotation2`=-0.537083, `rotation3`=0.842449 WHERE `guid`=66807; +UPDATE `gameobject` SET `rotation0`=-0.00543785, `rotation1`=0.00140572, `rotation2`=-0.424541, `rotation3`=0.905391 WHERE `guid`=67445; +UPDATE `gameobject` SET `rotation0`=0.0245037, `rotation1`=0.0558653, `rotation2`=-0.984365, `rotation3`=0.165237 WHERE `guid`=67824; +UPDATE `gameobject` SET `rotation0`=0.457502, `rotation1`=0.879879, `rotation2`=-0.128418, `rotation3`=0.00371864 WHERE `guid`=67825; +UPDATE `gameobject` SET `rotation0`=0.00501299, `rotation1`=-0.00453663, `rotation2`=-0.177918, `rotation3`=0.984022 WHERE `guid`=67827; +UPDATE `gameobject` SET `rotation0`=-0.00782394, `rotation1`=0.00386524, `rotation2`=0.894899, `rotation3`=0.446183 WHERE `guid`=67968; +UPDATE `gameobject` SET `rotation0`=0.0222769, `rotation1`=-0.035924, `rotation2`=-0.82086, `rotation3`=0.569563 WHERE `guid`=71411; +UPDATE `gameobject` SET `rotation0`=0.0167089, `rotation1`=0.0073185, `rotation2`=0.337838, `rotation3`=0.941027 WHERE `guid`=71412; +UPDATE `gameobject` SET `rotation0`=0.895853, `rotation1`=0.375089, `rotation2`=-0.234593, `rotation3`=0.0414939 WHERE `guid`=71429; +UPDATE `gameobject` SET `rotation0`=0.0133057, `rotation1`=0.00767422, `rotation2`=-0.894822, `rotation3`=0.446159 WHERE `guid`=71431; +UPDATE `gameobject` SET `rotation0`=0.107768, `rotation1`=-0.24586, `rotation2`=0.963281, `rotation3`=0.00540979 WHERE `guid`=71432; +UPDATE `gameobject` SET `rotation0`=-0.0531387, `rotation1`=0.608887, `rotation2`=-0.606519, `rotation3`=0.508496 WHERE `guid`=71433; +UPDATE `gameobject` SET `rotation0`=0.217795, `rotation1`=0.271523, `rotation2`=0.450282, `rotation3`=0.822245 WHERE `guid`=76924; +UPDATE `gameobject` SET `rotation0`=-0.0121818, `rotation1`=-0.00647736, `rotation2`=-0.0524149, `rotation3`=0.99853 WHERE `guid`=76935; +UPDATE `gameobject` SET `rotation0`=-0.0568476, `rotation1`=0.0184574, `rotation2`=0.759868, `rotation3`=0.647324 WHERE `guid`=76963; +UPDATE `gameobject` SET `rotation0`=0.0264506, `rotation1`=-0.0387974, `rotation2`=0.794722, `rotation3`=0.605155 WHERE `guid`=76980; +UPDATE `gameobject` SET `rotation0`=0.00446081, `rotation1`=0.00867653, `rotation2`=0.958778, `rotation3`=0.283987 WHERE `guid`=76990; +UPDATE `gameobject` SET `rotation0`=-0.00244474, `rotation1`=-0.0307484, `rotation2`=0.0704784, `rotation3`=0.997036 WHERE `guid`=76994; +UPDATE `gameobject` SET `rotation0`=0.301799, `rotation1`=0.559454, `rotation2`=0.663756, `rotation3`=0.394152 WHERE `guid`=77005; +UPDATE `gameobject` SET `rotation0`=0.0638885, `rotation1`=-0.00834465, `rotation2`=0.871384, `rotation3`=0.486353 WHERE `guid`=77006; +UPDATE `gameobject` SET `rotation0`=0.529439, `rotation1`=-0.0826683, `rotation2`=-0.282406, `rotation3`=0.79568 WHERE `guid`=77007; +UPDATE `gameobject` SET `rotation0`=0.0796647, `rotation1`=0.0144062, `rotation2`=-0.000888824, `rotation3`=0.996717 WHERE `guid`=77008; +UPDATE `gameobject` SET `rotation0`=0.0790286, `rotation1`=-0.017458, `rotation2`=-0.418527, `rotation3`=0.904591 WHERE `guid`=77009; +UPDATE `gameobject` SET `rotation0`=0.0258098, `rotation1`=0.0587788, `rotation2`=0.790161, `rotation3`=0.609528 WHERE `guid`=77010; +UPDATE `gameobject` SET `rotation0`=-0.000017643, `rotation1`=0.000310898, `rotation2`=0.465845, `rotation3`=0.884866 WHERE `guid`=77011; +UPDATE `gameobject` SET `rotation0`=-0.00913286, `rotation1`=-0.0617018, `rotation2`=0.944452, `rotation3`=0.322675 WHERE `guid`=77012; +UPDATE `gameobject` SET `rotation0`=-0.0715327, `rotation1`=-0.0109978, `rotation2`=0.860805, `rotation3`=0.503763 WHERE `guid`=77013; +UPDATE `gameobject` SET `rotation0`=0.0488257, `rotation1`=0.0519066, `rotation2`=0.704068, `rotation3`=0.706548 WHERE `guid`=77014; +UPDATE `gameobject` SET `rotation0`=0.0600896, `rotation1`=-0.0089817, `rotation2`=-0.643221, `rotation3`=0.763266 WHERE `guid`=77015; +UPDATE `gameobject` SET `rotation0`=0.117878, `rotation1`=0.0288877, `rotation2`=-0.852855, `rotation3`=0.507847 WHERE `guid`=77016; +UPDATE `gameobject` SET `rotation0`=0.175502, `rotation1`=-0.0696192, `rotation2`=-0.835915, `rotation3`=0.515363 WHERE `guid`=77017; +UPDATE `gameobject` SET `rotation0`=-0.10428, `rotation1`=0.0728397, `rotation2`=0.523499, `rotation3`=0.842478 WHERE `guid`=77018; +UPDATE `gameobject` SET `rotation0`=-0.146883, `rotation1`=0.106271, `rotation2`=-0.919187, `rotation3`=0.349611 WHERE `guid`=77019; +UPDATE `gameobject` SET `rotation0`=-0.0967536, `rotation1`=0.0623951, `rotation2`=-0.112823, `rotation3`=0.986923 WHERE `guid`=77020; +UPDATE `gameobject` SET `rotation0`=0.121423, `rotation1`=0.0109167, `rotation2`=-0.951202, `rotation3`=0.283463 WHERE `guid`=77021; +UPDATE `gameobject` SET `rotation0`=0.0474486, `rotation1`=-0.0568333, `rotation2`=-0.225662, `rotation3`=0.971388 WHERE `guid`=77022; +UPDATE `gameobject` SET `rotation0`=-0.0137296, `rotation1`=0.00334263, `rotation2`=-0.985821, `rotation3`=0.167206 WHERE `guid`=77023; +UPDATE `gameobject` SET `rotation0`=-0.0574636, `rotation1`=-0.0339718, `rotation2`=-0.0337629, `rotation3`=0.997198 WHERE `guid`=77024; +UPDATE `gameobject` SET `rotation0`=0.119032, `rotation1`=-0.042861, `rotation2`=-0.775682, `rotation3`=0.618313 WHERE `guid`=77025; +UPDATE `gameobject` SET `rotation0`=0.013063, `rotation1`=0.123156, `rotation2`=0.888981, `rotation3`=0.44088 WHERE `guid`=77026; +UPDATE `gameobject` SET `rotation0`=-0.0474277, `rotation1`=0.038497, `rotation2`=0.904352, `rotation3`=0.422393 WHERE `guid`=77027; +UPDATE `gameobject` SET `rotation0`=-0.0808988, `rotation1`=0.00173664, `rotation2`=0.666332, `rotation3`=0.741251 WHERE `guid`=77028; +UPDATE `gameobject` SET `rotation0`=0.00607967, `rotation1`=-0.0487633, `rotation2`=0.0698023, `rotation3`=0.99635 WHERE `guid`=77029; +UPDATE `gameobject` SET `rotation0`=0.0470619, `rotation1`=0.0384197, `rotation2`=-0.997312, `rotation3`=0.040972 WHERE `guid`=77030; +UPDATE `gameobject` SET `rotation0`=0.176649, `rotation1`=-0.0290623, `rotation2`=-0.343566, `rotation3`=0.921907 WHERE `guid`=77031; +UPDATE `gameobject` SET `rotation0`=0.0263929, `rotation1`=0.121001, `rotation2`=0.8357, `rotation3`=0.53504 WHERE `guid`=77032; +UPDATE `gameobject` SET `rotation0`=-0.0216947, `rotation1`=-0.022048, `rotation2`=0.748631, `rotation3`=0.662265 WHERE `guid`=77033; +UPDATE `gameobject` SET `rotation0`=0.0561199, `rotation1`=-0.110401, `rotation2`=-0.985682, `rotation3`=0.114429 WHERE `guid`=77034; +UPDATE `gameobject` SET `rotation0`=-0.0579057, `rotation1`=0.0194483, `rotation2`=0.995007, `rotation3`=0.0789345 WHERE `guid`=77035; +UPDATE `gameobject` SET `rotation0`=0.107849, `rotation1`=0.0608816, `rotation2`=0.157308, `rotation3`=0.979753 WHERE `guid`=77036; +UPDATE `gameobject` SET `rotation0`=-0.0570979, `rotation1`=0.0217075, `rotation2`=0.99114, `rotation3`=0.117938 WHERE `guid`=77037; +UPDATE `gameobject` SET `rotation0`=0.0903859, `rotation1`=-0.0419741, `rotation2`=-0.412563, `rotation3`=0.905461 WHERE `guid`=77038; +UPDATE `gameobject` SET `rotation0`=0.104919, `rotation1`=0.0612249, `rotation2`=-0.685961, `rotation3`=0.717427 WHERE `guid`=77039; +UPDATE `gameobject` SET `rotation0`=0.105379, `rotation1`=0.0258522, `rotation2`=-0.58182, `rotation3`=0.806047 WHERE `guid`=77040; +UPDATE `gameobject` SET `rotation0`=-0.0350347, `rotation1`=-0.007514, `rotation2`=0.840987, `rotation3`=0.539867 WHERE `guid`=77041; +UPDATE `gameobject` SET `rotation0`=0.0236607, `rotation1`=0.0528755, `rotation2`=-0.892694, `rotation3`=0.446924 WHERE `guid`=77042; +UPDATE `gameobject` SET `rotation0`=-0.0387049, `rotation1`=-0.120429, `rotation2`=-0.273579, `rotation3`=0.953495 WHERE `guid`=77045; +UPDATE `gameobject` SET `rotation0`=-0.0990119, `rotation1`=-0.0587473, `rotation2`=0.83289, `rotation3`=0.541332 WHERE `guid`=77047; +UPDATE `gameobject` SET `rotation0`=0.0436177, `rotation1`=0.0427647, `rotation2`=-0.522051, `rotation3`=0.850724 WHERE `guid`=77048; +UPDATE `gameobject` SET `rotation0`=0.0664639, `rotation1`=-0.0326204, `rotation2`=0.188945, `rotation3`=0.979193 WHERE `guid`=77049; +UPDATE `gameobject` SET `rotation0`=-0.0246377, `rotation1`=-0.0620403, `rotation2`=0.583806, `rotation3`=0.809144 WHERE `guid`=77050; +UPDATE `gameobject` SET `rotation0`=0.0298905, `rotation1`=-0.0326824, `rotation2`=0.791899, `rotation3`=0.609044 WHERE `guid`=77051; +UPDATE `gameobject` SET `rotation0`=0.0402436, `rotation1`=-0.0483112, `rotation2`=0.956863, `rotation3`=0.283653 WHERE `guid`=77052; +UPDATE `gameobject` SET `rotation0`=0.063242, `rotation1`=0.0197554, `rotation2`=-0.162605, `rotation3`=0.984464 WHERE `guid`=77053; +UPDATE `gameobject` SET `rotation0`=0.0239267, `rotation1`=0.0582066, `rotation2`=-0.92025, `rotation3`=0.386238 WHERE `guid`=77054; +UPDATE `gameobject` SET `rotation0`=0.0541716, `rotation1`=0.0323639, `rotation2`=-0.245821, `rotation3`=0.967259 WHERE `guid`=77055; +UPDATE `gameobject` SET `rotation0`=-0.00713873, `rotation1`=-0.0216646, `rotation2`=-0.243133, `rotation3`=0.969725 WHERE `guid`=77056; +UPDATE `gameobject` SET `rotation0`=-0.126151, `rotation1`=0.0901117, `rotation2`=-0.923634, `rotation3`=0.350524 WHERE `guid`=77057; +UPDATE `gameobject` SET `rotation0`=-0.0150366, `rotation1`=-0.0171528, `rotation2`=-0.602707, `rotation3`=0.797637 WHERE `guid`=77058; +UPDATE `gameobject` SET `rotation0`=0.00825453, `rotation1`=-0.0623331, `rotation2`=0.657885, `rotation3`=0.750489 WHERE `guid`=77059; +UPDATE `gameobject` SET `rotation0`=-0.000444889, `rotation1`=-0.0317888, `rotation2`=0.999405, `rotation3`=0.0133833 WHERE `guid`=77061; +UPDATE `gameobject` SET `rotation0`=-0.0266786, `rotation1`=-0.0172901, `rotation2`=0.544106, `rotation3`=0.838414 WHERE `guid`=77062; +UPDATE `gameobject` SET `rotation0`=0.0752997, `rotation1`=-0.0983257, `rotation2`=-0.948325, `rotation3`=0.292132 WHERE `guid`=77063; +UPDATE `gameobject` SET `rotation0`=0.0610685, `rotation1`=-0.00140285, `rotation2`=-0.973658, `rotation3`=0.219681 WHERE `guid`=77064; +UPDATE `gameobject` SET `rotation0`=0.10274, `rotation1`=0.0691566, `rotation2`=0.233692, `rotation3`=0.964391 WHERE `guid`=77065; +UPDATE `gameobject` SET `rotation0`=-0.00709391, `rotation1`=0.0064373, `rotation2`=-0.337871, `rotation3`=0.941144 WHERE `guid`=77066; +UPDATE `gameobject` SET `rotation0`=-0.00249577, `rotation1`=-0.00319576, `rotation2`=-0.374365, `rotation3`=0.927273 WHERE `guid`=77067; +UPDATE `gameobject` SET `rotation0`=-0.0212216, `rotation1`=-0.00836372, `rotation2`=-0.901033, `rotation3`=0.43315 WHERE `guid`=77068; +UPDATE `gameobject` SET `rotation0`=-0.0304646, `rotation1`=-0.00535011, `rotation2`=0.224893, `rotation3`=0.973893 WHERE `guid`=77069; +UPDATE `gameobject` SET `rotation0`=0.0292087, `rotation1`=0.0536489, `rotation2`=-0.250513, `rotation3`=0.966184 WHERE `guid`=77070; +UPDATE `gameobject` SET `rotation0`=0.0301409, `rotation1`=0.0531301, `rotation2`=-0.267338, `rotation3`=0.961665 WHERE `guid`=77071; +UPDATE `gameobject` SET `rotation0`=0.00539398, `rotation1`=0.0608454, `rotation2`=0.155528, `rotation3`=0.985941 WHERE `guid`=77072; +UPDATE `gameobject` SET `rotation0`=-0.030252, `rotation1`=0.00645065, `rotation2`=-0.156309, `rotation3`=0.987224 WHERE `guid`=77073; +UPDATE `gameobject` SET `rotation0`=-0.0722237, `rotation1`=-0.103849, `rotation2`=-0.5404, `rotation3`=0.831846 WHERE `guid`=77074; +UPDATE `gameobject` SET `rotation0`=-0.111862, `rotation1`=-0.0272312, `rotation2`=0.638226, `rotation3`=0.761192 WHERE `guid`=77075; +UPDATE `gameobject` SET `rotation0`=0.0662546, `rotation1`=0.000401497, `rotation2`=-0.44333, `rotation3`=0.893906 WHERE `guid`=77076; +UPDATE `gameobject` SET `rotation0`=0.0209198, `rotation1`=-0.00909042, `rotation2`=0.943409, `rotation3`=0.330846 WHERE `guid`=77077; +UPDATE `gameobject` SET `rotation0`=0.0432615, `rotation1`=-0.116046, `rotation2`=-0.992298, `rotation3`=0.00248976 WHERE `guid`=77078; +UPDATE `gameobject` SET `rotation0`=-0.017314, `rotation1`=-0.0256319, `rotation2`=0.856783, `rotation3`=0.514749 WHERE `guid`=77079; +UPDATE `gameobject` SET `rotation0`=0.0752997, `rotation1`=-0.0983257, `rotation2`=-0.948325, `rotation3`=0.292132 WHERE `guid`=77080; +UPDATE `gameobject` SET `rotation0`=-0.0569057, `rotation1`=0.0222044, `rotation2`=0.990073, `rotation3`=0.126585 WHERE `guid`=77081; +UPDATE `gameobject` SET `rotation0`=-0.0347595, `rotation1`=0.0502291, `rotation2`=0.750026, `rotation3`=0.658582 WHERE `guid`=77082; +UPDATE `gameobject` SET `rotation0`=0.054215, `rotation1`=0.0281439, `rotation2`=-0.747968, `rotation3`=0.660918 WHERE `guid`=77084; +UPDATE `gameobject` SET `rotation0`=-0.0417008, `rotation1`=-0.0521269, `rotation2`=0.321725, `rotation3`=0.944477 WHERE `guid`=77085; +UPDATE `gameobject` SET `rotation0`=0.0398989, `rotation1`=0.0486679, `rotation2`=-0.992964, `rotation3`=0.100311 WHERE `guid`=77086; +UPDATE `gameobject` SET `rotation0`=0.0630999, `rotation1`=0.000666618, `rotation2`=-0.699629, `rotation3`=0.711714 WHERE `guid`=77087; +UPDATE `gameobject` SET `rotation0`=-0.0131607, `rotation1`=-0.018631, `rotation2`=-0.516029, `rotation3`=0.856267 WHERE `guid`=77088; +UPDATE `gameobject` SET `rotation0`=-0.0579896, `rotation1`=0.0191956, `rotation2`=0.995341, `rotation3`=0.0745953 WHERE `guid`=77089; +UPDATE `gameobject` SET `rotation0`=0.122504, `rotation1`=0.0181885, `rotation2`=-0.204252, `rotation3`=0.971053 WHERE `guid`=77090; +UPDATE `gameobject` SET `rotation0`=-0.00862169, `rotation1`=-0.0253086, `rotation2`=0.382218, `rotation3`=0.923685 WHERE `guid`=77091; +UPDATE `gameobject` SET `rotation0`=-0.00204277, `rotation1`=0.12383, `rotation2`=0.936084, `rotation3`=0.329255 WHERE `guid`=77092; +UPDATE `gameobject` SET `rotation0`=-0.0325356, `rotation1`=0.0516987, `rotation2`=0.720584, `rotation3`=0.690672 WHERE `guid`=77093; +UPDATE `gameobject` SET `rotation0`=0.117485, `rotation1`=0.0391846, `rotation2`=-0.0325279, `rotation3`=0.991768 WHERE `guid`=77094; +UPDATE `gameobject` SET `rotation0`=-0.0286865, `rotation1`=-0.0115671, `rotation2`=0.422462, `rotation3`=0.905853 WHERE `guid`=77095; +UPDATE `gameobject` SET `rotation0`=-0.0347595, `rotation1`=0.0502291, `rotation2`=0.750026, `rotation3`=0.658582 WHERE `guid`=77096; +UPDATE `gameobject` SET `rotation0`=0.115664, `rotation1`=0.0442724, `rotation2`=0.0107622, `rotation3`=0.992243 WHERE `guid`=77098; +UPDATE `gameobject` SET `rotation0`=0.0202045, `rotation1`=0.0576458, `rotation2`=-0.0919485, `rotation3`=0.993888 WHERE `guid`=77100; +UPDATE `gameobject` SET `rotation0`=-0.0240259, `rotation1`=0.0194817, `rotation2`=-0.587462, `rotation3`=0.80866 WHERE `guid`=77101; +UPDATE `gameobject` SET `rotation0`=0.104515, `rotation1`=0.0664425, `rotation2`=0.208368, `rotation3`=0.970178 WHERE `guid`=77102; +UPDATE `gameobject` SET `rotation0`=-0.0216928, `rotation1`=-0.00705242, `rotation2`=-0.925796, `rotation3`=0.377336 WHERE `guid`=77103; +UPDATE `gameobject` SET `rotation0`=-0.0108008, `rotation1`=0.0601225, `rotation2`=0.409385, `rotation3`=0.910315 WHERE `guid`=77104; +UPDATE `gameobject` SET `rotation0`=0.0947957, `rotation1`=-0.0796976, `rotation2`=-0.862617, `rotation3`=0.490464 WHERE `guid`=77105; +UPDATE `gameobject` SET `rotation0`=-0.0227056, `rotation1`=-0.00477314, `rotation2`=-0.902395, `rotation3`=0.430284 WHERE `guid`=77106; +UPDATE `gameobject` SET `rotation0`=0.112294, `rotation1`=0.0522327, `rotation2`=0.0799513, `rotation3`=0.989075 WHERE `guid`=77107; +UPDATE `gameobject` SET `rotation0`=-0.056201, `rotation1`=0.0239315, `rotation2`=0.985746, `rotation3`=0.156757 WHERE `guid`=77108; +UPDATE `gameobject` SET `rotation0`=-0.0557747, `rotation1`=0.02491, `rotation2`=0.982861, `rotation3`=0.173936 WHERE `guid`=77109; +UPDATE `gameobject` SET `rotation0`=0.0610828, `rotation1`=0.000462532, `rotation2`=-0.966495, `rotation3`=0.249313 WHERE `guid`=77110; +UPDATE `gameobject` SET `rotation0`=-0.00352192, `rotation1`=-0.0307302, `rotation2`=0.99766, `rotation3`=0.0609785 WHERE `guid`=77111; +UPDATE `gameobject` SET `rotation0`=0.00512791, `rotation1`=0.0608683, `rotation2`=0.159828, `rotation3`=0.985253 WHERE `guid`=77112; +UPDATE `gameobject` SET `rotation0`=-0.012002, `rotation1`=0.00661659, `rotation2`=-0.896828, `rotation3`=0.442168 WHERE `guid`=77113; +UPDATE `gameobject` SET `rotation0`=0.123432, `rotation1`=0.0101376, `rotation2`=-0.267324, `rotation3`=0.955615 WHERE `guid`=77115; +UPDATE `gameobject` SET `rotation0`=0.0494599, `rotation1`=0.0358477, `rotation2`=-0.642063, `rotation3`=0.764214 WHERE `guid`=77116; +UPDATE `gameobject` SET `rotation0`=0.0607848, `rotation1`=0.00604916, `rotation2`=-0.939628, `rotation3`=0.336702 WHERE `guid`=77117; +UPDATE `gameobject` SET `rotation0`=0.018436, `rotation1`=0.0582361, `rotation2`=-0.0615549, `rotation3`=0.996233 WHERE `guid`=77118; +UPDATE `gameobject` SET `rotation0`=0.0467849, `rotation1`=-0.11467, `rotation2`=-0.991772, `rotation3`=0.0324174 WHERE `guid`=77119; +UPDATE `gameobject` SET `rotation0`=-0.00744295, `rotation1`=0.123623, `rotation2`=0.949555, `rotation3`=0.288109 WHERE `guid`=77120; +UPDATE `gameobject` SET `rotation0`=-0.00286865, `rotation1`=0.0480499, `rotation2`=-0.0607004, `rotation3`=0.996995 WHERE `guid`=77121; +UPDATE `gameobject` SET `rotation0`=0.0481787, `rotation1`=0.0375519, `rotation2`=-0.615001, `rotation3`=0.786157 WHERE `guid`=77122; +UPDATE `gameobject` SET `rotation0`=0.0488267, `rotation1`=0.036706, `rotation2`=-0.628628, `rotation3`=0.775304 WHERE `guid`=77123; +UPDATE `gameobject` SET `rotation0`=0.0292087, `rotation1`=0.0536489, `rotation2`=-0.250513, `rotation3`=0.966184 WHERE `guid`=77124; +UPDATE `gameobject` SET `rotation0`=-0.013176, `rotation1`=0.0279846, `rotation2`=-0.880445, `rotation3`=0.473139 WHERE `guid`=77125; +UPDATE `gameobject` SET `rotation0`=-0.0131526, `rotation1`=0.0596514, `rotation2`=0.444809, `rotation3`=0.89354 WHERE `guid`=77126; +UPDATE `gameobject` SET `rotation0`=0.0433717, `rotation1`=0.0282393, `rotation2`=-0.960958, `rotation3`=0.271813 WHERE `guid`=77127; +UPDATE `gameobject` SET `rotation0`=0.0501857, `rotation1`=-0.00143909, `rotation2`=-0.956716, `rotation3`=0.286661 WHERE `guid`=77128; +UPDATE `gameobject` SET `rotation0`=0.0460067, `rotation1`=0.0250292, `rotation2`=-0.89929, `rotation3`=0.434205 WHERE `guid`=77129; +UPDATE `gameobject` SET `rotation0`=-0.0043478, `rotation1`=-0.0223913, `rotation2`=-0.118811, `rotation3`=0.992655 WHERE `guid`=77130; +UPDATE `gameobject` SET `rotation0`=-0.0251698, `rotation1`=0.0179787, `rotation2`=-0.537, `rotation3`=0.843015 WHERE `guid`=77131; +UPDATE `gameobject` SET `rotation0`=-0.0507507, `rotation1`=0.0339947, `rotation2`=0.939208, `rotation3`=0.337871 WHERE `guid`=77132; +UPDATE `gameobject` SET `rotation0`=-0.0164309, `rotation1`=0.0143499, `rotation2`=-0.612422, `rotation3`=0.79023 WHERE `guid`=77133; +UPDATE `gameobject` SET `rotation0`=0.150003, `rotation1`=-0.0637999, `rotation2`=-0.505119, `rotation3`=0.847516 WHERE `guid`=77134; +UPDATE `gameobject` SET `rotation0`=0.00594473, `rotation1`=-0.00461292, `rotation2`=-0.170579, `rotation3`=0.985315 WHERE `guid`=77135; +UPDATE `gameobject` SET `rotation0`=0.0518498, `rotation1`=0.0100574, `rotation2`=-0.229643, `rotation3`=0.971841 WHERE `guid`=77136; +UPDATE `gameobject` SET `rotation0`=-0.00587082, `rotation1`=-0.0157957, `rotation2`=0.394556, `rotation3`=0.918717 WHERE `guid`=77137; +UPDATE `gameobject` SET `rotation0`=0.0170288, `rotation1`=0.0472221, `rotation2`=0.659506, `rotation3`=0.750021 WHERE `guid`=77138; +UPDATE `gameobject` SET `rotation0`=0.030128, `rotation1`=0.027483, `rotation2`=0.0691519, `rotation3`=0.996772 WHERE `guid`=77139; +UPDATE `gameobject` SET `rotation0`=0.0950837, `rotation1`=0.0810518, `rotation2`=-0.0570211, `rotation3`=0.990524 WHERE `guid`=77140; +UPDATE `gameobject` SET `rotation0`=0.0844626, `rotation1`=-0.139417, `rotation2`=-0.905103, `rotation3`=0.392706 WHERE `guid`=77141; +UPDATE `gameobject` SET `rotation0`=0.151325, `rotation1`=-0.118515, `rotation2`=-0.150674, `rotation3`=0.969718 WHERE `guid`=77142; +UPDATE `gameobject` SET `rotation0`=-0.0991616, `rotation1`=-0.199687, `rotation2`=0.920929, `rotation3`=0.319659 WHERE `guid`=77143; +UPDATE `gameobject` SET `rotation0`=0.207263, `rotation1`=-0.123673, `rotation2`=-0.118627, `rotation3`=0.963159 WHERE `guid`=77144; +UPDATE `gameobject` SET `rotation0`=0.0850377, `rotation1`=-0.117254, `rotation2`=0.617311, `rotation3`=0.773271 WHERE `guid`=77145; +UPDATE `gameobject` SET `rotation0`=0.111181, `rotation1`=-0.132936, `rotation2`=0.250117, `rotation3`=0.95258 WHERE `guid`=77146; +UPDATE `gameobject` SET `rotation0`=-0.0618968, `rotation1`=-0.172729, `rotation2`=0.751708, `rotation3`=0.633458 WHERE `guid`=77147; +UPDATE `gameobject` SET `rotation0`=0.329918, `rotation1`=-0.0781288, `rotation2`=-0.556777, `rotation3`=0.75832 WHERE `guid`=77148; +UPDATE `gameobject` SET `rotation0`=0.100191, `rotation1`=-0.175282, `rotation2`=0.773164, `rotation3`=0.601212 WHERE `guid`=77149; +UPDATE `gameobject` SET `rotation0`=0.206481, `rotation1`=0.0967264, `rotation2`=-0.923958, `rotation3`=0.307102 WHERE `guid`=77150; +UPDATE `gameobject` SET `rotation0`=0.254753, `rotation1`=0.0382614, `rotation2`=-0.822841, `rotation3`=0.506528 WHERE `guid`=77151; +UPDATE `gameobject` SET `rotation0`=-0.0221047, `rotation1`=-0.302703, `rotation2`=0.907742, `rotation3`=0.289634 WHERE `guid`=77152; +UPDATE `gameobject` SET `rotation0`=-0.0450306, `rotation1`=0.244809, `rotation2`=-0.821506, `rotation3`=0.513 WHERE `guid`=77157; +UPDATE `gameobject` SET `rotation0`=-0.0161185, `rotation1`=0.160583, `rotation2`=-0.973068, `rotation3`=0.164595 WHERE `guid`=77158; +UPDATE `gameobject` SET `rotation0`=-0.0171127, `rotation1`=-0.0166779, `rotation2`=-0.997555, `rotation3`=0.065677 WHERE `guid`=77159; +UPDATE `gameobject` SET `rotation0`=-0.00719595, `rotation1`=-0.0719738, `rotation2`=0.1419, `rotation3`=0.987235 WHERE `guid`=77160; +UPDATE `gameobject` SET `rotation0`=-0.00724554, `rotation1`=-0.0421524, `rotation2`=0.532355, `rotation3`=0.84544 WHERE `guid`=77161; +UPDATE `gameobject` SET `rotation0`=-0.0255208, `rotation1`=0.0302401, `rotation2`=-0.189908, `rotation3`=0.981004 WHERE `guid`=77162; +UPDATE `gameobject` SET `rotation0`=0.0435467, `rotation1`=-0.011776, `rotation2`=-0.852303, `rotation3`=0.5211 WHERE `guid`=77163; +UPDATE `gameobject` SET `rotation0`=-0.0274987, `rotation1`=0.0110216, `rotation2`=0.675546, `rotation3`=0.736723 WHERE `guid`=77164; +UPDATE `gameobject` SET `rotation0`=0.0167489, `rotation1`=-0.000976563, `rotation2`=0.457918, `rotation3`=0.888836 WHERE `guid`=77165; +UPDATE `gameobject` SET `rotation0`=0.0871139, `rotation1`=0.0415649, `rotation2`=0.890839, `rotation3`=0.443948 WHERE `guid`=77167; +UPDATE `gameobject` SET `rotation0`=0.0360966, `rotation1`=-0.0301628, `rotation2`=-0.845136, `rotation3`=0.532478 WHERE `guid`=77168; +UPDATE `gameobject` SET `rotation0`=0.089571, `rotation1`=-0.177974, `rotation2`=0.654187, `rotation3`=0.729617 WHERE `guid`=77174; +UPDATE `gameobject` SET `rotation0`=0.014946, `rotation1`=0.0937176, `rotation2`=0.917232, `rotation3`=0.386885 WHERE `guid`=77176; +UPDATE `gameobject` SET `rotation0`=0.107347, `rotation1`=-0.11599, `rotation2`=-0.80059, `rotation3`=0.577996 WHERE `guid`=77177; +UPDATE `gameobject` SET `rotation0`=0.0979347, `rotation1`=-0.0203876, `rotation2`=-0.907374, `rotation3`=0.408246 WHERE `guid`=77178; +UPDATE `gameobject` SET `rotation0`=0.0107517, `rotation1`=0.0785532, `rotation2`=0.764607, `rotation3`=0.639601 WHERE `guid`=77179; +UPDATE `gameobject` SET `rotation0`=0.0792899, `rotation1`=0.0916252, `rotation2`=0.283839, `rotation3`=0.951185 WHERE `guid`=77181; +UPDATE `gameobject` SET `rotation0`=-0.0802469, `rotation1`=0.152781, `rotation2`=0.968978, `rotation3`=0.176919 WHERE `guid`=77182; +UPDATE `gameobject` SET `rotation0`=0.00961256, `rotation1`=0.117995, `rotation2`=0.961841, `rotation3`=0.246673 WHERE `guid`=77183; +UPDATE `gameobject` SET `rotation0`=0.104968, `rotation1`=0.15615, `rotation2`=-0.58289, `rotation3`=0.790467 WHERE `guid`=77184; +UPDATE `gameobject` SET `rotation0`=0.0362058, `rotation1`=0.120889, `rotation2`=-0.777025, `rotation3`=0.61669 WHERE `guid`=77185; +UPDATE `gameobject` SET `rotation0`=0.0951447, `rotation1`=-0.0871191, `rotation2`=-0.991632, `rotation3`=0.00477168 WHERE `guid`=77186; +UPDATE `gameobject` SET `rotation0`=0.0418429, `rotation1`=0.0310535, `rotation2`=0.994143, `rotation3`=0.094686 WHERE `guid`=77188; +UPDATE `gameobject` SET `rotation0`=-0.019105, `rotation1`=0.0849142, `rotation2`=0.25337, `rotation3`=0.963446 WHERE `guid`=77189; +UPDATE `gameobject` SET `rotation0`=0.00263071, `rotation1`=0.0212584, `rotation2`=0.99977, `rotation3`=0 WHERE `guid`=87974; +UPDATE `gameobject` SET `rotation0`=-0.00499153, `rotation1`=-0.0433273, `rotation2`=-0.976177, `rotation3`=0.212546 WHERE `guid`=100099; +UPDATE `gameobject` SET `rotation0`=-0.0704336, `rotation1`=-0.0118895, `rotation2`=0.615775, `rotation3`=0.784678 WHERE `guid`=100111; +UPDATE `gameobject` SET `rotation0`=0.0625167, `rotation1`=0.0988617, `rotation2`=0.0627174, `rotation3`=0.991153 WHERE `guid`=100113; +UPDATE `gameobject` SET `rotation0`=-0.0152206, `rotation1`=0.015625, `rotation2`=-0.156172, `rotation3`=0.987489 WHERE `guid`=100130; +UPDATE `gameobject` SET `rotation0`=-0.00867891, `rotation1`=0.000911713, `rotation2`=0.659348, `rotation3`=0.751787 WHERE `guid`=100131; +UPDATE `gameobject` SET `rotation0`=-0.00436258, `rotation1`=0.00755692, `rotation2`=0.0654306, `rotation3`=0.997819 WHERE `guid`=100133; +UPDATE `gameobject` SET `rotation0`=-0.00864697, `rotation1`=0.00117683, `rotation2`=0.636083, `rotation3`=0.771572 WHERE `guid`=100134; +UPDATE `gameobject` SET `rotation0`=0.0196276, `rotation1`=0.00951958, `rotation2`=-0.971087, `rotation3`=0.237725 WHERE `guid`=100136; +UPDATE `gameobject` SET `rotation0`=0.161899, `rotation1`=-0.411941, `rotation2`=0.241236, `rotation3`=0.863655 WHERE `guid`=100137; +UPDATE `gameobject` SET `rotation0`=0.644176, `rotation1`=-0.0210094, `rotation2`=0.761547, `rotation3`=0.0681314 WHERE `guid`=100141; +UPDATE `gameobject` SET `rotation0`=-0.0734706, `rotation1`=-0.56757, `rotation2`=-0.0934219, `rotation3`=0.814702 WHERE `guid`=100142; +UPDATE `gameobject` SET `rotation0`=-0.630999, `rotation1`=-0.218625, `rotation2`=-0.702788, `rotation3`=0.245218 WHERE `guid`=100144; +UPDATE `gameobject` SET `rotation0`=-0.107858, `rotation1`=-0.0487566, `rotation2`=-0.101926, `rotation3`=0.987725 WHERE `guid`=100450; +UPDATE `gameobject` SET `rotation0`=-0.0390229, `rotation1`=0.111322, `rotation2`=0.748832, `rotation3`=0.652178 WHERE `guid`=100451; +UPDATE `gameobject` SET `rotation0`=-0.0379386, `rotation1`=-0.156926, `rotation2`=-0.957411, `rotation3`=0.239373 WHERE `guid`=100452; +UPDATE `gameobject` SET `rotation0`=-0.180747, `rotation1`=0.0777254, `rotation2`=-0.015399, `rotation3`=0.980333 WHERE `guid`=100453; +UPDATE `gameobject` SET `rotation0`=-0.139477, `rotation1`=-0.0323668, `rotation2`=-0.199125, `rotation3`=0.969457 WHERE `guid`=100454; +UPDATE `gameobject` SET `rotation0`=-0.097249, `rotation1`=-0.0870361, `rotation2`=-0.955737, `rotation3`=0.263693 WHERE `guid`=100455; +UPDATE `gameobject` SET `rotation0`=0.072156, `rotation1`=-0.202436, `rotation2`=-0.864216, `rotation3`=0.454911 WHERE `guid`=100456; +UPDATE `gameobject` SET `rotation0`=-0.105731, `rotation1`=-0.0683603, `rotation2`=-0.0585232, `rotation3`=0.990315 WHERE `guid`=100457; +UPDATE `gameobject` SET `rotation0`=0.00770569, `rotation1`=0.0736351, `rotation2`=-0.67674, `rotation3`=0.73249 WHERE `guid`=100458; +UPDATE `gameobject` SET `rotation0`=-0.11402, `rotation1`=-0.16656, `rotation2`=0.159782, `rotation3`=0.966295 WHERE `guid`=100459; +UPDATE `gameobject` SET `rotation0`=-0.0164127, `rotation1`=-0.0513248, `rotation2`=0.0741091, `rotation3`=0.995793 WHERE `guid`=100461; +UPDATE `gameobject` SET `rotation0`=0.137686, `rotation1`=-0.0460796, `rotation2`=-0.409542, `rotation3`=0.900663 WHERE `guid`=100462; +UPDATE `gameobject` SET `rotation0`=0.00110674, `rotation1`=0.0625811, `rotation2`=0.691717, `rotation3`=0.719451 WHERE `guid`=100463; +UPDATE `gameobject` SET `rotation0`=-0.136161, `rotation1`=0.0206881, `rotation2`=-0.976232, `rotation3`=0.167344 WHERE `guid`=100464; +UPDATE `gameobject` SET `rotation0`=-0.151397, `rotation1`=0.19665, `rotation2`=-0.201186, `rotation3`=0.947593 WHERE `guid`=100465; +UPDATE `gameobject` SET `rotation0`=-0.0643306, `rotation1`=0.0673084, `rotation2`=-0.461115, `rotation3`=0.882442 WHERE `guid`=100466; +UPDATE `gameobject` SET `rotation0`=0.171546, `rotation1`=0.0245619, `rotation2`=-0.0352268, `rotation3`=0.98424 WHERE `guid`=100467; +UPDATE `gameobject` SET `rotation0`=-0.0134768, `rotation1`=-0.0521717, `rotation2`=0.130445, `rotation3`=0.98999 WHERE `guid`=100468; +UPDATE `gameobject` SET `rotation0`=-0.00244284, `rotation1`=0.0625439, `rotation2`=0.731393, `rotation3`=0.679078 WHERE `guid`=100469; +UPDATE `gameobject` SET `rotation0`=-0.162303, `rotation1`=0.187751, `rotation2`=-0.147141, `rotation3`=0.957474 WHERE `guid`=100470; +UPDATE `gameobject` SET `rotation0`=0.169878, `rotation1`=0.0342474, `rotation2`=0.0206289, `rotation3`=0.984654 WHERE `guid`=100471; +UPDATE `gameobject` SET `rotation0`=0.0185976, `rotation1`=0.0620785, `rotation2`=-0.88506, `rotation3`=0.460943 WHERE `guid`=100473; +UPDATE `gameobject` SET `rotation0`=0.0269089, `rotation1`=0.00610161, `rotation2`=-0.999321, `rotation3`=0.0244177 WHERE `guid`=151140; +UPDATE `gameobject` SET `rotation0`=-0.0320468, `rotation1`=-0.0343475, `rotation2`=0.725892, `rotation3`=0.686203 WHERE `guid`=151141; +UPDATE `gameobject` SET `rotation0`=0.021595, `rotation1`=-0.0220261, `rotation2`=0.904034, `rotation3`=0.426347 WHERE `guid`=151142; +UPDATE `gameobject` SET `rotation0`=0.0010438, `rotation1`=0.0539341, `rotation2`=-0.0478249, `rotation3`=0.997398 WHERE `guid`=151293; +UPDATE `gameobject` SET `rotation0`=0.0864091, `rotation1`=0.0250797, `rotation2`=-0.416438, `rotation3`=0.904701 WHERE `guid`=151893; +UPDATE `gameobject` SET `rotation0`=-0.0144057, `rotation1`=0.0048542, `rotation2`=-0.459116, `rotation3`=0.888246 WHERE `guid`=151894; diff --git a/sql/updates/world/3.3.5/2016_07_31_00_world_335.sql b/sql/updates/world/3.3.5/2016_07_31_00_world_335.sql new file mode 100644 index 00000000000..9a87de56977 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_31_00_world_335.sql @@ -0,0 +1,47 @@ +-- SmartAI script for creature entry 9528 Arathandris Silversky and 9529 Maybess Riverbreeze +SET @Arathandris := 9528; +SET @Riverbreeze := 9529; + +UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`= '' WHERE `entry` IN (@Arathandris,@Riverbreeze); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Arathandris,@Riverbreeze) AND `source_type`= 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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@Arathandris,0, 0,1, 62,0,100,0, 2208,0,0,0, 72, 0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Arathandris Silversky - On Gossip 2208 Option 0 selected - Close Gossip'), +(@Arathandris,0, 1,2, 61,0,100,0, 0,0,0,0, 11,15120,0,0,0,0,0,7,0,0,0,0,0,0,0,"Arathandris Silversky - On Gossip 2208 Option 0 selected - Cast 'Cenarion Beacon'"), +(@Arathandris,0, 2,0, 61,0,100,0, 0,0,0,0, 1, 0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Arathandris Silversky - On Gossip 2208 Option 0 Selected - Say Line 0'), +(@Riverbreeze,0, 0,1, 62,0,100,0,21400,0,0,0, 72, 0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Maybess Riverbreeze - On Gossip 21400 Option 0 Selected - Close Gossip'), +(@Riverbreeze,0, 1,2, 61,0,100,0, 0,0,0,0, 11,15120,0,0,0,0,0,7,0,0,0,0,0,0,0,"Maybess Riverbreeze - On Gossip 21400 Option 0 Selected - Cast 'Cenarion Beacon'"), +(@Riverbreeze,0, 2,0, 61,0,100,0, 0,0,0,0, 1, 0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Maybess Riverbreeze - On Gossip 21400 Option 0 Selected - Say Line 0'); + +-- insert missing gossip_menu entries +DELETE FROM `gossip_menu` WHERE `entry` IN (2209, 21401) AND `text_id` IN (3046, 3047); +INSERT INTO `gossip_menu` (`entry`,`text_id`,`VerifiedBuild`) VALUES +(2209, 3046, 0), +(21401, 3047, 0); + +UPDATE `gossip_menu_option` SET `action_menu_id` = 2209 WHERE `menu_id` = 2208 AND `OptionBroadcastTextID`= 5384; +UPDATE `gossip_menu_option` SET `action_menu_id`= 21401 WHERE `menu_id`= 21400 AND `OptionBroadcastTextID`= 5384; + +DELETE FROM `creature_text` WHERE `entry` IN (@Arathandris,@Riverbreeze); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(@Riverbreeze,0,0,'Here is a beacon for you, $n. You must keep it in your possession if you are to find the corrupted items we will need.',12,1,100,25,5000,0,5244,0,'Arathandris Silversky - SAY_BEACON'), +(@Arathandris,0,0,'Here is a beacon for you, $n. You must keep it in your possession if you are to find the corrupted items we will need.',12,7,100,25,5000,0,5245,0,'Arathandris Silversky - SAY_BEACON'); + +-- conditions for Arathandris Silversky's and Maybess Riverbreeze's gossip menus +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 14 AND `SourceGroup`= 21400 AND `SourceEntry` IN (2842,2843,2849); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(14, 21400, 2842, 0, 0, 8, 0, 4102, 0, 0, 1, 0, 0, '', 'Maybess Riverbreeze - Show gossip text if player has not been rewarded quest 4102'), +(14, 21400, 2843, 0, 0, 6, 0, 469, 0, 0, 0, 0, 0, '', 'Maybess Riverbreeze - Show gossip text if player is alliance'), +(14, 21400, 2849, 0, 0, 8, 0, 4102, 0, 0, 0, 0, 0, '', 'Maybess Riverbreeze - Show gossip text if player has been rewarded quest 4102'); + +-- Correct some wrong quest IDs and NPC texts +UPDATE `conditions` SET `ConditionValue1`= 4101 WHERE `SourceGroup`= 2208 AND `ConditionValue1`= 3781; +UPDATE `conditions` SET `ConditionValue1`= 4102 WHERE `SourceGroup`= 21400 AND `ConditionValue1`= 3781; +UPDATE `conditions` SET `SourceEntry`= 2845 WHERE `SourceTypeOrReferenceId`= 14 AND `SourceGroup`= 2208 AND `SourceEntry`= 2848; +UPDATE `conditions` SET `SourceEntry`= 2848 WHERE `SourceTypeOrReferenceId`= 14 AND `SourceGroup`= 2208 AND `SourceEntry`= 2845 AND `ConditionValue1`= 4101; + +-- Condition for source GOSSIP MENU OPTION condition type ITEM, item 11511 Cenarion Beacon +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup` IN (2208,21400) AND `SourceEntry`= 0 AND `SourceId`= 0 AND `NegativeCondition`= 1; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15, 2208,0,0,0, 2,0, 11511,1, 0,1,0,0,'','Do not show gossip menu 2208 option id 0 if player has 1 of Cenarion Beacon in bags or bank.'), +(15,21400,0,0,0, 2,0, 11511,1, 0,1,0,0,'','Do not show gossip menu 21400 option id 0 if player has 1 of Cenarion Beacon in bags or bank.'); diff --git a/sql/updates/world/3.3.5/2016_07_31_01_world.sql b/sql/updates/world/3.3.5/2016_07_31_01_world.sql new file mode 100644 index 00000000000..3fb22dfd09f --- /dev/null +++ b/sql/updates/world/3.3.5/2016_07_31_01_world.sql @@ -0,0 +1,2 @@ +-- Pristine Glowbear Pelt +UPDATE `item_template` SET `DisenchantID`=54 WHERE `entry`=51958; diff --git a/sql/updates/world/3.3.5/2016_08_01_01_world.sql b/sql/updates/world/3.3.5/2016_08_01_01_world.sql new file mode 100644 index 00000000000..327e58bf5c9 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_01_01_world.sql @@ -0,0 +1,88 @@ +DELETE FROM `creature_summon_groups` WHERE `summonerId`=22841; -- Shade of Akama +INSERT INTO `creature_summon_groups` (`summonerId`,`summonerType`,`groupId`,`entry`,`position_x`,`position_y`,`position_z`,`orientation`,`summonType`,`summonTime`) VALUES +(22841,0,1,23421,443.495,413.973,118.621,5.13127 ,6,6000),-- Ashtongue Channeler +(22841,0,1,23421,456.694,414.117,118.621,4.2586 ,6,6000), +(22841,0,1,23421,457.763,390.117,118.621,2.25148 ,6,6000), +(22841,0,1,23421,444.153,389.214,118.621,1.0821 ,6,6000), +(22841,0,1,23421,438.279,401.258,118.621,0.017453,6,6000), +(22841,0,1,23421,463.186,401.64 ,118.621,3.19395 ,6,6000), +(22841,0,1,23191,547.186,400.534,112.867,3.12414 ,8, 0); -- Akama + +DELETE FROM `creature` WHERE `id` IN (23191,23421); + +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_shade_soul_channel_serverside','spell_shade_soul_channel'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(40401,'spell_shade_soul_channel_serverside'), +(40520,'spell_shade_soul_channel'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=40902; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,2,40902,0,1,31,0,3,22841,0,0,0,0,'','Effect_1 - Hits Shade of Akama'), +(13,4,40902,0,2,31,0,3,23351,0,0,0,0,'','Effect_2 - Hits Trigger'); + +UPDATE `creature_template` SET `mechanic_immune_mask`=618610687 WHERE `entry`=23215; -- Ashtongue Sorcerer Immunity +UPDATE `creature_template` SET `ScriptName`='npc_ashtongue_broken' WHERE `entry`=23319; +UPDATE `creature_template` SET `speed_run`=0.571429 WHERE `entry`=22841; + +DELETE FROM `creature_text` WHERE `entry`=23191 AND `groupid` IN (3,4); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(23191,3,0,'I will not last much longer!',14,0,100,0,0,11385,21784,0,'Akama SAY_LOW_HEALTH'), +(23191,4,0,'No! Not yet!',14,0,100,0,0,11386,21785,0,'Akama SAY_DEAD'); + +-- Waypoints + +-- Middle Creatures +SET @NPC := 12806; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=489.6115,`position_y`=407.0968,`position_z`=112.7839 WHERE `guid`=@NPC; +UPDATE `creature` SET `MovementType`=0, `spawndist`=0 WHERE `guid`=12805; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,489.6115,407.0968,112.7839,0,0,0,0,100,0), +(@PATH,2,521.2068,407.0993,112.7837,0,0,0,0,100,0); +DELETE FROM `creature_formations` WHERE `leaderGUID`=@NPC; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(@NPC,@NPC ,0, 0,1,0,0), +(@NPC,12805,6,90,2,1,2); + +-- Side Creatures +SET @NPC := 12780; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=528.3928,`position_y`=429.879,`position_z`=113.0337 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,528.3928, 429.879,113.0337,0,0,0,0,100,0), +(@PATH,2, 506.946,432.0048,113.0337,0,0,0,0,100,0), +(@PATH,3,500.5693,414.4586,113.0338,0,0,0,0,100,0), +(@PATH,4, 506.946,432.0048,113.0337,0,0,0,0,100,0); + +SET @NPC := 12782; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=516.83,`position_y`=368.9177,`position_z`=113.0337 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@NPC,@PATH,0,0,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1, 501.718,381.9136,113.0337,0,0,0,0,100,0), +(@PATH,2, 507.699,369.5598,113.0337,0,0,0,0,100,0), +(@PATH,3,527.0941,372.4955,113.0337,0,0,0,0,100,0), +(@PATH,4, 507.699,369.5598,113.0337,0,0,0,0,100,0); + +UPDATE `creature` SET `MovementType`=0, `spawndist`=0 WHERE `guid` IN (12804,12814,12791,12807,12815,12793); +DELETE FROM `creature_formations` WHERE `leaderGUID` IN (12780,12782); +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`, `point_1`, `point_2`) VALUES +(12780,12780,0, 0,1,0,0), +(12780,12804,5, 30,1,3,1), +(12780,12814,8, 45,1,3,1), +(12780,12791,5,315,1,3,1), +(12782,12782,0, 0,1,0,0), +(12782,12807,5,290,1,1,3), +(12782,12815,8,315,1,1,3), +(12782,12793,5, 45,1,1,3); diff --git a/sql/updates/world/3.3.5/2016_08_02_00_world.sql b/sql/updates/world/3.3.5/2016_08_02_00_world.sql new file mode 100644 index 00000000000..a5fe8c29c3e --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_02_00_world.sql @@ -0,0 +1,82 @@ +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`IN(25769,24730,25456,25457,25458); +UPDATE `creature_template` SET `unit_flags`=33555200 WHERE `entry`=25769; +UPDATE `creature_template` SET `unit_flags`=33587968 WHERE `entry`IN(25456,25457); +UPDATE `creature_template` SET `unit_flags`=33555200 WHERE `entry`IN(25458); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(25769,24730,25456,25457,25458) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(2574201,2473000,2545600,2545800) AND `source_type`=9; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(25769,24730) AND `source_type`=0; + +DELETE FROM `smart_scripts` WHERE `entryorguid` =25742 AND `source_type`=0 AND `id`=2; + +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(24730, 0, 0, 0, 20, 0, 100, 0, 11695, 0, 0, 0, 80, 2473000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Wind Tamer Barah - On Quest Reward (The Horn of Elemental Fury) - Run Script'), +(25769, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 11, 45979, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Small Elemental - On Just Summoned - Cast Elemental Beam'), +(25769, 0, 1, 2, 1, 0, 100, 1, 8000, 8000, 0, 0, 28, 45979, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Small Elemental - OOC (8 Sec) - Remove Aura'), +(25769, 0, 2, 0, 61, 0, 100, 1, 0, 0, 0, 0, 90, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Small Elemental - OOC (8 Sec) - Set Bytes 1'), +(25742, 0, 2, 0, 54, 0, 100, 1, 0, 0, 0, 0, 80, 2574201, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alluvius - On Just Summoned - Run Script 2'), +(2574201, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 5, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Alluvius - Script 2 - Play emote OneShotAttackUnarmed'), +(2574201, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 24730, 0, 0, 0, 0, 0, 0, 'Alluvius - Script 2 - Say Line 0'), +(2473000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Wind Tamer Barah - Script - Set NPC Flags'), +(2473000, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 11, 43320, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Wind Tamer Barah - Script - Cast Windwarden Channeling'), +(2473000, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 25771, 1, 12000, 0, 0, 0, 8, 0, 0, 0, 3526.857, 4215.892, 16.89778, 0.9599311, 'Wind Tamer Barah - Script - Summon Ice Elemental Target'), +(2473000, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 25769, 1, 10000, 0, 0, 0, 8, 0, 0, 0, 3526.76, 4208.782, 12.51583, 0.9599311, 'Wind Tamer Barah - Script - Summon Small Elemental'), +(2473000, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 25769, 1, 10000, 0, 0, 0, 8, 0, 0, 0, 3530.082, 4210.271, 12.5575, 1.029744, 'Wind Tamer Barah - Script - Summon Small Elemental'), +(2473000, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 25769, 1, 10000, 0, 0, 0, 8, 0, 0, 0, 3533.227, 4213.772, 12.55055, 2.80998, 'Wind Tamer Barah - Script - Summon Small Elemental'), +(2473000, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 25769, 1, 10000, 0, 0, 0, 8, 0, 0, 0, 3531.661, 4218.423, 12.57833, 0.9250245, 'Wind Tamer Barah - Script - Summon Small Elemental'), +(2473000, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 25769, 1, 10000, 0, 0, 0, 8, 0, 0, 0, 3528.847, 4221.306, 12.52278, 2.75762, 'Wind Tamer Barah - Script - Summon Small Elemental'), +(2473000, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 25769, 1, 10000, 0, 0, 0, 8, 0, 0, 0, 3524.509, 4220.787, 12.59916, 3.630285, 'Wind Tamer Barah - Script - Summon Small Elemental'), +(2473000, 9, 9, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 12, 25742, 1, 7000, 0, 0, 0, 8, 0, 0, 0, 3526.815, 4215.751, 13.3075, 3.752458, 'Wind Tamer Barah - Script - Summon Alluvius'), +(2473000, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 92,0, 43320, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Wind Tamer Barah - Script - Remove Aura'), +(2473000, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Wind Tamer Barah - Script - Set NPC Flags'), +(25458, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 53, 0, 25458, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vision of Farseer Grimwalkers Spirit - On Just Summoned - Start WP'), +(25458, 0, 1, 0, 40, 0, 100, 0, 2, 25458, 0, 0, 80, 2545800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vision of Farseer Grimwalkers Spirit - On Reached WP2 - Run Script'), +(25457, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 11, 45581, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vision of Magmoth Shaman - On Data Set - Cast Spirit Shackle'), +(25456, 0, 0, 2, 54, 0, 100, 0, 0, 0, 0, 0, 53, 0, 25456, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vision of Kaganishu - On Just Summoned - Start WP'), +(25456, 0, 1, 0, 40, 0, 100, 0, 2, 25456, 0, 0, 80, 2545600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vision of Kaganishu - On Reached WP2 - Run Script'), +(25456, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 50, 187679, 14, 0, 0, 0, 0, 8, 0, 0, 0, 4528.167, 5678.6, 82.23339, 0.6283169, 'Vision of Kaganishu - On Just Summoned - Spawn Blue aura, short column, scale 6'), +(2545600, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 11, 45595, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vision of Kaganishu - Script - Cast Fireball'), +(2545600, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vision of Kaganishu - Script - Say'), +(2545800, 9, 0, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 25457, 0, 40, 0, 0, 0, 0, 'Vision of Farseer Grimwalkers Spirit - Script - Set Data on Vision of Magmoth Shaman'), -- 21:09:47.563 +(2545800, 9, 1, 0, 0, 0, 100, 0, 500, 500, 0, 0, 17, 383, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vision of Farseer Grimwalkers Spirit - Script - Set Emote State'), -- 21:09:47.563 +(2545800, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 25339, 0, 0, 0, 0, 0, 0, 'Vision of Farseer Grimwalkers Spirit - Script - Say Line 0'), -- 21:09:44.297 +(2545800, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 45605, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vision of Farseer Grimwalkers Spirit - Script - Cast Vision of Air: Kill Credit'); -- 21:09:57.953 + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`IN(45979,45581); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=30886 AND `source_type`=0 AND `id`=1; + +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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(30886, 0, 1, 0, 54, 0, 100, 0, 0, 0, 0, 0, 29, 0, 0, 30232, 0, 1, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Subjugated Iskalder - Out of Combat - Start Follow Invoker'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=25742; + +DELETE FROM `creature_text` WHERE `entry`IN(24730,25339,25456); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(24730, 0, 0, 'With the power of the horn, I bind you to its wielder''s will!', 12, 0, 100, 0, 0, 0, 24963, 'Wind Tamer Barah to Player'), +(25339, 0, 0, 'Oh no... they''ve shackled his spirit!', 12, 1, 100, 5, 0, 0, 24683, 'Spirit Talker Snarlfang'), +(25456, 0, 0, 'KAGANISHU!', 12, 0, 100, 0, 0, 0, 24658, 'Vision of Kaganishu'); + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 45979, 0, 0, 31, 0, 3, 25771, 0, 0, 0, 0, '', 'Elemental Beam only targets Ice Elemental Target'), +(13, 1, 45581, 0, 0, 31, 0, 3, 25458, 0, 0, 0, 0, '', 'Spirit Shackle only targets Vision of Farseer Grimwalkers Spirit'), +(22, 1, 25742, 0, 0, 23, 1, 4037, 0, 0, 1, 0, 0, '', 'Alluvius - Only Run SAI if not summoned in Taunka le village'), +(22, 4, 25742, 0, 0, 23, 1, 4037, 0, 0, 0, 0, 0, '', 'Alluvius - Only Run SAI if summoned in Taunka le village'); + + +DELETE FROM `waypoints` WHERE `entry`IN(25456,25458); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(25456, 1, 4525.928, 5677.233, 81.70667, 'Vision of Kaganishu'), +(25456, 2, 4527.502, 5678.359, 81.88042, 'Vision of Kaganishu'), +(25458, 1, 4528.928, 5679.599, 81.99405, 'Vision of Farseer Grimwalkers Spirit'), +(25458, 2, 4528.823, 5679.591, 83.10519, 'Vision of Farseer Grimwalkers Spirit'); + +DELETE FROM `event_scripts` WHERE `id`=16716; +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES +(16716, 5, 10, 25424, 16000, 0, 4529.002, 5679.642, 82.36562, 3.769911), +(16716, 6, 10, 25457, 15000, 0, 4528.024, 5680.72, 82.29639, 5.497787), +(16716, 6, 10, 25457, 15000, 0, 4530.323, 5680.649, 82.45662, 3.769911), +(16716, 6, 10, 25457, 15000, 0, 4529.922, 5678.596, 82.38788, 2.286381), +(16716, 7, 10, 25456, 14000, 0, 4525.962, 5677.239, 82.14642, 0.6290413), +(16716, 12, 10,25458, 9000, 0, 4528.883, 5679.529, 82.23911, 0.6290413); diff --git a/sql/updates/world/3.3.5/2016_08_03_00_world.sql b/sql/updates/world/3.3.5/2016_08_03_00_world.sql new file mode 100644 index 00000000000..ee9a582d083 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_08_03_00_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `creature_addon` WHERE `guid`=84716; diff --git a/src/common/Collision/DynamicTree.cpp b/src/common/Collision/DynamicTree.cpp index 5d2e18b1a2e..111606644de 100644 --- a/src/common/Collision/DynamicTree.cpp +++ b/src/common/Collision/DynamicTree.cpp @@ -248,7 +248,7 @@ bool DynamicMapTree::isInLineOfSight(float x1, float y1, float z1, float x2, flo float DynamicMapTree::getHeight(float x, float y, float z, float maxSearchDist, uint32 phasemask) const { - G3D::Vector3 v(x, y, z); + G3D::Vector3 v(x, y, z + 0.5f); G3D::Ray r(v, G3D::Vector3(0, 0, -1)); DynamicTreeIntersectionCallback callback(phasemask); impl->intersectZAllignedRay(r, callback, maxSearchDist); diff --git a/src/common/Collision/Management/MMapFactory.h b/src/common/Collision/Management/MMapFactory.h index 6dda7a40a22..f89f44ba4df 100644 --- a/src/common/Collision/Management/MMapFactory.h +++ b/src/common/Collision/Management/MMapFactory.h @@ -43,7 +43,6 @@ namespace MMAP public: static MMapManager* createOrGetMMapManager(); static void clear(); - static bool IsPathfindingEnabled(uint32 mapId); }; } diff --git a/src/common/Collision/Maps/MapTree.cpp b/src/common/Collision/Maps/MapTree.cpp index 4d0996e1961..5907971efb9 100644 --- a/src/common/Collision/Maps/MapTree.cpp +++ b/src/common/Collision/Maps/MapTree.cpp @@ -22,6 +22,7 @@ #include "VMapDefinitions.h" #include "Log.h" #include "Errors.h" +#include "Metric.h" #include <string> #include <sstream> @@ -415,6 +416,8 @@ namespace VMAP } else iLoadedTiles[packTileID(tileX, tileY)] = false; + TC_METRIC_EVENT("map_events", "LoadMapTile", + "Map: " + std::to_string(iMapID) + " TileX: " + std::to_string(tileX) + " TileY: " + std::to_string(tileY)); return result; } @@ -473,6 +476,8 @@ namespace VMAP } } iLoadedTiles.erase(tile); + TC_METRIC_EVENT("map_events", "UnloadMapTile", + "Map: " + std::to_string(iMapID) + " TileX: " + std::to_string(tileX) + " TileY: " + std::to_string(tileY)); } void StaticMapTree::getModelInstances(ModelInstance* &models, uint32 &count) diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp index 5b9a1b1bd6c..72abec161b9 100644 --- a/src/common/Debugging/WheatyExceptionReport.cpp +++ b/src/common/Debugging/WheatyExceptionReport.cpp @@ -901,7 +901,7 @@ unsigned /*cbBuffer*/) // will return true. bool bHandled; pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, pSym->ModBase, pSym->TypeIndex, - 0, pVariable, bHandled, pSym->Name, "", false, true); + pVariable, bHandled, pSym->Name, "", false, true); if (!bHandled) { @@ -934,7 +934,6 @@ char * WheatyExceptionReport::DumpTypeIndex( char * pszCurrBuffer, DWORD64 modBase, DWORD dwTypeIndex, -unsigned nestingLevel, DWORD_PTR offset, bool & bHandled, const char* Name, @@ -1022,14 +1021,14 @@ bool logChildren) FormatOutputValue(buffer, btVoid, sizeof(PVOID), (PVOID)offset, sizeof(buffer)); symbolDetails.top().Value = buffer; - if (nestingLevel >= WER_MAX_NESTING_LEVEL) + if (symbolDetails.size() >= WER_MAX_NESTING_LEVEL) logChildren = false; // no need to log any children since the address is invalid anyway if (address == NULL || address == DWORD_PTR(-1)) logChildren = false; - pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, innerTypeID, nestingLevel + 1, + pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, innerTypeID, address, bHandled, Name, addressStr, false, logChildren); if (!bHandled) @@ -1074,19 +1073,19 @@ bool logChildren) switch (innerTypeTag) { case SymTagUDT: - if (nestingLevel >= WER_MAX_NESTING_LEVEL) + if (symbolDetails.size() >= WER_MAX_NESTING_LEVEL) logChildren = false; - pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, innerTypeID, nestingLevel + 1, + pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, innerTypeID, offset, bHandled, symbolDetails.top().Name.c_str(), "", false, logChildren); break; case SymTagPointerType: if (Name != NULL && Name[0] != '\0') symbolDetails.top().Name = Name; - pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, innerTypeID, nestingLevel + 1, + pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, innerTypeID, offset, bHandled, symbolDetails.top().Name.c_str(), "", false, logChildren); break; case SymTagArrayType: - pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, innerTypeID, nestingLevel + 1, + pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, innerTypeID, offset, bHandled, symbolDetails.top().Name.c_str(), "", false, logChildren); break; default: @@ -1100,7 +1099,7 @@ bool logChildren) symbolDetails.top().HasChildren = true; BasicType basicType = btNoType; - pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, innerTypeID, nestingLevel + 1, + pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, innerTypeID, offset, bHandled, Name, "", false, false); // Set Value back to an empty string since the Array object itself has no value, only its elements have @@ -1222,7 +1221,7 @@ bool logChildren) DWORD_PTR dwFinalOffset = offset + dwMemberOffset; pszCurrBuffer = DumpTypeIndex(pszCurrBuffer, modBase, - children.ChildId[i], nestingLevel+1, + children.ChildId[i], dwFinalOffset, bHandled2, ""/*Name */, "", true, true); // If the child wasn't a UDT, format it appropriately diff --git a/src/common/Debugging/WheatyExceptionReport.h b/src/common/Debugging/WheatyExceptionReport.h index eb62d8bceef..34919b19e01 100644 --- a/src/common/Debugging/WheatyExceptionReport.h +++ b/src/common/Debugging/WheatyExceptionReport.h @@ -13,7 +13,7 @@ #define countof _countof #define WER_MAX_ARRAY_ELEMENTS_COUNT 10 -#define WER_MAX_NESTING_LEVEL 5 +#define WER_MAX_NESTING_LEVEL 4 #define WER_LARGE_BUFFER_SIZE 1024 * 128 enum BasicType // Stolen from CVCONST.H in the DIA 2.0 SDK @@ -173,7 +173,7 @@ class WheatyExceptionReport static bool FormatSymbolValue(PSYMBOL_INFO, STACKFRAME64 *, char * pszBuffer, unsigned cbBuffer); - static char * DumpTypeIndex(char *, DWORD64, DWORD, unsigned, DWORD_PTR, bool &, const char*, char*, bool, bool); + static char * DumpTypeIndex(char *, DWORD64, DWORD, DWORD_PTR, bool &, const char*, char*, bool, bool); static void FormatOutputValue(char * pszCurrBuffer, BasicType basicType, DWORD64 length, PVOID pAddress, size_t bufferSize, size_t countOverride = 0); diff --git a/src/common/GitRevision.cpp b/src/common/GitRevision.cpp index 2162e36847f..702cd01d84b 100644 --- a/src/common/GitRevision.cpp +++ b/src/common/GitRevision.cpp @@ -41,19 +41,30 @@ char const* GitRevision::GetFullDatabase() return _FULL_DATABASE; } -#define _PACKAGENAME "TrinityCore" - -char const* GitRevision::GetFullVersion() -{ #if PLATFORM == PLATFORM_WINDOWS -# ifdef _WIN64 - return _PACKAGENAME " rev. " VER_PRODUCTVERSION_STR " (Win64, " _BUILD_DIRECTIVE ")"; -# else - return _PACKAGENAME " rev. " VER_PRODUCTVERSION_STR " (Win32, " _BUILD_DIRECTIVE ")"; -# endif +# ifdef _WIN64 +# define TRINITY_PLATFORM_STR "Win64" +# else +# define TRINITY_PLATFORM_STR "Win32" +# endif +#elif PLATFORM == PLATFORM_APPLE +# define TRINITY_PLATFORM_STR "MacOSX" +#elif PLATFORM == PLATFORM_INTEL +# define TRINITY_PLATFORM_STR "Intel" +#else // PLATFORM_UNIX +# define TRINITY_PLATFORM_STR "Unix" +#endif + +#ifndef TRINITY_API_USE_DYNAMIC_LINKING +# define TRINITY_LINKAGE_TYPE_STR "Static" #else - return _PACKAGENAME " rev. " VER_PRODUCTVERSION_STR " (Unix, " _BUILD_DIRECTIVE ")"; +# define TRINITY_LINKAGE_TYPE_STR "Dynamic" #endif + +char const* GitRevision::GetFullVersion() +{ + return "TrinityCore rev. " VER_PRODUCTVERSION_STR + " (" TRINITY_PLATFORM_STR ", " _BUILD_DIRECTIVE ", " TRINITY_LINKAGE_TYPE_STR ")"; } char const* GitRevision::GetCompanyNameStr() diff --git a/src/common/Metric/Metric.cpp b/src/common/Metric/Metric.cpp new file mode 100644 index 00000000000..9484cebcc72 --- /dev/null +++ b/src/common/Metric/Metric.cpp @@ -0,0 +1,235 @@ +/* +* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along +* with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "Metric.h" +#include "Log.h" +#include "Config.h" +#include "Util.h" + +void Metric::Initialize(std::string const& realmName, boost::asio::io_service& ioService, std::function<void()> overallStatusLogger) +{ + _realmName = realmName; + _batchTimer = Trinity::make_unique<boost::asio::deadline_timer>(ioService); + _overallStatusTimer = Trinity::make_unique<boost::asio::deadline_timer>(ioService); + _overallStatusLogger = overallStatusLogger; + LoadFromConfigs(); +} + +bool Metric::Connect() +{ + _dataStream.connect(_hostname, _port); + auto error = _dataStream.error(); + if (error) + { + TC_LOG_ERROR("metric", "Error connecting to '%s:%s', disabling Metric. Error message : %s", + _hostname.c_str(), _port.c_str(), error.message().c_str()); + _enabled = false; + return false; + } + _dataStream.clear(); + return true; +} + +void Metric::LoadFromConfigs() +{ + bool previousValue = _enabled; + _enabled = sConfigMgr->GetBoolDefault("Metric.Enable", false); + _updateInterval = sConfigMgr->GetIntDefault("Metric.Interval", 10); + if (_updateInterval < 1) + { + TC_LOG_ERROR("metric", "'Metric.Interval' config set to %d, overriding to 1.", _updateInterval); + _updateInterval = 1; + } + + _overallStatusTimerInterval = sConfigMgr->GetIntDefault("Metric.OverallStatusInterval", 1); + if (_overallStatusTimerInterval < 1) + { + TC_LOG_ERROR("metric", "'Metric.OverallStatusInterval' config set to %d, overriding to 1.", _overallStatusTimerInterval); + _overallStatusTimerInterval = 1; + } + + // Schedule a send at this point only if the config changed from Disabled to Enabled. + // Cancel any scheduled operation if the config changed from Enabled to Disabled. + if (_enabled && !previousValue) + { + std::string connectionInfo = sConfigMgr->GetStringDefault("Metric.ConnectionInfo", ""); + if (connectionInfo.empty()) + { + TC_LOG_ERROR("metric", "'Metric.ConnectionInfo' not specified in configuration file."); + return; + } + + Tokenizer tokens(connectionInfo, ';'); + if (tokens.size() != 3) + { + TC_LOG_ERROR("metric", "'Metric.ConnectionInfo' specified with wrong format in configuration file."); + return; + } + + _hostname.assign(tokens[0]); + _port.assign(tokens[1]); + _databaseName.assign(tokens[2]); + Connect(); + + ScheduleSend(); + ScheduleOverallStatusLog(); + } +} + +void Metric::Update() +{ + if (_overallStatusTimerTriggered) + { + _overallStatusTimerTriggered = false; + _overallStatusLogger(); + } +} + +void Metric::LogEvent(std::string const& category, std::string const& title, std::string const& description) +{ + using namespace std::chrono; + + MetricData* data = new MetricData; + data->Category = category; + data->Timestamp = system_clock::now(); + data->Type = METRIC_DATA_EVENT; + data->Title = title; + data->Text = description; + + _queuedData.Enqueue(data); +} + +void Metric::SendBatch() +{ + using namespace std::chrono; + + std::stringstream batchedData; + MetricData* data; + bool firstLoop = true; + while (_queuedData.Dequeue(data)) + { + if (!firstLoop) + batchedData << "\n"; + + batchedData << data->Category; + if (!_realmName.empty()) + batchedData << ",realm=" << _realmName; + + batchedData << " "; + + switch (data->Type) + { + case METRIC_DATA_VALUE: + batchedData << "value=" << data->Value; + break; + case METRIC_DATA_EVENT: + batchedData << "title=\"" << data->Title << "\",text=\"" << data->Text << "\""; + break; + } + + batchedData << " "; + + batchedData << std::to_string(duration_cast<nanoseconds>(data->Timestamp.time_since_epoch()).count()); + + firstLoop = false; + delete data; + } + + // Check if there's any data to send + if (batchedData.tellp() == std::streampos(0)) + { + ScheduleSend(); + return; + } + + if (!_dataStream.good() && !Connect()) + return; + + _dataStream << "POST " << "/write?db=" << _databaseName << " HTTP/1.1\r\n"; + _dataStream << "Host: " << _hostname << ":" << _port << "\r\n"; + _dataStream << "Accept: */*\r\n"; + _dataStream << "Content-Type: application/octet-stream\r\n"; + _dataStream << "Content-Transfer-Encoding: binary\r\n"; + + _dataStream << "Content-Length: " << std::to_string(batchedData.tellp()) << "\r\n\r\n"; + _dataStream << batchedData.rdbuf(); + + std::string http_version; + _dataStream >> http_version; + unsigned int status_code = 0; + _dataStream >> status_code; + if (status_code != 204) + { + TC_LOG_ERROR("metric", "Error sending data, returned HTTP code: %u", status_code); + } + + // Read and ignore the status description + std::string status_description; + std::getline(_dataStream, status_description); + // Read headers + std::string header; + while (std::getline(_dataStream, header) && header != "\r") + { + if (header == "Connection: close\r") + _dataStream.close(); + } + + ScheduleSend(); +} + +void Metric::ScheduleSend() +{ + if (_enabled) + { + _batchTimer->expires_from_now(boost::posix_time::seconds(_updateInterval)); + _batchTimer->async_wait(std::bind(&Metric::SendBatch, this)); + } + else + { + _dataStream.close(); + MetricData* data; + // Clear the queue + while (_queuedData.Dequeue(data)) + ; + } +} + +void Metric::ForceSend() +{ + // Send what's queued only if io_service is stopped (so only on shutdown) + if (_enabled && _batchTimer->get_io_service().stopped()) + SendBatch(); +} + +void Metric::ScheduleOverallStatusLog() +{ + if (_enabled) + { + _overallStatusTimer->expires_from_now(boost::posix_time::seconds(_overallStatusTimerInterval)); + _overallStatusTimer->async_wait([this](const boost::system::error_code&) + { + _overallStatusTimerTriggered = true; + ScheduleOverallStatusLog(); + }); + } +} + +Metric* Metric::instance() +{ + static Metric instance; + return &instance; +} diff --git a/src/common/Metric/Metric.h b/src/common/Metric/Metric.h new file mode 100644 index 00000000000..1855e1d0098 --- /dev/null +++ b/src/common/Metric/Metric.h @@ -0,0 +1,141 @@ +/* +* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along +* with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef METRIC_H__ +#define METRIC_H__ + +#include "Common.h" +#include "Threading/MPSCQueue.h" +#include <boost/asio/ip/tcp.hpp> +#include <boost/algorithm/string.hpp> +#include <type_traits> + +enum MetricDataType +{ + METRIC_DATA_VALUE, + METRIC_DATA_EVENT +}; + +struct MetricData +{ + std::string Category; + std::chrono::time_point<std::chrono::system_clock> Timestamp; + MetricDataType Type; + + // LogValue-specific fields + std::string Value; + + // LogEvent-specific fields + std::string Title; + std::string Text; +}; + +class TC_COMMON_API Metric +{ +private: + boost::asio::ip::tcp::iostream _dataStream; + MPSCQueue<MetricData> _queuedData; + std::unique_ptr<boost::asio::deadline_timer> _batchTimer; + std::unique_ptr<boost::asio::deadline_timer> _overallStatusTimer; + int32 _updateInterval = 0; + int32 _overallStatusTimerInterval = 0; + bool _enabled = false; + bool _overallStatusTimerTriggered = false; + std::string _hostname; + std::string _port; + std::string _databaseName; + std::function<void()> _overallStatusLogger; + std::string _realmName; + + bool Connect(); + void SendBatch(); + void ScheduleSend(); + void ScheduleOverallStatusLog(); + + template<class T, typename std::enable_if<std::is_integral<T>::value>::type* = nullptr> + static std::string FormatInfluxDBValue(T value) { return std::to_string(value) + 'i'; } + + static std::string FormatInfluxDBValue(std::string const& value) + { + return '"' + boost::replace_all_copy(value, "\"", "\\\"") + '"'; + } + + static std::string FormatInfluxDBValue(bool value) { return value ? "t" : "f"; } + static std::string FormatInfluxDBValue(const char* value) { return FormatInfluxDBValue(std::string(value)); } + static std::string FormatInfluxDBValue(double value) { return std::to_string(value); } + static std::string FormatInfluxDBValue(float value) { return FormatInfluxDBValue(double(value)); } + +public: + static Metric* instance(); + + void Initialize(std::string const& realmName, boost::asio::io_service& ioService, std::function<void()> overallStatusLogger = [](){}); + void LoadFromConfigs(); + void Update(); + + template<class T> + void LogValue(std::string const& category, T value) + { + using namespace std::chrono; + + MetricData* data = new MetricData; + data->Category = category; + data->Timestamp = system_clock::now(); + data->Type = METRIC_DATA_VALUE; + data->Value = FormatInfluxDBValue(value); + + _queuedData.Enqueue(data); + } + + void LogEvent(std::string const& category, std::string const& title, std::string const& description); + + void ForceSend(); + bool IsEnabled() const { return _enabled; } +}; + +#define sMetric Metric::instance() + +#if PLATFORM != PLATFORM_WINDOWS +#define TC_METRIC_EVENT(category, title, description) \ + do { \ + if (sMetric->IsEnabled()) \ + sMetric->LogEvent(category, title, description); \ + } while (0) +#define TC_METRIC_VALUE(category, value) \ + do { \ + if (sMetric->IsEnabled()) \ + sMetric->LogValue(category, value); \ + } while (0) +#else +#define TC_METRIC_EVENT(category, title, description) \ + __pragma(warning(push)) \ + __pragma(warning(disable:4127)) \ + do { \ + if (sMetric->IsEnabled()) \ + sMetric->LogEvent(category, title, description); \ + } while (0) \ + __pragma(warning(pop)) +#define TC_METRIC_VALUE(category, value) \ + __pragma(warning(push)) \ + __pragma(warning(disable:4127)) \ + do { \ + if (sMetric->IsEnabled()) \ + sMetric->LogValue(category, value); \ + } while (0) \ + __pragma(warning(pop)) +#endif + +#endif // METRIC_H__ diff --git a/src/common/Utilities/Containers.h b/src/common/Utilities/Containers.h index 0f83b52f9d0..5edb245fd87 100644 --- a/src/common/Utilities/Containers.h +++ b/src/common/Utilities/Containers.h @@ -31,9 +31,9 @@ namespace Trinity namespace Containers { template<class T> - void RandomResizeList(std::list<T> &list, uint32 size) + void RandomResizeList(std::list<T>& list, uint32 size) { - size_t list_size = list.size(); + uint32 list_size = uint32(list.size()); while (list_size > size) { @@ -56,7 +56,7 @@ namespace Trinity if (size) RandomResizeList(listCopy, size); - list = listCopy; + list = std::move(listCopy); } /* @@ -68,7 +68,7 @@ namespace Trinity typename C::value_type const& SelectRandomContainerElement(C const& container) { typename C::const_iterator it = container.begin(); - std::advance(it, urand(0, container.size() - 1)); + std::advance(it, urand(0, uint32(container.size()) - 1)); return *it; } @@ -170,7 +170,6 @@ namespace Trinity ++itr; } } - } //! namespace Containers } diff --git a/src/common/Utilities/EventProcessor.cpp b/src/common/Utilities/EventProcessor.cpp index be74d58b790..2341d0a0872 100644 --- a/src/common/Utilities/EventProcessor.cpp +++ b/src/common/Utilities/EventProcessor.cpp @@ -17,11 +17,20 @@ */ #include "EventProcessor.h" +#include "Errors.h" -EventProcessor::EventProcessor() +void BasicEvent::ScheduleAbort() { - m_time = 0; - m_aborting = false; + ASSERT(IsRunning() + && "Tried to scheduled the abortion of an event twice!"); + m_abortState = AbortState::STATE_ABORT_SCHEDULED; +} + +void BasicEvent::SetAborted() +{ + ASSERT(!IsAborted() + && "Tried to abort an already aborted event!"); + m_abortState = AbortState::STATE_ABORTED; } EventProcessor::~EventProcessor() @@ -39,55 +48,73 @@ void EventProcessor::Update(uint32 p_time) while (((i = m_events.begin()) != m_events.end()) && i->first <= m_time) { // get and remove event from queue - BasicEvent* Event = i->second; + BasicEvent* event = i->second; m_events.erase(i); - if (!Event->to_Abort) + if (event->IsRunning()) { - if (Event->Execute(m_time, p_time)) + if (event->Execute(m_time, p_time)) { // completely destroy event if it is not re-added - delete Event; + delete event; } + continue; } - else + + if (event->IsAbortScheduled()) { - Event->Abort(m_time); - delete Event; + event->Abort(m_time); + // Mark the event as aborted + event->SetAborted(); } + + if (event->IsDeletable()) + { + delete event; + continue; + } + + // Reschedule non deletable events to be checked at + // the next update tick + AddEvent(event, CalculateTime(1), false); } } void EventProcessor::KillAllEvents(bool force) { - // prevent event insertions - m_aborting = true; - - // first, abort all existing events - for (EventList::iterator i = m_events.begin(); i != m_events.end();) + for (auto itr = m_events.begin(); itr != m_events.end();) { - EventList::iterator i_old = i; - ++i; - - i_old->second->to_Abort = true; - i_old->second->Abort(m_time); - if (force || i_old->second->IsDeletable()) + // Abort events which weren't aborted already + if (!itr->second->IsAborted()) { - delete i_old->second; + itr->second->SetAborted(); + itr->second->Abort(m_time); + } - if (!force) // need per-element cleanup - m_events.erase (i_old); + // Skip non-deletable events when we are + // not forcing the event cancellation. + if (!force && !itr->second->IsDeletable()) + { + ++itr; + continue; } + + delete itr->second; + + if (force) + ++itr; // Clear the whole container when forcing + else + itr = m_events.erase(itr); } - // fast clear event list (in force case) if (force) m_events.clear(); } void EventProcessor::AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime) { - if (set_addtime) Event->m_addTime = m_time; + if (set_addtime) + Event->m_addTime = m_time; Event->m_execTime = e_time; m_events.insert(std::pair<uint64, BasicEvent*>(e_time, Event)); } @@ -96,4 +123,3 @@ uint64 EventProcessor::CalculateTime(uint64 t_offset) const { return(m_time + t_offset); } - diff --git a/src/common/Utilities/EventProcessor.h b/src/common/Utilities/EventProcessor.h index e10558e6a21..57f3065f323 100644 --- a/src/common/Utilities/EventProcessor.h +++ b/src/common/Utilities/EventProcessor.h @@ -20,20 +20,27 @@ #define __EVENTPROCESSOR_H #include "Define.h" - #include <map> +class EventProcessor; + // Note. All times are in milliseconds here. class TC_COMMON_API BasicEvent { + friend class EventProcessor; + + enum class AbortState : uint8 + { + STATE_RUNNING, + STATE_ABORT_SCHEDULED, + STATE_ABORTED + }; + public: BasicEvent() - { - to_Abort = false; - m_addTime = 0; - m_execTime = 0; - } + : m_abortState(AbortState::STATE_RUNNING), m_addTime(0), m_execTime(0) { } + virtual ~BasicEvent() { } // override destructor to perform some actions on event removal // this method executes when the event is triggered @@ -45,8 +52,16 @@ class TC_COMMON_API BasicEvent virtual void Abort(uint64 /*e_time*/) { } // this method executes when the event is aborted - bool to_Abort; // set by externals when the event is aborted, aborted events don't execute - // and get Abort call when deleted + // Aborts the event at the next update tick + void ScheduleAbort(); + + private: + void SetAborted(); + bool IsRunning() const { return (m_abortState == AbortState::STATE_RUNNING); } + bool IsAbortScheduled() const { return (m_abortState == AbortState::STATE_ABORT_SCHEDULED); } + bool IsAborted() const { return (m_abortState == AbortState::STATE_ABORTED); } + + AbortState m_abortState; // set by externals when the event is aborted, aborted events don't execute // these can be used for time offset control uint64 m_addTime; // time when the event was added to queue, filled by event handler @@ -58,16 +73,17 @@ typedef std::multimap<uint64, BasicEvent*> EventList; class TC_COMMON_API EventProcessor { public: - EventProcessor(); + EventProcessor() : m_time(0) { } ~EventProcessor(); void Update(uint32 p_time); void KillAllEvents(bool force); void AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime = true); uint64 CalculateTime(uint64 t_offset) const; + protected: uint64 m_time; EventList m_events; - bool m_aborting; }; + #endif diff --git a/src/server/database/Database/DatabaseWorkerPool.cpp b/src/server/database/Database/DatabaseWorkerPool.cpp index ba2a4256919..6fc4dc21a51 100644 --- a/src/server/database/Database/DatabaseWorkerPool.cpp +++ b/src/server/database/Database/DatabaseWorkerPool.cpp @@ -28,7 +28,7 @@ DatabaseWorkerPool<T>::DatabaseWorkerPool() { WPFatal(mysql_thread_safe(), "Used MySQL library isn't thread-safe."); WPFatal(mysql_get_client_version() >= MIN_MYSQL_CLIENT_VERSION, "TrinityCore does not support MySQL versions below 5.1"); - WPFatal(mysql_get_client_version() == MYSQL_VERSION_ID, "Used MySQL library version (%s) does not match the version used to compile TrinityCore (%s).", + WPFatal(mysql_get_client_version() == MYSQL_VERSION_ID, "Used MySQL library version (%s) does not match the version used to compile TrinityCore (%s). Search on forum for TCE00011.", mysql_get_client_info(), MYSQL_SERVER_VERSION); } diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp index ce01b0eb245..bb0e2bb09d4 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp @@ -56,7 +56,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_CHAR_RACE, "SELECT race FROM characters WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_LEVEL, "SELECT level FROM characters WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_ZONE, "SELECT zone FROM characters WHERE guid = ?", CONNECTION_SYNCH); - PrepareStatement(CHAR_SEL_CHARACTER_NAME_DATA, "SELECT race, class, gender, level FROM characters WHERE guid = ?", CONNECTION_SYNCH); + PrepareStatement(CHAR_SEL_CHARACTER_NAME_DATA, "SELECT race, class, gender, level, name FROM characters WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_POSITION_XYZ, "SELECT map, position_x, position_y, position_z FROM characters WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHAR_POSITION, "SELECT position_x, position_y, position_z, orientation, map, taxi_path FROM characters WHERE guid = ?", CONNECTION_SYNCH); @@ -157,11 +157,9 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_GIFT, "DELETE FROM character_gifts WHERE item_guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_GIFT_BY_ITEM, "SELECT entry, flags FROM character_gifts WHERE item_guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_ACCOUNT_BY_NAME, "SELECT account FROM characters WHERE name = ?", CONNECTION_SYNCH); - PrepareStatement(CHAR_SEL_CHARACTER_DATA_BY_GUID, "SELECT account, name, level FROM characters WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_DEL_ACCOUNT_INSTANCE_LOCK_TIMES, "DELETE FROM account_instance_times WHERE accountId = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_ACCOUNT_INSTANCE_LOCK_TIMES, "INSERT INTO account_instance_times (accountId, instanceId, releaseTime) VALUES (?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_NAME_CLASS, "SELECT name, class FROM characters WHERE guid = ?", CONNECTION_SYNCH); - PrepareStatement(CHAR_SEL_CHARACTER_NAME, "SELECT name FROM characters WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_MATCH_MAKER_RATING, "SELECT matchMakerRating FROM character_arena_stats WHERE guid = ? AND slot = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_SEL_CHARACTER_COUNT, "SELECT account, COUNT(guid) FROM characters WHERE account = ? GROUP BY account", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_NAME, "UPDATE characters set name = ?, at_login = at_login & ~ ? WHERE guid = ?", CONNECTION_ASYNC); diff --git a/src/server/database/Database/Implementation/CharacterDatabase.h b/src/server/database/Database/Implementation/CharacterDatabase.h index 430243a8f1e..0cac6d35b55 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.h +++ b/src/server/database/Database/Implementation/CharacterDatabase.h @@ -146,13 +146,11 @@ enum CharacterDatabaseStatements CHAR_DEL_ACCOUNT_INSTANCE_LOCK_TIMES, CHAR_INS_ACCOUNT_INSTANCE_LOCK_TIMES, CHAR_SEL_CHARACTER_NAME_CLASS, - CHAR_SEL_CHARACTER_NAME, CHAR_SEL_MATCH_MAKER_RATING, CHAR_SEL_CHARACTER_COUNT, CHAR_UPD_NAME, CHAR_UPD_NAME_BY_GUID, CHAR_DEL_DECLINED_NAME, - CHAR_SEL_CHARACTER_DATA_BY_GUID, CHAR_INS_GUILD, CHAR_DEL_GUILD, diff --git a/src/server/database/Database/Implementation/WorldDatabase.cpp b/src/server/database/Database/Implementation/WorldDatabase.cpp index 7a183d5bf78..83720c1a996 100644 --- a/src/server/database/Database/Implementation/WorldDatabase.cpp +++ b/src/server/database/Database/Implementation/WorldDatabase.cpp @@ -30,8 +30,8 @@ void WorldDatabaseConnection::DoPrepareStatements() PrepareStatement(WORLD_SEL_SMARTAI_WP, "SELECT entry, pointid, position_x, position_y, position_z FROM waypoints ORDER BY entry, pointid", CONNECTION_SYNCH); PrepareStatement(WORLD_DEL_GAMEOBJECT, "DELETE FROM gameobject WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_DEL_EVENT_GAMEOBJECT, "DELETE FROM game_event_gameobject WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(WORLD_INS_GRAVEYARD_ZONE, "INSERT INTO game_graveyard_zone (id, ghost_zone, faction) VALUES (?, ?, ?)", CONNECTION_ASYNC); - PrepareStatement(WORLD_DEL_GRAVEYARD_ZONE, "DELETE FROM game_graveyard_zone WHERE id = ? AND ghost_zone = ? AND faction = ?", CONNECTION_ASYNC); + PrepareStatement(WORLD_INS_GRAVEYARD_ZONE, "INSERT INTO graveyard_zone (ID, GhostZone, Faction) VALUES (?, ?, ?)", CONNECTION_ASYNC); + PrepareStatement(WORLD_DEL_GRAVEYARD_ZONE, "DELETE FROM graveyard_zone WHERE ID = ? AND GhostZone = ? AND Faction = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_INS_GAME_TELE, "INSERT INTO game_tele (id, position_x, position_y, position_z, orientation, map, name) VALUES (?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(WORLD_DEL_GAME_TELE, "DELETE FROM game_tele WHERE name = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_INS_NPC_VENDOR, "INSERT INTO npc_vendor (entry, item, maxcount, incrtime, extendedcost) VALUES(?, ?, ?, ?, ?)", CONNECTION_ASYNC); diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp index 0d51f8ed060..8515da9f6f8 100644 --- a/src/server/database/Updater/DBUpdater.cpp +++ b/src/server/database/Updater/DBUpdater.cpp @@ -55,7 +55,7 @@ bool DBUpdaterUtil::CheckExecutable() } } - TC_LOG_FATAL("sql.updates", "Didn't find executeable mysql binary at \'%s\' or in path, correct the path in the *.conf (\"MySQLExecutable\").", + TC_LOG_FATAL("sql.updates", "Didn't find any executable MySQL binary at \'%s\' or in path, correct the path in the *.conf (\"MySQLExecutable\").", absolute(exe).generic_string().c_str()); return false; @@ -178,7 +178,7 @@ bool DBUpdater<T>::Create(DatabaseWorkerPool<T>& pool) // Path of temp file static Path const temp("create_table.sql"); - // Create temporary query to use external mysql cli + // Create temporary query to use external MySQL CLi std::ofstream file(temp.generic_string()); if (!file.is_open()) { @@ -197,7 +197,7 @@ bool DBUpdater<T>::Create(DatabaseWorkerPool<T>& pool) } catch (UpdateException&) { - TC_LOG_FATAL("sql.updates", "Failed to create database %s! Has the user `CREATE` priviliges?", pool.GetConnectionInfo()->database.c_str()); + TC_LOG_FATAL("sql.updates", "Failed to create database %s! Does the user (named in *.conf) have `CREATE` privileges on the MySQL server?", pool.GetConnectionInfo()->database.c_str()); boost::filesystem::remove(temp); return false; } @@ -280,7 +280,7 @@ bool DBUpdater<T>::Populate(DatabaseWorkerPool<T>& pool) { case LOCATION_REPOSITORY: { - TC_LOG_ERROR("sql.updates", ">> Base file \"%s\" is missing, try to clone the source again.", + TC_LOG_ERROR("sql.updates", ">> Base file \"%s\" is missing. Try fixing it by cloning the source again.", base.generic_string().c_str()); break; @@ -288,7 +288,7 @@ bool DBUpdater<T>::Populate(DatabaseWorkerPool<T>& pool) case LOCATION_DOWNLOAD: { TC_LOG_ERROR("sql.updates", ">> File \"%s\" is missing, download it from \"https://github.com/TrinityCore/TrinityCore/releases\"" \ - " and place it in your server directory.", base.filename().generic_string().c_str()); + " uncompress it and place the file TDB_full_world_(a_variable_name).sql in your worldserver directory.", base.filename().generic_string().c_str()); break; } } @@ -355,7 +355,7 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos if (!std::isdigit(port_or_socket[0])) { - // We can't check here if host == "." because is named localhost if socket option is enabled + // We can't check if host == "." here, because it is named localhost if socket option is enabled args.push_back("-P0"); args.push_back("--protocol=SOCKET"); args.push_back("-S" + port_or_socket); @@ -383,7 +383,10 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos if (ret != EXIT_SUCCESS) { TC_LOG_FATAL("sql.updates", "Applying of file \'%s\' to database \'%s\' failed!" \ - " If you are an user pull the latest revision from the repository. If you are a developer fix your sql query.", + " If you are a user, please pull the latest revision from the repository. " + "Also make sure you have not applied any of the databases with your sql client. " + "You cannot use auto-update system and import sql files from TrinityCore repository with your sql client. " + "If you are a developer, please fix your sql query.", path.generic_string().c_str(), pool.GetConnectionInfo()->database.c_str()); throw UpdateException("update failed"); diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index 844bd45ffeb..037d9e59cf2 100644 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -267,35 +267,59 @@ SpellTargetSelector::SpellTargetSelector(Unit* caster, uint32 spellId) : bool SpellTargetSelector::operator()(Unit const* target) const { - if (!target) - return false; - - if (_spellInfo->CheckTarget(_caster, target) != SPELL_CAST_OK) + if (!target || _spellInfo->CheckTarget(_caster, target) != SPELL_CAST_OK) return false; // copypasta from Spell::CheckRange - uint32 range_type = _spellInfo->RangeEntry ? _spellInfo->RangeEntry->type : 0; - float max_range = _caster->GetSpellMaxRangeForTarget(target, _spellInfo); - float min_range = _caster->GetSpellMinRangeForTarget(target, _spellInfo); - - - if (target && target != _caster) + float minRange = 0.0f; + float maxRange = 0.0f; + float rangeMod = 0.0f; + if (_spellInfo->RangeEntry) { - if (range_type == SPELL_RANGE_MELEE) + if (_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE) { - // Because of lag, we can not check too strictly here. - if (!_caster->IsWithinMeleeRange(target, max_range)) - return false; - } - else if (!_caster->IsWithinCombatRange(target, max_range)) - return false; + rangeMod = _caster->GetCombatReach() + 4.0f / 3.0f; + rangeMod += target->GetCombatReach(); - if (range_type == SPELL_RANGE_RANGED) + rangeMod = std::max(rangeMod, NOMINAL_MELEE_RANGE); + } + else { - if (_caster->IsWithinMeleeRange(target)) - return false; + float meleeRange = 0.0f; + if (_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED) + { + meleeRange = _caster->GetCombatReach() + 4.0f / 3.0f; + meleeRange += target->GetCombatReach(); + + meleeRange = std::max(meleeRange, NOMINAL_MELEE_RANGE); + } + + minRange = _caster->GetSpellMinRangeForTarget(target, _spellInfo) + meleeRange; + maxRange = _caster->GetSpellMaxRangeForTarget(target, _spellInfo); + + rangeMod = _caster->GetCombatReach(); + rangeMod += target->GetCombatReach(); + + if (minRange > 0.0f && !(_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED)) + minRange += rangeMod; } - else if (min_range && _caster->IsWithinCombatRange(target, min_range)) // skip this check if min_range = 0 + + if (_caster->isMoving() && target->isMoving() && !_caster->IsWalking() && !target->IsWalking() && + (_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE || target->GetTypeId() == TYPEID_PLAYER)) + rangeMod += 5.0f / 3.0f; + } + + maxRange += rangeMod; + + minRange *= minRange; + maxRange *= maxRange; + + if (target != _caster) + { + if (_caster->GetExactDistSq(target) > maxRange) + return false; + + if (minRange > 0.0f && _caster->GetExactDistSq(target) < minRange) return false; } diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h index 344ccc06249..0dd09bc8051 100644 --- a/src/server/game/AI/CoreAI/UnitAI.h +++ b/src/server/game/AI/CoreAI/UnitAI.h @@ -148,15 +148,29 @@ class TC_GAME_API UnitAI { ThreatContainer::StorageType const& threatlist = me->getThreatManager().getThreatList(); if (position >= threatlist.size()) - return NULL; + return nullptr; std::list<Unit*> targetList; + Unit* currentVictim = nullptr; + if (auto currentVictimReference = me->getThreatManager().getCurrentVictim()) + { + currentVictim = currentVictimReference->getTarget(); + + // Current victim always goes first + if (currentVictim && predicate(currentVictim)) + targetList.push_back(currentVictim); + } + for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr) - if (predicate((*itr)->getTarget())) + { + if (currentVictim != nullptr && (*itr)->getTarget() != currentVictim && predicate((*itr)->getTarget())) targetList.push_back((*itr)->getTarget()); + else if (currentVictim == nullptr && predicate((*itr)->getTarget())) + targetList.push_back((*itr)->getTarget()); + } if (position >= targetList.size()) - return NULL; + return nullptr; if (targetType == SELECT_TARGET_NEAREST || targetType == SELECT_TARGET_FARTHEST) targetList.sort(Trinity::ObjectDistanceOrderPred(me)); @@ -187,7 +201,7 @@ class TC_GAME_API UnitAI break; } - return NULL; + return nullptr; } void SelectTargetList(std::list<Unit*>& targetList, uint32 num, SelectAggroTarget targetType, float dist = 0.0f, bool playerOnly = false, int32 aura = 0); @@ -242,6 +256,7 @@ class TC_GAME_API UnitAI void DoAddAuraToAllHostilePlayers(uint32 spellid); void DoCast(uint32 spellId); void DoCast(Unit* victim, uint32 spellId, bool triggered = false); + void DoCastSelf(uint32 spellId, bool triggered = false) { DoCast(me, spellId, triggered); } void DoCastToAllHostilePlayers(uint32 spellid, bool triggered = false); void DoCastVictim(uint32 spellId, bool triggered = false); void DoCastAOE(uint32 spellId, bool triggered = false); diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index d52306b8a2e..15bbff2793f 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -46,7 +46,7 @@ void CreatureAI::Talk(uint8 id, WorldObject const* whisperTarget /*= nullptr*/) sCreatureTextMgr->SendChat(me, id, whisperTarget); } -void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToNearestTarget /* = 50.0f*/) +void CreatureAI::DoZoneInCombat(Creature* creature /*= nullptr*/, float maxRangeToNearestTarget /* = 250.0f*/) { if (!creature) creature = me; @@ -265,7 +265,7 @@ bool CreatureAI::_EnterEvadeMode(EvadeReason /*why*/) me->DeleteThreatList(); me->CombatStop(true); me->LoadCreaturesAddon(); - me->SetLootRecipient(NULL); + me->SetLootRecipient(nullptr); me->ResetPlayerDamageReq(); me->SetLastDamagedTime(0); me->SetCannotReachTarget(false); diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index 31b53b888a6..f8fa6ba532b 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -112,7 +112,7 @@ class TC_GAME_API CreatureAI : public UnitAI // Called for reaction at stopping attack at no attackers or targets virtual void EnterEvadeMode(EvadeReason why = EVADE_REASON_OTHER); - // Called for reaction at enter to combat if not in combat yet (enemy can be NULL) + // Called for reaction at enter to combat if not in combat yet (enemy can be nullptr) virtual void EnterCombat(Unit* /*victim*/) { } // Called when the creature is killed @@ -149,7 +149,7 @@ class TC_GAME_API CreatureAI : public UnitAI // Called at reaching home after evade virtual void JustReachedHome() { } - void DoZoneInCombat(Creature* creature = NULL, float maxRangeToNearestTarget = 50.0f); + void DoZoneInCombat(Creature* creature = nullptr, float maxRangeToNearestTarget = 250.0f); // Called at text emote receive from player virtual void ReceiveEmote(Player* /*player*/, uint32 /*emoteId*/) { } diff --git a/src/server/game/AI/PlayerAI/PlayerAI.cpp b/src/server/game/AI/PlayerAI/PlayerAI.cpp index 12bfb86251b..d5c17cce3ad 100644 --- a/src/server/game/AI/PlayerAI/PlayerAI.cpp +++ b/src/server/game/AI/PlayerAI/PlayerAI.cpp @@ -19,6 +19,51 @@ #include "SpellAuras.h" #include "SpellAuraEffects.h" +static const uint8 NUM_TALENT_TREES = 3; +static const uint8 NUM_SPEC_ICONICS = 3; + +enum Specs +{ + SPEC_WARRIOR_ARMS = 0, + SPEC_WARRIOR_FURY = 1, + SPEC_WARRIOR_PROTECTION = 2, + + SPEC_PALADIN_HOLY = 0, + SPEC_PALADIN_PROTECTION = 1, + SPEC_PALADIN_RETRIBUTION = 2, + + SPEC_HUNTER_BEAST_MASTERY = 0, + SPEC_HUNTER_MARKSMANSHIP = 1, + SPEC_HUNTER_SURVIVAL = 2, + + SPEC_ROGUE_ASSASSINATION = 0, + SPEC_ROGUE_COMBAT = 1, + SPEC_ROGUE_SUBLETY = 2, + + SPEC_PRIEST_DISCIPLINE = 0, + SPEC_PRIEST_HOLY = 1, + SPEC_PRIEST_SHADOW = 2, + + SPEC_DEATH_KNIGHT_BLOOD = 0, + SPEC_DEATH_KNIGHT_FROST = 1, + SPEC_DEATH_KNIGHT_UNHOLY = 2, + + SPEC_SHAMAN_ELEMENTAL = 0, + SPEC_SHAMAN_ENHANCEMENT = 1, + SPEC_SHAMAN_RESTORATION = 2, + + SPEC_MAGE_ARCANE = 0, + SPEC_MAGE_FIRE = 1, + SPEC_MAGE_FROST = 2, + + SPEC_WARLOCK_AFFLICTION = 0, + SPEC_WARLOCK_DEMONOLOGY = 1, + SPEC_WARLOCK_DESTRUCTION = 2, + + SPEC_DRUID_BALANCE = 0, + SPEC_DRUID_FERAL = 1, + SPEC_DRUID_RESTORATION = 2 +}; enum Spells { /* Generic */ @@ -27,29 +72,449 @@ enum Spells SPELL_THROW = 2764, SPELL_SHOOT_WAND = 5019, - /* Paladin */ - PASSIVE_ILLUMINATION = 20215, + /* Warrior - Generic */ + SPELL_BATTLE_STANCE = 2457, + SPELL_BERSERKER_STANCE = 2458, + SPELL_DEFENSIVE_STANCE = 71, + SPELL_CHARGE = 11578, + SPELL_INTERCEPT = 20252, + SPELL_ENRAGED_REGEN = 55694, + SPELL_INTIMIDATING_SHOUT= 5246, + SPELL_PUMMEL = 6552, + SPELL_SHIELD_BASH = 72, + SPELL_BLOODRAGE = 2687, + + /* Warrior - Arms */ + SPELL_SWEEPING_STRIKES = 12328, + SPELL_MORTAL_STRIKE = 12294, + SPELL_BLADESTORM = 46924, + SPELL_REND = 47465, + SPELL_RETALIATION = 20230, + SPELL_SHATTERING_THROW = 64382, + SPELL_THUNDER_CLAP = 47502, + + /* Warrior - Fury */ + SPELL_DEATH_WISH = 12292, + SPELL_BLOODTHIRST = 23881, + PASSIVE_TITANS_GRIP = 46917, + SPELL_DEMO_SHOUT = 47437, + SPELL_EXECUTE = 47471, + SPELL_HEROIC_FURY = 60970, + SPELL_RECKLESSNESS = 1719, + SPELL_PIERCING_HOWL = 12323, + + /* Warrior - Protection */ + SPELL_VIGILANCE = 50720, + SPELL_DEVASTATE = 20243, + SPELL_SHOCKWAVE = 46968, + SPELL_CONCUSSION_BLOW = 12809, + SPELL_DISARM = 676, + SPELL_LAST_STAND = 12975, + SPELL_SHIELD_BLOCK = 2565, + SPELL_SHIELD_SLAM = 47488, + SPELL_SHIELD_WALL = 871, + SPELL_SPELL_REFLECTION = 23920, + + /* Paladin - Generic */ + SPELL_AURA_MASTERY = 31821, + SPELL_LAY_ON_HANDS = 48788, + SPELL_BLESSING_OF_MIGHT = 48932, + SPELL_AVENGING_WRATH = 31884, + SPELL_DIVINE_PROTECTION = 498, + SPELL_DIVINE_SHIELD = 642, + SPELL_HAMMER_OF_JUSTICE = 10308, + SPELL_HAND_OF_FREEDOM = 1044, + SPELL_HAND_OF_PROTECTION = 10278, + SPELL_HAND_OF_SACRIFICE = 6940, + + /* Paladin - Holy*/ + PASSIVE_ILLUMINATION = 20215, + SPELL_HOLY_SHOCK = 20473, + SPELL_BEACON_OF_LIGHT = 53563, + SPELL_CONSECRATION = 48819, + SPELL_FLASH_OF_LIGHT = 48785, + SPELL_HOLY_LIGHT = 48782, + SPELL_DIVINE_FAVOR = 20216, + SPELL_DIVINE_ILLUMINATION = 31842, + + /* Paladin - Protection */ + SPELL_BLESS_OF_SANC = 20911, + SPELL_HOLY_SHIELD = 20925, + SPELL_AVENGERS_SHIELD = 48827, + SPELL_DIVINE_SACRIFICE = 64205, + SPELL_HAMMER_OF_RIGHTEOUS = 53595, + SPELL_RIGHTEOUS_FURY = 25780, + SPELL_SHIELD_OF_RIGHTEOUS = 61411, + + /* Paladin - Retribution */ + SPELL_SEAL_OF_COMMAND = 20375, + SPELL_CRUSADER_STRIKE = 35395, + SPELL_DIVINE_STORM = 53385, + SPELL_JUDGEMENT = 20271, + SPELL_HAMMER_OF_WRATH = 48806, + + /* Hunter - Generic */ + SPELL_DETERRENCE = 19263, + SPELL_EXPLOSIVE_TRAP = 49067, + SPELL_FREEZING_ARROW = 60192, + SPELL_RAPID_FIRE = 3045, + SPELL_KILL_SHOT = 61006, + SPELL_MULTI_SHOT = 49048, + SPELL_VIPER_STING = 3034, + + /* Hunter - Beast Mastery */ + SPELL_BESTIAL_WRATH = 19574, + PASSIVE_BEAST_WITHIN = 34692, + PASSIVE_BEAST_MASTERY = 53270, + + /* Hunter - Marksmanship */ + SPELL_AIMED_SHOT = 19434, + PASSIVE_TRUESHOT_AURA = 19506, + SPELL_CHIMERA_SHOT = 53209, + SPELL_ARCANE_SHOT = 49045, + SPELL_STEADY_SHOT = 49052, + SPELL_READINESS = 23989, + SPELL_SILENCING_SHOT = 34490, - /* Priest */ - SPELL_SOUL_WARDING = 63574, - SPELL_SPIRIT_REDEMPTION = 20711, - SPELL_SHADOWFORM = 15473, + /* Hunter - Survival */ + PASSIVE_LOCK_AND_LOAD = 56344, + SPELL_WYVERN_STING = 19386, + SPELL_EXPLOSIVE_SHOT = 53301, + SPELL_BLACK_ARROW = 3674, - /* Shaman */ - SPELL_TIDAL_FORCE = 582, - SPELL_MANA_TIDE_TOTEM = 590, - SPELL_SHA_NATURE_SWIFT = 591, + /* Rogue - Generic */ + SPELL_DISMANTLE = 51722, + SPELL_EVASION = 26669, + SPELL_KICK = 1766, + SPELL_VANISH = 26889, + SPELL_BLIND = 2094, + SPELL_CLOAK_OF_SHADOWS = 31224, + + /* Rogue - Assassination */ + SPELL_COLD_BLOOD = 14177, + SPELL_MUTILATE = 1329, + SPELL_HUNGER_FOR_BLOOD = 51662, + SPELL_ENVENOM = 57993, + + /* Rogue - Combat */ + SPELL_SINISTER_STRIKE = 48637, + SPELL_BLADE_FLURRY = 13877, + SPELL_ADRENALINE_RUSH = 13750, + SPELL_KILLING_SPREE = 51690, + SPELL_EVISCERATE = 48668, + + /* Rogue - Sublety */ + SPELL_HEMORRHAGE = 16511, + SPELL_PREMEDITATION = 14183, + SPELL_SHADOW_DANCE = 51713, + SPELL_PREPARATION = 14185, + SPELL_SHADOWSTEP = 36554, + + /* Priest - Generic */ + SPELL_FEAR_WARD = 6346, + SPELL_POWER_WORD_FORT = 48161, + SPELL_DIVINE_SPIRIT = 48073, + SPELL_SHADOW_PROTECTION = 48169, + SPELL_DIVINE_HYMN = 64843, + SPELL_HYMN_OF_HOPE = 64901, + SPELL_SHADOW_WORD_DEATH = 48158, + SPELL_PSYCHIC_SCREAM = 10890, + + /* Priest - Discipline */ + PASSIVE_SOUL_WARDING = 63574, + SPELL_POWER_INFUSION = 10060, + SPELL_PENANCE = 47540, + SPELL_PAIN_SUPPRESSION = 33206, + SPELL_INNER_FOCUS = 14751, + SPELL_POWER_WORD_SHIELD = 48066, + + /* Priest - Holy */ + PASSIVE_SPIRIT_REDEMPTION = 20711, + SPELL_DESPERATE_PRAYER = 19236, + SPELL_GUARDIAN_SPIRIT = 47788, + SPELL_FLASH_HEAL = 48071, + SPELL_RENEW = 48068, + + /* Priest - Shadow */ + SPELL_VAMPIRIC_EMBRACE = 15286, + SPELL_SHADOWFORM = 15473, + SPELL_VAMPIRIC_TOUCH = 34914, + SPELL_MIND_FLAY = 15407, + SPELL_MIND_BLAST = 48127, + SPELL_SHADOW_WORD_PAIN = 48125, + SPELL_DEVOURING_PLAGUE = 48300, + SPELL_DISPERSION = 47585, + + /* Death Knight - Generic */ + SPELL_DEATH_GRIP = 49576, + SPELL_STRANGULATE = 47476, + SPELL_EMPOWER_RUNE_WEAP = 47568, + SPELL_ICEBORN_FORTITUDE = 48792, + SPELL_ANTI_MAGIC_SHELL = 48707, + SPELL_DEATH_COIL_DK = 49895, + SPELL_MIND_FREEZE = 47528, + SPELL_ICY_TOUCH = 49909, + AURA_FROST_FEVER = 55095, + SPELL_PLAGUE_STRIKE = 49921, + AURA_BLOOD_PLAGUE = 55078, + SPELL_PESTILENCE = 50842, + + /* Death Knight - Blood */ + SPELL_RUNE_TAP = 48982, + SPELL_HYSTERIA = 49016, + SPELL_HEART_STRIKE = 55050, + SPELL_DEATH_STRIKE = 49924, + SPELL_BLOOD_STRIKE = 49930, + SPELL_MARK_OF_BLOOD = 49005, + SPELL_VAMPIRIC_BLOOD = 55233, + + /* Death Knight - Frost */ + PASSIVE_ICY_TALONS = 50887, + SPELL_FROST_STRIKE = 49143, + SPELL_HOWLING_BLAST = 49184, + SPELL_UNBREAKABLE_ARMOR = 51271, + SPELL_OBLITERATE = 51425, + SPELL_DEATHCHILL = 49796, + + /* Death Knight - Unholy */ + PASSIVE_UNHOLY_BLIGHT = 49194, + PASSIVE_MASTER_OF_GHOUL = 52143, + SPELL_SCOURGE_STRIKE = 55090, + SPELL_DEATH_AND_DECAY = 49938, + SPELL_ANTI_MAGIC_ZONE = 51052, + SPELL_SUMMON_GARGOYLE = 49206, + + /* Shaman - Generic */ + SPELL_HEROISM = 32182, + SPELL_BLOODLUST = 2825, + SPELL_GROUNDING_TOTEM = 8177, + + /* Shaman - Elemental*/ + PASSIVE_ELEMENTAL_FOCUS = 16164, + SPELL_TOTEM_OF_WRATH = 30706, + SPELL_THUNDERSTORM = 51490, + SPELL_LIGHTNING_BOLT = 49238, + SPELL_EARTH_SHOCK = 49231, + SPELL_FLAME_SHOCK = 49233, + SPELL_LAVA_BURST = 60043, + SPELL_CHAIN_LIGHTNING = 49271, + SPELL_ELEMENTAL_MASTERY = 16166, + + /* Shaman - Enhancement */ + PASSIVE_SPIRIT_WEAPONS = 16268, + SPELL_LAVA_LASH = 60103, + SPELL_FERAL_SPIRIT = 51533, + AURA_MAELSTROM_WEAPON = 53817, SPELL_STORMSTRIKE = 17364, + SPELL_SHAMANISTIC_RAGE = 30823, + + /* Shaman - Restoration*/ + SPELL_SHA_NATURE_SWIFT = 591, + SPELL_MANA_TIDE_TOTEM = 590, + SPELL_EARTH_SHIELD = 49284, + SPELL_RIPTIDE = 61295, + SPELL_HEALING_WAVE = 49273, + SPELL_LESSER_HEAL_WAVE = 49276, + SPELL_TIDAL_FORCE = 55198, + + /* Mage - Generic */ + SPELL_DAMPEN_MAGIC = 43015, + SPELL_EVOCATION = 12051, + SPELL_MANA_SHIELD = 43020, + SPELL_MIRROR_IMAGE = 55342, + SPELL_SPELLSTEAL = 30449, + SPELL_COUNTERSPELL = 2139, + SPELL_ICE_BLOCK = 45438, + + /* Mage - Arcane */ + SPELL_FOCUS_MAGIC = 54646, + SPELL_ARCANE_POWER = 12042, + SPELL_ARCANE_BARRAGE = 44425, + SPELL_ARCANE_BLAST = 42897, + AURA_ARCANE_BLAST = 36032, + SPELL_ARCANE_MISSILES = 42846, + SPELL_PRESENCE_OF_MIND = 12043, + + /* Mage - Fire */ + SPELL_PYROBLAST = 11366, + SPELL_COMBUSTION = 11129, + SPELL_LIVING_BOMB = 44457, + SPELL_FIREBALL = 42833, + SPELL_FIRE_BLAST = 42873, + SPELL_DRAGONS_BREATH = 31661, + SPELL_BLAST_WAVE = 11113, + + /* Mage - Frost */ + SPELL_ICY_VEINS = 12472, + SPELL_ICE_BARRIER = 11426, + SPELL_DEEP_FREEZE = 44572, + SPELL_FROST_NOVA = 42917, + SPELL_FROSTBOLT = 42842, + SPELL_COLD_SNAP = 11958, + SPELL_ICE_LANCE = 42914, + + /* Warlock - Generic */ + SPELL_FEAR = 6215, + SPELL_HOWL_OF_TERROR = 17928, + SPELL_CORRUPTION = 47813, + SPELL_DEATH_COIL_W = 47860, + SPELL_SHADOW_BOLT = 47809, + SPELL_INCINERATE = 47838, + SPELL_IMMOLATE = 47811, + SPELL_SEED_OF_CORRUPTION = 47836, + + /* Warlock - Affliction */ + PASSIVE_SIPHON_LIFE = 63108, + SPELL_UNSTABLE_AFFLICTION = 30108, + SPELL_HAUNT = 48181, + SPELL_CURSE_OF_AGONY = 47864, + SPELL_DRAIN_SOUL = 47855, - /* Druid */ - SPELL_MOONKIN_FORM = 24858, - SPELL_SWIFTMEND = 18562, - SPELL_DRU_NATURE_SWIFT = 17116, - SPELL_TREE_OF_LIFE = 33891 + /* Warlock - Demonology */ + SPELL_SOUL_LINK = 19028, + SPELL_DEMONIC_EMPOWERMENT = 47193, + SPELL_METAMORPHOSIS = 59672, + SPELL_IMMOLATION_AURA = 50589, + SPELL_DEMON_CHARGE = 54785, + AURA_DECIMATION = 63167, + AURA_MOLTEN_CORE = 71165, + SPELL_SOUL_FIRE = 47825, + + /* Warlock - Destruction */ + SPELL_SHADOWBURN = 17877, + SPELL_CONFLAGRATE = 17962, + SPELL_CHAOS_BOLT = 50796, + SPELL_SHADOWFURY = 47847, + + /* Druid - Generic */ + SPELL_BARKSKIN = 22812, + SPELL_INNERVATE = 29166, + + /* Druid - Balance */ + SPELL_INSECT_SWARM = 5570, + SPELL_MOONKIN_FORM = 24858, + SPELL_STARFALL = 48505, + SPELL_TYPHOON = 61384, + AURA_ECLIPSE_LUNAR = 48518, + SPELL_MOONFIRE = 48463, + SPELL_STARFIRE = 48465, + SPELL_WRATH = 48461, + + /* Druid - Feral */ + SPELL_CAT_FORM = 768, + SPELL_SURVIVAL_INSTINCTS = 61336, + SPELL_MANGLE = 33917, + SPELL_BERSERK = 50334, + SPELL_MANGLE_CAT = 48566, + SPELL_FERAL_CHARGE_CAT = 49376, + SPELL_RAKE = 48574, + SPELL_RIP = 49800, + SPELL_SAVAGE_ROAR = 52610, + SPELL_TIGER_FURY = 50213, + SPELL_CLAW = 48570, + SPELL_DASH = 33357, + SPELL_MAIM = 49802, + + /* Druid - Restoration */ + SPELL_SWIFTMEND = 18562, + SPELL_TREE_OF_LIFE = 33891, + SPELL_WILD_GROWTH = 48438, + SPELL_NATURE_SWIFTNESS = 17116, + SPELL_TRANQUILITY = 48447, + SPELL_NOURISH = 50464, + SPELL_HEALING_TOUCH = 48378, + SPELL_REJUVENATION = 48441, + SPELL_REGROWTH = 48443, + SPELL_LIFEBLOOM = 48451 }; +// As it turns out, finding out "how many points does the player have in spec X" is actually really expensive to do frequently +// So instead, we just check for a handful of spells that, realistically, no spec is gonna go without (and "has spell" is cheap!) +// Can players deliberately trick this check? Yes. +// Is it worth doing? No. +// Close enough. +static const uint32 SPEC_ICONICS[MAX_CLASSES][NUM_TALENT_TREES][NUM_SPEC_ICONICS] = { + { // CLASS_NONE + {0,0,0}, + {0,0,0}, + {0,0,0} + }, + { // CLASS_WARRIOR + {SPELL_BLADESTORM, SPELL_MORTAL_STRIKE, SPELL_SWEEPING_STRIKES}, // Arms + {PASSIVE_TITANS_GRIP, SPELL_BLOODTHIRST, SPELL_DEATH_WISH}, // Fury + {SPELL_SHOCKWAVE, SPELL_DEVASTATE, SPELL_VIGILANCE} // Protection + }, + { // CLASS_PALADIN + {SPELL_BEACON_OF_LIGHT, SPELL_HOLY_SHOCK, PASSIVE_ILLUMINATION}, // Holy + {SPELL_HAMMER_OF_RIGHTEOUS, SPELL_HOLY_SHIELD, SPELL_BLESS_OF_SANC}, // Protection + {SPELL_DIVINE_STORM, SPELL_CRUSADER_STRIKE, SPELL_SEAL_OF_COMMAND} // Retribution + }, + { // CLASS_HUNTER + {PASSIVE_BEAST_MASTERY, PASSIVE_BEAST_WITHIN, SPELL_BESTIAL_WRATH}, // Beast Mastery + {SPELL_CHIMERA_SHOT, PASSIVE_TRUESHOT_AURA, SPELL_AIMED_SHOT}, // Marksmanship + {SPELL_EXPLOSIVE_SHOT, SPELL_WYVERN_STING, PASSIVE_LOCK_AND_LOAD} // Survival + }, + { // CLASS_ROGUE + {SPELL_HUNGER_FOR_BLOOD, SPELL_MUTILATE, SPELL_COLD_BLOOD}, // Assassination + {SPELL_KILLING_SPREE, SPELL_ADRENALINE_RUSH, SPELL_BLADE_FLURRY}, // Combat + {SPELL_SHADOW_DANCE, SPELL_PREMEDITATION, SPELL_HEMORRHAGE} // Sublety + }, + { // CLASS_PRIEST + {SPELL_PENANCE, SPELL_POWER_INFUSION, PASSIVE_SOUL_WARDING}, // Discipline + {SPELL_GUARDIAN_SPIRIT, PASSIVE_SPIRIT_REDEMPTION, SPELL_DESPERATE_PRAYER}, // Holy + {SPELL_VAMPIRIC_TOUCH, SPELL_SHADOWFORM, SPELL_VAMPIRIC_EMBRACE} // Shadow + }, + { // CLASS_DEATH_KNIGHT + {SPELL_HEART_STRIKE, SPELL_HYSTERIA, SPELL_RUNE_TAP}, // Blood + {SPELL_HOWLING_BLAST, SPELL_FROST_STRIKE, PASSIVE_ICY_TALONS}, // Frost + {SPELL_SCOURGE_STRIKE, PASSIVE_MASTER_OF_GHOUL, PASSIVE_UNHOLY_BLIGHT} // Unholy + }, + { // CLASS_SHAMAN + {SPELL_THUNDERSTORM, SPELL_TOTEM_OF_WRATH, PASSIVE_ELEMENTAL_FOCUS}, // Elemental + {SPELL_FERAL_SPIRIT, SPELL_LAVA_LASH, PASSIVE_SPIRIT_WEAPONS}, // Enhancement + {SPELL_RIPTIDE, SPELL_MANA_TIDE_TOTEM, SPELL_SHA_NATURE_SWIFT} // Restoration + }, + { // CLASS_MAGE + {SPELL_ARCANE_BARRAGE, SPELL_ARCANE_POWER, SPELL_FOCUS_MAGIC}, // Arcane + {SPELL_LIVING_BOMB, SPELL_COMBUSTION, SPELL_PYROBLAST}, // Fire + {SPELL_DEEP_FREEZE, SPELL_ICE_BARRIER, SPELL_ICY_VEINS} // Frost + }, + { // CLASS_WARLOCK + {SPELL_HAUNT, SPELL_UNSTABLE_AFFLICTION, PASSIVE_SIPHON_LIFE}, // Affliction + {SPELL_METAMORPHOSIS, SPELL_DEMONIC_EMPOWERMENT, SPELL_SOUL_LINK}, // Demonology + {SPELL_CHAOS_BOLT, SPELL_CONFLAGRATE, SPELL_SHADOWBURN} // Destruction + }, + { // CLASS_UNK + {0,0,0}, + {0,0,0}, + {0,0,0} + }, + { // CLASS_DRUID + {SPELL_STARFALL, SPELL_MOONKIN_FORM, SPELL_INSECT_SWARM}, // Balance + {SPELL_BERSERK, SPELL_MANGLE, SPELL_SURVIVAL_INSTINCTS}, // Feral + {SPELL_WILD_GROWTH, SPELL_TREE_OF_LIFE, SPELL_SWIFTMEND} // Restoration + } +}; + +uint8 PlayerAI::GetPlayerSpec(Player const* who) +{ + if (!who) + return 0; + + uint8 wClass = who->getClass(); + for (uint8 tier = 0; tier < NUM_SPEC_ICONICS; ++tier) + for (uint8 tree = 0; tree < NUM_TALENT_TREES; ++tree) + if (SPEC_ICONICS[wClass][tree][tier] && who->HasSpell(SPEC_ICONICS[wClass][tree][tier])) + return tree; + + return 0; +} + bool PlayerAI::IsPlayerHealer(Player const* who) { + if (!who) + return false; + switch (who->getClass()) { case CLASS_WARRIOR: @@ -61,18 +526,21 @@ bool PlayerAI::IsPlayerHealer(Player const* who) default: return false; case CLASS_PALADIN: - return who->HasSpell(PASSIVE_ILLUMINATION); + return (PlayerAI::GetPlayerSpec(who) == SPEC_PALADIN_HOLY); case CLASS_PRIEST: - return who->HasSpell(SPELL_SOUL_WARDING) || who->HasSpell(SPELL_SPIRIT_REDEMPTION); + return (PlayerAI::GetPlayerSpec(who) != SPEC_PRIEST_SHADOW); case CLASS_SHAMAN: - return who->HasSpell(SPELL_MANA_TIDE_TOTEM) || who->HasSpell(SPELL_SHA_NATURE_SWIFT) || who->HasSpell(SPELL_TIDAL_FORCE); + return (PlayerAI::GetPlayerSpec(who) == SPEC_SHAMAN_RESTORATION); case CLASS_DRUID: - return who->HasSpell(SPELL_SWIFTMEND) || who->HasSpell(SPELL_DRU_NATURE_SWIFT) || who->HasSpell(SPELL_TREE_OF_LIFE); + return (PlayerAI::GetPlayerSpec(who) == SPEC_DRUID_RESTORATION); } } bool PlayerAI::IsPlayerRangedAttacker(Player const* who) { + if (!who) + return false; + switch (who->getClass()) { case CLASS_WARRIOR: @@ -94,12 +562,106 @@ bool PlayerAI::IsPlayerRangedAttacker(Player const* who) return false; } case CLASS_PRIEST: - return who->HasSpell(SPELL_SHADOWFORM); + return (PlayerAI::GetPlayerSpec(who) == SPEC_PRIEST_SHADOW); case CLASS_SHAMAN: - return !who->HasSpell(SPELL_STORMSTRIKE); + return (PlayerAI::GetPlayerSpec(who) == SPEC_SHAMAN_ELEMENTAL); case CLASS_DRUID: - return who->HasSpell(SPELL_MOONKIN_FORM); + return (PlayerAI::GetPlayerSpec(who) == SPEC_DRUID_BALANCE); + } +} + +PlayerAI::TargetedSpell PlayerAI::VerifySpellCast(uint32 spellId, Unit* target) +{ + // Find highest spell rank that we know + uint32 knownRank, nextRank; + if (me->HasSpell(spellId)) + { + // this will save us some lookups if the player has the highest rank (expected case) + knownRank = spellId; + nextRank = sSpellMgr->GetNextSpellInChain(spellId); + } + else + { + knownRank = 0; + nextRank = sSpellMgr->GetFirstSpellInChain(spellId); + } + + while (nextRank && me->HasSpell(nextRank)) + { + knownRank = nextRank; + nextRank = sSpellMgr->GetNextSpellInChain(knownRank); + } + + if (!knownRank) + return {}; + + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(knownRank); + if (!spellInfo) + return {}; + + if (me->GetSpellHistory()->HasGlobalCooldown(spellInfo)) + return {}; + + Spell* spell = new Spell(me, spellInfo, TRIGGERED_NONE); + if (spell->CanAutoCast(target)) + return{ spell, target }; + + delete spell; + return {}; +} + +PlayerAI::TargetedSpell PlayerAI::VerifySpellCast(uint32 spellId, SpellTarget target) +{ + Unit* pTarget = nullptr; + switch (target) + { + case TARGET_NONE: + break; + case TARGET_VICTIM: + pTarget = me->GetVictim(); + if (!pTarget) + return {}; + break; + case TARGET_CHARMER: + pTarget = me->GetCharmer(); + if (!pTarget) + return {}; + break; + case TARGET_SELF: + pTarget = me; + break; + } + + return VerifySpellCast(spellId, pTarget); +} + +PlayerAI::TargetedSpell PlayerAI::SelectSpellCast(PossibleSpellVector& spells) +{ + uint32 totalWeights = 0; + for (PossibleSpell const& wSpell : spells) + totalWeights += wSpell.second; + + TargetedSpell selected; + uint32 randNum = urand(0, totalWeights - 1); + for (PossibleSpell const& wSpell : spells) + { + if (selected) + { + delete wSpell.first.first; + continue; + } + + if (randNum < wSpell.second) + selected = wSpell.first; + else + { + randNum -= wSpell.second; + delete wSpell.first.first; + } } + + spells.clear(); + return selected; } void PlayerAI::DoRangedAttackIfReady() @@ -150,6 +712,29 @@ void PlayerAI::DoAutoAttackIfReady() DoMeleeAttackIfReady(); } +void PlayerAI::CancelAllShapeshifts() +{ + std::list<AuraEffect*> const& shapeshiftAuras = me->GetAuraEffectsByType(SPELL_AURA_MOD_SHAPESHIFT); + std::set<Aura*> removableShapeshifts; + for (AuraEffect* auraEff : shapeshiftAuras) + { + Aura* aura = auraEff->GetBase(); + if (!aura) + continue; + SpellInfo const* auraInfo = aura->GetSpellInfo(); + if (!auraInfo) + continue; + if (auraInfo->HasAttribute(SPELL_ATTR0_CANT_CANCEL)) + continue; + if (!auraInfo->IsPositive() || auraInfo->IsPassive()) + continue; + removableShapeshifts.insert(aura); + } + + for (Aura* aura : removableShapeshifts) + me->RemoveOwnedAura(aura, AURA_REMOVE_BY_CANCEL); +} + struct UncontrolledTargetSelectPredicate : public std::unary_function<Unit*, bool> { bool operator()(Unit const* target) const @@ -164,7 +749,516 @@ Unit* SimpleCharmedPlayerAI::SelectAttackTarget() const return nullptr; } -void SimpleCharmedPlayerAI::UpdateAI(const uint32 /*diff*/) +PlayerAI::TargetedSpell SimpleCharmedPlayerAI::SelectAppropriateCastForSpec() +{ + PossibleSpellVector spells; + + switch (me->getClass()) + { + case CLASS_WARRIOR: + if (!me->IsWithinMeleeRange(me->GetVictim())) + { + VerifyAndPushSpellCast(spells, SPELL_CHARGE, TARGET_VICTIM, 15); + VerifyAndPushSpellCast(spells, SPELL_INTERCEPT, TARGET_VICTIM, 10); + } + VerifyAndPushSpellCast(spells, SPELL_ENRAGED_REGEN, TARGET_NONE, 3); + VerifyAndPushSpellCast(spells, SPELL_INTIMIDATING_SHOUT, TARGET_VICTIM, 4); + if (me->GetVictim() && me->GetVictim()->HasUnitState(UNIT_STATE_CASTING)) + { + VerifyAndPushSpellCast(spells, SPELL_PUMMEL, TARGET_VICTIM, 15); + VerifyAndPushSpellCast(spells, SPELL_SHIELD_BASH, TARGET_VICTIM, 15); + } + VerifyAndPushSpellCast(spells, SPELL_BLOODRAGE, TARGET_NONE, 5); + switch (GetSpec()) + { + case SPEC_WARRIOR_PROTECTION: + VerifyAndPushSpellCast(spells, SPELL_SHOCKWAVE, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_CONCUSSION_BLOW, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_DISARM, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_LAST_STAND, TARGET_NONE, 5); + VerifyAndPushSpellCast(spells, SPELL_SHIELD_BLOCK, TARGET_NONE, 1); + VerifyAndPushSpellCast(spells, SPELL_SHIELD_SLAM, TARGET_VICTIM, 4); + VerifyAndPushSpellCast(spells, SPELL_SHIELD_WALL, TARGET_NONE, 5); + VerifyAndPushSpellCast(spells, SPELL_SPELL_REFLECTION, TARGET_NONE, 3); + VerifyAndPushSpellCast(spells, SPELL_DEVASTATE, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_REND, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_THUNDER_CLAP, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_DEMO_SHOUT, TARGET_VICTIM, 1); + break; + case SPEC_WARRIOR_ARMS: + VerifyAndPushSpellCast(spells, SPELL_SWEEPING_STRIKES, TARGET_NONE, 2); + VerifyAndPushSpellCast(spells, SPELL_MORTAL_STRIKE, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_BLADESTORM, TARGET_NONE, 10); + VerifyAndPushSpellCast(spells, SPELL_REND, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_RETALIATION, TARGET_NONE, 3); + VerifyAndPushSpellCast(spells, SPELL_SHATTERING_THROW, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_SWEEPING_STRIKES, TARGET_NONE, 5); + VerifyAndPushSpellCast(spells, SPELL_THUNDER_CLAP, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_EXECUTE, TARGET_VICTIM, 15); + break; + case SPEC_WARRIOR_FURY: + VerifyAndPushSpellCast(spells, SPELL_DEATH_WISH, TARGET_NONE, 10); + VerifyAndPushSpellCast(spells, SPELL_BLOODTHIRST, TARGET_VICTIM, 4); + VerifyAndPushSpellCast(spells, SPELL_DEMO_SHOUT, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_EXECUTE, TARGET_VICTIM, 15); + VerifyAndPushSpellCast(spells, SPELL_HEROIC_FURY, TARGET_NONE, 5); + VerifyAndPushSpellCast(spells, SPELL_RECKLESSNESS, TARGET_NONE, 8); + VerifyAndPushSpellCast(spells, SPELL_PIERCING_HOWL, TARGET_VICTIM, 2); + break; + } + break; + case CLASS_PALADIN: + VerifyAndPushSpellCast(spells, SPELL_AURA_MASTERY, TARGET_NONE, 3); + VerifyAndPushSpellCast(spells, SPELL_LAY_ON_HANDS, TARGET_CHARMER, 8); + VerifyAndPushSpellCast(spells, SPELL_BLESSING_OF_MIGHT, TARGET_CHARMER, 8); + VerifyAndPushSpellCast(spells, SPELL_AVENGING_WRATH, TARGET_NONE, 5); + VerifyAndPushSpellCast(spells, SPELL_DIVINE_PROTECTION, TARGET_NONE, 4); + VerifyAndPushSpellCast(spells, SPELL_DIVINE_SHIELD, TARGET_NONE, 2); + VerifyAndPushSpellCast(spells, SPELL_HAMMER_OF_JUSTICE, TARGET_VICTIM, 6); + VerifyAndPushSpellCast(spells, SPELL_HAND_OF_FREEDOM, TARGET_SELF, 3); + VerifyAndPushSpellCast(spells, SPELL_HAND_OF_PROTECTION, TARGET_SELF, 1); + if (Creature* creatureCharmer = ObjectAccessor::GetCreature(*me, me->GetCharmerGUID())) + { + if (creatureCharmer->IsDungeonBoss() || creatureCharmer->isWorldBoss()) + VerifyAndPushSpellCast(spells, SPELL_HAND_OF_SACRIFICE, creatureCharmer, 10); + else + VerifyAndPushSpellCast(spells, SPELL_HAND_OF_PROTECTION, creatureCharmer, 3); + } + + switch (GetSpec()) + { + case SPEC_PALADIN_PROTECTION: + VerifyAndPushSpellCast(spells, SPELL_HAMMER_OF_RIGHTEOUS, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_DIVINE_SACRIFICE, TARGET_NONE, 2); + VerifyAndPushSpellCast(spells, SPELL_SHIELD_OF_RIGHTEOUS, TARGET_VICTIM, 4); + VerifyAndPushSpellCast(spells, SPELL_JUDGEMENT, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_CONSECRATION, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_HOLY_SHIELD, TARGET_NONE, 1); + break; + case SPEC_PALADIN_HOLY: + VerifyAndPushSpellCast(spells, SPELL_HOLY_SHOCK, TARGET_CHARMER, 3); + VerifyAndPushSpellCast(spells, SPELL_HOLY_SHOCK, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_FLASH_OF_LIGHT, TARGET_CHARMER, 4); + VerifyAndPushSpellCast(spells, SPELL_HOLY_LIGHT, TARGET_CHARMER, 3); + VerifyAndPushSpellCast(spells, SPELL_DIVINE_FAVOR, TARGET_NONE, 5); + VerifyAndPushSpellCast(spells, SPELL_DIVINE_ILLUMINATION, TARGET_NONE, 3); + break; + case SPEC_PALADIN_RETRIBUTION: + VerifyAndPushSpellCast(spells, SPELL_CRUSADER_STRIKE, TARGET_VICTIM, 4); + VerifyAndPushSpellCast(spells, SPELL_DIVINE_STORM, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_JUDGEMENT, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_HAMMER_OF_WRATH, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_RIGHTEOUS_FURY, TARGET_NONE, 2); + break; + } + break; + case CLASS_HUNTER: + VerifyAndPushSpellCast(spells, SPELL_DETERRENCE, TARGET_NONE, 3); + VerifyAndPushSpellCast(spells, SPELL_EXPLOSIVE_TRAP, TARGET_NONE, 1); + VerifyAndPushSpellCast(spells, SPELL_FREEZING_ARROW, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_RAPID_FIRE, TARGET_NONE, 10); + VerifyAndPushSpellCast(spells, SPELL_KILL_SHOT, TARGET_VICTIM, 10); + if (me->GetVictim() && me->GetVictim()->getPowerType() == POWER_MANA && !me->GetVictim()->GetAuraApplicationOfRankedSpell(SPELL_VIPER_STING, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_VIPER_STING, TARGET_VICTIM, 5); + + switch (GetSpec()) + { + case SPEC_HUNTER_BEAST_MASTERY: + VerifyAndPushSpellCast(spells, SPELL_AIMED_SHOT, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_ARCANE_SHOT, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_STEADY_SHOT, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_MULTI_SHOT, TARGET_VICTIM, 2); + break; + case SPEC_HUNTER_MARKSMANSHIP: + VerifyAndPushSpellCast(spells, SPELL_AIMED_SHOT, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_CHIMERA_SHOT, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_ARCANE_SHOT, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_STEADY_SHOT, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_READINESS, TARGET_NONE, 10); + VerifyAndPushSpellCast(spells, SPELL_SILENCING_SHOT, TARGET_VICTIM, 5); + break; + case SPEC_HUNTER_SURVIVAL: + VerifyAndPushSpellCast(spells, SPELL_EXPLOSIVE_SHOT, TARGET_VICTIM, 8); + VerifyAndPushSpellCast(spells, SPELL_BLACK_ARROW, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_MULTI_SHOT, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_STEADY_SHOT, TARGET_VICTIM, 1); + break; + } + break; + case CLASS_ROGUE: + { + VerifyAndPushSpellCast(spells, SPELL_DISMANTLE, TARGET_VICTIM, 8); + VerifyAndPushSpellCast(spells, SPELL_EVASION, TARGET_NONE, 8); + VerifyAndPushSpellCast(spells, SPELL_VANISH, TARGET_NONE, 4); + VerifyAndPushSpellCast(spells, SPELL_BLIND, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_CLOAK_OF_SHADOWS, TARGET_NONE, 2); + + uint32 builder = 0, finisher = 0; + switch (GetSpec()) + { + case SPEC_ROGUE_ASSASSINATION: + builder = SPELL_MUTILATE, finisher = SPELL_ENVENOM; + VerifyAndPushSpellCast(spells, SPELL_COLD_BLOOD, TARGET_NONE, 20); + break; + case SPEC_ROGUE_COMBAT: + builder = SPELL_SINISTER_STRIKE, finisher = SPELL_EVISCERATE; + VerifyAndPushSpellCast(spells, SPELL_ADRENALINE_RUSH, TARGET_NONE, 6); + VerifyAndPushSpellCast(spells, SPELL_BLADE_FLURRY, TARGET_NONE, 5); + VerifyAndPushSpellCast(spells, SPELL_KILLING_SPREE, TARGET_NONE, 25); + break; + case SPEC_ROGUE_SUBLETY: + builder = SPELL_HEMORRHAGE, finisher = SPELL_EVISCERATE; + VerifyAndPushSpellCast(spells, SPELL_PREPARATION, TARGET_NONE, 10); + if (!me->IsWithinMeleeRange(me->GetVictim())) + VerifyAndPushSpellCast(spells, SPELL_SHADOWSTEP, TARGET_VICTIM, 25); + VerifyAndPushSpellCast(spells, SPELL_SHADOW_DANCE, TARGET_NONE, 10); + break; + } + + if (Unit* victim = me->GetVictim()) + { + if (victim->HasUnitState(UNIT_STATE_CASTING)) + VerifyAndPushSpellCast(spells, SPELL_KICK, TARGET_VICTIM, 25); + + uint8 const cp = (me->GetComboTarget() == victim->GetGUID()) ? me->GetComboPoints() : 0; + if (cp >= 4) + VerifyAndPushSpellCast(spells, finisher, TARGET_VICTIM, 10); + if (cp <= 4) + VerifyAndPushSpellCast(spells, builder, TARGET_VICTIM, 5); + } + break; + } + case CLASS_PRIEST: + VerifyAndPushSpellCast(spells, SPELL_FEAR_WARD, TARGET_SELF, 2); + VerifyAndPushSpellCast(spells, SPELL_POWER_WORD_FORT, TARGET_CHARMER, 1); + VerifyAndPushSpellCast(spells, SPELL_DIVINE_SPIRIT, TARGET_CHARMER, 1); + VerifyAndPushSpellCast(spells, SPELL_SHADOW_PROTECTION, TARGET_CHARMER, 2); + VerifyAndPushSpellCast(spells, SPELL_DIVINE_HYMN, TARGET_NONE, 5); + VerifyAndPushSpellCast(spells, SPELL_HYMN_OF_HOPE, TARGET_NONE, 5); + VerifyAndPushSpellCast(spells, SPELL_SHADOW_WORD_DEATH, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_PSYCHIC_SCREAM, TARGET_VICTIM, 3); + switch (GetSpec()) + { + case SPEC_PRIEST_DISCIPLINE: + VerifyAndPushSpellCast(spells, SPELL_POWER_WORD_SHIELD, TARGET_CHARMER, 3); + VerifyAndPushSpellCast(spells, SPELL_INNER_FOCUS, TARGET_NONE, 3); + VerifyAndPushSpellCast(spells, SPELL_PAIN_SUPPRESSION, TARGET_CHARMER, 15); + VerifyAndPushSpellCast(spells, SPELL_POWER_INFUSION, TARGET_CHARMER, 10); + VerifyAndPushSpellCast(spells, SPELL_PENANCE, TARGET_CHARMER, 3); + VerifyAndPushSpellCast(spells, SPELL_FLASH_HEAL, TARGET_CHARMER, 1); + break; + case SPEC_PRIEST_HOLY: + VerifyAndPushSpellCast(spells, SPELL_DESPERATE_PRAYER, TARGET_NONE, 3); + VerifyAndPushSpellCast(spells, SPELL_GUARDIAN_SPIRIT, TARGET_CHARMER, 5); + VerifyAndPushSpellCast(spells, SPELL_FLASH_HEAL, TARGET_CHARMER, 1); + VerifyAndPushSpellCast(spells, SPELL_RENEW, TARGET_CHARMER, 3); + break; + case SPEC_PRIEST_SHADOW: + if (!me->HasAura(SPELL_SHADOWFORM)) + { + VerifyAndPushSpellCast(spells, SPELL_SHADOWFORM, TARGET_NONE, 100); + break; + } + if (Unit* victim = me->GetVictim()) + { + if (!victim->GetAuraApplicationOfRankedSpell(SPELL_VAMPIRIC_TOUCH, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_VAMPIRIC_TOUCH, TARGET_VICTIM, 4); + if (!victim->GetAuraApplicationOfRankedSpell(SPELL_SHADOW_WORD_PAIN, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_SHADOW_WORD_PAIN, TARGET_VICTIM, 3); + if (!victim->GetAuraApplicationOfRankedSpell(SPELL_DEVOURING_PLAGUE, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_DEVOURING_PLAGUE, TARGET_VICTIM, 4); + } + VerifyAndPushSpellCast(spells, SPELL_MIND_BLAST, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_MIND_FLAY, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_DISPERSION, TARGET_NONE, 10); + break; + } + break; + case CLASS_DEATH_KNIGHT: + { + if (!me->IsWithinMeleeRange(me->GetVictim())) + VerifyAndPushSpellCast(spells, SPELL_DEATH_GRIP, TARGET_VICTIM, 25); + VerifyAndPushSpellCast(spells, SPELL_STRANGULATE, TARGET_VICTIM, 15); + VerifyAndPushSpellCast(spells, SPELL_EMPOWER_RUNE_WEAP, TARGET_NONE, 5); + VerifyAndPushSpellCast(spells, SPELL_ICEBORN_FORTITUDE, TARGET_NONE, 15); + VerifyAndPushSpellCast(spells, SPELL_ANTI_MAGIC_SHELL, TARGET_NONE, 10); + + bool hasFF = false, hasBP = false; + if (Unit* victim = me->GetVictim()) + { + if (victim->HasUnitState(UNIT_STATE_CASTING)) + VerifyAndPushSpellCast(spells, SPELL_MIND_FREEZE, TARGET_VICTIM, 25); + + hasFF = !!victim->GetAuraApplicationOfRankedSpell(AURA_FROST_FEVER, me->GetGUID()), hasBP = !!victim->GetAuraApplicationOfRankedSpell(AURA_BLOOD_PLAGUE, me->GetGUID()); + if (hasFF && hasBP) + VerifyAndPushSpellCast(spells, SPELL_PESTILENCE, TARGET_VICTIM, 3); + if (!hasFF) + VerifyAndPushSpellCast(spells, SPELL_ICY_TOUCH, TARGET_VICTIM, 4); + if (!hasBP) + VerifyAndPushSpellCast(spells, SPELL_PLAGUE_STRIKE, TARGET_VICTIM, 4); + } + switch (GetSpec()) + { + case SPEC_DEATH_KNIGHT_BLOOD: + VerifyAndPushSpellCast(spells, SPELL_RUNE_TAP, TARGET_NONE, 2); + VerifyAndPushSpellCast(spells, SPELL_HYSTERIA, TARGET_SELF, 5); + if (Creature* creatureCharmer = ObjectAccessor::GetCreature(*me, me->GetCharmerGUID())) + if (!creatureCharmer->IsDungeonBoss() && !creatureCharmer->isWorldBoss()) + VerifyAndPushSpellCast(spells, SPELL_HYSTERIA, creatureCharmer, 15); + VerifyAndPushSpellCast(spells, SPELL_HEART_STRIKE, TARGET_VICTIM, 2); + if (hasFF && hasBP) + VerifyAndPushSpellCast(spells, SPELL_DEATH_STRIKE, TARGET_VICTIM, 8); + VerifyAndPushSpellCast(spells, SPELL_DEATH_COIL_DK, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_MARK_OF_BLOOD, TARGET_VICTIM, 20); + VerifyAndPushSpellCast(spells, SPELL_VAMPIRIC_BLOOD, TARGET_NONE, 10); + break; + case SPEC_DEATH_KNIGHT_FROST: + if (hasFF && hasBP) + VerifyAndPushSpellCast(spells, SPELL_OBLITERATE, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_HOWLING_BLAST, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_UNBREAKABLE_ARMOR, TARGET_NONE, 10); + VerifyAndPushSpellCast(spells, SPELL_DEATHCHILL, TARGET_NONE, 10); + VerifyAndPushSpellCast(spells, SPELL_FROST_STRIKE, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_BLOOD_STRIKE, TARGET_VICTIM, 1); + break; + case SPEC_DEATH_KNIGHT_UNHOLY: + if (hasFF && hasBP) + VerifyAndPushSpellCast(spells, SPELL_SCOURGE_STRIKE, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_DEATH_AND_DECAY, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_ANTI_MAGIC_ZONE, TARGET_NONE, 8); + VerifyAndPushSpellCast(spells, SPELL_SUMMON_GARGOYLE, TARGET_VICTIM, 7); + VerifyAndPushSpellCast(spells, SPELL_BLOOD_STRIKE, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_DEATH_COIL_DK, TARGET_VICTIM, 3); + break; + } + break; + } + case CLASS_SHAMAN: + VerifyAndPushSpellCast(spells, SPELL_HEROISM, TARGET_NONE, 25); + VerifyAndPushSpellCast(spells, SPELL_BLOODLUST, TARGET_NONE, 25); + VerifyAndPushSpellCast(spells, SPELL_GROUNDING_TOTEM, TARGET_NONE, 2); + switch (GetSpec()) + { + case SPEC_SHAMAN_RESTORATION: + if (Unit* charmer = me->GetCharmer()) + if (!charmer->GetAuraApplicationOfRankedSpell(SPELL_EARTH_SHIELD, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_EARTH_SHIELD, charmer, 2); + if (me->HasAura(SPELL_SHA_NATURE_SWIFT)) + VerifyAndPushSpellCast(spells, SPELL_HEALING_WAVE, TARGET_CHARMER, 20); + else + VerifyAndPushSpellCast(spells, SPELL_LESSER_HEAL_WAVE, TARGET_CHARMER, 1); + VerifyAndPushSpellCast(spells, SPELL_TIDAL_FORCE, TARGET_NONE, 4); + VerifyAndPushSpellCast(spells, SPELL_SHA_NATURE_SWIFT, TARGET_NONE, 4); + VerifyAndPushSpellCast(spells, SPELL_MANA_TIDE_TOTEM, TARGET_NONE, 3); + break; + case SPEC_SHAMAN_ELEMENTAL: + if (Unit* victim = me->GetVictim()) + { + if (victim->GetAuraOfRankedSpell(SPELL_FLAME_SHOCK, GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_LAVA_BURST, TARGET_VICTIM, 5); + else + VerifyAndPushSpellCast(spells, SPELL_FLAME_SHOCK, TARGET_VICTIM, 3); + } + VerifyAndPushSpellCast(spells, SPELL_CHAIN_LIGHTNING, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_LIGHTNING_BOLT, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_ELEMENTAL_MASTERY, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_THUNDERSTORM, TARGET_NONE, 3); + break; + case SPEC_SHAMAN_ENHANCEMENT: + if (Aura const* maelstrom = me->GetAura(AURA_MAELSTROM_WEAPON)) + if (maelstrom->GetStackAmount() == 5) + VerifyAndPushSpellCast(spells, SPELL_LIGHTNING_BOLT, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_STORMSTRIKE, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_EARTH_SHOCK, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_LAVA_LASH, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_SHAMANISTIC_RAGE, TARGET_NONE, 10); + break; + } + break; + case CLASS_MAGE: + if (me->GetVictim() && me->GetVictim()->HasUnitState(UNIT_STATE_CASTING)) + VerifyAndPushSpellCast(spells, SPELL_COUNTERSPELL, TARGET_VICTIM, 25); + VerifyAndPushSpellCast(spells, SPELL_DAMPEN_MAGIC, TARGET_CHARMER, 2); + VerifyAndPushSpellCast(spells, SPELL_EVOCATION, TARGET_NONE, 3); + VerifyAndPushSpellCast(spells, SPELL_MANA_SHIELD, TARGET_NONE, 1); + VerifyAndPushSpellCast(spells, SPELL_MIRROR_IMAGE, TARGET_NONE, 3); + VerifyAndPushSpellCast(spells, SPELL_SPELLSTEAL, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_ICE_BLOCK, TARGET_NONE, 1); + VerifyAndPushSpellCast(spells, SPELL_ICY_VEINS, TARGET_NONE, 3); + switch (GetSpec()) + { + case SPEC_MAGE_ARCANE: + if (Aura* abAura = me->GetAura(AURA_ARCANE_BLAST)) + if (abAura->GetStackAmount() >= 3) + VerifyAndPushSpellCast(spells, SPELL_ARCANE_MISSILES, TARGET_VICTIM, 7); + VerifyAndPushSpellCast(spells, SPELL_ARCANE_BLAST, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_ARCANE_BARRAGE, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_ARCANE_POWER, TARGET_NONE, 8); + VerifyAndPushSpellCast(spells, SPELL_PRESENCE_OF_MIND, TARGET_NONE, 7); + break; + case SPEC_MAGE_FIRE: + if (me->GetVictim() && !me->GetVictim()->GetAuraApplicationOfRankedSpell(SPELL_LIVING_BOMB)) + VerifyAndPushSpellCast(spells, SPELL_LIVING_BOMB, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_COMBUSTION, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_FIREBALL, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_FIRE_BLAST, TARGET_VICTIM, 1); + VerifyAndPushSpellCast(spells, SPELL_DRAGONS_BREATH, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_BLAST_WAVE, TARGET_VICTIM, 1); + break; + case SPEC_MAGE_FROST: + VerifyAndPushSpellCast(spells, SPELL_DEEP_FREEZE, TARGET_VICTIM, 10); + VerifyAndPushSpellCast(spells, SPELL_FROST_NOVA, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_FROSTBOLT, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_COLD_SNAP, TARGET_VICTIM, 5); + if (me->GetVictim() && me->GetVictim()->HasAuraState(AURA_STATE_FROZEN, nullptr, me)) + VerifyAndPushSpellCast(spells, SPELL_ICE_LANCE, TARGET_VICTIM, 5); + break; + } + break; + case CLASS_WARLOCK: + VerifyAndPushSpellCast(spells, SPELL_DEATH_COIL_W, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_FEAR, TARGET_VICTIM, 2); + VerifyAndPushSpellCast(spells, SPELL_SEED_OF_CORRUPTION, TARGET_VICTIM, 4); + VerifyAndPushSpellCast(spells, SPELL_HOWL_OF_TERROR, TARGET_NONE, 2); + if (me->GetVictim() && !me->GetVictim()->GetAuraApplicationOfRankedSpell(SPELL_CORRUPTION, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_CORRUPTION, TARGET_VICTIM, 10); + switch (GetSpec()) + { + case SPEC_WARLOCK_AFFLICTION: + if (Unit* victim = me->GetVictim()) + { + VerifyAndPushSpellCast(spells, SPELL_SHADOW_BOLT, TARGET_VICTIM, 7); + if (!victim->GetAuraApplicationOfRankedSpell(SPELL_UNSTABLE_AFFLICTION, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_UNSTABLE_AFFLICTION, TARGET_VICTIM, 8); + if (!victim->GetAuraApplicationOfRankedSpell(SPELL_HAUNT, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_HAUNT, TARGET_VICTIM, 8); + if (!victim->GetAuraApplicationOfRankedSpell(SPELL_CURSE_OF_AGONY, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_CURSE_OF_AGONY, TARGET_VICTIM, 4); + if (victim->HealthBelowPct(25)) + VerifyAndPushSpellCast(spells, SPELL_DRAIN_SOUL, TARGET_VICTIM, 100); + } + break; + case SPEC_WARLOCK_DEMONOLOGY: + VerifyAndPushSpellCast(spells, SPELL_METAMORPHOSIS, TARGET_NONE, 15); + VerifyAndPushSpellCast(spells, SPELL_SHADOW_BOLT, TARGET_VICTIM, 7); + if (me->HasAura(AURA_DECIMATION)) + VerifyAndPushSpellCast(spells, SPELL_SOUL_FIRE, TARGET_VICTIM, 100); + if (me->HasAura(SPELL_METAMORPHOSIS)) + { + VerifyAndPushSpellCast(spells, SPELL_IMMOLATION_AURA, TARGET_NONE, 30); + if (!me->IsWithinMeleeRange(me->GetVictim())) + VerifyAndPushSpellCast(spells, SPELL_DEMON_CHARGE, TARGET_VICTIM, 20); + } + if (me->GetVictim() && !me->GetVictim()->GetAuraApplicationOfRankedSpell(SPELL_IMMOLATE, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_IMMOLATE, TARGET_VICTIM, 5); + if (me->HasAura(AURA_MOLTEN_CORE)) + VerifyAndPushSpellCast(spells, SPELL_INCINERATE, TARGET_VICTIM, 10); + break; + case SPEC_WARLOCK_DESTRUCTION: + if (me->GetVictim() && !me->GetVictim()->GetAuraApplicationOfRankedSpell(SPELL_IMMOLATE, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_IMMOLATE, TARGET_VICTIM, 8); + if (me->GetVictim() && me->GetVictim()->GetAuraApplicationOfRankedSpell(SPELL_IMMOLATE, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_CONFLAGRATE, TARGET_VICTIM, 8); + VerifyAndPushSpellCast(spells, SPELL_SHADOWFURY, TARGET_VICTIM, 5); + VerifyAndPushSpellCast(spells, SPELL_CHAOS_BOLT, TARGET_VICTIM, 10); + VerifyAndPushSpellCast(spells, SPELL_SHADOWBURN, TARGET_VICTIM, 3); + VerifyAndPushSpellCast(spells, SPELL_INCINERATE, TARGET_VICTIM, 7); + break; + } + break; + case CLASS_DRUID: + VerifyAndPushSpellCast(spells, SPELL_INNERVATE, TARGET_CHARMER, 5); + VerifyAndPushSpellCast(spells, SPELL_BARKSKIN, TARGET_NONE, 5); + switch (GetSpec()) + { + case SPEC_DRUID_RESTORATION: + if (!me->HasAura(SPELL_TREE_OF_LIFE)) + { + CancelAllShapeshifts(); + VerifyAndPushSpellCast(spells, SPELL_TREE_OF_LIFE, TARGET_NONE, 100); + break; + } + VerifyAndPushSpellCast(spells, SPELL_TRANQUILITY, TARGET_NONE, 10); + VerifyAndPushSpellCast(spells, SPELL_NATURE_SWIFTNESS, TARGET_NONE, 7); + if (Creature* creatureCharmer = ObjectAccessor::GetCreature(*me, me->GetCharmerGUID())) + { + VerifyAndPushSpellCast(spells, SPELL_NOURISH, creatureCharmer, 5); + VerifyAndPushSpellCast(spells, SPELL_WILD_GROWTH, creatureCharmer, 5); + if (!creatureCharmer->GetAuraApplicationOfRankedSpell(SPELL_REJUVENATION, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_REJUVENATION, creatureCharmer, 8); + if (!creatureCharmer->GetAuraApplicationOfRankedSpell(SPELL_REGROWTH, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_REGROWTH, creatureCharmer, 8); + uint8 lifebloomStacks = 0; + if (Aura const* lifebloom = creatureCharmer->GetAura(SPELL_LIFEBLOOM, me->GetGUID())) + lifebloomStacks = lifebloom->GetStackAmount(); + if (lifebloomStacks < 3) + VerifyAndPushSpellCast(spells, SPELL_LIFEBLOOM, creatureCharmer, 5); + if (creatureCharmer->GetAuraApplicationOfRankedSpell(SPELL_REJUVENATION) || + creatureCharmer->GetAuraApplicationOfRankedSpell(SPELL_REGROWTH)) + VerifyAndPushSpellCast(spells, SPELL_SWIFTMEND, creatureCharmer, 10); + if (me->HasAura(SPELL_NATURE_SWIFTNESS)) + VerifyAndPushSpellCast(spells, SPELL_HEALING_TOUCH, creatureCharmer, 100); + } + break; + case SPEC_DRUID_BALANCE: + { + if (!me->HasAura(SPELL_MOONKIN_FORM)) + { + CancelAllShapeshifts(); + VerifyAndPushSpellCast(spells, SPELL_MOONKIN_FORM, TARGET_NONE, 100); + break; + } + uint32 const mainAttackSpell = me->HasAura(AURA_ECLIPSE_LUNAR) ? SPELL_STARFIRE : SPELL_WRATH; + VerifyAndPushSpellCast(spells, SPELL_STARFALL, TARGET_NONE, 20); + VerifyAndPushSpellCast(spells, mainAttackSpell, TARGET_VICTIM, 10); + if (me->GetVictim() && !me->GetVictim()->GetAuraApplicationOfRankedSpell(SPELL_INSECT_SWARM, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_INSECT_SWARM, TARGET_VICTIM, 7); + if (me->GetVictim() && !me->GetVictim()->GetAuraApplicationOfRankedSpell(SPELL_MOONFIRE, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_MOONFIRE, TARGET_VICTIM, 5); + if (me->GetVictim() && me->GetVictim()->HasUnitState(UNIT_STATE_CASTING)) + VerifyAndPushSpellCast(spells, SPELL_TYPHOON, TARGET_NONE, 15); + break; + } + case SPEC_DRUID_FERAL: + if (!me->HasAura(SPELL_CAT_FORM)) + { + CancelAllShapeshifts(); + VerifyAndPushSpellCast(spells, SPELL_CAT_FORM, TARGET_NONE, 100); + break; + } + VerifyAndPushSpellCast(spells, SPELL_BERSERK, TARGET_NONE, 20); + VerifyAndPushSpellCast(spells, SPELL_SURVIVAL_INSTINCTS, TARGET_NONE, 15); + VerifyAndPushSpellCast(spells, SPELL_TIGER_FURY, TARGET_NONE, 15); + VerifyAndPushSpellCast(spells, SPELL_DASH, TARGET_NONE, 5); + if (Unit* victim = me->GetVictim()) + { + uint8 const cp = (me->GetComboTarget() == victim->GetGUID()) ? me->GetComboPoints() : 0; + if (victim->HasUnitState(UNIT_STATE_CASTING) && cp >= 1) + VerifyAndPushSpellCast(spells, SPELL_MAIM, TARGET_VICTIM, 25); + if (!me->IsWithinMeleeRange(victim)) + VerifyAndPushSpellCast(spells, SPELL_FERAL_CHARGE_CAT, TARGET_VICTIM, 25); + if (cp >= 4) + VerifyAndPushSpellCast(spells, SPELL_RIP, TARGET_VICTIM, 50); + if (cp <= 4) + { + VerifyAndPushSpellCast(spells, SPELL_MANGLE_CAT, TARGET_VICTIM, 10); + VerifyAndPushSpellCast(spells, SPELL_CLAW, TARGET_VICTIM, 5); + if (!victim->GetAuraApplicationOfRankedSpell(SPELL_RAKE, me->GetGUID())) + VerifyAndPushSpellCast(spells, SPELL_RAKE, TARGET_VICTIM, 8); + if (!me->HasAura(SPELL_SAVAGE_ROAR)) + VerifyAndPushSpellCast(spells, SPELL_SAVAGE_ROAR, TARGET_NONE, 15); + } + } + break; + } + break; + } + + return SelectSpellCast(spells); +} + +static const float CASTER_CHASE_DISTANCE = 28.0f; +void SimpleCharmedPlayerAI::UpdateAI(const uint32 diff) { Creature* charmer = me->GetCharmer() ? me->GetCharmer()->ToCreature() : nullptr; if (!charmer) @@ -192,10 +1286,54 @@ void SimpleCharmedPlayerAI::UpdateAI(const uint32 /*diff*/) return; if (IsRangedAttacker()) - AttackStartCaster(target, 28.0f); + { + _chaseCloser = !me->IsWithinLOSInMap(target); + if (_chaseCloser) + AttackStart(target); + else + AttackStartCaster(target, CASTER_CHASE_DISTANCE); + } else AttackStart(target); + _forceFacing = true; } + + if (me->IsStopped() && !me->HasUnitState(UNIT_STATE_CANNOT_TURN)) + { + float targetAngle = me->GetAngle(target); + if (_forceFacing || fabs(me->GetOrientation() - targetAngle) > 0.4f) + { + me->SetFacingTo(targetAngle); + _forceFacing = false; + } + } + + if (_castCheckTimer <= diff) + { + if (me->HasUnitState(UNIT_STATE_CASTING)) + _castCheckTimer = 0; + else + { + if (IsRangedAttacker()) + { // chase to zero if the target isn't in line of sight + bool inLOS = me->IsWithinLOSInMap(target); + if (_chaseCloser != !inLOS) + { + _chaseCloser = !inLOS; + if (_chaseCloser) + AttackStart(target); + else + AttackStartCaster(target, CASTER_CHASE_DISTANCE); + } + } + if (TargetedSpell shouldCast = SelectAppropriateCastForSpec()) + DoCastAtTarget(shouldCast); + _castCheckTimer = 500; + } + } + else + _castCheckTimer -= diff; + DoAutoAttackIfReady(); } else @@ -214,6 +1352,9 @@ void SimpleCharmedPlayerAI::OnCharmed(bool apply) { me->CastStop(); me->AttackStop(); + me->StopMoving(); + me->GetMotionMaster()->Clear(); + me->GetMotionMaster()->MovePoint(0, me->GetPosition(), false); // force re-sync of current position for all clients } else { diff --git a/src/server/game/AI/PlayerAI/PlayerAI.h b/src/server/game/AI/PlayerAI/PlayerAI.h index b717816f9a3..18f65485161 100644 --- a/src/server/game/AI/PlayerAI/PlayerAI.h +++ b/src/server/game/AI/PlayerAI/PlayerAI.h @@ -20,41 +20,99 @@ #include "UnitAI.h" #include "Player.h" +#include "Spell.h" #include "Creature.h" class TC_GAME_API PlayerAI : public UnitAI { public: - explicit PlayerAI(Player* player) : UnitAI(static_cast<Unit*>(player)), me(player), _isSelfHealer(PlayerAI::IsPlayerHealer(player)), _isSelfRangedAttacker(PlayerAI::IsPlayerRangedAttacker(player)) { } + explicit PlayerAI(Player* player) : UnitAI(static_cast<Unit*>(player)), me(player), _selfSpec(PlayerAI::GetPlayerSpec(player)), _isSelfHealer(PlayerAI::IsPlayerHealer(player)), _isSelfRangedAttacker(PlayerAI::IsPlayerRangedAttacker(player)) { } void OnCharmed(bool /*apply*/) override { } // charm AI application for players is handled by Unit::SetCharmedBy / Unit::RemoveCharmedBy // helper functions to determine player info + // Return values range from 0 (left-most spec) to 2 (right-most spec). If two specs have the same number of talent points, the left-most of those specs is returned. + static uint8 GetPlayerSpec(Player const* who); + // Return values range from 0 (left-most spec) to 2 (right-most spec). If two specs have the same number of talent points, the left-most of those specs is returned. + uint8 GetSpec(Player const* who = nullptr) const { return (!who || who == me) ? _selfSpec : GetPlayerSpec(who); } static bool IsPlayerHealer(Player const* who); bool IsHealer(Player const* who = nullptr) const { return (!who || who == me) ? _isSelfHealer : IsPlayerHealer(who); } static bool IsPlayerRangedAttacker(Player const* who); bool IsRangedAttacker(Player const* who = nullptr) const { return (!who || who == me) ? _isSelfRangedAttacker : IsPlayerRangedAttacker(who); } protected: + struct TargetedSpell : public std::pair<Spell*, Unit*> + { + TargetedSpell() : pair<Spell*, Unit*>() { } + TargetedSpell(Spell* first, Unit* second) : pair<Spell*, Unit*>(first, second) { } + explicit operator bool() { return !!first; } + }; + typedef std::pair<TargetedSpell, uint32> PossibleSpell; + typedef std::vector<PossibleSpell> PossibleSpellVector; + Player* const me; void SetIsRangedAttacker(bool state) { _isSelfRangedAttacker = state; } // this allows overriding of the default ranged attacker detection + enum SpellTarget + { + TARGET_NONE, + TARGET_VICTIM, + TARGET_CHARMER, + TARGET_SELF + }; + /* Check if the specified spell can be cast on that target. + Caller is responsible for cleaning up created Spell object from pointer. */ + TargetedSpell VerifySpellCast(uint32 spellId, Unit* target); + /* Check if the specified spell can be cast on that target. + Caller is responsible for cleaning up created Spell object from pointer. */ + TargetedSpell VerifySpellCast(uint32 spellId, SpellTarget target); + + /* Helper method - checks spell cast, then pushes it onto provided vector if valid. */ + template<typename T> inline void VerifyAndPushSpellCast(PossibleSpellVector& spells, uint32 spellId, T target, uint32 weight) + { + if (TargetedSpell spell = VerifySpellCast(spellId, target)) + spells.push_back({ spell,weight }); + } + + /* Helper method - selects one spell from the vector and returns it, while deleting everything else. + This invalidates the vector, and empties it to prevent accidental misuse. */ + TargetedSpell SelectSpellCast(PossibleSpellVector& spells); + /* Helper method - casts the included spell at the included target */ + inline void DoCastAtTarget(TargetedSpell spell) + { + SpellCastTargets targets; + targets.SetUnitTarget(spell.second); + spell.first->prepare(&targets); + } + virtual Unit* SelectAttackTarget() const { return me->GetCharmer() ? me->GetCharmer()->GetVictim() : nullptr; } void DoRangedAttackIfReady(); void DoAutoAttackIfReady(); + // Cancels all shapeshifts that the player could voluntarily cancel + void CancelAllShapeshifts(); + private: - bool _isSelfHealer; + uint8 const _selfSpec; + bool const _isSelfHealer; bool _isSelfRangedAttacker; }; class SimpleCharmedPlayerAI : public PlayerAI { public: - SimpleCharmedPlayerAI(Player* player) : PlayerAI(player) { } + SimpleCharmedPlayerAI(Player* player) : PlayerAI(player), _castCheckTimer(500), _chaseCloser(false), _forceFacing(true) { } void UpdateAI(uint32 diff) override; void OnCharmed(bool apply) override; + + protected: Unit* SelectAttackTarget() const override; + + private: + TargetedSpell SelectAppropriateCastForSpec(); + uint32 _castCheckTimer; + bool _chaseCloser; + bool _forceFacing; }; #endif diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 9ce37fd0c32..316a9704cac 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -32,7 +32,7 @@ struct TSpellSummary uint8 Effects; // set of enum SelectEffect } extern* SpellSummary; -void SummonList::DoZoneInCombat(uint32 entry) +void SummonList::DoZoneInCombat(uint32 entry, float maxRangeToNearestTarget) { for (StorageType::iterator i = storage_.begin(); i != storage_.end();) { @@ -41,7 +41,7 @@ void SummonList::DoZoneInCombat(uint32 entry) if (summon && summon->IsAIEnabled && (!entry || summon->GetEntry() == entry)) { - summon->AI()->DoZoneInCombat(); + summon->AI()->DoZoneInCombat(nullptr, maxRangeToNearestTarget); } } } @@ -183,11 +183,11 @@ SpellInfo const* ScriptedAI::SelectSpell(Unit* target, uint32 school, uint32 mec { //No target so we can't cast if (!target) - return NULL; + return nullptr; //Silenced so we can't cast if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) - return NULL; + return nullptr; //Using the extended script system we first create a list of viable spells SpellInfo const* apSpell[MAX_CREATURE_SPELLS]; @@ -195,7 +195,7 @@ SpellInfo const* ScriptedAI::SelectSpell(Unit* target, uint32 school, uint32 mec uint32 spellCount = 0; - SpellInfo const* tempSpell = NULL; + SpellInfo const* tempSpell = nullptr; //Check if each spell is viable(set it to null if not) for (uint32 i = 0; i < MAX_CREATURE_SPELLS; i++) @@ -251,7 +251,7 @@ SpellInfo const* ScriptedAI::SelectSpell(Unit* target, uint32 school, uint32 mec //We got our usable spells so now lets randomly pick one if (!spellCount) - return NULL; + return nullptr; return apSpell[urand(0, spellCount - 1)]; } @@ -327,7 +327,7 @@ void ScriptedAI::DoTeleportAll(float x, float y, float z, float o) Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 minHPDiff) { - Unit* unit = NULL; + Unit* unit = nullptr; Trinity::MostHPMissingInRange u_check(me, range, minHPDiff); Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(me, unit, u_check); me->VisitNearbyObject(range, searcher); @@ -357,7 +357,7 @@ std::list<Creature*> ScriptedAI::DoFindFriendlyMissingBuff(float range, uint32 u Player* ScriptedAI::GetPlayerAtMinimumRange(float minimumRange) { - Player* player = NULL; + Player* player = nullptr; CellCoord pair(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY())); Cell cell(pair); @@ -507,6 +507,14 @@ void BossAI::_EnterCombat() ScheduleTasks(); } +bool BossAI::CanRespawn() +{ + if (instance && instance->GetBossState(_bossId) == DONE) + return false; + + return true; +} + void BossAI::TeleportCheaters() { float x, y, z; @@ -547,7 +555,7 @@ void BossAI::UpdateAI(uint32 diff) DoMeleeAttackIfReady(); } -void BossAI::_DespawnAtEvade(uint32 delayToRespawn) +void BossAI::_DespawnAtEvade(uint32 delayToRespawn, Creature* who) { if (delayToRespawn < 2) { @@ -555,18 +563,28 @@ void BossAI::_DespawnAtEvade(uint32 delayToRespawn) delayToRespawn = 2; } - uint32 corpseDelay = me->GetCorpseDelay(); - uint32 respawnDelay = me->GetRespawnDelay(); + if (!who) + who = me; - me->SetCorpseDelay(1); - me->SetRespawnDelay(delayToRespawn - 1); + if (TempSummon* whoSummon = who->ToTempSummon()) + { + TC_LOG_WARN("scripts", "_DespawnAtEvade called on a temporary summon."); + whoSummon->UnSummon(); + return; + } - me->DespawnOrUnsummon(); + uint32 corpseDelay = who->GetCorpseDelay(); + uint32 respawnDelay = who->GetRespawnDelay(); - me->SetCorpseDelay(corpseDelay); - me->SetRespawnDelay(respawnDelay); + who->SetCorpseDelay(1); + who->SetRespawnDelay(delayToRespawn - 1); - if (instance) + who->DespawnOrUnsummon(); + + who->SetCorpseDelay(corpseDelay); + who->SetRespawnDelay(respawnDelay); + + if (instance && who == me) instance->SetBossState(_bossId, FAIL); } diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index 42befa26a23..bbc7e8beadb 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -114,7 +114,7 @@ public: } } - void DoZoneInCombat(uint32 entry = 0); + void DoZoneInCombat(uint32 entry = 0, float maxRangeToNearestTarget = 250.0f); void RemoveNotExisting(); bool HasEntry(uint32 entry) const; @@ -361,13 +361,15 @@ class TC_GAME_API BossAI : public ScriptedAI void JustReachedHome() override { _JustReachedHome(); } bool CanAIAttack(Unit const* target) const override { return CheckBoundary(target); } + bool CanRespawn() override; protected: void _Reset(); void _EnterCombat(); void _JustDied(); void _JustReachedHome() { me->setActive(false); } - void _DespawnAtEvade(uint32 delayToRespawn = 30); + void _DespawnAtEvade(uint32 delayToRespawn = 30, Creature* who = nullptr); + void _DespawnAtEvade(Milliseconds const& time, Creature* who = nullptr) { _DespawnAtEvade(uint32(time.count()), who); } void TeleportCheaters(); diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index fa80634e0f0..1b8b472b805 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -72,7 +72,7 @@ bool npc_escortAI::AssistPlayerInCombat(Unit* who) return false; //experimental (unknown) flag not present - if (!(me->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_AID_PLAYERS)) + if (!(me->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_CAN_ASSIST)) return false; //not a player diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index 778edf8cab5..bd07e688fb0 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -69,7 +69,7 @@ bool FollowerAI::AssistPlayerInCombat(Unit* who) return false; //experimental (unknown) flag not present - if (!(me->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_AID_PLAYERS)) + if (!(me->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_CAN_ASSIST)) return false; //not a player diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 60df4fe6d5a..e21f59fe582 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -468,7 +468,7 @@ bool SmartAI::AssistPlayerInCombat(Unit* who) return false; //experimental (unknown) flag not present - if (!(me->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_AID_PLAYERS)) + if (!(me->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_CAN_ASSIST)) return false; //not a player diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index a18f0a6574b..75b9752a193 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -929,9 +929,21 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u break; } - instance->SetData(e.action.setInstanceData.field, e.action.setInstanceData.data); - TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA: Field: %u, data: %u", - e.action.setInstanceData.field, e.action.setInstanceData.data); + switch (e.action.setInstanceData.type) + { + case 0: + instance->SetData(e.action.setInstanceData.field, e.action.setInstanceData.data); + TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA: SetData Field: %u, data: %u", + e.action.setInstanceData.field, e.action.setInstanceData.data); + break; + case 1: + instance->SetBossState(e.action.setInstanceData.field, static_cast<EncounterState>(e.action.setInstanceData.data)); + TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA: SetBossState BossId: %u, State: %u (%s)", + e.action.setInstanceData.field, e.action.setInstanceData.data, InstanceScript::GetBossStateName(e.action.setInstanceData.data).c_str()); + break; + default: // Static analysis + break; + } break; } case SMART_ACTION_SET_INST_DATA64: @@ -1037,10 +1049,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u target->DespawnOrUnsummon(e.action.forceDespawn.delay); } else if (GameObject* goTarget = (*itr)->ToGameObject()) - { - if (IsSmartGO(goTarget)) - goTarget->SetRespawnTime(e.action.forceDespawn.delay + 1); - } + goTarget->SetRespawnTime(e.action.forceDespawn.delay + 1); } delete targets; @@ -1126,22 +1135,29 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u delete targets; break; } - case SMART_ACTION_MOVE_FORWARD: + case SMART_ACTION_MOVE_OFFSET: { - if (!me) - break; + if (ObjectList* targets = GetTargets(e, unit)) + { + for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) + { + if (!IsCreature(*itr)) + continue; - float x, y, z; - me->GetClosePoint(x, y, z, me->GetObjectSize() / 3, (float)e.action.moveRandom.distance); - me->GetMotionMaster()->MovePoint(SMART_RANDOM_POINT, x, y, z); - break; - } - case SMART_ACTION_RISE_UP: - { - if (!me) - break; + Position pos = (*itr)->GetPosition(); + + // Use forward/backward/left/right cartesian plane movement + float x, y, z, o; + o = pos.GetOrientation(); + x = pos.GetPositionX() + (std::cos(o - (M_PI / 2))*e.target.x) + (std::cos(o)*e.target.y); + y = pos.GetPositionY() + (std::sin(o - (M_PI / 2))*e.target.x) + (std::sin(o)*e.target.y); + z = pos.GetPositionZ() + e.target.z; + (*itr)->ToCreature()->GetMotionMaster()->MovePoint(SMART_RANDOM_POINT, x, y, z); + } + + delete targets; + } - me->GetMotionMaster()->MovePoint(SMART_RANDOM_POINT, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + (float)e.action.moveRandom.distance); break; } case SMART_ACTION_SET_VISIBILITY: @@ -1215,18 +1231,13 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u ObjectList* targets = GetTargets(e, unit); if (targets) { - float x, y, z, o; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) { if (!IsUnit(*itr)) continue; - (*itr)->GetPosition(x, y, z, o); - x += e.target.x; - y += e.target.y; - z += e.target.z; - o += e.target.o; - GetBaseObject()->SummonGameObject(e.action.summonGO.entry, x, y, z, o, 0, 0, 0, 0, e.action.summonGO.despawnTime); + Position pos = (*itr)->GetPositionWithOffset(Position(e.target.x, e.target.y, e.target.z, e.target.o)); + GetBaseObject()->SummonGameObject(e.action.summonGO.entry, pos, G3D::Quat(), e.action.summonGO.despawnTime); } delete targets; @@ -1235,7 +1246,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (e.GetTargetType() != SMART_TARGET_POSITION) break; - GetBaseObject()->SummonGameObject(e.action.summonGO.entry, e.target.x, e.target.y, e.target.z, e.target.o, 0, 0, 0, 0, e.action.summonGO.despawnTime); + GetBaseObject()->SummonGameObject(e.action.summonGO.entry, Position(e.target.x, e.target.y, e.target.z, e.target.o), G3D::Quat(), e.action.summonGO.despawnTime); break; } case SMART_ACTION_KILL_UNIT: @@ -1483,10 +1494,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (TransportBase* trans = me->GetDirectTransport()) trans->CalculatePassengerPosition(dest.x, dest.y, dest.z); - me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest.x, dest.y, dest.z); + me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest.x, dest.y, dest.z, e.action.MoveToPos.disablePathfinding == 0); } else - me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); + me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), e.action.MoveToPos.disablePathfinding == 0); break; } case SMART_ACTION_RESPAWN_TARGET: @@ -2409,7 +2420,7 @@ void SmartScript::InstallTemplate(SmartScriptHolder const& e) AddEvent(SMART_EVENT_DATA_SET, 0, 0, 0, 0, 0, SMART_ACTION_SET_RUN, e.action.installTtemplate.param3, 0, 0, 0, 0, 0, SMART_TARGET_NONE, 0, 0, 0, 0); AddEvent(SMART_EVENT_DATA_SET, 0, 0, 0, 0, 0, SMART_ACTION_SET_EVENT_PHASE, 1, 0, 0, 0, 0, 0, SMART_TARGET_NONE, 0, 0, 0, 0); - AddEvent(SMART_EVENT_UPDATE, SMART_EVENT_FLAG_NOT_REPEATABLE, 1000, 1000, 0, 0, SMART_ACTION_MOVE_FORWARD, e.action.installTtemplate.param4, 0, 0, 0, 0, 0, SMART_TARGET_NONE, 0, 0, 0, 1); + AddEvent(SMART_EVENT_UPDATE, SMART_EVENT_FLAG_NOT_REPEATABLE, 1000, 1000, 0, 0, SMART_ACTION_MOVE_OFFSET, 0, 0, 0, 0, 0, 0, SMART_TARGET_SELF, 0, e.action.installTtemplate.param4, 0, 1); //phase 1: give quest credit on movepoint reached AddEvent(SMART_EVENT_MOVEMENTINFORM, 0, POINT_MOTION_TYPE, SMART_RANDOM_POINT, 0, 0, SMART_ACTION_SET_DATA, 0, 0, 0, 0, 0, 0, SMART_TARGET_STORED, 1, 0, 0, 1); //phase 1: despawn after time on movepoint reached @@ -3359,6 +3370,16 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff) } } + // Delay flee for assist event if stunned or rooted + if (e.GetActionType() == SMART_ACTION_FLEE_FOR_ASSIST) + { + if (me && me->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) + { + e.timer = 1; + return; + } + } + e.active = true;//activate events with cooldown switch (e.GetEventType())//process ONLY timed events { diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 86aaf45af88..f0709eb9216 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -19,6 +19,7 @@ #include "ObjectMgr.h" #include "GridDefines.h" #include "GridNotifiers.h" +#include "InstanceScript.h" #include "SpellMgr.h" #include "Cell.h" #include "GameEventMgr.h" @@ -1156,6 +1157,23 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) } break; } + case SMART_ACTION_SET_INST_DATA: + { + if (e.action.setInstanceData.type > 1) + { + TC_LOG_ERROR("sql.sql", "Entry %u SourceType %u Event %u Action %u uses invalid data type %u (value range 0-1), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setInstanceData.type); + return false; + } + else if (e.action.setInstanceData.type == 1) + { + if (e.action.setInstanceData.data > TO_BE_DECIDED) + { + TC_LOG_ERROR("sql.sql", "Entry %u SourceType %u Event %u Action %u uses invalid boss state %u (value range 0-5), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setInstanceData.data); + return false; + } + } + break; + } case SMART_ACTION_START_CLOSEST_WAYPOINT: case SMART_ACTION_FOLLOW: case SMART_ACTION_SET_ORIENTATION: @@ -1173,13 +1191,11 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_ATTACK_START: case SMART_ACTION_THREAT_ALL_PCT: case SMART_ACTION_THREAT_SINGLE_PCT: - case SMART_ACTION_SET_INST_DATA: case SMART_ACTION_SET_INST_DATA64: case SMART_ACTION_AUTO_ATTACK: case SMART_ACTION_ALLOW_COMBAT_MOVEMENT: case SMART_ACTION_CALL_FOR_HELP: case SMART_ACTION_SET_DATA: - case SMART_ACTION_MOVE_FORWARD: case SMART_ACTION_SET_VISIBILITY: case SMART_ACTION_WP_PAUSE: case SMART_ACTION_SET_FLY: @@ -1225,7 +1241,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_ADD_GO_FLAG: case SMART_ACTION_REMOVE_GO_FLAG: case SMART_ACTION_SUMMON_CREATURE_GROUP: - case SMART_ACTION_RISE_UP: + case SMART_ACTION_MOVE_OFFSET: case SMART_ACTION_SET_CORPSE_DELAY: break; default: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 3105f087bf7..8b55c3e138c 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -469,7 +469,7 @@ enum SMART_ACTION SMART_ACTION_RANDOM_PHASE_RANGE = 31, // PhaseMin, PhaseMax SMART_ACTION_RESET_GOBJECT = 32, // SMART_ACTION_CALL_KILLEDMONSTER = 33, // CreatureId, - SMART_ACTION_SET_INST_DATA = 34, // Field, Data + SMART_ACTION_SET_INST_DATA = 34, // Field, Data, Type (0 = SetData, 1 = SetBossState) SMART_ACTION_SET_INST_DATA64 = 35, // Field, SMART_ACTION_UPDATE_TEMPLATE = 36, // Entry SMART_ACTION_DIE = 37, // No Params @@ -481,7 +481,6 @@ enum SMART_ACTION SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL = 43, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to dismount) SMART_ACTION_SET_INGAME_PHASE_MASK = 44, // mask SMART_ACTION_SET_DATA = 45, // Field, Data (only creature @todo) - SMART_ACTION_MOVE_FORWARD = 46, // distance SMART_ACTION_SET_VISIBILITY = 47, // on/off SMART_ACTION_SET_ACTIVE = 48, // on/off SMART_ACTION_ATTACK_START = 49, // @@ -504,7 +503,7 @@ enum SMART_ACTION SMART_ACTION_SET_ORIENTATION = 66, // SMART_ACTION_CREATE_TIMED_EVENT = 67, // id, InitialMin, InitialMax, RepeatMin(only if it repeats), RepeatMax(only if it repeats), chance SMART_ACTION_PLAYMOVIE = 68, // entry - SMART_ACTION_MOVE_TO_POS = 69, // PointId, xyz + SMART_ACTION_MOVE_TO_POS = 69, // PointId, transport, disablePathfinding SMART_ACTION_RESPAWN_TARGET = 70, // SMART_ACTION_EQUIP = 71, // entry, slotmask slot1, slot2, slot3 , only slots with mask set will be sent to client, bits are 1, 2, 4, leaving mask 0 is defaulted to mask 7 (send all), slots1-3 are only used if no entry is set SMART_ACTION_CLOSE_GOSSIP = 72, // none @@ -549,7 +548,7 @@ enum SMART_ACTION SMART_ACTION_GAME_EVENT_STOP = 111, // GameEventId SMART_ACTION_GAME_EVENT_START = 112, // GameEventId SMART_ACTION_START_CLOSEST_WAYPOINT = 113, // wp1, wp2, wp3, wp4, wp5, wp6, wp7 - SMART_ACTION_RISE_UP = 114, // distance + SMART_ACTION_MOVE_OFFSET = 114, SMART_ACTION_RANDOM_SOUND = 115, // soundId1, soundId2, soundId3, soundId4, soundId5, onlySelf SMART_ACTION_SET_CORPSE_DELAY = 116, // timer @@ -716,6 +715,7 @@ struct SmartAction { uint32 field; uint32 data; + uint32 type; } setInstanceData; struct @@ -958,6 +958,7 @@ struct SmartAction { uint32 pointId; uint32 transport; + uint32 disablePathfinding; } MoveToPos; struct diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 1b93d072fb6..fa3e8818fe0 100644 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -487,19 +487,20 @@ void AccountMgr::UpdateAccountAccess(rbac::RBACData* rbac, uint32 accountId, uin if (rbac && securityLevel == rbac->GetSecurityLevel()) rbac->SetSecurityLevel(securityLevel); + SQLTransaction trans = LoginDatabase.BeginTransaction(); // Delete old security level from DB if (realmId == -1) { PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_ACCOUNT_ACCESS); stmt->setUInt32(0, accountId); - LoginDatabase.Execute(stmt); + trans->Append(stmt); } else { PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_ACCOUNT_ACCESS_BY_REALM); stmt->setUInt32(0, accountId); stmt->setUInt32(1, realmId); - LoginDatabase.Execute(stmt); + trans->Append(stmt); } // Add new security level @@ -509,8 +510,10 @@ void AccountMgr::UpdateAccountAccess(rbac::RBACData* rbac, uint32 accountId, uin stmt->setUInt32(0, accountId); stmt->setUInt8(1, securityLevel); stmt->setInt32(2, realmId); - LoginDatabase.Execute(stmt); + trans->Append(stmt); } + + LoginDatabase.CommitTransaction(trans); } rbac::RBACPermission const* AccountMgr::GetRBACPermission(uint32 permissionId) const diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h index 9dd56ec8180..741983431dd 100644 --- a/src/server/game/Accounts/RBAC.h +++ b/src/server/game/Accounts/RBAC.h @@ -59,9 +59,9 @@ enum RBACPermissions // 7 - reuse // 8 - reuse // 9 - reuse - // 10 - reuse + // 10 - 7.x only RBAC_PERM_LOG_GM_TRADE = 11, - // 12 - reuse + // 12 - 7.x only RBAC_PERM_SKIP_CHECK_INSTANCE_REQUIRED_BOSSES = 13, RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_TEAMMASK = 14, RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_CLASSMASK = 15, @@ -540,7 +540,7 @@ enum RBACPermissions RBAC_PERM_COMMAND_RELOAD_DISENCHANT_LOOT_TEMPLATE = 642, RBAC_PERM_COMMAND_RELOAD_EVENT_SCRIPTS = 643, RBAC_PERM_COMMAND_RELOAD_FISHING_LOOT_TEMPLATE = 644, - RBAC_PERM_COMMAND_RELOAD_GAME_GRAVEYARD_ZONE = 645, + RBAC_PERM_COMMAND_RELOAD_GRAVEYARD_ZONE = 645, RBAC_PERM_COMMAND_RELOAD_GAME_TELE = 646, RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUESTENDER = 647, RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUEST_LOOT_TEMPLATE = 648, @@ -701,6 +701,7 @@ enum RBACPermissions RBAC_PERM_COMMAND_PET_LEVEL = 838, RBAC_PERM_COMMAND_SERVER_SHUTDOWN_FORCE = 839, RBAC_PERM_COMMAND_SERVER_RESTART_FORCE = 840, + RBAC_PERM_COMMAND_NEARGRAVEYARD = 841, // custom permissions 1000+ RBAC_PERM_MAX diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp index 7f05cd2efd7..6b1dcb85bec 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp @@ -17,7 +17,7 @@ #include "Log.h" #include "Item.h" -#include "ItemPrototype.h" +#include "ItemTemplate.h" #include "AuctionHouseBotBuyer.h" AuctionBotBuyer::AuctionBotBuyer() : _checkInterval(20 * MINUTE) diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h index 563c2cda04a..3e6f263707f 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.h @@ -19,7 +19,7 @@ #define AUCTION_HOUSE_BOT_SELLER_H #include "Define.h" -#include "ItemPrototype.h" +#include "ItemTemplate.h" #include "AuctionHouseBot.h" struct ItemToSell diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index e69d0f3085c..f44099f6037 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -797,18 +797,21 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z, float o) { // Get map object - Map* map = sMapMgr->CreateBaseMap(571); // *vomits* + Map* map = sMapMgr->CreateBaseMap(m_MapId); if (!map) return 0; + // Calculate rotation + G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(o, 0.f, 0.f); + // Create gameobject GameObject* go = new GameObject; - if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, map, PHASEMASK_NORMAL, x, y, z, o, 0, 0, 0, 0, 100, GO_STATE_READY)) + if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, map, PHASEMASK_NORMAL, Position(x, y, z, o), rot, 255, GO_STATE_READY)) { TC_LOG_ERROR("bg.battlefield", "Battlefield::SpawnGameObject: Gameobject template %u could not be found in the database! Battlefield has not been created!", entry); TC_LOG_ERROR("bg.battlefield", "Battlefield::SpawnGameObject: Could not create gameobject template %u! Battlefield has not been created!", entry); delete go; - return NULL; + return nullptr; } // Add to world diff --git a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp index 5dd0b6f29c3..37e26d7e448 100644 --- a/src/server/game/Battlegrounds/ArenaTeamMgr.cpp +++ b/src/server/game/Battlegrounds/ArenaTeamMgr.cpp @@ -99,7 +99,7 @@ void ArenaTeamMgr::LoadArenaTeams() uint32 oldMSTime = getMSTime(); // Clean out the trash before loading anything - CharacterDatabase.Execute("DELETE FROM arena_team_member WHERE arenaTeamId NOT IN (SELECT arenaTeamId FROM arena_team)"); // One-time query + CharacterDatabase.DirectExecute("DELETE FROM arena_team_member WHERE arenaTeamId NOT IN (SELECT arenaTeamId FROM arena_team)"); // One-time query // 0 1 2 3 4 5 6 7 8 QueryResult result = CharacterDatabase.Query("SELECT arenaTeamId, name, captainGuid, type, backgroundColor, emblemStyle, emblemColor, borderStyle, borderColor, " diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 100e2e6c7cc..2e66c587e15 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -283,8 +283,12 @@ inline void Battleground::_CheckSafePositions(uint32 diff) m_ValidStartPositionTimer = 0; for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) + { if (Player* player = ObjectAccessor::FindPlayer(itr->first)) { + if (player->IsGameMaster()) + continue; + Position pos = player->GetPosition(); Position const* startPos = GetTeamStartPosition(Battleground::GetTeamIndexByTeamId(player->GetBGTeam())); if (pos.GetExactDistSq(startPos) > maxDist) @@ -293,6 +297,7 @@ inline void Battleground::_CheckSafePositions(uint32 diff) player->TeleportTo(GetMapId(), startPos->GetPositionX(), startPos->GetPositionY(), startPos->GetPositionZ(), startPos->GetOrientation()); } } + } } } @@ -1345,12 +1350,22 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float Map* map = FindBgMap(); if (!map) return false; + + G3D::Quat rot(rotation0, rotation1, rotation2, rotation3); + // Temporally add safety check for bad spawns and send log (object rotations need to be rechecked in sniff) + if (!rotation0 && !rotation1 && !rotation2 && !rotation3) + { + TC_LOG_DEBUG("bg.battleground", "Battleground::AddObject: gameoobject [entry: %u, object type: %u] for BG (map: %u) has zeroed rotation fields, " + "orientation used temporally, but please fix the spawn", entry, type, m_MapId); + + rot = G3D::Matrix3::fromEulerAnglesZYX(o, 0.f, 0.f); + } + // Must be created this way, adding to godatamap would add it to the base map of the instance // and when loading it (in go::LoadFromDB()), a new guid would be assigned to the object, and a new object would be created // So we must create it specific for this instance GameObject* go = new GameObject; - if (!go->Create(GetBgMap()->GenerateLowGuid<HighGuid::GameObject>(), entry, GetBgMap(), - PHASEMASK_NORMAL, x, y, z, o, rotation0, rotation1, rotation2, rotation3, 100, goState)) + if (!go->Create(GetBgMap()->GenerateLowGuid<HighGuid::GameObject>(), entry, GetBgMap(), PHASEMASK_NORMAL, Position(x, y, z, o), rot, 255, goState)) { TC_LOG_ERROR("bg.battleground", "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!", entry, m_MapId, m_InstanceID); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 52e0deaf86f..8c144cbc8be 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -142,8 +142,8 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff) { if (siege->IsAlive()) { - if (siege->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_IMMUNE_TO_PC)) - // following sniffs the vehicle always has UNIT_FLAG_UNK_14 + if (siege->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_CANNOT_SWIM|UNIT_FLAG_IMMUNE_TO_PC)) + // following sniffs the vehicle always has UNIT_FLAG_CANNOT_SWIM siege->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_IMMUNE_TO_PC); else siege->SetHealth(siege->GetMaxHealth()); @@ -762,7 +762,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* node, bool recapture) if (Creature* siegeEngine = GetBGCreature(siegeType)) { - siegeEngine->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_UNK_14|UNIT_FLAG_IMMUNE_TO_PC); + siegeEngine->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_CANNOT_SWIM|UNIT_FLAG_IMMUNE_TO_PC); siegeEngine->setFaction(BG_IC_Factions[(node->faction == TEAM_ALLIANCE ? 0 : 1)]); } } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 1942ac9d648..450f5cd9144 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -151,8 +151,8 @@ bool BattlegroundSA::ResetObjs() } // MAD props for Kiper for discovering those values - 4 hours of his work. - GetBGObject(BG_SA_BOAT_ONE)->UpdateRotationFields(1.0f, 0.0002f); - GetBGObject(BG_SA_BOAT_TWO)->UpdateRotationFields(1.0f, 0.00001f); + GetBGObject(BG_SA_BOAT_ONE)->SetParentRotation(G3D::Quat(0.f, 0.f, 1.0f, 0.0002f)); + GetBGObject(BG_SA_BOAT_TWO)->SetParentRotation(G3D::Quat(0.f, 0.f, 1.0f, 0.00001f)); SpawnBGObject(BG_SA_BOAT_ONE, RESPAWN_IMMEDIATELY); SpawnBGObject(BG_SA_BOAT_TWO, RESPAWN_IMMEDIATELY); diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index 0875ceefff5..a34f0f4d9a2 100644 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -25,66 +25,66 @@ #include "AccountMgr.h" #include "Player.h" -Channel::Channel(std::string const& name, uint32 channelId, uint32 team): - _announce(true), - _ownership(true), - _IsSaved(false), - _flags(0), +Channel::Channel(std::string const& name, uint32 channelId, uint32 team /*= 0*/): + _announceEnabled(true), + _ownershipEnabled(true), + _persistentChannel(false), + _channelFlags(0), _channelId(channelId), - _Team(team), - _ownerGUID(), - _name(name), - _password("") + _channelTeam(team), + _ownerGuid(), + _channelName(name), + _channelPassword() { // set special flags if built-in channel if (ChatChannelsEntry const* ch = sChatChannelsStore.LookupEntry(channelId)) // check whether it's a built-in channel { - _announce = false; // no join/leave announces - _ownership = false; // no ownership handout + _announceEnabled = false; // no join/leave announces + _ownershipEnabled = false; // no ownership handout - _flags |= CHANNEL_FLAG_GENERAL; // for all built-in channels + _channelFlags |= CHANNEL_FLAG_GENERAL; // for all built-in channels if (ch->flags & CHANNEL_DBC_FLAG_TRADE) // for trade channel - _flags |= CHANNEL_FLAG_TRADE; + _channelFlags |= CHANNEL_FLAG_TRADE; if (ch->flags & CHANNEL_DBC_FLAG_CITY_ONLY2) // for city only channels - _flags |= CHANNEL_FLAG_CITY; + _channelFlags |= CHANNEL_FLAG_CITY; if (ch->flags & CHANNEL_DBC_FLAG_LFG) // for LFG channel - _flags |= CHANNEL_FLAG_LFG; + _channelFlags |= CHANNEL_FLAG_LFG; else // for all other channels - _flags |= CHANNEL_FLAG_NOT_LFG; + _channelFlags |= CHANNEL_FLAG_NOT_LFG; } else // it's custom channel { - _flags |= CHANNEL_FLAG_CUSTOM; + _channelFlags |= CHANNEL_FLAG_CUSTOM; // If storing custom channels in the db is enabled either load or save the channel if (sWorld->getBoolConfig(CONFIG_PRESERVE_CUSTOM_CHANNELS)) { PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHANNEL); stmt->setString(0, name); - stmt->setUInt32(1, _Team); + stmt->setUInt32(1, _channelTeam); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (result) //load { Field* fields = result->Fetch(); - _announce = fields[0].GetBool(); - _ownership = fields[1].GetBool(); - _password = fields[2].GetString(); - const char* db_BannedList = fields[3].GetCString(); + _announceEnabled = fields[0].GetBool(); + _ownershipEnabled = fields[1].GetBool(); + _channelPassword = fields[2].GetString(); + char const* db_BannedList = fields[3].GetCString(); if (db_BannedList) { Tokenizer tokens(db_BannedList, ' '); for (Tokenizer::const_iterator i = tokens.begin(); i != tokens.end(); ++i) { - ObjectGuid banned_guid(uint64(strtoull(*i, NULL, 10))); + ObjectGuid banned_guid(uint64(atoull(*i))); if (banned_guid) { TC_LOG_DEBUG("chat.system", "Channel(%s) loaded bannedStore %s", name.c_str(), banned_guid.ToString().c_str()); - bannedStore.insert(banned_guid); + _bannedStore.insert(banned_guid); } } } @@ -93,45 +93,44 @@ Channel::Channel(std::string const& name, uint32 channelId, uint32 team): { stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHANNEL); stmt->setString(0, name); - stmt->setUInt32(1, _Team); + stmt->setUInt32(1, _channelTeam); CharacterDatabase.Execute(stmt); TC_LOG_DEBUG("chat.system", "Channel(%s) saved in database", name.c_str()); } - _IsSaved = true; + _persistentChannel = true; } } } void Channel::UpdateChannelInDB() const { - if (_IsSaved) + if (_persistentChannel) { std::ostringstream banlist; - BannedContainer::const_iterator iter; - for (iter = bannedStore.begin(); iter != bannedStore.end(); ++iter) + for (BannedContainer::const_iterator iter = _bannedStore.begin(); iter != _bannedStore.end(); ++iter) banlist << iter->GetRawValue() << ' '; std::string banListStr = banlist.str(); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHANNEL); - stmt->setBool(0, _announce); - stmt->setBool(1, _ownership); - stmt->setString(2, _password); + stmt->setBool(0, _announceEnabled); + stmt->setBool(1, _ownershipEnabled); + stmt->setString(2, _channelPassword); stmt->setString(3, banListStr); - stmt->setString(4, _name); - stmt->setUInt32(5, _Team); + stmt->setString(4, _channelName); + stmt->setUInt32(5, _channelTeam); CharacterDatabase.Execute(stmt); - TC_LOG_DEBUG("chat.system", "Channel(%s) updated in database", _name.c_str()); + TC_LOG_DEBUG("chat.system", "Channel(%s) updated in database", _channelName.c_str()); } } void Channel::UpdateChannelUseageInDB() const { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHANNEL_USAGE); - stmt->setString(0, _name); - stmt->setUInt32(1, _Team); + stmt->setString(0, _channelName); + stmt->setUInt32(1, _channelTeam); CharacterDatabase.Execute(stmt); } @@ -170,7 +169,7 @@ void Channel::JoinChannel(Player* player, std::string const& pass) return; } - if (!_password.empty() && pass != _password) + if (!_channelPassword.empty() && pass != _channelPassword) { WorldPacket data; MakeWrongPassword(&data); @@ -191,17 +190,15 @@ void Channel::JoinChannel(Player* player, std::string const& pass) player->JoinedChannel(this); - if (_announce && !player->GetSession()->HasPermission(rbac::RBAC_PERM_SILENTLY_JOIN_CHANNEL)) + if (_announceEnabled && !player->GetSession()->HasPermission(rbac::RBAC_PERM_SILENTLY_JOIN_CHANNEL)) { WorldPacket data; MakeJoined(&data, guid); SendToAll(&data); } - PlayerInfo pinfo; - pinfo.player = guid; + PlayerInfo& pinfo = _playersStore[guid]; pinfo.flags = MEMBER_FLAG_NONE; - playersStore[guid] = pinfo; WorldPacket data; MakeYouJoined(&data); @@ -213,14 +210,13 @@ void Channel::JoinChannel(Player* player, std::string const& pass) if (!IsConstant()) { // Update last_used timestamp in db - if (!playersStore.empty()) - UpdateChannelUseageInDB(); + UpdateChannelUseageInDB(); // If the channel has no owner yet and ownership is allowed, set the new owner. - if (!_ownerGUID && _ownership) + if (!_ownerGuid && _ownershipEnabled) { - SetOwner(guid, playersStore.size() > 1); - playersStore[guid].SetModerator(true); + SetOwner(guid, _playersStore.size() > 1); + pinfo.SetModerator(true); } } } @@ -248,11 +244,11 @@ void Channel::LeaveChannel(Player* player, bool send) data.clear(); } - bool changeowner = playersStore[guid].IsOwner(); - - playersStore.erase(guid); + PlayerInfo& info = _playersStore.at(guid); + bool changeowner = info.IsOwner(); + _playersStore.erase(guid); - if (_announce && !player->GetSession()->HasPermission(rbac::RBAC_PERM_SILENTLY_JOIN_CHANNEL)) + if (_announceEnabled && !player->GetSession()->HasPermission(rbac::RBAC_PERM_SILENTLY_JOIN_CHANNEL)) { WorldPacket data; MakeLeft(&data, guid); @@ -266,11 +262,12 @@ void Channel::LeaveChannel(Player* player, bool send) // Update last_used timestamp in db UpdateChannelUseageInDB(); - // If the channel owner left and there are still playersStore inside, pick a new owner - if (changeowner && _ownership && !playersStore.empty()) + // If the channel owner left and there are still players inside, pick a new owner + if (changeowner && _ownershipEnabled && !_playersStore.empty()) { - ObjectGuid newowner = playersStore.begin()->second.player; - playersStore[newowner].SetModerator(true); + auto itr = _playersStore.begin(); + ObjectGuid newowner = itr->first; + itr->second.SetModerator(true); SetOwner(newowner); } } @@ -288,7 +285,8 @@ void Channel::KickOrBan(Player const* player, std::string const& badname, bool b return; } - if (!playersStore[good].IsModerator() && !player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR)) + PlayerInfo& info = _playersStore.at(good); + if (!info.IsModerator() && !player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR)) { WorldPacket data; MakeNotModerator(&data); @@ -306,9 +304,9 @@ void Channel::KickOrBan(Player const* player, std::string const& badname, bool b return; } - bool changeowner = _ownerGUID == victim; + bool changeowner = _ownerGuid == victim; - if (!player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR) && changeowner && good != _ownerGUID) + if (!player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR) && changeowner && good != _ownerGuid) { WorldPacket data; MakeNotOwner(&data); @@ -318,7 +316,7 @@ void Channel::KickOrBan(Player const* player, std::string const& badname, bool b if (ban && !IsBanned(victim)) { - bannedStore.insert(victim); + _bannedStore.insert(victim); UpdateChannelInDB(); if (!player->GetSession()->HasPermission(rbac::RBAC_PERM_SILENTLY_JOIN_CHANNEL)) @@ -335,13 +333,13 @@ void Channel::KickOrBan(Player const* player, std::string const& badname, bool b SendToAll(&data); } - playersStore.erase(victim); + _playersStore.erase(victim); bad->LeftChannel(this); - if (changeowner && _ownership && !playersStore.empty()) + if (changeowner && _ownershipEnabled && !_playersStore.empty()) { ObjectGuid newowner = good; - playersStore[newowner].SetModerator(true); + info.SetModerator(true); SetOwner(newowner); } } @@ -358,7 +356,8 @@ void Channel::UnBan(Player const* player, std::string const& badname) return; } - if (!playersStore[good].IsModerator() && !player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR)) + PlayerInfo& info = _playersStore.at(good); + if (!info.IsModerator() && !player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR)) { WorldPacket data; MakeNotModerator(&data); @@ -377,7 +376,7 @@ void Channel::UnBan(Player const* player, std::string const& badname) return; } - bannedStore.erase(victim); + _bannedStore.erase(victim); WorldPacket data; MakePlayerUnbanned(&data, victim, good); @@ -399,7 +398,8 @@ void Channel::Password(Player const* player, std::string const& pass) return; } - if (!playersStore[guid].IsModerator() && !player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR)) + PlayerInfo& info = _playersStore.at(guid); + if (!info.IsModerator() && !player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR)) { WorldPacket data; MakeNotModerator(&data); @@ -407,7 +407,7 @@ void Channel::Password(Player const* player, std::string const& pass) return; } - _password = pass; + _channelPassword = pass; WorldPacket data; MakePasswordChanged(&data, guid); @@ -428,7 +428,8 @@ void Channel::SetMode(Player const* player, std::string const& p2n, bool mod, bo return; } - if (!playersStore[guid].IsModerator() && !player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR)) + PlayerInfo& info = _playersStore.at(guid); + if (!info.IsModerator() && !player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR)) { WorldPacket data; MakeNotModerator(&data); @@ -436,7 +437,7 @@ void Channel::SetMode(Player const* player, std::string const& p2n, bool mod, bo return; } - if (guid == _ownerGUID && std::string(p2n) == player->GetName() && mod) + if (guid == _ownerGuid && std::string(p2n) == player->GetName() && mod) return; Player* newp = ObjectAccessor::FindConnectedPlayerByName(p2n); @@ -453,7 +454,7 @@ void Channel::SetMode(Player const* player, std::string const& p2n, bool mod, bo return; } - if (_ownerGUID == victim && _ownerGUID != guid) + if (_ownerGuid == victim && _ownerGuid != guid) { WorldPacket data; MakeNotOwner(&data); @@ -479,7 +480,7 @@ void Channel::SetOwner(Player const* player, std::string const& newname) return; } - if (!player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR) && guid != _ownerGUID) + if (!player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR) && guid != _ownerGuid) { WorldPacket data; MakeNotOwner(&data); @@ -501,7 +502,8 @@ void Channel::SetOwner(Player const* player, std::string const& newname) return; } - playersStore[victim].SetModerator(true); + PlayerInfo& info = _playersStore.at(victim); + info.SetModerator(true); SetOwner(victim); } @@ -515,7 +517,7 @@ void Channel::SendWhoOwner(ObjectGuid guid) SendToOne(&data, guid); } -void Channel::List(Player const* player) +void Channel::List(Player const* player) const { ObjectGuid guid = player->GetGUID(); @@ -530,7 +532,7 @@ void Channel::List(Player const* player) TC_LOG_DEBUG("chat.system", "SMSG_CHANNEL_LIST %s Channel: %s", player->GetSession()->GetPlayerInfo().c_str(), GetName().c_str()); - WorldPacket data(SMSG_CHANNEL_LIST, 1+(GetName().size()+1)+1+4+playersStore.size()*(8+1)); + WorldPacket data(SMSG_CHANNEL_LIST, 1+(GetName().size()+1)+1+4+_playersStore.size()*(8+1)); data << uint8(1); // channel type? data << GetName(); // channel name data << uint8(GetFlags()); // channel flags? @@ -541,7 +543,7 @@ void Channel::List(Player const* player) uint32 gmLevelInWhoList = sWorld->getIntConfig(CONFIG_GM_LEVEL_IN_WHO_LIST); uint32 count = 0; - for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i) + for (PlayerContainer::const_iterator i = _playersStore.begin(); i != _playersStore.end(); ++i) { Player* member = ObjectAccessor::FindConnectedPlayer(i->first); @@ -575,7 +577,8 @@ void Channel::Announce(Player const* player) return; } - if (!playersStore[guid].IsModerator() && !player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR)) + PlayerInfo& info = _playersStore.at(guid); + if (!info.IsModerator() && !player->GetSession()->HasPermission(rbac::RBAC_PERM_CHANGE_CHANNEL_NOT_MODERATOR)) { WorldPacket data; MakeNotModerator(&data); @@ -583,10 +586,10 @@ void Channel::Announce(Player const* player) return; } - _announce = !_announce; + _announceEnabled = !_announceEnabled; WorldPacket data; - if (_announce) + if (_announceEnabled) MakeAnnouncementsOn(&data, guid); else MakeAnnouncementsOff(&data, guid); @@ -595,7 +598,7 @@ void Channel::Announce(Player const* player) UpdateChannelInDB(); } -void Channel::Say(ObjectGuid guid, std::string const& what, uint32 lang) +void Channel::Say(ObjectGuid guid, std::string const& what, uint32 lang) const { if (what.empty()) return; @@ -612,7 +615,8 @@ void Channel::Say(ObjectGuid guid, std::string const& what, uint32 lang) return; } - if (playersStore[guid].IsMuted()) + PlayerInfo const& info = _playersStore.at(guid); + if (info.IsMuted()) { WorldPacket data; MakeMuted(&data); @@ -622,11 +626,11 @@ void Channel::Say(ObjectGuid guid, std::string const& what, uint32 lang) WorldPacket data; if (Player* player = ObjectAccessor::FindConnectedPlayer(guid)) - ChatHandler::BuildChatPacket(data, CHAT_MSG_CHANNEL, Language(lang), player, player, what, 0, _name); + ChatHandler::BuildChatPacket(data, CHAT_MSG_CHANNEL, Language(lang), player, player, what, 0, _channelName); else - ChatHandler::BuildChatPacket(data, CHAT_MSG_CHANNEL, Language(lang), guid, guid, what, 0, "", "", 0, false, _name); + ChatHandler::BuildChatPacket(data, CHAT_MSG_CHANNEL, Language(lang), guid, guid, what, 0, "", "", 0, false, _channelName); - SendToAll(&data, !playersStore[guid].IsModerator() ? guid : ObjectGuid::Empty); + SendToAll(&data, !info.IsModerator() ? guid : ObjectGuid::Empty); } void Channel::Invite(Player const* player, std::string const& newname) @@ -691,28 +695,31 @@ void Channel::Invite(Player const* player, std::string const& newname) void Channel::SetOwner(ObjectGuid guid, bool exclaim) { - if (_ownerGUID) + if (_ownerGuid) { - // [] will re-add player after it possible removed - PlayerContainer::iterator p_itr = playersStore.find(_ownerGUID); - if (p_itr != playersStore.end()) - p_itr->second.SetOwner(false); + auto itr = _playersStore.find(_ownerGuid); + if (itr != _playersStore.end()) + itr->second.SetOwner(false); } - _ownerGUID = guid; - if (_ownerGUID) + _ownerGuid = guid; + if (_ownerGuid) { - uint8 oldFlag = GetPlayerFlags(_ownerGUID); - playersStore[_ownerGUID].SetModerator(true); - playersStore[_ownerGUID].SetOwner(true); + uint8 oldFlag = GetPlayerFlags(_ownerGuid); + auto itr = _playersStore.find(_ownerGuid); + if (itr == _playersStore.end()) + return; + + itr->second.SetModerator(true); + itr->second.SetOwner(true); WorldPacket data; - MakeModeChange(&data, _ownerGUID, oldFlag); + MakeModeChange(&data, _ownerGuid, oldFlag); SendToAll(&data); if (exclaim) { - MakeOwnerChanged(&data, _ownerGUID); + MakeOwnerChanged(&data, _ownerGuid); SendToAll(&data); } @@ -720,58 +727,58 @@ void Channel::SetOwner(ObjectGuid guid, bool exclaim) } } -void Channel::SendToAll(WorldPacket* data, ObjectGuid guid) +void Channel::SendToAll(WorldPacket* data, ObjectGuid guid) const { - for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i) + for (PlayerContainer::const_iterator i = _playersStore.begin(); i != _playersStore.end(); ++i) if (Player* player = ObjectAccessor::FindConnectedPlayer(i->first)) if (!guid || !player->GetSocial()->HasIgnore(guid.GetCounter())) player->GetSession()->SendPacket(data); } -void Channel::SendToAllButOne(WorldPacket* data, ObjectGuid who) +void Channel::SendToAllButOne(WorldPacket* data, ObjectGuid who) const { - for (PlayerContainer::const_iterator i = playersStore.begin(); i != playersStore.end(); ++i) + for (PlayerContainer::const_iterator i = _playersStore.begin(); i != _playersStore.end(); ++i) if (i->first != who) if (Player* player = ObjectAccessor::FindConnectedPlayer(i->first)) player->GetSession()->SendPacket(data); } -void Channel::SendToOne(WorldPacket* data, ObjectGuid who) +void Channel::SendToOne(WorldPacket* data, ObjectGuid who) const { if (Player* player = ObjectAccessor::FindConnectedPlayer(who)) player->GetSession()->SendPacket(data); } -void Channel::Voice(ObjectGuid /*guid1*/, ObjectGuid /*guid2*/) +void Channel::Voice(ObjectGuid /*guid1*/, ObjectGuid /*guid2*/) const { } -void Channel::DeVoice(ObjectGuid /*guid1*/, ObjectGuid /*guid2*/) +void Channel::DeVoice(ObjectGuid /*guid1*/, ObjectGuid /*guid2*/) const { } -void Channel::MakeNotifyPacket(WorldPacket* data, uint8 notify_type) +void Channel::MakeNotifyPacket(WorldPacket* data, uint8 notify_type) const { - data->Initialize(SMSG_CHANNEL_NOTIFY, 1 + _name.size()); + data->Initialize(SMSG_CHANNEL_NOTIFY, 1 + _channelName.size()); *data << uint8(notify_type); - *data << _name; + *data << _channelName; } -void Channel::MakeJoined(WorldPacket* data, ObjectGuid guid) +void Channel::MakeJoined(WorldPacket* data, ObjectGuid guid) const { MakeNotifyPacket(data, CHAT_JOINED_NOTICE); *data << uint64(guid); } -void Channel::MakeLeft(WorldPacket* data, ObjectGuid guid) +void Channel::MakeLeft(WorldPacket* data, ObjectGuid guid) const { MakeNotifyPacket(data, CHAT_LEFT_NOTICE); *data << uint64(guid); } -void Channel::MakeYouJoined(WorldPacket* data) +void Channel::MakeYouJoined(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_YOU_JOINED_NOTICE); *data << uint8(GetFlags()); @@ -779,63 +786,66 @@ void Channel::MakeYouJoined(WorldPacket* data) *data << uint32(0); } -void Channel::MakeYouLeft(WorldPacket* data) +void Channel::MakeYouLeft(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_YOU_LEFT_NOTICE); *data << uint32(GetChannelId()); *data << uint8(IsConstant()); } -void Channel::MakeWrongPassword(WorldPacket* data) +void Channel::MakeWrongPassword(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_WRONG_PASSWORD_NOTICE); } -void Channel::MakeNotMember(WorldPacket* data) +void Channel::MakeNotMember(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_NOT_MEMBER_NOTICE); } -void Channel::MakeNotModerator(WorldPacket* data) +void Channel::MakeNotModerator(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_NOT_MODERATOR_NOTICE); } -void Channel::MakePasswordChanged(WorldPacket* data, ObjectGuid guid) +void Channel::MakePasswordChanged(WorldPacket* data, ObjectGuid guid) const { MakeNotifyPacket(data, CHAT_PASSWORD_CHANGED_NOTICE); *data << uint64(guid); } -void Channel::MakeOwnerChanged(WorldPacket* data, ObjectGuid guid) +void Channel::MakeOwnerChanged(WorldPacket* data, ObjectGuid guid) const { MakeNotifyPacket(data, CHAT_OWNER_CHANGED_NOTICE); *data << uint64(guid); } -void Channel::MakePlayerNotFound(WorldPacket* data, std::string const& name) +void Channel::MakePlayerNotFound(WorldPacket* data, std::string const& name) const { MakeNotifyPacket(data, CHAT_PLAYER_NOT_FOUND_NOTICE); *data << name; } -void Channel::MakeNotOwner(WorldPacket* data) +void Channel::MakeNotOwner(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_NOT_OWNER_NOTICE); } -void Channel::MakeChannelOwner(WorldPacket* data) +void Channel::MakeChannelOwner(WorldPacket* data) const { - std::string name = ""; + std::string name; - if (!sObjectMgr->GetPlayerNameByGUID(_ownerGUID, name) || name.empty()) + CharacterInfo const* cInfo = sWorld->GetCharacterInfo(_ownerGuid); + if (!cInfo || cInfo->Name.empty()) name = "PLAYER_NOT_FOUND"; + else + name = cInfo->Name; MakeNotifyPacket(data, CHAT_CHANNEL_OWNER_NOTICE); - *data << ((IsConstant() || !_ownerGUID) ? "Nobody" : name); + *data << ((IsConstant() || !_ownerGuid) ? "Nobody" : name); } -void Channel::MakeModeChange(WorldPacket* data, ObjectGuid guid, uint8 oldflags) +void Channel::MakeModeChange(WorldPacket* data, ObjectGuid guid, uint8 oldflags) const { MakeNotifyPacket(data, CHAT_MODE_CHANGE_NOTICE); *data << uint64(guid); @@ -843,127 +853,127 @@ void Channel::MakeModeChange(WorldPacket* data, ObjectGuid guid, uint8 oldflags) *data << uint8(GetPlayerFlags(guid)); } -void Channel::MakeAnnouncementsOn(WorldPacket* data, ObjectGuid guid) +void Channel::MakeAnnouncementsOn(WorldPacket* data, ObjectGuid guid) const { MakeNotifyPacket(data, CHAT_ANNOUNCEMENTS_ON_NOTICE); *data << uint64(guid); } -void Channel::MakeAnnouncementsOff(WorldPacket* data, ObjectGuid guid) +void Channel::MakeAnnouncementsOff(WorldPacket* data, ObjectGuid guid) const { MakeNotifyPacket(data, CHAT_ANNOUNCEMENTS_OFF_NOTICE); *data << uint64(guid); } -void Channel::MakeMuted(WorldPacket* data) +void Channel::MakeMuted(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_MUTED_NOTICE); } -void Channel::MakePlayerKicked(WorldPacket* data, ObjectGuid bad, ObjectGuid good) +void Channel::MakePlayerKicked(WorldPacket* data, ObjectGuid bad, ObjectGuid good) const { MakeNotifyPacket(data, CHAT_PLAYER_KICKED_NOTICE); *data << uint64(bad); *data << uint64(good); } -void Channel::MakeBanned(WorldPacket* data) +void Channel::MakeBanned(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_BANNED_NOTICE); } -void Channel::MakePlayerBanned(WorldPacket* data, ObjectGuid bad, ObjectGuid good) +void Channel::MakePlayerBanned(WorldPacket* data, ObjectGuid bad, ObjectGuid good) const { MakeNotifyPacket(data, CHAT_PLAYER_BANNED_NOTICE); *data << uint64(bad); *data << uint64(good); } -void Channel::MakePlayerUnbanned(WorldPacket* data, ObjectGuid bad, ObjectGuid good) +void Channel::MakePlayerUnbanned(WorldPacket* data, ObjectGuid bad, ObjectGuid good) const { MakeNotifyPacket(data, CHAT_PLAYER_UNBANNED_NOTICE); *data << uint64(bad); *data << uint64(good); } -void Channel::MakePlayerNotBanned(WorldPacket* data, const std::string &name) +void Channel::MakePlayerNotBanned(WorldPacket* data, const std::string &name) const { MakeNotifyPacket(data, CHAT_PLAYER_NOT_BANNED_NOTICE); *data << name; } -void Channel::MakePlayerAlreadyMember(WorldPacket* data, ObjectGuid guid) +void Channel::MakePlayerAlreadyMember(WorldPacket* data, ObjectGuid guid) const { MakeNotifyPacket(data, CHAT_PLAYER_ALREADY_MEMBER_NOTICE); *data << uint64(guid); } -void Channel::MakeInvite(WorldPacket* data, ObjectGuid guid) +void Channel::MakeInvite(WorldPacket* data, ObjectGuid guid) const { MakeNotifyPacket(data, CHAT_INVITE_NOTICE); *data << uint64(guid); } -void Channel::MakeInviteWrongFaction(WorldPacket* data) +void Channel::MakeInviteWrongFaction(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_INVITE_WRONG_FACTION_NOTICE); } -void Channel::MakeWrongFaction(WorldPacket* data) +void Channel::MakeWrongFaction(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_WRONG_FACTION_NOTICE); } -void Channel::MakeInvalidName(WorldPacket* data) +void Channel::MakeInvalidName(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_INVALID_NAME_NOTICE); } -void Channel::MakeNotModerated(WorldPacket* data) +void Channel::MakeNotModerated(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_NOT_MODERATED_NOTICE); } -void Channel::MakePlayerInvited(WorldPacket* data, const std::string& name) +void Channel::MakePlayerInvited(WorldPacket* data, std::string const& name) const { MakeNotifyPacket(data, CHAT_PLAYER_INVITED_NOTICE); *data << name; } -void Channel::MakePlayerInviteBanned(WorldPacket* data, const std::string& name) +void Channel::MakePlayerInviteBanned(WorldPacket* data, std::string const& name) const { MakeNotifyPacket(data, CHAT_PLAYER_INVITE_BANNED_NOTICE); *data << name; } -void Channel::MakeThrottled(WorldPacket* data) +void Channel::MakeThrottled(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_THROTTLED_NOTICE); } -void Channel::MakeNotInArea(WorldPacket* data) +void Channel::MakeNotInArea(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_NOT_IN_AREA_NOTICE); } -void Channel::MakeNotInLfg(WorldPacket* data) +void Channel::MakeNotInLfg(WorldPacket* data) const { MakeNotifyPacket(data, CHAT_NOT_IN_LFG_NOTICE); } -void Channel::MakeVoiceOn(WorldPacket* data, ObjectGuid guid) +void Channel::MakeVoiceOn(WorldPacket* data, ObjectGuid guid) const { MakeNotifyPacket(data, CHAT_VOICE_ON_NOTICE); *data << uint64(guid); } -void Channel::MakeVoiceOff(WorldPacket* data, ObjectGuid guid) +void Channel::MakeVoiceOff(WorldPacket* data, ObjectGuid guid) const { MakeNotifyPacket(data, CHAT_VOICE_OFF_NOTICE); *data << uint64(guid); } -void Channel::JoinNotify(ObjectGuid guid) +void Channel::JoinNotify(ObjectGuid guid) const { WorldPacket data(IsConstant() ? SMSG_USERLIST_ADD : SMSG_USERLIST_UPDATE, 8 + 1 + 1 + 4 + GetName().size()); data << uint64(guid); @@ -978,7 +988,7 @@ void Channel::JoinNotify(ObjectGuid guid) SendToAll(&data); } -void Channel::LeaveNotify(ObjectGuid guid) +void Channel::LeaveNotify(ObjectGuid guid) const { WorldPacket data(SMSG_USERLIST_REMOVE, 8 + 1 + 4 + GetName().size()); data << uint64(guid); diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h index 319105d2a8d..23f9e5ae28f 100644 --- a/src/server/game/Chat/Channels/Channel.h +++ b/src/server/game/Chat/Channels/Channel.h @@ -19,10 +19,6 @@ #ifndef _CHANNEL_H #define _CHANNEL_H -#include <list> -#include <map> -#include <string> - #include "Common.h" #include "WorldSession.h" @@ -53,10 +49,10 @@ enum ChatNotify CHAT_MODERATION_OFF_NOTICE = 0x10, //+ "[%s] Channel moderation disabled by %s."; CHAT_MUTED_NOTICE = 0x11, //+ "[%s] You do not have permission to speak."; CHAT_PLAYER_KICKED_NOTICE = 0x12, //? "[%s] Player %s kicked by %s."; - CHAT_BANNED_NOTICE = 0x13, //+ "[%s] You are bannedStore from that channel."; - CHAT_PLAYER_BANNED_NOTICE = 0x14, //? "[%s] Player %s bannedStore by %s."; + CHAT_BANNED_NOTICE = 0x13, //+ "[%s] You are banned from that channel."; + CHAT_PLAYER_BANNED_NOTICE = 0x14, //? "[%s] Player %s banned by %s."; CHAT_PLAYER_UNBANNED_NOTICE = 0x15, //? "[%s] Player %s unbanned by %s."; - CHAT_PLAYER_NOT_BANNED_NOTICE = 0x16, //+ "[%s] Player %s is not bannedStore."; + CHAT_PLAYER_NOT_BANNED_NOTICE = 0x16, //+ "[%s] Player %s is not banned."; CHAT_PLAYER_ALREADY_MEMBER_NOTICE = 0x17, //+ "[%s] Player %s is already on the channel."; CHAT_INVITE_NOTICE = 0x18, //+ "%2$s has invited you to join the channel '%1$s'."; CHAT_INVITE_WRONG_FACTION_NOTICE = 0x19, //+ "Target is in the wrong alliance for %s."; @@ -64,7 +60,7 @@ enum ChatNotify CHAT_INVALID_NAME_NOTICE = 0x1B, //+ "Invalid channel name"; CHAT_NOT_MODERATED_NOTICE = 0x1C, //+ "%s is not moderated"; CHAT_PLAYER_INVITED_NOTICE = 0x1D, //+ "[%s] You invited %s to join the channel"; - CHAT_PLAYER_INVITE_BANNED_NOTICE = 0x1E, //+ "[%s] %s has been bannedStore."; + CHAT_PLAYER_INVITE_BANNED_NOTICE = 0x1E, //+ "[%s] %s has been banned."; CHAT_THROTTLED_NOTICE = 0x1F, //+ "[%s] The number of messages that can be sent to this channel is limited, please wait to send another message."; CHAT_NOT_IN_AREA_NOTICE = 0x20, //+ "[%s] You are not in the correct area for this channel."; -- The user is trying to send a chat to a zone specific channel, and they're not physically in that zone. CHAT_NOT_IN_LFG_NOTICE = 0x21, //+ "[%s] You must be queued in looking for group before joining this channel."; -- The user must be in the looking for group system to join LFG chat channels. @@ -85,7 +81,7 @@ enum ChannelFlags CHANNEL_FLAG_VOICE = 0x80 // General 0x18 = 0x10 | 0x08 // Trade 0x3C = 0x20 | 0x10 | 0x08 | 0x04 - // LocalDefence 0x18 = 0x10 | 0x08 + // LocalDefense 0x18 = 0x10 | 0x08 // GuildRecruitment 0x38 = 0x20 | 0x10 | 0x08 // LookingForGroup 0x50 = 0x40 | 0x10 }; @@ -122,23 +118,25 @@ class TC_GAME_API Channel { struct PlayerInfo { - ObjectGuid player; uint8 flags; bool HasFlag(uint8 flag) const { return (flags & flag) != 0; } void SetFlag(uint8 flag) { flags |= flag; } + bool IsOwner() const { return (flags & MEMBER_FLAG_OWNER) != 0; } void SetOwner(bool state) { if (state) flags |= MEMBER_FLAG_OWNER; else flags &= ~MEMBER_FLAG_OWNER; } + bool IsModerator() const { return (flags & MEMBER_FLAG_MODERATOR) != 0; } void SetModerator(bool state) { if (state) flags |= MEMBER_FLAG_MODERATOR; else flags &= ~MEMBER_FLAG_MODERATOR; } + bool IsMuted() const { return (flags & MEMBER_FLAG_MUTED) != 0; } void SetMuted(bool state) { @@ -148,106 +146,121 @@ class TC_GAME_API Channel }; public: - Channel(std::string const& name, uint32 channel_id, uint32 Team = 0); - std::string const& GetName() const { return _name; } + Channel(std::string const& name, uint32 channel_id, uint32 team = 0); + + std::string const& GetName() const { return _channelName; } + uint32 GetChannelId() const { return _channelId; } bool IsConstant() const { return _channelId != 0; } - bool IsAnnounce() const { return _announce; } bool IsLFG() const { return (GetFlags() & CHANNEL_FLAG_LFG) != 0; } - std::string const& GetPassword() const { return _password; } - void SetPassword(std::string const& npassword) { _password = npassword; } - void SetAnnounce(bool nannounce) { _announce = nannounce; } - uint32 GetNumPlayers() const { return playersStore.size(); } - uint8 GetFlags() const { return _flags; } - bool HasFlag(uint8 flag) const { return (_flags & flag) != 0; } + + bool IsAnnounce() const { return _announceEnabled; } + void SetAnnounce(bool nannounce) { _announceEnabled = nannounce; } + + std::string const& GetPassword() const { return _channelPassword; } + void SetPassword(std::string const& npassword) { _channelPassword = npassword; } + + uint32 GetNumPlayers() const { return _playersStore.size(); } + + uint8 GetFlags() const { return _channelFlags; } + bool HasFlag(uint8 flag) const { return (_channelFlags & flag) != 0; } void JoinChannel(Player* player, std::string const& pass); void LeaveChannel(Player* player, bool send = true); + void KickOrBan(Player const* player, std::string const& badname, bool ban); void Kick(Player const* player, std::string const& badname) { KickOrBan(player, badname, false); } void Ban(Player const* player, std::string const& badname) { KickOrBan(player, badname, true); } + void UnBan(Player const* player, std::string const& badname); void Password(Player const* player, std::string const& pass); void SetMode(Player const* player, std::string const& p2n, bool mod, bool set); - void SetOwner(ObjectGuid guid, bool exclaim = true); - void SetOwner(Player const* player, std::string const& name); - void SendWhoOwner(ObjectGuid guid); + void SetModerator(Player const* player, std::string const& newname) { SetMode(player, newname, true, true); } void UnsetModerator(Player const* player, std::string const& newname) { SetMode(player, newname, true, false); } void SetMute(Player const* player, std::string const& newname) { SetMode(player, newname, false, true); } void UnsetMute(Player const* player, std::string const& newname) { SetMode(player, newname, false, false); } - void List(Player const* player); + + void SetOwner(ObjectGuid guid, bool exclaim = true); + void SetOwner(Player const* player, std::string const& name); + void SendWhoOwner(ObjectGuid guid); + + void List(Player const* player) const; void Announce(Player const* player); - void Say(ObjectGuid guid, std::string const& what, uint32 lang); + void Say(ObjectGuid guid, std::string const& what, uint32 lang) const; void Invite(Player const* player, std::string const& newp); - void Voice(ObjectGuid guid1, ObjectGuid guid2); - void DeVoice(ObjectGuid guid1, ObjectGuid guid2); - void JoinNotify(ObjectGuid guid); // invisible notify - void LeaveNotify(ObjectGuid guid); // invisible notify - void SetOwnership(bool ownership) { _ownership = ownership; } + void Voice(ObjectGuid guid1, ObjectGuid guid2) const; + void DeVoice(ObjectGuid guid1, ObjectGuid guid2) const; + void JoinNotify(ObjectGuid guid) const; // invisible notify + void LeaveNotify(ObjectGuid guid) const; // invisible notify + void SetOwnership(bool ownership) { _ownershipEnabled = ownership; } static void CleanOldChannelsInDB(); private: // initial packet data (notify type and channel name) - void MakeNotifyPacket(WorldPacket* data, uint8 notify_type); + void MakeNotifyPacket(WorldPacket* data, uint8 notify_type) const; // type specific packet data - void MakeJoined(WorldPacket* data, ObjectGuid guid); //+ 0x00 - void MakeLeft(WorldPacket* data, ObjectGuid guid); //+ 0x01 - void MakeYouJoined(WorldPacket* data); //+ 0x02 - void MakeYouLeft(WorldPacket* data); //+ 0x03 - void MakeWrongPassword(WorldPacket* data); //? 0x04 - void MakeNotMember(WorldPacket* data); //? 0x05 - void MakeNotModerator(WorldPacket* data); //? 0x06 - void MakePasswordChanged(WorldPacket* data, ObjectGuid guid); //+ 0x07 - void MakeOwnerChanged(WorldPacket* data, ObjectGuid guid); //? 0x08 - void MakePlayerNotFound(WorldPacket* data, std::string const& name); //+ 0x09 - void MakeNotOwner(WorldPacket* data); //? 0x0A - void MakeChannelOwner(WorldPacket* data); //? 0x0B - void MakeModeChange(WorldPacket* data, ObjectGuid guid, uint8 oldflags);//+ 0x0C - void MakeAnnouncementsOn(WorldPacket* data, ObjectGuid guid); //+ 0x0D - void MakeAnnouncementsOff(WorldPacket* data, ObjectGuid guid); //+ 0x0E - void MakeMuted(WorldPacket* data); //? 0x11 - void MakePlayerKicked(WorldPacket* data, ObjectGuid bad, ObjectGuid good);//? 0x12 - void MakeBanned(WorldPacket* data); //? 0x13 - void MakePlayerBanned(WorldPacket* data, ObjectGuid bad, ObjectGuid good);//? 0x14 - void MakePlayerUnbanned(WorldPacket* data, ObjectGuid bad, ObjectGuid good);//? 0x15 - void MakePlayerNotBanned(WorldPacket* data, std::string const& name); //? 0x16 - void MakePlayerAlreadyMember(WorldPacket* data, ObjectGuid guid); //+ 0x17 - void MakeInvite(WorldPacket* data, ObjectGuid guid); //? 0x18 - void MakeInviteWrongFaction(WorldPacket* data); //? 0x19 - void MakeWrongFaction(WorldPacket* data); //? 0x1A - void MakeInvalidName(WorldPacket* data); //? 0x1B - void MakeNotModerated(WorldPacket* data); //? 0x1C - void MakePlayerInvited(WorldPacket* data, std::string const& name); //+ 0x1D - void MakePlayerInviteBanned(WorldPacket* data, std::string const& name);//? 0x1E - void MakeThrottled(WorldPacket* data); //? 0x1F - void MakeNotInArea(WorldPacket* data); //? 0x20 - void MakeNotInLfg(WorldPacket* data); //? 0x21 - void MakeVoiceOn(WorldPacket* data, ObjectGuid guid); //+ 0x22 - void MakeVoiceOff(WorldPacket* data, ObjectGuid guid); //+ 0x23 - - void SendToAll(WorldPacket* data, ObjectGuid guid = ObjectGuid::Empty); - void SendToAllButOne(WorldPacket* data, ObjectGuid who); - void SendToOne(WorldPacket* data, ObjectGuid who); - - bool IsOn(ObjectGuid who) const { return playersStore.find(who) != playersStore.end(); } - bool IsBanned(ObjectGuid guid) const { return bannedStore.find(guid) != bannedStore.end(); } + void MakeJoined(WorldPacket* data, ObjectGuid guid) const; //+ 0x00 + void MakeLeft(WorldPacket* data, ObjectGuid guid) const; //+ 0x01 + void MakeYouJoined(WorldPacket* data) const; //+ 0x02 + void MakeYouLeft(WorldPacket* data) const; //+ 0x03 + void MakeWrongPassword(WorldPacket* data) const; //? 0x04 + void MakeNotMember(WorldPacket* data) const; //? 0x05 + void MakeNotModerator(WorldPacket* data) const; //? 0x06 + void MakePasswordChanged(WorldPacket* data, ObjectGuid guid) const; //+ 0x07 + void MakeOwnerChanged(WorldPacket* data, ObjectGuid guid) const; //? 0x08 + void MakePlayerNotFound(WorldPacket* data, std::string const& name) const; //+ 0x09 + void MakeNotOwner(WorldPacket* data) const; //? 0x0A + void MakeChannelOwner(WorldPacket* data) const; //? 0x0B + void MakeModeChange(WorldPacket* data, ObjectGuid guid, uint8 oldflags) const; //+ 0x0C + void MakeAnnouncementsOn(WorldPacket* data, ObjectGuid guid) const; //+ 0x0D + void MakeAnnouncementsOff(WorldPacket* data, ObjectGuid guid) const; //+ 0x0E + void MakeMuted(WorldPacket* data) const; //? 0x11 + void MakePlayerKicked(WorldPacket* data, ObjectGuid bad, ObjectGuid good) const; //? 0x12 + void MakeBanned(WorldPacket* data) const; //? 0x13 + void MakePlayerBanned(WorldPacket* data, ObjectGuid bad, ObjectGuid good) const; //? 0x14 + void MakePlayerUnbanned(WorldPacket* data, ObjectGuid bad, ObjectGuid good) const; //? 0x15 + void MakePlayerNotBanned(WorldPacket* data, std::string const& name) const; //? 0x16 + void MakePlayerAlreadyMember(WorldPacket* data, ObjectGuid guid) const; //+ 0x17 + void MakeInvite(WorldPacket* data, ObjectGuid guid) const; //? 0x18 + void MakeInviteWrongFaction(WorldPacket* data) const; //? 0x19 + void MakeWrongFaction(WorldPacket* data) const; //? 0x1A + void MakeInvalidName(WorldPacket* data) const; //? 0x1B + void MakeNotModerated(WorldPacket* data) const; //? 0x1C + void MakePlayerInvited(WorldPacket* data, std::string const& name) const; //+ 0x1D + void MakePlayerInviteBanned(WorldPacket* data, std::string const& name) const; //? 0x1E + void MakeThrottled(WorldPacket* data) const; //? 0x1F + void MakeNotInArea(WorldPacket* data) const; //? 0x20 + void MakeNotInLfg(WorldPacket* data) const; //? 0x21 + void MakeVoiceOn(WorldPacket* data, ObjectGuid guid) const; //+ 0x22 + void MakeVoiceOff(WorldPacket* data, ObjectGuid guid) const; //+ 0x23 + + void SendToAll(WorldPacket* data, ObjectGuid guid = ObjectGuid::Empty) const; + void SendToAllButOne(WorldPacket* data, ObjectGuid who) const; + void SendToOne(WorldPacket* data, ObjectGuid who) const; + + bool IsOn(ObjectGuid who) const { return _playersStore.count(who) != 0; } + bool IsBanned(ObjectGuid guid) const { return _bannedStore.count(guid) != 0; } void UpdateChannelInDB() const; void UpdateChannelUseageInDB() const; uint8 GetPlayerFlags(ObjectGuid guid) const { - PlayerContainer::const_iterator itr = playersStore.find(guid); - return itr != playersStore.end() ? itr->second.flags : 0; + PlayerContainer::const_iterator itr = _playersStore.find(guid); + return itr != _playersStore.end() ? itr->second.flags : 0; } void SetModerator(ObjectGuid guid, bool set) { - if (playersStore[guid].IsModerator() != set) + if (!IsOn(guid)) + return; + + PlayerInfo& playerInfo = _playersStore.at(guid); + if (playerInfo.IsModerator() != set) { uint8 oldFlag = GetPlayerFlags(guid); - playersStore[guid].SetModerator(set); + playerInfo.SetModerator(set); WorldPacket data; MakeModeChange(&data, guid, oldFlag); @@ -257,10 +270,14 @@ class TC_GAME_API Channel void SetMute(ObjectGuid guid, bool set) { - if (playersStore[guid].IsMuted() != set) + if (!IsOn(guid)) + return; + + PlayerInfo& playerInfo = _playersStore.at(guid); + if (playerInfo.IsMuted() != set) { uint8 oldFlag = GetPlayerFlags(guid); - playersStore[guid].SetMuted(set); + playerInfo.SetMuted(set); WorldPacket data; MakeModeChange(&data, guid, oldFlag); @@ -269,19 +286,20 @@ class TC_GAME_API Channel } typedef std::map<ObjectGuid, PlayerInfo> PlayerContainer; - typedef GuidSet BannedContainer; + typedef GuidUnorderedSet BannedContainer; + + bool _announceEnabled; //< Whether we should broadcast a packet whenever a player joins/exits the channel + bool _ownershipEnabled; //< Whether the channel has to maintain an owner + bool _persistentChannel; //< Whether the channel is saved to DB - bool _announce; - bool _ownership; - bool _IsSaved; - uint8 _flags; + uint8 _channelFlags; uint32 _channelId; - uint32 _Team; - ObjectGuid _ownerGUID; - std::string _name; - std::string _password; - PlayerContainer playersStore; - BannedContainer bannedStore; + uint32 _channelTeam; + ObjectGuid _ownerGuid; + std::string _channelName; + std::string _channelPassword; + PlayerContainer _playersStore; + BannedContainer _bannedStore; }; #endif diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp index 3e9a633729a..043d4bdc2bc 100644 --- a/src/server/game/Chat/Channels/ChannelMgr.cpp +++ b/src/server/game/Chat/Channels/ChannelMgr.cpp @@ -39,14 +39,14 @@ ChannelMgr* ChannelMgr::forTeam(uint32 team) if (team == HORDE) return &hordeChannelMgr; - return NULL; + return nullptr; } Channel* ChannelMgr::GetJoinChannel(std::string const& name, uint32 channelId) { std::wstring wname; if (!Utf8toWStr(name, wname)) - return NULL; + return nullptr; wstrToLower(wname); @@ -66,7 +66,7 @@ Channel* ChannelMgr::GetChannel(std::string const& name, Player* player, bool pk { std::wstring wname; if (!Utf8toWStr(name, wname)) - return NULL; + return nullptr; wstrToLower(wname); @@ -81,7 +81,7 @@ Channel* ChannelMgr::GetChannel(std::string const& name, Player* player, bool pk player->GetSession()->SendPacket(&data); } - return NULL; + return nullptr; } return i->second; diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index ec90a5f7efb..27fa7ffb409 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -81,7 +81,7 @@ bool ChatHandler::isAvailable(ChatCommand const& cmd) const bool ChatHandler::HasLowerSecurity(Player* target, ObjectGuid guid, bool strong) { - WorldSession* target_session = NULL; + WorldSession* target_session = nullptr; uint32 target_account = 0; if (target) @@ -116,7 +116,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac else if (target_account) target_sec = AccountMgr::GetSecurity(target_account, realm.Id.Realm); else - return true; // caller must report error for (target == NULL && target_account == 0) + return true; // caller must report error for (target == nullptr && target_account == 0) AccountTypes target_ac_sec = AccountTypes(target_sec); if (m_session->GetSecurity() < target_ac_sec || (strong && m_session->GetSecurity() <= target_ac_sec)) @@ -129,7 +129,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac return false; } -bool ChatHandler::hasStringAbbr(const char* name, const char* part) +bool ChatHandler::hasStringAbbr(char const* name, char const* part) { // non "" command if (*name) @@ -166,7 +166,7 @@ void ChatHandler::SendSysMessage(const char *str, bool escapeCharacters) { size_t startPos = 0; std::ostringstream o; - while (const char* charPos = strchr(str + startPos, '|')) + while (char const* charPos = strchr(str + startPos, '|')) { o.write(str + startPos, charPos - str - startPos); o << "||"; @@ -184,7 +184,7 @@ void ChatHandler::SendSysMessage(const char *str, bool escapeCharacters) while (char* line = LineFromMessage(pos)) { - BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, NULL, NULL, line); + BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line); m_session->SendPacket(&data); } @@ -202,7 +202,7 @@ void ChatHandler::SendGlobalSysMessage(const char *str) while (char* line = LineFromMessage(pos)) { - BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, NULL, NULL, line); + BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line); sWorld->SendGlobalMessage(&data); } @@ -220,7 +220,7 @@ void ChatHandler::SendGlobalGMSysMessage(const char *str) while (char* line = LineFromMessage(pos)) { - BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, NULL, NULL, line); + BuildChatPacket(data, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, nullptr, nullptr, line); sWorld->SendGlobalGMMessage(&data); } @@ -232,7 +232,7 @@ void ChatHandler::SendSysMessage(uint32 entry) SendSysMessage(GetTrinityString(entry)); } -bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, const char* text, std::string const& fullcmd) +bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, char const* text, std::string const& fullcmd) { char const* oldtext = text; std::string cmd = ""; @@ -450,7 +450,7 @@ Valid examples: if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY) < 3) { const char validSequence[6] = "cHhhr"; - const char* validSequenceIterator = validSequence; + char const* validSequenceIterator = validSequence; const std::string validCommands = "cHhr|"; while (*message) @@ -525,7 +525,7 @@ bool ChatHandler::ShowHelpForSubCommands(std::vector<ChatCommand> const& table, return true; } -bool ChatHandler::ShowHelpForCommand(std::vector<ChatCommand> const& table, const char* cmd) +bool ChatHandler::ShowHelpForCommand(std::vector<ChatCommand> const& table, char const* cmd) { if (*cmd) { @@ -539,7 +539,7 @@ bool ChatHandler::ShowHelpForCommand(std::vector<ChatCommand> const& table, cons continue; // have subcommand - char const* subcmd = (*cmd) ? strtok(NULL, " ") : ""; + char const* subcmd = (*cmd) ? strtok(nullptr, " ") : ""; if (!table[i].ChildCommands.empty() && subcmd && *subcmd) { @@ -694,7 +694,7 @@ size_t ChatHandler::BuildChatPacket(WorldPacket& data, ChatMsg chatType, Languag Player* ChatHandler::getSelectedPlayer() { if (!m_session) - return NULL; + return nullptr; ObjectGuid selected = m_session->GetPlayer()->GetTarget(); if (!selected) @@ -706,7 +706,7 @@ Player* ChatHandler::getSelectedPlayer() Unit* ChatHandler::getSelectedUnit() { if (!m_session) - return NULL; + return nullptr; if (Unit* selected = m_session->GetPlayer()->GetSelectedUnit()) return selected; @@ -717,7 +717,7 @@ Unit* ChatHandler::getSelectedUnit() WorldObject* ChatHandler::getSelectedObject() { if (!m_session) - return NULL; + return nullptr; ObjectGuid guid = m_session->GetPlayer()->GetTarget(); @@ -730,7 +730,7 @@ WorldObject* ChatHandler::getSelectedObject() Creature* ChatHandler::getSelectedCreature() { if (!m_session) - return NULL; + return nullptr; return ObjectAccessor::GetCreatureOrPetOrVehicle(*m_session->GetPlayer(), m_session->GetPlayer()->GetTarget()); } @@ -738,7 +738,7 @@ Creature* ChatHandler::getSelectedCreature() Player* ChatHandler::getSelectedPlayerOrSelf() { if (!m_session) - return NULL; + return nullptr; ObjectGuid selected = m_session->GetPlayer()->GetTarget(); if (!selected) @@ -757,14 +757,14 @@ char* ChatHandler::extractKeyFromLink(char* text, char const* linkType, char** s { // skip empty if (!text) - return NULL; + return nullptr; // skip spaces while (*text == ' '||*text == '\t'||*text == '\b') ++text; if (!*text) - return NULL; + return nullptr; // return non link case if (text[0] != '|') @@ -776,28 +776,28 @@ char* ChatHandler::extractKeyFromLink(char* text, char const* linkType, char** s char* check = strtok(text, "|"); // skip color if (!check) - return NULL; // end of data + return nullptr; // end of data - char* cLinkType = strtok(NULL, ":"); // linktype + char* cLinkType = strtok(nullptr, ":"); // linktype if (!cLinkType) - return NULL; // end of data + return nullptr; // end of data if (strcmp(cLinkType, linkType) != 0) { - strtok(NULL, " "); // skip link tail (to allow continue strtok(NULL, s) use after retturn from function + strtok(nullptr, " "); // skip link tail (to allow continue strtok(nullptr, s) use after retturn from function SendSysMessage(LANG_WRONG_LINK_TYPE); - return NULL; + return nullptr; } - char* cKeys = strtok(NULL, "|"); // extract keys and values - char* cKeysTail = strtok(NULL, ""); + char* cKeys = strtok(nullptr, "|"); // extract keys and values + char* cKeysTail = strtok(nullptr, ""); char* cKey = strtok(cKeys, ":|"); // extract key if (something1) - *something1 = strtok(NULL, ":|"); // extract something + *something1 = strtok(nullptr, ":|"); // extract something strtok(cKeysTail, "]"); // restart scan tail and skip name with possible spaces - strtok(NULL, " "); // skip link tail (to allow continue strtok(NULL, s) use after return from function + strtok(nullptr, " "); // skip link tail (to allow continue strtok(nullptr, s) use after return from function return cKey; } @@ -805,14 +805,14 @@ char* ChatHandler::extractKeyFromLink(char* text, char const* const* linkTypes, { // skip empty if (!text) - return NULL; + return nullptr; // skip spaces while (*text == ' '||*text == '\t'||*text == '\b') ++text; if (!*text) - return NULL; + return nullptr; // return non link case if (text[0] != '|') @@ -830,48 +830,48 @@ char* ChatHandler::extractKeyFromLink(char* text, char const* const* linkTypes, { char* check = strtok(text, "|"); // skip color if (!check) - return NULL; // end of data + return nullptr; // end of data - tail = strtok(NULL, ""); // tail + tail = strtok(nullptr, ""); // tail } else tail = text+1; // skip first | char* cLinkType = strtok(tail, ":"); // linktype if (!cLinkType) - return NULL; // end of data + return nullptr; // end of data for (int i = 0; linkTypes[i]; ++i) { if (strcmp(cLinkType, linkTypes[i]) == 0) { - char* cKeys = strtok(NULL, "|"); // extract keys and values - char* cKeysTail = strtok(NULL, ""); + char* cKeys = strtok(nullptr, "|"); // extract keys and values + char* cKeysTail = strtok(nullptr, ""); char* cKey = strtok(cKeys, ":|"); // extract key if (something1) - *something1 = strtok(NULL, ":|"); // extract something + *something1 = strtok(nullptr, ":|"); // extract something strtok(cKeysTail, "]"); // restart scan tail and skip name with possible spaces - strtok(NULL, " "); // skip link tail (to allow continue strtok(NULL, s) use after return from function + strtok(nullptr, " "); // skip link tail (to allow continue strtok(nullptr, s) use after return from function if (found_idx) *found_idx = i; return cKey; } } - strtok(NULL, " "); // skip link tail (to allow continue strtok(NULL, s) use after return from function + strtok(nullptr, " "); // skip link tail (to allow continue strtok(nullptr, s) use after return from function SendSysMessage(LANG_WRONG_LINK_TYPE); - return NULL; + return nullptr; } GameObject* ChatHandler::GetNearbyGameObject() { if (!m_session) - return NULL; + return nullptr; Player* pl = m_session->GetPlayer(); - GameObject* obj = NULL; + GameObject* obj = nullptr; Trinity::NearestGameObjectCheck check(*pl); Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectCheck> searcher(pl, obj, check); pl->VisitNearbyGridObject(SIZE_OF_GRIDS, searcher); @@ -881,7 +881,7 @@ GameObject* ChatHandler::GetNearbyGameObject() GameObject* ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(ObjectGuid::LowType lowguid, uint32 entry) { if (!m_session) - return NULL; + return nullptr; Player* pl = m_session->GetPlayer(); @@ -926,7 +926,7 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text) // number or [name] Shift-click form |color|Htalent:talent_id, rank|h[name]|h|r // number or [name] Shift-click form |color|Htrade:spell_id, skill_id, max_value, cur_value|h[name]|h|r int type = 0; - char* param1_str = NULL; + char* param1_str = nullptr; char* idS = extractKeyFromLink(text, spellKeys, &type, ¶m1_str); if (!idS) return 0; @@ -974,7 +974,7 @@ GameTele const* ChatHandler::extractGameTeleFromLink(char* text) // id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r char* cId = extractKeyFromLink(text, "Htele"); if (!cId) - return NULL; + return nullptr; // id case (explicit or from shift link) if (cId[0] >= '0' || cId[0] >= '9') @@ -1064,7 +1064,7 @@ std::string ChatHandler::extractPlayerNameFromLink(char* text) return name; } -bool ChatHandler::extractPlayerTarget(char* args, Player** player, ObjectGuid* player_guid /*=NULL*/, std::string* player_name /*= NULL*/) +bool ChatHandler::extractPlayerTarget(char* args, Player** player, ObjectGuid* player_guid /*=nullptr*/, std::string* player_name /*= nullptr*/) { if (args && *args) { @@ -1120,12 +1120,12 @@ bool ChatHandler::extractPlayerTarget(char* args, Player** player, ObjectGuid* p void ChatHandler::extractOptFirstArg(char* args, char** arg1, char** arg2) { char* p1 = strtok(args, " "); - char* p2 = strtok(NULL, " "); + char* p2 = strtok(nullptr, " "); if (!p2) { p2 = p1; - p1 = NULL; + p1 = nullptr; } if (arg1) @@ -1138,7 +1138,7 @@ void ChatHandler::extractOptFirstArg(char* args, char** arg1, char** arg2) char* ChatHandler::extractQuotedArg(char* args) { if (!args || !*args) - return NULL; + return nullptr; if (*args == '"') return strtok(args+1, "\""); @@ -1151,9 +1151,9 @@ char* ChatHandler::extractQuotedArg(char* args) continue; } - // return NULL if we reached the end of the string + // return nullptr if we reached the end of the string if (!*args) - return NULL; + return nullptr; // since we skipped all spaces, we expect another token now if (*args == '"') @@ -1171,7 +1171,7 @@ char* ChatHandler::extractQuotedArg(char* args) return strtok(args + 1, "\""); } else - return NULL; + return nullptr; } } @@ -1223,9 +1223,9 @@ bool CliHandler::needReportToTarget(Player* /*chr*/) const return true; } -bool ChatHandler::GetPlayerGroupAndGUIDByName(const char* cname, Player*& player, Group*& group, ObjectGuid& guid, bool offline) +bool ChatHandler::GetPlayerGroupAndGUIDByName(char const* cname, Player*& player, Group*& group, ObjectGuid& guid, bool offline) { - player = NULL; + player = nullptr; guid.Clear(); if (cname) diff --git a/src/server/game/Chat/Chat.h b/src/server/game/Chat/Chat.h index 1c9368275ad..a700afdf97d 100644 --- a/src/server/game/Chat/Chat.h +++ b/src/server/game/Chat/Chat.h @@ -67,7 +67,7 @@ class TC_GAME_API ChatHandler // Builds chat packet and returns receiver guid position in the packet to substitute in whisper builders static size_t BuildChatPacket(WorldPacket& data, ChatMsg chatType, Language language, WorldObject const* sender, WorldObject const* receiver, std::string const& message, uint32 achievementId = 0, std::string const& channelName = "", LocaleConstant locale = DEFAULT_LOCALE); - static char* LineFromMessage(char*& pos) { char* start = strtok(pos, "\n"); pos = NULL; return start; } + static char* LineFromMessage(char*& pos) { char* start = strtok(pos, "\n"); pos = nullptr; return start; } // function with different implementation for chat/console virtual char const* GetTrinityString(uint32 entry) const; @@ -76,7 +76,7 @@ class TC_GAME_API ChatHandler void SendSysMessage(uint32 entry); template<typename... Args> - void PSendSysMessage(const char* fmt, Args&&... args) + void PSendSysMessage(char const* fmt, Args&&... args) { SendSysMessage(Trinity::StringFormat(fmt, std::forward<Args>(args)...).c_str()); } @@ -93,15 +93,15 @@ class TC_GAME_API ChatHandler return Trinity::StringFormat(GetTrinityString(entry), std::forward<Args>(args)...); } - bool ParseCommands(const char* text); + bool ParseCommands(char const* text); static std::vector<ChatCommand> const& getCommandTable(); static void invalidateCommandTable(); - bool isValidChatMessage(const char* msg); + bool isValidChatMessage(char const* msg); void SendGlobalSysMessage(const char *str); - bool hasStringAbbr(const char* name, const char* part); + bool hasStringAbbr(char const* name, char const* part); // function with different implementation for chat/console virtual bool isAvailable(ChatCommand const& cmd) const; @@ -122,20 +122,20 @@ class TC_GAME_API ChatHandler // Returns either the selected player or self if there is no selected player Player* getSelectedPlayerOrSelf(); - char* extractKeyFromLink(char* text, char const* linkType, char** something1 = NULL); - char* extractKeyFromLink(char* text, char const* const* linkTypes, int* found_idx, char** something1 = NULL); + char* extractKeyFromLink(char* text, char const* linkType, char** something1 = nullptr); + char* extractKeyFromLink(char* text, char const* const* linkTypes, int* found_idx, char** something1 = nullptr); - // if args have single value then it return in arg2 and arg1 == NULL + // if args have single value then it return in arg2 and arg1 == nullptr void extractOptFirstArg(char* args, char** arg1, char** arg2); char* extractQuotedArg(char* args); uint32 extractSpellIdFromLink(char* text); ObjectGuid extractGuidFromLink(char* text); GameTele const* extractGameTeleFromLink(char* text); - bool GetPlayerGroupAndGUIDByName(const char* cname, Player*& player, Group*& group, ObjectGuid& guid, bool offline = false); + bool GetPlayerGroupAndGUIDByName(char const* cname, Player*& player, Group*& group, ObjectGuid& guid, bool offline = false); std::string extractPlayerNameFromLink(char* text); // select by arg (name/link) or in-game selection online/offline player or self if a creature is selected - bool extractPlayerTarget(char* args, Player** player, ObjectGuid* player_guid = NULL, std::string* player_name = NULL); + bool extractPlayerTarget(char* args, Player** player, ObjectGuid* player_guid = nullptr, std::string* player_name = nullptr); std::string playerLink(std::string const& name) const { return m_session ? "|cffffffff|Hplayer:"+name+"|h["+name+"]|h|r" : name; } std::string GetNameLink(Player* chr) const; @@ -145,15 +145,15 @@ class TC_GAME_API ChatHandler bool HasSentErrorMessage() const { return sentErrorMessage; } void SetSentErrorMessage(bool val){ sentErrorMessage = val; } - bool ShowHelpForCommand(std::vector<ChatCommand> const& table, const char* cmd); + bool ShowHelpForCommand(std::vector<ChatCommand> const& table, char const* cmd); protected: - explicit ChatHandler() : m_session(NULL), sentErrorMessage(false) { } // for CLI subclass - static bool SetDataForCommandInTable(std::vector<ChatCommand>& table, const char* text, uint32 permission, std::string const& help, std::string const& fullcommand); - bool ExecuteCommandInTable(std::vector<ChatCommand> const& table, const char* text, std::string const& fullcmd); + explicit ChatHandler() : m_session(nullptr), sentErrorMessage(false) { } // for CLI subclass + static bool SetDataForCommandInTable(std::vector<ChatCommand>& table, char const* text, uint32 permission, std::string const& help, std::string const& fullcommand); + bool ExecuteCommandInTable(std::vector<ChatCommand> const& table, char const* text, std::string const& fullcmd); bool ShowHelpForSubCommands(std::vector<ChatCommand> const& table, char const* cmd, char const* subcmd); private: - WorldSession* m_session; // != NULL for chat command call and NULL for CLI command + WorldSession* m_session; // != nullptr for chat command call and nullptr for CLI command // common global flag bool sentErrorMessage; diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index 3602b54bc44..92d69edb5e8 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -71,7 +71,7 @@ inline std::string ReadSkip(std::istringstream& iss, char term) return res; } -inline bool CheckDelimiter(std::istringstream& iss, char delimiter, const char* context) +inline bool CheckDelimiter(std::istringstream& iss, char delimiter, char const* context) { char c = iss.peek(); if (c != delimiter) @@ -96,7 +96,7 @@ inline bool ReadHex(std::istringstream& iss, uint32& res, uint32 length) #define DELIMITER ':' #define PIPE_CHAR '|' -bool ChatLink::ValidateName(char* buffer, const char* /*context*/) +bool ChatLink::ValidateName(char* buffer, char const* /*context*/) { _name = buffer; return true; @@ -170,7 +170,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss) inline std::string ItemChatLink::FormatName(uint8 index, ItemLocale const* locale, char* const* suffixStrings) const { std::stringstream ss; - if (locale == NULL || index >= locale->Name.size()) + if (locale == nullptr || index >= locale->Name.size()) ss << _item->Name1; else ss << locale->Name[index]; @@ -179,13 +179,13 @@ inline std::string ItemChatLink::FormatName(uint8 index, ItemLocale const* local return ss.str(); } -bool ItemChatLink::ValidateName(char* buffer, const char* context) +bool ItemChatLink::ValidateName(char* buffer, char const* context) { ChatLink::ValidateName(buffer, context); - char* const* suffixStrings = _suffix ? _suffix->nameSuffix : (_property ? _property->nameSuffix : NULL); + char* const* suffixStrings = _suffix ? _suffix->nameSuffix : (_property ? _property->nameSuffix : nullptr); - bool res = (FormatName(LOCALE_enUS, NULL, suffixStrings) == buffer); + bool res = (FormatName(LOCALE_enUS, nullptr, suffixStrings) == buffer); if (!res) { ItemLocale const* il = sObjectMgr->GetItemLocale(_item->ItemId); @@ -239,7 +239,7 @@ bool QuestChatLink::Initialize(std::istringstream& iss) return true; } -bool QuestChatLink::ValidateName(char* buffer, const char* context) +bool QuestChatLink::ValidateName(char* buffer, char const* context) { ChatLink::ValidateName(buffer, context); @@ -280,7 +280,7 @@ bool SpellChatLink::Initialize(std::istringstream& iss) return true; } -bool SpellChatLink::ValidateName(char* buffer, const char* context) +bool SpellChatLink::ValidateName(char* buffer, char const* context) { ChatLink::ValidateName(buffer, context); @@ -373,7 +373,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss) return true; } -bool AchievementChatLink::ValidateName(char* buffer, const char* context) +bool AchievementChatLink::ValidateName(char* buffer, char const* context) { ChatLink::ValidateName(buffer, context); @@ -537,7 +537,7 @@ bool GlyphChatLink::Initialize(std::istringstream& iss) return true; } -LinkExtractor::LinkExtractor(const char* msg) : _iss(msg) { } +LinkExtractor::LinkExtractor(char const* msg) : _iss(msg) { } LinkExtractor::~LinkExtractor() { @@ -549,19 +549,19 @@ LinkExtractor::~LinkExtractor() bool LinkExtractor::IsValidMessage() { const char validSequence[6] = "cHhhr"; - const char* validSequenceIterator = validSequence; + char const* validSequenceIterator = validSequence; char buffer[256]; std::istringstream::pos_type startPos = 0; uint32 color = 0; - ChatLink* link = NULL; + ChatLink* link = nullptr; while (!_iss.eof()) { if (validSequence == validSequenceIterator) { - link = NULL; + link = nullptr; _iss.ignore(255, PIPE_CHAR); startPos = _iss.tellg() - std::istringstream::pos_type(1); } diff --git a/src/server/game/Chat/ChatLink.h b/src/server/game/Chat/ChatLink.h index 0d413ce49df..32ea4b73698 100644 --- a/src/server/game/Chat/ChatLink.h +++ b/src/server/game/Chat/ChatLink.h @@ -44,7 +44,7 @@ public: void SetBounds(std::istringstream::pos_type startPos, std::istringstream::pos_type endPos) { _startPos = startPos; _endPos = endPos; } virtual bool Initialize(std::istringstream& iss) = 0; - virtual bool ValidateName(char* buffer, const char* context) = 0; + virtual bool ValidateName(char* buffer, char const* context) = 0; protected: uint32 _color; @@ -57,12 +57,12 @@ protected: class TC_GAME_API ItemChatLink : public ChatLink { public: - ItemChatLink() : ChatLink(), _item(NULL), _suffix(NULL), _property(NULL) + ItemChatLink() : ChatLink(), _item(nullptr), _suffix(nullptr), _property(nullptr) { memset(_data, 0, sizeof(_data)); } virtual bool Initialize(std::istringstream& iss) override; - virtual bool ValidateName(char* buffer, const char* context) override; + virtual bool ValidateName(char* buffer, char const* context) override; protected: std::string FormatName(uint8 index, ItemLocale const* locale, char* const* suffixStrings) const; @@ -79,7 +79,7 @@ class TC_GAME_API QuestChatLink : public ChatLink public: QuestChatLink() : ChatLink(), _quest(nullptr), _questLevel(0) { } virtual bool Initialize(std::istringstream& iss) override; - virtual bool ValidateName(char* buffer, const char* context) override; + virtual bool ValidateName(char* buffer, char const* context) override; protected: Quest const* _quest; @@ -92,7 +92,7 @@ class TC_GAME_API SpellChatLink : public ChatLink public: SpellChatLink() : ChatLink(), _spell(nullptr) { } virtual bool Initialize(std::istringstream& iss) override; - virtual bool ValidateName(char* buffer, const char* context) override; + virtual bool ValidateName(char* buffer, char const* context) override; protected: SpellInfo const* _spell; @@ -102,12 +102,12 @@ protected: class TC_GAME_API AchievementChatLink : public ChatLink { public: - AchievementChatLink() : ChatLink(), _guid(0), _achievement(NULL) + AchievementChatLink() : ChatLink(), _guid(0), _achievement(nullptr) { memset(_data, 0, sizeof(_data)); } virtual bool Initialize(std::istringstream& iss) override; - virtual bool ValidateName(char* buffer, const char* context) override; + virtual bool ValidateName(char* buffer, char const* context) override; protected: uint32 _guid; @@ -152,7 +152,7 @@ public: class TC_GAME_API GlyphChatLink : public SpellChatLink { public: - GlyphChatLink() : SpellChatLink(), _slotId(0), _glyph(NULL) { } + GlyphChatLink() : SpellChatLink(), _slotId(0), _glyph(nullptr) { } virtual bool Initialize(std::istringstream& iss) override; private: uint32 _slotId; @@ -162,7 +162,7 @@ private: class TC_GAME_API LinkExtractor { public: - explicit LinkExtractor(const char* msg); + explicit LinkExtractor(char const* msg); ~LinkExtractor(); bool IsValidMessage(); diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index afb6255079b..6317fae2767 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -103,7 +103,8 @@ ConditionMgr::ConditionTypeInfo const ConditionMgr::StaticConditionTypeData[COND { "Realm Achievement", true, false, false }, { "In Water", false, false, false }, { "Terrain Swap", false, false, false }, - { "Sit/stand state", true, true, false } + { "Sit/stand state", true, true, false }, + { "Daily Quest Completed",true, false, false } }; // Checks if object meets the condition @@ -448,6 +449,12 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const } break; } + case CONDITION_DAILY_QUEST_DONE: + { + if (Player* player = object->ToPlayer()) + condMeets = player->IsDailyQuestDone(ConditionValue1); + break; + } default: condMeets = false; break; @@ -621,6 +628,9 @@ uint32 Condition::GetSearcherTypeMaskForCondition() const case CONDITION_STAND_STATE: mask |= GRID_MAP_TYPE_MASK_CREATURE | GRID_MAP_TYPE_MASK_PLAYER; break; + case CONDITION_DAILY_QUEST_DONE: + mask |= GRID_MAP_TYPE_MASK_PLAYER; + break; default: ASSERT(false && "Condition::GetSearcherTypeMaskForCondition - missing condition handling!"); break; @@ -738,7 +748,7 @@ bool ConditionMgr::IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo, //! If not found, add an entry in the store and set to true (placeholder) if (itr == elseGroupStore.end()) elseGroupStore[condition->ElseGroup] = true; - else if (!(*itr).second) + else if (!(*itr).second) //! If another condition in this group was unmatched before this, don't bother checking (the group is false anyway) continue; if (condition->ReferenceId)//handle reference @@ -1791,6 +1801,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond) const case CONDITION_QUESTTAKEN: case CONDITION_QUEST_NONE: case CONDITION_QUEST_COMPLETE: + case CONDITION_DAILY_QUEST_DONE: { if (!sObjectMgr->GetQuestTemplate(cond->ConditionValue1)) { diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index 83e714781c3..4ec2be0753a 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -73,7 +73,8 @@ enum ConditionTypes CONDITION_IN_WATER = 40, // 0 0 0 true if unit in water 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 + CONDITION_DAILY_QUEST_DONE = 43, // quest id 0 0 true if daily quest has been completed for the day + CONDITION_MAX = 44 // MAX }; /*! Documentation on implementing a new ConditionSourceType: diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 36ec418ed56..051b5e824bf 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -25,7 +25,7 @@ #include "Timer.h" #include "ObjectDefines.h" -#include <boost/regex.hpp> +#include <regex> #include <map> typedef std::map<uint16, uint32> AreaFlagByAreaID; @@ -145,7 +145,7 @@ DBCStorage <MovieEntry> sMovieStore(MovieEntryfmt); DBCStorage<NamesProfanityEntry> sNamesProfanityStore(NamesProfanityEntryfmt); DBCStorage<NamesReservedEntry> sNamesReservedStore(NamesReservedEntryfmt); -typedef std::array<std::vector<boost::regex>, TOTAL_LOCALES> NameValidationRegexContainer; +typedef std::array<std::vector<std::wregex>, TOTAL_LOCALES> NameValidationRegexContainer; NameValidationRegexContainer NamesProfaneValidators; NameValidationRegexContainer NamesReservedValidators; @@ -264,7 +264,7 @@ inline void LoadDBC(uint32& availableDbcLocales, StoreProblemList& errors, DBCSt if (FILE* f = fopen(dbcFilename.c_str(), "rb")) { std::ostringstream stream; - stream << dbcFilename << " exists, and has " << storage.GetFieldCount() << " field(s) (expected " << strlen(storage.GetFormat()) << "). Extracted file might be from wrong client version or a database-update has been forgotten."; + stream << dbcFilename << " exists, and has " << storage.GetFieldCount() << " field(s) (expected " << strlen(storage.GetFormat()) << "). Extracted file might be from wrong client version or a database-update has been forgotten. Search on forum for TCE00008 for more info."; std::string buf = stream.str(); errors.push_back(buf); fclose(f); @@ -410,11 +410,14 @@ void LoadDBCStores(const std::string& dataPath) continue; ASSERT(namesProfanity->Language < TOTAL_LOCALES || namesProfanity->Language == -1); + std::wstring wname; + ASSERT(Utf8toWStr(namesProfanity->Name, wname)); + if (namesProfanity->Language != -1) - NamesProfaneValidators[namesProfanity->Language].emplace_back(namesProfanity->Name, boost::regex::perl | boost::regex::icase | boost::regex::optimize); + NamesProfaneValidators[namesProfanity->Language].emplace_back(wname, std::regex::icase | std::regex::optimize); else for (uint32 i = 0; i < TOTAL_LOCALES; ++i) - NamesProfaneValidators[i].emplace_back(namesProfanity->Name, boost::regex::perl | boost::regex::icase | boost::regex::optimize); + NamesProfaneValidators[i].emplace_back(wname, std::regex::icase | std::regex::optimize); } for (uint32 i = 0; i < sNamesReservedStore.GetNumRows(); ++i) @@ -424,11 +427,14 @@ void LoadDBCStores(const std::string& dataPath) continue; ASSERT(namesReserved->Language < TOTAL_LOCALES || namesReserved->Language == -1); + std::wstring wname; + ASSERT(Utf8toWStr(namesReserved->Name, wname)); + if (namesReserved->Language != -1) - NamesReservedValidators[namesReserved->Language].emplace_back(namesReserved->Name, boost::regex::perl | boost::regex::icase | boost::regex::optimize); + NamesReservedValidators[namesReserved->Language].emplace_back(wname, std::regex::icase | std::regex::optimize); else for (uint32 i = 0; i < TOTAL_LOCALES; ++i) - NamesReservedValidators[i].emplace_back(namesReserved->Name, boost::regex::perl | boost::regex::icase | boost::regex::optimize); + NamesReservedValidators[i].emplace_back(wname, std::regex::icase | std::regex::optimize); } @@ -1000,18 +1006,18 @@ SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, u return NULL; } -ResponseCodes ValidateName(std::string const& name, LocaleConstant locale) +ResponseCodes ValidateName(std::wstring const& name, LocaleConstant locale) { if (locale >= TOTAL_LOCALES) return RESPONSE_FAILURE; - for (boost::regex const& regex : NamesProfaneValidators[locale]) - if (boost::regex_search(name, regex)) + for (std::wregex const& regex : NamesProfaneValidators[locale]) + if (std::regex_search(name, regex)) return CHAR_NAME_PROFANE; // regexes at TOTAL_LOCALES are loaded from NamesReserved which is not locale specific - for (boost::regex const& regex : NamesReservedValidators[locale]) - if (boost::regex_search(name, regex)) + for (std::wregex const& regex : NamesReservedValidators[locale]) + if (std::regex_search(name, regex)) return CHAR_NAME_RESERVED; return CHAR_NAME_SUCCESS; diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 00b4141555f..128ff7ad1b8 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -75,7 +75,7 @@ typedef std::unordered_multimap<uint32, SkillRaceClassInfoEntry const*> SkillRac typedef std::pair<SkillRaceClassInfoMap::iterator, SkillRaceClassInfoMap::iterator> SkillRaceClassInfoBounds; TC_GAME_API SkillRaceClassInfoEntry const* GetSkillRaceClassInfo(uint32 skill, uint8 race, uint8 class_); -TC_GAME_API ResponseCodes ValidateName(std::string const& name, LocaleConstant locale); +TC_GAME_API ResponseCodes ValidateName(std::wstring const& name, LocaleConstant locale); TC_GAME_API EmotesTextSoundEntry const* FindTextSoundEmoteFor(uint32 emote, uint32 race, uint32 gender); diff --git a/src/server/game/DataStores/M2Stores.cpp b/src/server/game/DataStores/M2Stores.cpp index 5cff66e6107..69581f16549 100644 --- a/src/server/game/DataStores/M2Stores.cpp +++ b/src/server/game/DataStores/M2Stores.cpp @@ -193,7 +193,7 @@ void LoadM2Cameras(std::string const& dataPath) { if (CinematicCameraEntry const* dbcentry = sCinematicCameraStore.LookupEntry(i)) { - std::string filenameWork = dataPath.c_str(); + std::string filenameWork = dataPath; filenameWork.append(dbcentry->Model); // Replace slashes (always to forward slash, because boost!) diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index e72859c23e7..4ca1a68c048 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -82,19 +82,19 @@ void LFGMgr::_SaveToDB(ObjectGuid guid, uint32 db_guid) if (!guid.IsGroup()) return; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_LFG_DATA); + SQLTransaction trans = CharacterDatabase.BeginTransaction(); + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_LFG_DATA); stmt->setUInt32(0, db_guid); - - CharacterDatabase.Execute(stmt); + trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_LFG_DATA); stmt->setUInt32(0, db_guid); - stmt->setUInt32(1, GetDungeon(guid)); stmt->setUInt32(2, GetState(guid)); + trans->Append(stmt); - CharacterDatabase.Execute(stmt); + CharacterDatabase.CommitTransaction(trans); } /// Load rewards for completing dungeons @@ -1904,8 +1904,16 @@ bool LFGMgr::AllQueued(GuidList const& check) return false; for (GuidList::const_iterator it = check.begin(); it != check.end(); ++it) - if (GetState(*it) != LFG_STATE_QUEUED) + { + LfgState state = GetState(*it); + if (state != LFG_STATE_QUEUED) + { + if (state != LFG_STATE_PROPOSAL) + TC_LOG_DEBUG("lfg.allqueued", "Unexpected state found while trying to form new group. Guid: %s, State: %s", (*it).ToString().c_str(), GetStateString(state).c_str()); + return false; + } + } return true; } diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 450cf2396a8..4a5f70165fc 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -367,13 +367,13 @@ bool Creature::InitEntry(uint32 entry, CreatureData const* data /*= nullptr*/) SetByteValue(UNIT_FIELD_BYTES_0, UNIT_BYTES_0_OFFSET_GENDER, minfo->gender); // Load creature equipment - if (data && data->equipmentId != 0) + if (!data || data->equipmentId == 0) + LoadEquipment(); // use default equipment (if available) + else if (data && data->equipmentId != 0) // override, 0 means no equipment { m_originalEquipmentId = data->equipmentId; LoadEquipment(data->equipmentId); } - else - LoadEquipment(0, true); SetName(normalInfo->Name); // at normal entry always @@ -481,6 +481,9 @@ bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/) ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true); } + if (cInfo->InhabitType & INHABIT_ROOT) + SetControlled(true, UNIT_STATE_ROOT); + UpdateMovementFlags(); LoadCreaturesAddon(); return true; @@ -863,15 +866,17 @@ bool Creature::Create(ObjectGuid::LowType guidlow, Map* map, uint32 phaseMask, u //! returning correct zone id for selecting OutdoorPvP/Battlefield script Relocate(x, y, z, ang); - if (!CreateFromProto(guidlow, entry, data, vehId)) - return false; - + // Check if the position is valid before calling CreateFromProto(), otherwise we might add Auras to Creatures at + // invalid position, triggering a crash about Auras not removed in the destructor if (!IsPositionValid()) { TC_LOG_ERROR("entities.unit", "Creature::Create(): given coordinates for creature (guidlow %d, entry %d) are not valid (X: %f, Y: %f, Z: %f, O: %f)", guidlow, entry, x, y, z, ang); return false; } + if (!CreateFromProto(guidlow, entry, data, vehId)) + return false; + switch (GetCreatureTemplate()->rank) { case CREATURE_ELITE_RARE: @@ -1823,7 +1828,7 @@ bool Creature::isWorldBoss() const if (IsPet()) return false; - return (GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_BOSS) != 0; + return (GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_BOSS_MOB) != 0; } SpellInfo const* Creature::reachWithSpellAttack(Unit* victim) diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index bb43bcb5ff1..cfe637c4b21 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -22,7 +22,7 @@ #include "Common.h" #include "Unit.h" #include "UpdateMask.h" -#include "ItemPrototype.h" +#include "ItemTemplate.h" #include "LootMgr.h" #include "DatabaseEnv.h" #include "Cell.h" @@ -107,7 +107,7 @@ struct TC_GAME_API CreatureTemplate uint32 unit_flags; // enum UnitFlags mask values uint32 unit_flags2; // enum UnitFlags2 mask values uint32 dynamicflags; - uint32 family; // enum CreatureFamily values (optional) + CreatureFamily family; // enum CreatureFamily values (optional) uint32 trainer_type; uint32 trainer_spell; uint32 trainer_class; @@ -146,11 +146,11 @@ struct TC_GAME_API CreatureTemplate // helpers SkillType GetRequiredLootSkill() const { - if (type_flags & CREATURE_TYPEFLAGS_HERBLOOT) + if (type_flags & CREATURE_TYPE_FLAG_HERB_SKINNING_SKILL) return SKILL_HERBALISM; - else if (type_flags & CREATURE_TYPEFLAGS_MININGLOOT) + else if (type_flags & CREATURE_TYPE_FLAG_MINING_SKINNING_SKILL) return SKILL_MINING; - else if (type_flags & CREATURE_TYPEFLAGS_ENGINEERLOOT) + else if (type_flags & CREATURE_TYPE_FLAG_ENGINEERING_SKINNING_SKILL) return SKILL_ENGINEERING; else return SKILL_SKINNING; // normal case @@ -158,12 +158,12 @@ struct TC_GAME_API CreatureTemplate bool IsExotic() const { - return (type_flags & CREATURE_TYPEFLAGS_EXOTIC) != 0; + return (type_flags & CREATURE_TYPE_FLAG_EXOTIC_PET) != 0; } bool IsTameable(bool canTameExotic) const { - if (type != CREATURE_TYPE_BEAST || family == 0 || (type_flags & CREATURE_TYPEFLAGS_TAMEABLE) == 0) + if (type != CREATURE_TYPE_BEAST || family == CREATURE_FAMILY_NONE || (type_flags & CREATURE_TYPE_FLAG_TAMEABLE_PET) == 0) return false; // if can tame exotic then can tame any tameable @@ -294,7 +294,8 @@ enum InhabitTypeValues INHABIT_GROUND = 1, INHABIT_WATER = 2, INHABIT_AIR = 4, - INHABIT_ANYWHERE = INHABIT_GROUND | INHABIT_WATER | INHABIT_AIR + INHABIT_ROOT = 8, + INHABIT_ANYWHERE = INHABIT_GROUND | INHABIT_WATER | INHABIT_AIR | INHABIT_ROOT }; // Enums used by StringTextData::Type (CreatureEventAI) @@ -597,6 +598,7 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma void RemoveCorpse(bool setSpawnTime = true); void DespawnOrUnsummon(uint32 msTimeToDespawn = 0); + void DespawnOrUnsummon(Milliseconds const& time) { DespawnOrUnsummon(uint32(time.count())); } time_t const& GetRespawnTime() const { return m_respawnTime; } time_t GetRespawnTimeEx() const; diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 7f922f89572..ba336303a35 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -34,7 +34,7 @@ #include "Transport.h" GameObject::GameObject() : WorldObject(false), MapObject(), - m_model(NULL), m_goValue(), m_AI(NULL) + m_model(nullptr), m_goValue(), m_AI(nullptr) { m_objectType |= TYPEMASK_GAMEOBJECT; m_objectTypeId = TYPEID_GAMEOBJECT; @@ -49,11 +49,11 @@ GameObject::GameObject() : WorldObject(false), MapObject(), m_usetimes = 0; m_spellId = 0; m_cooldownTime = 0; - m_goInfo = NULL; - m_goData = NULL; + m_goInfo = nullptr; + m_goData = nullptr; + m_packedRotation = 0; m_spawnId = 0; - m_rotation = 0; m_lootRecipientGroup = 0; m_groupLootTimer = 0; @@ -173,16 +173,16 @@ void GameObject::RemoveFromWorld() } } -bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit) +bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, uint32 phaseMask, Position const& pos, G3D::Quat const& rotation, uint32 animprogress, GOState go_state, uint32 artKit /*= 0*/) { ASSERT(map); SetMap(map); - Relocate(x, y, z, ang); - m_stationaryPosition.Relocate(x, y, z, ang); + Relocate(pos); + m_stationaryPosition.Relocate(pos); if (!IsPositionValid()) { - TC_LOG_ERROR("misc", "Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, x, y); + TC_LOG_ERROR("misc", "Gameobject (GUID: %u Entry: %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, name_id, pos.GetPositionX(), pos.GetPositionY()); return false; } @@ -199,7 +199,7 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(name_id); if (!goinfo) { - TC_LOG_ERROR("sql.sql", "Gameobject (GUID: %u Entry: %u) not created: non-existing entry in `gameobject_template`. Map: %u (X: %f Y: %f Z: %f)", guidlow, name_id, map->GetId(), x, y, z); + TC_LOG_ERROR("sql.sql", "Gameobject (GUID: %u Entry: %u) not created: non-existing entry in `gameobject_template`. Map: %u (X: %f Y: %f Z: %f)", guidlow, name_id, map->GetId(), pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ()); return false; } @@ -222,10 +222,15 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u return false; } - SetFloatValue(GAMEOBJECT_PARENTROTATION+0, rotation0); - SetFloatValue(GAMEOBJECT_PARENTROTATION+1, rotation1); + SetWorldRotation(rotation); + GameObjectAddon const* gameObjectAddon = sObjectMgr->GetGameObjectAddon(GetSpawnId()); - UpdateRotationFields(rotation2, rotation3); // GAMEOBJECT_FACING, GAMEOBJECT_ROTATION, GAMEOBJECT_PARENTROTATION+2/3 + // For most of gameobjects is (0, 0, 0, 1) quaternion, there are only some transports with not standard rotation + G3D::Quat parentRotation; + if (gameObjectAddon) + parentRotation = gameObjectAddon->ParentRotation; + + SetParentRotation(parentRotation); SetObjectScale(goinfo->size); @@ -285,13 +290,10 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u break; } - if (GameObjectAddon const* addon = sObjectMgr->GetGameObjectAddon(GetSpawnId())) + if (gameObjectAddon && gameObjectAddon->InvisibilityValue) { - if (addon->InvisibilityValue) - { - m_invisibility.AddFlag(addon->invisibilityType); - m_invisibility.AddValue(addon->invisibilityType, addon->InvisibilityValue); - } + m_invisibility.AddFlag(gameObjectAddon->invisibilityType); + m_invisibility.AddValue(gameObjectAddon->invisibilityType, gameObjectAddon->InvisibilityValue); } LastUsedScriptID = GetGOInfo()->ScriptId; @@ -496,7 +498,7 @@ void GameObject::Update(uint32 diff) radius = goInfo->trap.diameter / 2.f; // Pointer to appropriate target if found any - Unit* target = NULL; + Unit* target = nullptr; /// @todo this hack with search required until GO casting not implemented if (Unit* owner = GetOwner()) @@ -511,7 +513,7 @@ void GameObject::Update(uint32 diff) else { // Environmental trap: Any player - Player* player = NULL; + Player* player = nullptr; Trinity::AnyPlayerInObjectRangeCheck checker(this, radius); Trinity::PlayerSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(this, player, checker); VisitNearbyWorldObject(radius, searcher); @@ -571,8 +573,8 @@ void GameObject::Update(uint32 diff) GameObjectTemplate const* goInfo = GetGOInfo(); if (goInfo->trap.type == 2 && goInfo->trap.spellId) { - /// @todo NULL target won't work for target type 1 - CastSpell(NULL, goInfo->trap.spellId); + /// @todo nullptr target won't work for target type 1 + CastSpell(nullptr, goInfo->trap.spellId); SetLootState(GO_JUST_DEACTIVATED); } else if (Unit* target = ObjectAccessor::GetUnit(*this, m_lootStateUnitGUID)) @@ -780,10 +782,7 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) data.posY = GetPositionY(); data.posZ = GetPositionZ(); data.orientation = GetOrientation(); - data.rotation0 = GetFloatValue(GAMEOBJECT_PARENTROTATION+0); - data.rotation1 = GetFloatValue(GAMEOBJECT_PARENTROTATION+1); - data.rotation2 = GetFloatValue(GAMEOBJECT_PARENTROTATION+2); - data.rotation3 = GetFloatValue(GAMEOBJECT_PARENTROTATION+3); + data.rotation = m_worldRotation; data.spawntimesecs = m_spawnedByDefault ? m_respawnDelayTime : -(int32)m_respawnDelayTime; data.animprogress = GetGoAnimProgress(); data.go_state = GetGoState(); @@ -809,10 +808,10 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask) stmt->setFloat(index++, GetPositionY()); stmt->setFloat(index++, GetPositionZ()); stmt->setFloat(index++, GetOrientation()); - stmt->setFloat(index++, GetFloatValue(GAMEOBJECT_PARENTROTATION)); - stmt->setFloat(index++, GetFloatValue(GAMEOBJECT_PARENTROTATION+1)); - stmt->setFloat(index++, GetFloatValue(GAMEOBJECT_PARENTROTATION+2)); - stmt->setFloat(index++, GetFloatValue(GAMEOBJECT_PARENTROTATION+3)); + stmt->setFloat(index++, m_worldRotation.x); + stmt->setFloat(index++, m_worldRotation.y); + stmt->setFloat(index++, m_worldRotation.z); + stmt->setFloat(index++, m_worldRotation.w); stmt->setInt32(index++, int32(m_respawnDelayTime)); stmt->setUInt8(index++, GetGoAnimProgress()); stmt->setUInt8(index++, uint8(GetGoState())); @@ -834,22 +833,14 @@ bool GameObject::LoadGameObjectFromDB(ObjectGuid::LowType spawnId, Map* map, boo uint32 entry = data->id; //uint32 map_id = data->mapid; // already used before call uint32 phaseMask = data->phaseMask; - float x = data->posX; - float y = data->posY; - float z = data->posZ; - float ang = data->orientation; - - float rotation0 = data->rotation0; - float rotation1 = data->rotation1; - float rotation2 = data->rotation2; - float rotation3 = data->rotation3; + Position pos(data->posX, data->posY, data->posZ, data->orientation); uint32 animprogress = data->animprogress; GOState go_state = data->go_state; uint32 artKit = data->artKit; m_spawnId = spawnId; - if (!Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, map, phaseMask, x, y, z, ang, rotation0, rotation1, rotation2, rotation3, animprogress, go_state, artKit)) + if (!Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, map, phaseMask, pos, data->rotation, animprogress, go_state, artKit)) return false; if (data->spawntimesecs >= 0) @@ -868,7 +859,7 @@ bool GameObject::LoadGameObjectFromDB(ObjectGuid::LowType spawnId, Map* map, boo m_respawnTime = GetMap()->GetGORespawnTime(m_spawnId); // ready to respawn - if (m_respawnTime && m_respawnTime <= time(NULL)) + if (m_respawnTime && m_respawnTime <= time(nullptr)) { m_respawnTime = 0; GetMap()->RemoveGORespawnTime(m_spawnId); @@ -1093,7 +1084,7 @@ void GameObject::TriggeringLinkedGameObject(uint32 trapEntry, Unit* target) float range = float(target->GetSpellMaxRangeForTarget(GetOwner(), trapSpell)); // search nearest linked GO - GameObject* trapGO = NULL; + GameObject* trapGO = nullptr; { // using original GO distance CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY())); @@ -1113,7 +1104,7 @@ void GameObject::TriggeringLinkedGameObject(uint32 trapEntry, Unit* target) GameObject* GameObject::LookupFishingHoleAround(float range) { - GameObject* ok = NULL; + GameObject* ok = nullptr; CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY())); Cell cell(p); @@ -1136,7 +1127,7 @@ void GameObject::ResetDoorOrButton() m_cooldownTime = 0; } -void GameObject::UseDoorOrButton(uint32 time_to_restore, bool alternative /* = false */, Unit* user /*=NULL*/) +void GameObject::UseDoorOrButton(uint32 time_to_restore, bool alternative /* = false */, Unit* user /*=nullptr*/) { if (m_lootState != GO_READY) return; @@ -1160,7 +1151,7 @@ void GameObject::SetGoArtKit(uint8 kit) void GameObject::SetGoArtKit(uint8 artkit, GameObject* go, ObjectGuid::LowType lowguid) { - const GameObjectData* data = NULL; + const GameObjectData* data = nullptr; if (go) { go->SetGoArtKit(artkit); @@ -1386,7 +1377,7 @@ void GameObject::Use(Unit* user) // cast this spell later if provided spellId = info->goober.spellId; - spellCaster = NULL; + spellCaster = nullptr; break; } @@ -1453,11 +1444,11 @@ void GameObject::Use(Unit* user) TC_LOG_DEBUG("misc", "Fishing check (skill: %i zone min skill: %i chance %i roll: %i", skill, zone_skill, chance, roll); - // but you will likely cause junk in areas that require a high fishing skill (not yet implemented) + player->UpdateFishingSkill(); + + // but you will likely cause junk in areas that require a high fishing skill if (chance >= roll) { - player->UpdateFishingSkill(); - /// @todo I do not understand this hack. Need some explanation. // prevent removing GO at spell cancel RemoveFromOwner(); @@ -1505,7 +1496,7 @@ void GameObject::Use(Unit* user) GameObjectTemplate const* info = GetGOInfo(); - Player* m_ritualOwner = NULL; + Player* m_ritualOwner = nullptr; if (m_ritualOwnerGUID) m_ritualOwner = ObjectAccessor::FindPlayer(m_ritualOwnerGUID); @@ -1869,7 +1860,7 @@ bool GameObject::IsInRange(float x, float y, float z, float radius) const && dz < info->maxZ + radius && dz > info->minZ - radius; } -void GameObject::EventInform(uint32 eventId, WorldObject* invoker /*= NULL*/) +void GameObject::EventInform(uint32 eventId, WorldObject* invoker /*= nullptr*/) { if (!eventId) return; @@ -1899,37 +1890,41 @@ std::string const & GameObject::GetNameForLocaleIdx(LocaleConstant loc_idx) cons return GetName(); } -void GameObject::UpdateRotationFields(float rotation2 /*=0.0f*/, float rotation3 /*=0.0f*/) +void GameObject::UpdatePackedRotation() { - static double const atan_pow = atan(pow(2.0f, -20.0f)); - - double f_rot1 = std::sin(GetOrientation() / 2.0f); - double f_rot2 = std::cos(GetOrientation() / 2.0f); + static const int32 PACK_YZ = 1 << 20; + static const int32 PACK_X = PACK_YZ << 1; - int64 i_rot1 = int64(f_rot1 / atan_pow *(f_rot2 >= 0 ? 1.0f : -1.0f)); - int64 rotation = (i_rot1 << 43 >> 43) & 0x00000000001FFFFF; + static const int32 PACK_YZ_MASK = (PACK_YZ << 1) - 1; + static const int32 PACK_X_MASK = (PACK_X << 1) - 1; - //float f_rot2 = std::sin(0.0f / 2.0f); - //int64 i_rot2 = f_rot2 / atan(pow(2.0f, -20.0f)); - //rotation |= (((i_rot2 << 22) >> 32) >> 11) & 0x000003FFFFE00000; - - //float f_rot3 = std::sin(0.0f / 2.0f); - //int64 i_rot3 = f_rot3 / atan(pow(2.0f, -21.0f)); - //rotation |= (i_rot3 >> 42) & 0x7FFFFC0000000000; + int8 w_sign = (m_worldRotation.w >= 0.f ? 1 : -1); + int64 x = int32(m_worldRotation.x * PACK_X) * w_sign & PACK_X_MASK; + int64 y = int32(m_worldRotation.y * PACK_YZ) * w_sign & PACK_YZ_MASK; + int64 z = int32(m_worldRotation.z * PACK_YZ) * w_sign & PACK_YZ_MASK; + m_packedRotation = z | (y << 21) | (x << 42); +} - m_rotation = rotation; +void GameObject::SetWorldRotation(G3D::Quat const& rot) +{ + m_worldRotation = rot.toUnit(); + UpdatePackedRotation(); +} - if (rotation2 == 0.0f && rotation3 == 0.0f) - { - rotation2 = (float)f_rot1; - rotation3 = (float)f_rot2; - } +void GameObject::SetParentRotation(G3D::Quat const& rotation) +{ + SetFloatValue(GAMEOBJECT_PARENTROTATION + 0, rotation.x); + SetFloatValue(GAMEOBJECT_PARENTROTATION + 1, rotation.y); + SetFloatValue(GAMEOBJECT_PARENTROTATION + 2, rotation.z); + SetFloatValue(GAMEOBJECT_PARENTROTATION + 3, rotation.w); +} - SetFloatValue(GAMEOBJECT_PARENTROTATION+2, rotation2); - SetFloatValue(GAMEOBJECT_PARENTROTATION+3, rotation3); +void GameObject::SetWorldRotationAngles(float z_rot, float y_rot, float x_rot) +{ + SetWorldRotation(G3D::Quat(G3D::Matrix3::fromEulerAnglesZYX(z_rot, y_rot, x_rot))); } -void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= NULL*/, uint32 spellId /*= 0*/) +void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= nullptr*/, uint32 spellId /*= 0*/) { if (!m_goValue.Building.MaxHealth || !change) return; @@ -1948,7 +1943,7 @@ void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= NULL*/, u // Set the health bar, value = 255 * healthPct; SetGoAnimProgress(m_goValue.Building.Health * 255 / m_goValue.Building.MaxHealth); - Player* player = attackerOrHealer ? attackerOrHealer->GetCharmerOrOwnerPlayerOrPlayerItself() : NULL; + Player* player = attackerOrHealer ? attackerOrHealer->GetCharmerOrOwnerPlayerOrPlayerItself() : nullptr; // dealing damage, send packet if (player) @@ -1979,7 +1974,7 @@ void GameObject::ModifyHealth(int32 change, Unit* attackerOrHealer /*= NULL*/, u SetDestructibleState(newState, player, false); } -void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* eventInvoker /*= NULL*/, bool setHealth /*= false*/) +void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* eventInvoker /*= nullptr*/, bool setHealth /*= false*/) { // the user calling this must know he is already operating on destructible gameobject ASSERT(GetGoType() == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING); @@ -2004,7 +1999,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED); SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED); - uint32 modelId = m_goInfo->building.damagedDisplayId; + uint32 modelId = m_goInfo->displayId; if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData)) if (modelData->DamagedDisplayId) modelId = modelData->DamagedDisplayId; @@ -2032,7 +2027,7 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED); SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED); - uint32 modelId = m_goInfo->building.destroyedDisplayId; + uint32 modelId = m_goInfo->displayId; if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->building.destructibleData)) if (modelData->DestroyedDisplayId) modelId = modelData->DestroyedDisplayId; @@ -2161,14 +2156,14 @@ void GameObject::UpdateModel() Player* GameObject::GetLootRecipient() const { if (!m_lootRecipient) - return NULL; + return nullptr; return ObjectAccessor::FindConnectedPlayer(m_lootRecipient); } Group* GameObject::GetLootRecipientGroup() const { if (!m_lootRecipientGroup) - return NULL; + return nullptr; return sGroupMgr->GetGroupByGUID(m_lootRecipientGroup); } @@ -2176,7 +2171,7 @@ void GameObject::SetLootRecipient(Unit* unit) { // set the player whose group should receive the right // to loot the creature after it dies - // should be set to NULL after the loot disappears + // should be set to nullptr after the loot disappears if (!unit) { @@ -2295,7 +2290,7 @@ void GameObject::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* t data->append(fieldBuffer); } -void GameObject::GetRespawnPosition(float &x, float &y, float &z, float* ori /* = NULL*/) const +void GameObject::GetRespawnPosition(float &x, float &y, float &z, float* ori /* = nullptr*/) const { if (m_spawnId) { diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index 2b092427178..a271512629b 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -25,6 +25,7 @@ #include "Object.h" #include "LootMgr.h" #include "DatabaseEnv.h" +#include <G3D/Quat.h> class GameObjectAI; class Group; @@ -57,6 +58,7 @@ struct GameObjectTemplate uint32 openTextID; //4 can be used to replace castBarCaption? uint32 closeTextID; //5 uint32 ignoredByPathing; //6 + uint32 conditionID1; //7 } door; //1 GAMEOBJECT_TYPE_BUTTON struct @@ -70,6 +72,7 @@ struct GameObjectTemplate uint32 openTextID; //6 can be used to replace castBarCaption? uint32 closeTextID; //7 uint32 losOK; //8 + uint32 conditionID1; //9 } button; //2 GAMEOBJECT_TYPE_QUESTGIVER struct @@ -84,6 +87,7 @@ struct GameObjectTemplate uint32 losOK; //7 uint32 allowMounted; //8 Is usable while on mount/vehicle. (0/1) uint32 large; //9 + uint32 conditionID1; //10 } questgiver; //3 GAMEOBJECT_TYPE_CHEST struct @@ -105,6 +109,7 @@ struct GameObjectTemplate uint32 openTextID; //14 can be used to replace castBarCaption? uint32 groupLootRules; //15 uint32 floatingTooltip; //16 + uint32 conditionID1; //17 } chest; //4 GAMEOBJECT_TYPE_BINDER - empty //5 GAMEOBJECT_TYPE_GENERIC @@ -116,6 +121,7 @@ struct GameObjectTemplate uint32 large; //3 uint32 floatOnWater; //4 int32 questID; //5 + uint32 conditionID1; //6 } _generic; //6 GAMEOBJECT_TYPE_TRAP struct @@ -135,6 +141,7 @@ struct GameObjectTemplate uint32 openTextID; //12 can be used to replace castBarCaption? uint32 closeTextID; //13 uint32 ignoreTotems; //14 + uint32 conditionID1; //15 } trap; //7 GAMEOBJECT_TYPE_CHAIR struct @@ -143,6 +150,7 @@ struct GameObjectTemplate uint32 height; //1 uint32 onlyCreatorUse; //2 uint32 triggeredEvent; //3 + uint32 conditionID1; //4 } chair; //8 GAMEOBJECT_TYPE_SPELL_FOCUS struct @@ -154,6 +162,8 @@ struct GameObjectTemplate uint32 questID; //4 uint32 large; //5 uint32 floatingTooltip; //6 + uint32 floatOnWater; //7 + uint32 conditionID1; //8 } spellFocus; //9 GAMEOBJECT_TYPE_TEXT struct @@ -162,6 +172,7 @@ struct GameObjectTemplate uint32 language; //1 uint32 pageMaterial; //2 uint32 allowMounted; //3 Is usable while on mount/vehicle. (0/1) + uint32 conditionID1; //4 } text; //10 GAMEOBJECT_TYPE_GOOBER struct @@ -187,6 +198,8 @@ struct GameObjectTemplate uint32 floatingTooltip; //18 uint32 gossipID; //19 uint32 WorldStateSetsState; //20 + uint32 floatOnWater; //21 + uint32 conditionID1; //22 } goober; //11 GAMEOBJECT_TYPE_TRANSPORT struct @@ -196,6 +209,7 @@ struct GameObjectTemplate uint32 autoCloseTime; //2 secs till autoclose = autoCloseTime / 0x10000 uint32 pause1EventID; //3 uint32 pause2EventID; //4 + uint32 mapID; //5 } transport; //12 GAMEOBJECT_TYPE_AREADAMAGE struct @@ -216,6 +230,7 @@ struct GameObjectTemplate uint32 cinematicId; //1 uint32 eventID; //2 uint32 openTextID; //3 can be used to replace castBarCaption? + uint32 conditionID1; //4 } camera; //14 GAMEOBJECT_TYPE_MAPOBJECT - empty //15 GAMEOBJECT_TYPE_MO_TRANSPORT @@ -244,9 +259,14 @@ struct GameObjectTemplate uint32 casterTargetSpellTargets; //5 uint32 castersGrouped; //6 uint32 ritualNoTargetCheck; //7 + uint32 conditionID1; //8 } summoningRitual; - //19 GAMEOBJECT_TYPE_MAILBOX - empty - //20 GAMEOBJECT_TYPE_DONOTUSE - empty + //19 GAMEOBJECT_TYPE_MAILBOX + struct + { + uint32 conditionID1; //0 + } mailbox; + //20 GAMEOBJECT_TYPE_DO_NOT_USE - empty //21 GAMEOBJECT_TYPE_GUARDPOST struct { @@ -261,6 +281,7 @@ struct GameObjectTemplate uint32 partyOnly; //2 uint32 allowMounted; //3 Is usable while on mount/vehicle. (0/1) uint32 large; //4 + uint32 conditionID1; //5 } spellcaster; //23 GAMEOBJECT_TYPE_MEETINGSTONE struct @@ -280,6 +301,7 @@ struct GameObjectTemplate uint32 noDamageImmune; //5 uint32 openTextID; //6 uint32 losOK; //7 + uint32 conditionID1; //8 } flagstand; //25 GAMEOBJECT_TYPE_FISHINGHOLE struct @@ -358,21 +380,21 @@ struct GameObjectTemplate { uint32 intactNumHits; //0 uint32 creditProxyCreature; //1 - uint32 state1Name; //2 + uint32 empty1; //2 uint32 intactEvent; //3 - uint32 damagedDisplayId; //4 + uint32 empty2; //4 uint32 damagedNumHits; //5 uint32 empty3; //6 uint32 empty4; //7 uint32 empty5; //8 uint32 damagedEvent; //9 - uint32 destroyedDisplayId; //10 + uint32 empty6; //10 uint32 empty7; //11 uint32 empty8; //12 uint32 empty9; //13 uint32 destroyedEvent; //14 uint32 empty10; //15 - uint32 debuildingTimeSecs; //16 + uint32 rebuildingTimeSecs; //16 uint32 empty11; //17 uint32 destructibleData; //18 uint32 rebuildingEvent; //19 @@ -381,7 +403,11 @@ struct GameObjectTemplate uint32 damageEvent; //22 uint32 empty14; //23 } building; - //34 GAMEOBJECT_TYPE_GUILDBANK - empty + //34 GAMEOBJECT_TYPE_GUILDBANK + struct + { + uint32 conditionID1; //0 + } guildbank; //35 GAMEOBJECT_TYPE_TRAPDOOR struct { @@ -578,6 +604,7 @@ struct GameObjectLocale // `gameobject_addon` table struct GameObjectAddon { + G3D::Quat ParentRotation; InvisibilityType invisibilityType; uint32 InvisibilityValue; }; @@ -597,8 +624,7 @@ enum GOState // from `gameobject` struct GameObjectData { - explicit GameObjectData() : id(0), mapid(0), phaseMask(0), posX(0.0f), posY(0.0f), posZ(0.0f), orientation(0.0f), - rotation0(0.0f), rotation1(0.0f), rotation2(0.0f), rotation3(0.0f), spawntimesecs(0), + explicit GameObjectData() : id(0), mapid(0), phaseMask(0), posX(0.0f), posY(0.0f), posZ(0.0f), orientation(0.0f), spawntimesecs(0), animprogress(0), go_state(GO_STATE_ACTIVE), spawnMask(0), artKit(0), dbData(true) { } uint32 id; // entry in gamobject_template uint16 mapid; @@ -607,10 +633,7 @@ struct GameObjectData float posY; float posZ; float orientation; - float rotation0; - float rotation1; - float rotation2; - float rotation3; + G3D::Quat rotation; int32 spawntimesecs; uint32 animprogress; GOState go_state; @@ -652,7 +675,7 @@ class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject> void RemoveFromWorld() override; void CleanupsBeforeDelete(bool finalCleanup = true) override; - bool Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit = 0); + bool Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, uint32 phaseMask, Position const& pos, G3D::Quat const& rotation, uint32 animprogress, GOState go_state, uint32 artKit = 0); void Update(uint32 p_time) override; GameObjectTemplate const* GetGOInfo() const { return m_goInfo; } GameObjectData const* GetGOData() const { return m_goData; } @@ -664,7 +687,11 @@ class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject> ObjectGuid::LowType GetSpawnId() const { return m_spawnId; } - void UpdateRotationFields(float rotation2 = 0.0f, float rotation3 = 0.0f); + // z_rot, y_rot, x_rot - rotation angles around z, y and x axes + void SetWorldRotationAngles(float z_rot, float y_rot, float x_rot); + void SetWorldRotation(G3D::Quat const& rot); + void SetParentRotation(G3D::Quat const& rotation); // transforms(rotates) transport's path + int64 GetPackedWorldRotation() const { return m_packedRotation; } // overwrite WorldObject function for proper name localization std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const override; @@ -822,7 +849,6 @@ class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject> void EventInform(uint32 eventId, WorldObject* invoker = NULL); - uint64 GetRotation() const { return m_rotation; } virtual uint32 GetScriptId() const { return GetGOInfo()->ScriptId; } GameObjectAI* AI() const { return m_AI; } @@ -877,7 +903,8 @@ class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject> GameObjectData const* m_goData; GameObjectValue m_goValue; - uint64 m_rotation; + int64 m_packedRotation; + G3D::Quat m_worldRotation; Position m_stationaryPosition; ObjectGuid m_lootRecipient; @@ -886,6 +913,7 @@ class TC_GAME_API GameObject : public WorldObject, public GridObject<GameObject> private: void RemoveFromOwner(); void SwitchDoorOrButton(bool activate, bool alternative = false); + void UpdatePackedRotation(); //! Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size. bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/) const override diff --git a/src/server/game/Entities/Item/Container/Bag.h b/src/server/game/Entities/Item/Container/Bag.h index 89615f94e52..8f84dc3e5b3 100644 --- a/src/server/game/Entities/Item/Container/Bag.h +++ b/src/server/game/Entities/Item/Container/Bag.h @@ -23,7 +23,7 @@ #define MAX_BAG_SIZE 36 // 2.0.12 #include "Item.h" -#include "ItemPrototype.h" +#include "ItemTemplate.h" class TC_GAME_API Bag : public Item { diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h index 8658200c28c..5e00a816cab 100644 --- a/src/server/game/Entities/Item/Item.h +++ b/src/server/game/Entities/Item/Item.h @@ -22,7 +22,7 @@ #include "Common.h" #include "Object.h" #include "LootMgr.h" -#include "ItemPrototype.h" +#include "ItemTemplate.h" #include "DatabaseEnv.h" class SpellInfo; diff --git a/src/server/game/Entities/Item/ItemPrototype.cpp b/src/server/game/Entities/Item/ItemTemplate.cpp index 3bb7b128b08..1a8bc2291ae 100644 --- a/src/server/game/Entities/Item/ItemPrototype.cpp +++ b/src/server/game/Entities/Item/ItemTemplate.cpp @@ -15,23 +15,23 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ItemPrototype.h" +#include "ItemTemplate.h" bool ItemTemplate::CanChangeEquipStateInCombat() const { switch (InventoryType) { - case INVTYPE_RELIC: - case INVTYPE_SHIELD: - case INVTYPE_HOLDABLE: - return true; + case INVTYPE_RELIC: + case INVTYPE_SHIELD: + case INVTYPE_HOLDABLE: + return true; } switch (Class) { - case ITEM_CLASS_WEAPON: - case ITEM_CLASS_PROJECTILE: - return true; + case ITEM_CLASS_WEAPON: + case ITEM_CLASS_PROJECTILE: + return true; } return false; @@ -40,82 +40,85 @@ bool ItemTemplate::CanChangeEquipStateInCombat() const float ItemTemplate::getDPS() const { - if (Delay == 0) - return 0; - float temp = 0; - for (int i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i) + if (!Delay) + return 0.f; + + float temp = 0.f; + for (uint8 i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i) temp += Damage[i].DamageMin + Damage[i].DamageMax; - return temp * 500 / Delay; -} + return temp * 500.f / Delay; +} int32 ItemTemplate::getFeralBonus(int32 extraDPS /*= 0*/) const { // 0x02A5F3 - is mask for Melee weapon from ItemSubClassMask.dbc if (Class == ITEM_CLASS_WEAPON && (1 << SubClass) & 0x02A5F3) { - int32 bonus = int32((extraDPS + getDPS())*14.0f) - 767; + int32 bonus = int32((extraDPS + getDPS()) * 14.0f) - 767; if (bonus < 0) return 0; return bonus; } + return 0; } float ItemTemplate::GetItemLevelIncludingQuality() const { - float itemLevel = (float)ItemLevel; + float itemLevel(ItemLevel); switch (Quality) { - case ITEM_QUALITY_POOR: - case ITEM_QUALITY_NORMAL: - case ITEM_QUALITY_UNCOMMON: - case ITEM_QUALITY_ARTIFACT: - case ITEM_QUALITY_HEIRLOOM: - itemLevel -= 13; // leaving this as a separate statement since we do not know the real behavior in this case - break; - case ITEM_QUALITY_RARE: - itemLevel -= 13; - break; - case ITEM_QUALITY_EPIC: - case ITEM_QUALITY_LEGENDARY: - default: - break; + case ITEM_QUALITY_POOR: + case ITEM_QUALITY_NORMAL: + case ITEM_QUALITY_UNCOMMON: + case ITEM_QUALITY_ARTIFACT: + case ITEM_QUALITY_HEIRLOOM: + itemLevel -= 13.f; // leaving this as a separate statement since we do not know the real behavior in this case + break; + case ITEM_QUALITY_RARE: + itemLevel -= 13.f; + break; + case ITEM_QUALITY_EPIC: + case ITEM_QUALITY_LEGENDARY: + default: + break; } + return std::max<float>(0.f, itemLevel); } uint32 ItemTemplate::GetSkill() const { - const static uint32 item_weapon_skills[MAX_ITEM_SUBCLASS_WEAPON] = + static uint32 const itemWeaponSkills[MAX_ITEM_SUBCLASS_WEAPON] = { - SKILL_AXES, SKILL_2H_AXES, SKILL_BOWS, SKILL_GUNS, SKILL_MACES, - SKILL_2H_MACES, SKILL_POLEARMS, SKILL_SWORDS, SKILL_2H_SWORDS, 0, - SKILL_STAVES, 0, 0, SKILL_FIST_WEAPONS, 0, - SKILL_DAGGERS, SKILL_THROWN, SKILL_ASSASSINATION, SKILL_CROSSBOWS, SKILL_WANDS, + SKILL_AXES, SKILL_2H_AXES, SKILL_BOWS, SKILL_GUNS, SKILL_MACES, + SKILL_2H_MACES, SKILL_POLEARMS, SKILL_SWORDS, SKILL_2H_SWORDS, 0, + SKILL_STAVES, 0, 0, SKILL_FIST_WEAPONS, 0, + SKILL_DAGGERS, SKILL_THROWN, SKILL_ASSASSINATION, SKILL_CROSSBOWS, SKILL_WANDS, SKILL_FISHING }; - const static uint32 item_armor_skills[MAX_ITEM_SUBCLASS_ARMOR] = + static uint32 const itemArmorSkills[MAX_ITEM_SUBCLASS_ARMOR] = { 0, SKILL_CLOTH, SKILL_LEATHER, SKILL_MAIL, SKILL_PLATE_MAIL, 0, SKILL_SHIELD, 0, 0, 0, 0 }; switch (Class) { - case ITEM_CLASS_WEAPON: - if (SubClass >= MAX_ITEM_SUBCLASS_WEAPON) - return 0; - else - return item_weapon_skills[SubClass]; + case ITEM_CLASS_WEAPON: + if (SubClass >= MAX_ITEM_SUBCLASS_WEAPON) + return 0; + else + return itemWeaponSkills[SubClass]; - case ITEM_CLASS_ARMOR: - if (SubClass >= MAX_ITEM_SUBCLASS_ARMOR) - return 0; - else - return item_armor_skills[SubClass]; + case ITEM_CLASS_ARMOR: + if (SubClass >= MAX_ITEM_SUBCLASS_ARMOR) + return 0; + else + return itemArmorSkills[SubClass]; - default: - return 0; + default: + return 0; } } diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemTemplate.h index 9b0f4628364..0ff3f00a08b 100644 --- a/src/server/game/Entities/Item/ItemPrototype.h +++ b/src/server/game/Entities/Item/ItemTemplate.h @@ -107,20 +107,20 @@ enum ItemBondingType enum ItemProtoFlags { - ITEM_PROTO_FLAG_UNK1 = 0x00000001, // ? + ITEM_PROTO_FLAG_NO_PICKUP = 0x00000001, // ? ITEM_PROTO_FLAG_CONJURED = 0x00000002, // Conjured item - ITEM_PROTO_FLAG_OPENABLE = 0x00000004, // Item can be right clicked to open for loot + ITEM_PROTO_FLAG_HAS_LOOT = 0x00000004, // Item can be right clicked to open for loot ITEM_PROTO_FLAG_HEROIC = 0x00000008, // Makes green "Heroic" text appear on item ITEM_PROTO_FLAG_DEPRECATED = 0x00000010, // Cannot equip or use ITEM_PROTO_FLAG_INDESTRUCTIBLE = 0x00000020, // Item can not be destroyed, except by using spell (item can be reagent for spell) - ITEM_PROTO_FLAG_UNK2 = 0x00000040, // ? + ITEM_PROTO_FLAG_PLAYER_CAST = 0x00000040, // Item's spells are castable by players ITEM_PROTO_FLAG_NO_EQUIP_COOLDOWN = 0x00000080, // No default 30 seconds cooldown when equipped - ITEM_PROTO_FLAG_UNK3 = 0x00000100, // ? - ITEM_PROTO_FLAG_WRAPPER = 0x00000200, // Item can wrap other items - ITEM_PROTO_FLAG_UNK4 = 0x00000400, // ? - ITEM_PROTO_FLAG_PARTY_LOOT = 0x00000800, // Looting this item does not remove it from available loot + ITEM_PROTO_FLAG_INT_BONUS_INSTEAD = 0x00000100, // ? + ITEM_PROTO_FLAG_IS_WRAPPER = 0x00000200, // Item can wrap other items + ITEM_PROTO_FLAG_USES_RESOURCES = 0x00000400, // ? + ITEM_PROTO_FLAG_MULTI_DROP = 0x00000800, // Looting this item does not remove it from available loot ITEM_PROTO_FLAG_REFUNDABLE = 0x00001000, // Item can be returned to vendor for its original cost (extended cost) - ITEM_PROTO_FLAG_CHARTER = 0x00002000, // Item is guild or arena charter + ITEM_PROTO_FLAG_PETITION = 0x00002000, // Item is guild or arena charter ITEM_PROTO_FLAG_UNK5 = 0x00004000, // Only readable items have this (but not all) ITEM_PROTO_FLAG_UNK6 = 0x00008000, // ? ITEM_PROTO_FLAG_UNK7 = 0x00010000, // ? @@ -537,12 +537,7 @@ inline uint8 ItemSubClassToDurabilityMultiplierId(uint32 ItemClass, uint32 ItemS return 0; } -// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push, N), also any gcc version not support it at some platform -#if defined(__GNUC__) -#pragma pack(1) -#else #pragma pack(push, 1) -#endif struct _Damage { @@ -573,12 +568,7 @@ struct _Socket uint32 Content; }; -// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform -#if defined(__GNUC__) -#pragma pack() -#else #pragma pack(pop) -#endif #define MAX_ITEM_PROTO_DAMAGES 2 // changed in 3.1.0 #define MAX_ITEM_PROTO_SOCKETS 3 diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index a2f519a681c..20b88c5e3a9 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -480,7 +480,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const // 0x200 if (flags & UPDATEFLAG_ROTATION) - *data << int64(ToGameObject()->GetRotation()); + *data << int64(ToGameObject()->GetPackedWorldRotation()); } void Object::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target) const @@ -1154,9 +1154,13 @@ bool WorldObject::IsWithinLOSInMap(const WorldObject* obj) const if (!IsInMap(obj)) return false; - float ox, oy, oz; - obj->GetPosition(ox, oy, oz); - return IsWithinLOS(ox, oy, oz); + float x, y, z; + if (obj->GetTypeId() == TYPEID_PLAYER) + obj->GetPosition(x, y, z); + else + obj->GetHitSpherePointFor(GetPosition(), x, y, z); + + return IsWithinLOS(x, y, z); } float WorldObject::GetDistance(const WorldObject* obj) const @@ -1240,11 +1244,36 @@ bool WorldObject::IsWithinLOS(float ox, float oy, float oz) const VMAP::IVMapManager* vMapManager = VMAP::VMapFactory::createOrGetVMapManager(); return vMapManager->isInLineOfSight(GetMapId(), x, y, z+2.0f, ox, oy, oz+2.0f);*/ if (IsInWorld()) - return GetMap()->isInLineOfSight(GetPositionX(), GetPositionY(), GetPositionZ()+2.f, ox, oy, oz+2.f, GetPhaseMask()); + { + float x, y, z; + if (GetTypeId() == TYPEID_PLAYER) + GetPosition(x, y, z); + else + GetHitSpherePointFor({ ox, oy, oz }, x, y, z); + + return GetMap()->isInLineOfSight(x, y, z + 2.0f, ox, oy, oz + 2.0f, GetPhaseMask()); + } return true; } +Position WorldObject::GetHitSpherePointFor(Position const& dest) const +{ + G3D::Vector3 vThis(GetPositionX(), GetPositionY(), GetPositionZ()); + G3D::Vector3 vObj(dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ()); + G3D::Vector3 contactPoint = vThis + (vObj - vThis).directionOrZero() * GetObjectSize(); + + return Position(contactPoint.x, contactPoint.y, contactPoint.z, GetAngle(contactPoint.x, contactPoint.y)); +} + +void WorldObject::GetHitSpherePointFor(Position const& dest, float& x, float& y, float& z) const +{ + Position pos = GetHitSpherePointFor(dest); + x = pos.GetPositionX(); + y = pos.GetPositionY(); + z = pos.GetPositionZ(); +} + bool WorldObject::GetDistanceOrder(WorldObject const* obj1, WorldObject const* obj2, bool is3D /* = true */) const { float dx1 = GetPositionX() - obj1->GetPositionX(); @@ -1374,7 +1403,8 @@ void WorldObject::GetRandomPoint(const Position &pos, float distance, float &ran // angle to face `obj` to `this` float angle = (float)rand_norm()*static_cast<float>(2*M_PI); - float new_dist = (float)rand_norm()*static_cast<float>(distance); + float new_dist = (float)rand_norm() + (float)rand_norm(); + new_dist = distance * (new_dist > 1 ? new_dist - 2 : new_dist); rand_x = pos.m_positionX + new_dist * std::cos(angle); rand_y = pos.m_positionY + new_dist * std::sin(angle); @@ -1416,7 +1446,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const bool canSwim = ToCreature()->CanSwim(); float ground_z = z; float max_z = canSwim - ? GetMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK)) + ? GetMap()->GetWaterOrGroundLevel(GetPhaseMask(), x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK)) : ((ground_z = GetMap()->GetHeight(GetPhaseMask(), x, y, z, true))); if (max_z > INVALID_HEIGHT) { @@ -1440,7 +1470,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const if (!ToPlayer()->CanFly()) { float ground_z = z; - float max_z = GetMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK)); + float max_z = GetMap()->GetWaterOrGroundLevel(GetPhaseMask(), x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK)); if (max_z > INVALID_HEIGHT) { if (z > max_z) @@ -1951,7 +1981,7 @@ void WorldObject::ClearZoneScript() m_zoneScript = NULL; } -TempSummon* WorldObject::SummonCreature(uint32 entry, const Position &pos, TempSummonType spwtype, uint32 duration, uint32 /*vehId*/) const +TempSummon* WorldObject::SummonCreature(uint32 entry, Position const& pos, TempSummonType spwtype /*= TEMPSUMMON_MANUAL_DESPAWN*/, uint32 duration /*= 0*/, uint32 /*vehId = 0*/) const { if (Map* map = FindMap()) { @@ -1962,7 +1992,7 @@ TempSummon* WorldObject::SummonCreature(uint32 entry, const Position &pos, TempS } } - return NULL; + return nullptr; } TempSummon* WorldObject::SummonCreature(uint32 id, float x, float y, float z, float ang /*= 0*/, TempSummonType spwtype /*= TEMPSUMMON_MANUAL_DESPAWN*/, uint32 despwtime /*= 0*/) const @@ -1972,29 +2002,30 @@ TempSummon* WorldObject::SummonCreature(uint32 id, float x, float y, float z, fl GetClosePoint(x, y, z, GetObjectSize()); ang = GetOrientation(); } + Position pos; pos.Relocate(x, y, z, ang); return SummonCreature(id, pos, spwtype, despwtime, 0); } -GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime) +GameObject* WorldObject::SummonGameObject(uint32 entry, Position const& pos, G3D::Quat const& rot, uint32 respawnTime) { if (!IsInWorld()) - return NULL; + return nullptr; GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry); if (!goinfo) { TC_LOG_ERROR("sql.sql", "Gameobject template %u not found in database!", entry); - return NULL; + return nullptr; } Map* map = GetMap(); GameObject* go = new GameObject(); - if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, map, GetPhaseMask(), x, y, z, ang, rotation0, rotation1, rotation2, rotation3, 100, GO_STATE_READY)) + if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, map, GetPhaseMask(), pos, rot, 255, GO_STATE_READY)) { delete go; - return NULL; + return nullptr; } go->SetRespawnTime(respawnTime); @@ -2007,6 +2038,18 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float return go; } +GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float z, float ang, G3D::Quat const& rot, uint32 respawnTime) +{ + if (!x && !y && !z) + { + GetClosePoint(x, y, z, GetObjectSize()); + ang = GetOrientation(); + } + + Position pos(x, y, z, ang); + return SummonGameObject(entry, pos, rot, respawnTime); +} + Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, uint32 duration, CreatureAI* (*GetAI)(Creature*)) { TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; @@ -2038,7 +2081,10 @@ void WorldObject::SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list std::vector<TempSummonData> const* data = sObjectMgr->GetSummonGroup(GetEntry(), GetTypeId() == TYPEID_GAMEOBJECT ? SUMMONER_TYPE_GAMEOBJECT : SUMMONER_TYPE_CREATURE, group); if (!data) + { + TC_LOG_WARN("scripts", "%s (%s) tried to summon non-existing summon group %u.", GetName().c_str(), GetGUID().ToString().c_str(), group); return; + } for (std::vector<TempSummonData>::const_iterator itr = data->begin(); itr != data->end(); ++itr) if (TempSummon* summon = SummonCreature(itr->entry, itr->pos, itr->type, itr->time)) diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index f406b354293..87b158ab81a 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -488,6 +488,8 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation bool IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D = true) const; bool IsWithinLOS(float x, float y, float z) const; bool IsWithinLOSInMap(WorldObject const* obj) const; + Position GetHitSpherePointFor(Position const& dest) const; + void GetHitSpherePointFor(Position const& dest, float& x, float& y, float& z) const; bool GetDistanceOrder(WorldObject const* obj1, WorldObject const* obj2, bool is3D = true) const; bool IsInRange(WorldObject const* obj, float minRange, float maxRange, bool is3D = true) const; bool IsInRange2d(float x, float y, float minRange, float maxRange) const; @@ -540,9 +542,10 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation void ClearZoneScript(); ZoneScript* GetZoneScript() const { return m_zoneScript; } - TempSummon* SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0, uint32 vehId = 0) const; + TempSummon* SummonCreature(uint32 id, Position const& pos, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0, uint32 vehId = 0) const; TempSummon* SummonCreature(uint32 id, float x, float y, float z, float ang = 0, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0) const; - GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime /* s */); + GameObject* SummonGameObject(uint32 entry, Position const& pos, G3D::Quat const& rot, uint32 respawnTime /* s */); + GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, G3D::Quat const& rot, uint32 respawnTime /* s */); Creature* SummonTrigger(float x, float y, float z, float ang, uint32 dur, CreatureAI* (*GetAI)(Creature*) = NULL); void SummonCreatureGroup(uint8 group, std::list<TempSummon*>* list = NULL); @@ -550,8 +553,8 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation GameObject* FindNearestGameObject(uint32 entry, float range) const; GameObject* FindNearestGameObjectOfType(GameobjectTypes type, float range) const; - void GetGameObjectListWithEntryInGrid(std::list<GameObject*>& lList, uint32 uiEntry, float fMaxSearchRange) const; - void GetCreatureListWithEntryInGrid(std::list<Creature*>& lList, uint32 uiEntry, float fMaxSearchRange) const; + void GetGameObjectListWithEntryInGrid(std::list<GameObject*>& lList, uint32 uiEntry = 0, float fMaxSearchRange = 250.0f) const; + void GetCreatureListWithEntryInGrid(std::list<Creature*>& lList, uint32 uiEntry = 0, float fMaxSearchRange = 250.0f) const; void GetPlayerListInGrid(std::list<Player*>& lList, float fMaxSearchRange) const; void DestroyForNearbyPlayers(); diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 37fb23b38f5..482fcb315f2 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -329,6 +329,9 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c _LoadSpellCooldowns(); LearnPetPassives(); InitLevelupSpellsForLevel(); + if (map->IsBattleArena()) + RemoveArenaAuras(); + CastPetAuras(current); } @@ -748,7 +751,7 @@ void Pet::GivePetLevel(uint8 level) if (!level || level == getLevel()) return; - if (getPetType()==HUNTER_PET) + if (getPetType() == HUNTER_PET) { SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0); SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32(sObjectMgr->GetXPForLevel(level)*PET_XP_FACTOR)); diff --git a/src/server/game/Entities/Player/CinematicMgr.cpp b/src/server/game/Entities/Player/CinematicMgr.cpp index 07bf733c9ff..cc5a62300ad 100644 --- a/src/server/game/Entities/Player/CinematicMgr.cpp +++ b/src/server/game/Entities/Player/CinematicMgr.cpp @@ -27,6 +27,7 @@ CinematicMgr::CinematicMgr(Player* playerref) m_cinematicDiff = 0; m_lastCinematicCheck = 0; m_activeCinematicCameraId = 0; + m_cinematicLength = 0; m_cinematicCamera = nullptr; m_remoteSightPosition = Position(0.0f, 0.0f, 0.0f); m_CinematicObject = nullptr; @@ -70,6 +71,8 @@ void CinematicMgr::BeginCinematic() FlyByCameraCollection::const_reverse_iterator camrevitr = m_cinematicCamera->rbegin(); if (camrevitr != m_cinematicCamera->rend()) m_cinematicLength = camrevitr->timeStamp; + else + m_cinematicLength = 0; } } } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9ed101bf52e..bc95ea1107e 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -567,6 +567,7 @@ Player::~Player() delete m_runes; delete m_achievementMgr; delete m_reputationMgr; + delete _cinematicMgr; sWorld->DecreasePlayerCount(); } @@ -1710,7 +1711,7 @@ bool Player::BuildEnumData(PreparedQueryResult result, WorldPacket* data) // Pets info uint32 petDisplayId = 0; uint32 petLevel = 0; - uint32 petFamily = 0; + CreatureFamily petFamily = CREATURE_FAMILY_NONE; // show pet at selection character in character list only for non-ghost character if (result && !(playerFlags & PLAYER_FLAGS_GHOST) && (plrClass == CLASS_WARLOCK || plrClass == CLASS_HUNTER || plrClass == CLASS_DEATH_KNIGHT)) @@ -2418,11 +2419,11 @@ Creature* Player::GetNPCIfCanInteractWith(ObjectGuid const& guid, uint32 npcflag return nullptr; // Deathstate checks - if (!IsAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_GHOST)) + if (!IsAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_GHOST_VISIBLE)) return nullptr; // alive or spirit healer - if (!creature->IsAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_DEAD_INTERACT)) + if (!creature->IsAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_CAN_INTERACT_WHILE_DEAD)) return nullptr; // appropriate npc type @@ -2793,6 +2794,8 @@ void Player::GiveLevel(uint8 level) if (sWorld->getBoolConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when leveling up UpdateSkillsToMaxSkillsForLevel(); + _ApplyAllLevelScaleItemMods(true); + // set current level health and mana/energy to maximum after applying all mods. SetFullHealth(); SetPower(POWER_MANA, GetMaxPower(POWER_MANA)); @@ -2802,8 +2805,6 @@ void Player::GiveLevel(uint8 level) SetPower(POWER_FOCUS, 0); SetPower(POWER_HAPPINESS, 0); - _ApplyAllLevelScaleItemMods(true); - // update level to hunter/summon pet if (Pet* pet = GetPet()) pet->SynchronizeLevelWithOwner(); @@ -2996,7 +2997,7 @@ void Player::InitStatsForLevel(bool reapplyMods) // cleanup unit flags (will be re-applied if need at aura load). RemoveFlag(UNIT_FIELD_FLAGS, - UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_ATTACKABLE_1 | + UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_LOOTING | UNIT_FLAG_PET_IN_COMBAT | UNIT_FLAG_SILENCED | UNIT_FLAG_PACIFIED | UNIT_FLAG_STUNNED | UNIT_FLAG_IN_COMBAT | UNIT_FLAG_DISARMED | @@ -3201,10 +3202,9 @@ bool Player::AddTalent(uint32 spellId, uint8 spec, bool learning) } } - PlayerSpellState state = learning ? PLAYERSPELL_NEW : PLAYERSPELL_UNCHANGED; PlayerTalent* newtalent = new PlayerTalent(); - newtalent->state = state; + newtalent->state = learning ? PLAYERSPELL_NEW : PLAYERSPELL_UNCHANGED; newtalent->spec = spec; (*m_talents[spec])[spellId] = newtalent; @@ -4211,7 +4211,7 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe // close player ticket if any GmTicket* ticket = sTicketMgr->GetTicketByPlayer(playerguid); if (ticket) - ticket->SetClosedBy(playerguid); + sTicketMgr->CloseTicket(ticket->GetId(), playerguid); // remove from arena teams LeaveAllArenaTeams(playerguid); @@ -4940,6 +4940,9 @@ void Player::DurabilityPointsLossAll(int32 points, bool inventory) void Player::DurabilityPointsLoss(Item* item, int32 points) { + if (HasAuraType(SPELL_AURA_PREVENT_DURABILITY_LOSS)) + return; + int32 pMaxDurability = item->GetUInt32Value(ITEM_FIELD_MAXDURABILITY); int32 pOldDurability = item->GetUInt32Value(ITEM_FIELD_DURABILITY); int32 pNewDurability = pOldDurability - points; @@ -5173,71 +5176,67 @@ void Player::UpdateLocalChannels(uint32 newZone) return; std::string current_zone_name = current_zone->area_name[GetSession()->GetSessionDbcLocale()]; - for (uint32 i = 0; i < sChatChannelsStore.GetNumRows(); ++i) { - if (ChatChannelsEntry const* channel = sChatChannelsStore.LookupEntry(i)) - { - Channel* usedChannel = nullptr; + ChatChannelsEntry const* channelEntry = sChatChannelsStore.LookupEntry(i); + if (!channelEntry) + continue; - for (JoinedChannelsList::iterator itr = m_channels.begin(); itr != m_channels.end(); ++itr) + Channel* usedChannel = nullptr; + for (Channel* channel : m_channels) + { + if (channel->GetChannelId() == i) { - if ((*itr)->GetChannelId() == i) - { - usedChannel = *itr; - break; - } + usedChannel = channel; + break; } + } - Channel* removeChannel = nullptr; - Channel* joinChannel = nullptr; - bool sendRemove = true; + Channel* removeChannel = nullptr; + Channel* joinChannel = nullptr; + bool sendRemove = true; - if (CanJoinConstantChannelInZone(channel, current_zone)) + if (CanJoinConstantChannelInZone(channelEntry, current_zone)) + { + if (!(channelEntry->flags & CHANNEL_DBC_FLAG_GLOBAL)) { - if (!(channel->flags & CHANNEL_DBC_FLAG_GLOBAL)) - { - if (channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY && usedChannel) - continue; // Already on the channel, as city channel names are not changing - - char new_channel_name_buf[100]; - char const* currentNameExt; - - if (channel->flags & CHANNEL_DBC_FLAG_CITY_ONLY) - currentNameExt = sObjectMgr->GetTrinityStringForDBCLocale(LANG_CHANNEL_CITY); - else - currentNameExt = current_zone_name.c_str(); + if (channelEntry->flags & CHANNEL_DBC_FLAG_CITY_ONLY && usedChannel) + continue; // Already on the channel, as city channel names are not changing - snprintf(new_channel_name_buf, 100, channel->pattern[m_session->GetSessionDbcLocale()], currentNameExt); + std::string currentNameExt; + if (channelEntry->flags & CHANNEL_DBC_FLAG_CITY_ONLY) + currentNameExt = sObjectMgr->GetTrinityStringForDBCLocale(LANG_CHANNEL_CITY); + else + currentNameExt = current_zone_name; - joinChannel = cMgr->GetJoinChannel(new_channel_name_buf, channel->ChannelID); - if (usedChannel) + std::string newChannelName = Trinity::StringFormat(channelEntry->pattern[m_session->GetSessionDbcLocale()], currentNameExt.c_str()); + joinChannel = cMgr->GetJoinChannel(newChannelName, channelEntry->ChannelID); + if (usedChannel) + { + if (joinChannel != usedChannel) { - if (joinChannel != usedChannel) - { - removeChannel = usedChannel; - sendRemove = false; // Do not send leave channel, it already replaced at client - } - else - joinChannel = nullptr; + removeChannel = usedChannel; + sendRemove = false; // Do not send leave channel, it already replaced at client } + else + joinChannel = nullptr; } - else - joinChannel = cMgr->GetJoinChannel(channel->pattern[m_session->GetSessionDbcLocale()], channel->ChannelID); } else - removeChannel = usedChannel; + joinChannel = cMgr->GetJoinChannel(channelEntry->pattern[m_session->GetSessionDbcLocale()], channelEntry->ChannelID); + } + else + removeChannel = usedChannel; - if (joinChannel) - joinChannel->JoinChannel(this, ""); // Changed Channel: ... or Joined Channel: ... + if (joinChannel) + joinChannel->JoinChannel(this, ""); // Changed Channel: ... or Joined Channel: ... - if (removeChannel) - { - removeChannel->LeaveChannel(this, sendRemove); // Leave old channel - std::string name = removeChannel->GetName(); // Store name, (*i)erase in LeftChannel - LeftChannel(removeChannel); // Remove from player's channel list - cMgr->LeftChannel(name); // Delete if empty - } + if (removeChannel) + { + removeChannel->LeaveChannel(this, sendRemove); // Leave old channel + std::string name = removeChannel->GetName(); // Store name, (*i)erase in LeftChannel + LeftChannel(removeChannel); // Remove from player's channel list + cMgr->LeftChannel(name); // Delete if empty } } } @@ -6254,14 +6253,14 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type) co case ACTION_BUTTON_SPELL: if (!sSpellMgr->GetSpellInfo(action)) { - TC_LOG_ERROR("entities.player", "Player::IsActionButtonDataValid: Spell action %u not added into button %u for player %s (%s): spell not exist", + TC_LOG_DEBUG("entities.player", "Player::IsActionButtonDataValid: Spell action %u not added into button %u for player %s (%s): spell does not exist. This can be due to a character imported from a different expansion", action, button, GetName().c_str(), GetGUID().ToString().c_str()); return false; } if (!HasSpell(action)) { - TC_LOG_ERROR("entities.player", "Player::IsActionButtonDataValid: Spell action %u not added into button %u for player %s (%s): player don't known this spell", + TC_LOG_DEBUG("entities.player", "Player::IsActionButtonDataValid: Spell action %u not added into button %u for player %s (%s): player does not known this spell, this can be due to a player changing their talents", action, button, GetName().c_str(), GetGUID().ToString().c_str()); return false; } @@ -7207,6 +7206,13 @@ void Player::DuelComplete(DuelCompleteType type) if (!duel) return; + // Check if DuelComplete() has been called already up in the stack and in that case don't do anything else here + if (duel->isCompleted || ASSERT_NOTNULL(duel->opponent->duel)->isCompleted) + return; + + duel->isCompleted = true; + duel->opponent->duel->isCompleted = true; + TC_LOG_DEBUG("entities.unit", "Player::DuelComplete: Player '%s' (%s), Opponent: '%s' (%s)", GetName().c_str(), GetGUID().ToString().c_str(), duel->opponent->GetName().c_str(), duel->opponent->GetGUID().ToString().c_str()); @@ -12141,7 +12147,8 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update) // remove item dependent auras and casts (only weapon and armor slots) if (slot < EQUIPMENT_SLOT_END) { - RemoveItemDependentAurasAndCasts(pItem); + if (update) + RemoveItemDependentAurasAndCasts(pItem); // remove held enchantments, update expertise if (slot == EQUIPMENT_SLOT_MAINHAND) @@ -12320,7 +12327,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update) // Delete rolled money / loot from db. // MUST be done before RemoveFromWorld() or GetTemplate() fails if (ItemTemplate const* pTmp = pItem->GetTemplate()) - if (pTmp->Flags & ITEM_PROTO_FLAG_OPENABLE) + if (pTmp->Flags & ITEM_PROTO_FLAG_HAS_LOOT) pItem->ItemContainerDeleteLootMoneyAndLootItemsFromDB(); if (IsInWorld() && update) @@ -14003,8 +14010,11 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool break; case GOSSIP_OPTION_TRAINER: if (getClass() != creature->GetCreatureTemplate()->trainer_class && creature->GetCreatureTemplate()->trainer_type == TRAINER_TYPE_CLASS) + { TC_LOG_ERROR("sql.sql", "GOSSIP_OPTION_TRAINER:: Player %s (GUID: %u) requested wrong gossip menu: %u with wrong class: %u at Creature: %s (Entry: %u, Trainer Class: %u)", - GetName().c_str(), GetGUID().GetCounter(), menu->GetGossipMenu().GetMenuId(), getClass(), creature->GetName().c_str(), creature->GetEntry(), creature->GetCreatureTemplate()->trainer_class); + GetName().c_str(), GetGUID().GetCounter(), menu->GetGossipMenu().GetMenuId(), getClass(), creature->GetName().c_str(), creature->GetEntry(), creature->GetCreatureTemplate()->trainer_class); + canTalk = false; + } // no break; case GOSSIP_OPTION_GOSSIP: case GOSSIP_OPTION_SPIRITGUIDE: @@ -14808,7 +14818,7 @@ void Player::AddQuest(Quest const* quest, Object* questGiver) StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_QUEST, quest_id); - SendQuestUpdate(quest_id); + SendQuestUpdate(); if (sWorld->getBoolConfig(CONFIG_QUEST_ENABLE_QUEST_TRACKER)) // check if Quest Tracker is enabled { @@ -14835,12 +14845,8 @@ void Player::CompleteQuest(uint32 quest_id) SetQuestSlotState(log_slot, QUEST_STATE_COMPLETE); if (Quest const* qInfo = sObjectMgr->GetQuestTemplate(quest_id)) - { if (qInfo->HasFlag(QUEST_FLAGS_TRACKING)) RewardQuest(qInfo, 0, this, false); - else - SendQuestComplete(quest_id); - } } if (sWorld->getBoolConfig(CONFIG_QUEST_ENABLE_QUEST_TRACKER)) // check if Quest Tracker is enabled @@ -14876,15 +14882,23 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, uint32 quest_id = quest->GetQuestId(); for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) - if (quest->RequiredItemId[i]) - DestroyItemCount(quest->RequiredItemId[i], quest->RequiredItemCount[i], true); - + { + if (ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(quest->RequiredItemId[i])) + { + if (quest->RequiredItemCount[i] > 0 && (itemTemplate->Bonding == BIND_QUEST_ITEM || itemTemplate->Bonding == BIND_QUEST_ITEM1)) + DestroyItemCount(quest->RequiredItemId[i], 9999, true, true); + else + DestroyItemCount(quest->RequiredItemId[i], quest->RequiredItemCount[i], true, true); + } + } for (uint8 i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) { - if (quest->ItemDrop[i]) + if (ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(quest->ItemDrop[i])) { - uint32 count = quest->ItemDropQuantity[i]; - DestroyItemCount(quest->ItemDrop[i], count ? count : 9999, true); + if (quest->ItemDropQuantity[i] > 0 && (itemTemplate->Bonding == BIND_QUEST_ITEM || itemTemplate->Bonding == BIND_QUEST_ITEM1)) + DestroyItemCount(quest->ItemDrop[i], 9999, true, true); + else + DestroyItemCount(quest->ItemDrop[i], quest->ItemDropQuantity[i], true, true); } } @@ -14980,7 +14994,10 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, { /// @todo Poor design of mail system SQLTransaction trans = CharacterDatabase.BeginTransaction(); - MailDraft(mail_template_id).SendMailTo(trans, this, questGiver, MAIL_CHECK_MASK_HAS_BODY, quest->GetRewMailDelaySecs()); + if (uint32 questMailSender = quest->GetRewMailSenderEntry()) + MailDraft(mail_template_id).SendMailTo(trans, this, questMailSender, MAIL_CHECK_MASK_HAS_BODY, quest->GetRewMailDelaySecs()); + else + MailDraft(mail_template_id).SendMailTo(trans, this, questGiver, MAIL_CHECK_MASK_HAS_BODY, quest->GetRewMailDelaySecs()); CharacterDatabase.CommitTransaction(trans); } @@ -15001,8 +15018,11 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, SetSeasonalQuestStatus(quest_id); RemoveActiveQuest(quest_id, false); - m_RewardedQuests.insert(quest_id); - m_RewardedQuestsSave[quest_id] = QUEST_DEFAULT_SAVE_TYPE; + if (quest->CanIncreaseRewardedQuestCounters()) + { + m_RewardedQuests.insert(quest_id); + m_RewardedQuestsSave[quest_id] = QUEST_DEFAULT_SAVE_TYPE; + } // StoreNewItem, mail reward, etc. save data directly to the database // to prevent exploitable data desynchronisation we save the quest status to the database too @@ -15048,7 +15068,9 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, UpdatePvPState(); } - SendQuestUpdate(quest_id); + SendQuestUpdate(); + + SendQuestGiverStatusMultiple(); //lets remove flag for delayed teleports SetCanDelayTeleport(false); @@ -15086,14 +15108,32 @@ void Player::FailQuest(uint32 questId) SendQuestFailed(questId); // Destroy quest items on quest failure. - for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) - if (quest->RequiredItemId[i] > 0 && quest->RequiredItemCount[i] > 0) - // Destroy items received on starting the quest. - DestroyItemCount(quest->RequiredItemId[i], quest->RequiredItemCount[i], true, true); + for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) + if (ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(quest->RequiredItemId[i])) + if (quest->RequiredItemCount[i] > 0 && (itemTemplate->Bonding == BIND_QUEST_ITEM || itemTemplate->Bonding == BIND_QUEST_ITEM1)) + DestroyItemCount(quest->RequiredItemId[i], 9999, true, true); + for (uint8 i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) - if (quest->ItemDrop[i] > 0 && quest->ItemDropQuantity[i] > 0) - // Destroy items received during the quest. - DestroyItemCount(quest->ItemDrop[i], quest->ItemDropQuantity[i], true, true); + if (ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(quest->ItemDrop[i])) + if (quest->ItemDropQuantity[i] > 0 && (itemTemplate->Bonding == BIND_QUEST_ITEM || itemTemplate->Bonding == BIND_QUEST_ITEM1)) + DestroyItemCount(quest->ItemDrop[i], 9999, true, true); + } +} + +void Player::AbandonQuest(uint32 questId) +{ + if (Quest const* quest = sObjectMgr->GetQuestTemplate(questId)) + { + // Destroy quest items on quest abandon. + for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) + if (ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(quest->RequiredItemId[i])) + if (quest->RequiredItemCount[i] > 0 && (itemTemplate->Bonding == BIND_QUEST_ITEM || itemTemplate->Bonding == BIND_QUEST_ITEM1)) + DestroyItemCount(quest->RequiredItemId[i], 9999, true, true); + + for (uint8 i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i) + if (ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(quest->ItemDrop[i])) + if (quest->ItemDropQuantity[i] > 0 && (itemTemplate->Bonding == BIND_QUEST_ITEM || itemTemplate->Bonding == BIND_QUEST_ITEM1)) + DestroyItemCount(quest->ItemDrop[i], 9999, true, true); } } @@ -15683,14 +15723,16 @@ bool Player::CanShareQuest(uint32 quest_id) const void Player::SetQuestStatus(uint32 questId, QuestStatus status, bool update /*= true*/) { - if (sObjectMgr->GetQuestTemplate(questId)) + if (Quest const* quest = sObjectMgr->GetQuestTemplate(questId)) { m_QuestStatus[questId].Status = status; - m_QuestStatusSave[questId] = QUEST_DEFAULT_SAVE_TYPE; + + if (!quest->IsAutoComplete()) + m_QuestStatusSave[questId] = QUEST_DEFAULT_SAVE_TYPE; } if (update) - SendQuestUpdate(questId); + SendQuestUpdate(); sScriptMgr->OnQuestStatusChange(this, questId, status); } @@ -15705,7 +15747,7 @@ void Player::RemoveActiveQuest(uint32 questId, bool update /*= true*/) } if (update) - SendQuestUpdate(questId); + SendQuestUpdate(); } void Player::RemoveRewardedQuest(uint32 questId, bool update /*= true*/) @@ -15718,33 +15760,26 @@ void Player::RemoveRewardedQuest(uint32 questId, bool update /*= true*/) } if (update) - SendQuestUpdate(questId); + SendQuestUpdate(); } -void Player::SendQuestUpdate(uint32 questId) +void Player::SendQuestUpdate() { uint32 zone = 0, area = 0; + GetZoneAndAreaId(zone, area); - SpellAreaForQuestMapBounds saBounds = sSpellMgr->GetSpellAreaForQuestMapBounds(questId); - if (saBounds.first != saBounds.second) - { - GetZoneAndAreaId(zone, area); - - for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr) - if (itr->second->autocast && itr->second->IsFitToRequirements(this, zone, area)) - if (!HasAura(itr->second->spellId)) - CastSpell(this, itr->second->spellId, true); - } + SpellAreaForQuestMapBounds saBounds = sSpellMgr->GetSpellAreaForAreaMapBounds(area); - saBounds = sSpellMgr->GetSpellAreaForQuestEndMapBounds(questId); if (saBounds.first != saBounds.second) { - if (!zone || !area) - GetZoneAndAreaId(zone, area); - for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr) + { if (!itr->second->IsFitToRequirements(this, zone, area)) RemoveAurasDueToSpell(itr->second->spellId); + else if (itr->second->autocast) + if (!HasAura(itr->second->spellId)) + CastSpell(this, itr->second->spellId, true); + } } UpdateForQuestWorldObjects(); @@ -16593,6 +16628,50 @@ void Player::SendQuestUpdateAddPlayer(Quest const* quest, uint16 old_count, uint SetQuestSlotCounter(log_slot, QUEST_PVP_KILL_SLOT, GetQuestSlotCounter(log_slot, QUEST_PVP_KILL_SLOT) + add_count); } +void Player::SendQuestGiverStatusMultiple() +{ + uint32 count = 0; + + WorldPacket data(SMSG_QUESTGIVER_STATUS_MULTIPLE, 4); + data << uint32(count); // placeholder + + for (auto itr = m_clientGUIDs.begin(); itr != m_clientGUIDs.end(); ++itr) + { + uint32 questStatus = DIALOG_STATUS_NONE; + + if (itr->IsAnyTypeCreature()) + { + // need also pet quests case support + Creature* questgiver = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, *itr); + if (!questgiver || questgiver->IsHostileTo(this)) + continue; + if (!questgiver->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER)) + continue; + + questStatus = GetQuestDialogStatus(questgiver); + + data << uint64(questgiver->GetGUID()); + data << uint8(questStatus); + ++count; + } + else if (itr->IsGameObject()) + { + GameObject* questgiver = GetMap()->GetGameObject(*itr); + if (!questgiver || questgiver->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER) + continue; + + questStatus = GetQuestDialogStatus(questgiver); + + data << uint64(questgiver->GetGUID()); + data << uint8(questStatus); + ++count; + } + } + + data.put<uint32>(0, count); // write real count + GetSession()->SendPacket(&data); +} + bool Player::HasPvPForcingQuest() const { for (uint8 i = 0; i < MAX_QUEST_LOG_SIZE; ++i) @@ -17518,6 +17597,8 @@ bool Player::isAllowedToLoot(const Creature* creature) const Loot* loot = &creature->loot; if (loot->isLooted()) // nothing to loot or everything looted. return false; + if (!loot->hasItemForAll() && !loot->hasItemFor(this)) // no loot in creature for this player + return false; if (loot->loot_type == LOOT_SKINNING) return creature->GetSkinner() == GetGUID(); @@ -17574,7 +17655,7 @@ void Player::_LoadActions(PreparedQueryResult result) ab->uState = ACTIONBUTTON_UNCHANGED; else { - TC_LOG_ERROR("entities.player", "Player::_LoadActions: Player '%s' (%s) has an invalid action button (Button: %u, Action: %u, Type: %u). It will be deleted at next save.", + TC_LOG_DEBUG("entities.player", "Player::_LoadActions: Player '%s' (%s) has an invalid action button (Button: %u, Action: %u, Type: %u). It will be deleted at next save. This can be due to a player changing their talents.", GetName().c_str(), GetGUID().ToString().c_str(), button, action, type); // Will be deleted in DB at next save (it can create data until save but marked as deleted). @@ -18219,9 +18300,10 @@ void Player::_LoadQuestStatusRewarded(PreparedQueryResult result) if (quest->GetBonusTalents()) m_questRewardTalentCount += quest->GetBonusTalents(); - } - m_RewardedQuests.insert(quest_id); + if (quest->CanIncreaseRewardedQuestCounters()) + m_RewardedQuests.insert(quest_id); + } } while (result->NextRow()); } @@ -18780,7 +18862,7 @@ bool Player::CheckInstanceValidity(bool /*isLogin*/) return true; // non-instances are always valid - Map* map = GetMap(); + Map* map = FindMap(); if (!map || !map->IsDungeon()) return true; @@ -20940,7 +21022,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc return false; } - if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE)) + if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL)) return false; // taximaster case @@ -21139,7 +21221,7 @@ void Player::CleanupAfterTaxiFlight() { m_taxi.ClearTaxiDestinations(); // not destinations, clear source node Dismount(); - RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT); + RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_TAXI_FLIGHT); getHostileRefManager().setOnlineOfflineState(true); } @@ -21944,8 +22026,8 @@ void Player::ReportedAfkBy(Player* reporter) if (m_bgData.bgAfkReporter.find(reporter->GetGUID().GetCounter()) == m_bgData.bgAfkReporter.end() && !HasAura(43680) && !HasAura(43681) && reporter->CanReportAfkDueToLimit()) { m_bgData.bgAfkReporter.insert(reporter->GetGUID().GetCounter()); - // 3 players have to complain to apply debuff - if (m_bgData.bgAfkReporter.size() >= 3) + // by default 3 players have to complain to apply debuff + if (m_bgData.bgAfkReporter.size() >= sWorld->getIntConfig(CONFIG_BATTLEGROUND_REPORT_AFK)) { // cast 'Idle' spell CastSpell(this, 43680, true); @@ -22870,6 +22952,24 @@ void Player::SetDailyQuestStatus(uint32 quest_id) } } +bool Player::IsDailyQuestDone(uint32 quest_id) +{ + bool found = false; + if (sObjectMgr->GetQuestTemplate(quest_id)) + { + for (uint32 quest_daily_idx = 0; quest_daily_idx < PLAYER_MAX_DAILY_QUESTS; ++quest_daily_idx) + { + if (GetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1 + quest_daily_idx) == quest_id) + { + found = true; + break; + } + } + } + + return found; +} + void Player::SetWeeklyQuestStatus(uint32 quest_id) { m_weeklyquests.insert(quest_id); @@ -24016,6 +24116,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply) if (target->isType(TYPEMASK_UNIT) && target != GetVehicleBase()) static_cast<Unit*>(target)->AddPlayerToVision(this); + SetSeer(target); } else { @@ -24031,7 +24132,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply) static_cast<Unit*>(target)->RemovePlayerFromVision(this); //must immediately set seer back otherwise may crash - m_seer = this; + SetSeer(this); //WorldPacket data(SMSG_CLEAR_FAR_SIGHT_IMMEDIATE, 0); //GetSession()->SendPacket(&data); @@ -26319,7 +26420,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction()); pet->setPowerType(POWER_MANA); - pet->SetUInt32Value(UNIT_NPC_FLAGS, 0); + pet->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); pet->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); pet->InitStatsForLevel(getLevel()); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 372a49b4f9d..38fff9b8d83 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -269,6 +269,7 @@ struct PlayerInfo uint16 displayId_f; PlayerCreateInfoItems item; PlayerCreateInfoSpells customSpells; + PlayerCreateInfoSpells castSpells; PlayerCreateInfoActions action; PlayerCreateInfoSkills skills; @@ -288,7 +289,7 @@ struct PvPInfo struct DuelInfo { - DuelInfo() : initiator(nullptr), opponent(nullptr), startTimer(0), startTime(0), outOfBound(0), isMounted(false) { } + DuelInfo() : initiator(nullptr), opponent(nullptr), startTimer(0), startTime(0), outOfBound(0), isMounted(false), isCompleted(false) { } Player* initiator; Player* opponent; @@ -296,6 +297,7 @@ struct DuelInfo time_t startTime; time_t outOfBound; bool isMounted; + bool isCompleted; }; struct Areas @@ -1333,6 +1335,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player> bool CanRewardQuest(Quest const* quest, uint32 reward, bool msg); void AddQuestAndCheckCompletion(Quest const* quest, Object* questGiver); void AddQuest(Quest const* quest, Object* questGiver); + void AbandonQuest(uint32 quest_id); void CompleteQuest(uint32 quest_id); void IncompleteQuest(uint32 quest_id); void RewardQuest(Quest const* quest, uint32 reward, Object* questGiver, bool announce = true); @@ -1361,10 +1364,11 @@ class TC_GAME_API Player : public Unit, public GridObject<Player> void SetQuestStatus(uint32 questId, QuestStatus status, bool update = true); void RemoveActiveQuest(uint32 questId, bool update = true); void RemoveRewardedQuest(uint32 questId, bool update = true); - void SendQuestUpdate(uint32 questId); + void SendQuestUpdate(); QuestGiverStatus GetQuestDialogStatus(Object* questGiver); void SetDailyQuestStatus(uint32 quest_id); + bool IsDailyQuestDone(uint32 quest_id); void SetWeeklyQuestStatus(uint32 quest_id); void SetMonthlyQuestStatus(uint32 quest_id); void SetSeasonalQuestStatus(uint32 quest_id); @@ -1413,6 +1417,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player> void SendQuestUpdateAddItem(Quest const* quest, uint32 itemIdx, uint16 count) const; void SendQuestUpdateAddCreatureOrGo(Quest const* quest, ObjectGuid guid, uint32 creatureOrGOIdx, uint16 oldCount, uint16 addCount); void SendQuestUpdateAddPlayer(Quest const* quest, uint16 oldCount, uint16 addCount); + void SendQuestGiverStatusMultiple(); ObjectGuid GetDivider() const { return m_divider; } void SetDivider(ObjectGuid guid) { m_divider = guid; } @@ -1596,7 +1601,8 @@ class TC_GAME_API Player : public Unit, public GridObject<Player> void AddSpellMod(SpellModifier* mod, bool apply); bool IsAffectedBySpellmod(SpellInfo const* spellInfo, SpellModifier* mod, Spell* spell = nullptr) const; - template <class T> T ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell* spell = nullptr); + template <class T> + void ApplySpellMod(uint32 spellId, SpellModOp op, T& basevalue, Spell* spell = nullptr); void RemoveSpellMods(Spell* spell); void RestoreSpellMods(Spell* spell, uint32 ownerAuraId = 0, Aura* aura = nullptr); void RestoreAllSpellMods(uint32 ownerAuraId = 0, Aura* aura = nullptr); @@ -2604,11 +2610,13 @@ TC_GAME_API void AddItemsSetItem(Player* player, Item* item); TC_GAME_API void RemoveItemsSetItem(Player* player, ItemTemplate const* proto); // "the bodies of template functions must be made available in a header file" -template <class T> T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell* spell) +template <class T> +void Player::ApplySpellMod(uint32 spellId, SpellModOp op, T& basevalue, Spell* spell /*= nullptr*/) { SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo) - return 0; + return; + float totalmul = 1.0f; int32 totalflat = 0; @@ -2644,9 +2652,8 @@ template <class T> T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T &bas DropModCharge(mod, spell); } - float diff = (float)basevalue * (totalmul - 1.0f) + (float)totalflat; - basevalue = T((float)basevalue + diff); - return T(diff); + + basevalue = T(float(basevalue + totalflat) * totalmul); } #endif diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 5e5c6901471..0d97e120fff 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -92,7 +92,8 @@ bool Transport::Create(ObjectGuid::LowType guidlow, uint32 entry, uint32 mapid, SetGoType(GAMEOBJECT_TYPE_MO_TRANSPORT); SetGoAnimProgress(animprogress); SetName(goinfo->name); - UpdateRotationFields(0.0f, 1.0f); + SetWorldRotation(G3D::Quat()); + SetParentRotation(G3D::Quat()); m_model = CreateModel(); return true; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index ee815f199bd..ac924f39a03 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -459,12 +459,6 @@ void Unit::resetAttackTimer(WeaponAttackType type) m_attackTimer[type] = uint32(GetAttackTime(type) * m_modAttackSpeedPct[type]); } -float Unit::GetMeleeReach() const -{ - float reach = m_floatValues[UNIT_FIELD_COMBATREACH]; - return reach > MIN_MELEE_REACH ? reach : MIN_MELEE_REACH; -} - bool Unit::IsWithinCombatRange(const Unit* obj, float dist2compare) const { if (!obj || !IsInMap(obj) || !InSamePhase(obj)) @@ -481,7 +475,7 @@ bool Unit::IsWithinCombatRange(const Unit* obj, float dist2compare) const return distsq < maxdist * maxdist; } -bool Unit::IsWithinMeleeRange(const Unit* obj, float dist) const +bool Unit::IsWithinMeleeRange(Unit const* obj) const { if (!obj || !IsInMap(obj) || !InSamePhase(obj)) return false; @@ -491,10 +485,9 @@ bool Unit::IsWithinMeleeRange(const Unit* obj, float dist) const float dz = GetPositionZMinusOffset() - obj->GetPositionZMinusOffset(); float distsq = dx*dx + dy*dy + dz*dz; - float sizefactor = GetMeleeReach() + obj->GetMeleeReach(); - float maxdist = dist + sizefactor; + float maxdist = GetCombatReach() + obj->GetCombatReach() + 4.0f / 3.0f; - return distsq < maxdist * maxdist; + return distsq <= maxdist * maxdist; } void Unit::GetRandomContactPoint(const Unit* obj, float &x, float &y, float &z, float distance2dMin, float distance2dMax) const @@ -599,11 +592,14 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam if (victim->GetTypeId() == TYPEID_PLAYER && this != victim) { - // Signal to pets that their owner was attacked - Pet* pet = victim->ToPlayer()->GetPet(); + // Signal to pets that their owner was attacked - except when DOT. + if (damagetype != DOT) + { + Pet* pet = victim->ToPlayer()->GetPet(); - if (pet && pet->IsAlive()) - pet->AI()->OwnerAttackedBy(this); + if (pet && pet->IsAlive()) + pet->AI()->OwnerAttackedBy(this); + } if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD)) return 0; @@ -624,6 +620,17 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam else victim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TAKE_DAMAGE, 0); + // interrupt spells with SPELL_INTERRUPT_FLAG_ABORT_ON_DMG on absorbed damage (no dots) + if (!damage && damagetype != DOT && cleanDamage && cleanDamage->absorbed_damage) + if (victim != this && victim->GetTypeId() == TYPEID_PLAYER) + if (Spell* spell = victim->m_currentSpells[CURRENT_GENERIC_SPELL]) + if (spell->getState() == SPELL_STATE_PREPARING) + { + uint32 interruptFlags = spell->m_spellInfo->InterruptFlags; + if ((interruptFlags & SPELL_INTERRUPT_FLAG_ABORT_ON_DMG) != 0) + victim->InterruptNonMeleeSpells(false); + } + // We're going to call functions which can modify content of the list during iteration over it's elements // Let's copy the list so we can prevent iterator invalidation AuraEffectList vCopyDamageCopy(victim->GetAuraEffectsByType(SPELL_AURA_SHARE_DAMAGE_PCT)); @@ -1355,7 +1362,8 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) if (damageInfo->blocked_amount && damageInfo->TargetState != VICTIMSTATE_BLOCKS) victim->HandleEmoteCommand(EMOTE_ONESHOT_PARRY_SHIELD); - if (damageInfo->TargetState == VICTIMSTATE_PARRY) + if (damageInfo->TargetState == VICTIMSTATE_PARRY && + (GetTypeId() != TYPEID_UNIT || (ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN) == 0)) { // Get attack timers float offtime = float(victim->getAttackTimer(OFF_ATTACK)); @@ -2253,7 +2261,7 @@ float Unit::CalculateLevelPenalty(SpellInfo const* spellProto) const float LvlPenalty = 0.0f; if (spellProto->SpellLevel < 20) - LvlPenalty = 20.0f - spellProto->SpellLevel * 3.75f; + LvlPenalty = (20.0f - spellProto->SpellLevel) * 3.75f; float LvlFactor = (float(spellProto->SpellLevel) + 6.0f) / float(getLevel()); if (LvlFactor > 1.0f) LvlFactor = 1.0f; @@ -2387,37 +2395,19 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spellInfo if (roll < tmp) return SPELL_MISS_MISS; - // Chance resist mechanic (select max value from every mechanic spell effect) - int32 resist_mech = 0; - // Get effects mechanic and chance - for (uint8 eff = 0; eff < MAX_SPELL_EFFECTS; ++eff) - { - int32 effect_mech = spellInfo->GetEffectMechanic(eff); - if (effect_mech) - { - int32 temp = victim->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_MECHANIC_RESISTANCE, effect_mech); - if (resist_mech < temp * 100) - resist_mech = temp * 100; - } - } - // Roll chance - tmp += resist_mech; + // Chance resist mechanic + int32 resist_chance = victim->GetMechanicResistChance(spellInfo) * 100; + tmp += resist_chance; if (roll < tmp) return SPELL_MISS_RESIST; - bool canDodge = true; - bool canParry = true; - bool canBlock = spellInfo->HasAttribute(SPELL_ATTR3_BLOCKABLE_SPELL); - - // Same spells cannot be parry/dodge + // Same spells cannot be parried/dodged if (spellInfo->HasAttribute(SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK)) return SPELL_MISS_NONE; - // Chance resist mechanic - int32 resist_chance = victim->GetMechanicResistChance(spellInfo) * 100; - tmp += resist_chance; - if (roll < tmp) - return SPELL_MISS_RESIST; + bool canDodge = true; + bool canParry = true; + bool canBlock = spellInfo->HasAttribute(SPELL_ATTR3_BLOCKABLE_SPELL); // Ranged attacks can only miss, resist and deflect if (attType == RANGED_ATTACK) @@ -2854,6 +2844,15 @@ float Unit::GetUnitCriticalChance(WeaponAttackType attackType, const Unit* victi else crit += victim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_CHANCE); + AuraEffectList const& critChanceForCaster = victim->GetAuraEffectsByType(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER); + for (AuraEffect const* aurEff : critChanceForCaster) + { + if (aurEff->GetCasterGUID() != GetGUID()) + continue; + + crit += aurEff->GetAmount(); + } + crit += victim->GetTotalAuraModifier(SPELL_AURA_MOD_ATTACKER_SPELL_AND_WEAPON_CRIT_CHANCE); // reduce crit chance from Rating for players @@ -3189,6 +3188,15 @@ int32 Unit::GetCurrentSpellCastTime(uint32 spell_id) const return 0; } +bool Unit::CanMoveDuringChannel() const +{ + if (Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL]) + if (spell->getState() != SPELL_STATE_FINISHED) + return spell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING) && spell->IsChannelActive(); + + return false; +} + bool Unit::isInFrontInMap(Unit const* target, float distance, float arc) const { return IsWithinDistInMap(target, distance) && HasInArc(arc, target); @@ -5287,7 +5295,7 @@ void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 /*SwingType } //victim may be NULL -bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown) +bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, Milliseconds& cooldown) { SpellInfo const* dummySpell = triggeredByAura->GetSpellInfo(); uint32 effIndex = triggeredByAura->GetEffIndex(); @@ -5297,8 +5305,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere ? ToPlayer()->GetItemByGuid(triggeredByAura->GetBase()->GetCastItemGUID()) : NULL; uint32 triggered_spell_id = 0; - uint32 cooldown_spell_id = 0; // for random trigger, will be one of the triggered spell to avoid repeatable triggers - // otherwise, it's the triggered_spell_id by default Unit* target = victim; int32 basepoints0 = 0; ObjectGuid originalCaster; @@ -5374,24 +5380,20 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere case CLASS_PALADIN: // 39511, 40997, 40998, 40999, 41002, 41005, 41009, 41011, 41409 case CLASS_DRUID: // 39511, 40997, 40998, 40999, 41002, 41005, 41009, 41011, 41409 triggered_spell_id = RAND(39511, 40997, 40998, 40999, 41002, 41005, 41009, 41011, 41409); - cooldown_spell_id = 39511; break; case CLASS_ROGUE: // 39511, 40997, 40998, 41002, 41005, 41011 case CLASS_WARRIOR: // 39511, 40997, 40998, 41002, 41005, 41011 case CLASS_DEATH_KNIGHT: triggered_spell_id = RAND(39511, 40997, 40998, 41002, 41005, 41011); - cooldown_spell_id = 39511; break; case CLASS_PRIEST: // 40999, 41002, 41005, 41009, 41011, 41406, 41409 case CLASS_SHAMAN: // 40999, 41002, 41005, 41009, 41011, 41406, 41409 case CLASS_MAGE: // 40999, 41002, 41005, 41009, 41011, 41406, 41409 case CLASS_WARLOCK: // 40999, 41002, 41005, 41009, 41011, 41406, 41409 triggered_spell_id = RAND(40999, 41002, 41005, 41009, 41011, 41406, 41409); - cooldown_spell_id = 40999; break; case CLASS_HUNTER: // 40997, 40999, 41002, 41005, 41009, 41011, 41406, 41409 triggered_spell_id = RAND(40997, 40999, 41002, 41005, 41009, 41011, 41406, 41409); - cooldown_spell_id = 40997; break; default: return false; @@ -5621,11 +5623,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere uint8 rand_spell = urand(0, (RandomSpells.size() - 1)); CastSpell(target, RandomSpells[rand_spell], true, castItem, triggeredByAura, originalCaster); - for (std::vector<uint32>::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr) - { - if (!GetSpellHistory()->HasCooldown(*itr)) - GetSpellHistory()->AddCooldown(*itr, 0, std::chrono::seconds(cooldown)); - } break; } case 71562: // Deathbringer's Will Heroic @@ -5667,11 +5664,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere uint8 rand_spell = urand(0, (RandomSpells.size() - 1)); CastSpell(target, RandomSpells[rand_spell], true, castItem, triggeredByAura, originalCaster); - for (std::vector<uint32>::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr) - { - if (!GetSpellHistory()->HasCooldown(*itr)) - GetSpellHistory()->AddCooldown(*itr, 0, std::chrono::seconds(cooldown)); - } break; } case 65032: // Boom aura (321 Boombot) @@ -6309,24 +6301,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere return true; } } - // Eclipse - if (dummySpell->SpellIconID == 2856 && GetTypeId() == TYPEID_PLAYER) - { - if (!procSpell || effIndex != 0) - return false; - - bool isWrathSpell = (procSpell->SpellFamilyFlags[0] & 1); - - if (!roll_chance_f(dummySpell->ProcChance * (isWrathSpell ? 0.6f : 1.0f))) - return false; - - target = this; - if (target->HasAura(isWrathSpell ? 48517 : 48518)) - return false; - - triggered_spell_id = isWrathSpell ? 48518 : 48517; - break; - } break; } case SPELLFAMILY_ROGUE: @@ -6491,6 +6465,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // 4 healing tick basepoints0 = triggerAmount * damage / 400; triggered_spell_id = 54203; + // Add remaining ticks to healing done + basepoints0 += victim->GetRemainingPeriodicAmount(GetGUID(), triggered_spell_id, SPELL_AURA_PERIODIC_HEAL); break; } switch (dummySpell->Id) @@ -6507,7 +6483,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // Item - Paladin T8 Holy 4P Bonus if (Unit* caster = triggeredByAura->GetCaster()) if (AuraEffect const* aurEff = caster->GetAuraEffect(64895, 0)) - cooldown = aurEff->GetAmount(); + cooldown = Milliseconds(aurEff->GetAmount()); target = this; break; @@ -6822,10 +6798,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (!player || !castItem || !castItem->IsEquipped() || !victim || !victim->IsAlive()) return false; - // custom cooldown processing case - if (cooldown && GetSpellHistory()->HasCooldown(dummySpell->Id)) - return false; - if (triggeredByAura->GetBase() && castItem->GetGUID() != triggeredByAura->GetBase()->GetCastItemGUID()) return false; @@ -6888,8 +6860,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere triggered_spell_id = 33750; // apply cooldown before cast to prevent processing itself - if (cooldown) - player->GetSpellHistory()->AddCooldown(dummySpell->Id, 0, std::chrono::seconds(cooldown)); + triggeredByAura->GetBase()->AddProcCooldown(std::chrono::steady_clock::now() + cooldown); + cooldown = Milliseconds::zero(); // Attack Twice for (uint32 i = 0; i < 2; ++i) @@ -7132,10 +7104,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (!procSpell || GetTypeId() != TYPEID_PLAYER || !victim) return false; - // custom cooldown processing case - if (cooldown && GetTypeId() == TYPEID_PLAYER && GetSpellHistory()->HasCooldown(dummySpell->Id)) - return false; - uint32 spellId = 0; // Every Lightning Bolt and Chain Lightning spell have duplicate vs half damage and zero cost switch (procSpell->Id) @@ -7181,10 +7149,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere } CastSpell(victim, spellId, true, castItem, triggeredByAura); - - if (cooldown && GetTypeId() == TYPEID_PLAYER) - GetSpellHistory()->AddCooldown(dummySpell->Id, 0, std::chrono::seconds(cooldown)); - return true; } // Static Shock @@ -7486,26 +7450,17 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere return false; } - if (cooldown_spell_id == 0) - cooldown_spell_id = triggered_spell_id; - - if (cooldown && GetTypeId() == TYPEID_PLAYER && GetSpellHistory()->HasCooldown(cooldown_spell_id)) - return false; - if (basepoints0) CastCustomSpell(target, triggered_spell_id, &basepoints0, NULL, NULL, true, castItem, triggeredByAura, originalCaster); else CastSpell(target, triggered_spell_id, true, castItem, triggeredByAura, originalCaster); - if (cooldown && GetTypeId() == TYPEID_PLAYER) - GetSpellHistory()->AddCooldown(cooldown_spell_id, 0, std::chrono::seconds(cooldown)); - return true; } // Used in case when access to whole aura is needed // All procs should be handled like this... -bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, SpellInfo const* procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 cooldown, bool * handled) +bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, SpellInfo const* procSpell, uint32 /*procFlag*/, uint32 procEx, bool* handled) { SpellInfo const* dummySpell = triggeredByAura->GetSpellInfo(); @@ -7717,12 +7672,6 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp case 49222: { *handled = true; - if (cooldown && GetTypeId() == TYPEID_PLAYER) - { - if (GetSpellHistory()->HasCooldown(100000)) - return false; - GetSpellHistory()->AddCooldown(100000, 0, std::chrono::seconds(cooldown)); - } return true; } // Hungering Cold aura drop @@ -7765,7 +7714,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp return false; } -bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlags, uint32 procEx, uint32 cooldown) +bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx) { // Get triggered aura spell info SpellInfo const* auraSpellInfo = triggeredByAura->GetSpellInfo(); @@ -7791,95 +7740,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg { switch (auraSpellInfo->SpellFamilyName) { - case SPELLFAMILY_GENERIC: - switch (auraSpellInfo->Id) - { - case 43820: // Charm of the Witch Doctor (Amani Charm of the Witch Doctor trinket) - // Pct value stored in dummy - basepoints0 = victim->GetCreateHealth() * auraSpellInfo->Effects[1].CalcValue() / 100; - target = victim; - break; - case 57345: // Darkmoon Card: Greatness - { - float stat = 0.0f; - // strength - if (GetStat(STAT_STRENGTH) > stat) { trigger_spell_id = 60229;stat = GetStat(STAT_STRENGTH); } - // agility - if (GetStat(STAT_AGILITY) > stat) { trigger_spell_id = 60233;stat = GetStat(STAT_AGILITY); } - // intellect - if (GetStat(STAT_INTELLECT)> stat) { trigger_spell_id = 60234;stat = GetStat(STAT_INTELLECT);} - // spirit - if (GetStat(STAT_SPIRIT) > stat) { trigger_spell_id = 60235; } - break; - } - case 64568: // Blood Reserve - { - if (HealthBelowPctDamaged(35, damage)) - { - CastCustomSpell(this, 64569, &triggerAmount, NULL, NULL, true); - RemoveAura(64568); - } - return false; - } - case 67702: // Death's Choice, Item - Coliseum 25 Normal Melee Trinket - { - float stat = 0.0f; - // strength - if (GetStat(STAT_STRENGTH) > stat) { trigger_spell_id = 67708;stat = GetStat(STAT_STRENGTH); } - // agility - if (GetStat(STAT_AGILITY) > stat) { trigger_spell_id = 67703; } - break; - } - case 67771: // Death's Choice (heroic), Item - Coliseum 25 Heroic Melee Trinket - { - float stat = 0.0f; - // strength - if (GetStat(STAT_STRENGTH) > stat) { trigger_spell_id = 67773;stat = GetStat(STAT_STRENGTH); } - // agility - if (GetStat(STAT_AGILITY) > stat) { trigger_spell_id = 67772; } - break; - } - // Mana Drain Trigger - case 27522: - case 40336: - { - // On successful melee or ranged attack gain $29471s1 mana and if possible drain $27526s1 mana from the target. - if (IsAlive()) - CastSpell(this, 29471, true, castItem, triggeredByAura); - if (victim && victim->IsAlive()) - CastSpell(victim, 27526, true, castItem, triggeredByAura); - return true; - } - // Evasive Maneuvers - case 50240: - { - // Remove a Evasive Charge - Aura* charge = GetAura(50241); - if (charge && charge->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL)) - RemoveAurasDueToSpell(50240); - break; - } - // Battle Experience - // already handled in gunship battle script - case 71201: - return false; - } - break; - case SPELLFAMILY_MAGE: - if (auraSpellInfo->SpellIconID == 2127) // Blazing Speed - { - switch (auraSpellInfo->Id) - { - case 31641: // Rank 1 - case 31642: // Rank 2 - trigger_spell_id = 31643; - break; - default: - TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed", auraSpellInfo->Id); - return false; - } - } - break; case SPELLFAMILY_WARLOCK: { // Drain Soul @@ -7902,325 +7762,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg // Need for correct work Drain Soul SPELL_AURA_CHANNEL_DEATH_ITEM aura return false; } - // Nether Protection - else if (auraSpellInfo->SpellIconID == 1985) - { - if (!procSpell) - return false; - switch (GetFirstSchoolInMask(procSpell->GetSchoolMask())) - { - case SPELL_SCHOOL_NORMAL: - return false; // ignore - case SPELL_SCHOOL_HOLY: trigger_spell_id = 54370; break; - case SPELL_SCHOOL_FIRE: trigger_spell_id = 54371; break; - case SPELL_SCHOOL_NATURE: trigger_spell_id = 54375; break; - case SPELL_SCHOOL_FROST: trigger_spell_id = 54372; break; - case SPELL_SCHOOL_SHADOW: trigger_spell_id = 54374; break; - case SPELL_SCHOOL_ARCANE: trigger_spell_id = 54373; break; - default: - return false; - } - } - break; - } - case SPELLFAMILY_PRIEST: - { - // Blessed Recovery - if (auraSpellInfo->SpellIconID == 1875) - { - switch (auraSpellInfo->Id) - { - case 27811: trigger_spell_id = 27813; break; - case 27815: trigger_spell_id = 27817; break; - case 27816: trigger_spell_id = 27818; break; - default: - TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id); - return false; - } - basepoints0 = CalculatePct(int32(damage), triggerAmount) / 3; - target = this; - // Add remaining ticks to healing done - basepoints0 += GetRemainingPeriodicAmount(GetGUID(), trigger_spell_id, SPELL_AURA_PERIODIC_HEAL); - } - break; - } - case SPELLFAMILY_DRUID: - { - switch (auraSpellInfo->Id) - { - // Druid Forms Trinket - case 37336: - { - switch (GetShapeshiftForm()) - { - case FORM_NONE: trigger_spell_id = 37344; break; - case FORM_CAT: trigger_spell_id = 37341; break; - case FORM_BEAR: - case FORM_DIREBEAR: trigger_spell_id = 37340; break; - case FORM_TREE: trigger_spell_id = 37342; break; - case FORM_MOONKIN: trigger_spell_id = 37343; break; - default: - return false; - } - break; - } - // Druid T9 Feral Relic (Lacerate, Swipe, Mangle, and Shred) - case 67353: - { - switch (GetShapeshiftForm()) - { - case FORM_CAT: trigger_spell_id = 67355; break; - case FORM_BEAR: - case FORM_DIREBEAR: trigger_spell_id = 67354; break; - default: - return false; - } - break; - } - default: - break; - } - break; - } - case SPELLFAMILY_HUNTER: - { - if (auraSpellInfo->SpellIconID == 3247) // Piercing Shots - { - switch (auraSpellInfo->Id) - { - case 53234: // Rank 1 - case 53237: // Rank 2 - case 53238: // Rank 3 - trigger_spell_id = 63468; - break; - default: - TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots", auraSpellInfo->Id); - return false; - } - SpellInfo const* TriggerPS = sSpellMgr->GetSpellInfo(trigger_spell_id); - if (!TriggerPS) - return false; - - basepoints0 = CalculatePct(int32(damage), triggerAmount) / (TriggerPS->GetMaxDuration() / TriggerPS->Effects[0].Amplitude); - basepoints0 += victim->GetRemainingPeriodicAmount(GetGUID(), trigger_spell_id, SPELL_AURA_PERIODIC_DAMAGE); - break; - } - // Item - Hunter T9 4P Bonus - if (auraSpellInfo->Id == 67151) - { - trigger_spell_id = 68130; - target = this; - break; - } - break; - } - case SPELLFAMILY_PALADIN: - { - switch (auraSpellInfo->Id) - { - // Soul Preserver - case 60510: - { - switch (getClass()) - { - case CLASS_DRUID: - trigger_spell_id = 60512; - break; - case CLASS_PALADIN: - trigger_spell_id = 60513; - break; - case CLASS_PRIEST: - trigger_spell_id = 60514; - break; - case CLASS_SHAMAN: - trigger_spell_id = 60515; - break; - } - - target = this; - break; - } - case 37657: // Lightning Capacitor - case 54841: // Thunder Capacitor - case 67712: // Item - Coliseum 25 Normal Caster Trinket - case 67758: // Item - Coliseum 25 Heroic Caster Trinket - { - if (!victim || !victim->IsAlive() || GetTypeId() != TYPEID_PLAYER) - return false; - - uint32 stack_spell_id = 0; - switch (auraSpellInfo->Id) - { - case 37657: - stack_spell_id = 37658; - trigger_spell_id = 37661; - break; - case 54841: - stack_spell_id = 54842; - trigger_spell_id = 54843; - break; - case 67712: - stack_spell_id = 67713; - trigger_spell_id = 67714; - break; - case 67758: - stack_spell_id = 67759; - trigger_spell_id = 67760; - break; - } - - CastSpell(this, stack_spell_id, true, NULL, triggeredByAura); - - Aura* dummy = GetAura(stack_spell_id); - if (!dummy || dummy->GetStackAmount() < triggerAmount) - return false; - - RemoveAurasDueToSpell(stack_spell_id); - target = victim; - break; - } - default: - // Illumination - if (auraSpellInfo->SpellIconID == 241) - { - if (!procSpell) - return false; - // procspell is triggered spell but we need mana cost of original cast spell - uint32 originalSpellId = procSpell->Id; - // Holy Shock heal - if (procSpell->SpellFamilyFlags[1] & 0x00010000) - { - switch (procSpell->Id) - { - case 25914: originalSpellId = 20473; break; - case 25913: originalSpellId = 20929; break; - case 25903: originalSpellId = 20930; break; - case 27175: originalSpellId = 27174; break; - case 33074: originalSpellId = 33072; break; - case 48820: originalSpellId = 48824; break; - case 48821: originalSpellId = 48825; break; - default: - TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u not handled in HShock", procSpell->Id); - return false; - } - } - SpellInfo const* originalSpell = sSpellMgr->GetSpellInfo(originalSpellId); - if (!originalSpell) - { - TC_LOG_ERROR("entities.unit", "Unit::HandleProcTriggerSpell: Spell %u unknown but selected as original in Illu", originalSpellId); - return false; - } - // percent stored in effect 1 (class scripts) base points - int32 cost = int32(originalSpell->ManaCost + CalculatePct(GetCreateMana(), originalSpell->ManaCostPercentage)); - basepoints0 = CalculatePct(cost, auraSpellInfo->Effects[1].CalcValue()); - trigger_spell_id = 20272; - target = this; - } - break; - } - break; - } - case SPELLFAMILY_SHAMAN: - { - switch (auraSpellInfo->Id) - { - case 30881: // Nature's Guardian Rank 1 - case 30883: // Nature's Guardian Rank 2 - case 30884: // Nature's Guardian Rank 3 - case 30885: // Nature's Guardian Rank 4 - case 30886: // Nature's Guardian Rank 5 - { - if (HealthBelowPct(30)) - { - basepoints0 = int32(auraSpellInfo->Effects[EFFECT_0].CalcValue() * GetMaxHealth() / 100.0f); - target = this; - trigger_spell_id = 31616; - /// @todo Threat part - } - else - return false; - break; - } - default: - { - // Lightning Shield (overwrite non existing triggered spell call in spell.dbc - if (auraSpellInfo->SpellFamilyFlags[0] & 0x400) - { - trigger_spell_id = sSpellMgr->GetSpellWithRank(26364, auraSpellInfo->GetRank()); - } - // Nature's Guardian - else if (auraSpellInfo->SpellIconID == 2013) - { - // Check health condition - should drop to less 30% (damage deal after this!) - if (!HealthBelowPctDamaged(30, damage)) - return false; - - if (victim && victim->IsAlive()) - victim->getThreatManager().modifyThreatPercent(this, -10); - - basepoints0 = int32(CountPctFromMaxHealth(triggerAmount)); - trigger_spell_id = 31616; - target = this; - } - } - } - break; - } - case SPELLFAMILY_DEATHKNIGHT: - { - // Acclimation - if (auraSpellInfo->SpellIconID == 1930) - { - if (!procSpell) - return false; - switch (GetFirstSchoolInMask(procSpell->GetSchoolMask())) - { - case SPELL_SCHOOL_NORMAL: - return false; // ignore - case SPELL_SCHOOL_HOLY: trigger_spell_id = 50490; break; - case SPELL_SCHOOL_FIRE: trigger_spell_id = 50362; break; - case SPELL_SCHOOL_NATURE: trigger_spell_id = 50488; break; - case SPELL_SCHOOL_FROST: trigger_spell_id = 50485; break; - case SPELL_SCHOOL_SHADOW: trigger_spell_id = 50489; break; - case SPELL_SCHOOL_ARCANE: trigger_spell_id = 50486; break; - default: - return false; - } - } - // Blood Presence (Improved) - else if (auraSpellInfo->Id == 63611) - { - if (GetTypeId() != TYPEID_PLAYER) - return false; - - trigger_spell_id = 50475; - basepoints0 = CalculatePct(int32(damage), triggerAmount); - } - // Item - Death Knight T10 Melee 4P Bonus - else if (auraSpellInfo->Id == 70656) - { - if (GetTypeId() != TYPEID_PLAYER || getClass() != CLASS_DEATH_KNIGHT) - return false; - - for (uint8 i = 0; i < MAX_RUNES; ++i) - if (ToPlayer()->GetRuneCooldown(i) == 0) - return false; - } - break; - } - case SPELLFAMILY_ROGUE: - { - switch (auraSpellInfo->Id) - { - // Rogue T10 2P bonus, should only proc on caster - case 70805: - { - if (victim != this) - return false; - break; - } - } - break; } default: break; @@ -8254,7 +7795,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg float averageDmg = 0; // now compute approximate weapon damage by formula from wowwiki.com - if (procFlags & PROC_FLAG_DONE_OFFHAND_ATTACK) + if (procFlag & PROC_FLAG_DONE_OFFHAND_ATTACK) averageDmg = (GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE) + GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE)) / 2.f; else averageDmg = (GetFloatValue(UNIT_FIELD_MINDAMAGE) + GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2.f; @@ -8331,7 +7872,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case 53232: { // This effect only from Rapid Fire (ability cast) - if (!(procSpell->SpellFamilyFlags[0] & 0x20)) + if (!procSpell || !(procSpell->SpellFamilyFlags[0] & 0x20)) return false; break; } @@ -8349,7 +7890,9 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case 15337: // Improved Spirit Tap (Rank 1) case 15338: // Improved Spirit Tap (Rank 2) { - ASSERT(procSpell); + if (!procSpell) + return false; + if (procSpell->SpellFamilyFlags[0] & 0x800000) if ((procSpell->Id != 58381) || !roll_chance_i(50)) return false; @@ -8416,13 +7959,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg if (!target) return false; - if (cooldown && target->GetTypeId() == TYPEID_PLAYER && target->GetSpellHistory()->HasCooldown(trigger_spell_id)) - return false; - target->CastSpell(target, trigger_spell_id, true, castItem, triggeredByAura); - - if (cooldown && GetTypeId() == TYPEID_PLAYER) - GetSpellHistory()->AddCooldown(trigger_spell_id, 0, std::chrono::seconds(cooldown)); return true; } // Cast positive spell on enemy target @@ -8531,7 +8068,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg // Astral Shift case 52179: { - if (procSpell == 0 || !(procEx & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) || this == victim) + if (!procSpell || !(procEx & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) || this == victim) return false; // Need stun, fear or silence mechanic @@ -8553,7 +8090,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case 56453: { // Proc only from Frost/Freezing trap activation or from Freezing Arrow (the periodic dmg proc handled elsewhere) - if (!(procFlags & PROC_FLAG_DONE_TRAP_ACTIVATION) || !procSpell || !(procSpell->SchoolMask & SPELL_SCHOOL_MASK_FROST) || !roll_chance_i(triggerAmount)) + if (!(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION) || !procSpell || !(procSpell->SchoolMask & SPELL_SCHOOL_MASK_FROST) || !roll_chance_i(triggerAmount)) return false; break; } @@ -8583,13 +8120,15 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case 65081: { // Proc only from PW:S cast - if (!(procSpell->SpellFamilyFlags[0] & 0x00000001)) + if (!procSpell || !(procSpell->SpellFamilyFlags[0] & 0x00000001)) return false; break; } // Culling the Herd case 70893: { + if (!procSpell) + return false; // check if we're doing a critical hit if (!(procSpell->SpellFamilyFlags[1] & 0x10000000) && (procEx != PROC_EX_CRITICAL_HIT)) return false; @@ -8600,29 +8139,23 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg } } - if (cooldown && GetTypeId() == TYPEID_PLAYER && GetSpellHistory()->HasCooldown(trigger_spell_id)) - return false; - // extra attack should hit same target if (triggerEntry->HasEffect(SPELL_EFFECT_ADD_EXTRA_ATTACKS)) target = victim; // try detect target manually if not set if (target == NULL) - target = !(procFlags & (PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS)) && triggerEntry->IsPositive() ? this : victim; + target = !(procFlag & (PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS)) && triggerEntry->IsPositive() ? this : victim; if (basepoints0) CastCustomSpell(target, trigger_spell_id, &basepoints0, NULL, NULL, true, castItem, triggeredByAura); else CastSpell(target, trigger_spell_id, true, castItem, triggeredByAura); - if (cooldown && GetTypeId() == TYPEID_PLAYER) - GetSpellHistory()->AddCooldown(trigger_spell_id, 0, std::chrono::seconds(cooldown)); - return true; } -bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 cooldown) +bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, AuraEffect* triggeredByAura, SpellInfo const* procSpell) { int32 scriptId = triggeredByAura->GetMiscValue(); @@ -8713,14 +8246,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit* victim, uint32 /*damage*/, Au return false; } - if (cooldown && GetTypeId() == TYPEID_PLAYER && GetSpellHistory()->HasCooldown(triggered_spell_id)) - return false; - CastSpell(victim, triggered_spell_id, true, castItem, triggeredByAura); - - if (cooldown && GetTypeId() == TYPEID_PLAYER) - GetSpellHistory()->AddCooldown(triggered_spell_id, 0, std::chrono::seconds(cooldown)); - return true; } @@ -9073,6 +8599,9 @@ bool Unit::Attack(Unit* victim, bool meleeAttack) ToCreature()->SendAIReaction(AI_REACTION_HOSTILE); ToCreature()->CallAssistance(); + + // Remove emote state - will be restored on creature reset + SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); } // delay offhand weapon attack to next attack time @@ -10739,6 +10268,19 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto if (Player* modOwner = GetSpellModOwner()) modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CRITICAL_CHANCE, crit_chance); + // for this types the bonus was already added in GetUnitCriticalChance, do not add twice + if (spellProto->DmgClass != SPELL_DAMAGE_CLASS_MELEE && spellProto->DmgClass != SPELL_DAMAGE_CLASS_RANGED) + { + AuraEffectList const& critChanceForCaster = victim->GetAuraEffectsByType(SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER); + for (AuraEffect const* aurEff : critChanceForCaster) + { + if (aurEff->GetCasterGUID() != GetGUID() || !aurEff->IsAffectedOnSpell(spellProto)) + continue; + + crit_chance += aurEff->GetAmount(); + } + } + return crit_chance > 0.0f ? crit_chance : 0.0f; } @@ -11874,10 +11416,8 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy) if (enemy) { if (IsAIEnabled) - { creature->AI()->EnterCombat(enemy); - RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); // unit has engaged in combat, remove immunity so players can fight back - } + if (creature->GetFormation()) creature->GetFormation()->MemberAttackStart(creature, enemy); } @@ -11889,7 +11429,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy) UpdateSpeed(MOVE_FLIGHT); } - if (!(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_MOUNTED_COMBAT)) + if (!(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_MOUNTED_COMBAT_ALLOWED)) Dismount(); } @@ -11918,9 +11458,6 @@ void Unit::ClearInCombat() // Player's state will be cleared in Player::UpdateContestedPvP if (Creature* creature = ToCreature()) { - if (creature->GetCreatureTemplate() && creature->GetCreatureTemplate()->unit_flags & UNIT_FLAG_IMMUNE_TO_PC) - SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); // set immunity state to the one from db on evade - ClearUnitState(UNIT_STATE_ATTACK_PLAYER); if (HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED)) SetUInt32Value(UNIT_DYNAMIC_FLAGS, creature->GetCreatureTemplate()->dynamicflags); @@ -11948,7 +11485,7 @@ bool Unit::isTargetableForAttack(bool checkFakeDeath) const return false; if (HasFlag(UNIT_FIELD_FLAGS, - UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC)) + UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE)) return false; if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->IsGameMaster()) @@ -12042,7 +11579,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo } Creature const* creatureAttacker = ToCreature(); - if (creatureAttacker && creatureAttacker->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_PARTY_MEMBER) + if (creatureAttacker && creatureAttacker->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT) return false; // check duel - before sanctuary checks @@ -12126,11 +11663,14 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co // can't assist non-friendly targets if (GetReactionTo(target) < REP_NEUTRAL && target->GetReactionTo(this) < REP_NEUTRAL - && (!ToCreature() || !(ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_PARTY_MEMBER))) + && (!ToCreature() || !(ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT))) return false; + // Controlled player case, we can assist creatures (reaction already checked above, our faction == charmer faction) + if (GetTypeId() == TYPEID_PLAYER && IsCharmed() && GetCharmerGUID().IsCreature()) + return true; // PvP case - if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE)) + else if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE)) { Player const* targetPlayerOwner = target->GetAffectingPlayer(); if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE)) @@ -12160,7 +11700,7 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co && !((target->GetByteValue(UNIT_FIELD_BYTES_2, 1) & UNIT_BYTE2_FLAG_PVP))) { if (Creature const* creatureTarget = target->ToCreature()) - return creatureTarget->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_PARTY_MEMBER || creatureTarget->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_AID_PLAYERS; + return creatureTarget->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT || creatureTarget->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_CAN_ASSIST; } return true; } @@ -12511,7 +12051,7 @@ void Unit::SetSpeedRate(UnitMoveType mtype, float rate) pet->SetSpeedRate(mtype, m_speed_rate[mtype]); } - if (m_movedPlayer) // unit controlled by a player. + if (Player* playerMover = GetPlayerMover()) // unit controlled by a player. { // Send notification to self. this packet is only sent to one client (the client of the player concerned by the change). WorldPacket self; @@ -12521,7 +12061,7 @@ void Unit::SetSpeedRate(UnitMoveType mtype, float rate) if (mtype == MOVE_RUN) self << uint8(1); // unknown byte added in 2.1.0 self << float(GetSpeed(mtype)); - m_movedPlayer->GetSession()->SendPacket(&self); + playerMover->GetSession()->SendPacket(&self); // Send notification to other players. sent to every clients (if in range) except one: the client of the player concerned by the change. WorldPacket data; @@ -12529,7 +12069,7 @@ void Unit::SetSpeedRate(UnitMoveType mtype, float rate) data << GetPackGUID(); BuildMovementPacket(&data); data << float(GetSpeed(mtype)); - SendMessageToSet(&data, false); + playerMover->SendMessageToSet(&data, false); } else // unit controlled by AI. { @@ -12649,7 +12189,7 @@ float Unit::ApplyTotalThreatModifier(float fThreat, SpellSchoolMask schoolMask) void Unit::AddThreat(Unit* victim, float fThreat, SpellSchoolMask schoolMask, SpellInfo const* threatSpell) { // Only mobs can manage threat lists - if (CanHaveThreatList()) + if (CanHaveThreatList() && !HasUnitState(UNIT_STATE_EVADE)) m_ThreatManager.addThreat(victim, fThreat, schoolMask, threatSpell); } @@ -13757,6 +13297,7 @@ void Unit::UpdateCharmAI() if (!newAI) // otherwise, we default to the generic one newAI = new SimpleCharmedPlayerAI(ToPlayer()); i_AI = newAI; + newAI->OnCharmed(true); } else { @@ -14054,6 +13595,20 @@ void CharmInfo::SetSpellAutocast(SpellInfo const* spellInfo, bool state) } } +Unit* Unit::GetMover() const +{ + if (Player const* player = ToPlayer()) + return player->m_mover; + return nullptr; +} + +Player* Unit::GetPlayerMover() const +{ + if (Unit* mover = GetMover()) + return mover->ToPlayer(); + return nullptr; +} + bool Unit::isFrozen() const { return HasAuraState(AURA_STATE_FROZEN); @@ -14254,6 +13809,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u HealInfo healInfo = HealInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL); ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, nullptr, &damageInfo, &healInfo); + std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); ProcTriggeredList procTriggered; // Fill procTriggered list for (AuraApplicationMap::const_iterator itr = GetAppliedAuras().begin(); itr!= GetAppliedAuras().end(); ++itr) @@ -14261,6 +13817,10 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u // Do not allow auras to proc from effect triggered by itself if (procAura && procAura->Id == itr->first) continue; + + if (itr->second->GetBase()->IsProcOnCooldown(now)) + continue; + ProcTriggeredData triggerData(itr->second->GetBase()); // Defensive procs are active on absorbs (so absorption effects are not a hindrance) bool active = damage || (procExtra & PROC_EX_BLOCK && isVictim); @@ -14285,6 +13845,10 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u if (!triggerData.aura->CallScriptCheckProcHandlers(itr->second, eventInfo)) continue; + bool procSuccess = RollProcResult(target, triggerData.aura, attType, isVictim, triggerData.spellProcEvent); + if (!procSuccess) + continue; + // Triggered spells not triggering additional spells bool triggered = !spellProto->HasAttribute(SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED) ? (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) : false; @@ -14337,10 +13901,9 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u bool prepare = i->aura->CallScriptPrepareProcHandlers(aurApp, eventInfo); - // For players set spell cooldown if need - uint32 cooldown = 0; - if (prepare && GetTypeId() == TYPEID_PLAYER && i->spellProcEvent && i->spellProcEvent->cooldown) - cooldown = i->spellProcEvent->cooldown; + Milliseconds cooldown = Milliseconds::zero(); + if (prepare && i->spellProcEvent && i->spellProcEvent->cooldown) + cooldown = Seconds(i->spellProcEvent->cooldown); // Note: must SetCantProc(false) before return if (spellInfo->HasAttribute(SPELL_ATTR3_DISABLE_PROC)) @@ -14349,9 +13912,9 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u bool handled = i->aura->CallScriptProcHandlers(aurApp, eventInfo); // "handled" is needed as long as proc can be handled in multiple places - if (!handled && HandleAuraProc(target, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled)) + if (!handled && HandleAuraProc(target, damage, i->aura, procSpell, procFlag, procExtra, &handled)) { - TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), Id); + TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), Id); takeCharges = true; } @@ -14359,7 +13922,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u { for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS; ++effIndex) { - if (!(i->effMask & (1<<effIndex))) + if (!(i->effMask & (1 << effIndex))) continue; AuraEffect* triggeredByAura = i->aura->GetEffect(effIndex); @@ -14376,9 +13939,10 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u { case SPELL_AURA_PROC_TRIGGER_SPELL: { - TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", + spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId()); // Don`t drop charge or add cooldown for not started trigger - if (HandleProcTriggerSpell(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) + if (HandleProcTriggerSpell(target, damage, triggeredByAura, procSpell, procFlag, procExtra)) takeCharges = true; break; } @@ -14395,7 +13959,8 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u case SPELL_AURA_MANA_SHIELD: case SPELL_AURA_DUMMY: { - TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", + spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId()); if (HandleDummyAuraProc(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) takeCharges = true; break; @@ -14404,20 +13969,22 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u case SPELL_AURA_MOD_SPELL_CRIT_CHANCE: case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN: case SPELL_AURA_MOD_MELEE_HASTE: - TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, isVictim ? "a victim's" : "an attacker's", triggeredByAura->GetId()); + TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", + spellInfo->Id, isVictim ? "a victim's" : "an attacker's", triggeredByAura->GetId()); takeCharges = true; break; case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS: { - TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); - if (HandleOverrideClassScriptAuraProc(target, damage, triggeredByAura, procSpell, cooldown)) + TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", + spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId()); + if (HandleOverrideClassScriptAuraProc(target, damage, triggeredByAura, procSpell)) takeCharges = true; break; } case SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE: { TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)", - (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId()); HandleAuraRaidProcFromChargeWithValue(triggeredByAura); takeCharges = true; @@ -14426,7 +13993,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u case SPELL_AURA_RAID_PROC_FROM_CHARGE: { TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)", - (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId()); HandleAuraRaidProcFromCharge(triggeredByAura); takeCharges = true; @@ -14434,9 +14001,10 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u } case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE: { - TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + TC_LOG_DEBUG("spells", "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", + spellInfo->Id, (isVictim ? "a victim's" : "an attacker's"), triggeredByAura->GetId()); - if (HandleProcTriggerSpell(target, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) + if (HandleProcTriggerSpell(target, damage, triggeredByAura, procSpell, procFlag, procExtra)) takeCharges = true; break; } @@ -14521,6 +14089,9 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u } // for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS; ++effIndex) } // if (!handled) + if (prepare && takeCharges && cooldown != Milliseconds::zero()) + i->aura->AddProcCooldown(now + cooldown); + // Remove charge (aura can be removed by triggers) if (prepare && useCharges && takeCharges) { @@ -14549,6 +14120,8 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u void Unit::GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTriggeringProc, std::list<AuraApplication*>* procAuras, ProcEventInfo eventInfo) { + std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); + // use provided list of auras which can proc if (procAuras) { @@ -14556,9 +14129,9 @@ void Unit::GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTrigge { ASSERT((*itr)->GetTarget() == this); if (!(*itr)->GetRemoveMode()) - if ((*itr)->GetBase()->IsProcTriggeredOnEvent(*itr, eventInfo)) + if ((*itr)->GetBase()->IsProcTriggeredOnEvent(*itr, eventInfo, now)) { - (*itr)->GetBase()->PrepareProcToTrigger(*itr, eventInfo); + (*itr)->GetBase()->PrepareProcToTrigger(*itr, eventInfo, now); aurasTriggeringProc.push_back(*itr); } } @@ -14568,9 +14141,9 @@ void Unit::GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTrigge { for (AuraApplicationMap::iterator itr = GetAppliedAuras().begin(); itr!= GetAppliedAuras().end(); ++itr) { - if (itr->second->GetBase()->IsProcTriggeredOnEvent(itr->second, eventInfo)) + if (itr->second->GetBase()->IsProcTriggeredOnEvent(itr->second, eventInfo, now)) { - itr->second->GetBase()->PrepareProcToTrigger(itr->second, eventInfo); + itr->second->GetBase()->PrepareProcToTrigger(itr->second, eventInfo, now); aurasTriggeringProc.push_back(itr->second); } } @@ -15192,23 +14765,23 @@ bool Unit::InitTamedPet(Pet* pet, uint8 level, uint32 spell_id) return true; } -bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const* & spellProcEvent) +bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const*& spellProcEvent) { - SpellInfo const* spellProto = aura->GetSpellInfo(); + SpellInfo const* spellInfo = aura->GetSpellInfo(); // let the aura be handled by new proc system if it has new entry - if (sSpellMgr->GetSpellProcEntry(spellProto->Id)) + if (sSpellMgr->GetSpellProcEntry(spellInfo->Id)) return false; // Get proc Event Entry - spellProcEvent = sSpellMgr->GetSpellProcEvent(spellProto->Id); + spellProcEvent = sSpellMgr->GetSpellProcEvent(spellInfo->Id); // Get EventProcFlag uint32 EventProcFlag; if (spellProcEvent && spellProcEvent->procFlags) // if exist get custom spellProcEvent->procFlags EventProcFlag = spellProcEvent->procFlags; else - EventProcFlag = spellProto->ProcFlags; // else get from spell proto + EventProcFlag = spellInfo->ProcFlags; // else get from spell proto // Continue if no trigger exist if (!EventProcFlag) return false; @@ -15216,12 +14789,12 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const // Additional checks for triggered spells (ignore trap casts) if (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) { - if (!spellProto->HasAttribute(SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED)) + if (!spellInfo->HasAttribute(SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED)) return false; } // Check spellProcEvent data requirements - if (!sSpellMgr->IsSpellProcEventCanTriggeredBy(spellProto, spellProcEvent, EventProcFlag, procSpell, procFlag, procExtra, active)) + if (!sSpellMgr->IsSpellProcEventCanTriggeredBy(spellInfo, spellProcEvent, EventProcFlag, procSpell, procFlag, procExtra, active)) return false; // In most cases req get honor or XP from kill if (EventProcFlag & PROC_FLAG_KILL && GetTypeId() == TYPEID_PLAYER) @@ -15239,15 +14812,15 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const } // Aura added by spell can`t trigger from self (prevent drop charges/do triggers) // But except periodic and kill triggers (can triggered from self) - if (procSpell && procSpell->Id == spellProto->Id - && !(spellProto->ProcFlags&(PROC_FLAG_TAKEN_PERIODIC | PROC_FLAG_KILL))) + if (procSpell && procSpell->Id == spellInfo->Id + && !(spellInfo->ProcFlags&(PROC_FLAG_TAKEN_PERIODIC | PROC_FLAG_KILL))) return false; // Check if current equipment allows aura to proc if (!isVictim && GetTypeId() == TYPEID_PLAYER) { Player* player = ToPlayer(); - if (spellProto->EquippedItemClass == ITEM_CLASS_WEAPON) + if (spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON) { Item* item = NULL; if (attType == BASE_ATTACK) @@ -15260,19 +14833,26 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const if (player->IsInFeralForm()) return false; - if (!item || item->IsBroken() || item->GetTemplate()->Class != ITEM_CLASS_WEAPON || !((1<<item->GetTemplate()->SubClass) & spellProto->EquippedItemSubClassMask)) + if (!item || item->IsBroken() || item->GetTemplate()->Class != ITEM_CLASS_WEAPON || !((1<<item->GetTemplate()->SubClass) & spellInfo->EquippedItemSubClassMask)) return false; } - else if (spellProto->EquippedItemClass == ITEM_CLASS_ARMOR) + else if (spellInfo->EquippedItemClass == ITEM_CLASS_ARMOR) { // Check if player is wearing shield Item* item = player->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); - if (!item || item->IsBroken() || item->GetTemplate()->Class != ITEM_CLASS_ARMOR || !((1<<item->GetTemplate()->SubClass) & spellProto->EquippedItemSubClassMask)) + if (!item || item->IsBroken() || item->GetTemplate()->Class != ITEM_CLASS_ARMOR || !((1<<item->GetTemplate()->SubClass) & spellInfo->EquippedItemSubClassMask)) return false; } } + + return true; +} + +bool Unit::RollProcResult(Unit* victim, Aura* aura, WeaponAttackType attType, bool isVictim, SpellProcEventEntry const* spellProcEvent) +{ + SpellInfo const* spellInfo = aura->GetSpellInfo(); // Get chance from spell - float chance = float(spellProto->ProcChance); + float chance = float(spellInfo->ProcChance); // If in spellProcEvent exist custom chance, chance = spellProcEvent->customChance; if (spellProcEvent && spellProcEvent->customChance) chance = spellProcEvent->customChance; @@ -15282,19 +14862,18 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const if (!isVictim) { uint32 weaponSpeed = GetAttackTime(attType); - chance = GetPPMProcChance(weaponSpeed, spellProcEvent->ppmRate, spellProto); + chance = GetPPMProcChance(weaponSpeed, spellProcEvent->ppmRate, spellInfo); } else if (victim) { uint32 weaponSpeed = victim->GetAttackTime(attType); - chance = victim->GetPPMProcChance(weaponSpeed, spellProcEvent->ppmRate, spellProto); + chance = victim->GetPPMProcChance(weaponSpeed, spellProcEvent->ppmRate, spellInfo); } } // Apply chance modifer aura if (Player* modOwner = GetSpellModOwner()) - { - modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_CHANCE_OF_SUCCESS, chance); - } + modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_CHANCE_OF_SUCCESS, chance); + return roll_chance_f(chance); } @@ -16025,7 +15604,11 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au { // change AI to charmed AI on next Update tick NeedChangeAI = true; - IsAIEnabled = false; + if (IsAIEnabled) + { + IsAIEnabled = false; + player->AI()->OnCharmed(true); + } } player->SetClientControl(this, false); } @@ -16057,7 +15640,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au case CHARM_TYPE_POSSESS: AddUnitState(UNIT_STATE_POSSESSED); SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); - charmer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + charmer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); playerCharmer->SetClientControl(this, true); playerCharmer->PossessSpellInitialize(); break; @@ -16160,7 +15743,7 @@ void Unit::RemoveCharmedBy(Unit* charmer) case CHARM_TYPE_POSSESS: playerCharmer->SetClientControl(this, false); playerCharmer->SetClientControl(charmer, true); - charmer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + charmer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); ClearUnitState(UNIT_STATE_POSSESSED); break; @@ -16300,8 +15883,8 @@ bool Unit::IsInPartyWith(Unit const* unit) const if (u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_PLAYER) return u1->ToPlayer()->IsInSameGroupWith(u2->ToPlayer()); - else if ((u2->GetTypeId() == TYPEID_PLAYER && u1->GetTypeId() == TYPEID_UNIT && u1->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_PARTY_MEMBER) || - (u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_UNIT && u2->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_PARTY_MEMBER)) + else if ((u2->GetTypeId() == TYPEID_PLAYER && u1->GetTypeId() == TYPEID_UNIT && u1->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT) || + (u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_UNIT && u2->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT)) return true; else return false; @@ -16319,8 +15902,8 @@ bool Unit::IsInRaidWith(Unit const* unit) const if (u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_PLAYER) return u1->ToPlayer()->IsInSameRaidWith(u2->ToPlayer()); - else if ((u2->GetTypeId() == TYPEID_PLAYER && u1->GetTypeId() == TYPEID_UNIT && u1->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_PARTY_MEMBER) || - (u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_UNIT && u2->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_PARTY_MEMBER)) + else if ((u2->GetTypeId() == TYPEID_PLAYER && u1->GetTypeId() == TYPEID_UNIT && u1->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT) || + (u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_UNIT && u2->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT)) return true; else return false; @@ -17202,7 +16785,7 @@ void Unit::_ExitVehicle(Position const* exitPosition) Movement::MoveSplineInit init(this); // Creatures without inhabit type air should begin falling after exiting the vehicle - if (GetTypeId() == TYPEID_UNIT && !CanFly() && height > GetMap()->GetWaterOrGroundLevel(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), &height) + 0.1f) + if (GetTypeId() == TYPEID_UNIT && !CanFly() && height > GetMap()->GetWaterOrGroundLevel(GetPhaseMask(), pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), &height) + 0.1f) init.SetFall(); init.MoveTo(pos.GetPositionX(), pos.GetPositionY(), height, false); @@ -17679,7 +17262,6 @@ bool Unit::SetWalk(bool enable) AddUnitMovementFlag(MOVEMENTFLAG_WALKING); else RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); - return true; } @@ -17694,15 +17276,7 @@ bool Unit::SetDisableGravity(bool disable, bool /*packetOnly = false*/) RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING); } else - { RemoveUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY); - if (!HasUnitMovementFlag(MOVEMENTFLAG_CAN_FLY)) - { - m_movementInfo.SetFallTime(0); - AddUnitMovementFlag(MOVEMENTFLAG_FALLING); - } - } - return true; } @@ -17715,7 +17289,6 @@ bool Unit::SetSwim(bool enable) AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING); else RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING); - return true; } @@ -17730,15 +17303,7 @@ bool Unit::SetCanFly(bool enable, bool /*packetOnly = false */) RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING); } else - { RemoveUnitMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_MASK_MOVING_FLY); - if (!IsLevitating()) - { - m_movementInfo.SetFallTime(0); - AddUnitMovementFlag(MOVEMENTFLAG_FALLING); - } - } - return true; } @@ -17751,7 +17316,6 @@ bool Unit::SetWaterWalking(bool enable, bool /*packetOnly = false */) AddUnitMovementFlag(MOVEMENTFLAG_WATERWALKING); else RemoveUnitMovementFlag(MOVEMENTFLAG_WATERWALKING); - return true; } @@ -17764,7 +17328,6 @@ bool Unit::SetFeatherFall(bool enable, bool /*packetOnly = false */) AddUnitMovementFlag(MOVEMENTFLAG_FALLING_SLOW); else RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING_SLOW); - return true; } @@ -17792,7 +17355,6 @@ bool Unit::SetHover(bool enable, bool /*packetOnly = false*/) UpdateHeight(newZ); } } - return true; } diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index d49d2fd9842..0f48f31b9c0 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -615,7 +615,7 @@ enum UnitFlags : uint32 { UNIT_FLAG_SERVER_CONTROLLED = 0x00000001, // set only when unit movement is controlled by server - by SPLINE/MONSTER_MOVE packets, together with UNIT_FLAG_STUNNED; only set to units controlled by client; client function CGUnit_C::IsClientControlled returns false when set for owner UNIT_FLAG_NON_ATTACKABLE = 0x00000002, // not attackable - UNIT_FLAG_DISABLE_MOVE = 0x00000004, + UNIT_FLAG_REMOVE_CLIENT_CONTROL = 0x00000004, // This is a legacy flag used to disable movement player's movement while controlling other units, SMSG_CLIENT_CONTROL replaces this functionality clientside now. CONFUSED and FLEEING flags have the same effect on client movement asDISABLE_MOVE_CONTROL in addition to preventing spell casts/autoattack (they all allow climbing steeper hills and emotes while moving) UNIT_FLAG_PVP_ATTACKABLE = 0x00000008, // allow apply pvp rules to attackable state in addition to faction dependent state UNIT_FLAG_RENAME = 0x00000010, UNIT_FLAG_PREPARATION = 0x00000020, // don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_WHILE_PREP @@ -627,7 +627,7 @@ enum UnitFlags : uint32 UNIT_FLAG_PET_IN_COMBAT = 0x00000800, // in combat?, 2.0.8 UNIT_FLAG_PVP = 0x00001000, // changed in 3.0.3 UNIT_FLAG_SILENCED = 0x00002000, // silenced, 2.1.1 - UNIT_FLAG_UNK_14 = 0x00004000, // 2.0.8 + UNIT_FLAG_CANNOT_SWIM = 0x00004000, // 2.0.8 UNIT_FLAG_UNK_15 = 0x00008000, UNIT_FLAG_UNK_16 = 0x00010000, UNIT_FLAG_PACIFIED = 0x00020000, // 3.0.3 ok @@ -739,14 +739,13 @@ enum MovementFlags MOVEMENTFLAG_FALLING_SLOW = 0x20000000, // active rogue safe fall spell (passive) MOVEMENTFLAG_HOVER = 0x40000000, // hover, cannot jump - /// @todo Check if PITCH_UP and PITCH_DOWN really belong here.. MOVEMENTFLAG_MASK_MOVING = MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_BACKWARD | MOVEMENTFLAG_STRAFE_LEFT | MOVEMENTFLAG_STRAFE_RIGHT | - MOVEMENTFLAG_PITCH_UP | MOVEMENTFLAG_PITCH_DOWN | MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_FAR | MOVEMENTFLAG_ASCENDING | MOVEMENTFLAG_DESCENDING | + MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_FAR | MOVEMENTFLAG_ASCENDING | MOVEMENTFLAG_DESCENDING | MOVEMENTFLAG_SPLINE_ELEVATION, MOVEMENTFLAG_MASK_TURNING = - MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT, + MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT | MOVEMENTFLAG_PITCH_UP | MOVEMENTFLAG_PITCH_DOWN, MOVEMENTFLAG_MASK_MOVING_FLY = MOVEMENTFLAG_FLYING | MOVEMENTFLAG_ASCENDING | MOVEMENTFLAG_DESCENDING, @@ -1290,9 +1289,8 @@ class TC_GAME_API Unit : public WorldObject bool CanDualWield() const { return m_canDualWield; } virtual void SetCanDualWield(bool value) { m_canDualWield = value; } float GetCombatReach() const { return m_floatValues[UNIT_FIELD_COMBATREACH]; } - float GetMeleeReach() const; bool IsWithinCombatRange(const Unit* obj, float dist2compare) const; - bool IsWithinMeleeRange(const Unit* obj, float dist = MELEE_RANGE) const; + bool IsWithinMeleeRange(Unit const* obj) const; void GetRandomContactPoint(const Unit* target, float &x, float &y, float &z, float distance2dMin, float distance2dMax) const; uint32 m_extraAttacks; bool m_canDualWield; @@ -1685,7 +1683,8 @@ class TC_GAME_API Unit : public WorldObject CharmInfo* InitCharmInfo(); void DeleteCharmInfo(); void UpdateCharmAI(); - //Player* GetMoverSource() const; + Unit* GetMover() const; + Player* GetPlayerMover() const; Player* m_movedPlayer; SharedVisionList const& GetSharedVisionList() { return m_sharedVision; } void AddPlayerToVision(Player* player); @@ -1858,6 +1857,9 @@ class TC_GAME_API Unit : public WorldObject Spell* FindCurrentSpellBySpellId(uint32 spell_id) const; int32 GetCurrentSpellCastTime(uint32 spell_id) const; + // Check if our current channel spell has attribute SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING + bool CanMoveDuringChannel() const; + SpellHistory* GetSpellHistory() { return m_spellHistory; } SpellHistory const* GetSpellHistory() const { return m_spellHistory; } @@ -2252,11 +2254,12 @@ class TC_GAME_API Unit : public WorldObject void DisableSpline(); private: - bool IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const* & spellProcEvent); - bool HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); - bool HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled); - bool HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); - bool HandleOverrideClassScriptAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 cooldown); + bool IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const*& spellProcEvent); + bool RollProcResult(Unit* victim, Aura* aura, WeaponAttackType attType, bool isVictim, SpellProcEventEntry const* spellProcEvent); + bool HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, Milliseconds& cooldown); + bool HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, bool* handled); + bool HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx); + bool HandleOverrideClassScriptAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell); bool HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura); bool HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura); diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index 9cf485322f2..1c5299f4798 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -238,7 +238,7 @@ void Vehicle::RemoveAllPassengers() while (!_pendingJoinEvents.empty()) { VehicleJoinEvent* e = _pendingJoinEvents.front(); - e->to_Abort = true; + e->ScheduleAbort(); e->Target = eventVehicle; _pendingJoinEvents.pop_front(); } @@ -429,7 +429,7 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId) if (seat == Seats.end()) // no available seat { - e->to_Abort = true; + e->ScheduleAbort(); return false; } @@ -441,7 +441,7 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId) seat = Seats.find(seatId); if (seat == Seats.end()) { - e->to_Abort = true; + e->ScheduleAbort(); return false; } @@ -532,6 +532,9 @@ void Vehicle::RelocatePassengers() { ASSERT(_me->GetMap()); + std::vector<std::pair<Unit*, Position>> seatRelocation; + seatRelocation.reserve(Seats.size()); + // not sure that absolute position calculation is correct, it must depend on vehicle pitch angle for (SeatMap::const_iterator itr = Seats.begin(); itr != Seats.end(); ++itr) { @@ -542,9 +545,12 @@ void Vehicle::RelocatePassengers() float px, py, pz, po; passenger->m_movementInfo.transport.pos.GetPosition(px, py, pz, po); CalculatePassengerPosition(px, py, pz, &po); - passenger->UpdatePosition(px, py, pz, po); + seatRelocation.emplace_back(passenger, Position(px, py, pz, po)); } } + + for (auto const& pair : seatRelocation) + pair.first->UpdatePosition(pair.second); } /** @@ -701,7 +707,7 @@ void Vehicle::RemovePendingEventsForSeat(int8 seatId) { if ((*itr)->Seat->first == seatId) { - (*itr)->to_Abort = true; + (*itr)->ScheduleAbort(); _pendingJoinEvents.erase(itr++); } else @@ -726,7 +732,7 @@ void Vehicle::RemovePendingEventsForPassenger(Unit* passenger) { if ((*itr)->Passenger == passenger) { - (*itr)->to_Abort = true; + (*itr)->ScheduleAbort(); _pendingJoinEvents.erase(itr++); } else diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index fc0abf5a8c7..bbd0cee2a51 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -473,7 +473,7 @@ void ObjectMgr::LoadCreatureTemplate(Field* fields) creatureTemplate.unit_flags = fields[29].GetUInt32(); creatureTemplate.unit_flags2 = fields[30].GetUInt32(); creatureTemplate.dynamicflags = fields[31].GetUInt32(); - creatureTemplate.family = fields[32].GetUInt8(); + creatureTemplate.family = CreatureFamily(fields[32].GetUInt8()); creatureTemplate.trainer_type = fields[33].GetUInt8(); creatureTemplate.trainer_spell = fields[34].GetUInt32(); creatureTemplate.trainer_class = fields[35].GetUInt8(); @@ -888,7 +888,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) if (cInfo->family && !sCreatureFamilyStore.LookupEntry(cInfo->family) && cInfo->family != CREATURE_FAMILY_HORSE_CUSTOM) { TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has invalid creature family (%u) in `family`.", cInfo->Entry, cInfo->family); - const_cast<CreatureTemplate*>(cInfo)->family = 0; + const_cast<CreatureTemplate*>(cInfo)->family = CREATURE_FAMILY_NONE; } if (cInfo->InhabitType <= 0 || cInfo->InhabitType > INHABIT_ANYWHERE) @@ -1050,8 +1050,8 @@ void ObjectMgr::LoadGameObjectAddons() { uint32 oldMSTime = getMSTime(); - // 0 1 2 - QueryResult result = WorldDatabase.Query("SELECT guid, invisibilityType, invisibilityValue FROM gameobject_addon"); + // 0 1 2 3 4 5 6 + QueryResult result = WorldDatabase.Query("SELECT guid, parent_rotation0, parent_rotation1, parent_rotation2, parent_rotation3, invisibilityType, invisibilityValue FROM gameobject_addon"); if (!result) { @@ -1066,7 +1066,7 @@ void ObjectMgr::LoadGameObjectAddons() ObjectGuid::LowType guid = fields[0].GetUInt32(); - const GameObjectData* goData = GetGOData(guid); + GameObjectData const* goData = GetGOData(guid); if (!goData) { TC_LOG_ERROR("sql.sql", "GameObject (GUID: %u) does not exist but has a record in `gameobject_addon`", guid); @@ -1074,12 +1074,13 @@ void ObjectMgr::LoadGameObjectAddons() } GameObjectAddon& gameObjectAddon = _gameObjectAddonStore[guid]; - gameObjectAddon.invisibilityType = InvisibilityType(fields[1].GetUInt8()); - gameObjectAddon.InvisibilityValue = fields[2].GetUInt32(); + gameObjectAddon.ParentRotation = G3D::Quat(fields[1].GetFloat(), fields[2].GetFloat(), fields[3].GetFloat(), fields[4].GetFloat()); + gameObjectAddon.invisibilityType = InvisibilityType(fields[5].GetUInt8()); + gameObjectAddon.InvisibilityValue = fields[6].GetUInt32(); if (gameObjectAddon.invisibilityType >= TOTAL_INVISIBILITY_TYPES) { - TC_LOG_ERROR("sql.sql", "GameObject (GUID: %u) has invalid InvisibilityType in `gameobject_addon`", guid); + TC_LOG_ERROR("sql.sql", "GameObject (GUID: %u) has invalid InvisibilityType in `gameobject_addon`, disabled invisibility", guid); gameObjectAddon.invisibilityType = INVISIBILITY_GENERAL; gameObjectAddon.InvisibilityValue = 0; } @@ -1090,6 +1091,12 @@ void ObjectMgr::LoadGameObjectAddons() gameObjectAddon.InvisibilityValue = 1; } + if (!gameObjectAddon.ParentRotation.isUnit()) + { + TC_LOG_ERROR("sql.sql", "GameObject (GUID: %u) has invalid path rotation, set to default", guid); + gameObjectAddon.ParentRotation = G3D::Quat(); + } + ++count; } while (result->NextRow()); @@ -1883,10 +1890,10 @@ ObjectGuid::LowType ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, fl data.posY = y; data.posZ = z; data.orientation = o; - data.rotation0 = rotation0; - data.rotation1 = rotation1; - data.rotation2 = rotation2; - data.rotation3 = rotation3; + data.rotation.x = rotation0; + data.rotation.y = rotation1; + data.rotation.z = rotation2; + data.rotation.w = rotation3; data.spawntimesecs = spawntimedelay; data.animprogress = 100; data.spawnMask = 1; @@ -2036,10 +2043,10 @@ void ObjectMgr::LoadGameobjects() data.posY = fields[4].GetFloat(); data.posZ = fields[5].GetFloat(); data.orientation = fields[6].GetFloat(); - data.rotation0 = fields[7].GetFloat(); - data.rotation1 = fields[8].GetFloat(); - data.rotation2 = fields[9].GetFloat(); - data.rotation3 = fields[10].GetFloat(); + data.rotation.x = fields[7].GetFloat(); + data.rotation.y = fields[8].GetFloat(); + data.rotation.z = fields[9].GetFloat(); + data.rotation.w = fields[10].GetFloat(); data.spawntimesecs = fields[11].GetInt32(); MapEntry const* mapEntry = sMapStore.LookupEntry(data.mapid); @@ -2080,15 +2087,27 @@ void ObjectMgr::LoadGameobjects() data.orientation = Position::NormalizeOrientation(data.orientation); } - if (data.rotation2 < -1.0f || data.rotation2 > 1.0f) + if (data.rotation.x < -1.0f || data.rotation.x > 1.0f) + { + TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotationX (%f) value, skip", guid, data.id, data.rotation.x); + continue; + } + + if (data.rotation.y < -1.0f || data.rotation.y > 1.0f) + { + TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotationY (%f) value, skip", guid, data.id, data.rotation.y); + continue; + } + + if (data.rotation.z < -1.0f || data.rotation.z > 1.0f) { - TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation2 (%f) value, skip", guid, data.id, data.rotation2); + TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotationZ (%f) value, skip", guid, data.id, data.rotation.z); continue; } - if (data.rotation3 < -1.0f || data.rotation3 > 1.0f) + if (data.rotation.w < -1.0f || data.rotation.w > 1.0f) { - TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation3 (%f) value, skip", guid, data.id, data.rotation3); + TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotationW (%f) value, skip", guid, data.id, data.rotation.w); continue; } @@ -2178,26 +2197,12 @@ ObjectGuid ObjectMgr::GetPlayerGUIDByName(std::string const& name) const bool ObjectMgr::GetPlayerNameByGUID(ObjectGuid guid, std::string& name) const { - // prevent DB access for online player - if (Player* player = ObjectAccessor::FindConnectedPlayer(guid)) - { - name = player->GetName(); - return true; - } - - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_NAME); - - stmt->setUInt32(0, guid.GetCounter()); - - PreparedQueryResult result = CharacterDatabase.Query(stmt); - - if (result) - { - name = (*result)[0].GetString(); - return true; - } + CharacterInfo const* characterInfo = sWorld->GetCharacterInfo(guid); + if (!characterInfo) + return false; - return false; + name = characterInfo->Name; + return true; } uint32 ObjectMgr::GetPlayerTeamByGUID(ObjectGuid guid) const @@ -3529,6 +3534,61 @@ void ObjectMgr::LoadPlayerInfo() } } + // Load playercreate cast spell + TC_LOG_INFO("server.loading", "Loading Player Create Cast Spell Data..."); + { + uint32 oldMSTime = getMSTime(); + + QueryResult result = WorldDatabase.PQuery("SELECT raceMask, classMask, spell FROM playercreateinfo_cast_spell"); + + if (!result) + TC_LOG_ERROR("server.loading", ">> Loaded 0 player create cast spells. DB table `playercreateinfo_cast_spell` is empty."); + else + { + uint32 count = 0; + + do + { + Field* fields = result->Fetch(); + uint32 raceMask = fields[0].GetUInt32(); + uint32 classMask = fields[1].GetUInt32(); + uint32 spellId = fields[2].GetUInt32(); + + if (raceMask != 0 && !(raceMask & RACEMASK_ALL_PLAYABLE)) + { + TC_LOG_ERROR("sql.sql", "Wrong race mask %u in `playercreateinfo_cast_spell` table, ignoring.", raceMask); + continue; + } + + if (classMask != 0 && !(classMask & CLASSMASK_ALL_PLAYABLE)) + { + TC_LOG_ERROR("sql.sql", "Wrong class mask %u in `playercreateinfo_cast_spell` table, ignoring.", classMask); + continue; + } + + for (uint32 raceIndex = RACE_HUMAN; raceIndex < MAX_RACES; ++raceIndex) + { + if (raceMask == 0 || ((1 << (raceIndex - 1)) & raceMask)) + { + for (uint32 classIndex = CLASS_WARRIOR; classIndex < MAX_CLASSES; ++classIndex) + { + if (classMask == 0 || ((1 << (classIndex - 1)) & classMask)) + { + if (PlayerInfo* info = _playerInfo[raceIndex][classIndex]) + { + info->castSpells.push_back(spellId); + ++count; + } + } + } + } + } + } while (result->NextRow()); + + TC_LOG_INFO("server.loading", ">> Loaded %u player create cast spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + } + } + // Load playercreate actions TC_LOG_INFO("server.loading", "Loading Player Create Action Data..."); { @@ -4056,8 +4116,8 @@ void ObjectMgr::LoadQuests() // Load `quest_template_addon` // 0 1 2 3 4 5 6 7 8 result = WorldDatabase.Query("SELECT ID, MaxLevel, AllowableClasses, SourceSpellID, PrevQuestID, NextQuestID, ExclusiveGroup, RewardMailTemplateID, RewardMailDelay, " - //9 10 11 12 13 14 15 16 - "RequiredSkillID, RequiredSkillPoints, RequiredMinRepFaction, RequiredMaxRepFaction, RequiredMinRepValue, RequiredMaxRepValue, ProvidedItemCount, SpecialFlags FROM quest_template_addon"); + //9 10 11 12 13 14 15 16 17 + "RequiredSkillID, RequiredSkillPoints, RequiredMinRepFaction, RequiredMaxRepFaction, RequiredMinRepValue, RequiredMaxRepValue, ProvidedItemCount, RewardMailSenderEntry, SpecialFlags FROM quest_template_addon LEFT JOIN quest_mail_sender ON Id=QuestId"); if (!result) { @@ -4561,6 +4621,7 @@ void ObjectMgr::LoadQuests() qinfo->GetQuestId(), qinfo->RewardMailTemplateId, qinfo->RewardMailTemplateId); qinfo->RewardMailTemplateId = 0; // no mail will send to player qinfo->RewardMailDelay = 0; // no mail will send to player + qinfo->RewardMailSenderEntry = 0; } else if (usedMailTemplates.find(qinfo->RewardMailTemplateId) != usedMailTemplates.end()) { @@ -4569,6 +4630,7 @@ void ObjectMgr::LoadQuests() qinfo->GetQuestId(), qinfo->RewardMailTemplateId, qinfo->RewardMailTemplateId, used_mt_itr->second); qinfo->RewardMailTemplateId = 0; // no mail will send to player qinfo->RewardMailDelay = 0; // no mail will send to player + qinfo->RewardMailSenderEntry = 0; } else usedMailTemplates[qinfo->RewardMailTemplateId] = qinfo->GetQuestId(); @@ -5946,14 +6008,14 @@ void ObjectMgr::LoadGraveyardZones() { uint32 oldMSTime = getMSTime(); - GraveYardStore.clear(); // need for reload case + GraveYardStore.clear(); // need for reload case - // 0 1 2 - QueryResult result = WorldDatabase.Query("SELECT id, ghost_zone, faction FROM game_graveyard_zone"); + // 0 1 2 + QueryResult result = WorldDatabase.Query("SELECT ID, GhostZone, Faction FROM graveyard_zone"); if (!result) { - TC_LOG_INFO("server.loading", ">> Loaded 0 graveyard-zone links. DB table `game_graveyard_zone` is empty."); + TC_LOG_INFO("server.loading", ">> Loaded 0 graveyard-zone links. DB table `graveyard_zone` is empty."); return; } @@ -5972,31 +6034,31 @@ void ObjectMgr::LoadGraveyardZones() WorldSafeLocsEntry const* entry = sWorldSafeLocsStore.LookupEntry(safeLocId); if (!entry) { - TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a record for not existing graveyard (WorldSafeLocs.dbc id) %u, skipped.", safeLocId); + TC_LOG_ERROR("sql.sql", "Table `graveyard_zone` has a record for non-existing graveyard (WorldSafeLocsID: %u), skipped.", safeLocId); continue; } AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(zoneId); if (!areaEntry) { - TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a record for not existing zone id (%u), skipped.", zoneId); + TC_LOG_ERROR("sql.sql", "Table `graveyard_zone` has a record for non-existing Zone (ID: %u), skipped.", zoneId); continue; } if (areaEntry->zone != 0) { - TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a record for subzone id (%u) instead of zone, skipped.", zoneId); + TC_LOG_ERROR("sql.sql", "Table `graveyard_zone` has a record for SubZone (ID: %u) instead of zone, skipped.", zoneId); continue; } if (team != 0 && team != HORDE && team != ALLIANCE) { - TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a record for non player faction (%u), skipped.", team); + TC_LOG_ERROR("sql.sql", "Table `graveyard_zone` has a record for non player faction (%u), skipped.", team); continue; } if (!AddGraveYardLink(safeLocId, zoneId, team, false)) - TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has a duplicate record for Graveyard (ID: %u) and Zone (ID: %u), skipped.", safeLocId, zoneId); + TC_LOG_ERROR("sql.sql", "Table `graveyard_zone` has a duplicate record for Graveyard (ID: %u) and Zone (ID: %u), skipped.", safeLocId, zoneId); } while (result->NextRow()); TC_LOG_INFO("server.loading", ">> Loaded %u graveyard-zone links in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); @@ -6045,7 +6107,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float if (range.first == range.second && !map->IsBattlegroundOrArena()) { if (zoneId != 0) // zone == 0 can't be fixed, used by bliz for bugged zones - TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team); + TC_LOG_ERROR("sql.sql", "Table `graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team); return GetDefaultGraveYard(team); } @@ -6071,7 +6133,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float WorldSafeLocsEntry const* entry = sWorldSafeLocsStore.LookupEntry(data.safeLocId); if (!entry) { - TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` has record for not existing graveyard (WorldSafeLocs.dbc id) %u, skipped.", data.safeLocId); + TC_LOG_ERROR("sql.sql", "Table `graveyard_zone` has record for not existing graveyard (WorldSafeLocsID %u), skipped.", data.safeLocId); continue; } @@ -6186,7 +6248,7 @@ void ObjectMgr::RemoveGraveYardLink(uint32 id, uint32 zoneId, uint32 team, bool GraveYardMapBoundsNonConst range = GraveYardStore.equal_range(zoneId); if (range.first == range.second) { - //TC_LOG_ERROR("sql.sql", "Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team); + //TC_LOG_ERROR("sql.sql", "Table `graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team); return; } @@ -6494,7 +6556,7 @@ uint32 ObjectMgr::GenerateAuctionID() { if (_auctionId >= 0xFFFFFFFE) { - TC_LOG_ERROR("misc", "Auctions ids overflow!! Can't continue, shutting down server. "); + TC_LOG_ERROR("misc", "Auctions ids overflow!! Can't continue, shutting down server. Search on forum for TCE00007 for more info. "); World::StopNow(ERROR_EXIT_CODE); } return _auctionId++; @@ -6504,7 +6566,7 @@ uint64 ObjectMgr::GenerateEquipmentSetGuid() { if (_equipmentSetGuid >= uint64(0xFFFFFFFFFFFFFFFELL)) { - TC_LOG_ERROR("misc", "EquipmentSet guid overflow!! Can't continue, shutting down server. "); + TC_LOG_ERROR("misc", "EquipmentSet guid overflow!! Can't continue, shutting down server. Search on forum for TCE00007 for more info. "); World::StopNow(ERROR_EXIT_CODE); } return _equipmentSetGuid++; @@ -6514,7 +6576,7 @@ uint32 ObjectMgr::GenerateMailID() { if (_mailId >= 0xFFFFFFFE) { - TC_LOG_ERROR("misc", "Mail ids overflow!! Can't continue, shutting down server. "); + TC_LOG_ERROR("misc", "Mail ids overflow!! Can't continue, shutting down server. Search on forum for TCE00007 for more info. "); World::StopNow(ERROR_EXIT_CODE); } return _mailId++; @@ -6524,7 +6586,7 @@ uint32 ObjectMgr::GeneratePetNumber() { if (_hiPetNumber >= 0xFFFFFFFE) { - TC_LOG_ERROR("misc", "_hiPetNumber Id overflow!! Can't continue, shutting down server. "); + TC_LOG_ERROR("misc", "_hiPetNumber Id overflow!! Can't continue, shutting down server. Search on forum for TCE00007 for more info."); World::StopNow(ERROR_EXIT_CODE); } return _hiPetNumber++; @@ -6534,7 +6596,7 @@ uint32 ObjectMgr::GenerateCreatureSpawnId() { if (_creatureSpawnId >= uint32(0xFFFFFF)) { - TC_LOG_ERROR("misc", "Creature spawn id overflow!! Can't continue, shutting down server. "); + TC_LOG_ERROR("misc", "Creature spawn id overflow!! Can't continue, shutting down server. Search on forum for TCE00007 for more info."); World::StopNow(ERROR_EXIT_CODE); } return _creatureSpawnId++; @@ -6544,7 +6606,7 @@ uint32 ObjectMgr::GenerateGameObjectSpawnId() { if (_gameObjectSpawnId >= uint32(0xFFFFFF)) { - TC_LOG_ERROR("misc", "Creature spawn id overflow!! Can't continue, shutting down server. "); + TC_LOG_ERROR("misc", "Creature spawn id overflow!! Can't continue, shutting down server. Search on forum for TCE00007 for more info. "); World::StopNow(ERROR_EXIT_CODE); } return _gameObjectSpawnId++; @@ -7639,7 +7701,7 @@ ResponseCodes ObjectMgr::CheckPlayerName(std::string const& name, LocaleConstant if (wname[i] == wname[i-1] && wname[i] == wname[i-2]) return CHAR_NAME_THREE_CONSECUTIVE; - return ValidateName(name, locale); + return ValidateName(wname, locale); } bool ObjectMgr::IsValidCharterName(const std::string& name) @@ -7677,7 +7739,7 @@ PetNameInvalidReason ObjectMgr::CheckPetName(const std::string& name, LocaleCons if (!isValidString(wname, strictMask, false)) return PET_NAME_MIXED_LANGUAGES; - switch (ValidateName(name, locale)) + switch (ValidateName(wname, locale)) { case CHAR_NAME_PROFANE: return PET_NAME_PROFANE; @@ -7763,7 +7825,7 @@ bool ObjectMgr::LoadTrinityStrings() QueryResult result = WorldDatabase.Query("SELECT entry, content_default, content_loc1, content_loc2, content_loc3, content_loc4, content_loc5, content_loc6, content_loc7, content_loc8 FROM trinity_string"); if (!result) { - TC_LOG_ERROR("server.loading", ">> Loaded 0 trinity strings. DB table `trinity_string` is empty."); + TC_LOG_ERROR("server.loading", ">> Loaded 0 trinity strings. DB table `trinity_string` is empty. You have imported an incorrect database for more info search for TCE00003 on forum."); return false; } diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 576a8d2ccac..f06c9faf58b 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -28,7 +28,7 @@ #include "TemporarySummon.h" #include "Corpse.h" #include "QuestDef.h" -#include "ItemPrototype.h" +#include "ItemTemplate.h" #include "NPCHandler.h" #include "DatabaseEnv.h" #include "Mail.h" diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 84aa29f96b7..5283805c59d 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -620,6 +620,9 @@ namespace Trinity if (go->GetGOInfo()->spellFocus.focusId != i_focusId) return false; + if (!go->isSpawned()) + return false; + float dist = go->GetGOInfo()->spellFocus.dist / 2.f; return go->IsWithinDistInMap(i_unit, dist); @@ -1237,7 +1240,7 @@ namespace Trinity AllGameObjectsWithEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) { } bool operator() (GameObject* go) { - if (go->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(go, m_fRange, false)) + if ((!m_uiEntry || go->GetEntry() == m_uiEntry) && m_pObject->IsWithinDist(go, m_fRange, false)) return true; return false; @@ -1254,7 +1257,7 @@ namespace Trinity AllCreaturesOfEntryInRange(const WorldObject* object, uint32 entry, float maxRange) : m_pObject(object), m_uiEntry(entry), m_fRange(maxRange) { } bool operator() (Unit* unit) { - if (unit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(unit, m_fRange, false)) + if ((!m_uiEntry || unit->GetEntry() == m_uiEntry) && m_pObject->IsWithinDist(unit, m_fRange, false)) return true; return false; diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 87494e78a28..121afc014ce 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1443,17 +1443,17 @@ void Guild::HandleSetBankTabInfo(WorldSession* session, uint8 tabId, std::string _BroadcastEvent(GE_BANK_TAB_UPDATED, ObjectGuid::Empty, aux, name.c_str(), icon.c_str()); } -void Guild::HandleSetMemberNote(WorldSession* session, std::string const& name, std::string const& note, bool isPublic) +void Guild::HandleSetMemberNote(WorldSession* session, std::string const& name, std::string const& note, bool officer) { // Player must have rights to set public/officer note - if (!_HasRankRight(session->GetPlayer(), isPublic ? GR_RIGHT_EPNOTE : GR_RIGHT_EOFFNOTE)) + if (!_HasRankRight(session->GetPlayer(), officer ? GR_RIGHT_EOFFNOTE : GR_RIGHT_EPNOTE)) SendCommandResult(session, GUILD_COMMAND_PUBLIC_NOTE, ERR_GUILD_PERMISSIONS); else if (Member* member = GetMember(name)) { - if (isPublic) - member->SetPublicNote(note); - else + if (officer) member->SetOfficerNote(note); + else + member->SetPublicNote(note); HandleRoster(session); } diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp index e91da35c06b..55bfb93c1c4 100644 --- a/src/server/game/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Handlers/BattleGroundHandler.cpp @@ -777,7 +777,7 @@ void WorldSession::HandleReportPvPAFK(WorldPacket& recvData) if (!reportedPlayer) { - TC_LOG_DEBUG("bg.battleground", "WorldSession::HandleReportPvPAFK: player not found"); + TC_LOG_INFO("bg.reportpvpafk", "WorldSession::HandleReportPvPAFK: %s [IP: %s] reported %s [IP: %s]", _player->GetName().c_str(), _player->GetSession()->GetRemoteAddress().c_str(), reportedPlayer->GetName().c_str(), reportedPlayer->GetSession()->GetRemoteAddress().c_str()); return; } diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 19638ec1bf8..812a828ddce 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -45,6 +45,7 @@ #include "World.h" #include "WorldPacket.h" #include "WorldSession.h" +#include "Metric.h" class LoginQueryHolder : public SQLQueryHolder @@ -686,17 +687,17 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData) return; } - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DATA_BY_GUID); - stmt->setUInt32(0, guid.GetCounter()); - - if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) + CharacterInfo const* characterInfo = sWorld->GetCharacterInfo(guid); + if (!characterInfo) { - Field* fields = result->Fetch(); - accountId = fields[0].GetUInt32(); - name = fields[1].GetString(); - level = fields[2].GetUInt8(); + sScriptMgr->OnPlayerFailedDelete(guid, initAccountId); + return; } + accountId = characterInfo->AccountId; + name = characterInfo->Name; + level = characterInfo->Level; + // prevent deleting other players' characters using cheating tools if (accountId != initAccountId) { @@ -969,8 +970,14 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) bool firstLogin = pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST); if (firstLogin) + { pCurrChar->RemoveAtLoginFlag(AT_LOGIN_FIRST); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(pCurrChar->getRace(), pCurrChar->getClass()); + for (uint32 spellId : info->castSpells) + pCurrChar->CastSpell(pCurrChar, spellId, true); + } + // show time before shutdown if shutdown planned. if (sWorld->IsShuttingDown()) sWorld->ShutdownMsg(true, pCurrChar); @@ -995,6 +1002,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) sScriptMgr->OnPlayerLogin(pCurrChar, firstLogin); + TC_METRIC_EVENT("player_events", "Login", pCurrChar->GetName()); + delete holder; } @@ -1361,6 +1370,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData) uint8 plrRace = fields[0].GetUInt8(); uint8 plrClass = fields[1].GetUInt8(); uint8 plrGender = fields[2].GetUInt8(); + std::string oldName = fields[4].GetString(); if (!Player::ValidateAppearance(plrRace, plrClass, plrGender, customizeInfo.HairStyle, customizeInfo.HairColor, customizeInfo.Face, customizeInfo.FacialHair, customizeInfo.Skin, true)) { @@ -1389,6 +1399,13 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData) return; } + // prevent character rename + if (sWorld->getBoolConfig(CONFIG_PREVENT_RENAME_CUSTOMIZATION) && (customizeInfo.Name != oldName)) + { + SendCharCustomize(CHAR_NAME_FAILURE, customizeInfo); + return; + } + // prevent character rename to invalid name if (!normalizePlayerName(customizeInfo.Name)) { @@ -1420,17 +1437,6 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData) } } - stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_NAME); - stmt->setUInt32(0, customizeInfo.Guid.GetCounter()); - result = CharacterDatabase.Query(stmt); - - if (result) - { - std::string oldname = result->Fetch()[0].GetString(); - TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s), Character[%s] (%s) Customized to: %s", - GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), customizeInfo.Guid.ToString().c_str(), customizeInfo.Name.c_str()); - } - SQLTransaction trans = CharacterDatabase.BeginTransaction(); Player::Customize(&customizeInfo, trans); @@ -1452,6 +1458,9 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData) sWorld->UpdateCharacterInfo(customizeInfo.Guid, customizeInfo.Name, customizeInfo.Gender); SendCharCustomize(RESPONSE_SUCCESS, customizeInfo); + + TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s), Character[%s] (%s) Customized to: %s", + GetAccountId(), GetRemoteAddress().c_str(), oldName.c_str(), customizeInfo.Guid.ToString().c_str(), customizeInfo.Name.c_str()); } void WorldSession::HandleEquipmentSetSave(WorldPacket& recvData) @@ -1605,6 +1614,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData) return; } + std::string oldName = nameData->Name; uint8 oldRace = nameData->Race; uint8 playerClass = nameData->Class; uint8 level = nameData->Level; @@ -1647,6 +1657,13 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData) } } + // prevent character rename + if (sWorld->getBoolConfig(CONFIG_PREVENT_RENAME_CUSTOMIZATION) && (factionChangeInfo.Name != oldName)) + { + SendCharFactionChange(CHAR_NAME_FAILURE, factionChangeInfo); + return; + } + // prevent character rename to invalid name if (!normalizePlayerName(factionChangeInfo.Name)) { diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index 346adf6f091..2d94d423142 100644 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -239,8 +239,6 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) switch (type) { case CHAT_MSG_SAY: - case CHAT_MSG_EMOTE: - case CHAT_MSG_YELL: { // Prevent cheating if (!sender->IsAlive()) @@ -252,13 +250,39 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) return; } - if (type == CHAT_MSG_SAY) - sender->Say(msg, Language(lang)); - else if (type == CHAT_MSG_EMOTE) - sender->TextEmote(msg); - else if (type == CHAT_MSG_YELL) - sender->Yell(msg, Language(lang)); - } break; + sender->Say(msg, Language(lang)); + break; + } + case CHAT_MSG_EMOTE: + { + // Prevent cheating + if (!sender->IsAlive()) + return; + + if (sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_EMOTE_LEVEL_REQ)) + { + SendNotification(GetTrinityString(LANG_SAY_REQ), sWorld->getIntConfig(CONFIG_CHAT_EMOTE_LEVEL_REQ)); + return; + } + + sender->TextEmote(msg); + break; + } + case CHAT_MSG_YELL: + { + // Prevent cheating + if (!sender->IsAlive()) + return; + + if (sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_YELL_LEVEL_REQ)) + { + SendNotification(GetTrinityString(LANG_SAY_REQ), sWorld->getIntConfig(CONFIG_CHAT_YELL_LEVEL_REQ)); + return; + } + + sender->Yell(msg, Language(lang)); + break; + } case CHAT_MSG_WHISPER: { if (!normalizePlayerName(to)) @@ -298,7 +322,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) sender->AddWhisperWhiteList(receiver->GetGUID()); GetPlayer()->Whisper(msg, Language(lang), receiver); - } break; + break; + } case CHAT_MSG_PARTY: case CHAT_MSG_PARTY_LEADER: { @@ -319,7 +344,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) WorldPacket data; ChatHandler::BuildChatPacket(data, ChatMsg(type), Language(lang), sender, NULL, msg); group->BroadcastPacket(&data, false, group->GetMemberGroup(GetPlayer()->GetGUID())); - } break; + break; + } case CHAT_MSG_GUILD: { if (GetPlayer()->GetGuildId()) @@ -331,7 +357,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) guild->BroadcastToGuild(this, false, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL); } } - } break; + break; + } case CHAT_MSG_OFFICER: { if (GetPlayer()->GetGuildId()) @@ -343,7 +370,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) guild->BroadcastToGuild(this, true, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL); } } - } break; + break; + } case CHAT_MSG_RAID: { // if player is in battleground, he cannot say to battleground members by /ra @@ -360,7 +388,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) WorldPacket data; ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID, Language(lang), sender, NULL, msg); group->BroadcastPacket(&data, false); - } break; + break; + } case CHAT_MSG_RAID_LEADER: { // if player is in battleground, he cannot say to battleground members by /ra @@ -377,7 +406,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) WorldPacket data; ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID_LEADER, Language(lang), sender, NULL, msg); group->BroadcastPacket(&data, false); - } break; + break; + } case CHAT_MSG_RAID_WARNING: { Group* group = GetPlayer()->GetGroup(); @@ -390,7 +420,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) //in battleground, raid warning is sent only to players in battleground - code is ok ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID_WARNING, Language(lang), sender, NULL, msg); group->BroadcastPacket(&data, false); - } break; + break; + } case CHAT_MSG_BATTLEGROUND: { //battleground raid is always in Player->GetGroup(), never in GetOriginalGroup() @@ -403,7 +434,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) WorldPacket data; ChatHandler::BuildChatPacket(data, CHAT_MSG_BATTLEGROUND, Language(lang), sender, NULL, msg); group->BroadcastPacket(&data, false); - } break; + break; + } case CHAT_MSG_BATTLEGROUND_LEADER: { // battleground raid is always in Player->GetGroup(), never in GetOriginalGroup() @@ -416,7 +448,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) WorldPacket data; ChatHandler::BuildChatPacket(data, CHAT_MSG_BATTLEGROUND_LEADER, Language(lang), sender, NULL, msg);; group->BroadcastPacket(&data, false); - } break; + break; + } case CHAT_MSG_CHANNEL: { if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHAT_CHANNEL_REQ)) @@ -436,7 +469,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) chn->Say(sender->GetGUID(), msg.c_str(), lang); } } - } break; + break; + } case CHAT_MSG_AFK: { if (!sender->IsInCombat()) diff --git a/src/server/game/Handlers/GroupHandler.cpp b/src/server/game/Handlers/GroupHandler.cpp index 1c1982600ca..5ea81718a5d 100644 --- a/src/server/game/Handlers/GroupHandler.cpp +++ b/src/server/game/Handlers/GroupHandler.cpp @@ -82,6 +82,13 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData) return; } + // player trying to invite himself (most likely cheating) + if (player == GetPlayer()) + { + SendPartyResult(PARTY_OP_INVITE, membername, ERR_BAD_PLAYER_NAME_S); + return; + } + // restrict invite to GMs if (!sWorld->getBoolConfig(CONFIG_ALLOW_GM_GROUP) && !GetPlayer()->IsGameMaster() && player->IsGameMaster()) { @@ -113,6 +120,12 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData) return; } + if (!player->GetSocial()->HasFriend(GetPlayer()->GetGUID().GetCounter()) && GetPlayer()->getLevel() < sWorld->getIntConfig(CONFIG_PARTY_LEVEL_REQ)) + { + SendPartyResult(PARTY_OP_INVITE, membername, ERR_INVITE_RESTRICTED); + return; + } + Group* group = GetPlayer()->GetGroup(); if (group && group->isBGGroup()) group = GetPlayer()->GetOriginalGroup(); @@ -170,6 +183,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket& recvData) } if (!group->AddInvite(player)) { + group->RemoveAllInvites(); delete group; return; } diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp index e8f8372d679..3801e974dba 100644 --- a/src/server/game/Handlers/GuildHandler.cpp +++ b/src/server/game/Handlers/GuildHandler.cpp @@ -178,7 +178,7 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket) if (normalizePlayerName(playerName)) if (Guild* guild = GetPlayer()->GetGuild()) - guild->HandleSetMemberNote(this, playerName, note, true); + guild->HandleSetMemberNote(this, playerName, note, false); } void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket) @@ -192,7 +192,7 @@ void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket) if (normalizePlayerName(playerName)) if (Guild* guild = GetPlayer()->GetGuild()) - guild->HandleSetMemberNote(this, playerName, note, false); + guild->HandleSetMemberNote(this, playerName, note, true); } void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket) diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index 7f5d882a912..42ce01708eb 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -1095,7 +1095,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recvData) return; } - if (!(gift->GetTemplate()->Flags & ITEM_PROTO_FLAG_WRAPPER)) // cheating: non-wrapper wrapper + if (!(gift->GetTemplate()->Flags & ITEM_PROTO_FLAG_IS_WRAPPER)) // cheating: non-wrapper wrapper { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, gift, NULL); return; diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index 82fdc2e54c7..b0b06b517c8 100644 --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -338,7 +338,7 @@ void WorldSession::DoLootRelease(ObjectGuid lguid) else { // Only delete item if no loot or money (unlooted loot is saved to db) or if it isn't an openable item - if (pItem->loot.isLooted() || !(proto->Flags & ITEM_PROTO_FLAG_OPENABLE)) + if (pItem->loot.isLooted() || !(proto->Flags & ITEM_PROTO_FLAG_HAS_LOOT)) player->DestroyItem(pItem->GetBagSlot(), pItem->GetSlot(), true); } return; // item can be looted only single player @@ -370,13 +370,10 @@ void WorldSession::DoLootRelease(ObjectGuid lguid) loot->roundRobinPlayer.Clear(); if (Group* group = player->GetGroup()) - { group->SendLooter(creature, NULL); - - // force update of dynamic flags, otherwise other group's players still not able to loot. - creature->ForceValuesUpdateAtIndex(UNIT_DYNAMIC_FLAGS); - } } + // force dynflag update to update looter and lootable info + creature->ForceValuesUpdateAtIndex(UNIT_DYNAMIC_FLAGS); } } diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index 1e00c25a0c3..d02611971cc 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -236,8 +236,8 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData) recvData >> guid >> spellId; TC_LOG_DEBUG("network", "WORLD: Received CMSG_TRAINER_BUY_SPELL %s, learn spell id is: %u", guid.ToString().c_str(), spellId); - Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER); - if (!unit) + Creature* trainer = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER); + if (!trainer) { TC_LOG_DEBUG("network", "WORLD: HandleTrainerBuySpellOpcode - %s not found or you can not interact with him.", guid.ToString().c_str()); return; @@ -247,8 +247,20 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData) if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); + // check race for mount trainers + if (trainer->GetCreatureTemplate()->trainer_type == TRAINER_TYPE_MOUNTS) + { + if (uint32 trainerRace = trainer->GetCreatureTemplate()->trainer_race) + if (_player->getRace() != trainerRace) + return; + } + + // check class for class trainers + if (_player->getClass() != trainer->GetCreatureTemplate()->trainer_class && trainer->GetCreatureTemplate()->trainer_type == TRAINER_TYPE_CLASS) + return; + // check present spell in trainer spell list - TrainerSpellData const* trainer_spells = unit->GetTrainerSpells(); + TrainerSpellData const* trainer_spells = trainer->GetTrainerSpells(); if (!trainer_spells) return; @@ -262,7 +274,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData) return; // apply reputation discount - uint32 nSpellCost = uint32(floor(trainer_spell->spellCost * _player->GetReputationPriceDiscount(unit))); + uint32 nSpellCost = uint32(floor(trainer_spell->spellCost * _player->GetReputationPriceDiscount(trainer))); // check money requirement if (!_player->HasEnoughMoney(nSpellCost)) @@ -270,8 +282,8 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData) _player->ModifyMoney(-int32(nSpellCost)); - unit->SendPlaySpellVisual(179); // 53 SpellCastDirected - unit->SendPlaySpellImpact(_player->GetGUID(), 362); // 113 EmoteSalute + trainer->SendPlaySpellVisual(179); // 53 SpellCastDirected + trainer->SendPlaySpellImpact(_player->GetGUID(), 362); // 113 EmoteSalute // learn explicitly or cast explicitly if (trainer_spell->IsCastable()) diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index 8bfb0070605..17c9c4a58d7 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -595,7 +595,7 @@ void WorldSession::HandlePetRename(WorldPacket& recvData) Pet* pet = ObjectAccessor::GetPet(*_player, petguid); // check it! - if (!pet || !pet->IsPet() || ((Pet*)pet)->getPetType()!= HUNTER_PET || + if (!pet || !pet->IsPet() || ((Pet*)pet)->getPetType() != HUNTER_PET || !pet->HasByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED) || pet->GetOwnerGUID() != _player->GetGUID() || !pet->GetCharmInfo()) return; diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp index a7db18deddb..b7aee1778a9 100644 --- a/src/server/game/Handlers/QuestHandler.cpp +++ b/src/server/game/Handlers/QuestHandler.cpp @@ -426,6 +426,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recvData) } _player->TakeQuestSourceItem(questId, true); // remove quest src item from player + _player->AbandonQuest(questId); // remove all quest items player received before abandoning quest. Note, this does not remove normal drop items that happen to be quest requirements. _player->RemoveActiveQuest(questId); _player->RemoveTimedAchievement(ACHIEVEMENT_TIMED_TYPE_QUEST, questId); @@ -640,46 +641,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket { TC_LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY"); - uint32 count = 0; - - WorldPacket data(SMSG_QUESTGIVER_STATUS_MULTIPLE, 4); - data << uint32(count); // placeholder - - for (auto itr = _player->m_clientGUIDs.begin(); itr != _player->m_clientGUIDs.end(); ++itr) - { - uint32 questStatus = DIALOG_STATUS_NONE; - - if (itr->IsAnyTypeCreature()) - { - // need also pet quests case support - Creature* questgiver = ObjectAccessor::GetCreatureOrPetOrVehicle(*GetPlayer(), *itr); - if (!questgiver || questgiver->IsHostileTo(_player)) - continue; - if (!questgiver->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER)) - continue; - - questStatus = _player->GetQuestDialogStatus(questgiver); - - data << uint64(questgiver->GetGUID()); - data << uint8(questStatus); - ++count; - } - else if (itr->IsGameObject()) - { - GameObject* questgiver = GetPlayer()->GetMap()->GetGameObject(*itr); - if (!questgiver || questgiver->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER) - continue; - - questStatus = _player->GetQuestDialogStatus(questgiver); - - data << uint64(questgiver->GetGUID()); - data << uint8(questStatus); - ++count; - } - } - - data.put<uint32>(0, count); // write real count - SendPacket(&data); + _player->SendQuestGiverStatusMultiple(); } void WorldSession::HandleQueryQuestsCompleted(WorldPacket & /*recvData*/) diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index e07e10ab00c..93e986b0339 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -196,7 +196,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) } // Verify that the bag is an actual bag or wrapped item that can be used "normally" - if (!(proto->Flags & ITEM_PROTO_FLAG_OPENABLE) && !item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED)) + if (!(proto->Flags & ITEM_PROTO_FLAG_HAS_LOOT) && !item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED)) { pUser->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL); TC_LOG_ERROR("network", "Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!", diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 5cede9a32d5..260e7ff464f 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -353,7 +353,7 @@ LootItem::LootItem(LootStoreItem const& li) conditions = li.conditions; ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemid); - freeforall = proto && (proto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT); + freeforall = proto && (proto->Flags & ITEM_PROTO_FLAG_MULTI_DROP); follow_loot_rules = proto && (proto->FlagsCu & ITEM_FLAGS_CU_FOLLOW_LOOT_RULES); needs_quest = li.needs_quest; @@ -429,7 +429,7 @@ void Loot::AddItem(LootStoreItem const& item) // non-conditional one-player only items are counted here, // free for all items are counted in FillFFALoot(), // non-ffa conditionals are counted in FillNonQuestNonFFAConditionalLoot() - if (!item.needs_quest && item.conditions.empty() && !(proto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT)) + if (!item.needs_quest && item.conditions.empty() && !(proto->Flags & ITEM_PROTO_FLAG_MULTI_DROP)) ++unlootedCount; } } @@ -704,7 +704,7 @@ void Loot::DeleteLootItemFromContainerItemDB(uint32 itemID) if (_itr->itemid != itemID) continue; - _itr->canSave = true; + _itr->canSave = false; break; } } @@ -786,6 +786,19 @@ uint32 Loot::GetMaxSlotInLootFor(Player* player) const return items.size() + (itr != PlayerQuestItems.end() ? itr->second->size() : 0); } +// return true if there is any item that is lootable for any player (not quest item, FFA or conditional) +bool Loot::hasItemForAll() const +{ + // Gold is always lootable + if (gold) + return true; + + for (LootItem const& item : items) + if (!item.is_looted && !item.freeforall && item.conditions.empty()) + return true; + return false; +} + // return true if there is any FFA, quest or conditional item for the player. bool Loot::hasItemFor(Player* player) const { @@ -1640,7 +1653,7 @@ void LoadLootTemplates_Item() // remove real entries and check existence loot ItemTemplateContainer const* its = sObjectMgr->GetItemTemplateStore(); for (ItemTemplateContainer::const_iterator itr = its->begin(); itr != its->end(); ++itr) - if (lootIdSet.find(itr->second.ItemId) != lootIdSet.end() && itr->second.Flags & ITEM_PROTO_FLAG_OPENABLE) + if (lootIdSet.find(itr->second.ItemId) != lootIdSet.end() && itr->second.Flags & ITEM_PROTO_FLAG_HAS_LOOT) lootIdSet.erase(itr->second.ItemId); // output error for any still listed (not referenced from appropriate table) ids diff --git a/src/server/game/Loot/LootMgr.h b/src/server/game/Loot/LootMgr.h index 0afb327d7f0..a66b8f0b4c5 100644 --- a/src/server/game/Loot/LootMgr.h +++ b/src/server/game/Loot/LootMgr.h @@ -382,6 +382,7 @@ struct TC_GAME_API Loot LootItem* LootItemInSlot(uint32 lootslot, Player* player, QuestItem** qitem = NULL, QuestItem** ffaitem = NULL, QuestItem** conditem = NULL); uint32 GetMaxSlotInLootFor(Player* player) const; + bool hasItemForAll() const; bool hasItemFor(Player* player) const; bool hasOverThresholdItem() const; diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp index bc31a3c8c06..0fc49eba05e 100644 --- a/src/server/game/Mails/Mail.cpp +++ b/src/server/game/Mails/Mail.cpp @@ -70,6 +70,13 @@ MailSender::MailSender(Player* sender) m_senderId = sender->GetGUID().GetCounter(); } +MailSender::MailSender(uint32 senderEntry) +{ + m_messageType = MAIL_CREATURE; + m_senderId = senderEntry; + m_stationery = MAIL_STATIONERY_DEFAULT; +} + MailReceiver::MailReceiver(Player* receiver) : m_receiver(receiver), m_receiver_lowguid(receiver->GetGUID().GetCounter()) { } MailReceiver::MailReceiver(Player* receiver, ObjectGuid::LowType receiver_lowguid) : m_receiver(receiver), m_receiver_lowguid(receiver_lowguid) diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h index ee1a0aae2c9..ad14e3cecf9 100644 --- a/src/server/game/Mails/Mail.h +++ b/src/server/game/Mails/Mail.h @@ -90,6 +90,7 @@ class TC_GAME_API MailSender MailSender(CalendarEvent* sender); MailSender(AuctionEntry* sender); MailSender(Player* sender); + MailSender(uint32 senderEntry); public: // Accessors MailMessageType GetMailMessageType() const { return m_messageType; } ObjectGuid::LowType GetSenderId() const { return m_senderId; } diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 794be12ee7c..23ca8cbba1a 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -90,7 +90,7 @@ bool Map::ExistMap(uint32 mapid, int gx, int gy) if (fread(&header, sizeof(header), 1, pf) == 1) { if (header.mapMagic.asUInt != MapMagic.asUInt || header.versionMagic.asUInt != MapVersionMagic.asUInt) - TC_LOG_ERROR("maps", "Map file '%s' is from an incompatible map version (%.*s %.*s), %.*s %.*s is expected. Please recreate using the mapextractor.", + TC_LOG_ERROR("maps", "Map file '%s' is from an incompatible map version (%.*s %.*s), %.*s %.*s is expected. Please pull your source, recompile tools and recreate maps using the updated mapextractor, then replace your old map files with new files. If you still have problems search on forum for error TCE00018.", fileName, 4, header.mapMagic.asChar, 4, header.versionMagic.asChar, 4, MapMagic.asChar, 4, MapVersionMagic.asChar); else ret = true; @@ -1731,7 +1731,7 @@ bool GridMap::loadData(const char* filename) return true; } - TC_LOG_ERROR("maps", "Map file '%s' is from an incompatible map version (%.*s %.*s), %.*s %.*s is expected. Please recreate using the mapextractor.", + TC_LOG_ERROR("maps", "Map file '%s' is from an incompatible map version (%.*s %.*s), %.*s %.*s is expected. Please pull your source, recompile tools and recreate maps using the updated mapextractor, then replace your old map files with new files. If you still have problems search on forum for error TCE00018.", filename, 4, header.mapMagic.asChar, 4, header.versionMagic.asChar, 4, MapMagic.asChar, 4, MapVersionMagic.asChar); fclose(in); return false; @@ -2299,12 +2299,12 @@ inline GridMap* Map::GetGrid(float x, float y) return GridMaps[gx][gy]; } -float Map::GetWaterOrGroundLevel(float x, float y, float z, float* ground /*= NULL*/, bool /*swim = false*/) const +float Map::GetWaterOrGroundLevel(uint32 phasemask, float x, float y, float z, float* ground /*= NULL*/, bool /*swim = false*/) const { if (const_cast<Map*>(this)->GetGrid(x, y)) { // we need ground level (including grid height version) for proper return water level in point - float ground_z = GetHeight(PHASEMASK_NORMAL, x, y, z, true, 50.0f); + float ground_z = GetHeight(phasemask, x, y, z, true, 50.0f); if (ground) *ground = ground_z; diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 5f134613e85..48864180b84 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -494,7 +494,7 @@ class TC_GAME_API Map : public GridRefManager<NGridType> BattlegroundMap* ToBattlegroundMap() { if (IsBattlegroundOrArena()) return reinterpret_cast<BattlegroundMap*>(this); else return NULL; } BattlegroundMap const* ToBattlegroundMap() const { if (IsBattlegroundOrArena()) return reinterpret_cast<BattlegroundMap const*>(this); return NULL; } - float GetWaterOrGroundLevel(float x, float y, float z, float* ground = NULL, bool swim = false) const; + float GetWaterOrGroundLevel(uint32 phasemask, float x, float y, float z, float* ground = NULL, bool swim = false) const; float GetHeight(uint32 phasemask, float x, float y, float z, bool vmap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const; bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const; void Balance() { _dynamicTree.balance(); } diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h index a7fdc37d324..91a26c29150 100644 --- a/src/server/game/Maps/MapManager.h +++ b/src/server/game/Maps/MapManager.h @@ -126,9 +126,9 @@ class TC_GAME_API MapManager template<typename Worker> void DoForAllMapsWithMapId(uint32 mapId, Worker&& worker); - uint32 IncreaseScheduledScriptsCount() { return ++_scheduledScripts; } - uint32 DecreaseScheduledScriptCount() { return --_scheduledScripts; } - uint32 DecreaseScheduledScriptCount(size_t count) { return _scheduledScripts -= count; } + void IncreaseScheduledScriptsCount() { ++_scheduledScripts; } + void DecreaseScheduledScriptCount() { --_scheduledScripts; } + void DecreaseScheduledScriptCount(std::size_t count) { _scheduledScripts -= count; } bool IsScriptScheduled() const { return _scheduledScripts > 0; } private: @@ -157,7 +157,7 @@ class TC_GAME_API MapManager MapUpdater m_updater; // atomic op counter for active scripts amount - std::atomic<uint32> _scheduledScripts; + std::atomic<std::size_t> _scheduledScripts; }; template<typename Worker> diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index d6af5d81432..143f535ddf5 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -112,7 +112,9 @@ enum TrinityStrings LANG_RBAC_PERM_REVOKED_NOT_IN_LIST = 79, LANG_PVPSTATS = 80, LANG_PVPSTATS_DISABLED = 81, - // Free 82 - 95 + LANG_COMMAND_NEARGRAVEYARD = 82, + LANG_COMMAND_NEARGRAVEYARD_NOTFOUND = 83, + // Free 84 - 95 LANG_GUILD_RENAME_ALREADY_EXISTS = 96, diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index f9a98cffd0e..7f77453d00b 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -456,7 +456,7 @@ enum SpellAttr4 enum SpellAttr5 { - SPELL_ATTR5_UNK0 = 0x00000001, // 0 + SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING = 0x00000001, // 0 available casting channel spell when moving SPELL_ATTR5_NO_REAGENT_WHILE_PREP = 0x00000002, // 1 not need reagents if UNIT_FLAG_PREPARATION SPELL_ATTR5_UNK2 = 0x00000004, // 2 SPELL_ATTR5_USABLE_WHILE_STUNNED = 0x00000008, // 3 usable while stunned @@ -1490,11 +1490,12 @@ enum GameObjectFlags { GO_FLAG_IN_USE = 0x00000001, // disables interaction while animated GO_FLAG_LOCKED = 0x00000002, // require key, spell, event, etc to be opened. Makes "Locked" appear in tooltip - GO_FLAG_INTERACT_COND = 0x00000004, // cannot interact (condition to interact) + GO_FLAG_INTERACT_COND = 0x00000004, // cannot interact (condition to interact - requires GO_DYNFLAG_LO_ACTIVATE to enable interaction clientside) GO_FLAG_TRANSPORT = 0x00000008, // any kind of transport? Object can transport (elevator, boat, car) GO_FLAG_NOT_SELECTABLE = 0x00000010, // not selectable even in GM mode GO_FLAG_NODESPAWN = 0x00000020, // never despawn, typically for doors, they just change state - GO_FLAG_TRIGGERED = 0x00000040, // typically, summoned objects. Triggered by spell or other events + GO_FLAG_AI_OBSTACLE = 0x00000040, // makes the client register the object in something called AIObstacleMgr, unknown what it does + GO_FLAG_FREEZE_ANIMATION = 0x00000080, GO_FLAG_DAMAGED = 0x00000200, GO_FLAG_DESTROYED = 0x00000400 }; @@ -2531,6 +2532,7 @@ uint32 const CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL = (1 << (CREATURE_TYPE_ME // CreatureFamily.dbc enum CreatureFamily { + CREATURE_FAMILY_NONE = 0, CREATURE_FAMILY_WOLF = 1, CREATURE_FAMILY_CAT = 2, CREATURE_FAMILY_SPIDER = 3, @@ -2576,38 +2578,38 @@ enum CreatureFamily enum CreatureTypeFlags { - CREATURE_TYPEFLAGS_TAMEABLE = 0x00000001, // Tameable by any hunter - CREATURE_TYPEFLAGS_GHOST = 0x00000002, // Creature are also visible for not alive player. Allow gossip interaction if npcflag allow? - CREATURE_TYPEFLAGS_BOSS = 0x00000004, - CREATURE_TYPEFLAGS_UNK3 = 0x00000008, - CREATURE_TYPEFLAGS_UNK4 = 0x00000010, - CREATURE_TYPEFLAGS_UNK5 = 0x00000020, - CREATURE_TYPEFLAGS_UNK6 = 0x00000040, - CREATURE_TYPEFLAGS_DEAD_INTERACT = 0x00000080, // Player can interact with the creature if its dead (not player dead) - CREATURE_TYPEFLAGS_HERBLOOT = 0x00000100, // Can be looted by herbalist - CREATURE_TYPEFLAGS_MININGLOOT = 0x00000200, // Can be looted by miner - CREATURE_TYPEFLAGS_DONT_LOG_DEATH = 0x00000400, // Death event will not show up in combat log - CREATURE_TYPEFLAGS_MOUNTED_COMBAT = 0x00000800, // Creature can remain mounted when entering combat - CREATURE_TYPEFLAGS_AID_PLAYERS = 0x00001000, // ? Can aid any player in combat if in range? - CREATURE_TYPEFLAGS_UNK13 = 0x00002000, - CREATURE_TYPEFLAGS_UNK14 = 0x00004000, // ? Possibly not in use - CREATURE_TYPEFLAGS_ENGINEERLOOT = 0x00008000, // Can be looted by engineer - CREATURE_TYPEFLAGS_EXOTIC = 0x00010000, // Can be tamed by hunter as exotic pet - CREATURE_TYPEFLAGS_UNK17 = 0x00020000, // ? Related to vehicles/pvp? - CREATURE_TYPEFLAGS_UNK18 = 0x00040000, // ? Related to vehicle/siege weapons? - CREATURE_TYPEFLAGS_PROJECTILE_COLLISION = 0x00080000, // Projectiles can collide with this creature - interacts with TARGET_DEST_TRAJ - CREATURE_TYPEFLAGS_UNK20 = 0x00100000, - CREATURE_TYPEFLAGS_UNK21 = 0x00200000, - CREATURE_TYPEFLAGS_UNK22 = 0x00400000, - CREATURE_TYPEFLAGS_UNK23 = 0x00800000, // ? First seen in 3.2.2. Related to banner/backpack of creature/companion? - CREATURE_TYPEFLAGS_UNK24 = 0x01000000, - CREATURE_TYPEFLAGS_UNK25 = 0x02000000, - CREATURE_TYPEFLAGS_PARTY_MEMBER = 0x04000000, //! Creature can be targeted by spells that require target to be in caster's party/raid - CREATURE_TYPEFLAGS_UNK27 = 0x08000000, - CREATURE_TYPEFLAGS_UNK28 = 0x10000000, - CREATURE_TYPEFLAGS_UNK29 = 0x20000000, - CREATURE_TYPEFLAGS_UNK30 = 0x40000000, - CREATURE_TYPEFLAGS_UNK31 = 0x80000000 + CREATURE_TYPE_FLAG_TAMEABLE_PET = 0x00000001, // Makes the mob tameable (must also be a beast and have family set) + CREATURE_TYPE_FLAG_GHOST_VISIBLE = 0x00000002, // Creature are also visible for not alive player. Allow gossip interaction if npcflag allow? + CREATURE_TYPE_FLAG_BOSS_MOB = 0x00000004, // Changes creature's visible level to "??" in the creature's portrait - Immune Knockback. + CREATURE_TYPE_FLAG_DO_NOT_PLAY_WOUND_PARRY_ANIMATION = 0x00000008, + CREATURE_TYPE_FLAG_HIDE_FACTION_TOOLTIP = 0x00000010, + CREATURE_TYPE_FLAG_UNK5 = 0x00000020, // Sound related + CREATURE_TYPE_FLAG_SPELL_ATTACKABLE = 0x00000040, + CREATURE_TYPE_FLAG_CAN_INTERACT_WHILE_DEAD = 0x00000080, // Player can interact with the creature if its dead (not player dead) + CREATURE_TYPE_FLAG_HERB_SKINNING_SKILL = 0x00000100, // Can be looted by herbalist + CREATURE_TYPE_FLAG_MINING_SKINNING_SKILL = 0x00000200, // Can be looted by miner + CREATURE_TYPE_FLAG_DO_NOT_LOG_DEATH = 0x00000400, // Death event will not show up in combat log + CREATURE_TYPE_FLAG_MOUNTED_COMBAT_ALLOWED = 0x00000800, // Creature can remain mounted when entering combat + CREATURE_TYPE_FLAG_CAN_ASSIST = 0x00001000, // ? Can aid any player in combat if in range? + CREATURE_TYPE_FLAG_IS_PET_BAR_USED = 0x00002000, + CREATURE_TYPE_FLAG_MASK_UID = 0x00004000, + CREATURE_TYPE_FLAG_ENGINEERING_SKINNING_SKILL = 0x00008000, // Can be looted by engineer + CREATURE_TYPE_FLAG_EXOTIC_PET = 0x00010000, // Can be tamed by hunter as exotic pet + CREATURE_TYPE_FLAG_USE_DEFAULT_COLLISION_BOX = 0x00020000, // Collision related. (always using default collision box?) + CREATURE_TYPE_FLAG_IS_SIEGE_WEAPON = 0x00040000, + CREATURE_TYPE_FLAG_CAN_COLLIDE_WITH_MISSILES = 0x00080000, // Projectiles can collide with this creature - interacts with TARGET_DEST_TRAJ + CREATURE_TYPE_FLAG_HIDE_NAME_PLATE = 0x00100000, + CREATURE_TYPE_FLAG_DO_NOT_PLAY_MOUNTED_ANIMATIONS = 0x00200000, + CREATURE_TYPE_FLAG_IS_LINK_ALL = 0x00400000, + CREATURE_TYPE_FLAG_INTERACT_ONLY_WITH_CREATOR = 0x00800000, + CREATURE_TYPE_FLAG_DO_NOT_PLAY_UNIT_EVENT_SOUNDS = 0x01000000, + CREATURE_TYPE_FLAG_HAS_NO_SHADOW_BLOB = 0x02000000, + CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT = 0x04000000, // ! Creature can be targeted by spells that require target to be in caster's party/raid + CREATURE_TYPE_FLAG_FORCE_GOSSIP = 0x08000000, // Allows the creature to display a single gossip option. + CREATURE_TYPE_FLAG_DO_NOT_SHEATHE = 0x10000000, + CREATURE_TYPE_FLAG_DO_NOT_TARGET_ON_INTERACTION = 0x20000000, + CREATURE_TYPE_FLAG_DO_NOT_RENDER_OBJECT_NAME = 0x40000000, + CREATURE_TYPE_FLAG_UNIT_IS_QUEST_BOSS = 0x80000000 // Not verified }; enum CreatureEliteType diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index f27e47fba21..26873451649 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -241,7 +241,7 @@ void MotionMaster::MoveConfused() void MotionMaster::MoveChase(Unit* target, float dist, float angle) { // ignore movement request if target not exist - if (!target || target == _owner || _owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE)) + if (!target || target == _owner) return; //_owner->ClearUnitState(UNIT_STATE_FOLLOW); @@ -266,7 +266,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle) void MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlot slot) { // ignore movement request if target not exist - if (!target || target == _owner || _owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE)) + if (!target || target == _owner) return; //_owner->AddUnitState(UNIT_STATE_FOLLOW); @@ -479,11 +479,12 @@ void MotionMaster::MoveFall(uint32 id /*=0*/) if (std::fabs(_owner->GetPositionZ() - tz) < 0.1f) return; + _owner->AddUnitMovementFlag(MOVEMENTFLAG_FALLING); + _owner->m_movementInfo.SetFallTime(0); + + // don't run spline movement for players if (_owner->GetTypeId() == TYPEID_PLAYER) - { - _owner->AddUnitMovementFlag(MOVEMENTFLAG_FALLING); - _owner->m_movementInfo.SetFallTime(0); - } + return; Movement::MoveSplineInit init(_owner); init.MoveTo(_owner->GetPositionX(), _owner->GetPositionY(), tz, false); @@ -534,6 +535,7 @@ void MotionMaster::MoveSeekAssistance(float x, float y, float z) TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)", _owner->GetEntry(), _owner->GetGUID().GetCounter(), x, y, z); _owner->AttackStop(); + _owner->CastStop(); _owner->ToCreature()->SetReactState(REACT_PASSIVE); Mutate(new AssistanceMovementGenerator(x, y, z), MOTION_SLOT_ACTIVE); } diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index 6cdd29986bb..4cf896c6d98 100644 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -38,6 +38,12 @@ void FleeingMovementGenerator<T>::_setTargetLocation(T* owner) if (owner->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED)) return; + if (owner->HasUnitState(UNIT_STATE_CASTING) && !owner->CanMoveDuringChannel()) + { + owner->CastStop(); + return; + } + owner->AddUnitState(UNIT_STATE_FLEEING_MOVE); float x, y, z; diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp index 421678ded17..feea0ce734d 100644 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp @@ -29,6 +29,12 @@ template<> void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature) { + if (creature->HasUnitState(UNIT_STATE_CASTING) && !creature->CanMoveDuringChannel()) + { + creature->CastStop(); + return; + } + float respX, respY, respZ, respO, destX, destY, destZ, travelDistZ; creature->GetHomePosition(respX, respY, respZ, respO); Map const* map = creature->GetBaseMap(); @@ -57,7 +63,7 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature) // Limit height change const float distanceZ = float(rand_norm()) * travelDistZ/2.0f; destZ = respZ + distanceZ; - float levelZ = map->GetWaterOrGroundLevel(destX, destY, destZ-2.0f); + float levelZ = map->GetWaterOrGroundLevel(creature->GetPhaseMask(), destX, destY, destZ-2.5f); // Problem here, we must fly above the ground and water, not under. Let's try on next tick if (levelZ >= destZ) @@ -141,6 +147,9 @@ void RandomMovementGenerator<Creature>::DoFinalize(Creature* creature) template<> bool RandomMovementGenerator<Creature>::DoUpdate(Creature* creature, const uint32 diff) { + if (!creature || !creature->IsAlive()) + return false; + if (creature->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED)) { i_nextMoveTime.Reset(0); // Expire the timer diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp index 403ccf684e7..2a95952d793 100644 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp @@ -36,6 +36,9 @@ void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T* owner, bool up if (owner->HasUnitState(UNIT_STATE_NOT_MOVE)) return; + if (owner->HasUnitState(UNIT_STATE_CASTING) && !owner->CanMoveDuringChannel()) + return; + if (owner->GetTypeId() == TYPEID_UNIT && !i_target->isInAccessiblePlaceFor(owner->ToCreature())) { owner->ToCreature()->SetCannotReachTarget(true); @@ -70,8 +73,8 @@ void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T* owner, bool up // doing a "dance" while fighting if (owner->IsPet() && i_target->GetTypeId() == TYPEID_PLAYER) { - dist = i_target->GetCombatReach(); - size = i_target->GetCombatReach() - i_target->GetObjectSize(); + dist = 1.0f; //i_target->GetCombatReach(); + size = 1.0f; //i_target->GetCombatReach() - i_target->GetObjectSize(); } else { @@ -146,7 +149,7 @@ bool TargetedMovementGeneratorMedium<T, D>::DoUpdate(T* owner, uint32 time_diff) } // prevent movement while casting spells with cast time or channel time - if (owner->HasUnitState(UNIT_STATE_CASTING)) + if (owner->HasUnitState(UNIT_STATE_CASTING) && !owner->CanMoveDuringChannel()) { if (!owner->IsStopped()) owner->StopMoving(); @@ -165,8 +168,15 @@ bool TargetedMovementGeneratorMedium<T, D>::DoUpdate(T* owner, uint32 time_diff) if (i_recheckDistance.Passed()) { i_recheckDistance.Reset(100); + //More distance let have better performance, less distance let have more sensitive reaction at target move. - float allowed_dist = owner->GetCombatReach() + sWorld->getRate(RATE_TARGET_POS_RECALCULATION_RANGE); + float allowed_dist = 0.0f; + + if (owner->IsPet() && (owner->GetCharmerOrOwnerGUID() == i_target->GetGUID())) + allowed_dist = 1.0f; // pet following owner + else + allowed_dist = owner->GetCombatReach() + sWorld->getRate(RATE_TARGET_POS_RECALCULATION_RANGE); + G3D::Vector3 dest = owner->movespline->FinalDestination(); if (owner->movespline->onTransport) if (TransportBase* transport = owner->GetDirectTransport()) diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index dd1cf494325..2ffa1a644eb 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -315,7 +315,7 @@ void FlightPathMovementGenerator::DoFinalize(Player* player) player->ClearUnitState(UNIT_STATE_IN_FLIGHT); player->Dismount(); - player->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT); + player->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_TAXI_FLIGHT); if (player->m_taxi.empty()) { @@ -335,7 +335,7 @@ void FlightPathMovementGenerator::DoReset(Player* player) { player->getHostileRefManager().setOnlineOfflineState(false); player->AddUnitState(UNIT_STATE_IN_FLIGHT); - player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT); + player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_TAXI_FLIGHT); Movement::MoveSplineInit init(player); uint32 end = GetPathAtMapEnd(); diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp index 3b4f19adb0b..3f8e7d44ff2 100644 --- a/src/server/game/Movement/PathGenerator.cpp +++ b/src/server/game/Movement/PathGenerator.cpp @@ -25,6 +25,7 @@ #include "DisableMgr.h" #include "DetourCommon.h" #include "DetourNavMeshQuery.h" +#include "Metric.h" ////////////////// PathGenerator ////////////////// PathGenerator::PathGenerator(const Unit* owner) : @@ -61,6 +62,8 @@ bool PathGenerator::CalculatePath(float destX, float destY, float destZ, bool fo if (!Trinity::IsValidMapCoord(destX, destY, destZ) || !Trinity::IsValidMapCoord(x, y, z)) return false; + TC_METRIC_EVENT("mmap_events", "CalculatePath", ""); + G3D::Vector3 dest(destX, destY, destZ); SetEndPosition(dest); @@ -939,3 +942,8 @@ void PathGenerator::ReducePathLenghtByDist(float dist) nextVec = currVec; // we're going backwards } } + +bool PathGenerator::IsInvalidDestinationZ(Unit const* target) const +{ + return (target->GetPositionZ() - GetActualEndPosition().z) > 5.0f; +} diff --git a/src/server/game/Movement/PathGenerator.h b/src/server/game/Movement/PathGenerator.h index 3cad62abf25..a3e88b8a705 100644 --- a/src/server/game/Movement/PathGenerator.h +++ b/src/server/game/Movement/PathGenerator.h @@ -58,6 +58,7 @@ class TC_GAME_API PathGenerator // Calculate the path from owner to given destination // return: true if new path was calculated, false otherwise (no change needed) bool CalculatePath(float destX, float destY, float destZ, bool forceDest = false, bool straightLine = false); + bool IsInvalidDestinationZ(Unit const* target) const; // option setters - use optional void SetUseStraightPath(bool useStraightPath) { _useStraightPath = useStraightPath; } diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp index d8173aab331..991a4eacd29 100644 --- a/src/server/game/Movement/Spline/MoveSpline.cpp +++ b/src/server/game/Movement/Spline/MoveSpline.cpp @@ -206,7 +206,7 @@ bool MoveSplineInitArgs::Validate(Unit* unit) const return false;\ } CHECK(path.size() > 1); - CHECK(velocity > 0.1f); + CHECK(velocity > 0.01f); CHECK(time_perc >= 0.f && time_perc <= 1.f); //CHECK(_checkPathBounds()); return true; diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index d329ab27de9..1343e0966c1 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -95,7 +95,7 @@ void OPvPCapturePoint::AddGO(uint32 type, ObjectGuid::LowType guid, uint32 entry entry = data->id; } - m_Objects[type] = ObjectGuid(HighGuid::GameObject, entry, guid); + m_Objects[type] = guid; m_ObjectTypes[m_Objects[type]] = type; } @@ -109,7 +109,7 @@ void OPvPCapturePoint::AddCre(uint32 type, ObjectGuid::LowType guid, uint32 entr entry = data->id; } - m_Creatures[type] = ObjectGuid(HighGuid::Unit, entry, guid); + m_Creatures[type] = guid; m_CreatureTypes[m_Creatures[type]] = type; } @@ -190,7 +190,8 @@ bool OPvPCapturePoint::DelCreature(uint32 type) // delete respawn time for this creature PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CREATURE_RESPAWN); stmt->setUInt32(0, spawnId); - stmt->setUInt16(1, m_PvP->GetMap()->GetId()); stmt->setUInt32(2, 0); // instance id, always 0 for world maps + stmt->setUInt16(1, m_PvP->GetMap()->GetId()); + stmt->setUInt32(2, 0); // instance id, always 0 for world maps CharacterDatabase.Execute(stmt); sObjectMgr->DeleteCreatureData(spawnId); @@ -236,9 +237,9 @@ bool OPvPCapturePoint::DelCapturePoint() void OPvPCapturePoint::DeleteSpawns() { - for (std::map<uint32, uint32>::iterator i = m_Objects.begin(); i != m_Objects.end(); ++i) + for (std::map<uint32, ObjectGuid::LowType>::iterator i = m_Objects.begin(); i != m_Objects.end(); ++i) DelObject(i->first); - for (std::map<uint32, uint32>::iterator i = m_Creatures.begin(); i != m_Creatures.end(); ++i) + for (std::map<uint32, ObjectGuid::LowType>::iterator i = m_Creatures.begin(); i != m_Creatures.end(); ++i) DelCreature(i->first); DelCapturePoint(); } @@ -581,7 +582,7 @@ bool OPvPCapturePoint::HandleDropFlag(Player* /*player*/, uint32 /*id*/) int32 OPvPCapturePoint::HandleOpenGo(Player* /*player*/, GameObject* go) { - std::map<uint32, uint32>::iterator itr = m_ObjectTypes.find(go->GetSpawnId()); + std::map<ObjectGuid::LowType, uint32>::iterator itr = m_ObjectTypes.find(go->GetSpawnId()); if (itr != m_ObjectTypes.end()) return itr->second; @@ -596,7 +597,7 @@ bool OutdoorPvP::HandleAreaTrigger(Player* /*player*/, uint32 /*trigger*/) void OutdoorPvP::BroadcastPacket(WorldPacket &data) const { // This is faster than sWorld->SendZoneMessage - for (uint32 team = 0; team < 2; ++team) + for (uint32 team = 0; team < BG_TEAMS_COUNT; ++team) for (GuidSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) if (Player* const player = ObjectAccessor::FindPlayer(*itr)) player->GetSession()->SendPacket(&data); diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index 4a4ee9bff9c..91a7b87eec7 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -132,7 +132,15 @@ Quest::Quest(Field* questRecord) void Quest::LoadQuestDetails(Field* fields) { for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) + { + if (!sEmotesStore.LookupEntry(fields[1+i].GetUInt16())) + { + TC_LOG_ERROR("sql.sql", "Table `quest_details` has non-existing Emote%i (%u) set for quest %u. Skipped.", 1+i, fields[1+i].GetUInt16(), fields[0].GetUInt32()); + continue; + } + DetailsEmote[i] = fields[1+i].GetUInt16(); + } for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) DetailsEmoteDelay[i] = fields[5+i].GetUInt32(); @@ -142,13 +150,28 @@ void Quest::LoadQuestRequestItems(Field* fields) { EmoteOnComplete = fields[1].GetUInt16(); EmoteOnIncomplete = fields[2].GetUInt16(); + + if (!sEmotesStore.LookupEntry(EmoteOnComplete)) + TC_LOG_ERROR("sql.sql", "Table `quest_request_items` has non-existing EmoteOnComplete (%u) set for quest %u.", EmoteOnComplete, fields[0].GetUInt32()); + + if (!sEmotesStore.LookupEntry(EmoteOnIncomplete)) + TC_LOG_ERROR("sql.sql", "Table `quest_request_items` has non-existing EmoteOnIncomplete (%u) set for quest %u.", EmoteOnIncomplete, fields[0].GetUInt32()); + RequestItemsText = fields[3].GetString(); } void Quest::LoadQuestOfferReward(Field* fields) { for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) + { + if (!sEmotesStore.LookupEntry(fields[1+i].GetUInt16())) + { + TC_LOG_ERROR("sql.sql", "Table `quest_offer_reward` has non-existing Emote%i (%u) set for quest %u. Skipped.", 1+i, fields[1+i].GetUInt16(), fields[0].GetUInt32()); + continue; + } + OfferRewardEmote[i] = fields[1+i].GetUInt16(); + } for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) OfferRewardEmoteDelay[i] = fields[5+i].GetUInt32(); @@ -173,7 +196,8 @@ void Quest::LoadQuestTemplateAddon(Field* fields) RequiredMinRepValue = fields[13].GetInt32(); RequiredMaxRepValue = fields[14].GetInt32(); StartItemCount = fields[15].GetUInt8(); - SpecialFlags = fields[16].GetUInt8(); + RewardMailSenderEntry = fields[16].GetUInt32(); + SpecialFlags = fields[17].GetUInt8(); if (SpecialFlags & QUEST_SPECIAL_FLAGS_AUTO_ACCEPT) Flags |= QUEST_FLAGS_AUTO_ACCEPT; @@ -254,6 +278,9 @@ bool Quest::IsRaidQuest(Difficulty difficulty) const break; } + if ((Flags & QUEST_FLAGS_RAID) != 0) + return true; + return false; } @@ -285,3 +312,10 @@ uint32 Quest::CalculateHonorGain(uint8 level) const return honor; } + +bool Quest::CanIncreaseRewardedQuestCounters() const +{ + // Dungeon Finder/Daily/Repeatable (if not weekly, monthly or seasonal) quests are never considered rewarded serverside. + // This affects counters and client requests for completed quests. + return (!IsDFQuest() && !IsDaily() && (!IsRepeatable() || IsWeekly() || IsMonthly() || IsSeasonal())); +} diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index 5e3bb4889ab..dc6d22deab0 100644 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -134,7 +134,7 @@ enum QuestFlags QUEST_FLAGS_SHARABLE = 0x00000008, // Can be shared: Player::CanShareQuest() QUEST_FLAGS_HAS_CONDITION = 0x00000010, // Not used currently QUEST_FLAGS_HIDE_REWARD_POI = 0x00000020, // Not used currently: Unsure of content - QUEST_FLAGS_RAID = 0x00000040, // Not used currently + QUEST_FLAGS_RAID = 0x00000040, // Can be completed while in raid QUEST_FLAGS_TBC = 0x00000080, // Not used currently: Available if TBC expansion enabled only QUEST_FLAGS_NO_MONEY_FROM_XP = 0x00000100, // Not used currently: Experience is not converted to gold at max level QUEST_FLAGS_HIDDEN_REWARDS = 0x00000200, // Items and money rewarded only sent in SMSG_QUESTGIVER_OFFER_REWARD (not in SMSG_QUESTGIVER_QUEST_DETAILS or in client quest log(SMSG_QUEST_QUERY_RESPONSE)) @@ -257,6 +257,7 @@ class TC_GAME_API Quest int32 GetRewSpellCast() const { return RewardSpell; } uint32 GetRewMailTemplateId() const { return RewardMailTemplateId; } uint32 GetRewMailDelaySecs() const { return RewardMailDelay; } + uint32 GetRewMailSenderEntry() const { return RewardMailSenderEntry; } uint32 GetPOIContinent() const { return POIContinent; } float GetPOIx() const { return POIx; } float GetPOIy() const { return POIy; } @@ -276,6 +277,7 @@ class TC_GAME_API Quest bool IsAllowedInRaid(Difficulty difficulty) const; bool IsDFQuest() const { return (SpecialFlags & QUEST_SPECIAL_FLAGS_DF_QUEST) != 0; } uint32 CalculateHonorGain(uint8 level) const; + bool CanIncreaseRewardedQuestCounters() const; // multiple values std::string ObjectiveText[QUEST_OBJECTIVES_COUNT]; @@ -373,6 +375,7 @@ class TC_GAME_API Quest uint32 RequiredMaxRepFaction = 0; int32 RequiredMaxRepValue = 0; uint32 StartItemCount = 0; + uint32 RewardMailSenderEntry = 0; uint32 SpecialFlags = 0; // custom flags, not sniffed/WDB }; diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index ac440da3f24..bd3f9cf2bfe 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -368,7 +368,9 @@ class CreatureGameObjectScriptRegistrySwapHooks // Hook which is called before a creature is swapped static void UnloadStage1(Creature* creature) { - creature->m_Events.KillAllEvents(true); + // Remove deletable events only, + // otherwise it causes crashes with non-deletable spell events. + creature->m_Events.KillAllEvents(false); if (creature->IsCharmed()) creature->RemoveCharmedBy(nullptr); @@ -985,7 +987,7 @@ void ScriptMgr::Initialize() FillSpellSummary(); // Load core scripts - SetScriptContext("___static___"); + SetScriptContext(GetNameOfStaticContext()); // SmartAI AddSC_SmartScripts(); @@ -1040,6 +1042,12 @@ void ScriptMgr::SwapScriptContext(bool initialize) _currentContext.clear(); } +std::string const& ScriptMgr::GetNameOfStaticContext() +{ + static std::string const name = "___static___"; + return name; +} + void ScriptMgr::ReleaseScriptContext(std::string const& context) { sScriptRegistryCompositum->ReleaseContext(context); diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index cc1b65fa593..233e56aadb2 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -876,6 +876,9 @@ class TC_GAME_API ScriptMgr /// calls for better performance (bulk changes). void SwapScriptContext(bool initialize = false); + /// Returns the context name of the static context provided by the worldserver + static std::string const& GetNameOfStaticContext(); + /// Acquires a strong module reference to the module containing the given script name, /// which prevents the shared library which contains the script from unloading. /// The shared library is lazy unloaded as soon as all references to it are released. diff --git a/src/server/game/Scripting/ScriptReloadMgr.cpp b/src/server/game/Scripting/ScriptReloadMgr.cpp index d13fa9c30f0..b0c9b6821d2 100644 --- a/src/server/game/Scripting/ScriptReloadMgr.cpp +++ b/src/server/game/Scripting/ScriptReloadMgr.cpp @@ -194,6 +194,8 @@ public: static Optional<std::shared_ptr<ScriptModule>> CreateFromPath(fs::path const& path, Optional<fs::path> cache_path); + static void ScheduleDelayedDelete(ScriptModule* module); + char const* GetScriptModuleRevisionHash() const override { return _getScriptModuleRevisionHash(); @@ -287,8 +289,13 @@ Optional<std::shared_ptr<ScriptModule>> GetFunctionFromSharedLibrary(handle, "AddScripts", addScripts) && GetFunctionFromSharedLibrary(handle, "GetScriptModule", getScriptModule) && GetFunctionFromSharedLibrary(handle, "GetBuildDirective", getBuildDirective)) - return std::make_shared<ScriptModule>(std::move(holder), getScriptModuleRevisionHash, + { + auto module = new ScriptModule(std::move(holder), getScriptModuleRevisionHash, addScripts, getScriptModule, getBuildDirective, path); + + // Unload the module at the next update tick as soon as all references are removed + return std::shared_ptr<ScriptModule>(module, ScheduleDelayedDelete); + } else { TC_LOG_ERROR("scripts.hotswap", "Could not extract all required functions from the shared library \"%s\"!", @@ -937,13 +944,6 @@ private: } } - sScriptMgr->SetScriptContext(module_name); - (*module)->AddScripts(); - TC_LOG_TRACE("scripts.hotswap", ">> Registered all scripts of module %s.", module_name.c_str()); - - if (swap_context) - sScriptMgr->SwapScriptContext(); - // Create the source listener auto listener = Trinity::make_unique<SourceUpdateListener>( sScriptReloadMgr->GetSourceDirectory() / module_name, @@ -952,8 +952,16 @@ private: // Store the module _known_modules_build_directives.insert(std::make_pair(module_name, (*module)->GetBuildDirective())); _running_script_modules.insert(std::make_pair(module_name, - std::make_pair(std::move(*module), std::move(listener)))); + std::make_pair(*module, std::move(listener)))); _running_script_module_names.insert(std::make_pair(path, module_name)); + + // Process the script loading after the module was registered correctly (#17557). + sScriptMgr->SetScriptContext(module_name); + (*module)->AddScripts(); + TC_LOG_TRACE("scripts.hotswap", ">> Registered all scripts of module %s.", module_name.c_str()); + + if (swap_context) + sScriptMgr->SwapScriptContext(); } void ProcessReloadScriptModule(fs::path const& path) @@ -1435,6 +1443,26 @@ private: fs::path temporary_cache_path_; }; +class ScriptModuleDeleteMessage +{ +public: + explicit ScriptModuleDeleteMessage(ScriptModule* module) + : module_(module) { } + + void operator() (HotSwapScriptReloadMgr*) + { + module_.reset(); + } + +private: + std::unique_ptr<ScriptModule> module_; +}; + +void ScriptModule::ScheduleDelayedDelete(ScriptModule* module) +{ + sScriptReloadMgr->QueueMessage(ScriptModuleDeleteMessage(module)); +} + /// Maps efsw actions to strings static char const* ActionToString(efsw::Action action) { @@ -1592,11 +1620,15 @@ void SourceUpdateListener::handleFileAction(efsw::WatchID watchid, std::string c std::shared_ptr<ModuleReference> ScriptReloadMgr::AcquireModuleReferenceOfContext(std::string const& context) { - auto const itr = sScriptReloadMgr->_running_script_modules.find(context); - if (itr != sScriptReloadMgr->_running_script_modules.end()) - return itr->second.first; - else + // Return empty references for the static context exported by the worldserver + if (context == ScriptMgr::GetNameOfStaticContext()) return { }; + + auto const itr = sScriptReloadMgr->_running_script_modules.find(context); + ASSERT(itr != sScriptReloadMgr->_running_script_modules.end() + && "Requested a reference to a non existent script context!"); + + return itr->second.first; } // Returns the full hot swap implemented ScriptReloadMgr diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index ddcc10b53dd..f65cd750ea9 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -43,6 +43,7 @@ #include "WardenWin.h" #include "MoveSpline.h" #include "WardenMac.h" +#include "Metric.h" #include <zlib.h> @@ -380,6 +381,8 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) break; } + TC_METRIC_VALUE("processed_packets", processedPackets); + _recvQueue.readd(requeuePackets.begin(), requeuePackets.end()); if (m_Socket && m_Socket->IsOpen() && _warden) @@ -536,6 +539,8 @@ void WorldSession::LogoutPlayer(bool save) //! Call script hook before deletion sScriptMgr->OnPlayerLogout(_player); + TC_METRIC_EVENT("player_events", "Logout", _player->GetName()); + //! Remove the player from the world // the player may not be in the world when logging out // e.g if he got disconnected during a transfer to another map @@ -823,32 +828,15 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi) mi->RemoveMovementFlag((maskToRemove)); #endif + if (!GetPlayer()->GetVehicleBase() || !(GetPlayer()->GetVehicle()->GetVehicleInfo()->m_flags & VEHICLE_FLAG_FIXED_POSITION)) + REMOVE_VIOLATING_FLAGS(mi->HasMovementFlag(MOVEMENTFLAG_ROOT), MOVEMENTFLAG_ROOT); + /*! This must be a packet spoofing attempt. MOVEMENTFLAG_ROOT sent from the client is not valid in conjunction with any of the moving movement flags such as MOVEMENTFLAG_FORWARD. It will freeze clients that receive this player's movement info. */ - // Only adjust movement flag removal for vehicles with the VEHICLE_FLAG_FIXED_POSITION flag, or the hard coded exceptions below: - // 30236 | Argent Cannon - // 39759 | Tankbuster Cannon - if (GetPlayer()->GetVehicleBase() && ((GetPlayer()->GetVehicle()->GetVehicleInfo()->m_flags & VEHICLE_FLAG_FIXED_POSITION) || GetPlayer()->GetVehicleBase()->GetEntry() == 30236 || GetPlayer()->GetVehicleBase()->GetEntry() == 39759)) - { - // Actually players in rooted vehicles still send commands, don't clear root for these! - // Check specifically for the following conditions: - // MOVEMENTFLAG_ROOT + no other flags (0x800) - // MOVEMENTFLAG_ROOT + MOVEMENTFLAG_LEFT (0x810) - // MOVEMENTFLAG_ROOT + MOVEMENTFLAG_RIGHT (0x820) - // MOVEMENTFLAG_ROOT + MOVEMENTFLAG_PITCH_UP (0x840) - // MOVEMENTFLAG_ROOT + MOVEMENTFLAG_PITCH_DOWN (0x880) - // If none of these are true, clear the root - REMOVE_VIOLATING_FLAGS(mi->HasMovementFlag(MOVEMENTFLAG_ROOT) && mi->HasMovementFlag(MOVEMENTFLAG_LEFT | MOVEMENTFLAG_RIGHT | MOVEMENTFLAG_PITCH_UP | MOVEMENTFLAG_PITCH_DOWN), - MOVEMENTFLAG_MASK_MOVING); - } - else - { - // Only remove here for non vehicles - REMOVE_VIOLATING_FLAGS(mi->HasMovementFlag(MOVEMENTFLAG_ROOT), - MOVEMENTFLAG_ROOT); - } + REMOVE_VIOLATING_FLAGS(mi->HasMovementFlag(MOVEMENTFLAG_ROOT) && mi->HasMovementFlag(MOVEMENTFLAG_MASK_MOVING), + MOVEMENTFLAG_MASK_MOVING); //! Cannot hover without SPELL_AURA_HOVER REMOVE_VIOLATING_FLAGS(mi->HasMovementFlag(MOVEMENTFLAG_HOVER) && !GetPlayer()->HasAuraType(SPELL_AURA_HOVER), @@ -874,8 +862,10 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo* mi) REMOVE_VIOLATING_FLAGS(mi->HasMovementFlag(MOVEMENTFLAG_FORWARD) && mi->HasMovementFlag(MOVEMENTFLAG_BACKWARD), MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_BACKWARD); - //! Cannot walk on water without SPELL_AURA_WATER_WALK - REMOVE_VIOLATING_FLAGS(mi->HasMovementFlag(MOVEMENTFLAG_WATERWALKING) && !GetPlayer()->HasAuraType(SPELL_AURA_WATER_WALK), + //! Cannot walk on water without SPELL_AURA_WATER_WALK except for ghosts + REMOVE_VIOLATING_FLAGS(mi->HasMovementFlag(MOVEMENTFLAG_WATERWALKING) && + !GetPlayer()->HasAuraType(SPELL_AURA_WATER_WALK) && + !GetPlayer()->HasAuraType(SPELL_AURA_GHOST), MOVEMENTFLAG_WATERWALKING); //! Cannot feather fall without SPELL_AURA_FEATHER_FALL diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 1c77283d812..a8a639d9b7f 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -324,9 +324,20 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler() switch (opcode) { case CMSG_PING: + { LogOpcodeText(opcode, sessionGuard); - return HandlePing(packet) ? ReadDataHandlerResult::Ok : ReadDataHandlerResult::Error; + try + { + return HandlePing(packet) ? ReadDataHandlerResult::Ok : ReadDataHandlerResult::Error; + } + catch (ByteBufferPositionException const&) + { + } + TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler(): client %s sent malformed CMSG_PING", GetRemoteIpAddress().to_string().c_str()); + return ReadDataHandlerResult::Error; + } case CMSG_AUTH_SESSION: + { LogOpcodeText(opcode, sessionGuard); if (_authed) { @@ -336,8 +347,17 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler() return ReadDataHandlerResult::Error; } - HandleAuthSession(packet); - return ReadDataHandlerResult::WaitingForQuery; + try + { + HandleAuthSession(packet); + return ReadDataHandlerResult::WaitingForQuery; + } + catch (ByteBufferPositionException const&) + { + } + TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler(): client %s sent malformed CMSG_AUTH_SESSION", GetRemoteIpAddress().to_string().c_str()); + return ReadDataHandlerResult::Error; + } case CMSG_KEEP_ALIVE: LogOpcodeText(opcode, sessionGuard); break; diff --git a/src/server/game/Spells/Auras/SpellAuraDefines.h b/src/server/game/Spells/Auras/SpellAuraDefines.h index e0daf59fcc2..43f6b51031a 100644 --- a/src/server/game/Spells/Auras/SpellAuraDefines.h +++ b/src/server/game/Spells/Auras/SpellAuraDefines.h @@ -348,7 +348,7 @@ enum AuraType SPELL_AURA_ABILITY_PERIODIC_CRIT = 286, SPELL_AURA_DEFLECT_SPELLS = 287, SPELL_AURA_IGNORE_HIT_DIRECTION = 288, - SPELL_AURA_289 = 289, + SPELL_AURA_PREVENT_DURABILITY_LOSS = 289, SPELL_AURA_MOD_CRIT_PCT = 290, SPELL_AURA_MOD_XP_QUEST_PCT = 291, SPELL_AURA_OPEN_STABLE = 292, @@ -367,7 +367,7 @@ enum AuraType SPELL_AURA_MOD_MINIMUM_SPEED = 305, SPELL_AURA_306 = 306, SPELL_AURA_HEAL_ABSORB_TEST = 307, - SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER = 308, // NYI + SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER = 308, SPELL_AURA_309 = 309, SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE = 310, SPELL_AURA_311 = 311, diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index ffe79293430..94fe6778ba1 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -346,7 +346,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]= &AuraEffect::HandleNoImmediateEffect, //286 SPELL_AURA_ABILITY_PERIODIC_CRIT implemented in AuraEffect::PeriodicTick &AuraEffect::HandleNoImmediateEffect, //287 SPELL_AURA_DEFLECT_SPELLS implemented in Unit::MagicSpellHitResult and Unit::MeleeSpellHitResult &AuraEffect::HandleNoImmediateEffect, //288 SPELL_AURA_IGNORE_HIT_DIRECTION implemented in Unit::MagicSpellHitResult and Unit::MeleeSpellHitResult Unit::RollMeleeOutcomeAgainst - &AuraEffect::HandleNULL, //289 unused (3.2.0) + &AuraEffect::HandleNoImmediateEffect, //289 SPELL_AURA_PREVENT_DURABILITY_LOSS implemented in Player::DurabilityPointsLoss &AuraEffect::HandleAuraModCritPct, //290 SPELL_AURA_MOD_CRIT_PCT &AuraEffect::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_XP_QUEST_PCT implemented in Player::RewardQuest &AuraEffect::HandleAuraOpenStable, //292 SPELL_AURA_OPEN_STABLE @@ -365,7 +365,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]= &AuraEffect::HandleAuraModIncreaseSpeed, //305 SPELL_AURA_MOD_MINIMUM_SPEED &AuraEffect::HandleUnused, //306 0 spells in 3.3.5 &AuraEffect::HandleUnused, //307 0 spells in 3.3.5 - &AuraEffect::HandleNULL, //308 new aura for hunter traps + &AuraEffect::HandleNoImmediateEffect, //308 SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER implemented in Unit::GetUnitCriticalChance and Unit::GetUnitSpellCriticalChance &AuraEffect::HandleUnused, //309 0 spells in 3.3.5 &AuraEffect::HandleNoImmediateEffect, //310 SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE implemented in Spell::CalculateDamageDone &AuraEffect::HandleNULL, //311 0 spells in 3.3.5 @@ -846,16 +846,6 @@ void AuraEffect::UpdatePeriodic(Unit* caster) case 59911: // Tenacity (vehicle) GetBase()->RefreshDuration(); break; - case 66823: case 67618: case 67619: case 67620: // Paralytic Toxin - // Get 0 effect aura - if (AuraEffect* slow = GetBase()->GetEffect(0)) - { - int32 newAmount = slow->GetAmount() - 10; - if (newAmount < -100) - newAmount = -100; - slow->ChangeAmount(newAmount); - } - break; default: break; } @@ -2545,10 +2535,9 @@ void AuraEffect::HandleAuraAllowFlight(AuraApplication const* aurApp, uint8 mode return; } - target->SetCanFly(apply); - - if (!apply && target->GetTypeId() == TYPEID_UNIT && !target->IsLevitating()) - target->GetMotionMaster()->MoveFall(); + if (target->SetCanFly(apply)) + if (!apply && !target->IsLevitating()) + target->GetMotionMaster()->MoveFall(); } void AuraEffect::HandleAuraWaterWalk(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -2938,10 +2927,9 @@ void AuraEffect::HandleAuraModIncreaseFlightSpeed(AuraApplication const* aurApp, // do not remove unit flag if there are more than this auraEffect of that kind on unit on unit if (mode & AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK && (apply || (!target->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !target->HasAuraType(SPELL_AURA_FLY)))) { - target->SetCanFly(apply); - - if (!apply && target->GetTypeId() == TYPEID_UNIT && !target->IsLevitating()) - target->GetMotionMaster()->MoveFall(); + if (target->SetCanFly(apply)) + if (!apply && !target->IsLevitating()) + target->GetMotionMaster()->MoveFall(); } //! Someone should clean up these hacks and remove it from this function. It doesn't even belong here. diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 1ca5df6b327..35606989240 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -337,7 +337,8 @@ m_spellInfo(spellproto), m_casterGuid(casterGUID ? casterGUID : caster->GetGUID( m_castItemGuid(castItem ? castItem->GetGUID() : ObjectGuid::Empty), m_applyTime(time(NULL)), m_owner(owner), m_timeCla(0), m_updateTargetMapInterval(0), m_casterLevel(caster ? caster->getLevel() : m_spellInfo->SpellLevel), m_procCharges(0), m_stackAmount(1), -m_isRemoved(false), m_isSingleTarget(false), m_isUsingCharges(false), m_dropEvent(nullptr) +m_isRemoved(false), m_isSingleTarget(false), m_isUsingCharges(false), m_dropEvent(nullptr), +m_procCooldown(std::chrono::steady_clock::time_point::min()) { if (m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel) m_timeCla = 1 * IN_MILLISECONDS; @@ -469,7 +470,7 @@ void Aura::_Remove(AuraRemoveMode removeMode) if (m_dropEvent) { - m_dropEvent->to_Abort = true; + m_dropEvent->ScheduleAbort(); m_dropEvent = nullptr; } } @@ -789,7 +790,7 @@ uint8 Aura::CalcMaxCharges(Unit* caster) const { uint32 maxProcCharges = m_spellInfo->ProcCharges; if (SpellProcEntry const* procEntry = sSpellMgr->GetSpellProcEntry(GetId())) - maxProcCharges = procEntry->charges; + maxProcCharges = procEntry->Charges; if (caster) if (Player* modOwner = caster->GetSpellModOwner()) @@ -1851,22 +1852,17 @@ bool Aura::CanStackWith(Aura const* existingAura) const return true; } -bool Aura::IsProcOnCooldown() const +bool Aura::IsProcOnCooldown(std::chrono::steady_clock::time_point now) const { - /*if (m_procCooldown) - { - if (m_procCooldown > time(NULL)) - return true; - }*/ - return false; + return m_procCooldown > now; } -void Aura::AddProcCooldown(uint32 /*msec*/) +void Aura::AddProcCooldown(std::chrono::steady_clock::time_point cooldownEnd) { - //m_procCooldown = time(NULL) + msec; + m_procCooldown = cooldownEnd; } -void Aura::PrepareProcToTrigger(AuraApplication* aurApp, ProcEventInfo& eventInfo) +void Aura::PrepareProcToTrigger(AuraApplication* aurApp, ProcEventInfo& eventInfo, std::chrono::steady_clock::time_point now) { bool prepare = CallScriptPrepareProcHandlers(aurApp, eventInfo); if (!prepare) @@ -1884,10 +1880,10 @@ void Aura::PrepareProcToTrigger(AuraApplication* aurApp, ProcEventInfo& eventInf ASSERT(procEntry); // cooldowns should be added to the whole aura (see 51698 area aura) - AddProcCooldown(procEntry->cooldown); + AddProcCooldown(now + procEntry->Cooldown); } -bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo) const +bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo, std::chrono::steady_clock::time_point now) const { SpellProcEntry const* procEntry = sSpellMgr->GetSpellProcEntry(GetId()); // only auras with spell proc entry can trigger proc @@ -1899,7 +1895,7 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI return false; // check proc cooldown - if (IsProcOnCooldown()) + if (IsProcOnCooldown(now)) return false; /// @todo @@ -1963,16 +1959,16 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI float Aura::CalcProcChance(SpellProcEntry const& procEntry, ProcEventInfo& eventInfo) const { - float chance = procEntry.chance; + float chance = procEntry.Chance; // calculate chances depending on unit with caster's data // so talents modifying chances and judgements will have properly calculated proc chance if (Unit* caster = GetCaster()) { // calculate ppm chance if present and we're using weapon - if (eventInfo.GetDamageInfo() && procEntry.ratePerMinute != 0) + if (eventInfo.GetDamageInfo() && procEntry.ProcsPerMinute != 0) { uint32 WeaponSpeed = caster->GetAttackTime(eventInfo.GetDamageInfo()->GetAttackType()); - chance = caster->GetPPMProcChance(WeaponSpeed, procEntry.ratePerMinute, GetSpellInfo()); + chance = caster->GetPPMProcChance(WeaponSpeed, procEntry.ProcsPerMinute, GetSpellInfo()); } // apply chance modifer aura, applies also to ppm chance (see improved judgement of light spell) if (Player* modOwner = caster->GetSpellModOwner()) diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index 750110dc146..a147957f258 100644 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -203,12 +203,12 @@ class TC_GAME_API Aura // this subsystem is not yet in use - the core of it is functional, but still some research has to be done // and some dependant problems fixed before it can replace old proc system (for example cooldown handling) // currently proc system functionality is implemented in Unit::ProcDamageAndSpell - bool IsProcOnCooldown() const; - void AddProcCooldown(uint32 msec); + bool IsProcOnCooldown(std::chrono::steady_clock::time_point now) const; + void AddProcCooldown(std::chrono::steady_clock::time_point cooldownEnd); bool IsUsingCharges() const { return m_isUsingCharges; } void SetUsingCharges(bool val) { m_isUsingCharges = val; } - void PrepareProcToTrigger(AuraApplication* aurApp, ProcEventInfo& eventInfo); - bool IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo) const; + void PrepareProcToTrigger(AuraApplication* aurApp, ProcEventInfo& eventInfo, std::chrono::steady_clock::time_point now); + bool IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo, std::chrono::steady_clock::time_point now) const; float CalcProcChance(SpellProcEntry const& procEntry, ProcEventInfo& eventInfo) const; void TriggerProcOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo); @@ -269,6 +269,8 @@ class TC_GAME_API Aura ChargeDropEvent* m_dropEvent; + std::chrono::steady_clock::time_point m_procCooldown; + private: Unit::AuraApplicationList m_removedApplications; }; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 4a36e6d3d72..5e58a602a43 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1564,7 +1564,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex) if (Creature* creatureTarget = unit->ToCreature()) { - if (!(creatureTarget->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_PROJECTILE_COLLISION)) + if (!(creatureTarget->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_CAN_COLLIDE_WITH_MISSILES)) continue; } } @@ -2320,8 +2320,14 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) } } + bool enablePvP = false; // need to check PvP state before spell effects, but act on it afterwards + if (spellHitTarget) { + // if target is flagged for pvp also flag caster if a player + if (unit->IsPvP() && m_caster->GetTypeId() == TYPEID_PLAYER) + enablePvP = true; // Decide on PvP flagging now, but act on it later. + SpellMissInfo missInfo2 = DoSpellHitOnUnit(spellHitTarget, mask, target->scaleAura); if (missInfo2 != SPELL_MISS_NONE) { @@ -2461,6 +2467,10 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) unit->SetStandState(UNIT_STAND_STATE_STAND); } + // Check for SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER + if (m_spellInfo->HasAttribute(SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER) && unit->GetTypeId() != TYPEID_PLAYER) + caster->CastSpell(unit, SPELL_INTERRUPT_NONPLAYER, true); + if (spellHitTarget) { //AI functions @@ -2474,8 +2484,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) // Needs to be called after dealing damage/healing to not remove breaking on damage auras DoTriggersOnSpellHit(spellHitTarget, mask); - // if target is fallged for pvp also flag caster if a player - if (unit->IsPvP() && m_caster->GetTypeId() == TYPEID_PLAYER) + if (enablePvP) m_caster->ToPlayer()->UpdatePvP(true); CallScriptAfterHitHandlers(); @@ -2910,7 +2919,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered if (m_caster->GetTypeId() == TYPEID_PLAYER) m_caster->ToPlayer()->SetSpellModTakingSpell(this, true); - // Fill cost data (not use power for item casts + // Fill cost data (do not use power for item casts) m_powerCost = m_CastItem ? 0 : m_spellInfo->CalcPowerCost(m_caster, m_spellSchoolMask); if (m_caster->GetTypeId() == TYPEID_PLAYER) m_caster->ToPlayer()->SetSpellModTakingSpell(this, false); @@ -2986,12 +2995,17 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered } // don't allow channeled spells / spells with cast time to be cast while moving + // exception are only channeled spells that have no casttime and SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING // (even if they are interrupted on moving, spells with almost immediate effect get to have their effect processed before movement interrupter kicks in) - if ((m_spellInfo->IsChanneled() || m_casttime) && m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->isMoving() && m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT) + if ((m_spellInfo->IsChanneled() || m_casttime) && m_caster->GetTypeId() == TYPEID_PLAYER && !(m_caster->IsCharmed() && m_caster->GetCharmerGUID().IsCreature()) && m_caster->isMoving() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT)) { - SendCastResult(SPELL_FAILED_MOVING); - finish(false); - return; + // 1. Is a channel spell, 2. Has no casttime, 3. And has flag to allow movement during channel + if (!(m_spellInfo->IsChanneled() && !m_casttime && m_spellInfo->HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING))) + { + SendCastResult(SPELL_FAILED_MOVING); + finish(false); + return; + } } // set timer base at cast time @@ -3219,6 +3233,10 @@ void Spell::cast(bool skipCheck) return; } + if (m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET)) + if (Creature* pet = ObjectAccessor::GetCreature(*m_caster, m_caster->GetPetGUID())) + pet->DespawnOrUnsummon(); + PrepareTriggersExecutedOnHit(); CallScriptOnCastHandlers(); @@ -3528,12 +3546,18 @@ void Spell::update(uint32 difftime) // check if the player caster has moved before the spell finished if ((m_caster->GetTypeId() == TYPEID_PLAYER && m_timer != 0) && - m_caster->isMoving() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT) && - (m_spellInfo->Effects[0].Effect != SPELL_EFFECT_STUCK || !m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING_FAR))) + m_caster->isMoving() && (m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT && + (m_spellInfo->Effects[0].Effect != SPELL_EFFECT_STUCK || !m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING_FAR)))) { // don't cancel for melee, autorepeat, triggered and instant spells - if (!IsNextMeleeSwingSpell() && !IsAutoRepeat() && !IsTriggered()) - cancel(); + if (!IsNextMeleeSwingSpell() && !IsAutoRepeat() && !IsTriggered() && !(IsChannelActive() && m_spellInfo->HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING))) + { + // if charmed by creature, trust the AI not to cheat and allow the cast to proceed + // @todo this is a hack, "creature" movesplines don't differentiate turning/moving right now + // however, checking what type of movement the spline is for every single spline would be really expensive + if (!m_caster->GetCharmerGUID().IsCreature()) + cancel(); + } } switch (m_spellState) @@ -3840,7 +3864,7 @@ void Spell::SendSpellStart() if (schoolImmunityMask || mechanicImmunityMask) castFlags |= CAST_FLAG_IMMUNITY; - if ((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell) + if (((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell) && !m_cast_count) castFlags |= CAST_FLAG_PENDING; if (m_spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO) || m_spellInfo->HasAttribute(SPELL_ATTR0_CU_NEEDS_AMMO_DATA)) @@ -3893,7 +3917,7 @@ void Spell::SendSpellGo() uint32 castFlags = CAST_FLAG_UNKNOWN_9; // triggered spells with spell visual != 0 - if ((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell) + if (((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell) && !m_cast_count) castFlags |= CAST_FLAG_PENDING; if (m_spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO) || m_spellInfo->HasAttribute(SPELL_ATTR0_CU_NEEDS_AMMO_DATA)) @@ -4835,7 +4859,7 @@ SpellCastResult Spell::CheckCast(bool strict) // cancel autorepeat spells if cast start when moving // (not wand currently autorepeat cast delayed to moving stop anyway in spell update code) - if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->ToPlayer()->isMoving()) + if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->ToPlayer()->isMoving() && (!m_caster->IsCharmed() || !m_caster->GetCharmerGUID().IsCreature())) { // skip stuck spell to allow use it in falling case and apply spell limitations at movement if ((!m_caster->HasUnitMovementFlag(MOVEMENTFLAG_FALLING_FAR) || m_spellInfo->Effects[0].Effect != SPELL_EFFECT_STUCK) && @@ -5173,7 +5197,11 @@ SpellCastResult Spell::CheckCast(bool strict) return SPELL_FAILED_OUT_OF_RANGE; else if (!result || m_preGeneratedPath.GetPathType() & (PATHFIND_NOPATH | PATHFIND_INCOMPLETE)) return SPELL_FAILED_NOPATH; + else if (m_preGeneratedPath.IsInvalidDestinationZ(target)) // Check position z, if not in a straight line + return SPELL_FAILED_NOPATH; } + else if (m_preGeneratedPath.IsInvalidDestinationZ(target)) // Check position z, if in a straight line + return SPELL_FAILED_NOPATH; m_preGeneratedPath.ReducePathLenghtByDist(objSize); // move back } @@ -5289,7 +5317,7 @@ SpellCastResult Spell::CheckCast(bool strict) switch (SummonProperties->Category) { case SUMMON_CATEGORY_PET: - if (m_caster->GetPetGUID()) + if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET) && m_caster->GetPetGUID()) return SPELL_FAILED_ALREADY_HAVE_SUMMON; // intentional missing break, check both GetPetGUID() and GetCharmGUID for SUMMON_CATEGORY_PET case SUMMON_CATEGORY_PUPPET: @@ -5305,7 +5333,7 @@ SpellCastResult Spell::CheckCast(bool strict) { if (m_targets.GetUnitTarget()->GetTypeId() != TYPEID_PLAYER) return SPELL_FAILED_BAD_TARGETS; - if (m_targets.GetUnitTarget()->GetPetGUID()) + if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET) && m_targets.GetUnitTarget()->GetPetGUID()) return SPELL_FAILED_ALREADY_HAVE_SUMMON; } break; @@ -5314,13 +5342,13 @@ SpellCastResult Spell::CheckCast(bool strict) { if (m_caster->GetPetGUID()) //let warlock do a replacement summon { - if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->getClass() == CLASS_WARLOCK) + if (m_caster->GetTypeId() == TYPEID_PLAYER) { if (strict) //starting cast, trigger pet stun (cast by pet so it doesn't attack player) if (Pet* pet = m_caster->ToPlayer()->GetPet()) pet->CastSpell(pet, 32752, true, NULL, NULL, pet->GetGUID()); } - else + else if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET)) return SPELL_FAILED_ALREADY_HAVE_SUMMON; } @@ -5447,7 +5475,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (m_spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_CHARM || m_spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_POSSESS) { - if (m_caster->GetPetGUID()) + if (!m_spellInfo->HasAttribute(SPELL_ATTR1_DISMISS_PET) && m_caster->GetPetGUID()) return SPELL_FAILED_ALREADY_HAVE_SUMMON; if (m_caster->GetCharmGUID()) @@ -5477,7 +5505,7 @@ SpellCastResult Spell::CheckCast(bool strict) } case SPELL_AURA_MOUNTED: { - if (m_caster->IsInWater()) + if (m_caster->IsInWater() && m_spellInfo->HasAura(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) return SPELL_FAILED_ONLY_ABOVEWATER; // Ignore map check if spell have AreaId. AreaId already checked and this prevent special mount spells @@ -5593,7 +5621,14 @@ SpellCastResult Spell::CheckPetCast(Unit* target) m_targets.SetUnitTarget(target); } - // cooldown + // check power requirement + // this would be zero until ::prepare normally, we set it here (it gets reset in ::prepare) + m_powerCost = m_spellInfo->CalcPowerCost(m_caster, m_spellSchoolMask); + SpellCastResult failReason = CheckPower(); + if (failReason != SPELL_CAST_OK) + return failReason; + + // check cooldown if (Creature* creatureCaster = m_caster->ToCreature()) if (!creatureCaster->GetSpellHistory()->IsReady(m_spellInfo)) return SPELL_FAILED_NOT_READY; @@ -5736,6 +5771,9 @@ SpellCastResult Spell::CheckCasterAuras() const bool Spell::CanAutoCast(Unit* target) { + if (!target) + return (CheckPetCast(target) == SPELL_CAST_OK); + ObjectGuid targetguid = target->GetGUID(); // check if target already has the same or a more powerful aura @@ -5772,16 +5810,19 @@ bool Spell::CanAutoCast(Unit* target) } SpellCastResult result = CheckPetCast(target); - if (result == SPELL_CAST_OK || result == SPELL_FAILED_UNIT_NOT_INFRONT) { + // do not check targets for ground-targeted spells (we target them on top of the intended target anyway) + if (GetSpellInfo()->ExplicitTargetMask & TARGET_FLAG_DEST_LOCATION) + return true; SelectSpellTargets(); //check if among target units, our WANTED target is as well (->only self cast spells return false) - for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) + for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) if (ihit->targetGUID == targetguid) return true; } - return false; //target invalid + // either the cast failed or the intended target wouldn't be hit + return false; } SpellCastResult Spell::CheckRange(bool strict) @@ -5790,43 +5831,76 @@ SpellCastResult Spell::CheckRange(bool strict) if (!strict && m_casttime == 0) return SPELL_CAST_OK; - uint32 range_type = 0; + Unit* target = m_targets.GetUnitTarget(); + float minRange = 0.0f; + float maxRange = 0.0f; + float rangeMod = 0.0f; + if (strict && IsNextMeleeSwingSpell()) + maxRange = 100.0f; + else if (m_spellInfo->RangeEntry) + { + if (m_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE) + { + rangeMod = m_caster->GetCombatReach() + 4.0f / 3.0f; + if (target) + rangeMod += target->GetCombatReach(); + else + rangeMod += m_caster->GetCombatReach(); - if (m_spellInfo->RangeEntry) - { - // check needed by 68766 51693 - both spells are cast on enemies and have 0 max range - // these are triggered by other spells - possibly we should omit range check in that case? - if (m_spellInfo->RangeEntry->ID == 1) - return SPELL_CAST_OK; + rangeMod = std::max(rangeMod, NOMINAL_MELEE_RANGE); + } + else + { + float meleeRange = 0.0f; + if (m_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED) + { + meleeRange = m_caster->GetCombatReach() + 4.0f / 3.0f; + if (target) + meleeRange += target->GetCombatReach(); + else + meleeRange += m_caster->GetCombatReach(); + + meleeRange = std::max(meleeRange, NOMINAL_MELEE_RANGE); + } + + minRange = m_caster->GetSpellMinRangeForTarget(target, m_spellInfo) + meleeRange; + maxRange = m_caster->GetSpellMaxRangeForTarget(target, m_spellInfo); + + if (target || m_targets.GetCorpseTarget()) + { + rangeMod = m_caster->GetCombatReach(); + if (target) + rangeMod += target->GetCombatReach(); - range_type = m_spellInfo->RangeEntry->type; + if (minRange > 0.0f && !(m_spellInfo->RangeEntry->type & SPELL_RANGE_RANGED)) + minRange += rangeMod; + } + } + + if (target && m_caster->isMoving() && target->isMoving() && !m_caster->IsWalking() && !target->IsWalking() && + (m_spellInfo->RangeEntry->type & SPELL_RANGE_MELEE || target->GetTypeId() == TYPEID_PLAYER)) + rangeMod += 5.0f / 3.0f; } - Unit* target = m_targets.GetUnitTarget(); - float max_range = m_caster->GetSpellMaxRangeForTarget(target, m_spellInfo); - float min_range = m_caster->GetSpellMinRangeForTarget(target, m_spellInfo); + if (m_spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO) && m_caster->GetTypeId() == TYPEID_PLAYER) + if (Item* ranged = m_caster->ToPlayer()->GetWeaponForAttack(RANGED_ATTACK, true)) + maxRange *= ranged->GetTemplate()->RangedModRange * 0.01f; if (Player* modOwner = m_caster->GetSpellModOwner()) - modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, max_range, this); + modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, maxRange, this); + + maxRange += rangeMod; + + minRange *= minRange; + maxRange *= maxRange; if (target && target != m_caster) { - if (range_type == SPELL_RANGE_MELEE) - { - // Because of lag, we can not check too strictly here. - if (!m_caster->IsWithinMeleeRange(target, max_range)) - return SPELL_FAILED_OUT_OF_RANGE; - } - else if (!m_caster->IsWithinCombatRange(target, max_range)) - return SPELL_FAILED_OUT_OF_RANGE; //0x5A; + if (m_caster->GetExactDistSq(target) > maxRange) + return SPELL_FAILED_OUT_OF_RANGE; - if (range_type == SPELL_RANGE_RANGED) - { - if (m_caster->IsWithinMeleeRange(target)) - return SPELL_FAILED_TOO_CLOSE; - } - else if (min_range && m_caster->IsWithinCombatRange(target, min_range)) // skip this check if min_range = 0 - return SPELL_FAILED_TOO_CLOSE; + if (minRange > 0.0f && m_caster->GetExactDistSq(target) < minRange) + return SPELL_FAILED_OUT_OF_RANGE; if (m_caster->GetTypeId() == TYPEID_PLAYER && (m_spellInfo->FacingCasterFlags & SPELL_FACING_FLAG_INFRONT) && !m_caster->HasInArc(static_cast<float>(M_PI), target)) @@ -5835,10 +5909,10 @@ SpellCastResult Spell::CheckRange(bool strict) if (m_targets.HasDst() && !m_targets.HasTraj()) { - if (!m_caster->IsWithinDist3d(m_targets.GetDstPos(), max_range)) - return SPELL_FAILED_OUT_OF_RANGE; - if (min_range && m_caster->IsWithinDist3d(m_targets.GetDstPos(), min_range)) - return SPELL_FAILED_TOO_CLOSE; + if (m_caster->GetExactDistSq(m_targets.GetDstPos()) > maxRange) + return !(_triggeredCastFlags & TRIGGERED_DONT_REPORT_CAST_ERROR) ? SPELL_FAILED_OUT_OF_RANGE : SPELL_FAILED_DONT_REPORT; + if (minRange > 0.0f && m_caster->GetExactDistSq(m_targets.GetDstPos()) < minRange) + return !(_triggeredCastFlags & TRIGGERED_DONT_REPORT_CAST_ERROR) ? SPELL_FAILED_OUT_OF_RANGE : SPELL_FAILED_DONT_REPORT; } return SPELL_CAST_OK; @@ -6928,7 +7002,7 @@ SpellCastResult Spell::CanOpenLock(uint32 effIndex, uint32 lockId, SkillType& sk reqSkillValue = lockInfo->Skill[j]; // castitem check: rogue using skeleton keys. the skill values should not be added in this case. - skillValue = m_CastItem || m_caster->GetTypeId()!= TYPEID_PLAYER ? + skillValue = m_CastItem || m_caster->GetTypeId() != TYPEID_PLAYER ? 0 : m_caster->ToPlayer()->GetSkillValue(skillId); // skill bonus provided by casting spell (mostly item spells) diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h index b7134283ccb..46384fc54ec 100644 --- a/src/server/game/Spells/Spell.h +++ b/src/server/game/Spells/Spell.h @@ -218,6 +218,8 @@ enum SpellEffectHandleMode typedef std::list<std::pair<uint32, ObjectGuid>> DispelList; +static const uint32 SPELL_INTERRUPT_NONPLAYER = 32747; + class TC_GAME_API Spell { friend void Unit::SetCurrentCastSpell(Spell* pSpell); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 51b6db197db..b0e3b6deeee 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -556,7 +556,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) if (uint32 combo = player->GetComboPoints()) { float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK); - damage += irand(int32(ap * combo * 0.03f), int32(ap * combo * 0.07f)); + damage += std::lroundf(ap * combo * 0.07f); // Eviscerate and Envenom Bonus Damage (item set effect) if (m_caster->HasAura(37169)) @@ -596,17 +596,13 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) if (Player* caster = m_caster->ToPlayer()) { // Add Ammo and Weapon damage plus RAP * 0.1 - if (Item* item = caster->GetWeaponForAttack(RANGED_ATTACK)) - { - ItemTemplate const* weaponTemplate = item->GetTemplate(); - float dmg_min = weaponTemplate->Damage[0].DamageMin; - float dmg_max = weaponTemplate->Damage[0].DamageMax; - if (dmg_max == 0.0f && dmg_min > dmg_max) - damage += int32(dmg_min); - else - damage += irand(int32(dmg_min), int32(dmg_max)); - damage += int32(caster->GetAmmoDPS() * weaponTemplate->Delay * 0.001f); - } + float dmg_min = caster->GetWeaponDamageRange(RANGED_ATTACK, MINDAMAGE); + float dmg_max = caster->GetWeaponDamageRange(RANGED_ATTACK, MAXDAMAGE); + if (dmg_max == 0.0f && dmg_min > dmg_max) + damage += int32(dmg_min); + else + damage += irand(int32(dmg_min), int32(dmg_max)); + damage += int32(caster->GetAmmoDPS() * caster->GetAttackTime(RANGED_ATTACK) * 0.001f); } } break; @@ -1683,6 +1679,8 @@ void Spell::EffectCreateItem2(SpellEffIndex effIndex) } else player->AutoStoreLoot(m_spellInfo->Id, LootTemplates_Spell); // create some random items + + player->UpdateCraftSkill(m_spellInfo->Id); } /// @todo ExecuteLogEffectCreateItem(i, m_spellInfo->Effects[i].ItemType); } @@ -3019,6 +3017,12 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex) //OldSummon->Relocate(px, py, pz, OldSummon->GetOrientation()); //OldSummon->SetMap(owner->GetMap()); //owner->GetMap()->Add(OldSummon->ToCreature()); + if (OldSummon->getPetType() == SUMMON_PET) + { + OldSummon->SetHealth(OldSummon->GetMaxHealth()); + OldSummon->SetPower(OldSummon->getPowerType(), + OldSummon->GetMaxPower(OldSummon->getPowerType())); + } if (owner->GetTypeId() == TYPEID_PLAYER && OldSummon->isControlled()) owner->ToPlayer()->PetSpellInitialize(); @@ -3505,7 +3509,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex) Map* map = target->GetMap(); if (!pGameObj->Create(map->GenerateLowGuid<HighGuid::GameObject>(), gameobject_id, map, - m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY)) + m_caster->GetPhaseMask(), Position(x, y, z, target->GetOrientation()), G3D::Quat(), 255, GO_STATE_READY)) { delete pGameObj; return; @@ -3530,7 +3534,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex) { GameObject* linkedGO = new GameObject; if (linkedGO->Create(map->GenerateLowGuid<HighGuid::GameObject>(), linkedEntry, map, - m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY)) + m_caster->GetPhaseMask(), Position(x, y, z, target->GetOrientation()), G3D::Quat(), 255, GO_STATE_READY)) { linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0); linkedGO->SetSpellId(m_spellInfo->Id); @@ -4119,13 +4123,16 @@ void Spell::EffectDuel(SpellEffIndex effIndex) uint32 gameobject_id = m_spellInfo->Effects[effIndex].MiscValue; - Map* map = m_caster->GetMap(); - if (!pGameObj->Create(map->GenerateLowGuid<HighGuid::GameObject>(), gameobject_id, - map, m_caster->GetPhaseMask(), - m_caster->GetPositionX()+(unitTarget->GetPositionX()-m_caster->GetPositionX())/2, - m_caster->GetPositionY()+(unitTarget->GetPositionY()-m_caster->GetPositionY())/2, + Position const pos = + { + m_caster->GetPositionX() + (unitTarget->GetPositionX() - m_caster->GetPositionX()) / 2, + m_caster->GetPositionY() + (unitTarget->GetPositionY() - m_caster->GetPositionY()) / 2, m_caster->GetPositionZ(), - m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY)) + m_caster->GetOrientation() + }; + + Map* map = m_caster->GetMap(); + if (!pGameObj->Create(map->GenerateLowGuid<HighGuid::GameObject>(), gameobject_id, map, m_caster->GetPhaseMask(), pos, G3D::Quat(), 0, GO_STATE_READY)) { delete pGameObj; return; @@ -4458,7 +4465,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex) Map* map = m_caster->GetMap(); if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), go_id, map, - m_caster->GetPhaseMask(), x, y, z, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY)) + m_caster->GetPhaseMask(), Position(x, y, z, m_caster->GetOrientation()), G3D::Quat(), 255, GO_STATE_READY)) { delete go; return; @@ -5087,7 +5094,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) GameObject* pGameObj = new GameObject; if (!pGameObj->Create(cMap->GenerateLowGuid<HighGuid::GameObject>(), name_id, cMap, - m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY)) + m_caster->GetPhaseMask(), Position(fx, fy, fz, m_caster->GetOrientation()), G3D::Quat(), 255, GO_STATE_READY)) { delete pGameObj; return; @@ -5153,7 +5160,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) { GameObject* linkedGO = new GameObject; if (linkedGO->Create(cMap->GenerateLowGuid<HighGuid::GameObject>(), linkedEntry, cMap, - m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY)) + m_caster->GetPhaseMask(), Position(fx, fy, fz, m_caster->GetOrientation()), G3D::Quat(), 255, GO_STATE_READY)) { linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0); //linkedGO->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()); @@ -5475,7 +5482,7 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex) for (uint32 l = 0; l + 1 < MAX_RUNES && count > 0; ++l) { // Check if both runes are on cd as that is the only time when this needs to come into effect - if ((player->GetRuneCooldown(l) && player->GetCurrentRune(l) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) && (player->GetRuneCooldown(l+1) && player->GetCurrentRune(l+1) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB))) + if ((player->GetRuneCooldown(l) && player->GetBaseRune(l) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) && (player->GetRuneCooldown(l+1) && player->GetBaseRune(l+1) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB))) { // Should always update the rune with the lowest cd if (l + 1 < MAX_RUNES && player->GetRuneCooldown(l) >= player->GetRuneCooldown(l+1)) diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index f6078bd063f..ac157b48783 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -525,10 +525,10 @@ float SpellEffectInfo::CalcValueMultiplier(Unit* caster, Spell* spell) const float SpellEffectInfo::CalcDamageMultiplier(Unit* caster, Spell* spell) const { - float multiplier = DamageMultiplier; + float multiplierPercent = DamageMultiplier * 100.0f; if (Player* modOwner = (caster ? caster->GetSpellModOwner() : NULL)) - modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_DAMAGE_MULTIPLIER, multiplier, spell); - return multiplier; + modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_DAMAGE_MULTIPLIER, multiplierPercent, spell); + return multiplierPercent / 100.0f; } bool SpellEffectInfo::HasRadius() const diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 50f750f2ca5..ed0d95f0a58 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -955,11 +955,11 @@ SpellProcEntry const* SpellMgr::GetSpellProcEntry(uint32 spellId) const bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcEventInfo& eventInfo) const { // proc type doesn't match - if (!(eventInfo.GetTypeMask() & procEntry.typeMask)) + if (!(eventInfo.GetTypeMask() & procEntry.ProcFlags)) return false; // check XP or honor target requirement - if (procEntry.attributesMask & PROC_ATTR_REQ_EXP_OR_HONOR) + if (procEntry.AttributesMask & PROC_ATTR_REQ_EXP_OR_HONOR) if (Player* actor = eventInfo.GetActor()->ToPlayer()) if (eventInfo.GetActionTarget() && !actor->isHonorOrXPTarget(eventInfo.GetActionTarget())) return false; @@ -969,7 +969,7 @@ bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcE return true; // check school mask (if set) for other trigger types - if (procEntry.schoolMask && !(eventInfo.GetSchoolMask() & procEntry.schoolMask)) + if (procEntry.SchoolMask && !(eventInfo.GetSchoolMask() & procEntry.SchoolMask)) return false; // check spell family name/flags (if set) for spells @@ -977,31 +977,31 @@ bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcE { SpellInfo const* eventSpellInfo = eventInfo.GetSpellInfo(); - if (procEntry.spellFamilyName && eventSpellInfo && (procEntry.spellFamilyName != eventSpellInfo->SpellFamilyName)) + if (procEntry.SpellFamilyName && eventSpellInfo && (procEntry.SpellFamilyName != eventSpellInfo->SpellFamilyName)) return false; - if (procEntry.spellFamilyMask && eventSpellInfo && !(procEntry.spellFamilyMask & eventSpellInfo->SpellFamilyFlags)) + if (procEntry.SpellFamilyMask && eventSpellInfo && !(procEntry.SpellFamilyMask & eventSpellInfo->SpellFamilyFlags)) return false; } // check spell type mask (if set) if (eventInfo.GetTypeMask() & (SPELL_PROC_FLAG_MASK | PERIODIC_PROC_FLAG_MASK)) { - if (procEntry.spellTypeMask && !(eventInfo.GetSpellTypeMask() & procEntry.spellTypeMask)) + if (procEntry.SpellTypeMask && !(eventInfo.GetSpellTypeMask() & procEntry.SpellTypeMask)) return false; } // check spell phase mask if (eventInfo.GetTypeMask() & REQ_SPELL_PHASE_PROC_FLAG_MASK) { - if (!(eventInfo.GetSpellPhaseMask() & procEntry.spellPhaseMask)) + if (!(eventInfo.GetSpellPhaseMask() & procEntry.SpellPhaseMask)) return false; } // check hit mask (on taken hit or on done hit, but not on spell cast phase) if ((eventInfo.GetTypeMask() & TAKEN_HIT_PROC_FLAG_MASK) || ((eventInfo.GetTypeMask() & DONE_HIT_PROC_FLAG_MASK) && !(eventInfo.GetSpellPhaseMask() & PROC_SPELL_PHASE_CAST))) { - uint32 hitMask = procEntry.hitMask; + uint32 hitMask = procEntry.HitMask; // get default values if hit mask not set if (!hitMask) { @@ -1929,8 +1929,11 @@ void SpellMgr::LoadSpellProcs() mSpellProcMap.clear(); // need for reload case - // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 - QueryResult result = WorldDatabase.Query("SELECT spellId, schoolMask, spellFamilyName, spellFamilyMask0, spellFamilyMask1, spellFamilyMask2, typeMask, spellTypeMask, spellPhaseMask, hitMask, attributesMask, ratePerMinute, chance, cooldown, charges FROM spell_proc"); + // 0 1 2 3 4 5 + QueryResult result = WorldDatabase.Query("SELECT SpellId, SchoolMask, SpellFamilyName, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, " + // 6 7 8 9 10 11 12 13 14 + "ProcFlags, SpellTypeMask, SpellPhaseMask, HitMask, AttributesMask, ProcsPerMinute, Chance, Cooldown, Charges FROM spell_proc"); + if (!result) { TC_LOG_INFO("server.loading", ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty."); @@ -1972,21 +1975,20 @@ void SpellMgr::LoadSpellProcs() SpellProcEntry baseProcEntry; - baseProcEntry.schoolMask = fields[1].GetInt8(); - baseProcEntry.spellFamilyName = fields[2].GetUInt16(); - baseProcEntry.spellFamilyMask[0] = fields[3].GetUInt32(); - baseProcEntry.spellFamilyMask[1] = fields[4].GetUInt32(); - baseProcEntry.spellFamilyMask[2] = fields[5].GetUInt32(); - baseProcEntry.typeMask = fields[6].GetUInt32(); - baseProcEntry.spellTypeMask = fields[7].GetUInt32(); - baseProcEntry.spellPhaseMask = fields[8].GetUInt32(); - baseProcEntry.hitMask = fields[9].GetUInt32(); - baseProcEntry.attributesMask = fields[10].GetUInt32(); - baseProcEntry.ratePerMinute = fields[11].GetFloat(); - baseProcEntry.chance = fields[12].GetFloat(); - float cooldown = fields[13].GetFloat(); - baseProcEntry.cooldown = uint32(cooldown); - baseProcEntry.charges = fields[14].GetUInt32(); + baseProcEntry.SchoolMask = fields[1].GetInt8(); + baseProcEntry.SpellFamilyName = fields[2].GetUInt16(); + baseProcEntry.SpellFamilyMask[0] = fields[3].GetUInt32(); + baseProcEntry.SpellFamilyMask[1] = fields[4].GetUInt32(); + baseProcEntry.SpellFamilyMask[2] = fields[5].GetUInt32(); + baseProcEntry.ProcFlags = fields[6].GetUInt32(); + baseProcEntry.SpellTypeMask = fields[7].GetUInt32(); + baseProcEntry.SpellPhaseMask = fields[8].GetUInt32(); + baseProcEntry.HitMask = fields[9].GetUInt32(); + baseProcEntry.AttributesMask = fields[10].GetUInt32(); + baseProcEntry.ProcsPerMinute = fields[11].GetFloat(); + baseProcEntry.Chance = fields[12].GetFloat(); + baseProcEntry.Cooldown = Milliseconds(fields[13].GetUInt32()); + baseProcEntry.Charges = fields[14].GetUInt8(); while (spellInfo) { @@ -1999,56 +2001,46 @@ void SpellMgr::LoadSpellProcs() SpellProcEntry procEntry = SpellProcEntry(baseProcEntry); // take defaults from dbcs - if (!procEntry.typeMask) - procEntry.typeMask = spellInfo->ProcFlags; - if (!procEntry.charges) - procEntry.charges = spellInfo->ProcCharges; - if (!procEntry.chance && !procEntry.ratePerMinute) - procEntry.chance = float(spellInfo->ProcChance); + if (!procEntry.ProcFlags) + procEntry.ProcFlags = spellInfo->ProcFlags; + if (!procEntry.Charges) + procEntry.Charges = spellInfo->ProcCharges; + if (!procEntry.Chance && !procEntry.ProcsPerMinute) + procEntry.Chance = float(spellInfo->ProcChance); // validate data - if (procEntry.schoolMask & ~SPELL_SCHOOL_MASK_ALL) - TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellInfo->Id, procEntry.schoolMask); - if (procEntry.spellFamilyName && (procEntry.spellFamilyName < 3 || procEntry.spellFamilyName > 17 || procEntry.spellFamilyName == 14 || procEntry.spellFamilyName == 16)) - TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellInfo->Id, procEntry.spellFamilyName); - if (procEntry.chance < 0) - { - TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in the `chance` field", spellInfo->Id); - procEntry.chance = 0; - } - if (procEntry.ratePerMinute < 0) + if (procEntry.SchoolMask & ~SPELL_SCHOOL_MASK_ALL) + TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `SchoolMask` set: %u", spellInfo->Id, procEntry.SchoolMask); + if (procEntry.SpellFamilyName && (procEntry.SpellFamilyName < 3 || procEntry.SpellFamilyName > 17 || procEntry.SpellFamilyName == 14 || procEntry.SpellFamilyName == 16)) + TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `SpellFamilyName` set: %u", spellInfo->Id, procEntry.SpellFamilyName); + if (procEntry.Chance < 0) { - TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in the `ratePerMinute` field", spellInfo->Id); - procEntry.ratePerMinute = 0; + TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in the `Chance` field", spellInfo->Id); + procEntry.Chance = 0; } - if (cooldown < 0) + if (procEntry.ProcsPerMinute < 0) { - TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in the `cooldown` field", spellInfo->Id); - procEntry.cooldown = 0; + TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in the `ProcsPerMinute` field", spellInfo->Id); + procEntry.ProcsPerMinute = 0; } - if (procEntry.chance == 0 && procEntry.ratePerMinute == 0) - TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u doesn't have any `chance` and `ratePerMinute` values defined, proc will not be triggered", spellInfo->Id); - if (procEntry.charges > 99) - { - TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has a too big `charges` field value.", spellInfo->Id); - procEntry.charges = 99; - } - if (!procEntry.typeMask) - TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u doesn't have any `typeMask` value defined, proc will not be triggered.", spellInfo->Id); - if (procEntry.spellTypeMask & ~PROC_SPELL_TYPE_MASK_ALL) - TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellInfo->Id, procEntry.spellTypeMask); - if (procEntry.spellTypeMask && !(procEntry.typeMask & (SPELL_PROC_FLAG_MASK | PERIODIC_PROC_FLAG_MASK))) - TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it will not be used for the defined `typeMask` value.", spellInfo->Id); - if (!procEntry.spellPhaseMask && procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK) - TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u doesn't have any `spellPhaseMask` value defined, but it is required for the defined `typeMask` value. Proc will not be triggered.", spellInfo->Id); - if (procEntry.spellPhaseMask & ~PROC_SPELL_PHASE_MASK_ALL) - TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellInfo->Id, procEntry.spellPhaseMask); - if (procEntry.spellPhaseMask && !(procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK)) - TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has a `spellPhaseMask` value defined, but it will not be used for the defined `typeMask` value.", spellInfo->Id); - if (procEntry.hitMask & ~PROC_HIT_MASK_ALL) - TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellInfo->Id, procEntry.hitMask); - if (procEntry.hitMask && !(procEntry.typeMask & TAKEN_HIT_PROC_FLAG_MASK || (procEntry.typeMask & DONE_HIT_PROC_FLAG_MASK && (!procEntry.spellPhaseMask || procEntry.spellPhaseMask & (PROC_SPELL_PHASE_HIT | PROC_SPELL_PHASE_FINISH))))) - TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has `hitMask` value defined, but it will not be used for defined `typeMask` and `spellPhaseMask` values.", spellInfo->Id); + if (procEntry.Chance == 0 && procEntry.ProcsPerMinute == 0) + TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u doesn't have any `Chance` and `ProcsPerMinute` values defined, proc will not be triggered", spellInfo->Id); + if (!procEntry.ProcFlags) + TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u doesn't have any `ProcFlags` value defined, proc will not be triggered.", spellInfo->Id); + if (procEntry.SpellTypeMask & ~PROC_SPELL_TYPE_MASK_ALL) + TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `SpellTypeMask` set: %u", spellInfo->Id, procEntry.SpellTypeMask); + if (procEntry.SpellTypeMask && !(procEntry.ProcFlags & (SPELL_PROC_FLAG_MASK | PERIODIC_PROC_FLAG_MASK))) + TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has `SpellTypeMask` value defined, but it will not be used for the defined `ProcFlags` value.", spellInfo->Id); + if (!procEntry.SpellPhaseMask && procEntry.ProcFlags & REQ_SPELL_PHASE_PROC_FLAG_MASK) + TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u doesn't have any `SpellPhaseMask` value defined, but it is required for the defined `ProcFlags` value. Proc will not be triggered.", spellInfo->Id); + if (procEntry.SpellPhaseMask & ~PROC_SPELL_PHASE_MASK_ALL) + TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has wrong `SpellPhaseMask` set: %u", spellInfo->Id, procEntry.SpellPhaseMask); + if (procEntry.SpellPhaseMask && !(procEntry.ProcFlags & REQ_SPELL_PHASE_PROC_FLAG_MASK)) + TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has a `SpellPhaseMask` value defined, but it will not be used for the defined `ProcFlags` value.", spellInfo->Id); + if (procEntry.HitMask & ~PROC_HIT_MASK_ALL) + TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has wrong `HitMask` set: %u", spellInfo->Id, procEntry.HitMask); + if (procEntry.HitMask && !(procEntry.ProcFlags & TAKEN_HIT_PROC_FLAG_MASK || (procEntry.ProcFlags & DONE_HIT_PROC_FLAG_MASK && (!procEntry.SpellPhaseMask || procEntry.SpellPhaseMask & (PROC_SPELL_PHASE_HIT | PROC_SPELL_PHASE_FINISH))))) + TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has `HitMask` value defined, but it will not be used for defined `ProcFlags` and `SpellPhaseMask` values.", spellInfo->Id); mSpellProcMap[spellInfo->Id] = procEntry; @@ -3081,6 +3073,13 @@ void SpellMgr::LoadSpellInfoCorrections() case 53385: // Divine Storm (Damage) spellInfo->MaxAffectedTargets = 4; break; + case 53480: // Roar of Sacrifice + // missing spell effect 2 data, taken from 4.3.4 + spellInfo->Effects[EFFECT_1].Effect = SPELL_EFFECT_APPLY_AURA; + spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_DUMMY; + spellInfo->Effects[EFFECT_1].MiscValue = 127; + spellInfo->Effects[EFFECT_1].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ALLY); + break; case 42005: // Bloodboil case 38296: // Spitfire Totem case 37676: // Insidious Whisper @@ -3346,6 +3345,24 @@ void SpellMgr::LoadSpellInfoCorrections() //! HACK: This spell break quest complete for alliance and on retail not used °_O spellInfo->Effects[EFFECT_0].Effect = 0; break; + case 47476: // Deathknight - Strangulate + case 15487: // Priest - Silence + case 5211: // Druid - Bash - R1 + case 6798: // Druid - Bash - R2 + case 8983: // Druid - Bash - R3 + spellInfo->AttributesEx7 |= SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER; + break; + case 42490: // Energized! + case 42492: // Cast Energized + spellInfo->AttributesEx |= SPELL_ATTR1_NO_THREAT; + break; + case 46842: // Flame Ring + case 46836: // Flame Patch + spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(); + break; + case 29726: // Test Ribbon Pole Channel + spellInfo->InterruptFlags &= ~AURA_INTERRUPT_FLAG_CAST; + break; // VIOLET HOLD SPELLS // case 54258: // Water Globule (Ichoron) @@ -3704,9 +3721,17 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AttributesEx6 |= SPELL_ATTR6_CAN_TARGET_INVISIBLE; spellInfo->AttributesEx2 |= SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS; break; - case 75888: // Awaken Flames - case 75889: // Awaken Flames - spellInfo->AttributesEx |= SPELL_ATTR1_CANT_TARGET_SELF; + case 75875: // Combustion and Consumption Heroic versions lacks radius data + spellInfo->Effects[EFFECT_0].Mechanic = MECHANIC_NONE; + spellInfo->Effects[EFFECT_1].Mechanic = MECHANIC_SNARE; + spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS); + break; + case 75884: + spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS); + // No break + case 75883: + case 75876: + spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS); break; // ENDOF RUBY SANCTUM SPELLS // @@ -3755,12 +3780,6 @@ void SpellMgr::LoadSpellInfoCorrections() case 24314: // Threatening Gaze spellInfo->AuraInterruptFlags |= AURA_INTERRUPT_FLAG_CAST | AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_JUMP; break; - case 45257: // Using Steam Tonk Controller - case 45440: // Steam Tonk Controller - case 60256: // Collect Sample - // Crashes client on pressing ESC - spellInfo->AttributesEx4 &= ~SPELL_ATTR4_CAN_CAST_WHILE_CASTING; - break; // ISLE OF CONQUEST SPELLS // case 66551: // Teleport diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index fea7513b092..75da933636c 100644 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -266,7 +266,7 @@ enum ProcFlagsHit PROC_HIT_REFLECT = 0x0000800, PROC_HIT_INTERRUPT = 0x0001000, // (not used atm) PROC_HIT_FULL_BLOCK = 0x0002000, - PROC_HIT_MASK_ALL = 0x2FFF + PROC_HIT_MASK_ALL = 0x0002FFF }; enum ProcAttributes @@ -290,18 +290,18 @@ typedef std::unordered_map<uint32, SpellProcEventEntry> SpellProcEventMap; struct SpellProcEntry { - uint32 schoolMask; // if nonzero - bitmask for matching proc condition based on spell's school - uint32 spellFamilyName; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyName - flag96 spellFamilyMask; // if nonzero - bitmask for matching proc condition based on candidate spell's SpellFamilyFlags - uint32 typeMask; // if nonzero - owerwrite procFlags field for given Spell.dbc entry, bitmask for matching proc condition, see enum ProcFlags - uint32 spellTypeMask; // if nonzero - bitmask for matching proc condition based on candidate spell's damage/heal effects, see enum ProcFlagsSpellType - uint32 spellPhaseMask; // if nonzero - bitmask for matching phase of a spellcast on which proc occurs, see enum ProcFlagsSpellPhase - uint32 hitMask; // if nonzero - bitmask for matching proc condition based on hit result, see enum ProcFlagsHit - uint32 attributesMask; // bitmask, see ProcAttributes - float ratePerMinute; // if nonzero - chance to proc is equal to value * aura caster's weapon speed / 60 - float chance; // if nonzero - owerwrite procChance field for given Spell.dbc entry, defines chance of proc to occur, not used if perMinuteRate set - uint32 cooldown; // if nonzero - cooldown in secs for aura proc, applied to aura - uint32 charges; // if nonzero - owerwrite procCharges field for given Spell.dbc entry, defines how many times proc can occur before aura remove, 0 - infinite + uint32 SchoolMask; // if nonzero - bitmask for matching proc condition based on spell's school + uint32 SpellFamilyName; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyName + flag96 SpellFamilyMask; // if nonzero - bitmask for matching proc condition based on candidate spell's SpellFamilyFlags + uint32 ProcFlags; // if nonzero - owerwrite procFlags field for given Spell.dbc entry, bitmask for matching proc condition, see enum ProcFlags + uint32 SpellTypeMask; // if nonzero - bitmask for matching proc condition based on candidate spell's damage/heal effects, see enum ProcFlagsSpellType + uint32 SpellPhaseMask; // if nonzero - bitmask for matching phase of a spellcast on which proc occurs, see enum ProcFlagsSpellPhase + uint32 HitMask; // if nonzero - bitmask for matching proc condition based on hit result, see enum ProcFlagsHit + uint32 AttributesMask; // bitmask, see ProcAttributes + float ProcsPerMinute; // if nonzero - chance to proc is equal to value * aura caster's weapon speed / 60 + float Chance; // if nonzero - owerwrite procChance field for given Spell.dbc entry, defines chance of proc to occur, not used if ProcsPerMinute set + Milliseconds Cooldown; // if nonzero - cooldown in secs for aura proc, applied to aura + uint32 Charges; // if nonzero - owerwrite procCharges field for given Spell.dbc entry, defines how many times proc can occur before aura remove, 0 - infinite }; typedef std::unordered_map<uint32, SpellProcEntry> SpellProcMap; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index d84fe11383f..19abfbe3152 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -58,6 +58,7 @@ #include "SkillDiscovery.h" #include "SkillExtraItems.h" #include "SmartAI.h" +#include "Metric.h" #include "TicketMgr.h" #include "TransportMgr.h" #include "Unit.h" @@ -396,6 +397,7 @@ void World::LoadConfigSettings(bool reload) return; } sLog->LoadFromConfig(); + sMetric->LoadFromConfigs(); } ///- Read the player limit and the Message of the day from the config file @@ -593,7 +595,10 @@ void World::LoadConfigSettings(bool reload) } m_int_configs[CONFIG_CHAT_CHANNEL_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Channel", 1); m_int_configs[CONFIG_CHAT_WHISPER_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Whisper", 1); + m_int_configs[CONFIG_CHAT_EMOTE_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Emote", 1); m_int_configs[CONFIG_CHAT_SAY_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Say", 1); + m_int_configs[CONFIG_CHAT_YELL_LEVEL_REQ] = sConfigMgr->GetIntDefault("ChatLevelReq.Yell", 1); + m_int_configs[CONFIG_PARTY_LEVEL_REQ] = sConfigMgr->GetIntDefault("PartyLevelReq", 1); m_int_configs[CONFIG_TRADE_LEVEL_REQ] = sConfigMgr->GetIntDefault("LevelReq.Trade", 1); m_int_configs[CONFIG_TICKET_LEVEL_REQ] = sConfigMgr->GetIntDefault("LevelReq.Ticket", 1); m_int_configs[CONFIG_AUCTION_LEVEL_REQ] = sConfigMgr->GetIntDefault("LevelReq.Auction", 1); @@ -659,9 +664,8 @@ void World::LoadConfigSettings(bool reload) m_float_configs[CONFIG_GROUP_XP_DISTANCE] = sConfigMgr->GetFloatDefault("MaxGroupXPDistance", 74.0f); m_float_configs[CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE] = sConfigMgr->GetFloatDefault("MaxRecruitAFriendBonusDistance", 100.0f); - /// @todo Add MonsterSight and GuarderSight (with meaning) in worldserver.conf or put them as define + /// @todo Add MonsterSight (with meaning) in worldserver.conf or put them as define m_float_configs[CONFIG_SIGHT_MONSTER] = sConfigMgr->GetFloatDefault("MonsterSight", 50.0f); - m_float_configs[CONFIG_SIGHT_GUARDER] = sConfigMgr->GetFloatDefault("GuarderSight", 50.0f); if (reload) { @@ -1059,6 +1063,17 @@ void World::LoadConfigSettings(bool reload) m_bool_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY] = sConfigMgr->GetBoolDefault("Battleground.QueueAnnouncer.PlayerOnly", false); m_bool_configs[CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE] = sConfigMgr->GetBoolDefault("Battleground.StoreStatistics.Enable", false); m_bool_configs[CONFIG_BATTLEGROUND_TRACK_DESERTERS] = sConfigMgr->GetBoolDefault("Battleground.TrackDeserters.Enable", false); + m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] = sConfigMgr->GetIntDefault("Battleground.ReportAFK", 3); + if (m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] < 1) + { + TC_LOG_ERROR("server.loading", "Battleground.ReportAFK (%d) must be >0. Using 3 instead.", m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK]); + m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] = 3; + } + if (m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] > 9) + { + TC_LOG_ERROR("server.loading", "Battleground.ReportAFK (%d) must be <10. Using 3 instead.", m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK]); + m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] = 3; + } m_int_configs[CONFIG_BATTLEGROUND_INVITATION_TYPE] = sConfigMgr->GetIntDefault ("Battleground.InvitationType", 0); m_int_configs[CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER] = sConfigMgr->GetIntDefault ("Battleground.PrematureFinishTimer", 5 * MINUTE * IN_MILLISECONDS); m_int_configs[CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH] = sConfigMgr->GetIntDefault ("Battleground.PremadeGroupWaitForMatch", 30 * MINUTE * IN_MILLISECONDS); @@ -1330,6 +1345,9 @@ void World::LoadConfigSettings(bool reload) m_bool_configs[CONFIG_HOTSWAP_INSTALL_ENABLED] = sConfigMgr->GetBoolDefault("HotSwap.EnableInstall", true); m_bool_configs[CONFIG_HOTSWAP_PREFIX_CORRECTION_ENABLED] = sConfigMgr->GetBoolDefault("HotSwap.EnablePrefixCorrection", true); + // prevent character rename on character customization + m_bool_configs[CONFIG_PREVENT_RENAME_CUSTOMIZATION] = sConfigMgr->GetBoolDefault("PreventRenameCharacterOnCustomization", false); + // call ScriptMgr if we're reloading the configuration if (reload) sScriptMgr->OnConfigLoad(reload); @@ -1938,6 +1956,8 @@ void World::SetInitialWorldSettings() TC_LOG_INFO("server.worldserver", "World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000)); + TC_METRIC_EVENT("events", "World initialized", "World initialized in " + std::to_string(startupDuration / 60000) + " minutes " + std::to_string((startupDuration % 60000) / 1000) + " seconds"); + if (uint32 realmId = sConfigMgr->GetIntDefault("RealmID", 0)) // 0 reserved for auth sLog->SetRealmId(realmId); } @@ -2252,6 +2272,10 @@ void World::Update(uint32 diff) ProcessCliCommands(); sScriptMgr->OnWorldUpdate(diff); + + // Stats logger update + sMetric->Update(); + TC_METRIC_VALUE("update_time_diff", diff); } void World::ForceGameEventUpdate() @@ -2877,16 +2901,20 @@ void World::_UpdateRealmCharCount(PreparedQueryResult resultCharCount) uint32 accountId = fields[0].GetUInt32(); uint8 charCount = uint8(fields[1].GetUInt64()); + SQLTransaction trans = LoginDatabase.BeginTransaction(); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_REALM_CHARACTERS_BY_REALM); stmt->setUInt32(0, accountId); stmt->setUInt32(1, realm.Id.Realm); - LoginDatabase.Execute(stmt); + trans->Append(stmt); stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_REALM_CHARACTERS); stmt->setUInt8(0, charCount); stmt->setUInt32(1, accountId); stmt->setUInt32(2, realm.Id.Realm); - LoginDatabase.Execute(stmt); + trans->Append(stmt); + + LoginDatabase.CommitTransaction(trans); } } diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 330e78cf510..5850063bdc8 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -175,6 +175,7 @@ enum WorldBoolConfigs CONFIG_HOTSWAP_BUILD_FILE_RECREATION_ENABLED, CONFIG_HOTSWAP_INSTALL_ENABLED, CONFIG_HOTSWAP_PREFIX_CORRECTION_ENABLED, + CONFIG_PREVENT_RENAME_CUSTOMIZATION, BOOL_CONFIG_VALUE_COUNT }; @@ -183,7 +184,6 @@ enum WorldFloatConfigs CONFIG_GROUP_XP_DISTANCE = 0, CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE, CONFIG_SIGHT_MONSTER, - CONFIG_SIGHT_GUARDER, CONFIG_LISTEN_RANGE_SAY, CONFIG_LISTEN_RANGE_TEXTEMOTE, CONFIG_LISTEN_RANGE_YELL, @@ -281,7 +281,10 @@ enum WorldIntConfigs CONFIG_CHAT_STRICT_LINK_CHECKING_KICK, CONFIG_CHAT_CHANNEL_LEVEL_REQ, CONFIG_CHAT_WHISPER_LEVEL_REQ, + CONFIG_CHAT_EMOTE_LEVEL_REQ, CONFIG_CHAT_SAY_LEVEL_REQ, + CONFIG_CHAT_YELL_LEVEL_REQ, + CONFIG_PARTY_LEVEL_REQ, CONFIG_TRADE_LEVEL_REQ, CONFIG_TICKET_LEVEL_REQ, CONFIG_AUCTION_LEVEL_REQ, @@ -297,6 +300,7 @@ enum WorldIntConfigs CONFIG_BATTLEGROUND_INVITATION_TYPE, CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER, CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH, + CONFIG_BATTLEGROUND_REPORT_AFK, CONFIG_ARENA_MAX_RATING_DIFFERENCE, CONFIG_ARENA_RATING_DISCARD_TIMER, CONFIG_ARENA_RATED_UPDATE_TIMER, diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index ca4dd814e01..570f4587ae8 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -35,8 +35,10 @@ EndScriptData */ #include "Language.h" #include "MapManager.h" #include "M2Stores.h" +#include "BattlefieldMgr.h" #include <fstream> +#include <limits> class debug_commandscript : public CommandScript { @@ -95,7 +97,8 @@ public: { "transport", rbac::RBAC_PERM_COMMAND_DEBUG_TRANSPORT, false, &HandleDebugTransportCommand, "" }, { "loadcells", rbac::RBAC_PERM_COMMAND_DEBUG_LOADCELLS, false, &HandleDebugLoadCellsCommand, "" }, { "boundary", rbac::RBAC_PERM_COMMAND_DEBUG_BOUNDARY, false, &HandleDebugBoundaryCommand, "" }, - { "raidreset", rbac::RBAC_PERM_COMMAND_INSTANCE_UNBIND, false, &HandleDebugRaidResetCommand, "" } + { "raidreset", rbac::RBAC_PERM_COMMAND_INSTANCE_UNBIND, false, &HandleDebugRaidResetCommand, "" }, + { "neargraveyard", rbac::RBAC_PERM_COMMAND_NEARGRAVEYARD, false, &HandleDebugNearGraveyard, "" }, }; static std::vector<ChatCommand> commandTable = { @@ -1485,6 +1488,53 @@ public: sInstanceSaveMgr->ForceGlobalReset(mEntry->MapID, Difficulty(difficulty)); return true; } + + static bool HandleDebugNearGraveyard(ChatHandler* handler, char const* args) + { + Player* player = handler->GetSession()->GetPlayer(); + const WorldSafeLocsEntry* nearestLoc = nullptr; + + if (stricmp(args, "linked")) + { + if (Battleground* bg = player->GetBattleground()) + nearestLoc = bg->GetClosestGraveYard(player); + else + { + if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(player->GetZoneId())) + nearestLoc = bf->GetClosestGraveYard(player); + else + nearestLoc = sObjectMgr->GetClosestGraveYard(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam()); + } + } + else + { + float x = player->GetPositionX(); + float y = player->GetPositionY(); + float z = player->GetPositionZ(); + float distNearest = std::numeric_limits<float>::max(); + + for (uint32 i = 0; i < sWorldSafeLocsStore.GetNumRows(); ++i) + { + const WorldSafeLocsEntry* loc = sWorldSafeLocsStore.LookupEntry(i); + if (loc && loc->map_id == player->GetMapId()) + { + float dist = (loc->x - x) * (loc->x - x) + (loc->y - y) * (loc->y - y) + (loc->z - z) * (loc->z - z); + if (dist < distNearest) + { + distNearest = dist; + nearestLoc = loc; + } + } + } + } + + if (nearestLoc) + handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD, nearestLoc->ID, nearestLoc->x, nearestLoc->y, nearestLoc->z); + else + handler->PSendSysMessage(LANG_COMMAND_NEARGRAVEYARD_NOTFOUND); + + return true; + } }; void AddSC_debug_commandscript() diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index 729dac0ad6f..c4ed6f650b9 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -139,16 +139,12 @@ public: } Player* player = handler->GetSession()->GetPlayer(); - float x = float(player->GetPositionX()); - float y = float(player->GetPositionY()); - float z = float(player->GetPositionZ()); - float o = float(player->GetOrientation()); Map* map = player->GetMap(); GameObject* object = new GameObject; ObjectGuid::LowType guidLow = map->GenerateLowGuid<HighGuid::GameObject>(); - if (!object->Create(guidLow, objectInfo->entry, map, player->GetPhaseMaskForSpawn(), x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY)) + if (!object->Create(guidLow, objectInfo->entry, map, player->GetPhaseMaskForSpawn(), *player, G3D::Quat(), 255, GO_STATE_READY)) { delete object; return false; @@ -179,7 +175,7 @@ public: /// @todo is it really necessary to add both the real and DB table guid here ? sObjectMgr->AddGameobjectToGrid(guidLow, sObjectMgr->GetGOData(guidLow)); - handler->PSendSysMessage(LANG_GAMEOBJECT_ADD, objectId, objectInfo->name.c_str(), guidLow, x, y, z); + handler->PSendSysMessage(LANG_GAMEOBJECT_ADD, objectId, objectInfo->name.c_str(), guidLow, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); return true; } @@ -201,14 +197,7 @@ public: if (spawntime) spawntm = atoi((char*)spawntime); - float x = player->GetPositionX(); - float y = player->GetPositionY(); - float z = player->GetPositionZ(); - float ang = player->GetOrientation(); - - float rot2 = std::sin(ang/2); - float rot3 = std::cos(ang/2); - + G3D::Quat rotation = G3D::Matrix3::fromEulerAnglesZYX(player->GetOrientation(), 0.f, 0.f); uint32 objectId = atoi(id); if (!sObjectMgr->GetGameObjectTemplate(objectId)) @@ -218,7 +207,7 @@ public: return false; } - player->SummonGameObject(objectId, x, y, z, ang, 0, 0, rot2, rot3, spawntm); + player->SummonGameObject(objectId, *player, rotation, spawntm); return true; } @@ -415,20 +404,30 @@ public: } char* orientation = strtok(NULL, " "); - float o; + float oz = 0.f, oy = 0.f, ox = 0.f; if (orientation) - o = (float)atof(orientation); + { + oz = float(atof(orientation)); + + orientation = strtok(NULL, " "); + if (orientation) + { + oy = float(atof(orientation)); + orientation = strtok(NULL, " "); + if (orientation) + ox = float(atof(orientation)); + } + } else { Player* player = handler->GetSession()->GetPlayer(); - o = player->GetOrientation(); + oz = player->GetOrientation(); } Map* map = object->GetMap(); - - object->Relocate(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), o); - object->UpdateRotationFields(); + object->Relocate(object->GetPositionX(), object->GetPositionY(), object->GetPositionZ()); + object->SetWorldRotationAngles(oz, oy, ox); object->SaveToDB(); // Generate a completely new spawn with new guid diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index a98f9f4bf9c..16217fbaea6 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -703,7 +703,7 @@ public: static bool HandleCooldownCommand(ChatHandler* handler, char const* args) { - Player* target = handler->getSelectedPlayerOrSelf(); + Unit* target = handler->getSelectedUnit(); if (!target) { handler->SendSysMessage(LANG_PLAYER_NOT_FOUND); @@ -711,7 +711,14 @@ public: return false; } - std::string nameLink = handler->GetNameLink(target); + Player* owner = target->GetCharmerOrOwnerPlayerOrPlayerItself(); + if (!owner) + { + owner = handler->GetSession()->GetPlayer(); + target = owner; + } + + std::string nameLink = handler->GetNameLink(owner); if (!*args) { @@ -728,13 +735,13 @@ public: SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellIid); if (!spellInfo) { - handler->PSendSysMessage(LANG_UNKNOWN_SPELL, target == handler->GetSession()->GetPlayer() ? handler->GetTrinityString(LANG_YOU) : nameLink.c_str()); + handler->PSendSysMessage(LANG_UNKNOWN_SPELL, owner == handler->GetSession()->GetPlayer() ? handler->GetTrinityString(LANG_YOU) : nameLink.c_str()); handler->SetSentErrorMessage(true); return false; } target->GetSpellHistory()->ResetCooldown(spellIid, true); - handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spellIid, target == handler->GetSession()->GetPlayer() ? handler->GetTrinityString(LANG_YOU) : nameLink.c_str()); + handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spellIid, owner == handler->GetSession()->GetPlayer() ? handler->GetTrinityString(LANG_YOU) : nameLink.c_str()); } return true; } @@ -2124,17 +2131,9 @@ public: } return true; } - /* - ComeToMe command REQUIRED for 3rd party scripting library to have access to PointMovementGenerator - Without this function 3rd party scripting library will get linking errors (unresolved external) - when attempting to use the PointMovementGenerator - */ - static bool HandleComeToMeCommand(ChatHandler* handler, char const* args) - { - char const* newFlagStr = strtok((char*)args, " "); - if (!newFlagStr) - return false; + static bool HandleComeToMeCommand(ChatHandler* handler, char const* /*args*/) + { Creature* caster = handler->getSelectedCreature(); if (!caster) { diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 438d05c5687..38aa96a6a66 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -113,7 +113,7 @@ EnumName<UnitFlags> const unitFlags[MAX_UNIT_FLAGS] = { CREATE_NAMED_ENUM(UNIT_FLAG_SERVER_CONTROLLED), CREATE_NAMED_ENUM(UNIT_FLAG_NON_ATTACKABLE), - CREATE_NAMED_ENUM(UNIT_FLAG_DISABLE_MOVE), + CREATE_NAMED_ENUM(UNIT_FLAG_REMOVE_CLIENT_CONTROL), CREATE_NAMED_ENUM(UNIT_FLAG_PVP_ATTACKABLE), CREATE_NAMED_ENUM(UNIT_FLAG_RENAME), CREATE_NAMED_ENUM(UNIT_FLAG_PREPARATION), @@ -125,7 +125,7 @@ EnumName<UnitFlags> const unitFlags[MAX_UNIT_FLAGS] = CREATE_NAMED_ENUM(UNIT_FLAG_PET_IN_COMBAT), CREATE_NAMED_ENUM(UNIT_FLAG_PVP), CREATE_NAMED_ENUM(UNIT_FLAG_SILENCED), - CREATE_NAMED_ENUM(UNIT_FLAG_UNK_14), + CREATE_NAMED_ENUM(UNIT_FLAG_CANNOT_SWIM), CREATE_NAMED_ENUM(UNIT_FLAG_UNK_15), CREATE_NAMED_ENUM(UNIT_FLAG_UNK_16), CREATE_NAMED_ENUM(UNIT_FLAG_PACIFIED), diff --git a/src/server/scripts/Commands/cs_pet.cpp b/src/server/scripts/Commands/cs_pet.cpp index 787265cc19b..a86de766117 100644 --- a/src/server/scripts/Commands/cs_pet.cpp +++ b/src/server/scripts/Commands/cs_pet.cpp @@ -69,10 +69,10 @@ public: } CreatureTemplate const* creatureTemplate = creatureTarget->GetCreatureTemplate(); - // Creatures with family 0 crashes the server - if (!creatureTemplate->family) + // Creatures with family CREATURE_FAMILY_NONE crashes the server + if (creatureTemplate->family == CREATURE_FAMILY_NONE) { - handler->PSendSysMessage("This creature cannot be tamed. (family id: 0)."); + handler->PSendSysMessage("This creature cannot be tamed. Family id: 0 (CREATURE_FAMILY_NONE)."); handler->SetSentErrorMessage(true); return false; } diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index eb28a8adae4..4470fa7de42 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -91,7 +91,7 @@ public: { "disenchant_loot_template", rbac::RBAC_PERM_COMMAND_RELOAD_DISENCHANT_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesDisenchantCommand, "" }, { "event_scripts", rbac::RBAC_PERM_COMMAND_RELOAD_EVENT_SCRIPTS, true, &HandleReloadEventScriptsCommand, "" }, { "fishing_loot_template", rbac::RBAC_PERM_COMMAND_RELOAD_FISHING_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesFishingCommand, "" }, - { "game_graveyard_zone", rbac::RBAC_PERM_COMMAND_RELOAD_GAME_GRAVEYARD_ZONE, true, &HandleReloadGameGraveyardZoneCommand, "" }, + { "graveyard_zone", rbac::RBAC_PERM_COMMAND_RELOAD_GRAVEYARD_ZONE, true, &HandleReloadGameGraveyardZoneCommand, "" }, { "game_tele", rbac::RBAC_PERM_COMMAND_RELOAD_GAME_TELE, true, &HandleReloadGameTeleCommand, "" }, { "gameobject_questender", rbac::RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUESTENDER, true, &HandleReloadGOQuestEnderCommand, "" }, { "gameobject_loot_template", rbac::RBAC_PERM_COMMAND_RELOAD_GAMEOBJECT_QUEST_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesGameobjectCommand, "" }, diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index 899c5615206..26f712eb8ef 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -199,7 +199,12 @@ public: ticket->SaveToDB(trans); sTicketMgr->UpdateLastChange(); - std::string msg = ticket->FormatMessageString(*handler, NULL, ticket->GetAssignedToName().c_str(), NULL, NULL, NULL); + std::string msg = [&] { + std::string const assignedName = ticket->GetAssignedToName(); + return ticket->FormatMessageString(*handler, nullptr, + assignedName.empty() ? nullptr : assignedName.c_str(), nullptr, nullptr, nullptr); + }(); + msg += handler->PGetParseString(LANG_COMMAND_TICKETLISTADDCOMMENT, player ? player->GetName().c_str() : "Console", comment); handler->SendGlobalGMSysMessage(msg.c_str()); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp index 817aaf0a253..f962a019da6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp @@ -187,6 +187,12 @@ public: events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(17000, 19000)); } + void IsSummonedBy(Unit* /*summoner*/) override + { + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); + DoZoneInCombat(); + } + void JustDied(Unit* /*killer*/) override { _JustDied(); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index 4a6fee12098..995fc44abd0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -206,9 +206,10 @@ public: Talk(SAY_GAMESBEGIN_2); me->setFaction(103); - me->SetUInt32Value(UNIT_NPC_FLAGS, 0); + me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); DoCast(me, SPELL_NEFARIANS_BARRIER); me->SetStandState(UNIT_STAND_STATE_STAND); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); AttackStart(target); events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000)); events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000)); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp index e58bded801b..e97b7cba388 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp @@ -32,6 +32,7 @@ enum Say enum Spells { + // @todo orb uses the wrong spell, this needs sniffs SPELL_MINDCONTROL = 42013, SPELL_CHANNEL = 45537, SPELL_EGG_DESTROY = 19873, @@ -103,7 +104,7 @@ public: secondPhase = true; me->RemoveAllAuras(); - me->SetHealth(me->GetMaxHealth()); + me->SetFullHealth(); } void DoAction(int32 action) override @@ -114,6 +115,7 @@ public: void DamageTaken(Unit* /*who*/, uint32& damage) override { + // @todo this is wrong - razorgore should still take damage, he should just nuke the whole room and respawn if he dies during P1 if (!secondPhase) damage = 0; } @@ -146,6 +148,7 @@ public: break; case EVENT_CONFLAGRATION: DoCastVictim(SPELL_CONFLAGRATION); + // @todo is this even necessary? pretty sure AI ignores targets with disorient by default if (me->GetVictim() && me->EnsureVictim()->HasAura(SPELL_CONFLAGRATION)) if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true)) me->TauntApply(target); @@ -175,10 +178,10 @@ public: { if (InstanceScript* instance = go->GetInstanceScript()) if (instance->GetData(DATA_EGG_EVENT) != DONE) - if (Creature* razor = instance->GetCreature(DATA_RAZORGORE_THE_UNTAMED)) + if (Creature* razorgore = instance->GetCreature(DATA_RAZORGORE_THE_UNTAMED)) { - razor->Attack(player, true); - player->CastSpell(razor, SPELL_MINDCONTROL); + razorgore->Attack(player, true); + player->CastSpell(razorgore, SPELL_MINDCONTROL); } return true; } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp index 9b487f7b5f9..8cff67d9f28 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp @@ -44,16 +44,20 @@ enum Texts enum Spells { - SPELL_MAGIC_REFLECTION = 20619, - SPELL_DAMAGE_REFLECTION = 21075, + SPELL_SUMMON_RAGNAROS = 19774, SPELL_BLAST_WAVE = 20229, - SPELL_AEGIS_OF_RAGNAROS = 20620, SPELL_TELEPORT = 20618, - SPELL_SUMMON_RAGNAROS = 19774, + SPELL_MAGIC_REFLECTION = 20619, + SPELL_AEGIS_OF_RAGNAROS = 20620, + SPELL_DAMAGE_REFLECTION = 21075 }; -#define GOSSIP_HELLO 4995 -#define GOSSIP_SELECT "Tell me more." +enum Extras +{ + OPTION_ID_YOU_CHALLENGED_US = 0, + FACTION_FRIENDLY = 35, + MENU_OPTION_YOU_CHALLENGED_US = 4108 +}; enum Events { @@ -64,7 +68,7 @@ enum Events EVENT_OUTRO_1 = 5, EVENT_OUTRO_2 = 6, - EVENT_OUTRO_3 = 7, + EVENT_OUTRO_3 = 7 }; class boss_majordomo : public CreatureScript @@ -106,7 +110,7 @@ class boss_majordomo : public CreatureScript if (!me->FindNearestCreature(NPC_FLAMEWAKER_HEALER, 100.0f) && !me->FindNearestCreature(NPC_FLAMEWAKER_ELITE, 100.0f)) { instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me); - me->setFaction(35); + me->setFaction(FACTION_FRIENDLY); EnterEvadeMode(); Talk(SAY_DEFEAT); _JustDied(); @@ -184,25 +188,20 @@ class boss_majordomo : public CreatureScript } else if (action == ACTION_START_RAGNAROS_ALT) { - me->setFaction(35); + me->setFaction(FACTION_FRIENDLY); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } } - }; - bool OnGossipHello(Player* player, Creature* creature) override - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->SEND_GOSSIP_MENU(GOSSIP_HELLO, creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/) override - { - player->CLOSE_GOSSIP_MENU(); - creature->AI()->DoAction(ACTION_START_RAGNAROS); - return true; - } + void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override + { + if (menuId == MENU_OPTION_YOU_CHALLENGED_US && gossipListId == OPTION_ID_YOU_CHALLENGED_US) + { + player->CLOSE_GOSSIP_MENU(); + DoAction(ACTION_START_RAGNAROS); + } + } + }; CreatureAI* GetAI(Creature* creature) const override { diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp index e0cae87051f..a89a6b491e8 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp @@ -159,7 +159,7 @@ class boss_ragnaros : public CreatureScript break; case EVENT_INTRO_5: me->SetReactState(REACT_AGGRESSIVE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); _introState = 2; break; default: diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 05d964124b1..c8eb645845b 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -305,7 +305,7 @@ public: me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[9], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); break; case 2: - if (GameObject* go = me->SummonGameObject(183410, -533.140f, -105.322f, -156.016f, 0, 0, 0, 0, 0, 1)) + if (GameObject* go = me->SummonGameObject(183410, -533.140f, -105.322f, -156.016f, 0.f, G3D::Quat(), 1)) { GoSummonList.push_back(go->GetGUID()); go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it! @@ -320,7 +320,7 @@ public: Talk(SAY_BLASTMASTER_7); break; case 4: - if (GameObject* go = me->SummonGameObject(183410, -542.199f, -96.854f, -155.790f, 0, 0, 0, 0, 0, 1)) + if (GameObject* go = me->SummonGameObject(183410, -542.199f, -96.854f, -155.790f, 0.f, G3D::Quat(), 1)) { GoSummonList.push_back(go->GetGUID()); go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); @@ -334,7 +334,7 @@ public: me->SummonCreature(NPC_CAVERNDEEP_AMBUSHER, SpawnPosition[14], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); break; case 6: - if (GameObject* go = me->SummonGameObject(183410, -507.820f, -103.333f, -151.353f, 0, 0, 0, 0, 0, 1)) + if (GameObject* go = me->SummonGameObject(183410, -507.820f, -103.333f, -151.353f, 0.f, G3D::Quat(), 1)) { GoSummonList.push_back(go->GetGUID()); go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it! @@ -342,7 +342,7 @@ public: } break; case 7: - if (GameObject* go = me->SummonGameObject(183410, -511.829f, -86.249f, -151.431f, 0, 0, 0, 0, 0, 1)) + if (GameObject* go = me->SummonGameObject(183410, -511.829f, -86.249f, -151.431f, 0.f, G3D::Quat(), 1)) { GoSummonList.push_back(go->GetGUID()); go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); //We can't use it! @@ -354,9 +354,9 @@ public: me->SummonCreature(NPC_CHOMPER, SpawnPosition[16], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1800000); break; case 9: - me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[17].GetPositionX(), SpawnPosition[17].GetPositionY(), SpawnPosition[17].GetPositionZ(), SpawnPosition[17].GetOrientation(), 0, 0, 0, 0, 7200); - me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[18].GetPositionX(), SpawnPosition[18].GetPositionY(), SpawnPosition[18].GetPositionZ(), SpawnPosition[18].GetOrientation(), 0, 0, 0, 0, 7200); - me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[19].GetPositionX(), SpawnPosition[19].GetPositionY(), SpawnPosition[19].GetPositionZ(), SpawnPosition[19].GetOrientation(), 0, 0, 0, 0, 7200); + me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[17], G3D::Quat(), 7200); + me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[18], G3D::Quat(), 7200); + me->SummonGameObject(GO_RED_ROCKET, SpawnPosition[19], G3D::Quat(), 7200); break; } } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 43ef7e006ef..7e7edfb7832 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -28,25 +28,42 @@ EndScriptData */ #include "SpellInfo.h" #include "karazhan.h" -enum Midnight +enum Texts { - SAY_MIDNIGHT_KILL = 0, - SAY_APPEAR = 1, - SAY_MOUNT = 2, - - SAY_KILL = 0, - SAY_DISARMED = 1, - SAY_DEATH = 2, - SAY_RANDOM = 3, - - SPELL_SHADOWCLEAVE = 29832, - SPELL_INTANGIBLE_PRESENCE = 29833, - SPELL_BERSERKER_CHARGE = 26561, //Only when mounted + SAY_KILL = 0, + SAY_RANDOM = 1, + SAY_DISARMED = 2, + SAY_MIDNIGHT_KILL = 3, + SAY_APPEAR = 4, + SAY_MOUNT = 5, + + SAY_DEATH = 3, + + // Midnight + EMOTE_CALL_ATTUMEN = 0, + EMOTE_MOUNT_UP = 1 +}; - MOUNTED_DISPLAYID = 16040, +enum Spells +{ + // Attumen + SPELL_SHADOWCLEAVE = 29832, + SPELL_INTANGIBLE_PRESENCE = 29833, + SPELL_SPAWN_SMOKE = 10389, + SPELL_CHARGE = 29847, + + // Midnight + SPELL_KNOCKDOWN = 29711, + SPELL_SUMMON_ATTUMEN = 29714, + SPELL_MOUNT = 29770, + SPELL_SUMMON_ATTUMEN_MOUNTED = 29799 +}; - //Attumen (@todo Use the summoning spell instead of Creature id. It works, but is not convenient for us) - SUMMON_ATTUMEN = 15550, +enum Phases +{ + PHASE_NONE, + PHASE_ATTUMEN_ENGAGES, + PHASE_MOUNTED }; class boss_attumen : public CreatureScript @@ -54,75 +71,212 @@ class boss_attumen : public CreatureScript public: boss_attumen() : CreatureScript("boss_attumen") { } - CreatureAI* GetAI(Creature* creature) const override - { - return new boss_attumenAI(creature); - } - - struct boss_attumenAI : public ScriptedAI + struct boss_attumenAI : public BossAI { - boss_attumenAI(Creature* creature) : ScriptedAI(creature) + boss_attumenAI(Creature* creature) : BossAI(creature, DATA_ATTUMEN) { Initialize(); - - Phase = 1; - - CleaveTimer = urand(10000, 15000); - CurseTimer = 30000; - RandomYellTimer = urand(30000, 60000); //Occasionally yell - ChargeTimer = 20000; - } + } void Initialize() { - ResetTimer = 0; - Midnight.Clear(); + _midnightGUID.Clear(); + _phase = PHASE_NONE; } - ObjectGuid Midnight; - uint8 Phase; - uint32 CleaveTimer; - uint32 CurseTimer; - uint32 RandomYellTimer; - uint32 ChargeTimer; //only when mounted - uint32 ResetTimer; - void Reset() override { Initialize(); + BossAI::Reset(); + } + + void EnterEvadeMode(EvadeReason /*why*/) override + { + if (Creature* midnight = ObjectAccessor::GetCreature(*me, _midnightGUID)) + BossAI::_DespawnAtEvade(10, midnight); + + me->DespawnOrUnsummon(); } - void EnterEvadeMode(EvadeReason why) override + void ScheduleTasks() override { - ScriptedAI::EnterEvadeMode(why); - ResetTimer = 2000; + scheduler.Schedule(Seconds(15), Seconds(25), [this](TaskContext task) + { + DoCastVictim(SPELL_SHADOWCLEAVE); + task.Repeat(Seconds(15), Seconds(25)); + }); + + scheduler.Schedule(Seconds(25), Seconds(45), [this](TaskContext task) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target,SPELL_INTANGIBLE_PRESENCE); + + task.Repeat(Seconds(25), Seconds(45)); + }); + + scheduler.Schedule(Seconds(30), Seconds(60), [this](TaskContext task) + { + Talk(SAY_RANDOM); + task.Repeat(Seconds(30), Seconds(60)); + }); } - void EnterCombat(Unit* /*who*/) override { } + void DamageTaken(Unit* /*attacker*/, uint32 &damage) override + { + // Attumen does not die until he mounts Midnight, let health fall to 1 and prevent further damage. + if (damage >= me->GetHealth() && _phase != PHASE_MOUNTED) + damage = me->GetHealth() - 1; + + if (_phase == PHASE_ATTUMEN_ENGAGES && me->HealthBelowPctDamaged(25, damage)) + { + _phase = PHASE_NONE; + + if (Creature* midnight = ObjectAccessor::GetCreature(*me, _midnightGUID)) + midnight->AI()->DoCastAOE(SPELL_MOUNT, true); + } + } void KilledUnit(Unit* /*victim*/) override { Talk(SAY_KILL); } - void JustDied(Unit* /*killer*/) override + void JustSummoned(Creature* summon) override + { + if (summon->GetEntry() == NPC_ATTUMEN_MOUNTED) + if (Creature* midnight = ObjectAccessor::GetCreature(*me, _midnightGUID)) + { + if (midnight->GetHealth() > me->GetHealth()) + summon->SetHealth(midnight->GetHealth()); + else + summon->SetHealth(me->GetHealth()); + + summon->AI()->DoZoneInCombat(); + summon->AI()->SetGUID(_midnightGUID, NPC_MIDNIGHT); + } + + BossAI::JustSummoned(summon); + } + + void IsSummonedBy(Unit* summoner) override + { + if (summoner->GetEntry() == NPC_MIDNIGHT) + _phase = PHASE_ATTUMEN_ENGAGES; + + if (summoner->GetEntry() == NPC_ATTUMEN_UNMOUNTED) + { + _phase = PHASE_MOUNTED; + DoCastSelf(SPELL_SPAWN_SMOKE); + + scheduler.Schedule(Seconds(10), Seconds(25), [this](TaskContext task) + { + Unit* target = nullptr; + ThreatContainer::StorageType const &t_list = me->getThreatManager().getThreatList(); + std::vector<Unit*> target_list; + + for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr) + { + target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()); + if (target && !target->IsWithinDist(me, 8.00f, false) && target->IsWithinDist(me, 25.0f, false)) + target_list.push_back(target); + + target = nullptr; + } + + if (!target_list.empty()) + target = Trinity::Containers::SelectRandomContainerElement(target_list); + + DoCast(target, SPELL_CHARGE); + task.Repeat(Seconds(10), Seconds(25)); + }); + + scheduler.Schedule(Seconds(25), Seconds(35), [this](TaskContext task) + { + DoCastVictim(SPELL_KNOCKDOWN); + task.Repeat(Seconds(25), Seconds(35)); + }); + } + } + + void JustDied(Unit* killer) override { Talk(SAY_DEATH); - if (Unit* midnight = ObjectAccessor::GetUnit(*me, Midnight)) + if (Unit* midnight = ObjectAccessor::GetUnit(*me, _midnightGUID)) midnight->KillSelf(); - if (InstanceScript* instance = me->GetInstanceScript()) - instance->SetBossState(DATA_ATTUMEN, DONE); + BossAI::JustDied(killer); } - void UpdateAI(uint32 diff) override; + void SetGUID(ObjectGuid guid, int32 data) override + { + if (data == NPC_MIDNIGHT) + _midnightGUID = guid; + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim() && _phase != PHASE_NONE) + return; + + scheduler.Update(diff, + std::bind(&BossAI::DoMeleeAttackIfReady, this)); + } void SpellHit(Unit* /*source*/, const SpellInfo* spell) override { if (spell->Mechanic == MECHANIC_DISARM) Talk(SAY_DISARMED); + + if (spell->Id == SPELL_MOUNT) + { + if (Creature* midnight = ObjectAccessor::GetCreature(*me, _midnightGUID)) + { + _phase = PHASE_NONE; + scheduler.CancelAll(); + + midnight->AttackStop(); + midnight->RemoveAllAttackers(); + midnight->SetReactState(REACT_PASSIVE); + midnight->GetMotionMaster()->MoveChase(me); + midnight->AI()->Talk(EMOTE_MOUNT_UP); + + me->AttackStop(); + me->RemoveAllAttackers(); + me->SetReactState(REACT_PASSIVE); + me->GetMotionMaster()->MoveChase(midnight); + Talk(SAY_MOUNT); + + scheduler.Schedule(Seconds(3), [this](TaskContext task) + { + if (Creature* midnight = ObjectAccessor::GetCreature(*me, _midnightGUID)) + { + if (me->IsWithinMeleeRange(midnight)) + { + DoCastAOE(SPELL_SUMMON_ATTUMEN_MOUNTED); + me->SetVisible(false); + midnight->SetVisible(false); + } + else + { + midnight->GetMotionMaster()->MoveChase(me); + me->GetMotionMaster()->MoveChase(midnight); + task.Repeat(Seconds(3)); + } + } + }); + } + } } + + private: + ObjectGuid _midnightGUID; + uint8 _phase; }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new boss_attumenAI(creature); + } }; class boss_midnight : public CreatureScript @@ -130,214 +284,102 @@ class boss_midnight : public CreatureScript public: boss_midnight() : CreatureScript("boss_midnight") { } - CreatureAI* GetAI(Creature* creature) const override - { - return new boss_midnightAI(creature); - } - - struct boss_midnightAI : public ScriptedAI + struct boss_midnightAI : public BossAI { - boss_midnightAI(Creature* creature) : ScriptedAI(creature) + boss_midnightAI(Creature* creature) : BossAI(creature, DATA_ATTUMEN) { Initialize(); } void Initialize() { - Phase = 1; - Attumen.Clear(); - Mount_Timer = 0; + _phase = PHASE_NONE; } - ObjectGuid Attumen; - uint8 Phase; - uint32 Mount_Timer; - void Reset() override { Initialize(); - - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + BossAI::Reset(); me->SetVisible(true); + me->SetReactState(REACT_DEFENSIVE); } - void EnterCombat(Unit* /*who*/) override + void DamageTaken(Unit* /*attacker*/, uint32 &damage) override { - if (InstanceScript* instance = me->GetInstanceScript()) - instance->SetBossState(DATA_ATTUMEN, IN_PROGRESS); - } + // Midnight never dies, let health fall to 1 and prevent further damage. + if (damage >= me->GetHealth()) + damage = me->GetHealth() - 1; - void KilledUnit(Unit* /*victim*/) override - { - if (Phase == 2) + if (_phase == PHASE_NONE && me->HealthBelowPctDamaged(95, damage)) { - if (Unit* unit = ObjectAccessor::GetUnit(*me, Attumen)) - Talk(SAY_MIDNIGHT_KILL, unit); + _phase = PHASE_ATTUMEN_ENGAGES; + Talk(EMOTE_CALL_ATTUMEN); + DoCastAOE(SPELL_SUMMON_ATTUMEN); + } + else if (_phase == PHASE_ATTUMEN_ENGAGES && me->HealthBelowPctDamaged(25, damage)) + { + _phase = PHASE_MOUNTED; + DoCastAOE(SPELL_MOUNT, true); } } - void UpdateAI(uint32 diff) override + void JustSummoned(Creature* summon) override { - if (!UpdateVictim()) - return; - - if (Phase == 1 && HealthBelowPct(95)) + if (summon->GetEntry() == NPC_ATTUMEN_UNMOUNTED) { - Phase = 2; - if (Creature* attumen = me->SummonCreature(SUMMON_ATTUMEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000)) - { - Attumen = attumen->GetGUID(); - attumen->AI()->AttackStart(me->GetVictim()); - SetMidnight(attumen, me->GetGUID()); - Talk(SAY_APPEAR, attumen); - } - } - else if (Phase == 2 && HealthBelowPct(25)) - { - if (Unit* pAttumen = ObjectAccessor::GetUnit(*me, Attumen)) - Mount(pAttumen); - } - else if (Phase == 3) - { - if (Mount_Timer) - { - if (Mount_Timer <= diff) - { - Mount_Timer = 0; - me->SetVisible(false); - me->GetMotionMaster()->MoveIdle(); - if (Unit* pAttumen = ObjectAccessor::GetUnit(*me, Attumen)) - { - pAttumen->SetDisplayId(MOUNTED_DISPLAYID); - pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (pAttumen->GetVictim()) - { - pAttumen->GetMotionMaster()->MoveChase(pAttumen->GetVictim()); - pAttumen->SetTarget(pAttumen->EnsureVictim()->GetGUID()); - } - pAttumen->SetObjectScale(1); - } - } else Mount_Timer -= diff; - } + _attumenGUID = summon->GetGUID(); + summon->AI()->SetGUID(me->GetGUID(), NPC_MIDNIGHT); + summon->AI()->AttackStart(me->GetVictim()); + summon->AI()->Talk(SAY_APPEAR); } - if (Phase != 3) - DoMeleeAttackIfReady(); + BossAI::JustSummoned(summon); } - void Mount(Unit* pAttumen) + void EnterCombat(Unit* who) override { - Talk(SAY_MOUNT, pAttumen); - Phase = 3; - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pAttumen->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - float angle = me->GetAngle(pAttumen); - float distance = me->GetDistance2d(pAttumen); - float newX = me->GetPositionX() + std::cos(angle)*(distance/2); - float newY = me->GetPositionY() + std::sin(angle)*(distance/2); - float newZ = 50; - //me->Relocate(newX, newY, newZ, angle); - //me->SendMonsterMove(newX, newY, newZ, 0, true, 1000); - me->GetMotionMaster()->Clear(); - me->GetMotionMaster()->MovePoint(0, newX, newY, newZ); - distance += 10; - newX = me->GetPositionX() + std::cos(angle)*(distance/2); - newY = me->GetPositionY() + std::sin(angle)*(distance/2); - pAttumen->GetMotionMaster()->Clear(); - pAttumen->GetMotionMaster()->MovePoint(0, newX, newY, newZ); - //pAttumen->Relocate(newX, newY, newZ, -angle); - //pAttumen->SendMonsterMove(newX, newY, newZ, 0, true, 1000); - Mount_Timer = 1000; + BossAI::EnterCombat(who); + + scheduler.Schedule(Seconds(15), Seconds(25), [this](TaskContext task) + { + DoCastVictim(SPELL_KNOCKDOWN); + task.Repeat(Seconds(15), Seconds(25)); + }); } - void SetMidnight(Creature* pAttumen, ObjectGuid value) + void EnterEvadeMode(EvadeReason /*why*/) override { - ENSURE_AI(boss_attumen::boss_attumenAI, pAttumen->AI())->Midnight = value; + BossAI::_DespawnAtEvade(10); } - }; -}; -void boss_attumen::boss_attumenAI::UpdateAI(uint32 diff) -{ - if (ResetTimer) - { - if (ResetTimer <= diff) + void KilledUnit(Unit* /*victim*/) override { - ResetTimer = 0; - Unit* pMidnight = ObjectAccessor::GetUnit(*me, Midnight); - if (pMidnight) + if (_phase == PHASE_ATTUMEN_ENGAGES) { - pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pMidnight->SetVisible(true); + if (Unit* unit = ObjectAccessor::GetUnit(*me, _attumenGUID)) + Talk(SAY_MIDNIGHT_KILL, unit); } - Midnight.Clear(); - me->SetVisible(false); - me->KillSelf(); - } else ResetTimer -= diff; - } - - //Return since we have no target - if (!UpdateVictim()) - return; - - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE)) - return; - - if (CleaveTimer <= diff) - { - DoCastVictim(SPELL_SHADOWCLEAVE); - CleaveTimer = urand(10000, 15000); - } else CleaveTimer -= diff; + } - if (CurseTimer <= diff) - { - DoCastVictim(SPELL_INTANGIBLE_PRESENCE); - CurseTimer = 30000; - } else CurseTimer -= diff; + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim() || _phase == PHASE_MOUNTED) + return; - if (RandomYellTimer <= diff) - { - Talk(SAY_RANDOM); - RandomYellTimer = urand(30000, 60000); - } else RandomYellTimer -= diff; + scheduler.Update(diff, + std::bind(&BossAI::DoMeleeAttackIfReady, this)); + } - if (me->GetUInt32Value(UNIT_FIELD_DISPLAYID) == MOUNTED_DISPLAYID) - { - if (ChargeTimer <= diff) - { - Unit* target = NULL; - ThreatContainer::StorageType const &t_list = me->getThreatManager().getThreatList(); - std::vector<Unit*> target_list; - for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr) - { - target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()); - if (target && !target->IsWithinDist(me, ATTACK_DISTANCE, false)) - target_list.push_back(target); - target = NULL; - } - if (!target_list.empty()) - target = *(target_list.begin() + rand32() % target_list.size()); + private: + ObjectGuid _attumenGUID; + uint8 _phase; + }; - DoCast(target, SPELL_BERSERKER_CHARGE); - ChargeTimer = 20000; - } else ChargeTimer -= diff; - } - else + CreatureAI* GetAI(Creature* creature) const override { - if (HealthBelowPct(25)) - { - Creature* pMidnight = ObjectAccessor::GetCreature(*me, Midnight); - if (pMidnight && pMidnight->GetTypeId() == TYPEID_UNIT) - { - ENSURE_AI(boss_midnight::boss_midnightAI, (pMidnight->AI()))->Mount(me); - me->SetHealth(pMidnight->GetHealth()); - DoResetThreat(); - } - } + return new boss_midnightAI(creature); } - - DoMeleeAttackIfReady(); -} +}; void AddSC_boss_attumen() { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index e667141fa29..29c78d3b388 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -298,7 +298,7 @@ public: if (Blind_Timer <= diff) { std::list<Unit*> targets; - SelectTargetList(targets, 5, SELECT_TARGET_RANDOM, me->GetMeleeReach()*5, true); + SelectTargetList(targets, 5, SELECT_TARGET_RANDOM, me->GetCombatReach()*5, true); for (std::list<Unit*>::const_iterator i = targets.begin(); i != targets.end(); ++i) if (!me->IsWithinMeleeRange(*i)) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 3f236c060d7..2e4ac11d3fa 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -797,46 +797,43 @@ enum RedRidingHood SAY_WOLF_AGGRO = 0, SAY_WOLF_SLAY = 1, SAY_WOLF_HOOD = 2, + OPTION_WHAT_PHAT_LEWTS_YOU_HAVE = 7443, SOUND_WOLF_DEATH = 9275, SPELL_LITTLE_RED_RIDING_HOOD = 30768, SPELL_TERRIFYING_HOWL = 30752, SPELL_WIDE_SWIPE = 30761, - CREATURE_BIG_BAD_WOLF = 17521, + CREATURE_BIG_BAD_WOLF = 17521 }; - -#define GOSSIP_GRANDMA "What phat lewtz you have grandmother?" - - - class npc_grandmother : public CreatureScript { -public: - npc_grandmother() : CreatureScript("npc_grandmother") { } + public: + npc_grandmother() : CreatureScript("npc_grandmother") { } - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF) + struct npc_grandmotherAI : public ScriptedAI { - if (Creature* pBigBadWolf = creature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) - pBigBadWolf->AI()->AttackStart(player); + npc_grandmotherAI(Creature* creature) : ScriptedAI(creature) { } - creature->DespawnOrUnsummon(); - } + void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override + { + if (menuId == OPTION_WHAT_PHAT_LEWTS_YOU_HAVE && gossipListId == 0) + { + player->CLOSE_GOSSIP_MENU(); - return true; - } + if (Creature* pBigBadWolf = me->SummonCreature(CREATURE_BIG_BAD_WOLF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) + pBigBadWolf->AI()->AttackStart(player); - bool OnGossipHello(Player* player, Creature* creature) override - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GRANDMA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - player->SEND_GOSSIP_MENU(8990, creature->GetGUID()); + me->DespawnOrUnsummon(); + } + } + }; - return true; - } + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_grandmotherAI(creature); + } }; class boss_bigbadwolf : public CreatureScript diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h index 05de9e43a91..2dc3750dc5b 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h @@ -70,6 +70,9 @@ enum MiscCreatures NPC_SHADIKITH_THE_GLIDER = 16180, NPC_TERESTIAN_ILLHOOF = 15688, NPC_MOROES = 15687, + NPC_ATTUMEN_UNMOUNTED = 15550, + NPC_ATTUMEN_MOUNTED = 16152, + NPC_MIDNIGHT = 16151, // Trash NPC_COLDMIST_WIDOW = 16171, diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index d25a225717a..ea6d2cb0b6f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -1116,7 +1116,7 @@ public: case 48: // Show the cleansing effect (dawn of light) //if (GameObject* go = me->GetMap()->GetGameObject(uiDawnofLightGUID)) // go->SetPhaseMask(128, true); - me->SummonGameObject(GO_LIGHT_OF_DAWN, 2283.896f, -5287.914f, 83.066f, 0, 0, 0, 0, 0, 30); + me->SummonGameObject(GO_LIGHT_OF_DAWN, 2283.896f, -5287.914f, 83.066f, 0.f, G3D::Quat(), 30); if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID)) { if (temp->HasAura(SPELL_REBIRTH_OF_THE_ASHBRINGER)) diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp index 6a6a0b0994b..241710627b0 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp @@ -176,14 +176,14 @@ public: void UseStatue(GameObject* go) { - go->SummonGameObject(GO_ATALAI_LIGHT1, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, 0, 0, 0, 0, 0); + go->SummonGameObject(GO_ATALAI_LIGHT1, *go, G3D::Quat(), 0); go->SetUInt32Value(GAMEOBJECT_FLAGS, 4); } void UseLastStatue(GameObject* go) { for (uint8 i = 0; i < nStatues; ++i) - go->SummonGameObject(GO_ATALAI_LIGHT2, statuePositions[i].GetPositionX(), statuePositions[i].GetPositionY(), statuePositions[i].GetPositionZ(), statuePositions[i].GetOrientation(), 0, 0, 0, 0, 0); + go->SummonGameObject(GO_ATALAI_LIGHT2, statuePositions[i], G3D::Quat(), 0); go->SummonCreature(NPC_ATALALARION, atalalarianPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200); } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 7563a880f0a..040d8cb2a37 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -1361,7 +1361,7 @@ public: DoCastVictim(SPELL_SR_SHOOT, false); uiTimer[2] = urand(4000, 6000); } - if (me->IsWithinMeleeRange(me->GetVictim(), 6)) + if (me->IsWithinMeleeRange(me->GetVictim())) { if (uiTimer[0] <= diff) { diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index a5fed30a6c6..68391c65655 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -98,7 +98,7 @@ class boss_archaedas : public CreatureScript instance->SetData(0, 5); // respawn any dead minions me->setFaction(35); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); me->AddAura(SPELL_FREEZE_ANIM, me); } @@ -111,7 +111,7 @@ class boss_archaedas : public CreatureScript DoCast(minion, SPELL_AWAKEN_VAULT_WALKER, flag); minion->CastSpell(minion, SPELL_ARCHAEDAS_AWAKEN, true); minion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - minion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + minion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); minion->setFaction(14); minion->RemoveAura(SPELL_MINION_FREEZE_ANIM); } @@ -121,7 +121,7 @@ class boss_archaedas : public CreatureScript { me->setFaction(14); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); } void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override @@ -261,7 +261,7 @@ class npc_archaedas_minions : public CreatureScript me->setFaction(35); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); me->RemoveAllAuras(); me->AddAura(SPELL_MINION_FREEZE_ANIM, me); } @@ -271,7 +271,7 @@ class npc_archaedas_minions : public CreatureScript me->setFaction (14); me->RemoveAllAuras(); me->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); bAmIAwake = true; } @@ -350,7 +350,7 @@ class npc_stonekeepers : public CreatureScript { me->setFaction(35); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); me->RemoveAllAuras(); me->AddAura(SPELL_MINION_FREEZE_ANIM, me); } @@ -359,7 +359,7 @@ class npc_stonekeepers : public CreatureScript { me->setFaction(14); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); } void UpdateAI(uint32 /*diff*/) override diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index 8c78fb7ff1b..28a3a4eb4e0 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -147,7 +147,7 @@ class instance_uldaman : public InstanceMapScript creature->setFaction(35); creature->RemoveAllAuras(); creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); creature->AddAura(SPELL_MINION_FREEZE_ANIM, creature); } @@ -178,7 +178,7 @@ class instance_uldaman : public InstanceMapScript Creature* target = instance->GetCreature(*i); if (!target || !target->IsAlive()) continue; - target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); target->setFaction(14); target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); target->RemoveAura(SPELL_MINION_FREEZE_ANIM); @@ -202,7 +202,7 @@ class instance_uldaman : public InstanceMapScript Creature* target = instance->GetCreature(*i); if (!target || !target->IsAlive() || target->getFaction() == 14) continue; - target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); target->setFaction(14); target->RemoveAura(SPELL_MINION_FREEZE_ANIM); @@ -268,7 +268,7 @@ class instance_uldaman : public InstanceMapScript return; ironaya->setFaction(415); - ironaya->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + ironaya->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); ironaya->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); ironaya->GetMotionMaster()->Clear(); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index 972acdc3f9f..9b668169dca 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -162,7 +162,7 @@ class npc_zulaman_hostage : public CreatureScript { if (HostageEntry[i] == entry) { - creature->SummonGameObject(ChestEntry[i], x-2, y, z, 0, 0, 0, 0, 0, 0); + creature->SummonGameObject(ChestEntry[i], Position(x - 2, y, z, 0.f), G3D::Quat(), 0); break; } } diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp index b794a653791..adcb4f9fc9a 100644 --- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp @@ -179,7 +179,6 @@ void AddSC_eastern_plaguelands(); void AddSC_ghostlands(); void AddSC_hinterlands(); void AddSC_isle_of_queldanas(); -void AddSC_loch_modan(); void AddSC_redridge_mountains(); void AddSC_silverpine_forest(); void AddSC_stormwind_city(); @@ -357,7 +356,6 @@ void AddEasternKingdomsScripts() AddSC_ghostlands(); AddSC_hinterlands(); AddSC_isle_of_queldanas(); - AddSC_loch_modan(); AddSC_redridge_mountains(); AddSC_silverpine_forest(); AddSC_stormwind_city(); diff --git a/src/server/scripts/EasternKingdoms/zone_loch_modan.cpp b/src/server/scripts/EasternKingdoms/zone_loch_modan.cpp deleted file mode 100644 index 151f8270c47..00000000000 --- a/src/server/scripts/EasternKingdoms/zone_loch_modan.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -/* ScriptData -SDName: Loch_Modan -SD%Complete: 100 -SDComment: Quest support: 3181 -SDCategory: Loch Modan -EndScriptData */ - -/* ContentData -npc_mountaineer_pebblebitty -EndContentData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "Player.h" - -/*###### -## npc_mountaineer_pebblebitty -######*/ - -#define GOSSIP_MP "Open the gate please, i need to get to Searing Gorge" - -#define GOSSIP_MP1 "But i need to get there, now open the gate!" -#define GOSSIP_MP2 "Ok, so what is this other way?" -#define GOSSIP_MP3 "Doesn't matter, i'm invulnerable." -#define GOSSIP_MP4 "Yes..." -#define GOSSIP_MP5 "Ok, i'll try to remember that." -#define GOSSIP_MP6 "A key? Ok!" - -class npc_mountaineer_pebblebitty : public CreatureScript -{ -public: - npc_mountaineer_pebblebitty() : CreatureScript("npc_mountaineer_pebblebitty") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - player->SEND_GOSSIP_MENU(1833, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - player->SEND_GOSSIP_MENU(1834, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - player->SEND_GOSSIP_MENU(1835, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - player->SEND_GOSSIP_MENU(1836, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - player->SEND_GOSSIP_MENU(1837, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+6: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - player->SEND_GOSSIP_MENU(1838, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+7: - player->CLOSE_GOSSIP_MENU(); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (!player->GetQuestRewardStatus(3181) == 1) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_MP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } -}; - -void AddSC_loch_modan() -{ - new npc_mountaineer_pebblebitty(); -} diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp index 4b93f5b4fbb..f61e175b8fc 100644 --- a/src/server/scripts/Events/childrens_week.cpp +++ b/src/server/scripts/Events/childrens_week.cpp @@ -639,6 +639,12 @@ class npc_elder_kekek : public CreatureScript } }; +enum TheEtymidian +{ + SAY_ACTIVATION = 0, + QUEST_THE_ACTIVATION_RUNE = 12547 +}; + /*###### ## npc_the_etymidian ## @todo A red crystal as a gift for the great one should be spawned during the event. @@ -668,10 +674,20 @@ class npc_the_etymidian : public CreatureScript Initialize(); } + void sQuestReward(Player* /*player*/, Quest const* quest, uint32 /*opt*/) override + { + if (quest->GetQuestId() != QUEST_THE_ACTIVATION_RUNE) + return; + + Talk(SAY_ACTIVATION); + } + void MoveInLineOfSight(Unit* who) override { if (!phase && who && who->GetDistance2d(me) < 10.0f) + { if (Player* player = who->ToPlayer()) + { if (player->GetQuestStatus(QUEST_MEETING_A_GREAT_ONE) == QUEST_STATUS_INCOMPLETE) { playerGUID = player->GetGUID(); @@ -679,6 +695,8 @@ class npc_the_etymidian : public CreatureScript if (orphanGUID) phase = 1; } + } + } } void UpdateAI(uint32 diff) override @@ -734,7 +752,6 @@ class npc_the_etymidian : public CreatureScript int8 phase; ObjectGuid playerGUID; ObjectGuid orphanGUID; - }; CreatureAI* GetAI(Creature* creature) const override diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index 6b2142a8095..c326710e820 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -650,7 +650,7 @@ void hyjalAI::SpawnVeins() return; for (uint8 i = 0; i < 7; ++i) { - GameObject* gem = me->SummonGameObject(GO_ANCIENT_VEIN, VeinPos[i][0], VeinPos[i][1], VeinPos[i][2], VeinPos[i][3], VeinPos[i][4], VeinPos[i][5], VeinPos[i][6], VeinPos[i][7], 0); + GameObject* gem = me->SummonGameObject(GO_ANCIENT_VEIN, VeinPos[i][0], VeinPos[i][1], VeinPos[i][2], VeinPos[i][3], G3D::Quat(VeinPos[i][4], VeinPos[i][5], VeinPos[i][6], VeinPos[i][7]), 0); if (gem) VeinGUID[i]=gem->GetGUID(); } @@ -662,7 +662,7 @@ void hyjalAI::SpawnVeins() return; for (uint8 i = 7; i < 14; ++i) { - GameObject* gem = me->SummonGameObject(GO_ANCIENT_VEIN, VeinPos[i][0], VeinPos[i][1], VeinPos[i][2], VeinPos[i][3], VeinPos[i][4], VeinPos[i][5], VeinPos[i][6], VeinPos[i][7], 0); + GameObject* gem = me->SummonGameObject(GO_ANCIENT_VEIN, VeinPos[i][0], VeinPos[i][1], VeinPos[i][2], VeinPos[i][3], G3D::Quat(VeinPos[i][4], VeinPos[i][5], VeinPos[i][6], VeinPos[i][7]), 0); if (gem) VeinGUID[i] = gem->GetGUID(); } @@ -725,7 +725,7 @@ void hyjalAI::UpdateAI(uint32 diff) HideNearPos(me->GetPositionX(), me->GetPositionY()); HideNearPos(5037.76f, -1889.71f); for (uint8 i = 0; i < 92; ++i)//summon fires - me->SummonGameObject(GO_ROARING_FLAME, AllianceFirePos[i][0], AllianceFirePos[i][1], AllianceFirePos[i][2], AllianceFirePos[i][3], AllianceFirePos[i][4], AllianceFirePos[i][5], AllianceFirePos[i][6], AllianceFirePos[i][7], 0); + me->SummonGameObject(GO_ROARING_FLAME, AllianceFirePos[i][0], AllianceFirePos[i][1], AllianceFirePos[i][2], AllianceFirePos[i][3], G3D::Quat(AllianceFirePos[i][4], AllianceFirePos[i][5], AllianceFirePos[i][6], AllianceFirePos[i][7]), 0); } else me->SetVisible(true); @@ -738,7 +738,7 @@ void hyjalAI::UpdateAI(uint32 diff) HideNearPos(5563, -2763.19f); HideNearPos(5542.2f, -2629.36f); for (uint8 i = 0; i < 65; ++i)//summon fires - me->SummonGameObject(GO_ROARING_FLAME, HordeFirePos[i][0], HordeFirePos[i][1], HordeFirePos[i][2], HordeFirePos[i][3], HordeFirePos[i][4], HordeFirePos[i][5], HordeFirePos[i][6], HordeFirePos[i][7], 0); + me->SummonGameObject(GO_ROARING_FLAME, HordeFirePos[i][0], HordeFirePos[i][1], HordeFirePos[i][2], HordeFirePos[i][3], G3D::Quat(HordeFirePos[i][4], HordeFirePos[i][5], HordeFirePos[i][6], HordeFirePos[i][7]), 0); } else me->SetVisible(true); @@ -1042,7 +1042,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) { case 0://alliance for (uint8 i = 0; i < 92; ++i)//summon fires - me->SummonGameObject(GO_ROARING_FLAME, AllianceFirePos[i][0], AllianceFirePos[i][1], AllianceFirePos[i][2], AllianceFirePos[i][3], AllianceFirePos[i][4], AllianceFirePos[i][5], AllianceFirePos[i][6], AllianceFirePos[i][7], 0); + me->SummonGameObject(GO_ROARING_FLAME, AllianceFirePos[i][0], AllianceFirePos[i][1], AllianceFirePos[i][2], AllianceFirePos[i][3], G3D::Quat(AllianceFirePos[i][4], AllianceFirePos[i][5], AllianceFirePos[i][6], AllianceFirePos[i][7]), 0); for (uint8 i = 0; i < 25; ++i)//summon 25 ghouls { @@ -1083,7 +1083,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) break; case 1://horde for (uint8 i = 0; i < 65; ++i)//summon fires - me->SummonGameObject(GO_ROARING_FLAME, HordeFirePos[i][0], HordeFirePos[i][1], HordeFirePos[i][2], HordeFirePos[i][3], HordeFirePos[i][4], HordeFirePos[i][5], HordeFirePos[i][6], HordeFirePos[i][7], 0); + me->SummonGameObject(GO_ROARING_FLAME, HordeFirePos[i][0], HordeFirePos[i][1], HordeFirePos[i][2], HordeFirePos[i][3], G3D::Quat(HordeFirePos[i][4], HordeFirePos[i][5], HordeFirePos[i][6], HordeFirePos[i][7]), 0); for (uint8 i = 0; i < 26; ++i)//summon infernals { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index 074ea781838..f76e65c3423 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -1256,7 +1256,7 @@ class npc_crate_helper : public CreatureScript instance->SetData(DATA_CRATE_COUNT, instance->GetData(DATA_CRATE_COUNT) + 1); if (GameObject* crate = me->FindNearestGameObject(GO_SUSPICIOUS_CRATE, 5.0f)) { - crate->SummonGameObject(GO_PLAGUED_CRATE, crate->GetPositionX(), crate->GetPositionY(), crate->GetPositionZ(), crate->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, DAY); + crate->SummonGameObject(GO_PLAGUED_CRATE, *crate, G3D::Quat(), DAY); crate->Delete(); } } diff --git a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp index 00a622f1319..558b6c10a61 100644 --- a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp +++ b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp @@ -25,20 +25,49 @@ gets instead the deserter debuff. #include "ScriptMgr.h" #include "InstanceScript.h" +// Bosses (East) +// 0 - Pusillin +// 1 - Lethtendris +// 2 - Hydrospawn +// 3 - Zevrim Thornhoof +// 4 - Alzzin the Wildshaper + +// West +// 5 - Tendris Warpwood +// 6 - Magister Kalendris +// 7 - Tsu'zee +// 8 - Illyanna Ravenoak +// 9 - Immol'thar +// 10 - Prince Tortheldrin + +// North +// 11 - Guard Mol'dar +// 12 - Stomper Kreeg +// 13 - Guard Fengus +// 14 - Guard Slip'kik +// 15 - Captain Kromcrush +// 16 - King Gordok + +uint8 const EncounterCount = 17; + class instance_dire_maul : public InstanceMapScript { public: instance_dire_maul() : InstanceMapScript("instance_dire_maul", 429) { } + struct instance_dire_maul_InstanceMapScript : public InstanceScript + { + instance_dire_maul_InstanceMapScript(Map* map) : InstanceScript(map) + { + SetBossNumber(EncounterCount); + } + }; + InstanceScript* GetInstanceScript(InstanceMap* map) const override { return new instance_dire_maul_InstanceMapScript(map); } - struct instance_dire_maul_InstanceMapScript : public InstanceScript - { - instance_dire_maul_InstanceMapScript(Map* map) : InstanceScript(map) { } - }; }; void AddSC_instance_dire_maul() diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp index b579f9fc608..e8b101b5057 100644 --- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp +++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp @@ -204,7 +204,7 @@ public: case EVENT_COMPLETE: { DoCast(me, SPELL_IDOM_ROOM_CAMERA_SHAKE); - me->SummonGameObject(GO_BELNISTRASZS_BRAZIER, 2577.196f, 947.0781f, 53.16757f, 2.356195f, 0, 0, 0.9238796f, 0.3826832f, 3600); + me->SummonGameObject(GO_BELNISTRASZS_BRAZIER, 2577.196f, 947.0781f, 53.16757f, 2.356195f, G3D::Quat(0.f, 0.f, 0.9238796f, 0.3826832f), 3600); std::list<WorldObject*> ClusterList; Trinity::AllWorldObjectsInRange objects(me, 50.0f); Trinity::WorldObjectListSearcher<Trinity::AllWorldObjectsInRange> searcher(me, ClusterList, objects); diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index b192ff8ef4d..a220468e513 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -190,11 +190,7 @@ class boss_ossirian : public CreatureScript if (Creature* Trigger = me->GetMap()->SummonCreature(NPC_OSSIRIAN_TRIGGER, CrystalCoordinates[CrystalIterator])) { TriggerGUID = Trigger->GetGUID(); - if (GameObject* Crystal = Trigger->SummonGameObject(GO_OSSIRIAN_CRYSTAL, - CrystalCoordinates[CrystalIterator].GetPositionX(), - CrystalCoordinates[CrystalIterator].GetPositionY(), - CrystalCoordinates[CrystalIterator].GetPositionZ(), - 0, 0, 0, 0, 0, uint32(-1))) + if (GameObject* Crystal = Trigger->SummonGameObject(GO_OSSIRIAN_CRYSTAL, CrystalCoordinates[CrystalIterator], G3D::Quat(), uint32(-1))) { CrystalGUID = Crystal->GetGUID(); ++CrystalIterator; diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp index 6063b9fe5c6..a7b2b156128 100644 --- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp @@ -508,7 +508,7 @@ public: _explosivesGuids.clear(); for (uint8 i = 0; i != MAX_EXPLOSIVES; ++i) { - if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_1, ExplosivesPos[0][i].m_positionX, ExplosivesPos[0][i].m_positionY, ExplosivesPos[0][i].m_positionZ, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0)) + if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_1, ExplosivesPos[0][i], G3D::Quat(), 0)) _explosivesGuids.push_back(explosive->GetGUID()); } me->HandleEmoteCommand(EMOTE_ONESHOT_NONE); // reset anim state @@ -604,7 +604,7 @@ public: _explosivesGuids.clear(); for (uint8 i = 0; i != MAX_EXPLOSIVES; ++i) { - if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_2, ExplosivesPos[1][i].m_positionX, ExplosivesPos[1][i].m_positionY, ExplosivesPos[1][i].m_positionZ, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0)) + if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_2, ExplosivesPos[1][i], G3D::Quat(), 0)) _explosivesGuids.push_back(explosive->GetGUID()); } Talk(SAY_LEGOSO_15); diff --git a/src/server/scripts/Kalimdor/zone_felwood.cpp b/src/server/scripts/Kalimdor/zone_felwood.cpp index bce9d62105c..2b42db4b697 100644 --- a/src/server/scripts/Kalimdor/zone_felwood.cpp +++ b/src/server/scripts/Kalimdor/zone_felwood.cpp @@ -19,12 +19,12 @@ /* ScriptData SDName: Felwood SD%Complete: 95 -SDComment: Quest support: 4101, 4102 +SDComment: Quest support: 7632 SDCategory: Felwood EndScriptData */ /* ContentData -npcs_riverbreeze_and_silversky +at_ancient_leaf EndContentData */ #include "ScriptMgr.h" @@ -33,74 +33,6 @@ EndContentData */ #include "Player.h" /*###### -## npcs_riverbreeze_and_silversky -######*/ - -#define GOSSIP_ITEM_BEACON "Please make me a Cenarion Beacon" - -enum RiverbreezeAndSilversky -{ - SPELL_CENARION_BEACON = 15120, - - NPC_ARATHANDRIS_SILVERSKY = 9528, - NPC_MAYBESS_RIVERBREEZE = 9529, - - QUEST_CLEASING_FELWOOD_A = 4101, - QUEST_CLEASING_FELWOOD_H = 4102 -}; - -class npcs_riverbreeze_and_silversky : public CreatureScript -{ -public: - npcs_riverbreeze_and_silversky() : CreatureScript("npcs_riverbreeze_and_silversky") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - player->CLOSE_GOSSIP_MENU(); - creature->CastSpell(player, SPELL_CENARION_BEACON, false); - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - uint32 creatureId = creature->GetEntry(); - - if (creatureId == NPC_ARATHANDRIS_SILVERSKY) - { - if (player->GetQuestRewardStatus(QUEST_CLEASING_FELWOOD_A)) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->SEND_GOSSIP_MENU(2848, creature->GetGUID()); - } else if (player->GetTeam() == HORDE) - player->SEND_GOSSIP_MENU(2845, creature->GetGUID()); - else - player->SEND_GOSSIP_MENU(2844, creature->GetGUID()); - } - - if (creatureId == NPC_MAYBESS_RIVERBREEZE) - { - if (player->GetQuestRewardStatus(QUEST_CLEASING_FELWOOD_H)) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->SEND_GOSSIP_MENU(2849, creature->GetGUID()); - } else if (player->GetTeam() == ALLIANCE) - player->SEND_GOSSIP_MENU(2843, creature->GetGUID()); - else - player->SEND_GOSSIP_MENU(2842, creature->GetGUID()); - } - - return true; - } -}; - -/*###### ## at_ancient_leaf ######*/ @@ -138,6 +70,5 @@ class at_ancient_leaf : public AreaTriggerScript void AddSC_felwood() { - new npcs_riverbreeze_and_silversky(); new at_ancient_leaf(); } diff --git a/src/server/scripts/Kalimdor/zone_feralas.cpp b/src/server/scripts/Kalimdor/zone_feralas.cpp index 3e67a95b503..3c6ab633f66 100644 --- a/src/server/scripts/Kalimdor/zone_feralas.cpp +++ b/src/server/scripts/Kalimdor/zone_feralas.cpp @@ -19,10 +19,15 @@ /* ScriptData SDName: Feralas SD%Complete: 100 -SDComment: Quest support: 2767, Special vendor Gregan Brewspewer +SDComment: Quest support: 2767, 2987 SDCategory: Feralas EndScriptData */ +/* ContentData +npc_oox22fe +spell_gordunni_trap +EndContentData */ + #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" @@ -32,44 +37,6 @@ EndScriptData */ #include "WorldSession.h" /*###### -## npc_gregan_brewspewer -######*/ - -#define GOSSIP_HELLO "Buy somethin', will ya?" - -class npc_gregan_brewspewer : public CreatureScript -{ -public: - npc_gregan_brewspewer() : CreatureScript("npc_gregan_brewspewer") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - player->SEND_GOSSIP_MENU(2434, creature->GetGUID()); - } - if (action == GOSSIP_ACTION_TRADE) - player->GetSession()->SendListInventory(creature->GetGUID()); - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (creature->IsVendor() && player->GetQuestStatus(3909) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - player->SEND_GOSSIP_MENU(2433, creature->GetGUID()); - return true; - } - -}; - -/*###### ## npc_oox22fe ######*/ @@ -183,6 +150,10 @@ public: }; +/*###### +## spell_gordunni_trap +######*/ + enum GordunniTrap { GO_GORDUNNI_DIRT_MOUND = 144064, @@ -199,12 +170,12 @@ class spell_gordunni_trap : public SpellScriptLoader void HandleDummy() { - if (Unit* caster = GetCaster()) - if (GameObject* chest = caster->SummonGameObject(GO_GORDUNNI_DIRT_MOUND, caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0)) - { - chest->SetSpellId(GetSpellInfo()->Id); - caster->RemoveGameObject(chest, false); - } + Unit* caster = GetCaster(); + if (GameObject* chest = caster->SummonGameObject(GO_GORDUNNI_DIRT_MOUND, *caster, G3D::Quat(), 0)) + { + chest->SetSpellId(GetSpellInfo()->Id); + caster->RemoveGameObject(chest, false); + } } void Register() override @@ -225,7 +196,6 @@ class spell_gordunni_trap : public SpellScriptLoader void AddSC_feralas() { - new npc_gregan_brewspewer(); new npc_oox22fe(); new spell_gordunni_trap(); } diff --git a/src/server/scripts/Kalimdor/zone_moonglade.cpp b/src/server/scripts/Kalimdor/zone_moonglade.cpp index 99a209b5f0a..531c657e1cb 100644 --- a/src/server/scripts/Kalimdor/zone_moonglade.cpp +++ b/src/server/scripts/Kalimdor/zone_moonglade.cpp @@ -19,15 +19,14 @@ /* ScriptData SDName: Moonglade SD%Complete: 100 -SDComment: Quest support: 30, 272, 5929, 5930, 10965. Special Flight Paths for Druid class. +SDComment: Quest support: 10965 SDCategory: Moonglade EndScriptData */ /* ContentData -npc_bunthen_plainswind -npc_silva_filnaveth npc_clintar_spirit -npc_clintar_dreamwalker +npc_omen +npc_giant_spotlight EndContentData */ #include "ScriptMgr.h" @@ -42,128 +41,6 @@ EndContentData */ #include "CellImpl.h" /*###### -## npc_bunthen_plainswind -######*/ - -enum Bunthen -{ - QUEST_SEA_LION_HORDE = 30, - QUEST_SEA_LION_ALLY = 272, - TAXI_PATH_ID_ALLY = 315, - TAXI_PATH_ID_HORDE = 316 -}; - -#define GOSSIP_ITEM_THUNDER "I'd like to fly to Thunder Bluff." -#define GOSSIP_ITEM_AQ_END "Do you know where I can find Half Pendant of Aquatic Endurance?" - -class npc_bunthen_plainswind : public CreatureScript -{ -public: - npc_bunthen_plainswind() : CreatureScript("npc_bunthen_plainswind") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF + 1: - player->CLOSE_GOSSIP_MENU(); - if (player->getClass() == CLASS_DRUID && player->GetTeam() == HORDE) - player->ActivateTaxiPathTo(TAXI_PATH_ID_HORDE); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - player->SEND_GOSSIP_MENU(5373, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - player->SEND_GOSSIP_MENU(5376, creature->GetGUID()); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (player->getClass() != CLASS_DRUID) - player->SEND_GOSSIP_MENU(4916, creature->GetGUID()); - else if (player->GetTeam() != HORDE) - { - if (player->GetQuestStatus(QUEST_SEA_LION_ALLY) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_END, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - player->SEND_GOSSIP_MENU(4917, creature->GetGUID()); - } - else if (player->getClass() == CLASS_DRUID && player->GetTeam() == HORDE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THUNDER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (player->GetQuestStatus(QUEST_SEA_LION_HORDE) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_END, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - - player->SEND_GOSSIP_MENU(4918, creature->GetGUID()); - } - return true; - } - -}; - -/*###### -## npc_silva_filnaveth -######*/ - -#define GOSSIP_ITEM_RUTHERAN "I'd like to fly to Rut'theran Village." -#define GOSSIP_ITEM_AQ_AGI "Do you know where I can find Half Pendant of Aquatic Agility?" - -class npc_silva_filnaveth : public CreatureScript -{ -public: - npc_silva_filnaveth() : CreatureScript("npc_silva_filnaveth") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF + 1: - player->CLOSE_GOSSIP_MENU(); - if (player->getClass() == CLASS_DRUID && player->GetTeam() == ALLIANCE) - player->ActivateTaxiPathTo(TAXI_PATH_ID_ALLY); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - player->SEND_GOSSIP_MENU(5374, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - player->SEND_GOSSIP_MENU(5375, creature->GetGUID()); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (player->getClass() != CLASS_DRUID) - player->SEND_GOSSIP_MENU(4913, creature->GetGUID()); - else if (player->GetTeam() != ALLIANCE) - { - if (player->GetQuestStatus(QUEST_SEA_LION_HORDE) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_AGI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - player->SEND_GOSSIP_MENU(4915, creature->GetGUID()); - } - else if (player->getClass() == CLASS_DRUID && player->GetTeam() == ALLIANCE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTHERAN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - if (player->GetQuestStatus(QUEST_SEA_LION_ALLY) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_AGI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - - player->SEND_GOSSIP_MENU(4914, creature->GetGUID()); - } - return true; - } - -}; - -/*###### ## npc_clintar_spirit ######*/ @@ -652,8 +529,6 @@ public: void AddSC_moonglade() { - new npc_bunthen_plainswind(); - new npc_silva_filnaveth(); new npc_clintar_spirit(); new npc_omen(); new npc_giant_spotlight(); diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp index adb6439272a..9c531c1f1be 100644 --- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp +++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp @@ -32,6 +32,9 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "Player.h" +#include "Cell.h" +#include "CellImpl.h" +#include "GridNotifiers.h" /*###### ## npc_shenthul @@ -273,8 +276,555 @@ public: }; +/* --------- Herald of War ------------- */ +enum CitizenEntries +{ + NPC_GRYSHKA = 31433, + NPC_OLVIA = 31425, + NPC_SANA = 31429, + NPC_FELIKA = 31427, + NPC_THATHUNG = 31430, + NPC_KAJA = 31423 +}; + +enum SceneEvents +{ + EVENT_SCENE_1 = 1, + EVENT_SCENE_2 = 2, + EVENT_SCENE_3 = 3, + EVENT_SCENE_4 = 4, + EVENT_SCENE_5 = 5, + EVENT_SCENE_6 = 6, + EVENT_SCENE_7 = 7, + EVENT_SCENE_8 = 8, + EVENT_SCENE_9 = 9, + EVENT_SCENE_10 = 10, + EVENT_SCENE_11 = 11, + EVENT_SCENE_12 = 12, + EVENT_SCENE_13 = 13, + EVENT_RESET = 14 +}; + +enum CitizenTalk +{ + SAY_GRYSHKA_1 = 0, // When can we reopen our shops? I'm losing gold here! + SAY_GRYSHKA_2 = 1, // "This is an outrage!" + SAY_OLVIA_1 = 0, // Where is the Warchief? + SAY_OLVIA_2 = 1, // What are all these Forsaken doing here? + SAY_FELIKA_1 = 0, // What is going on? + SAY_FELIKA_2 = 1, // This is an outrage! + SAY_THATHUNG = 0, // What is going on? + SAY_KAJA = 0, // Why is Thrall allowing this to happen to our city? + SAY_SANA = 0, // We demand answers! + SAY_RUNTHAK_1 = 0, // SILENCE! + SAY_RUNTHAK_2 = 1, // We are on the brink of all out war with the Alliance! + SAY_RUNTHAK_3 = 2, // Tragic events have unfolded in Northrend. The Warchief is doing all that he can to keep us safe. + SAY_RUNTHAK_4 = 3 // All services and shops are to remain closed until further notice! That is all! +}; + +class npc_overlord_runthak_orgrimmar : public CreatureScript +{ +public: + npc_overlord_runthak_orgrimmar() : CreatureScript("npc_overlord_runthak_orgrimmar") { } + + struct npc_overlord_runthak_orgrimmarAI : public ScriptedAI + { + npc_overlord_runthak_orgrimmarAI(Creature* creature) : ScriptedAI(creature) + { + inProgress = false; + } + + void Reset() override + { + inProgress = false; + me->GetMotionMaster()->MovePath(me->GetSpawnId() * 10, true); + events.Reset(); + } + + void MoveInLineOfSight(Unit* who) override + { + if (who->GetTypeId() == TYPEID_PLAYER && who->IsWithinDist(me, 20.0f) && !inProgress) + { + inProgress = true; + events.ScheduleEvent(EVENT_SCENE_1, 2000); + } + } + + void UpdateAI(uint32 diff) override + { + events.Update(diff); + + while (uint32 eventID = events.ExecuteEvent()) + { + switch (eventID) + { + case EVENT_SCENE_1: + GetCitizenGuids(); + me->GetMotionMaster()->MoveIdle(); + if (Creature* gryshka = ObjectAccessor::GetCreature(*me, gryshkaGUID)) + { + me->SetFacingTo(me->GetAngle(gryshka->GetPositionX(), gryshka->GetPositionY())); + gryshka->AI()->Talk(SAY_GRYSHKA_1); + } + events.ScheduleEvent(EVENT_SCENE_2, 4500); + break; + case EVENT_SCENE_2: + if (Creature* olvia = ObjectAccessor::GetCreature(*me, olviaGUID)) + olvia->AI()->Talk(SAY_OLVIA_1); + events.ScheduleEvent(EVENT_SCENE_3, 4500); + break; + case EVENT_SCENE_3: + if (Creature* felika = ObjectAccessor::GetCreature(*me, felikaGUID)) + felika->AI()->Talk(SAY_FELIKA_1); + events.ScheduleEvent(EVENT_SCENE_4, 4500); + break; + case EVENT_SCENE_4: + if (Creature* thathung = ObjectAccessor::GetCreature(*me, thungGUID)) + thathung->AI()->Talk(SAY_THATHUNG); + events.ScheduleEvent(EVENT_SCENE_5, 4500); + break; + case EVENT_SCENE_5: + if (Creature* sana = ObjectAccessor::GetCreature(*me, sanaGUID)) + sana->AI()->Talk(SAY_SANA); + events.ScheduleEvent(EVENT_SCENE_6, 4500); + break; + case EVENT_SCENE_6: + if (Creature* gryshka = ObjectAccessor::GetCreature(*me, gryshkaGUID)) + gryshka->AI()->Talk(SAY_GRYSHKA_2); + events.ScheduleEvent(EVENT_SCENE_7, 4500); + break; + case EVENT_SCENE_7: + if (Creature* kaja = ObjectAccessor::GetCreature(*me, kajaGUID)) + kaja->AI()->Talk(SAY_KAJA); + events.ScheduleEvent(EVENT_SCENE_8, 4500); + break; + case EVENT_SCENE_8: + if (Creature* felika = ObjectAccessor::GetCreature(*me, felikaGUID)) + felika->AI()->Talk(SAY_FELIKA_2); + events.ScheduleEvent(EVENT_SCENE_9, 4500); + break; + case EVENT_SCENE_9: + if (Creature* olvia = ObjectAccessor::GetCreature(*me, olviaGUID)) + olvia->AI()->Talk(SAY_OLVIA_2); + events.ScheduleEvent(EVENT_SCENE_10, 4500); + break; + case EVENT_SCENE_10: + Talk(SAY_RUNTHAK_1); + events.ScheduleEvent(EVENT_SCENE_11, 1500); + break; + case EVENT_SCENE_11: + Talk(SAY_RUNTHAK_2); + events.ScheduleEvent(EVENT_SCENE_12, 4500); + break; + case EVENT_SCENE_12: + Talk(SAY_RUNTHAK_3); + events.ScheduleEvent(EVENT_SCENE_13, 4500); + break; + case EVENT_SCENE_13: + Talk(SAY_RUNTHAK_4); + events.ScheduleEvent(EVENT_RESET, 25000); + break; + case EVENT_RESET: + Reset(); + break; + default: + break; + } + } + } + + void GetCitizenGuids() + { + // if one GUID is empty it means all the others are empty as well so we should store them + // otherwise do not call for grid search since someone else already activated event once before and guids are stored + if (gryshkaGUID.IsEmpty()) + { + std::list<Unit*> citizenList; + Trinity::AnyFriendlyUnitInObjectRangeCheck checker(me, me, 25.0f); + Trinity::UnitListSearcher<Trinity::AnyFriendlyUnitInObjectRangeCheck> searcher(me, citizenList, checker); + me->VisitNearbyObject(20.0f, searcher); + for (Unit* target : citizenList) + { + switch (target->GetEntry()) + { + case NPC_GRYSHKA: + gryshkaGUID = target->GetGUID(); + break; + case NPC_OLVIA: + olviaGUID = target->GetGUID(); + break; + case NPC_SANA: + sanaGUID = target->GetGUID(); + break; + case NPC_FELIKA: + felikaGUID = target->GetGUID(); + break; + case NPC_THATHUNG: + thungGUID = target->GetGUID(); + break; + case NPC_KAJA: + kajaGUID = target->GetGUID(); + break; + default: + break; + } + } + } + } + + private: + EventMap events; + bool inProgress; + ObjectGuid gryshkaGUID; + ObjectGuid olviaGUID; + ObjectGuid sanaGUID; + ObjectGuid felikaGUID; + ObjectGuid thungGUID; + ObjectGuid kajaGUID; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_overlord_runthak_orgrimmarAI(creature); + } +}; + +// Phased out thrall during herald of war chain quest +enum HeraldEntries +{ + NPC_PORTAL_STORMWIND = 31640, + NPC_JAINA_PROUDMOORE = 31418, + NPC_BANSHEE_SYLVANAS = 31419, + NPC_KORKRON_GUARD = 31417, + NPC_THRALL_HERALD = 31412, + + GO_PORTAL_UNDERCITY = 193425 +}; + +enum HeraldMisc +{ + QUEST_HERALD_OF_WAR = 13257, + GUARDS_SIZE = 4 +}; + +enum HeraldActions +{ + ACTION_START_SCENE = 0 +}; + +enum HeraldSpell +{ + SPELL_JAINA_SPAWNIN = 55761 +}; + +enum HeraldTalk +{ + SAY_THRALL_0 = 0, // Kor'kron, stand down! + SAY_THRALL_1 = 1, // Jaina... + SAY_THRALL_2 = 2, // Jaina, what happened at the Wrathgate. It was a betrayal from within... + SAY_THRALL_3 = 3, // The Horde has lost the Undercity. + SAY_THRALL_4 = 4, // We now prepare to lay siege to the city and bring the perpetrators of this unforgivable crime to justice. + SAY_THRALL_5 = 5, // If we are forced into a conflict, the Lich King will destroy our divided forces in Northrend. + SAY_THRALL_6 = 6, // We will make this right, Jaina. Tell your king all that you have learned here. + SAY_THRALL_7 = 7, // Kor'kron, prepare transport to the Undercity. + + SAY_SYLVANAS_0 = 0, // Lady Proudmoore, the Warchief speaks the truth. This subterfuge was set in motion by Varimathras and Grand Apothecary Putress. It was not the Horde's doing. + SAY_SYLVANAS_1 = 1, // As the combined Horde and Alliance forces began their assault upon the Wrath Gate, an uprising broke out in the Undercity. Varimathras and hordes of his demonic brethren attacked. Hundreds of my people were slain in the coup. I barely managed to escape with my life. + + SAY_JAINA_0 = 0, // Thrall, what has happened? The King is preparing for war... + SAY_JAINA_1 = 1, // I will deliver this information to King Wrynn, Thrall, but... + SAY_JAINA_2 = 2, // Bolvar was like a brother to him. In the King's absence, Bolvar kept the Alliance united. He found strength for our people in our darkest hours. He watched over Anduin, raising him as his own. + SAY_JAINA_3 = 3, // I fear that the rage will consume him, Thrall. I remain hopeful that reason will prevail, but we must prepare for the worst... for war. + SAY_JAINA_4 = 4 // Farewell, Warchief. I pray that the next time we meet it will be as allies. +}; + +enum HeraldEvents +{ + EVENT_HERALD_SCENE1 = 1, + EVENT_HERALD_SCENE2 = 2, + EVENT_HERALD_SCENE3 = 3, + EVENT_HERALD_SCENE4 = 4, + EVENT_HERALD_SCENE5 = 5, + EVENT_HERALD_SCENE6 = 6, + EVENT_HERALD_SCENE7 = 7, + EVENT_HERALD_SCENE8 = 8, + EVENT_HERALD_SCENE9 = 9, + EVENT_HERALD_SCENE10 = 10, + EVENT_HERALD_SCENE11 = 11, + EVENT_HERALD_SCENE12 = 12, + EVENT_HERALD_SCENE13 = 13, + EVENT_HERALD_SCENE14 = 14, + EVENT_HERALD_SCENE15 = 15, + EVENT_HERALD_RESET = 16 +}; + +Position const GuardsSpawnPosition[GUARDS_SIZE] = +{ + { 1909.39f, -4144.21f, 40.6368f, 0.042239f }, + { 1910.73f, -4155.26f, 40.6316f, 0.615577f }, + { 1934.01f, -4141.40f, 40.6375f, 3.61109f }, + { 1931.11f, -4156.38f, 40.6130f, 2.19737f } +}; + +Position const GuardsMovePosition[GUARDS_SIZE] = +{ + { 1917.461670f, -4147.514160f, 40.636799f, 5.89346f }, + { 1916.181274f, -4152.295898f, 40.629120f, 0.497757f }, + { 1926.435425f, -4146.397461f, 40.618534f, 3.846709f }, + { 1926.519165f, -4153.216797f, 40.614975f, 2.570434f } +}; + +Position const MiscMovePositions[3] = +{ + { 1921.719604f, -4143.051270f, 40.623356f, 1.657789f }, // jaina move + { 1921.151855f, -4139.343750f, 40.583084f, 4.732627f }, // thrall move + { 1918.732422f, -4139.619629f, 40.607685f, 4.803311f } // sylvanas move +}; + +Position const PortalSpawnPosition = { 1921.752441f, -4151.148438f, 40.623848f, 1.714324f }; + +class npc_thrall_herald_of_war : public CreatureScript +{ +public: + npc_thrall_herald_of_war() : CreatureScript("npc_thrall_herald_of_war") { } + + struct npc_thrall_herald_of_warAI : public ScriptedAI + { + npc_thrall_herald_of_warAI(Creature* creature) : ScriptedAI(creature) + { + spawnedGuards = false; + sceneInProgress = false; + } + + void Reset() override + { + events.Reset(); + me->GetMotionMaster()->MovePath(me->GetSpawnId() * 10, true); + sceneInProgress = false; + + if (!spawnedGuards) + { + spawnedGuards = true; + for (uint8 i = 0; i < GUARDS_SIZE; i++) + { + if (Creature* korkronGuard = me->SummonCreature(NPC_KORKRON_GUARD, GuardsSpawnPosition[i])) + guardsGUIDs[i] = korkronGuard->GetGUID(); + } + } + } + + void MovementInform(uint32 type, uint32 pointId) override + { + if (type != POINT_MOTION_TYPE) + return; + + if (pointId == 2) + me->GetMotionMaster()->MovePath(me->GetSpawnId() * 10, true); + } + + void DoAction(int32 actionId) override + { + if (actionId == ACTION_START_SCENE && !sceneInProgress) + { + me->GetMotionMaster()->MoveIdle(); + sceneInProgress = true; + + if (Creature* jaina = me->SummonCreature(NPC_JAINA_PROUDMOORE, PortalSpawnPosition)) + { + me->SetFacingTo(me->GetAngle(jaina->GetPositionX(), jaina->GetPositionY())); + jainaGUID = jaina->GetGUID(); + jaina->CastSpell(jaina, SPELL_JAINA_SPAWNIN); + } + + if (Creature* stormwindPortal = me->SummonCreature(NPC_PORTAL_STORMWIND, PortalSpawnPosition)) + { + stormwindPortal->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + stormwindPortalGUID = stormwindPortal->GetGUID(); + } + + for (uint8 i = 0; i < GUARDS_SIZE; i++) + { + if (Creature* guards = ObjectAccessor::GetCreature(*me, guardsGUIDs[i])) + { + guards->SetWalk(false); + guards->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); + guards->GetMotionMaster()->MovePoint(1, GuardsMovePosition[i]); + } + } + + if (Creature* sylvanas = me->FindNearestCreature(NPC_BANSHEE_SYLVANAS, 25.0f)) + sylvanasGUID = sylvanas->GetGUID(); + + events.ScheduleEvent(EVENT_HERALD_SCENE1, 4000); + } + } + + void UpdateAI(uint32 diff) override + { + events.Update(diff); + + while (uint32 eventID = events.ExecuteEvent()) + { + switch (eventID) + { + case EVENT_HERALD_SCENE1: + Talk(SAY_THRALL_0); + me->GetMotionMaster()->MovePoint(1, MiscMovePositions[1]); + if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID)) + { + jaina->SetWalk(true); + jaina->GetMotionMaster()->MovePoint(1, MiscMovePositions[0]); + } + + for (uint8 i = 0; i < GUARDS_SIZE; i++) + { + if (Creature* guard = ObjectAccessor::GetCreature(*me, guardsGUIDs[i])) + { + guard->GetMotionMaster()->MoveTargetedHome(); + guard->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + } + } + events.ScheduleEvent(EVENT_HERALD_SCENE2, 3000); + break; + case EVENT_HERALD_SCENE2: + Talk(SAY_THRALL_1); + if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID)) + me->SetFacingTo(me->GetAngle(jaina->GetPositionX(), jaina->GetPositionY())); + events.ScheduleEvent(EVENT_HERALD_SCENE3, 3500); + break; + case EVENT_HERALD_SCENE3: + if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID)) + jaina->AI()->Talk(SAY_JAINA_0); + events.ScheduleEvent(EVENT_HERALD_SCENE4, 5500); + break; + case EVENT_HERALD_SCENE4: + Talk(SAY_THRALL_2); + if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasGUID)) + { + sylvanas->SetStandState(UNIT_STAND_STATE_STAND); + sylvanas->SetWalk(true); + sylvanas->GetMotionMaster()->MovePoint(1, MiscMovePositions[2]); + } + events.ScheduleEvent(EVENT_HERALD_SCENE5, 6500); + break; + case EVENT_HERALD_SCENE5: + if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasGUID)) + sylvanas->AI()->Talk(SAY_SYLVANAS_0); + events.ScheduleEvent(EVENT_HERALD_SCENE6, 10000); + break; + case EVENT_HERALD_SCENE6: + if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasGUID)) + sylvanas->AI()->Talk(SAY_SYLVANAS_1); + events.ScheduleEvent(EVENT_HERALD_SCENE7, 20000); + break; + case EVENT_HERALD_SCENE7: + Talk(SAY_THRALL_3); + events.ScheduleEvent(EVENT_HERALD_SCENE8, 4500); + break; + case EVENT_HERALD_SCENE8: + Talk(SAY_THRALL_4); + events.ScheduleEvent(EVENT_HERALD_SCENE9, 10000); + break; + case EVENT_HERALD_SCENE9: + Talk(SAY_THRALL_5); + events.ScheduleEvent(EVENT_HERALD_SCENE10, 8000); + break; + case EVENT_HERALD_SCENE10: + Talk(SAY_THRALL_6); + events.ScheduleEvent(EVENT_HERALD_SCENE11, 9000); + break; + case EVENT_HERALD_SCENE11: + if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID)) + jaina->AI()->Talk(SAY_JAINA_1); + events.ScheduleEvent(EVENT_HERALD_SCENE12, 6000); + break; + case EVENT_HERALD_SCENE12: + if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID)) + jaina->AI()->Talk(SAY_JAINA_2); + events.ScheduleEvent(EVENT_HERALD_SCENE13, 14000); + break; + case EVENT_HERALD_SCENE13: + if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID)) + jaina->AI()->Talk(SAY_JAINA_3); + events.ScheduleEvent(EVENT_HERALD_SCENE14, 10000); + break; + case EVENT_HERALD_SCENE14: + if (Creature* jaina = ObjectAccessor::GetCreature(*me, jainaGUID)) + { + jaina->AI()->Talk(SAY_JAINA_4); + jaina->SetWalk(true); + jaina->GetMotionMaster()->MovePoint(2, jaina->GetHomePosition()); + jaina->DespawnOrUnsummon(5000); + } + events.ScheduleEvent(EVENT_HERALD_SCENE15, 7000); + break; + case EVENT_HERALD_SCENE15: + { + me->SetWalk(true); + me->GetMotionMaster()->MovePoint(2, me->GetHomePosition()); + Talk(SAY_THRALL_7); + + if (Creature* sylvanas = ObjectAccessor::GetCreature(*me, sylvanasGUID)) + { + sylvanas->SetWalk(true); + sylvanas->GetMotionMaster()->MovePoint(2, sylvanas->GetHomePosition()); + } + + if (Creature* portal = ObjectAccessor::GetCreature(*me, stormwindPortalGUID)) + portal->DespawnOrUnsummon(); + + events.ScheduleEvent(EVENT_HERALD_RESET, 60000); + break; + } + case EVENT_HERALD_RESET: + Reset(); + break; + default: + break; + } + } + } + + private: + EventMap events; + ObjectGuid guardsGUIDs[GUARDS_SIZE]; + ObjectGuid jainaGUID; + ObjectGuid sylvanasGUID; + ObjectGuid stormwindPortalGUID; + bool spawnedGuards; + bool sceneInProgress; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_thrall_herald_of_warAI(creature); + } +}; + +class areatrigger_orgrimmar_herald_of_war : public AreaTriggerScript +{ +public: + areatrigger_orgrimmar_herald_of_war() : AreaTriggerScript("areatrigger_orgrimmar_herald_of_war") { } + + bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) override + { + if (player->IsAlive() && player->GetQuestStatus(QUEST_HERALD_OF_WAR) == QUEST_STATUS_COMPLETE) + { + if (Creature* thrall = player->FindNearestCreature(NPC_THRALL_HERALD, 50.0f)) + { + thrall->AI()->DoAction(ACTION_START_SCENE); + return true; + } + } + return false; + } +}; + void AddSC_orgrimmar() { new npc_shenthul(); new npc_thrall_warchief(); + new npc_overlord_runthak_orgrimmar(); + new npc_thrall_herald_of_war(); + new areatrigger_orgrimmar_herald_of_war(); } diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp index cc285ab991e..db7bd62c5d1 100644 --- a/src/server/scripts/Kalimdor/zone_silithus.cpp +++ b/src/server/scripts/Kalimdor/zone_silithus.cpp @@ -19,13 +19,20 @@ /* ScriptData SDName: Silithus SD%Complete: 100 -SDComment: Quest support: 8304, 8507. +SDComment: Quest support: 8348,8352,8361,8519 SDCategory: Silithus EndScriptData */ /* ContentData -npcs_rutgar_and_frankal -quest_a_pawn_on_the_eternal_pawn +A Pawn on the Eternal Board - creatures, gameobjects and defines +quest_a_pawn_on_the_eternal_board +npc_qiraj_war_spawn : Adds that are summoned in the Qiraj gates battle. +npc_anachronos_the_ancient : Creature that controls the event. +npc_anachronos_quest_trigger: controls the spawning of the BG War mobs. +go_crystalline_tear : GameObject that begins the event and hands out quest +TO DO: get correct spell IDs and timings for spells cast upon dragon transformations +TO DO: Dragons should use the HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF) after transformation, + but for some unknown reason it doesn't work. EndContentData */ #include "ScriptMgr.h" @@ -34,195 +41,66 @@ EndContentData */ #include "Group.h" #include "Player.h" -/*### -## npcs_rutgar_and_frankal -###*/ - -//gossip item text best guess -#define GOSSIP_ITEM1 "I seek information about Natalia" - -#define GOSSIP_ITEM2 "That sounds dangerous!" -#define GOSSIP_ITEM3 "What did you do?" -#define GOSSIP_ITEM4 "Who?" -#define GOSSIP_ITEM5 "Women do that. What did she demand?" -#define GOSSIP_ITEM6 "What do you mean?" -#define GOSSIP_ITEM7 "What happened next?" - -#define GOSSIP_ITEM11 "Yes, please continue" -#define GOSSIP_ITEM12 "What language?" -#define GOSSIP_ITEM13 "The Priestess attacked you?!" -#define GOSSIP_ITEM14 "I should ask the monkey about this" -#define GOSSIP_ITEM15 "Then what..." - -enum RutgarAndFrankal //trigger creatures to kill -{ - TRIGGER_FRANKAL = 15221, - TRIGGER_RUTGAR = 15222 -}; - -class npcs_rutgar_and_frankal : public CreatureScript -{ -public: - npcs_rutgar_and_frankal() : CreatureScript("npcs_rutgar_and_frankal") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(7755, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - player->SEND_GOSSIP_MENU(7756, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - player->SEND_GOSSIP_MENU(7757, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - player->SEND_GOSSIP_MENU(7758, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 4: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - player->SEND_GOSSIP_MENU(7759, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 5: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - player->SEND_GOSSIP_MENU(7760, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 6: - player->SEND_GOSSIP_MENU(7761, creature->GetGUID()); - //'kill' our trigger to update quest status - player->KilledMonsterCredit(TRIGGER_RUTGAR); - break; - - case GOSSIP_ACTION_INFO_DEF + 9: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - player->SEND_GOSSIP_MENU(7762, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 10: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM12, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - player->SEND_GOSSIP_MENU(7763, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 11: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM13, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); - player->SEND_GOSSIP_MENU(7764, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 12: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM14, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); - player->SEND_GOSSIP_MENU(7765, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 13: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM15, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); - player->SEND_GOSSIP_MENU(7766, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF + 14: - player->SEND_GOSSIP_MENU(7767, creature->GetGUID()); - //'kill' our trigger to update quest status - player->KilledMonsterCredit(TRIGGER_FRANKAL); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(8304) == QUEST_STATUS_INCOMPLETE && - creature->GetEntry() == 15170 && - !player->GetReqKillOrCastCurrentCount(8304, TRIGGER_RUTGAR)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - if (player->GetQuestStatus(8304) == QUEST_STATUS_INCOMPLETE && - creature->GetEntry() == 15171 && - player->GetReqKillOrCastCurrentCount(8304, TRIGGER_RUTGAR)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); - - player->SEND_GOSSIP_MENU(7754, creature->GetGUID()); - - return true; - } - -}; - -/*#### -# quest_a_pawn_on_the_eternal_board (Defines) -####*/ -enum EternalBoard -{ - QUEST_A_PAWN_ON_THE_ETERNAL_BOARD = 8519, - - FACTION_HOSTILE = 14, - FACTION_FRIENDLY = 35, - - C_ANACHRONOS = 15381, - C_FANDRAL_STAGHELM = 15382, - C_ARYGOS = 15380, - C_MERITHRA = 15378, - C_CAELESTRASZ = 15379, - - ANACHRONOS_SAY_1 = 0, - ANACHRONOS_SAY_2 = 1, - ANACHRONOS_SAY_3 = 2, - ANACHRONOS_SAY_4 = 3, - ANACHRONOS_SAY_5 = 4, - ANACHRONOS_SAY_6 = 5, - ANACHRONOS_SAY_7 = 6, - ANACHRONOS_SAY_8 = 7, - ANACHRONOS_SAY_9 = 8, - ANACHRONOS_SAY_10 = 9, - ANACHRONOS_EMOTE_1 = 10, - ANACHRONOS_EMOTE_2 = 11, - ANACHRONOS_EMOTE_3 = 12, - - FANDRAL_SAY_1 = 0, - FANDRAL_SAY_2 = 1, - FANDRAL_SAY_3 = 2, - FANDRAL_SAY_4 = 3, - FANDRAL_SAY_5 = 4, - FANDRAL_SAY_6 = 5, - FANDRAL_EMOTE_1 = 6, - FANDRAL_EMOTE_2 = 7, - - CAELESTRASZ_SAY_1 = 0, - CAELESTRASZ_SAY_2 = 1, - CAELESTRASZ_YELL_1 = 2, - - ARYGOS_SAY_1 = 0, - ARYGOS_YELL_1 = 1, - ARYGOS_EMOTE_1 = 2, - - MERITHRA_SAY_1 = 0, - MERITHRA_SAY_2 = 1, - MERITHRA_YELL_1 = 2, - MERITHRA_EMOTE_1 = 3, - - GO_GATE_OF_AHN_QIRAJ = 176146, - GO_GLYPH_OF_AHN_QIRAJ = 176148, - GO_ROOTS_OF_AHN_QIRAJ = 176147 -}; /*##### # Quest: A Pawn on the Eternal Board #####*/ -/* ContentData -A Pawn on the Eternal Board - creatures, gameobjects and defines -npc_qiraj_war_spawn : Adds that are summoned in the Qiraj gates battle. -npc_anachronos_the_ancient : Creature that controls the event. -npc_anachronos_quest_trigger: controls the spawning of the BG War mobs. -go_crystalline_tear : GameObject that begins the event and hands out quest -TO DO: get correct spell IDs and timings for spells cast upon dragon transformations -TO DO: Dragons should use the HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF) after transformation, but for some unknown reason it doesnt work. -EndContentData */ - -#define EVENT_AREA_RADIUS 65 //65yds -#define EVENT_COOLDOWN 500000 //in ms. appear after event completed or failed (should be = Adds despawn time) +enum EternalBoard +{ + QUEST_A_PAWN_ON_THE_ETERNAL_BOARD = 8519, + + FACTION_HOSTILE = 14, + FACTION_FRIENDLY = 35, + + EVENT_AREA_RADIUS = 65, // 65yds + EVENT_COOLDOWN = 500000, // in ms. appears after event completed or failed (should be = Adds despawn time) + + NPC_ANACHRONOS = 15381, + NPC_FANDRAL_STAGHELM = 15382, + NPC_ARYGOS = 15380, + NPC_MERITHRA_OF_THE_DREAM = 15378, + NPC_CAELESTRASZ = 15379, + + ANACHRONOS_SAY_1 = 0, + ANACHRONOS_SAY_2 = 1, + ANACHRONOS_SAY_3 = 2, + ANACHRONOS_SAY_4 = 3, + ANACHRONOS_SAY_5 = 4, + ANACHRONOS_SAY_6 = 5, + ANACHRONOS_SAY_7 = 6, + ANACHRONOS_SAY_8 = 7, + ANACHRONOS_SAY_9 = 8, + ANACHRONOS_SAY_10 = 9, + ANACHRONOS_EMOTE_1 = 10, + ANACHRONOS_EMOTE_2 = 11, + ANACHRONOS_EMOTE_3 = 12, + + FANDRAL_SAY_1 = 0, + FANDRAL_SAY_2 = 1, + FANDRAL_SAY_3 = 2, + FANDRAL_SAY_4 = 3, + FANDRAL_SAY_5 = 4, + FANDRAL_SAY_6 = 5, + FANDRAL_EMOTE_1 = 6, + FANDRAL_EMOTE_2 = 7, + + CAELESTRASZ_SAY_1 = 0, + CAELESTRASZ_SAY_2 = 1, + CAELESTRASZ_YELL_1 = 2, + + ARYGOS_SAY_1 = 0, + ARYGOS_YELL_1 = 1, + ARYGOS_EMOTE_1 = 2, + + MERITHRA_SAY_1 = 0, + MERITHRA_SAY_2 = 1, + MERITHRA_YELL_1 = 2, + MERITHRA_EMOTE_1 = 3, + + GO_GATE_OF_AHN_QIRAJ = 176146, + GO_GLYPH_OF_AHN_QIRAJ = 176148, + GO_ROOTS_OF_AHN_QIRAJ = 176147 +}; struct QuestCinematic { @@ -233,59 +111,59 @@ struct QuestCinematic // Creature 0 - Anachronos, 1 - Fandral, 2 - Arygos, 3 - Merithra, 4 - Caelestrasz static QuestCinematic EventAnim[]= { - {ANACHRONOS_SAY_1, 0, 2000}, - {FANDRAL_SAY_1, 1, 4000}, - {MERITHRA_EMOTE_1, 3, 500}, - {MERITHRA_SAY_1, 3, 500}, - {ARYGOS_EMOTE_1, 2, 2000}, + {ANACHRONOS_SAY_1, 0, 2000}, + {FANDRAL_SAY_1, 1, 4000}, + {MERITHRA_EMOTE_1, 3, 500}, + {MERITHRA_SAY_1, 3, 500}, + {ARYGOS_EMOTE_1, 2, 2000}, {CAELESTRASZ_SAY_1, 4, 8000}, - {MERITHRA_SAY_2, 3, 6000}, + {MERITHRA_SAY_2, 3, 6000}, {0, 3, 2000}, - {MERITHRA_YELL_1, 3, 2500}, - {0, 3, 3000}, //Morph - {0, 3, 4000}, //EmoteLiftoff - {0, 3, 4000}, // spell - {0, 3, 1250}, //fly - {0, 3, 250}, //remove flags + {MERITHRA_YELL_1, 3, 2500}, + {0, 3, 3000}, //Morph + {0, 3, 4000}, //EmoteLiftoff + {0, 3, 4000}, // spell + {0, 3, 1250}, //fly + {0, 3, 250}, //remove flags {ARYGOS_SAY_1, 2, 3000}, {0, 3, 2000}, {ARYGOS_YELL_1, 2, 3000}, - {0, 3, 3000}, //Morph - {0, 3, 4000}, //EmoteLiftoff - {0, 3, 4000}, // spell - {0, 3, 1000}, //fly - {0, 3, 1000}, //remove flags + {0, 3, 3000}, //Morph + {0, 3, 4000}, //EmoteLiftoff + {0, 3, 4000}, // spell + {0, 3, 1000}, //fly + {0, 3, 1000}, //remove flags {CAELESTRASZ_SAY_2, 4, 5000}, {0, 3, 3000}, {CAELESTRASZ_YELL_1, 4, 3000}, - {0, 3, 3000}, //Morph - {0, 3, 4000}, //EmoteLiftoff - {0, 3, 2500}, // spell + {0, 3, 3000}, //Morph + {0, 3, 4000}, //EmoteLiftoff + {0, 3, 2500}, // spell {ANACHRONOS_SAY_2, 0, 2000}, - {0, 3, 250}, //fly - {0, 3, 25}, //remove flags + {0, 3, 250}, //fly + {0, 3, 25}, //remove flags {FANDRAL_SAY_2, 1, 3000}, - {ANACHRONOS_SAY_3, 0, 10000}, //Both run through the armies - {0, 3, 2000}, // Sands will stop - {0, 3, 8000}, // Summon Gate + {ANACHRONOS_SAY_3, 0, 10000}, //Both run through the armies + {0, 3, 2000}, // Sands will stop + {0, 3, 8000}, // Summon Gate {ANACHRONOS_SAY_4, 0, 4000}, - {0, 0, 2000}, //spell 1-> Arcane cosmetic (Mobs freeze) - {0, 0, 5000}, //Spell 2-> Arcane long cosmetic (barrier appears) (Barrier -> Glyphs) - {0, 0, 7000}, //BarrieR - {0, 0, 4000}, //Glyphs + {0, 0, 2000}, //spell 1-> Arcane cosmetic (Mobs freeze) + {0, 0, 5000}, //Spell 2-> Arcane long cosmetic (barrier appears) (Barrier -> Glyphs) + {0, 0, 7000}, //BarrieR + {0, 0, 4000}, //Glyphs {ANACHRONOS_SAY_5, 0, 2000}, - {0, 0, 4000}, // Roots - {FANDRAL_SAY_3, 1, 3000}, //Root Text - {FANDRAL_EMOTE_1, 1, 3000}, //falls knee + {0, 0, 4000}, // Roots + {FANDRAL_SAY_3, 1, 3000}, //Root Text + {FANDRAL_EMOTE_1, 1, 3000}, //falls knee {ANACHRONOS_SAY_6, 0, 3000}, {ANACHRONOS_SAY_7, 0, 3000}, {ANACHRONOS_SAY_8, 0, 8000}, - {ANACHRONOS_EMOTE_1, 0, 1000}, //Give Scepter + {ANACHRONOS_EMOTE_1, 0, 1000}, //Give Scepter {FANDRAL_SAY_4, 1, 3000}, - {FANDRAL_SAY_5, 1, 3000}, //->Equip hammer~Scepter, throw it at door - {FANDRAL_EMOTE_2, 1, 3000}, //Throw hammer at door. + {FANDRAL_SAY_5, 1, 3000}, //->Equip hammer~Scepter, throw it at door + {FANDRAL_EMOTE_2, 1, 3000}, //Throw hammer at door. {ANACHRONOS_SAY_9, 0, 3000}, - {FANDRAL_SAY_6, 1, 3000}, //fandral goes away + {FANDRAL_SAY_6, 1, 3000}, //fandral goes away {ANACHRONOS_EMOTE_2, 0, 3000}, {ANACHRONOS_EMOTE_3, 0, 3000}, {0, 0, 2000}, @@ -348,30 +226,30 @@ Position const SpawnLocation[] = {-8078.0f, 1518.0f, 2.61f, 3.141592f}, //Kaldorei Infantry {-8082.0f, 1516.0f, 2.61f, 3.141592f}, //Kaldorei Infantry - {-8088.0f, 1510.0f, 2.61f, 0.0f}, //Anubisath Conqueror - {-8084.0f, 1520.0f, 2.61f, 0.0f}, //Anubisath Conqueror - {-8088.0f, 1530.0f, 2.61f, 0.0f}, //Anubisath Conqueror - - {-8080.0f, 1513.0f, 2.61f, 0.0f}, //Qiraj Wasp - {-8082.0f, 1523.0f, 2.61f, 0.0f}, //Qiraj Wasp - {-8085.0f, 1518.0f, 2.61f, 0.0f}, //Qiraj Wasp - {-8082.0f, 1516.0f, 2.61f, 0.0f}, //Qiraj Wasp - {-8085.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Wasp - {-8080.0f, 1528.0f, 2.61f, 0.0f}, //Qiraj Wasp - - {-8082.0f, 1513.0f, 2.61f, 0.0f}, //Qiraj Wasp - {-8079.0f, 1523.0f, 2.61f, 0.0f}, //Qiraj Wasp - {-8080.0f, 1531.0f, 2.61f, 0.0f}, //Qiraj Wasp - {-8079.0f, 1516.0f, 2.61f, 0.0f}, //Qiraj Wasp - {-8082.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Wasp - {-8080.0f, 1518.0f, 2.61f, 0.0f}, //Qiraj Wasp - - {-8081.0f, 1514.0f, 2.61f, 0.0f}, //Qiraj Tank - {-8081.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Tank - {-8081.0f, 1526.0f, 2.61f, 0.0f}, //Qiraj Tank - {-8081.0f, 1512.0f, 2.61f, 0.0f}, //Qiraj Tank - {-8082.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Tank - {-8081.0f, 1528.0f, 2.61f, 0.0f}, //Qiraj Tank + {-8088.0f, 1510.0f, 2.61f, 0.0f}, //Anubisath Conqueror + {-8084.0f, 1520.0f, 2.61f, 0.0f}, //Anubisath Conqueror + {-8088.0f, 1530.0f, 2.61f, 0.0f}, //Anubisath Conqueror + + {-8080.0f, 1513.0f, 2.61f, 0.0f}, //Qiraj Wasp + {-8082.0f, 1523.0f, 2.61f, 0.0f}, //Qiraj Wasp + {-8085.0f, 1518.0f, 2.61f, 0.0f}, //Qiraj Wasp + {-8082.0f, 1516.0f, 2.61f, 0.0f}, //Qiraj Wasp + {-8085.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Wasp + {-8080.0f, 1528.0f, 2.61f, 0.0f}, //Qiraj Wasp + + {-8082.0f, 1513.0f, 2.61f, 0.0f}, //Qiraj Wasp + {-8079.0f, 1523.0f, 2.61f, 0.0f}, //Qiraj Wasp + {-8080.0f, 1531.0f, 2.61f, 0.0f}, //Qiraj Wasp + {-8079.0f, 1516.0f, 2.61f, 0.0f}, //Qiraj Wasp + {-8082.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Wasp + {-8080.0f, 1518.0f, 2.61f, 0.0f}, //Qiraj Wasp + + {-8081.0f, 1514.0f, 2.61f, 0.0f}, //Qiraj Tank + {-8081.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Tank + {-8081.0f, 1526.0f, 2.61f, 0.0f}, //Qiraj Tank + {-8081.0f, 1512.0f, 2.61f, 0.0f}, //Qiraj Tank + {-8082.0f, 1520.0f, 2.61f, 0.0f}, //Qiraj Tank + {-8081.0f, 1528.0f, 2.61f, 0.0f}, //Qiraj Tank {-8082.0f, 1513.0f, 2.61f, 3.141592f}, //Anubisath Conqueror {-8082.0f, 1520.0f, 2.61f, 3.141592f}, //Anubisath Conqueror @@ -402,14 +280,36 @@ struct SpawnSpells static SpawnSpells SpawnCast[4] = { - {100000, 2000, 33652}, // Stop Time + {100000, 2000, 33652}, // Stoned {38500, 300000, 28528}, // Poison Cloud {58000, 300000, 35871}, // Frost Debuff (need correct spell) {80950, 300000, 42075}, // Fire Explosion (need correct spell however this one looks cool) }; + /*##### # npc_anachronos_the_ancient ######*/ + +enum AnachronosTheAncient +{ + NPC_QIRAJI_WASP = 15414, + NPC_QIRAJI_TANK = 15422, + NPC_KALDOREI_INFANTRY = 15423, + NPC_ANUBISATH_CONQUEROR = 15424, + SPELL_ARCANE_CHANNELING = 23017, + SPELL_NOXIOUS_BREATH = 24818, + SPELL_GREEN_DRAGON_TRANSFORM_DND = 25105, + SPELL_RED_DRAGON_TRANSFORM_DND = 25106, + SPELL_BLUE_DRAGON_TRANSFORM_DND = 25107, + SPELL_TIME_STOP = 25158, + SPELL_CALL_PRISMATIC_BARRIER = 25159, + SPELL_CALL_GLYPHS_OF_WARDING = 25166, + SPELL_CALL_ANCIENTS = 25167, + SPELL_THROW_HAMMER = 33806, + SPELL_FROST_BREATH = 50505, + SPELL_FLAME_BREATH = 54293 +}; + class npc_anachronos_the_ancient : public CreatureScript { public: @@ -464,10 +364,10 @@ public: if (!player) return; - Creature* Fandral = player->FindNearestCreature(C_FANDRAL_STAGHELM, 100.0f); - Creature* Arygos = player->FindNearestCreature(C_ARYGOS, 100.0f); - Creature* Caelestrasz = player->FindNearestCreature(C_CAELESTRASZ, 100.0f); - Creature* Merithra = player->FindNearestCreature(C_MERITHRA, 100.0f); + Creature* Fandral = player->FindNearestCreature(NPC_FANDRAL_STAGHELM, 100.0f); + Creature* Arygos = player->FindNearestCreature(NPC_ARYGOS, 100.0f); + Creature* Caelestrasz = player->FindNearestCreature(NPC_CAELESTRASZ, 100.0f); + Creature* Merithra = player->FindNearestCreature(NPC_MERITHRA_OF_THE_DREAM, 100.0f); if (!Fandral || !Arygos || !Caelestrasz || !Merithra) return; @@ -509,7 +409,7 @@ public: Merithra->AI()->Talk(MERITHRA_YELL_1); break; case 9: - Merithra->CastSpell(Merithra, 25105, true); + Merithra->CastSpell(Merithra, SPELL_GREEN_DRAGON_TRANSFORM_DND, true); break; case 10: Merithra->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); @@ -517,7 +417,7 @@ public: Merithra->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 3); break; case 11: - Merithra->CastSpell(Merithra, 24818, false); + Merithra->CastSpell(Merithra, SPELL_NOXIOUS_BREATH, false); break; case 12: Merithra->GetMotionMaster()->MoveCharge(-8100, 1530, 50, 42); @@ -536,7 +436,7 @@ public: Arygos->AI()->Talk(ARYGOS_YELL_1); break; case 17: - Arygos->CastSpell(Arygos, 25107, true); + Arygos->CastSpell(Arygos, SPELL_BLUE_DRAGON_TRANSFORM_DND, true); break; case 18: Arygos->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); @@ -544,7 +444,7 @@ public: Arygos->GetMotionMaster()->MoveCharge(-8065, 1530, 6.61f, 42); break; case 19: - Arygos->CastSpell(Arygos, 50505, false); + Arygos->CastSpell(Arygos, SPELL_FROST_BREATH, false); break; case 20: Arygos->GetMotionMaster()->MoveCharge(-8095, 1530, 50, 42); @@ -563,15 +463,15 @@ public: Caelestrasz->AI()->Talk(CAELESTRASZ_YELL_1); break; case 25: - Caelestrasz->CastSpell(Caelestrasz, 25106, true); + Caelestrasz->CastSpell(Caelestrasz, SPELL_RED_DRAGON_TRANSFORM_DND, true); break; case 26: - Caelestrasz->HandleEmoteCommand(254); + Caelestrasz->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); Caelestrasz->SetDisableGravity(true); Caelestrasz->GetMotionMaster()->MoveCharge(-8065, 1530, 7.61f, 4); break; case 27: - Caelestrasz->CastSpell(Caelestrasz, 54293, false); + Caelestrasz->CastSpell(Caelestrasz, SPELL_FLAME_BREATH, false); break; case 28: Talk(ANACHRONOS_SAY_2, Fandral); @@ -596,29 +496,29 @@ public: Caelestrasz->GetMotionMaster()->MoveCharge(-8050, 1473, 65, 15); break; //Text: sands will stop case 34: - DoCast(player, 23017, true);//Arcane Channeling + DoCast(player, SPELL_ARCANE_CHANNELING, true);//Arcane Channeling break; case 35: - me->CastSpell(-8088, 1520.43f, 2.67f, 25158, true); + me->CastSpell(-8088, 1520.43f, 2.67f, SPELL_TIME_STOP, true); break; case 36: - DoCast(player, 25159, true); + DoCast(player, SPELL_CALL_PRISMATIC_BARRIER, true); break; case 37: - me->SummonGameObject(GO_GATE_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0); + me->SummonGameObject(GO_GATE_OF_AHN_QIRAJ, Position(-8130.f, 1525.f, 17.5f, 0.f), G3D::Quat(), 0); break; case 38: - DoCast(player, 25166, true); - me->SummonGameObject(GO_GLYPH_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0); + DoCast(player, SPELL_CALL_GLYPHS_OF_WARDING, true); + me->SummonGameObject(GO_GLYPH_OF_AHN_QIRAJ, Position(-8130.f, 1525.f, 17.5f, 0.f), G3D::Quat(), 0); break; case 39: Talk(ANACHRONOS_SAY_5, Fandral); break; case 40: - Fandral->CastSpell(me, 25167, true); + Fandral->CastSpell(me, SPELL_CALL_ANCIENTS, true); break; case 41: - Fandral->SummonGameObject(GO_ROOTS_OF_AHN_QIRAJ, -8130, 1525, 17.5f, 0, 0, 0, 0, 0, 0); + Fandral->SummonGameObject(GO_ROOTS_OF_AHN_QIRAJ, Position(-8130.f, 1525.f, 17.5f, 0.f), G3D::Quat(), 0); Fandral->AI()->Talk(FANDRAL_SAY_3); break; case 42: @@ -649,11 +549,11 @@ public: break; case 50: Fandral->AI()->Talk(FANDRAL_EMOTE_2); - Fandral->CastSpell(-8127, 1525, 17.5f, 33806, true); + Fandral->CastSpell(-8127, 1525, 17.5f, SPELL_THROW_HAMMER, true); break; case 51: { - uint32 entries[4] = { 15423, 15424, 15414, 15422 }; + uint32 entries[4] = { NPC_KALDOREI_INFANTRY, NPC_ANUBISATH_CONQUEROR, NPC_QIRAJI_WASP, NPC_QIRAJI_TANK }; Unit* mob = NULL; for (uint8 i = 0; i < 4; ++i) { @@ -661,7 +561,7 @@ public: while (mob) { mob->RemoveFromWorld(); - mob = player->FindNearestCreature(15423, 50); + mob = player->FindNearestCreature(NPC_KALDOREI_INFANTRY, 50); } } break; @@ -706,7 +606,7 @@ public: me->SetDisplayId(15500); break; case 63: - me->HandleEmoteCommand(254); + me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); me->SetDisableGravity(true); break; case 64: @@ -746,6 +646,13 @@ public: # npc_qiraj_war_spawn ######*/ +enum QirajWarSpawn +{ + SPELL_STONED_CHANNEL_CAST_VISUAL = 15533, + SPELL_SUMMON_POISON_CLOUD = 24319, + SPELL_STONED = 33652 +}; + class npc_qiraj_war_spawn : public CreatureScript { public: @@ -793,22 +700,22 @@ public: { if (!Timers) { - if (me->GetEntry() == 15424 || me->GetEntry() == 15422 || me->GetEntry() == 15414) //all but Kaldorei Soldiers + if (me->GetEntry() == NPC_ANUBISATH_CONQUEROR || me->GetEntry() == NPC_QIRAJI_TANK || me->GetEntry() == NPC_QIRAJI_WASP) //all but Kaldorei Soldiers { SpellTimer1 = SpawnCast[1].Timer1; SpellTimer2 = SpawnCast[2].Timer1; SpellTimer3 = SpawnCast[3].Timer1; } - if (me->GetEntry() == 15423 || me->GetEntry() == 15424 || me->GetEntry() == 15422 || me->GetEntry() == 15414) + if (me->GetEntry() == NPC_KALDOREI_INFANTRY || me->GetEntry() == NPC_ANUBISATH_CONQUEROR || me->GetEntry() == NPC_QIRAJI_TANK || me->GetEntry() == NPC_QIRAJI_WASP) SpellTimer4 = SpawnCast[0].Timer1; Timers = true; } - if (me->GetEntry() == 15424 || me->GetEntry() == 15422|| me->GetEntry() == 15414) + if (me->GetEntry() == NPC_ANUBISATH_CONQUEROR || me->GetEntry() == NPC_QIRAJI_TANK || me->GetEntry() == NPC_QIRAJI_WASP) { if (SpellTimer1 <= diff) { DoCast(me, SpawnCast[1].SpellId); - DoCast(me, 24319); + DoCast(me, SPELL_SUMMON_POISON_CLOUD); SpellTimer1 = SpawnCast[1].Timer2; } else SpellTimer1 -= diff; if (SpellTimer2 <= diff) @@ -822,38 +729,38 @@ public: SpellTimer3 = SpawnCast[3].Timer2; } else SpellTimer3 -= diff; } - if (me->GetEntry() == 15423 || me->GetEntry() == 15424 || me->GetEntry() == 15422 || me->GetEntry() == 15414) + if (me->GetEntry() == NPC_KALDOREI_INFANTRY || me->GetEntry() == NPC_ANUBISATH_CONQUEROR || me->GetEntry() == NPC_QIRAJI_TANK || me->GetEntry() == NPC_QIRAJI_WASP) { if (SpellTimer4 <= diff) { me->RemoveAllAttackers(); me->AttackStop(); - DoCast(me, 15533); + DoCast(me, SPELL_STONED_CHANNEL_CAST_VISUAL); SpellTimer4 = SpawnCast[0].Timer2; } else SpellTimer4 -= diff; } if (!hasTarget) { Unit* target = NULL; - if (me->GetEntry() == 15424 || me->GetEntry() == 15422 || me->GetEntry() == 15414) - target = me->FindNearestCreature(15423, 20, true); - if (me->GetEntry() == 15423) + if (me->GetEntry() == NPC_ANUBISATH_CONQUEROR || me->GetEntry() == NPC_QIRAJI_TANK || me->GetEntry() == NPC_QIRAJI_WASP) + target = me->FindNearestCreature(NPC_KALDOREI_INFANTRY, 20, true); + if (me->GetEntry() == NPC_KALDOREI_INFANTRY) { uint8 tar = urand(0, 2); if (tar == 0) - target = me->FindNearestCreature(15422, 20, true); + target = me->FindNearestCreature(NPC_QIRAJI_TANK, 20, true); else if (tar == 1) - target = me->FindNearestCreature(15424, 20, true); + target = me->FindNearestCreature(NPC_ANUBISATH_CONQUEROR, 20, true); else if (tar == 2) - target = me->FindNearestCreature(15414, 20, true); + target = me->FindNearestCreature(NPC_QIRAJI_WASP, 20, true); } hasTarget = true; if (target) AttackStart(target); } - if (!(me->FindNearestCreature(15379, 60))) - DoCast(me, 33652); + if (!(me->FindNearestCreature(NPC_CAELESTRASZ, 60))) + DoCast(me, SPELL_STONED); if (!UpdateVictim()) { @@ -932,7 +839,7 @@ public: if (Creature* spawn = me->SummonCreature(WavesInfo[WaveCount].CreatureId, SpawnLocation[i], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, desptimer)) { - if (spawn->GetEntry() == 15423) + if (spawn->GetEntry() == NPC_KALDOREI_INFANTRY) spawn->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15427 + rand32() % 4); if (i >= 30) WaveCount = 1; if (i >= 33) WaveCount = 2; @@ -1040,6 +947,14 @@ void npc_qiraj_war_spawn::npc_qiraj_war_spawnAI::JustDied(Unit* /*slayer*/) # go_crystalline_tear ######*/ +enum CrystallineTear +{ + ARYGOS_GNOME_FORM = 15418, + CAELESTRASZ_NIGHT_ELF_FORM = 15419, + MERITHRA_NIGHT_ELF_FORM = 15420, + ANACHRONOS_QUEST_TRIGGER_INVISIBLE = 15454 +}; + class go_crystalline_tear : public GameObjectScript { public: @@ -1049,35 +964,35 @@ public: { if (quest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD) { - if (Creature* trigger = go->FindNearestCreature(15454, 100)) + if (Creature* trigger = go->FindNearestCreature(ANACHRONOS_QUEST_TRIGGER_INVISIBLE, 100)) { - Unit* Merithra = trigger->SummonCreature(15378, -8034.535f, 1535.14f, 2.61f, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); - Unit* Caelestrasz = trigger->SummonCreature(15379, -8032.767f, 1533.148f, 2.61f, 1.5f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); - Unit* Arygos = trigger->SummonCreature(15380, -8034.52f, 1537.843f, 2.61f, 5.7f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); - /* Unit* Fandral = */ trigger->SummonCreature(15382, -8028.462f, 1535.843f, 2.61f, 3.141592f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); - Creature* Anachronos = trigger->SummonCreature(15381, -8028.75f, 1538.795f, 2.61f, 4, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); + Unit* Merithra = trigger->SummonCreature(NPC_MERITHRA_OF_THE_DREAM, -8034.535f, 1535.14f, 2.61f, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); + Unit* Caelestrasz = trigger->SummonCreature(NPC_CAELESTRASZ, -8032.767f, 1533.148f, 2.61f, 1.5f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); + Unit* Arygos = trigger->SummonCreature(NPC_ARYGOS, -8034.52f, 1537.843f, 2.61f, 5.7f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); + /* Unit* Fandral = */ trigger->SummonCreature(NPC_FANDRAL_STAGHELM, -8028.462f, 1535.843f, 2.61f, 3.141592f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); + Creature* Anachronos = trigger->SummonCreature(NPC_ANACHRONOS, -8028.75f, 1538.795f, 2.61f, 4, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000); if (Merithra) { - Merithra->SetUInt32Value(UNIT_NPC_FLAGS, 0); + Merithra->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); Merithra->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - Merithra->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15420); + Merithra->SetUInt32Value(UNIT_FIELD_DISPLAYID, MERITHRA_NIGHT_ELF_FORM); Merithra->setFaction(35); } if (Caelestrasz) { - Caelestrasz->SetUInt32Value(UNIT_NPC_FLAGS, 0); + Caelestrasz->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); Caelestrasz->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15419); + Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAYID, CAELESTRASZ_NIGHT_ELF_FORM); Caelestrasz->setFaction(35); } if (Arygos) { - Arygos->SetUInt32Value(UNIT_NPC_FLAGS, 0); + Arygos->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); Arygos->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - Arygos->SetUInt32Value(UNIT_FIELD_DISPLAYID, 15418); + Arygos->SetUInt32Value(UNIT_FIELD_DISPLAYID, ARYGOS_GNOME_FORM); Arygos->setFaction(35); } @@ -1107,112 +1022,107 @@ public: enum WSSpells { - SPELL_PUNISHMENT = 24803, - SPELL_SPAWN_IN = 25035, - - AURA_TWILIGHT_SET = 24746, - AURA_MEDALLION = 24748, - AURA_RING = 24782, - - SPELL_TEMPLAR_RANDOM = 24745, - SPELL_TEMPLAR_FIRE = 24747, - SPELL_TEMPLAR_AIR = 24757, - SPELL_TEMPLAR_EARTH = 24759, - SPELL_TEMPLAR_WATER = 24761, - - SPELL_DUKE_RANDOM = 24762, - SPELL_DUKE_FIRE = 24766, - SPELL_DUKE_AIR = 24769, - SPELL_DUKE_EARTH = 24771, - SPELL_DUKE_WATER = 24773, - - SPELL_ROYAL_RANDOM = 24785, - SPELL_ROYAL_FIRE = 24787, - SPELL_ROYAL_AIR = 24791, - SPELL_ROYAL_EARTH = 24792, - SPELL_ROYAL_WATER = 24793 + AURA_TWILIGHT_SET = 24746, + AURA_MEDALLION = 24748, + AURA_RING = 24782, + + SPELL_TEMPLAR_RANDOM = 24745, + SPELL_TEMPLAR_FIRE = 24747, + SPELL_TEMPLAR_AIR = 24757, + SPELL_TEMPLAR_EARTH = 24759, + SPELL_TEMPLAR_WATER = 24761, + + SPELL_DUKE_RANDOM = 24762, + SPELL_DUKE_FIRE = 24766, + SPELL_DUKE_AIR = 24769, + SPELL_DUKE_EARTH = 24771, + SPELL_DUKE_WATER = 24773, + + SPELL_ROYAL_RANDOM = 24785, + SPELL_ROYAL_FIRE = 24787, + SPELL_ROYAL_AIR = 24791, + SPELL_ROYAL_EARTH = 24792, + SPELL_ROYAL_WATER = 24793, + + SPELL_PUNISHMENT = 24803, + SPELL_SPAWN_IN = 25035 }; enum WSGossip { - GOSSIPID_LESSER_WS = 6540, - GOSSIPID_WS = 6542, - GOSSIPID_GREATER_WS = 6543 + OPTION_ID_WS_RANDOM = 0, + OPTION_ID_1_CRIMSON = 1, + OPTION_ID_2_AZURE = 2, + OPTION_ID_3_EARTHEN = 3, + OPTION_ID_4_HOARY = 4, + OPTION_ID_1_CYNDERS = 1, + OPTION_ID_2_FATHOMS = 2, + OPTION_ID_3_SHARDS = 3, + OPTION_ID_4_ZEPHYRS = 4, + OPTION_ID_1_SKALDRENOX = 1, + OPTION_ID_2_SKWOL = 2, + OPTION_ID_3_KAZUM = 3, + OPTION_ID_4_WHIRLAXIS = 4, + GOSSIP_ID_LESSER_WS = 6540, + GOSSIP_ID_WIND_STONE = 6542, + GOSSIP_ID_GREATER_WS = 6543 }; enum WSCreatures { - NPC_TEMPLAR_FIRE = 15209, - NPC_TEMPLAR_WATER = 15211, - NPC_TEMPLAR_AIR = 15212, - NPC_TEMPLAR_EARTH = 15307, - - NPC_DUKE_FIRE = 15206, - NPC_DUKE_WATER = 15207, - NPC_DUKE_EARTH = 15208, - NPC_DUKE_AIR = 15220, - - NPC_ROYAL_FIRE = 15203, - NPC_ROYAL_AIR = 15204, - NPC_ROYAL_EARTH = 15205, - NPC_ROYAL_WATER = 15305 + NPC_TEMPLAR_FIRE = 15209, + NPC_TEMPLAR_WATER = 15211, + NPC_TEMPLAR_AIR = 15212, + NPC_TEMPLAR_EARTH = 15307, + + NPC_DUKE_FIRE = 15206, + NPC_DUKE_WATER = 15207, + NPC_DUKE_EARTH = 15208, + NPC_DUKE_AIR = 15220, + + NPC_ROYAL_FIRE = 15203, + NPC_ROYAL_AIR = 15204, + NPC_ROYAL_EARTH = 15205, + NPC_ROYAL_WATER = 15305 }; enum WSItems { - ITEM_TEMPLAR_FIRE = 20416, - ITEM_TEMPLAR_EARTH = 20419, - ITEM_TEMPLAR_WATER = 20420, - ITEM_TEMPLAR_AIR = 20418, - - ITEM_DUKE_FIRE = 20432, - ITEM_DUKE_EARTH = 20435, - ITEM_DUKE_WATER = 20436, - ITEM_DUKE_AIR = 20433, - - ITEM_ROYAL_FIRE = 20447, - ITEM_ROYAL_EARTH = 20449, - ITEM_ROYAL_WATER = 20450, - ITEM_ROYAL_AIR = 20448, + ITEM_TEMPLAR_FIRE = 20416, + ITEM_TEMPLAR_AIR = 20418, + ITEM_TEMPLAR_EARTH = 20419, + ITEM_TEMPLAR_WATER = 20420, + + ITEM_DUKE_FIRE = 20432, + ITEM_DUKE_AIR = 20433, + ITEM_DUKE_EARTH = 20435, + ITEM_DUKE_WATER = 20436, + + ITEM_ROYAL_FIRE = 20447, + ITEM_ROYAL_AIR = 20448, + ITEM_ROYAL_EARTH = 20449, + ITEM_ROYAL_WATER = 20450 }; enum WS { - TEMPLAR = 0, - DUKE = 1, - ROYAL = 2, - - FIRE = 0x1, - WATER = 0x2, - EARTH = 0x4, - AIR = 0x8 -}; + TEMPLAR = 0, + DUKE = 1, + ROYAL = 2, + + FIRE = 0x1, + WATER = 0x2, + EARTH = 0x4, + AIR = 0x8 +}; enum WSTexts { - SAY_TEMPLAR_AGGRO = 0, - SAY_DUKE_AGGRO = 0, - YELL_ROYAL_AGGRO = 0 + SAY_TEMPLAR_AGGRO = 0, + SAY_DUKE_AGGRO = 0, + YELL_ROYAL_AGGRO = 0 }; -#define GOSSIP_TEMPLAR_RANDOM "I am no cultist, you monster! Come to me and face your destruction!" -#define GOSSIP_TEMPLAR_FIRE "Crimson Templar! I hold your signet! Heed my call!" -#define GOSSIP_TEMPLAR_EARTH "Earthen Templar! I hold your signet! Heed my call!" -#define GOSSIP_TEMPLAR_AIR "Hoary Templar! I hold your signet! Heed my call!" -#define GOSSIP_TEMPLAR_WATER "Azure Templar! I hold your signet! Heed my call!" - -#define GOSSIP_DUKE_RANDOM "You will listen to this, vile duke! I am not your Twilight's Hammer lapdog! I am here to challenge you! Come! Come, and meet your death..." -#define GOSSIP_DUKE_FIRE "Duke of Cynders! I hold your signet! Heed my call!" -#define GOSSIP_DUKE_EARTH "The Duke of Shards! I hold your signet! Heed my call!" -#define GOSSIP_DUKE_AIR "The Duke of Zephyrs! I hold your signet! Heed my call!" -#define GOSSIP_DUKE_WATER "The Duke of Fathoms! I hold your signet! Heed my call!" - -#define GOSSIP_ROYAL_RANDOM "The day of the judgement has come, fiend! I challenge you to battle!" -#define GOSSIP_ROYAL_FIRE "Prince Skaldrenox! I hold your signet! Heed my call!" -#define GOSSIP_ROYAL_EARTH "Baron Kazum! I hold your signet! Heed my call!" -#define GOSSIP_ROYAL_AIR "High Marshal Whirlaxis! I hold your signet! Heed my call!" -#define GOSSIP_ROYAL_WATER "Lord Skwol! I hold your signet! Heed my call!" - class go_wind_stone : public GameObjectScript { public: @@ -1294,7 +1204,7 @@ class go_wind_stone : public GameObjectScript case NPC_TEMPLAR_WATER: case NPC_TEMPLAR_AIR: case NPC_TEMPLAR_EARTH: - summons->AI()->Talk(SAY_TEMPLAR_AGGRO); + summons->AI()->Talk(SAY_TEMPLAR_AGGRO, player); break; case NPC_DUKE_FIRE: @@ -1323,10 +1233,10 @@ class go_wind_stone : public GameObjectScript uint32 gossipId = go->GetGOInfo()->GetGossipMenuId(); switch (gossipId) { - case GOSSIPID_LESSER_WS: + case GOSSIP_ID_LESSER_WS: { if (rank >= 1) // 1 or 2 or 3 - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEMPLAR_RANDOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_LESSER_WS, OPTION_ID_WS_RANDOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); else { go->CastSpell(player, SPELL_PUNISHMENT); @@ -1335,19 +1245,19 @@ class go_wind_stone : public GameObjectScript uint8 item = GetItems(player, TEMPLAR); if (item & FIRE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEMPLAR_FIRE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_LESSER_WS, OPTION_ID_1_CRIMSON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); if (item & WATER) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEMPLAR_WATER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_LESSER_WS, OPTION_ID_2_AZURE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); if (item & EARTH) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEMPLAR_EARTH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_LESSER_WS, OPTION_ID_3_EARTHEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); if (item & AIR) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEMPLAR_AIR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_LESSER_WS, OPTION_ID_4_HOARY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); break; } - case GOSSIPID_WS: + case GOSSIP_ID_WIND_STONE: { if (rank >= 2) // 2 or 3 - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUKE_RANDOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_WIND_STONE, OPTION_ID_WS_RANDOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); else { go->CastSpell(player, SPELL_PUNISHMENT); @@ -1356,19 +1266,19 @@ class go_wind_stone : public GameObjectScript uint8 item = GetItems(player, DUKE); if (item & FIRE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUKE_FIRE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_WIND_STONE, OPTION_ID_1_CYNDERS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); if (item & WATER) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUKE_WATER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_WIND_STONE, OPTION_ID_2_FATHOMS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); if (item & EARTH) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUKE_EARTH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_WIND_STONE, OPTION_ID_3_SHARDS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); if (item & AIR) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUKE_AIR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_WIND_STONE, OPTION_ID_4_ZEPHYRS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); break; } - case GOSSIPID_GREATER_WS: + case GOSSIP_ID_GREATER_WS: { if (rank == 3) // 3 - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ROYAL_RANDOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_GREATER_WS, OPTION_ID_WS_RANDOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); else { go->CastSpell(player, SPELL_PUNISHMENT); @@ -1377,13 +1287,13 @@ class go_wind_stone : public GameObjectScript uint8 item = GetItems(player, ROYAL); if (item & FIRE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ROYAL_FIRE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_GREATER_WS, OPTION_ID_1_SKALDRENOX, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); if (item & WATER) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ROYAL_WATER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_GREATER_WS, OPTION_ID_2_SKWOL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); if (item & EARTH) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ROYAL_EARTH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_GREATER_WS, OPTION_ID_3_KAZUM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); if (item & AIR) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ROYAL_AIR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_ID_GREATER_WS, OPTION_ID_4_WHIRLAXIS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15); break; } default: @@ -1462,6 +1372,5 @@ void AddSC_silithus() new npc_anachronos_quest_trigger(); new npc_anachronos_the_ancient(); new npc_qiraj_war_spawn(); - new npcs_rutgar_and_frankal(); new go_wind_stone(); } diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp index 22b4c86cbcd..966bbaec1da 100644 --- a/src/server/scripts/Kalimdor/zone_tanaris.cpp +++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp @@ -19,15 +19,13 @@ /* ScriptData SDName: Tanaris SD%Complete: 80 -SDComment: Quest support: 648, 1560, 2954, 4005, 10277, 10279(Special flight path). +SDComment: Quest support: 648, 1560, 4005, 10277 SDCategory: Tanaris EndScriptData */ /* ContentData npc_aquementas npc_custodian_of_time -npc_steward_of_time -npc_stone_watcher_of_norgannon npc_OOX17 npc_tooga EndContentData */ @@ -298,116 +296,6 @@ public: }; /*###### -## npc_steward_of_time -######*/ - -#define GOSSIP_ITEM_FLIGHT "Please take me to the master's lair." - -class npc_steward_of_time : public CreatureScript -{ -public: - npc_steward_of_time() : CreatureScript("npc_steward_of_time") { } - - bool OnQuestAccept(Player* player, Creature* /*creature*/, Quest const* quest) override - { - if (quest->GetQuestId() == 10279) //Quest: To The Master's Lair - player->CastSpell(player, 34891, true); //(Flight through Caverns) - - return false; - } - - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF + 1) - player->CastSpell(player, 34891, true); //(Flight through Caverns) - - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(10279) == QUEST_STATUS_INCOMPLETE || player->GetQuestRewardStatus(10279)) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(9978, creature->GetGUID()); - } - else - player->SEND_GOSSIP_MENU(9977, creature->GetGUID()); - - return true; - } - -}; - -/*###### -## npc_stone_watcher_of_norgannon -######*/ - -#define GOSSIP_ITEM_NORGANNON_1 "What function do you serve?" -#define GOSSIP_ITEM_NORGANNON_2 "What are the Plates of Uldum?" -#define GOSSIP_ITEM_NORGANNON_3 "Where are the Plates of Uldum?" -#define GOSSIP_ITEM_NORGANNON_4 "Excuse me? We've been \"reschedueled for visitations\"? What does that mean?!" -#define GOSSIP_ITEM_NORGANNON_5 "So, what's inside Uldum?" -#define GOSSIP_ITEM_NORGANNON_6 "I will return when i have the Plates of Uldum." - -class npc_stone_watcher_of_norgannon : public CreatureScript -{ -public: - npc_stone_watcher_of_norgannon() : CreatureScript("npc_stone_watcher_of_norgannon") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->SEND_GOSSIP_MENU(1675, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - player->SEND_GOSSIP_MENU(1676, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - player->SEND_GOSSIP_MENU(1677, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - player->SEND_GOSSIP_MENU(1678, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+4: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - player->SEND_GOSSIP_MENU(1679, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+5: - player->CLOSE_GOSSIP_MENU(); - player->AreaExploredOrEventHappens(2954); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(2954) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - - player->SEND_GOSSIP_MENU(1674, creature->GetGUID()); - - return true; - } - -}; - -/*###### ## npc_OOX17 ######*/ @@ -672,8 +560,6 @@ void AddSC_tanaris() { new npc_aquementas(); new npc_custodian_of_time(); - new npc_steward_of_time(); - new npc_stone_watcher_of_norgannon(); new npc_OOX17(); new npc_tooga(); } diff --git a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp index 85c3a621239..2a606856af6 100644 --- a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp +++ b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp @@ -19,7 +19,7 @@ /* ScriptData SDName: Thousand Needles SD%Complete: 100 -SDComment: Support for Quest: 1950, 4770, 4904, 4966, 5151. +SDComment: Support for Quest: 4770, 4904, 4966, 5151. SDCategory: Thousand Needles EndScriptData */ @@ -27,7 +27,6 @@ EndScriptData */ npc_kanati npc_lakota_windsong npc_swiftmountain -npc_plucky npc_enraged_panther go_panther_cage EndContentData */ @@ -44,10 +43,9 @@ EndContentData */ enum Kanati { - SAY_KAN_START = 0, - - QUEST_PROTECT_KANATI = 4966, - NPC_GALAK_ASS = 10720 + SAY_KAN_START = 0, + QUEST_PROTECT_KANATI = 4966, + NPC_GALAK_ASS = 10720 }; Position const GalakLoc = {-4867.387695f, -1357.353760f, -48.226f, 0.0f}; @@ -112,19 +110,19 @@ public: enum Lakota { - SAY_LAKO_START = 0, - SAY_LAKO_LOOK_OUT = 1, - SAY_LAKO_HERE_COME = 2, - SAY_LAKO_MORE = 3, - SAY_LAKO_END = 4, - - QUEST_FREE_AT_LAST = 4904, - NPC_GRIM_BANDIT = 10758, - FACTION_ESCORTEE_LAKO = 232, //guessed - - ID_AMBUSH_1 = 0, - ID_AMBUSH_2 = 2, - ID_AMBUSH_3 = 4 + SAY_LAKO_START = 0, + SAY_LAKO_LOOK_OUT = 1, + SAY_LAKO_HERE_COME = 2, + SAY_LAKO_MORE = 3, + SAY_LAKO_END = 4, + + QUEST_FREE_AT_LAST = 4904, + NPC_GRIM_BANDIT = 10758, + FACTION_ESCORTEE_LAKO = 232, //guessed + + ID_AMBUSH_1 = 0, + ID_AMBUSH_2 = 2, + ID_AMBUSH_3 = 4 }; Position const BanditLoc[6] = @@ -183,6 +181,7 @@ public: DoSpawnBandits(ID_AMBUSH_3); break; case 45: + Talk(SAY_LAKO_END); if (Player* player = GetPlayerForEscort()) player->GroupEventHappens(QUEST_FREE_AT_LAST, me); break; @@ -195,7 +194,6 @@ public: me->SummonCreature(NPC_GRIM_BANDIT, BanditLoc[i+AmbushId], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); } }; - }; /*###### @@ -204,13 +202,13 @@ public: enum Packa { - SAY_START = 0, - SAY_WYVERN = 1, - SAY_COMPLETE = 2, + SAY_START = 0, + SAY_WYVERN = 1, + SAY_COMPLETE = 2, - QUEST_HOMEWARD = 4770, - NPC_WYVERN = 4107, - FACTION_ESCORTEE = 232 //guessed + QUEST_HOMEWARD = 4770, + NPC_WYVERN = 4107, + FACTION_ESCORTEE = 232 //guessed }; Position const WyvernLoc[3] = @@ -275,137 +273,10 @@ public: }; }; -/*##### -# npc_plucky -######*/ - -#define GOSSIP_P "Please tell me the Phrase.." - -enum Plucky -{ - FACTION_FRIENDLY = 35, - QUEST_SCOOP = 1950, - SPELL_PLUCKY_HUMAN = 9192, - SPELL_PLUCKY_CHICKEN = 9220 -}; - -class npc_plucky : public CreatureScript -{ -public: - npc_plucky() : CreatureScript("npc_plucky") { } - - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF+1: - player->CLOSE_GOSSIP_MENU(); - player->CompleteQuest(QUEST_SCOOP); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (player->GetQuestStatus(QUEST_SCOOP) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_P, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - player->SEND_GOSSIP_MENU(738, creature->GetGUID()); - - return true; - } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_pluckyAI(creature); - } - - struct npc_pluckyAI : public ScriptedAI - { - npc_pluckyAI(Creature* creature) : ScriptedAI(creature) - { - Initialize(); - NormFaction = creature->getFaction(); - } - - void Initialize() - { - ResetTimer = 120000; - } - - uint32 NormFaction; - uint32 ResetTimer; - - void Reset() override - { - Initialize(); - - if (me->getFaction() != NormFaction) - me->setFaction(NormFaction); - - if (me->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) - me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - - DoCast(me, SPELL_PLUCKY_CHICKEN, false); - } - - void ReceiveEmote(Player* player, uint32 TextEmote) override - { - if (player->GetQuestStatus(QUEST_SCOOP) == QUEST_STATUS_INCOMPLETE) - { - if (TextEmote == TEXT_EMOTE_BECKON) - { - me->setFaction(FACTION_FRIENDLY); - me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - DoCast(me, SPELL_PLUCKY_HUMAN, false); - } - } - - if (TextEmote == TEXT_EMOTE_CHICKEN) - { - if (me->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) - return; - else - { - me->setFaction(FACTION_FRIENDLY); - me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - DoCast(me, SPELL_PLUCKY_HUMAN, false); - me->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); - } - } - } - - void UpdateAI(uint32 Diff) override - { - if (me->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) - { - if (ResetTimer <= Diff) - { - if (!me->GetVictim()) - EnterEvadeMode(); - else - me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - - return; - } - else - ResetTimer -= Diff; - } - - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - }; - -}; - enum PantherCage { - ENRAGED_PANTHER = 10992 + QUEST_HYPERCAPACITOR_GIZMO = 5151, + ENRAGED_PANTHER = 10992 }; class go_panther_cage : public GameObjectScript @@ -416,7 +287,7 @@ public: bool OnGossipHello(Player* player, GameObject* go) override { go->UseDoorOrButton(); - if (player->GetQuestStatus(5151) == QUEST_STATUS_INCOMPLETE) + if (player->GetQuestStatus(QUEST_HYPERCAPACITOR_GIZMO) == QUEST_STATUS_INCOMPLETE) { if (Creature* panther = go->FindNearestCreature(ENRAGED_PANTHER, 5, true)) { @@ -466,7 +337,6 @@ void AddSC_thousand_needles() new npc_kanati(); new npc_lakota_windsong(); new npc_paoka_swiftmountain(); - new npc_plucky(); new npc_enraged_panther(); new go_panther_cage(); } diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp index 3c11fd5d9a6..2f97b5a8055 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_jedoga_shadowseeker.cpp @@ -16,7 +16,8 @@ */ /* - * Comment: Complete - BUT THE TRIGGER NEEDS DATA WHETHER THE PRISON OF TALDARAM IS OFFLINE ! + * Comment: Visuals missing, de-germanize code, wow 3.3.5a-ize + * Patch 3.3.2 (2010-01-02): Jedoga Shadowseeker now only ascends once during the encounter. */ #include "ScriptMgr.h" diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index 16cfb30e2dc..2df0fceab9c 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -156,7 +156,7 @@ public: ImpaleTarget = impaleTarget->GetGUID(); impaleTarget->SetReactState(REACT_PASSIVE); impaleTarget->SetDisplayId(DISPLAY_INVISIBLE); - impaleTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE|UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + impaleTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL|UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); return impaleTarget; } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index 7b8ca41772f..d6682e272fd 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -137,7 +137,8 @@ enum Events EVENT_CHECK_CORPOREALITY = 13, EVENT_SHADOW_PULSARS_SHOOT = 14, EVENT_TRIGGER_BERSERK = 15, - EVENT_TWILIGHT_MENDING = 16 + EVENT_TWILIGHT_MENDING = 16, + EVENT_ACTIVATE_EMBERS = 17 }; enum Actions @@ -150,7 +151,9 @@ enum Actions ACTION_MONITOR_CORPOREALITY = 3, // Orb Carrier - ACTION_SHOOT = 4 + ACTION_WARNING_SHOOT = 4, + ACTION_SHOOT = 5, + ACTION_ACTIVATE_EMBERS = 6 }; enum Phases @@ -168,8 +171,7 @@ enum Misc DATA_MATERIAL_DAMAGE_TAKEN = 2, DATA_STACKS_DISPELLED = 3, DATA_FIGHT_PHASE = 4, - DATA_EVADE_METHOD = 5, - DATA_SPAWNED_FLAMES = 6, + DATA_SPAWNED_FLAMES = 5, }; enum OrbCarrierSeats @@ -189,6 +191,7 @@ enum CorporealityEvent }; Position const HalionSpawnPos = {3156.67f, 533.8108f, 72.98822f, 3.159046f}; +Position const HalionRespawnPos = {3156.625f, 533.2674f, 72.97205f, 0.0f}; uint8 const MAX_CORPOREALITY_STATE = 11; @@ -212,132 +215,39 @@ CorporealityEntry const _corporealityReference[MAX_CORPOREALITY_STATE] = { {74831, 74836} }; -struct generic_halionAI : public BossAI -{ - generic_halionAI(Creature* creature, uint32 bossId) : BossAI(creature, bossId), _canEvade(false) { } - - void EnterCombat(Unit* /*who*/) override - { - _EnterCombat(); - me->AddAura(SPELL_TWILIGHT_PRECISION, me); - _canEvade = false; - events.ScheduleEvent(EVENT_CLEAVE, urand(8000, 10000)); - events.ScheduleEvent(EVENT_TAIL_LASH, 10000); - events.ScheduleEvent(EVENT_BREATH, urand(10000, 15000)); - } - - void Reset() override - { - _canEvade = false; - _Reset(); - } - - void JustReachedHome() override - { - instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); - _JustReachedHome(); - } - - void ExecuteEvent(uint32 eventId) override - { - switch (eventId) - { - case EVENT_CLEAVE: - DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, urand(8000, 10000)); - break; - case EVENT_TAIL_LASH: - DoCastAOE(SPELL_TAIL_LASH); - events.ScheduleEvent(EVENT_TAIL_LASH, 10000); - break; - case EVENT_BREATH: - DoCast(me, me->GetEntry() == NPC_HALION ? SPELL_FLAME_BREATH : SPELL_DARK_BREATH); - events.ScheduleEvent(EVENT_BREATH, urand(10000, 12000)); - break; - } - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_CASTING)) - return; - - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - ExecuteEvent(eventId); - - DoMeleeAttackIfReady(); - } - - void SetData(uint32 index, uint32 dataValue) override - { - switch (index) - { - case DATA_EVADE_METHOD: - _canEvade = (dataValue == 1); - break; - default: - break; - } - } - - void SpellHit(Unit* /*who*/, SpellInfo const* spellInfo) override - { - if (spellInfo->Id == SPELL_TWILIGHT_MENDING) - Talk(SAY_REGENERATE); - } - -protected: - bool _canEvade; -}; - class boss_halion : public CreatureScript { public: boss_halion() : CreatureScript("boss_halion") { } - struct boss_halionAI : public generic_halionAI + struct boss_halionAI : public BossAI { - boss_halionAI(Creature* creature) : generic_halionAI(creature, DATA_HALION) - { - me->SetHomePosition(HalionSpawnPos); - } - - void Reset() override - { - generic_halionAI::Reset(); - me->SetReactState(REACT_DEFENSIVE); - me->RemoveAurasDueToSpell(SPELL_TWILIGHT_PHASING); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } + boss_halionAI(Creature* creature) : BossAI(creature, DATA_HALION) { } void EnterEvadeMode(EvadeReason why) override { - if (why == EVADE_REASON_BOUNDARY) + if (why == EVADE_REASON_BOUNDARY || events.IsInPhase(PHASE_ONE)) if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HALION_CONTROLLER))) - controller->AI()->EnterEvadeMode(); - - // Phase 1: We always can evade. Phase 2 & 3: We can evade if and only if the controller tells us to. - if (events.IsInPhase(PHASE_ONE) || _canEvade) - generic_halionAI::EnterEvadeMode(why); + controller->AI()->EnterEvadeMode(why); } - void EnterCombat(Unit* who) override + void EnterCombat(Unit* /*who*/) override { Talk(SAY_AGGRO); events.Reset(); events.SetPhase(PHASE_ONE); - generic_halionAI::EnterCombat(who); + _EnterCombat(); + me->AddAura(SPELL_TWILIGHT_PRECISION, me); + events.ScheduleEvent(EVENT_ACTIVATE_FIREWALL, Seconds(5)); + events.ScheduleEvent(EVENT_BREATH, randtime(Seconds(5), Seconds(15))); + events.ScheduleEvent(EVENT_CLEAVE, randtime(Seconds(6), Seconds(10))); + events.ScheduleEvent(EVENT_TAIL_LASH, randtime(Seconds(7), Seconds(12))); + events.ScheduleEvent(EVENT_FIERY_COMBUSTION, randtime(Seconds(15), Seconds(18))); + events.ScheduleEvent(EVENT_METEOR_STRIKE, Seconds(18)); instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me, 1); - instance->SetBossState(DATA_HALION, IN_PROGRESS); - - events.ScheduleEvent(EVENT_ACTIVATE_FIREWALL, 5000); - events.ScheduleEvent(EVENT_METEOR_STRIKE, urand(20000, 25000)); - events.ScheduleEvent(EVENT_FIERY_COMBUSTION, urand(15000, 18000)); if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HALION_CONTROLLER))) controller->AI()->SetData(DATA_FIGHT_PHASE, PHASE_ONE); @@ -388,58 +298,76 @@ class boss_halion : public CreatureScript } } + void SpellHit(Unit* /*who*/, SpellInfo const* spellInfo) override + { + if (spellInfo->Id == SPELL_TWILIGHT_MENDING) + Talk(SAY_REGENERATE); + } + void UpdateAI(uint32 diff) override { if (events.IsInPhase(PHASE_TWO)) return; - generic_halionAI::UpdateAI(diff); - } + if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_CASTING)) + return; - void ExecuteEvent(uint32 eventId) override - { - switch (eventId) + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) { - case EVENT_ACTIVATE_FIREWALL: - // Flame ring is activated 5 seconds after starting encounter, DOOR_TYPE_ROOM is only instant. - for (uint8 i = DATA_FLAME_RING; i <= DATA_TWILIGHT_FLAME_RING; ++i) - if (GameObject* flameRing = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(i))) - instance->HandleGameObject(instance->GetGuidData(DATA_FLAME_RING), false, flameRing); - break; - case EVENT_METEOR_STRIKE: + switch (eventId) { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_TWILIGHT_REALM)) + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, randtime(Seconds(8), Seconds(10))); + break; + case EVENT_TAIL_LASH: + DoCastAOE(SPELL_TAIL_LASH); + events.ScheduleEvent(EVENT_TAIL_LASH, randtime(Seconds(11), Seconds(16))); + break; + case EVENT_BREATH: + DoCast(me, SPELL_FLAME_BREATH); + events.ScheduleEvent(EVENT_BREATH, randtime(Seconds(16), Seconds(25))); + break; + case EVENT_ACTIVATE_FIREWALL: + // Flame ring is activated 5 seconds after starting encounter, DOOR_TYPE_ROOM is only instant. + for (uint8 i = DATA_FLAME_RING; i <= DATA_TWILIGHT_FLAME_RING; ++i) + if (GameObject* flameRing = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(i))) + instance->HandleGameObject(instance->GetGuidData(DATA_FLAME_RING), false, flameRing); + break; + case EVENT_METEOR_STRIKE: { - _meteorStrikePos = target->GetPosition(); - me->CastSpell(_meteorStrikePos.GetPositionX(), _meteorStrikePos.GetPositionY(), _meteorStrikePos.GetPositionZ(), SPELL_METEOR_STRIKE, true, NULL, NULL, me->GetGUID()); - Talk(SAY_METEOR_STRIKE); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_TWILIGHT_REALM)) + { + _meteorStrikePos = target->GetPosition(); + me->CastSpell(_meteorStrikePos.GetPositionX(), _meteorStrikePos.GetPositionY(), _meteorStrikePos.GetPositionZ(), SPELL_METEOR_STRIKE, true, nullptr, nullptr, me->GetGUID()); + Talk(SAY_METEOR_STRIKE); + } + events.ScheduleEvent(EVENT_METEOR_STRIKE, Seconds(38)); + break; } - events.ScheduleEvent(EVENT_METEOR_STRIKE, 40000); - break; - } - case EVENT_FIERY_COMBUSTION: - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_TWILIGHT_REALM)) - DoCast(target, SPELL_FIERY_COMBUSTION); - events.ScheduleEvent(EVENT_FIERY_COMBUSTION, 25000); - break; + case EVENT_FIERY_COMBUSTION: + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_TWILIGHT_REALM)) + me->CastSpell(target, SPELL_FIERY_COMBUSTION, TRIGGERED_IGNORE_SET_FACING); + events.ScheduleEvent(EVENT_FIERY_COMBUSTION, Seconds(25)); + break; + } + default: + break; } - default: - generic_halionAI::ExecuteEvent(eventId); - break; } + + DoMeleeAttackIfReady(); } void SetData(uint32 index, uint32 value) override { - switch (index) - { - case DATA_FIGHT_PHASE: - events.SetPhase(value); - break; - default: - generic_halionAI::SetData(index, value); - } + if (index != DATA_FIGHT_PHASE) + return; + + events.SetPhase(value); } private: @@ -459,9 +387,9 @@ class boss_twilight_halion : public CreatureScript public: boss_twilight_halion() : CreatureScript("boss_twilight_halion") { } - struct boss_twilight_halionAI : public generic_halionAI + struct boss_twilight_halionAI : public BossAI { - boss_twilight_halionAI(Creature* creature) : generic_halionAI(creature, DATA_TWILIGHT_HALION) + boss_twilight_halionAI(Creature* creature) : BossAI(creature, DATA_TWILIGHT_HALION) { Creature* halion = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HALION)); if (!halion) @@ -470,26 +398,29 @@ class boss_twilight_halion : public CreatureScript // Using AddAura because no spell cast packet in sniffs. halion->AddAura(SPELL_COPY_DAMAGE, me); // We use explicit targeting here to avoid conditions + SPELL_ATTR6_CANT_TARGET_SELF. me->AddAura(SPELL_COPY_DAMAGE, halion); - me->AddAura(SPELL_DUSK_SHROUD, me); + DoCast(me, SPELL_DUSK_SHROUD, true); me->SetHealth(halion->GetHealth()); me->SetPhaseMask(0x20, true); - me->SetReactState(REACT_AGGRESSIVE); + me->SetReactState(REACT_DEFENSIVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + events.ScheduleEvent(EVENT_TAIL_LASH, Seconds(12)); + events.ScheduleEvent(EVENT_SOUL_CONSUMPTION, Seconds(15)); } - void EnterCombat(Unit* who) override + void EnterCombat(Unit* /*who*/) override { - events.Reset(); events.SetPhase(PHASE_TWO); - generic_halionAI::EnterCombat(who); - - events.ScheduleEvent(EVENT_SOUL_CONSUMPTION, 20000); + _EnterCombat(); + me->AddAura(SPELL_TWILIGHT_PRECISION, me); + events.ScheduleEvent(EVENT_CLEAVE, Seconds(3)); + events.ScheduleEvent(EVENT_BREATH, Seconds(12)); instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me, 2); } - // Never evade + void Reset() override { } void EnterEvadeMode(EvadeReason /*why*/) override { } void KilledUnit(Unit* victim) override @@ -522,6 +453,10 @@ class boss_twilight_halion : public CreatureScript void DamageTaken(Unit* attacker, uint32& damage) override { + //Needed because we already have UNIT_FLAG_IN_COMBAT, otherwise EnterCombat won't ever be called + if (!events.IsInPhase(PHASE_TWO) && !events.IsInPhase(PHASE_THREE)) + EnterCombat(attacker); + if (me->HealthBelowPctDamaged(50, damage) && events.IsInPhase(PHASE_TWO)) { events.SetPhase(PHASE_THREE); @@ -542,7 +477,7 @@ class boss_twilight_halion : public CreatureScript } } - void SpellHit(Unit* who, SpellInfo const* spell) override + void SpellHit(Unit* /*who*/, SpellInfo const* spell) override { switch (spell->Id) { @@ -550,25 +485,51 @@ class boss_twilight_halion : public CreatureScript if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HALION_CONTROLLER))) controller->AI()->DoAction(ACTION_MONITOR_CORPOREALITY); break; + case SPELL_TWILIGHT_MENDING: + Talk(SAY_REGENERATE); + break; default: - generic_halionAI::SpellHit(who, spell); break; } } - void ExecuteEvent(uint32 eventId) override + void UpdateAI(uint32 diff) override { - switch (eventId) + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + if (!UpdateVictim()) + return; + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) { - case EVENT_SOUL_CONSUMPTION: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, SPELL_TWILIGHT_REALM)) - DoCast(target, SPELL_SOUL_CONSUMPTION); - events.ScheduleEvent(EVENT_SOUL_CONSUMPTION, 20000); - break; - default: - generic_halionAI::ExecuteEvent(eventId); - break; + switch (eventId) + { + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, randtime(Seconds(7), Seconds(10))); + break; + case EVENT_TAIL_LASH: + DoCastAOE(SPELL_TAIL_LASH); + events.ScheduleEvent(EVENT_TAIL_LASH, randtime(Seconds(12), Seconds(16))); + break; + case EVENT_BREATH: + DoCast(me, SPELL_DARK_BREATH); + events.ScheduleEvent(EVENT_BREATH, randtime(Seconds(10), Seconds(14))); + break; + case EVENT_SOUL_CONSUMPTION: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, SPELL_TWILIGHT_REALM)) + me->CastSpell(target, SPELL_SOUL_CONSUMPTION, TRIGGERED_IGNORE_SET_FACING); + events.ScheduleEvent(EVENT_SOUL_CONSUMPTION, Seconds(20)); + break; + default: + break; + } } + + DoMeleeAttackIfReady(); } }; @@ -589,7 +550,6 @@ class npc_halion_controller : public CreatureScript _instance(creature->GetInstanceScript()), _summons(me) { Initialize(); - me->SetPhaseMask(me->GetPhaseMask() | 0x20, true); } void Initialize() @@ -599,6 +559,15 @@ class npc_halion_controller : public CreatureScript _twilightDamageTaken = 0; } + void JustRespawned() override + { + if (_instance->GetGuidData(DATA_HALION)) + return; + + Reset(); + me->GetMap()->SummonCreature(NPC_HALION, HalionRespawnPos); + } + void Reset() override { _summons.DespawnAll(); @@ -626,21 +595,36 @@ class npc_halion_controller : public CreatureScript _twilightDamageTaken = 0; _materialDamageTaken = 0; - _events.ScheduleEvent(EVENT_TRIGGER_BERSERK, 8 * MINUTE * IN_MILLISECONDS); + _events.ScheduleEvent(EVENT_TRIGGER_BERSERK, Minutes(8)); } - void JustReachedHome() override + void EnterEvadeMode(EvadeReason /*why*/) override { if (Creature* twilightHalion = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_TWILIGHT_HALION))) + { twilightHalion->DespawnOrUnsummon(); + _instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, twilightHalion); + } if (Creature* halion = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_HALION))) { - halion->AI()->SetData(DATA_EVADE_METHOD, 1); - halion->AI()->EnterEvadeMode(); + halion->DespawnOrUnsummon(); + _instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, halion); } _instance->SetBossState(DATA_HALION, FAIL); + _summons.DespawnAll(); + + uint32 corpseDelay = me->GetCorpseDelay(); + uint32 respawnDelay = me->GetRespawnDelay(); + + me->SetCorpseDelay(1); + me->SetRespawnDelay(30); + + me->DespawnOrUnsummon(); + + me->SetCorpseDelay(corpseDelay); + me->SetRespawnDelay(respawnDelay); } void DoAction(int32 action) override @@ -650,7 +634,16 @@ class npc_halion_controller : public CreatureScript case ACTION_INTRO_HALION: _events.Reset(); _events.SetPhase(PHASE_INTRO); - _events.ScheduleEvent(EVENT_START_INTRO, 2000); + _events.ScheduleEvent(EVENT_START_INTRO, Seconds(2)); + break; + case ACTION_INTRO_HALION_2: + if (_instance->GetGuidData(DATA_HALION)) + return; + + for (uint8 i = DATA_BURNING_TREE_1; i <= DATA_BURNING_TREE_4; ++i) + if (GameObject* tree = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(i))) + _instance->HandleGameObject(_instance->GetGuidData(i), true, tree); + me->GetMap()->SummonCreature(NPC_HALION, HalionRespawnPos); break; case ACTION_MONITOR_CORPOREALITY: { @@ -678,8 +671,12 @@ class npc_halion_controller : public CreatureScript _instance->DoUpdateWorldState(WORLDSTATE_CORPOREALITY_MATERIAL, 50); _instance->DoUpdateWorldState(WORLDSTATE_CORPOREALITY_TWILIGHT, 50); - _events.ScheduleEvent(EVENT_CHECK_CORPOREALITY, 7500); + _events.ScheduleEvent(EVENT_CHECK_CORPOREALITY, Seconds(7)); + break; } + case ACTION_ACTIVATE_EMBERS: + _events.ScheduleEvent(EVENT_ACTIVATE_EMBERS, Seconds(6)); + break; default: break; } @@ -692,7 +689,7 @@ class npc_halion_controller : public CreatureScript // combat state. if (!_events.IsInPhase(PHASE_INTRO) && me->IsInCombat() && !UpdateVictim()) { - EnterEvadeMode(); + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); return; } @@ -704,29 +701,31 @@ class npc_halion_controller : public CreatureScript { case EVENT_START_INTRO: DoCast(me, SPELL_COSMETIC_FIRE_PILLAR, true); - _events.ScheduleEvent(EVENT_INTRO_PROGRESS_1, 4000); + _events.ScheduleEvent(EVENT_INTRO_PROGRESS_1, Seconds(4)); break; case EVENT_INTRO_PROGRESS_1: for (uint8 i = DATA_BURNING_TREE_3; i <= DATA_BURNING_TREE_4; ++i) if (GameObject* tree = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(i))) _instance->HandleGameObject(_instance->GetGuidData(i), true, tree); - _events.ScheduleEvent(EVENT_INTRO_PROGRESS_2, 4000); + _events.ScheduleEvent(EVENT_INTRO_PROGRESS_2, Seconds(4)); break; case EVENT_INTRO_PROGRESS_2: for (uint8 i = DATA_BURNING_TREE_1; i <= DATA_BURNING_TREE_2; ++i) if (GameObject* tree = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(i))) _instance->HandleGameObject(_instance->GetGuidData(i), true, tree); - _events.ScheduleEvent(EVENT_INTRO_PROGRESS_3, 4000); + _events.ScheduleEvent(EVENT_INTRO_PROGRESS_3, Seconds(4)); break; case EVENT_INTRO_PROGRESS_3: DoCast(me, SPELL_FIERY_EXPLOSION); + if (_instance->GetGuidData(DATA_HALION)) + return; if (Creature* halion = me->GetMap()->SummonCreature(NPC_HALION, HalionSpawnPos)) halion->AI()->Talk(SAY_INTRO); break; case EVENT_TWILIGHT_MENDING: if (ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_HALION))) // Just check if physical Halion is spawned if (Creature* twilightHalion = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_TWILIGHT_HALION))) - twilightHalion->CastSpell((Unit*)NULL, SPELL_TWILIGHT_MENDING, true); + twilightHalion->CastSpell((Unit*)nullptr, SPELL_TWILIGHT_MENDING, true); break; case EVENT_TRIGGER_BERSERK: for (uint8 i = DATA_HALION; i <= DATA_TWILIGHT_HALION; i++) @@ -734,17 +733,16 @@ class npc_halion_controller : public CreatureScript halion->CastSpell(halion, SPELL_BERSERK, true); break; case EVENT_SHADOW_PULSARS_SHOOT: - if (Creature* twilightHalion = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_TWILIGHT_HALION))) - twilightHalion->AI()->Talk(SAY_SPHERE_PULSE); - if (Creature* orbCarrier = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_ORB_CARRIER))) - orbCarrier->AI()->DoAction(ACTION_SHOOT); - - _events.ScheduleEvent(EVENT_SHADOW_PULSARS_SHOOT, 29000); + orbCarrier->AI()->DoAction(ACTION_WARNING_SHOOT); + _events.ScheduleEvent(EVENT_SHADOW_PULSARS_SHOOT, Seconds(30)); break; case EVENT_CHECK_CORPOREALITY: UpdateCorporeality(); - _events.ScheduleEvent(EVENT_CHECK_CORPOREALITY, 5000); + _events.ScheduleEvent(EVENT_CHECK_CORPOREALITY, Seconds(5)); + break; + case EVENT_ACTIVATE_EMBERS: + _summons.DoZoneInCombat(NPC_LIVING_EMBER); break; default: break; @@ -770,7 +768,7 @@ class npc_halion_controller : public CreatureScript DoZoneInCombat(); break; case PHASE_TWO: - _events.ScheduleEvent(EVENT_SHADOW_PULSARS_SHOOT, 29000); + _events.ScheduleEvent(EVENT_SHADOW_PULSARS_SHOOT, Seconds(35)); break; default: break; @@ -793,7 +791,7 @@ class npc_halion_controller : public CreatureScript uint8 oldValue = _materialCorporealityValue; if (_twilightDamageTaken == 0 || _materialDamageTaken == 0) { - _events.ScheduleEvent(EVENT_TWILIGHT_MENDING, 100); + _events.ScheduleEvent(EVENT_TWILIGHT_MENDING, Milliseconds(100)); _twilightDamageTaken = 0; _materialDamageTaken = 0; return; @@ -833,7 +831,7 @@ class npc_halion_controller : public CreatureScript } case CORPOREALITY_TWILIGHT_MENDING: { - _events.ScheduleEvent(EVENT_TWILIGHT_MENDING, 100); + _events.ScheduleEvent(EVENT_TWILIGHT_MENDING, Milliseconds(100)); _materialDamageTaken = 0; _twilightDamageTaken = 0; return; @@ -889,52 +887,73 @@ class npc_orb_carrier : public CreatureScript struct npc_orb_carrierAI : public ScriptedAI { npc_orb_carrierAI(Creature* creature) : ScriptedAI(creature), - instance(creature->GetInstanceScript()) + _instance(creature->GetInstanceScript()) { ASSERT(creature->GetVehicleKit()); } - void UpdateAI(uint32 /*diff*/) override + void UpdateAI(uint32 diff) override { /// According to sniffs this spell is cast every 1 or 2 seconds. /// However, refreshing it looks bad, so just cast the spell if /// we are not channeling it. if (!me->HasUnitState(UNIT_STATE_CASTING)) - me->CastSpell((Unit*)NULL, SPELL_TRACK_ROTATION, false); + me->CastSpell((Unit*)nullptr, SPELL_TRACK_ROTATION, false); + + scheduler.Update(diff); /// Workaround: This is here because even though the above spell has SPELL_ATTR1_CHANNEL_TRACK_TARGET, /// we are having two creatures involded here. This attribute is handled clientside, meaning the client /// sends orientation update itself. Here, no packet is sent, and the creature does not rotate. By /// forcing the carrier to always be facing the rotation focus, we ensure everything works as it should. - if (Creature* rotationFocus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_ORB_ROTATION_FOCUS))) + if (Creature* rotationFocus = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_ORB_ROTATION_FOCUS))) me->SetFacingToObject(rotationFocus); // setInFront } void DoAction(int32 action) override { - if (action == ACTION_SHOOT) + switch (action) { - Vehicle* vehicle = me->GetVehicleKit(); - Unit* southOrb = vehicle->GetPassenger(SEAT_SOUTH); - Unit* northOrb = vehicle->GetPassenger(SEAT_NORTH); - if (southOrb && northOrb) + case ACTION_WARNING_SHOOT: { - if (northOrb->GetTypeId() == TYPEID_UNIT) + Vehicle* vehicle = me->GetVehicleKit(); + Unit* northOrb = vehicle->GetPassenger(SEAT_NORTH); + if (northOrb && northOrb->GetTypeId() == TYPEID_UNIT) northOrb->ToCreature()->AI()->Talk(EMOTE_WARN_LASER); - TriggerCutter(northOrb, southOrb); + + scheduler.Schedule(Seconds(5), [this](TaskContext /*context*/) + { + DoAction(ACTION_SHOOT); + }); + break; } + case ACTION_SHOOT: + { + Vehicle* vehicle = me->GetVehicleKit(); + Unit* southOrb = vehicle->GetPassenger(SEAT_SOUTH); + Unit* northOrb = vehicle->GetPassenger(SEAT_NORTH); + if (southOrb && northOrb) + TriggerCutter(northOrb, southOrb); - if (!IsHeroic()) - return; + if (Creature* twilightHalion = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_TWILIGHT_HALION))) + twilightHalion->AI()->Talk(SAY_SPHERE_PULSE); + + if (!IsHeroic()) + return; - Unit* eastOrb = vehicle->GetPassenger(SEAT_EAST); - Unit* westOrb = vehicle->GetPassenger(SEAT_WEST); - if (eastOrb && westOrb) - TriggerCutter(eastOrb, westOrb); + Unit* eastOrb = vehicle->GetPassenger(SEAT_EAST); + Unit* westOrb = vehicle->GetPassenger(SEAT_WEST); + if (eastOrb && westOrb) + TriggerCutter(eastOrb, westOrb); + break; + } + default: + break; } } private: - InstanceScript* instance; + InstanceScript* _instance; + TaskScheduler scheduler; void TriggerCutter(Unit* caster, Unit* target) { @@ -987,12 +1006,12 @@ class npc_meteor_strike_initial : public CreatureScript controller->AI()->JustSummoned(me); DoCast(me, SPELL_METEOR_STRIKE_COUNTDOWN); - DoCast(me, SPELL_BIRTH_NO_VISUAL); // Unknown purpose + DoCast(me, SPELL_BIRTH_NO_VISUAL); if (HalionAI* halionAI = CAST_AI(HalionAI, owner->AI())) { Position const* ownerPos = halionAI->GetMeteorStrikePosition(); - float randomAdjustment = frand(0.0f, static_cast<float>(M_PI / 5.0f)); + float randomAdjustment = frand(static_cast<float>(M_PI / 5.0f), static_cast<float>(M_PI / 2.0f)); float angle[4]; angle[0] = me->GetAngle(ownerPos); angle[1] = angle[0] + randomAdjustment; @@ -1006,10 +1025,7 @@ class npc_meteor_strike_initial : public CreatureScript me->SetOrientation(angle[i]); Position newPos = me->GetNearPosition(10.0f, 0.0f); // Exact distance if (Creature* meteor = me->SummonCreature(NPC_METEOR_STRIKE_NORTH + i, newPos, TEMPSUMMON_TIMED_DESPAWN, 30000)) - { - meteor->SetOrientation(angle[i]); _meteorList.push_back(meteor); - } } } } @@ -1046,7 +1062,7 @@ class npc_meteor_strike : public CreatureScript { DoCast(me, SPELL_METEOR_STRIKE_FIRE_AURA_2, true); me->setActive(true); - _events.ScheduleEvent(EVENT_SPAWN_METEOR_FLAME, 500); + _events.ScheduleEvent(EVENT_SPAWN_METEOR_FLAME, Milliseconds(500)); } } @@ -1110,7 +1126,7 @@ class npc_meteor_strike_flame : public CreatureScript void SetGUID(ObjectGuid guid, int32 /*id = 0 */) override { _rootOwnerGuid = guid; - _events.ScheduleEvent(EVENT_SPAWN_METEOR_FLAME, 800); + _events.ScheduleEvent(EVENT_SPAWN_METEOR_FLAME, Milliseconds(800)); } void IsSummonedBy(Unit* /*summoner*/) override @@ -1202,7 +1218,7 @@ class npc_combustion_consumption : public CreatureScript if (type != DATA_STACKS_DISPELLED || !_damageSpell || !_explosionSpell || !summoner) return; - me->CastCustomSpell(SPELL_SCALE_AURA, SPELLVALUE_AURA_STACK, stackAmount, me); + me->CastCustomSpell(SPELL_SCALE_AURA, SPELLVALUE_AURA_STACK, stackAmount + 1, me); DoCast(me, _damageSpell); int32 damage = 1200 + (stackAmount * 1290); // Needs more research. @@ -1240,17 +1256,32 @@ class npc_living_inferno : public CreatureScript // SMSG_SPELL_GO for the living ember stuff isn't even sent to the client - Blizzard on drugs. if (me->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC) - me->CastSpell(me, SPELL_SPAWN_LIVING_EMBERS, true); + scheduler.Schedule(Seconds(3), [this](TaskContext /*context*/) + { + me->CastSpell(me, SPELL_SPAWN_LIVING_EMBERS, true); + }); if (InstanceScript* instance = me->GetInstanceScript()) if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_HALION_CONTROLLER))) + { + controller->AI()->DoAction(ACTION_ACTIVATE_EMBERS); controller->AI()->JustSummoned(me); + } } void JustDied(Unit* /*killer*/) override { me->DespawnOrUnsummon(1); } + + void UpdateAI(uint32 diff) override + { + scheduler.Update(diff); + ScriptedAI::UpdateAI(diff); + } + + private: + TaskScheduler scheduler; }; CreatureAI* GetAI(Creature* creature) const override @@ -1266,27 +1297,7 @@ class npc_living_ember : public CreatureScript struct npc_living_emberAI : public ScriptedAI { - npc_living_emberAI(Creature* creature) : ScriptedAI(creature) - { - Initialize(); - _enrageTimer = 0; - } - - void Initialize() - { - _hasEnraged = false; - } - - void Reset() override - { - Initialize(); - } - - void EnterCombat(Unit* /*who*/) override - { - _enrageTimer = 20000; - _hasEnraged = false; - } + npc_living_emberAI(Creature* creature) : ScriptedAI(creature) { } void IsSummonedBy(Unit* /*summoner*/) override { @@ -1299,25 +1310,6 @@ class npc_living_ember : public CreatureScript { me->DespawnOrUnsummon(1); } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_CASTING)) - return; - - if (!_hasEnraged && _enrageTimer <= diff) - { - _hasEnraged = true; - DoCast(me, SPELL_BERSERK); - } - else _enrageTimer -= diff; - - DoMeleeAttackIfReady(); - } - - private: - uint32 _enrageTimer; - bool _hasEnraged; }; CreatureAI* GetAI(Creature* creature) const override @@ -1473,6 +1465,47 @@ class spell_halion_combustion_consumption : public SpellScriptLoader uint32 _spellID; }; +class spell_halion_combustion_consumption_periodic : public SpellScriptLoader +{ + public: + spell_halion_combustion_consumption_periodic() : SpellScriptLoader("spell_halion_combustion_consumption_periodic") { } + + class spell_halion_combustion_consumption_periodic_AuraScript : public AuraScript + { + PrepareAuraScript(spell_halion_combustion_consumption_periodic_AuraScript); + + bool Validate(SpellInfo const* spellInfo) override + { + if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].TriggerSpell)) + return false; + return true; + } + + void HandleTick(AuraEffect const* aurEff) + { + PreventDefaultAction(); + Unit* caster = GetCaster(); + if (!caster) + return; + + uint32 triggerSpell = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell; + int32 radius = caster->GetObjectScale() * M_PI * 10000 / 3; + + caster->CastCustomSpell(triggerSpell, SPELLVALUE_RADIUS_MOD, radius, (Unit*)nullptr, TRIGGERED_FULL_MASK, nullptr, aurEff, caster->GetGUID()); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_halion_combustion_consumption_periodic_AuraScript::HandleTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_halion_combustion_consumption_periodic_AuraScript(); + } +}; + class spell_halion_marks : public SpellScriptLoader { public: @@ -1511,7 +1544,7 @@ class spell_halion_marks : public SpellScriptLoader return; // Stacks marker - GetTarget()->CastCustomSpell(_summonSpellId, SPELLVALUE_BASE_POINT1, aurEff->GetBase()->GetStackAmount(), GetTarget(), TRIGGERED_FULL_MASK, NULL, NULL, GetCasterGUID()); + GetTarget()->CastCustomSpell(_summonSpellId, SPELLVALUE_BASE_POINT1, aurEff->GetBase()->GetStackAmount(), GetTarget(), TRIGGERED_FULL_MASK, nullptr, nullptr, GetCasterGUID()); } void Register() override @@ -1819,6 +1852,35 @@ class spell_halion_spawn_living_embers : public SpellScriptLoader } }; +class spell_halion_blazing_aura : public SpellScriptLoader +{ + public: + spell_halion_blazing_aura() : SpellScriptLoader("spell_halion_blazing_aura") { } + + class spell_halion_blazing_aura_SpellScript : public SpellScript + { + PrepareSpellScript(spell_halion_blazing_aura_SpellScript); + + void HandleScript(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); + GetHitUnit()->CastSpell(GetHitUnit(), GetSpellInfo()->Effects[EFFECT_1].TriggerSpell); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_halion_blazing_aura_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_FORCE_CAST); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_halion_blazing_aura_SpellScript(); + } +}; + + + void AddSC_boss_halion() { new boss_halion(); @@ -1840,6 +1902,7 @@ void AddSC_boss_halion() new spell_halion_combustion_consumption("spell_halion_fiery_combustion", SPELL_MARK_OF_COMBUSTION); new spell_halion_marks("spell_halion_mark_of_combustion", SPELL_FIERY_COMBUSTION_SUMMON, SPELL_FIERY_COMBUSTION); new spell_halion_marks("spell_halion_mark_of_consumption", SPELL_SOUL_CONSUMPTION_SUMMON, SPELL_SOUL_CONSUMPTION); + new spell_halion_combustion_consumption_periodic(); new spell_halion_damage_aoe_summon(); new spell_halion_twilight_realm_handlers("spell_halion_leave_twilight_realm", SPELL_SOUL_CONSUMPTION, false); new spell_halion_twilight_realm_handlers("spell_halion_enter_twilight_realm", SPELL_FIERY_COMBUSTION, true); @@ -1848,4 +1911,5 @@ void AddSC_boss_halion() new spell_halion_twilight_cutter(); new spell_halion_clear_debuffs(); new spell_halion_spawn_living_embers(); + new spell_halion_blazing_aura(); } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp index 739c3602f44..be85d3dc99c 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp @@ -53,11 +53,11 @@ class instance_ruby_sanctum : public InstanceMapScript void OnPlayerEnter(Player* /*player*/) override { - if (!GetGuidData(DATA_HALION_CONTROLLER) && GetBossState(DATA_HALION) != DONE && GetBossState(DATA_GENERAL_ZARITHRIAN) == DONE) + if (!GetGuidData(DATA_HALION) && GetBossState(DATA_HALION) != DONE && GetBossState(DATA_GENERAL_ZARITHRIAN) == DONE) { instance->LoadGrid(HalionControllerSpawnPos.GetPositionX(), HalionControllerSpawnPos.GetPositionY()); - if (Creature* halionController = instance->SummonCreature(NPC_HALION_CONTROLLER, HalionControllerSpawnPos)) - halionController->AI()->DoAction(ACTION_INTRO_HALION); + if (Creature* halionController = instance->GetCreature(GetGuidData(DATA_HALION_CONTROLLER))) + halionController->AI()->DoAction(ACTION_INTRO_HALION_2); } } @@ -161,6 +161,12 @@ class instance_ruby_sanctum : public InstanceMapScript } } + void OnCreatureRemove(Creature* creature) override + { + if (creature->GetEntry() == NPC_HALION) + HalionGUID = ObjectGuid::Empty; + } + void OnUnitDeath(Unit* unit) override { Creature* creature = unit->ToCreature(); @@ -170,7 +176,7 @@ class instance_ruby_sanctum : public InstanceMapScript if (creature->GetEntry() == NPC_GENERAL_ZARITHRIAN && GetBossState(DATA_HALION) != DONE) { instance->LoadGrid(HalionControllerSpawnPos.GetPositionX(), HalionControllerSpawnPos.GetPositionY()); - if (Creature* halionController = instance->SummonCreature(NPC_HALION_CONTROLLER, HalionControllerSpawnPos)) + if (Creature* halionController = instance->GetCreature(GetGuidData(DATA_HALION_CONTROLLER))) halionController->AI()->DoAction(ACTION_INTRO_HALION); } } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h index 69c27a22ea0..333fef1dc85 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.h @@ -56,6 +56,7 @@ enum SharedActions ACTION_INTRO_BALTHARUS = -3975101, ACTION_BALTHARUS_DEATH = -3975102, ACTION_INTRO_HALION = -4014601, + ACTION_INTRO_HALION_2 = -4014602, }; enum CreaturesIds diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp index 00900d440c9..f6726d60db3 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/instance_trial_of_the_champion.cpp @@ -180,7 +180,7 @@ public: { pAnnouncer->GetMotionMaster()->MovePoint(0, 748.309f, 619.487f, 411.171f); pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000); + pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, G3D::Quat(), 90000); } } } @@ -203,7 +203,7 @@ public: { pAnnouncer->GetMotionMaster()->MovePoint(0, 748.309f, 619.487f, 411.171f); pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_EADRIC_LOOT_H : GO_EADRIC_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000); + pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_EADRIC_LOOT_H : GO_EADRIC_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, G3D::Quat(), 90000); } break; case BOSS_ARGENT_CHALLENGE_P: @@ -212,7 +212,7 @@ public: { pAnnouncer->GetMotionMaster()->MovePoint(0, 748.309f, 619.487f, 411.171f); pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_PALETRESS_LOOT_H : GO_PALETRESS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000); + pAnnouncer->SummonGameObject(instance->IsHeroic()? GO_PALETRESS_LOOT_H : GO_PALETRESS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, G3D::Quat(), 90000); } break; } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp index 7440984d7c5..dfe0cacdef7 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp @@ -222,10 +222,10 @@ class boss_anubarak_trial : public CreatureScript instance->SetBossState(BOSS_ANUBARAK, FAIL); //Summon Scarab Swarms neutral at random places for (int i = 0; i < 10; i++) - if (Creature* temp = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ())) + if (Creature* scarab = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ())) { - temp->setFaction(31); - temp->GetMotionMaster()->MoveRandom(10); + scarab->setFaction(31); + scarab->GetMotionMaster()->MoveRandom(10); } } @@ -881,9 +881,9 @@ class spell_anubarak_leeching_swarm : public SpellScriptLoader if (lifeLeeched < 250) lifeLeeched = 250; // Damage - caster->CastCustomSpell(target, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false); + caster->CastCustomSpell(target, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, true); // Heal - caster->CastCustomSpell(caster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, false); + caster->CastCustomSpell(caster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, true); } } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp index 6c1b516c7de..ee44e1391b4 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp @@ -453,22 +453,22 @@ class boss_toc_champion_controller : public CreatureScript for (uint8 i = 0; i < vChampionEntries.size(); ++i) { uint8 pos = urand(0, vChampionJumpTarget.size()-1); - if (Creature* temp = me->SummonCreature(vChampionEntries[i], vChampionJumpOrigin[urand(0, vChampionJumpOrigin.size()-1)], TEMPSUMMON_MANUAL_DESPAWN)) + if (Creature* champion = me->SummonCreature(vChampionEntries[i], vChampionJumpOrigin[urand(0, vChampionJumpOrigin.size()-1)], TEMPSUMMON_MANUAL_DESPAWN)) { - _summons.Summon(temp); - temp->SetReactState(REACT_PASSIVE); - temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); + _summons.Summon(champion); + champion->SetReactState(REACT_PASSIVE); + champion->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); if (playerTeam == ALLIANCE) { - temp->SetHomePosition(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 0); - temp->GetMotionMaster()->MoveJump(vChampionJumpTarget[pos], 20.0f, 20.0f); - temp->SetOrientation(0); + champion->SetHomePosition(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 0); + champion->GetMotionMaster()->MoveJump(vChampionJumpTarget[pos], 20.0f, 20.0f); + champion->SetOrientation(0); } else { - temp->SetHomePosition((ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 3); - temp->GetMotionMaster()->MoveJump((ToCCommonLoc[1].GetPositionX() * 2) - vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), vChampionJumpTarget[pos].GetOrientation(), 20.0f, 20.0f); - temp->SetOrientation(3); + champion->SetHomePosition((ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 3); + champion->GetMotionMaster()->MoveJump((ToCCommonLoc[1].GetPositionX() * 2) - vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), vChampionJumpTarget[pos].GetOrientation(), 20.0f, 20.0f); + champion->SetOrientation(3); } } vChampionJumpTarget.erase(vChampionJumpTarget.begin()+pos); @@ -485,10 +485,10 @@ class boss_toc_champion_controller : public CreatureScript case 1: for (SummonList::iterator i = _summons.begin(); i != _summons.end(); ++i) { - if (Creature* temp = ObjectAccessor::GetCreature(*me, *i)) + if (Creature* summon = ObjectAccessor::GetCreature(*me, *i)) { - temp->SetReactState(REACT_AGGRESSIVE); - temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); + summon->SetReactState(REACT_AGGRESSIVE); + summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); } } break; @@ -640,12 +640,12 @@ struct boss_faction_championsAI : public BossAI if (TeamInInstance == ALLIANCE) { - if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_VARIAN))) - temp->AI()->Talk(SAY_KILL_PLAYER); + if (Creature* varian = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_VARIAN))) + varian->AI()->Talk(SAY_KILL_PLAYER); } else - if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_GARROSH))) - temp->AI()->Talk(SAY_KILL_PLAYER); + if (Creature* garrosh = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_GARROSH))) + garrosh->AI()->Talk(SAY_KILL_PLAYER); } } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp index 2fba0c2af42..93823987d78 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp @@ -67,10 +67,12 @@ enum BossSpells SPELL_SHIVAN_SLASH = 67098, SPELL_SPINNING_STRIKE = 66283, SPELL_MISTRESS_KISS = 66336, - SPELL_FEL_INFERNO = 67047, - SPELL_FEL_STREAK = 66494, SPELL_LORD_HITTIN = 66326, // special effect preventing more specific spells be cast on the same player within 10 seconds - SPELL_MISTRESS_KISS_DAMAGE_SILENCE = 66359 + SPELL_MISTRESS_KISS_DAMAGE_SILENCE = 66359, + + // Felflame Infernal + SPELL_FEL_STREAK_VISUAL = 66493, + SPELL_FEL_STREAK = 66494, }; enum Events @@ -116,7 +118,7 @@ class boss_jaraxxus : public CreatureScript _JustReachedHome(); instance->SetBossState(BOSS_JARAXXUS, FAIL); DoCast(me, SPELL_JARAXXUS_CHAINS); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); } void KilledUnit(Unit* who) override @@ -305,18 +307,17 @@ class npc_fel_infernal : public CreatureScript { npc_fel_infernalAI(Creature* creature) : ScriptedAI(creature) { - Initialize(); _instance = creature->GetInstanceScript(); } - void Initialize() - { - _felStreakTimer = 30 * IN_MILLISECONDS; - } - void Reset() override { - Initialize(); + _scheduler.Schedule(Seconds(2), [this](TaskContext context) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true)) + DoCast(target, SPELL_FEL_STREAK_VISUAL); + context.Repeat(Seconds(15)); + }); me->SetInCombatWithZone(); } @@ -328,23 +329,20 @@ class npc_fel_infernal : public CreatureScript return; } + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + if (!UpdateVictim()) return; - if (_felStreakTimer <= diff) + _scheduler.Update(diff, [this] { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true)) - DoCast(target, SPELL_FEL_STREAK); - _felStreakTimer = 30*IN_MILLISECONDS; - } - else - _felStreakTimer -= diff; - - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); + }); } private: - uint32 _felStreakTimer; InstanceScript* _instance; + TaskScheduler _scheduler; }; CreatureAI* GetAI(Creature* creature) const override @@ -579,6 +577,39 @@ class spell_mistress_kiss_area : public SpellScriptLoader } }; +class spell_fel_streak_visual : public SpellScriptLoader +{ +public: + spell_fel_streak_visual() : SpellScriptLoader("spell_fel_streak_visual") { } + + class spell_fel_streak_visual_SpellScript : public SpellScript + { + PrepareSpellScript(spell_fel_streak_visual_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_FEL_STREAK)) + return false; + return true; + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_fel_streak_visual_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_fel_streak_visual_SpellScript(); + } +}; + void AddSC_boss_jaraxxus() { new boss_jaraxxus(); @@ -590,4 +621,5 @@ void AddSC_boss_jaraxxus() new spell_mistress_kiss(); new spell_mistress_kiss_area(); + new spell_fel_streak_visual(); } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index e3720503d0a..b2283ec6fde 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -25,6 +25,7 @@ #include "Vehicle.h" #include "Player.h" #include "SpellScript.h" +#include "SpellAuraEffects.h" enum Yells { @@ -33,6 +34,7 @@ enum Yells // Acidmaw & Dreadscale EMOTE_ENRAGE = 0, + SAY_SPECIAL = 1, // Icehowl EMOTE_TRAMPLE_START = 0, @@ -78,22 +80,29 @@ enum BossSpells SPELL_FIRE_BOMB_DOT = 66318, SPELL_HEAD_CRACK = 66407, - //Acidmaw & Dreadscale + //Acidmaw & Dreadscale Generic + SPELL_SWEEP = 66794, + SUMMON_SLIME_POOL = 66883, + SPELL_EMERGE = 66947, + SPELL_SUBMERGE = 66948, + SPELL_ENRAGE = 68335, + SPELL_SLIME_POOL_EFFECT = 66882, //In 60s it diameter grows from 10y to 40y (r=r+0.25 per second) + SPELL_GROUND_VISUAL_0 = 66969, + SPELL_GROUND_VISUAL_1 = 68302, + SPELL_HATE_TO_ZERO = 63984, + //Acidmaw SPELL_ACID_SPIT = 66880, SPELL_PARALYTIC_SPRAY = 66901, - SPELL_ACID_SPEW = 66819, - SPELL_PARALYTIC_BITE = 66824, - SPELL_SWEEP_0 = 66794, - SUMMON_SLIME_POOL = 66883, - SPELL_FIRE_SPIT = 66796, + SPELL_PARALYTIC_BITE = 66824, //Paralytic Toxin + SPELL_ACID_SPEW = 66818, + SPELL_PARALYSIS = 66830, + SPELL_PARALYTIC_TOXIN = 66823, + //Dreadscale + SPELL_BURNING_BITE = 66879, // Burning Bile SPELL_MOLTEN_SPEW = 66821, - SPELL_BURNING_BITE = 66879, + SPELL_FIRE_SPIT = 66796, SPELL_BURNING_SPRAY = 66902, - SPELL_SWEEP_1 = 67646, - SPELL_EMERGE_0 = 66947, - SPELL_SUBMERGE_0 = 66948, - SPELL_ENRAGE = 68335, - SPELL_SLIME_POOL_EFFECT = 66882, //In 60s it diameter grows from 10y to 40y (r=r+0.25 per second) + SPELL_BURNING_BILE = 66869, //Icehowl SPELL_FEROCIOUS_BUTT = 66770, @@ -182,7 +191,7 @@ class boss_gormok : public CreatureScript { case 0: instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR)); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_AGGRESSIVE); me->SetInCombatWithZone(); break; @@ -549,7 +558,7 @@ struct boss_jormungarAI : public BossAI if (!Enraged && instance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL) { - me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0); + me->RemoveAurasDueToSpell(SPELL_SUBMERGE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); DoCast(SPELL_ENRAGE); Enraged = true; @@ -586,10 +595,11 @@ struct boss_jormungarAI : public BossAI case EVENT_SUMMON_ACIDMAW: if (Creature* acidmaw = me->SummonCreature(NPC_ACIDMAW, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN)) { - acidmaw->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + acidmaw->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); acidmaw->SetReactState(REACT_AGGRESSIVE); acidmaw->SetInCombatWithZone(); - acidmaw->CastSpell(acidmaw, SPELL_EMERGE_0); + acidmaw->CastSpell(acidmaw, SPELL_EMERGE); + acidmaw->CastSpell(acidmaw, SPELL_GROUND_VISUAL_1, true); } return; case EVENT_SPRAY: @@ -598,7 +608,7 @@ struct boss_jormungarAI : public BossAI events.ScheduleEvent(EVENT_SPRAY, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY); return; case EVENT_SWEEP: - DoCastAOE(SPELL_SWEEP_0); + DoCastAOE(SPELL_SWEEP); events.ScheduleEvent(EVENT_SWEEP, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY); return; default: @@ -608,13 +618,14 @@ struct boss_jormungarAI : public BossAI if (events.IsInPhase(PHASE_MOBILE)) DoMeleeAttackIfReady(); if (events.IsInPhase(PHASE_STATIONARY)) - DoSpellAttackIfReady(SpitSpell); + DoCastVictim(SpitSpell); } void Submerge() { - DoCast(me, SPELL_SUBMERGE_0); - me->RemoveAurasDueToSpell(SPELL_EMERGE_0); + DoCast(me, SPELL_SUBMERGE); + DoCast(me, SPELL_GROUND_VISUAL_0, true); + me->RemoveAurasDueToSpell(SPELL_EMERGE); me->SetInCombatWithZone(); events.SetPhase(PHASE_SUBMERGED); events.ScheduleEvent(EVENT_EMERGE, 5*IN_MILLISECONDS, 0, PHASE_SUBMERGED); @@ -625,17 +636,20 @@ struct boss_jormungarAI : public BossAI void Emerge() { - DoCast(me, SPELL_EMERGE_0); + DoCast(me, SPELL_EMERGE); + DoCastAOE(SPELL_HATE_TO_ZERO, true); me->SetDisplayId(ModelMobile); - me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0); + me->RemoveAurasDueToSpell(SPELL_SUBMERGE); + me->RemoveAurasDueToSpell(SPELL_GROUND_VISUAL_0); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); // if the worm was mobile before submerging, make him stationary now if (WasMobile) { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); SetCombatMovement(false); me->SetDisplayId(ModelStationary); + me->CastSpell(me, SPELL_GROUND_VISUAL_1, true); events.SetPhase(PHASE_STATIONARY); events.ScheduleEvent(EVENT_SUBMERGE, 45*IN_MILLISECONDS, 0, PHASE_STATIONARY); events.ScheduleEvent(EVENT_SPIT, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_STATIONARY); @@ -644,10 +658,11 @@ struct boss_jormungarAI : public BossAI } else { - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); SetCombatMovement(true); me->GetMotionMaster()->MoveChase(me->GetVictim()); me->SetDisplayId(ModelMobile); + me->RemoveAurasDueToSpell(SPELL_GROUND_VISUAL_1); events.SetPhase(PHASE_MOBILE); events.ScheduleEvent(EVENT_SUBMERGE, 45*IN_MILLISECONDS, 0, PHASE_MOBILE); events.ScheduleEvent(EVENT_BITE, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS), 0, PHASE_MOBILE); @@ -737,7 +752,7 @@ class boss_dreadscale : public CreatureScript { case 0: instance->DoCloseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR)); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_AGGRESSIVE); me->SetInCombatWithZone(); break; @@ -910,7 +925,7 @@ class boss_icehowl : public CreatureScript break; case 2: instance->DoUseDoorOrButton(instance->GetGuidData(GO_MAIN_GATE_DOOR)); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_AGGRESSIVE); me->SetInCombatWithZone(); break; @@ -1008,7 +1023,7 @@ class boss_icehowl : public CreatureScript me->SetTarget(_trampleTargetGUID); _trampleCast = false; SetCombatMovement(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_REMOVE_CLIENT_CONTROL); me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); events.ScheduleEvent(EVENT_TRAMPLE, 4*IN_MILLISECONDS); @@ -1092,7 +1107,7 @@ class boss_icehowl : public CreatureScript Talk(EMOTE_TRAMPLE_FAIL); } _movementStarted = false; - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_REMOVE_CLIENT_CONTROL); SetCombatMovement(true); me->GetMotionMaster()->MovementExpired(); me->GetMotionMaster()->Clear(); @@ -1122,6 +1137,148 @@ class boss_icehowl : public CreatureScript } }; +class spell_jormungars_paralytic_toxin : public SpellScriptLoader +{ +public: + spell_jormungars_paralytic_toxin() : SpellScriptLoader("spell_jormungars_paralytic_toxin") { } + + class spell_jormungars_paralytic_toxin_AuraScript : public AuraScript + { + PrepareAuraScript(spell_jormungars_paralytic_toxin_AuraScript); + + bool Validate(SpellInfo const* /*spell*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_PARALYSIS)) + return false; + return true; + } + + void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + Unit* caster = GetCaster(); + if (caster && caster->GetEntry() == NPC_ACIDMAW) + { + if (Creature* acidMaw = caster->ToCreature()) + acidMaw->AI()->Talk(SAY_SPECIAL, GetTarget()); + } + } + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAurasDueToSpell(SPELL_PARALYSIS); + } + + void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated) + { + if (!canBeRecalculated) + amount = aurEff->GetAmount(); + + canBeRecalculated = false; + } + + void HandleDummy(AuraEffect const* /*aurEff*/) + { + if (AuraEffect* slowEff = GetEffect(EFFECT_0)) + { + int32 newAmount = slowEff->GetAmount() - 10; + if (newAmount < -100) + newAmount = -100; + slowEff->ChangeAmount(newAmount); + + if (newAmount <= -100 && !GetTarget()->HasAura(SPELL_PARALYSIS)) + GetTarget()->CastSpell(GetTarget(), SPELL_PARALYSIS, true, NULL, slowEff, GetCasterGUID()); + } + } + + void Register() override + { + AfterEffectApply += AuraEffectApplyFn(spell_jormungars_paralytic_toxin_AuraScript::OnApply, EFFECT_0, SPELL_AURA_MOD_DECREASE_SPEED, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_jormungars_paralytic_toxin_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOD_DECREASE_SPEED, AURA_EFFECT_HANDLE_REAL); + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_jormungars_paralytic_toxin_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_DECREASE_SPEED); + OnEffectPeriodic += AuraEffectPeriodicFn(spell_jormungars_paralytic_toxin_AuraScript::HandleDummy, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_jormungars_paralytic_toxin_AuraScript(); + } +}; + +class spell_jormungars_snakes_spray : public SpellScriptLoader +{ +public: + spell_jormungars_snakes_spray(const char* name, uint32 spellId) : SpellScriptLoader(name), _spellId(spellId) { } + + class spell_jormungars_snakes_spray_SpellScript : public SpellScript + { + PrepareSpellScript(spell_jormungars_snakes_spray_SpellScript); + + public: + spell_jormungars_snakes_spray_SpellScript(uint32 spellId) : SpellScript(), _spellId(spellId) { } + + bool Validate(SpellInfo const* /*spell*/) override + { + if (!sSpellMgr->GetSpellInfo(_spellId)) + return false; + return true; + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Player* target = GetHitPlayer()) + GetCaster()->CastSpell(target, _spellId, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_jormungars_snakes_spray_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); + } + + private: + uint32 _spellId; + }; + + SpellScript* GetSpellScript() const override + { + return new spell_jormungars_snakes_spray_SpellScript(_spellId); + } + +private: + uint32 _spellId; +}; + +class spell_jormungars_paralysis : public SpellScriptLoader +{ +public: + spell_jormungars_paralysis() : SpellScriptLoader("spell_jormungars_paralysis") { } + + class spell_jormungars_paralysis_AuraScript : public AuraScript + { + PrepareAuraScript(spell_jormungars_paralysis_AuraScript); + + void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (Unit* caster = GetCaster()) + if (InstanceScript* instance = caster->GetInstanceScript()) + if (instance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_IN_PROGRESS || instance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL) + return; + + Remove(); + } + + void Register() override + { + AfterEffectApply += AuraEffectApplyFn(spell_jormungars_paralysis_AuraScript::OnApply, EFFECT_0, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_jormungars_paralysis_AuraScript(); + } +}; + void AddSC_boss_northrend_beasts() { new boss_gormok(); @@ -1132,6 +1289,10 @@ void AddSC_boss_northrend_beasts() new boss_acidmaw(); new boss_dreadscale(); new npc_slime_pool(); + new spell_jormungars_paralytic_toxin(); + new spell_jormungars_snakes_spray("spell_jormungars_burning_spray", SPELL_BURNING_BILE); + new spell_jormungars_snakes_spray("spell_jormungars_paralytic_spray", SPELL_PARALYTIC_TOXIN); + new spell_jormungars_paralysis(); new boss_icehowl(); } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index 278f6a7ab4f..c6ac59218ea 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -440,10 +440,8 @@ class boss_fjola : public CreatureScript // Allocate an unique random stage to each position in the array. for (int i = 0; i < MAX_STAGES - 1; ++i) { - int random = i + (rand32() % (MAX_STAGES - i)); - int temp = Stage[i]; - Stage[i] = Stage[random]; - Stage[random] = temp; + int random = i + urand(0, MAX_STAGES - i); + std::swap(Stage[i], Stage[random]); } } private: @@ -804,8 +802,8 @@ class spell_valkyr_essences : public SpellScriptLoader else { owner->CastSpell(owner, poweringUp, true); - if (Aura* pTemp = owner->GetAura(poweringUp)) - pTemp->ModStackAmount(stacksCount); + if ((pAura = owner->GetAura(poweringUp))) + pAura->ModStackAmount(stacksCount); } } } @@ -829,8 +827,8 @@ class spell_valkyr_essences : public SpellScriptLoader else { owner->CastSpell(owner, poweringUp, true); - if (Aura* pTemp = owner->GetAura(poweringUp)) - pTemp->ModStackAmount(stacksCount); + if ((pAura = owner->GetAura(poweringUp))) + pAura->ModStackAmount(stacksCount); } } } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index b1a0f0217c4..eb4840f3b8b 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -314,7 +314,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript if (tributeChest) if (Creature* tirion = instance->GetCreature(TirionGUID)) - if (GameObject* chest = tirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, 0, 0, 0, 0, WEEK)) + if (GameObject* chest = tirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, G3D::Quat(), WEEK)) chest->SetRespawnTime(chest->GetRespawnDelay()); break; } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp index 0ffe74932e0..8ea292d1de5 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp @@ -174,7 +174,7 @@ class npc_announcer_toc10 : public CreatureScript if (Creature* jaraxxus = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_JARAXXUS))) { jaraxxus->RemoveAurasDueToSpell(SPELL_JARAXXUS_CHAINS); - jaraxxus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + jaraxxus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); jaraxxus->SetReactState(REACT_DEFENSIVE); jaraxxus->SetInCombatWithZone(); } @@ -360,11 +360,11 @@ class npc_fizzlebang_toc : public CreatureScript { Talk(SAY_STAGE_1_06, killer); _instance->SetData(TYPE_EVENT, 1180); - if (Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS))) + if (Creature* jaraxxus = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS))) { - temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - temp->SetReactState(REACT_AGGRESSIVE); - temp->SetInCombatWithZone(); + jaraxxus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); + jaraxxus->SetReactState(REACT_AGGRESSIVE); + jaraxxus->SetInCombatWithZone(); } } @@ -457,18 +457,18 @@ class npc_fizzlebang_toc : public CreatureScript break; case 1140: Talk(SAY_STAGE_1_04); - if (Creature* temp = me->SummonCreature(NPC_JARAXXUS, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 5.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME)) + if (Creature* jaraxxus = me->SummonCreature(NPC_JARAXXUS, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 5.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME)) { - temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - temp->SetReactState(REACT_PASSIVE); - temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()-10, ToCCommonLoc[1].GetPositionZ()); + jaraxxus->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC); + jaraxxus->SetReactState(REACT_PASSIVE); + jaraxxus->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY()-10, ToCCommonLoc[1].GetPositionZ()); } _instance->SetData(TYPE_EVENT, 1142); _updateTimer = 5*IN_MILLISECONDS; break; case 1142: - if (Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS))) - temp->SetTarget(me->GetGUID()); + if (Creature* jaraxxus = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS))) + jaraxxus->SetTarget(me->GetGUID()); if (Creature* pTrigger = ObjectAccessor::GetCreature(*me, _triggerGUID)) pTrigger->DespawnOrUnsummon(); if (Creature* pPortal = ObjectAccessor::GetCreature(*me, _portalGUID)) @@ -477,19 +477,19 @@ class npc_fizzlebang_toc : public CreatureScript _updateTimer = 10*IN_MILLISECONDS; break; case 1144: - if (Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS))) - temp->AI()->Talk(SAY_STAGE_1_05); + if (Creature* jaraxxus = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS))) + jaraxxus->AI()->Talk(SAY_STAGE_1_05); _instance->SetData(TYPE_EVENT, 1150); _updateTimer = 5*IN_MILLISECONDS; break; case 1150: - if (Creature* temp = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS))) + if (Creature* jaraxxus = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(NPC_JARAXXUS))) { //1-shot Fizzlebang - temp->CastSpell(me, 67888, false); - me->SetInCombatWith(temp); - temp->AddThreat(me, 1000.0f); - temp->AI()->AttackStart(me); + jaraxxus->CastSpell(me, 67888, false); // 67888 - Fel Lightning + me->SetInCombatWith(jaraxxus); + jaraxxus->AddThreat(me, 1000.0f); + jaraxxus->AI()->AttackStart(me); } _instance->SetData(TYPE_EVENT, 1160); _updateTimer = 3*IN_MILLISECONDS; @@ -561,11 +561,11 @@ class npc_tirion_toc : public CreatureScript { _instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR)); - if (Creature* temp = me->SummonCreature(NPC_GORMOK, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*IN_MILLISECONDS)) + if (Creature* gormok = me->SummonCreature(NPC_GORMOK, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*IN_MILLISECONDS)) { - temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ()); - temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); - temp->SetReactState(REACT_PASSIVE); + gormok->GetMotionMaster()->MovePoint(0, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ()); + gormok->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + gormok->SetReactState(REACT_PASSIVE); } } _updateTimer = 3*IN_MILLISECONDS; @@ -582,11 +582,11 @@ class npc_tirion_toc : public CreatureScript if (_instance->GetBossState(BOSS_BEASTS) != DONE) { _instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR)); - if (Creature* temp = me->SummonCreature(NPC_DREADSCALE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN)) + if (Creature* dreadscale = me->SummonCreature(NPC_DREADSCALE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_MANUAL_DESPAWN)) { - temp->GetMotionMaster()->MovePoint(0, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ()); - temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); - temp->SetReactState(REACT_PASSIVE); + dreadscale->GetMotionMaster()->MovePoint(0, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ()); + dreadscale->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + dreadscale->SetReactState(REACT_PASSIVE); } } _updateTimer = 5*IN_MILLISECONDS; @@ -600,9 +600,9 @@ class npc_tirion_toc : public CreatureScript if (_instance->GetBossState(BOSS_BEASTS) != DONE) { _instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR)); - if (Creature* temp = me->SummonCreature(NPC_ICEHOWL, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_DEAD_DESPAWN)) + if (Creature* icehowl = me->SummonCreature(NPC_ICEHOWL, ToCSpawnLoc[0].GetPositionX(), ToCSpawnLoc[0].GetPositionY(), ToCSpawnLoc[0].GetPositionZ(), 5, TEMPSUMMON_DEAD_DESPAWN)) { - temp->GetMotionMaster()->MovePoint(2, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ()); + icehowl->GetMotionMaster()->MovePoint(2, ToCCommonLoc[5].GetPositionX(), ToCCommonLoc[5].GetPositionY(), ToCCommonLoc[5].GetPositionZ()); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_PASSIVE); } @@ -698,34 +698,34 @@ class npc_tirion_toc : public CreatureScript break; case 4010: Talk(SAY_STAGE_3_02); - if (Creature* temp = me->SummonCreature(NPC_LIGHTBANE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME)) + if (Creature* lightbane = me->SummonCreature(NPC_LIGHTBANE, ToCSpawnLoc[1].GetPositionX(), ToCSpawnLoc[1].GetPositionY(), ToCSpawnLoc[1].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME)) { - temp->SetVisible(false); - temp->SetReactState(REACT_PASSIVE); - temp->SummonCreature(NPC_LIGHT_ESSENCE, TwinValkyrsLoc[0].GetPositionX(), TwinValkyrsLoc[0].GetPositionY(), TwinValkyrsLoc[0].GetPositionZ()); - temp->SummonCreature(NPC_LIGHT_ESSENCE, TwinValkyrsLoc[1].GetPositionX(), TwinValkyrsLoc[1].GetPositionY(), TwinValkyrsLoc[1].GetPositionZ()); + lightbane->SetVisible(false); + lightbane->SetReactState(REACT_PASSIVE); + lightbane->SummonCreature(NPC_LIGHT_ESSENCE, TwinValkyrsLoc[0].GetPositionX(), TwinValkyrsLoc[0].GetPositionY(), TwinValkyrsLoc[0].GetPositionZ()); + lightbane->SummonCreature(NPC_LIGHT_ESSENCE, TwinValkyrsLoc[1].GetPositionX(), TwinValkyrsLoc[1].GetPositionY(), TwinValkyrsLoc[1].GetPositionZ()); } - if (Creature* temp = me->SummonCreature(NPC_DARKBANE, ToCSpawnLoc[2].GetPositionX(), ToCSpawnLoc[2].GetPositionY(), ToCSpawnLoc[2].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME)) + if (Creature* darkbane = me->SummonCreature(NPC_DARKBANE, ToCSpawnLoc[2].GetPositionX(), ToCSpawnLoc[2].GetPositionY(), ToCSpawnLoc[2].GetPositionZ(), 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME)) { - temp->SetVisible(false); - temp->SetReactState(REACT_PASSIVE); - temp->SummonCreature(NPC_DARK_ESSENCE, TwinValkyrsLoc[2].GetPositionX(), TwinValkyrsLoc[2].GetPositionY(), TwinValkyrsLoc[2].GetPositionZ()); - temp->SummonCreature(NPC_DARK_ESSENCE, TwinValkyrsLoc[3].GetPositionX(), TwinValkyrsLoc[3].GetPositionY(), TwinValkyrsLoc[3].GetPositionZ()); + darkbane->SetVisible(false); + darkbane->SetReactState(REACT_PASSIVE); + darkbane->SummonCreature(NPC_DARK_ESSENCE, TwinValkyrsLoc[2].GetPositionX(), TwinValkyrsLoc[2].GetPositionY(), TwinValkyrsLoc[2].GetPositionZ()); + darkbane->SummonCreature(NPC_DARK_ESSENCE, TwinValkyrsLoc[3].GetPositionX(), TwinValkyrsLoc[3].GetPositionY(), TwinValkyrsLoc[3].GetPositionZ()); } _updateTimer = 3*IN_MILLISECONDS; _instance->SetData(TYPE_EVENT, 4015); break; case 4015: _instance->DoUseDoorOrButton(_instance->GetGuidData(GO_MAIN_GATE_DOOR)); - if (Creature* temp = ObjectAccessor::GetCreature((*me), _instance->GetGuidData(NPC_LIGHTBANE))) + if (Creature* lightbane = ObjectAccessor::GetCreature((*me), _instance->GetGuidData(NPC_LIGHTBANE))) { - temp->GetMotionMaster()->MovePoint(1, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ()); - temp->SetVisible(true); + lightbane->GetMotionMaster()->MovePoint(1, ToCCommonLoc[8].GetPositionX(), ToCCommonLoc[8].GetPositionY(), ToCCommonLoc[8].GetPositionZ()); + lightbane->SetVisible(true); } - if (Creature* temp = ObjectAccessor::GetCreature((*me), _instance->GetGuidData(NPC_DARKBANE))) + if (Creature* darkbane = ObjectAccessor::GetCreature((*me), _instance->GetGuidData(NPC_DARKBANE))) { - temp->GetMotionMaster()->MovePoint(1, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ()); - temp->SetVisible(true); + darkbane->GetMotionMaster()->MovePoint(1, ToCCommonLoc[9].GetPositionX(), ToCCommonLoc[9].GetPositionY(), ToCCommonLoc[9].GetPositionZ()); + darkbane->SetVisible(true); } _updateTimer = 10*IN_MILLISECONDS; _instance->SetData(TYPE_EVENT, 4016); @@ -754,9 +754,9 @@ class npc_tirion_toc : public CreatureScript _instance->SetData(TYPE_EVENT, 0); break; case 6000: - me->SummonCreature(NPC_TIRION_FORDRING, EndSpawnLoc[0].GetPositionX(), EndSpawnLoc[0].GetPositionY(), EndSpawnLoc[0].GetPositionZ()); - me->SummonCreature(NPC_ARGENT_MAGE, EndSpawnLoc[1].GetPositionX(), EndSpawnLoc[1].GetPositionY(), EndSpawnLoc[1].GetPositionZ()); - me->SummonGameObject(GO_PORTAL_TO_DALARAN, EndSpawnLoc[2].GetPositionX(), EndSpawnLoc[2].GetPositionY(), EndSpawnLoc[2].GetPositionZ(), 5, 0, 0, 0, 0, 0); + me->SummonCreature(NPC_TIRION_FORDRING, EndSpawnLoc[0]); + me->SummonCreature(NPC_ARGENT_MAGE, EndSpawnLoc[1]); + me->SummonGameObject(GO_PORTAL_TO_DALARAN, EndSpawnLoc[2], G3D::Quat(), 0); _updateTimer = 20*IN_MILLISECONDS; _instance->SetData(TYPE_EVENT, 6005); break; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h index 90b9781954f..d53d6705400 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h @@ -140,9 +140,9 @@ const Position AnubarakLoc[]= const Position EndSpawnLoc[]= { - {648.9167f, 131.0208f, 141.6161f, 0}, // 0 - Highlord Tirion Fordring - {649.1614f, 142.0399f, 141.3057f, 0}, // 1 - Argent Mage - {644.6250f, 149.2743f, 140.6015f, 0} // 2 - Portal to Dalaran + {648.9167f, 131.0208f, 141.6161f, 0.f}, // 0 - Highlord Tirion Fordring + {649.1614f, 142.0399f, 141.3057f, 0.f}, // 1 - Argent Mage + {644.6250f, 149.2743f, 140.6015f, 5.f} // 2 - Portal to Dalaran }; enum WorldStateIds diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp index ce722e391d1..292f1d7074f 100644 --- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp +++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp @@ -198,8 +198,6 @@ public: { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); if (me->HasUnitState(UNIT_STATE_CASTING)) me->CastStop(); } @@ -207,8 +205,6 @@ public: { if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); DoCast(SPELL_ARCANE_FIELD); } } diff --git a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp index 055d0a07f41..94d1d93225c 100644 --- a/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/ForgeOfSouls/boss_devourer_of_souls.cpp @@ -144,7 +144,7 @@ class boss_devourer_of_souls : public CreatureScript void Reset() override { _Reset(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); me->SetDisplayId(DISPLAY_ANGER); me->SetReactState(REACT_AGGRESSIVE); @@ -297,7 +297,7 @@ class boss_devourer_of_souls : public CreatureScript me->SetTarget(ObjectGuid::Empty); me->GetMotionMaster()->Clear(); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); wailingSoulTick = 15; events.DelayEvents(18000); // no other events during wailing souls @@ -317,7 +317,7 @@ class boss_devourer_of_souls : public CreatureScript { me->SetReactState(REACT_AGGRESSIVE); me->SetDisplayId(DISPLAY_ANGER); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); me->GetMotionMaster()->MoveChase(me->GetVictim()); events.ScheduleEvent(EVENT_WAILING_SOULS, urand(60000, 70000)); } diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index 3ac85809fa2..6b20ae6a373 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -1921,6 +1921,7 @@ class npc_frostsworn_general : public CreatureScript { if (Creature* reflection = me->SummonCreature(NPC_REFLECTION, *target, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000)) { + reflection->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); target->CastSpell(reflection, SPELL_CLONE, true); target->CastSpell(reflection, SPELL_GHOST_VISUAL, true); reflection->AI()->AttackStart(target); @@ -2155,6 +2156,7 @@ struct npc_escape_event_trash : public ScriptedAI DoZoneInCombat(me, 0.0f); if (Creature* leader = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_ESCAPE_LEADER))) { + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetInCombatWith(leader); leader->SetInCombatWith(me); me->AddThreat(leader, 0.0f); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp index d77842fff0a..73a7de36580 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -2461,6 +2461,33 @@ class spell_igb_teleport_players_on_victory : public SpellScriptLoader } }; +// 71201 - Battle Experience - proc should never happen, handled in script +class spell_igb_battle_experience_check : public SpellScriptLoader +{ +public: + spell_igb_battle_experience_check() : SpellScriptLoader("spell_igb_battle_experience_check") { } + + class spell_igb_battle_experience_check_AuraScript : public AuraScript + { + PrepareAuraScript(spell_igb_battle_experience_check_AuraScript); + + bool CheckProc(ProcEventInfo& /*eventInfo*/) + { + return false; + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_igb_battle_experience_check_AuraScript::CheckProc); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_igb_battle_experience_check_AuraScript(); + } +}; + class achievement_im_on_a_boat : public AchievementCriteriaScript { public: @@ -2500,5 +2527,6 @@ void AddSC_boss_icecrown_gunship_battle() new spell_igb_gunship_fall_teleport(); new spell_igb_check_for_players(); new spell_igb_teleport_players_on_victory(); + new spell_igb_battle_experience_check(); new achievement_im_on_a_boat(); } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 1a37d5238d2..aa5060e83b4 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -1312,7 +1312,7 @@ class spell_sindragosa_ice_tomb : public SpellScriptLoader { summon->AI()->SetGUID(GetTarget()->GetGUID(), DATA_TRAPPED_PLAYER); GetTarget()->CastSpell(GetTarget(), SPELL_ICE_TOMB_UNTARGETABLE); - if (GameObject* go = summon->SummonGameObject(GO_ICE_BLOCK, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0)) + if (GameObject* go = summon->SummonGameObject(GO_ICE_BLOCK, pos, G3D::Quat(), 0)) { go->SetSpellId(SPELL_ICE_TOMB_DAMAGE); summon->AddGameObject(go); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 4a0a8217af8..de8d65693b9 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -528,6 +528,7 @@ class boss_the_lich_king : public CreatureScript void SetupEncounter() { _Reset(); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_PASSIVE); events.SetPhase(PHASE_INTRO); Initialize(); diff --git a/src/server/scripts/Northrend/IsleOfConquest/isle_of_conquest.cpp b/src/server/scripts/Northrend/IsleOfConquest/isle_of_conquest.cpp index 11cc645f0cb..f7e83ff1f42 100644 --- a/src/server/scripts/Northrend/IsleOfConquest/isle_of_conquest.cpp +++ b/src/server/scripts/Northrend/IsleOfConquest/isle_of_conquest.cpp @@ -259,6 +259,58 @@ class spell_ioc_launch : public SpellScriptLoader } }; +enum SeaforiumBombSpells +{ + SPELL_SEAFORIUM_BLAST = 66676, + SPELL_HUGE_SEAFORIUM_BLAST = 66672, + SPELL_A_BOMB_INABLE_CREDIT = 68366, + SPELL_A_BOMB_INATION_CREDIT = 68367 +}; + +class spell_ioc_seaforium_blast_credit : public SpellScriptLoader +{ + public: + spell_ioc_seaforium_blast_credit() : SpellScriptLoader("spell_ioc_seaforium_blast_credit") { } + + class spell_ioc_seaforium_blast_credit_SpellScript : public SpellScript + { + PrepareSpellScript(spell_ioc_seaforium_blast_credit_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_A_BOMB_INABLE_CREDIT) || !sSpellMgr->GetSpellInfo(SPELL_A_BOMB_INATION_CREDIT)) + return false; + return true; + } + + void HandleAchievementCredit(SpellEffIndex /*effIndex*/) + { + uint32 _creditSpell = 0; + Unit* caster = GetOriginalCaster(); + if (!caster) + return; + + if (GetSpellInfo()->Id == SPELL_SEAFORIUM_BLAST) + _creditSpell = SPELL_A_BOMB_INABLE_CREDIT; + else if (GetSpellInfo()->Id == SPELL_HUGE_SEAFORIUM_BLAST) + _creditSpell = SPELL_A_BOMB_INATION_CREDIT; + + if (GetHitGObj() && GetHitGObj()->IsDestructibleBuilding()) + caster->CastSpell(caster, _creditSpell, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_ioc_seaforium_blast_credit_SpellScript::HandleAchievementCredit, EFFECT_1, SPELL_EFFECT_GAMEOBJECT_DAMAGE); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_ioc_seaforium_blast_credit_SpellScript(); + } +}; + void AddSC_isle_of_conquest() { new npc_four_car_garage(); @@ -266,4 +318,5 @@ void AddSC_isle_of_conquest() new spell_ioc_gunship_portal(); new spell_ioc_parachute_ic(); new spell_ioc_launch(); + new spell_ioc_seaforium_blast_credit(); } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp index ef6ccf5bf4b..6ec9af68723 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gluth.cpp @@ -405,17 +405,19 @@ public: if (state == STATE_ZOMBIE_DECIMATED) { timer += diff; - Creature* gluth = ObjectAccessor::GetCreature(*me, GluthGUID); - // Putting this in the UpdateAI loop fixes an issue where death gripping a decimated zombie would make the zombie stand still until the rest of the fight. - // Also fix the issue where if one or more zombie is rooted when decimates hits (and MovePoint() is called), the zombie teleport to the boss. pretty weird behavior. - if (gluth && timer>1600 && me->GetExactDist2d(gluth) > 10.0 && me->CanFreeMove()) // it takes about 1600 ms for the animation to cycle. This way, the animation looks relatively smooth. + if (Creature* gluth = ObjectAccessor::GetCreature(*me, GluthGUID)) { - me->GetMotionMaster()->MovePoint(0, gluth->GetPosition()); // isn't dynamic. So, to take into account Gluth's movement, it must be called periodicly. - timer = 0; - } + // Putting this in the UpdateAI loop fixes an issue where death gripping a decimated zombie would make the zombie stand still until the rest of the fight. + // Also fix the issue where if one or more zombie is rooted when decimates hits (and MovePoint() is called), the zombie teleport to the boss. pretty weird behavior. + if (timer > 1600 && me->GetExactDist2d(gluth) > 10.0f && me->CanFreeMove()) // it takes about 1600 ms for the animation to cycle. This way, the animation looks relatively smooth. + { + me->GetMotionMaster()->MovePoint(0, gluth->GetPosition()); // isn't dynamic. So, to take into account Gluth's movement, it must be called periodicly. + timer = 0; + } - if (me->GetExactDist2d(gluth) <= 10.0) - me->StopMoving(); + if (me->GetExactDist2d(gluth) <= 10.0f) + me->StopMoving(); + } } else if (state == STATE_ZOMBIE_NORMAL) DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index 47807ec28cb..42efdfbfe67 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -309,7 +309,7 @@ public: _Reset(); me->setFaction(35); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_NOT_SELECTABLE); ResetPlayerScale(); spawns.DespawnAll(); @@ -356,7 +356,7 @@ public: } DoCast(me, SPELL_KELTHUZAD_CHANNEL, false); Talk(SAY_SUMMON_MINIONS); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_NOT_SELECTABLE); me->SetFloatValue(UNIT_FIELD_COMBATREACH, 4); me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 4); events.SetPhase(PHASE_ONE); @@ -426,7 +426,7 @@ public: Talk(SAY_AGGRO); Talk(EMOTE_PHASE_TWO); spawns.DespawnAll(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_NOT_SELECTABLE); me->CastStop(); DoStartMovement(me->GetVictim()); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp index 4596b17bc23..0c9a236e196 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp @@ -485,7 +485,7 @@ class spell_sapphiron_icebolt : public SpellScriptLoader return; float x, y, z; GetTarget()->GetPosition(x, y, z); - if (GameObject* block = GetTarget()->SummonGameObject(GO_ICEBLOCK, x, y, z, 0, 0, 0, 0, 0, 25)) + if (GameObject* block = GetTarget()->SummonGameObject(GO_ICEBLOCK, x, y, z, 0.f, G3D::Quat(), 25)) _block = block->GetGUID(); } diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index e3971248513..720549de0b2 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -123,6 +123,9 @@ class instance_naxxramas : public InstanceMapScript CurrentWingTaunt = SAY_KELTHUZAD_FIRST_WING_TAUNT; playerDied = 0; + + nextFroggerWave = 0; + events.ScheduleEvent(EVENT_SUMMON_FROGGER_WAVE, Seconds(1)); } void OnCreatureCreate(Creature* creature) override @@ -477,6 +480,16 @@ class instance_naxxramas : public InstanceMapScript kelthuzad->AI()->Talk(CurrentWingTaunt); ++CurrentWingTaunt; break; + case EVENT_SUMMON_FROGGER_WAVE: + { + std::list<TempSummon*> spawns; + instance->SummonCreatureGroup(nextFroggerWave, &spawns); + if (!spawns.empty()) + (*spawns.begin())->GetMotionMaster()->MovePath(10 * NPC_FROGGER + nextFroggerWave, false); + events.Repeat(Seconds(1) + Milliseconds(666)); + nextFroggerWave = (nextFroggerWave+1) % 3; + break; + } case EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD: if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID)) kelthuzad->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_KELTHUZAD); @@ -613,6 +626,8 @@ class instance_naxxramas : public InstanceMapScript /* The Immortal / The Undying */ uint32 playerDied; + int8 nextFroggerWave; + EventMap events; }; diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h index a3fedf5aa40..75e7314c5d0 100644 --- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h +++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h @@ -107,7 +107,8 @@ enum CreaturesIds NPC_DK_UNDERSTUDY = 16803, NPC_BIGGLESWORTH = 16998, NPC_LICH_KING = 16980, - NPC_OLD_WORLD_TRIGGER = 15384 + NPC_OLD_WORLD_TRIGGER = 15384, + NPC_FROGGER = 16027 }; enum GameObjectsIds @@ -175,6 +176,9 @@ enum InstanceEvents // Dialogue that happens after each wing. EVENT_KELTHUZAD_WING_TAUNT, + // Periodic Frogger summon + EVENT_SUMMON_FROGGER_WAVE, + // Dialogue that happens after Sapphiron's death. EVENT_DIALOGUE_SAPPHIRON_KELTHUZAD, EVENT_DIALOGUE_SAPPHIRON_LICHKING, diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index 3d5a6ee8dfb..914a1a8bbb0 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -376,6 +376,8 @@ public: me->SetDisableGravity(true); me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); // TO DO: find what in core is making boss slower than in retail (when correct speed data) or find missing movement flag update or forced spline change me->SetSpeedRate(MOVE_FLIGHT, _flySpeed * 0.25f); if (_despawned) @@ -464,7 +466,7 @@ public: pos.m_positionZ = alexstraszaBunny->GetPositionZ(); alexstraszaBunny->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 30.0f, alexstraszaBunny->GetAngle(me)); me->GetMotionMaster()->MoveLand(POINT_LAND_P_ONE, pos); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); me->SetReactState(REACT_AGGRESSIVE); me->SetInCombatWithZone(); events.ScheduleEvent(EVENT_LAND_START_ENCOUNTER, 7*IN_MILLISECONDS, 1, PHASE_NOT_STARTED); @@ -604,8 +606,6 @@ public: // Set speed to normal value me->SetSpeedRate(MOVE_FLIGHT, _flySpeed); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->RemoveAllAuras(); me->CombatStop(); // Sometimes threat can remain, so it's a safety measure @@ -1001,14 +1001,7 @@ public: _JustDied(); Talk(SAY_DEATH); if (Creature* alexstraszaGiftBoxBunny = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_GIFT_BOX_BUNNY_GUID))) - { - if (GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL) - alexstraszaGiftBoxBunny->SummonGameObject(GO_HEART_OF_MAGIC_10, HeartOfMagicSpawnPos.GetPositionX(), HeartOfMagicSpawnPos.GetPositionY(), - HeartOfMagicSpawnPos.GetPositionZ(), HeartOfMagicSpawnPos.GetOrientation(), 0.0f, 0.0f, 0.0f, 1.0f, 0); - else if (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) - alexstraszaGiftBoxBunny->SummonGameObject(GO_HEART_OF_MAGIC_25, HeartOfMagicSpawnPos.GetPositionX(), HeartOfMagicSpawnPos.GetPositionY(), - HeartOfMagicSpawnPos.GetPositionZ(), HeartOfMagicSpawnPos.GetOrientation(), 0.0f, 0.0f, 0.0f, 1.0f, 0); - } + alexstraszaGiftBoxBunny->SummonGameObject(RAID_MODE(GO_HEART_OF_MAGIC_10, GO_HEART_OF_MAGIC_25), HeartOfMagicSpawnPos, G3D::Quat(), 0); me->SummonCreature(NPC_ALEXSTRASZA, AlexstraszaSpawnPos, TEMPSUMMON_MANUAL_DESPAWN); me->DespawnOrUnsummon(5*IN_MILLISECONDS); @@ -2439,9 +2432,9 @@ class spell_alexstrasza_gift_beam_visual : public SpellScriptLoader if (Creature* target = GetTarget()->ToCreature()) { if (target->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL) - _alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_10, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0); + _alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_10, *target, G3D::Quat(), 0); else if (target->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) - _alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_25, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0); + _alexstraszaGift = target->SummonGameObject(GO_ALEXSTRASZA_S_GIFT_25, *target, G3D::Quat(), 0); } } diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp index e87115dd8e2..eb8a92f7b28 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp @@ -86,9 +86,7 @@ public: void SpawnGameObject(uint32 entry, Position const& pos) { GameObject* go = new GameObject(); - if (!go->Create(instance->GenerateLowGuid<HighGuid::GameObject>(), entry, instance, - PHASEMASK_NORMAL, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), - 0, 0, 0, 0, 120, GO_STATE_READY)) + if (!go->Create(instance->GenerateLowGuid<HighGuid::GameObject>(), entry, instance, PHASEMASK_NORMAL, pos, G3D::Quat(), 255, GO_STATE_READY)) { delete go; return; diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index 8f7687d0fca..55295a534e1 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -113,7 +113,7 @@ public: Initialize(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_DISABLE_MOVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_REMOVE_CLIENT_CONTROL); if (!me->IsVisible()) me->SetVisible(true); @@ -152,7 +152,7 @@ public: me->AttackStop(); me->SetVisible(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_REMOVE_CLIENT_CONTROL); me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); @@ -236,7 +236,7 @@ public: else if (lSparkList.empty()) { me->SetVisible(true); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_DISABLE_MOVE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_REMOVE_CLIENT_CONTROL); DoCast(me, SPELL_SPARK_DESPAWN, false); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index 05beacca638..fa59c021cad 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -171,8 +171,7 @@ enum FreyaNpcs enum FreyaActions { - ACTION_ELDER_DEATH = 1, - ACTION_ELDER_FREYA_KILLED = 2 + ACTION_ELDER_FREYA_KILLED = 1 }; enum FreyaEvents @@ -619,7 +618,7 @@ class boss_freya : public CreatureScript Elder->AttackStop(); Elder->CombatStop(true); Elder->DeleteThreatList(); - Elder->GetAI()->DoAction(ACTION_ELDER_FREYA_KILLED); + Elder->AI()->DoAction(ACTION_ELDER_FREYA_KILLED); } } } @@ -705,19 +704,10 @@ class boss_elder_brightleaf : public CreatureScript Talk(SAY_ELDER_SLAY); } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { _JustDied(); Talk(SAY_ELDER_DEATH); - - if (killer->GetTypeId() == TYPEID_PLAYER) - { - if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_IRONBRANCH))) - Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH); - - if (Creature* Stonebark = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_STONEBARK))) - Stonebark->AI()->DoAction(ACTION_ELDER_DEATH); - } } void EnterCombat(Unit* /*who*/) override @@ -812,19 +802,10 @@ class boss_elder_stonebark : public CreatureScript Talk(SAY_ELDER_SLAY); } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { _JustDied(); Talk(SAY_ELDER_DEATH); - - if (killer->GetTypeId() == TYPEID_PLAYER) - { - if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_IRONBRANCH))) - Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH); - - if (Creature* Brightleaf = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_BRIGHTLEAF))) - Brightleaf->AI()->DoAction(ACTION_ELDER_DEATH); - } } void EnterCombat(Unit* /*who*/) override @@ -925,19 +906,10 @@ class boss_elder_ironbranch : public CreatureScript Talk(SAY_ELDER_SLAY); } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { _JustDied(); Talk(SAY_ELDER_DEATH); - - if (killer->GetTypeId() == TYPEID_PLAYER) - { - if (Creature* Brightleaf = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_BRIGHTLEAF))) - Brightleaf->AI()->DoAction(ACTION_ELDER_DEATH); - - if (Creature* Stonebark = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_STONEBARK))) - Stonebark->AI()->DoAction(ACTION_ELDER_DEATH); - } } void EnterCombat(Unit* /*who*/) override diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp index 09d95b34521..cbd24141bdf 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp @@ -415,7 +415,7 @@ class npc_saronite_vapors : public CreatureScript if (damage >= me->GetHealth()) { damage = 0; - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_REMOVE_CLIENT_CONTROL); me->SetStandState(UNIT_STAND_STATE_DEAD); me->SetHealth(me->GetMaxHealth()); me->RemoveAllAuras(); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp index c35a5936822..c03a1c6fbc1 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp @@ -30,6 +30,8 @@ Destroying of Toasty Fires */ +/* @todo Hodir aggro behavior is wonky. He gets set to _PASSIVE, but never to _AGGRESSIVE unless you kill an ice block which doesn't spawn unless you have*/ + enum HodirYells { SAY_AGGRO = 0, @@ -184,7 +186,7 @@ class npc_flash_freeze : public CreatureScript Initialize(); instance = me->GetInstanceScript(); me->SetDisplayId(me->GetCreatureTemplate()->Modelid2); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED); } void Initialize() @@ -259,7 +261,7 @@ class npc_ice_block : public CreatureScript { instance = me->GetInstanceScript(); me->SetDisplayId(me->GetCreatureTemplate()->Modelid2); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED); } InstanceScript* instance; @@ -269,7 +271,7 @@ class npc_ice_block : public CreatureScript void IsSummonedBy(Unit* summoner) override { targetGUID = summoner->GetGUID(); - summoner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED); + summoner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED); me->SetInCombatWith(summoner); me->AddThreat(summoner, 250.0f); summoner->AddThreat(me, 250.0f); @@ -285,7 +287,7 @@ class npc_ice_block : public CreatureScript { if (Creature* Helper = ObjectAccessor::GetCreature(*me, targetGUID)) { - Helper->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED); + Helper->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED); if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_HODIR))) { @@ -375,7 +377,7 @@ class boss_hodir : public CreatureScript Talk(SAY_SLAY); } - void DamageTaken(Unit* /*who*/, uint32& damage) override + void DamageTaken(Unit* who, uint32& damage) override { if (damage >= me->GetHealth()) { @@ -388,7 +390,7 @@ class boss_hodir : public CreatureScript me->RemoveAllAttackers(); me->AttackStop(); me->SetReactState(REACT_PASSIVE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_REMOVE_CLIENT_CONTROL); me->InterruptNonMeleeSpells(true); me->StopMoving(); me->GetMotionMaster()->Clear(); @@ -403,6 +405,12 @@ class boss_hodir : public CreatureScript _JustDied(); } + else if (!me->IsInCombat()) + { + me->SetReactState(REACT_AGGRESSIVE); + me->AI()->DoZoneInCombat(); + me->AI()->AttackStart(who); + } } void UpdateAI(uint32 diff) override @@ -539,7 +547,7 @@ class npc_icicle : public CreatureScript { Initialize(); me->SetDisplayId(me->GetCreatureTemplate()->Modelid1); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_PACIFIED | UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_PACIFIED | UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_PASSIVE); } @@ -593,7 +601,7 @@ class npc_snowpacked_icicle : public CreatureScript { Initialize(); me->SetDisplayId(me->GetCreatureTemplate()->Modelid2); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED); me->SetReactState(REACT_PASSIVE); } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp index cd214a0114f..a50643c5deb 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp @@ -178,7 +178,7 @@ class boss_ignis : public CreatureScript { summon->setFaction(16); summon->SetReactState(REACT_AGGRESSIVE); - summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED | UNIT_FLAG_STUNNED | UNIT_FLAG_DISABLE_MOVE); + summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED | UNIT_FLAG_STUNNED | UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_IMMUNE_TO_PC); } summon->AI()->AttackStart(me->GetVictim()); @@ -375,7 +375,7 @@ class npc_scorch_ground : public CreatureScript npc_scorch_groundAI(Creature* creature) : ScriptedAI(creature) { Initialize(); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE |UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL |UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED); creature->SetDisplayId(16925); //model 2 in db cannot overwrite wdb fields } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp index 470ad388fff..45d4fa58a03 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_kologarn.cpp @@ -104,7 +104,7 @@ class boss_kologarn : public CreatureScript left(false), right(false) { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL); DoCast(SPELL_KOLOGARN_REDUCE_PARRY); SetCombatMovement(false); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index 8aa443cba3f..a965f8b39ff 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -644,10 +644,10 @@ class boss_mimiron : public CreatureScript { if (Creature* computer = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_COMPUTER))) computer->AI()->DoAction(DO_DEACTIVATE_COMPUTER); - me->SummonGameObject(RAID_MODE(GO_CACHE_OF_INNOVATION_FIREFIGHTER, GO_CACHE_OF_INNOVATION_FIREFIGHTER_HERO), 2744.040f, 2569.352f, 364.3135f, 3.124123f, 0.f, 0.f, 0.9999619f, 0.008734641f, 604800); + me->SummonGameObject(RAID_MODE(GO_CACHE_OF_INNOVATION_FIREFIGHTER, GO_CACHE_OF_INNOVATION_FIREFIGHTER_HERO), 2744.040f, 2569.352f, 364.3135f, 3.124123f, G3D::Quat(0.f, 0.f, 0.9999619f, 0.008734641f), 604800); } else - me->SummonGameObject(RAID_MODE(GO_CACHE_OF_INNOVATION, GO_CACHE_OF_INNOVATION_HERO), 2744.040f, 2569.352f, 364.3135f, 3.124123f, 0.f, 0.f, 0.9999619f, 0.008734641f, 604800); + me->SummonGameObject(RAID_MODE(GO_CACHE_OF_INNOVATION, GO_CACHE_OF_INNOVATION_HERO), 2744.040f, 2569.352f, 364.3135f, 3.124123f, G3D::Quat(0.f, 0.f, 0.9999619f, 0.008734641f), 604800); events.ScheduleEvent(EVENT_OUTTRO_3, 11000); break; case EVENT_OUTTRO_3: @@ -972,7 +972,7 @@ class boss_vx_001 : public CreatureScript events.ScheduleEvent(EVENT_FLAME_SUPPRESSANT_VX, 6000); // Missing break intended. case DO_START_VX001: - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); me->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM); me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); // Remove emotestate. //me->SetUInt32Value(UNIT_FIELD_BYTES_1, 33554432); Blizzard handles hover animation like this it seems. @@ -1145,7 +1145,7 @@ class boss_aerial_command_unit : public CreatureScript events.ScheduleEvent(EVENT_SUMMON_FIRE_BOTS, 1000, 0, PHASE_AERIAL_COMMAND_UNIT); // Missing break intended. case DO_START_AERIAL: - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); me->SetReactState(REACT_AGGRESSIVE); events.SetPhase(PHASE_AERIAL_COMMAND_UNIT); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp index 363f5907048..a0ea2bd3d57 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp @@ -242,7 +242,7 @@ class boss_razorscale_controller : public CreatureScript break; case ACTION_PLACE_BROKEN_HARPOON: for (uint8 n = 0; n < RAID_MODE(2, 4); n++) - me->SummonGameObject(GO_RAZOR_BROKEN_HARPOON, PosHarpoon[n].GetPositionX(), PosHarpoon[n].GetPositionY(), PosHarpoon[n].GetPositionZ(), 2.286f, 0, 0, 0, 0, 180); + me->SummonGameObject(GO_RAZOR_BROKEN_HARPOON, PosHarpoon[n].GetPositionX(), PosHarpoon[n].GetPositionY(), PosHarpoon[n].GetPositionZ(), 2.286f, G3D::Quat(), 180); break; } } @@ -257,7 +257,7 @@ class boss_razorscale_controller : public CreatureScript { case EVENT_BUILD_HARPOON_1: Talk(EMOTE_HARPOON); - if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0].GetPositionX(), PosHarpoon[0].GetPositionY(), PosHarpoon[0].GetPositionZ(), 4.790f, 0.0f, 0.0f, 0.0f, 0.0f, uint32(me->GetRespawnTime()))) + if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0].GetPositionX(), PosHarpoon[0].GetPositionY(), PosHarpoon[0].GetPositionZ(), 4.790f, G3D::Quat(), uint32(me->GetRespawnTime()))) { if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f)) //only nearest broken harpoon BrokenHarpoon->RemoveFromWorld(); @@ -267,7 +267,7 @@ class boss_razorscale_controller : public CreatureScript return; case EVENT_BUILD_HARPOON_2: Talk(EMOTE_HARPOON); - if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1].GetPositionX(), PosHarpoon[1].GetPositionY(), PosHarpoon[1].GetPositionZ(), 4.659f, 0, 0, 0, 0, uint32(me->GetRespawnTime()))) + if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1].GetPositionX(), PosHarpoon[1].GetPositionY(), PosHarpoon[1].GetPositionZ(), 4.659f, G3D::Quat(), uint32(me->GetRespawnTime()))) { if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f)) BrokenHarpoon->RemoveFromWorld(); @@ -276,7 +276,7 @@ class boss_razorscale_controller : public CreatureScript return; case EVENT_BUILD_HARPOON_3: Talk(EMOTE_HARPOON); - if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2].GetPositionX(), PosHarpoon[2].GetPositionY(), PosHarpoon[2].GetPositionZ(), 5.382f, 0, 0, 0, 0, uint32(me->GetRespawnTime()))) + if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2].GetPositionX(), PosHarpoon[2].GetPositionY(), PosHarpoon[2].GetPositionZ(), 5.382f, G3D::Quat(), uint32(me->GetRespawnTime()))) { if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f)) BrokenHarpoon->RemoveFromWorld(); @@ -286,7 +286,7 @@ class boss_razorscale_controller : public CreatureScript return; case EVENT_BUILD_HARPOON_4: Talk(EMOTE_HARPOON); - if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3].GetPositionX(), PosHarpoon[3].GetPositionY(), PosHarpoon[3].GetPositionZ(), 4.266f, 0, 0, 0, 0, uint32(me->GetRespawnTime()))) + if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3].GetPositionX(), PosHarpoon[3].GetPositionY(), PosHarpoon[3].GetPositionZ(), 4.266f, G3D::Quat(), uint32(me->GetRespawnTime()))) { if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f)) BrokenHarpoon->RemoveFromWorld(); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp index 547dc681ac6..28ca7f4ef3b 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp @@ -21,7 +21,7 @@ BossBoundaryData const boundaries = { - { DATA_KING_YMIRON, new RectangleBoundary(340.0f, 450.0f, -412.0f, -275.0f) } + { DATA_KING_YMIRON, new RectangleBoundary(340.0f, 443.0f, -412.0f, -275.0f) } }; DoorData const doorData[] = diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp index b89c11147b6..df3fa266191 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp @@ -115,6 +115,7 @@ class boss_archavon : public CreatureScript DoCastVictim(SPELL_STOMP); events.ScheduleEvent(EVENT_IMPALE, 3000); events.ScheduleEvent(EVENT_STOMP, 45000); + Talk(EMOTE_LEAP, me->GetVictim()); break; case EVENT_IMPALE: DoCastVictim(SPELL_IMPALE); diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp index 06ebcbdc2fb..e7305e53808 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp @@ -247,7 +247,7 @@ class npc_frozen_orb_stalker : public CreatureScript npc_frozen_orb_stalkerAI(Creature* creature) : ScriptedAI(creature) { creature->SetVisible(false); - creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE); + creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_REMOVE_CLIENT_CONTROL); creature->SetReactState(REACT_PASSIVE); instance = creature->GetInstanceScript(); diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 698fd510411..d9315315c58 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -2274,7 +2274,8 @@ public: void DoAction(int32 /*iParam*/) override { me->StopMoving(); - me->SetUInt32Value(UNIT_NPC_FLAGS, 0); + me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); if (Player* player = ObjectAccessor::GetPlayer(*me, uiPlayerGUID)) me->SetFacingToObject(player); uiEventTimer = 3000; @@ -2303,7 +2304,6 @@ public: switch (me->GetEntry()) { case NPC_SALTY_JOHN_THORPE: - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); Talk(SAY_HIDDEN_CULTIST_1); uiEventTimer = 5000; uiEventPhase = 2; @@ -2314,7 +2314,8 @@ public: uiEventPhase = 2; break; case NPC_TOM_HEGGER: - Talk(SAY_HIDDEN_CULTIST_3); + if (Player* player = ObjectAccessor::GetPlayer(*me, uiPlayerGUID)) + Talk(SAY_HIDDEN_CULTIST_3, player); uiEventTimer = 5000; uiEventPhase = 2; break; diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp index 4eafc1cd94e..adade245c2b 100644 --- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp +++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp @@ -1044,6 +1044,12 @@ public: { PrepareAuraScript(spell_z_check_AuraScript); + public: + spell_z_check_AuraScript() + { + _posZ = 0.0f; + } + void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { _posZ = GetTarget()->GetPositionZ(); diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index f2edccd99b5..41785f76d9a 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -253,7 +253,7 @@ public: case 1: Talk(SAY_WP_3); me->CastSpell(5918.33f, 5372.91f, -98.770f, SPELL_EXPLODE_CRYSTAL, true); - me->SummonGameObject(184743, 5918.33f, 5372.91f, -98.770f, 0, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds + me->SummonGameObject(184743, 5918.33f, 5372.91f, -98.770f, 0, G3D::Quat(), TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break; case 2: @@ -264,7 +264,7 @@ public: break; case 8: me->CastSpell(5887.37f, 5379.39f, -91.289f, SPELL_EXPLODE_CRYSTAL, true); - me->SummonGameObject(184743, 5887.37f, 5379.39f, -91.289f, 0, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds + me->SummonGameObject(184743, 5887.37f, 5379.39f, -91.289f, 0, G3D::Quat(), TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break; case 9: @@ -780,7 +780,7 @@ public: bird->KillSelf(); crunchy->GetMotionMaster()->MovePoint(0, bird->GetPositionX(), bird->GetPositionY(), - bird->GetMap()->GetWaterOrGroundLevel(bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ())); + bird->GetMap()->GetWaterOrGroundLevel(bird->GetPhaseMask(), bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ())); /// @todo Make crunchy perform emote eat when he reaches the bird break; diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index e5263a8630a..490c72c5cba 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -516,7 +516,7 @@ public: if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID)) voice->AI()->Talk(SAY_VOICE_1, player); } - if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_1, 7860.273f, -1383.622f, 1538.302f, -1.658062f, 0, 0, -0.737277f, 0.6755905f, 0)) + if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_1, 7860.273f, -1383.622f, 1538.302f, -1.658062f, G3D::Quat(0.f, 0.f, -0.737277f, 0.6755905f), 0)) objectGUID[objectCounter++] = go->GetGUID(); events.ScheduleEvent(EVENT_SCRIPT_5, 6000); break; @@ -524,7 +524,7 @@ public: if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID)) if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID)) voice->AI()->Talk(SAY_VOICE_2, player); - if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_2, 7875.67f, -1387.266f, 1538.323f, -2.373644f, 0, 0, -0.9271832f, 0.3746083f, 0)) + if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_2, 7875.67f, -1387.266f, 1538.323f, -2.373644f, G3D::Quat(0.f, 0.f, -0.9271832f, 0.3746083f), 0)) objectGUID[objectCounter++] = go->GetGUID(); events.ScheduleEvent(EVENT_SCRIPT_6, 6000); break; @@ -532,7 +532,7 @@ public: if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID)) if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID)) voice->AI()->Talk(SAY_VOICE_3, player); - if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_3, 7879.212f, -1401.175f, 1538.279f, 2.967041f, 0, 0, 0.9961939f, 0.08716504f, 0)) + if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_3, 7879.212f, -1401.175f, 1538.279f, 2.967041f, G3D::Quat(0.f, 0.f, 0.9961939f, 0.08716504f), 0)) objectGUID[objectCounter++] = go->GetGUID(); events.ScheduleEvent(EVENT_SCRIPT_7, 6000); break; @@ -540,7 +540,7 @@ public: if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID)) if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID)) voice->AI()->Talk(SAY_VOICE_4, player); - if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_4, 7868.944f, -1411.18f, 1538.213f, 2.111848f, 0, 0, 0.8703556f, 0.4924237f, 0)) + if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_4, 7868.944f, -1411.18f, 1538.213f, 2.111848f, G3D::Quat(0.f, 0.f, 0.8703556f, 0.4924237f), 0)) objectGUID[objectCounter++] = go->GetGUID(); events.ScheduleEvent(EVENT_SCRIPT_8, 6000); break; @@ -548,7 +548,7 @@ public: if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID)) if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID)) voice->AI()->Talk(SAY_VOICE_5, player); - if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_5, 7855.11f, -1406.839f, 1538.42f, 1.151916f, 0, 0, 0.5446386f, 0.8386708f, 0)) + if (GameObject* go = me->SummonGameObject(OBJECT_TOL_SIGNAL_5, 7855.11f, -1406.839f, 1538.42f, 1.151916f, G3D::Quat(0.f, 0.f, 0.5446386f, 0.8386708f), 0)) objectGUID[objectCounter] = go->GetGUID(); events.ScheduleEvent(EVENT_SCRIPT_9, 6000); break; diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp index a0b9351fb75..05ed405cc6e 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp @@ -163,7 +163,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId) GameObject* go = new GameObject; Map* map = player->GetMap(); - if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY)) + if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), *player, G3D::Quat(), 255, GO_STATE_READY)) { delete go; return true; @@ -192,7 +192,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId) GameObject* go = new GameObject; Map* map = player->GetMap(); - if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY)) + if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), *player, G3D::Quat(), 255, GO_STATE_READY)) { delete go; return true; diff --git a/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp index 9c16379c9f1..236f5bac403 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp @@ -64,12 +64,11 @@ public: return GetInstanceAI<boss_gurtogg_bloodboilAI>(creature); } - struct boss_gurtogg_bloodboilAI : public ScriptedAI + struct boss_gurtogg_bloodboilAI : public BossAI { - boss_gurtogg_bloodboilAI(Creature* creature) : ScriptedAI(creature) + boss_gurtogg_bloodboilAI(Creature* creature) : BossAI(creature, DATA_GURTOGG_BLOODBOIL) { Initialize(); - instance = creature->GetInstanceScript(); } void Initialize() @@ -91,8 +90,6 @@ public: Phase1 = true; } - InstanceScript* instance; - ObjectGuid TargetGUID; float TargetThreat; @@ -112,8 +109,7 @@ public: void Reset() override { - instance->SetBossState(DATA_GURTOGG_BLOODBOIL, NOT_STARTED); - + _Reset(); Initialize(); me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false); @@ -122,9 +118,8 @@ public: void EnterCombat(Unit* /*who*/) override { - DoZoneInCombat(); Talk(SAY_AGGRO); - instance->SetBossState(DATA_GURTOGG_BLOODBOIL, IN_PROGRESS); + _EnterCombat(); } void KilledUnit(Unit* /*victim*/) override @@ -134,9 +129,8 @@ public: void JustDied(Unit* /*killer*/) override { - instance->SetBossState(DATA_GURTOGG_BLOODBOIL, DONE); - Talk(SAY_DEATH); + _JustDied(); } void RevertThreatOnTarget(ObjectGuid guid) diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 14aeda04a7e..a63d984d849 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -473,12 +473,11 @@ class boss_illidan_stormrage : public CreatureScript public: boss_illidan_stormrage() : CreatureScript("boss_illidan_stormrage") { } - struct boss_illidan_stormrageAI : public ScriptedAI + struct boss_illidan_stormrageAI : public BossAI { - boss_illidan_stormrageAI(Creature* creature) : ScriptedAI(creature), Summons(me) + boss_illidan_stormrageAI(Creature* creature) : BossAI(creature, DATA_ILLIDAN_STORMRAGE) { Initialize(); - instance = creature->GetInstanceScript(); DoCast(me, SPELL_DUAL_WIELD, true); } @@ -519,7 +518,7 @@ public: EnterPhase(PHASE_FLIGHT_SEQUENCE); } } - Summons.Despawn(summon); + summons.Despawn(summon); } void MovementInform(uint32 /*MovementType*/, uint32 /*Data*/) override @@ -539,6 +538,7 @@ public: void EnterCombat(Unit* /*who*/) override { + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); me->setActive(true); DoZoneInCombat(); } @@ -561,10 +561,10 @@ public: { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - instance->SetBossState(DATA_ILLIDAN_STORMRAGE, DONE); - for (uint8 i = DATA_GO_ILLIDAN_DOOR_R; i < DATA_GO_ILLIDAN_DOOR_L + 1; ++i) instance->HandleGameObject(instance->GetGuidData(i), true); + + _JustDied(); } void KilledUnit(Unit* victim) override @@ -585,7 +585,7 @@ public: void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override { - if (spell->Id == SPELL_GLAIVE_RETURNS) // Re-equip our warblades! + if (spell->Id == SPELL_GLAIVE_RETURNS) // Re-equip our warglaives! { if (!me->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID)) SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); @@ -673,7 +673,7 @@ public: Timer[EVENT_TALK_SEQUENCE] = 100; me->RemoveAllAuras(); me->InterruptNonMeleeSpells(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->GetMotionMaster()->Clear(false); me->AttackStop(); break; @@ -791,99 +791,99 @@ public: { switch (FlightCount) { - case 1: // lift off - me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); - me->SetDisableGravity(true); - me->StopMoving(); - Talk(SAY_ILLIDAN_TAKEOFF); - Timer[EVENT_FLIGHT_SEQUENCE] = 3000; - break; - case 2: // move to center - me->GetMotionMaster()->MovePoint(0, CENTER_X + 5, CENTER_Y, CENTER_Z); // +5, for SPELL_THROW_GLAIVE bug - Timer[EVENT_FLIGHT_SEQUENCE] = 0; - break; - case 3: // throw one glaive - { - uint8 i=1; - Creature* Glaive = me->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - if (Glaive) + case 1: // lift off + me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); + me->SetDisableGravity(true); + me->StopMoving(); + Talk(SAY_ILLIDAN_TAKEOFF); + Timer[EVENT_FLIGHT_SEQUENCE] = 3000; + break; + case 2: // move to center + me->GetMotionMaster()->MovePoint(0, CENTER_X + 5, CENTER_Y, CENTER_Z); // +5, for SPELL_THROW_GLAIVE bug + Timer[EVENT_FLIGHT_SEQUENCE] = 0; + break; + case 3: // throw one glaive { - GlaiveGUID[i] = Glaive->GetGUID(); - Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Glaive->SetDisplayId(MODEL_INVISIBLE); - Glaive->setFaction(me->getFaction()); - DoCast(Glaive, SPELL_THROW_GLAIVE2); + uint8 i=1; + Creature* Glaive = me->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + if (Glaive) + { + GlaiveGUID[i] = Glaive->GetGUID(); + Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Glaive->SetDisplayId(MODEL_INVISIBLE); + Glaive->setFaction(me->getFaction()); + DoCast(Glaive, SPELL_THROW_GLAIVE2); + } } - } - Timer[EVENT_FLIGHT_SEQUENCE] = 700; - break; - case 4: // throw another - SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); - { - uint8 i=0; - Creature* Glaive = me->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - if (Glaive) + Timer[EVENT_FLIGHT_SEQUENCE] = 700; + break; + case 4: // throw another + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); { - GlaiveGUID[i] = Glaive->GetGUID(); - Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Glaive->SetDisplayId(MODEL_INVISIBLE); - Glaive->setFaction(me->getFaction()); - DoCast(Glaive, SPELL_THROW_GLAIVE, true); + uint8 i=0; + Creature* Glaive = me->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + if (Glaive) + { + GlaiveGUID[i] = Glaive->GetGUID(); + Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Glaive->SetDisplayId(MODEL_INVISIBLE); + Glaive->setFaction(me->getFaction()); + DoCast(Glaive, SPELL_THROW_GLAIVE, true); + } } - } - Timer[EVENT_FLIGHT_SEQUENCE] = 5000; - break; - case 5: // summon flames - SummonFlamesOfAzzinoth(); - Timer[EVENT_FLIGHT_SEQUENCE] = 3000; - break; - case 6: // fly to hover point - me->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z); - Timer[EVENT_FLIGHT_SEQUENCE] = 0; - break; - case 7: // return to center - me->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z); - Timer[EVENT_FLIGHT_SEQUENCE] = 0; - break; - case 8: // glaive return - for (uint8 i = 0; i < 2; ++i) - { - if (GlaiveGUID[i]) + Timer[EVENT_FLIGHT_SEQUENCE] = 5000; + break; + case 5: // summon flames + SummonFlamesOfAzzinoth(); + Timer[EVENT_FLIGHT_SEQUENCE] = 3000; + break; + case 6: // fly to hover point + me->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z); + Timer[EVENT_FLIGHT_SEQUENCE] = 0; + break; + case 7: // return to center + me->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z); + Timer[EVENT_FLIGHT_SEQUENCE] = 0; + break; + case 8: // glaive return + for (uint8 i = 0; i < 2; ++i) { - Unit* Glaive = ObjectAccessor::GetUnit(*me, GlaiveGUID[i]); - if (Glaive) + if (GlaiveGUID[i]) { - Glaive->CastSpell(me, SPELL_GLAIVE_RETURNS, false); // Make it look like the Glaive flies back up to us - Glaive->SetDisplayId(MODEL_INVISIBLE); // disappear but not die for now + Unit* Glaive = ObjectAccessor::GetUnit(*me, GlaiveGUID[i]); + if (Glaive) + { + Glaive->CastSpell(me, SPELL_GLAIVE_RETURNS, false); // Make it look like the Glaive flies back up to us + Glaive->SetDisplayId(MODEL_INVISIBLE); // disappear but not die for now + } } } - } - Timer[EVENT_FLIGHT_SEQUENCE] = 2000; - break; - case 9: // land - me->SetDisableGravity(false); - me->StopMoving(); - me->HandleEmoteCommand(EMOTE_ONESHOT_LAND); - for (uint8 i = 0; i < 2; ++i) - { - if (GlaiveGUID[i]) + Timer[EVENT_FLIGHT_SEQUENCE] = 2000; + break; + case 9: // land + me->SetDisableGravity(false); + me->StopMoving(); + me->HandleEmoteCommand(EMOTE_ONESHOT_LAND); + for (uint8 i = 0; i < 2; ++i) { - if (Creature* glaive = ObjectAccessor::GetCreature(*me, GlaiveGUID[i])) - glaive->DespawnOrUnsummon(); + if (GlaiveGUID[i]) + { + if (Creature* glaive = ObjectAccessor::GetCreature(*me, GlaiveGUID[i])) + glaive->DespawnOrUnsummon(); - GlaiveGUID[i].Clear(); + GlaiveGUID[i].Clear(); + } } - } - Timer[EVENT_FLIGHT_SEQUENCE] = 2000; - break; - case 10: // attack - DoResetThreat(); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE); - me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); - EnterPhase(PHASE_NORMAL_2); - break; - default: - break; + Timer[EVENT_FLIGHT_SEQUENCE] = 2000; + break; + case 10: // attack + DoResetThreat(); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE); + me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); + EnterPhase(PHASE_NORMAL_2); + break; + default: + break; } ++FlightCount; } @@ -913,23 +913,23 @@ public: switch (TransformCount) { - case 2: - DoResetThreat(); - break; - case 4: - EnterPhase(PHASE_DEMON); - break; - case 7: - DoResetThreat(); - break; - case 9: - if (MaievGUID) - EnterPhase(PHASE_NORMAL_MAIEV); // Depending on whether we summoned Maiev, we switch to either phase 5 or 3 - else - EnterPhase(PHASE_NORMAL_2); - break; - default: - break; + case 2: + DoResetThreat(); + break; + case 4: + EnterPhase(PHASE_DEMON); + break; + case 7: + DoResetThreat(); + break; + case 9: + if (MaievGUID) + EnterPhase(PHASE_NORMAL_MAIEV); // Depending on whether we summoned Maiev, we switch to either phase 5 or 3 + else + EnterPhase(PHASE_NORMAL_2); + break; + default: + break; } if (Phase == PHASE_TRANSFORM_SEQUENCE) Timer[EVENT_TRANSFORM_SEQUENCE] = DemonTransformation[TransformCount].timer; @@ -957,37 +957,37 @@ public: switch (Phase) { - case PHASE_NORMAL: - if (HealthBelowPct(65)) - EnterPhase(PHASE_FLIGHT_SEQUENCE); - break; + case PHASE_NORMAL: + if (HealthBelowPct(65)) + EnterPhase(PHASE_FLIGHT_SEQUENCE); + break; - case PHASE_NORMAL_2: - if (HealthBelowPct(30)) - EnterPhase(PHASE_TALK_SEQUENCE); - break; + case PHASE_NORMAL_2: + if (HealthBelowPct(30)) + EnterPhase(PHASE_TALK_SEQUENCE); + break; - case PHASE_NORMAL_MAIEV: - if (HealthBelowPct(1)) - EnterPhase(PHASE_TALK_SEQUENCE); - break; + case PHASE_NORMAL_MAIEV: + if (HealthBelowPct(1)) + EnterPhase(PHASE_TALK_SEQUENCE); + break; - case PHASE_TALK_SEQUENCE: - if (Event == EVENT_TALK_SEQUENCE) - HandleTalkSequence(); - break; + case PHASE_TALK_SEQUENCE: + if (Event == EVENT_TALK_SEQUENCE) + HandleTalkSequence(); + break; - case PHASE_FLIGHT_SEQUENCE: - if (Event == EVENT_FLIGHT_SEQUENCE) - HandleFlightSequence(); - break; + case PHASE_FLIGHT_SEQUENCE: + if (Event == EVENT_FLIGHT_SEQUENCE) + HandleFlightSequence(); + break; - case PHASE_TRANSFORM_SEQUENCE: - if (Event == EVENT_TRANSFORM_SEQUENCE) - HandleTransformSequence(); - break; - default: - break; + case PHASE_TRANSFORM_SEQUENCE: + if (Event == EVENT_TRANSFORM_SEQUENCE) + HandleTransformSequence(); + break; + default: + break; } if (me->IsNonMeleeSpellCast(false)) @@ -998,63 +998,63 @@ public: switch (Event) { // PHASE_NORMAL - case EVENT_BERSERK: - Talk(SAY_ILLIDAN_ENRAGE); - DoCast(me, SPELL_BERSERK, true); - Timer[EVENT_BERSERK] = 5000; // The buff actually lasts forever. - break; - - case EVENT_TAUNT: - Talk(SAY_ILLIDAN_TAUNT); - Timer[EVENT_TAUNT] = urand(25000, 35000); - break; - - case EVENT_SHEAR: - // no longer exists in 3.0f.2 - // DoCastVictim(SPELL_SHEAR); - Timer[EVENT_SHEAR] = 25000 + (rand32() % 16 * 1000); - break; - - case EVENT_FLAME_CRASH: - DoCastVictim(SPELL_FLAME_CRASH); - Timer[EVENT_FLAME_CRASH] = urand(30000, 40000); - break; - - case EVENT_PARASITIC_SHADOWFIEND: - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 200, true)) - DoCast(target, SPELL_PARASITIC_SHADOWFIEND, true); - Timer[EVENT_PARASITIC_SHADOWFIEND] = urand(35000, 45000); - } - break; - - case EVENT_PARASITE_CHECK: - Timer[EVENT_PARASITE_CHECK] = 0; - break; - - case EVENT_DRAW_SOUL: - DoCastVictim(SPELL_DRAW_SOUL); - Timer[EVENT_DRAW_SOUL] = urand(50000, 60000); - break; - - // PHASE_NORMAL_2 - case EVENT_AGONIZING_FLAMES: - DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_AGONIZING_FLAMES); - Timer[EVENT_AGONIZING_FLAMES] = 0; - break; - - case EVENT_TRANSFORM_NORMAL: - EnterPhase(PHASE_TRANSFORM_SEQUENCE); - break; - - // PHASE_NORMAL_MAIEV - case EVENT_ENRAGE: - DoCast(me, SPELL_ENRAGE); - Timer[EVENT_ENRAGE] = 0; - break; - - default: - break; + case EVENT_BERSERK: + Talk(SAY_ILLIDAN_ENRAGE); + DoCast(me, SPELL_BERSERK, true); + Timer[EVENT_BERSERK] = 5000; // The buff actually lasts forever. + break; + + case EVENT_TAUNT: + Talk(SAY_ILLIDAN_TAUNT); + Timer[EVENT_TAUNT] = urand(25000, 35000); + break; + + case EVENT_SHEAR: + // no longer exists in 3.0f.2 + // DoCastVictim(SPELL_SHEAR); + Timer[EVENT_SHEAR] = 25000 + (rand32() % 16 * 1000); + break; + + case EVENT_FLAME_CRASH: + DoCastVictim(SPELL_FLAME_CRASH); + Timer[EVENT_FLAME_CRASH] = urand(30000, 40000); + break; + + case EVENT_PARASITIC_SHADOWFIEND: + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 200, true)) + DoCast(target, SPELL_PARASITIC_SHADOWFIEND, true); + Timer[EVENT_PARASITIC_SHADOWFIEND] = urand(35000, 45000); + } + break; + + case EVENT_PARASITE_CHECK: + Timer[EVENT_PARASITE_CHECK] = 0; + break; + + case EVENT_DRAW_SOUL: + DoCastVictim(SPELL_DRAW_SOUL); + Timer[EVENT_DRAW_SOUL] = urand(50000, 60000); + break; + + // PHASE_NORMAL_2 + case EVENT_AGONIZING_FLAMES: + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_AGONIZING_FLAMES); + Timer[EVENT_AGONIZING_FLAMES] = 0; + break; + + case EVENT_TRANSFORM_NORMAL: + EnterPhase(PHASE_TRANSFORM_SEQUENCE); + break; + + // PHASE_NORMAL_MAIEV + case EVENT_ENRAGE: + DoCast(me, SPELL_ENRAGE); + Timer[EVENT_ENRAGE] = 0; + break; + + default: + break; } DoMeleeAttackIfReady(); } @@ -1063,32 +1063,32 @@ public: { switch (Event) { - case EVENT_FIREBALL: - DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_FIREBALL); - Timer[EVENT_FIREBALL] = 3000; - break; - - case EVENT_DARK_BARRAGE: - DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_DARK_BARRAGE); - Timer[EVENT_DARK_BARRAGE] = 0; - break; - - case EVENT_EYE_BLAST: - CastEyeBlast(); - Timer[EVENT_EYE_BLAST] = 0; - break; - - case EVENT_MOVE_POINT: - Phase = PHASE_FLIGHT_SEQUENCE; - Timer[EVENT_FLIGHT_SEQUENCE] = 0; // do not start Event when changing hover point - HoverPoint += (rand32() % 3 + 1); - if (HoverPoint > 3) - HoverPoint -= 4; - me->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z); - break; - - default: - break; + case EVENT_FIREBALL: + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_FIREBALL); + Timer[EVENT_FIREBALL] = 3000; + break; + + case EVENT_DARK_BARRAGE: + DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_DARK_BARRAGE); + Timer[EVENT_DARK_BARRAGE] = 0; + break; + + case EVENT_EYE_BLAST: + CastEyeBlast(); + Timer[EVENT_EYE_BLAST] = 0; + break; + + case EVENT_MOVE_POINT: + Phase = PHASE_FLIGHT_SEQUENCE; + Timer[EVENT_FLIGHT_SEQUENCE] = 0; // do not start Event when changing hover point + HoverPoint += (rand32() % 3 + 1); + if (HoverPoint > 3) + HoverPoint -= 4; + me->GetMotionMaster()->MovePoint(0, HoverPosition[HoverPoint].x, HoverPosition[HoverPoint].y, HoverPosition[HoverPoint].z); + break; + + default: + break; } } @@ -1096,29 +1096,29 @@ public: { switch (Event) { - case EVENT_SHADOW_BLAST: - me->GetMotionMaster()->Clear(false); - if (me->GetVictim() && (!me->IsWithinDistInMap(me->GetVictim(), 50) || !me->IsWithinLOSInMap(me->GetVictim()))) - me->GetMotionMaster()->MoveChase(me->GetVictim(), 30); - else - me->GetMotionMaster()->MoveIdle(); - DoCastVictim(SPELL_SHADOW_BLAST); - Timer[EVENT_SHADOW_BLAST] = 4000; - break; - case EVENT_SHADOWDEMON: - DoCast(me, SPELL_SUMMON_SHADOWDEMON); - Timer[EVENT_SHADOWDEMON] = 0; - Timer[EVENT_FLAME_BURST] += 10000; - break; - case EVENT_FLAME_BURST: - DoCast(me, SPELL_FLAME_BURST); - Timer[EVENT_FLAME_BURST] = 15000; - break; - case EVENT_TRANSFORM_DEMON: - EnterPhase(PHASE_TRANSFORM_SEQUENCE); - break; - default: - break; + case EVENT_SHADOW_BLAST: + me->GetMotionMaster()->Clear(false); + if (me->GetVictim() && (!me->IsWithinDistInMap(me->GetVictim(), 50) || !me->IsWithinLOSInMap(me->GetVictim()))) + me->GetMotionMaster()->MoveChase(me->GetVictim(), 30); + else + me->GetMotionMaster()->MoveIdle(); + DoCastVictim(SPELL_SHADOW_BLAST); + Timer[EVENT_SHADOW_BLAST] = 4000; + break; + case EVENT_SHADOWDEMON: + DoCast(me, SPELL_SUMMON_SHADOWDEMON); + Timer[EVENT_SHADOWDEMON] = 0; + Timer[EVENT_FLAME_BURST] += 10000; + break; + case EVENT_FLAME_BURST: + DoCast(me, SPELL_FLAME_BURST); + Timer[EVENT_FLAME_BURST] = 15000; + break; + case EVENT_TRANSFORM_DEMON: + EnterPhase(PHASE_TRANSFORM_SEQUENCE); + break; + default: + break; } } } @@ -1128,7 +1128,6 @@ public: uint32 Timer[EVENT_ENRAGE + 1]; PhaseIllidan Phase; private: - InstanceScript* instance; EventIllidan Event; uint32 TalkCount; uint32 TransformCount; @@ -1137,7 +1136,6 @@ public: ObjectGuid MaievGUID; ObjectGuid FlameGUID[2]; ObjectGuid GlaiveGUID[2]; - SummonList Summons; }; CreatureAI* GetAI(Creature* creature) const override @@ -1148,7 +1146,7 @@ public: /********************************** End of Illidan AI* *****************************************/ -/******* Functions and vars for Akama's AI* *****/ +/******* Functions and vars for Maiev's AI* *****/ class boss_maiev_shadowsong : public CreatureScript { public: @@ -1377,6 +1375,7 @@ public: } }; +/******* Functions and vars for Akama's AI* *****/ class npc_akama_illidan : public CreatureScript { public: @@ -1434,7 +1433,7 @@ public: KillAllElites(); - me->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has strange values.. + me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); // Database sometimes has strange values.. me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); me->setActive(false); me->SetVisible(false); @@ -1811,7 +1810,7 @@ public: void boss_illidan_stormrage::boss_illidan_stormrageAI::Reset() { - instance->SetBossState(DATA_ILLIDAN_STORMRAGE, NOT_STARTED); + _Reset(); if (Creature* akama = ObjectAccessor::GetCreature(*me, AkamaGUID)) { @@ -1830,12 +1829,11 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::Reset() SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); me->SetDisableGravity(false); me->setActive(false); - Summons.DespawnAll(); } void boss_illidan_stormrage::boss_illidan_stormrageAI::JustSummoned(Creature* summon) { - Summons.Summon(summon); + summons.Summon(summon); switch (summon->GetEntry()) { case PARASITIC_SHADOWFIEND: @@ -1928,7 +1926,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::HandleTalkSequence() break; case 15: DoCast(me, SPELL_DEATH); // Animate his kneeling + stun him - Summons.DespawnAll(); + summons.DespawnAll(); break; case 17: if (Creature* akama = ObjectAccessor::GetCreature(*me, AkamaGUID)) diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index aaf72512ae9..9412067f77e 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -149,7 +149,7 @@ public: void TeleportPlayers() { - uint32 random = urand(0, 7); + uint32 random = urand(0, 6); float X = TeleportPoint[random].x; float Y = TeleportPoint[random].y; float Z = TeleportPoint[random].z; @@ -210,7 +210,7 @@ public: break; case EVENT_PRISMATIC_SHIELD: // Random Prismatic Shield every 15 seconds. - DoCast(me, PrismaticAuras[urand(0, 6)]); + DoCast(me, PrismaticAuras[urand(0, 5)]); events.ScheduleEvent(EVENT_PRISMATIC_SHIELD, 15000); break; case EVENT_FATAL_ATTRACTION: diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index afc7d3d0fd7..d89437c2816 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -135,12 +135,11 @@ public: return GetInstanceAI<boss_reliquary_of_soulsAI>(creature); } - struct boss_reliquary_of_soulsAI : public ScriptedAI + struct boss_reliquary_of_soulsAI : public BossAI { - boss_reliquary_of_soulsAI(Creature* creature) : ScriptedAI(creature) + boss_reliquary_of_soulsAI(Creature* creature) : BossAI(creature, DATA_RELIQUARY_OF_SOULS) { Initialize(); - instance = creature->GetInstanceScript(); Counter = 0; Timer = 0; SoulCount = 0; @@ -152,8 +151,6 @@ public: Phase = 0; } - InstanceScript* instance; - ObjectGuid EssenceGUID; uint32 Phase; @@ -165,7 +162,7 @@ public: void Reset() override { - instance->SetBossState(DATA_RELIQUARY_OF_SOULS, NOT_STARTED); + _Reset(); if (EssenceGUID) { @@ -202,8 +199,7 @@ public: void EnterCombat(Unit* who) override { me->AddThreat(who, 10000.0f); - DoZoneInCombat(); - instance->SetBossState(DATA_RELIQUARY_OF_SOULS, IN_PROGRESS); + _EnterCombat(); Phase = 1; Counter = 0; @@ -246,11 +242,6 @@ public: } } - void JustDied(Unit* /*killer*/) override - { - instance->SetBossState(DATA_RELIQUARY_OF_SOULS, DONE); - } - void UpdateAI(uint32 diff) override { if (!Phase) diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index 1a9074c2464..c9e08176ad6 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -15,45 +15,45 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* -Name: Boss_Shade_of_Akama -%Complete: 80 -Comment: WIP A few more adds to script, ending script, and bugs. -Category: Black Temple -*/ - #include "ObjectMgr.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "PassiveAI.h" #include "ScriptedGossip.h" #include "GridNotifiers.h" #include "black_temple.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" enum Says { - // Akama Ending cinematic text + // Akama SAY_BROKEN_FREE_0 = 0, SAY_BROKEN_FREE_1 = 1, - SAY_BROKEN_FREE_2 = 2 + SAY_BROKEN_FREE_2 = 2, + SAY_LOW_HEALTH = 3, + SAY_DEAD = 4, + // Ashtongue Broken + SAY_BROKEN_SPECIAL = 0, + SAY_BROKEN_HAIL = 1 }; enum Spells { // Akama - SPELL_STEALTH = 34189, // On Spawn - SPELL_AKAMA_SOUL_CHANNEL = 40447, // Cast on self hits Shade - SPELL_FIXATE = 40607, // Cast on self hits Shade - SPELL_CHAIN_LIGHTNING = 39945, // Combat - SPELL_DESTRUCTIVE_POISON = 40874, // Combat + SPELL_STEALTH = 34189, + SPELL_AKAMA_SOUL_CHANNEL = 40447, + SPELL_FIXATE = 40607, + SPELL_CHAIN_LIGHTNING = 39945, + SPELL_DESTRUCTIVE_POISON = 40874, + SPELL_AKAMA_SOUL_EXPEL = 40902, // Shade - SPELL_THREAT = 41602, // self cast hits Akama - SPELL_SHADE_OF_AKAMA_TRIGGER = 40955, // Cast on death - SPELL_AKAMA_SOUL_EXPEL_CHANNEL = 40927, // must hit shade - SPELL_AKAMA_SOUL_EXPEL = 40902, // the one he cast + SPELL_THREAT = 41602, + SPELL_SHADE_OF_AKAMA_TRIGGER = 40955, + SPELL_AKAMA_SOUL_EXPEL_CHANNEL = 40927, // Ashtongue Channeler SPELL_SHADE_SOUL_CHANNEL = 40401, SPELL_SHADE_SOUL_CHANNEL_2 = 40520, - SPELL_SHADOWFORM = 40973, // Cast on Shade // Creature Spawner SPELL_ASHTONGUE_WAVE_B = 42035, SPELL_SUMMON_ASHTONGUE_SORCERER = 40476, @@ -78,11 +78,6 @@ enum Spells enum Creatures { NPC_ASHTONGUE_CHANNELER = 23421, - NPC_ASHTONGUE_SORCERER = 23215, - NPC_ASHTONGUE_DEFENDER = 23216, - NPC_ASHTONGUE_ELEMENTALIST = 23523, - NPC_ASHTONGUE_ROGUE = 23318, - NPC_ASHTONGUE_SPIRITBINDER = 23524, NPC_ASHTONGUE_BROKEN = 23319, NPC_CREATURE_SPAWNER_AKAMA = 23210 }; @@ -95,60 +90,114 @@ enum Factions enum Actions { - ACTION_CHANNELER_DIED = 1, - ACTION_START_SPAWNING = 2, - ACTION_STOP_SPAWNING = 3, - ACTION_DESPAWN_ALL_SPAWNS = 4, + ACTION_START_SPAWNING = 0, + ACTION_STOP_SPAWNING = 1, + ACTION_DESPAWN_ALL_SPAWNS = 2, + ACTION_SHADE_OF_AKAMA_DEAD = 3, + ACTION_BROKEN_SPECIAL = 4, + ACTION_BROKEN_EMOTE = 5, + ACTION_BROKEN_HAIL = 6 }; enum Events { // Akama - EVENT_SHADE_START = 1, - EVENT_SHADE_CHANNEL = 2, - EVENT_FIXATE = 3, - EVENT_CHAIN_LIGHTNING = 4, - EVENT_DESTRUCTIVE_POISON = 5, - // Shade - EVENT_RESET_ENCOUNTER = 6, - EVENT_FIND_CHANNELERS_SPAWNERS = 7, - EVENT_SET_CHANNELERS_SPAWNERS = 8, - EVENT_START_ATTACK_AKAMA = 9, - EVENT_ADD_THREAT = 10, + EVENT_SHADE_START = 1, + EVENT_SHADE_CHANNEL = 2, + EVENT_FIXATE = 3, + EVENT_CHAIN_LIGHTNING = 4, + EVENT_DESTRUCTIVE_POISON = 5, + EVENT_START_BROKEN_FREE = 6, + EVENT_START_SOUL_EXPEL = 7, + EVENT_EVADE_CHECK = 8, + EVENT_BROKEN_FREE_1 = 9, + EVENT_BROKEN_FREE_2 = 10, + EVENT_BROKEN_FREE_3 = 11, + EVENT_BROKEN_FREE_4 = 12, + // Shade of Akama + EVENT_INITIALIZE_SPAWNERS = 13, + EVENT_START_CHANNELERS_AND_SPAWNERS = 14, + EVENT_ADD_THREAT = 15, // Creature spawner - EVENT_SPAWN_WAVE_B = 11, - EVENT_SUMMON_ASHTONGUE_SORCERER = 12, - EVENT_SUMMON_ASHTONGUE_DEFENDER = 13, - // Channeler - EVENT_CHANNEL = 14, - // Ashtongue Sorcerer - EVENT_SORCERER_CHANNEL = 15, + EVENT_SPAWN_WAVE_B = 16, + EVENT_SUMMON_ASHTONGUE_SORCERER = 17, + EVENT_SUMMON_ASHTONGUE_DEFENDER = 18, // Ashtongue Defender - EVENT_DEBILITATING_STRIKE = 16, - EVENT_HEROIC_STRIKE = 17, - EVENT_SHIELD_BASH = 18, - EVENT_WINDFURY = 29, + EVENT_DEBILITATING_STRIKE = 19, + EVENT_HEROIC_STRIKE = 20, + EVENT_SHIELD_BASH = 21, + EVENT_WINDFURY = 22, // Ashtongue Rogue - EVENT_DEBILITATING_POISON = 20, - EVENT_EVISCERATE = 21, + EVENT_DEBILITATING_POISON = 23, + EVENT_EVISCERATE = 24, // Ashtongue Elementalist - EVENT_RAIN_OF_FIRE = 22, - EVENT_LIGHTNING_BOLT = 23, + EVENT_RAIN_OF_FIRE = 25, + EVENT_LIGHTNING_BOLT = 26, // Ashtongue Spiritbinder - EVENT_SPIRIT_HEAL = 24 + EVENT_SPIRIT_HEAL = 27, + EVENT_SPIRIT_MEND_RESET = 28, + EVENT_CHAIN_HEAL_RESET = 29 }; -G3D::Vector3 const ShadeWP = { 512.4877f, 400.7993f, 112.7837f }; +enum Misc +{ + AKAMA_CHANNEL_WAYPOINT = 0, + AKAMA_INTRO_WAYPOINT = 1, + + SUMMON_GROUP_RESET = 1 +}; -G3D::Vector3 const AkamaWP[] = +Position const AkamaWP[2] = { { 517.4877f, 400.7993f, 112.7837f }, { 468.4435f, 401.1062f, 118.5379f } }; -// ######################################################## -// Shade of Akama -// ######################################################## +Position const BrokenPos[18] = +{ + { 495.5628f, 462.7089f, 112.8169f, 4.1808090f }, + { 498.3421f, 463.8384f, 112.8673f, 4.5634810f }, + { 501.6708f, 463.8806f, 112.8673f, 3.7157850f }, + { 532.4264f, 448.4718f, 112.8563f, 3.9813020f }, + { 532.9113f, 451.6227f, 112.8671f, 4.6479530f }, + { 532.8243f, 453.9475f, 112.8671f, 4.7032810f }, + { 521.5317f, 402.3790f, 112.8671f, 3.1138120f }, + { 521.9184f, 404.6848f, 112.8671f, 4.0787760f }, + { 522.4290f, 406.5160f, 112.8671f, 3.3869470f }, + { 521.0833f, 393.1852f, 112.8611f, 3.0750830f }, + { 521.9014f, 395.6381f, 112.8671f, 4.0157140f }, + { 522.2610f, 397.7423f, 112.8671f, 3.4417790f }, + { 532.4565f, 345.3987f, 112.8585f, 1.7232640f }, + { 532.5565f, 346.8792f, 112.8671f, 1.8325960f }, + { 532.5491f, 348.6840f, 112.8671f, 0.2054047f }, + { 501.4669f, 338.5967f, 112.8504f, 1.7038430f }, + { 499.0937f, 337.9894f, 112.8673f, 1.8586250f }, + { 496.8722f, 338.0152f, 112.8673f, 0.5428222f } +}; + +Position const BrokenWP[18] = +{ + { 479.1884f, 434.8635f, 112.7838f }, + { 479.7349f, 435.9843f, 112.7838f }, + { 480.5328f, 436.8310f, 112.7838f }, + { 493.1714f, 420.1136f, 112.7838f }, + { 494.7830f, 417.4830f, 112.7838f }, + { 492.9280f, 423.1891f, 112.7838f }, + { 491.8618f, 403.2035f, 112.7838f }, + { 491.7784f, 400.2046f, 112.7838f }, + { 491.9451f, 406.2023f, 112.7838f }, + { 488.3535f, 395.3652f, 112.7838f }, + { 488.8324f, 392.3267f, 112.7838f }, + { 489.2300f, 398.3135f, 112.7838f }, + { 491.9286f, 383.0433f, 112.7838f }, + { 491.1526f, 380.0966f, 112.7839f }, + { 493.6747f, 385.5407f, 112.7838f }, + { 476.2499f, 369.0865f, 112.7839f }, + { 473.7637f, 367.8766f, 112.7839f }, + { 478.8986f, 370.1895f, 112.7839f } +}; + +static float const MIDDLE_OF_ROOM = 400.0f; class boss_shade_of_akama : public CreatureScript { @@ -160,233 +209,144 @@ public: boss_shade_of_akamaAI(Creature* creature) : BossAI(creature, DATA_SHADE_OF_AKAMA) { Initialize(); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Initialize() { - combatStarted = false; - akamaReached = false; - HasKilledAkama = false; - HasKilledAkamaAndReseting = false; + _spawners.clear(); + _isInPhaseOne = true; } void Reset() override { - _Reset(); - if (!HasKilledAkamaAndReseting) - { - for (GuidList::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr) - if (Creature* Channeler = ObjectAccessor::GetCreature(*me, *itr)) - Channeler->DespawnOrUnsummon(); - - for (GuidList::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr) - if (Creature* Spawner = ObjectAccessor::GetCreature(*me, *itr)) - Spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS); - - events.ScheduleEvent(EVENT_FIND_CHANNELERS_SPAWNERS, 3000); - events.ScheduleEvent(EVENT_RESET_ENCOUNTER, 5000); - } - + Initialize(); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); - + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN); me->SetWalk(true); - Initialize(); + events.ScheduleEvent(EVENT_INITIALIZE_SPAWNERS, Seconds(1)); + me->SummonCreatureGroup(SUMMON_GROUP_RESET); } - void EnterCombat(Unit* /*who*/) override { } - - void AttackStart(Unit* who) override + void EnterEvadeMode(EvadeReason /*why*/) override { - if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) - { - if (Creature* Akama = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) - if (Akama->IsAlive()) - ScriptedAI::AttackStart(Akama); - } - else - ScriptedAI::AttackStart(who); - } + _Reset(); - void DoAction(int32 actionId) override - { - if (actionId == ACTION_CHANNELER_DIED) - me->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2); + for (ObjectGuid const& spawnerGuid : _spawners) + if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid)) + spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS); - UpdateSpeed(); + _DespawnAtEvade(); } void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override { if (spell->Id == SPELL_AKAMA_SOUL_CHANNEL) { - combatStarted = true; - events.ScheduleEvent(EVENT_START_ATTACK_AKAMA, 500); - events.ScheduleEvent(EVENT_SET_CHANNELERS_SPAWNERS, 1000); + events.ScheduleEvent(EVENT_START_CHANNELERS_AND_SPAWNERS, Seconds(1)); me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); - if (Creature* Akama = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) - me->AddThreat(Akama, 10000000.0f); + events.ScheduleEvent(EVENT_EVADE_CHECK, Seconds(10)); + if (Creature* akama = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) + AttackStart(akama); } - else if (spell->Id == SPELL_SHADE_SOUL_CHANNEL_2) - UpdateSpeed(); + + if (spell->Id == SPELL_AKAMA_SOUL_EXPEL) + DoCastSelf(SPELL_AKAMA_SOUL_EXPEL_CHANNEL); } - void UpdateSpeed() + void MovementInform(uint32 motionType, uint32 /*pointId*/) override { - float moveSpeed = 0.2f; - - if (me->GetAuraCount(SPELL_SHADE_SOUL_CHANNEL_2) <= 3) + if (_isInPhaseOne && motionType == CHASE_MOTION_TYPE) { - moveSpeed = (2.0f - (0.6f * me->GetAuraCount(SPELL_SHADE_SOUL_CHANNEL_2))); - me->SetSpeedRate(MOVE_WALK, moveSpeed / 2.5f); - me->SetSpeedRate(MOVE_RUN, (moveSpeed * 2) / 7); - me->ClearUnitState(UNIT_STATE_ROOT); + _isInPhaseOne = false; + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->SetWalk(false); + events.ScheduleEvent(EVENT_ADD_THREAT, Milliseconds(100)); + + for (ObjectGuid const& spawnerGuid : _spawners) + if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid)) + spawner->AI()->DoAction(ACTION_STOP_SPAWNING); } - else - me->AddUnitState(UNIT_STATE_ROOT); } - void UpdateAI(uint32 diff) override + void JustDied(Unit* /*killer*/) override { - if (HasKilledAkamaAndReseting) - return; + DoCastSelf(SPELL_SHADE_OF_AKAMA_TRIGGER); + + if (Creature* akama = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) + akama->AI()->DoAction(ACTION_SHADE_OF_AKAMA_DEAD); + for (ObjectGuid const& spawnerGuid : _spawners) + if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid)) + spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS); + + events.Reset(); + summons.DespawnEntry(NPC_ASHTONGUE_CHANNELER); + instance->SetBossState(DATA_SHADE_OF_AKAMA, DONE); + } + + void EnterEvadeModeIfNeeded() + { + Map::PlayerList const &players = me->GetMap()->GetPlayers(); + for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) + if (Player* player = i->GetSource()) + if (player->IsAlive() && !player->IsGameMaster() && CheckBoundary(player)) + return; + + EnterEvadeMode(EVADE_REASON_NO_HOSTILES); + } + + void UpdateAI(uint32 diff) override + { events.Update(diff); - if (!combatStarted) - { - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_RESET_ENCOUNTER: - if (Creature* Akama = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) - if (!Akama->IsAlive()) - Akama->Respawn(); - break; - case EVENT_FIND_CHANNELERS_SPAWNERS: - { - std::list<Creature*> ChannelerList; - me->GetCreatureListWithEntryInGrid(ChannelerList, NPC_ASHTONGUE_CHANNELER, 15.0f); - - if (!ChannelerList.empty()) - for (std::list<Creature*>::const_iterator itr = ChannelerList.begin(); itr != ChannelerList.end(); ++itr) - { - Channelers.push_back((*itr)->GetGUID()); - if ((*itr)->isDead()) - (*itr)->Respawn(); - } - - std::list<Creature*> SpawnerList; - me->GetCreatureListWithEntryInGrid(SpawnerList, NPC_CREATURE_SPAWNER_AKAMA, 90.0f); - - if (!SpawnerList.empty()) - for (std::list<Creature*>::const_iterator itr = SpawnerList.begin(); itr != SpawnerList.end(); ++itr) - Spawners.push_back((*itr)->GetGUID()); - - me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN); - break; - } - default: - break; - } - } - } - else + if (!UpdateVictim()) + return; + + while (uint32 eventId = events.ExecuteEvent()) { - while (uint32 eventId = events.ExecuteEvent()) + switch (eventId) { - switch (eventId) + case EVENT_INITIALIZE_SPAWNERS: { - case EVENT_SET_CHANNELERS_SPAWNERS: - { - for (GuidList::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr) - if (Creature* Channeler = ObjectAccessor::GetCreature(*me, *itr)) - Channeler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - for (GuidList::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr) - if (Creature* Spawner = ObjectAccessor::GetCreature(*me, *itr)) - Spawner->AI()->DoAction(ACTION_START_SPAWNING); - break; - } - case EVENT_START_ATTACK_AKAMA: - me->GetMotionMaster()->MovePoint(0, ShadeWP.x, ShadeWP.y, ShadeWP.z, false); - events.ScheduleEvent(EVENT_START_ATTACK_AKAMA, 1000); - break; - case EVENT_ADD_THREAT: - DoCast(SPELL_THREAT); - events.ScheduleEvent(EVENT_ADD_THREAT, 3500); - break; - default: - break; - } - } + std::list<Creature*> SpawnerList; + me->GetCreatureListWithEntryInGrid(SpawnerList, NPC_CREATURE_SPAWNER_AKAMA); + for (Creature* spawner : SpawnerList) + _spawners.push_back(spawner->GetGUID()); - if (HasKilledAkama) - { - if (!HasKilledAkamaAndReseting) - { - HasKilledAkamaAndReseting = true; - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - instance->SetBossState(DATA_SHADE_OF_AKAMA, NOT_STARTED); - me->RemoveAllAurasExceptType(SPELL_AURA_DUMMY); - me->DeleteThreatList(); - me->CombatStop(); - me->GetMotionMaster()->MoveTargetedHome(); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); - combatStarted = false; - - if (Creature* Akama = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) - Akama->DespawnOrUnsummon(); - - for (GuidList::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr) - if (Creature* Channeler = ObjectAccessor::GetCreature(*me, *itr)) - Channeler->DespawnOrUnsummon(); - - for (GuidList::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr) - if (Creature* Spawner = ObjectAccessor::GetCreature(*me, *itr)) - Spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS); - - events.ScheduleEvent(EVENT_FIND_CHANNELERS_SPAWNERS, 10000); - events.ScheduleEvent(EVENT_RESET_ENCOUNTER, 20000); + break; } - } - - if (!akamaReached) - { - if (Creature* Akama = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) + case EVENT_START_CHANNELERS_AND_SPAWNERS: { - if (me->IsWithinDist(Akama, 2.0f, false)) - { - akamaReached = true; - me->GetMotionMaster()->Clear(true); - me->GetMotionMaster()->MoveIdle(); - me->SetWalk(false); + for (ObjectGuid const& summonGuid : summons) + if (Creature* channeler = ObjectAccessor::GetCreature(*me, summonGuid)) + channeler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + for (ObjectGuid const& spawnerGuid : _spawners) + if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid)) + spawner->AI()->DoAction(ACTION_START_SPAWNING); - events.CancelEvent(EVENT_START_ATTACK_AKAMA); - events.ScheduleEvent(EVENT_ADD_THREAT, 100); - - for (GuidList::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr) - if (Creature* Spawner = ObjectAccessor::GetCreature(*me, *itr)) - Spawner->AI()->DoAction(ACTION_STOP_SPAWNING); - } + break; } + case EVENT_ADD_THREAT: + DoCast(SPELL_THREAT); + events.Repeat(Seconds(3) + Milliseconds(500)); + break; + case EVENT_EVADE_CHECK: + EnterEvadeModeIfNeeded(); + events.Repeat(Seconds(10)); + break; + default: + break; } - else - DoMeleeAttackIfReady(); } + + DoMeleeAttackIfReady(); } - public: - bool HasKilledAkama; private: - GuidList Channelers; - GuidList Spawners; - bool akamaReached; - bool combatStarted; - bool HasKilledAkamaAndReseting; + GuidVector _spawners; + bool _isInPhaseOne; }; CreatureAI* GetAI(Creature* creature) const override @@ -395,10 +355,6 @@ public: } }; -// ######################################################## -// Akama -// ######################################################## - class npc_akama_shade : public CreatureScript { public: @@ -406,117 +362,188 @@ public: struct npc_akamaAI : public ScriptedAI { - npc_akamaAI(Creature* creature) : ScriptedAI(creature) + npc_akamaAI(Creature* creature) : ScriptedAI(creature), _summons(me) { Initialize(); - instance = creature->GetInstanceScript(); + _instance = creature->GetInstanceScript(); } void Initialize() { - StartChannel = false; - StartCombat = false; - HasYelledOnce = false; - ShadeHasDied = false; + _isInCombat = false; + _hasYelledOnce = false; + _chosen.Clear(); + _summons.DespawnAll(); + _events.Reset(); } void Reset() override { - me->setFaction(FACTION_FRIENDLY); - DoCast(me, SPELL_STEALTH); Initialize(); + me->setFaction(FACTION_FRIENDLY); + DoCastSelf(SPELL_STEALTH); - if (instance->GetBossState(DATA_SHADE_OF_AKAMA) != DONE) + if (_instance->GetBossState(DATA_SHADE_OF_AKAMA) != DONE) me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } - void JustDied(Unit* /*killer*/) override + void JustSummoned(Creature* summon) override { - if (Creature* Shade = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SHADE_OF_AKAMA))) - if (Shade->IsAlive()) - ENSURE_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->HasKilledAkama = true; - me->GetMotionMaster()->Clear(true); - me->GetMotionMaster()->MoveIdle(); + _summons.Summon(summon); } + void EnterEvadeMode(EvadeReason /*why*/) override { } + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override { - if (spell->Id == SPELL_THREAT && !StartCombat) + if (spell->Id == SPELL_THREAT && !_isInCombat) { - me->ClearUnitState(UNIT_STATE_ROOT); - me->RemoveAura(SPELL_AKAMA_SOUL_CHANNEL); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); - if (Creature* Shade = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SHADE_OF_AKAMA))) - Shade->RemoveAura(SPELL_AKAMA_SOUL_CHANNEL); - StartCombat = true; + _isInCombat = true; + me->SetWalk(false); + me->RemoveAurasDueToSpell(SPELL_AKAMA_SOUL_CHANNEL); + if (Creature* shade = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_SHADE_OF_AKAMA))) + { + shade->RemoveAurasDueToSpell(SPELL_AKAMA_SOUL_CHANNEL); + AttackStart(shade); + _events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, Seconds(2)); + _events.ScheduleEvent(EVENT_DESTRUCTIVE_POISON, Seconds(5)); + } } } - void EnterCombat(Unit* /*who*/) override + void DamageTaken(Unit* /*who*/, uint32& /*damage*/) override { - events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 2000); - events.ScheduleEvent(EVENT_DESTRUCTIVE_POISON, 5000); + if (me->HealthBelowPct(20) && !_hasYelledOnce) + { + _hasYelledOnce = true; + Talk(SAY_LOW_HEALTH); + } } - void UpdateAI(uint32 diff) override + void DoAction(int32 actionId) override { - if (StartChannel) + if (actionId == ACTION_SHADE_OF_AKAMA_DEAD) { - events.Update(diff); + _isInCombat = false; + me->CombatStop(true); + me->setFaction(FACTION_FRIENDLY); + me->SetWalk(true); + _events.Reset(); + me->GetMotionMaster()->MovePoint(AKAMA_INTRO_WAYPOINT, AkamaWP[1]); + } + } - while (uint32 eventId = events.ExecuteEvent()) + void MovementInform(uint32 motionType, uint32 pointId) override + { + if (motionType != POINT_MOTION_TYPE) + return; + + if (pointId == AKAMA_CHANNEL_WAYPOINT) + _events.ScheduleEvent(EVENT_SHADE_CHANNEL, Seconds(1)); + + else if (pointId == AKAMA_INTRO_WAYPOINT) + { + me->SetWalk(false); + me->SetFacingTo(0.08726646f); + _events.ScheduleEvent(EVENT_START_SOUL_EXPEL, Seconds(1)); + } + } + + void SummonBrokens() + { + for (uint8 i = 0; i < 18; i++) + { + if (TempSummon* summoned = me->SummonCreature(NPC_ASHTONGUE_BROKEN, BrokenPos[i])) { - switch (eventId) - { - case EVENT_SHADE_START: - instance->SetBossState(DATA_SHADE_OF_AKAMA, IN_PROGRESS); - me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - me->RemoveAura(SPELL_STEALTH); - me->SetWalk(true); - me->GetMotionMaster()->MovePoint(0, AkamaWP[0].x, AkamaWP[0].y, AkamaWP[0].z, false); - events.ScheduleEvent(EVENT_SHADE_CHANNEL, 10000); - break; - case EVENT_SHADE_CHANNEL: - me->AddUnitState(UNIT_STATE_ROOT); - me->SetFacingTo(3.118662f); - DoCast(me, SPELL_AKAMA_SOUL_CHANNEL); - me->setFaction(FACTION_COMBAT); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); - events.ScheduleEvent(EVENT_FIXATE, 5000); - break; - case EVENT_FIXATE: - DoCast(SPELL_FIXATE); - StartChannel = false; - break; - default: - break; - } + summoned->SetWalk(true); + summoned->GetMotionMaster()->MovePoint(0, BrokenWP[i]); + if (i == 9) //On Sniffs, npc that Yell "Special" is the tenth to be created + _chosen = summoned->GetGUID(); } } + } - if (!UpdateVictim()) - return; - - events.Update(diff); + void UpdateAI(uint32 diff) override + { + _events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = _events.ExecuteEvent()) { switch (eventId) { + case EVENT_SHADE_START: + _instance->SetBossState(DATA_SHADE_OF_AKAMA, IN_PROGRESS); + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + me->RemoveAurasDueToSpell(SPELL_STEALTH); + me->SetWalk(true); + me->GetMotionMaster()->MovePoint(AKAMA_CHANNEL_WAYPOINT, AkamaWP[0], false); + break; + case EVENT_SHADE_CHANNEL: + me->SetFacingTo(3.118662f); + DoCastSelf(SPELL_AKAMA_SOUL_CHANNEL); + me->setFaction(FACTION_COMBAT); + _events.ScheduleEvent(EVENT_FIXATE, Seconds(5)); + break; + case EVENT_FIXATE: + DoCast(SPELL_FIXATE); + break; case EVENT_CHAIN_LIGHTNING: DoCastVictim(SPELL_CHAIN_LIGHTNING); - events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, urand(10000, 15000)); + _events.Repeat(randtime(Seconds(8), Seconds(15))); break; case EVENT_DESTRUCTIVE_POISON: - DoCast(me, SPELL_DESTRUCTIVE_POISON); - events.ScheduleEvent(EVENT_DESTRUCTIVE_POISON, urand(4000, 5000)); + DoCastSelf(SPELL_DESTRUCTIVE_POISON); + _events.Repeat(randtime(Seconds(3), Seconds(7))); + break; + case EVENT_START_SOUL_EXPEL: + DoCast(SPELL_AKAMA_SOUL_EXPEL); + _events.ScheduleEvent(EVENT_START_BROKEN_FREE, Seconds(15)); + break; + case EVENT_START_BROKEN_FREE: + me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); + Talk(SAY_BROKEN_FREE_0); + SummonBrokens(); + _events.ScheduleEvent(EVENT_BROKEN_FREE_1, Seconds(10)); + break; + case EVENT_BROKEN_FREE_1: + Talk(SAY_BROKEN_FREE_1); + _events.ScheduleEvent(EVENT_BROKEN_FREE_2, Seconds(12)); + break; + case EVENT_BROKEN_FREE_2: + Talk(SAY_BROKEN_FREE_2); + _events.ScheduleEvent(EVENT_BROKEN_FREE_3, Seconds(15)); + break; + case EVENT_BROKEN_FREE_3: + if (Creature* special = ObjectAccessor::GetCreature(*me, _chosen)) + special->AI()->Talk(SAY_BROKEN_SPECIAL); + + _summons.DoAction(ACTION_BROKEN_EMOTE, _pred); + _events.ScheduleEvent(EVENT_BROKEN_FREE_4, Seconds(5)); + break; + case EVENT_BROKEN_FREE_4: + _summons.DoAction(ACTION_BROKEN_HAIL, _pred); break; default: break; } } - DoMeleeAttackIfReady(); + if (me->getFaction() == FACTION_COMBAT) + { + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + } + + void JustDied(Unit* /*killer*/) override + { + _summons.DespawnAll(); + Talk(SAY_DEAD); + if (Creature* shade = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_SHADE_OF_AKAMA))) + if (shade->IsAlive()) + shade->AI()->EnterEvadeMode(EVADE_REASON_OTHER); } void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override @@ -524,19 +551,18 @@ public: if (gossipListId == 0) { player->CLOSE_GOSSIP_MENU(); - StartChannel = true; - events.ScheduleEvent(EVENT_SHADE_START, 500); + _events.ScheduleEvent(EVENT_SHADE_START, Milliseconds(500)); } } private: - InstanceScript* instance; - EventMap events; - bool StartChannel; - bool ShadeHasDied; - bool StartCombat; - bool HasYelledOnce; - + InstanceScript* _instance; + EventMap _events; + SummonList _summons; + DummyEntryCheckPredicate _pred; + ObjectGuid _chosen; //Creature that should yell the speech special. + bool _isInCombat; + bool _hasYelledOnce; }; CreatureAI* GetAI(Creature* creature) const override @@ -545,70 +571,44 @@ public: } }; -// ######################################################## -// Ashtongue Channeler -// ######################################################## - class npc_ashtongue_channeler : public CreatureScript { public: npc_ashtongue_channeler() : CreatureScript("npc_ashtongue_channeler") { } - struct npc_ashtongue_channelerAI : public ScriptedAI + struct npc_ashtongue_channelerAI : public PassiveAI { - npc_ashtongue_channelerAI(Creature* creature) : ScriptedAI(creature) + npc_ashtongue_channelerAI(Creature* creature) : PassiveAI(creature) { - instance = creature->GetInstanceScript(); + _instance = creature->GetInstanceScript(); } void Reset() override { - me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true); + _scheduler.Schedule(Seconds(2), [this](TaskContext channel) + { + if (Creature* shade = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_SHADE_OF_AKAMA))) + { + if (shade->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + DoCastSelf(SPELL_SHADE_SOUL_CHANNEL); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - events.ScheduleEvent(EVENT_CHANNEL, 2000); - } + else + me->DespawnOrUnsummon(Seconds(3)); + } - void JustDied(Unit* /*killer*/) override - { - if (Creature* Shade = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SHADE_OF_AKAMA))) - Shade->AI()->DoAction(ACTION_CHANNELER_DIED); + channel.Repeat(Seconds(2)); + }); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void EnterCombat(Unit* /*who*/) override { } - void AttackStart(Unit* /*who*/) override { } - void UpdateAI(uint32 diff) override { - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_CHANNEL: - if (Creature* Shade = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SHADE_OF_AKAMA))) - { - if (Shade->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) - DoCast(me, SPELL_SHADE_SOUL_CHANNEL); - else - { - me->InterruptSpell(CURRENT_CHANNELED_SPELL); - Shade->AI()->DoAction(ACTION_CHANNELER_DIED); - } - } - events.ScheduleEvent(EVENT_CHANNEL, 2000); - break; - default: - break; - } - } + _scheduler.Update(diff); } private: - InstanceScript* instance; - EventMap events; + InstanceScript* _instance; + TaskScheduler _scheduler; }; CreatureAI* GetAI(Creature* creature) const override @@ -617,10 +617,6 @@ public: } }; -// ######################################################## -// Creature Generator Akama -// ######################################################## - class npc_creature_generator_akama : public CreatureScript { public: @@ -628,57 +624,53 @@ public: struct npc_creature_generator_akamaAI : public ScriptedAI { - npc_creature_generator_akamaAI(Creature* creature) : ScriptedAI(creature), Summons(me) + npc_creature_generator_akamaAI(Creature* creature) : ScriptedAI(creature), _summons(me) { Initialize(); - instance = creature->GetInstanceScript(); } void Initialize() { - doSpawning = false; - leftSide = false; + _leftSide = false; + _events.Reset(); + _summons.DespawnAll(); } void Reset() override { - Summons.DespawnAll(); - Initialize(); - if (me->GetPositionY() < 400.0f) - leftSide = true; + if (me->GetPositionY() < MIDDLE_OF_ROOM) + _leftSide = true; } void JustSummoned(Creature* summon) override { - Summons.Summon(summon); + _summons.Summon(summon); } void DoAction(int32 actionId) override { - doSpawning = true; - switch (actionId) { case ACTION_START_SPAWNING: - if (leftSide) + if (_leftSide) { - events.ScheduleEvent(EVENT_SPAWN_WAVE_B, 100); - events.ScheduleEvent(EVENT_SUMMON_ASHTONGUE_SORCERER, urand(2000, 5000)); + _events.ScheduleEvent(EVENT_SPAWN_WAVE_B, Milliseconds(100)); + _events.ScheduleEvent(EVENT_SUMMON_ASHTONGUE_SORCERER, randtime(Seconds(2), Seconds(5))); } else { - events.ScheduleEvent(EVENT_SPAWN_WAVE_B, 10000); - events.ScheduleEvent(EVENT_SUMMON_ASHTONGUE_DEFENDER, urand(2000, 5000)); + _events.ScheduleEvent(EVENT_SPAWN_WAVE_B, Seconds(10)); + _events.ScheduleEvent(EVENT_SUMMON_ASHTONGUE_DEFENDER, randtime(Seconds(2), Seconds(5))); } break; case ACTION_STOP_SPAWNING: - doSpawning = false; + _events.Reset(); break; case ACTION_DESPAWN_ALL_SPAWNS: - doSpawning = false; - Summons.DespawnAll(); + _events.Reset(); + _summons.DespawnAll(); break; default: break; @@ -687,39 +679,34 @@ public: void UpdateAI(uint32 diff) override { - if (doSpawning) - { - events.Update(diff); + _events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) { - switch (eventId) - { - case EVENT_SPAWN_WAVE_B: - DoCast(me, SPELL_ASHTONGUE_WAVE_B); - events.ScheduleEvent(EVENT_SPAWN_WAVE_B, urand(45000, 50000)); - break; - case EVENT_SUMMON_ASHTONGUE_SORCERER: // left - DoCast(me, SPELL_SUMMON_ASHTONGUE_SORCERER); - events.ScheduleEvent(EVENT_SUMMON_ASHTONGUE_SORCERER, urand(30000, 35000)); - break; - case EVENT_SUMMON_ASHTONGUE_DEFENDER: // right - DoCast(me, SPELL_SUMMON_ASHTONGUE_DEFENDER); - events.ScheduleEvent(EVENT_SUMMON_ASHTONGUE_DEFENDER, urand(30000, 35000)); - break; - default: - break; - } + case EVENT_SPAWN_WAVE_B: + DoCastSelf(SPELL_ASHTONGUE_WAVE_B); + _events.Repeat(randtime(Seconds(50), Seconds(60))); + break; + case EVENT_SUMMON_ASHTONGUE_SORCERER: // left + DoCastSelf(SPELL_SUMMON_ASHTONGUE_SORCERER); + _events.Repeat(randtime(Seconds(30), Seconds(35))); + break; + case EVENT_SUMMON_ASHTONGUE_DEFENDER: // right + DoCastSelf(SPELL_SUMMON_ASHTONGUE_DEFENDER); + _events.Repeat(randtime(Seconds(30), Seconds(40))); + break; + default: + break; } } } private: - InstanceScript* instance; - EventMap events; - SummonList Summons; - bool leftSide; - bool doSpawning; + EventMap _events; + SummonList _summons; + bool _leftSide; }; CreatureAI* GetAI(Creature* creature) const override @@ -728,10 +715,6 @@ public: } }; -// ######################################################## -// Ashtongue Sorcerer -// ######################################################## - class npc_ashtongue_sorcerer : public CreatureScript { public: @@ -742,103 +725,96 @@ public: npc_ashtongue_sorcererAI(Creature* creature) : ScriptedAI(creature) { Initialize(); - instance = creature->GetInstanceScript(); + _instance = creature->GetInstanceScript(); } void Initialize() { - startedBanishing = false; - switchToCombat = false; + _switchToCombat = false; + _inBanish = false; } void Reset() override { - if (!startedBanishing) + if (Creature* shade = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_SHADE_OF_AKAMA))) { - if (Creature* Shade = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SHADE_OF_AKAMA))) + if (shade->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + me->GetMotionMaster()->MovePoint(0, shade->GetPosition()); + + else { - if (Shade->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) - me->GetMotionMaster()->MovePoint(0, Shade->GetPositionX(), Shade->GetPositionY(), Shade->GetPositionZ(), false); - else - { - if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) - AttackStart(target); - } + if (Creature* akama = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_AKAMA_SHADE))) + AttackStart(akama); } } - Initialize(); } void JustDied(Unit* /*killer*/) override { - if (Creature* Shade = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SHADE_OF_AKAMA))) - Shade->AI()->DoAction(ACTION_CHANNELER_DIED); - me->DespawnOrUnsummon(5000); + me->DespawnOrUnsummon(Seconds(5)); } + void EnterEvadeMode(EvadeReason /*why*/) override { } void EnterCombat(Unit* /*who*/) override { } void AttackStart(Unit* who) override { - if (!switchToCombat) + if (!_switchToCombat) return; + ScriptedAI::AttackStart(who); } - void UpdateAI(uint32 diff) override + void MoveInLineOfSight(Unit* who) override { - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) + if (!_inBanish && who->GetGUID() == _instance->GetGuidData(DATA_SHADE_OF_AKAMA) && me->IsWithinDist(who, 20.0f, false)) { - switch (eventId) + _inBanish = true; + me->StopMoving(); + me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->MovePoint(1, me->GetPositionX() + frand(-8.0f, 8.0f), me->GetPositionY() + frand(-8.0f, 8.0f), me->GetPositionZ()); + + _scheduler.Schedule(Seconds(1) + Milliseconds(500), [this](TaskContext sorcer_channel) { - case EVENT_SORCERER_CHANNEL: - if (Creature* Shade = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SHADE_OF_AKAMA))) + if (Creature* shade = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_SHADE_OF_AKAMA))) + { + if (shade->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) { - if (Shade->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) - { - me->SetFacingToObject(Shade); - DoCast(me, SPELL_SHADE_SOUL_CHANNEL); - events.ScheduleEvent(EVENT_SORCERER_CHANNEL, 2000); - } - else - { - me->InterruptSpell(CURRENT_CHANNELED_SPELL); - Shade->AI()->DoAction(ACTION_CHANNELER_DIED); - switchToCombat = true; - if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) - AttackStart(target); - } + me->SetFacingToObject(shade); + DoCastSelf(SPELL_SHADE_SOUL_CHANNEL); + sorcer_channel.Repeat(Seconds(2)); } - break; - default: - break; - } + else + { + me->InterruptSpell(CURRENT_CHANNELED_SPELL); + _switchToCombat = true; + if (Creature* akama = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_AKAMA_SHADE))) + AttackStart(akama); + } + } + }); } + } - if (!startedBanishing) - { - Creature* Shade = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SHADE_OF_AKAMA)); - if (me->IsWithinDist(Shade, 20.0f, false)) - { - me->StopMoving(); - me->GetMotionMaster()->Clear(false); - me->GetMotionMaster()->MovePoint(1, me->GetPositionX() + frand (-8.0f, 8.0f), me->GetPositionY() + frand (-8.0f, 8.0f), me->GetPositionZ(), false); - events.ScheduleEvent(EVENT_SORCERER_CHANNEL, 1500); - startedBanishing = true; - } - } + void UpdateAI(uint32 diff) override + { + _scheduler.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + if (!UpdateVictim()) + return; DoMeleeAttackIfReady(); } private: - InstanceScript* instance; - EventMap events; - bool startedBanishing; - bool switchToCombat; + InstanceScript* _instance; + TaskScheduler _scheduler; + bool _switchToCombat; + bool _inBanish; }; CreatureAI* GetAI(Creature* creature) const override @@ -847,10 +823,6 @@ public: } }; -// ######################################################## -// Ashtongue Defender -// ######################################################## - class npc_ashtongue_defender : public CreatureScript { public: @@ -860,54 +832,55 @@ public: { npc_ashtongue_defenderAI(Creature* creature) : ScriptedAI(creature) { - instance = creature->GetInstanceScript(); + _instance = creature->GetInstanceScript(); } void Reset() override { - if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) - AttackStart(target); + if (Creature* akama = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_AKAMA_SHADE))) + AttackStart(akama); } void JustDied(Unit* /*killer*/) override { - me->DespawnOrUnsummon(5000); + me->DespawnOrUnsummon(Seconds(5)); } void EnterCombat(Unit* /*who*/) override { - events.ScheduleEvent(EVENT_HEROIC_STRIKE, 5000); - events.ScheduleEvent(EVENT_SHIELD_BASH, urand(10000, 16000)); - events.ScheduleEvent(EVENT_DEBILITATING_STRIKE, urand(10000, 16000)); - events.ScheduleEvent(EVENT_WINDFURY, urand(8000, 12000)); + _events.ScheduleEvent(EVENT_HEROIC_STRIKE, Seconds(5)); + _events.ScheduleEvent(EVENT_SHIELD_BASH, randtime(Seconds(10), Seconds(16))); + _events.ScheduleEvent(EVENT_DEBILITATING_STRIKE, randtime(Seconds(10), Seconds(16))); + _events.ScheduleEvent(EVENT_WINDFURY, randtime(Seconds(8), Seconds(12))); } + void UpdateAI(uint32 diff) override { if (!UpdateVictim()) return; - events.Update(diff); + _events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = _events.ExecuteEvent()) { switch (eventId) { case EVENT_DEBILITATING_STRIKE: DoCastVictim(SPELL_DEBILITATING_STRIKE); - events.ScheduleEvent(EVENT_DEBILITATING_STRIKE, urand(8000, 16000)); + _events.Repeat(randtime(Seconds(20), Seconds(25))); break; case EVENT_HEROIC_STRIKE: - DoCast(me, SPELL_HEROIC_STRIKE); - events.ScheduleEvent(EVENT_HEROIC_STRIKE, urand(50000, 60000)); + DoCastSelf(SPELL_HEROIC_STRIKE); + _events.Repeat(randtime(Seconds(5), Seconds(15))); break; case EVENT_SHIELD_BASH: DoCastVictim(SPELL_SHIELD_BASH); - events.ScheduleEvent(EVENT_SHIELD_BASH, urand(8000, 16000)); + _events.Repeat(randtime(Seconds(10), Seconds(20))); break; case EVENT_WINDFURY: DoCastVictim(SPELL_WINDFURY); - events.ScheduleEvent(EVENT_WINDFURY, urand(6000 , 8000)); + _events.Repeat(randtime(Seconds(6), Seconds(8))); break; default: break; @@ -918,8 +891,8 @@ public: } private: - InstanceScript* instance; - EventMap events; + InstanceScript* _instance; + EventMap _events; }; CreatureAI* GetAI(Creature* creature) const override @@ -928,10 +901,6 @@ public: } }; -// ######################################################## -// Ashtongue Rogue -// ######################################################## - class npc_ashtongue_rogue : public CreatureScript { public: @@ -941,44 +910,46 @@ public: { npc_ashtongue_rogueAI(Creature* creature) : ScriptedAI(creature) { - instance = creature->GetInstanceScript(); + _instance = creature->GetInstanceScript(); } void Reset() override { - if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) - AttackStart(target); + if (Creature* akama = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_AKAMA_SHADE))) + AttackStart(akama); } void JustDied(Unit* /*killer*/) override { - me->DespawnOrUnsummon(5000); + me->DespawnOrUnsummon(Seconds(5)); } void EnterCombat(Unit* /*who*/) override { - events.ScheduleEvent(EVENT_DEBILITATING_POISON, urand(500, 2000)); - events.ScheduleEvent(EVENT_EVISCERATE, urand(2000, 5000)); + _events.ScheduleEvent(EVENT_DEBILITATING_POISON, randtime(Milliseconds(500), Seconds(2))); + _events.ScheduleEvent(EVENT_EVISCERATE, randtime(Seconds(2), Seconds(5))); } + void EnterEvadeMode(EvadeReason /*why*/) override { } + void UpdateAI(uint32 diff) override { if (!UpdateVictim()) return; - events.Update(diff); + _events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = _events.ExecuteEvent()) { switch (eventId) { case EVENT_DEBILITATING_POISON: DoCastVictim(SPELL_DEBILITATING_POISON); - events.ScheduleEvent(EVENT_DEBILITATING_POISON, urand(14000, 18000)); + _events.Repeat(randtime(Seconds(15), Seconds(20))); break; case EVENT_EVISCERATE: DoCastVictim(SPELL_EVISCERATE); - events.ScheduleEvent(EVENT_EVISCERATE, urand(12000, 16000)); + _events.Repeat(randtime(Seconds(12), Seconds(20))); break; default: break; @@ -989,8 +960,8 @@ public: } private: - InstanceScript* instance; - EventMap events; + InstanceScript* _instance; + EventMap _events; }; CreatureAI* GetAI(Creature* creature) const override @@ -999,10 +970,6 @@ public: } }; -// ######################################################## -// Ashtongue Elementalist -// ######################################################## - class npc_ashtongue_elementalist : public CreatureScript { public: @@ -1012,44 +979,46 @@ public: { npc_ashtongue_elementalistAI(Creature* creature) : ScriptedAI(creature) { - instance = creature->GetInstanceScript(); + _instance = creature->GetInstanceScript(); } void Reset() override { - if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) - AttackStart(target); + if (Creature* akama = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_AKAMA_SHADE))) + AttackStart(akama); } void JustDied(Unit* /*killer*/) override { - me->DespawnOrUnsummon(5000); + me->DespawnOrUnsummon(Seconds(5)); } void EnterCombat(Unit* /*who*/) override { - events.ScheduleEvent(EVENT_RAIN_OF_FIRE, 18000); - events.ScheduleEvent(EVENT_LIGHTNING_BOLT, 6000); + _events.ScheduleEvent(EVENT_RAIN_OF_FIRE, Seconds(18)); + _events.ScheduleEvent(EVENT_LIGHTNING_BOLT, Seconds(6)); } + void EnterEvadeMode(EvadeReason /*why*/) override { } + void UpdateAI(uint32 diff) override { if (!UpdateVictim()) return; - events.Update(diff); + _events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = _events.ExecuteEvent()) { switch (eventId) { case EVENT_RAIN_OF_FIRE: DoCastVictim(SPELL_RAIN_OF_FIRE); - events.ScheduleEvent(EVENT_RAIN_OF_FIRE, 20000); + _events.Repeat(randtime(Seconds(15), Seconds(20))); break; case EVENT_LIGHTNING_BOLT: DoCastVictim(SPELL_LIGHTNING_BOLT); - events.ScheduleEvent(EVENT_LIGHTNING_BOLT, 15000); + _events.Repeat(randtime(Seconds(8), Seconds(15))); break; default: break; @@ -1060,8 +1029,8 @@ public: } private: - InstanceScript* instance; - EventMap events; + InstanceScript* _instance; + EventMap _events; }; CreatureAI* GetAI(Creature* creature) const override @@ -1070,10 +1039,6 @@ public: } }; -// ######################################################## -// Ashtongue Spiritbinder -// ######################################################## - class npc_ashtongue_spiritbinder : public CreatureScript { public: @@ -1084,44 +1049,72 @@ public: npc_ashtongue_spiritbinderAI(Creature* creature) : ScriptedAI(creature) { Initialize(); - instance = creature->GetInstanceScript(); + _instance = creature->GetInstanceScript(); } void Initialize() { - spiritMend = false; - chainHeal = false; + _spiritMend = false; + _chainHeal = false; } void Reset() override { Initialize(); - if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE))) - AttackStart(target); + if (Creature* akama = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_AKAMA_SHADE))) + AttackStart(akama); } void JustDied(Unit* /*killer*/) override { - me->DespawnOrUnsummon(5000); + me->DespawnOrUnsummon(Seconds(5)); } void EnterCombat(Unit* /*who*/) override { - events.ScheduleEvent(EVENT_SPIRIT_HEAL, urand (5000, 6000)); + _events.ScheduleEvent(EVENT_SPIRIT_HEAL, randtime(Seconds(5), Seconds(6))); } + void DamageTaken(Unit* /*who*/, uint32& /*damage*/) override + { + if (!_spiritMend) + if (HealthBelowPct(30)) + { + DoCastSelf(SPELL_SPIRIT_MEND); + _spiritMend = true; + _events.ScheduleEvent(EVENT_SPIRIT_MEND_RESET, randtime(Seconds(10),Seconds(15))); + } + + if (!_chainHeal) + if (HealthBelowPct(50)) + { + DoCastSelf(SPELL_CHAIN_HEAL); + _chainHeal = true; + _events.ScheduleEvent(EVENT_CHAIN_HEAL_RESET, randtime(Seconds(10), Seconds(15))); + } + + } + + void EnterEvadeMode(EvadeReason /*why*/) override { } + void UpdateAI(uint32 diff) override { - events.Update(diff); + _events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = _events.ExecuteEvent()) { switch (eventId) { case EVENT_SPIRIT_HEAL: - DoCast(me, SPELL_SPIRITBINDER_SPIRIT_HEAL); - events.ScheduleEvent(EVENT_SPIRIT_HEAL, urand (13000, 16000)); + DoCastSelf(SPELL_SPIRITBINDER_SPIRIT_HEAL); + _events.Repeat(randtime(Seconds(13), Seconds(16))); + break; + case EVENT_SPIRIT_MEND_RESET: + _spiritMend = false; + break; + case EVENT_CHAIN_HEAL_RESET: + _chainHeal = false; break; default: break; @@ -1131,32 +1124,14 @@ public: if (!UpdateVictim()) return; - if (!spiritMend) - { - if (HealthBelowPct(25)) - { - DoCast(me, SPELL_SPIRIT_MEND); - spiritMend = true; - } - } - - if (!chainHeal) - { - if (HealthBelowPct(40)) - { - DoCast(me, SPELL_CHAIN_HEAL); - chainHeal = true; - } - } - DoMeleeAttackIfReady(); } private: - InstanceScript* instance; - EventMap events; - bool spiritMend; - bool chainHeal; + InstanceScript* _instance; + EventMap _events; + bool _spiritMend; + bool _chainHeal; }; CreatureAI* GetAI(Creature* creature) const override @@ -1165,6 +1140,119 @@ public: } }; +class npc_ashtongue_broken : public CreatureScript +{ +public: + npc_ashtongue_broken() : CreatureScript("npc_ashtongue_broken") { } + + struct npc_ashtongue_brokenAI : public ScriptedAI + { + npc_ashtongue_brokenAI(Creature* creature) : ScriptedAI(creature) + { + _instance = me->GetInstanceScript(); + } + + void MovementInform(uint32 motionType, uint32 /*pointId*/) override + { + if (motionType != POINT_MOTION_TYPE) + return; + + if (Creature* akama = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_AKAMA_SHADE))) + me->SetFacingToObject(akama); + } + + void DoAction(int32 actionId) override + { + switch (actionId) + { + case ACTION_BROKEN_SPECIAL: + Talk(SAY_BROKEN_SPECIAL); + break; + case ACTION_BROKEN_HAIL: + me->setFaction(FACTION_FRIENDLY); + Talk(SAY_BROKEN_HAIL); + break; + case ACTION_BROKEN_EMOTE: + me->SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_STAND_STATE, UNIT_STAND_STATE_KNEEL); + break; + default: + break; + } + } + + private: + InstanceScript* _instance; + }; + + + CreatureAI* GetAI(Creature* creature) const override + { + return GetInstanceAI<npc_ashtongue_brokenAI>(creature); + } +}; + +class spell_shade_soul_channel_serverside : public SpellScriptLoader +{ +public: + spell_shade_soul_channel_serverside() : SpellScriptLoader("spell_shade_soul_channel_serverside") { } + + class spell_shade_soul_channel_serverside_AuraScript : public AuraScript + { + PrepareAuraScript(spell_shade_soul_channel_serverside_AuraScript); + + bool Validate(SpellInfo const* /*spell*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHADE_SOUL_CHANNEL_2)) + return false; + return true; + } + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2); + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_shade_soul_channel_serverside_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_shade_soul_channel_serverside_AuraScript(); + } +}; + +class spell_shade_soul_channel : public SpellScriptLoader +{ +public: + spell_shade_soul_channel() : SpellScriptLoader("spell_shade_soul_channel") { } + + class spell_shade_soul_channel_AuraScript : public AuraScript + { + PrepareAuraScript(spell_shade_soul_channel_AuraScript); + + void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) + { + int32 const maxSlowEff = -99; + if (aurEff->GetAmount() < maxSlowEff) + if (AuraEffect* slowEff = GetEffect(EFFECT_0)) + slowEff->ChangeAmount(maxSlowEff); + } + + void Register() override + { + AfterEffectApply += AuraEffectApplyFn(spell_shade_soul_channel_AuraScript::OnApply, EFFECT_0, SPELL_AURA_MOD_DECREASE_SPEED, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_shade_soul_channel_AuraScript(); + } +}; + void AddSC_boss_shade_of_akama() { new boss_shade_of_akama(); @@ -1176,4 +1264,7 @@ void AddSC_boss_shade_of_akama() new npc_ashtongue_rogue(); new npc_ashtongue_elementalist(); new npc_ashtongue_spiritbinder(); + new npc_ashtongue_broken(); + new spell_shade_soul_channel_serverside(); + new spell_shade_soul_channel(); } diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index 72eb99bd7dc..56d333b2dda 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -91,7 +91,7 @@ public: void Despawn() { - me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + me->DealDamage(me, me->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); me->RemoveCorpse(); } @@ -218,7 +218,7 @@ public: { Creature* Teron = (ObjectAccessor::GetCreature((*me), TeronGUID)); if (!Teron || !Teron->IsAlive() || Teron->IsInEvadeMode()) - me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + me->DealDamage(me, me->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); CheckTeronTimer = 5000; } else CheckTeronTimer -= diff; @@ -236,9 +236,9 @@ public: return GetInstanceAI<boss_teron_gorefiendAI>(creature); } - struct boss_teron_gorefiendAI : public ScriptedAI + struct boss_teron_gorefiendAI : public BossAI { - boss_teron_gorefiendAI(Creature* creature) : ScriptedAI(creature) + boss_teron_gorefiendAI(Creature* creature) : BossAI(creature, DATA_TERON_GOREFIEND) { Initialize(); instance = creature->GetInstanceScript(); @@ -277,8 +277,7 @@ public: void Reset() override { - instance->SetBossState(DATA_TERON_GOREFIEND, NOT_STARTED); - + _Reset(); Initialize(); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -316,9 +315,8 @@ public: void JustDied(Unit* /*killer*/) override { - instance->SetBossState(DATA_TERON_GOREFIEND, DONE); - Talk(SAY_DEATH); + _JustDied(); } float CalculateRandomLocation(float Loc, uint32 radius) @@ -363,7 +361,7 @@ public: /** WHAT IS FULLY NECESSARY FOR GOREFIEND TO BE 100% COMPLETE *****/ /************************************************************************/ - Unit* ghost = NULL; + Unit* ghost = nullptr; if (GhostGUID) ghost = ObjectAccessor::GetUnit(*me, GhostGUID); if (ghost && ghost->IsAlive() && ghost->HasAura(SPELL_SHADOW_OF_DEATH)) @@ -379,7 +377,7 @@ public: }*/ for (uint8 i = 0; i < 4; ++i) { - Creature* Construct = NULL; + Creature* Construct = nullptr; float X = CalculateRandomLocation(ghost->GetPositionX(), 10); float Y = CalculateRandomLocation(ghost->GetPositionY(), 10); Construct = me->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, Y, ghost->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); @@ -435,17 +433,13 @@ public: for (uint8 i = 0; i < 2; ++i) { - Creature* Shadow = NULL; float X = CalculateRandomLocation(me->GetPositionX(), 10); - Shadow = me->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 0); - if (Shadow) + if (Creature* shadow = me->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 0)) { - Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1); - if (!target) - target = me->GetVictim(); - - if (target) - Shadow->AI()->AttackStart(target); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) + shadow->AI()->AttackStart(target); + else if (Unit* victim = me->GetVictim()) + shadow->AI()->AttackStart(victim); } } SummonShadowsTimer = 60000; diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp index 9b33ea88ca7..b9627856ae6 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp @@ -150,7 +150,7 @@ public: DoCast(target, SPELL_IMPALING_SPINE, true); SpineTargetGUID = target->GetGUID(); //must let target summon, otherwise you cannot click the spine - target->SummonGameObject(GO_NAJENTUS_SPINE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), me->GetOrientation(), 0, 0, 0, 0, 30); + target->SummonGameObject(GO_NAJENTUS_SPINE, *target, G3D::Quat(), 30); Talk(SAY_NEEDLE); events.DelayEvents(1500, GCD_CAST); events.DelayEvents(15000, GCD_YELL); diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index d883a48b630..06b492e32d7 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -90,8 +90,6 @@ enum IllidariCouncil SPELL_BERSERK = 45078 }; -#define ERROR_INST_DATA "SD2 ERROR: Instance Data for Black Temple not set properly; Illidari Council event will not function properly." - struct CouncilYells { int32 entry; @@ -165,7 +163,7 @@ public: Council[1] = instance->GetGuidData(DATA_VERAS_DARKSHADOW); Council[2] = instance->GetGuidData(DATA_LADY_MALANDE); Council[3] = instance->GetGuidData(DATA_HIGH_NETHERMANCER_ZEREVOR); - } else TC_LOG_ERROR("scripts", ERROR_INST_DATA); + } } void EnterCombat(Unit* /*who*/) override { } @@ -231,6 +229,7 @@ public: { Initialize(); instance = creature->GetInstanceScript(); + SetBoundary(instance->GetBossBoundary(DATA_ILLIDARI_COUNCIL)); } void Initialize() @@ -257,7 +256,7 @@ public: { Initialize(); - Creature* pMember = NULL; + Creature* pMember = nullptr; for (uint8 i = 0; i < 4; ++i) { pMember = ObjectAccessor::GetCreature((*me), Council[i]); @@ -330,16 +329,16 @@ public: if (DeathCount > 3) { if (Creature* VoiceTrigger = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_BLOOD_ELF_COUNCIL_VOICE))) - VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); instance->SetBossState(DATA_ILLIDARI_COUNCIL, DONE); //me->SummonCreature(AKAMAID, 746.466980f, 304.394989f, 311.90208f, 6.272870f, TEMPSUMMON_DEAD_DESPAWN, 0); - me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + me->DealDamage(me, me->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); return; } Creature* pMember = (ObjectAccessor::GetCreature(*me, Council[DeathCount])); if (pMember && pMember->IsAlive()) - pMember->DealDamage(pMember, pMember->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + pMember->DealDamage(pMember, pMember->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); ++DeathCount; EndEventTimer = 1500; } else EndEventTimer -= diff; @@ -922,7 +921,7 @@ public: if (dmgInfo.GetAttacker() == target) return; int32 bp = absorbAmount / 2; - target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_REFLECTIVE_SHIELD_T, &bp, NULL, NULL, true, NULL, aurEff); + target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_REFLECTIVE_SHIELD_T, &bp, nullptr, nullptr, true, nullptr, aurEff); } void Register() override diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 86ad7958957..bac996918ac 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -35,6 +35,20 @@ DoorData const doorData[] = { 0, 0, DOOR_TYPE_ROOM } // END }; +BossBoundaryData const boundaries = +{ + { DATA_HIGH_WARLORD_NAJENTUS, new RectangleBoundary(394.0f, 479.4f, 707.8f, 859.1f) }, + { DATA_SUPREMUS, new RectangleBoundary(556.1f, 850.2f, 542.0f, 1001.0f) }, + { DATA_SHADE_OF_AKAMA, new RectangleBoundary(406.8f, 564.0f, 327.9f, 473.5f) }, + { DATA_TERON_GOREFIEND, new RectangleBoundary(512.5f, 613.3f, 373.2f, 432.0f) }, + { DATA_TERON_GOREFIEND, new ZRangeBoundary(179.5f, 223.6f) }, + { DATA_GURTOGG_BLOODBOIL, new RectangleBoundary(720.5f, 864.5f, 159.3f, 316.0f) }, + { DATA_RELIQUARY_OF_SOULS, new RectangleBoundary(435.9f, 558.8f, 113.3f, 229.6f) }, + { DATA_MOTHER_SHAHRAZ, new RectangleBoundary(903.4f, 982.1f, 92.4f, 476.7f) }, + { DATA_ILLIDARI_COUNCIL, new EllipseBoundary(Position(696.6f, 305.0f), 70.0 , 85.0) }, + { DATA_ILLIDAN_STORMRAGE, new EllipseBoundary(Position(694.8f, 309.0f), 70.0 , 85.0) } +}; + class instance_black_temple : public InstanceMapScript { public: @@ -47,6 +61,7 @@ class instance_black_temple : public InstanceMapScript SetHeaders(DataHeader); SetBossNumber(EncounterCount); LoadDoorData(doorData); + LoadBossBoundaries(boundaries); } void OnCreatureCreate(Creature* creature) override diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_ahune.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_ahune.cpp index 89b7a8cbd46..62552a3bf61 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_ahune.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_ahune.cpp @@ -73,6 +73,7 @@ enum Spells SPELL_SLIPPERY_FLOOR_AMBIENT = 46314, SPELL_SLIPPERY_FLOOR_PERIODIC = 46320, SPELL_SLIPPERY_FLOOR_SLIP = 45947, + SPELL_SLIPPERY_FLOOR_YOU_SLIPPED = 45946, // Frozen Core SPELL_SUICIDE = 45254, @@ -101,19 +102,18 @@ enum Events EVENT_EMERGE = 1, EVENT_INITIAL_EMERGE = 2, EVENT_SYNCH_HEALTH = 3, - EVENT_FOUND_OPENING = 4, - EVENT_LOOKFOROPENING_0 = 5, - EVENT_LOOKFOROPENING_1 = 6, - EVENT_LOOKFOROPENING_2 = 7, - EVENT_SUMMON_HAILSTONE = 8, - EVENT_SUMMON_COLDWEAVE = 9, - EVENT_SUMMON_FROSTWIND = 10, - EVENT_SUMMON_AHUNE = 11, - EVENT_CLOSE_OPENING = 12, - EVENT_AHUNE_PHASE_ONE = 13, - EVENT_AHUNE_PHASE_TWO = 14, - EVENT_START_LOOKING_FOR_OPENING = 15, - EVENT_STOP_LOOKING_FOR_OPENING = 16 + EVENT_LOOKFOROPENING_0 = 4, + EVENT_LOOKFOROPENING_1 = 5, + EVENT_LOOKFOROPENING_2 = 6, + EVENT_SUMMON_HAILSTONE = 7, + EVENT_SUMMON_COLDWEAVE = 8, + EVENT_SUMMON_FROSTWIND = 9, + EVENT_SUMMON_AHUNE = 10, + EVENT_CLOSE_OPENING = 11, + EVENT_AHUNE_PHASE_ONE = 12, + EVENT_AHUNE_PHASE_TWO = 13, + EVENT_START_LOOKING_FOR_OPENING = 14, + EVENT_STOP_LOOKING_FOR_OPENING = 15 }; enum Actions @@ -169,19 +169,14 @@ public: { boss_ahuneAI(Creature* creature) : BossAI(creature, DATA_AHUNE) { - Initialize(); - } - - void Initialize() - { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); + me->SetControlled(true, UNIT_STATE_ROOT); } void EnterCombat(Unit* /*who*/) override { _EnterCombat(); - events.ScheduleEvent(EVENT_INITIAL_EMERGE, 4); - events.ScheduleEvent(EVENT_SYNCH_HEALTH, 3000); + events.ScheduleEvent(EVENT_INITIAL_EMERGE, Milliseconds(4)); + events.ScheduleEvent(EVENT_SYNCH_HEALTH, Seconds(3)); } void EnterEvadeMode(EvadeReason /*why*/) override @@ -194,7 +189,6 @@ public: void JustDied(Unit* /*killer*/) override { - _JustDied(); instance->DoCastSpellOnPlayers(SPELL_AHUNE_ACHIEVEMENT); if (Creature* ahuneBunny = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AHUNE_BUNNY))) @@ -209,11 +203,8 @@ public: if (group->isLFGGroup()) sLFGMgr->FinishDungeon(group->GetGUID(), 286); } - } - void JustSummoned(Creature* summon) override - { - BossAI::JustSummoned(summon); + _JustDied(); } void DoAction(int32 action) override @@ -221,7 +212,7 @@ public: if (action == ACTION_AHUNE_RETREAT) { Submerge(); - events.ScheduleEvent(EVENT_EMERGE, 35000); + events.ScheduleEvent(EVENT_EMERGE, Seconds(35)); } } @@ -246,10 +237,10 @@ public: break; case EVENT_SYNCH_HEALTH: if (Creature* frozenCore = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_FROZEN_CORE))) - DoCast(frozenCore, SPELL_SYNCH_HEALTH); + DoCast(frozenCore, SPELL_SYNCH_HEALTH, true); else DoCast(me, SPELL_SUICIDE); - events.ScheduleEvent(EVENT_SYNCH_HEALTH, 3000); + events.Repeat(Seconds(3)); break; default: break; @@ -268,8 +259,8 @@ public: me->RemoveAurasDueToSpell(SPELL_STAY_SUBMERGED); DoCast(me, SPELL_STAND); DoCast(me, SPELL_RESURFACE, true); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); - events.ScheduleEvent(EVENT_SYNCH_HEALTH, 3000); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + events.ScheduleEvent(EVENT_SYNCH_HEALTH, Seconds(3)); } void Submerge() @@ -277,7 +268,7 @@ public: if (Creature* frozenCore = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_FROZEN_CORE))) frozenCore->AI()->DoAction(ACTION_AHUNE_RETREAT); me->RemoveAurasDueToSpell(SPELL_AHUNES_SHIELD); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_31); DoCast(me, SPELL_SUBMERGED, true); DoCast(me, SPELL_AHUNE_SELF_STUN, true); DoCast(me, SPELL_STAY_SUBMERGED, true); @@ -308,18 +299,11 @@ public: void Initialize() { me->SetReactState(REACT_PASSIVE); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE); + me->setRegeneratingHealth(false); DoCast(me, SPELL_FROZEN_CORE_GETS_HIT); DoCast(me, SPELL_ICE_SPEAR_AURA); } - void EnterEvadeMode(EvadeReason /*why*/) override - { - DoCast(SPELL_MINION_DESPAWNER); - if (Creature* ahune = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_AHUNE))) - ahune->AI()->EnterEvadeMode(); - } - void JustDied(Unit* /*killer*/) override { if (Creature* ahune = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_AHUNE))) @@ -333,23 +317,20 @@ public: { if (action == ACTION_AHUNE_RETREAT) { - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); me->RemoveAurasDueToSpell(SPELL_ICE_SPEAR_AURA); - _events.ScheduleEvent(EVENT_SYNCH_HEALTH, 3000, 0, PHASE_TWO); + _events.ScheduleEvent(EVENT_SYNCH_HEALTH, Seconds(3), 0, PHASE_TWO); } else if (action == ACTION_AHUNE_RESURFACE) { _events.Reset(); DoCast(me, SPELL_ICE_SPEAR_AURA); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_DISABLE_MOVE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_IMMUNE_TO_PC); } } void UpdateAI(uint32 diff) override { - if (!UpdateVictim()) - return; - _events.Update(diff); while (uint32 eventId = _events.ExecuteEvent()) @@ -358,10 +339,10 @@ public: { case EVENT_SYNCH_HEALTH: if (Creature* ahune = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_AHUNE))) - DoCast(ahune, SPELL_SYNCH_HEALTH); + DoCast(ahune, SPELL_SYNCH_HEALTH, true); else DoCast(me, SPELL_SUICIDE); - _events.ScheduleEvent(EVENT_SYNCH_HEALTH, 3000); + _events.Repeat(Seconds(3)); break; default: break; @@ -414,7 +395,7 @@ public: _summons.DespawnAll(); ResetFlameCallers(); - me->SummonGameObject(GO_ICE_STONE, -69.90455f, -162.2449f, -2.366563f, 2.426008f, 0.0f, 0.0f, 0.9366722f, 0.3502074f, 0); + me->SummonGameObject(GO_ICE_STONE, -69.90455f, -162.2449f, -2.366563f, 2.426008f, G3D::Quat(0.0f, 0.0f, 0.9366722f, 0.3502074f), 0); } void DoAction(int32 action) override @@ -435,11 +416,11 @@ public: _submerged = false; _events.Reset(); _events.SetPhase(PHASE_ONE); - _events.ScheduleEvent(EVENT_SUMMON_AHUNE, 10000); - _events.ScheduleEvent(EVENT_START_LOOKING_FOR_OPENING, 14000, 0, PHASE_ONE); - _events.ScheduleEvent(EVENT_SUMMON_COLDWEAVE, 22000, 0, PHASE_ONE); - _events.ScheduleEvent(EVENT_SUMMON_HAILSTONE, 14000, 0, PHASE_ONE); - _events.ScheduleEvent(EVENT_AHUNE_PHASE_TWO, 108000, 0, PHASE_ONE); + _events.ScheduleEvent(EVENT_SUMMON_AHUNE, Seconds(10)); + _events.ScheduleEvent(EVENT_START_LOOKING_FOR_OPENING, Seconds(14), 0, PHASE_ONE); + _events.ScheduleEvent(EVENT_SUMMON_COLDWEAVE, Seconds(22), 0, PHASE_ONE); + _events.ScheduleEvent(EVENT_SUMMON_HAILSTONE, Seconds(14), 0, PHASE_ONE); + _events.ScheduleEvent(EVENT_AHUNE_PHASE_TWO, Seconds(108), 0, PHASE_ONE); } } @@ -466,9 +447,9 @@ public: case EVENT_SUMMON_COLDWEAVE: DoCast(SPELL_SUMMON_COLDWEAVE); DoCast(SPELL_SUMMON_COLDWEAVE); - _events.ScheduleEvent(EVENT_SUMMON_COLDWEAVE, 8000, 0, PHASE_ONE); + _events.Repeat(Seconds(8)); if (_submerged) - _events.ScheduleEvent(EVENT_SUMMON_FROSTWIND, 4000, 0, PHASE_ONE); + _events.ScheduleEvent(EVENT_SUMMON_FROSTWIND, Seconds(4), 0, PHASE_ONE); break; case EVENT_SUMMON_FROSTWIND: DoCast(SPELL_SUMMON_FROSTWIND); @@ -494,17 +475,17 @@ public: ahune->AI()->DoAction(ACTION_AHUNE_RETREAT); _events.Reset(); _events.SetPhase(PHASE_TWO); - _events.ScheduleEvent(EVENT_CLOSE_OPENING, 25000, 0, PHASE_TWO); - _events.ScheduleEvent(EVENT_AHUNE_PHASE_ONE, 35000, 0, PHASE_TWO); + _events.ScheduleEvent(EVENT_CLOSE_OPENING, Seconds(25), 0, PHASE_TWO); + _events.ScheduleEvent(EVENT_AHUNE_PHASE_ONE, Seconds(35), 0, PHASE_TWO); break; case EVENT_AHUNE_PHASE_ONE: _submerged = true; _events.Reset(); _events.SetPhase(PHASE_ONE); - _events.ScheduleEvent(EVENT_SUMMON_COLDWEAVE, 8000, 0, PHASE_ONE); - _events.ScheduleEvent(EVENT_SUMMON_HAILSTONE, 5000, 0, PHASE_ONE); - _events.ScheduleEvent(EVENT_START_LOOKING_FOR_OPENING, 5000, 0, PHASE_ONE); - _events.ScheduleEvent(EVENT_AHUNE_PHASE_TWO, 100000, 0, PHASE_ONE); + _events.ScheduleEvent(EVENT_SUMMON_COLDWEAVE, Seconds(8), 0, PHASE_ONE); + _events.ScheduleEvent(EVENT_SUMMON_HAILSTONE, Seconds(5), 0, PHASE_ONE); + _events.ScheduleEvent(EVENT_START_LOOKING_FOR_OPENING, Seconds(5), 0, PHASE_ONE); + _events.ScheduleEvent(EVENT_AHUNE_PHASE_TWO, Seconds(100), 0, PHASE_ONE); break; default: break; @@ -581,10 +562,10 @@ public: switch (spellInfo->Id) { case SPELL_SHAMANS_LOOK_FOR_OPENING: - _events.ScheduleEvent(EVENT_LOOKFOROPENING_0, 17000); + _events.ScheduleEvent(EVENT_LOOKFOROPENING_0, Seconds(17)); break; case SPELL_FOUND_OPENING: - _events.ScheduleEvent(EVENT_FOUND_OPENING, 0); + Talk(EMOTE_RETREAT); break; default: break; @@ -607,21 +588,19 @@ public: { case EVENT_LOOKFOROPENING_0: LookOpening(true, 0); - _events.ScheduleEvent(EVENT_LOOKFOROPENING_1, 26000); + _events.ScheduleEvent(EVENT_LOOKFOROPENING_1, Seconds(26)); break; case EVENT_LOOKFOROPENING_1: LookOpening(true, 1); - _events.ScheduleEvent(EVENT_LOOKFOROPENING_2, 25000); + _events.ScheduleEvent(EVENT_LOOKFOROPENING_2, Seconds(25)); break; case EVENT_LOOKFOROPENING_2: LookOpening(true, 2); - _events.ScheduleEvent(EVENT_STOP_LOOKING_FOR_OPENING, 27000); + _events.ScheduleEvent(EVENT_STOP_LOOKING_FOR_OPENING, Seconds(27)); break; case EVENT_STOP_LOOKING_FOR_OPENING: LookOpening(false, _mySpot); break; - case EVENT_FOUND_OPENING: - Talk(EMOTE_RETREAT); default: break; } @@ -799,25 +778,26 @@ public: void PeriodicTick(AuraEffect const* aurEff) { - if (Creature* caster = GetCaster()->ToCreature()) - switch (aurEff->GetTickNumber()) - { - case 1: - caster->CastSpell(caster, SPELL_SUMMON_ICE_SPEAR_GO); - break; - case 3: - if (GameObject* spike = caster->FindNearestGameObject(GO_ICE_SPEAR, 3.0f)) - spike->UseDoorOrButton(); - caster->AI()->DoCastAOE(SPELL_ICE_SPEAR_KNOCKBACK, true); - break; - case 5: - if (GameObject* spike = caster->FindNearestGameObject(GO_ICE_SPEAR, 3.0f)) - spike->Delete(); - caster->DespawnOrUnsummon(); - break; - default: - break; - } + if (Unit* tmpCaster = GetCaster()) + if (Creature* caster = tmpCaster->ToCreature()) + switch (aurEff->GetTickNumber()) + { + case 1: + caster->CastSpell(caster, SPELL_SUMMON_ICE_SPEAR_GO); + break; + case 3: + if (GameObject* spike = caster->FindNearestGameObject(GO_ICE_SPEAR, 3.0f)) + spike->UseDoorOrButton(); + caster->AI()->DoCastAOE(SPELL_ICE_SPEAR_KNOCKBACK, true); + break; + case 5: + if (GameObject* spike = caster->FindNearestGameObject(GO_ICE_SPEAR, 3.0f)) + spike->Delete(); + caster->DespawnOrUnsummon(); + break; + default: + break; + } } void Register() override @@ -884,6 +864,16 @@ public: return true; } + void FilterTargets(std::list<WorldObject*>& targets) + { + if (targets.empty()) + return; + + WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets); + targets.clear(); + targets.push_back(target); + } + void HandleDummy(SpellEffIndex /*effIndex*/) { GetCaster()->CastSpell(GetHitUnit(), SPELL_SUMMON_ICE_SPEAR_BUNNY, true); @@ -891,6 +881,7 @@ public: void Register() override { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ice_spear_target_picker_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); OnEffectHitTarget += SpellEffectFn(spell_ice_spear_target_picker_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; @@ -922,7 +913,10 @@ public: { if (Unit* target = GetHitUnit()) if (target->isMoving()) + { target->CastSpell(target, SPELL_SLIPPERY_FLOOR_SLIP, true); + target->CastSpell(target, SPELL_SLIPPERY_FLOOR_YOU_SLIPPED, true); + } } void Register() override diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index cab5b9efbc3..f4ff9f7084c 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -537,7 +537,7 @@ class npc_zerekethvoidzone : public CreatureScript void Reset() override { - me->SetUInt32Value(UNIT_NPC_FLAGS, 0); + me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); me->setFaction(16); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp index e64c0fe9f5e..b9e7fb0034d 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp @@ -103,7 +103,7 @@ class npc_warp_splinter_treant : public CreatureScript { if (Unit* Warp = ObjectAccessor::GetUnit(*me, WarpGuid)) { - if (me->IsWithinMeleeRange(Warp, 2.5f)) + if (me->IsWithinMeleeRange(Warp)) { int32 CurrentHP_Treant = (int32)me->GetHealth(); Warp->CastCustomSpell(Warp, SPELL_HEAL_FATHER, &CurrentHP_Treant, 0, 0, true, 0, 0, me->GetGUID()); diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp index 30bf085be43..9074f1ea373 100644 --- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp @@ -959,7 +959,7 @@ public: { // Spell 37392 does not exist in dbc, manually spawning me->SummonCreature(NPC_OSCILLATING_FREQUENCY_SCANNER_TOP_BUNNY, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.5f, me->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 50000); - me->SummonGameObject(GO_OSCILLATING_FREQUENCY_SCANNER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), 0, 0, 0, 0, 50); + me->SummonGameObject(GO_OSCILLATING_FREQUENCY_SCANNER, *me, G3D::Quat(), 50); me->DespawnOrUnsummon(50000); } diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp index d35dedb5d27..8803ce9d9ed 100644 --- a/src/server/scripts/Outland/zone_netherstorm.cpp +++ b/src/server/scripts/Outland/zone_netherstorm.cpp @@ -19,7 +19,7 @@ /* ScriptData SDName: Netherstorm SD%Complete: 80 -SDComment: Quest support: 10337, 10438, 10652 (special flight paths), 10198, 10191 +SDComment: Quest support: 10337, 10652 (special flight paths), 10198, 10191 SDCategory: Netherstorm EndScriptData */ @@ -335,56 +335,6 @@ public: }; /*###### -## npc_professor_dabiri -######*/ -enum ProfessorDabiriData -{ - SPELL_PHASE_DISTRUPTOR = 35780, - - //WHISPER_DABIRI = 0, not existing in database - - QUEST_DIMENSIUS = 10439, - QUEST_ON_NETHERY_WINGS = 10438, -}; - -#define GOSSIP_ITEM "I need a new phase distruptor, Professor" - -class npc_professor_dabiri : public CreatureScript -{ -public: - npc_professor_dabiri() : CreatureScript("npc_professor_dabiri") { } - - //OnQuestAccept: - //if (quest->GetQuestId() == QUEST_DIMENSIUS) - //creature->AI()->Talk(WHISPER_DABIRI, player); - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - creature->CastSpell(player, SPELL_PHASE_DISTRUPTOR, false); - player->CLOSE_GOSSIP_MENU(); - } - - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(QUEST_ON_NETHERY_WINGS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(29778)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } -}; - -/*###### ## npc_phase_hunter ######*/ @@ -752,7 +702,6 @@ void AddSC_netherstorm() { new npc_commander_dawnforge(); new at_commander_dawnforge(); - new npc_professor_dabiri(); new npc_phase_hunter(); new npc_bessy(); new npc_maxx_a_million_escort(); diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 7ea87a3c0c4..c91e5c94ca0 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -19,7 +19,7 @@ /* ScriptData SDName: Shadowmoon_Valley SD%Complete: 100 -SDComment: Quest support: 10583, 10601, 10804, 10854, 10458, 10481, 10480, 10781, 10451. Vendor Drake Dealer Hurlunk. +SDComment: Quest support: 10804, 10854, 10458, 10481, 10480, 10781, 10451. SDCategory: Shadowmoon Valley EndScriptData */ @@ -28,9 +28,6 @@ npc_invis_infernal_caster npc_infernal_attacker npc_mature_netherwing_drake npc_enslaved_netherwing_drake -npc_drake_dealer_hurlunk -npcs_flanis_swiftwing_and_kagrosh -npc_karynaku npc_earthmender_wilda npc_torloth_the_magnificent npc_illidari_spawn @@ -90,8 +87,10 @@ public: void SummonInfernal() { - Creature* infernal = me->SummonCreature(NPC_INFERNAL_ATTACKER, me->GetPositionX(), me->GetPositionY(), ground + 0.05f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); - infernalGUID = infernal->GetGUID(); + if (Creature* infernal = me->SummonCreature(NPC_INFERNAL_ATTACKER, me->GetPositionX(), me->GetPositionY(), ground + 0.05f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000)) + infernalGUID = infernal->GetGUID(); + else + infernalGUID = ObjectGuid::Empty; } void UpdateAI(uint32 diff) override @@ -568,117 +567,6 @@ public: }; }; -/*###### -## npc_drake_dealer_hurlunk -######*/ - -class npc_drake_dealer_hurlunk : public CreatureScript -{ -public: - npc_drake_dealer_hurlunk() : CreatureScript("npc_drake_dealer_hurlunk") { } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_TRADE) - player->GetSession()->SendListInventory(creature->GetGUID()); - - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsVendor() && player->GetReputationRank(1015) == REP_EXALTED) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } -}; - -/*###### -## npc_flanis_swiftwing_and_kagrosh -######*/ - -#define GOSSIP_HSK1 "Take Flanis's Pack" -#define GOSSIP_HSK2 "Take Kagrosh's Pack" - -class npcs_flanis_swiftwing_and_kagrosh : public CreatureScript -{ -public: - npcs_flanis_swiftwing_and_kagrosh() : CreatureScript("npcs_flanis_swiftwing_and_kagrosh") { } - - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - ItemPosCountVec dest; - uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30658, 1, NULL); - if (msg == EQUIP_ERR_OK) - { - player->StoreNewItem(dest, 30658, true); - player->PlayerTalkClass->ClearMenus(); - } - } - if (action == GOSSIP_ACTION_INFO_DEF+2) - { - ItemPosCountVec dest; - uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30659, 1, NULL); - if (msg == EQUIP_ERR_OK) - { - player->StoreNewItem(dest, 30659, true); - player->PlayerTalkClass->ClearMenus(); - } - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (player->GetQuestStatus(10583) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30658, 1, true)) - player->ADD_GOSSIP_ITEM(0, GOSSIP_HSK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - if (player->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30659, 1, true)) - player->ADD_GOSSIP_ITEM(0, GOSSIP_HSK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } -}; - -/*###### -# npc_karynaku -####*/ - -enum Karynaku -{ - QUEST_ALLY_OF_NETHER = 10870, - QUEST_ZUHULED_THE_WACK = 10866, - - NPC_ZUHULED_THE_WACKED = 11980, - - TAXI_PATH_ID = 649, -}; - -class npc_karynaku : public CreatureScript -{ - public: - npc_karynaku() : CreatureScript("npc_karynaku") { } - - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) override - { - if (quest->GetQuestId() == QUEST_ALLY_OF_NETHER) - player->ActivateTaxiPathTo(TAXI_PATH_ID); - - if (quest->GetQuestId() == QUEST_ZUHULED_THE_WACK) - creature->SummonCreature(NPC_ZUHULED_THE_WACKED, -4204.94f, 316.397f, 122.508f, 1.309f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); - - return true; - } -}; - /*#### # npc_earthmender_wilda ####*/ @@ -1701,9 +1589,6 @@ void AddSC_shadowmoon_valley() new npc_mature_netherwing_drake(); new npc_enslaved_netherwing_drake(); new npc_dragonmaw_peon(); - new npc_drake_dealer_hurlunk(); - new npcs_flanis_swiftwing_and_kagrosh(); - new npc_karynaku(); new npc_earthmender_wilda(); new npc_lord_illidan_stormrage(); new go_crystal_prison(); diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 724019a1b19..980c0db19cc 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -30,6 +30,13 @@ enum DeathKnightSpells { + SPELL_DK_ACCLIMATION_HOLY = 50490, + SPELL_DK_ACCLIMATION_FIRE = 50362, + SPELL_DK_ACCLIMATION_FROST = 50485, + SPELL_DK_ACCLIMATION_ARCANE = 50486, + SPELL_DK_ACCLIMATION_SHADOW = 50489, + SPELL_DK_ACCLIMATION_NATURE = 50488, + SPELL_DK_ADVANTAGE_T10_4P_MELEE = 70657, SPELL_DK_ANTI_MAGIC_SHELL_TALENT = 51052, SPELL_DK_BLACK_ICE_R1 = 49140, SPELL_DK_BLOOD_BOIL_TRIGGERED = 65658, @@ -51,6 +58,7 @@ enum DeathKnightSpells SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1 = 50365, SPELL_DK_IMPROVED_FROST_PRESENCE_R1 = 50384, SPELL_DK_IMPROVED_UNHOLY_PRESENCE_R1 = 50391, + SPELL_DK_IMPROVED_BLOOD_PRESENCE_HEAL = 50475, SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED = 63611, SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED = 63622, SPELL_DK_ITEM_SIGIL_VENGEFUL_HEART = 64962, @@ -78,6 +86,141 @@ enum Misc NPC_DK_GHOUL = 26125 }; +// -49200 - Acclimation +class spell_dk_acclimation : public SpellScriptLoader +{ +public: + spell_dk_acclimation() : SpellScriptLoader("spell_dk_acclimation") { } + + class spell_dk_acclimation_AuraScript : public AuraScript + { + PrepareAuraScript(spell_dk_acclimation_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DK_ACCLIMATION_HOLY) || + !sSpellMgr->GetSpellInfo(SPELL_DK_ACCLIMATION_FIRE) || + !sSpellMgr->GetSpellInfo(SPELL_DK_ACCLIMATION_FROST) || + !sSpellMgr->GetSpellInfo(SPELL_DK_ACCLIMATION_NATURE) || + !sSpellMgr->GetSpellInfo(SPELL_DK_ACCLIMATION_SHADOW) || + !sSpellMgr->GetSpellInfo(SPELL_DK_ACCLIMATION_ARCANE)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (eventInfo.GetDamageInfo()) + { + switch (GetFirstSchoolInMask(eventInfo.GetDamageInfo()->GetSchoolMask())) + { + case SPELL_SCHOOL_HOLY: + case SPELL_SCHOOL_FIRE: + case SPELL_SCHOOL_NATURE: + case SPELL_SCHOOL_FROST: + case SPELL_SCHOOL_SHADOW: + case SPELL_SCHOOL_ARCANE: + return true; + default: + break; + } + } + + return false; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + uint32 triggerspell = 0; + + switch (GetFirstSchoolInMask(eventInfo.GetDamageInfo()->GetSchoolMask())) + { + case SPELL_SCHOOL_HOLY: + triggerspell = SPELL_DK_ACCLIMATION_HOLY; + break; + case SPELL_SCHOOL_FIRE: + triggerspell = SPELL_DK_ACCLIMATION_FIRE; + break; + case SPELL_SCHOOL_NATURE: + triggerspell = SPELL_DK_ACCLIMATION_NATURE; + break; + case SPELL_SCHOOL_FROST: + triggerspell = SPELL_DK_ACCLIMATION_FROST; + break; + case SPELL_SCHOOL_SHADOW: + triggerspell = SPELL_DK_ACCLIMATION_SHADOW; + break; + case SPELL_SCHOOL_ARCANE: + triggerspell = SPELL_DK_ACCLIMATION_ARCANE; + break; + default: + return; + } + + if (Unit* target = eventInfo.GetActionTarget()) + target->CastSpell(target, triggerspell, true, nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_dk_acclimation_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_dk_acclimation_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_dk_acclimation_AuraScript(); + } +}; + +// 70656 - Advantage (T10 4P Melee Bonus) +class spell_dk_advantage_t10_4p : public SpellScriptLoader +{ +public: + spell_dk_advantage_t10_4p() : SpellScriptLoader("spell_dk_advantage_t10_4p") { } + + class spell_dk_advantage_t10_4p_AuraScript : public AuraScript + { + PrepareAuraScript(spell_dk_advantage_t10_4p_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DK_ADVANTAGE_T10_4P_MELEE)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (Unit* caster = eventInfo.GetActor()) + { + if (caster->GetTypeId() != TYPEID_PLAYER || caster->getClass() != CLASS_DEATH_KNIGHT) + return false; + + for (uint8 i = 0; i < MAX_RUNES; ++i) + if (caster->ToPlayer()->GetRuneCooldown(i) == 0) + return false; + + return true; + } + + return false; + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_dk_advantage_t10_4p_AuraScript::CheckProc); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_dk_advantage_t10_4p_AuraScript(); + } +}; + // 50462 - Anti-Magic Shell (on raid member) class spell_dk_anti_magic_shell_raid : public SpellScriptLoader { @@ -919,6 +1062,52 @@ class spell_dk_improved_blood_presence : public SpellScriptLoader } }; +// 63611 - Improved Blood Presence Triggered +class spell_dk_improved_blood_presence_triggered : public SpellScriptLoader +{ +public: + spell_dk_improved_blood_presence_triggered() : SpellScriptLoader("spell_dk_improved_blood_presence_triggered") { } + + class spell_dk_improved_blood_presence_triggered_AuraScript : public AuraScript + { + PrepareAuraScript(spell_dk_improved_blood_presence_triggered_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DK_IMPROVED_BLOOD_PRESENCE_HEAL)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (eventInfo.GetActor()->GetTypeId() == TYPEID_PLAYER) + return true; + + return false; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + if (DamageInfo* dmgInfo = eventInfo.GetDamageInfo()) + eventInfo.GetActor()->CastCustomSpell(SPELL_DK_IMPROVED_BLOOD_PRESENCE_HEAL, SPELLVALUE_BASE_POINT0, CalculatePct(int32(dmgInfo->GetDamage()), aurEff->GetAmount()), + eventInfo.GetActor(), true, nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_dk_improved_blood_presence_triggered_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_dk_improved_blood_presence_triggered_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_dk_improved_blood_presence_triggered_AuraScript(); + } +}; + // -50384 - Improved Frost Presence class spell_dk_improved_frost_presence : public SpellScriptLoader { @@ -2006,6 +2195,8 @@ public: void AddSC_deathknight_spell_scripts() { + new spell_dk_acclimation(); + new spell_dk_advantage_t10_4p(); new spell_dk_anti_magic_shell_raid(); new spell_dk_anti_magic_shell_self(); new spell_dk_anti_magic_zone(); @@ -2022,6 +2213,7 @@ void AddSC_deathknight_spell_scripts() new spell_dk_ghoul_explode(); new spell_dk_icebound_fortitude(); new spell_dk_improved_blood_presence(); + new spell_dk_improved_blood_presence_triggered(); new spell_dk_improved_frost_presence(); new spell_dk_improved_unholy_presence(); new spell_dk_pestilence(); diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index c088ae07e66..0bf5ab01f45 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -31,6 +31,13 @@ enum DruidSpells { SPELL_DRUID_BEAR_FORM_PASSIVE = 1178, SPELL_DRUID_DIRE_BEAR_FORM_PASSIVE = 9635, + SPELL_DRUID_ECLIPSE_LUNAR_PROC = 48518, + SPELL_DRUID_ECLIPSE_SOLAR_PROC = 48517, + SPELL_DRUID_FORMS_TRINKET_BEAR = 37340, + SPELL_DRUID_FORMS_TRINKET_CAT = 37341, + SPELL_DRUID_FORMS_TRINKET_MOONKIN = 37343, + SPELL_DRUID_FORMS_TRINKET_NONE = 37344, + SPELL_DRUID_FORMS_TRINKET_TREE = 37342, SPELL_DRUID_ENRAGE = 5229, SPELL_DRUID_ENRAGE_MOD_DAMAGE = 51185, SPELL_DRUID_ENRAGED_DEFENSE = 70725, @@ -48,6 +55,8 @@ enum DruidSpells SPELL_DRUID_NATURES_SPLENDOR = 57865, SPELL_DRUID_SURVIVAL_INSTINCTS = 50322, SPELL_DRUID_SAVAGE_ROAR = 62071, + SPELL_DRUID_T9_FERAL_RELIC_BEAR = 67354, + SPELL_DRUID_T9_FERAL_RELIC_CAT = 67355, SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178 }; @@ -131,6 +140,69 @@ class spell_dru_dash : public SpellScriptLoader } }; +class spell_dru_eclipse : public SpellScriptLoader +{ +public: + spell_dru_eclipse() : SpellScriptLoader("spell_dru_eclipse") { } + + class spell_dru_eclipse_AuraScript : public AuraScript + { + PrepareAuraScript(spell_dru_eclipse_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_ECLIPSE_LUNAR_PROC)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_ECLIPSE_SOLAR_PROC)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (!eventInfo.GetSpellInfo()) + return false; + + if (eventInfo.GetActor()->HasAura(SPELL_DRUID_ECLIPSE_LUNAR_PROC) || eventInfo.GetActor()->HasAura(SPELL_DRUID_ECLIPSE_SOLAR_PROC)) + return false; + + // Triggered by Wrath? + if (eventInfo.GetSpellInfo()->SpellFamilyFlags[0] & 1) + return roll_chance_f(GetSpellInfo()->ProcChance * 0.6f) && _lunarProcCooldownEnd <= std::chrono::steady_clock::now(); + + return _solarProcCooldownEnd <= std::chrono::steady_clock::now(); + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + if (eventInfo.GetSpellInfo()->SpellFamilyFlags[0] & 1) + { + _lunarProcCooldownEnd = std::chrono::steady_clock::now() + Seconds(aurEff->GetAmount()); + eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_DRUID_ECLIPSE_LUNAR_PROC, TRIGGERED_FULL_MASK, nullptr, aurEff); + } + else + { + _solarProcCooldownEnd = std::chrono::steady_clock::now() + Seconds(aurEff->GetAmount()); + eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_DRUID_ECLIPSE_SOLAR_PROC, TRIGGERED_FULL_MASK, nullptr, aurEff); + } + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_dru_eclipse_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_dru_eclipse_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } + + std::chrono::steady_clock::time_point _lunarProcCooldownEnd = std::chrono::steady_clock::time_point::min(); + std::chrono::steady_clock::time_point _solarProcCooldownEnd = std::chrono::steady_clock::time_point::min(); + }; + + AuraScript* GetAuraScript() const override + { + return new spell_dru_eclipse_AuraScript(); + } +}; + // 5229 - Enrage class spell_dru_enrage : public SpellScriptLoader { @@ -197,6 +269,91 @@ class spell_dru_enrage : public SpellScriptLoader } }; +// 37336 - Druid Forms Trinket +class spell_dru_forms_trinket : public SpellScriptLoader +{ +public: + spell_dru_forms_trinket() : SpellScriptLoader("spell_dru_forms_trinket") { } + + class spell_dru_forms_trinket_AuraScript : public AuraScript + { + PrepareAuraScript(spell_dru_forms_trinket_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_FORMS_TRINKET_BEAR) || + !sSpellMgr->GetSpellInfo(SPELL_DRUID_FORMS_TRINKET_CAT) || + !sSpellMgr->GetSpellInfo(SPELL_DRUID_FORMS_TRINKET_MOONKIN) || + !sSpellMgr->GetSpellInfo(SPELL_DRUID_FORMS_TRINKET_NONE) || + !sSpellMgr->GetSpellInfo(SPELL_DRUID_FORMS_TRINKET_TREE)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + Unit* target = eventInfo.GetActor(); + + switch (target->GetShapeshiftForm()) + { + case FORM_BEAR: + case FORM_DIREBEAR: + case FORM_CAT: + case FORM_MOONKIN: + case FORM_NONE: + case FORM_TREE: + return true; + default: + break; + } + + return false; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + Unit* target = eventInfo.GetActor(); + uint32 triggerspell = 0; + + switch (target->GetShapeshiftForm()) + { + case FORM_BEAR: + case FORM_DIREBEAR: + triggerspell = SPELL_DRUID_FORMS_TRINKET_BEAR; + break; + case FORM_CAT: + triggerspell = SPELL_DRUID_FORMS_TRINKET_CAT; + break; + case FORM_MOONKIN: + triggerspell = SPELL_DRUID_FORMS_TRINKET_MOONKIN; + break; + case FORM_NONE: + triggerspell = SPELL_DRUID_FORMS_TRINKET_NONE; + break; + case FORM_TREE: + triggerspell = SPELL_DRUID_FORMS_TRINKET_TREE; + break; + default: + return; + } + + target->CastSpell(target, triggerspell, true, nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_dru_forms_trinket_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_dru_forms_trinket_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_dru_forms_trinket_AuraScript(); + } +}; + // 54846 - Glyph of Starfire class spell_dru_glyph_of_starfire : public SpellScriptLoader { @@ -1079,6 +1236,77 @@ class spell_dru_typhoon : public SpellScriptLoader } }; +// 67353 - T9 Feral Relic (Idol of Mutilation) +class spell_dru_t9_feral_relic : public SpellScriptLoader +{ +public: + spell_dru_t9_feral_relic() : SpellScriptLoader("spell_dru_t9_feral_relic") { } + + class spell_dru_t9_feral_relic_AuraScript : public AuraScript + { + PrepareAuraScript(spell_dru_t9_feral_relic_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_T9_FERAL_RELIC_BEAR) || + !sSpellMgr->GetSpellInfo(SPELL_DRUID_T9_FERAL_RELIC_CAT)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + Unit* target = eventInfo.GetActor(); + + switch (target->GetShapeshiftForm()) + { + case FORM_BEAR: + case FORM_DIREBEAR: + case FORM_CAT: + return true; + default: + break; + } + + return false; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + uint32 triggerspell = 0; + + Unit* target = eventInfo.GetActor(); + + switch (target->GetShapeshiftForm()) + { + case FORM_BEAR: + case FORM_DIREBEAR: + triggerspell = SPELL_DRUID_T9_FERAL_RELIC_BEAR; + break; + case FORM_CAT: + triggerspell = SPELL_DRUID_T9_FERAL_RELIC_CAT; + break; + default: + return; + } + + target->CastSpell(target, triggerspell, true, nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_dru_t9_feral_relic_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_dru_t9_feral_relic_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_dru_t9_feral_relic_AuraScript(); + } +}; + // 70691 - Item T10 Restoration 4P Bonus class spell_dru_t10_restoration_4p_bonus : public SpellScriptLoader { @@ -1208,7 +1436,9 @@ void AddSC_druid_spell_scripts() { new spell_dru_bear_form_passive(); new spell_dru_dash(); + new spell_dru_eclipse(); new spell_dru_enrage(); + new spell_dru_forms_trinket(); new spell_dru_glyph_of_starfire(); new spell_dru_idol_lifebloom(); new spell_dru_innervate(); @@ -1230,6 +1460,7 @@ void AddSC_druid_spell_scripts() new spell_dru_flight_form(); new spell_dru_tiger_s_fury(); new spell_dru_typhoon(); + new spell_dru_t9_feral_relic(); new spell_dru_t10_restoration_4p_bonus(); new spell_dru_wild_growth(); } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 8b8c5300a9e..e8ad73ceadb 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -430,6 +430,61 @@ class spell_gen_bandage : public SpellScriptLoader } }; +// Blood Reserve - 64568 +enum BloodReserve +{ + SPELL_GEN_BLOOD_RESERVE_AURA = 64568, + SPELL_GEN_BLOOD_RESERVE_HEAL = 64569 +}; + +class spell_gen_blood_reserve : public SpellScriptLoader +{ + public: + spell_gen_blood_reserve() : SpellScriptLoader("spell_gen_blood_reserve") { } + + class spell_gen_blood_reserve_AuraScript : public AuraScript + { + PrepareAuraScript(spell_gen_blood_reserve_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_GEN_BLOOD_RESERVE_HEAL)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (DamageInfo* dmgInfo = eventInfo.GetDamageInfo()) + if (Unit* caster = eventInfo.GetActionTarget()) + if (caster->HealthBelowPctDamaged(35, dmgInfo->GetDamage())) + return true; + + return false; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + Unit* caster = eventInfo.GetActionTarget(); + caster->CastCustomSpell(SPELL_GEN_BLOOD_RESERVE_HEAL, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), caster, TRIGGERED_FULL_MASK, nullptr, aurEff); + caster->RemoveAura(SPELL_GEN_BLOOD_RESERVE_AURA); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_gen_blood_reserve_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_gen_blood_reserve_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_gen_blood_reserve_AuraScript(); + } +}; + enum Bonked { SPELL_BONKED = 62991, @@ -2085,7 +2140,7 @@ class spell_gen_mounted_charge: public SpellScriptLoader } // If target isn't a training dummy there's a chance of failing the charge - if (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE) && roll_chance_f(12.5f)) + if (!target->IsCharmedOwnedByPlayerOrPlayer() && roll_chance_f(12.5f)) spellId = SPELL_CHARGE_MISS_EFFECT; if (Unit* vehicle = GetCaster()->GetVehicleBase()) @@ -4199,6 +4254,7 @@ void AddSC_generic_spell_scripts() new spell_gen_aura_service_uniform(); new spell_gen_av_drekthar_presence(); new spell_gen_bandage(); + new spell_gen_blood_reserve(); new spell_gen_bonked(); new spell_gen_break_shield("spell_gen_break_shield"); new spell_gen_break_shield("spell_gen_tournament_counterattack"); diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp index 6442eb8acca..bd36e3cb765 100644 --- a/src/server/scripts/Spells/spell_holiday.cpp +++ b/src/server/scripts/Spells/spell_holiday.cpp @@ -113,6 +113,105 @@ class spell_love_is_in_the_air_romantic_picnic : public SpellScriptLoader } }; +enum HallowEndCandysSpells +{ + SPELL_HALLOWS_END_CANDY_ORANGE_GIANT = 24924, // Effect 1: Apply Aura: Mod Size, Value: 30% + SPELL_HALLOWS_END_CANDY_SKELETON = 24925, // Effect 1: Apply Aura: Change Model (Skeleton). Effect 2: Apply Aura: Underwater Breathing + SPELL_HALLOWS_END_CANDY_PIRATE = 24926, // Effect 1: Apply Aura: Increase Swim Speed, Value: 50% + SPELL_HALLOWS_END_CANDY_GHOST = 24927, // Effect 1: Apply Aura: Levitate / Hover. Effect 2: Apply Aura: Slow Fall, Effect 3: Apply Aura: Water Walking + SPELL_HALLOWS_END_CANDY_FEMALE_DEFIAS_PIRATE = 44742, // Effect 1: Apply Aura: Change Model (Defias Pirate, Female). Effect 2: Increase Swim Speed, Value: 50% + SPELL_HALLOWS_END_CANDY_MALE_DEFIAS_PIRATE = 44743 // Effect 1: Apply Aura: Change Model (Defias Pirate, Male). Effect 2: Increase Swim Speed, Value: 50% +}; + +// 24930 - Hallow's End Candy +class spell_hallow_end_candy : public SpellScriptLoader +{ + public: + spell_hallow_end_candy() : SpellScriptLoader("spell_hallow_end_candy") { } + + class spell_hallow_end_candy_SpellScript : public SpellScript + { + PrepareSpellScript(spell_hallow_end_candy_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + for (uint32 spellId : spells) + if (!sSpellMgr->GetSpellInfo(spellId)) + return false; + return true; + } + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + GetCaster()->CastSpell(GetCaster(), spells[urand(0, 3)], true); + } + + void Register() override + { + OnEffectHit += SpellEffectFn(spell_hallow_end_candy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + + private: + static uint32 const spells[4]; + }; + + SpellScript* GetSpellScript() const override + { + return new spell_hallow_end_candy_SpellScript(); + } +}; + +uint32 const spell_hallow_end_candy::spell_hallow_end_candy_SpellScript::spells[4] = +{ + SPELL_HALLOWS_END_CANDY_ORANGE_GIANT, + SPELL_HALLOWS_END_CANDY_SKELETON, + SPELL_HALLOWS_END_CANDY_PIRATE, + SPELL_HALLOWS_END_CANDY_GHOST +}; + +// 24926 - Hallow's End Candy +class spell_hallow_end_candy_pirate : public SpellScriptLoader +{ + public: + spell_hallow_end_candy_pirate() : SpellScriptLoader("spell_hallow_end_candy_pirate") { } + + class spell_hallow_end_candy_pirate_AuraScript : public AuraScript + { + PrepareAuraScript(spell_hallow_end_candy_pirate_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_HALLOWS_END_CANDY_FEMALE_DEFIAS_PIRATE) + || !sSpellMgr->GetSpellInfo(SPELL_HALLOWS_END_CANDY_MALE_DEFIAS_PIRATE)) + return false; + return true; + } + + void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + uint32 spell = GetTarget()->getGender() == GENDER_FEMALE ? SPELL_HALLOWS_END_CANDY_FEMALE_DEFIAS_PIRATE : SPELL_HALLOWS_END_CANDY_MALE_DEFIAS_PIRATE; + GetTarget()->CastSpell(GetTarget(), spell, true); + } + + void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + uint32 spell = GetTarget()->getGender() == GENDER_FEMALE ? SPELL_HALLOWS_END_CANDY_FEMALE_DEFIAS_PIRATE : SPELL_HALLOWS_END_CANDY_MALE_DEFIAS_PIRATE; + GetTarget()->RemoveAurasDueToSpell(spell); + } + + void Register() override + { + AfterEffectApply += AuraEffectApplyFn(spell_hallow_end_candy_pirate_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_MOD_INCREASE_SWIM_SPEED, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_hallow_end_candy_pirate_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_MOD_INCREASE_SWIM_SPEED, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_hallow_end_candy_pirate_AuraScript(); + } +}; + // 24750 Trick enum TrickSpells { @@ -1183,11 +1282,79 @@ class spell_midsummer_braziers_hit : public SpellScriptLoader } }; +enum RibbonPoleData +{ + SPELL_HAS_FULL_MIDSUMMER_SET = 58933, + SPELL_BURNING_HOT_POLE_DANCE = 58934, + SPELL_RIBBON_DANCE_COSMETIC = 29726, + SPELL_RIBBON_DANCE = 29175, + GO_RIBBON_POLE = 181605, +}; + +class spell_gen_ribbon_pole_dancer_check : public SpellScriptLoader +{ + public: + spell_gen_ribbon_pole_dancer_check() : SpellScriptLoader("spell_gen_ribbon_pole_dancer_check") { } + + class spell_gen_ribbon_pole_dancer_check_AuraScript : public AuraScript + { + PrepareAuraScript(spell_gen_ribbon_pole_dancer_check_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_HAS_FULL_MIDSUMMER_SET) + || !sSpellMgr->GetSpellInfo(SPELL_RIBBON_DANCE) + || !sSpellMgr->GetSpellInfo(SPELL_BURNING_HOT_POLE_DANCE)) + return false; + return true; + } + + void PeriodicTick(AuraEffect const* /*aurEff*/) + { + Unit* target = GetTarget(); + + // check if aura needs to be removed + if (!target->FindNearestGameObject(GO_RIBBON_POLE, 8.0f) || !target->HasUnitState(UNIT_STATE_CASTING)) + { + target->InterruptNonMeleeSpells(false); + target->RemoveAurasDueToSpell(GetId()); + target->RemoveAura(SPELL_RIBBON_DANCE_COSMETIC); + return; + } + + // set xp buff duration + if (Aura* aur = target->GetAura(SPELL_RIBBON_DANCE)) + { + aur->SetMaxDuration(std::min(3600000, aur->GetMaxDuration() + 180000)); + aur->RefreshDuration(); + + // reward achievement criteria + if (aur->GetMaxDuration() == 3600000 && target->HasAura(SPELL_HAS_FULL_MIDSUMMER_SET)) + target->CastSpell(target, SPELL_BURNING_HOT_POLE_DANCE, true); + } + else + target->AddAura(SPELL_RIBBON_DANCE, target); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_ribbon_pole_dancer_check_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_gen_ribbon_pole_dancer_check_AuraScript(); + } +}; + void AddSC_holiday_spell_scripts() { // Love is in the Air new spell_love_is_in_the_air_romantic_picnic(); // Hallow's End + new spell_hallow_end_candy(); + new spell_hallow_end_candy_pirate(); new spell_hallow_end_trick(); new spell_hallow_end_trick_or_treat(); new spell_hallow_end_tricky_treat(); @@ -1219,4 +1386,5 @@ void AddSC_holiday_spell_scripts() new spell_brewfest_barker_bunny(); // Midsummer Fire Festival new spell_midsummer_braziers_hit(); + new spell_gen_ribbon_pole_dancer_check(); } diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 82d9d134445..a75294ad6e0 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -51,12 +51,15 @@ enum HunterSpells SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED = 54114, SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF = 55711, SPELL_HUNTER_PET_CARRION_FEEDER_TRIGGERED = 54045, + SPELL_HUNTER_PIERCING_SHOTS = 63468, SPELL_HUNTER_READINESS = 23989, SPELL_HUNTER_SNIPER_TRAINING_R1 = 53302, SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1 = 64418, + SPELL_HUNTER_T9_4P_GREATNESS = 68130, SPELL_HUNTER_VICIOUS_VIPER = 61609, SPELL_HUNTER_VIPER_ATTACK_SPEED = 60144, - SPELL_DRAENEI_GIFT_OF_THE_NAARU = 59543 + SPELL_DRAENEI_GIFT_OF_THE_NAARU = 59543, + SPELL_ROAR_OF_SACRIFICE_TRIGGERED = 67481 }; // 13161 - Aspect of the Beast @@ -704,6 +707,63 @@ class spell_hun_pet_heart_of_the_phoenix : public SpellScriptLoader } }; +// -53234 - Piercing Shots +class spell_hun_piercing_shots : public SpellScriptLoader +{ +public: + spell_hun_piercing_shots() : SpellScriptLoader("spell_hun_piercing_shots") { } + + class spell_hun_piercing_shots_AuraScript : public AuraScript + { + PrepareAuraScript(spell_hun_piercing_shots_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_PIERCING_SHOTS)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (eventInfo.GetActionTarget()) + return true; + return false; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + Unit* caster = eventInfo.GetActor(); + Unit* target = eventInfo.GetActionTarget(); + + if (DamageInfo* dmgInfo = eventInfo.GetDamageInfo()) + { + SpellInfo const* piercingShots = sSpellMgr->AssertSpellInfo(SPELL_HUNTER_PIERCING_SHOTS); + int32 duration = piercingShots->GetMaxDuration(); + uint32 amplitude = piercingShots->Effects[EFFECT_0].Amplitude; + uint32 dmg = dmgInfo->GetDamage(); + + uint32 bp = CalculatePct(int32(dmg), aurEff->GetAmount()) / (duration / int32(amplitude)); + bp += target->GetRemainingPeriodicAmount(target->GetGUID(), SPELL_HUNTER_PIERCING_SHOTS, SPELL_AURA_PERIODIC_DAMAGE); + + caster->CastCustomSpell(SPELL_HUNTER_PIERCING_SHOTS, SPELLVALUE_BASE_POINT0, bp, target, true, nullptr, aurEff); + } + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_hun_piercing_shots_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_hun_piercing_shots_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_hun_piercing_shots_AuraScript(); + } +}; + // 56654, 58882 - Rapid Recuperation class spell_hun_rapid_recuperation : public SpellScriptLoader { @@ -788,6 +848,49 @@ class spell_hun_readiness : public SpellScriptLoader } }; +// 53480 - Roar of Sacrifice +class spell_hun_roar_of_sacrifice : public SpellScriptLoader +{ + public: + spell_hun_roar_of_sacrifice() : SpellScriptLoader("spell_hun_roar_of_sacrifice") { } + + class spell_hun_roar_of_sacrifice_AuraScript : public AuraScript + { + PrepareAuraScript(spell_hun_roar_of_sacrifice_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_ROAR_OF_SACRIFICE_TRIGGERED)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + return GetCaster() && (eventInfo.GetDamageInfo()->GetSchoolMask() & GetEffect(EFFECT_1)->GetMiscValue()) != 0; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + uint32 damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()); + eventInfo.GetActor()->CastCustomSpell(SPELL_ROAR_OF_SACRIFICE_TRIGGERED, SPELLVALUE_BASE_POINT0, damage, GetCaster(), TRIGGERED_FULL_MASK, nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_hun_roar_of_sacrifice_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_hun_roar_of_sacrifice_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_hun_roar_of_sacrifice_AuraScript(); + } +}; + // 37506 - Scatter Shot class spell_hun_scatter_shot : public SpellScriptLoader { @@ -967,6 +1070,51 @@ class spell_hun_target_only_pet_and_owner : public SpellScriptLoader } }; +// 67151 - T9 4P Bonus +class spell_hun_t9_4p_bonus : public SpellScriptLoader +{ +public: + spell_hun_t9_4p_bonus() : SpellScriptLoader("spell_hun_t9_4p_bonus") { } + + class spell_hun_t9_4p_bonus_AuraScript : public AuraScript + { + PrepareAuraScript(spell_hun_t9_4p_bonus_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_T9_4P_GREATNESS)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (eventInfo.GetActor()->GetTypeId() == TYPEID_PLAYER && eventInfo.GetActor()->ToPlayer()->GetPet()) + return true; + return false; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + Unit* caster = eventInfo.GetActor(); + + caster->CastSpell(caster->ToPlayer()->GetPet(), SPELL_HUNTER_T9_4P_GREATNESS, true, nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_hun_t9_4p_bonus_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_hun_t9_4p_bonus_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_hun_t9_4p_bonus_AuraScript(); + } +}; + // 60144 - Viper Attack Speed class spell_hun_viper_attack_speed : public SpellScriptLoader { @@ -1025,11 +1173,14 @@ void AddSC_hunter_spell_scripts() new spell_hun_misdirection_proc(); new spell_hun_pet_carrion_feeder(); new spell_hun_pet_heart_of_the_phoenix(); + new spell_hun_piercing_shots(); new spell_hun_rapid_recuperation(); new spell_hun_readiness(); + new spell_hun_roar_of_sacrifice(); new spell_hun_scatter_shot(); new spell_hun_sniper_training(); new spell_hun_tame_beast(); new spell_hun_target_only_pet_and_owner(); + new spell_hun_t9_4p_bonus(); new spell_hun_viper_attack_speed(); } diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 84c67bad63b..5a6bb78eb10 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1903,7 +1903,7 @@ class spell_item_crystal_prison_dummy_dnd : public SpellScriptLoader if (Creature* target = GetHitCreature()) if (target->isDead() && !target->IsPet()) { - GetCaster()->SummonGameObject(OBJECT_IMPRISONED_DOOMGUARD, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0, 0, 0, 0, uint32(target->GetRespawnTime()-time(NULL))); + GetCaster()->SummonGameObject(OBJECT_IMPRISONED_DOOMGUARD, *target, G3D::Quat(), uint32(target->GetRespawnTime()-time(NULL))); target->DespawnOrUnsummon(); } } @@ -2731,6 +2731,70 @@ public: } }; +enum SoulPreserver +{ + SPELL_SOUL_PRESERVER_DRUID = 60512, + SPELL_SOUL_PRESERVER_PALADIN = 60513, + SPELL_SOUL_PRESERVER_PRIEST = 60514, + SPELL_SOUL_PRESERVER_SHAMAN = 60515, +}; + +class spell_item_soul_preserver : public SpellScriptLoader +{ +public: + spell_item_soul_preserver() : SpellScriptLoader("spell_item_soul_preserver") { } + + class spell_item_soul_preserver_AuraScript : public AuraScript + { + PrepareAuraScript(spell_item_soul_preserver_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SOUL_PRESERVER_DRUID) || + !sSpellMgr->GetSpellInfo(SPELL_SOUL_PRESERVER_PALADIN) || + !sSpellMgr->GetSpellInfo(SPELL_SOUL_PRESERVER_PRIEST) || + !sSpellMgr->GetSpellInfo(SPELL_SOUL_PRESERVER_SHAMAN)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + Unit* caster = eventInfo.GetActor(); + + switch (caster->getClass()) + { + case CLASS_DRUID: + caster->CastSpell(caster, SPELL_SOUL_PRESERVER_DRUID, true, nullptr, aurEff); + break; + case CLASS_PALADIN: + caster->CastSpell(caster, SPELL_SOUL_PRESERVER_PALADIN, true, nullptr, aurEff); + break; + case CLASS_PRIEST: + caster->CastSpell(caster, SPELL_SOUL_PRESERVER_PRIEST, true, nullptr, aurEff); + break; + case CLASS_SHAMAN: + caster->CastSpell(caster, SPELL_SOUL_PRESERVER_SHAMAN, true, nullptr, aurEff); + break; + default: + break; + } + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_item_soul_preserver_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_item_soul_preserver_AuraScript(); + } +}; + class spell_item_toy_train_set_pulse : public SpellScriptLoader { public: @@ -2768,6 +2832,336 @@ public: } }; +enum DeathChoiceSpells +{ + SPELL_DEATH_CHOICE_NORMAL_AURA = 67702, + SPELL_DEATH_CHOICE_NORMAL_AGILITY = 67703, + SPELL_DEATH_CHOICE_NORMAL_STRENGTH = 67708, + SPELL_DEATH_CHOICE_HEROIC_AURA = 67771, + SPELL_DEATH_CHOICE_HEROIC_AGILITY = 67772, + SPELL_DEATH_CHOICE_HEROIC_STRENGTH = 67773 +}; + +class spell_item_death_choice : public SpellScriptLoader +{ +public: + spell_item_death_choice() : SpellScriptLoader("spell_item_death_choice") { } + + class spell_item_death_choice_AuraScript : public AuraScript + { + PrepareAuraScript(spell_item_death_choice_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DEATH_CHOICE_NORMAL_STRENGTH) || + !sSpellMgr->GetSpellInfo(SPELL_DEATH_CHOICE_NORMAL_AGILITY) || + !sSpellMgr->GetSpellInfo(SPELL_DEATH_CHOICE_HEROIC_STRENGTH) || + !sSpellMgr->GetSpellInfo(SPELL_DEATH_CHOICE_HEROIC_AGILITY)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + Unit* caster = eventInfo.GetActor(); + float str = caster->GetStat(STAT_STRENGTH); + float agi = caster->GetStat(STAT_AGILITY); + + switch (aurEff->GetId()) + { + case SPELL_DEATH_CHOICE_NORMAL_AURA: + { + if (str > agi) + caster->CastSpell(caster, SPELL_DEATH_CHOICE_NORMAL_STRENGTH, true, nullptr, aurEff); + else + caster->CastSpell(caster, SPELL_DEATH_CHOICE_NORMAL_AGILITY, true, nullptr, aurEff); + break; + } + case SPELL_DEATH_CHOICE_HEROIC_AURA: + { + if (str > agi) + caster->CastSpell(caster, SPELL_DEATH_CHOICE_HEROIC_STRENGTH, true, nullptr, aurEff); + else + caster->CastSpell(caster, SPELL_DEATH_CHOICE_HEROIC_AGILITY, true, nullptr, aurEff); + break; + } + default: + break; + } + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_item_death_choice_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_item_death_choice_AuraScript(); + } +}; + +enum TrinketStackSpells +{ + SPELL_LIGHTNING_CAPACITOR_AURA = 37657, // Lightning Capacitor + SPELL_LIGHTNING_CAPACITOR_STACK = 37658, + SPELL_LIGHTNING_CAPACITOR_TRIGGER = 37661, + SPELL_THUNDER_CAPACITOR_AURA = 54841, // Thunder Capacitor + SPELL_THUNDER_CAPACITOR_STACK = 54842, + SPELL_THUNDER_CAPACITOR_TRIGGER = 54843, + SPELL_TOC25_CASTER_TRINKET_NORMAL_AURA = 67712, // Item - Coliseum 25 Normal Caster Trinket + SPELL_TOC25_CASTER_TRINKET_NORMAL_STACK = 67713, + SPELL_TOC25_CASTER_TRINKET_NORMAL_TRIGGER = 67714, + SPELL_TOC25_CASTER_TRINKET_HEROIC_AURA = 67758, // Item - Coliseum 25 Heroic Caster Trinket + SPELL_TOC25_CASTER_TRINKET_HEROIC_STACK = 67759, + SPELL_TOC25_CASTER_TRINKET_HEROIC_TRIGGER = 67760, +}; + +class spell_item_trinket_stack : public SpellScriptLoader +{ +public: + spell_item_trinket_stack(char const* scriptName, uint32 stackSpell, uint32 triggerSpell) : SpellScriptLoader(scriptName), + _stackSpell(stackSpell), _triggerSpell(triggerSpell) + { + } + + class spell_item_trinket_stack_AuraScript : public AuraScript + { + PrepareAuraScript(spell_item_trinket_stack_AuraScript); + + public: + spell_item_trinket_stack_AuraScript(uint32 stackSpell, uint32 triggerSpell) : _stackSpell(stackSpell), _triggerSpell(triggerSpell) + { + } + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(_stackSpell) || !sSpellMgr->GetSpellInfo(_triggerSpell)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + Unit* caster = eventInfo.GetActor(); + + caster->CastSpell(caster, _stackSpell, true, nullptr, aurEff); // cast the stack + + Aura* dummy = caster->GetAura(_stackSpell); // retrieve aura + + //dont do anything if it's not the right amount of stacks; + if (!dummy || dummy->GetStackAmount() < aurEff->GetAmount()) + return; + + // if right amount, remove the aura and cast real trigger + caster->RemoveAurasDueToSpell(_stackSpell); + if (Unit* target = eventInfo.GetActionTarget()) + caster->CastSpell(target, _triggerSpell, true, nullptr, aurEff); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_item_trinket_stack_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + + private: + uint32 _stackSpell; + uint32 _triggerSpell; + }; + + AuraScript* GetAuraScript() const override + { + return new spell_item_trinket_stack_AuraScript(_stackSpell, _triggerSpell); + } + +private: + uint32 _stackSpell; + uint32 _triggerSpell; +}; + +// 57345 - Darkmoon Card: Greatness +enum DarkmoonCardSpells +{ + SPELL_DARKMOON_CARD_STRENGHT = 60229, + SPELL_DARKMOON_CARD_AGILITY = 60233, + SPELL_DARKMOON_CARD_INTELLECT = 60234, + SPELL_DARKMOON_CARD_SPIRIT = 60235, +}; + +class spell_item_darkmoon_card_greatness : public SpellScriptLoader +{ +public: + spell_item_darkmoon_card_greatness() : SpellScriptLoader("spell_item_darkmoon_card_greatness") { } + + class spell_item_darkmoon_card_greatness_AuraScript : public AuraScript + { + PrepareAuraScript(spell_item_darkmoon_card_greatness_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_DARKMOON_CARD_STRENGHT) || + !sSpellMgr->GetSpellInfo(SPELL_DARKMOON_CARD_AGILITY) || + !sSpellMgr->GetSpellInfo(SPELL_DARKMOON_CARD_INTELLECT) || + !sSpellMgr->GetSpellInfo(SPELL_DARKMOON_CARD_SPIRIT)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + Unit* caster = eventInfo.GetActor(); + float str = caster->GetStat(STAT_STRENGTH); + float agi = caster->GetStat(STAT_AGILITY); + float intl = caster->GetStat(STAT_INTELLECT); + float spi = caster->GetStat(STAT_SPIRIT); + float stat = 0.0f; + + uint32 spellTrigger = SPELL_DARKMOON_CARD_STRENGHT; + + if (str > stat) + { + spellTrigger = SPELL_DARKMOON_CARD_STRENGHT; + stat = str; + } + + if (agi > stat) + { + spellTrigger = SPELL_DARKMOON_CARD_AGILITY; + stat = agi; + } + + if (intl > stat) + { + spellTrigger = SPELL_DARKMOON_CARD_INTELLECT; + stat = intl; + } + + if (spi > stat) + { + spellTrigger = SPELL_DARKMOON_CARD_SPIRIT; + stat = spi; + } + + caster->CastSpell(caster, spellTrigger, true, nullptr, aurEff); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_item_darkmoon_card_greatness_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_item_darkmoon_card_greatness_AuraScript(); + } +}; + +// 43820 - Amani Charm of the Witch Doctor +enum CharmWitchDoctor +{ + SPELL_CHARM_WITCH_DOCTOR_PROC = 43821 +}; + +class spell_item_charm_witch_doctor : public SpellScriptLoader +{ +public: + spell_item_charm_witch_doctor() : SpellScriptLoader("spell_item_charm_witch_doctor") { } + + class spell_item_charm_witch_doctor_AuraScript : public AuraScript + { + PrepareAuraScript(spell_item_charm_witch_doctor_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_CHARM_WITCH_DOCTOR_PROC)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + Unit* caster = eventInfo.GetActor(); + Unit* target = eventInfo.GetActionTarget(); + + if (target) + { + int32 bp = CalculatePct(target->GetCreateHealth(),aurEff->GetSpellInfo()->Effects[1].CalcValue()); + caster->CastCustomSpell(target, SPELL_CHARM_WITCH_DOCTOR_PROC, &bp, nullptr, nullptr, true, nullptr, aurEff); + } + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_item_charm_witch_doctor_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_item_charm_witch_doctor_AuraScript(); + } +}; + +// 27522,40336 - Mana Drain +enum ManaDrainSpells +{ + SPELL_MANA_DRAIN_ENERGIZE = 29471, + SPELL_MANA_DRAIN_LEECH = 27526 +}; + +class spell_item_mana_drain : public SpellScriptLoader +{ +public: + spell_item_mana_drain() : SpellScriptLoader("spell_item_mana_drain") { } + + class spell_item_mana_drain_AuraScript : public AuraScript + { + PrepareAuraScript(spell_item_mana_drain_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_MANA_DRAIN_ENERGIZE) + || !sSpellMgr->GetSpellInfo(SPELL_MANA_DRAIN_LEECH)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + Unit* caster = eventInfo.GetActor(); + Unit* target = eventInfo.GetActionTarget(); + + if (caster->IsAlive()) + caster->CastSpell(caster, SPELL_MANA_DRAIN_ENERGIZE, true, nullptr, aurEff); + + if (target && target->IsAlive()) + caster->CastSpell(target, SPELL_MANA_DRAIN_LEECH, true, nullptr, aurEff); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_item_mana_drain_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_item_mana_drain_AuraScript(); + } +}; + void AddSC_item_spell_scripts() { // 23074 Arcanite Dragonling @@ -2838,5 +3232,14 @@ void AddSC_item_spell_scripts() new spell_item_chicken_cover(); new spell_item_muisek_vessel(); new spell_item_greatmothers_soulcatcher(); + new spell_item_soul_preserver(); new spell_item_toy_train_set_pulse(); + new spell_item_death_choice(); + new spell_item_trinket_stack("spell_item_lightning_capacitor", SPELL_LIGHTNING_CAPACITOR_STACK, SPELL_LIGHTNING_CAPACITOR_TRIGGER); + new spell_item_trinket_stack("spell_item_thunder_capacitor", SPELL_THUNDER_CAPACITOR_STACK, SPELL_THUNDER_CAPACITOR_TRIGGER); + new spell_item_trinket_stack("spell_item_toc25_normal_caster_trinket", SPELL_TOC25_CASTER_TRINKET_NORMAL_STACK, SPELL_TOC25_CASTER_TRINKET_NORMAL_TRIGGER); + new spell_item_trinket_stack("spell_item_toc25_heroic_caster_trinket", SPELL_TOC25_CASTER_TRINKET_HEROIC_STACK, SPELL_TOC25_CASTER_TRINKET_HEROIC_TRIGGER); + new spell_item_darkmoon_card_greatness(); + new spell_item_charm_witch_doctor(); + new spell_item_mana_drain(); } diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 2f4e4fa6f44..bacbe31630c 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -29,6 +29,7 @@ enum MageSpells { + SPELL_MAGE_BLAZING_SPEED = 31643, SPELL_MAGE_BURNOUT = 29077, SPELL_MAGE_COLD_SNAP = 11958, SPELL_MAGE_FOCUS_MAGIC_PROC = 54648, @@ -116,6 +117,42 @@ class spell_mage_blast_wave : public SpellScriptLoader } }; +// -31641 - Blazing Speed +class spell_mage_blazing_speed : public SpellScriptLoader +{ +public: + spell_mage_blazing_speed() : SpellScriptLoader("spell_mage_blazing_speed") { } + + class spell_mage_blazing_speed_AuraScript : public AuraScript + { + PrepareAuraScript(spell_mage_blazing_speed_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_BLAZING_SPEED)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + if (Unit* target = eventInfo.GetActionTarget()) + target->CastSpell(target, SPELL_MAGE_BLAZING_SPEED, true, nullptr, aurEff); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_mage_blazing_speed_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_mage_blazing_speed_AuraScript(); + } +}; + // -44449 - Burnout class spell_mage_burnout : public SpellScriptLoader { @@ -647,6 +684,7 @@ class spell_mage_summon_water_elemental : public SpellScriptLoader void AddSC_mage_spell_scripts() { new spell_mage_blast_wave(); + new spell_mage_blazing_speed(); new spell_mage_burnout(); new spell_mage_cold_snap(); new spell_mage_fire_frost_ward(); diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index d9fd36f5fd4..6de95af8d8f 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -37,6 +37,7 @@ enum PaladinSpells SPELL_PALADIN_HOLY_SHOCK_R1 = 20473, SPELL_PALADIN_HOLY_SHOCK_R1_DAMAGE = 25912, SPELL_PALADIN_HOLY_SHOCK_R1_HEALING = 25914, + SPELL_PALADIN_ILLUMINATION_ENERGIZE = 20272, SPELL_PALADIN_BLESSING_OF_LOWER_CITY_DRUID = 37878, SPELL_PALADIN_BLESSING_OF_LOWER_CITY_PALADIN = 37879, @@ -871,6 +872,61 @@ class spell_pal_holy_shock : public SpellScriptLoader } }; +// -20210 - Illumination +class spell_pal_illumination : public SpellScriptLoader +{ +public: + spell_pal_illumination() : SpellScriptLoader("spell_pal_illumination") { } + + class spell_pal_illumination_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pal_illumination_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_HOLY_SHOCK_R1_HEALING) || + !sSpellMgr->GetSpellInfo(SPELL_PALADIN_ILLUMINATION_ENERGIZE) || + !sSpellMgr->GetSpellInfo(SPELL_PALADIN_HOLY_SHOCK_R1)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + // this script is valid only for the Holy Shock procs of illumination + if (eventInfo.GetHealInfo() && eventInfo.GetHealInfo()->GetSpellInfo()) + { + SpellInfo const* originalSpell = nullptr; + + // if proc comes from the Holy Shock heal, need to get mana cost of original spell - else it's the original heal itself + if (eventInfo.GetHealInfo()->GetSpellInfo()->SpellFamilyFlags[1] & 0x00010000) + originalSpell = sSpellMgr->GetSpellInfo(sSpellMgr->GetSpellWithRank(SPELL_PALADIN_HOLY_SHOCK_R1, eventInfo.GetHealInfo()->GetSpellInfo()->GetRank())); + else + originalSpell = eventInfo.GetHealInfo()->GetSpellInfo(); + + if (originalSpell && aurEff->GetSpellInfo()) + { + Unit* target = eventInfo.GetActor(); // Paladin is the target of the energize + uint32 bp = CalculatePct(originalSpell->CalcPowerCost(target, originalSpell->GetSchoolMask()), aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue()); + target->CastCustomSpell(SPELL_PALADIN_ILLUMINATION_ENERGIZE, SPELLVALUE_BASE_POINT0, bp, target, true, nullptr, aurEff); + } + } + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_pal_illumination_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_pal_illumination_AuraScript(); + } +}; + // Maybe this is incorrect // These spells should always be cast on login, regardless of whether the player has the talent or not @@ -1393,6 +1449,7 @@ void AddSC_paladin_spell_scripts() new spell_pal_hand_of_sacrifice(); new spell_pal_hand_of_salvation(); new spell_pal_holy_shock(); + new spell_pal_illumination(); new spell_pal_improved_aura("spell_pal_improved_concentraction_aura", SPELL_PALADIN_IMPROVED_CONCENTRACTION_AURA); new spell_pal_improved_aura("spell_pal_improved_devotion_aura", SPELL_PALADIN_IMPROVED_DEVOTION_AURA); new spell_pal_improved_aura("spell_pal_sanctified_retribution", SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA); diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 51f03346df1..9e2d265aa9c 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -29,6 +29,7 @@ enum PriestSpells { + SPELL_PRIEST_BLESSED_RECOVERY_R1 = 27813, SPELL_PRIEST_DIVINE_AEGIS = 47753, SPELL_PRIEST_EMPOWERED_RENEW = 63544, SPELL_PRIEST_GLYPH_OF_CIRCLE_OF_HEALING = 55675, @@ -88,6 +89,50 @@ class RaidCheck Unit const* _caster; }; +// -27811 - Blessed Recovery +class spell_pri_blessed_recovery : public SpellScriptLoader +{ +public: + spell_pri_blessed_recovery() : SpellScriptLoader("spell_pri_blessed_recovery") { } + + class spell_pri_blessed_recovery_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pri_blessed_recovery_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_BLESSED_RECOVERY_R1)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + if (DamageInfo* dmgInfo = eventInfo.GetDamageInfo()) + { + if (Unit* target = eventInfo.GetActionTarget()) + { + uint32 triggerSpell = sSpellMgr->GetSpellWithRank(SPELL_PRIEST_BLESSED_RECOVERY_R1, aurEff->GetSpellInfo()->GetRank()); + uint32 bp = CalculatePct(int32(dmgInfo->GetDamage()), aurEff->GetAmount()) / 3; + bp += target->GetRemainingPeriodicAmount(target->GetGUID(), triggerSpell, SPELL_AURA_PERIODIC_HEAL); + target->CastCustomSpell(triggerSpell, SPELLVALUE_BASE_POINT0, bp, target, true, nullptr, aurEff); + } + } + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_pri_blessed_recovery_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_pri_blessed_recovery_AuraScript(); + } +}; + // -34861 - Circle of Healing class spell_pri_circle_of_healing : public SpellScriptLoader { @@ -869,6 +914,7 @@ class spell_pri_vampiric_touch : public SpellScriptLoader void AddSC_priest_spell_scripts() { + new spell_pri_blessed_recovery(); new spell_pri_circle_of_healing(); new spell_pri_divine_aegis(); new spell_pri_divine_hymn(); diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index ae761413ca5..715e4d4ed2d 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1080,9 +1080,7 @@ enum RedSnapperVeryTasty ITEM_RED_SNAPPER = 23614, SPELL_CAST_NET = 29866, - SPELL_NEW_SUMMON_TEST = 49214, - - GO_SCHOOL_OF_RED_SNAPPER = 181616 + SPELL_NEW_SUMMON_TEST = 49214 }; class spell_q9452_cast_net: public SpellScriptLoader @@ -1099,15 +1097,6 @@ class spell_q9452_cast_net: public SpellScriptLoader return GetCaster()->GetTypeId() == TYPEID_PLAYER; } - SpellCastResult CheckCast() - { - GameObject* go = GetCaster()->FindNearestGameObject(GO_SCHOOL_OF_RED_SNAPPER, 3.0f); - if (!go || go->GetRespawnTime()) - return SPELL_FAILED_REQUIRES_SPELL_FOCUS; - - return SPELL_CAST_OK; - } - void HandleDummy(SpellEffIndex /*effIndex*/) { Player* caster = GetCaster()->ToPlayer(); @@ -1127,7 +1116,6 @@ class spell_q9452_cast_net: public SpellScriptLoader void Register() override { - OnCheckCast += SpellCheckCastFn(spell_q9452_cast_net_SpellScript::CheckCast); OnEffectHit += SpellEffectFn(spell_q9452_cast_net_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_q9452_cast_net_SpellScript::HandleActiveObject, EFFECT_1, SPELL_EFFECT_ACTIVATE_OBJECT); } @@ -2482,6 +2470,33 @@ class spell_q13665_q13790_bested_trigger : public SpellScriptLoader } }; +// herald of war and life without regret portal spells +class spell_59064_59439_portals : public SpellScriptLoader +{ +public: + spell_59064_59439_portals() : SpellScriptLoader("spell_59064_59439_portals") { } + + class spell_59064_59439_portals_SpellScript : public SpellScript + { + PrepareSpellScript(spell_59064_59439_portals_SpellScript); + + void HandleScript(SpellEffIndex /*effIndex*/) + { + GetHitUnit()->CastSpell(GetHitUnit(), uint32(GetEffectValue())); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_59064_59439_portals_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_59064_59439_portals_SpellScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -2542,4 +2557,5 @@ void AddSC_quest_spell_scripts() new spell_q10929_fumping(); new spell_q12414_hand_over_reins(); new spell_q13665_q13790_bested_trigger(); + new spell_59064_59439_portals(); } diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index affc4d1c26c..1abb6741e0d 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -43,7 +43,8 @@ enum RogueSpells SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC = 59628, SPELL_ROGUE_HONOR_AMONG_THIEVES = 51698, SPELL_ROGUE_HONOR_AMONG_THIEVES_PROC = 52916, - SPELL_ROGUE_HONOR_AMONG_THIEVES_2 = 51699 + SPELL_ROGUE_HONOR_AMONG_THIEVES_2 = 51699, + SPELL_ROGUE_T10_2P_BONUS = 70804, }; // 13877, 33735, (check 51211, 65956) - Blade Flurry @@ -843,6 +844,40 @@ public: } }; +// 70805 - Rogue T10 2P Bonus -- THIS SHOULD BE REMOVED WITH NEW PROC SYSTEM. +class spell_rog_t10_2p_bonus : public SpellScriptLoader +{ +public: + spell_rog_t10_2p_bonus() : SpellScriptLoader("spell_rog_t10_2p_bonus") { } + + class spell_rog_t10_2p_bonus_AuraScript : public AuraScript + { + PrepareAuraScript(spell_rog_t10_2p_bonus_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_T10_2P_BONUS)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + return eventInfo.GetActor() == eventInfo.GetActionTarget(); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_rog_t10_2p_bonus_AuraScript::CheckProc); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_rog_t10_2p_bonus_AuraScript(); + } +}; + void AddSC_rogue_spell_scripts() { new spell_rog_blade_flurry(); @@ -858,4 +893,5 @@ void AddSC_rogue_spell_scripts() new spell_rog_tricks_of_the_trade_proc(); new spell_rog_honor_among_thieves(); new spell_rog_honor_among_thieves_proc(); + new spell_rog_t10_2p_bonus(); } diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 41e72b1388b..ad65c7c6ec7 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -48,8 +48,10 @@ enum ShamanSpells SPELL_SHAMAN_ITEM_MANA_SURGE = 23571, SPELL_SHAMAN_LAVA_FLOWS_R1 = 51480, SPELL_SHAMAN_LAVA_FLOWS_TRIGGERED_R1 = 64694, + SPELL_SHAMAN_LIGHTNING_SHIELD_R1 = 26364, SPELL_SHAMAN_MANA_SPRING_TOTEM_ENERGIZE = 52032, SPELL_SHAMAN_MANA_TIDE_TOTEM = 39609, + SPELL_SHAMAN_NATURE_GUARDIAN = 31616, SPELL_SHAMAN_SATED = 57724, SPELL_SHAMAN_STORM_EARTH_AND_FIRE = 51483, SPELL_SHAMAN_TOTEM_EARTHBIND_EARTHGRAB = 64695, @@ -671,7 +673,7 @@ class spell_sha_heroism : public SpellScriptLoader } }; -// 23551 - Lightning Shield +// 23551 - Lightning Shield T2 Bonus class spell_sha_item_lightning_shield : public SpellScriptLoader { public: @@ -706,7 +708,7 @@ class spell_sha_item_lightning_shield : public SpellScriptLoader } }; -// 23552 - Lightning Shield +// 23552 - Lightning Shield T2 Bonus class spell_sha_item_lightning_shield_trigger : public SpellScriptLoader { public: @@ -718,7 +720,7 @@ class spell_sha_item_lightning_shield_trigger : public SpellScriptLoader bool Validate(SpellInfo const* /*spellInfo*/) override { - if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_ITEM_MANA_SURGE)) + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD_DAMAGE)) return false; return true; } @@ -753,7 +755,7 @@ class spell_sha_item_mana_surge : public SpellScriptLoader bool Validate(SpellInfo const* /*spellInfo*/) override { - if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD_DAMAGE)) + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_ITEM_MANA_SURGE)) return false; return true; } @@ -865,6 +867,51 @@ class spell_sha_lava_lash : public SpellScriptLoader } }; +// -324 - Lightning Shield +class spell_sha_lightning_shield : public SpellScriptLoader +{ +public: + spell_sha_lightning_shield() : SpellScriptLoader("spell_sha_lightning_shield") { } + + class spell_sha_lightning_shield_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_lightning_shield_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_LIGHTNING_SHIELD_R1)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (eventInfo.GetActionTarget()) + return true; + return false; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + uint32 triggerSpell = sSpellMgr->GetSpellWithRank(SPELL_SHAMAN_LIGHTNING_SHIELD_R1, aurEff->GetSpellInfo()->GetRank()); + + eventInfo.GetActionTarget()->CastSpell(eventInfo.GetActor(), triggerSpell, true, nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_sha_lightning_shield_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_sha_lightning_shield_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_sha_lightning_shield_AuraScript(); + } +}; + // 52031, 52033, 52034, 52035, 52036, 58778, 58779, 58780 - Mana Spring Totem class spell_sha_mana_spring_totem : public SpellScriptLoader { @@ -924,6 +971,7 @@ class spell_sha_mana_tide_totem : public SpellScriptLoader void HandleDummy(SpellEffIndex /*effIndex*/) { if (Unit* caster = GetCaster()) + { if (Unit* unitTarget = GetHitUnit()) { if (unitTarget->getPowerType() == POWER_MANA) @@ -938,6 +986,7 @@ class spell_sha_mana_tide_totem : public SpellScriptLoader caster->CastCustomSpell(unitTarget, SPELL_SHAMAN_MANA_TIDE_TOTEM, &effBasePoints0, NULL, NULL, true, NULL, NULL, GetOriginalCaster()->GetGUID()); } } + } } void Register() override @@ -952,6 +1001,56 @@ class spell_sha_mana_tide_totem : public SpellScriptLoader } }; +// -30881 - Nature's Guardian +class spell_sha_nature_guardian : public SpellScriptLoader +{ +public: + spell_sha_nature_guardian() : SpellScriptLoader("spell_sha_nature_guardian") { } + + class spell_sha_nature_guardian_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_nature_guardian_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_NATURE_GUARDIAN)) + return false; + return true; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + int32 healthpct = aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); // %s2 - the 30% threshold for health + + if (Unit* target = eventInfo.GetActionTarget()) + { + if (target->HealthBelowPctDamaged(healthpct, eventInfo.GetDamageInfo()->GetDamage())) + { + + uint32 bp = CalculatePct(target->GetMaxHealth(), aurEff->GetAmount()); + target->CastCustomSpell(SPELL_SHAMAN_NATURE_GUARDIAN, SPELLVALUE_BASE_POINT0, bp, target, true, nullptr, aurEff); + + // Threat reduction is around 10% confirmed in retail and from wiki + Unit* attacker = eventInfo.GetActor(); + if (attacker->IsAlive()) + attacker->getThreatManager().modifyThreatPercent(target, -10); + } + } + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_sha_nature_guardian_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_sha_nature_guardian_AuraScript(); + } +}; + // 6495 - Sentry Totem class spell_sha_sentry_totem : public SpellScriptLoader { @@ -1085,8 +1184,10 @@ void AddSC_shaman_spell_scripts() new spell_sha_item_mana_surge(); new spell_sha_item_t10_elemental_2p_bonus(); new spell_sha_lava_lash(); + new spell_sha_lightning_shield(); new spell_sha_mana_spring_totem(); new spell_sha_mana_tide_totem(); + new spell_sha_nature_guardian(); new spell_sha_sentry_totem(); new spell_sha_thunderstorm(); new spell_sha_totemic_mastery(); diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index a0a6189cbe2..5e0074bf9f7 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -50,6 +50,12 @@ enum WarlockSpells SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2 = 60956, SPELL_WARLOCK_LIFE_TAP_ENERGIZE = 31818, SPELL_WARLOCK_LIFE_TAP_ENERGIZE_2 = 32553, + SPELL_WARLOCK_NETHER_PROTECTION_HOLY = 54370, + SPELL_WARLOCK_NETHER_PROTECTION_FIRE = 54371, + SPELL_WARLOCK_NETHER_PROTECTION_FROST = 54372, + SPELL_WARLOCK_NETHER_PROTECTION_ARCANE = 54373, + SPELL_WARLOCK_NETHER_PROTECTION_SHADOW = 54374, + SPELL_WARLOCK_NETHER_PROTECTION_NATURE = 54375, SPELL_WARLOCK_SOULSHATTER = 32835, SPELL_WARLOCK_SIPHON_LIFE_HEAL = 63106, SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117 @@ -377,6 +383,8 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader case CREATURE_FAMILY_IMP: targetCreature->CastSpell(targetCreature, SPELL_WARLOCK_DEMONIC_EMPOWERMENT_IMP, true); break; + default: + break; } } } @@ -682,6 +690,95 @@ class spell_warl_life_tap : public SpellScriptLoader } }; +// -30299 - Nether Protection +class spell_warl_nether_protection : public SpellScriptLoader +{ +public: + spell_warl_nether_protection() : SpellScriptLoader("spell_warl_nether_protection") { } + + class spell_warl_nether_protection_AuraScript : public AuraScript + { + PrepareAuraScript(spell_warl_nether_protection_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_WARLOCK_NETHER_PROTECTION_HOLY) || + !sSpellMgr->GetSpellInfo(SPELL_WARLOCK_NETHER_PROTECTION_FIRE) || + !sSpellMgr->GetSpellInfo(SPELL_WARLOCK_NETHER_PROTECTION_FROST) || + !sSpellMgr->GetSpellInfo(SPELL_WARLOCK_NETHER_PROTECTION_ARCANE) || + !sSpellMgr->GetSpellInfo(SPELL_WARLOCK_NETHER_PROTECTION_SHADOW) || + !sSpellMgr->GetSpellInfo(SPELL_WARLOCK_NETHER_PROTECTION_NATURE)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + if (eventInfo.GetDamageInfo()) + { + switch (GetFirstSchoolInMask(eventInfo.GetDamageInfo()->GetSchoolMask())) + { + case SPELL_SCHOOL_HOLY: + case SPELL_SCHOOL_FIRE: + case SPELL_SCHOOL_NATURE: + case SPELL_SCHOOL_FROST: + case SPELL_SCHOOL_SHADOW: + case SPELL_SCHOOL_ARCANE: + return true; + default: + break; + } + } + + return false; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + uint32 triggerspell = 0; + + switch (GetFirstSchoolInMask(eventInfo.GetDamageInfo()->GetSchoolMask())) + { + case SPELL_SCHOOL_HOLY: + triggerspell = SPELL_WARLOCK_NETHER_PROTECTION_HOLY; + break; + case SPELL_SCHOOL_FIRE: + triggerspell = SPELL_WARLOCK_NETHER_PROTECTION_FIRE; + break; + case SPELL_SCHOOL_NATURE: + triggerspell = SPELL_WARLOCK_NETHER_PROTECTION_NATURE; + break; + case SPELL_SCHOOL_FROST: + triggerspell = SPELL_WARLOCK_NETHER_PROTECTION_FROST; + break; + case SPELL_SCHOOL_SHADOW: + triggerspell = SPELL_WARLOCK_NETHER_PROTECTION_SHADOW; + break; + case SPELL_SCHOOL_ARCANE: + triggerspell = SPELL_WARLOCK_NETHER_PROTECTION_ARCANE; + break; + default: + return; + } + + if (Unit* target = eventInfo.GetActionTarget()) + target->CastSpell(target, triggerspell, true, nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_warl_nether_protection_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_warl_nether_protection_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_warl_nether_protection_AuraScript(); + } +}; + // 18541 - Ritual of Doom Effect class spell_warl_ritual_of_doom_effect : public SpellScriptLoader { @@ -917,6 +1014,7 @@ void AddSC_warlock_spell_scripts() new spell_warl_haunt(); new spell_warl_health_funnel(); new spell_warl_life_tap(); + new spell_warl_nether_protection(); new spell_warl_ritual_of_doom_effect(); new spell_warl_seed_of_corruption(); new spell_warl_shadow_ward(); diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 8f2ea5887d2..3db4f41706d 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -1197,6 +1197,29 @@ public: } }; +enum MidsummerPoleRibbon +{ + SPELL_POLE_DANCE = 29726, + SPELL_BLUE_FIRE_RING = 46842, + NPC_POLE_RIBBON_BUNNY = 17066, + ACTION_COSMETIC_FIRES = 0 +}; + +class go_midsummer_ribbon_pole : public GameObjectScript +{ +public: + go_midsummer_ribbon_pole() : GameObjectScript("go_midsummer_ribbon_pole") { } + + bool OnGossipHello(Player* player, GameObject* go) override + { + if (Creature* creature = go->FindNearestCreature(NPC_POLE_RIBBON_BUNNY, 10.0f)) + { + creature->GetAI()->DoAction(ACTION_COSMETIC_FIRES); + player->CastSpell(creature, SPELL_POLE_DANCE, true); + } + return true; + } +}; enum ToyTrainSpells { @@ -1274,5 +1297,6 @@ void AddSC_go_scripts() new go_veil_skith_cage(); new go_frostblade_shrine(); new go_midsummer_bonfire(); + new go_midsummer_ribbon_pole(); new go_toy_train_set(); } diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 52174e1b012..ff15698e579 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -241,7 +241,7 @@ public: float x, y, z; go->GetClosePoint(x, y, z, go->GetObjectSize() / 3, 7.0f); - go->SummonGameObject(GO_HIGH_QUALITY_FUR, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, 0, 0, 0, 0, 1); + go->SummonGameObject(GO_HIGH_QUALITY_FUR, *go, G3D::Quat(), 1); if (TempSummon* summon = player->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, go->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000)) { summon->SetVisible(false); diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 159faa38c62..277bc9ac804 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -36,7 +36,6 @@ npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap npc_shadowfiend 100% restore 5% of owner's mana when shadowfiend die from damage -npc_locksmith 75% list of keys needs to be confirmed npc_firework 100% NPC's summoned by rockets and rocket clusters, for making them cast visual npc_train_wrecker 100% Wind-Up Train Wrecker that kills train set EndContentData */ @@ -581,6 +580,115 @@ public: }; /*###### +## npc_midsummer_bunny_pole +######*/ + +enum RibbonPoleData +{ + GO_RIBBON_POLE = 181605, + SPELL_RIBBON_DANCE_COSMETIC = 29726, + SPELL_RED_FIRE_RING = 46836, + SPELL_BLUE_FIRE_RING = 46842, + EVENT_CAST_RED_FIRE_RING = 1, + EVENT_CAST_BLUE_FIRE_RING = 2 +}; + +class npc_midsummer_bunny_pole : public CreatureScript +{ +public: + npc_midsummer_bunny_pole() : CreatureScript("npc_midsummer_bunny_pole") { } + + struct npc_midsummer_bunny_poleAI : public ScriptedAI + { + npc_midsummer_bunny_poleAI(Creature* creature) : ScriptedAI(creature) + { + Initialize(); + } + + void Initialize() + { + events.Reset(); + running = false; + } + + void Reset() override + { + Initialize(); + } + + void DoAction(int32 /*action*/) override + { + // Don't start event if it's already running. + if (running) + return; + + running = true; + events.ScheduleEvent(EVENT_CAST_RED_FIRE_RING, 1); + } + + bool checkNearbyPlayers() + { + // Returns true if no nearby player has aura "Test Ribbon Pole Channel". + std::list<Player*> players; + Trinity::UnitAuraCheck check(true, SPELL_RIBBON_DANCE_COSMETIC); + Trinity::PlayerListSearcher<Trinity::UnitAuraCheck> searcher(me, players, check); + me->VisitNearbyWorldObject(10.0f, searcher); + + return players.empty(); + } + + void UpdateAI(uint32 diff) override + { + if (!running) + return; + + events.Update(diff); + + switch (events.ExecuteEvent()) + { + case EVENT_CAST_RED_FIRE_RING: + { + if (checkNearbyPlayers()) + { + Reset(); + return; + } + + if (GameObject* go = me->FindNearestGameObject(GO_RIBBON_POLE, 10.0f)) + me->CastSpell(go, SPELL_RED_FIRE_RING, true); + + events.ScheduleEvent(EVENT_CAST_BLUE_FIRE_RING, Seconds(5)); + } + break; + case EVENT_CAST_BLUE_FIRE_RING: + { + if (checkNearbyPlayers()) + { + Reset(); + return; + } + + if (GameObject* go = me->FindNearestGameObject(GO_RIBBON_POLE, 10.0f)) + me->CastSpell(go, SPELL_BLUE_FIRE_RING, true); + + events.ScheduleEvent(EVENT_CAST_RED_FIRE_RING, Seconds(5)); + } + break; + } + } + + private: + EventMap events; + bool running; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_midsummer_bunny_poleAI(creature); + } +}; + +/*###### ## Triage quest ######*/ @@ -1188,36 +1296,49 @@ public: enum Sayge { - SPELL_DMG = 23768, // dmg - SPELL_RES = 23769, // res - SPELL_ARM = 23767, // arm - SPELL_SPI = 23738, // spi - SPELL_INT = 23766, // int - SPELL_STM = 23737, // stm - SPELL_STR = 23735, // str - SPELL_AGI = 23736, // agi - SPELL_FORTUNE = 23765 // faire fortune + GOSSIP_MENU_OPTION_ID_ANSWER_1 = 0, + GOSSIP_MENU_OPTION_ID_ANSWER_2 = 1, + GOSSIP_MENU_OPTION_ID_ANSWER_3 = 2, + GOSSIP_MENU_OPTION_ID_ANSWER_4 = 3, + GOSSIP_I_AM_READY_TO_DISCOVER = 6186, + GOSSIP_MENU_OPTION_SAYGE1 = 6185, + GOSSIP_MENU_OPTION_SAYGE2 = 6185, + GOSSIP_MENU_OPTION_SAYGE3 = 6185, + GOSSIP_MENU_OPTION_SAYGE4 = 6185, + GOSSIP_MENU_OPTION_SAYGE5 = 6187, + GOSSIP_MENU_OPTION_SAYGE6 = 6187, + GOSSIP_MENU_OPTION_SAYGE7 = 6187, + GOSSIP_MENU_OPTION_SAYGE8 = 6208, + GOSSIP_MENU_OPTION_SAYGE9 = 6208, + GOSSIP_MENU_OPTION_SAYGE10 = 6208, + GOSSIP_MENU_OPTION_SAYGE11 = 6209, + GOSSIP_MENU_OPTION_SAYGE12 = 6209, + GOSSIP_MENU_OPTION_SAYGE13 = 6209, + GOSSIP_MENU_OPTION_SAYGE14 = 6210, + GOSSIP_MENU_OPTION_SAYGE15 = 6210, + GOSSIP_MENU_OPTION_SAYGE16 = 6210, + GOSSIP_MENU_OPTION_SAYGE17 = 6211, + GOSSIP_MENU_I_HAVE_LONG_KNOWN = 7339, + GOSSIP_MENU_YOU_HAVE_BEEN_TASKED = 7340, + GOSSIP_MENU_SWORN_EXECUTIONER = 7341, + GOSSIP_MENU_DIPLOMATIC_MISSION = 7361, + GOSSIP_MENU_YOUR_BROTHER_SEEKS = 7362, + GOSSIP_MENU_A_TERRIBLE_BEAST = 7363, + GOSSIP_MENU_YOUR_FORTUNE_IS_CAST = 7364, + GOSSIP_MENU_HERE_IS_YOUR_FORTUNE = 7365, + GOSSIP_MENU_CANT_GIVE_YOU_YOUR = 7393, + + SPELL_STRENGTH = 23735, // +10% Strength + SPELL_AGILITY = 23736, // +10% Agility + SPELL_STAMINA = 23737, // +10% Stamina + SPELL_SPIRIT = 23738, // +10% Spirit + SPELL_INTELLECT = 23766, // +10% Intellect + SPELL_ARMOR = 23767, // +10% Armor + SPELL_DAMAGE = 23768, // +10% Damage + SPELL_RESISTANCE = 23769, // +25 Magic Resistance (All) + SPELL_FORTUNE = 23765 // Darkmoon Faire Fortune }; -#define GOSSIP_HELLO_SAYGE "Yes" -#define GOSSIP_SENDACTION_SAYGE1 "Slay the Man" -#define GOSSIP_SENDACTION_SAYGE2 "Turn him over to liege" -#define GOSSIP_SENDACTION_SAYGE3 "Confiscate the corn" -#define GOSSIP_SENDACTION_SAYGE4 "Let him go and have the corn" -#define GOSSIP_SENDACTION_SAYGE5 "Execute your friend painfully" -#define GOSSIP_SENDACTION_SAYGE6 "Execute your friend painlessly" -#define GOSSIP_SENDACTION_SAYGE7 "Let your friend go" -#define GOSSIP_SENDACTION_SAYGE8 "Confront the diplomat" -#define GOSSIP_SENDACTION_SAYGE9 "Show not so quiet defiance" -#define GOSSIP_SENDACTION_SAYGE10 "Remain quiet" -#define GOSSIP_SENDACTION_SAYGE11 "Speak against your brother openly" -#define GOSSIP_SENDACTION_SAYGE12 "Help your brother in" -#define GOSSIP_SENDACTION_SAYGE13 "Keep your brother out without letting him know" -#define GOSSIP_SENDACTION_SAYGE14 "Take credit, keep gold" -#define GOSSIP_SENDACTION_SAYGE15 "Take credit, share the gold" -#define GOSSIP_SENDACTION_SAYGE16 "Let the knight take credit" -#define GOSSIP_SENDACTION_SAYGE17 "Thanks" - class npc_sayge : public CreatureScript { public: @@ -1228,19 +1349,19 @@ public: if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); - if (player->GetSpellHistory()->HasCooldown(SPELL_INT) || - player->GetSpellHistory()->HasCooldown(SPELL_ARM) || - player->GetSpellHistory()->HasCooldown(SPELL_DMG) || - player->GetSpellHistory()->HasCooldown(SPELL_RES) || - player->GetSpellHistory()->HasCooldown(SPELL_STR) || - player->GetSpellHistory()->HasCooldown(SPELL_AGI) || - player->GetSpellHistory()->HasCooldown(SPELL_STM) || - player->GetSpellHistory()->HasCooldown(SPELL_SPI)) - player->SEND_GOSSIP_MENU(7393, creature->GetGUID()); + if (player->GetSpellHistory()->HasCooldown(SPELL_STRENGTH) || + player->GetSpellHistory()->HasCooldown(SPELL_AGILITY) || + player->GetSpellHistory()->HasCooldown(SPELL_STAMINA) || + player->GetSpellHistory()->HasCooldown(SPELL_SPIRIT) || + player->GetSpellHistory()->HasCooldown(SPELL_INTELLECT) || + player->GetSpellHistory()->HasCooldown(SPELL_ARMOR) || + player->GetSpellHistory()->HasCooldown(SPELL_DAMAGE) || + player->GetSpellHistory()->HasCooldown(SPELL_RESISTANCE)) + player->SEND_GOSSIP_MENU(GOSSIP_MENU_CANT_GIVE_YOU_YOUR, creature->GetGUID()); else { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_SAYGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(7339, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_I_AM_READY_TO_DISCOVER, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->SEND_GOSSIP_MENU(GOSSIP_MENU_I_HAVE_LONG_KNOWN, creature->GetGUID()); } return true; @@ -1251,43 +1372,43 @@ public: switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - player->SEND_GOSSIP_MENU(7340, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE1, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE2, GOSSIP_MENU_OPTION_ID_ANSWER_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE3, GOSSIP_MENU_OPTION_ID_ANSWER_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE4, GOSSIP_MENU_OPTION_ID_ANSWER_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + player->SEND_GOSSIP_MENU(GOSSIP_MENU_YOU_HAVE_BEEN_TASKED, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE5, GOSSIP_SENDER_MAIN + 1, GOSSIP_ACTION_INFO_DEF); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE6, GOSSIP_SENDER_MAIN + 2, GOSSIP_ACTION_INFO_DEF); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE7, GOSSIP_SENDER_MAIN + 3, GOSSIP_ACTION_INFO_DEF); - player->SEND_GOSSIP_MENU(7341, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE5, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN + 1, GOSSIP_ACTION_INFO_DEF); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE6, GOSSIP_MENU_OPTION_ID_ANSWER_2, GOSSIP_SENDER_MAIN + 2, GOSSIP_ACTION_INFO_DEF); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE7, GOSSIP_MENU_OPTION_ID_ANSWER_3, GOSSIP_SENDER_MAIN + 3, GOSSIP_ACTION_INFO_DEF); + player->SEND_GOSSIP_MENU(GOSSIP_MENU_SWORN_EXECUTIONER, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE8, GOSSIP_SENDER_MAIN + 4, GOSSIP_ACTION_INFO_DEF); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE9, GOSSIP_SENDER_MAIN + 5, GOSSIP_ACTION_INFO_DEF); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE10, GOSSIP_SENDER_MAIN + 2, GOSSIP_ACTION_INFO_DEF); - player->SEND_GOSSIP_MENU(7361, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE8, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN + 4, GOSSIP_ACTION_INFO_DEF); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE9, GOSSIP_MENU_OPTION_ID_ANSWER_2, GOSSIP_SENDER_MAIN + 5, GOSSIP_ACTION_INFO_DEF); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE10,GOSSIP_MENU_OPTION_ID_ANSWER_3, GOSSIP_SENDER_MAIN + 2, GOSSIP_ACTION_INFO_DEF); + player->SEND_GOSSIP_MENU(GOSSIP_MENU_DIPLOMATIC_MISSION, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE11, GOSSIP_SENDER_MAIN + 6, GOSSIP_ACTION_INFO_DEF); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE12, GOSSIP_SENDER_MAIN + 7, GOSSIP_ACTION_INFO_DEF); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE13, GOSSIP_SENDER_MAIN + 8, GOSSIP_ACTION_INFO_DEF); - player->SEND_GOSSIP_MENU(7362, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE11, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN + 6, GOSSIP_ACTION_INFO_DEF); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE12, GOSSIP_MENU_OPTION_ID_ANSWER_2, GOSSIP_SENDER_MAIN + 7, GOSSIP_ACTION_INFO_DEF); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE13, GOSSIP_MENU_OPTION_ID_ANSWER_3, GOSSIP_SENDER_MAIN + 8, GOSSIP_ACTION_INFO_DEF); + player->SEND_GOSSIP_MENU(GOSSIP_MENU_YOUR_BROTHER_SEEKS, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE14, GOSSIP_SENDER_MAIN + 5, GOSSIP_ACTION_INFO_DEF); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE15, GOSSIP_SENDER_MAIN + 4, GOSSIP_ACTION_INFO_DEF); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE16, GOSSIP_SENDER_MAIN + 3, GOSSIP_ACTION_INFO_DEF); - player->SEND_GOSSIP_MENU(7363, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE14, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN + 5, GOSSIP_ACTION_INFO_DEF); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE15, GOSSIP_MENU_OPTION_ID_ANSWER_2, GOSSIP_SENDER_MAIN + 4, GOSSIP_ACTION_INFO_DEF); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE16, GOSSIP_MENU_OPTION_ID_ANSWER_3, GOSSIP_SENDER_MAIN + 3, GOSSIP_ACTION_INFO_DEF); + player->SEND_GOSSIP_MENU(GOSSIP_MENU_A_TERRIBLE_BEAST, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SENDACTION_SAYGE17, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - player->SEND_GOSSIP_MENU(7364, creature->GetGUID()); + player->ADD_GOSSIP_ITEM_DB(GOSSIP_MENU_OPTION_SAYGE17, GOSSIP_MENU_OPTION_ID_ANSWER_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + player->SEND_GOSSIP_MENU(GOSSIP_MENU_YOUR_FORTUNE_IS_CAST, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: creature->CastSpell(player, SPELL_FORTUNE, false); - player->SEND_GOSSIP_MENU(7365, creature->GetGUID()); + player->SEND_GOSSIP_MENU(GOSSIP_MENU_HERE_IS_YOUR_FORTUNE, creature->GetGUID()); break; } } @@ -1302,28 +1423,28 @@ public: SendAction(player, creature, action); break; case GOSSIP_SENDER_MAIN + 1: - spellId = SPELL_DMG; + spellId = SPELL_DAMAGE; break; case GOSSIP_SENDER_MAIN + 2: - spellId = SPELL_RES; + spellId = SPELL_RESISTANCE; break; case GOSSIP_SENDER_MAIN + 3: - spellId = SPELL_ARM; + spellId = SPELL_ARMOR; break; case GOSSIP_SENDER_MAIN + 4: - spellId = SPELL_SPI; + spellId = SPELL_SPIRIT; break; case GOSSIP_SENDER_MAIN + 5: - spellId = SPELL_INT; + spellId = SPELL_INTELLECT; break; case GOSSIP_SENDER_MAIN + 6: - spellId = SPELL_STM; + spellId = SPELL_STAMINA; break; case GOSSIP_SENDER_MAIN + 7: - spellId = SPELL_STR; + spellId = SPELL_STRENGTH; break; case GOSSIP_SENDER_MAIN + 8: - spellId = SPELL_AGI; + spellId = SPELL_AGILITY; break; } @@ -1743,149 +1864,6 @@ public: }; /*###### -## npc_locksmith -######*/ - -enum LockSmith -{ - QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ = 10704, - QUEST_DARK_IRON_LEGACY = 3802, - QUEST_THE_KEY_TO_SCHOLOMANCE_A = 5505, - QUEST_THE_KEY_TO_SCHOLOMANCE_H = 5511, - QUEST_HOTTER_THAN_HELL_A = 10758, - QUEST_HOTTER_THAN_HELL_H = 10764, - QUEST_RETURN_TO_KHAGDAR = 9837, - QUEST_CONTAINMENT = 13159, - QUEST_ETERNAL_VIGILANCE = 11011, - QUEST_KEY_TO_THE_FOCUSING_IRIS = 13372, - QUEST_HC_KEY_TO_THE_FOCUSING_IRIS = 13375, - - ITEM_ARCATRAZ_KEY = 31084, - ITEM_SHADOWFORGE_KEY = 11000, - ITEM_SKELETON_KEY = 13704, - ITEM_SHATTERED_HALLS_KEY = 28395, - ITEM_THE_MASTERS_KEY = 24490, - ITEM_VIOLET_HOLD_KEY = 42482, - ITEM_ESSENCE_INFUSED_MOONSTONE = 32449, - ITEM_KEY_TO_THE_FOCUSING_IRIS = 44582, - ITEM_HC_KEY_TO_THE_FOCUSING_IRIS = 44581, - - SPELL_ARCATRAZ_KEY = 54881, - SPELL_SHADOWFORGE_KEY = 54882, - SPELL_SKELETON_KEY = 54883, - SPELL_SHATTERED_HALLS_KEY = 54884, - SPELL_THE_MASTERS_KEY = 54885, - SPELL_VIOLET_HOLD_KEY = 67253, - SPELL_ESSENCE_INFUSED_MOONSTONE = 40173, -}; - -#define GOSSIP_LOST_ARCATRAZ_KEY "I've lost my key to the Arcatraz." -#define GOSSIP_LOST_SHADOWFORGE_KEY "I've lost my key to the Blackrock Depths." -#define GOSSIP_LOST_SKELETON_KEY "I've lost my key to the Scholomance." -#define GOSSIP_LOST_SHATTERED_HALLS_KEY "I've lost my key to the Shattered Halls." -#define GOSSIP_LOST_THE_MASTERS_KEY "I've lost my key to the Karazhan." -#define GOSSIP_LOST_VIOLET_HOLD_KEY "I've lost my key to the Violet Hold." -#define GOSSIP_LOST_ESSENCE_INFUSED_MOONSTONE "I've lost my Essence-Infused Moonstone." -#define GOSSIP_LOST_KEY_TO_THE_FOCUSING_IRIS "I've lost my Key to the Focusing Iris." -#define GOSSIP_LOST_HC_KEY_TO_THE_FOCUSING_IRIS "I've lost my Heroic Key to the Focusing Iris." - -class npc_locksmith : public CreatureScript -{ -public: - npc_locksmith() : CreatureScript("npc_locksmith") { } - - bool OnGossipHello(Player* player, Creature* creature) override - { - // Arcatraz Key - if (player->GetQuestRewardStatus(QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ) && !player->HasItemCount(ITEM_ARCATRAZ_KEY, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_ARCATRAZ_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - // Shadowforge Key - if (player->GetQuestRewardStatus(QUEST_DARK_IRON_LEGACY) && !player->HasItemCount(ITEM_SHADOWFORGE_KEY, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_SHADOWFORGE_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - - // Skeleton Key - if ((player->GetQuestRewardStatus(QUEST_THE_KEY_TO_SCHOLOMANCE_A) || player->GetQuestRewardStatus(QUEST_THE_KEY_TO_SCHOLOMANCE_H)) && - !player->HasItemCount(ITEM_SKELETON_KEY, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_SKELETON_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - - // Shatered Halls Key - if ((player->GetQuestRewardStatus(QUEST_HOTTER_THAN_HELL_A) || player->GetQuestRewardStatus(QUEST_HOTTER_THAN_HELL_H)) && - !player->HasItemCount(ITEM_SHATTERED_HALLS_KEY, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_SHATTERED_HALLS_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - - // Master's Key - if (player->GetQuestRewardStatus(QUEST_RETURN_TO_KHAGDAR) && !player->HasItemCount(ITEM_THE_MASTERS_KEY, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_THE_MASTERS_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - - // Violet Hold Key - if (player->GetQuestRewardStatus(QUEST_CONTAINMENT) && !player->HasItemCount(ITEM_VIOLET_HOLD_KEY, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_VIOLET_HOLD_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - - // Essence-Infused Moonstone - if (player->GetQuestRewardStatus(QUEST_ETERNAL_VIGILANCE) && !player->HasItemCount(ITEM_ESSENCE_INFUSED_MOONSTONE, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_ESSENCE_INFUSED_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - - // Key to the Focusing Iris - if (player->GetQuestRewardStatus(QUEST_KEY_TO_THE_FOCUSING_IRIS) && !player->HasItemCount(ITEM_KEY_TO_THE_FOCUSING_IRIS, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_KEY_TO_THE_FOCUSING_IRIS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); - - // Heroic Key to the Focusing Iris - if (player->GetQuestRewardStatus(QUEST_HC_KEY_TO_THE_FOCUSING_IRIS) && !player->HasItemCount(ITEM_HC_KEY_TO_THE_FOCUSING_IRIS, 1, true)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_HC_KEY_TO_THE_FOCUSING_IRIS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); - - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } - - bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF + 1: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_ARCATRAZ_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF + 2: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_SHADOWFORGE_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF + 3: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_SKELETON_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF + 4: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_SHATTERED_HALLS_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF + 5: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_THE_MASTERS_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF + 6: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_VIOLET_HOLD_KEY, false); - break; - case GOSSIP_ACTION_INFO_DEF + 7: - player->CLOSE_GOSSIP_MENU(); - player->CastSpell(player, SPELL_ESSENCE_INFUSED_MOONSTONE, false); - break; - case GOSSIP_ACTION_INFO_DEF + 8: - player->CLOSE_GOSSIP_MENU(); - player->AddItem(ITEM_KEY_TO_THE_FOCUSING_IRIS, 1); - break; - case GOSSIP_ACTION_INFO_DEF + 9: - player->CLOSE_GOSSIP_MENU(); - player->AddItem(ITEM_HC_KEY_TO_THE_FOCUSING_IRIS, 1); - break; - } - return true; - } -}; - -/*###### ## npc_experience ######*/ @@ -2213,7 +2191,7 @@ public: float displacement = 0.7f; for (uint8 i = 0; i < 4; i++) - me->SummonGameObject(GetFireworkGameObjectId(), me->GetPositionX() + (i%2 == 0 ? displacement : -displacement), me->GetPositionY() + (i > 1 ? displacement : -displacement), me->GetPositionZ() + 4.0f, me->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 1); + me->SummonGameObject(GetFireworkGameObjectId(), me->GetPositionX() + (i % 2 == 0 ? displacement : -displacement), me->GetPositionY() + (i > 1 ? displacement : -displacement), me->GetPositionZ() + 4.0f, me->GetOrientation(), G3D::Quat(), 1); } else //me->CastSpell(me, GetFireworkSpell(me->GetEntry()), true); @@ -2578,6 +2556,7 @@ void AddSC_npcs_special() new npc_chicken_cluck(); new npc_dancing_flames(); new npc_torch_tossing_target_bunny_controller(); + new npc_midsummer_bunny_pole(); new npc_doctor(); new npc_injured_patient(); new npc_garments_of_quests(); @@ -2589,7 +2568,6 @@ void AddSC_npcs_special() new npc_training_dummy(); new npc_wormhole(); new npc_pet_trainer(); - new npc_locksmith(); new npc_experience(); new npc_firework(); new npc_spring_rabbit(); diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index f4d736ac675..0241221a2ac 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -52,6 +52,7 @@ #include "Realm/Realm.h" #include "DatabaseLoader.h" #include "AppenderDB.h" +#include "Metric.h" using namespace boost::program_options; namespace fs = boost::filesystem; @@ -196,6 +197,13 @@ extern int main(int argc, char** argv) LoadRealmInfo(); + sMetric->Initialize(realm.Name, _ioService, []() + { + TC_METRIC_VALUE("online_players", sWorld->GetPlayerCount()); + }); + + TC_METRIC_EVENT("events", "Worldserver started", ""); + // Initialize the World sScriptMgr->SetScriptLoader(AddScripts); sWorld->SetInitialWorldSettings(); @@ -295,6 +303,9 @@ extern int main(int argc, char** argv) StopDB(); + TC_METRIC_EVENT("events", "Worldserver shutdown", ""); + sMetric->ForceSend(); + TC_LOG_INFO("server.worldserver", "Halting process..."); ShutdownCLIThread(cliThread); diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index ccb784f8c2b..0513f2b0ab4 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -34,6 +34,7 @@ # AUCTION HOUSE BOT BUYER CONFIG # LOGGING SYSTEM SETTINGS # PACKET SPOOF PROTECTION SETTINGS +# METRIC SETTINGS # ################################################################################################### @@ -94,6 +95,12 @@ LogsDir = "" # Default: "127.0.0.1;3306;trinity;trinity;auth" - (LoginDatabaseInfo) # "127.0.0.1;3306;trinity;trinity;world" - (WorldDatabaseInfo) # "127.0.0.1;3306;trinity;trinity;characters" - (CharacterDatabaseInfo) +# +# Don't change hostname unless you are hosting mysql on a different machine, if you need help +# with configuration allowing to connect from diferent machine than the one running server +# search for TCE00016 on forum. +# Don't open port on firewall to external connections (it belongs to mysql, not to wow server). +# The username you choose must have permisions to create/alter/rename tables. LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth" WorldDatabaseInfo = "127.0.0.1;3306;trinity;trinity;world" @@ -1734,24 +1741,27 @@ Channel.RestrictedLfg = 1 # # ChatLevelReq.Channel -# Description: Level requirement for characters to be able to write in chat channels. -# Default: 1 - -ChatLevelReq.Channel = 1 - -# # ChatLevelReq.Whisper -# Description: Level requirement for characters to be able to whisper other characters. +# ChatLevelReq.Emote +# ChatLevelReq.Say +# ChatLevelReq.Yell +# Description: Level requirement for characters to be able to use chats. # Default: 1 +ChatLevelReq.Channel = 1 ChatLevelReq.Whisper = 1 +ChatLevelReq.Emote = 1 +ChatLevelReq.Say = 1 +ChatLevelReq.Yell = 1 # -# ChatLevelReq.Say -# Description: Level requirement for characters to be able to use say/yell/emote. +# PartyLevelReq +# Description: Minimum level at which players can invite to group, even if they aren't on +# the invitee friends list. (Players who are on that friend list can always +# invite despite having lower level) # Default: 1 -ChatLevelReq.Say = 1 +PartyLevelReq = 1 # # PreserveCustomChannels @@ -2444,6 +2454,14 @@ Battleground.RewardLoserHonorFirst = 5 Battleground.RewardLoserHonorLast = 5 # +# Battleground.ReportAFK +# Description: Number of reports needed to kick someone AFK from Battleground. +# Range: 1-9 +# Default: 3 + +Battleground.ReportAFK = 3 + +# ################################################################################################### ################################################################################################### @@ -3028,6 +3046,16 @@ NoGrayAggro.Above = 0 NoGrayAggro.Below = 0 # +# PreventRenameCharacterOnCustomization +# Description: If option is set to 1, player can not rename the character in character customization. +# Applies to all character customization commands. +# Default: 0 - (Disabled, character can be renamed in Character Customization) +# 1 - (Enabled, character can not be renamed in Character Customization) +# + +PreventRenameCharacterOnCustomization = 0 + +# ################################################################################################### ################################################################################################### @@ -3283,7 +3311,7 @@ AuctionHouseBot.Items.Amount.Yellow = 0 # Armor: 8 # Reagent: 1 # Projectile: 2 -# TradeGod: 10 +# TradeGood: 10 # Generic: 1 # Recipe: 6 # Quiver: 1 @@ -3608,6 +3636,7 @@ Logger.mmaps=3,Server #Logger.bg.arena=3,Console Server #Logger.bg.battlefield=3,Console Server #Logger.bg.battleground=3,Console Server +#Logger.bg.reportpvpafk=3,Console Server #Logger.chat.log=3,Console Server #Logger.calendar=3,Console Server #Logger.chat.system=3,Console Server @@ -3700,3 +3729,42 @@ PacketSpoof.BanDuration = 86400 # ################################################################################################### + +################################################################################################### +# METRIC SETTINGS +# +# These settings control the statistics sent to the metric database (currently InfluxDB) +# +# Metric.Enable +# Description: Enables statistics sent to the metric database. +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Metric.Enable = 0 + +# +# Metric.Interval +# Description: Interval between every batch of data sent in seconds +# Default: 10 seconds +# + +Metric.Interval = 10 + +# +# Metric.ConnectionInfo +# Description: Connection settings for metric database (currently InfluxDB). +# Example: "hostname;port;database" +# Default: "127.0.0.1;8086;worldserver" + +Metric.ConnectionInfo = "127.0.0.1;8086;worldserver" + +# +# Metric.OverallStatusInterval +# Description: Interval between every gathering of overall worldserver status data in seconds +# Default: 1 second +# + +Metric.OverallStatusInterval = 1 + +# +################################################################################################### |
