From 6d4c672fb1b799e1888881282e40992a9e15a006 Mon Sep 17 00:00:00 2001 From: arks Date: Wed, 7 Jan 2015 01:09:38 -0300 Subject: [PATCH 01/86] Implement CharSections.dbc and Serverside Checks. --- src/server/game/DataStores/DBCStores.cpp | 21 ++++ src/server/game/DataStores/DBCStores.h | 2 + src/server/game/DataStores/DBCStructure.h | 27 ++++++ src/server/game/DataStores/DBCfmt.h | 1 + src/server/game/Entities/Player/Player.cpp | 97 ++++++++++++++++++- src/server/game/Entities/Player/Player.h | 1 + src/server/game/Handlers/CharacterHandler.cpp | 30 +++++- 7 files changed, 172 insertions(+), 7 deletions(-) diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 4dd38face72..3060c690cfc 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -48,6 +48,7 @@ struct WMOAreaTableTripple }; typedef std::map WMOAreaInfoByTripple; +typedef std::multimap CharSectionsMap; DBCStorage sAreaStore(AreaTableEntryfmt); DBCStorage sAreaGroupStore(AreaGroupEntryfmt); @@ -67,6 +68,8 @@ DBCStorage sBattlemasterListStore(BattlemasterListEntryf DBCStorage sBarberShopStyleStore(BarberShopStyleEntryfmt); DBCStorage sCharStartOutfitStore(CharStartOutfitEntryfmt); std::map sCharStartOutfitMap; +DBCStorage sCharSectionsStore(CharSectionsEntryfmt); +CharSectionsMap sCharSectionMap; DBCStorage sCharTitlesStore(CharTitlesEntryfmt); DBCStorage sChatChannelsStore(ChatChannelsEntryfmt); DBCStorage sChrClassesStore(ChrClassesEntryfmt); @@ -305,6 +308,12 @@ void LoadDBCStores(const std::string& dataPath) if (CharStartOutfitEntry const* outfit = sCharStartOutfitStore.LookupEntry(i)) sCharStartOutfitMap[outfit->Race | (outfit->Class << 8) | (outfit->Gender << 16)] = outfit; + LoadDBC(availableDbcLocales, bad_dbc_files, sCharSectionsStore, dbcPath, "CharSections.dbc"); + for (uint32 i = 0; i < sCharSectionsStore.GetNumRows(); ++i) + if (CharSectionsEntry const* entry = sCharSectionsStore.LookupEntry(i)) + if (entry->Race && ((1 << (entry->Race - 1)) & RACEMASK_ALL_PLAYABLE) != 0) //ignore Nonplayable races + sCharSectionMap.emplace(uint8(entry->GenType) | (uint8(entry->Gender) << 8) | (uint8(entry->Race) << 16), entry); + LoadDBC(availableDbcLocales, bad_dbc_files, sCharTitlesStore, dbcPath, "CharTitles.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sChatChannelsStore, dbcPath, "ChatChannels.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sChrClassesStore, dbcPath, "ChrClasses.dbc"); @@ -945,6 +954,18 @@ CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, ui return itr->second; } +CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color) +{ + std::pair eqr = sCharSectionMap.equal_range(uint32(genType) | uint32(gender << 8) | uint32(race << 16)); + for (CharSectionsMap::const_iterator itr = eqr.first; itr != eqr.second; ++itr) + { + if (itr->second->Type == type && itr->second->Color == color) + return itr->second; + } + + return NULL; +} + /// Returns LFGDungeonEntry for a specific map and difficulty. Will return first found entry if multiple dungeons use the same map (such as Scarlet Monastery) LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty) { diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 655de86b7e1..d955e9581ab 100644 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -69,6 +69,7 @@ PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 lev PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id); CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender); +CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color); LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty); @@ -91,6 +92,7 @@ extern DBCStorage sBarberShopStyleStore; extern DBCStorage sBattlemasterListStore; extern DBCStorage sChatChannelsStore; extern DBCStorage sCharStartOutfitStore; +extern DBCStorage sCharSectionsStore; extern DBCStorage sCharTitlesStore; extern DBCStorage sChrClassesStore; extern DBCStorage sChrRacesStore; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 1e6c8218489..252a6ba06cc 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -647,6 +647,33 @@ struct CharStartOutfitEntry //int32 ItemInventorySlot[MAX_OUTFIT_ITEMS]; // 53-76 not required at server side }; +enum CharSectionFlags +{ + SECTION_FLAG_PLAYER = 0x01, + SECTION_FLAG_DEATH_KNIGHT = 0x04 +}; + +enum CharSectionType +{ + SECTION_TYPE_SKIN = 0, + SECTION_TYPE_FACE = 1, + SECTION_TYPE_FACIAL_HAIR = 2, + SECTION_TYPE_HAIR = 3, + SECTION_TYPE_UNDERWEAR = 4 +}; + +struct CharSectionsEntry +{ + //uint32 Id; + uint32 Race; + uint32 Gender; + uint32 GenType; + //char* TexturePath[3]; + uint32 Flags; + uint32 Type; + uint32 Color; +}; + struct CharTitlesEntry { uint32 ID; // 0, title ids, for example in Quest::GetCharTitleId() diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 44db2a35d73..5c24e6f938a 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -33,6 +33,7 @@ char const BannedAddOnsfmt[] = "nxxxxxxxxxx"; char const BarberShopStyleEntryfmt[] = "nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiii"; char const BattlemasterListEntryfmt[] = "niiiiiiiiixssssssssssssssssxiixx"; char const CharStartOutfitEntryfmt[] = "dbbbXiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +char const CharSectionsEntryfmt[] = "diiixxxiii"; char const CharTitlesEntryfmt[] = "nxssssssssssssssssxssssssssssssssssxi"; char const ChatChannelsEntryfmt[] = "nixssssssssssssssssxxxxxxxxxxxxxxxxxx"; char const ChrClassesEntryfmt[] = "nxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii"; diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 161fca432b4..5c2349fae21 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -966,8 +966,6 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo) { //FIXME: outfitId not used in player creating /// @todo need more checks against packet modifications - // should check that skin, face, hair* are valid via DBC per race/class - // also do it in Player::BuildEnumData, Player::LoadFromDB Object::_Create(guidlow, 0, HIGHGUID_PLAYER); @@ -1009,6 +1007,13 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo) return false; } + if (!ValidateAppearance(createInfo->Race, createInfo->Class, createInfo->Gender, createInfo->HairStyle, createInfo->HairColor, createInfo->Face, createInfo->FacialHair, createInfo->Skin, true)) + { + TC_LOG_ERROR("entities.player", "Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with invalid appearance attributes - refusing to do so", + GetSession()->GetAccountId(), m_name.c_str()); + return false; + } + uint32 RaceClassGender = (createInfo->Race) | (createInfo->Class << 8) | (createInfo->Gender << 16); SetUInt32Value(UNIT_FIELD_BYTES_0, (RaceClassGender | (powertype << 24))); @@ -1981,12 +1986,29 @@ bool Player::BuildEnumData(PreparedQueryResult result, WorldPacket* data) *data << uint8(gender); // gender uint32 playerBytes = fields[5].GetUInt32(); + uint32 playerBytes2 = fields[6].GetUInt32(); + + uint16 atLoginFlags = fields[15].GetUInt16(); + + if (!ValidateAppearance(uint8(plrRace), uint8(plrClass), gender, uint8(playerBytes >> 16), uint8(playerBytes >> 24), uint8(playerBytes >> 8), uint8(playerBytes2), uint8(playerBytes))) + { + TC_LOG_ERROR("entities.player.loading", "Player %u has wrong Appearance values (Hair/Skin/Color), forcing recustomize", guid); + + if (!(atLoginFlags & AT_LOGIN_CUSTOMIZE)) + { + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); + stmt->setUInt16(0, uint16(AT_LOGIN_CUSTOMIZE)); + stmt->setUInt32(1, guid); + CharacterDatabase.Execute(stmt); + atLoginFlags |= AT_LOGIN_CUSTOMIZE; + } + } + *data << uint8(playerBytes); // skin *data << uint8(playerBytes >> 8); // face *data << uint8(playerBytes >> 16); // hair style *data << uint8(playerBytes >> 24); // hair color - uint32 playerBytes2 = fields[6].GetUInt32(); *data << uint8(playerBytes2 & 0xFF); // facial hair *data << uint8(fields[7].GetUInt8()); // level @@ -2001,7 +2023,6 @@ bool Player::BuildEnumData(PreparedQueryResult result, WorldPacket* data) uint32 charFlags = 0; uint32 playerFlags = fields[14].GetUInt32(); - uint16 atLoginFlags = fields[15].GetUInt16(); if (playerFlags & PLAYER_FLAGS_HIDE_HELM) charFlags |= CHARACTER_FLAG_HIDE_HELM; if (playerFlags & PLAYER_FLAGS_HIDE_CLOAK) @@ -17280,6 +17301,20 @@ bool Player::LoadFromDB(ObjectGuid guid, SQLQueryHolder *holder) SetUInt32Value(PLAYER_BYTES_2, fields[10].GetUInt32()); SetByteValue(PLAYER_BYTES_3, 0, fields[5].GetUInt8()); SetByteValue(PLAYER_BYTES_3, 1, fields[49].GetUInt8()); + + if (!ValidateAppearance( + fields[3].GetUInt8(), // race + fields[4].GetUInt8(), // class + gender, GetByteValue(PLAYER_BYTES, 2), // hair type + GetByteValue(PLAYER_BYTES, 3), //hair color + uint8(fields[9].GetUInt32() >> 8), // face + GetByteValue(PLAYER_BYTES_2, 0), // facial hair + GetByteValue(PLAYER_BYTES, 0))) // skin color + { + TC_LOG_ERROR("entities.player", "Player %s has wrong Appearance values (Hair/Skin/Color), can't be loaded.", guid.ToString().c_str()); + return false; + } + SetUInt32Value(PLAYER_FLAGS, fields[11].GetUInt32()); SetInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fields[48].GetUInt32()); @@ -26919,3 +26954,57 @@ void Player::SendSupercededSpell(uint32 oldSpell, uint32 newSpell) GetSession()->SendPacket(&data); } +bool Player::ValidateAppearance(uint8 race, uint8 class_, uint8 gender, uint8 hairID, uint8 hairColor, uint8 faceID, uint8 facialHair, uint8 skinColor, bool create /*=false*/) +{ + // Check skin color + // For Skin type is always 0 + if (CharSectionsEntry const* entry = GetCharSectionEntry(race, SECTION_TYPE_SKIN, gender, 0, skinColor)) + { // Skin Color defined as Face color, too, we check skin & face in one pass + if (CharSectionsEntry const* entry2 = GetCharSectionEntry(race, SECTION_TYPE_FACE, gender, faceID, skinColor)) + { + // Check DeathKnight exclusive + if (((entry->Flags & SECTION_FLAG_DEATH_KNIGHT) || (entry2->Flags & SECTION_FLAG_DEATH_KNIGHT)) && class_ != CLASS_DEATH_KNIGHT) + return false; + if (create && !((entry->Flags & SECTION_FLAG_PLAYER) && (entry2->Flags & SECTION_FLAG_PLAYER))) + return false; + } + else + return false; + } + else + return false; + + // These combinations don't have an entry of Type SECTION_TYPE_FACIAL_HAIR, exclude them from that check + bool excludeCheck = (race == RACE_TAUREN) || (race == RACE_DRAENEI) || (gender == GENDER_FEMALE && race != RACE_NIGHTELF && race != RACE_UNDEAD_PLAYER); + + // Check Hair + if (CharSectionsEntry const* entry = GetCharSectionEntry(race, SECTION_TYPE_HAIR, gender, hairID, hairColor)) + { + if ((entry->Flags & SECTION_FLAG_DEATH_KNIGHT) && class_ != CLASS_DEATH_KNIGHT) + return false; + if (create && !(entry->Flags & SECTION_FLAG_PLAYER)) + return false; + + if (!excludeCheck) + { + if (CharSectionsEntry const* entry2 = GetCharSectionEntry(race, SECTION_TYPE_FACIAL_HAIR, gender, facialHair, hairColor)) + { + if ((entry2->Flags & SECTION_FLAG_DEATH_KNIGHT) && class_ != CLASS_DEATH_KNIGHT) + return false; + if (create && !(entry2->Flags & SECTION_FLAG_PLAYER)) + return false; + } + else + return false; + } + else + { + // @TODO: Bound checking for facialHair ID (used clientside for markings, tauren beard, etc.) + // Not present in DBC + } + } + else + return false; + + return true; +} diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 61141192cd1..870fa6160af 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1499,6 +1499,7 @@ class Player : public Unit, public GridObject static bool LoadPositionFromDB(uint32& mapid, float& x, float& y, float& z, float& o, bool& in_flight, ObjectGuid guid); static bool IsValidGender(uint8 Gender) { return Gender <= GENDER_FEMALE; } + static bool ValidateAppearance(uint8 race, uint8 class_, uint8 gender, uint8 hairID, uint8 hairColor, uint8 faceID, uint8 facialHair, uint8 skinColor, bool create = false); /*********************************************************/ /*** SAVE SYSTEM ***/ diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index ee8e051ecd9..23600e4aa68 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1254,6 +1254,9 @@ void WorldSession::HandleAlterAppearance(WorldPacket& recvData) if (bs_skinColor && (bs_skinColor->type != 3 || bs_skinColor->race != _player->getRace() || bs_skinColor->gender != _player->getGender())) return; + if (!Player::ValidateAppearance(_player->getRace(), _player->getClass(), _player->getGender(), bs_hair->hair_id, Color, uint8(_player->GetUInt32Value(PLAYER_FLAGS) >> 8), bs_facialHair->hair_id, bs_skinColor ? bs_skinColor->hair_id : 0)) + return; + GameObject* go = _player->FindNearestGameObjectOfType(GAMEOBJECT_TYPE_BARBER_CHAIR, 5.0f); if (!go) { @@ -1338,10 +1341,8 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData) >> customizeInfo.FacialHair >> customizeInfo.Face; - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_AT_LOGIN); - + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_NAME_DATA); stmt->setUInt32(0, customizeInfo.Guid.GetCounter()); - // TODO: Make async with callback PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) @@ -1351,6 +1352,29 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData) } Field* fields = result->Fetch(); + uint8 plrRace = fields[0].GetUInt8(); + uint8 plrClass = fields[1].GetUInt8(); + uint8 plrGender = fields[2].GetUInt8(); + + if (!Player::ValidateAppearance(plrRace, plrClass, plrGender, customizeInfo.HairStyle, customizeInfo.HairColor, customizeInfo.Face, customizeInfo.FacialHair, customizeInfo.Skin, true)) + { + SendCharCustomize(CHAR_CREATE_ERROR, customizeInfo); + return; + } + + stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_AT_LOGIN); + + stmt->setUInt32(0, customizeInfo.Guid.GetCounter()); + // TODO: Make async with callback + result = CharacterDatabase.Query(stmt); + + if (!result) + { + SendCharCustomize(CHAR_CREATE_ERROR, customizeInfo); + return; + } + + fields = result->Fetch(); uint32 at_loginFlags = fields[0].GetUInt16(); if (!(at_loginFlags & AT_LOGIN_CUSTOMIZE)) From ede696e8e5dc3fb7092406080ef30abb9134e5c5 Mon Sep 17 00:00:00 2001 From: Gooyeth Date: Mon, 9 Feb 2015 07:41:19 -0600 Subject: [PATCH 02/86] Core/Spells: Fixed Sample satisfaction not entering combat Fixes: 14047 --- src/server/game/Spells/SpellMgr.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index dd4453cc4c5..82052a6b443 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3004,6 +3004,10 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Effects[EFFECT_0].TriggerSpell = 36325; // They Must Burn Bomb Drop (DND) break; case 49838: // Stop Time + case 69438: // Sample Satisfaction + case 69445: // Perfume Spritz + case 69489: // Chocolate Sample + case 69563: // Cologne Spritz spellInfo->AttributesEx3 |= SPELL_ATTR3_NO_INITIAL_AGGRO; break; case 61407: // Energize Cores From 5098aba84036406e8c67cccd70e62a049184d1f6 Mon Sep 17 00:00:00 2001 From: Rushor Date: Sun, 22 Mar 2015 00:56:05 +0100 Subject: [PATCH 03/86] Scripts/HellfireRamparts: Vazruden the Herald - Improve Reset-/ Aggrobehaviour by @CDawg --- .../boss_vazruden_the_herald.cpp | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index a6c00c05dce..9da979d1105 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -426,11 +426,37 @@ class boss_vazruden_the_herald : public CreatureScript if ((Nazan && Nazan->IsAlive()) || (Vazruden && Vazruden->IsAlive())) { if ((Nazan && Nazan->GetVictim()) || (Vazruden && Vazruden->GetVictim())) - return; - else { - UnsummonAdds(); - EnterEvadeMode(); + if (Nazan->IsInCombat()) + return; + else + { + const Position Nazan_FlyAggro = { -1380.425f, 1721.026f, 90.40f, 2.426f }; + if (Nazan) + Nazan->GetMotionMaster()->MoveTakeoff(0, Nazan_FlyAggro); + } + } + else + { //reset, if by chance the party wipes (1st boss) + if (Vazruden && Vazruden->IsAlive()) + { + if (phase != 1) + phase = 1; + } + else + { + if (phase != 2) //reset just Nazan, Vazruden is dead + phase = 2; + } + + me->GetMotionMaster()->Clear(); // reset and move back into pos... + me->GetMotionMaster()->MovePoint(0, VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2]); + + if (phase > 2) + { + EnterEvadeMode(); + Reset(); + } return; } } From c386711972260aa7b877cdc8cb49d24576ce1902 Mon Sep 17 00:00:00 2001 From: Naios Date: Sun, 29 Mar 2015 16:08:28 +0200 Subject: [PATCH 04/86] CMake: Use source_groups to represent the source tree * It let ide's (like vs) display the source tree. * Disabled by default. * Soft requirement is cmake >= 2.8.12 . * Offers 2 modes: flat & hierarchical. * For detailed description see #14471 * Thanks @click for help and advises. * Closes #14471 --- CMakeLists.txt | 2 ++ cmake/macros/GroupSources.cmake | 46 +++++++++++++++++++++++++++ cmake/options.cmake | 2 ++ cmake/showoptions.cmake | 23 ++++++++++++++ src/server/authserver/CMakeLists.txt | 2 ++ src/server/collision/CMakeLists.txt | 2 ++ src/server/game/CMakeLists.txt | 2 ++ src/server/scripts/CMakeLists.txt | 2 ++ src/server/shared/CMakeLists.txt | 2 ++ src/server/worldserver/CMakeLists.txt | 2 ++ 10 files changed, 85 insertions(+) create mode 100644 cmake/macros/GroupSources.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 821176c8fea..2630ef17da7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,8 @@ endif() include(CheckPlatform) +include(GroupSources) + # basic packagesearching and setup (further support will be needed, this is a preliminary release!) set(OPENSSL_EXPECTED_VERSION 1.0.0) diff --git a/cmake/macros/GroupSources.cmake b/cmake/macros/GroupSources.cmake new file mode 100644 index 00000000000..3acb03e7b4c --- /dev/null +++ b/cmake/macros/GroupSources.cmake @@ -0,0 +1,46 @@ +# Copyright (C) 2008-2015 TrinityCore +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +macro(GroupSources dir) + # Skip this if WITH_SOURCE_TREE is not set (empty string). + if (NOT ${_WITH_SOURCE_TREE} STREQUAL "") + # Include all header and c files + file(GLOB_RECURSE elements RELATIVE ${dir} *.h *.hpp *.c *.cpp *.cc) + + foreach(element ${elements}) + # Extract filename and directory + get_filename_component(element_name ${element} NAME) + get_filename_component(element_dir ${element} DIRECTORY) + + if (NOT ${element_dir} STREQUAL "") + # If the file is in a subdirectory use it as source group. + if (${_WITH_SOURCE_TREE} STREQUAL "flat") + # Build flat structure by using only the first subdirectory. + string(FIND ${element_dir} "/" delemiter_pos) + if (NOT ${delemiter_pos} EQUAL -1) + string(SUBSTRING ${element_dir} 0 ${delemiter_pos} group_name) + source_group("${group_name}" FILES ${dir}/${element}) + else() + # Build hierarchical structure. + # File is in root directory. + source_group("${element_dir}" FILES ${dir}/${element}) + endif() + else() + # Use the full hierarchical structure to build source_groups. + string(REPLACE "/" "\\" group_name ${element_dir}) + source_group("${group_name}" FILES ${dir}/${element}) + endif() + else() + # If the file is in the root directory, place it in the root source_group. + source_group("\\" FILES ${dir}/${element}) + endif() + endforeach() + endif() +endmacro() diff --git a/cmake/options.cmake b/cmake/options.cmake index 83783fdc1b6..486cc909605 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -15,4 +15,6 @@ option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" option(USE_COREPCH "Use precompiled headers when compiling servers" 1) option(WITH_WARNINGS "Show all warnings during compile" 0) option(WITH_COREDEBUG "Include additional debug-code in core" 0) +set(WITH_SOURCE_TREE "no" CACHE STRING "Build the source tree for IDE's.") +set_property(CACHE WITH_SOURCE_TREE PROPERTY STRINGS no flat hierarchical) option(WITHOUT_GIT "Disable the GIT testing routines" 0) diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake index ea4820a01f0..bb848a2a9c0 100644 --- a/cmake/showoptions.cmake +++ b/cmake/showoptions.cmake @@ -62,6 +62,29 @@ else() message("* Use coreside debug : No (default)") endif() +if( WITH_SOURCE_TREE STREQUAL "flat" OR WITH_SOURCE_TREE STREQUAL "hierarchical" ) + # TODO: Remove this after Debian 8 is released and set general required version to 2.8.12 + # Debian 7 is shipped with CMake 2.8.9 . But DIRECTORY flag of get_filename_component requires 2.8.12 . + if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) + message("* Show source tree : Yes - ${WITH_SOURCE_TREE}") + set(_WITH_SOURCE_TREE ${WITH_SOURCE_TREE} CACHE INTERNAL "WITH_SOURCE_TREE support enabled.") + else() + message("* Show source tree : No (default)") + + message("") + message(" *** WITH_SOURCE_TREE - WARNING!") + message(" *** This functionality is ONLY supported on CMake 2.8.12 or higher.") + message(" *** You are running ${CMAKE_VERSION}, which does not have the functions needed") + message(" *** to create a sourcetree - this option is thus forced to disabled!") + message("") + + set(_WITH_SOURCE_TREE "" CACHE INTERNAL "WITH_SOURCE_TREE support disabled.") + endif() +else() + message("* Show source tree : No (default)") + set(_WITH_SOURCE_TREE "" CACHE INTERNAL "WITH_SOURCE_TREE support disabled.") +endif() + if ( WITHOUT_GIT ) message("* Use GIT revision hash : No") message("") diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt index 994a645c528..7c76df5d06c 100644 --- a/src/server/authserver/CMakeLists.txt +++ b/src/server/authserver/CMakeLists.txt @@ -66,6 +66,8 @@ include_directories( ${VALGRIND_INCLUDE_DIR} ) +GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) + add_executable(authserver ${authserver_SRCS} ${authserver_PCH_SRC} diff --git a/src/server/collision/CMakeLists.txt b/src/server/collision/CMakeLists.txt index 150c32a15a3..f394fe791be 100644 --- a/src/server/collision/CMakeLists.txt +++ b/src/server/collision/CMakeLists.txt @@ -80,6 +80,8 @@ include_directories( ${VALGRIND_INCLUDE_DIR} ) +GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) + add_library(collision STATIC ${collision_STAT_SRCS} ${collision_STAT_PCH_SRC} diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt index fc9265b6ff4..91380b085ea 100644 --- a/src/server/game/CMakeLists.txt +++ b/src/server/game/CMakeLists.txt @@ -208,6 +208,8 @@ include_directories( ${VALGRIND_INCLUDE_DIR} ) +GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) + add_library(game STATIC ${game_STAT_SRCS} ${game_STAT_PCH_SRC} diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt index 875e2c240ca..20b970b6ac1 100644 --- a/src/server/scripts/CMakeLists.txt +++ b/src/server/scripts/CMakeLists.txt @@ -146,6 +146,8 @@ include_directories( ${VALGRIND_INCLUDE_DIR} ) +GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) + add_library(scripts STATIC ${scripts_STAT_SRCS} ${scripts_STAT_PCH_SRC} diff --git a/src/server/shared/CMakeLists.txt b/src/server/shared/CMakeLists.txt index 4be94e334da..abc019863b1 100644 --- a/src/server/shared/CMakeLists.txt +++ b/src/server/shared/CMakeLists.txt @@ -84,6 +84,8 @@ include_directories( ${VALGRIND_INCLUDE_DIR} ) +GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) + add_library(shared STATIC ${shared_STAT_SRCS} ${shared_STAT_PCH_SRC} diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt index ded076d8925..d3b2eba9698 100644 --- a/src/server/worldserver/CMakeLists.txt +++ b/src/server/worldserver/CMakeLists.txt @@ -144,6 +144,8 @@ include_directories( ${VALGRIND_INCLUDE_DIR} ) +GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) + add_executable(worldserver ${worldserver_SRCS} ${worldserver_PCH_SRC} From be9294dc098029c62003d3e19e0c2a29a7c738f7 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 29 Mar 2015 18:11:26 +0200 Subject: [PATCH 05/86] Core/Dungeon Finder: Restore ".lfg queue debug" logging additional information Restore ".lfg queue" behavior to print additional debug informations when an additional argument is passed (any character/word will work). --- src/server/scripts/Commands/cs_lfg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Commands/cs_lfg.cpp b/src/server/scripts/Commands/cs_lfg.cpp index 308a841df2a..31e1b69115f 100644 --- a/src/server/scripts/Commands/cs_lfg.cpp +++ b/src/server/scripts/Commands/cs_lfg.cpp @@ -118,7 +118,7 @@ public: static bool HandleLfgQueueInfoCommand(ChatHandler* handler, char const* args) { - handler->SendSysMessage(sLFGMgr->DumpQueueInfo(atoi(args) != 0).c_str()); + handler->SendSysMessage(sLFGMgr->DumpQueueInfo(*args != '\0').c_str()); return true; } From e040c56d45e55fb9c0e828989c542f54c9cbe334 Mon Sep 17 00:00:00 2001 From: click Date: Sun, 29 Mar 2015 19:19:45 +0200 Subject: [PATCH 06/86] Core/Logger: Add basic account-info to addon-scans to make them a little bit more useful (@Aokromes, you can stop asking for this now...) --- src/server/game/Server/WorldSession.cpp | 19 +++++++++---------- src/server/worldserver/worldserver.conf.dist | 1 + 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index fa50fd56576..adc48ab43ef 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -951,7 +951,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data) if (size > 0xFFFFF) { - TC_LOG_ERROR("misc", "WorldSession::ReadAddonsInfo addon info too big, size %u", size); + TC_LOG_DEBUG("addon", "WorldSession::ReadAddonsInfo: AddOnInfo too big, size %u", size); return; } @@ -981,7 +981,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data) addonInfo >> enabled >> crc >> unk1; - TC_LOG_DEBUG("misc", "ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1); + TC_LOG_DEBUG("addon", "AddOn: %s (CRC: 0x%x) - enabled: 0x%x - Unknown2: 0x%x", addonName.c_str(), crc, enabled, unk1); AddonInfo addon(addonName, enabled, crc, 2, true); @@ -989,15 +989,14 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data) if (savedAddon) { if (addon.CRC != savedAddon->CRC) - TC_LOG_ERROR("misc", "ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC); + TC_LOG_WARN("addon", " Addon: %s: modified (CRC: 0x%x) - accountID %d)", addon.Name.c_str(), savedAddon->CRC, GetAccountId()); else - TC_LOG_DEBUG("misc", "ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC); + TC_LOG_DEBUG("addon", "Addon: %s: validated (CRC: 0x%x) - accountID %d", addon.Name.c_str(), savedAddon->CRC, GetAccountId()); } else { AddonMgr::SaveAddon(addon); - - TC_LOG_DEBUG("misc", "ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC); + TC_LOG_WARN("addon", "Addon: %s: unknown (CRC: 0x%x) - accountId %d (storing addon name and checksum to database)", addon.Name.c_str(), addon.CRC, GetAccountId()); } /// @todo Find out when to not use CRC/pubkey, and other possible states. @@ -1006,10 +1005,10 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data) uint32 currentTime; addonInfo >> currentTime; - TC_LOG_DEBUG("network", "ADDON: CurrentTime: %u", currentTime); + TC_LOG_DEBUG("addon", "AddOn: CurrentTime: %u", currentTime); } else - TC_LOG_ERROR("misc", "Addon packet uncompress error!"); + TC_LOG_DEBUG("addon", "AddOn: Addon packet uncompress error!"); } void WorldSession::SendAddonsInfo() @@ -1048,8 +1047,8 @@ void WorldSession::SendAddonsInfo() data << uint8(usepk); if (usepk) // if CRC is wrong, add public key (client need it) { - TC_LOG_DEBUG("misc", "ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey", - itr->CRC, itr->Name.c_str(), STANDARD_ADDON_CRC); + TC_LOG_DEBUG("addon", "AddOn: %s: CRC checksum mismatch: got 0x%x - expected 0x%x - sending pubkey to accountID %d", + itr->Name.c_str(), itr->CRC, STANDARD_ADDON_CRC, GetAccountId()); data.append(addonPublicKey, sizeof(addonPublicKey)); } diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 0a98922b295..2758c8e39cd 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -3263,6 +3263,7 @@ Logger.sql.sql=5,Console DBErrors Logger.sql.updates=3,Console Server #Logger.achievement=3,Console Server +#Logger.addon=3,Console Server #Logger.ahbot=3,Console Server #Logger.auctionHouse=3,Console Server #Logger.bg.arena=3,Console Server From 1995dcab7674c9ebae6ab8577e276cf27afeed4d Mon Sep 17 00:00:00 2001 From: Gacko Date: Sun, 29 Mar 2015 20:09:33 +0200 Subject: [PATCH 07/86] Fix non-pch build. --- src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp index 3ea7cf0155c..99342b5a628 100644 --- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp @@ -29,11 +29,12 @@ EndContentData */ #include "Player.h" #include "Group.h" -#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" #include "PassiveAI.h" +#include "CellImpl.h" /*###### ## npc_webbed_creature From de1cbf716db6a389f95cf5b9c790ec956d24aab0 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 29 Mar 2015 20:50:17 +0200 Subject: [PATCH 08/86] Core/Dungeon Finder: Allow to execute "lfg" commands from console --- src/server/scripts/Commands/cs_lfg.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/scripts/Commands/cs_lfg.cpp b/src/server/scripts/Commands/cs_lfg.cpp index 31e1b69115f..747d84de9c5 100644 --- a/src/server/scripts/Commands/cs_lfg.cpp +++ b/src/server/scripts/Commands/cs_lfg.cpp @@ -47,15 +47,15 @@ public: { { "player", rbac::RBAC_PERM_COMMAND_LFG_PLAYER, false, &HandleLfgPlayerInfoCommand, "", NULL }, { "group", rbac::RBAC_PERM_COMMAND_LFG_GROUP, false, &HandleLfgGroupInfoCommand, "", NULL }, - { "queue", rbac::RBAC_PERM_COMMAND_LFG_QUEUE, false, &HandleLfgQueueInfoCommand, "", NULL }, - { "clean", rbac::RBAC_PERM_COMMAND_LFG_CLEAN, false, &HandleLfgCleanCommand, "", NULL }, - { "options", rbac::RBAC_PERM_COMMAND_LFG_OPTIONS, false, &HandleLfgOptionsCommand, "", NULL }, + { "queue", rbac::RBAC_PERM_COMMAND_LFG_QUEUE, true, &HandleLfgQueueInfoCommand, "", NULL }, + { "clean", rbac::RBAC_PERM_COMMAND_LFG_CLEAN, true, &HandleLfgCleanCommand, "", NULL }, + { "options", rbac::RBAC_PERM_COMMAND_LFG_OPTIONS, true, &HandleLfgOptionsCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; static ChatCommand commandTable[] = { - { "lfg", rbac::RBAC_PERM_COMMAND_LFG, false, NULL, "", lfgCommandTable }, + { "lfg", rbac::RBAC_PERM_COMMAND_LFG, true, NULL, "", lfgCommandTable }, { NULL, 0, false, NULL, "", NULL } }; return commandTable; From 50bbfeebb9e878928a24e0b91d9ddd39cc1d59ff Mon Sep 17 00:00:00 2001 From: click Date: Mon, 30 Mar 2015 02:06:07 +0200 Subject: [PATCH 09/86] Core/Entities: Add player name and ID to GetXPrestBonus calculation-log --- src/server/game/Entities/Player/Player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index ae55ac7bccb..bb237fde6a5 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -9786,7 +9786,7 @@ uint32 Player::GetXPRestBonus(uint32 xp) SetRestBonus(GetRestBonus() - rested_bonus); - TC_LOG_DEBUG("entities.player", "Player gain %u xp (+ %u Rested Bonus). Rested points=%f", xp+rested_bonus, rested_bonus, GetRestBonus()); + TC_LOG_DEBUG("entities.player", "GetXPRestBonus: Player %s (%u) gain %u xp (+%u Rested Bonus). Rested points=%f", GetName().c_str(), GetGUIDLow(), xp+rested_bonus, rested_bonus, GetRestBonus()); return rested_bonus; } From 70106719312d7cd40529bda8c3dbab8349d14a14 Mon Sep 17 00:00:00 2001 From: leak Date: Mon, 30 Mar 2015 17:16:07 +0200 Subject: [PATCH 10/86] Core/Misc: Remove unused headers --- src/server/authserver/Main.cpp | 2 -- src/server/collision/Maps/TileAssembler.cpp | 1 - src/server/collision/Models/GameObjectModel.cpp | 2 -- src/server/collision/Models/ModelInstance.cpp | 1 - src/server/collision/Models/WorldModel.cpp | 1 - src/server/game/AI/CoreAI/GuardAI.cpp | 3 --- src/server/game/AI/CoreAI/PassiveAI.cpp | 1 - src/server/game/AI/CoreAI/PetAI.cpp | 2 -- src/server/game/AI/CoreAI/ReactorAI.cpp | 4 ---- src/server/game/AI/CoreAI/TotemAI.cpp | 2 -- src/server/game/AI/CreatureAISelector.cpp | 1 - src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 2 -- src/server/game/AI/SmartScripts/SmartAI.cpp | 4 ---- src/server/game/AI/SmartScripts/SmartScript.cpp | 1 - src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 6 ------ src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 1 - src/server/game/Battlefield/Battlefield.cpp | 1 - src/server/game/Battlefield/BattlefieldMgr.cpp | 1 - src/server/game/Battlegrounds/Battleground.cpp | 2 -- src/server/game/Battlegrounds/BattlegroundMgr.cpp | 2 -- src/server/game/Battlegrounds/BattlegroundQueue.cpp | 2 +- src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp | 2 -- src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp | 1 - src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp | 1 - src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp | 1 - src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp | 1 - src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp | 2 -- src/server/game/Chat/Chat.cpp | 1 - src/server/game/Combat/HostileRefManager.cpp | 1 - src/server/game/Combat/ThreatManager.cpp | 2 -- src/server/game/DungeonFinding/LFGMgr.cpp | 1 - src/server/game/DungeonFinding/LFGQueue.cpp | 3 --- src/server/game/Entities/Corpse/Corpse.cpp | 3 --- src/server/game/Entities/Creature/Creature.cpp | 5 ----- src/server/game/Entities/Creature/TemporarySummon.cpp | 1 - .../game/Entities/DynamicObject/DynamicObject.cpp | 2 -- src/server/game/Entities/GameObject/GameObject.cpp | 2 -- src/server/game/Entities/Object/Object.cpp | 8 -------- src/server/game/Entities/Object/ObjectGuid.cpp | 1 - src/server/game/Entities/Pet/Pet.cpp | 1 - src/server/game/Entities/Player/Player.cpp | 2 -- src/server/game/Entities/Totem/Totem.cpp | 2 -- src/server/game/Entities/Transport/Transport.cpp | 4 ---- src/server/game/Entities/Unit/Unit.cpp | 1 - src/server/game/Entities/Vehicle/Vehicle.cpp | 4 ---- src/server/game/Events/GameEventMgr.cpp | 1 - src/server/game/Globals/ObjectAccessor.cpp | 8 -------- src/server/game/Grids/Notifiers/GridNotifiers.cpp | 3 --- src/server/game/Grids/ObjectGridLoader.cpp | 1 - src/server/game/Groups/Group.cpp | 1 - src/server/game/Handlers/AddonHandler.cpp | 1 - src/server/game/Handlers/BattlefieldHandler.cpp | 2 -- src/server/game/Handlers/CharacterHandler.cpp | 1 - src/server/game/Handlers/ChatHandler.cpp | 1 - src/server/game/Handlers/CombatHandler.cpp | 2 -- src/server/game/Handlers/DuelHandler.cpp | 2 -- src/server/game/Handlers/GuildHandler.cpp | 3 --- src/server/game/Handlers/ItemHandler.cpp | 2 -- src/server/game/Handlers/MiscHandler.cpp | 8 -------- src/server/game/Handlers/MovementHandler.cpp | 1 - src/server/game/Handlers/NPCHandler.cpp | 2 -- src/server/game/Handlers/PetitionsHandler.cpp | 2 -- src/server/game/Handlers/QueryHandler.cpp | 2 -- src/server/game/Handlers/SkillHandler.cpp | 2 -- src/server/game/Handlers/SpellHandler.cpp | 3 --- src/server/game/Handlers/TaxiHandler.cpp | 1 - src/server/game/Handlers/VoiceChatHandler.cpp | 1 - src/server/game/Instances/InstanceSaveMgr.cpp | 3 --- src/server/game/Maps/Map.cpp | 1 - src/server/game/Maps/MapManager.cpp | 1 - src/server/game/Movement/MotionMaster.cpp | 1 - .../MovementGenerators/ConfusedMovementGenerator.cpp | 2 -- .../MovementGenerators/FleeingMovementGenerator.cpp | 1 - .../MovementGenerators/HomeMovementGenerator.cpp | 1 - .../MovementGenerators/RandomMovementGenerator.cpp | 2 -- .../MovementGenerators/WaypointMovementGenerator.cpp | 1 - src/server/game/Movement/Spline/MoveSplineInit.cpp | 1 - src/server/game/Movement/Spline/MovementUtil.cpp | 1 - src/server/game/OutdoorPvP/OutdoorPvP.cpp | 1 - src/server/game/Scripting/MapScripts.cpp | 2 -- src/server/game/Server/WorldSession.cpp | 4 ---- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 1 - src/server/game/Spells/Spell.cpp | 3 --- src/server/game/Spells/SpellEffects.cpp | 10 ---------- src/server/game/Spells/SpellMgr.cpp | 4 ---- src/server/game/Spells/SpellScript.cpp | 1 - src/server/game/Warden/Warden.cpp | 2 -- src/server/game/Warden/WardenCheckMgr.cpp | 1 - src/server/game/Warden/WardenWin.cpp | 1 - src/server/game/Weather/Weather.cpp | 1 - src/server/scripts/Commands/cs_misc.cpp | 1 - src/server/shared/Configuration/Config.cpp | 1 - src/server/shared/Cryptography/ARC4.cpp | 1 - src/server/shared/Cryptography/BigNumber.cpp | 1 - src/server/shared/Database/DatabaseWorker.cpp | 2 -- src/server/shared/Database/MySQLConnection.cpp | 2 -- src/server/shared/Logging/Log.cpp | 1 - src/server/shared/Updater/DBUpdater.cpp | 1 - src/server/worldserver/CommandLine/CliRunnable.cpp | 7 +------ 99 files changed, 2 insertions(+), 205 deletions(-) diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index 26f1c872150..c748e9d28a8 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -34,9 +34,7 @@ #include "RealmList.h" #include "SystemConfig.h" #include "Util.h" -#include #include -#include #include #include #include diff --git a/src/server/collision/Maps/TileAssembler.cpp b/src/server/collision/Maps/TileAssembler.cpp index ee978211577..ec7b759f975 100644 --- a/src/server/collision/Maps/TileAssembler.cpp +++ b/src/server/collision/Maps/TileAssembler.cpp @@ -24,7 +24,6 @@ #include #include #include -#include using G3D::Vector3; using G3D::AABox; diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index 05bd5d360c6..0355d2e848c 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -24,8 +24,6 @@ #include "GameObjectModel.h" #include "Log.h" #include "GameObject.h" -#include "Creature.h" -#include "TemporarySummon.h" #include "Object.h" #include "DBCStores.h" #include "World.h" diff --git a/src/server/collision/Models/ModelInstance.cpp b/src/server/collision/Models/ModelInstance.cpp index 025352eeb58..45440a99666 100644 --- a/src/server/collision/Models/ModelInstance.cpp +++ b/src/server/collision/Models/ModelInstance.cpp @@ -19,7 +19,6 @@ #include "ModelInstance.h" #include "WorldModel.h" #include "MapTree.h" -#include "VMapDefinitions.h" using G3D::Vector3; using G3D::Ray; diff --git a/src/server/collision/Models/WorldModel.cpp b/src/server/collision/Models/WorldModel.cpp index 3af120045cb..86ab9366c71 100644 --- a/src/server/collision/Models/WorldModel.cpp +++ b/src/server/collision/Models/WorldModel.cpp @@ -17,7 +17,6 @@ */ #include "WorldModel.h" -#include "ModelInstance.h" #include "VMapDefinitions.h" #include "MapTree.h" diff --git a/src/server/game/AI/CoreAI/GuardAI.cpp b/src/server/game/AI/CoreAI/GuardAI.cpp index 14e5faaf723..7fd1493cbde 100644 --- a/src/server/game/AI/CoreAI/GuardAI.cpp +++ b/src/server/game/AI/CoreAI/GuardAI.cpp @@ -19,9 +19,6 @@ #include "GuardAI.h" #include "Errors.h" #include "Player.h" -#include "ObjectAccessor.h" -#include "World.h" -#include "CreatureAIImpl.h" int GuardAI::Permissible(Creature const* creature) { diff --git a/src/server/game/AI/CoreAI/PassiveAI.cpp b/src/server/game/AI/CoreAI/PassiveAI.cpp index fb16d39dab3..5c482120b21 100644 --- a/src/server/game/AI/CoreAI/PassiveAI.cpp +++ b/src/server/game/AI/CoreAI/PassiveAI.cpp @@ -18,7 +18,6 @@ #include "PassiveAI.h" #include "Creature.h" -#include "TemporarySummon.h" PassiveAI::PassiveAI(Creature* c) : CreatureAI(c) { me->SetReactState(REACT_PASSIVE); } PossessedAI::PossessedAI(Creature* c) : CreatureAI(c) { me->SetReactState(REACT_PASSIVE); } diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index f532e4cd862..abb6126ca2c 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -20,12 +20,10 @@ #include "Errors.h" #include "Pet.h" #include "Player.h" -#include "DBCStores.h" #include "Spell.h" #include "ObjectAccessor.h" #include "SpellMgr.h" #include "Creature.h" -#include "World.h" #include "Util.h" #include "Group.h" #include "SpellInfo.h" diff --git a/src/server/game/AI/CoreAI/ReactorAI.cpp b/src/server/game/AI/CoreAI/ReactorAI.cpp index ebb57038737..9ab86047dc8 100644 --- a/src/server/game/AI/CoreAI/ReactorAI.cpp +++ b/src/server/game/AI/CoreAI/ReactorAI.cpp @@ -18,10 +18,6 @@ #include "ByteBuffer.h" #include "ReactorAI.h" -#include "Errors.h" -#include "Log.h" -#include "ObjectAccessor.h" -#include "CreatureAIImpl.h" int ReactorAI::Permissible(const Creature* creature) { diff --git a/src/server/game/AI/CoreAI/TotemAI.cpp b/src/server/game/AI/CoreAI/TotemAI.cpp index 983e212b33c..57e926744e2 100644 --- a/src/server/game/AI/CoreAI/TotemAI.cpp +++ b/src/server/game/AI/CoreAI/TotemAI.cpp @@ -19,10 +19,8 @@ #include "TotemAI.h" #include "Totem.h" #include "Creature.h" -#include "DBCStores.h" #include "ObjectAccessor.h" #include "SpellMgr.h" - #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "CellImpl.h" diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp index 9d025e3c2e2..07bd49bdcc6 100644 --- a/src/server/game/AI/CreatureAISelector.cpp +++ b/src/server/game/AI/CreatureAISelector.cpp @@ -21,7 +21,6 @@ #include "PassiveAI.h" #include "MovementGenerator.h" -#include "Pet.h" #include "TemporarySummon.h" #include "CreatureAIFactory.h" #include "ScriptMgr.h" diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 135a0fcee93..aa7ec3b847f 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -17,14 +17,12 @@ */ #include "ScriptedCreature.h" -#include "Item.h" #include "Spell.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "Cell.h" #include "CellImpl.h" #include "ObjectMgr.h" -#include "TemporarySummon.h" // Spell summary for ScriptedAI::SelectSpell struct TSpellSummary diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 76f08952664..20a7ca05d93 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -21,11 +21,7 @@ #include "GridDefines.h" #include "GridNotifiers.h" #include "SpellMgr.h" -#include "GridNotifiersImpl.h" #include "Cell.h" -#include "CellImpl.h" -#include "InstanceScript.h" -#include "ScriptedCreature.h" #include "Group.h" #include "SmartAI.h" #include "ScriptMgr.h" diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 58b25781035..3d0b745be25 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -35,7 +35,6 @@ #include "SmartScript.h" #include "SpellMgr.h" #include "Vehicle.h" -#include "MoveSplineInit.h" #include "GameEventMgr.h" SmartScript::SmartScript() diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index becc3bd92cd..8f0f86772eb 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -17,18 +17,12 @@ #include "DatabaseEnv.h" #include "ObjectMgr.h" -#include "ObjectDefines.h" #include "GridDefines.h" #include "GridNotifiers.h" #include "SpellMgr.h" -#include "GridNotifiersImpl.h" #include "Cell.h" -#include "CellImpl.h" -#include "InstanceScript.h" -#include "ScriptedCreature.h" #include "GameEventMgr.h" #include "CreatureTextMgr.h" -#include "SpellMgr.h" #include "SpellInfo.h" #include "SmartScriptMgr.h" diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 0235aa7e8b6..16d5f4b6959 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -30,7 +30,6 @@ #include "Item.h" #include "Language.h" #include "Log.h" -#include enum eAuctionHouse { diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index ba52c8db2f5..a22db18fa7e 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -21,7 +21,6 @@ #include "CellImpl.h" #include "CreatureTextMgr.h" #include "GridNotifiers.h" -#include "GridNotifiersImpl.h" #include "Group.h" #include "GroupMgr.h" #include "Map.h" diff --git a/src/server/game/Battlefield/BattlefieldMgr.cpp b/src/server/game/Battlefield/BattlefieldMgr.cpp index 066588aa6e8..0060cf4f304 100644 --- a/src/server/game/Battlefield/BattlefieldMgr.cpp +++ b/src/server/game/Battlefield/BattlefieldMgr.cpp @@ -17,7 +17,6 @@ #include "BattlefieldMgr.h" #include "BattlefieldWG.h" -#include "ObjectMgr.h" #include "Player.h" BattlefieldMgr::BattlefieldMgr() diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 03b4fe3dea6..3e9b68d4611 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -26,12 +26,10 @@ #include "Formulas.h" #include "GridNotifiersImpl.h" #include "Group.h" -#include "MapManager.h" #include "Object.h" #include "ObjectMgr.h" #include "Player.h" #include "ReputationMgr.h" -#include "SpellAuraEffects.h" #include "SpellAuras.h" #include "Util.h" #include "WorldPacket.h" diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index e98cf979cb6..95a51f6d915 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -22,7 +22,6 @@ #include "World.h" #include "WorldPacket.h" -#include "ArenaTeam.h" #include "BattlegroundMgr.h" #include "BattlegroundAV.h" #include "BattlegroundAB.h" @@ -37,7 +36,6 @@ #include "BattlegroundIC.h" #include "Chat.h" #include "Map.h" -#include "MapInstanced.h" #include "MapManager.h" #include "Player.h" #include "GameEventMgr.h" diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 05bcc08f433..d9db2a9b5d1 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -24,8 +24,8 @@ #include "Group.h" #include "Log.h" #include "Language.h" -#include "ObjectMgr.h" #include "Player.h" +#include "ObjectAccessor.h" /*********************************************************/ /*** BATTLEGROUND QUEUE SYSTEM ***/ diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 2aec542effb..00b6862369d 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -17,9 +17,7 @@ */ #include "BattlegroundAB.h" -#include "World.h" #include "WorldPacket.h" -#include "ObjectMgr.h" #include "BattlegroundMgr.h" #include "Creature.h" #include "Language.h" diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index b6569a9f52d..a92cda0817b 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -26,7 +26,6 @@ #include "Language.h" #include "Player.h" #include "ScriptedCreature.h" -#include "SpellAuras.h" #include "WorldSession.h" BattlegroundAV::BattlegroundAV() diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp index 92f5c72fdae..ef2e2b15411 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp @@ -18,7 +18,6 @@ #include "BattlegroundEY.h" #include "ObjectMgr.h" -#include "World.h" #include "WorldPacket.h" #include "BattlegroundMgr.h" #include "Creature.h" diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index ef5a604c509..3432c740c1f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -25,7 +25,6 @@ #include "ObjectMgr.h" #include "Vehicle.h" #include "Transport.h" -#include "WorldSession.h" #include "ScriptedCreature.h" BattlegroundIC::BattlegroundIC() diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index cbc0c0e445d..e14e9fadafc 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -23,7 +23,6 @@ #include "Player.h" #include "ScriptedCreature.h" #include "WorldPacket.h" -#include "WorldSession.h" BattlegroundSA::BattlegroundSA() { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index 1fff334a27c..378ce22ba3e 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -17,14 +17,12 @@ */ #include "BattlegroundWS.h" -#include "Creature.h" #include "GameObject.h" #include "Language.h" #include "Object.h" #include "ObjectMgr.h" #include "BattlegroundMgr.h" #include "Player.h" -#include "World.h" #include "WorldPacket.h" // these variables aren't used outside of this file, so declare them only here diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 3195de9b6bd..1716aa73525 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -32,7 +32,6 @@ #include "Opcodes.h" #include "Player.h" #include "UpdateMask.h" -#include "SpellMgr.h" #include "ScriptMgr.h" #include "ChatLink.h" diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp index 85afdf64607..245cc77eec3 100644 --- a/src/server/game/Combat/HostileRefManager.cpp +++ b/src/server/game/Combat/HostileRefManager.cpp @@ -20,7 +20,6 @@ #include "ThreatManager.h" #include "Unit.h" #include "DBCStructure.h" -#include "SpellMgr.h" #include "SpellInfo.h" HostileRefManager::~HostileRefManager() diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index cd108e54b9f..2ec84c946f6 100644 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -19,8 +19,6 @@ #include "ThreatManager.h" #include "Unit.h" #include "Creature.h" -#include "CreatureAI.h" -#include "Map.h" #include "Player.h" #include "ObjectAccessor.h" #include "UnitEvents.h" diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 93ebeca9780..a2058fffeed 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -21,7 +21,6 @@ #include "DisableMgr.h" #include "ObjectMgr.h" #include "SocialMgr.h" -#include "Language.h" #include "LFGMgr.h" #include "LFGScripts.h" #include "LFGGroupData.h" diff --git a/src/server/game/DungeonFinding/LFGQueue.cpp b/src/server/game/DungeonFinding/LFGQueue.cpp index a7c0a1cfa67..6ac20541574 100644 --- a/src/server/game/DungeonFinding/LFGQueue.cpp +++ b/src/server/game/DungeonFinding/LFGQueue.cpp @@ -23,9 +23,6 @@ #include "LFGQueue.h" #include "LFGMgr.h" #include "Log.h" -#include "ObjectMgr.h" -#include "World.h" -#include "GroupMgr.h" namespace lfg { diff --git a/src/server/game/Entities/Corpse/Corpse.cpp b/src/server/game/Entities/Corpse/Corpse.cpp index 1e967928265..bf69b4e7443 100644 --- a/src/server/game/Entities/Corpse/Corpse.cpp +++ b/src/server/game/Entities/Corpse/Corpse.cpp @@ -22,9 +22,6 @@ #include "UpdateMask.h" #include "ObjectAccessor.h" #include "DatabaseEnv.h" -#include "Opcodes.h" -#include "GossipDef.h" -#include "World.h" Corpse::Corpse(CorpseType type) : WorldObject(type != CORPSE_BONES), m_type(type) { diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index a3ce6d919c9..b367ebe6a8a 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -34,12 +34,9 @@ #include "InstanceScript.h" #include "Log.h" #include "LootMgr.h" -#include "MapManager.h" #include "MoveSpline.h" -#include "MoveSplineInit.h" #include "ObjectMgr.h" #include "Opcodes.h" -#include "OutdoorPvPMgr.h" #include "Player.h" #include "PoolMgr.h" #include "QuestDef.h" @@ -48,10 +45,8 @@ #include "TemporarySummon.h" #include "Util.h" #include "Vehicle.h" -#include "WaypointMovementGenerator.h" #include "World.h" #include "WorldPacket.h" - #include "Transport.h" TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index fc7b85aa73e..2a3e91b7574 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -19,7 +19,6 @@ #include "Log.h" #include "ObjectAccessor.h" #include "CreatureAI.h" -#include "ObjectMgr.h" #include "TemporarySummon.h" #include "Pet.h" #include "Player.h" diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp index 60accf8ad92..71d0f13488c 100644 --- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp +++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp @@ -18,12 +18,10 @@ #include "Common.h" #include "UpdateMask.h" -#include "Opcodes.h" #include "World.h" #include "ObjectAccessor.h" #include "DatabaseEnv.h" #include "GridNotifiers.h" -#include "CellImpl.h" #include "GridNotifiersImpl.h" #include "ScriptMgr.h" #include "Transport.h" diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 6ca5ab4ae5b..a73cbfa3e5c 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -20,7 +20,6 @@ #include "Battleground.h" #include "CellImpl.h" #include "CreatureAISelector.h" -#include "DynamicTree.h" #include "GameObjectModel.h" #include "GridNotifiersImpl.h" #include "Group.h" @@ -33,7 +32,6 @@ #include "UpdateFieldFlags.h" #include "World.h" #include "Transport.h" -#include GameObject::GameObject() : WorldObject(false), MapObject(), m_model(NULL), m_goValue(), m_AI(NULL) diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 0b97499fc05..0a52c145122 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -30,27 +30,19 @@ #include "UpdateData.h" #include "UpdateMask.h" #include "Util.h" -#include "MapManager.h" #include "ObjectAccessor.h" -#include "Log.h" #include "Transport.h" -#include "TargetedMovementGenerator.h" -#include "WaypointMovementGenerator.h" #include "VMapFactory.h" #include "CellImpl.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" -#include "SpellAuraEffects.h" #include "UpdateFieldFlags.h" #include "TemporarySummon.h" #include "Totem.h" #include "OutdoorPvPMgr.h" #include "MovementPacketBuilder.h" -#include "DynamicTree.h" -#include "Group.h" #include "BattlefieldMgr.h" #include "Battleground.h" -#include "Chat.h" Object::Object() : m_PackGUID(sizeof(uint64)+1) { diff --git a/src/server/game/Entities/Object/ObjectGuid.cpp b/src/server/game/Entities/Object/ObjectGuid.cpp index b86a253a84d..c15668c3887 100644 --- a/src/server/game/Entities/Object/ObjectGuid.cpp +++ b/src/server/game/Entities/Object/ObjectGuid.cpp @@ -18,7 +18,6 @@ #include "ObjectGuid.h" #include "World.h" -#include "ObjectMgr.h" #include #include diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index fdfd1fa3d4d..d5d6bdf9831 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -26,7 +26,6 @@ #include "Formulas.h" #include "SpellAuras.h" #include "SpellAuraEffects.h" -#include "CreatureAI.h" #include "Unit.h" #include "Util.h" #include "Group.h" diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index bb237fde6a5..9e92492d46b 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -51,7 +51,6 @@ #include "LFGMgr.h" #include "Language.h" #include "Log.h" -#include "MapInstanced.h" #include "MapManager.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" @@ -73,7 +72,6 @@ #include "UpdateFieldFlags.h" #include "UpdateMask.h" #include "Util.h" -#include "Vehicle.h" #include "Weather.h" #include "WeatherMgr.h" #include "World.h" diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp index 5bb13fd98cf..39a078a907f 100644 --- a/src/server/game/Entities/Totem/Totem.cpp +++ b/src/server/game/Entities/Totem/Totem.cpp @@ -17,9 +17,7 @@ */ #include "Totem.h" -#include "Log.h" #include "Group.h" -#include "ObjectMgr.h" #include "Opcodes.h" #include "Player.h" #include "SpellMgr.h" diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 84dd50c56ca..a3ed1209ce3 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -20,14 +20,10 @@ #include "Transport.h" #include "MapManager.h" #include "ObjectMgr.h" -#include "Path.h" #include "ScriptMgr.h" -#include "WorldPacket.h" #include "DBCStores.h" -#include "World.h" #include "GameObjectAI.h" #include "Vehicle.h" -#include "MapReference.h" #include "Player.h" #include "Cell.h" #include "CellImpl.h" diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f44c14a12dd..3e4953a188c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -35,7 +35,6 @@ #include "InstanceSaveMgr.h" #include "InstanceScript.h" #include "Log.h" -#include "MapManager.h" #include "MoveSpline.h" #include "MoveSplineInit.h" #include "ObjectAccessor.h" diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index 9887f303357..b6f9534ac51 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -22,12 +22,8 @@ #include "Vehicle.h" #include "Unit.h" #include "Util.h" -#include "WorldPacket.h" #include "ScriptMgr.h" #include "CreatureAI.h" -#include "ZoneScript.h" -#include "SpellMgr.h" -#include "SpellInfo.h" #include "MoveSplineInit.h" #include "TemporarySummon.h" #include "EventProcessor.h" diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index ba82c61e7ff..2264612f89b 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -24,7 +24,6 @@ #include "Language.h" #include "Log.h" #include "MapManager.h" -#include "GossipDef.h" #include "Player.h" #include "BattlegroundMgr.h" #include "UnitAI.h" diff --git a/src/server/game/Globals/ObjectAccessor.cpp b/src/server/game/Globals/ObjectAccessor.cpp index 88cc201ebf8..859633b16c4 100644 --- a/src/server/game/Globals/ObjectAccessor.cpp +++ b/src/server/game/Globals/ObjectAccessor.cpp @@ -20,28 +20,20 @@ #include #include "ObjectAccessor.h" -#include "CellImpl.h" #include "Corpse.h" #include "Creature.h" #include "DynamicObject.h" #include "GameObject.h" #include "GridNotifiers.h" -#include "GridNotifiersImpl.h" #include "Item.h" #include "Map.h" -#include "MapInstanced.h" -#include "MapManager.h" #include "ObjectDefines.h" #include "ObjectMgr.h" -#include "Opcodes.h" #include "Pet.h" #include "Player.h" -#include "Vehicle.h" #include "World.h" #include "WorldPacket.h" -#include - ObjectAccessor::ObjectAccessor() { } ObjectAccessor::~ObjectAccessor() { } diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.cpp b/src/server/game/Grids/Notifiers/GridNotifiers.cpp index abe302d2d3d..d52e559c408 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.cpp +++ b/src/server/game/Grids/Notifiers/GridNotifiers.cpp @@ -21,12 +21,9 @@ #include "WorldPacket.h" #include "WorldSession.h" #include "UpdateData.h" -#include "Item.h" -#include "Map.h" #include "Transport.h" #include "ObjectAccessor.h" #include "CellImpl.h" -#include "SpellInfo.h" using namespace Trinity; diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index 779688402b6..c7e1056a3ef 100644 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -20,7 +20,6 @@ #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Creature.h" -#include "Vehicle.h" #include "GameObject.h" #include "DynamicObject.h" #include "Corpse.h" diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 5664cbb6e4b..ae8712510c9 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -31,7 +31,6 @@ #include "BattlegroundMgr.h" #include "MapManager.h" #include "InstanceSaveMgr.h" -#include "MapInstanced.h" #include "Util.h" #include "LFGMgr.h" #include "UpdateFieldFlags.h" diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp index 8d5e07c4d3b..adb76846379 100644 --- a/src/server/game/Handlers/AddonHandler.cpp +++ b/src/server/game/Handlers/AddonHandler.cpp @@ -18,7 +18,6 @@ #include "zlib.h" #include "AddonHandler.h" -#include "DatabaseEnv.h" #include "Opcodes.h" #include "Log.h" diff --git a/src/server/game/Handlers/BattlefieldHandler.cpp b/src/server/game/Handlers/BattlefieldHandler.cpp index c7ffac217c4..69e36e7328d 100644 --- a/src/server/game/Handlers/BattlefieldHandler.cpp +++ b/src/server/game/Handlers/BattlefieldHandler.cpp @@ -15,8 +15,6 @@ * with this program. If not, see . */ -#include "ObjectAccessor.h" -#include "ObjectMgr.h" #include "Opcodes.h" #include "Player.h" #include "WorldPacket.h" diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index ee8e051ecd9..f103537710f 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -28,7 +28,6 @@ #include "Guild.h" #include "GuildMgr.h" #include "Language.h" -#include "LFGMgr.h" #include "Log.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index f5264bde755..2acbaba1f67 100644 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -34,7 +34,6 @@ #include "Log.h" #include "Opcodes.h" #include "Player.h" -#include "SpellAuras.h" #include "SpellAuraEffects.h" #include "Util.h" #include "ScriptMgr.h" diff --git a/src/server/game/Handlers/CombatHandler.cpp b/src/server/game/Handlers/CombatHandler.cpp index ea990c83f46..39ba593c8d9 100644 --- a/src/server/game/Handlers/CombatHandler.cpp +++ b/src/server/game/Handlers/CombatHandler.cpp @@ -22,9 +22,7 @@ #include "WorldSession.h" #include "ObjectAccessor.h" #include "CreatureAI.h" -#include "ObjectDefines.h" #include "Vehicle.h" -#include "VehicleDefines.h" #include "Player.h" #include "Opcodes.h" diff --git a/src/server/game/Handlers/DuelHandler.cpp b/src/server/game/Handlers/DuelHandler.cpp index 37d89274909..954fb66a9db 100644 --- a/src/server/game/Handlers/DuelHandler.cpp +++ b/src/server/game/Handlers/DuelHandler.cpp @@ -20,8 +20,6 @@ #include "WorldPacket.h" #include "WorldSession.h" #include "Log.h" -#include "Opcodes.h" -#include "UpdateData.h" #include "Player.h" void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket) diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp index 6b770b58827..ca7b4a5f8cf 100644 --- a/src/server/game/Handlers/GuildHandler.cpp +++ b/src/server/game/Handlers/GuildHandler.cpp @@ -23,10 +23,7 @@ #include "ObjectMgr.h" #include "GuildMgr.h" #include "Log.h" -#include "Opcodes.h" #include "Guild.h" -#include "GossipDef.h" -#include "SocialMgr.h" void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket) { diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index a24f247c79d..672e1c69920 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -24,8 +24,6 @@ #include "ObjectMgr.h" #include "Player.h" #include "Item.h" -#include "UpdateData.h" -#include "ObjectAccessor.h" #include "SpellInfo.h" void WorldSession::HandleSplitItemOpcode(WorldPacket& recvData) diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index e541b9d7625..7b8ce80ccd7 100644 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -28,9 +28,6 @@ #include "ObjectMgr.h" #include "GuildMgr.h" #include "WorldSession.h" -#include "BigNumber.h" -#include "SHA1.h" -#include "UpdateData.h" #include "LootMgr.h" #include "Chat.h" #include "zlib.h" @@ -38,19 +35,14 @@ #include "Object.h" #include "Battleground.h" #include "OutdoorPvP.h" -#include "Pet.h" #include "SocialMgr.h" -#include "CellImpl.h" #include "AccountMgr.h" -#include "Vehicle.h" #include "CreatureAI.h" #include "DBCEnums.h" #include "ScriptMgr.h" #include "MapManager.h" -#include "InstanceScript.h" #include "GameObjectAI.h" #include "Group.h" -#include "AccountMgr.h" #include "Spell.h" #include "BattlegroundMgr.h" #include "Battlefield.h" diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index f537af4b46e..e86fa523f68 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -23,7 +23,6 @@ #include "Log.h" #include "Corpse.h" #include "Player.h" -#include "SpellAuras.h" #include "MapManager.h" #include "Transport.h" #include "Battleground.h" diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index 0300759a6e6..3c4bbd87b3f 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -27,8 +27,6 @@ #include "SpellMgr.h" #include "Player.h" #include "GossipDef.h" -#include "UpdateMask.h" -#include "ObjectAccessor.h" #include "Creature.h" #include "Pet.h" #include "ReputationMgr.h" diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp index 1bf081900ee..05e793455da 100644 --- a/src/server/game/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -28,8 +28,6 @@ #include "Opcodes.h" #include "Guild.h" #include "ArenaTeam.h" -#include "GossipDef.h" -#include "SocialMgr.h" #define CHARTER_DISPLAY_ID 16161 diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp index ed41d2ebeed..d15f21f4ad3 100644 --- a/src/server/game/Handlers/QueryHandler.cpp +++ b/src/server/game/Handlers/QueryHandler.cpp @@ -17,7 +17,6 @@ */ #include "Common.h" -#include "Language.h" #include "DatabaseEnv.h" #include "WorldPacket.h" #include "WorldSession.h" @@ -28,7 +27,6 @@ #include "Player.h" #include "UpdateMask.h" #include "NPCHandler.h" -#include "Pet.h" #include "MapManager.h" void WorldSession::SendNameQueryOpcode(ObjectGuid guid) diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index 23ce233a905..6da2efa38a6 100644 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -17,13 +17,11 @@ */ #include "Common.h" -#include "DatabaseEnv.h" #include "Log.h" #include "ObjectAccessor.h" #include "Opcodes.h" #include "Player.h" #include "Pet.h" -#include "UpdateMask.h" #include "WorldPacket.h" #include "WorldSession.h" diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index fede3e30211..5f641bf713f 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -26,9 +26,6 @@ #include "Opcodes.h" #include "Spell.h" #include "Totem.h" -#include "TemporarySummon.h" -#include "SpellAuras.h" -#include "CreatureAI.h" #include "ScriptMgr.h" #include "GameObjectAI.h" #include "SpellAuraEffects.h" diff --git a/src/server/game/Handlers/TaxiHandler.cpp b/src/server/game/Handlers/TaxiHandler.cpp index 02e0345dba8..a9dc7f26b8e 100644 --- a/src/server/game/Handlers/TaxiHandler.cpp +++ b/src/server/game/Handlers/TaxiHandler.cpp @@ -24,7 +24,6 @@ #include "Log.h" #include "ObjectMgr.h" #include "Player.h" -#include "UpdateMask.h" #include "Path.h" #include "WaypointMovementGenerator.h" diff --git a/src/server/game/Handlers/VoiceChatHandler.cpp b/src/server/game/Handlers/VoiceChatHandler.cpp index 7801ed4d9fe..277755c6eb1 100644 --- a/src/server/game/Handlers/VoiceChatHandler.cpp +++ b/src/server/game/Handlers/VoiceChatHandler.cpp @@ -19,7 +19,6 @@ #include "Common.h" #include "WorldPacket.h" #include "WorldSession.h" -#include "Opcodes.h" #include "Log.h" void WorldSession::HandleVoiceSessionEnableOpcode(WorldPacket& recvData) diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index 0a355fb14b7..260c2966a52 100644 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -21,15 +21,12 @@ #include "GridNotifiers.h" #include "Log.h" #include "GridStates.h" -#include "CellImpl.h" #include "Map.h" #include "MapManager.h" #include "MapInstanced.h" #include "InstanceSaveMgr.h" #include "Timer.h" -#include "GridNotifiersImpl.h" #include "Config.h" -#include "Transport.h" #include "ObjectMgr.h" #include "World.h" #include "Group.h" diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index b4066b2257e..dad24de7288 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -28,7 +28,6 @@ #include "Group.h" #include "InstanceScript.h" #include "MapInstanced.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Pet.h" diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index c8dd812ca02..29f4b4ab7c2 100644 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -27,7 +27,6 @@ #include "InstanceScript.h" #include "Config.h" #include "World.h" -#include "CellImpl.h" #include "Corpse.h" #include "ObjectMgr.h" #include "Language.h" diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index bda3ad851c8..2b323e196a7 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -30,7 +30,6 @@ #include "RandomMovementGenerator.h" #include "MoveSpline.h" #include "MoveSplineInit.h" -#include inline bool isStatic(MovementGenerator *mv) { diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp index cbfc181fe9f..f0c0311280f 100755 --- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp @@ -17,10 +17,8 @@ */ #include "Creature.h" -#include "MapManager.h" #include "ConfusedMovementGenerator.h" #include "PathGenerator.h" -#include "VMapFactory.h" #include "MoveSplineInit.h" #include "MoveSpline.h" #include "Player.h" diff --git a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp index cea25fefbda..fa17846a1ff 100644 --- a/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp @@ -18,7 +18,6 @@ #include "Creature.h" #include "CreatureAI.h" -#include "MapManager.h" #include "FleeingMovementGenerator.h" #include "PathGenerator.h" #include "ObjectAccessor.h" diff --git a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp index ff28f3855a6..4245bffb864 100644 --- a/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp @@ -19,7 +19,6 @@ #include "HomeMovementGenerator.h" #include "Creature.h" #include "CreatureAI.h" -#include "WorldPacket.h" #include "MoveSplineInit.h" #include "MoveSpline.h" diff --git a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp index 0341af299be..86f0e6e20eb 100644 --- a/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp @@ -17,9 +17,7 @@ */ #include "Creature.h" -#include "MapManager.h" #include "RandomMovementGenerator.h" -#include "ObjectAccessor.h" #include "Map.h" #include "Util.h" #include "CreatureGroups.h" diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index a382bf9547e..a4c3831cf82 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -19,7 +19,6 @@ #include "WaypointMovementGenerator.h" //Extended headers #include "ObjectMgr.h" -#include "World.h" #include "Transport.h" //Flightmaster grid preloading #include "MapManager.h" diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp index 9619d478b7f..180ecf23079 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.cpp +++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp @@ -21,7 +21,6 @@ #include "MovementPacketBuilder.h" #include "Unit.h" #include "Transport.h" -#include "Vehicle.h" #include "WorldPacket.h" #include "Opcodes.h" diff --git a/src/server/game/Movement/Spline/MovementUtil.cpp b/src/server/game/Movement/Spline/MovementUtil.cpp index 7e63f029fd4..4f7e1d6a7a4 100644 --- a/src/server/game/Movement/Spline/MovementUtil.cpp +++ b/src/server/game/Movement/Spline/MovementUtil.cpp @@ -18,7 +18,6 @@ #include "MoveSplineFlag.h" #include -#include namespace Movement { diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index cf7be3de5ce..7c3f27e2acd 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -20,7 +20,6 @@ #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Map.h" -#include "MapManager.h" #include "Group.h" #include "WorldPacket.h" #include "GridNotifiers.h" diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index ab9c2e32cc8..3beaa7daa9b 100644 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -21,8 +21,6 @@ #include "GridNotifiersImpl.h" #include "GossipDef.h" #include "Map.h" -#include "MapManager.h" -#include "MapRefManager.h" #include "ObjectMgr.h" #include "Pet.h" #include "ScriptedCreature.h" diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index adc48ab43ef..1ff82aa7bf7 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -36,16 +36,12 @@ #include "Group.h" #include "Guild.h" #include "World.h" -#include "ObjectAccessor.h" #include "BattlegroundMgr.h" #include "OutdoorPvPMgr.h" -#include "MapManager.h" #include "SocialMgr.h" #include "zlib.h" #include "ScriptMgr.h" -#include "Transport.h" #include "WardenWin.h" -#include "WardenMac.h" #include "MoveSpline.h" namespace { diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 5366326a022..b1cb7d51b35 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -32,7 +32,6 @@ #include "OutdoorPvPMgr.h" #include "Formulas.h" #include "GridNotifiers.h" -#include "GridNotifiersImpl.h" #include "CellImpl.h" #include "ScriptMgr.h" #include "Vehicle.h" diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c31386cd496..dbe87daa1a1 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -31,12 +31,9 @@ #include "Player.h" #include "Pet.h" #include "Unit.h" -#include "Totem.h" #include "Spell.h" #include "DynamicObject.h" -#include "Group.h" #include "UpdateData.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "CellImpl.h" #include "SharedDefines.h" diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 7a2f15b3370..cb518ee6099 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -32,10 +32,6 @@ #include "DynamicObject.h" #include "SpellAuras.h" #include "SpellAuraEffects.h" -#include "Group.h" -#include "UpdateData.h" -#include "MapManager.h" -#include "ObjectAccessor.h" #include "SharedDefines.h" #include "Pet.h" #include "GameObject.h" @@ -43,20 +39,14 @@ #include "Creature.h" #include "Totem.h" #include "CreatureAI.h" -#include "BattlegroundMgr.h" #include "Battleground.h" #include "OutdoorPvPMgr.h" #include "Language.h" #include "SocialMgr.h" #include "Util.h" -#include "VMapFactory.h" #include "TemporarySummon.h" -#include "CellImpl.h" #include "GridNotifiers.h" -#include "GridNotifiersImpl.h" -#include "SkillDiscovery.h" #include "Formulas.h" -#include "Vehicle.h" #include "ScriptMgr.h" #include "GameObjectAI.h" #include "AccountMgr.h" diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index b9f046670cc..3c84bbce37b 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -19,15 +19,11 @@ #include "SpellMgr.h" #include "SpellInfo.h" #include "ObjectMgr.h" -#include "SpellAuras.h" #include "SpellAuraDefines.h" #include "SharedDefines.h" #include "DBCStores.h" -#include "World.h" #include "Chat.h" -#include "Spell.h" #include "BattlegroundMgr.h" -#include "MapManager.h" #include "BattlefieldWG.h" #include "BattlefieldMgr.h" #include "Player.h" diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 96977804f70..b347a982132 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -19,7 +19,6 @@ #include "Spell.h" #include "SpellAuras.h" #include "SpellScript.h" -#include "SpellMgr.h" bool _SpellScript::_Validate(SpellInfo const* entry) { diff --git a/src/server/game/Warden/Warden.cpp b/src/server/game/Warden/Warden.cpp index aed2d73c422..ecf7697db0d 100644 --- a/src/server/game/Warden/Warden.cpp +++ b/src/server/game/Warden/Warden.cpp @@ -22,10 +22,8 @@ #include "Log.h" #include "Opcodes.h" #include "ByteBuffer.h" -#include #include #include "World.h" -#include "Player.h" #include "Util.h" #include "Warden.h" #include "AccountMgr.h" diff --git a/src/server/game/Warden/WardenCheckMgr.cpp b/src/server/game/Warden/WardenCheckMgr.cpp index c2d095e6530..df9cd4786ad 100644 --- a/src/server/game/Warden/WardenCheckMgr.cpp +++ b/src/server/game/Warden/WardenCheckMgr.cpp @@ -21,7 +21,6 @@ #include "WorldSession.h" #include "Log.h" #include "Database/DatabaseEnv.h" -#include "Util.h" #include "WardenCheckMgr.h" #include "Warden.h" diff --git a/src/server/game/Warden/WardenWin.cpp b/src/server/game/Warden/WardenWin.cpp index 5a9d2d174b4..7db5e8f39e5 100644 --- a/src/server/game/Warden/WardenWin.cpp +++ b/src/server/game/Warden/WardenWin.cpp @@ -32,7 +32,6 @@ #include "WardenWin.h" #include "WardenModuleWin.h" #include "WardenCheckMgr.h" -#include "AccountMgr.h" WardenWin::WardenWin() : Warden(), _serverTicks(0) {} diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index edcbe90498d..438d0b8bb87 100644 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -25,7 +25,6 @@ #include "Player.h" #include "World.h" #include "Log.h" -#include "ObjectMgr.h" #include "Util.h" #include "ScriptMgr.h" #include "WorldSession.h" diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index dea2a5216e7..52cc20b9d3b 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -25,7 +25,6 @@ #include "InstanceSaveMgr.h" #include "Language.h" #include "MovementGenerator.h" -#include "ObjectAccessor.h" #include "Opcodes.h" #include "SpellAuras.h" #include "TargetedMovementGenerator.h" diff --git a/src/server/shared/Configuration/Config.cpp b/src/server/shared/Configuration/Config.cpp index 1e1f8c7c3c6..ea426a5d33e 100644 --- a/src/server/shared/Configuration/Config.cpp +++ b/src/server/shared/Configuration/Config.cpp @@ -21,7 +21,6 @@ #include #include #include "Config.h" -#include "Errors.h" using namespace boost::property_tree; diff --git a/src/server/shared/Cryptography/ARC4.cpp b/src/server/shared/Cryptography/ARC4.cpp index 28c3da8d228..d1082b39347 100644 --- a/src/server/shared/Cryptography/ARC4.cpp +++ b/src/server/shared/Cryptography/ARC4.cpp @@ -17,7 +17,6 @@ */ #include "ARC4.h" -#include ARC4::ARC4(uint8 len) : m_ctx() { diff --git a/src/server/shared/Cryptography/BigNumber.cpp b/src/server/shared/Cryptography/BigNumber.cpp index 7b353eb5616..720e8e30441 100644 --- a/src/server/shared/Cryptography/BigNumber.cpp +++ b/src/server/shared/Cryptography/BigNumber.cpp @@ -18,7 +18,6 @@ #include "Cryptography/BigNumber.h" #include -#include #include #include #include diff --git a/src/server/shared/Database/DatabaseWorker.cpp b/src/server/shared/Database/DatabaseWorker.cpp index 1fe638552a0..56757ce12a0 100644 --- a/src/server/shared/Database/DatabaseWorker.cpp +++ b/src/server/shared/Database/DatabaseWorker.cpp @@ -18,8 +18,6 @@ #include "DatabaseEnv.h" #include "DatabaseWorker.h" #include "SQLOperation.h" -#include "MySQLConnection.h" -#include "MySQLThreading.h" #include "ProducerConsumerQueue.h" DatabaseWorker::DatabaseWorker(ProducerConsumerQueue* newQueue, MySQLConnection* connection) diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index a16559a55dc..10f4a7baa18 100644 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -22,11 +22,9 @@ #include #endif #include -#include #include #include "MySQLConnection.h" -#include "MySQLThreading.h" #include "QueryResult.h" #include "SQLOperation.h" #include "PreparedStatement.h" diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index c9a4432039f..a2150733c6b 100644 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -25,7 +25,6 @@ #include "AppenderDB.h" #include "LogOperation.h" -#include #include #include diff --git a/src/server/shared/Updater/DBUpdater.cpp b/src/server/shared/Updater/DBUpdater.cpp index 15226577504..5918fe06b55 100644 --- a/src/server/shared/Updater/DBUpdater.cpp +++ b/src/server/shared/Updater/DBUpdater.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp index 6e961922b0e..ad9ae28f712 100644 --- a/src/server/worldserver/CommandLine/CliRunnable.cpp +++ b/src/server/worldserver/CommandLine/CliRunnable.cpp @@ -23,21 +23,16 @@ #include "Common.h" #include "ObjectMgr.h" #include "World.h" -#include "WorldSession.h" #include "Configuration/Config.h" -#include "AccountMgr.h" -#include "Chat.h" #include "CliRunnable.h" -#include "Language.h" #include "Log.h" -#include "MapManager.h" -#include "Player.h" #include "Util.h" #if PLATFORM != PLATFORM_WINDOWS #include #include +#include "Chat.h" char* command_finder(const char* text, int state) { From 16179f8cf931d3f4530908134809005c79e638d8 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Mon, 30 Mar 2015 22:40:48 +0100 Subject: [PATCH 11/86] DB/Quest: Lord Illidan Stormrage By @Killyana Closes #467 --- sql/updates/world/2015_03_30_00_world.sql | 110 ++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sql/updates/world/2015_03_30_00_world.sql diff --git a/sql/updates/world/2015_03_30_00_world.sql b/sql/updates/world/2015_03_30_00_world.sql new file mode 100644 index 00000000000..10bb642f8a1 --- /dev/null +++ b/sql/updates/world/2015_03_30_00_world.sql @@ -0,0 +1,110 @@ +SET @Illidan:=23467; +SET @Morghor:=23139; +SET @Sinestra1:=23283; +SET @Sinestra2:=23284; +SET @Yarzill:= 23141; +SET @Dragonmaw:=23146; + +DELETE FROM `creature_template_addon` WHERE `entry` IN (@Illidan); +INSERT INTO `creature_template_addon` (`entry`,`bytes1`,`bytes2`, `emote`, `auras`) VALUES +(@Illidan,0,4097,0,"37816"); + +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry` IN (@Illidan, @Morghor, @Yarzill, @Dragonmaw, 23468); +UPDATE `creature_template` SET `VehicleId`=321 WHERE `entry`=23468; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Illidan, @Morghor, @Yarzill, @Dragonmaw, 23468, @Illidan*100); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Morghor*100, @Morghor*100+1, @Yarzill*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 +(@Morghor,0,0,0,19,0,100,0,11108,0,0,0,80,@Morghor*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Overlord Mor''ghor - On quest accept (Lord Illidan Stormrage) - ActionList'), +(@Morghor*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,'Overlord Mor''ghor - Action List - Remove npcfla'), +(@Morghor*100,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Talk'), +(@Morghor*100,9,2,0,0,0,100,0,2000,2000,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Set Run OFF'), +(@Morghor*100,9,3,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-5104.410156, 595.296997, 85.680908, 2.368710,'Overlord Mor''ghor - Action List - Go to pos'), +(@Morghor*100,9,4,0,0,0,100,0,9000,9000,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Talk'), +(@Morghor*100,9,5,0,0,0,100,0,9000,9000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Talk'), +(@Morghor*100,9,6,0,0,0,100,0,5000,5000,0,0,12,@Illidan,8,0,0,0,0,8,0,0,0,-5107.830078, 602.583984, 85.239304, 4.925980,'Overlord Mor''ghor - Action List - Summon'), +(@Morghor*100,9,7,0,0,0,100,0,3000,3000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Talk'), +(@Morghor*100,9,8,0,0,0,100,0,1000,1000,0,0,11,68442,0,0,0,0,0,1,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Cast emote kneel'), +(@Morghor*100,9,9,0,0,0,100,0,2000,2000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Talk'), +(@Morghor*100,9,10,0,0,0,100,0,6000,6000,0,0,1,0,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Talk'), +(@Morghor*100,9,11,0,0,0,100,0,0,0,0,0,5,1,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Play emote talk'), +(@Morghor*100,9,12,0,0,0,100,0,5000,5000,0,0,1,5,0,0,0,0,0,7,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Talk'), +(@Morghor*100,9,13,0,0,0,100,0,5000,5000,0,0,1,1,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Talk'), +(@Morghor*100,9,14,0,0,0,100,0,0,0,0,0,5,1,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Play emote talk'), +(@Morghor*100,9,15,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Talk'), +(@Morghor*100,9,16,0,0,0,100,0,0,0,0,0,5,1,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Play emote talk'), +(@Morghor*100,9,17,0,0,0,100,0,5000,5000,0,0,1,3,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Talk'), +(@Morghor*100,9,18,0,0,0,100,0,0,0,0,0,5,1,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Play emote talk'), +(@Morghor*100,9,19,0,0,0,100,0,5000,5000,0,0,1,4,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Talk'), +(@Morghor*100,9,20,0,0,0,100,0,0,0,0,0,5,1,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Play emote talk'), +(@Morghor*100,9,21,0,0,0,100,0,5000,5000,0,0,1,5,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Talk'), +(@Morghor*100,9,22,0,0,0,100,0,0,0,0,0,5,1,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Play emote talk'), +(@Morghor*100,9,23,0,0,0,100,0,2000,2000,0,0,85,41528,0,0,0,0,0,7,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - InvokerCast'), +(@Morghor*100,9,24,0,0,0,100,0,0,0,0,0,28,42016,0,0,0,0,0,7,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Remove aura'), +(@Morghor*100,9,25,0,0,0,100,0,5000,5000,0,0,1,6,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Talk'), +(@Morghor*100,9,26,0,0,0,100,0,0,0,0,0,5,53,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Illidan Play emote rowar'), +(@Morghor*100,9,27,0,0,0,100,0,5000,5000,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Talk'), +(@Morghor*100,9,28,0,0,0,100,0,0,0,0,0,5,254,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Emote land'), +(@Morghor*100,9,29,0,0,0,100,0,1000,1000,0,0,41,0,0,0,0,0,0,19,@Illidan,15,0,0,0,0,0,'Overlord Mor''ghor - Action List - Despawn'), +(@Morghor*100,9,30,0,0,0,100,0,1000,1000,0,0,28,68442,0,0,0,0,0,1,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - remove emote aura'), +(@Morghor*100,9,31,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Set orientation'), +(@Morghor*100,9,32,0,0,0,100,0,1000,1000,0,0,1,7,0,0,0,0,0,7,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Talk'), +(@Morghor*100,9,33,0,0,0,100,0,0,0,0,0,5,25,0,0,0,0,0,1,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Play emote'), +(@Morghor*100,9,34,0,0,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Store target'), +(@Morghor*100,9,35,0,0,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@Yarzill,30,0,0,0,0,0,'Overlord Mor''ghor - Action List - Send target'), +(@Morghor*100,9,36,0,0,0,100,0,5000,5000,0,0,45,0,1,0,0,0,0,19,@Yarzill,30,0,0,0,0,0,'Overlord Mor''ghor - Action List - set Data'), +(@Morghor*100,9,37,0,0,0,100,0,2000,2000,0,0,12,23468,8,0,0,0,0,8,0,0,0,-5126.729004, 604.291626, 84.271423, 2.468847,'Overlord Mor''ghor - Action List - Summon'), +(@Morghor*100,9,38,0,0,0,100,0,1000,1000,0,0,85,46598,0,0,0,0,0,19,23468,40,0,0,0,0,0,'Overlord Mor''ghor - Action List - Cast to ride'), +(@Morghor*100,9,39,0,0,0,100,0,3000,3000,0,0,85,41540,0,0,0,0,0,7,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Cast taxi'), +(@Morghor*100,9,40,0,0,0,100,0,10000,10000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5085.000000, 578.656982, 86.648300, 2.368710,'Overlord Mor''ghor - Action List - Go to pos'), +(@Morghor*100,9,41,0,0,0,100,0,9000,9000,0,0,66,0,0,0,0,0,0,8,0,0,0,-5085.000000, 578.656982, 86.648300, 2.368710,'Overlord Mor''ghor - Action List - Set orientation'), +(@Morghor*100,9,42,0,0,0,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Overlord Mor''ghor - Action List - Add npcfla'), +(@Yarzill,0,0,0,38,0,100,0,0,1,0,0,80,@Yarzill*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Yarzill - On Data set (Lord Illidan Stormrage) - ActionList'), +(@Yarzill*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,'Yarzill - Action List - Talk'), +(@Yarzill*100,9,1,0,0,0,100,0,0,0,0,0,28,41528,0,0,0,0,0,12,1,0,0,0,0,0,0,'Yarzill - Action List - remove aura'), +(@Yarzill*100,9,2,0,0,0,100,0,0,0,0,0,28,41519,0,0,0,0,0,12,1,0,0,0,0,0,0,'Yarzill - Action List - remove aura'), +(@Yarzill*100,9,4,0,0,0,100,0,0,0,0,0,15,11108,0,0,0,0,0,12,1,0,0,0,0,0,0,'Yarzill - Action List - AREAEXPLOREDOREVENTHAPPENS'), +(@Illidan,0,0,0,54,0,100,0,0,0,0,0,80,@Illidan*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Illidan - Just summoned - Action List'), +(@Illidan*100,9,0,0,0,0,100,0,300,300,0,0,11,39990,0,0,0,0,0,1,0,0,0,0,0,0,0,'Illidan - Action List - cast'), +(@Illidan*100,9,1,0,0,0,100,0,0,0,0,0,50,185520,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Illidan - Action List - Summon Fel Fire (GO)'), +(23468,0,0,0,27,0,100,0,0,0,0,0,11,50630,0,0,0,0,0,1,0,0,0,0,0,0,0,'Yarzill Dragon - passenger boarded - Eject all passengers'), +(23468,0,1,0,28,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Yarzill Dragon- passenger removed - despawn'); + +DELETE FROM `creature_text` WHERE `entry`IN (@Illidan, @Morghor, @Sinestra2, @Yarzill, @Dragonmaw); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextID`) VALUES +(@Yarzill,0,0,'You will not harm the $g boy:girl;, Mor''ghor! Quickly, $n, climb on my back!',12,0,100,0,0,0, 'Yarzill', 21825), +(@Dragonmaw,0,0,'Who... Who is you?? What you want?',12,0,100,0,0,0, 'Dragonmaw Enforcer', 21300), +(@Dragonmaw,1,0,'Yes... Yes we move now... Please no hurt us...',12,0,100,0,0,0, 'Dragonmaw Enforcer', 21302), +(@Morghor,0,0,'Come, $n. Lord Stormrage awaits.',12,0,100,0,0,0, 'Overlord Mor''ghor', 21798), +(@Morghor,1,0,'Warriors of Dragonmaw, gather ''round! One among you has attained the rank of highlord! Bow your heads in reverence! Show your respect and allegiance to Highlord $n!',14,0,100,0,0,0, 'Overlord Mor''ghor', 21799), +(@Morghor,2,0,'Lord Illidan will be here shortly.',12,0,100,0,0,0, 'Overlord Mor''ghor', 21800), +(@Morghor,3,0,'All hail Lord Illidan!',14,0,100,0,0,0, 'Overlord Mor''ghor', 21802), +(@Morghor,4,0,'Lord Illidan, this is the Dragonmaw that I, and others, have told you about. He will lead us to victory!',12,0,100,0,0,0, 'Overlord Mor''ghor', 21803), +(@Morghor,5,0,'But... My lord, I do not understand. $n... He is the orc that has...',12,0,100,0,0,0, 'Overlord Mor''ghor', 21805), +(@Morghor,6,0,'It will be done, my lord.',12,0,100,0,0,0, 'Overlord Mor''ghor', 21823), +(@Morghor,7,0,'So you thought to make a fool of Mor''ghor, eh? Before you are delivered to Lord Illidan, you will feel pain that you could not know to exist. I will take pleasure in exacting my own vengeance.',12,0,100,0,0,0, 'Overlord Mor''ghor', 21824), + +(@Morghor,8,0,'I will not drag this out any further than it needs, Lady Sinestra. You have bent my ear, now tell me what it is that you want from Dragonmaw.',12,0,100,0,0,0, 'Overlord Mor''ghor', 21307), +(@Morghor,9,0,'The... The master? He lives?',12,0,100,0,0,0, 'Overlord Mor''ghor', 21310), +(@Morghor,10,0,'%s stammers.',16,0,100,0,0,0, 'Overlord Mor''ghor', 21313), +(@Morghor,11,0,'Ye... Yes, yes... Of course. We need only the crystals and ore from this place. There is... We will need mounts.',12,0,100,0,0,0, 'Overlord Mor''ghor', 21314), + +(@Illidan,0,0,'What is the meaning of this, Mor''ghor?',12,0,100,0,0,0, 'Illidan', 21804), +(@Illidan,1,0,'SILENCE!',12,0,100,0,0,0, 'Illidan', 21807), +(@Illidan,2,0,'Blathering idiot. You incomprehensibly incompetent buffoon...',12,0,100,0,0,0, 'Illidan', 21808), +(@Illidan,3,0,'THIS is your hero?',12,0,100,0,0,0, 'Illidan', 21809), +(@Illidan,4,0,'You have been deceived, imbecile.',12,0,100,0,0,0, 'Illidan', 21810), +(@Illidan,5,0,'This... whole... operation... HAS BEEN COMPROMISED!',12,0,100,0,0,0, 'Illidan', 21811), +(@Illidan,6,0,'I expect to see this insect''s carcass in pieces in my lair within the hour. Fail and you will suffer a fate so much worse than death.',12,0,100,0,0,0, 'Illidan', 21812), + +(@Sinestra2,0,0,'Step aside lest I add you as another adornment to my armor. Your leader and I have matters to attend...',12,0,100,0,0,0, 'Sinestra', 21301), +(@Sinestra2,1,0,'$s smiles.',16,0,100,0,0,0, 'Sinestra', 21303), +(@Sinestra2,2,0,'I thought you would see it my way...',12,0,100,0,0,0, 'Sinestra', 21304), +(@Sinestra2,3,0,'Overlord Mor''ghor, I presume... A pleasure to finally make your acquaintance.',12,0,100,0,0,0, 'Sinestra', 21305), +(@Sinestra2,4,0,'I am Lady Sinestra.',12,0,100,0,0,0, 'Sinestra', 21306), +(@Sinestra2,5,0,'You have no doubt heard about Nefarian''s failures on Azeroth... While he has fallen, the experiment continues. My master... He continues the work that his progeny began.',12,0,100,0,0,0, 'Sinestra', 21308), +(@Sinestra2,6,0,'$s nods.',16,0,100,0,0,0, 'Sinestra', 21309), +(@Sinestra2,7,0,'You were once a chief lieutenant, Mor''ghor. Your work in Grim Batol is not easily forgotten.',12,0,100,0,0,0, 'Sinestra', 21311), +(@Sinestra2,8,0,'Now... We need the eggs that you recovered. The Netherwing eggs. They are, after all, a product of the master. We will pay whatever price that you ask.',12,0,100,0,0,0, 'Sinestra', 21312), +(@Sinestra2,9,0,'The master will be most pleased with this news. The Black Dragonflight will provide you all that you ask. You will be allowed to ride upon the backs of our drakes as needed. ',12,0,100,0,0,0, 'Sinestra', 21315), +(@Sinestra2,10,0,'I thank you for your graciousness, Mor''ghor. I must now take my leave.',12,0,100,0,0,0, 'Sinestra', 21316); From 3e2c1b0c00a7744e39c22e8b32d4b5c5dc7ef25a Mon Sep 17 00:00:00 2001 From: Dr-J Date: Mon, 30 Mar 2015 23:10:34 +0100 Subject: [PATCH 12/86] DB/Creature: Sinestra By @Killyana Closes #14467 --- sql/updates/world/2015_03_30_01_world.sql | 70 +++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sql/updates/world/2015_03_30_01_world.sql diff --git a/sql/updates/world/2015_03_30_01_world.sql b/sql/updates/world/2015_03_30_01_world.sql new file mode 100644 index 00000000000..2e62c6cfba3 --- /dev/null +++ b/sql/updates/world/2015_03_30_01_world.sql @@ -0,0 +1,70 @@ +SET @Sinestra1:=23283; +SET @Sinestra2:=23284; + +SET @GUID:=28796; -- 1 free creature guid set by TC +SET @PATH := @Sinestra1*10; +DELETE FROM `creature` WHERE `id` IN (@Sinestra1); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`,`curhealth`) VALUES +(@GUID+0, @Sinestra1, 530, 1, 1, -5240.304199, 682.020081, 157.604004, 5.723090, 900, 151760); + +UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=@GUID; +UPDATE `creature_template` SET `InhabitType`=4, `AIName`='SmartAI', `flags_extra`=0 WHERE `entry`=@Sinestra1; +UPDATE `creature_template` SET `AIName`='SmartAI', `flags_extra`=0 WHERE `entry`=@Sinestra2; +DELETE FROM `creature_addon` WHERE `guid`=@GUID; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@GUID,@PATH,0,33554432,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,-5120.744629, 783.187988, 208.115173,0,0,0,0,100,0), +(@PATH,2,-5331.205078, 712.656494, 180.570953,0,0,0,0,100,0), +(@PATH,3,-5371.597656, 573.186890, 159.434875,0,0,0,0,100,0), +(@PATH,4,-5299.805176, 490.375488, 150.086655,0,0,0,0,100,0), +(@PATH,5,-5207.269043, 478.922729, 150.908600,0,0,0,0,100,0), +(@PATH,6,-5170.645996, 533.437805, 168.776611,0,0,0,0,100,0), +(@PATH,7,-5132.274902, 632.125549, 177.018936,0,0,0,0,100,0); + +DELETE FROM `waypoints` WHERE `entry` IN(@Sinestra1*100); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(@Sinestra1*100, 1, -5163.216309, 645.610779, 77.3899920, 'Lady Sinestra'); + +DELETE FROM `waypoints` WHERE `entry` IN(@Sinestra2*100); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(@Sinestra2*100, 1, -5155.744629, 636.083862, 80.537260, 'Lady Sinestra'), +(@Sinestra2*100, 2, -5130.897949, 609.521179, 83.996864, 'Lady Sinestra'), +(@Sinestra2*100, 3, -5113.644531, 604.067078, 84.993507, 'Lady Sinestra'), +(@Sinestra2*100, 4, -5093.567383, 586.982605, 86.467323, 'Lady Sinestra'), +(@Sinestra2*100, 5, -5113.704590, 604.713928, 85.021675, 'Lady Sinestra'), +(@Sinestra2*100, 6, -5134.045410, 612.111572, 83.530479, 'Lady Sinestra'), +(@Sinestra2*100, 7, -5163.214844, 645.577454, 77.393990, 'Lady Sinestra'); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@Sinestra1, @Sinestra1*100, @Sinestra2, @Sinestra2*100, @Sinestra2*100+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 +(@Sinestra1,0,0,0,1,0,100,0,7200000,7200000,7200000,7200000,53,1,@Sinestra1*100,0,0,0,1,1,0,0,0,0,0,0,0,"Time Watcher - OOC - Start wp"), +(@Sinestra1,0,1,0,58,0,100,0,1,@Sinestra1*100,0,0,80,@Sinestra1*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - On way point ended - action list"), +(@Sinestra1*100,9,0,0,0,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Set visible off"), +(@Sinestra1*100,9,1,0,0,0,100,0,0,0,0,0,12,@Sinestra2,8,0,0,0,0,8,0,0,0,-5163.216309, 645.610779, 77.6899920, 5.328592,"Lady Sinestra - Action list - Spawn"), +(@Sinestra1*100,9,2,0,0,0,100,0,160000,160000,0,0,47,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - St visible on"), +(@Sinestra2,0,0,0,54,0,100,0,0,0,0,0,53,0,@Sinestra2*100,0,0,0,1,1,0,0,0,0,0,0,0,"Lady Sinestra - Just summoned - Start wp"), +(@Sinestra2,0,1,0,40,0,100,0,1,@Sinestra2*100,0,0,80,@Sinestra2*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - On wp1 - Action list"), +(@Sinestra2*100,9,0,0,0,0,100,0,0,0,0,0,54,20000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Pause waypoint"), +(@Sinestra2*100,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,19,23146,20,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100,9,2,0,0,0,100,0,5000,5000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100,9,3,0,0,0,100,0,9000,9000,0,0,1,1,0,0,0,0,0,19,23146,20,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100,9,4,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100,9,5,0,0,0,100,0,2000,2000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2,0,2,0,40,0,100,0,4,@Sinestra2*100,0,0,80,@Sinestra2*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - On wp4 - Action list"), +(@Sinestra2*100+1,9,0,0,0,0,100,0,0,0,0,0,54,65000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Pause waypoint"), +(@Sinestra2*100+1,9,1,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,2,0,0,0,100,0,5000,5000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,3,0,0,0,100,0,4000,4000,0,0,1,8,0,0,0,0,0,19,23139,20,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,4,0,0,0,100,0,9000,9000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,5,0,0,0,100,0,9000,9000,0,0,1,9,0,0,0,0,0,19,23139,20,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,6,0,0,0,100,0,3000,3000,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,7,0,0,0,100,0,3000,3000,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,8,0,0,0,100,0,7000,7000,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,9,0,0,0,100,0,4000,4000,0,0,1,10,0,0,0,0,0,19,23139,20,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,10,0,0,0,100,0,3000,3000,0,0,1,11,0,0,0,0,0,19,23139,20,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,11,0,0,0,100,0,8000,8000,0,0,1,9,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2*100+1,9,12,0,0,0,100,0,8000,8000,0,0,1,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - Action list - Talk"), +(@Sinestra2,0,3,0,58,0,100,0,7,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lady Sinestra - On wp Ended - Despawn"); From 540578b8d2e3e31103acc0e2b0077b8a3c69b641 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Mon, 30 Mar 2015 23:13:52 +0100 Subject: [PATCH 13/86] DB/Misc: Winter Jormungar / snow mound by @Killyana closes #14428 --- sql/updates/world/2015_03_30_02_world.sql | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sql/updates/world/2015_03_30_02_world.sql diff --git a/sql/updates/world/2015_03_30_02_world.sql b/sql/updates/world/2015_03_30_02_world.sql new file mode 100644 index 00000000000..e75ccb04142 --- /dev/null +++ b/sql/updates/world/2015_03_30_02_world.sql @@ -0,0 +1,71 @@ +SET @Triggger:=34146; +SET @Triggger1:=34150; +SET @Triggger2:=34151; +SET @Jormungar:=34137; + +DELETE FROM `vehicle_template_accessory` WHERE `entry` IN (34146, 34151, 34150); +INSERT INTO `vehicle_template_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`)VALUES +(34146,34137,0,0,'Snow Mound',8,0), +(34146,34137,1,0,'Snow Mound',8,0), +(34146,34137,2,0,'Snow Mound',8,0), +(34146,34137,3,0,'Snow Mound',8,0), +(34151,34137,0,0,'Snow Mound',8,0), +(34151,34137,1,0,'Snow Mound',8,0), +(34151,34137,2,0,'Snow Mound',8,0), +(34151,34137,3,0,'Snow Mound',8,0), +(34151,34137,4,0,'Snow Mound',8,0), +(34151,34137,5,0,'Snow Mound',8,0), +(34151,34137,6,0,'Snow Mound',8,0), +(34151,34137,7,0,'Snow Mound',8,0), +(34150,34137,0,0,'Snow Mound',8,0), +(34150,34137,1,0,'Snow Mound',8,0), +(34150,34137,2,0,'Snow Mound',8,0), +(34150,34137,3,0,'Snow Mound',8,0), +(34150,34137,4,0,'Snow Mound',8,0), +(34150,34137,5,0,'Snow Mound',8,0); + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (34146, 34151, 34150); +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(34146, 43671, 1, 0), +(34151, 43671, 1, 0), +(34150, 43671, 1, 0); + +UPDATE `creature_template` SET `flags_extra`= 2, `AIName`='SmartAI' WHERE `entry` IN (34146, 34150, 34151, 34137); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (34146,34150,34151,34137) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (34146*100,34150*100,34151*100) AND `source_type`=9; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (34146*100+1,34150*100+1,34151*100+1, @Jormungar*100) 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 +(34146,0,0,0,10,0,100,1,0,15,1000,1000,80,34146*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - LOS - Action list'), +(34150,0,0,0,10,0,100,1,0,15,1000,1000,80,34150*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - LOS - Action list'), +(34151,0,0,0,10,0,100,1,0,15,1000,1000,80,34151*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - LOS - Action list'), +(34146*100,9,0,0,0,0,100,0,1000,1000,0,0,11,64629,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34146*100,9,1,0,0,0,100,0,4000,4000,0,0,11,64630,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34146*100,9,2,0,0,0,100,0,4000,4000,0,0,11,64631,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34146*100,9,3,0,0,0,100,0,4000,4000,0,0,11,64632,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34146*100,9,4,0,0,0,100,0,2000,2000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Despawn'), +(34150*100,9,0,0,0,0,100,0,1000,1000,0,0,11,64629,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34150*100,9,1,0,0,0,100,0,4000,4000,0,0,11,64630,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34150*100,9,2,0,0,0,100,0,4000,4000,0,0,11,64631,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34150*100,9,3,0,0,0,100,0,4000,4000,0,0,11,64632,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34150*100,9,4,0,0,0,100,0,4000,4000,0,0,11,64633,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34150*100,9,5,0,0,0,100,0,4000,4000,0,0,11,64634,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34150*100,9,6,0,0,0,100,0,2000,2000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Despawn'), +(34151*100,9,0,0,0,0,100,0,1000,1000,0,0,11,64629,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34151*100,9,1,0,0,0,100,0,4000,4000,0,0,11,64630,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34151*100,9,2,0,0,0,100,0,4000,4000,0,0,11,64631,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34151*100,9,3,0,0,0,100,0,4000,4000,0,0,11,64632,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34151*100,9,4,0,0,0,100,0,4000,4000,0,0,11,64633,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34151*100,9,5,0,0,0,100,0,4000,4000,0,0,11,64634,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34151*100,9,6,0,0,0,100,0,4000,4000,0,0,11,64635,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34151*100,9,7,0,0,0,100,0,4000,4000,0,0,11,64636,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Eject Passenger'), +(34151*100,9,8,0,0,0,100,0,2000,2000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Snow Mound - Action list - Despawn'), +(@Jormungar,0,0,0,0,0,100,0,2000,5000,7000,9000,11,64638,0,0,0,0,0,2,0,0,0,0,0,0,0,'Winter Jormungar - IC - Acidic Bite'), +(@Jormungar,0,1,0,23,0,100,1,43671,0,0,0,80,@Jormungar*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Winter Jormungar - On aura remove - Action list'), +(@Jormungar*100,9,1,0,0,0,100,0,1000,1000,0,0,49,0,0,0,0,0,0,21,70,0,0,0,0,0,0,'Winter Jormungar - Action list - Start attack'); + +DELETE FROM `creature_template_addon` WHERE `entry` IN (34146, 34150, 34151); +INSERT INTO `creature_template_addon` (`entry`,`bytes1`,`bytes2`, `emote`, `auras`) VALUES +(@Triggger,0,4097,0,"64615"), +(@Triggger1,0,4097,0,"64615"), +(@Triggger2,0,4097,0,"64615"); From 8fd21c402f939974d220fb1b84beb2088da82cd0 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Tue, 31 Mar 2015 00:32:53 +0100 Subject: [PATCH 14/86] DB/Quest: Unsealed Chest By @Foldor Closes #14416 --- sql/updates/2015_03_30_03_world.sql | 194 ++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 sql/updates/2015_03_30_03_world.sql diff --git a/sql/updates/2015_03_30_03_world.sql b/sql/updates/2015_03_30_03_world.sql new file mode 100644 index 00000000000..5c8497edc05 --- /dev/null +++ b/sql/updates/2015_03_30_03_world.sql @@ -0,0 +1,194 @@ +SET @JAINA := 38606; +SET @MURADIN := 38607; +SET @UTHER := 38608; +SET @SYLVANAS := 38609; +SET @DARION := 37120; +SET @ALEXANDROS := 38610; +SET @JAINAQUEST := 24916; +SET @MURADINQUEST := 24917; +SET @UTHERQUEST := 24919; +SET @SYLVANASQUEST := 24918; +SET @DARIONQUEST := 24915; + +UPDATE `creature_template` SET `gossip_menu_id`=11065, `npcflag`=3, `speed_run`=1, `unit_class`=8, `unit_flags`=33088, `unit_flags2`=2099200, `AIName`='SmartAI' WHERE `entry`=@JAINA; +UPDATE `creature_template` SET `npcflag`=2, `speed_run`=1.714286, `unit_flags`=33600, `AIName`='SmartAI' WHERE `entry`=@MURADIN; +UPDATE `creature_template` SET `npcflag`=2, `unit_class`=2, `unit_flags`=32832, `unit_flags2`=2099200, `AIName`='SmartAI' WHERE `entry`=@UTHER; +UPDATE `creature_template` SET `npcflag`=2, `speed_walk`=0.888888, `speed_run`=0.9920629, `unit_class`=2, `unit_flags`=33088, `unit_flags2`=2099200, `AIName`='SmartAI' WHERE `entry`=@SYLVANAS; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ALEXANDROS; + +UPDATE `quest_template` SET `OfferRewardText`='Impossible...$B$BFather, is it you?!$B$BYou have done me a great service, hero. I offer you the reins of my faithful steed. Do with it as you please, but do not forget those that assisted you in this monumental feat.', `RequestItemsText`='What is that you hold, $c?$B$BIt calls out to me, stirring feelings I thought to be long dead.' WHERE `Id`=@DARIONQUEST; +UPDATE `quest_template` SET `OfferRewardText`='What... how did you manage to come by this!?$B$BYou have done me a great service, hero. My heart could not bear to keep this locket, but I will place an enchantment upon it that you may find useful. Do with it as you please, but do not forget those that assisted you in this monumental feat.', `RequestItemsText`='Yes, $c? How can I assist you?' WHERE `Id`=@JAINAQUEST; +UPDATE `quest_template` SET `OfferRewardText`='Aye. I know this blade... and I will treasure it always - a moment of time that will be lost forever.$B$BYou have done me a great service, hero. I offer you a gift from the Frostborn dwarves. Do with it as you please, but do not forget those that assisted you in this monumental feat.', `RequestItemsText`='Whatdya got there, $r?' WHERE `Id`=@MURADINQUEST; +UPDATE `quest_template` SET `OfferRewardText`='$B$BYou have done me a great service, hero. I offer you the boon of the Banshee Queen. Do with it as you please, but do not forget those that assisted you in this monumental feat.', `RequestItemsText`='What is it, $r?' WHERE `Id`=@SYLVANASQUEST; +UPDATE `quest_template` SET `OfferRewardText`='$B$BArthas'' medal.$B$BI remember well the day I presented it to him...$B$BYou have done me a great service, hero. My soul may now rest in peace. I offer you a memory lost in time. Do with it as you please, but do not forget those that assisted you in this monumental feat.', `RequestItemsText`='How may I be of service, $r?' WHERE `Id`=@UTHERQUEST; + +UPDATE `creature_queststarter` SET `id`=@JAINA WHERE `id`=37120 AND `quest`=24916; +UPDATE `creature_queststarter` SET `id`=@MURADIN WHERE `id`=37120 AND `quest`=24917; +UPDATE `creature_queststarter` SET `id`=@UTHER WHERE `id`=37120 AND `quest`=24919; +UPDATE `creature_queststarter` SET `id`=@SYLVANAS WHERE `id`=37120 AND `quest`=24918; + +UPDATE `creature_questender` SET `id`=@JAINA WHERE `id`=37120 AND `quest`=24916; +UPDATE `creature_questender` SET `id`=@MURADIN WHERE `id`=37120 AND `quest`=24917; +UPDATE `creature_questender` SET `id`=@UTHER WHERE `id`=37120 AND `quest`=24919; +UPDATE `creature_questender` SET `id`=@SYLVANAS WHERE `id`=37120 AND `quest`=24918; + +DELETE FROM `spell_target_position` WHERE `ID`=72468; +INSERT INTO `spell_target_position` (`id`, `effIndex`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`, `VerifiedBuild`) VALUES +(72468, 0, 631, -66.8684, 2158.28, 30.73743, 3.893452, 17658); + +DELETE FROM `gossip_menu` WHERE `entry`=11065 AND `text_id`=15382; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(11065, 15382); + +DELETE FROM `npc_text` WHERE `ID`=15382; +INSERT INTO `npc_text` (`ID`, `text0_1`, `BroadcastTextID0`, `prob0`, `text1_1`, `BroadcastTextID1`, `prob1`, `VerifiedBuild`) VALUES +(15382, 'He''s truly gone, isn''t he?$b$bI... I can feel it.', 38510, 1, 'Was there truly no way to save him?$b$bI fear I shall always wonder.', 38511, 1, 19342); + +DELETE FROM `creature_text` WHERE `entry` IN (@JAINA,@MURADIN,@UTHER,@SYLVANAS,@ALEXANDROS); +DELETE FROM `creature_text` WHERE `entry`=@DARION AND `groupid` IN (4,5,6); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(@JAINA, 0, 0, 'What''s this!?', 12, 0, 100, 5, 0, 17383, 38201, 'Lady Jaina Proudmoore to Player'), +(@JAINA, 1, 0, 'He... he kept it? All this time, he kept it!?', 12, 0, 100, 5, 0, 17384, 38202, 'Lady Jaina Proudmoore'), +(@JAINA, 2, 0, 'I knew! ', 12, 0, 100, 5, 0, 17385, 38203, 'Lady Jaina Proudmoore'), +(@JAINA, 3, 0, 'I sensed a part of him still alive! Trapped... struggling... Oh, Arthas!', 12, 0, 100, 396, 0, 17386, 38204, 'Lady Jaina Proudmoore'), +(@JAINA, 4, 0, 'Perhaps - perhaps he might someday remember what he once was.', 12, 0, 100, 396, 0, 17387, 38205, 'Lady Jaina Proudmoore'), +(@JAINA, 5, 0, 'By the Light, may he at last find rest, free from the icy grip of that terrible blade.', 12, 0, 100, 396, 0, 17388, 38206, 'Lady Jaina Proudmoore'), +(@MURADIN, 0, 0, 'Oh, lad...', 12, 0, 100, 396, 0, 17421, 38171, 'Muradin Bronzebeard'), +(@MURADIN, 1, 0, 'How I miss those endless days in Lordaeron...', 12, 0, 100, 396, 0, 17422, 38172, 'Muradin Bronzebeard'), +(@MURADIN, 2, 0, '...sharpenin'' yer skill with this dull blade...', 12, 0, 100, 396, 0, 17423, 38173, 'Muradin Bronzebeard'), +(@MURADIN, 3, 0, '...forgin'' ya into a weapon meant to withstand the demands of a great destiny.', 12, 0, 100, 396, 0, 17424, 38174, 'Muradin Bronzebeard'), +(@MURADIN, 4, 0, 'Heh... Yeh sure put them skills ta use, didn''t yeh, lad?', 12, 0, 100, 6, 0, 17425, 38175, 'Muradin Bronzebeard'), +(@MURADIN, 5, 0, 'If only I''da been able ta stop yeh that day, how different things mighta been.', 12, 0, 100, 396, 0, 17426, 38176, 'Muradin Bronzebeard'), +(@MURADIN, 6, 0, 'If only I''da never discovered that accursed blade...', 12, 0, 100, 396, 0, 17427, 38177, 'Muradin Bronzebeard'), +(@MURADIN, 7, 0, 'Farewell, Arthas... my brother.', 12, 0, 100, 396, 0, 17428, 38178, 'Muradin Bronzebeard'), +(@UTHER, 0, 0, 'Arthas...', 12, 0, 100, 396, 0, 17402, 38160, 'Uther the Lightbringer'), +(@UTHER, 1, 0, 'Alas, hero of Azeroth, you give me a greater gift than you know.', 12, 0, 100, 396, 0, 17403, 38161, 'Uther the Lightbringer'), +(@UTHER, 2, 0, 'Long have I struggled to forgive the prince for his terrible transgressions.', 12, 0, 100, 396, 0, 17404, 38162, 'Uther the Lightbringer'), +(@UTHER, 3, 0, 'My soul has been wracked with unbearable anxiety, dark thoughts... distancing me from the Light.', 12, 0, 100, 396, 0, 17405, 38163, 'Uther the Lightbringer'), +(@UTHER, 4, 0, 'I recall clearly the gleam of pride in his eye as he stood before me, eager to defeat the enemies of the Light...', 12, 0, 100, 396, 0, 17406, 38165, 'Uther the Lightbringer'), +(@UTHER, 5, 0, 'Eager to defend his people, no matter the cost.', 12, 0, 100, 396, 0, 17407, 38166, 'Uther the Lightbringer'), +(@UTHER, 6, 0, 'It is this memory of Arthas that I choose to keep in my heart.', 12, 0, 100, 396, 0, 17408, 38167, 'Uther the Lightbringer'), +(@UTHER, 7, 0, 'I shall always be in your debt, friend.', 12, 0, 100, 396, 0, 17409, 38168, 'Uther the Lightbringer'), +(@UTHER, 8, 0, 'Thank you.', 12, 0, 100, 0, 0, 17410, 38169, 'Uther the Lightbringer'), +(@SYLVANAS, 0, 0, 'So, it is done.', 12, 0, 100, 396, 0, 17376, 38179, 'Lady Sylvanas Windrunner'), +(@SYLVANAS, 1, 0, 'I had not dared to trust my senses - too many times has the Lich King made me to be a fool.', 12, 0, 100, 396, 0, 17377, 38180, 'Lady Sylvanas Windrunner'), +(@SYLVANAS, 2, 0, 'Finally, he has been made to pay for the atrocities he imposed upon my people.', 12, 0, 100, 396, 0, 17378, 38181, 'Lady Sylvanas Windrunner'), +(@SYLVANAS, 3, 0, 'May Azeroth never fail to remember the terrible price we paid for our weakness... for our pride.', 12, 0, 100, 396, 0, 17379, 38183, 'Lady Sylvanas Windrunner'), +(@SYLVANAS, 4, 0, 'But what now, hero? What of those freed from his grasp, but still shackled to their mortal coils?', 12, 0, 100, 6, 0, 17380, 38184, 'Lady Sylvanas Windrunner'), +(@SYLVANAS, 5, 0, 'Leave me. ', 12, 0, 100, 396, 0, 17381, 38185, 'Lady Sylvanas Windrunner'), +(@SYLVANAS, 6, 0, 'I have much to ponder.', 12, 0, 100, 396, 0, 17382, 38186, 'Lady Sylvanas Windrunner'), +(@ALEXANDROS, 0, 0, 'Darion, my son.', 12, 0, 100, 396, 0, 17414, 38152, 'Highlord Alexandros Mograine'), +(@ALEXANDROS, 1, 0, 'At last, I am able to lay my eyes upon you again.', 12, 0, 100, 396, 0, 17415, 38153, 'Highlord Alexandros Mograine'), +(@ALEXANDROS, 2, 0, 'The Lich King tormented me without end, Darion.', 12, 0, 100, 396, 0, 17416, 38154, 'Highlord Alexandros Mograine'), +(@ALEXANDROS, 3, 0, 'Endlessly, he sought to break my will, to force me to serve him, to bind me to his blade...', 12, 0, 100, 396, 0, 17417, 38155, 'Highlord Alexandros Mograine'), +(@ALEXANDROS, 4, 0, 'Finally, when events demanded his full attention, he left me.', 12, 0, 100, 396, 0, 17418, 38156, 'Highlord Alexandros Mograine'), +(@ALEXANDROS, 5, 0, 'The one memory, I clung to, Darion... The one thought that kept me from giving in...', 12, 0, 100, 396, 0, 17419, 38157, 'Highlord Alexandros Mograine'), +(@ALEXANDROS, 6, 0, 'It was your sacrifice, my son, that again saved me from eternal peril.', 12, 0, 100, 396, 0, 17420, 38158, 'Highlord Alexandros Mograine'), +(@DARION, 4, 0, 'Father...', 12, 0, 100, 396, 0, 17411, 38143, 'Highlord Darion Mograine'), +(@DARION, 5, 0, 'Father. I feared for your... your sanity.', 12, 0, 100, 396, 0, 17412, 38150, 'Highlord Darion Mograine'), +(@DARION, 6, 0, 'Father... For you, I would give my life a thousand times.', 12, 0, 100, 396, 0, 17413, 38151, 'Highlord Darion Mograine'); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@JAINA, @JAINA*100, @MURADIN, @MURADIN*100, @UTHER, @UTHER*100, @SYLVANAS, @SYLVANAS*100, @DARION*100+1, @ALEXANDROS) AND `source_type` IN (0,9); +DELETE FROM `smart_scripts` WHERE `entryorguid`=@DARION AND `id`=7; +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 +(@JAINA, 0, 0, 0, 20, 0, 100, 0, @JAINAQUEST, 0, 0, 0, 80, @JAINA*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Quest ''Jaina''s Locket'' Finished - Run Script'), +(@JAINA*100, 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, 'Lady Jaina Proudmoore - On Script - Remove NPC Flags'), +(@JAINA*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @MURADIN, 0, 10, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Remove NPC Flags'), +(@JAINA*100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @UTHER, 0, 10, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Remove NPC Flags'), +(@JAINA*100, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @SYLVANAS, 0, 10, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Remove NPC Flags'), +(@JAINA*100, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @DARION, 0, 10, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Remove NPC Flags'), +(@JAINA*100, 9, 5, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Say Line 0'), +(@JAINA*100, 9, 6, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Say Line 1'), +(@JAINA*100, 9, 7, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Say Line 2'), +(@JAINA*100, 9, 8, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Say Line 3'), +(@JAINA*100, 9, 9, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Say Line 4'), +(@JAINA*100, 9, 10, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Say Line 5'), +(@JAINA*100, 9, 11, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Restore NPC Flags'), +(@JAINA*100, 9, 12, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @MURADIN, 0, 10, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Restore NPC Flags'), +(@JAINA*100, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @UTHER, 0, 10, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Restore NPC Flags'), +(@JAINA*100, 9, 14, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @SYLVANAS, 0, 10, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Restore NPC Flags'), +(@JAINA*100, 9, 15, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 9, @DARION, 0, 10, 0, 0, 0, 0, 'Lady Jaina Proudmoore - On Script - Restore NPC Flags'), +(@MURADIN, 0, 0, 0, 20, 0, 100, 0, @MURADINQUEST, 0, 0, 0, 80, @MURADIN*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muradin Bronzebeard - On Quest ''Muradin''s Lament'' Finished - Run Script'), +(@MURADIN*100, 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, 'Muradin Bronzebeard - On Script - Remove NPC Flags'), +(@MURADIN*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @JAINA, 0, 10, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Remove NPC Flags'), +(@MURADIN*100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @UTHER, 0, 10, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Remove NPC Flags'), +(@MURADIN*100, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @SYLVANAS, 0, 10, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Remove NPC Flags'), +(@MURADIN*100, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @DARION, 0, 10, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Remove NPC Flags'), +(@MURADIN*100, 9, 5, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Say Line 0'), +(@MURADIN*100, 9, 6, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Say Line 1'), +(@MURADIN*100, 9, 7, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Say Line 2'), +(@MURADIN*100, 9, 8, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Say Line 3'), +(@MURADIN*100, 9, 9, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Say Line 4'), +(@MURADIN*100, 9, 10, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Say Line 5'), +(@MURADIN*100, 9, 11, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Say Line 6'), +(@MURADIN*100, 9, 12, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Say Line 7'), +(@MURADIN*100, 9, 13, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 81, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Restore NPC Flags'), +(@MURADIN*100, 9, 14, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 9, @JAINA, 0, 10, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Restore NPC Flags'), +(@MURADIN*100, 9, 15, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @UTHER, 0, 10, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Restore NPC Flags'), +(@MURADIN*100, 9, 16, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @SYLVANAS, 0, 10, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Restore NPC Flags'), +(@MURADIN*100, 9, 17, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 9, @DARION, 0, 10, 0, 0, 0, 0, 'Muradin Bronzebeard - On Script - Restore NPC Flags'), +(@UTHER, 0, 0, 0, 20, 0, 100, 0, @UTHERQUEST, 0, 0, 0, 80, @UTHER*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Quest ''The Lightbringer''s Redemption'' Finished - Run Script'), +(@UTHER*100, 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, 'Uther the Lightbringer - On Script - Remove NPC Flags'), +(@UTHER*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @JAINA, 0, 10, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Remove NPC Flags'), +(@UTHER*100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @MURADIN, 0, 10, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Remove NPC Flags'), +(@UTHER*100, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @SYLVANAS, 0, 10, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Remove NPC Flags'), +(@UTHER*100, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @DARION, 0, 10, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Remove NPC Flags'), +(@UTHER*100, 9, 5, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Say Line 0'), +(@UTHER*100, 9, 6, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Say Line 1'), +(@UTHER*100, 9, 7, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Say Line 2'), +(@UTHER*100, 9, 8, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Say Line 3'), +(@UTHER*100, 9, 9, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Say Line 4'), +(@UTHER*100, 9, 10, 0, 0, 0, 100, 0, 11000, 11000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Say Line 5'), +(@UTHER*100, 9, 11, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Say Line 6'), +(@UTHER*100, 9, 12, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Say Line 7'), +(@UTHER*100, 9, 13, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Say Line 8'), +(@UTHER*100, 9, 14, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 81, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Restore NPC Flags'), +(@UTHER*100, 9, 15, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 9, @JAINA, 0, 10, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Restore NPC Flags'), +(@UTHER*100, 9, 16, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @MURADIN, 0, 10, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Restore NPC Flags'), +(@UTHER*100, 9, 17, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @SYLVANAS, 0, 10, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Restore NPC Flags'), +(@UTHER*100, 9, 18, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 9, @DARION, 0, 10, 0, 0, 0, 0, 'Uther the Lightbringer - On Script - Restore NPC Flags'), +(@SYLVANAS, 0, 0, 0, 20, 0, 100, 0, @SYLVANASQUEST, 0, 0, 0, 80, @SYLVANAS*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Quest ''Sylvanas'' Vengeance'' Finished - Run Script'), +(@SYLVANAS*100, 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, 'Lady Sylvanas Windrunner - On Script - Remove NPC Flags'), +(@SYLVANAS*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @JAINA, 0, 10, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Remove NPC Flags'), +(@SYLVANAS*100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @MURADIN, 0, 10, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Remove NPC Flags'), +(@SYLVANAS*100, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @UTHER, 0, 10, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Remove NPC Flags'), +(@SYLVANAS*100, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @DARION, 0, 10, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Remove NPC Flags'), +(@SYLVANAS*100, 9, 5, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Say Line 0'), +(@SYLVANAS*100, 9, 6, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Say Line 1'), +(@SYLVANAS*100, 9, 7, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Say Line 2'), +(@SYLVANAS*100, 9, 8, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Say Line 3'), +(@SYLVANAS*100, 9, 9, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Say Line 4'), +(@SYLVANAS*100, 9, 10, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Say Line 5'), +(@SYLVANAS*100, 9, 11, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Say Line 6'), +(@SYLVANAS*100, 9, 12, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 81, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Restore NPC Flags'), +(@SYLVANAS*100, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 9, @JAINA, 0, 10, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Restore NPC Flags'), +(@SYLVANAS*100, 9, 14, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @MURADIN, 0, 10, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Restore NPC Flags'), +(@SYLVANAS*100, 9, 15, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @UTHER, 0, 10, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Restore NPC Flags'), +(@SYLVANAS*100, 9, 16, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 9, @DARION, 0, 10, 0, 0, 0, 0, 'Lady Sylvanas Windrunner - On Script - Restore NPC Flags'), +(@DARION, 0, 7, 0, 20, 0, 100, 0, @DARIONQUEST, 0, 0, 0, 80, @DARION*100+1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - On Quest ''Mograine''s Reunion'' Finished - Run Script'), +(@DARION*100+1, 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, 'Highlord Darion Mograine - On Script - Remove NPC Flags'), +(@DARION*100+1, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @JAINA, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Remove NPC Flags'), +(@DARION*100+1, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @MURADIN, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Remove NPC Flags'), +(@DARION*100+1, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @UTHER, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Remove NPC Flags'), +(@DARION*100+1, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 9, @SYLVANAS, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Remove NPC Flags'), +(@DARION*100+1, 9, 5, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 5, 432, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Play Emote 432'), +(@DARION*100+1, 9, 6, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 72468, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Cast ''Summon Alexandros'''), +(@DARION*100+1, 9, 7, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, @ALEXANDROS, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Set Orientation Closest Creature ''Highlord Alexandros Mograine'''), +(@DARION*100+1, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Say Line 4'), +(@DARION*100+1, 9, 9, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 9, @ALEXANDROS, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Say Line 0'), +(@DARION*100+1, 9, 10, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 9, @ALEXANDROS, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Say Line 1'), +(@DARION*100+1, 9, 11, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Say Line 5'), +(@DARION*100+1, 9, 12, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 9, @ALEXANDROS, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Say Line 2'), +(@DARION*100+1, 9, 13, 0, 0, 0, 100, 0, 11000, 11000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 9, @ALEXANDROS, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Say Line 3'), +(@DARION*100+1, 9, 14, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 9, @ALEXANDROS, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Say Line 4'), +(@DARION*100+1, 9, 15, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 9, @ALEXANDROS, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Say Line 5'), +(@DARION*100+1, 9, 16, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 9, @ALEXANDROS, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Say Line 6'), +(@DARION*100+1, 9, 17, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Say Line 6'), +(@DARION*100+1, 9, 18, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Set Orientation Home Position'), +(@DARION*100+1, 9, 19, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, @ALEXANDROS, 10, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Despawn Highlord Alexandros'), +(@DARION*100+1, 9, 20, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Restore NPC Flags'), +(@DARION*100+1, 9, 21, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 9, @JAINA, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Restore NPC Flags'), +(@DARION*100+1, 9, 22, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @MURADIN, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Restore NPC Flags'), +(@DARION*100+1, 9, 23, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @UTHER, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Restore NPC Flags'), +(@DARION*100+1, 9, 24, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 2, 0, 0, 0, 0, 0, 9, @SYLVANAS, 0, 10, 0, 0, 0, 0, 'Highlord Darion Mograine - On Script - Restore NPC Flags'), +(@ALEXANDROS, 0, 0, 0, 1, 0, 100, 1, 0, 0, 0, 0, 11, 72469, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Highlord Alexandros Mograine - Out of Combat - Cast ''Alexandros Spawn'''); From 8bbe0114ddbc8ea8a70ee8b8c0baeb6d6fc4bd12 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Tue, 31 Mar 2015 10:54:23 +0200 Subject: [PATCH 15/86] Rename sql/updates/2015_03_30_03_world.sql to sql/updates/world/2015_03_30_03_world.sql --- sql/updates/{ => world}/2015_03_30_03_world.sql | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql/updates/{ => world}/2015_03_30_03_world.sql (100%) diff --git a/sql/updates/2015_03_30_03_world.sql b/sql/updates/world/2015_03_30_03_world.sql similarity index 100% rename from sql/updates/2015_03_30_03_world.sql rename to sql/updates/world/2015_03_30_03_world.sql From 8a54cc043b018ff8f3c849a48d347862cd03f3fc Mon Sep 17 00:00:00 2001 From: Aokromes Date: Wed, 1 Apr 2015 05:30:08 +0200 Subject: [PATCH 16/86] DB/Quest: Thirst Unending as DK By Killyana, closes #10389 --- sql/updates/world/2015_04_01_00_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2015_04_01_00_world.sql diff --git a/sql/updates/world/2015_04_01_00_world.sql b/sql/updates/world/2015_04_01_00_world.sql new file mode 100644 index 00000000000..68d43c08415 --- /dev/null +++ b/sql/updates/world/2015_04_01_00_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=15274 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 +(15274, 0, 2, 0, 8, 0, 100, 1, 50613, 0, 0, 0, 11, 61314, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Mana Wyrm - On Spellhit Arcane Torrent - Quest Credit'); From 5f803991b7e02dc7811516dcd947b61e50610119 Mon Sep 17 00:00:00 2001 From: Kittnz Date: Wed, 1 Apr 2015 18:45:23 +0200 Subject: [PATCH 17/86] DB/Waypoint: Add missing paths for Silvermoon Guardians Closes #14484 --- sql/updates/world/2015_04_01_01_world.sql | 376 ++++++++++++++++++++++ 1 file changed, 376 insertions(+) create mode 100644 sql/updates/world/2015_04_01_01_world.sql diff --git a/sql/updates/world/2015_04_01_01_world.sql b/sql/updates/world/2015_04_01_01_world.sql new file mode 100644 index 00000000000..b53c739e2dd --- /dev/null +++ b/sql/updates/world/2015_04_01_01_world.sql @@ -0,0 +1,376 @@ +-- Pathing for Silvermoon City Guardian Entry: 16222 'TDB FORMAT' +SET @NPC := 56892; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=9797.032,`position_y`=-7418.94,`position_z`=14.02596 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,9797.032,-7418.94,14.02596,0,0,0,0,100,0), -- 20:03:32 +(@PATH,2,9795.906,-7402.565,13.77626,0,0,0,0,100,0), -- 20:03:42 +(@PATH,3,9795.656,-7400.315,13.77626,0,0,0,0,100,0), -- 20:03:42 +(@PATH,4,9790.018,-7397.717,14.59705,0,0,0,0,100,0), -- 20:03:50 +(@PATH,5,9788.768,-7397.717,14.84705,0,0,0,0,100,0), -- 20:03:50 +(@PATH,6,9775.768,-7396.717,14.84705,0,0,0,0,100,0), -- 20:03:50 +(@PATH,7,9770.018,-7396.217,14.84705,0,0,0,0,100,0), -- 20:03:50 +(@PATH,8,9767.188,-7400.526,14.03701,0,0,0,0,100,0), -- 20:04:01 +(@PATH,9,9767.188,-7402.276,14.03701,0,0,0,0,100,0), -- 20:04:01 +(@PATH,10,9765.688,-7412.526,13.78701,0,0,0,0,100,0), -- 20:04:01 +(@PATH,11,9758.99,-7418.586,13.32115,0,0,0,0,100,0), -- 20:04:10 +(@PATH,12,9713.854,-7426.193,13.51967,0,0,0,0,100,0), -- 20:04:24 +(@PATH,13,9707.104,-7429.193,13.51967,0,0,0,0,100,0), -- 20:04:24 +(@PATH,14,9700.104,-7432.693,13.51967,0,0,0,0,100,0), -- 20:04:24 +(@PATH,15,9687.424,-7434.536,13.54329,0,0,0,0,100,0), -- 20:04:39 +(@PATH,16,9650.786,-7425.012,13.54389,0,0,0,0,100,0), -- 20:04:50 +(@PATH,17,9611.484,-7423.664,13.54949,0,0,0,0,100,0), -- 20:04:59 +(@PATH,18,9602.561,-7429.987,13.43456,0,0,0,0,100,0), -- 20:05:15 +(@PATH,19,9602.061,-7430.737,13.93456,0,0,0,0,100,0), -- 20:05:15 +(@PATH,20,9600.311,-7432.487,13.68456,0,0,0,0,100,0), -- 20:05:15 +(@PATH,21,9578.125,-7435.431,15.78367,0,0,0,0,100,0), -- 20:05:23 +(@PATH,22,9573.875,-7434.931,15.78367,0,0,0,0,100,0), -- 20:05:23 +(@PATH,23,9570.875,-7434.681,15.78367,0,0,0,0,100,0), -- 20:05:23 +(@PATH,24,9561.199,-7425.627,17.48535,0,0,0,0,100,0), -- 20:05:36 +(@PATH,25,9560.949,-7424.377,17.98535,0,0,0,0,100,0), -- 20:05:36 +(@PATH,26,9560.449,-7422.627,18.73535,0,0,0,0,100,0), -- 20:05:36 +(@PATH,27,9560.199,-7420.877,19.48535,0,0,0,0,100,0), -- 20:05:36 +(@PATH,28,9562.604,-7417.716,19.62811,0,0,0,0,100,0), -- 20:05:42 +(@PATH,29,9564.242,-7407.687,19.65438,0,0,0,0,100,0), -- 20:05:44 +(@PATH,30,9564.242,-7403.187,17.15438,0,0,0,0,100,0), -- 20:05:44 +(@PATH,31,9555.359,-7396.585,17.08825,0,0,0,0,100,0), -- 20:05:52 +(@PATH,32,9547.609,-7396.585,17.08825,0,0,0,0,100,0), -- 20:05:52 +(@PATH,33,9539.609,-7396.835,17.08825,0,0,0,0,100,0), -- 20:05:52 +(@PATH,34,9538.109,-7396.835,17.08825,0,0,0,0,100,0), -- 20:05:52 +(@PATH,35,9536.859,-7396.835,17.08825,0,0,0,0,100,0), -- 20:05:52 +(@PATH,36,9534.359,-7396.835,17.08825,0,0,0,0,100,0), -- 20:05:52 +(@PATH,37,9530.609,-7397.085,17.08825,0,0,0,0,100,0), -- 20:05:52 +(@PATH,38,9528.309,-7396.823,17.08099,0,0,0,0,100,0), -- 20:06:06 +(@PATH,39,9515.559,-7396.823,15.08099,0,0,0,0,100,0), -- 20:06:06 +(@PATH,40,9508.986,-7383.027,14.37308,0,0,0,0,100,0), -- 20:06:15 +(@PATH,41,9507.986,-7368.527,14.37308,0,0,0,0,100,0), -- 20:06:15 +(@PATH,42,9509.079,-7334.869,14.47609,0,0,0,0,100,0), -- 20:06:29 +(@PATH,43,9509.329,-7333.369,14.47609,0,0,0,0,100,0), -- 20:06:29 +(@PATH,44,9509.329,-7332.369,14.47609,0,0,0,0,100,0), -- 20:06:29 +(@PATH,45,9509.579,-7330.119,14.47609,0,0,0,0,100,0), -- 20:06:29 +(@PATH,46,9509.579,-7329.119,14.22609,0,0,0,0,100,0), -- 20:06:29 +(@PATH,47,9510.201,-7311.316,14.32034,0,0,0,0,100,0), -- 20:06:45 +(@PATH,48,9510.201,-7306.066,14.32034,0,0,0,0,100,0), -- 20:06:45 +(@PATH,49,9510.451,-7298.816,14.32034,0,0,0,0,100,0), -- 20:06:45 +(@PATH,50,9510.451,-7293.316,14.07034,0,0,0,0,100,0), -- 20:06:45 +(@PATH,51,9510.329,-7300.647,14.09887,0,0,0,0,100,0), -- 20:06:54 +(@PATH,52,9510.372,-7292.951,14.05711,0,0,0,0,100,0), -- 20:10:02 +(@PATH,53,9515.844,-7278.31,14.22743,0,0,0,0,100,0), -- 20:10:09 +(@PATH,54,9526.344,-7277.31,13.97743,0,0,0,0,100,0), -- 20:10:09 +(@PATH,55,9537.094,-7276.31,14.22743,0,0,0,0,100,0), -- 20:10:09 +(@PATH,56,9555.932,-7274.813,14.1918,0,0,0,0,100,0), -- 20:10:27 +(@PATH,57,9620.014,-7275.292,14.19181,0,0,0,0,100,0), -- 20:10:43 +(@PATH,58,9664.584,-7274.804,13.9807,0,0,0,0,100,0), -- 20:11:00 +(@PATH,59,9667.084,-7274.804,14.2307,0,0,0,0,100,0), -- 20:11:00 +(@PATH,60,9676.5,-7289.921,13.96391,0,0,0,0,100,0), -- 20:11:16 +(@PATH,61,9676.75,-7291.921,14.21391,0,0,0,0,100,0), -- 20:11:16 +(@PATH,62,9682.359,-7296.356,14.19385,0,0,0,0,100,0), -- 20:11:25 +(@PATH,63,9693.359,-7297.106,14.44385,0,0,0,0,100,0), -- 20:11:25 +(@PATH,64,9695.359,-7297.106,14.44385,0,0,0,0,100,0), -- 20:11:25 +(@PATH,65,9698.109,-7297.356,14.69385,0,0,0,0,100,0), -- 20:11:25 +(@PATH,66,9699.902,-7303.835,15.57155,0,0,0,0,100,0), -- 20:11:34 +(@PATH,67,9699.902,-7308.335,15.32155,0,0,0,0,100,0), -- 20:11:34 +(@PATH,68,9695.211,-7310.05,14.5845,0,0,0,0,100,0), -- 20:11:39 +(@PATH,69,9693.211,-7310.3,14.5845,0,0,0,0,100,0), -- 20:11:39 +(@PATH,70,9682.211,-7310.8,14.3345,0,0,0,0,100,0), -- 20:11:39 +(@PATH,71,9676.809,-7317.146,14.0487,0,0,0,0,100,0), -- 20:11:48 +(@PATH,72,9676.059,-7328.396,13.7987,0,0,0,0,100,0), -- 20:11:48 +(@PATH,73,9675.559,-7335.146,12.5487,0,0,0,0,100,0), -- 20:11:48 +(@PATH,74,9675.311,-7342.5,12.11859,0,0,0,0,100,0), -- 20:11:59 +(@PATH,75,9675.311,-7345.75,12.11859,0,0,0,0,100,0), -- 20:11:59 +(@PATH,76,9675.311,-7347.5,12.11859,0,0,0,0,100,0), -- 20:11:59 +(@PATH,77,9675.311,-7348.5,12.11859,0,0,0,0,100,0), -- 20:11:59 +(@PATH,78,9669.002,-7356.422,12.18507,0,0,0,0,100,0), -- 20:12:06 +(@PATH,79,9668.814,-7361.282,12.18596,0,0,0,0,100,0), -- 20:12:10 +(@PATH,80,9668.77,-7364.439,12.18267,0,0,0,0,100,0), -- 20:12:12 +(@PATH,81,9690.079,-7381.311,12.09861,0,0,0,0,100,0), -- 20:12:22 +(@PATH,82,9687.182,-7384.319,11.74371,0,0,0,0,100,0), -- 20:12:24 +(@PATH,83,9686.182,-7384.319,11.74371,0,0,0,0,100,0), -- 20:12:24 +(@PATH,84,9683.373,-7392.788,12.14598,0,0,0,0,100,0), -- 20:12:28 +(@PATH,85,9683.373,-7394.288,12.14598,0,0,0,0,100,0), -- 20:12:28 +(@PATH,86,9682.873,-7403.288,11.89598,0,0,0,0,100,0), -- 20:12:28 +(@PATH,87,9682.623,-7408.288,11.89598,0,0,0,0,100,0), -- 20:12:28 +(@PATH,88,9682.373,-7411.788,11.89598,0,0,0,0,100,0), -- 20:12:28 +(@PATH,89,9682.123,-7420.038,13.89598,0,0,0,0,100,0), -- 20:12:28 +(@PATH,90,9681.873,-7421.538,13.89598,0,0,0,0,100,0), -- 20:12:28 +(@PATH,91,9682.331,-7411.838,12.38935,0,0,0,0,100,0), -- 20:12:44 +(@PATH,92,9682.581,-7408.338,11.88935,0,0,0,0,100,0), -- 20:12:44 +(@PATH,93,9682.581,-7403.338,12.13935,0,0,0,0,100,0), -- 20:12:44 +(@PATH,94,9683.081,-7394.338,12.13935,0,0,0,0,100,0), -- 20:12:44 +(@PATH,95,9683.081,-7392.838,12.13935,0,0,0,0,100,0), -- 20:12:44 +(@PATH,96,9683.331,-7390.088,12.13935,0,0,0,0,100,0), -- 20:12:44 +(@PATH,97,9687.128,-7384.611,11.93381,0,0,0,0,100,0), -- 20:12:58 +(@PATH,98,9689.84,-7379.5,12.07366,0,0,0,0,100,0), -- 20:13:02 +(@PATH,99,9689.515,-7378.112,12.14712,0,0,0,0,100,0), -- 20:13:04 +(@PATH,100,9668.722,-7361.385,12.18551,0,0,0,0,100,0), -- 20:13:14 +(@PATH,101,9668.566,-7356.804,12.18437,0,0,0,0,100,0), -- 20:13:18 +(@PATH,102,9675.295,-7347.331,12.04761,0,0,0,0,100,0), -- 20:13:20 +(@PATH,103,9675.295,-7346.081,12.04761,0,0,0,0,100,0), -- 20:13:20 +(@PATH,104,9675.045,-7342.581,12.04761,0,0,0,0,100,0), -- 20:13:20 +(@PATH,105,9675.82,-7328.544,13.847,0,0,0,0,100,0), -- 20:13:27 +(@PATH,106,9676.07,-7317.294,14.097,0,0,0,0,100,0), -- 20:13:27 +(@PATH,107,9676.32,-7315.294,14.097,0,0,0,0,100,0), -- 20:13:27 +(@PATH,108,9693.324,-7310.449,14.44139,0,0,0,0,100,0), -- 20:13:38 +(@PATH,109,9695.074,-7310.449,14.44139,0,0,0,0,100,0), -- 20:13:38 +(@PATH,110,9697.824,-7310.199,14.69139,0,0,0,0,100,0), -- 20:13:38 +(@PATH,111,9699.779,-7303.936,15.51412,0,0,0,0,100,0), -- 20:13:48 +(@PATH,112,9700.029,-7299.436,15.51412,0,0,0,0,100,0), -- 20:13:48 +(@PATH,113,9698.18,-7297.467,15.08991,0,0,0,0,100,0), -- 20:13:53 +(@PATH,114,9695.18,-7297.467,14.58991,0,0,0,0,100,0), -- 20:13:53 +(@PATH,115,9693.43,-7297.217,14.58991,0,0,0,0,100,0), -- 20:13:53 +(@PATH,116,9682.43,-7296.467,14.33991,0,0,0,0,100,0), -- 20:13:53 +(@PATH,117,9680.68,-7296.467,14.08991,0,0,0,0,100,0), -- 20:13:53 +(@PATH,118,9676.986,-7292.785,14.18614,0,0,0,0,100,0), -- 20:14:01 +(@PATH,119,9676.736,-7290.035,13.93614,0,0,0,0,100,0), -- 20:14:01 +(@PATH,120,9676.486,-7284.785,14.18614,0,0,0,0,100,0), -- 20:14:01 +(@PATH,121,9664.668,-7274.95,13.98935,0,0,0,0,100,0), -- 20:14:11 +(@PATH,122,9641.668,-7275.45,13.98935,0,0,0,0,100,0), -- 20:14:11 +(@PATH,123,9600.16,-7275.033,14.19062,0,0,0,0,100,0), -- 20:14:27 +(@PATH,124,9596.66,-7275.033,14.19062,0,0,0,0,100,0), -- 20:14:27 +(@PATH,125,9595.887,-7274.914,14.19024,0,0,0,0,100,0), -- 20:14:43 +(@PATH,126,9526.42,-7277.001,14.22749,0,0,0,0,100,0), -- 20:14:59 +(@PATH,127,9515.92,-7278.001,14.22749,0,0,0,0,100,0), -- 20:14:59 +(@PATH,128,9513.92,-7278.251,14.22749,0,0,0,0,100,0), -- 20:14:59 +(@PATH,129,9510.681,-7293.288,14.06322,0,0,0,0,100,0), -- 20:15:17 +(@PATH,130,9510.681,-7298.788,14.31322,0,0,0,0,100,0), -- 20:15:17 +(@PATH,131,9510.681,-7306.038,14.31322,0,0,0,0,100,0), -- 20:15:17 +(@PATH,132,9510.431,-7311.288,14.31322,0,0,0,0,100,0), -- 20:15:17 +(@PATH,133,9510.431,-7314.288,14.31322,0,0,0,0,100,0), -- 20:15:17 +(@PATH,134,9509.529,-7330.155,14.47821,0,0,0,0,100,0), -- 20:15:34 +(@PATH,135,9509.279,-7332.405,14.47821,0,0,0,0,100,0), -- 20:15:34 +(@PATH,136,9509.279,-7333.405,14.47821,0,0,0,0,100,0), -- 20:15:34 +(@PATH,137,9509.029,-7334.905,14.47821,0,0,0,0,100,0), -- 20:15:34 +(@PATH,138,9507.779,-7356.905,14.47821,0,0,0,0,100,0), -- 20:15:34 +(@PATH,139,9508.02,-7368.424,14.58394,0,0,0,0,100,0), -- 20:15:49 +(@PATH,140,9508.77,-7382.924,14.58394,0,0,0,0,100,0), -- 20:15:49 +(@PATH,141,9508.77,-7385.174,14.58394,0,0,0,0,100,0), -- 20:15:49 +(@PATH,142,9528.405,-7396.765,17.07827,0,0,0,0,100,0), -- 20:16:04 +(@PATH,143,9534.251,-7396.64,16.96906,0,0,0,0,100,0), -- 20:16:13 +(@PATH,144,9537.001,-7396.64,16.96906,0,0,0,0,100,0), -- 20:16:13 +(@PATH,145,9538.001,-7396.64,16.96906,0,0,0,0,100,0), -- 20:16:13 +(@PATH,146,9539.751,-7396.64,16.96906,0,0,0,0,100,0), -- 20:16:13 +(@PATH,147,9547.501,-7396.64,16.96906,0,0,0,0,100,0), -- 20:16:13 +(@PATH,148,9555.251,-7396.39,16.96906,0,0,0,0,100,0), -- 20:16:13 +(@PATH,149,9556.751,-7396.39,16.96906,0,0,0,0,100,0), -- 20:16:13 +(@PATH,150,9564.121,-7407.653,19.65082,0,0,0,0,100,0), -- 20:16:26 +(@PATH,151,9564.121,-7411.653,19.65082,0,0,0,0,100,0), -- 20:16:26 +(@PATH,152,9562.407,-7417.577,19.72515,0,0,0,0,100,0), -- 20:16:34 +(@PATH,153,9560.863,-7424.275,17.98024,0,0,0,0,100,0), -- 20:16:37 +(@PATH,154,9561.113,-7425.525,17.48024,0,0,0,0,100,0), -- 20:16:37 +(@PATH,155,9561.613,-7427.275,16.73024,0,0,0,0,100,0), -- 20:16:37 +(@PATH,156,9573.232,-7434.738,15.66694,0,0,0,0,100,0), -- 20:16:43 +(@PATH,157,9577.982,-7435.488,15.66694,0,0,0,0,100,0), -- 20:16:43 +(@PATH,158,9581.732,-7435.988,14.16694,0,0,0,0,100,0), -- 20:16:43 +(@PATH,159,9601.162,-7431.205,13.72673,0,0,0,0,100,0), -- 20:16:55 +(@PATH,160,9602.662,-7430.205,13.47673,0,0,0,0,100,0), -- 20:16:55 +(@PATH,161,9604.162,-7428.705,13.47673,0,0,0,0,100,0), -- 20:16:55 +(@PATH,162,9611.602,-7423.619,13.54987,0,0,0,0,100,0), -- 20:17:04 +(@PATH,163,9661.816,-7430.175,13.54431,0,0,0,0,100,0), -- 20:17:19 +(@PATH,164,9691.869,-7434.476,13.54329,0,0,0,0,100,0), -- 20:17:29 +(@PATH,165,9699.86,-7432.892,13.52494,0,0,0,0,100,0), -- 20:17:39 +(@PATH,166,9707.11,-7429.142,13.52494,0,0,0,0,100,0), -- 20:17:39 +(@PATH,167,9713.61,-7426.142,13.52494,0,0,0,0,100,0), -- 20:17:39 +(@PATH,168,9720.36,-7422.642,13.52494,0,0,0,0,100,0), -- 20:17:39 +(@PATH,169,9760.865,-7418.738,13.57886,0,0,0,0,100,0), -- 20:17:53 +(@PATH,170,9766.886,-7402.463,13.85978,0,0,0,0,100,0), -- 20:18:08 +(@PATH,171,9767.136,-7400.463,13.85978,0,0,0,0,100,0), -- 20:18:08 +(@PATH,172,9767.636,-7397.713,14.10978,0,0,0,0,100,0), -- 20:18:08 +(@PATH,173,9769.994,-7396.318,14.46496,0,0,0,0,100,0), -- 20:18:18 +(@PATH,174,9775.994,-7396.568,14.96496,0,0,0,0,100,0), -- 20:18:18 +(@PATH,175,9788.744,-7397.568,14.96496,0,0,0,0,100,0), -- 20:18:18 +(@PATH,176,9789.994,-7397.818,14.96496,0,0,0,0,100,0), -- 20:18:18 +(@PATH,177,9792.994,-7398.068,14.46496,0,0,0,0,100,0), -- 20:18:18 +(@PATH,178,9795.314,-7400.193,14.02223,0,0,0,0,100,0), -- 20:18:29 +(@PATH,179,9795.564,-7402.443,14.02223,0,0,0,0,100,0), -- 20:18:29 +(@PATH,180,9796.064,-7407.193,14.02223,0,0,0,0,100,0), -- 20:18:29 +(@PATH,181,9796.564,-7412.443,14.02223,0,0,0,0,100,0); -- 20:18:29 + +-- Pathing for Silvermoon City Guardian Entry: 16222 'TDB FORMAT' +SET @NPC := 56891; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=9617.148,`position_y`=-7372.344,`position_z`=14.95278 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,9617.148,-7372.344,14.95278,0,0,0,0,100,0), -- 11:38:44 +(@PATH,2,9617.634,-7381.962,14.90948,0,0,0,0,100,0), -- 11:38:50 +(@PATH,3,9613.992,-7385.066,14.11522,0,0,0,0,100,0), -- 11:38:55 +(@PATH,4,9611.742,-7385.566,14.11522,0,0,0,0,100,0), -- 11:38:55 +(@PATH,5,9607.742,-7386.316,13.86522,0,0,0,0,100,0), -- 11:38:55 +(@PATH,6,9601.742,-7387.316,13.86522,0,0,0,0,100,0), -- 11:38:55 +(@PATH,7,9600.242,-7387.566,13.86522,0,0,0,0,100,0), -- 11:38:55 +(@PATH,8,9595.152,-7394.241,13.41057,0,0,0,0,100,0), -- 11:39:05 +(@PATH,9,9601.703,-7417.196,13.54557,0,0,0,0,100,0), -- 11:39:12 +(@PATH,10,9605.453,-7422.946,13.54557,0,0,0,0,100,0), -- 11:39:12 +(@PATH,11,9611.395,-7424.344,13.54924,0,0,0,0,100,0), -- 11:39:20 +(@PATH,12,9669.465,-7433.946,13.54404,0,0,0,0,100,0), -- 11:39:37 +(@PATH,13,9692.181,-7435.465,13.54329,0,0,0,0,100,0), -- 11:39:47 +(@PATH,14,9706.28,-7428.034,13.54329,0,0,0,0,100,0), -- 11:39:57 +(@PATH,15,9712.78,-7423.784,13.54329,0,0,0,0,100,0), -- 11:39:57 +(@PATH,16,9755.95,-7419.636,13.33486,0,0,0,0,100,0), -- 11:40:07 +(@PATH,17,9758.95,-7419.636,13.33486,0,0,0,0,100,0), -- 11:40:07 +(@PATH,18,9760.95,-7419.386,13.58486,0,0,0,0,100,0), -- 11:40:07 +(@PATH,19,9765.676,-7425.275,13.87941,0,0,0,0,100,0), -- 11:40:26 +(@PATH,20,9766.176,-7435.275,13.87941,0,0,0,0,100,0), -- 11:40:26 +(@PATH,21,9766.426,-7437.275,13.87941,0,0,0,0,100,0), -- 11:40:26 +(@PATH,22,9766.676,-7440.525,14.12941,0,0,0,0,100,0), -- 11:40:26 +(@PATH,23,9769.751,-7441.452,14.42178,0,0,0,0,100,0), -- 11:40:36 +(@PATH,24,9775.751,-7441.702,14.92178,0,0,0,0,100,0), -- 11:40:36 +(@PATH,25,9782.751,-7441.952,14.92178,0,0,0,0,100,0), -- 11:40:36 +(@PATH,26,9785.001,-7441.952,14.92178,0,0,0,0,100,0), -- 11:40:36 +(@PATH,27,9791.501,-7442.202,14.92178,0,0,0,0,100,0), -- 11:40:36 +(@PATH,28,9793.707,-7440.501,14.62286,0,0,0,0,100,0), -- 11:40:45 +(@PATH,29,9794.207,-7437.501,14.12286,0,0,0,0,100,0), -- 11:40:45 +(@PATH,30,9794.707,-7435.501,14.12286,0,0,0,0,100,0), -- 11:40:45 +(@PATH,31,9795.457,-7431.251,13.87286,0,0,0,0,100,0), -- 11:40:45 +(@PATH,32,9796.457,-7426.001,13.87286,0,0,0,0,100,0), -- 11:40:45 +(@PATH,33,9796.707,-7424.001,13.87286,0,0,0,0,100,0), -- 11:40:45 +(@PATH,34,9802.908,-7420.202,13.36064,0,0,0,0,100,0), -- 11:40:55 +(@PATH,35,9865.802,-7420.71,13.53932,0,0,0,0,100,0), -- 11:41:14 +(@PATH,36,9880.648,-7415.182,13.51911,0,0,0,0,100,0), -- 11:41:27 +(@PATH,37,9885.898,-7409.932,13.51911,0,0,0,0,100,0), -- 11:41:27 +(@PATH,38,9886.761,-7404.89,13.40958,0,0,0,0,100,0), -- 11:41:33 +(@PATH,39,9888.123,-7384.329,15.85358,0,0,0,0,100,0), -- 11:41:40 +(@PATH,40,9888.623,-7369.579,20.85358,0,0,0,0,100,0), -- 11:41:40 +(@PATH,41,9873.136,-7363.303,20.90705,0,0,0,0,100,0), -- 11:41:51 +(@PATH,42,9867.386,-7362.553,19.65705,0,0,0,0,100,0), -- 11:41:51 +(@PATH,43,9863.198,-7364.229,19.0695,0,0,0,0,100,0), -- 11:42:00 +(@PATH,44,9859.948,-7366.479,19.0695,0,0,0,0,100,0), -- 11:42:00 +(@PATH,45,9841.254,-7366.119,18.845,0,0,0,0,100,0), -- 11:42:07 +(@PATH,46,9836.004,-7362.869,18.845,0,0,0,0,100,0), -- 11:42:07 +(@PATH,47,9833.344,-7362.54,18.90108,0,0,0,0,100,0), -- 11:42:15 +(@PATH,48,9829.344,-7362.79,20.65108,0,0,0,0,100,0), -- 11:42:15 +(@PATH,49,9827.594,-7363.04,20.90108,0,0,0,0,100,0), -- 11:42:15 +(@PATH,50,9821.844,-7363.54,20.90108,0,0,0,0,100,0), -- 11:42:15 +(@PATH,51,9829.27,-7362.814,20.40145,0,0,0,0,100,0), -- 11:42:26 +(@PATH,52,9833.27,-7362.314,19.65145,0,0,0,0,100,0), -- 11:42:26 +(@PATH,53,9835.859,-7362.992,19.06359,0,0,0,0,100,0), -- 11:42:34 +(@PATH,54,9841.109,-7365.992,19.06359,0,0,0,0,100,0), -- 11:42:34 +(@PATH,55,9850.109,-7370.992,19.06359,0,0,0,0,100,0), -- 11:42:34 +(@PATH,56,9859.49,-7366.387,18.84956,0,0,0,0,100,0), -- 11:42:41 +(@PATH,57,9863.24,-7364.137,18.84956,0,0,0,0,100,0), -- 11:42:41 +(@PATH,58,9873.046,-7363.469,20.91313,0,0,0,0,100,0), -- 11:42:48 +(@PATH,59,9874.796,-7363.469,20.91313,0,0,0,0,100,0), -- 11:42:48 +(@PATH,60,9887.834,-7384.231,15.64358,0,0,0,0,100,0), -- 11:42:58 +(@PATH,61,9887.834,-7387.231,14.64358,0,0,0,0,100,0), -- 11:42:58 +(@PATH,62,9886.838,-7404.881,13.63869,0,0,0,0,100,0), -- 11:43:08 +(@PATH,63,9876.497,-7419.251,13.51794,0,0,0,0,100,0), -- 11:43:16 +(@PATH,64,9865.785,-7420.523,13.54063,0,0,0,0,100,0), -- 11:43:22 +(@PATH,65,9859.535,-7420.523,13.54063,0,0,0,0,100,0), -- 11:43:22 +(@PATH,66,9801.332,-7420.127,13.66687,0,0,0,0,100,0), -- 11:43:36 +(@PATH,67,9796.978,-7424.1,13.69735,0,0,0,0,100,0), -- 11:43:53 +(@PATH,68,9796.728,-7425.85,13.94735,0,0,0,0,100,0), -- 11:43:53 +(@PATH,69,9795.728,-7431.35,13.94735,0,0,0,0,100,0), -- 11:43:53 +(@PATH,70,9794.978,-7435.35,13.69735,0,0,0,0,100,0), -- 11:43:53 +(@PATH,71,9794.478,-7437.6,13.94735,0,0,0,0,100,0), -- 11:43:53 +(@PATH,72,9793.978,-7440.6,14.19735,0,0,0,0,100,0), -- 11:43:53 +(@PATH,73,9791.54,-7442.293,14.44685,0,0,0,0,100,0), -- 11:44:02 +(@PATH,74,9785.04,-7442.043,14.94685,0,0,0,0,100,0), -- 11:44:02 +(@PATH,75,9782.79,-7442.043,14.94685,0,0,0,0,100,0), -- 11:44:02 +(@PATH,76,9775.54,-7441.793,14.94685,0,0,0,0,100,0), -- 11:44:02 +(@PATH,77,9769.79,-7441.543,14.94685,0,0,0,0,100,0), -- 11:44:02 +(@PATH,78,9766.505,-7435.237,13.99367,0,0,0,0,100,0), -- 11:44:13 +(@PATH,79,9765.755,-7425.237,13.74367,0,0,0,0,100,0), -- 11:44:13 +(@PATH,80,9765.755,-7423.487,13.74367,0,0,0,0,100,0), -- 11:44:13 +(@PATH,81,9758.748,-7419.551,13.30211,0,0,0,0,100,0), -- 11:44:22 +(@PATH,82,9755.748,-7419.551,13.30211,0,0,0,0,100,0), -- 11:44:22 +(@PATH,83,9720.498,-7421.301,13.30211,0,0,0,0,100,0), -- 11:44:22 +(@PATH,84,9706.665,-7428.206,13.52816,0,0,0,0,100,0), -- 11:44:41 +(@PATH,85,9699.915,-7432.456,13.52816,0,0,0,0,100,0), -- 11:44:41 +(@PATH,86,9688.145,-7435.444,13.54329,0,0,0,0,100,0), -- 11:44:52 +(@PATH,87,9661.658,-7430.764,13.54354,0,0,0,0,100,0), -- 11:45:01 +(@PATH,88,9650.658,-7426.014,13.54354,0,0,0,0,100,0), -- 11:45:01 +(@PATH,89,9611.502,-7424.288,13.54895,0,0,0,0,100,0), -- 11:45:10 +(@PATH,90,9601.961,-7417.239,13.55362,0,0,0,0,100,0), -- 11:45:27 +(@PATH,91,9600.711,-7415.739,13.55362,0,0,0,0,100,0), -- 11:45:27 +(@PATH,92,9595.22,-7392.367,13.64975,0,0,0,0,100,0), -- 11:45:36 +(@PATH,93,9601.827,-7387.457,13.94776,0,0,0,0,100,0), -- 11:45:43 +(@PATH,94,9607.577,-7386.457,13.94776,0,0,0,0,100,0), -- 11:45:43 +(@PATH,95,9611.827,-7385.707,13.69776,0,0,0,0,100,0), -- 11:45:43 +(@PATH,96,9613.827,-7385.457,13.94776,0,0,0,0,100,0), -- 11:45:43 +(@PATH,97,9616.577,-7384.957,14.19776,0,0,0,0,100,0), -- 11:45:43 +(@PATH,98,9617.488,-7381.918,14.6536,0,0,0,0,100,0), -- 11:45:53 +(@PATH,99,9617.488,-7376.918,14.9036,0,0,0,0,100,0), -- 11:45:53 +(@PATH,100,9617.238,-7372.168,14.9036,0,0,0,0,100,0), -- 11:45:53 +(@PATH,101,9617.634,-7381.962,14.90948,0,0,0,0,100,0), -- 11:46:00 +(@PATH,102,9613.973,-7385.057,14.11319,0,0,0,0,100,0), -- 11:46:04 +(@PATH,103,9611.723,-7385.557,14.11319,0,0,0,0,100,0), -- 11:46:04 +(@PATH,104,9607.723,-7386.307,13.86319,0,0,0,0,100,0), -- 11:46:04 +(@PATH,105,9601.973,-7387.307,13.86319,0,0,0,0,100,0), -- 11:46:04 +(@PATH,106,9600.223,-7387.557,13.86319,0,0,0,0,100,0), -- 11:46:04 +(@PATH,107,9595.393,-7394.153,13.41572,0,0,0,0,100,0), -- 11:46:14 +(@PATH,108,9601.696,-7417.232,13.54363,0,0,0,0,100,0), -- 11:46:21 +(@PATH,109,9605.696,-7422.982,13.54363,0,0,0,0,100,0), -- 11:46:21 +(@PATH,110,9611.418,-7424.264,13.54923,0,0,0,0,100,0); -- 11:46:29 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=56878; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(56878, 56878, 0, 0, 2), +(56878, 56877, 3, 90, 2); + +-- Pathing for Silvermoon Guardian Entry: 16221 'TDB FORMAT' +SET @NPC := 56878; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=9102.456,`position_y`=-7482.04,`position_z`=78.35519 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,9102.456,-7482.04,78.35519,0,0,0,0,100,0), -- 19:43:23 +(@PATH,2,9103.248,-7482.65,78.35519,0,0,0,0,100,0), -- 19:43:23 +(@PATH,3,9104.715,-7483.78,78.2541,0,0,0,0,100,0), -- 19:43:23 +(@PATH,4,9109.629,-7484.697,77.63239,0,0,0,0,100,0), -- 19:43:23 +(@PATH,5,9115.527,-7485.799,77.00739,0,0,0,0,100,0), -- 19:43:23 +(@PATH,6,9120.441,-7486.717,76.38239,0,0,0,0,100,0), -- 19:43:23 +(@PATH,7,9124.373,-7487.451,75.75739,0,0,0,0,100,0), -- 19:43:23 +(@PATH,8,9129.287,-7488.369,75.13239,0,0,0,0,100,0), -- 19:43:23 +(@PATH,9,9137.15,-7489.838,74.58031,0,0,0,0,100,0), -- 19:43:23 +(@PATH,10,9141.082,-7490.572,73.95531,0,0,0,0,100,0), -- 19:43:23 +(@PATH,11,9142.2,-7490.788,73.90916,0,0,0,0,100,0), -- 19:43:23 +(@PATH,12,9142.2,-7490.788,73.90916,0,0,0,0,100,0), -- 19:43:23 +(@PATH,13,9149.529,-7476.493,69.95045,0,0,0,0,100,0), -- 19:43:29 +(@PATH,14,9161.441,-7460.135,63.98,0,0,0,0,100,0), -- 19:43:35 +(@PATH,15,9179.331,-7453.608,56.39117,0,0,0,0,100,0), -- 19:43:44 +(@PATH,16,9198.095,-7455.712,49.39744,0,0,0,0,100,0), -- 19:43:52 +(@PATH,17,9232.926,-7447.019,39.44244,0,0,0,0,100,0), -- 19:44:00 +(@PATH,18,9244.291,-7433.579,36.1172,0,0,0,0,100,0), -- 19:44:16 +(@PATH,19,9245.047,-7432.797,36.07084,0,0,0,0,100,0), -- 19:44:22 +(@PATH,20,9258.551,-7433.484,36.12626,0,0,0,0,100,0), -- 19:44:28 +(@PATH,21,9265.053,-7448.939,36.07185,0,0,0,0,100,0), -- 19:44:34 +(@PATH,22,9260.291,-7466.419,35.95266,0,0,0,0,100,0), -- 19:44:41 +(@PATH,23,9259.721,-7483.818,35.70003,0,0,0,0,100,0), -- 19:44:49 +(@PATH,24,9260.23,-7465.513,35.81084,0,0,0,0,100,0), -- 19:44:56 +(@PATH,25,9248.131,-7424.455,35.23894,0,0,0,0,100,0), -- 19:45:04 +(@PATH,26,9250.974,-7376.712,29.71493,0,0,0,0,100,0), -- 19:45:17 +(@PATH,27,9269.848,-7341.41,22.52634,0,0,0,0,100,0), -- 19:45:36 +(@PATH,28,9290.326,-7305.721,18.07349,0,0,0,0,100,0), -- 19:45:53 +(@PATH,29,9309.75,-7283.949,14.86156,0,0,0,0,100,0), -- 19:46:10 +(@PATH,30,9296.104,-7297.955,16.94801,0,0,0,0,100,0), -- 19:46:23 +(@PATH,31,9273.268,-7335.548,21.18934,0,0,0,0,100,0), -- 19:46:32 +(@PATH,32,9252.006,-7373.276,28.924,0,0,0,0,100,0), -- 19:46:50 +(@PATH,33,9247.184,-7419.163,34.14049,0,0,0,0,100,0), -- 19:47:07 +(@PATH,34,9261.941,-7441.854,35.80672,0,0,0,0,100,0), -- 19:47:26 +(@PATH,35,9264.699,-7445.521,36.01838,0,0,0,0,100,0), -- 19:47:37 +(@PATH,36,9260.029,-7465.688,35.94786,0,0,0,0,100,0), -- 19:47:46 +(@PATH,37,9259.739,-7483.936,35.70295,0,0,0,0,100,0), -- 19:47:53 +(@PATH,38,9260.128,-7466.218,35.80263,0,0,0,0,100,0), -- 19:48:00 +(@PATH,39,9264.906,-7448.786,36.13476,0,0,0,0,100,0), -- 19:48:08 +(@PATH,40,9258.107,-7433.702,36.05851,0,0,0,0,100,0), -- 19:48:15 +(@PATH,41,9235.605,-7445.421,38.64949,0,0,0,0,100,0), -- 19:48:20 +(@PATH,42,9200.038,-7455.543,49.04723,0,0,0,0,100,0), -- 19:48:27 +(@PATH,43,9182.41,-7453.483,55.13942,0,0,0,0,100,0), -- 19:48:43 +(@PATH,44,9164.158,-7457.769,62.62826,0,0,0,0,100,0), -- 19:48:50 +(@PATH,45,9151.068,-7474.071,68.90013,0,0,0,0,100,0), -- 19:48:59 +(@PATH,46,9142.732,-7490.235,73.94332,0,0,0,0,100,0), -- 19:49:07 +(@PATH,47,9110.125,-7484.632,77.80888,0,0,0,0,100,0), -- 19:49:15 +(@PATH,48,9090.791,-7472.85,80.36261,0,0,0,0,100,0), -- 19:49:30 +(@PATH,49,9082.396,-7462.425,82.50674,0,0,0,0,100,0), -- 19:49:38 +(@PATH,50,9077.785,-7456.682,83.13695,0,0,0,0,100,0), -- 19:49:45 +(@PATH,51,9066.736,-7450.874,83.24338,0,0,0,0,100,0), -- 19:49:50 +(@PATH,52,9066.793,-7450.982,83.18549,0,0,0,0,100,0), -- 19:49:57 +(@PATH,53,9067.023,-7451.012,83.33182,0,0,0,0,100,0), -- 19:50:02 +(@PATH,54,9089.325,-7471.378,80.84378,0,0,0,0,100,0); -- 19:50:06 From d8ef63040aeda23bcade3477d2ffc59825f7b6f1 Mon Sep 17 00:00:00 2001 From: click Date: Thu, 2 Apr 2015 02:46:25 +0200 Subject: [PATCH 18/86] Core/Packet: Correction to packetsize for SMSG_WEATHER --- src/server/game/Weather/Weather.cpp | 8 +++++--- src/server/game/Weather/WeatherMgr.cpp | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index 438d0b8bb87..2a94cd26183 100644 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -192,8 +192,10 @@ bool Weather::ReGenerate() void Weather::SendWeatherUpdateToPlayer(Player* player) { - WorldPacket data(SMSG_WEATHER, (4+4+4)); - data << uint32(GetWeatherState()) << (float)m_grade << uint8(0); + WorldPacket data(SMSG_WEATHER, (4 + 4 + 1)); + data << uint32(GetWeatherState()); + data << (float)m_grade; + data << uint8(0); player->GetSession()->SendPacket(&data); } @@ -208,7 +210,7 @@ bool Weather::UpdateWeather() WeatherState state = GetWeatherState(); - WorldPacket data(SMSG_WEATHER, (4+4+4)); + WorldPacket data(SMSG_WEATHER, (4 + 4 + 1)); data << uint32(state); data << (float)m_grade; data << uint8(0); diff --git a/src/server/game/Weather/WeatherMgr.cpp b/src/server/game/Weather/WeatherMgr.cpp index d1a614f494d..9100dd464b9 100644 --- a/src/server/game/Weather/WeatherMgr.cpp +++ b/src/server/game/Weather/WeatherMgr.cpp @@ -143,8 +143,10 @@ void LoadWeatherData() void SendFineWeatherUpdateToPlayer(Player* player) { - WorldPacket data(SMSG_WEATHER, (4+4+4)); - data << (uint32)WEATHER_STATE_FINE << (float)0.0f << uint8(0); + WorldPacket data(SMSG_WEATHER, (4 + 4 + 1)); + data << (uint32)WEATHER_STATE_FINE; + data << (float)0.0f; + data << uint8(0); player->GetSession()->SendPacket(&data); } From 1de02764c7f66d954854f1ce7df56ffdabe9d7fe Mon Sep 17 00:00:00 2001 From: MitchesD Date: Thu, 2 Apr 2015 18:02:34 +0200 Subject: [PATCH 19/86] Core/SmartScripts: added SMART_ACTION_SET_COUNTER and SMART_EVENT_COUNTER_SET as per request of DB developers (cherry picked from commit 23b1c042adbe3a460457aa11f017c90e6600bfa2) Conflicts: src/server/game/AI/SmartScripts/SmartScript.h --- .../game/AI/SmartScripts/SmartScript.cpp | 11 +++++++ src/server/game/AI/SmartScripts/SmartScript.h | 33 ++++++++++++++++++- .../game/AI/SmartScripts/SmartScriptMgr.cpp | 30 +++++++++++++++++ .../game/AI/SmartScripts/SmartScriptMgr.h | 21 ++++++++++-- 4 files changed, 92 insertions(+), 3 deletions(-) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 3d0b745be25..35538d2a489 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -60,6 +60,7 @@ SmartScript::~SmartScript() delete itr->second; delete mTargetStorage; + mCounterList.clear(); } void SmartScript::OnReset() @@ -76,6 +77,7 @@ void SmartScript::OnReset() } ProcessEventsFor(SMART_EVENT_RESET); mLastInvoker.Clear(); + mCounterList.clear(); } void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob) @@ -1317,6 +1319,11 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u ENSURE_AI(SmartAI, me->AI())->SetSwim(e.action.setSwim.swim != 0); break; } + case SMART_ACTION_SET_COUNTER: + { + StoreCounter(e.action.setCounter.counterId, e.action.setCounter.value, e.action.setCounter.reset); + break; + } case SMART_ACTION_WP_START: { if (!IsSmart()) @@ -3206,6 +3213,10 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui break; } + case SMART_EVENT_COUNTER_SET: + if (GetCounterId(e.event.counter.id) != 0 && GetCounterValue(e.event.counter.id) == e.event.counter.value) + ProcessTimedAction(e, e.event.counter.cooldownMax, e.event.counter.cooldownMax); + break; default: TC_LOG_ERROR("sql.sql", "SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType()); break; diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index ed1c63de207..4b77b22da69 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -145,8 +145,37 @@ class SmartScript return NULL; } - GameObject* FindGameObjectNear(WorldObject* searchObject, uint32 guid) const + void StoreCounter(uint32 id, uint32 value, uint32 reset) { + CounterMap::const_iterator itr = mCounterList.find(id); + if (itr != mCounterList.end()) + { + if (reset == 0) + value += GetCounterValue(id); + mCounterList.erase(id); + } + + mCounterList.insert(std::make_pair(id, value)); + ProcessEventsFor(SMART_EVENT_COUNTER_SET); + } + + uint32 GetCounterId(uint32 id) + { + CounterMap::iterator itr = mCounterList.find(id); + if (itr != mCounterList.end()) + return itr->first; + return 0; + } + + uint32 GetCounterValue(uint32 id) + { + CounterMap::iterator itr = mCounterList.find(id); + if (itr != mCounterList.end()) + return itr->second; + return 0; + } + + GameObject* FindGameObjectNear(WorldObject* searchObject, ObjectGuid::LowType guid) const { GameObject* gameObject = NULL; CellCoord p(Trinity::ComputeCellCoord(searchObject->GetPositionX(), searchObject->GetPositionY())); @@ -205,6 +234,8 @@ class SmartScript void SetScript9(SmartScriptHolder& e, uint32 entry); Unit* GetLastInvoker(); ObjectGuid mLastInvoker; + typedef std::unordered_map CounterMap; + CounterMap mCounterList; private: void IncPhase(int32 p = 1) diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 8f0f86772eb..37187d9b04c 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -689,6 +689,22 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) return false; } break; + case SMART_EVENT_COUNTER_SET: + if (!IsMinMaxValid(e, e.event.counter.cooldownMin, e.event.counter.cooldownMax)) + return false; + + if (e.event.counter.id == 0) + { + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Event SMART_EVENT_COUNTER_SET using invalid counter id %u, skipped.", e.event.counter.id); + return false; + } + + if (e.event.counter.value == 0) + { + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Event SMART_EVENT_COUNTER_SET using invalid value %u, skipped.", e.event.counter.value); + return false; + } + break; case SMART_EVENT_LINK: case SMART_EVENT_GO_STATE_CHANGED: case SMART_EVENT_GO_EVENT_INFORM: @@ -991,6 +1007,20 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.teleport.mapID); return false; } + break; + case SMART_ACTION_SET_COUNTER: + if (e.action.setCounter.counterId == 0) + { + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses wrong counterId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setCounter.counterId); + return false; + } + + if (e.action.setCounter.value == 0) + { + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses wrong value %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setCounter.value); + return false; + } + break; case SMART_ACTION_INSTALL_AI_TEMPLATE: if (e.action.installTtemplate.id >= SMARTAI_TEMPLATE_END) diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 0ed8542c72a..1f4891d6c24 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -167,8 +167,9 @@ enum SMART_EVENT SMART_EVENT_FRIENDLY_HEALTH_PCT = 74, // minHpPct, maxHpPct, repeatMin, repeatMax SMART_EVENT_DISTANCE_CREATURE = 75, // guid, entry, distance, repeat SMART_EVENT_DISTANCE_GAMEOBJECT = 76, // guid, entry, distance, repeat + SMART_EVENT_COUNTER_SET = 77, // id, value, cooldownMin, cooldownMax - SMART_EVENT_END = 77 + SMART_EVENT_END = 78 }; struct SmartEvent @@ -396,6 +397,14 @@ struct SmartEvent uint32 repeat; } distance; + struct + { + uint32 id; + uint32 value; + uint32 cooldownMin; + uint32 cooldownMax; + } counter; + struct { uint32 param1; @@ -479,7 +488,7 @@ enum SMART_ACTION SMART_ACTION_SET_FLY = 60, // 0/1 SMART_ACTION_SET_SWIM = 61, // 0/1 SMART_ACTION_TELEPORT = 62, // mapID, - // 63 unused + SMART_ACTION_SET_COUNTER = 63, // id, value, reset (0/1) SMART_ACTION_STORE_TARGET_LIST = 64, // varID, SMART_ACTION_WP_RESUME = 65, // none SMART_ACTION_SET_ORIENTATION = 66, // @@ -822,6 +831,13 @@ struct SmartAction uint32 mapID; } teleport; + struct + { + uint32 counterId; + uint32 value; + uint32 reset; + } setCounter; + struct { uint32 id; @@ -1294,6 +1310,7 @@ const uint32 SmartAIEventMask[SMART_EVENT_END][2] = {SMART_EVENT_FRIENDLY_HEALTH_PCT, SMART_SCRIPT_TYPE_MASK_CREATURE }, {SMART_EVENT_DISTANCE_CREATURE, SMART_SCRIPT_TYPE_MASK_CREATURE }, {SMART_EVENT_DISTANCE_GAMEOBJECT, SMART_SCRIPT_TYPE_MASK_CREATURE }, + {SMART_EVENT_COUNTER_SET, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT } }; enum SmartEventFlags From 8d58bb93c903a6f6c781d9662688b43777d19ad1 Mon Sep 17 00:00:00 2001 From: MitchesD Date: Thu, 2 Apr 2015 18:34:31 +0200 Subject: [PATCH 20/86] Core/SAI: fix merge conflict it's good to use CTRL + S --- src/server/game/AI/SmartScripts/SmartScript.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index 4b77b22da69..a3d75f1889b 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -175,7 +175,8 @@ class SmartScript return 0; } - GameObject* FindGameObjectNear(WorldObject* searchObject, ObjectGuid::LowType guid) const { + GameObject* FindGameObjectNear(WorldObject* searchObject, uint32 guid) const + { GameObject* gameObject = NULL; CellCoord p(Trinity::ComputeCellCoord(searchObject->GetPositionX(), searchObject->GetPositionY())); From 589296da9044be13f921724e8c2b1312bebde4c8 Mon Sep 17 00:00:00 2001 From: Naios Date: Sat, 28 Mar 2015 18:58:37 +0100 Subject: [PATCH 21/86] Dep/CppFormat: Update cppformat to cppformat/cppformat@aab64b55a4c5db5 * fixes argument limit, argument count is unlimited now. --- dep/PackageList.txt | 2 +- dep/cppformat/format.cc | 39 +++------ dep/cppformat/format.h | 187 ++++++++++++++++++++++++++-------------- 3 files changed, 132 insertions(+), 96 deletions(-) diff --git a/dep/PackageList.txt b/dep/PackageList.txt index 4fb4e2877fc..63b41e4813e 100644 --- a/dep/PackageList.txt +++ b/dep/PackageList.txt @@ -14,7 +14,7 @@ bzip2 (a freely available, patent free, high-quality data compressor) cppformat (type safe format library) https://github.com/cppformat/cppformat - Version: 1.1.0 bf8636c9596fbfddded3d0f5879abc7579c9f4dd + Version: 1.1.0 aab64b55a4c5db598c123e1a2770b9eb6507d7d8 G3D (a commercial-grade C++ 3D engine available as Open Source (BSD License) http://g3d.sourceforge.net/ diff --git a/dep/cppformat/format.cc b/dep/cppformat/format.cc index 86fac25a524..fe4f1b18733 100644 --- a/dep/cppformat/format.cc +++ b/dep/cppformat/format.cc @@ -67,25 +67,7 @@ using fmt::internal::Arg; # if FMT_EXCEPTIONS # define FMT_THROW(x) throw x # else -# ifndef NDEBUG -# define FMT_THROW(x) assert(false && #x) -# elif defined _MSC_VER -# define FMT_THROW(x) __assume(0) -# elif defined __clang__ || FMT_GCC_VERSION >= 405 -# define FMT_THROW(x) __builtin_unreachable() -# else -# define FMT_THROW(x) std::abort() -# endif -# endif -#endif - -#ifndef FMT_NORETURN -# if defined __GNUC__ || defined __clang__ -# define FMT_NORETURN __attribute__((__noreturn__)) -# elif defined _MSC_VER -# define FMT_NORETURN __declspec(noreturn) -# else -# define FMT_NORETURN +# define FMT_THROW(x) assert(false) # endif #endif @@ -176,6 +158,9 @@ int safe_strerror( char *&buffer_; std::size_t buffer_size_; + // A noop assignment operator to avoid bogus warnings. + void operator=(const StrError &) {} + // Handle the result of XSI-compliant version of strerror_r. int handle(int result) { // glibc versions before 2.13 return result in errno. @@ -226,14 +211,14 @@ void format_error_code(fmt::Writer &out, int error_code, // bad_alloc. out.clear(); static const char SEP[] = ": "; - static const char _ERR[] = "error "; + static const char ERROR_STR[] = "error "; fmt::internal::IntTraits::MainType ec_value = error_code; - // Subtract 2 to account for terminating null characters in SEP and _ERR. - std::size_t error_code_size = - sizeof(SEP) + sizeof(_ERR) + fmt::internal::count_digits(ec_value) - 2; + // Subtract 2 to account for terminating null characters in SEP and ERROR_STR. + std::size_t error_code_size = sizeof(SEP) + sizeof(ERROR_STR) - 2; + error_code_size += fmt::internal::count_digits(ec_value); if (message.size() <= fmt::internal::INLINE_BUFFER_SIZE - error_code_size) out << message << SEP; - out << _ERR << error_code; + out << ERROR_STR << error_code; assert(out.size() <= fmt::internal::INLINE_BUFFER_SIZE); } @@ -304,8 +289,7 @@ class WidthHandler : public fmt::internal::ArgVisitor { public: explicit WidthHandler(fmt::FormatSpec &spec) : spec_(spec) {} - FMT_NORETURN - unsigned visit_unhandled_arg() { + void report_unhandled_arg() { FMT_THROW(fmt::FormatError("width is not integer")); } @@ -326,8 +310,7 @@ class WidthHandler : public fmt::internal::ArgVisitor { class PrecisionHandler : public fmt::internal::ArgVisitor { public: - FMT_NORETURN - unsigned visit_unhandled_arg() { + void report_unhandled_arg() { FMT_THROW(fmt::FormatError("precision is not integer")); } diff --git a/dep/cppformat/format.h b/dep/cppformat/format.h index 0a67f3f977d..3a82f8272c0 100644 --- a/dep/cppformat/format.h +++ b/dep/cppformat/format.h @@ -100,6 +100,7 @@ inline uint32_t clzll(uint64_t x) { #endif #ifdef __clang__ +# pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdocumentation" #endif @@ -282,7 +283,6 @@ class FormatError : public std::runtime_error { }; namespace internal { - // The number of characters to store in the MemoryBuffer object itself // to avoid dynamic memory allocation. enum { INLINE_BUFFER_SIZE = 500 }; @@ -297,8 +297,9 @@ inline stdext::checked_array_iterator make_ptr(T *ptr, std::size_t size) { template inline T *make_ptr(T *ptr, std::size_t) { return ptr; } #endif +} // namespace internal -// A buffer for POD types. It supports a subset of std::vector's operations. +/** A buffer supporting a subset of ``std::vector``'s operations. */ template class Buffer { private: @@ -312,25 +313,31 @@ class Buffer { Buffer(T *ptr = 0, std::size_t capacity = 0) : ptr_(ptr), size_(0), capacity_(capacity) {} + /** + Increases the buffer capacity to hold at least *size* elements updating + ``ptr_`` and ``capacity_``. + */ virtual void grow(std::size_t size) = 0; public: virtual ~Buffer() {} - // Returns the size of this buffer. + /** Returns the size of this buffer. */ std::size_t size() const { return size_; } - // Returns the capacity of this buffer. + /** Returns the capacity of this buffer. */ std::size_t capacity() const { return capacity_; } - // Resizes the buffer. If T is a POD type new elements are not initialized. + /** + Resizes the buffer. If T is a POD type new elements may not be initialized. + */ void resize(std::size_t new_size) { if (new_size > capacity_) grow(new_size); size_ = new_size; } - // Reserves space to store at least capacity elements. + /** Reserves space to store at least *capacity* elements. */ void reserve(std::size_t capacity) { if (capacity > capacity_) grow(capacity); @@ -344,7 +351,7 @@ class Buffer { ptr_[size_++] = value; } - // Appends data to the end of the buffer. + /** Appends data to the end of the buffer. */ void append(const T *begin, const T *end); T &operator[](std::size_t index) { return ptr_[index]; } @@ -356,10 +363,12 @@ void Buffer::append(const T *begin, const T *end) { std::ptrdiff_t num_elements = end - begin; if (size_ + num_elements > capacity_) grow(size_ + num_elements); - std::copy(begin, end, make_ptr(ptr_, capacity_) + size_); + std::copy(begin, end, internal::make_ptr(ptr_, capacity_) + size_); size_ += num_elements; } +namespace internal { + // A memory buffer for POD types with the first SIZE elements stored in // the object itself. template > @@ -438,10 +447,9 @@ void MemoryBuffer::grow(std::size_t size) { // A fixed-size buffer. template -class FixedBuffer : public fmt::internal::Buffer { +class FixedBuffer : public fmt::Buffer { public: - FixedBuffer(Char *array, std::size_t size) - : fmt::internal::Buffer(array, size) {} + FixedBuffer(Char *array, std::size_t size) : fmt::Buffer(array, size) {} protected: void grow(std::size_t size); @@ -692,21 +700,16 @@ void format_windows_error(fmt::Writer &out, int error_code, fmt::StringRef message) FMT_NOEXCEPT; #endif -// Computes max(Arg, 1) at compile time. It is used to avoid errors about +// Computes max(N, 1) at compile time. It is used to avoid errors about // allocating an array of 0 size. -template +template struct NonZero { - enum { VALUE = Arg }; + enum { VALUE = N > 0 ? N : 1 }; }; -template <> -struct NonZero<0> { - enum { VALUE = 1 }; -}; - -// The value of a formatting argument. It is a POD type to allow storage in +// A formatting argument. It is a POD type to allow storage in // internal::MemoryBuffer. -struct Value { +struct Arg { template struct StringValue { const Char *value; @@ -735,9 +738,7 @@ struct Value { StringValue wstring; CustomValue custom; }; -}; -struct Arg : Value { enum Type { NONE, // Integer types should go first, @@ -781,15 +782,27 @@ class IsConvertibleToInt { enum { value = (sizeof(check(get())) == sizeof(yes)) }; }; +#define FMT_CONVERTIBLE_TO_INT(Type) \ + template <> \ + class IsConvertibleToInt { \ + public: \ + enum { value = 1 }; \ + } + +// Silence warnings about convering float to int. +FMT_CONVERTIBLE_TO_INT(float); +FMT_CONVERTIBLE_TO_INT(double); +FMT_CONVERTIBLE_TO_INT(long double); + template struct EnableIf {}; template struct EnableIf { typedef T type; }; -// Makes a Value object from any type. +// Makes an Arg object from any type. template -class MakeValue : public Value { +class MakeValue : public Arg { private: // The following two methods are private to disallow formatting of // arbitrary pointers. If you want to output a pointer cast it to @@ -949,7 +962,12 @@ class MakeValue : public Value { template class ArgVisitor { public: - Result visit_unhandled_arg() { return Result(); } + void report_unhandled_arg() {} + + Result visit_unhandled_arg() { + FMT_DISPATCH(report_unhandled_arg()); + return Result(); + } Result visit_int(int value) { return FMT_DISPATCH(visit_any_int(value)); @@ -1015,7 +1033,7 @@ class ArgVisitor { case Arg::CHAR: return FMT_DISPATCH(visit_char(arg.int_value)); case Arg::CSTRING: { - Value::StringValue str = arg.string; + Arg::StringValue str = arg.string; str.size = 0; return FMT_DISPATCH(visit_string(str)); } @@ -1040,42 +1058,49 @@ template class ArgFormatter; } // namespace internal -/** - An argument list. - */ +/** An argument list. */ class ArgList { private: + // To reduce compiled code size per formatting function call, types of first + // MAX_PACKED_ARGS arguments are passed in the types_ field. uint64_t types_; - const internal::Value *values_; + const internal::Arg *args_; + + internal::Arg::Type type(unsigned index) const { + unsigned shift = index * 4; + uint64_t mask = 0xf; + return static_cast( + (types_ & (mask << shift)) >> shift); + } public: - // Maximum number of arguments that can be passed in ArgList. - enum { MAX_ARGS = 16 }; + // Maximum number of arguments with packed types. + enum { MAX_PACKED_ARGS = 16 }; ArgList() : types_(0) {} - ArgList(ULongLong types, const internal::Value *values) - : types_(types), values_(values) {} + ArgList(ULongLong types, const internal::Arg *args) + : types_(types), args_(args) {} - /** - Returns the argument at specified index. - */ + /** Returns the argument at specified index. */ internal::Arg operator[](unsigned index) const { using internal::Arg; Arg arg; - if (index >= MAX_ARGS) { + if (index < MAX_PACKED_ARGS) { + Arg::Type arg_type = type(index); + if (arg_type != Arg::NONE) + arg = args_[index]; + arg.type = arg_type; + return arg; + } + if (type(MAX_PACKED_ARGS - 1) == Arg::NONE) { arg.type = Arg::NONE; return arg; } - unsigned shift = index * 4; - uint64_t mask = 0xf; - Arg::Type type = - static_cast((types_ & (mask << shift)) >> shift); - arg.type = type; - if (type != Arg::NONE) { - internal::Value &value = arg; - value = values_[index]; + for (unsigned i = MAX_PACKED_ARGS; i <= index; ++i) { + if (args_[i].type == Arg::NONE) + return args_[i]; } - return arg; + return args_[index]; } }; @@ -1434,11 +1459,11 @@ inline uint64_t make_type(FMT_GEN15(FMT_ARG_TYPE_DEFAULT)) { # define FMT_VARIADIC_VOID(func, arg_type) \ template \ void func(arg_type arg1, const Args & ... args) { \ - const fmt::internal::Value values[ \ + const fmt::internal::Arg array[ \ fmt::internal::NonZero::VALUE] = { \ fmt::internal::MakeValue(args)... \ }; \ - func(arg1, ArgList(fmt::internal::make_type(args...), values)); \ + func(arg1, ArgList(fmt::internal::make_type(args...), array)); \ } // Defines a variadic constructor. @@ -1446,11 +1471,11 @@ inline uint64_t make_type(FMT_GEN15(FMT_ARG_TYPE_DEFAULT)) { template \ ctor(arg0_type arg0, arg1_type arg1, const Args & ... args) { \ using fmt::internal::MakeValue; \ - const fmt::internal::Value values[ \ + const fmt::internal::Arg array[ \ fmt::internal::NonZero::VALUE] = { \ MakeValue(args)... \ }; \ - func(arg0, arg1, ArgList(fmt::internal::make_type(args...), values)); \ + func(arg0, arg1, ArgList(fmt::internal::make_type(args...), array)); \ } #else @@ -1463,9 +1488,9 @@ inline uint64_t make_type(FMT_GEN15(FMT_ARG_TYPE_DEFAULT)) { # define FMT_WRAP1(func, arg_type, n) \ template \ inline void func(arg_type arg1, FMT_GEN(n, FMT_MAKE_ARG)) { \ - const fmt::internal::Value vals[] = {FMT_GEN(n, FMT_MAKE_REF)}; \ + const fmt::internal::Arg args[] = {FMT_GEN(n, FMT_MAKE_REF)}; \ func(arg1, fmt::ArgList( \ - fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), vals)); \ + fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), args)); \ } // Emulates a variadic function returning void on a pre-C++11 compiler. @@ -1480,9 +1505,9 @@ inline uint64_t make_type(FMT_GEN15(FMT_ARG_TYPE_DEFAULT)) { # define FMT_CTOR(ctor, func, arg0_type, arg1_type, n) \ template \ ctor(arg0_type arg0, arg1_type arg1, FMT_GEN(n, FMT_MAKE_ARG)) { \ - const fmt::internal::Value vals[] = {FMT_GEN(n, FMT_MAKE_REF)}; \ + const fmt::internal::Arg args[] = {FMT_GEN(n, FMT_MAKE_REF)}; \ func(arg0, arg1, fmt::ArgList( \ - fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), vals)); \ + fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), args)); \ } // Emulates a variadic constructor on a pre-C++11 compiler. @@ -1592,7 +1617,7 @@ template class BasicWriter { private: // Output buffer. - internal::Buffer &buffer_; + Buffer &buffer_; FMT_DISALLOW_COPY_AND_ASSIGN(BasicWriter); @@ -1672,7 +1697,7 @@ class BasicWriter { /** Constructs a ``BasicWriter`` object. */ - explicit BasicWriter(internal::Buffer &b) : buffer_(b) {} + explicit BasicWriter(Buffer &b) : buffer_(b) {} public: /** @@ -2275,10 +2300,8 @@ template void format(BasicFormatter &f, const Char *&format_str, const T &value) { std::basic_ostringstream os; os << value; - internal::Arg arg; - internal::Value &arg_value = arg; std::basic_string str = os.str(); - arg_value = internal::MakeValue(str); + internal::Arg arg = internal::MakeValue(str); arg.type = static_cast( internal::MakeValue::type(str)); format_str = f.format(format_str, arg); @@ -2575,16 +2598,46 @@ inline void format_decimal(char *&buffer, T value) { #define FMT_GET_ARG_NAME(type, index) arg##index #if FMT_USE_VARIADIC_TEMPLATES + +namespace fmt { +namespace internal { +inline void do_set_types(Arg *) {} + +template +inline void do_set_types(Arg *args, const T &arg, const Args & ... tail) { + args->type = static_cast(MakeValue::type(arg)); + do_set_types(args + 1, tail...); +} + +template +inline void set_types(Arg *array, const Args & ... args) { + do_set_types(array, args...); + array[sizeof...(Args)].type = Arg::NONE; +} + +// Computes the argument array size by adding 1 to N, which is the number of +// arguments, if N is zero, because array of zero size is invalid, or if N +// is greater than ArgList::MAX_PACKED_ARGS to accommodate for an extra +// argument that marks the end of the list. +template +struct ArgArraySize { + enum { VALUE = N + (N == 0 || N > ArgList::MAX_PACKED_ARGS ? 1 : 0) }; +}; +} +} + # define FMT_VARIADIC_(Char, ReturnType, func, call, ...) \ template \ ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ const Args & ... args) { \ - using fmt::internal::Value; \ - const Value values[fmt::internal::NonZero::VALUE] = { \ + using fmt::internal::Arg; \ + Arg array[fmt::internal::ArgArraySize::VALUE] = { \ fmt::internal::MakeValue(args)... \ }; \ - call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), fmt::ArgList( \ - fmt::internal::make_type(args...), values)); \ + if (sizeof...(Args) > fmt::ArgList::MAX_PACKED_ARGS) \ + set_types(array, args...); \ + call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ + fmt::ArgList(fmt::internal::make_type(args...), array)); \ } #else // Defines a wrapper for a function taking __VA_ARGS__ arguments @@ -2593,9 +2646,9 @@ inline void format_decimal(char *&buffer, T value) { template \ inline ReturnType func(FMT_FOR_EACH(FMT_ADD_ARG_NAME, __VA_ARGS__), \ FMT_GEN(n, FMT_MAKE_ARG)) { \ - const fmt::internal::Value vals[] = {FMT_GEN(n, FMT_MAKE_REF_##Char)}; \ + const fmt::internal::Arg args[] = {FMT_GEN(n, FMT_MAKE_REF_##Char)}; \ call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), fmt::ArgList( \ - fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), vals)); \ + fmt::internal::make_type(FMT_GEN(n, FMT_MAKE_REF2)), args)); \ } # define FMT_VARIADIC_(Char, ReturnType, func, call, ...) \ From df4723af25900b3638a2b5921cf67e1838cbaf64 Mon Sep 17 00:00:00 2001 From: Naios Date: Sat, 28 Mar 2015 18:59:42 +0100 Subject: [PATCH 22/86] Core/Database: Remove va_args from DatabaseWorker::Execute methods. * Also delegate SQLQueryHolder::SetPQuery into SetQuery. --- .../shared/Database/DatabaseWorkerPool.h | 56 ++++++------------- src/server/shared/Database/QueryHolder.cpp | 23 -------- src/server/shared/Database/QueryHolder.h | 5 +- 3 files changed, 19 insertions(+), 65 deletions(-) diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h index deafbf3e80d..6bc204fbf76 100644 --- a/src/server/shared/Database/DatabaseWorkerPool.h +++ b/src/server/shared/Database/DatabaseWorkerPool.h @@ -28,6 +28,7 @@ #include "QueryResult.h" #include "QueryHolder.h" #include "AdhocStatement.h" +#include "StringFormat.h" #include #include @@ -170,18 +171,13 @@ class DatabaseWorkerPool //! Enqueues a one-way SQL operation in string format -with variable args- that will be executed asynchronously. //! This method should only be used for queries that are only executed once, e.g during startup. - void PExecute(const char* sql, ...) + template + void PExecute(const char* sql, Args const&... args) { if (!sql) return; - va_list ap; - char szQuery[MAX_QUERY_LEN]; - va_start(ap, sql); - vsnprintf(szQuery, MAX_QUERY_LEN, sql, ap); - va_end(ap); - - Execute(szQuery); + Execute(Trinity::StringFormat(sql, args...).c_str()); } //! Enqueues a one-way SQL operation in prepared statement format that will be executed asynchronously. @@ -210,18 +206,13 @@ class DatabaseWorkerPool //! Directly executes a one-way SQL operation in string format -with variable args-, that will block the calling thread until finished. //! This method should only be used for queries that are only executed once, e.g during startup. - void DirectPExecute(const char* sql, ...) + template + void DirectPExecute(const char* sql, Args const&... args) { if (!sql) return; - va_list ap; - char szQuery[MAX_QUERY_LEN]; - va_start(ap, sql); - vsnprintf(szQuery, MAX_QUERY_LEN, sql, ap); - va_end(ap); - - return DirectExecute(szQuery); + DirectExecute(Trinity::StringFormat(sql, args...).c_str()); } //! Directly executes a one-way SQL operation in prepared statement format, that will block the calling thread until finished. @@ -260,34 +251,24 @@ class DatabaseWorkerPool //! Directly executes an SQL query in string format -with variable args- that will block the calling thread until finished. //! Returns reference counted auto pointer, no need for manual memory management in upper level code. - QueryResult PQuery(const char* sql, T* conn, ...) + template + QueryResult PQuery(const char* sql, T* conn, Args const&... args) { if (!sql) return QueryResult(NULL); - va_list ap; - char szQuery[MAX_QUERY_LEN]; - va_start(ap, conn); - vsnprintf(szQuery, MAX_QUERY_LEN, sql, ap); - va_end(ap); - - return Query(szQuery, conn); + return Query(Trinity::StringFormat(sql, args...).c_str(), conn); } //! Directly executes an SQL query in string format -with variable args- that will block the calling thread until finished. //! Returns reference counted auto pointer, no need for manual memory management in upper level code. - QueryResult PQuery(const char* sql, ...) + template + QueryResult PQuery(const char* sql, Args const&... args) { if (!sql) return QueryResult(NULL); - va_list ap; - char szQuery[MAX_QUERY_LEN]; - va_start(ap, sql); - vsnprintf(szQuery, MAX_QUERY_LEN, sql, ap); - va_end(ap); - - return Query(szQuery); + return Query(Trinity::StringFormat(sql, args...).c_str()); } //! Directly executes an SQL query in prepared format that will block the calling thread until finished. @@ -328,15 +309,10 @@ class DatabaseWorkerPool //! Enqueues a query in string format -with variable args- that will set the value of the QueryResultFuture return object as soon as the query is executed. //! The return value is then processed in ProcessQueryCallback methods. - QueryResultFuture AsyncPQuery(const char* sql, ...) + template + QueryResultFuture AsyncPQuery(const char* sql, Args const&... args) { - va_list ap; - char szQuery[MAX_QUERY_LEN]; - va_start(ap, sql); - vsnprintf(szQuery, MAX_QUERY_LEN, sql, ap); - va_end(ap); - - return AsyncQuery(szQuery); + return AsyncQuery(Trinity::StringFormat(sql, args...).c_str()); } //! Enqueues a query in prepared format that will set the value of the PreparedQueryResultFuture return object as soon as the query is executed. diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp index 75b96e1996c..2fdb3825526 100644 --- a/src/server/shared/Database/QueryHolder.cpp +++ b/src/server/shared/Database/QueryHolder.cpp @@ -40,29 +40,6 @@ bool SQLQueryHolder::SetQuery(size_t index, const char *sql) return true; } -bool SQLQueryHolder::SetPQuery(size_t index, const char *format, ...) -{ - if (!format) - { - TC_LOG_ERROR("sql.sql", "Query (index: %u) is empty.", uint32(index)); - return false; - } - - va_list ap; - char szQuery [MAX_QUERY_LEN]; - va_start(ap, format); - int res = vsnprintf(szQuery, MAX_QUERY_LEN, format, ap); - va_end(ap); - - if (res == -1) - { - TC_LOG_ERROR("sql.sql", "SQL Query truncated (and not execute) for format: %s", format); - return false; - } - - return SetQuery(index, szQuery); -} - bool SQLQueryHolder::SetPreparedQuery(size_t index, PreparedStatement* stmt) { if (m_queries.size() <= index) diff --git a/src/server/shared/Database/QueryHolder.h b/src/server/shared/Database/QueryHolder.h index 6fd1901447e..4102bba1223 100644 --- a/src/server/shared/Database/QueryHolder.h +++ b/src/server/shared/Database/QueryHolder.h @@ -29,8 +29,9 @@ class SQLQueryHolder public: SQLQueryHolder() { } ~SQLQueryHolder(); - bool SetQuery(size_t index, const char *sql); - bool SetPQuery(size_t index, const char *format, ...) ATTR_PRINTF(3, 4); + bool SetQuery(size_t index, const char* sql); + template + bool SetPQuery(size_t index, const char* sql, Args const&... args) { return SetQuery(index, Trinity::StringFormat(sql, args...).c_str()); } bool SetPreparedQuery(size_t index, PreparedStatement* stmt); void SetSize(size_t size); QueryResult GetResult(size_t index); From c9b0c8a0ca6183f11d026fb8d6caaa7b476159ce Mon Sep 17 00:00:00 2001 From: Naios Date: Sat, 28 Mar 2015 18:55:54 +0100 Subject: [PATCH 23/86] Core/World: Remove va_list from World::RecordTimeDiff. * also split it in ResetTimeDiffRecord() and RecordTimeDiff() to avoid passing of null values. --- src/server/game/World/World.cpp | 26 +++++++++++--------------- src/server/game/World/World.h | 3 ++- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 84f22f2f1a9..9a84fa1670d 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1914,28 +1914,24 @@ void World::DetectDBCLang() TC_LOG_INFO("server.loading", "Using %s DBC Locale as default. All available DBC locales: %s", localeNames[m_defaultDbcLocale], availableLocalsStr.empty() ? "" : availableLocalsStr.c_str()); } -void World::RecordTimeDiff(const char *text, ...) +void World::ResetTimeDiffRecord() { if (m_updateTimeCount != 1) return; - if (!text) - { - m_currentTime = getMSTime(); + + m_currentTime = getMSTime(); +} + +void World::RecordTimeDiff(std::string const& text) +{ + if (m_updateTimeCount != 1) return; - } uint32 thisTime = getMSTime(); uint32 diff = getMSTimeDiff(m_currentTime, thisTime); if (diff > m_int_configs[CONFIG_MIN_LOG_UPDATE]) - { - va_list ap; - char str[256]; - va_start(ap, text); - vsnprintf(str, 256, text, ap); - va_end(ap); - TC_LOG_INFO("misc", "Difftime %s: %u.", str, diff); - } + TC_LOG_INFO("misc", "Difftime %s: %u.", text.c_str(), diff); m_currentTime = thisTime; } @@ -2052,7 +2048,7 @@ void World::Update(uint32 diff) } ///
  • Handle session updates when the timer has passed - RecordTimeDiff(NULL); + ResetTimeDiffRecord(); UpdateSessions(diff); RecordTimeDiff("UpdateSessions"); @@ -2099,7 +2095,7 @@ void World::Update(uint32 diff) ///
  • Handle all other objects ///- Update objects when the timer has passed (maps, transport, creatures, ...) - RecordTimeDiff(NULL); + ResetTimeDiffRecord(); sMapMgr->Update(diff); RecordTimeDiff("UpdateMapMgr"); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 95c737936bc..af89adcb04e 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -741,7 +741,8 @@ class World void LoadDBVersion(); char const* GetDBVersion() const { return m_DBVersion.c_str(); } - void RecordTimeDiff(const char * text, ...); + void ResetTimeDiffRecord(); + void RecordTimeDiff(std::string const& text); void LoadAutobroadcasts(); From 1939367108b50eb1de2bb0a9cc017eea6423cf29 Mon Sep 17 00:00:00 2001 From: Naios Date: Sat, 28 Mar 2015 19:10:21 +0100 Subject: [PATCH 24/86] Core/Database: Remove va_list from PreparedStatement::PAppend. --- src/server/shared/Database/Transaction.cpp | 11 ----------- src/server/shared/Database/Transaction.h | 4 +++- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/server/shared/Database/Transaction.cpp b/src/server/shared/Database/Transaction.cpp index 9f36d198bde..f657411f716 100644 --- a/src/server/shared/Database/Transaction.cpp +++ b/src/server/shared/Database/Transaction.cpp @@ -30,17 +30,6 @@ void Transaction::Append(const char* sql) m_queries.push_back(data); } -void Transaction::PAppend(const char* sql, ...) -{ - va_list ap; - char szQuery [MAX_QUERY_LEN]; - va_start(ap, sql); - vsnprintf(szQuery, MAX_QUERY_LEN, sql, ap); - va_end(ap); - - Append(szQuery); -} - //- Append a prepared statement to the transaction void Transaction::Append(PreparedStatement* stmt) { diff --git a/src/server/shared/Database/Transaction.h b/src/server/shared/Database/Transaction.h index 83d59006ddc..43850b1d016 100644 --- a/src/server/shared/Database/Transaction.h +++ b/src/server/shared/Database/Transaction.h @@ -19,6 +19,7 @@ #define _TRANSACTION_H #include "SQLOperation.h" +#include "StringFormat.h" //- Forward declare (don't include header to prevent circular includes) class PreparedStatement; @@ -38,7 +39,8 @@ class Transaction void Append(PreparedStatement* statement); void Append(const char* sql); - void PAppend(const char* sql, ...); + template + void PAppend(const char* sql, Args const&... args) { Append(Trinity::StringFormat(sql, args...).c_str()); } size_t GetSize() const { return m_queries.size(); } From 93fa363d9a373db05fde66440e253bc55d64d696 Mon Sep 17 00:00:00 2001 From: MitchesD Date: Thu, 2 Apr 2015 21:27:27 +0200 Subject: [PATCH 25/86] Core/SAI: fix typo (cherry picked from commit 9ed21eb5b176986dd73c2a467e665fe449499155) --- src/server/game/AI/SmartScripts/SmartScript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 35538d2a489..a5698092d69 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -3215,7 +3215,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui } case SMART_EVENT_COUNTER_SET: if (GetCounterId(e.event.counter.id) != 0 && GetCounterValue(e.event.counter.id) == e.event.counter.value) - ProcessTimedAction(e, e.event.counter.cooldownMax, e.event.counter.cooldownMax); + ProcessTimedAction(e, e.event.counter.cooldownMin, e.event.counter.cooldownMax); break; default: TC_LOG_ERROR("sql.sql", "SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType()); From 30d84fef4c072ca5889ad16cd913e751fe9e6b9a Mon Sep 17 00:00:00 2001 From: Dr-J Date: Thu, 2 Apr 2015 22:52:49 +0100 Subject: [PATCH 26/86] DB/Misc: Missing Spawns & Gossip Missing spawns and gossip menus for Karazhan Chess (note this encounter still is not scripted) this adds the missing npcs and gossip menus for these npcs, Adds missing data for https://github.com/TrinityCore/TrinityCore/issues/7938 but does not close it. --- sql/updates/world/2015_04_02_00_world.sql | 82 +++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sql/updates/world/2015_04_02_00_world.sql diff --git a/sql/updates/world/2015_04_02_00_world.sql b/sql/updates/world/2015_04_02_00_world.sql new file mode 100644 index 00000000000..683e5c01250 --- /dev/null +++ b/sql/updates/world/2015_04_02_00_world.sql @@ -0,0 +1,82 @@ +SET @CGUID := 76018; + +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+31; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 21664, 532, 3, 1, -11086.92, -1899.176, 220.7505, 0.7330383, 7200, 0, 0), -- 21664 (Area: 3457) (Auras: ) +(@CGUID+1, 21664, 532, 3, 1, -11104.63, -1877.507, 220.7505, 0.6806784, 7200, 0, 0), -- 21664 (Area: 3457) (Auras: ) +(@CGUID+2, 17469, 532, 3, 1, -11064.65, -1874.336, 220.7505, 3.839724, 7200, 0, 0), -- 17469 (Area: 3457) (Auras: ) +(@CGUID+3, 17211, 532, 3, 1, -11089.7, -1887.114, 220.7505, 0.715585, 7200, 0, 0), -- 17211 (Area: 3457) (Auras: ) +(@CGUID+4, 17211, 532, 3, 1, -11093.26, -1882.732, 220.7505, 0.6632251, 7200, 0, 0), -- 17211 (Area: 3457) (Auras: ) +(@CGUID+5, 17211, 532, 3, 1, -11096.65, -1878.406, 220.7505, 0.6632251, 7200, 0, 0), -- 17211 (Area: 3457) (Auras: ) +(@CGUID+6, 21160, 532, 3, 1, -11083.24, -1903.355, 220.7504, 0.6632251, 7200, 0, 0), -- 21160 (Area: 3457) (Auras: 32226 - 32226) +(@CGUID+7, 17211, 532, 3, 1, -11100.17, -1873.871, 220.7505, 0.6457718, 7200, 0, 0), -- 17211 (Area: 3457) (Auras: ) +(@CGUID+8, 17211, 532, 3, 1, -11079.32, -1900.23, 220.7504, 0.6632251, 7200, 0, 0), -- 17211 (Area: 3457) (Auras: ) +(@CGUID+9, 17211, 532, 3, 1, -11103.67, -1869.466, 220.7505, 0.6981317, 7200, 0, 0), -- 17211 (Area: 3457) (Auras: ) +(@CGUID+10, 17469, 532, 3, 1, -11068.14, -1869.956, 220.7505, 3.892084, 7200, 0, 0), -- 17469 (Area: 3457) (Auras: ) +(@CGUID+11, 17211, 532, 3, 1, -11082.71, -1895.736, 220.7505, 0.6632251, 7200, 0, 0), -- 17211 (Area: 3457) (Auras: ) +(@CGUID+12, 17469, 532, 3, 1, -11071.65, -1865.527, 220.7505, 3.822271, 7200, 0, 0), -- 17469 (Area: 3457) (Auras: ) +(@CGUID+13, 17211, 532, 3, 1, -11086.31, -1891.324, 220.7505, 0.6457718, 7200, 0, 0), -- 17211 (Area: 3457) (Auras: 32226 - 32226) +(@CGUID+14, 17469, 532, 3, 1, -11075.02, -1861.288, 220.7505, 3.735005, 7200, 0, 0), -- 17469 (Area: 3457) (Auras: ) +(@CGUID+15, 17469, 532, 3, 1, -11078.52, -1856.995, 220.7505, 3.892084, 7200, 0, 0), -- 17469 (Area: 3457) (Auras: 32226 - 32226) +(@CGUID+16, 21726, 532, 3, 1, -11053.46, -1879.717, 220.7505, 4.014257, 7200, 0, 0), -- 21726 (Area: 3457) (Auras: ) +(@CGUID+17, 17469, 532, 3, 1, -11057.62, -1883.089, 220.7505, 3.804818, 7200, 0, 0), -- 17469 (Area: 3457) (Auras: ) +(@CGUID+18, 17469, 532, 3, 1, -11082.03, -1852.191, 220.7505, 3.804818, 7200, 0, 0), -- 17469 (Area: 3457) (Auras: ) +(@CGUID+19, 21747, 532, 3, 1, -11060.35, -1870.903, 220.7505, 3.804818, 7200, 0, 0), -- 21747 (Area: 3457) (Auras: ) +(@CGUID+20, 21748, 532, 3, 1, -11056.89, -1875.286, 220.7505, 3.665191, 7200, 0, 0), -- 21748 (Area: 3457) (Auras: ) +(@CGUID+21, 21726, 532, 3, 1, -11077.72, -1848.789, 220.7505, 3.909538, 7200, 0, 0), -- 21726 (Area: 3457) (Auras: ) +(@CGUID+22, 17469, 532, 3, 1, -11061.3, -1878.629, 220.7505, 3.909538, 7200, 0, 0), -- 17469 (Area: 3457) (Auras: ) +(@CGUID+23, 21747, 532, 3, 1, -11070.86, -1857.749, 220.7505, 3.839724, 7200, 0, 0), -- 21747 (Area: 3457) (Auras: ) +(@CGUID+24, 21748, 532, 3, 1, -11074.35, -1853.261, 220.7505, 3.735005, 7200, 0, 0), -- 21748 (Area: 3457) (Auras: ) +(@CGUID+25, 21750, 532, 3, 1, -11067.6, -1861.944, 220.7505, 3.839724, 7200, 0, 0), -- 21750 (Area: 3457) (Auras: ) +(@CGUID+26, 21752, 532, 3, 1, -11063.64, -1866.364, 220.7505, 3.822271, 7200, 0, 0), -- 21752 (Area: 3457) (Auras: 32226 - 32226) +(@CGUID+27, 21160, 532, 3, 1, -11107.91, -1873.032, 220.7505, 0.715585, 7200, 0, 0), -- 21160 (Area: 3457) (Auras: ) +(@CGUID+28, 21682, 532, 3, 1, -11101.01, -1881.932, 220.7505, 0.6632251, 7200, 0, 0), -- 21682 (Area: 3457) (Auras: ) +(@CGUID+29, 21683, 532, 3, 1, -11097.45, -1886.197, 220.7505, 0.7853982, 7200, 0, 0), -- 21683 (Area: 3457) (Auras: 32226 - 32226) +(@CGUID+30, 21682, 532, 3, 1, -11090.56, -1894.994, 220.7505, 0.6283185, 7200, 0, 0), -- 21682 (Area: 3457) (Auras: ) +(@CGUID+31, 21684, 532, 3, 1, -11093.84, -1890.473, 220.7505, 0.6981317, 7200, 0, 0); -- 21684 (Area: 3457) (Auras: ) + +DELETE FROM `gossip_menu` WHERE `entry` IN(8404,8368,8354,8355,8366,8362,8367,7413,8345,8346,8347,8349,8348); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(8404,10506), -- 16816 +(8404,10718), -- 16816 +(8368,10442), -- 21752 +(8354,10425), -- 17469 +(8355,10426), -- 21726 +(8366,10439), -- 21748 +(8362,10434), -- 21747 +(8367,10440), -- 21750 +(7413,8952), -- 17211 +(8345,10413), -- 21160 +(8346,10414), -- 21664 +(8347,10416), -- 21682 +(8349,10418), -- 21684 +(8348,10417); -- 21683 + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN(8404,8368,8354,8355,8366,8362,8367,7413,8345,8346,8347,8349,8348); +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 +(8368, 0, 0, 'Control Warchief Blackhand', 19384, 1, 1, 0, 0, 0, 0, NULL, 0), +(8349, 0, 0, 'Control King Llane', 19297, 1, 1, 0, 0, 0, 0, NULL, 0), +(8354, 0, 0, 'Control Orc Grunt', 19320, 1, 1, 0, 0, 0, 0, NULL, 0), +(8355, 0, 0, 'Control Summoned Daemon', 19323, 1, 1, 0, 0, 0, 0, NULL, 0), +(8366, 0, 0, 'Control Orc Wolf', 19375, 1, 1, 0, 0, 0, 0, NULL, 0), +(8362, 0, 0, 'Control Orc Necrolyte', 19367, 1, 1, 0, 0, 0, 0, NULL, 0), +(8367, 0, 0, 'Control Orc Warlock', 19377, 1, 1, 0, 0, 0, 0, NULL, 0), +(7413, 0, 0, 'Control Human Footman', 14008, 1, 1, 0, 0, 0, 0, NULL, 0), +(8345, 0, 0, 'Control Conjured Water Elemental.', 19285, 1, 1, 0, 0, 0, 0, NULL, 0), +(8346, 0, 0, 'Control Human Charger.', 19288, 1, 1, 0, 0, 0, 0, NULL, 0), +(8347, 0, 0, 'Control Human Cleric', 19293, 1, 1, 0, 0, 0, 0, NULL, 0), +(8348, 0, 0, 'Control Human Conjurer', 19295, 1, 1, 0, 0, 0, 0, NULL, 0); + +UPDATE `creature_template` SET `gossip_menu_id`=8404 WHERE `entry`=16816; +UPDATE `creature_template` SET `gossip_menu_id`=8368 WHERE `entry`=21752; +UPDATE `creature_template` SET `gossip_menu_id`=8354 WHERE `entry`=17469; +UPDATE `creature_template` SET `gossip_menu_id`=8355 WHERE `entry`=21726; +UPDATE `creature_template` SET `gossip_menu_id`=8366 WHERE `entry`=21748; +UPDATE `creature_template` SET `gossip_menu_id`=8362 WHERE `entry`=21747; +UPDATE `creature_template` SET `gossip_menu_id`=8367 WHERE `entry`=21750; +UPDATE `creature_template` SET `gossip_menu_id`=7413 WHERE `entry`=17211; +UPDATE `creature_template` SET `gossip_menu_id`=8345 WHERE `entry`=21160; +UPDATE `creature_template` SET `gossip_menu_id`=8346 WHERE `entry`=21664; +UPDATE `creature_template` SET `gossip_menu_id`=8347 WHERE `entry`=21682; +UPDATE `creature_template` SET `gossip_menu_id`=8348 WHERE `entry`=21683; + From f4e9cbd29494d31523e623fe21b78b0f927278a0 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Thu, 2 Apr 2015 23:10:05 +0100 Subject: [PATCH 27/86] DB/NPC: Legion Hold scripts and event By @Killyana Closes #14488 --- sql/updates/world/2015_04_02_01_world.sql | 86 +++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sql/updates/world/2015_04_02_01_world.sql diff --git a/sql/updates/world/2015_04_02_01_world.sql b/sql/updates/world/2015_04_02_01_world.sql new file mode 100644 index 00000000000..135ad4aba65 --- /dev/null +++ b/sql/updates/world/2015_04_02_01_world.sql @@ -0,0 +1,86 @@ +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (21302, 21316, 20683, 21314, 21500, 19740, 19755, 21499, 21501, 21305); +UPDATE `creature_template_addon` SET `emote`=0 WHERE `entry`=21302; +UPDATE `creature_addon` SET `emote`=0 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id`=21302); +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=21316; +UPDATE `creature` SET `position_x`= -3441.672363, `position_y`= 2950.212646, `position_z`= 171.877686, `orientation`= 6.151093 WHERE `guid`= 74657; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-74662, -74651, 21305, 21501, 21499, 19755, 19740, 21500, 21314, 21302, 20683) AND `source_type` = 0 ; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (21316*100, 21316*100+1) 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 +(21302,0,0,0,25,0,100,0,0,0,0,0,11,33346,0,0,0,0,0,19,21348,15,0,0,0,0,0,'Shadow Council Warlock - On Reset - Cast Green Beam'), +(21302,0,1,0,1,0,100,1,0,0,0,0,11,33346,0,0,0,0,0,19,21348,15,0,0,0,0,0,'Shadow Council Warlock- OOC - Cast Green Beam (No repeat)'), +(21302,0,2,0,0,0,100,0,1000,2000,5000,7000,11,9613,0,0,0,0,0,2,0,0,0,0,0,0,0,'Shadow Council Warlock- IC - Cast Shadow Bolt'), +(21302,0,3,0,0,0,100,0,6000,8000,10000,12000,11,37992,0,0,0,0,0,2,0,0,0,0,0,0,0,'Shadow Council Warlock- IC - Cast Drain Life'), +(19755,0,0,0,0,0,100,0,4000,5000,15000,17000,11,36253,0,0,0,0,0,2,0,0,0,0,0,0,0,'Mo''arg Weaponsmith- IC - Chemical Flames'), +(19755,0,1,0,0,0,100,0,6000,8000,10000,12000,11,37580,0,0,0,0,0,2,0,0,0,0,0,0,0,'Mo''arg Weaponsmith - IC - Drill Armor'), +(21499,0,0,0,0,0,100,0,4000,5000,15000,17000,11,35321,0,0,0,0,0,2,0,0,0,0,0,0,0,'Overseer Ripsaw - IC - Gushing Wound'), +(21499,0,1,0,0,0,100,0,6000,8000,9000,11000,11,32735,0,0,0,0,0,2,0,0,0,0,0,0,0,'Overseer Ripsaw - IC - Saw Blade'), +(21305,0,0,0,0,0,100,0,4000,5000,10000,12000,11,37950,0,0,0,0,0,2,0,0,0,0,0,0,0,'Mutant Horror - IC - Mutant Horror'), +(21305,0,1,0,0,0,100,0,15000,15000,15000,15000,11,8599,0,0,0,0,0,2,0,0,0,0,0,0,0,'Mutant Horror - IC - Enrage'), +(19740,0,0,0,0,0,100,0,1000,2000,9000,13000,11,33799,0,0,0,0,0,2,0,0,0,0,0,0,0,'wrathwalker - IC - Cast Flame Wave'), +(20683,0,0,0,0,0,100,0,1000,2000,15000,17000,11,37629,0,0,0,0,0,2,0,0,0,0,0,0,0,'Prophetess Cavrylin - IC - Cast Melt Flesh'), +(20683,0,1,0,0,0,100,0,6000,8000,10000,12000,11,37997,0,0,0,0,0,2,0,0,0,0,0,0,0,'Prophetess Cavrylin - IC - Cast Chaos Nova'), +(21314,0,0,0,0,0,100,0,1000,2000,4000,7000,11,15496,0,0,0,0,0,2,0,0,0,0,0,0,0,'Terrormaster - IC - Cast Cleave'), +(21314,0,1,0,0,0,100,0,9000,12000,20000,25000,11,38154,0,0,0,0,0,2,0,0,0,0,0,0,0,'Terrormaster - IC - Cast Fear'), +(21500,0,0,0,0,0,100,0,1000,2000,6000,9000,11,22859,0,0,0,0,0,2,0,0,0,0,0,0,0,'Morgroron - IC - Cast Mortal Cleave'), +(21500,0,1,0,0,0,100,0,12000,15000,20000,25000,11,38741,0,0,0,0,0,2,0,0,0,0,0,0,0,'Morgroron - IC - Rain of Fire'), +(21500,0,2,0,0,0,100,0,5000,7000,10000,13000,11,38750,0,0,0,0,0,2,0,0,0,0,0,0,0,'Morgroron - IC - War Stomp'), +(21501,0,0,0,0,0,100,0,1000,2000,8000,12000,11,11443,0,0,0,0,0,2,0,0,0,0,0,0,0,'Makazradon - IC - Cripple'), +(21501,0,1,0,0,0,100,0,4000,5000,7000,10000,11,38742,0,0,0,0,0,2,0,0,0,0,0,0,0,'Makazradon - IC - Fel Cleave'), +(21501,0,2,0,0,0,100,0,12000,15000,20000,25000,11,38741,0,0,0,0,0,2,0,0,0,0,0,0,0,'Makazradon - IC - Rain of Fire'), +(-74662,0,0,0,1,0,100,0,120000,120000,240000,240000,80,21316*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - OOC - Action list'), +(-74651,0,0,0,1,0,100,0,180000,180000,300000,300000,80,21316*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - OOC - Action liist'), +(-74662,0,1,0,40,0,100,0,1,7466200,0,0,54,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint1 - pause wp)'), +(-74651,0,1,0,40,0,100,0,1,7465100,0,0,54,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint1 - pause wp)'), +(-74662,0,2,0,40,0,100,0,2,7466200,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint2 - Set visible off'), +(-74651,0,2,0,40,0,100,0,2,7465100,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint2 - Set visible off'), +(-74662,0,3,4,40,0,100,0,3,7466200,0,0,28,36658,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint3 - Remove aura)'), +(-74662,0,4,5,61,0,100,0,0,0,0,0,47,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint3 - Set visible on'), +(-74662,0,5,6,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,6.265730,'Deathforged Infernal - On waypoint3 - Set orientation'), +(-74662,0,6,7,61,0,100,0,0,0,0,0,60,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint3 - Set fly Off'), +(-74662,0,7,0,61,0,100,0,0,0,0,0,11,16245,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint3 - Cast spell'), +(-74651,0,3,4,40,0,100,0,3,7465100,0,0,28,36658,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint1 - Remove aura)'), +(-74651,0,4,5,61,0,100,0,0,0,0,0,47,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint3 - Set visible on'), +(-74651,0,5,6,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.468040,'Deathforged Infernal - On waypoint3 - Set orientation'), +(-74651,0,6,7,61,0,100,0,0,0,0,0,60,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint3 - Set fly Off'), +(-74651,0,7,0,61,0,100,0,0,0,0,0,11,16245,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - On waypoint3 - Cast spell'), +(21316*100,9,0,0,0,0,100,0,0,0,0,0,60,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Set fly off'), +(21316*100,9,1,0,0,0,100,0,0,0,0,0,28,16245,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Remove aura'), +(21316*100,9,2,0,0,0,100,0,0,0,0,0,53,1,7466200,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - start wp'), +(21316*100,9,3,0,0,0,100,0,13000,13000,0,0,86,33346,0,19,20683,15,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Cross cast'), +(21316*100,9,4,0,0,0,100,0,3000,3000,0,0,86,36656,0,19,20683,15,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Cross cast'), +(21316*100,9,5,0,0,0,100,0,0,0,0,0,11,36658,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Cast Transform'), +(21316*100,9,6,0,0,0,100,0,0,0,0,0,60,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Set fly On'), +(21316*100+1,9,0,0,0,0,100,0,0,0,0,0,60,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Set fly off'), +(21316*100+1,9,1,0,0,0,100,0,0,0,0,0,28,16245,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Remove aura'), +(21316*100+1,9,2,0,0,0,100,0,0,0,0,0,53,1,7465100,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - start wp'), +(21316*100+1,9,3,0,0,0,100,0,12000,12000,0,0,86,33346,0,19,20683,15,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Cross cast'), +(21316*100+1,9,4,0,0,0,100,0,3000,3000,0,0,86,36656,0,19,20683,15,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Cross cast'), +(21316*100+1,9,5,0,0,0,100,0,0,0,0,0,11,36658,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Cast Transform'), +(21316*100+1,9,6,0,0,0,100,0,0,0,0,0,60,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Deathforged Infernal - Action list - Set fly On'); + +DELETE FROM `waypoints` WHERE `entry` IN(7466200, 7465100); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(7466200, 1, -3411.152100, 2979.670410, 169.896851, 'Deathforged Infernal'), +(7466200, 2, -3411.152100, 2979.670410, 293.973755, 'Deathforged Infernal'), +(7466200, 3, -3441.462891, 2974.701172, 171.833115, 'Deathforged Infernal'), +(7465100, 1, -3411.152100, 2979.670410, 169.896851, 'Deathforged Infernal'), +(7465100, 2, -3411.152100, 2979.670410, 293.973755, 'Deathforged Infernal'), +(7465100, 3, -3408.362061, 3007.351807, 171.597610, 'Deathforged Infernal'); + + +UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=74602; +DELETE FROM `creature_addon` WHERE `guid`=74602; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (74602,746020,0,0,4097,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=746020; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(746020,1,-3374.98, 3001.77, 170.893,0,0,0,0,100,0), +(746020,2,-3423.57, 3005.07, 171.273,0,0,0,0,100,0); + +UPDATE `creature` SET `spawndist`=0,`MovementType`=2 WHERE `guid`=74601; +DELETE FROM `creature_addon` WHERE `guid`=74601; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (74601,746010,0,0,4097,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=746010; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(746010, 1, -3438.26, 2988.15, 171.462, 0, 0, 0, 0, 100, 0), +(746010, 2, -3437.38, 2950.23, 171.240, 0, 0, 0, 0, 100, 0); From ba1415dd164c813b8942ec08eb44250a973154cf Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 3 Apr 2015 08:18:52 +0200 Subject: [PATCH 28/86] DB/Misc: Fix startup errors --- sql/updates/world/2015_04_03_00_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2015_04_03_00_world.sql diff --git a/sql/updates/world/2015_04_03_00_world.sql b/sql/updates/world/2015_04_03_00_world.sql new file mode 100644 index 00000000000..b7471bb9b77 --- /dev/null +++ b/sql/updates/world/2015_04_03_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature` SET `spawnMask`=1 WHERE `map`=532; From b804539f9be34f521c048620da78f604868f28f8 Mon Sep 17 00:00:00 2001 From: click Date: Fri, 3 Apr 2015 08:52:52 +0200 Subject: [PATCH 29/86] Core/Script: Remove script for Overlord Mor'ghor - converted to SAI in commit 16179f8 --- .../Outland/zone_shadowmoon_valley.cpp | 327 ------------------ 1 file changed, 327 deletions(-) diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index c661e19a98d..318214978ae 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -31,7 +31,6 @@ npc_enslaved_netherwing_drake npc_drake_dealer_hurlunk npcs_flanis_swiftwing_and_kagrosh npc_karynaku -npc_overlord_morghor npc_earthmender_wilda npc_torloth_the_magnificent npc_illidari_spawn @@ -676,331 +675,6 @@ class npc_karynaku : public CreatureScript } }; -/*#### -# npc_overlord_morghor -# this whole script is wrong and needs a rewrite.even the illidan npc used is the wrong one.npc id 23467 may be the correct one -####*/ -enum OverlordData -{ - QUEST_LORD_ILLIDAN_STORMRAGE = 11108, - - C_ILLIDAN = 22083, - C_YARZILL = 23141, - - SPELL_ONE = 39990, // Red Lightning Bolt - SPELL_TWO = 41528, // Mark of Stormrage - SPELL_THREE = 40216, // Dragonaw Faction - SPELL_FOUR = 42016, // Dragonaw Trasform - - OVERLORD_SAY_1 = 0, - OVERLORD_SAY_2 = 1, - //OVERLORD_SAY_3 = 2, - OVERLORD_SAY_4 = 3, - OVERLORD_SAY_5 = 4, - OVERLORD_SAY_6 = 5, - - OVERLORD_YELL_1 = 6, - OVERLORD_YELL_2 = 7, - - LORD_ILLIDAN_SAY_1 = 0, - LORD_ILLIDAN_SAY_2 = 1, - LORD_ILLIDAN_SAY_3 = 2, - LORD_ILLIDAN_SAY_4 = 3, - LORD_ILLIDAN_SAY_5 = 4, - LORD_ILLIDAN_SAY_6 = 5, - LORD_ILLIDAN_SAY_7 = 6, - - YARZILL_THE_MERC_SAY = 0 -}; - -class npc_overlord_morghor : public CreatureScript -{ -public: - npc_overlord_morghor() : CreatureScript("npc_overlord_morghor") { } - - bool OnQuestAccept(Player* player, Creature* creature, const Quest *_Quest) override - { - if (_Quest->GetQuestId() == QUEST_LORD_ILLIDAN_STORMRAGE) - { - ENSURE_AI(npc_overlord_morghor::npc_overlord_morghorAI, creature->AI())->PlayerGUID = player->GetGUID(); - ENSURE_AI(npc_overlord_morghor::npc_overlord_morghorAI, creature->AI())->StartEvent(); - return true; - } - return false; - } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_overlord_morghorAI(creature); - } - - struct npc_overlord_morghorAI : public ScriptedAI - { - npc_overlord_morghorAI(Creature* creature) : ScriptedAI(creature) - { - Initialize(); - } - - void Initialize() - { - PlayerGUID.Clear(); - IllidanGUID.Clear(); - - ConversationTimer = 0; - Step = 0; - - Event = false; - } - - ObjectGuid PlayerGUID; - ObjectGuid IllidanGUID; - - uint32 ConversationTimer; - uint32 Step; - - bool Event; - - void Reset() override - { - Initialize(); - me->SetUInt32Value(UNIT_NPC_FLAGS, 2); - } - - void StartEvent() - { - me->SetUInt32Value(UNIT_NPC_FLAGS, 0); - me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - Unit* Illidan = me->SummonCreature(C_ILLIDAN, -5107.83f, 602.584f, 85.2393f, 4.92598f, TEMPSUMMON_CORPSE_DESPAWN, 0); - if (Illidan) - { - IllidanGUID = Illidan->GetGUID(); - Illidan->SetVisible(false); - } - if (PlayerGUID) - { - Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID); - if (player) - Talk(OVERLORD_SAY_1, player); - } - ConversationTimer = 4200; - Step = 0; - Event = true; - } - - uint32 NextStep(uint32 Step) - { - Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID); - Creature* Illi = ObjectAccessor::GetCreature(*me, IllidanGUID); - - if (!player) - { - EnterEvadeMode(); - return 0; - } - - switch (Step) - { - case 0: - return 0; - break; - case 1: - me->GetMotionMaster()->MovePoint(0, -5104.41f, 595.297f, 85.6838f); - return 9000; - break; - case 2: - Talk(OVERLORD_YELL_1, player); - return 4500; - break; - case 3: - me->SetInFront(player); - return 3200; - break; - case 4: - Talk(OVERLORD_SAY_2, player); - return 2000; - break; - case 5: - if (Illi) - { - Illi->SetVisible(true); - Illi->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Illi->SetDisplayId(21526); - } - return 350; - break; - case 6: - if (Illi) - { - Illi->CastSpell(Illi, SPELL_ONE, true); - Illi->SetTarget(me->GetGUID()); - me->SetTarget(IllidanGUID); - } - return 2000; - break; - case 7: - Talk(OVERLORD_YELL_2); - return 4500; - break; - case 8: - me->SetUInt32Value(UNIT_FIELD_BYTES_1, 8); - return 2500; - break; - case 9: - // missing text "Lord Illidan, this is the Dragonmaw that I, and others, have told you about. He will lead us to victory!" - return 5000; - break; - case 10: - if (Illi) - Illi->AI()->Talk(LORD_ILLIDAN_SAY_1); - return 5000; - break; - case 11: - Talk(OVERLORD_SAY_4, player); - return 6000; - break; - case 12: - if (Illi) - Illi->AI()->Talk(LORD_ILLIDAN_SAY_2); - return 5500; - break; - case 13: - if (Illi) - Illi->AI()->Talk(LORD_ILLIDAN_SAY_3); - return 4000; - break; - case 14: - if (Illi) - Illi->SetTarget(PlayerGUID); - return 1500; - break; - case 15: - if (Illi) - Illi->AI()->Talk(LORD_ILLIDAN_SAY_4); - return 1500; - break; - case 16: - if (Illi) - Illi->CastSpell(player, SPELL_TWO, true); - player->RemoveAurasDueToSpell(SPELL_THREE); - player->RemoveAurasDueToSpell(SPELL_FOUR); - return 5000; - break; - case 17: - if (Illi) - Illi->AI()->Talk(LORD_ILLIDAN_SAY_5); - return 5000; - break; - case 18: - if (Illi) - Illi->AI()->Talk(LORD_ILLIDAN_SAY_6); - return 5000; - break; - case 19: - if (Illi) - Illi->AI()->Talk(LORD_ILLIDAN_SAY_7); - return 5000; - break; - case 20: - if (Illi) - { - Illi->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); - Illi->SetDisableGravity(true); - } - return 500; - break; - case 21: - Talk(OVERLORD_SAY_5); - return 500; - break; - case 22: - if (Illi) - { - Illi->SetVisible(false); - Illi->setDeathState(JUST_DIED); - } - return 1000; - break; - case 23: - me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - return 2000; - break; - case 24: - me->SetTarget(PlayerGUID); - return 5000; - break; - case 25: - Talk(OVERLORD_SAY_6); - return 2000; - break; - case 26: - player->GroupEventHappens(QUEST_LORD_ILLIDAN_STORMRAGE, me); - return 6000; - break; - case 27: - { - Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f); - if (Yarzill) - Yarzill->SetTarget(PlayerGUID); - return 500; - } - break; - case 28: - player->RemoveAurasDueToSpell(SPELL_TWO); - player->RemoveAurasDueToSpell(41519); - player->CastSpell(player, SPELL_THREE, true); - player->CastSpell(player, SPELL_FOUR, true); - return 1000; - break; - case 29: - { - if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f)) - Yarzill->AI()->Talk(YARZILL_THE_MERC_SAY, player); - return 5000; - } - break; - case 30: - { - if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f)) - Yarzill->SetTarget(ObjectGuid::Empty); - return 5000; - } - break; - case 31: - { - if (Creature* Yarzill = me->FindNearestCreature(C_YARZILL, 50.0f)) - Yarzill->CastSpell(player, 41540, true); - return 1000; - } - break; - case 32: - me->GetMotionMaster()->MovePoint(0, -5085.77f, 577.231f, 86.6719f); - return 5000; - break; - case 33: - me->SetTarget(ObjectGuid::Empty); - Reset(); - return 100; - break; - default : - return 0; - break; - } - } - - void UpdateAI(uint32 diff) override - { - if (!ConversationTimer) - return; - - if (ConversationTimer <= diff) - { - if (Event && PlayerGUID) - ConversationTimer = NextStep(++Step); - } else ConversationTimer -= diff; - } - }; -}; - /*#### # npc_earthmender_wilda ####*/ @@ -2026,7 +1700,6 @@ void AddSC_shadowmoon_valley() new npc_drake_dealer_hurlunk(); new npcs_flanis_swiftwing_and_kagrosh(); new npc_karynaku(); - new npc_overlord_morghor(); new npc_earthmender_wilda(); new npc_lord_illidan_stormrage(); new go_crystal_prison(); From 51319846b019c9de33ee6bdc76a21c7eae6519d1 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Fri, 3 Apr 2015 16:13:01 +0100 Subject: [PATCH 30/86] DB/Misc: Depreciated Quests Disable some quests which had not been takable on retail since patch 1.8 when Korrak was removed from Alterac Valley, these quests later became completable after patch 3.0.2 but only if player still had quest in log from before was removed * The Legend of Korrak * Korrak the Bloodrager * The Return of Korrak * Korrak the Everliving --- sql/updates/world/2015_04_03_01_world.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/2015_04_03_01_world.sql diff --git a/sql/updates/world/2015_04_03_01_world.sql b/sql/updates/world/2015_04_03_01_world.sql new file mode 100644 index 00000000000..18bb069439a --- /dev/null +++ b/sql/updates/world/2015_04_03_01_world.sql @@ -0,0 +1,6 @@ +DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN(7181,7202,7381,7382); +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(1, 7181, 0, '', '', 'Deprecated quest'), +(1, 7202, 0, '', '', 'Deprecated quest'), +(1, 7381, 0, '', '', 'Deprecated quest'), +(1, 7382, 0, '', '', 'Deprecated quest'); From 5f033694dac42b910a5edd5c77037762105da2a5 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 3 Apr 2015 21:30:09 +0200 Subject: [PATCH 31/86] DB/Quest: Killing Two Scourge With One Skeleton By Kilyana, closes #10475 --- sql/updates/world/2015_04_03_02_world.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/2015_04_03_02_world.sql diff --git a/sql/updates/world/2015_04_03_02_world.sql b/sql/updates/world/2015_04_03_02_world.sql new file mode 100644 index 00000000000..30198348624 --- /dev/null +++ b/sql/updates/world/2015_04_03_02_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `smart_scripts` SET `event_type`=23, `event_param1`=58627, `comment`="Burning Skeleton - On has aura - Cast 'Immolation'" WHERE `entryorguid`=31048 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `comment`="Burning Skeleton - On has aura - Cast 'Skeleton Check Master'" WHERE `entryorguid`=31048 AND `source_type`=0 AND `id`=1; From ba4614543cc5d7b548cf342149d2d86cd95f8dc2 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 3 Apr 2015 21:32:41 +0200 Subject: [PATCH 32/86] DB/Creature: Time Watcher By Killyana, closes #4167 --- sql/updates/world/2015_04_03_03_world.sql | 104 ++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 sql/updates/world/2015_04_03_03_world.sql diff --git a/sql/updates/world/2015_04_03_03_world.sql b/sql/updates/world/2015_04_03_03_world.sql new file mode 100644 index 00000000000..175fdcb89ca --- /dev/null +++ b/sql/updates/world/2015_04_03_03_world.sql @@ -0,0 +1,104 @@ +-- +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (20142, 19918, 20069, 19959); +UPDATE `creature_template` SET `scale`=1.5 WHERE `Entry`=19959; +UPDATE `creature_addon` SET `bytes2`=4097 WHERE `guid` IN (23472, 23473); +UPDATE `creature_addon` SET `auras`="34712" WHERE `guid`=23078; +UPDATE `creature` SET `modelid`=0 WHERE `guid` = 23597; +UPDATE `creature` SET `modelid`=19278 WHERE `guid` = 23459; +UPDATE `creature` SET `modelid`=19282 WHERE `guid` = 23460; +UPDATE `creature` SET `modelid`=19280 WHERE `guid` = 23461; +UPDATE `creature` SET `modelid`=19281 WHERE `guid` = 23462; +DELETE FROM `creature_addon` WHERE `guid` IN (23441, 23428, 23431, 23430, 23434, 23427); +DELETE FROM `creature` WHERE `guid` IN (23428, 23441, 23431, 23430, 23434, 23427); +UPDATE `creature` SET `spawndist`=15 WHERE `id`=19918; + +SET @Andormu:= 19932; +SET @Nozari:= 19933; + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (19918, @Andormu, @Nozari); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-23440, -23439, -23438, -23437, -23436, -23433, -23432, -23429, -23426, @Nozari, @Nozari*100, 19918*100+1, 19918*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 +(@Nozari,0,0,0,1,0,100,0,60000,60000,900000,900000,80,@Nozari*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Nozari - OOC - Action list"), +(@Nozari*100,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,"Nozari - Action list - Talk"), +(@Nozari*100,9,1,0,0,0,100,0,4000,4000,0,0,1,0,0,0,0,0,0,19,@Andormu,15,0,0,0,0,0,"Nozari - Action list - Talk"), +(@Nozari*100,9,2,0,0,0,100,0,7000,7000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Nozari - Action list - Talk"), +(@Nozari*100,9,3,0,0,0,100,0,5000,5000,0,0,1,1,0,0,0,0,0,19,@Andormu,15,0,0,0,0,0,"Nozari - Action list - Talk"), +(@Nozari*100,9,4,0,0,0,100,0,9000,9000,0,0,1,2,0,0,0,0,0,19,@Andormu,15,0,0,0,0,0,"Nozari - Action list - Talk"), +(@Nozari*100,9,5,0,0,0,100,0,7000,7000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Nozari - Action list - Talk"), +(@Nozari*100,9,6,0,0,0,100,0,10000,10000,0,0,1,3,0,0,0,0,0,19,@Andormu,15,0,0,0,0,0,"Nozari - Action list - Talk"), +(@Nozari*100,9,7,0,0,0,100,0,8000,8000,0,0,1,4,0,0,0,0,0,19,@Andormu,15,0,0,0,0,0,"Nozari - Action list - Talk"), +(@Nozari*100,9,8,0,0,0,100,0,7000,7000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Nozari - Action list - Talk"), +(@Nozari*100,9,9,0,0,0,100,0,5000,5000,0,0,1,5,0,0,0,0,0,19,@Andormu,15,0,0,0,0,0,"Nozari - Action list - Talk"), +(@Nozari*100,9,10,0,0,0,100,0,10000,10000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Nozari - Action list - Talk"), +(-23440,0,0,0,1,0,100,0,1200000,1200000,1200000,1200000,53,0,2344000,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - OOC - Start wp"), +(-23440,0,1,0,40,0,100,0,2,0,0,0,11,34699,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp2 - Cast"), +(-23440,0,2,0,58,0,100,0,6,0,0,0,80,19918*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp Ended - Action list"), +(19918*100,9,0,0,0,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - Action list - Set invisible"), +(19918*100,9,1,0,0,0,100,0,5000,5000,0,0,28,34699,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - Action list - remove aura"), +(19918*100,9,2,0,0,0,100,0,180000,180000,0,0,47,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - Action list - Set visible"), +(-23440,0,3,0,25,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On Reset - Set Active On"), +(-23438,0,0,0,1,0,100,0,1800000,1800000,1800000,1800000,53,0,2344000,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - OOC - Start wp"), +(-23438,0,1,0,40,0,100,0,2,0,0,0,11,34699,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp2 - Cast"), +(-23438,0,2,0,58,0,100,0,6,0,0,0,80,19918*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp Ended - Action list"), +(-23438,0,3,0,25,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On Reset - Set Active On"), +(-23436,0,0,0,1,0,100,0,2200000,2200000,2200000,2200000,53,0,2344000,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - OOC - Start wp"), +(-23436,0,1,0,40,0,100,0,2,0,0,0,11,34699,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp2 - Cast"), +(-23436,0,2,0,58,0,100,0,6,0,0,0,80,19918*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp Ended - Action list"), +(-23436,0,3,0,25,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On Reset - Set Active On"), +(-23433,0,0,0,1,0,100,0,2600000,2600000,2600000,2600000,53,0,2344000,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - OOC - Start wp"), +(-23433,0,1,0,40,0,100,0,2,0,0,0,11,34699,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp2 - Cast"), +(-23433,0,2,0,58,0,100,0,6,0,0,0,80,19918*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp Ended - Action list"), +(-23433,0,3,0,25,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On Reset - Set Active On"), +(-23439,0,0,0,1,0,100,0,1200000,1200000,1200000,1200000,53,1,2344001,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - OOC - Start wp"), +(-23439,0,1,0,40,0,100,0,2,0,0,0,11,34702,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp2 - Cast"), +(-23439,0,2,0,58,0,100,0,7,0,0,0,80,19918*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp Ended - Action list"), +(19918*100+1,9,0,0,0,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - Action list - Set invisible"), +(19918*100+1,9,1,0,0,0,100,0,5000,5000,0,0,28,34702,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - Action list - remove aura"), +(19918*100+1,9,2,0,0,0,100,0,180000,180000,0,0,47,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - Action list - Set visible"), +(-23439,0,3,0,25,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On Reset - Set Active On"), +(-23437,0,0,0,1,0,100,0,1800000,1800000,1800000,1800000,53,1,2344001,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - OOC - Start wp"), +(-23437,0,1,0,40,0,100,0,2,0,0,0,11,34702,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp2 - Cast"), +(-23437,0,2,0,58,0,100,0,7,0,0,0,80,19918*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp Ended - Action list"), +(-23437,0,3,0,25,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On Reset - Set Active On"), +(-23432,0,0,0,1,0,100,0,2200000,2200000,2200000,2200000,53,1,2344001,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - OOC - Start wp"), +(-23432,0,1,0,40,0,100,0,2,0,0,0,11,34702,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp2 - Cast"), +(-23432,0,2,0,58,0,100,0,7,0,0,0,80,19918*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp Ended - Action list"), +(-23432,0,3,0,25,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On Reset - Set Active On"), +(-23426,0,0,0,1,0,100,0,2600000,2600000,2600000,2600000,53,1,2344001,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - OOC - Start wp"), +(-23426,0,1,0,40,0,100,0,2,0,0,0,11,34702,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp2 - Cast"), +(-23426,0,2,0,58,0,100,0,7,0,0,0,80,19918*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp Ended - Action list"), +(-23426,0,3,0,25,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On Reset - Set Active On"), +(-23429,0,0,0,1,0,100,0,3000000,3000000,3000000,3000000,53,1,2344001,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - OOC - Start wp"), +(-23429,0,1,0,40,0,100,0,2,0,0,0,11,34702,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp2 - Cast"), +(-23429,0,2,0,58,0,100,0,7,0,0,0,80,19918*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On wp Ended - Action list"), +(-23429,0,3,0,25,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Time Watcher - On Reset - Set Active On"); + +DELETE FROM `waypoints` WHERE `entry` IN(2344000, 2344001); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(2344000, 1, -8450.692383, -4176.048340, -199.006653, 'Time Watcher'), +(2344000, 2, -8449.390625, -4160.058105, -209.984818, 'Time Watcher'), +(2344000, 3, -8448.969727, -4158.049805, -208.871887, 'Time Watcher'), +(2344000, 4, -8436.923828, -4107.062012, -209.587540, 'Time Watcher'), +(2344000, 5, -8393.622070, -4071.729736, -209.587540, 'Time Watcher'), +(2344000, 6, -8349.183594, -4058.919189, -209.033203, 'Time Watcher'), +(2344001, 1, -8340.623047, -4344.326172, -199.383408, 'Time Watcher'), +(2344001, 2, -8314.343750, -4348.677246, -209.548553, 'Time Watcher'), +(2344001, 3, -8246.214844, -4344.385742, -205.160355, 'Time Watcher'), +(2344001, 4, -8207.163086, -4307.918945, -196.205338, 'Time Watcher'), +(2344001, 5, -8186.439941, -4259.733398, -183.948654, 'Time Watcher'), +(2344001, 6, -8188.971191, -4211.268555, -174.056534, 'Time Watcher'), +(2344001, 7, -8169.538574, -4167.970703, -165.149277, 'Time Watcher'); + +DELETE FROM `creature_text` WHERE `entry` IN(@Nozari,@Andormu); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(@Nozari, 0, 0, 'Fascinating. What is it, Andormu?', 12, 0, 100, 1, 0, 0, 'Nozari',17541), +(@Nozari, 1, 0, 'Hrm, are they tampering with the timeways?', 12, 0, 100, 1, 0, 0, 'Nozari',17543), +(@Nozari, 2, 0, 'I hate it when you speak to me in that manner. I am your equal in every way, brother. Remember that the next time you are trapped amidst a temporal vortex, crying for help.', 12, 0, 100, 1, 0, 0, 'Nozari',17546), +(@Nozari, 3, 0, 'Shall we?', 12, 0, 100, 1, 0, 0, 'Nozari',17549), +(@Nozari, 4, 0, '%s nods.', 16, 0, 100, 1, 0, 0, 'Nozari',17551), +(@Andormu, 0, 0, 'Something very, very disturbing. We''re starting to see more of them across the timeways.', 12, 0, 100, 1, 0, 0, 'Andormu',17542), +(@Andormu, 1, 0, 'Nozari, I''m not talking about a greedy wizard looking to improve his station in life by making a small adjustment to the past.', 12, 0, 100, 1, 0, 0, 'Andormu',17544), +(@Andormu, 2, 0, 'These beings aren''t giving themselves the winning numbers for the Stormwind lottery, dear.', 12, 0, 100, 1, 0, 0, 'Andormu',17545), +(@Andormu, 3, 0, 'My apologies, Nozari. I have been a bit ''on edge'' as of late. These creatures are attempting to alter the timeways.', 12, 0, 100, 1, 0, 0, 'Andormu',17547), +(@Andormu, 4, 0, 'You do recall the last time that this occurred, yes? Let us hope that the master need not be involved.', 12, 0, 100, 1, 0, 0, 'Andormu',17548), +(@Andormu, 5, 0, 'Absolutely not. We must not place ourselves at risk. With the master away, we are all that is in place to keep the stream intact. Others are due to arrive any moment now. Heroes and adventurers from Azeroth...', 12, 0, 100, 1, 0, 0, 'Andormu',17550); From 61c482b9d36a0556b2a43dae18ae21fafba5c2ac Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 3 Apr 2015 21:37:02 +0200 Subject: [PATCH 33/86] DB/Quest: Elekks Are Serious Business By Killyana, closes #12518 --- sql/updates/world/2015_04_03_04_world.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/updates/world/2015_04_03_04_world.sql diff --git a/sql/updates/world/2015_04_03_04_world.sql b/sql/updates/world/2015_04_03_04_world.sql new file mode 100644 index 00000000000..2f50193e413 --- /dev/null +++ b/sql/updates/world/2015_04_03_04_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=17584; +DELETE FROM `smart_scripts` WHERE `entryorguid`=17584 AND `source_type`=0 AND `id`=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 +(17584, 0, 0, 0, 19, 0, 100, 0, 9625, 0, 0, 0, 11, 30781, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Torallius the Pack Handler - On Quest Accept - Cast credit spell 30781'); From 87ab218faab5e60af7910b72cde031e9dd46e639 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 3 Apr 2015 21:39:54 +0200 Subject: [PATCH 34/86] DB/Quest: The Journey Has Just Begun By Killyana, closes #12253 --- sql/updates/world/2015_04_03_05_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2015_04_03_05_world.sql diff --git a/sql/updates/world/2015_04_03_05_world.sql b/sql/updates/world/2015_04_03_05_world.sql new file mode 100644 index 00000000000..e56d0d607d6 --- /dev/null +++ b/sql/updates/world/2015_04_03_05_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `quest_template` SET `PrevQuestId`=24429 WHERE `Id` IN (7493,7497); From 606c443cb02697fba71bba5baf3ada57f574e28f Mon Sep 17 00:00:00 2001 From: DDuarte Date: Fri, 3 Apr 2015 20:59:15 +0100 Subject: [PATCH 35/86] Revert "Merge pull request #14424 from Rushor/Rampart" This reverts commit 22c0007b42e80fecd81eee53f856fd10decd5c05, reversing changes made to 20bc2c51f668db245d6e360486ea8743c1887fac. --- .../boss_vazruden_the_herald.cpp | 34 +++---------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 9da979d1105..a6c00c05dce 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -426,37 +426,11 @@ class boss_vazruden_the_herald : public CreatureScript if ((Nazan && Nazan->IsAlive()) || (Vazruden && Vazruden->IsAlive())) { if ((Nazan && Nazan->GetVictim()) || (Vazruden && Vazruden->GetVictim())) - { - if (Nazan->IsInCombat()) - return; - else - { - const Position Nazan_FlyAggro = { -1380.425f, 1721.026f, 90.40f, 2.426f }; - if (Nazan) - Nazan->GetMotionMaster()->MoveTakeoff(0, Nazan_FlyAggro); - } - } + return; else - { //reset, if by chance the party wipes (1st boss) - if (Vazruden && Vazruden->IsAlive()) - { - if (phase != 1) - phase = 1; - } - else - { - if (phase != 2) //reset just Nazan, Vazruden is dead - phase = 2; - } - - me->GetMotionMaster()->Clear(); // reset and move back into pos... - me->GetMotionMaster()->MovePoint(0, VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2]); - - if (phase > 2) - { - EnterEvadeMode(); - Reset(); - } + { + UnsummonAdds(); + EnterEvadeMode(); return; } } From 188f19f1c526d629960a97335786d05fec7a225d Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 3 Apr 2015 22:20:17 +0200 Subject: [PATCH 36/86] DB/Creature: Baelmon the Hound-Master By malcrom, updated by Killyana closes #6606 --- sql/updates/world/2015_04_03_06_world.sql | 131 ++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 sql/updates/world/2015_04_03_06_world.sql diff --git a/sql/updates/world/2015_04_03_06_world.sql b/sql/updates/world/2015_04_03_06_world.sql new file mode 100644 index 00000000000..77d7a82d9bb --- /dev/null +++ b/sql/updates/world/2015_04_03_06_world.sql @@ -0,0 +1,131 @@ +-- Baelmon the Hound-Master SAI +SET @ENTRY := 19747; +SET @SPELL1 := 39218; -- Baelmon Channeling (no duration) +SET @SPELL2 := 11443; -- Cripple +SET @SPELL3 := 31598; -- Rain of Fire +SET @SPELL4 := 39272; -- Summon Wrath Hound +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@ENTRY*100,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+3,@ENTRY*100+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 +(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,53,0,@ENTRY,1,0,0,2,1,0,0,0,0,0,0,0,'Baelmon the Hound-Master - On Spawn - Load Path'), +(@ENTRY,0,1,2,40,0,100,0,3,@ENTRY,0,0,54,6000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Reach wp 3 - pause path'), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Reach wp 3 - run script'), +(@ENTRY,0,3,4,40,0,100,0,6,@ENTRY,0,0,54,21000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Reach wp 6 - pause path'), +(@ENTRY,0,4,0,61,0,100,0,0,0,0,0,80,@ENTRY*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Reach wp 6 - run script'), +(@ENTRY,0,5,6,40,0,100,0,7,@ENTRY,0,0,54,49000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Reach wp 7 - pause path'), +(@ENTRY,0,6,0,61,0,100,0,0,0,0,0,80,@ENTRY*100+2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Reach wp 7 - run script'), +(@ENTRY,0,7,8,40,0,100,0,10,@ENTRY,0,0,54,8000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Reach wp 10 - pause path'), +(@ENTRY,0,8,0,61,0,100,0,0,0,0,0,80,@ENTRY*100+3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Reach wp 10 - run script'), +(@ENTRY,0,9,10,40,0,100,0,11,@ENTRY,0,0,54,300000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Reach wp 11 - pause path'), +(@ENTRY,0,10,0,61,0,100,0,0,0,0,0,80,@ENTRY*100+4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Reach wp 11 - run script'), +(@ENTRY,0,11,0,0,0,100,0,5000,9000,18000,25000,11,@SPELL2,0,0,0,0,0,2,0,0,0,0,0,0,0,'Baelmon the Hound-Master - combat - cast spell'), +(@ENTRY,0,12,0,0,0,100,0,20000,25000,25000,30000,11,@SPELL3,0,0,0,0,0,2,0,0,0,0,0,0,0,'Baelmon the Hound-Master - combat - cast spell'), +(@ENTRY,0,13,14,0,0,100,0,35000,40000,40000,45000,11,@SPELL4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Baelmon the Hound-Master - combat - cast spell'), +(@ENTRY,0,14,0,61,0,100,0,0,0,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Baelmon the Hound-Master - combat - Say4'), +(@ENTRY*100,9,0,0,0,0,100,0,2000,2000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Script - say 0'), +(@ENTRY*100+1,9,0,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.485496, 'Baelmon the Hound-Master - Script - turn to'), +(@ENTRY*100+1,9,1,0,0,0,100,0,5000,5000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.513274, 'Baelmon the Hound-Master - Script - turn to'), +(@ENTRY*100+1,9,2,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Script - say 1'), +(@ENTRY*100+1,9,3,0,0,0,100,0,0,0,0,0,12,21837,8,0,0,0,0,8,0,0,0,2282.145,5380.948,148.3864,3.060301, 'Baelmon the Hound-Master - Script - summon Summoned Wrath Hound'), +(@ENTRY*100+2,9,0,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.480334, 'Baelmon the Hound-Master - Script - turn to'), +(@ENTRY*100+2,9,1,0,0,0,100,0,2000,2000,0,0,11,@SPELL1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Script - cast spell'), +(@ENTRY*100+2,9,2,0,0,0,100,0,46000,46000,0,0,28,@SPELL1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Script - Stop Channeling'), +(@ENTRY*100+3,9,0,0,0,0,100,0,2000,2000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Script - say 2'), +(@ENTRY*100+4,9,0,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.480334, 'Baelmon the Hound-Master - Script - turn to'), +(@ENTRY*100+4,9,1,0,0,0,100,0,2000,2000,0,0,11,@SPELL1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Script - cast spell'), +(@ENTRY*100+4,9,2,0,0,0,100,0,296000,296000,0,0,28,@SPELL1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Baelmon the Hound-Master - Script - Stop Channeling'), +(@ENTRY,0,15,0,4,0,100,0,0,0,0,0,1, 3,0,0,0,0,0,2,0,0,0,0,0,0,0,'Summoned Wrath Hound - on aggro - Say3'); + +-- waypoints for Baelmon the Hound-Master +DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY); +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@ENTRY,1,2251.221,5415.110,144.5944, 'Baelmon the Hound-Master'), +(@ENTRY,2,2253.267,5422.193,144.3444, 'Baelmon the Hound-Master'), +(@ENTRY,3,2251.017,5425.398,144.3444, 'Baelmon the Hound-Master'), +(@ENTRY,4,2250.168,5418.636,144.3444, 'Baelmon the Hound-Master'), +(@ENTRY,5,2263.631,5399.851,145.9176, 'Baelmon the Hound-Master'), +(@ENTRY,6,2273.678,5402.083,146.9626, 'Baelmon the Hound-Master'), +(@ENTRY,7,2270.231,5394.729,145.4702, 'Baelmon the Hound-Master'), +(@ENTRY,8,2264.036,5400.769,146.0911, 'Baelmon the Hound-Master'), +(@ENTRY,9,2234.945,5428.808,144.3444, 'Baelmon the Hound-Master'), +(@ENTRY,10,2223.490,5426.155,144.3497, 'Baelmon the Hound-Master'), +(@ENTRY,11,2270.231,5394.729,145.4702, 'Baelmon the Hound-Master'); + +-- NPC talk text insert from sniff +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`, `BroadcastTextID`) VALUES +(@ENTRY,0,0, 'Make ready the chambers, another ally will soon join our ranks!',14,0,100,0,0,0, 'Baelmon the Hound-Master', 19416), +(@ENTRY,1,0, 'Our ally has arrived! Clear the way to the materialization chamber!',14,0,100,0,0,0, 'Baelmon the Hound-Master', 19417), +(@ENTRY,2,0, 'Now, proceed to the translocator. Forge Camp Wrath awaits your arrival!',14,0,100,0,0,0, 'Baelmon the Hound-Master', 19418), +(@ENTRY,3,0, 'Prepare yourself for eternal torture, mortal!',14,0,100,0,0,0, 'Baelmon the Hound-Master', 20366), +(@ENTRY,3,1, 'WHAT?! Who dares to disturb the Burning Legion?',14,0,100,0,0,0, 'Baelmon the Hound-Master', 20365), +(@ENTRY,3,2, 'I shall enjoy the smell of the grease from your marrow crackling over the fire!',14,0,100,0,0,0, 'Baelmon the Hound-Master', 20368), +(@ENTRY,3,3, 'Nothing will prevent your doom!',14,0,100,0,0,0, 'Baelmon the Hound-Master', 20367), +(@ENTRY,3,4, 'You DARE to attack me?!',14,0,100,0,0,0, 'Baelmon the Hound-Master', 20369), +(@ENTRY,3,5, 'You will suffer slowly until the end of time for this affront!',14,0,100,0,0,0, 'Baelmon the Hound-Master', 20370), +(@ENTRY,4,0, 'Release the hounds!',14,0,100,0,0,0, 'Baelmon the Hound-Master', 20395); + +UPDATE `creature` SET `spawndist`=10, `MovementType`=1 WHERE `guid` IN (84894, 84893, 84896, 84897, 84898, 84895, 84889, 84892, 84886, 84890, 84891, 84885, 84883, 84882, 84879, 84880, 84878, 84877, 84876, 84874, 84872, 84873, 84865, 84867, 84871); + +-- Summoned Wrath Hound SAI +SET @ENTRY := 21837; +SET @SPELL1 := 22578; -- Glowy (Black) +SET @SPELL2 := 37312; -- Portal Exit Effect +SET @SPELL3 := 22911; -- Charge +SET @SPELL4 := 36406; -- Bouble Breath +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN (@ENTRY, 22499); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`IN (@ENTRY, 22499); +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@ENTRY*100,@ENTRY*100+1,@ENTRY*100+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 +(@ENTRY,0,0,1,54,0,100,0,0,0,0,0,11,@SPELL1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summoned Wrath Hound - On summon - cast aura'), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,53,0,@ENTRY,0,0,0,2,1,0,0,0,0,0,0,0,'Summoned Wrath Hound - On summon - Load Path'), +(@ENTRY,0,2,3,40,0,100,0,1,@ENTRY,0,0,54,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Summoned Wrath Hound - Reach wp 1 - pause path'), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Summoned Wrath Hound - Reach wp 1 - run script'), +(@ENTRY,0,4,5,40,0,100,0,7,@ENTRY,0,0,54,4000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Summoned Wrath Hound - Reach wp 7 - pause path'), +(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,80,@ENTRY*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Summoned Wrath Hound - Reach wp 7 - run script'), +(@ENTRY,0,6,7,40,0,100,0,22,@ENTRY,0,0,54,4000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Summoned Wrath Hound - Reach wp 22 - pause path'), +(@ENTRY,0,7,0,61,0,100,0,0,0,0,0,80,@ENTRY*100+2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Summoned Wrath Hound - Reach wp 22 - run script'), +(@ENTRY,0,8,0,4,0,100,0,0,0,0,0,11,@SPELL3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Summoned Wrath Hound - on aggro - cast spell'), +(@ENTRY,0,9,0,0,0,100,0,4000,8000,6000,10000,11,@SPELL4,0,0,0,0,0,2,0,0,0,0,0,0,0,'Summoned Wrath Hound - combat - cast spell'), +(@ENTRY*100,9,0,0,0,0,100,0,4500,4500,0,0,11,@SPELL2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Summoned Wrath Hound - Script - cast spell'), +(@ENTRY*100+1,9,0,0,0,0,100,0,500,500,0,0,19,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Summoned Wrath Hound - Script - Set unit flags'), +(@ENTRY*100+2,9,0,0,0,0,100,0,4500,4500,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Summoned Wrath Hound - Script - despawn'), +-- Lesser Wrath Hound SAI +(22499,0,0,0,0,0,100,0,4000,8000,6000,10000,11,36406,0,0,0,0,0,2,0,0,0,0,0,0,0,'Lesser Wrath Hound- combat - cast spell'), +(22499,0,1,0,54,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,30,0,0,0,0,0,0,'Lesser Wrath Hound- Just Summoned - Start Attack'); + +-- waypoints for Baelmon the Hound-Master +DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY); +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@ENTRY,1,2268.924,5393.452,145.4471, 'Summoned Wrath Hound'), +(@ENTRY,2,2255.472,5407.068,145.0279, 'Summoned Wrath Hound'), +(@ENTRY,3,2243.098,5420.322,144.3444, 'Summoned Wrath Hound'), +(@ENTRY,4,2226.786,5438.047,144.3497, 'Summoned Wrath Hound'), +(@ENTRY,5,2211.937,5460.007,150.8571, 'Summoned Wrath Hound'), +(@ENTRY,6,2195.829,5463.447,153.6814, 'Summoned Wrath Hound'), +(@ENTRY,7,2188.094,5477.495,155.0914, 'Summoned Wrath Hound'), +(@ENTRY,8,2195.297,5464.697,153.6814, 'Summoned Wrath Hound'), +(@ENTRY,9,2208.225,5464.172,153.5997, 'Summoned Wrath Hound'), +(@ENTRY,10,2219.882,5446.347,144.3497, 'Summoned Wrath Hound'), +(@ENTRY,11,2210.560,5435.390,144.6450, 'Summoned Wrath Hound'), +(@ENTRY,12,2170.015,5423.634,144.2937, 'Summoned Wrath Hound'), +(@ENTRY,13,2142.269,5430.440,144.8000, 'Summoned Wrath Hound'), +(@ENTRY,14,2100.592,5447.438,145.3132, 'Summoned Wrath Hound'), +(@ENTRY,15,2046.968,5449.164,145.0331, 'Summoned Wrath Hound'), +(@ENTRY,16,2031.698,5416.583,144.7770, 'Summoned Wrath Hound'), +(@ENTRY,17,2009.996,5392.866,145.6075, 'Summoned Wrath Hound'), +(@ENTRY,18,1951.617,5362.657,148.1501, 'Summoned Wrath Hound'), +(@ENTRY,19,1958.205,5340.299,153.2451, 'Summoned Wrath Hound'), +(@ENTRY,20,1950.292,5312.918,154.0889, 'Summoned Wrath Hound'), +(@ENTRY,21,1960.221,5301.518,154.0889, 'Summoned Wrath Hound'), +(@ENTRY,22,1980.815,5314.191,156.4767, 'Summoned Wrath Hound'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=39218; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 4, 39218, 0, 31, 3, 20736, 0, 0, '', 'Baelmon Channeling target'); + +-- Blade's Edge - Legion - Invis Bunny update +UPDATE `creature_template` SET `InhabitType`=4,`flags_extra`=`flags_extra`|128 WHERE `entry`=20736; +-- Remove spawn +DELETE FROM `creature` WHERE `guid`=76416; From 1a2c20f95d6479742af819b11923abe6b36ff6f6 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Fri, 3 Apr 2015 23:06:34 +0200 Subject: [PATCH 37/86] Scripts/Misc: Fix warning --- src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp index a7a9f8dde88..181fb49ba2e 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp @@ -1128,7 +1128,7 @@ class npc_ominous_cloud : public CreatureScript void UpdateAI(uint32 /*diff*/) override { } - void DoAction(int32 action) override + void DoAction(int32 /*action*/) override { me->GetMotionMaster()->MoveCirclePath(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY(), me->GetPositionZ() + 5.0f, me->GetDistance2d(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY()), true, 16); } From 25e86f75f82c40eeba5ea4341b43bb0e30051368 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 4 Apr 2015 12:44:56 +0200 Subject: [PATCH 38/86] Core/Misc: Fix issues reported by static analysis Coverity defect IDs: 1292760, 1292761, 1292762, 1292771, 1292770 --- src/server/game/Entities/Creature/Creature.cpp | 7 +------ src/server/game/Entities/Player/Player.cpp | 7 +------ src/tools/vmap4_extractor/adtfile.cpp | 2 ++ src/tools/vmap4_extractor/wdtfile.cpp | 1 + 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index b367ebe6a8a..cf0579200f7 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2213,12 +2213,7 @@ void Creature::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs continue; uint32 unSpellId = m_spells[i]; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(unSpellId); - if (!spellInfo) - { - ASSERT(spellInfo); - continue; - } + SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(unSpellId); // Not send cooldown for this spells if (spellInfo->IsCooldownStartedOnEvent()) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9e92492d46b..60cadab39fd 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -21532,12 +21532,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) if (itr->second->state == PLAYERSPELL_REMOVED) continue; uint32 unSpellId = itr->first; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(unSpellId); - if (!spellInfo) - { - ASSERT(spellInfo); - continue; - } + SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(unSpellId); // Not send cooldown for this spells if (spellInfo->IsCooldownStartedOnEvent()) diff --git a/src/tools/vmap4_extractor/adtfile.cpp b/src/tools/vmap4_extractor/adtfile.cpp index a4caf06a7c2..557511f6d1e 100644 --- a/src/tools/vmap4_extractor/adtfile.cpp +++ b/src/tools/vmap4_extractor/adtfile.cpp @@ -184,6 +184,7 @@ bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY) ModelInstance inst(ADT,ModelInstansName[id].c_str(), map_num, tileX, tileY, dirfile); } delete[] ModelInstansName; + ModelInstansName = NULL; } } else if (!strcmp(fourcc,"MODF")) @@ -198,6 +199,7 @@ bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY) WMOInstance inst(ADT,WmoInstansName[id].c_str(), map_num, tileX, tileY, dirfile); } delete[] WmoInstansName; + WmoInstansName = NULL; } } //====================== diff --git a/src/tools/vmap4_extractor/wdtfile.cpp b/src/tools/vmap4_extractor/wdtfile.cpp index 6ba91c6e12c..877f49ce371 100644 --- a/src/tools/vmap4_extractor/wdtfile.cpp +++ b/src/tools/vmap4_extractor/wdtfile.cpp @@ -103,6 +103,7 @@ bool WDTFile::init(char* /*map_id*/, unsigned int mapID) } delete[] gWmoInstansName; + gWmoInstansName = NULL; } } WDT.seek((int)nextpos); From c38d4f57b318573f4ccd4404c733d658298c3f0b Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 4 Apr 2015 13:58:42 +0200 Subject: [PATCH 39/86] Core/Dungeon Finder: Add additional logs for SMSG_LFG_QUEUE_STATUS Log the current LfgState of the target player when sending SMSG_LFG_QUEUE_STATUS packet. --- src/server/game/Handlers/LFGHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp index 34732a681c5..e18e7830cfb 100644 --- a/src/server/game/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -465,10 +465,10 @@ void WorldSession::SendLfgJoinResult(lfg::LfgJoinResultData const& joinData) void WorldSession::SendLfgQueueStatus(lfg::LfgQueueStatusData const& queueData) { - TC_LOG_DEBUG("lfg", "SMSG_LFG_QUEUE_STATUS %s dungeon: %u, waitTime: %d, " + TC_LOG_DEBUG("lfg", "SMSG_LFG_QUEUE_STATUS %s state: %s, dungeon: %u, waitTime: %d, " "avgWaitTime: %d, waitTimeTanks: %d, waitTimeHealer: %d, waitTimeDps: %d, " "queuedTime: %u, tanks: %u, healers: %u, dps: %u", - GetPlayerInfo().c_str(), queueData.dungeonId, queueData.waitTime, queueData.waitTimeAvg, + GetPlayerInfo().c_str(), lfg::GetStateString(sLFGMgr->GetState(GetPlayer()->GetGUID())).c_str(), queueData.dungeonId, queueData.waitTime, queueData.waitTimeAvg, queueData.waitTimeTank, queueData.waitTimeHealer, queueData.waitTimeDps, queueData.queuedTime, queueData.tanks, queueData.healers, queueData.dps); From 2dc97e3f3db69bf7799341db5bcc7604558c90b8 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 4 Apr 2015 15:28:13 +0200 Subject: [PATCH 40/86] Core/Misc: Fix issues reported by static analysis Coverity defect IDs: 1292769, 1292768, 1292765, 1292763, 1267939 --- src/server/game/DataStores/DBCStructure.h | 2 +- src/server/game/Entities/Object/Object.cpp | 1 + src/server/game/OutdoorPvP/OutdoorPvP.cpp | 2 +- src/server/game/Pools/PoolMgr.cpp | 2 +- src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp | 12 ++++++++++-- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 1e6c8218489..a6bddc7bd5e 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1523,7 +1523,7 @@ struct ScalingStatValuesEntry uint32 getFeralBonus(uint32 mask) const // removed in 3.2.x? { - if (mask & 0x00010000) return 0; // not used? + //if (mask & 0x00010000) return 0; // not used? return 0; } }; diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 0a52c145122..4be3a03040d 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -492,6 +492,7 @@ void Object::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* targe uint32* flags = NULL; uint32 visibleFlag = GetUpdateFieldData(target, flags); + ASSERT(flags); for (uint16 index = 0; index < m_valuesCount; ++index) { diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index 7c3f27e2acd..c8bc68d0ddf 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -508,7 +508,7 @@ bool OPvPCapturePoint::HandleCustomSpell(Player* player, uint32 /*spellId*/, Gam { if (!player->IsOutdoorPvPActive()) return false; - return false; + return true; } bool OutdoorPvP::HandleOpenGo(Player* player, ObjectGuid guid) diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index d643bc5da41..3f561539917 100644 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -170,7 +170,7 @@ PoolObject* PoolGroup::RollOne(ActivePoolData& spawns, uint32 triggerFrom) } if (!EqualChanced.empty()) { - int32 index = irand(0, EqualChanced.size()-1); + uint32 index = urand(0, EqualChanced.size()-1); // Triggering object is marked as spawned at this time and can be also rolled (respawn case) // so this need explicit check for this case if (EqualChanced[index].guid == triggerFrom || !spawns.IsActiveObject(EqualChanced[index].guid)) diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp index 99342b5a628..ab2e82171f1 100644 --- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp @@ -361,7 +361,10 @@ public: struct npc_demolitionist_legosoAI : public npc_escortAI { - npc_demolitionist_legosoAI(Creature* creature) : npc_escortAI(creature) { } + npc_demolitionist_legosoAI(Creature* creature) : npc_escortAI(creature) + { + Initialize(); + } void sQuestAccept(Player* player, Quest const* quest) override { @@ -395,11 +398,16 @@ public: } } - void Reset() override + void Initialize() { _phase = PHASE_NONE; _moveTimer = 0; _eventStarterGuidLow = 0; + } + + void Reset() override + { + Initialize(); me->SetCanDualWield(true); _events.Reset(); From 76986880c9807894d29d933cfd9bed56516d410c Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 4 Apr 2015 16:40:01 +0200 Subject: [PATCH 41/86] Core/Misc: Fix issues reported by static analysis Coverity defect IDs: 1267938, 1267937, 1267933, 1267932, 1267929 --- src/server/collision/Management/VMapManager2.cpp | 2 ++ src/server/game/Entities/Transport/Transport.cpp | 2 ++ src/server/game/Entities/Unit/Unit.cpp | 4 ++-- src/server/scripts/Spells/spell_item.cpp | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp index f85fceb7b39..f9fcff96ad2 100644 --- a/src/server/collision/Management/VMapManager2.cpp +++ b/src/server/collision/Management/VMapManager2.cpp @@ -236,9 +236,11 @@ namespace VMAP { floor = info.ground_Z; ASSERT(floor < std::numeric_limits::max()); + ASSERT(info.hitModel); type = info.hitModel->GetLiquidType(); // entry from LiquidType.dbc if (reqLiquidType && !(GetLiquidFlagsPtr(type) & reqLiquidType)) return false; + ASSERT(info.hitInstance); if (info.hitInstance->GetLiquidLevel(pos, info, level)) return true; } diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index a3ed1209ce3..7b219e4dc15 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -331,6 +331,8 @@ GameObject* Transport::CreateGOPassenger(uint32 guid, GameObjectData const* data return NULL; } + ASSERT(data); + float x = data->posX; float y = data->posY; float z = data->posZ; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 3e4953a188c..9c4a9bb5000 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5484,7 +5484,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (RandomSpells.empty()) // shouldn't happen return false; - uint8 rand_spell = irand(0, (RandomSpells.size() - 1)); + uint8 rand_spell = urand(0, (RandomSpells.size() - 1)); CastSpell(target, RandomSpells[rand_spell], true, castItem, triggeredByAura, originalCaster); for (std::vector::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr) { @@ -5530,7 +5530,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (RandomSpells.empty()) // shouldn't happen return false; - uint8 rand_spell = irand(0, (RandomSpells.size() - 1)); + uint8 rand_spell = urand(0, (RandomSpells.size() - 1)); CastSpell(target, RandomSpells[rand_spell], true, castItem, triggeredByAura, originalCaster); for (std::vector::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr) { diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 9843a472971..b290cb75a2b 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -477,7 +477,7 @@ class spell_item_flask_of_the_north : public SpellScriptLoader break; } - caster->CastSpell(caster, possibleSpells[irand(0, (possibleSpells.size() - 1))], true, NULL); + caster->CastSpell(caster, possibleSpells[urand(0, (possibleSpells.size() - 1))], true, NULL); } void Register() override From f44555500b0f02187c7ace12f59762fda8420db9 Mon Sep 17 00:00:00 2001 From: click Date: Sat, 4 Apr 2015 18:21:15 +0200 Subject: [PATCH 42/86] Core: Comment out unused parameter in DBCStructure.h (removes a warning) --- src/server/game/DataStores/DBCStructure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index a6bddc7bd5e..11afa07721f 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1521,7 +1521,7 @@ struct ScalingStatValuesEntry return 0; } - uint32 getFeralBonus(uint32 mask) const // removed in 3.2.x? + uint32 getFeralBonus(uint32 /*mask*/) const // removed in 3.2.x? { //if (mask & 0x00010000) return 0; // not used? return 0; From 526da9c985cadf8655e0a5ce35b1e228422584f4 Mon Sep 17 00:00:00 2001 From: Rushor Date: Sat, 4 Apr 2015 19:34:15 +0200 Subject: [PATCH 43/86] DB/Creature: Lil Timmy convert by @Killyana, closes #10802 --- sql/updates/world/2015_04_04_00_world.sql | 117 ++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sql/updates/world/2015_04_04_00_world.sql diff --git a/sql/updates/world/2015_04_04_00_world.sql b/sql/updates/world/2015_04_04_00_world.sql new file mode 100644 index 00000000000..6b6621136e0 --- /dev/null +++ b/sql/updates/world/2015_04_04_00_world.sql @@ -0,0 +1,117 @@ +-- Lil Timmy c.8666 - Stormwind +-- correct spawn point, spawntime, waypoints. +SET @GUID:= 23427; -- 1 free guid set by tc +DELETE FROM `creature_formations` WHERE `leaderGUID`=45501; +INSERT INTO `creature_formations` (`leaderGUID`,`memberGUID`,`dist`,`angle`,`groupAI`) VALUES +(45501,45501,0,0,2), +(45501,@GUID,2,0,2); + +-- White Kitten - missing added +DELETE FROM `creature` WHERE `guid`=@GUID; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `curhealth`, `spawndist`, `MovementType`) VALUES +(@GUID, 7386, 0, 1, 1, -8632.046875, 921.279480, 99.382813, 3.897803, 180, 42, 0, 0); + +UPDATE `creature` SET `position_x` =-8634.505859, `position_y` = 918.960571, `position_z` = 99.354980, `orientation` = 3.832987, `MovementType` = 2, `spawntimesecs` = 5400 WHERE `guid` = 45501; +UPDATE `creature` SET `position_x` =-8583.879883 , `position_y` =633.127014 , `position_z` =96.338028 , `orientation` =4.989326 WHERE `guid` = 79816; +UPDATE `creature` SET `position_x` =-8582.030273 , `position_y` =633.633972 , `position_z` =96.338028 , `orientation` =4.989326 WHERE `guid` = 79815; +UPDATE `creature` SET `position_x` =-8580.509766 , `position_y` =635.107971 , `position_z` =96.338028 , `orientation` =4.989326 WHERE `guid` = 79817; + +UPDATE `creature_template` SET `MovementType` = 2 WHERE `entry` = 8666; +DELETE FROM `creature_addon` WHERE `guid`=45501; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(45501,455010,0,0,1,0,''); + +DELETE FROM `waypoint_data` WHERE `id`=455010; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(455010,1,-8641.4,912.342,99.1397,0,0,0,0,100,0), +(455010,2,-8661.71,894.74,97.6239,0,0,0,0,100,0), +(455010,3,-8679.15,880.967,97.0168,0,0,0,0,100,0), +(455010,4,-8681.12,877.654,97.0168,0,0,0,0,100,0), +(455010,5,-8679.29,873.082,97.0168,0,0,0,0,100,0), +(455010,6,-8659.98,849.329,97.0168,0,0,0,0,100,0), +(455010,7,-8639.96,825.073,96.6251,0,0,0,0,100,0), +(455010,8,-8636.74,813.025,96.6486,0,0,0,0,100,0), +(455010,9,-8634,793.001,96.6508,0,0,0,0,100,0), +(455010,10,-8635.94,785.58,96.6515,0,0,0,0,100,0), +(455010,11,-8651.43,775.162,96.6714,0,0,0,0,100,0), +(455010,12,-8661.39,764.974,96.6998,0,0,0,0,100,0), +(455010,13,-8662.58,758.134,96.6947,0,0,0,0,100,0), +(455010,14,-8647.73,738.576,96.6965,0,0,0,0,100,0), +(455010,15,-8630.74,726.606,96.7377,0,0,0,0,100,0), +(455010,16,-8618.88,711.997,96.7248,0,0,0,0,100,0), +(455010,17,-8614.67,709.545,96.7549,0,0,0,0,100,0), +(455010,18,-8606.13,711.345,96.7382,0,0,0,0,100,0), +(455010,19,-8598.07,712.945,96.6746,0,0,0,0,100,0), +(455010,20,-8588.25,706.887,97.0168,0,0,0,0,100,0), +(455010,21,-8566.09,678.512,97.0168,0,0,0,0,100,0), +(455010,22,-8561.86,674.735,97.0168,0,0,0,0,100,0), +(455010,23,-8556.46,676.784,97.0168,0,0,0,0,100,0), +(455010,24,-8542.79,686.774,97.6239,0,0,0,0,100,0), +(455010,25,-8536.45,686.854,97.6775,0,0,0,0,100,0), +(455010,26,-8531.64,683.194,98.4422,0,0,0,0,100,0), +(455010,27,-8524.58,673.178,102.5,0,0,0,0,100,0), +(455010,28,-8519.8,666.4,102.615,0,0,0,0,100,0), +(455010,29,-8512.94,656.648,100.901,0,0,0,0,100,0), +(455010,30,-8513.15,648.714,100.292,0,0,0,0,100,0), +(455010,31,-8518.18,642.361,100.092,0,0,0,0,100,0), +(455010,32,-8538.04,630.723,100.404,0,0,0,0,100,0), +(455010,33,-8554.03,617.81,102.053,0,0,0,0,100,0), +(455010,34,-8564.5,613.48,102.435,0,0,0,0,100,0), +(455010,35,-8576.12,601.799,103.26,0,0,0,0,100,0), +(455010,36,-8582.44,589.572,103.691,0,0,0,0,100,0), +(455010,37,-8586.68,575.605,102.985,0,0,0,0,100,0), +(455010,38,-8585.96,565.941,102.26,0,0,0,0,100,0), +(455010,39,-8578.9,545.988,101.779,0,0,0,0,100,0), +(455010,40,-8581.73,541.012,102.09,0,0,0,0,100,0), +(455010,41,-8590.09,533.912,104.76,0,0,0,0,100,0), +(455010,42,-8598.32,527.164,106.399,0,0,0,0,100,0), +(455010,43,-8605.67,520.882,105.748,0,0,0,0,100,0), +(455010,44,-8610.26,515.735,103.79,0,0,0,0,100,0), +(455010,45,-8613.43,514.684,103.401,0,0,0,0,100,0), +(455010,46,-8618.8,518.794,103.068,0,0,0,0,100,0), +(455010,47,-8635.17,535.152,99.9833,0,0,0,0,100,0), +(455010,48,-8647.39,546.721,97.8568,0,0,0,0,100,0), +(455010,49,-8655.78,552.938,96.9435,0,0,0,0,100,0), +(455010,50,-8671.86,552.874,97.2037,0,0,0,0,100,0), +(455010,51,-8679.66,549.654,97.5031,0,0,0,0,100,0), +(455010,52,-8689.63,540.268,97.828,0,0,0,0,100,0), +(455010,53,-8698.98,530.295,97.7173,0,0,0,0,100,0), +(455010,54,-8712.64,520.242,97.2398,0,0,0,0,100,0), +(455010,55,-8715.24,521.571,97.4039,0,0,0,0,100,0), +(455010,56,-8720.77,528.729,99.1496,0,0,0,0,100,0), +(455010,57,-8729.84,539.87,101.105,0,0,0,0,100,0), +(455010,58,-8735.95,547.101,100.845,0,0,0,0,100,0), +(455010,59,-8745.79,557.737,97.7107,0,0,0,0,100,0), +(455010,60,-8746.01,564.915,97.4001,0,0,0,0,100,0), +(455010,61,-8729.92,581.294,97.6775,0,0,0,0,100,0), +(455010,62,-8719.58,591.033,98.4713,0,0,0,0,100,0), +(455010,63,-8712.04,594.001,98.6079,0,0,0,0,100,0), +(455010,64,-8707.26,600.676,98.9982,0,0,0,0,100,0), +(455010,65,-8704.46,616.407,100.215,0,0,0,0,100,0), +(455010,66,-8705.6,629.078,100.477,0,0,0,0,100,0), +(455010,67,-8708.67,645.787,99.9994,0,0,0,0,100,0), +(455010,68,-8716.46,666.585,98.8681,0,0,0,0,100,0), +(455010,69,-8724.09,676.482,98.6317,0,0,0,0,100,0), +(455010,70,-8728.54,684.167,98.7324,0,0,0,0,100,0), +(455010,71,-8733.47,695.151,98.723,0,0,0,0,100,0), +(455010,72,-8743.6,709.876,98.2678,0,0,0,0,100,0), +(455010,73,-8741.08,714.561,98.9815,0,0,0,0,100,0), +(455010,74,-8734.46,720.119,101.647,0,0,0,0,100,0), +(455010,75,-8726.79,726.231,100.924,0,0,0,0,100,0), +(455010,76,-8718.09,733.687,97.9511,0,0,0,0,100,0), +(455010,77,-8716.42,737.269,97.7782,0,0,0,0,100,0), +(455010,78,-8721.01,746.752,97.9693,0,0,0,0,100,0), +(455010,79,-8730.96,759.107,98.1572,0,0,0,0,100,0), +(455010,80,-8731.99,769.385,98.0161,0,0,0,0,100,0), +(455010,81,-8724.64,778.108,98.0604,0,0,0,0,100,0), +(455010,82,-8717.55,792.762,97.1197,0,0,0,0,100,0), +(455010,83,-8717.68,798.804,97.1792,0,0,0,0,100,0), +(455010,84,-8728.3,817.744,96.9777,0,0,0,0,100,0), +(455010,85,-8726.79,830.504,96.3102,0,0,0,0,100,0), +(455010,86,-8723.42,841.35,96.0764,0,0,0,0,100,0), +(455010,87,-8709.57,857.779,96.978,0,0,0,0,100,0), +(455010,88,-8692.38,870.557,97.0284,0,0,0,0,100,0), +(455010,89,-8679.35,880.974,97.0167,0,0,0,0,100,0), +(455010,90,-8661.22,896.239,97.5968,0,0,0,0,100,0), +(455010,91,-8643.7,912.233,98.9288,0,0,0,0,100,0), +(455010,92,-8634.58,918.926,99.3551,0,0,0,0,100,0); From 5f77145f49ce2358821e02a478de0fe5f9f3c98c Mon Sep 17 00:00:00 2001 From: Dr-J Date: Sat, 4 Apr 2015 18:35:50 +0100 Subject: [PATCH 44/86] DB/Misc: Dire Maul Spawn quiet a few missing gos in diremaul including the 5 pylons in Dire Respawn www.wowhead.com/npc=11480/arcane-aberration and http://www.wowhead.com/npc=11483/mana-remnant as this where missing ie none spawned at all at 2 of the pylon. Also respawning www.wowhead.com/npc=13160/carrion-swarmer --- sql/updates/world/2015_04_04_01_world.sql | 118 ++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sql/updates/world/2015_04_04_01_world.sql diff --git a/sql/updates/world/2015_04_04_01_world.sql b/sql/updates/world/2015_04_04_01_world.sql new file mode 100644 index 00000000000..78036014011 --- /dev/null +++ b/sql/updates/world/2015_04_04_01_world.sql @@ -0,0 +1,118 @@ +SET @OGUID := 29742; +SET @CGUID := 143505; + +UPDATE `gameobject_template` SET `flags`=32 WHERE `entry`IN (177257,177258,177259,179504,179505,179503,179506); + +DELETE FROM `gameobject` where `id` IN (177257,177258,177259,179504,179505,179503,179506,179563,177219,179563,177219,177221,177211,177212,177215,179549,177217) AND `map`=429; +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, 177258, 429, 3, 1, 121.2223, 429.0921, 28.45481, 0.4188786, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 177258 (Area: 0) +(@OGUID+1, 177259, 429, 3, 1, 12.94134, 277.9307, -8.932899, 0, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 177259 (Area: 5915) +(@OGUID+2, 177257, 429, 3, 1, -92.34557, 442.6703, 28.54704, 0.4188786, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 177257 (Area: 5915) +(@OGUID+3, 179504, 429, 3, 1, 78.13875, 737.4021, -24.62163, 0, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 179504 (Area: 5915) +(@OGUID+4, 179505, 429, 3, 1, -155.4332, 734.1661, -24.62163, 0, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 179505 (Area: 5915) +(@OGUID+5, 179503, 429, 3, 1, -38.96511, 813.7094, -27.31784, 0, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 179503 (Area: 5913) +(@OGUID+6, 179506, 429, 3, 1, -38.75632, 812.5867, -3.8761, 0, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 179506 (Area: 5913) +(@OGUID+7, 179563, 429, 3, 1, 116.1046, 638.89, -48.46696, 4.520406, 0, 0, 0, 1, 7200, 255, 1), -- 179563 (Area: 5915) +(@OGUID+8, 177219, 429, 3, 1, 385.3268, 374.2315, -1.34314, 1.570796, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 177219 (Area: 5913) +(@OGUID+9, 177221, 429, 3, 1, 50.58631, 501.9406, -23.14985, 4.71239, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 177221 (Area: 5913) +(@OGUID+10, 177211, 429, 3, 1, -41.8254, 159.8736, -3.448337, 0, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 177211 (Area: 5913) +(@OGUID+11, 177212, 429, 3, 1, 10.72159, 159.4589, -3.448351, 3.141593, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 177212 (Area: 5913) +(@OGUID+12, 177215, 429, 3, 1, 255.4084, 10.3791, -2.693807, 1.570796, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 177215 (Area: 5913) +(@OGUID+13, 179549, 429, 3, 1, 351.5679, 88.67347, -36.39297, 1.570796, 0, 0, 1, -4.371139E-08, 7200, 255, 1), -- 179549 (Area: 5913) +(@OGUID+14, 177217, 429, 3, 1, 491.2043, 515.1331, 29.46753, 1.570796, 0, 0, 1, -4.371139E-08, 7200, 255, 1); -- 177217 (Area: 5913) + +DELETE FROM `creature` WHERE `id` IN(11480,11483,13916,13160); + +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 11480, 429, 3, 1, 130.4702, 422.0486, 28.68438, 5.5676, 7200, 0, 0), -- 11480 (Area: 0) +(@CGUID+1, 11480, 429, 3, 1, 129.8357, 437.4243, 28.68438, 0.6457718, 7200, 0, 0), -- 11480 (Area: 0) +(@CGUID+2, 11483, 429, 3, 1, 112.3598, 421.3277, 28.68438, 3.979351, 7200, 0, 0), -- 11483 (Area: 0) +(@CGUID+3, 11483, 429, 3, 1, 112.2285, 437.3398, 28.68438, 2.495821, 7200, 0, 0), -- 11483 (Area: 0) +(@CGUID+4, 11483, 429, 3, 1, 24.50517, 278.4114, -8.422497, 0.8726646, 7200, 0, 0), -- 11483 (Area: 5915) +(@CGUID+5, 11480, 429, 3, 1, 3.030073, 275.064, -8.27089, 3.036873, 7200, 0, 0), -- 11480 (Area: 5915) +(@CGUID+6, 11483, 429, 3, 1, 18.33997, 262.5933, -7.229755, 5.044002, 7200, 0, 0), -- 11483 (Area: 5915) +(@CGUID+7, 11480, 429, 3, 1, -99.35272, 434.2773, 28.68608, 3.926991, 7200, 0, 0), -- 11480 (Area: 5915) +(@CGUID+8, 11483, 429, 3, 1, -83.95709, 435.4832, 28.68626, 5.61996, 7200, 0, 0), -- 11483 (Area: 5915) +(@CGUID+9, 11480, 429, 3, 1, -100.4601, 449.052, 28.6875, 2.321288, 7200, 0, 0), -- 11480 (Area: 5915) +(@CGUID+10, 11483, 429, 3, 1, -83.53941, 449.507, 28.6862, 0.9599311, 7200, 5, 1), -- 11483 (Area: 5915) (possible waypoints or random movement) +(@CGUID+11, 11483, 429, 3, 1, 90.66621, 740.4608, -24.49702, 0.3490658, 7200, 0, 0), -- 11483 (Area: 5915) +(@CGUID+12, 11480, 429, 3, 1, 75.12427, 748.4026, -24.49702, 1.553343, 7200, 0, 0), -- 11480 (Area: 5915) +(@CGUID+13, 11483, 429, 3, 1, 81.96804, 725.6087, -24.49635, 5.166174, 7200, 5, 1), -- 11483 (Area: 5915) (Auras: ) (possible waypoints or random movement) +(@CGUID+14, 11480, 429, 3, 1, 67.98151, 733.5004, -24.49676, 3.665191, 7200, 0, 0), -- 11480 (Area: 5915) +(@CGUID+15, 11480, 429, 3, 1, -151.3329, 721.8649, -24.49508, 4.904375, 7200, 0, 0), -- 11480 (Area: 5915) +(@CGUID+16, 11483, 429, 3, 1, -142.6175, 736.7474, -24.49702, 6.108652, 7200, 0, 0), -- 11483 (Area: 5915) +(@CGUID+17, 11483, 429, 3, 1, -166.1358, 729.3408, -24.49702, 3.525565, 7200, 0, 0), -- 11483 (Area: 5915) +(@CGUID+18, 11480, 429, 3, 1, -157.8231, 746.3584, -24.49702, 1.623156, 7200, 0, 0),-- 11480 (Area: 5915) +(@CGUID+19, 11480, 429, 3, 1, 10.1239, 287.949, -8.78406, 1.62106, 7200, 0, 0),-- 11480 (Area: 5915) +(@CGUID+20, 13916, 429, 3, 1, 13.45142, 277.6283, 1.514334, 2.286381, 7200, 0, 0), -- 13916 (Area: 5915) +(@CGUID+21, 13160, 429, 3, 1, 462.8175, 251.535, 8.817377, 4.555309, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+22, 13160, 429, 3, 1, 452.7207, 247.395, 11.30013, 4.642576, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+23, 13160, 429, 3, 1, 448.1017, 251.626, 11.29641, 4.677482, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+24, 13160, 429, 3, 1, 455.3728, 253.9155, 11.3039, 4.625123, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+25, 13160, 429, 3, 1, 448.4704, 258.7166, 11.29889, 4.677482, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+26, 13160, 429, 3, 1, 449.7683, 243.4786, 11.29772, 4.660029, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+27, 13160, 429, 3, 1, 452.4716, 260.4895, 11.30317, 4.642576, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+28, 13160, 429, 3, 1, 477.2956, 252.6243, 2.873334, 2.817438, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+29, 13160, 429, 3, 1, 462.7784, 260.8503, 8.751555, 2.073882, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+30, 13160, 429, 3, 1, 471.8947, 252.9371, 4.882514, 4.475661, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+31, 13160, 429, 3, 1, 486.488, 313.6001, 2.936218, 4.485496, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+32, 13160, 429, 3, 1, 494.2127, 319.3602, 2.936227, 4.45059, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+33, 13160, 429, 3, 1, 474.5892, 316.7031, 2.936239, 4.537856, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+34, 13160, 429, 3, 1, 478.2815, 324.038, 2.936251, 4.537856, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+35, 13160, 429, 3, 1, 493.1786, 309.8522, 2.936205, 4.433136, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+36, 13160, 429, 3, 1, 467.4713, 316.5861, 2.93625, 4.590216, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+37, 13160, 429, 3, 1, 471.9471, 324.6326, 2.936259, 4.572762, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+38, 13160, 429, 3, 1, 485.187, 320.7115, 2.936234, 4.485496, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+39, 13160, 429, 3, 1, 490.0086, 329.4991, 2.852889, 1.889038, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+40, 13160, 429, 3, 1, 484.4862, 327.5917, 2.85289, 3.664191, 7200, 5, 1), -- 13160 (Area: 0) (possible waypoints or random movement) +(@CGUID+41, 13160, 429, 3, 1, 479.4313, 534.1829, -25.30033, 4.625123, 7200, 0, 0), -- 13160 (Area: 0) (Auras: ) +(@CGUID+42, 13160, 429, 3, 1, 494.0698, 531.7256, -25.30895, 4.590216, 7200, 0, 0), -- 13160 (Area: 0) (Auras: ) +(@CGUID+43, 13160, 429, 3, 1, 480.5341, 542.3371, -25.3806, 6.065704, 7200, 0, 0), -- 13160 (Area: 0) (Auras: ) +(@CGUID+44, 13160, 429, 3, 1, 518.8744, 532.2348, -25.39863, 2.637258, 7200, 0, 0), -- 13160 (Area: 0) (Auras: ) +(@CGUID+45, 13160, 429, 3, 1, 521.4735, 543.2216, -25.39985, 2.595782, 7200, 0, 0), -- 13160 (Area: 0) (Auras: ) +(@CGUID+46, 13160, 429, 3, 1, 532.2884, 535.4186, -25.40494, 0.08802468, 7200, 0, 0), -- 13160 (Area: 0) (Auras: ) +(@CGUID+47, 13160, 429, 3, 1, 507.4343, 541.1744, -25.39325, 4.851843, 7200, 0, 0), -- 13160 (Area: 0) (Auras: ) +(@CGUID+48, 13160, 429, 3, 1, 481.1589, 552.1213, -25.3825, 0.2103749, 7200, 0, 0), -- 13160 (Area: 0) (Auras: ) +(@CGUID+49, 13160, 429, 3, 1, 511.5812, 556.6573, -25.39854, 3.27448, 7200, 5, 1), -- 13160 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+50, 13160, 429, 3, 1, 532.3871, 552.1505, -25.40498, 2.640144, 7200, 5, 1), -- 13160 (Area: 0) (Auras: ) (possible waypoints or random movement) +(@CGUID+51, 13160, 429, 3, 1, 472.9739, -32.42187, -3.903387, 6.217165, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+52, 13160, 429, 3, 1, 460.5289, -24.7918, -3.886683, 1.132865, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+53, 13160, 429, 3, 1, 472.9483, -21.3704, -3.911369, 2.103442, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+54, 13160, 429, 3, 1, 460.5975, -39.44626, -3.886727, 5.271253, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+55, 13160, 429, 3, 1, 471.0815, -48.29583, -3.886039, 1.733511, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+56, 13160, 429, 3, 1, 456.1195, -58.02909, -4.279171, 3.795121, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+57, 13160, 429, 3, 1, 470.6244, -60.59518, -3.886099, 0.863512, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+58, 13160, 429, 3, 1, 463.9873, -52.75054, -3.886564, 2.476561, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+59, 13160, 429, 3, 1, 460.2359, -68.97313, -3.886916, 3.776749, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+60, 13160, 429, 3, 1, 469.8415, -70.88819, -3.886191, 4.886696, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+61, 13160, 429, 3, 1, 396.9608, -98.32198, -3.887123, 2.894927, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+62, 13160, 429, 3, 1, 404.5128, -110.0931, -3.886247, 0.1595933, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+63, 13160, 429, 3, 1, 445.6248, -113.9238, -3.886032, 5.102283, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+64, 13160, 429, 3, 1, 414.6084, -108.6204, -3.886377, 0.0039941, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+65, 13160, 429, 3, 1, 443.4119, -99.60896, -3.887109, 2.986769, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+66, 13160, 429, 3, 1, 401.1027, -104.8092, -3.88664, 0.2074864, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+67, 13160, 429, 3, 1, 438.3328, -108.5529, -3.886425, 5.919142, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+68, 13160, 429, 3, 1, 426.5037, -100.5517, -3.887007, 2.909149, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+69, 13160, 429, 3, 1, 414.977, -98.74563, -3.887123, 2.845945, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+70, 13160, 429, 3, 1, 424.4419, -108.6975, -3.886389, 1.076339, 7200, 0, 0), -- 13160 (Area: 0) +(@CGUID+71, 13160, 429, 3, 1, 396.8296, -98.32212, -3.803594, 1.37881, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+72, 13160, 429, 3, 1, 414.977, -98.74563, -3.803658, 1.448623, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+73, 13160, 429, 3, 1, 400.0482, -105.0312, -3.803111, 1.396263, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+74, 13160, 429, 3, 1, 437.5299, -108.435, -3.803006, 1.553343, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+75, 13160, 429, 3, 1, 424.8745, -110.3578, -3.802841, 1.500983, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+76, 13160, 429, 3, 1, 460.3629, -24.53695, -3.803384, 1.658063, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+77, 13160, 429, 3, 1, 403.6488, -110.2321, -3.802753, 1.413717, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+78, 13160, 429, 3, 1, 427.6517, -100.8249, -3.803568, 1.500983, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+79, 13160, 429, 3, 1, 414.4864, -108.6242, -3.802916, 1.448623, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+80, 13160, 429, 3, 1, 456.6826, -57.28893, -4.25341, 1.623156, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+81, 13160, 429, 3, 1, 471.2401, -46.80048, -3.802765, 1.710423, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+82, 13160, 429, 3, 1, 473.4761, -22.86045, -3.80176, 1.745329, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+83, 13160, 429, 3, 1, 470.647, -70.00087, -3.802982, 1.692969, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+84, 13160, 429, 3, 1, 472.6571, -33.71276, -3.802353, 1.727876, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+85, 13160, 429, 3, 1, 461.8682, -40.83654, -3.803358, 1.658063, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+86, 13160, 429, 3, 1, 444.67, -99.75545, -3.803718, 1.570796, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+87, 13160, 429, 3, 1, 460.2359, -68.97313, -3.803645, 1.64061, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+88, 13160, 429, 3, 1, 464.6496, -53.98102, -3.803182, 1.658063, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+89, 13160, 429, 3, 1, 445.7453, -113.9387, -3.802556, 1.570796, 7200, 5, 1), -- 13160 (Area: 5913) (possible waypoints or random movement) +(@CGUID+90, 13160, 429, 3, 1, 470.4993, -60.37534, -3.802882, 1.692969, 7200, 5, 1); -- 13160 (Area: 5913) (possible waypoints or random movement) + From d23538ce568773f474ef20b4ca8217e0b218e65e Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 4 Apr 2015 20:20:04 +0200 Subject: [PATCH 45/86] Core/Misc: Fix issues reported by static analysis Coverity defect IDs: 1227510, 1227434, 1023036, 1062426, 1062425, 1062424, 1062423, 1062422 --- src/server/game/Entities/Unit/Unit.cpp | 3 +- .../SerpentShrine/boss_lurker_below.cpp | 2 +- src/tools/map_extractor/System.cpp | 37 ++++++++++++++----- src/tools/vmap4_extractor/vmapexport.cpp | 25 ++++++++++--- 4 files changed, 49 insertions(+), 18 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9c4a9bb5000..5f864210e8f 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5880,7 +5880,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere if (dummySpell->SpellIconID == 2218) { // Proc only from Abolish desease on self cast - if (procSpell->Id != 552 || victim != this || !roll_chance_i(triggerAmount)) + if (!procSpell || procSpell->Id != 552 || victim != this || !roll_chance_i(triggerAmount)) return false; triggered_spell_id = 64136; target = this; @@ -14173,6 +14173,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u uint32 Id = i->aura->GetId(); AuraApplication* aurApp = i->aura->GetApplicationOfTarget(GetGUID()); + ASSERT(aurApp); bool prepare = i->aura->CallScriptPrepareProcHandlers(aurApp, eventInfo); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index 2750476db76..096777163a6 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -280,7 +280,7 @@ public: Map::PlayerList const &PlayerList = map->GetPlayers(); for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { - if (i->GetSource() && i->GetSource()->IsAlive() && me->HasInArc(float(diff/20000*M_PI*2), i->GetSource()) && me->IsWithinDist(i->GetSource(), SPOUT_DIST) && !i->GetSource()->IsInWater()) + if (i->GetSource() && i->GetSource()->IsAlive() && me->HasInArc(diff/20000.f*float(M_PI)*2.f, i->GetSource()) && me->IsWithinDist(i->GetSource(), SPOUT_DIST) && !i->GetSource()->IsInWater()) DoCast(i->GetSource(), SPELL_SPOUT, true); // only knock back players in arc, in 100yards, not in water } } diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index a573f9fecc8..dcaa3ba0a76 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -63,8 +63,9 @@ typedef struct map_id *map_ids; uint16 *areas; uint16 *LiqType; -char output_path[128] = "."; -char input_path[128] = "."; +#define MAX_PATH_LENGTH 128 +char output_path[MAX_PATH_LENGTH] = "."; +char input_path[MAX_PATH_LENGTH] = "."; uint32 maxAreaId = 0; // ************************************************** @@ -143,11 +144,11 @@ void Usage(char* prg) printf( "Usage:\n"\ "%s -[var] [value]\n"\ - "-i set input path\n"\ - "-o set output path\n"\ + "-i set input path (max %d characters)\n"\ + "-o set output path (max %d characters)\n"\ "-e extract only MAP(1)/DBC(2) - standard: both(3)\n"\ "-f height stored as int (less map size but lost some accuracy) 1 by default\n"\ - "Example: %s -f 0 -i \"c:\\games\\game\"", prg, prg); + "Example: %s -f 0 -i \"c:\\games\\game\"", prg, MAX_PATH_LENGTH - 1, MAX_PATH_LENGTH - 1, prg); exit(1); } @@ -166,14 +167,20 @@ void HandleArgs(int argc, char * arg[]) switch(arg[c][1]) { case 'i': - if(c + 1 < argc) // all ok - strcpy(input_path, arg[(c++) + 1]); + if (c + 1 < argc && strlen(arg[c + 1]) < MAX_PATH_LENGTH) // all ok + { + strncpy(input_path, arg[c++ + 1], MAX_PATH_LENGTH); + input_path[MAX_PATH_LENGTH - 1] = '\0'; + } else Usage(arg[0]); break; case 'o': - if(c + 1 < argc) // all ok - strcpy(output_path, arg[(c++) + 1]); + if (c + 1 < argc && strlen(arg[c + 1]) < MAX_PATH_LENGTH) // all ok + { + strncpy(output_path, arg[c++ + 1], MAX_PATH_LENGTH); + output_path[MAX_PATH_LENGTH - 1] = '\0'; + } else Usage(arg[0]); break; @@ -250,7 +257,17 @@ uint32 ReadMapDBC() for(uint32 x = 0; x < map_count; ++x) { map_ids[x].id = dbc.getRecord(x).getUInt(0); - strcpy(map_ids[x].name, dbc.getRecord(x).getString(1)); + + const char* map_name = dbc.getRecord(x).getString(1); + size_t max_map_name_length = sizeof(map_ids[x].name); + if (strlen(map_name) >= max_map_name_length) + { + printf("Fatal error: Map name too long!\n"); + exit(1); + } + + strncpy(map_ids[x].name, map_name, max_map_name_length); + map_ids[x].name[max_map_name_length - 1] = '\0'; } printf("Done! (%u maps loaded)\n", (uint32)map_count); return map_count; diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp index 4cec49ef333..7a12897563e 100644 --- a/src/tools/vmap4_extractor/vmapexport.cpp +++ b/src/tools/vmap4_extractor/vmapexport.cpp @@ -197,7 +197,7 @@ bool ExtractSingleWmo(std::string& fname) for (uint32 i = 0; i < froot.nGroups; ++i) { char temp[1024]; - strcpy(temp, fname.c_str()); + strncpy(temp, fname.c_str(), 1024); temp[fname.length()-4] = 0; char groupFileName[1024]; sprintf(groupFileName, "%s_%03u.wmo", temp, i); @@ -395,7 +395,9 @@ bool processArgv(int argc, char ** argv, const char *versionString) if((i+1)getRecord (x).getUInt(0); - strcpy(map_ids[x].name,dbc->getRecord(x).getString(1)); - printf("Map - %s\n",map_ids[x].name); - } + map_ids[x].id = dbc->getRecord(x).getUInt(0); + const char* map_name = dbc->getRecord(x).getString(1); + size_t max_map_name_length = sizeof(map_ids[x].name); + if (strlen(map_name) >= max_map_name_length) + { + delete dbc; + delete[] map_ids; + printf("FATAL ERROR: Map name too long.\n"); + return 1; + } + + strncpy(map_ids[x].name, map_name, max_map_name_length); + map_ids[x].name[max_map_name_length - 1] = '\0'; + printf("Map - %s\n", map_ids[x].name); + } delete dbc; ParsMapFiles(); From 6fa2edebf1e8f6ddd7f3a166ec6ccf73685e089f Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 4 Apr 2015 23:36:05 +0200 Subject: [PATCH 46/86] DB/Quest: Blightbeats be Damned! By Killyana, closes #10203 --- sql/updates/world/2015_04_04_02_world.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sql/updates/world/2015_04_04_02_world.sql diff --git a/sql/updates/world/2015_04_04_02_world.sql b/sql/updates/world/2015_04_04_02_world.sql new file mode 100644 index 00000000000..1cc2cb61ea3 --- /dev/null +++ b/sql/updates/world/2015_04_04_02_world.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=16 AND `SourceEntry`=4163; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(16,0,26813,0,0,23,0,4163,0,0,0,0,'','Dismount player from Kor''kron War Rider when not in intended zone(Icemist Village)'); + +UPDATE `creature_template` SET `InhabitType`=5, `npcflag`=16777216 WHERE `entry`=26813; +DELETE FROM `creature_template_addon` WHERE `entry`=26813; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(26813, 0, 0, 33554432, 0, 0, '55971'); From 223641168828b7b7731796d2ded7b31bf41d7f30 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 4 Apr 2015 23:38:00 +0200 Subject: [PATCH 47/86] DB/Creature: Vhel'kur Waypoints By danlapps, closes #13054 --- sql/updates/world/2015_04_04_03_world.sql | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sql/updates/world/2015_04_04_03_world.sql diff --git a/sql/updates/world/2015_04_04_03_world.sql b/sql/updates/world/2015_04_04_03_world.sql new file mode 100644 index 00000000000..78e5f2b50b5 --- /dev/null +++ b/sql/updates/world/2015_04_04_03_world.sql @@ -0,0 +1,42 @@ +-- Pathing for Entry: Entry: 21801 (Vhel'kur) +SET @NPC := 21801; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-5140.628,`position_y`=537.6068,`position_z`=225.5867 WHERE `guid`=76114; +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=76114; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(76114,@PATH,0,33554432,1,0, '55971'); +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,-5140.628,537.6068,225.5867,0,0,0,0,100,0), +(@PATH,2,-5047.682,660.9525,148.8644,0,0,0,0,100,0), +(@PATH,3,-5011.98,674.3496,148.8644,0,0,0,0,100,0), +(@PATH,4,-4981.461,669.827,148.8644,0,0,0,0,100,0), +(@PATH,5,-4959.014,632.2751,148.8644,0,0,0,0,100,0), +(@PATH,6,-4943.981,608.1472,148.8644,0,0,0,0,100,0), +(@PATH,7,-4929.495,593.4562,148.8644,0,0,0,0,100,0), +(@PATH,8,-4910.322,557.0013,148.8644,0,0,0,0,100,0), +(@PATH,9,-4886.5,522.941,148.8644,0,0,0,0,100,0), +(@PATH,10,-4860.481,492.9438,148.8644,0,0,0,0,100,0), +(@PATH,11,-4853.529,472.7724,148.8644,0,0,0,0,100,0), +(@PATH,12,-4853.905,449.3954,148.8644,0,0,0,0,100,0), +(@PATH,13,-4862.35,417.3469,148.8644,0,0,0,0,100,0), +(@PATH,14,-4904.073,347.1447,148.8644,0,0,0,0,100,0), +(@PATH,15,-4938.952,289.3222,148.8644,0,0,0,0,100,0), +(@PATH,16,-4959.224,247.5302,148.8644,0,0,0,0,100,0), +(@PATH,17,-4971.73,201.8298,148.8644,0,0,0,0,100,0), +(@PATH,18,-4979.256,156.9421,148.8644,0,0,0,0,100,0), +(@PATH,19,-4987.867,132.5271,148.8644,0,0,0,0,100,0), +(@PATH,20,-4998.63,107.5142,148.8644,0,0,0,0,100,0), +(@PATH,21,-5020.076,73.21224,148.8644,0,0,0,0,100,0), +(@PATH,22,-5061.159,55.51009,148.8644,0,0,0,0,100,0), +(@PATH,23,-5077.839,49.82715,148.8644,0,0,0,0,100,0), +(@PATH,24,-5112.819,49.43273,148.8644,0,0,0,0,100,0), +(@PATH,25,-5175.664,65.2347,163.3922,0,0,0,0,100,0), +(@PATH,26,-5198.992,107.9043,173.1977,0,0,0,0,100,0), +(@PATH,27,-5165.273,219.0713,198.2255,0,0,0,0,100,0), +(@PATH,28,-5113.013,300.7207,198.2255,0,0,0,0,100,0), +(@PATH,29,-5109.759,353.3949,226.7533,0,0,0,0,100,0), +(@PATH,30,-5113.028,378.9975,240.6144,0,0,0,0,100,0), +(@PATH,31,-5122.197,411.4973,243.2811,0,0,0,0,100,0); +-- 0x1C39A84240154A4000002100000AE735 .go -5140.628 537.6068 225.5867 From f49c77aba74922506f035814841f72a93610440d Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 4 Apr 2015 23:40:18 +0200 Subject: [PATCH 48/86] DB/Quest: Are we there, yeti? By Killyana, closes #10972 --- sql/updates/world/2015_04_04_04_world.sql | 124 ++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 sql/updates/world/2015_04_04_04_world.sql diff --git a/sql/updates/world/2015_04_04_04_world.sql b/sql/updates/world/2015_04_04_04_world.sql new file mode 100644 index 00000000000..58314391994 --- /dev/null +++ b/sql/updates/world/2015_04_04_04_world.sql @@ -0,0 +1,124 @@ +-- +SET @ENTRY := 10978; +SET @Sprinkle:=7583; +SET @Quixxil:=10977; + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry` IN (@ENTRY, @Sprinkle, @Quixxil); +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Sprinkle AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Quixxil 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,8,0,100,0,17166,0,0,0,80,1097800,2,0,0,0,0,1,0,0,0,0,0,0,0,"Legacki - On Spellhit 'Release Umi's Yeti' - Run Script"), +(@ENTRY,0,1,0,40,0,100,0,15,10978,0,0,80,@ENTRY*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Legacki - On Waypoint 15 Reached - Run Script"), +(@Sprinkle,0,0,0,8,0,100,0,17166,0,0,0,80,@Sprinkle*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Sprinkle - On Spellhit 'Release Umi's Yeti' - Run Script"), +(@Sprinkle,0,1,0,40,0,100,0,7,@Sprinkle,0,0,80,@Sprinkle*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Sprinkle - On Waypoint 7 Reached - Run Script"), +(@Quixxil,0,0,0,8,0,100,0,17166,0,0,0,80,@Quixxil*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Quixxil - On Spellhit 'Release Umi's Yeti' - Run Script"), +(@Quixxil,0,1,0,40,0,100,0,11,@Quixxil,0,0,80,@Quixxil*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Quixxil - On Waypoint 11 Reached - Run Script"); + +-- Actionlist SAI +SET @ENTRY := 1097800; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Sprinkle*100 AND `source_type`=9; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Quixxil*100 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,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Legacki - On Script - Say Line 0"), +(@ENTRY,9,1,0,0,0,100,0,1000,1000,0,0,53,1,10978,0,0,0,2,1,0,0,0,0,0,0,0,"Legacki -On Script - Start Waypoint"), +(@ENTRY,9,2,0,0,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,10980,20,0,0,0,0,0,"Legacki -On Script - Say Line 1"), +(@ENTRY,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Legacki -On Script - Say Line 1"), +(@ENTRY,9,4,0,0,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Legacki -On Script - Store target"), +(@Sprinkle*100,9,0,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sprinkle - On Script - Say Line 0"), +(@Sprinkle*100,9,1,0,0,0,100,0,1000,1000,0,0,53,1,@Sprinkle,0,0,0,2,1,0,0,0,0,0,0,0,"Sprinkle - On Script - Start Waypoint"), +(@Sprinkle*100,9,2,0,0,0,100,0,0,0,0,0,45,0,2,0,0,0,0,19,10980,20,0,0,0,0,0,"Sprinkle - On Script - Say Line 1"), +(@Sprinkle*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sprinkle - On Script - Say Line 1"), +(@Sprinkle*100,9,4,0,0,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Sprinkle - On Script - Store target"), +(@Quixxil*100,9,0,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Quixxil - On Script - Say Line 0"), +(@Quixxil*100,9,1,0,0,0,100,0,1000,1000,0,0,53,1,@Quixxil,0,0,0,2,1,0,0,0,0,0,0,0,"Quixxil - On Script - Start Waypoint"), +(@Quixxil*100,9,2,0,0,0,100,0,0,0,0,0,45,0,3,0,0,0,0,19,10980,20,0,0,0,0,0,"Quixxil - On Script - Say Line 1"), +(@Quixxil*100,9,3,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Quixxil - On Script - Say Line 1"), +(@Quixxil*100,9,4,0,0,0,100,0,4000,4000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Quixxil - On Script - Say Line 2"), +(@Quixxil*100,9,5 ,0,0,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Quixxil - On Script - Store target"); + +-- Actionlist SAI +SET @ENTRY := 1097801; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Sprinkle*100+1 AND `source_type`=9; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Quixxil*100+1 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,2000,2000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Legacki - On Script - Say Line 2"), +(@ENTRY,9,1,0,0,0,100,0,2000,2000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Legacki - On Script - Say Line 3"), +(@ENTRY,9,2,0,0,0,100,0,2000,2000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Legacki - On Script - Say Line 4"), +(@ENTRY,9,3,0,0,0,100,0,2000,2000,0,0,33,10978,0,0,0,0,0,12,1,0,0,0,0,0,0,"Legacki - On Script - Credit quest"), +(@Sprinkle*100+1,9,0,0,0,0,100,0,2000,2000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sprinkle - On Script - Say Line 2"), +(@Sprinkle*100+1,9,1,0,0,0,100,0,2000,2000,0,0,33,@Sprinkle,0,0,0,0,0,12,1,0,0,0,0,0,0,"Sprinkle - On Script - Credit quest"), +(@Quixxil*100+1,9,1,0,0,0,100,0,2000,2000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Quixxil - On Script - Say Line 3"), +(@Quixxil*100+1,9,2,0,0,0,100,0,2000,2000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Quixxil - On Script - Say Line 4"), +(@Quixxil*100+1,9,3,0,0,0,100,0,2000,2000,0,0,33,@Quixxil,0,0,0,0,0,12,1,0,0,0,0,0,0,"Quixxil - On Script - Credit quest"); + +-- Umi's Mechanical Yeti SAI +SET @ENTRY := 10980; +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,0,1,0,0,29,5,10,0,0,0,0,19,10978,10,0,0,0,0,0,"Umi's Mechanical Yeti - On Just Summoned - Start Follow Closest Creature 'Legacki'"), +(@ENTRY,0,1,0,38,0,100,0,0,2,0,0,29,5,10,0,0,0,0,19,@Sprinkle,10,0,0,0,0,0,"Umi's Mechanical Yeti - On Just Summoned - Start Follow Closest Creature 'Legacki'"), +(@ENTRY,0,2,0,38,0,100,0,0,3,0,0,29,5,10,0,0,0,0,19,@Quixxil,10,0,0,0,0,0,"Umi's Mechanical Yeti - On Just Summoned - Start Follow Closest Creature 'Legacki'"), +(@ENTRY,0,3,4,54,0,100,0,0,0,0,0,1,0,1000,0,0,0,0,1,0,0,0,0,0,0,0,"Umi's Mechanical Yeti - On Just Summoned - Say Line 0"), +(@ENTRY,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,"Umi's Mechanical Yeti - On Just Summoned - Despawn In 30000 ms"), +(@ENTRY,0,5,0,52,0,100,0,0,10980,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Umi's Mechanical Yeti - On Text 0 Over - Say Line 1"); + +DELETE FROM `creature_text` WHERE `entry` IN (10980, 10978, @Quixxil, @Sprinkle); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(10978, 0, 0, '%s jumps in fright!', 16, 0, 100, 0, 0, 0, 6301, 0, 'Legacki'), +(10978, 1, 0, 'Ahhhhh!!!', 12, 0, 100, 0, 0, 0, 6302, 0, 'Legacki'), +(10978, 2, 0, 'You big meanie! Who put you up to this?', 12, 0, 100, 0, 0, 0, 6303, 0, 'Legacki'), +(10978, 3, 0, 'It was Umi, wasn''t it?! She''s always playing jokes on me, and now she''s got you in on it too!', 12, 0, 100, 0, 0, 0, 6304, 0, 'Legacki'), +(10978, 4, 0, '%s sighs.', 16, 0, 100, 0, 0, 0, 6305, 0, 'Legacki'), +(@Quixxil, 0, 0, 'Oh!!! Get that thing away from me!', 12, 0, 100, 0, 0, 0, 6314, 0, 'Quixxil'), +(@Quixxil, 1, 0, '%s runs quickly away from Umi''s Mechanical yeti.', 16, 0, 100, 0, 0, 0, 6318, 0, 'Quixxil'), +(@Quixxil, 2, 0, 'Why do you chase me, Mechanical yeti?! WHY?!', 12, 0, 100, 0, 0, 0, 6317, 0, 'Quixxil'), +(@Quixxil, 3, 0, '%s looks relieved.', 16, 0, 100, 0, 0, 0, 6322, 0, 'Quixxil'), +(@Quixxil, 4, 0, 'I''m jumpy as it is... and people insist on scaring me... Next time, though, I''ll be ready!', 12, 0, 100, 0, 0, 0, 6320, 0, 'Quixxil'), +(@Sprinkle, 0, 0, '%s jumps in fright!', 16, 0, 100, 0, 0, 0, 6306, 0, 'Legacki'), +(@Sprinkle, 1, 0, 'Ahhhhh!!! What is that thing?!', 12, 0, 100, 0, 0, 0, 6307, 0, 'Legacki'), +(@Sprinkle, 2, 0, 'Umi sent you, didn''t she? She told me to expect a surprise, but I never thought that this is what she meant!', 12, 0, 100, 0, 0, 0, 6308, 0, 'Legacki'), +(10980, 0, 0, '%s marches around, roaring and making a ruckus.', 16, 0, 100, 0, 0, 0, 6327, 0, 'Umi''s Mechanical Yeti'), +(10980, 1, 0, 'RAAAAAAAR!', 12, 0, 100, 0, 0, 0, 6329, 0, 'Umi''s Mechanical Yeti'); + + +DELETE FROM `waypoints` WHERE `entry` IN (10978, @Quixxil, @Sprinkle); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(10978, 1,6713.694,-4682.374,721.6163, 'Legacki'), +(10978, 2,6731.523,-4675.635,721.2076, 'Legacki'), +(10978, 3,6736.806,-4672.955,721.9132, 'Legacki'), +(10978, 4,6749.889,-4662.13,725.0011, 'Legacki'), +(10978, 5,6750.157,-4661.562,724.9875, 'Legacki'), +(10978, 6,6732.859,-4641.781,722.8784, 'Legacki'), +(10978, 7,6727.719,-4641.233,721.6862, 'Legacki'), +(10978, 8,6715.982,-4643.644,721.1971, 'Legacki'), +(10978, 9,6719.307,-4652.817,721.231, 'Legacki'), +(10978, 10,6715.004,-4685.518,721.466, 'Legacki'), +(10978, 11,6718.75,-4705.675,721.9097, 'Legacki'), +(10978, 12,6712.263,-4717.947,721.5077, 'Legacki'), +(10978, 13,6701.636,-4714.284,721.6529, 'Legacki'), +(10978, 14,6701.108,-4695.846,722.3613, 'Legacki'), +(10978, 15,6705.608,-4686.181,721.9736, 'Legacki'), +(@Quixxil, 1, -6186.462402, -1096.938965, -213.828033, 'Quixxil'), +(@Quixxil, 2, -6165.831543, -1100.158203, -210.395004, 'Quixxil'), +(@Quixxil, 3, -6146.718750, -1120.232056, -212.840530, 'Quixxil'), +(@Quixxil, 4, -6160.913574, -1141.027466, -217.996246, 'Quixxil'), +(@Quixxil, 5, -6184.303711, -1125.439087, -217.041824, 'Quixxil'), +(@Quixxil, 6, -6203.271484, -1111.438354, -219.371887, 'Quixxil'), +(@Quixxil, 7, -6213.762695, -1080.857422, -211.627533, 'Quixxil'), +(@Quixxil, 8, -6184.807129, -1050.598633, -191.913223, 'Quixxil'), +(@Quixxil, 9, -6173.853516, -1054.144165, -190.152405, 'Quixxil'), +(@Quixxil, 10, -6179.203613, -1041.906372, -185.499283, 'Quixxil'), +(@Quixxil, 11, -6197.859863, -1082.170044, -209.164001, 'Quixxil'), +(@Sprinkle, 1, -7114.151855, -3811.191406, 8.390815, 'Sprinkle'), +(@Sprinkle, 2, -7155.397949, -3820.387695, 8.370462, 'Sprinkle'), +(@Sprinkle, 3, -7178.134766, -3791.506836, 8.370436, 'Sprinkle'), +(@Sprinkle, 4, -7160.750488, -3758.740723, 8.370436, 'Sprinkle'), +(@Sprinkle, 5, -7136.473145, -3747.802246, 8.407521, 'Sprinkle'), +(@Sprinkle, 6, -7109.993652, -3739.603760, 9.105528, 'Sprinkle'), +(@Sprinkle, 7, -7111.109863, -3741.780029, 8.609260, 'Sprinkle'); From 7f9babe1d7bcee738d067ad472d496c3ade3463c Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 4 Apr 2015 23:43:31 +0200 Subject: [PATCH 49/86] DB/Creature: Scarlet Crusade in Deathknell By pete318, closes #14387 --- sql/updates/world/2015_04_04_05_world.sql | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sql/updates/world/2015_04_04_05_world.sql diff --git a/sql/updates/world/2015_04_04_05_world.sql b/sql/updates/world/2015_04_04_05_world.sql new file mode 100644 index 00000000000..dccc4f0c082 --- /dev/null +++ b/sql/updates/world/2015_04_04_05_world.sql @@ -0,0 +1,40 @@ +-- +DELETE FROM `creature_text` +WHERE `entry` IN (1506, 1507, 1667); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(1506, 0, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Convert 1'), +(1506, 0, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge''s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Convert 2'), +(1506, 0, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Convert 3'), +(1506, 0, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Convert 4'), +(1507, 0, 0, 'You carry the taint of the Scourge. Prepare to enter the Twisting Nether.', 12, 7, 25, 0, 0, 0, 2625, 0, 'Scarlet Initiate 1'), +(1507, 0, 1, 'There is no escape for you. The Crusade shall destroy all who carry the Scourge''s taint.', 12, 7, 25, 0, 0, 0, 2626, 0, 'Scarlet Initiate 2'), +(1507, 0, 2, 'The Light condemns all who harbor evil. Now you will die!', 12, 7, 25, 0, 0, 0, 2627, 0, 'Scarlet Initiate 3'), +(1507, 0, 3, 'The Scarlet Crusade shall smite the wicked and drive evil from these lands!', 12, 7, 25, 0, 0, 0, 2628, 0, 'Scarlet Initiate 4'), +(1667, 0, 0, 'These lands shall be cleansed!', 12, 0, 100, 5, 0, 0, 314, 0, 'Meven Korgal - Nearby aggro'), +(1667, 1, 0, 'These undead atrocities will be destroyed!', 12, 0, 100, 5, 0, 0, 316, 0, 'Meven Korgal - Spawn'), +(1667, 2, 0, 'The Scarlet Crusade shall not fail in its mission!', 12, 0, 100, 0, 0, 0, 317, 0, 'Meven Korgal - On aggro'); + +-- Scarlet Initiate SAI +SET @ENTRY := 1507; +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,7,0,0,0,100,0,0,0,3500,5000,11,20793,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scarlet Initiate - In Combat - Cast 'Fireball'"), +(@ENTRY,0,10,0,23,0,100,0,12544,0,5000,10000,11,12544,0,0,0,0,0,1,0,0,0,0,0,0,0,"Scarlet Initiate - On Has Aura 'Frost Armor' - Cast 'Frost Armor'"), +(@ENTRY,0,11,0,4,0,50,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scarlet Initiate - On Aggro - Say Line 0"); + +-- Scarlet Convert SAI +SET @ENTRY := 1506; +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,50,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scarlet Convert - On Aggro - Say Line 0"); + +-- Meven Korgal SAI +SET @ENTRY := 1667; +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,25,0,100,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"Meven Korgal - On Reset - Say Line 1"), +(@ENTRY,0,1,0,1,0,100,0,10000,30000,45000,120000,1,0,0,0,0,0,0,17,1,30,0,0,0,0,0,"Meven Korgal - Out of Combat - Say Line 0"), +(@ENTRY,0,2,0,4,0,100,0,0,0,0,0,1,2,0,0,0,0,0,2,0,0,0,0,0,0,0,"Meven Korgal - On Aggro - Say Line 2"); From 0df5cb972d8204e9b5058c8734efc26a520fd869 Mon Sep 17 00:00:00 2001 From: Rushor Date: Sat, 4 Apr 2015 23:47:40 +0200 Subject: [PATCH 50/86] DB/Creature: Valiance Keep Rifleman closes #14339 --- sql/updates/world/2015_04_04_06_world.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sql/updates/world/2015_04_04_06_world.sql diff --git a/sql/updates/world/2015_04_04_06_world.sql b/sql/updates/world/2015_04_04_06_world.sql new file mode 100644 index 00000000000..16034938010 --- /dev/null +++ b/sql/updates/world/2015_04_04_06_world.sql @@ -0,0 +1,7 @@ +-- +-- Valiance Keep Rifleman SAI +SET @ENTRY := 25311; +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,1,0,100,0,1000,1000,6000,6000,11,45761,0,0,0,0,0,19,24921,50,0,0,0,0,0,"Valiance Keep Rifleman - Out of Combat - Cast 'Shoot Gun'"); From 548aa119ac2884bb1c34f80e2fb077a66bcdfd9f Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 4 Apr 2015 23:07:16 +0100 Subject: [PATCH 51/86] Core/Networking: Fixed unsafe access to _worldSession member in WorldSocket (cherry picked from commit bed88e0dd475af5b73cea03821f7fb7cb9ddce9d) Core/Networking: Fixed deadlock in HandlePing if the client is about to be kicked for overspeed pings (cherry picked from commit 3da0f7e40920b652d2222fa88dbb4b516d24725d) Core/Networking: Cleanup CloseSocket calls from read failures in WorldSocket (cherry picked from commit 18343a7309fbf53a3509749c0a5ca1f8ea273c57) Conflicts: src/server/game/Server/WorldSocket.cpp Ref #14474 --- src/server/game/Server/WorldSession.cpp | 1 + src/server/game/Server/WorldSocket.cpp | 107 +++++++++++++++--------- src/server/game/Server/WorldSocket.h | 12 ++- src/server/shared/Networking/Socket.h | 6 +- 4 files changed, 85 insertions(+), 41 deletions(-) diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 1ff82aa7bf7..d79392177e4 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -225,6 +225,7 @@ void WorldSession::SendPacket(WorldPacket* packet) sScriptMgr->OnPacketSend(this, *packet); + TC_LOG_TRACE("network.opcode", "S->C: %s %s", GetPlayerInfo().c_str(), GetOpcodeNameForLogging(packet->GetOpcode()).c_str()); m_Socket->SendPacket(*packet); } diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 0bb864de0ed..cff423c71c6 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -28,7 +28,7 @@ using boost::asio::ip::tcp; WorldSocket::WorldSocket(tcp::socket&& socket) - : Socket(std::move(socket)), _authSeed(rand32()), _OverSpeedPings(0), _worldSession(nullptr) + : Socket(std::move(socket)), _authSeed(rand32()), _OverSpeedPings(0), _worldSession(nullptr), _authed(false) { _headerBuffer.Resize(sizeof(ClientPktHeader)); } @@ -53,7 +53,15 @@ void WorldSocket::HandleSendAuthSession() seed2.SetRand(16 * 8); packet.append(seed2.AsByteArray(16).get(), 16); // new encryption seeds - SendPacket(packet); + SendPacketAndLogOpcode(packet); +} + +void WorldSocket::OnClose() +{ + { + std::lock_guard sessionGuard(_worldSessionLock); + _worldSession = nullptr; + } } void WorldSocket::ReadHandler() @@ -80,7 +88,10 @@ void WorldSocket::ReadHandler() // We just received nice new header if (!ReadHeaderHandler()) + { + CloseSocket(); return; + } } // We have full read header, now check the data payload @@ -101,7 +112,10 @@ void WorldSocket::ReadHandler() // just received fresh new payload if (!ReadDataHandler()) + { + CloseSocket(); return; + } _headerBuffer.Reset(); } @@ -121,17 +135,8 @@ bool WorldSocket::ReadHeaderHandler() if (!header->IsValidSize() || !header->IsValidOpcode()) { - if (_worldSession) - { - Player* player = _worldSession->GetPlayer(); - TC_LOG_ERROR("network", "WorldSocket::ReadHeaderHandler(): client (account: %u, char [GUID: %u, name: %s]) sent malformed packet (size: %hu, cmd: %u)", - _worldSession->GetAccountId(), player ? player->GetGUIDLow() : 0, player ? player->GetName().c_str() : "", header->size, header->cmd); - } - else - TC_LOG_ERROR("network", "WorldSocket::ReadHeaderHandler(): client %s sent malformed packet (size: %hu, cmd: %u)", - GetRemoteIpAddress().to_string().c_str(), header->size, header->cmd); - - CloseSocket(); + TC_LOG_ERROR("network", "WorldSocket::ReadHeaderHandler(): client %s sent malformed packet (size: %hu, cmd: %u)", + GetRemoteIpAddress().to_string().c_str(), header->size, header->cmd); return false; } @@ -151,28 +156,32 @@ bool WorldSocket::ReadDataHandler() if (sPacketLog->CanLogPacket()) sPacketLog->LogPacket(packet, CLIENT_TO_SERVER, GetRemoteIpAddress(), GetRemotePort()); - TC_LOG_TRACE("network.opcode", "C->S: %s %s", (_worldSession ? _worldSession->GetPlayerInfo() : GetRemoteIpAddress().to_string()).c_str(), GetOpcodeNameForLogging(opcode).c_str()); + std::unique_lock sessionGuard(_worldSessionLock, std::defer_lock); switch (opcode) { case CMSG_PING: - HandlePing(packet); - break; + LogOpcodeText(opcode, sessionGuard); + return HandlePing(packet); case CMSG_AUTH_SESSION: - if (_worldSession) + LogOpcodeText(opcode, sessionGuard); + if (_authed) { - TC_LOG_ERROR("network", "WorldSocket::ProcessIncoming: received duplicate CMSG_AUTH_SESSION from %s", _worldSession->GetPlayerInfo().c_str()); - break; + // locking just to safely log offending user is probably overkill but we are disconnecting him anyway + if (sessionGuard.try_lock()) + TC_LOG_ERROR("network", "WorldSocket::ProcessIncoming: received duplicate CMSG_AUTH_SESSION from %s", _worldSession->GetPlayerInfo().c_str()); + return false; } HandleAuthSession(packet); break; case CMSG_KEEP_ALIVE: - TC_LOG_DEBUG("network", "%s", GetOpcodeNameForLogging(opcode).c_str()); - sScriptMgr->OnPacketReceive(_worldSession, packet); + LogOpcodeText(opcode, sessionGuard); break; default: { + sessionGuard.lock(); + LogOpcodeText(opcode, sessionGuard); if (!_worldSession) { TC_LOG_ERROR("network.opcode", "ProcessIncoming: Client not authed opcode = %u", uint32(opcode)); @@ -193,7 +202,26 @@ bool WorldSocket::ReadDataHandler() return true; } -void WorldSocket::SendPacket(WorldPacket& packet) +void WorldSocket::LogOpcodeText(uint16 opcode, std::unique_lock const& guard) const +{ + if (!guard) + { + TC_LOG_TRACE("network.opcode", "C->S: %s %s", GetRemoteIpAddress().to_string().c_str(), GetOpcodeNameForLogging(opcode).c_str()); + } + else + { + TC_LOG_TRACE("network.opcode", "C->S: %s %s", (_worldSession ? _worldSession->GetPlayerInfo() : GetRemoteIpAddress().to_string()).c_str(), + GetOpcodeNameForLogging(opcode).c_str()); + } +} + +void WorldSocket::SendPacketAndLogOpcode(WorldPacket const& packet) +{ + TC_LOG_TRACE("network.opcode", "S->C: %s %s", GetRemoteIpAddress().to_string().c_str(), GetOpcodeNameForLogging(packet.GetOpcode()).c_str()); + SendPacket(packet); +} + +void WorldSocket::SendPacket(WorldPacket const& packet) { if (!IsOpen()) return; @@ -201,8 +229,6 @@ void WorldSocket::SendPacket(WorldPacket& packet) if (sPacketLog->CanLogPacket()) sPacketLog->LogPacket(packet, SERVER_TO_CLIENT, GetRemoteIpAddress(), GetRemotePort()); - TC_LOG_TRACE("network.opcode", "S->C: %s %s", (_worldSession ? _worldSession->GetPlayerInfo() : GetRemoteIpAddress().to_string()).c_str(), GetOpcodeNameForLogging(packet.GetOpcode()).c_str()); - ServerPktHeader header(packet.size() + 2, packet.GetOpcode()); std::unique_lock guard(_writeLock); @@ -459,6 +485,7 @@ void WorldSocket::HandleAuthSession(WorldPacket& recvPacket) // At this point, we can safely hook a successful login sScriptMgr->OnAccountLogin(id); + _authed = true; _worldSession = new WorldSession(id, shared_from_this(), AccountTypes(security), expansion, mutetime, locale, recruiter, isRecruiter); _worldSession->LoadGlobalAccountData(); _worldSession->LoadTutorialsData(); @@ -477,10 +504,10 @@ void WorldSocket::SendAuthResponseError(uint8 code) WorldPacket packet(SMSG_AUTH_RESPONSE, 1); packet << uint8(code); - SendPacket(packet); + SendPacketAndLogOpcode(packet); } -void WorldSocket::HandlePing(WorldPacket& recvPacket) +bool WorldSocket::HandlePing(WorldPacket& recvPacket) { uint32 ping; uint32 latency; @@ -509,13 +536,14 @@ void WorldSocket::HandlePing(WorldPacket& recvPacket) if (maxAllowed && _OverSpeedPings > maxAllowed) { + std::unique_lock sessionGuard(_worldSessionLock); + if (_worldSession && !_worldSession->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_OVERSPEED_PING)) { TC_LOG_ERROR("network", "WorldSocket::HandlePing: %s kicked for over-speed pings (address: %s)", _worldSession->GetPlayerInfo().c_str(), GetRemoteIpAddress().to_string().c_str()); - CloseSocket(); - return; + return false; } } } @@ -523,20 +551,23 @@ void WorldSocket::HandlePing(WorldPacket& recvPacket) _OverSpeedPings = 0; } - if (_worldSession) { - _worldSession->SetLatency(latency); - _worldSession->ResetClientTimeDelay(); - } - else - { - TC_LOG_ERROR("network", "WorldSocket::HandlePing: peer sent CMSG_PING, but is not authenticated or got recently kicked, address = %s", GetRemoteIpAddress().to_string().c_str()); + std::lock_guard sessionGuard(_worldSessionLock); - CloseSocket(); - return; + if (_worldSession) + { + _worldSession->SetLatency(latency); + _worldSession->ResetClientTimeDelay(); + } + else + { + TC_LOG_ERROR("network", "WorldSocket::HandlePing: peer sent CMSG_PING, but is not authenticated or got recently kicked, address = %s", GetRemoteIpAddress().to_string().c_str()); + return false; + } } WorldPacket packet(SMSG_PONG, 4); packet << ping; - return SendPacket(packet); + SendPacketAndLogOpcode(packet); + return true; } diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h index 89c335662a8..0f6acd0d72c 100644 --- a/src/server/game/Server/WorldSocket.h +++ b/src/server/game/Server/WorldSocket.h @@ -55,19 +55,25 @@ public: void Start() override; - void SendPacket(WorldPacket& packet); + void SendPacket(WorldPacket const& packet); protected: + void OnClose() override; void ReadHandler() override; bool ReadHeaderHandler(); bool ReadDataHandler(); private: + /// writes network.opcode log + /// accessing WorldSession is not threadsafe, only do it when holding _worldSessionLock + void LogOpcodeText(uint16 opcode, std::unique_lock const& guard) const; + /// sends and logs network.opcode without accessing WorldSession + void SendPacketAndLogOpcode(WorldPacket const& packet); void HandleSendAuthSession(); void HandleAuthSession(WorldPacket& recvPacket); void SendAuthResponseError(uint8 code); - void HandlePing(WorldPacket& recvPacket); + bool HandlePing(WorldPacket& recvPacket); uint32 _authSeed; AuthCrypt _authCrypt; @@ -75,7 +81,9 @@ private: std::chrono::steady_clock::time_point _LastPingTime; uint32 _OverSpeedPings; + std::mutex _worldSessionLock; WorldSession* _worldSession; + bool _authed; MessageBuffer _headerBuffer; MessageBuffer _packetBuffer; diff --git a/src/server/shared/Networking/Socket.h b/src/server/shared/Networking/Socket.h index f7a1b954cb0..396d4bb3aab 100644 --- a/src/server/shared/Networking/Socket.h +++ b/src/server/shared/Networking/Socket.h @@ -62,7 +62,7 @@ public: return false; #ifndef TC_SOCKET_USE_IOCP - std::unique_lock guard(_writeLock, std::try_to_lock); + std::unique_lock guard(_writeLock); if (!guard) return true; @@ -140,6 +140,8 @@ public: if (shutdownError) TC_LOG_DEBUG("network", "Socket::CloseSocket: %s errored when shutting down socket: %i (%s)", GetRemoteIpAddress().to_string().c_str(), shutdownError.value(), shutdownError.message().c_str()); + + OnClose(); } /// Marks the socket for closing after write buffer becomes empty @@ -148,6 +150,8 @@ public: MessageBuffer& GetReadBuffer() { return _readBuffer; } protected: + virtual void OnClose() { } + virtual void ReadHandler() = 0; bool AsyncProcessQueue(std::unique_lock&) From 8819750e6a8f009ef2bb81099cd227b6720a7980 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Thu, 2 Apr 2015 23:52:11 +0200 Subject: [PATCH 52/86] Update README.md (cherry picked from commit a6247102fdaf94469981f299f504d20de0d72abe) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d92b3848c94..33b7349d9f1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # ![logo](http://www.trinitycore.org/f/public/style_images/1_trinitycore.png) TrinityCore -[![Coverity Scan Build Status](https://scan.coverity.com/projects/435/badge.svg)](https://scan.coverity.com/projects/435) +`6.x`: [![Coverity Scan Build Status](https://scan.coverity.com/projects/435/badge.svg)](https://scan.coverity.com/projects/435) +`3.3.5`: [![Coverity Scan Build Status](https://scan.coverity.com/projects/4656/badge.svg)](https://scan.coverity.com/projects/4656) [![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=1310)](https://www.bountysource.com/trackers/1310-trinity-core?utm_source=1310&utm_medium=shield&utm_campaign=TRACKER_BADGE) [![Issue Stats](http://www.issuestats.com/github/TrinityCore/TrinityCore/badge/pr)](http://www.issuestats.com/github/TrinityCore/TrinityCore) [![Issue Stats](http://www.issuestats.com/github/TrinityCore/TrinityCore/badge/issue)](http://www.issuestats.com/github/TrinityCore/TrinityCore) From 85d6ff9570869bce368e9bbcf881755c6c89cb55 Mon Sep 17 00:00:00 2001 From: Naios Date: Sat, 4 Apr 2015 23:56:19 +0200 Subject: [PATCH 53/86] Core/Log: Remove some unnecessary std::move's. * This are r-value references already. * Thanks @Shauren for noticing --- src/server/shared/Logging/Log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h index d4653960b15..e22a06e635e 100644 --- a/src/server/shared/Logging/Log.h +++ b/src/server/shared/Logging/Log.h @@ -64,7 +64,7 @@ class Log template inline void outMessage(std::string const& filter, LogLevel const level, const char* fmt, Args const&... args) { - write(std::move(std::unique_ptr(new LogMessage(level, filter, std::move(Trinity::StringFormat(fmt, args...)))))); + write(std::unique_ptr(new LogMessage(level, filter, Trinity::StringFormat(fmt, args...)))); } template From de490674ff1205d908301b94f5644247562b43cb Mon Sep 17 00:00:00 2001 From: Naios Date: Sat, 4 Apr 2015 23:59:28 +0200 Subject: [PATCH 54/86] Core/DBUpdater: Exit clean if a query failed to apply. * Fix some \W4 warnings about constructors. --- src/server/shared/Updater/DBUpdater.cpp | 27 ++++++++++++++++++----- src/server/shared/Updater/UpdateFetcher.h | 6 +++++ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/server/shared/Updater/DBUpdater.cpp b/src/server/shared/Updater/DBUpdater.cpp index 5918fe06b55..e5c571e4517 100644 --- a/src/server/shared/Updater/DBUpdater.cpp +++ b/src/server/shared/Updater/DBUpdater.cpp @@ -239,11 +239,19 @@ bool DBUpdater::Update(DatabaseWorkerPool& pool) [&](Path const& file) { DBUpdater::ApplyFile(pool, file); }, [&](std::string const& query) -> QueryResult { return DBUpdater::Retrieve(pool, query); }); - uint32 const count = updateFetcher.Update( - sConfigMgr->GetBoolDefault("Updates.Redundancy", true), - sConfigMgr->GetBoolDefault("Updates.AllowRehash", true), - sConfigMgr->GetBoolDefault("Updates.ArchivedRedundancy", false), - sConfigMgr->GetIntDefault("Updates.CleanDeadRefMaxCount", 3)); + uint32 count; + try + { + count = updateFetcher.Update( + sConfigMgr->GetBoolDefault("Updates.Redundancy", true), + sConfigMgr->GetBoolDefault("Updates.AllowRehash", true), + sConfigMgr->GetBoolDefault("Updates.ArchivedRedundancy", false), + sConfigMgr->GetIntDefault("Updates.CleanDeadRefMaxCount", 3)); + } + catch (UpdateException&) + { + return false; + } if (!count) TC_LOG_INFO("sql.updates", ">> %s database is up-to-date!", DBUpdater::GetTableName().c_str()); @@ -298,7 +306,14 @@ bool DBUpdater::Populate(DatabaseWorkerPool& pool) // Update database TC_LOG_INFO("sql.updates", ">> Applying \'%s\'...", base.generic_string().c_str()); - ApplyFile(pool, base); + try + { + ApplyFile(pool, base); + } + catch (UpdateException&) + { + return false; + } TC_LOG_INFO("sql.updates", ">> Done!"); return true; diff --git a/src/server/shared/Updater/UpdateFetcher.h b/src/server/shared/Updater/UpdateFetcher.h index 094e353f274..95988224ee2 100644 --- a/src/server/shared/Updater/UpdateFetcher.h +++ b/src/server/shared/Updater/UpdateFetcher.h @@ -61,6 +61,9 @@ private: uint64 const timestamp; + AppliedFileEntry(std::string const& _name, std::string const& _hash, State const _state, uint64 const _timestamp) : + name(_name), hash(_hash), state(_state), timestamp(_timestamp) { } + static inline State StateConvert(std::string const& state) { return (state == "RELEASED") ? RELEASED : ARCHIVED; @@ -82,6 +85,9 @@ private: Path const path; State const state; + + DirectoryEntry(Path const& _path, State const _state) : + path(_path), state(_state) { } }; using LocaleFileEntry = std::pair; From fb3c4911c75335445f197c07e54e422eaca445ba Mon Sep 17 00:00:00 2001 From: Carbenium Date: Sun, 5 Apr 2015 00:32:50 +0200 Subject: [PATCH 55/86] Remove old ACE reference (cherry picked from commit 18acb9914a2ea8660b34bac13ea81b13a5ee9fe1) --- src/tools/vmap4_assembler/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tools/vmap4_assembler/CMakeLists.txt b/src/tools/vmap4_assembler/CMakeLists.txt index c0ff9e9a153..dfd6c7d4dd4 100644 --- a/src/tools/vmap4_assembler/CMakeLists.txt +++ b/src/tools/vmap4_assembler/CMakeLists.txt @@ -16,7 +16,6 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/server/collision ${CMAKE_SOURCE_DIR}/src/server/collision/Maps ${CMAKE_SOURCE_DIR}/src/server/collision/Models - ${ACE_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ) From 67238e21666b580c3dcec611c1ff59606bd9e992 Mon Sep 17 00:00:00 2001 From: Carbenium Date: Sun, 5 Apr 2015 00:36:33 +0200 Subject: [PATCH 56/86] Rename variables to fix C++11 keyword collision (cherry picked from commit 573cda7b524ee4d7d23cefd026b056181f451a8b) --- src/server/game/Entities/Player/Player.cpp | 4 ++-- src/server/shared/Dynamic/ObjectRegistry.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9afc8865726..1a8c250bfb9 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -21997,9 +21997,9 @@ void Player::SetPvP(bool state) (*itr)->SetPvP(state); } -void Player::UpdatePvP(bool state, bool override) +void Player::UpdatePvP(bool state, bool _override) { - if (!state || override) + if (!state || _override) { SetPvP(state); pvpInfo.EndTimer = 0; diff --git a/src/server/shared/Dynamic/ObjectRegistry.h b/src/server/shared/Dynamic/ObjectRegistry.h index be253f947a7..1eb9368be61 100644 --- a/src/server/shared/Dynamic/ObjectRegistry.h +++ b/src/server/shared/Dynamic/ObjectRegistry.h @@ -47,12 +47,12 @@ class ObjectRegistry } /// Inserts a registry item - bool InsertItem(T *obj, Key key, bool override = false) + bool InsertItem(T *obj, Key key, bool _override = false) { typename RegistryMapType::iterator iter = i_registeredObjects.find(key); if ( iter != i_registeredObjects.end() ) { - if ( !override ) + if ( !_override ) return false; delete iter->second; i_registeredObjects.erase(iter); From aa1971964bf8ed70f0ca114fdc2d42ad774e9bbd Mon Sep 17 00:00:00 2001 From: Carbenium Date: Sun, 5 Apr 2015 00:41:21 +0200 Subject: [PATCH 57/86] Add missing override keyword in scripts (cherry picked from commit b948a4275e90c59db2599a1961937d62f17736ce) Conflicts: src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp src/server/scripts/Kalimdor/zone_tanaris.cpp src/server/scripts/Maelstrom/Stonecore/boss_slabhide.cpp src/server/scripts/OutdoorPvP/OutdoorPvPZM.h src/server/scripts/Spells/spell_mage.cpp src/server/scripts/Spells/spell_paladin.cpp --- .../EasternKingdoms/Karazhan/instance_karazhan.cpp | 2 +- .../EasternKingdoms/ScarletEnclave/chapter5.cpp | 2 +- .../ShadowfangKeep/instance_shadowfang_keep.cpp | 2 +- .../scripts/EasternKingdoms/zone_arathi_highlands.cpp | 2 +- .../scripts/EasternKingdoms/zone_hinterlands.cpp | 2 +- .../CullingOfStratholme/culling_of_stratholme.cpp | 2 +- .../Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp | 2 +- .../RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp | 2 +- .../Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp | 10 +++++----- .../scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp | 2 +- src/server/scripts/Kalimdor/zone_ashenvale.cpp | 6 +++--- src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp | 2 +- src/server/scripts/Kalimdor/zone_winterspring.cpp | 4 ++-- .../AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp | 2 +- .../RubySanctum/instance_ruby_sanctum.cpp | 2 +- .../IcecrownCitadel/boss_icecrown_gunship_battle.cpp | 6 +++--- .../IcecrownCitadel/instance_icecrown_citadel.cpp | 2 +- .../scripts/Northrend/Naxxramas/instance_naxxramas.cpp | 2 +- .../scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp | 2 +- .../Northrend/Ulduar/Ulduar/boss_general_vezax.cpp | 2 +- .../Northrend/Ulduar/Ulduar/instance_ulduar.cpp | 2 +- .../UtgardeKeep/boss_ingvar_the_plunderer.cpp | 2 +- .../Northrend/VioletHold/instance_violet_hold.cpp | 2 +- src/server/scripts/OutdoorPvP/OutdoorPvPZM.h | 10 +++++----- .../ShadowLabyrinth/boss_ambassador_hellmaw.cpp | 2 +- .../ShadowLabyrinth/instance_shadow_labyrinth.cpp | 2 +- .../Outland/GruulsLair/boss_high_king_maulgar.cpp | 2 +- .../ShatteredHalls/boss_warbringer_omrogg.cpp | 2 +- .../Outland/TempestKeep/Mechanar/instance_mechanar.cpp | 2 +- src/server/scripts/Outland/zone_hellfire_peninsula.cpp | 2 +- 30 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 1302c618e6f..e3ab206ac21 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -268,7 +268,7 @@ public: return ObjectGuid::Empty; } - void Load(char const* chrIn) + void Load(char const* chrIn) override { if (!chrIn) { diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index b21b2f8a73c..3df07562d50 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -1657,7 +1657,7 @@ public: { npc_the_lich_king_tirion_dawnAI(Creature* creature) : ScriptedAI(creature) { Reset(); } void Reset() override { } - void AttackStart(Unit* /*who*/) { } // very sample, just don't make them aggreesive override + void AttackStart(Unit* /*who*/) override { } // very sample, just don't make them aggreesive void UpdateAI(uint32 /*diff*/) override { } void JustDied(Unit* /*killer*/) override { } }; diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index be544449b67..a085463f7ce 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -236,7 +236,7 @@ public: OUT_LOAD_INST_DATA_COMPLETE; } - void Update(uint32 uiDiff) + void Update(uint32 uiDiff) override { if (GetData(TYPE_FENRUS) != DONE) return; diff --git a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp index 7c4190a648d..ac261f29287 100644 --- a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp @@ -114,7 +114,7 @@ class npc_professor_phizzlethorpe : public CreatureScript Talk(SAY_AGGRO); } - void sQuestAccept(Player* player, Quest const* quest) + void sQuestAccept(Player* player, Quest const* quest) override { if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE) { diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp index a29bb9b75b3..5b63c509eaa 100644 --- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp @@ -75,7 +75,7 @@ public: summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()); } - void sQuestAccept(Player* player, Quest const* quest) + void sQuestAccept(Player* player, Quest const* quest) override { if (quest->GetQuestId() == QUEST_RESQUE_OOX_09) { 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 f672871922a..b5d2931377f 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -421,7 +421,7 @@ public: gossipStep = 0; } - void AttackStart(Unit* who) + void AttackStart(Unit* who) override { if (who && !who->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC)) npc_escortAI::AttackStart(who); diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp index 2b00254167d..d8966ec76c1 100644 --- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp +++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp @@ -76,7 +76,7 @@ public: } } - void Update(uint32 /*diff*/) + void Update(uint32 /*diff*/) override { if (WardKeeperDeath == WARD_KEEPERS_NR) if (GameObject* go = instance->GetGameObject(DoorWardGUID)) diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp index f8873b06a75..d16a86f350f 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/instance_ruins_of_ahnqiraj.cpp @@ -57,7 +57,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript } } - bool SetBossState(uint32 bossId, EncounterState state) + bool SetBossState(uint32 bossId, EncounterState state) override { if (!InstanceScript::SetBossState(bossId, state)) return false; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp index 50fd94e66ee..65ffb7fd696 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp @@ -99,7 +99,7 @@ struct boss_twinemperorsAI : public ScriptedAI uint32 EnrageTimer; virtual bool IAmVeklor() = 0; - virtual void Reset() = 0; + virtual void Reset() override = 0; virtual void CastSpellOnBug(Creature* target) = 0; void TwinReset() @@ -400,7 +400,7 @@ public: struct boss_veknilashAI : public boss_twinemperorsAI { - bool IAmVeklor() {return false;} + bool IAmVeklor() override {return false;} boss_veknilashAI(Creature* creature) : boss_twinemperorsAI(creature) { Initialize(); @@ -425,7 +425,7 @@ public: me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); } - void CastSpellOnBug(Creature* target) + void CastSpellOnBug(Creature* target) override { target->setFaction(14); target->AI()->AttackStart(me->getThreatManager().getHostilTarget()); @@ -488,7 +488,7 @@ public: struct boss_veklorAI : public boss_twinemperorsAI { - bool IAmVeklor() {return true;} + bool IAmVeklor() override {return true;} boss_veklorAI(Creature* creature) : boss_twinemperorsAI(creature) { Initialize(); @@ -516,7 +516,7 @@ public: me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true); } - void CastSpellOnBug(Creature* target) + void CastSpellOnBug(Creature* target) override { target->setFaction(14); target->AddAura(SPELL_EXPLODEBUG, target); diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index 244261a86c1..46e831b0f83 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -220,7 +220,7 @@ public: }; } - virtual void Update(uint32 diff) + virtual void Update(uint32 diff) override { switch (PyramidPhase) { diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp index 76b43729517..e3357a5d62b 100644 --- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp +++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp @@ -85,7 +85,7 @@ public: summoned->AI()->AttackStart(me); } - void sQuestAccept(Player* player, Quest const* quest) + void sQuestAccept(Player* player, Quest const* quest) override { if (quest->GetQuestId() == QUEST_TOREK_ASSULT) { @@ -204,7 +204,7 @@ public: summoned->AI()->AttackStart(me); } - void sQuestAccept(Player* player, Quest const* quest) + void sQuestAccept(Player* player, Quest const* quest) override { if (quest->GetQuestId() == QUEST_FREEDOM_TO_RUUL) { @@ -346,7 +346,7 @@ public: summoned->AI()->AttackStart(me); } - void sQuestAccept(Player* player, Quest const* quest) + void sQuestAccept(Player* player, Quest const* quest) override { if (quest->GetQuestId() == QUEST_VORSHA) { diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index 1eb600cce99..5c9a57acec7 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -351,7 +351,7 @@ public: Talk(SAY_AGGRO, who); } - void sQuestAccept(Player* player, Quest const* quest) + void sQuestAccept(Player* player, Quest const* quest) override { if (quest->GetQuestId() == QUEST_A_CRY_FOR_SAY_HELP) { diff --git a/src/server/scripts/Kalimdor/zone_winterspring.cpp b/src/server/scripts/Kalimdor/zone_winterspring.cpp index 194daf21807..ec1291c6d18 100644 --- a/src/server/scripts/Kalimdor/zone_winterspring.cpp +++ b/src/server/scripts/Kalimdor/zone_winterspring.cpp @@ -451,7 +451,7 @@ public: } } - void JustDidDialogueStep(int32 entry) + void JustDidDialogueStep(int32 entry) override { switch (entry) { @@ -550,7 +550,7 @@ public: } } - Creature* GetSpeakerByEntry(int32 entry) + Creature* GetSpeakerByEntry(int32 entry) override { switch (entry) { diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp index 1482e884614..bb190e94cc8 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp @@ -108,7 +108,7 @@ class boss_prince_taldaram : public CreatureScript events.ScheduleEvent(EVENT_CONJURE_FLAME_SPHERES, 5000); } - void JustSummoned(Creature* summon) + void JustSummoned(Creature* summon) override { BossAI::JustSummoned(summon); 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 ec668952a68..3130bf20a0c 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/instance_ruby_sanctum.cpp @@ -44,7 +44,7 @@ class instance_ruby_sanctum : public InstanceMapScript BaltharusSharedHealth = 0; } - void OnPlayerEnter(Player* /*player*/) + void OnPlayerEnter(Player* /*player*/) override { if (!GetGuidData(DATA_HALION_CONTROLLER) && GetBossState(DATA_HALION) != DONE && GetBossState(DATA_GENERAL_ZARITHRIAN) == DONE) { 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 5f27830fd07..15bdedc75db 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp @@ -1873,7 +1873,7 @@ class spell_igb_rocket_pack_useable : public SpellScriptLoader { PrepareAuraScript(spell_igb_rocket_pack_useable_AuraScript); - bool Load() + bool Load() override { return GetOwner()->GetInstanceScript() != nullptr; } @@ -2001,7 +2001,7 @@ class spell_igb_cannon_blast : public SpellScriptLoader { PrepareSpellScript(spell_igb_cannon_blast_SpellScript); - bool Load() + bool Load() override { return GetCaster()->GetTypeId() == TYPEID_UNIT; } @@ -2343,7 +2343,7 @@ class spell_igb_gunship_fall_teleport : public SpellScriptLoader { PrepareSpellScript(spell_igb_gunship_fall_teleport_SpellScript); - bool Load() + bool Load() override { return GetCaster()->GetInstanceScript() != nullptr; } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index f2236061f88..61848070170 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -317,7 +317,7 @@ class instance_icecrown_citadel : public InstanceMapScript } // Weekly quest spawn prevention - uint32 GetCreatureEntry(uint32 /*guidLow*/, CreatureData const* data) + uint32 GetCreatureEntry(uint32 /*guidLow*/, CreatureData const* data) override { uint32 entry = data->id; switch (entry) diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index 173c6618cb0..3a431ab3ac0 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -564,7 +564,7 @@ class instance_naxxramas : public InstanceMapScript return true; } - bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target = NULL*/, uint32 /*miscvalue1 = 0*/) + bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target = NULL*/, uint32 /*miscvalue1 = 0*/) override { switch (criteria_id) { diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp index 74be65c62c2..41645a6ebb8 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_ormorok.cpp @@ -78,7 +78,7 @@ public: frenzy = false; } - void Reset() + void Reset() override { BossAI::Reset(); Initialize(); 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 4841950d9d3..64403ad40ca 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_general_vezax.cpp @@ -458,7 +458,7 @@ class spell_general_vezax_mark_of_the_faceless : public SpellScriptLoader { PrepareAuraScript(spell_general_vezax_mark_of_the_faceless_AuraScript); - bool Validate(SpellInfo const* /*spellInfo*/) + bool Validate(SpellInfo const* /*spellInfo*/) override { if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_THE_FACELESS_DAMAGE)) return false; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp index 49ed9609a03..ca3ea3a60ed 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/instance_ulduar.cpp @@ -448,7 +448,7 @@ class instance_ulduar : public InstanceMapScript } } - void OnGameObjectCreate(GameObject* gameObject) + void OnGameObjectCreate(GameObject* gameObject) override { switch (gameObject->GetEntry()) { diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp index 571f73ea628..483beda43ee 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp @@ -141,7 +141,7 @@ class boss_ingvar_the_plunderer : public CreatureScript damage = 0; } - void DoAction(int32 actionId) + void DoAction(int32 actionId) override { if (actionId == ACTION_START_PHASE_2) StartZombiePhase(); diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index a462c68e084..ea50969ecb8 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -802,7 +802,7 @@ public: } } - void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId) + void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId) override { switch (uiEventId) { diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h index a08e141294d..9c76b35937e 100644 --- a/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h +++ b/src/server/scripts/OutdoorPvP/OutdoorPvPZM.h @@ -184,9 +184,9 @@ class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint public: OPvPCapturePointZM_GraveYard(OutdoorPvP* pvp); - bool Update(uint32 diff); + bool Update(uint32 diff) override; - void ChangeState() { } + void ChangeState() override { } void FillInitialWorldStates(WorldPacket & data); @@ -196,11 +196,11 @@ class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint void SetBeaconState(uint32 controlling_team); // not good atm - bool HandleGossipOption(Player* player, ObjectGuid guid, uint32 gossipid); + bool HandleGossipOption(Player* player, ObjectGuid guid, uint32 gossipid) override; - bool HandleDropFlag(Player* player, uint32 spellId); + bool HandleDropFlag(Player* player, uint32 spellId) override; - bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso); + bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso) override; uint32 GetGraveYardState() const; diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp index 2b5ad18022a..9667b4e3bb0 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp @@ -93,7 +93,7 @@ class boss_ambassador_hellmaw : public CreatureScript { } - void DoAction(int32 actionId) + void DoAction(int32 actionId) override { if (actionId == ACTION_AMBASSADOR_HELLMAW_INTRO) DoIntro(); diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp index 9d2737c8ba5..f984272f4d5 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -92,7 +92,7 @@ class instance_shadow_labyrinth : public InstanceMapScript } } - void OnUnitDeath(Unit* unit) + void OnUnitDeath(Unit* unit) override { Creature* creature = unit->ToCreature(); if (!creature) diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp index 374ce3cd957..88dbeff09f5 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp @@ -123,7 +123,7 @@ public: instance->SetBossState(DATA_MAULGAR, DONE); } - void DoAction(int32 actionId) + void DoAction(int32 actionId) override { if (actionId == ACTION_ADD_DEATH) Talk(SAY_OGRE_DEATH); diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp index 0d7fe11956b..7d00cd97126 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp @@ -416,7 +416,7 @@ class npc_omrogg_heads : public CreatureScript void EnterCombat(Unit* /*who*/) override { } - void SetData(uint32 data, uint32 value) + void SetData(uint32 data, uint32 value) override { if (data == SETDATA_DATA && value == SETDATA_YELL) { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp index 4955a2201e5..b2d63315029 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp @@ -42,7 +42,7 @@ class instance_mechanar : public InstanceMapScript LoadDoorData(doorData); } - void OnGameObjectCreate(GameObject* gameObject) + void OnGameObjectCreate(GameObject* gameObject) override { switch (gameObject->GetEntry()) { diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index 97777cd5f6e..2a568a84a7c 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -289,7 +289,7 @@ public: summoned->AI()->AttackStart(me); } - void sQuestAccept(Player* player, Quest const* quest) + void sQuestAccept(Player* player, Quest const* quest) override { if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH) { From c0b77fc21664620f81edf64682cd21d9dac95b56 Mon Sep 17 00:00:00 2001 From: Carbenium Date: Sun, 5 Apr 2015 00:41:39 +0200 Subject: [PATCH 58/86] Switch abs to std::abs (cherry picked from commit 8476c2ac5a3cad03bc26b12fcc8b3f4f32854b65) --- .../scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp | 2 +- .../scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index 5e83c0c8653..8965b64767a 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -126,7 +126,7 @@ public: if (dist(xn, yn, xh, yh) >= dist(xn, yn, xp, yp) || dist(xp, yp, xh, yh) >= dist(xn, yn, xp, yp)) return false; // check distance from the beam - return (abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/dist(xn, yn, xp, yp) < 1.5f); + return (std::abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/dist(xn, yn, xp, yp) < 1.5f); } float dist(float xa, float ya, float xb, float yb) // auxiliary method for distance diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index ee12d8c4d0d..6021e38d3cf 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -316,10 +316,10 @@ class boss_high_astromancer_solarian : public CreatureScript Portals[i][2] = PORTAL_Z; } } - if ((abs(Portals[2][0] - Portals[1][0]) < 7) && (abs(Portals[2][1] - Portals[1][1]) < 7)) + if ((std::abs(Portals[2][0] - Portals[1][0]) < 7) && (std::abs(Portals[2][1] - Portals[1][1]) < 7)) { int i=1; - if (abs(CENTER_X + 26.0f - Portals[2][0]) < 7) + if (std::abs(CENTER_X + 26.0f - Portals[2][0]) < 7) i = -1; Portals[2][0] = Portals[2][0]+7*i; Portals[2][1] = Portal_Y(Portals[2][0], LARGE_PORTAL_RADIUS); From 62a3edb84a6437220be1c11a14622f7d5df8a972 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 5 Apr 2015 01:10:14 +0200 Subject: [PATCH 59/86] Core/Misc: Warning fixes (cherry picked from commit cc4d79495f98006f77c68792b946a412f5e86714) Partial cherry-picked. Signed-off-by: Naios --- src/server/shared/Updater/UpdateFetcher.h | 25 ++++++++++---------- src/server/shared/Utilities/ServiceWin32.cpp | 2 +- src/server/worldserver/Main.cpp | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/server/shared/Updater/UpdateFetcher.h b/src/server/shared/Updater/UpdateFetcher.h index 95988224ee2..fa142547873 100644 --- a/src/server/shared/Updater/UpdateFetcher.h +++ b/src/server/shared/Updater/UpdateFetcher.h @@ -27,7 +27,7 @@ class UpdateFetcher { - using Path = boost::filesystem::path; + typedef boost::filesystem::path Path; public: UpdateFetcher(Path const& updateDirectory, @@ -53,6 +53,9 @@ private: struct AppliedFileEntry { + AppliedFileEntry(std::string const& name_, std::string const& hash_, State state_, uint64 timestamp_) + : name(name_), hash(hash_), state(state_), timestamp(timestamp_) { } + std::string const name; std::string const hash; @@ -61,9 +64,6 @@ private: uint64 const timestamp; - AppliedFileEntry(std::string const& _name, std::string const& _hash, State const _state, uint64 const _timestamp) : - name(_name), hash(_hash), state(_state), timestamp(_timestamp) { } - static inline State StateConvert(std::string const& state) { return (state == "RELEASED") ? RELEASED : ARCHIVED; @@ -82,15 +82,14 @@ private: struct DirectoryEntry { + DirectoryEntry(Path const& path_, State state_) : path(path_), state(state_) { } + Path const path; State const state; - - DirectoryEntry(Path const& _path, State const _state) : - path(_path), state(_state) { } }; - using LocaleFileEntry = std::pair; + typedef std::pair LocaleFileEntry; struct PathCompare { @@ -100,11 +99,11 @@ private: } }; - using LocaleFileStorage = std::set; - using HashToFileNameStorage = std::unordered_map; - using AppliedFileStorage = std::unordered_map; - using DirectoryStorage = std::vector; - using SQLUpdate = std::shared_ptr; + typedef std::set LocaleFileStorage; + typedef std::unordered_map HashToFileNameStorage; + typedef std::unordered_map AppliedFileStorage; + typedef std::vector DirectoryStorage; + typedef std::shared_ptr SQLUpdate; LocaleFileStorage GetFileList() const; void FillFileListRecursively(Path const& path, LocaleFileStorage& storage, State const state, uint32 const depth) const; diff --git a/src/server/shared/Utilities/ServiceWin32.cpp b/src/server/shared/Utilities/ServiceWin32.cpp index c73949fc6a3..3e5e416b1a3 100644 --- a/src/server/shared/Utilities/ServiceWin32.cpp +++ b/src/server/shared/Utilities/ServiceWin32.cpp @@ -255,7 +255,7 @@ bool WinServiceRun() if (!StartServiceCtrlDispatcher(serviceTable)) { - TC_LOG_ERROR("server.worldserver", "StartService Failed. Error [%u]", ::GetLastError()); + TC_LOG_ERROR("server.worldserver", "StartService Failed. Error [%u]", uint32(::GetLastError())); return false; } return true; diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index fbf2c74ac0b..430c3ce4d73 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -308,7 +308,7 @@ void ShutdownCLIThread(std::thread* cliThread) errorBuffer = "Unknown error"; TC_LOG_DEBUG("server.worldserver", "Error cancelling I/O of CliThread, error code %u, detail: %s", - errorCode, errorBuffer); + uint32(errorCode), errorBuffer); LocalFree(errorBuffer); // send keyboard input to safely unblock the CLI thread From 0df7eebffdcf4ec4f5b8cd0fb793380c979137b1 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Sun, 5 Apr 2015 00:44:19 +0100 Subject: [PATCH 60/86] DB/Misc: Old Hillsbrad Asbringer Event --- sql/updates/world/2015_04_05_00_world.sql | 234 ++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 sql/updates/world/2015_04_05_00_world.sql diff --git a/sql/updates/world/2015_04_05_00_world.sql b/sql/updates/world/2015_04_05_00_world.sql new file mode 100644 index 00000000000..d37c91586bf --- /dev/null +++ b/sql/updates/world/2015_04_05_00_world.sql @@ -0,0 +1,234 @@ + SET @OGUID := 16926; + + -- Creatures : + SET @MOGRAINE := 20345; + SET @ISILLIEN := 20346; + SET @ABBENDIS := 20347; + SET @FAIRBANKS := 20348; + SET @TIRION := 20349; + SET @DOAN := 20352; + SET @TARGET := 20391; -- for spells + -- DB Guids : + SET @MGUID := 83685; + SET @FGUID := 83686; + SET @DGUID := 83689; + SET @TGUID := 83690; + SET @IGUID := 83691; + SET @AGUID := 83692; + -- Event + SET @TRIGG := 4498; + -- Default difference between events + SET @DELAY := 3000000; + -- Objects + SET @CHAIR := 184305; + SET @DARK := 184306; + SET @LIGHT := 184307; + SET @CHEST := 184308; + -- Positions + SET @CHESTX := 1816.698; + SET @CHESTY := 1031.316; + SET @CHESTZ := 11.84751; + -- Spells + SET @TBTL := 35172; + SET @JUDGE := 35170; + SET @SHOCK := 35160; + SET @SMITE := 35155; + SET @HEALS := 35162; + + DELETE FROM `gameobject` WHERE `id` BETWEEN 22882 AND 22887 AND `map`=560; + 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, 22882, 560, 3, 1, 1823.365, 1029.282, 11.64124, 1.439896, 0, 0, 0.7071069, 0.7071066, 7200, 255, 1), + (@OGUID+1, 22883, 560, 3, 1, 1824.24, 1031.343, 11.64124, 0.5061446, 0, 0, 0.7071069, 0.7071066, 7200, 255, 1), + (@OGUID+2, 22884, 560, 3, 1, 1822.9, 1032.183, 11.64124, 3.141593, 0, 0, 0.7071069, 0.7071066, 7200, 255, 1), + (@OGUID+3, 22885, 560, 3, 1, 1813.827, 999.6839, 12.13165, 0.1047193, 0, 0, 0.7071069, 0.7071066, 7200, 255, 1), + (@OGUID+4, 22886, 560, 3, 1, 1822.891, 1030.719, 11.64124, 4.232424, 0, 0, 0.7071069, 0.7071066, 7200, 255, 1), + (@OGUID+5, 22887, 560, 3, 1, 1812.618, 999.1037, 12.13165, 1.509709, 0, 0, 0.7071069, 0.7071066, 7200, 255, 1); + + DELETE FROM `conditions` WHERE `SourceEntry` IN (@SMITE,@SHOCK,@JUDGE,@HEALS); + INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES + (13,1,@SMITE,0,0,31,0,3,@TARGET,0,0,0,'','Spell casts only on Creature 20391'), + (13,1,@SHOCK,0,0,31,0,3,@TARGET,0,0,0,'','Spell casts only on Creature 20391'), + (13,1,@JUDGE,0,0,31,0,3,@TARGET,0,0,0,'','Spell casts only on Creature 20391'), + (13,1,@HEALS,0,0,31,0,3,@TARGET,0,0,0,'','Spell casts only on Creature 20391'); + + DELETE FROM `creature_text` WHERE `entry` IN (@MOGRAINE,@ISILLIEN,@ABBENDIS,@FAIRBANKS,@TIRION,@DOAN); + INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `BroadcastTextId`, `comment`) VALUES + -- Commander Mograine + (@MOGRAINE, 0 , 0, 'Keep your voices down. There are strangers about...' ,12 ,0,100,1,18084, ' Mograine - 1'), + (@MOGRAINE, 1 , 0, 'Brothers and sisters, I have called you here today to discuss the fate of Lordaeron.' ,12 ,0,100,1,18085, ' Mograine - 2'), + (@MOGRAINE, 2 , 0, 'I hear things... Things that should not be.' ,12 ,0,100,1,18087, ' Mograine - 3'), + (@MOGRAINE, 3 , 0, 'The dead rise... Undead, from the frozen northlands. Whole cities have gone missing. I...' ,12 ,0,100,1,18088, ' Mograine - 4'), + (@MOGRAINE, 4 , 0, 'I have heard that Northrend is lost...' ,12 ,0,100,274,18089, ' Mograine - 5'), + (@MOGRAINE, 5 , 0, 'We must stand at the ready. I have faced undead before. They are ruthless killing machines, devoid of any emotion or compassion.' ,12 ,0,100,1,18091, ' Mograine - 6'), + (@MOGRAINE, 6 , 0, 'Propose? I propose that we prepare. That we prepare our loved ones, family and friends for the possibility of an undead holocaust.' ,12 ,0,100,6,18095, ' Mograine - 7'), + (@MOGRAINE, 7 , 0, 'And there is this...' ,12 ,0,100,6,18096, ' Mograine - 8'), + (@MOGRAINE, 8 , 0, 'I have had this object in my possession for 10 years. Since Blackrock Spire...' ,12 ,0,100,1,18099, ' Mograine - 9'), + (@MOGRAINE, 9 , 0, 'I wrested it free from the remains of an orc lieutenant - a dark caster... It is from their homeworld.' ,12 ,0,100,1,18100, ' Mograine - 10'), + (@MOGRAINE, 10 , 0, 'Do not get too close. I laid a hand upon it once... Only once and never again. The memories of that day still linger.' ,12 ,0,100,1,18101, ' Mograine - 11'), + (@MOGRAINE, 11 , 0, 'I surmise that this object is the living embodiment of shadows... darkness... It is a manifestation. It is a void.' ,12 ,0,100,1,18103, ' Mograine - 12'), + (@MOGRAINE, 12 , 0, 'No, old friend, it is very relevant.' ,12 ,0,100,1,18107, ' Mograine - 13'), + (@MOGRAINE, 13 , 0, 'Let me ask you this, brothers and sisters: Can good exist without evil? Can there be light without dark?' ,12 ,0,100,1,18108, ' Mograine - 14'), + (@MOGRAINE, 14 , 0, 'And if that answer is no, then could it be possible that because this artifact exists, its polar opposite must also exist?' ,12 ,0,100,25,18109, ' Mograine - 15'), + (@MOGRAINE, 15 , 0, 'Could you imagine what the material manifestation of the Light could do against the undead?' ,12 ,0,100,1,18110, ' Mograine - 16'), + (@MOGRAINE, 16 , 0, 'It consumed the Light!' ,12 ,0,100,25,18117, ' Mograine - 17'), + (@MOGRAINE, 17 , 0, 'BY THE LIGHT! Could it be? Could this be it?' ,12 ,0,100,5,18122, ' Mograine - 18'), + (@MOGRAINE, 18 , 0, 'I must know... I will know.' ,12 ,0,100,5,18123, ' Mograine - 19'), + (@MOGRAINE, 19 , 0, 'I... It... It is beautiful. What I felt when I touched it... The Light coursed through me and I through it... It healed my spirit.' ,12 ,0,100,1,18125, ' Mograine - 20'), + (@MOGRAINE, 20 , 0, 'Let us never again speak of this day. Our enemies are many. They need not know we hold such artifacts.' ,12 ,0,100,1,18128, ' Mograine - 21'), + (@MOGRAINE, 21 , 0, 'I have seen it... From this blessed crystal we will forge a weapon. This weapon will hold inside it a piece of each of us... And when it is used against undead, it shall cast them down. And in its wake, it will leave only ashes...' ,12 ,0,100,1,18129, ' Mograine - 22'), + (@MOGRAINE, 22 , 0, '%s lowers his voice to a whisper.' ,16,0,100,0,18086, ' Emote - 1'), + (@MOGRAINE, 23 , 0, 'Gasps can be heard throughout the room.' ,16,0,100,0,18090, ' Emote - 2'), + (@MOGRAINE, 25 , 0, '%s unlocks the chest.' ,16,0,100,25,18097, ' Emote - 4'), + (@MOGRAINE, 26 , 0, '%s removes the gauntlet from his right arm and shows everyone his mangled hand.' ,16,0,100,0,18102, ' Emote - 5'), + (@MOGRAINE, 27 , 0, '%s shakes his head.' ,16,0,100,0,18106, ' Emote - 6'), + (@MOGRAINE, 28 , 0, 'Shock then silence overtakes the crowd.' ,16,0,100,0,18113, ' Emote - 7'), + (@MOGRAINE, 29 , 0, '%s reaches out to touch the light crystal.' ,16,0,100,25,18124, ' Emote - 8'), + (@MOGRAINE, 30 , 0, '%s puts the crystal back inside the chest.' ,16,0,100,0,18127, ' Emote - 9'), + -- Isillien + (@ISILLIEN, 0 , 0, 'I do not see how this evil artifact is relevant to the undead. We must destroy it!' ,12 ,0,100,5,18104, ' Isillien - 1'), + (@ISILLIEN, 1 , 0, 'Nonsense, Mograine! It must be destroyed!' ,12 ,0,100,5,18112, ' Isillien - 2'), + (@ISILLIEN, 2 , 0, 'Your hand! It is healed!' ,12 ,0,100,25,18126, ' Isillien - 3'), + (@ISILLIEN, 3 , 0, 'The Ashbringer...' ,12 ,0,100,66,18130, ' Isillien - 4'), + -- Abbendis + (@ABBENDIS, 0 , 0, 'By the Light! What is it?' ,12 ,0,100,25,18098, ' Abbendis - 1'), + (@ABBENDIS, 1 , 0, 'The Ashbringer...' ,12 ,0,100,66,18130, ' Abbendis - 2'), + -- Fairbanks + (@FAIRBANKS, 0 , 0, 'Is... Is it getting lighter? Its coloration... It is changing.' ,12 ,0,100,1,18121, ' Fairbanks - 1'), + (@FAIRBANKS, 1 , 0, 'The Ashbringer...' ,12 ,0,100,66,18130, ' Fairbanks - 2'), + -- Tirion Fordring + (@TIRION, 0 , 0, 'Aye, I''ve battled them as well. We are ill-prepared as a kingdom to withstand such an assault.' ,12 ,0,100,1,18093, ' Tirion - 1'), + (@TIRION, 1 , 0, 'Impossible!' ,12 ,0,100,5,18118, ' Tirion - 2'), + (@TIRION, 2 , 0, 'The Ashbringer...' ,12 ,0,100,66,18130, ' Tirion - 3'), + (@TIRION, 3 , 0, '%s nods.' ,16,0,100,0,18092, ' Emote - 3'), + -- Archanist Doan + (@DOAN, 0 , 0, 'What do you propose, Mograine?' ,12 ,0,100,6,18094, ' Doan - 1'), + (@DOAN, 1 , 0, 'The Ashbringer...' ,12 ,0,100,66,18130, ' Doan - 2'); + + UPDATE `creature` SET `position_x`=1818.420044, `position_y`=1031.170044, `position_z`=11.0651, `orientation`=3.14155 WHERE `guid`=@MGUID; + UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN (@MOGRAINE,@TIRION,@ABBENDIS,@FAIRBANKS,@ISILLIEN); + UPDATE `creature_template` SET `scale` = 1.5 WHERE `entry` = @TARGET; + + DELETE FROM `creature_addon` WHERE `guid` = @MGUID; + INSERT INTO `creature_addon` (`guid`,`bytes1`) VALUES (@MGUID,4); + + DELETE FROM `areatrigger_scripts` WHERE `entry` = @TRIGG; + INSERT INTO `areatrigger_scripts`(`entry`, `ScriptName`) VALUES + (@TRIGG,'SmartTrigger'); + + DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@TRIGG,@MOGRAINE,@MOGRAINE*100,@TIRION,@TIRION*100,@ABBENDIS,@ABBENDIS*100,@ISILLIEN,@ISILLIEN*100,@FAIRBANKS,@FAIRBANKS*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 + -- Trigger sets data on involved NPCs + (@TRIGG,2,0,1,46,0,100,0,@TRIGG,0,0,0,45,1,1,0,0,0,0,10,@MGUID,@MOGRAINE,0,0,0,0,0,"Set data - On Enter inn"), + (@TRIGG,2,1,2,61,0,100,0,@TRIGG,0,0,0,45,1,1,0,0,0,0,10,@TGUID,@TIRION,0,0,0,0,0,"Set data - On Enter inn"), + (@TRIGG,2,2,3,61,0,100,0,@TRIGG,0,0,0,45,1,1,0,0,0,0,10,@AGUID,@ABBENDIS,0,0,0,0,0,"Set data - On Enter inn"), + (@TRIGG,2,3,4,61,0,100,0,@TRIGG,0,0,0,45,1,1,0,0,0,0,10,@IGUID,@ISILLIEN,0,0,0,0,0,"Set data - On Enter inn"), + (@TRIGG,2,4,5,61,0,100,0,@TRIGG,0,0,0,45,1,1,0,0,0,0,10,@FGUID,@FAIRBANKS,0,0,0,0,0,"Set data - On Enter inn"), + -- NPCs run scripts + (@MOGRAINE,0,0,1,38,0,100,0,1,1,@DELAY,@DELAY,80,@MOGRAINE*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - On set data - Run Script"), + (@ISILLIEN,0,0,1,38,0,100,0,1,1,@DELAY,@DELAY,80,@ISILLIEN*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Isillien - On set data - Run Script"), + (@TIRION,0,0,1,38,0,100,0,1,1,@DELAY,@DELAY,80,@TIRION*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Tirion - On set data - Run Script"), + (@FAIRBANKS,0,0,1,38,0,100,0,1,1,@DELAY,@DELAY,80,@FAIRBANKS*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Fairbanks - On set data - Run Script"), + (@ABBENDIS,0,0,1,38,0,100,0,1,1,@DELAY,@DELAY,80,@ABBENDIS*100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Abbendis - On set data - Run Script"), + -- Mograine (main) script + (@MOGRAINE*100,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,"Mograine - Script - Say Line 1"),-- 56:34.5 + (@MOGRAINE*100,9,1,0,0,0,100,0,5000,5000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 2"),-- 39 + (@MOGRAINE*100,9,2,0,0,0,100,0,7000,7000,0,0,1,22,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote 1"), -- 46 + (@MOGRAINE*100,9,3,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 3"),-- 47 + (@MOGRAINE*100,9,4,0,0,0,100,0,4000,4000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 4"),-- 51 + (@MOGRAINE*100,9,5,0,0,0,100,0,9000,9000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 5"), -- 00 + (@MOGRAINE*100,9,6,0,0,0,100,0,6000,6000,0,0,1,23,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote 2"), -- 06 + (@MOGRAINE*100,9,7,0,0,0,100,0,2000,2000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 6"), -- 08 + (@MOGRAINE*100,9,8,0,0,0,100,0,6000,6000,0,0,1,3,0,0,0,0,0,10,@TGUID,@TIRION,0,0,0,0,0,"Tirion - Script - Emote 3"), -- 14 + (@MOGRAINE*100,9,9,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,10,@TGUID,@TIRION,0,0,0,0,0,"Tirion - Script - Say Line 1"), -- 17 + (@MOGRAINE*100,9,10,0,0,0,100,0,6000,6000,0,0,1,0,0,0,0,0,0,10,@DGUID,@DOAN,0,0,0,0,0,"Doan - Say Line 1"), -- 23 + (@MOGRAINE*100,9,11,0,0,0,100,0,5000,5000,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 7"), -- 28 + (@MOGRAINE*100,9,12,0,0,0,100,0,7000,7000,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 8"), -- 35 + (@MOGRAINE*100,9,13,0,0,0,100,0,4000,4000,0,0,50,@CHEST,155,0,0,0,0,8,0,0,0,@CHESTX,@CHESTY,@CHESTZ,0,"Mograine - Script - Spawn chest"), -- 39 + (@MOGRAINE*100,9,14,0,0,0,100,0,2000,2000,0,0,1,25,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote 4"), -- 41 + (@MOGRAINE*100,9,15,0,0,0,100,0,1000,1000,0,0,9,0,0,0,0,0,0,15,@CHEST,10,0,0,0,0,0,"Mograine - Script - Open Chest"), -- 42 + (@MOGRAINE*100,9,16,0,0,0,100,0,0,0,0,0,12,@TARGET,1,120000,0,0,0,8,0,0,0,1816.784,1031.313,12.4703,6.265732,"Mograine - Script - Spawn dummy"), -- 42 + (@MOGRAINE*100,9,17,0,0,0,100,0,0,0,0,0,50,@DARK,110,0,0,0,0,8,0,0,0,@CHESTX,@CHESTY,@CHESTZ,0,"Mograine - Script - Spawn crystal"), -- 42 + (@MOGRAINE*100,9,18,0,0,0,100,0,2000,2000,0,0,5,34,0,0,0,0,0,10,@AGUID,@ABBENDIS,0,0,0,0,0,"Abbendis - Script - Emote"), -- 44 + (@MOGRAINE*100,9,19,0,0,0,100,0,2000,2000,0,0,1,0,0,0,0,0,0,10,@AGUID,@ABBENDIS,0,0,0,0,0,"Abbendis - Script - Say Line 1"), -- 46 + (@MOGRAINE*100,9,20,0,0,0,100,0,5000,5000,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 9"), -- 50 + (@MOGRAINE*100,9,21,0,0,0,100,0,4000,4000,0,0,1,9,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 10"), -- 54 + (@MOGRAINE*100,9,22,0,0,0,100,0,6000,6000,0,0,1,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 11"), -- 00 + (@MOGRAINE*100,9,23,0,0,0,100,0,3000,3000,0,0,1,26,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote 5"), + (@MOGRAINE*100,9,24,0,0,0,100,0,4000,4000,0,0,1,11,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 12"), + (@MOGRAINE*100,9,25,0,0,0,100,0,9000,9000,0,0,1,0,0,0,0,0,0,10,@IGUID,@ISILLIEN,0,0,0,0,0,"Isillien - Script - Say Line 1"), + (@MOGRAINE*100,9,26,0,0,0,100,0,5000,5000,0,0,1,27,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote 6"), + (@MOGRAINE*100,9,27,0,0,0,100,0,1000,1000,0,0,1,12,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 13"), + (@MOGRAINE*100,9,28,0,0,0,100,0,4000,4000,0,0,1,13,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 14"), + (@MOGRAINE*100,9,29,0,0,0,100,0,3000,3000,0,0,5,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote"), + (@MOGRAINE*100,9,30,0,0,0,100,0,3000,3000,0,0,1,14,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 15"), + (@MOGRAINE*100,9,31,0,0,0,100,0,2000,2000,0,0,5,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote"), + (@MOGRAINE*100,9,32,0,0,0,100,0,2000,2000,0,0,1,15,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 16"), + (@MOGRAINE*100,9,33,0,0,0,100,0,4000,4000,0,0,5,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote"), + (@MOGRAINE*100,9,34,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,10,@IGUID,@ISILLIEN,0,0,0,0,0,"Isillien - Script - Say Line 2"), + (@MOGRAINE*100,9,35,0,0,0,100,0,3000,3000,0,0,5,25,0,0,0,0,0,10,@IGUID,@ISILLIEN,0,0,0,0,0,"Isillien - Script - Emote"), + (@MOGRAINE*100,9,36,0,0,0,100,0,5000,5000,0,0,1,28,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote 7"), + (@MOGRAINE*100,9,37,0,0,0,100,0,0,0,0,0,5,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote"), -- 52 + (@MOGRAINE*100,9,38,0,0,0,100,0,2000,2000,0,0,91,@MGUID,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Set unit bytes"), + (@MOGRAINE*100,9,39,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,1818.665,1029.883,11.09751,2.553278,"Mograine - Script - Start WP"), + (@MOGRAINE*100,9,40,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,15,@CHEST,50,0,0,0,0,0,"Mograine - Script - Set orientation"), + (@MOGRAINE*100,9,41,0,0,0,100,0,4000,4000,0,0,1,16,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 17"), -- 58 + (@MOGRAINE*100,9,42,0,0,0,100,0,2000,2000,0,0,5,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote"), -- 00 + (@MOGRAINE*100,9,43,0,0,0,100,0,3000,3000,0,0,1,1,0,0,0,0,0,10,@TGUID,@TIRION,0,0,0,0,0,"Tirion - Say Line 2"), -- 03 + (@MOGRAINE*100,9,44,0,0,0,100,0,9000,9000,0,0,1,0,0,0,0,0,0,10,@FGUID,@FAIRBANKS,0,0,0,0,0,"Fairbanks - Say Line 2"), -- 11 + (@MOGRAINE*100,9,45,0,0,0,100,0,20000,20000,0,0,50,@LIGHT,32,0,0,0,0,8,0,0,0,1816.681,1031.386,12.78501,0,"Mograine - Script - Spawn crystal"), + (@MOGRAINE*100,9,46,0,0,0,100,0,3000,3000,0,0,1,17,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 18"), -- 34 + (@MOGRAINE*100,9,47,0,0,0,100,0,2000,2000,0,0,5,25,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote"), -- 36 + (@MOGRAINE*100,9,48,0,0,0,100,0,2000,2000,0,0,1,18,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 19"), -- 38 + (@MOGRAINE*100,9,49,0,0,0,100,0,4000,4000,0,0,1,29,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote 8"), -- 42 + (@MOGRAINE*100,9,50,0,0,0,100,0,1500,1500,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote"), + (@MOGRAINE*100,9,51,0,0,0,100,0,0,0,0,0,11,@TBTL,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Cast TBLT"), + (@MOGRAINE*100,9,52,0,0,0,100,0,4000,4000,0,0,5,18,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote"), + (@MOGRAINE*100,9,53,0,0,0,100,0,7000,7000,0,0,1,19,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 20"), + (@MOGRAINE*100,9,54,0,0,0,100,0,7000,7000,0,0,1,2,0,0,0,0,0,10,@IGUID,@ISILLIEN,0,0,0,0,0,"Isillien - Script - Say Line 3"), + (@MOGRAINE*100,9,55,0,0,0,100,0,4000,4000,0,0,1,30,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Emote 9"), + (@MOGRAINE*100,9,56,0,0,0,100,0,0,0,0,0,32,0,0,0,0,0,0,15,@CHEST,10,0,0,0,0,0,"Mograine - Script - Close Chest"), + (@MOGRAINE*100,9,57,0,0,0,100,0,4000,4000,0,0,1,20,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 21"), + (@MOGRAINE*100,9,58,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,1818.346,1031.224,11.09751,3.124123,"Mograine - Script - Start WP"), + (@MOGRAINE*100,9,59,0,0,0,100,0,500,500,0,0,50,@CHAIR,5000,0,0,0,0,8,0,0,0,1818.346,1031.224,11.09751,3.124123,"Mograine - Script - Spawn chair"), + (@MOGRAINE*100,9,60,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,10,@TGUID,@TIRION,0,0,0,0,0,"Mograine - Script - Set orientation"), + (@MOGRAINE*100,9,61,0,0,0,100,0,0,0,0,0,90,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Set unit bytes"), + (@MOGRAINE*100,9,62,0,0,0,100,0,8000,8000,0,0,1,21,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mograine - Script - Say Line 22"), + (@MOGRAINE*100,9,63,0,0,0,100,0,11000,11000,0,0,1,2,0,0,0,0,0,10,@TGUID,@TIRION,0,0,0,0,0,"Tirion - Say Line 3"), + (@MOGRAINE*100,9,64,0,0,0,100,0,3000,3000,0,0,1,3,0,0,0,0,0,10,@IGUID,@ISILLIEN,0,0,0,0,0,"Isillien - Script - Say line 4"), + (@MOGRAINE*100,9,65,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,@DGUID,@DOAN,0,0,0,0,0,"Doan - Script - Say line 2"), + (@MOGRAINE*100,9,66,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,@FGUID,@FAIRBANKS,0,0,0,0,0,"Fairbanks - Script - Say line 2"), + (@MOGRAINE*100,9,67,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,10,@AGUID,@ABBENDIS,0,0,0,0,0,"Abbendis - Script - Say line 2"), + -- Tirion script + (@TIRION*100,9,0,0,0,0,100,0,0,0,0,0,50,@CHAIR,215,0,0,0,0,8,0,0,0,1818.346,1031.224,11.09751,3.124123,"Mograine - Script - Spawn chair"), + (@TIRION*100,9,1,0,0,0,100,0,152000,152000,0,0,11,@SHOCK,2,0,0,0,0,1,0,0,0,0,0,0,0,"Tirion - Script - Cast Holy Shock"), + (@TIRION*100,9,2,0,0,0,100,0,12500,12500,0,0,11,@SHOCK,2,0,0,0,0,1,0,0,0,0,0,0,0,"Tirion - Script - Cast Holy Shock"), + (@TIRION*100,9,3,0,0,0,100,0,3500,3500,0,0,11,@JUDGE,2,0,0,0,0,1,0,0,0,0,0,0,0,"Tirion - Script - Cast Judgement"), + (@TIRION*100,9,4,0,0,0,100,0,2000,2000,0,0,11,@JUDGE,2,0,0,0,0,1,0,0,0,0,0,0,0,"Tirion - Script - Cast Judgement"), + (@TIRION*100,9,5,0,0,0,100,0,2500,2500,0,0,11,@HEALS,2,0,0,0,0,1,0,0,0,0,0,0,0,"Tirion - Script - Cast Heal"), + (@TIRION*100,9,6,0,0,0,100,0,4000,4000,0,0,11,@SHOCK,2,0,0,0,0,1,0,0,0,0,0,0,0,"Tirion - Script - Cast Holy Shock"), + -- Fairbanks script + (@FAIRBANKS*100,9,0,0,0,0,100,0,155000,155000,0,0,66,0,0,0,0,0,0,15,@CHEST,50,0,0,0,0,0,"Fairbanks - Script - Set orientation"), + (@FAIRBANKS*100,9,1,0,0,0,100,0,6000,6000,0,0,11,@HEALS,2,0,0,0,0,1,0,0,0,0,0,0,0,"Fairbanks - Script - Cast Heal"), + (@FAIRBANKS*100,9,2,0,0,0,100,0,5000,5000,0,0,11,@SMITE,2,0,0,0,0,1,0,0,0,0,0,0,0,"Fairbanks - Script - Cast Smite"), + (@FAIRBANKS*100,9,3,0,0,0,100,0,2500,2500,0,0,11,@HEALS,2,0,0,0,0,1,0,0,0,0,0,0,0,"Fairbanks - Script - Cast Heal"), + (@FAIRBANKS*100,9,4,0,0,0,100,0,2500,2500,0,0,11,@SMITE,2,0,0,0,0,1,0,0,0,0,0,0,0,"Fairbanks - Script - Cast Smite"), + (@FAIRBANKS*100,9,5,0,0,0,100,0,2500,2500,0,0,11,@SMITE,2,0,0,0,0,1,0,0,0,0,0,0,0,"Fairbanks - Script - Cast Smite"), + (@FAIRBANKS*100,9,6,0,0,0,100,0,2500,2500,0,0,11,@HEALS,2,0,0,0,0,1,0,0,0,0,0,0,0,"Fairbanks - Script - Cast Heal"), + (@FAIRBANKS*100,9,7,0,0,0,100,0,70000,70000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Fairbanks - Script - Set orientation"), + -- Abbendis script + (@ABBENDIS*100,9,0,0,0,0,100,0,68500,68500,0,0,66,0,0,0,0,0,0,15,@CHEST,50,0,0,0,0,0,"Abbendis - Script - Set orientation"), + (@ABBENDIS*100,9,1,0,0,0,100,0,96000,96000,0,0,11,@SHOCK,2,0,0,0,0,1,0,0,0,0,0,0,0,"Abbendis - Script - Cast Holy Shock"), + (@ABBENDIS*100,9,2,0,0,0,100,0,3500,3500,0,0,11,@JUDGE,2,0,0,0,0,1,0,0,0,0,0,0,0,"Abbendis - Script - Cast Judgement"), + (@ABBENDIS*100,9,3,0,0,0,100,0,3500,3500,0,0,11,@SHOCK,2,0,0,0,0,1,0,0,0,0,0,0,0,"Abbendis - Script - Cast Holy Shock"), + (@ABBENDIS*100,9,4,0,0,0,100,0,5000,5000,0,0,11,@HEALS,2,0,0,0,0,1,0,0,0,0,0,0,0,"Abbendis - Script - Cast Heal"), + (@ABBENDIS*100,9,5,0,0,0,100,0,2500,2500,0,0,11,@SHOCK,2,0,0,0,0,1,0,0,0,0,0,0,0,"Abbendis - Script - Cast Holy Shock"), + (@ABBENDIS*100,9,6,0,0,0,100,0,67000,67000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Abbendis - Script - Set orientation"), + -- Isillien script + (@ISILLIEN*100,9,0,0,0,0,100,0,68000,68000,0,0,66,0,0,0,0,0,0,15,@CHEST,50,0,0,0,0,0,"Isillien - Script - Set orientation"), + (@ISILLIEN*100,9,1,0,0,0,100,0,66000,66000,0,0,11,@SMITE,2,0,0,0,0,1,0,0,0,0,0,0,0,"Isillien - Script - Cast Smite"), + (@ISILLIEN*100,9,2,0,0,0,100,0,32000,32000,0,0,11,@SMITE,2,0,0,0,0,1,0,0,0,0,0,0,0,"Isillien - Script - Cast Smite"), + (@ISILLIEN*100,9,3,0,0,0,100,0,2500,2500,0,0,11,@HEALS,2,0,0,0,0,1,0,0,0,0,0,0,0,"Isillien - Script - Cast Heal"), + (@ISILLIEN*100,9,4,0,0,0,100,0,2500,2500,0,0,11,@SMITE,2,0,0,0,0,1,0,0,0,0,0,0,0,"Isillien - Script - Cast Smite"), + (@ISILLIEN*100,9,5,0,0,0,100,0,2500,2500,0,0,11,@SMITE,2,0,0,0,0,1,0,0,0,0,0,0,0,"Isillien - Script - Cast Smite"), + (@ISILLIEN*100,9,6,0,0,0,100,0,2500,2500,0,0,11,@HEALS,2,0,0,0,0,1,0,0,0,0,0,0,0,"Isillien - Script - Cast Heal"), + (@ISILLIEN*100,9,7,0,0,0,100,0,70000,70000,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Isillien - Script - Set orientation"); From 5bfb2a193555f8b16f4bb431c5d8d200d8d0ef78 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Sun, 5 Apr 2015 03:49:26 +0100 Subject: [PATCH 61/86] DB/Quest: Torek's Assault CPP > SAI Conversation to overcome some problems * Guards now follow Torek and will also attack enemy mobs * Torek will now attack enemy npcs instead of walking straight past them Closes #7299 --- sql/updates/world/2015_04_05_01_world.sql | 72 +++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sql/updates/world/2015_04_05_01_world.sql diff --git a/sql/updates/world/2015_04_05_01_world.sql b/sql/updates/world/2015_04_05_01_world.sql new file mode 100644 index 00000000000..8b8d98fc558 --- /dev/null +++ b/sql/updates/world/2015_04_05_01_world.sql @@ -0,0 +1,72 @@ +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry` IN(12858,12859); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(12858,12859) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1285800) 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 + +(12858, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 2, 113, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Torek - On Spawn - Set Faction'), +(12858, 0, 1, 2, 19, 0, 100, 0, 6544, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Torek - On Quest Accept - Store Targetlist'), +(12858, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1285800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Torek - On Quest Accept - Run Script'), +(12858, 0, 3, 0, 40, 0, 100, 1, 1, 12858, 0, 0, 1, 1, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Torek - On Reached WP1 - Say Line 1'), +(12858, 0, 4, 0, 40, 0, 100, 1, 8, 12858, 0, 0, 1, 2, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Torek - On Reached WP8 - Say Line 2'), +(12858, 0, 5, 0, 40, 0, 100, 1, 19, 12858, 0, 0, 107, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Torek - On Reached WP19 - Summon Group'), +(12858, 0, 6, 7, 40, 0, 100, 1, 20, 12858, 0, 0, 1, 3, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Torek - On Reached WP20 - Say Line 3'), +(12858, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 15, 6544, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Torek - On Reached WP20 - Complete Quest'), +(12858, 0, 8, 9, 40, 0, 100, 1, 21, 12858, 0, 0, 1, 4, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Torek - On Reached WP21 - Say Line 4'), +(12858, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 54, 60000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Torek - On Reached WP21 - Pause WP'), +(12858, 0, 10, 11, 40, 0, 100, 0, 22, 12858, 0, 0, 45, 2, 2, 0, 0, 0, 0, 9, 12859, 0, 100, 0, 0, 0, 0, 'Torek - On Reached WP22 - Set Data on Splintertree Raider'), +(12858, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Torek - On Reached WP22 - Despawn'), +(12858, 0, 12, 13, 6, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 9, 12859, 0, 200, 0, 0, 0, 0, 'Torek - On Death - Set Data on Splintertree Raider'), +(12858, 0, 13, 0, 61, 0, 100, 0, 0, 0, 0, 0, 6, 6544, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Torek - On Death - Fail Quest'), +(12858, 0, 14, 0, 9, 0, 100, 0, 0, 5, 15000, 20000, 11, 11977, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Torek - IC - Cast Rend'), +(12858, 0, 15, 0, 0, 0, 100, 0, 0, 5000, 20000, 30000, 11, 8078, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Torek - IC - Cast Thunderclap'), +(12858, 0, 16, 0, 40, 0, 100, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On reached WP - Set Home Position'), + +(12859, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 2, 113, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Splintertree Raider - On Spawn - Set Faction'), +(12859, 0, 1, 2, 38, 0, 100, 0, 1, 1, 0, 0, 2, 83, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Splintertree Raider - On Data Set 1 1 - Set Faction'), +(12859, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Splintertree Raider - On Data Set 1 1 - Set Bytes 1'), +(12859, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Splintertree Raider - On Data Set 1 1 - Set Aggresive'), + +(12859, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 19, 12858, 0, 0, 0, 0, 0, 0, 'Splintertree Raider - On Data Set 1 1 - Follow Torek'), +(12859, 0, 5, 0, 7, 0, 100, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 19, 12858, 0, 0, 0, 0, 0, 0, 'Splintertree Raider - On Evade - Follow Torek'), +(12859, 0, 6, 0, 38, 0, 100, 0, 2, 2, 0, 0, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Splintertree Raider - On Data Set 2 2 - Despawn'), +(12859, 0, 7, 0, 1, 0, 100, 0, 1000, 1000, 1000, 1000, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Splintertree Raider - OOC - Set Home Position'), + +(1285800, 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, 'Torek - Script - Set NPC Flags'), +(1285800, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 2, 83, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Torek - Script - Set Faction'), +(1285800, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Torek - Script - Say Line 0'), +(1285800, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 12859, 0, 200, 0, 0, 0, 0, 'Torek - Script - Set Data on Splintertree Raider'), +(1285800, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 0, 12858, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 'Torek - Script - Start WP'); + +DELETE FROM `creature_summon_groups` WHERE `summonerId`=12858; +INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`) VALUES +(12858, 0, 0, 12860, 1776.73, -2049.06, 109.83, 1.54, 4, 25000), +(12858, 0, 0, 12896, 1774.64, -2049.41, 109.83, 1.40, 4, 25000), +(12858, 0, 0, 12897, 1778.73, -2049.50, 109.83, 1.67, 4, 25000); + +DELETE FROM `script_waypoint` WHERE `entry`=12858; +DELETE FROM `waypoints` WHERE `entry`=12858; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES + (12858, 1, 1788.88, -2240.17, 111.71, ''), + (12858, 2, 1797.49, -2238.11, 112.31, ''), + (12858, 3, 1803.83, -2232.77, 111.22, ''), + (12858, 4, 1806.65, -2217.83, 107.36, ''), + (12858, 5, 1811.81, -2208.01, 107.45, ''), + (12858, 6, 1820.85, -2190.82, 100.49, ''), + (12858, 7, 1829.6, -2177.49, 96.44, ''), + (12858, 8, 1837.98, -2164.19, 96.71, 'prepare'), + (12858, 9, 1839.99, -2149.29, 96.78, ''), + (12858, 10, 1835.14, -2134.98, 96.8, ''), + (12858, 11, 1823.57, -2118.27, 97.43, ''), + (12858, 12, 1814.99, -2110.35, 98.38, ''), + (12858, 13, 1806.6, -2103.09, 99.19, ''), + (12858, 14, 1798.27, -2095.77, 100.04, ''), + (12858, 15, 1783.59, -2079.92, 100.81, ''), + (12858, 16, 1776.79, -2069.48, 101.77, ''), + (12858, 17, 1776.82, -2054.59, 109.82, ''), + (12858, 18, 1776.88, -2047.56, 109.83, ''), + (12858, 19, 1776.86, -2036.55, 109.83, ''), + (12858, 20, 1776.9, -2024.56, 109.83, 'win'), + (12858, 21, 1776.87, -2028.31, 109.83, 'stay'), + (12858, 22, 1776.9, -2028.3, 109.83, ''); From 78d2f934b99d2e92d28648a4f12dcb47767d43db Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Apr 2015 09:39:00 +0200 Subject: [PATCH 62/86] DB/Quest: Teron Gorefiend, I am... By gecko32, closes #3214 --- sql/updates/world/2015_04_05_02_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2015_04_05_02_world.sql diff --git a/sql/updates/world/2015_04_05_02_world.sql b/sql/updates/world/2015_04_05_02_world.sql new file mode 100644 index 00000000000..7b6816fc41e --- /dev/null +++ b/sql/updates/world/2015_04_05_02_world.sql @@ -0,0 +1,2 @@ +-- Add Quest rewards for quest Teron Gorefiend, I am... +UPDATE `quest_template` SET `RewardChoiceItemId1`=31104, `RewardChoiceItemId2`=31110, `RewardChoiceItemId3`=31109, `RewardChoiceItemId4`=31107, `RewardChoiceItemId5`=31106, `RewardChoiceItemId6`=31105 WHERE `Id` IN (10645,10639); From f49a1b0f1fb7423466e5773eb29c77b2ebf26fc0 Mon Sep 17 00:00:00 2001 From: Rushor Date: Sun, 5 Apr 2015 12:43:15 +0200 Subject: [PATCH 63/86] Scripts/Kalimdor: Ashenvale - Remove Torek C++ Script --- .../scripts/Kalimdor/zone_ashenvale.cpp | 128 ------------------ 1 file changed, 128 deletions(-) diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp index e3357a5d62b..3a02034e471 100644 --- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp +++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp @@ -24,7 +24,6 @@ SDCategory: Ashenvale Forest EndScriptData */ /* ContentData -npc_torek npc_ruul_snowhoof EndContentData */ @@ -33,132 +32,6 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "Player.h" -/*#### -# npc_torek -####*/ - -enum Torek -{ - SAY_READY = 0, - SAY_MOVE = 1, - SAY_PREPARE = 2, - SAY_WIN = 3, - SAY_END = 4, - SPELL_REND = 11977, - SPELL_THUNDERCLAP = 8078, - QUEST_TOREK_ASSULT = 6544, - NPC_SPLINTERTREE_RAIDER = 12859, - NPC_DURIEL = 12860, - NPC_SILVERWING_SENTINEL = 12896, - NPC_SILVERWING_WARRIOR = 12897, - FACTION_QUEST = 113 -}; - -class npc_torek : public CreatureScript -{ -public: - npc_torek() : CreatureScript("npc_torek") { } - - struct npc_torekAI : public npc_escortAI - { - npc_torekAI(Creature* creature) : npc_escortAI(creature) - { - Initialize(); - } - - void Initialize() - { - rend_Timer = 5000; - thunderclap_Timer = 8000; - _completed = false; - } - - void Reset() override - { - Initialize(); - } - - void EnterCombat(Unit* /*who*/) override { } - - void JustSummoned(Creature* summoned) override - { - summoned->AI()->AttackStart(me); - } - - void sQuestAccept(Player* player, Quest const* quest) override - { - if (quest->GetQuestId() == QUEST_TOREK_ASSULT) - { - /// @todo find companions, make them follow Torek, at any time (possibly done by core/database in future?) - Talk(SAY_READY, player); - me->setFaction(FACTION_QUEST); - npc_escortAI::Start(true, true, player->GetGUID()); - } - } - - void WaypointReached(uint32 waypointId) override - { - if (Player* player = GetPlayerForEscort()) - { - switch (waypointId) - { - case 1: - Talk(SAY_MOVE, player); - break; - case 8: - Talk(SAY_PREPARE, player); - break; - case 19: - /// @todo verify location and creatures amount. - me->SummonCreature(NPC_DURIEL, 1776.73f, -2049.06f, 109.83f, 1.54f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - me->SummonCreature(NPC_SILVERWING_SENTINEL, 1774.64f, -2049.41f, 109.83f, 1.40f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - me->SummonCreature(NPC_SILVERWING_WARRIOR, 1778.73f, -2049.50f, 109.83f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); - break; - case 20: - Talk(SAY_WIN, player); - _completed = true; - player->GroupEventHappens(QUEST_TOREK_ASSULT, me); - break; - case 21: - Talk(SAY_END, player); - break; - } - } - } - - void UpdateAI(uint32 diff) override - { - npc_escortAI::UpdateAI(diff); - - if (!UpdateVictim()) - return; - - if (rend_Timer <= diff) - { - DoCastVictim(SPELL_REND); - rend_Timer = 20000; - } else rend_Timer -= diff; - - if (thunderclap_Timer <= diff) - { - DoCast(me, SPELL_THUNDERCLAP); - thunderclap_Timer = 30000; - } else thunderclap_Timer -= diff; - } - - private: - uint32 rend_Timer; - uint32 thunderclap_Timer; - bool _completed; - - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_torekAI(creature); - } -}; - /*#### # npc_ruul_snowhoof ####*/ @@ -472,7 +345,6 @@ class go_naga_brazier : public GameObjectScript void AddSC_ashenvale() { - new npc_torek(); new npc_ruul_snowhoof(); new npc_muglash(); new go_naga_brazier(); From 229deea4435c7d642dd5ead062bd2e8b65916a57 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Apr 2015 12:50:53 +0200 Subject: [PATCH 64/86] DB/Misc: Fix startup errors --- sql/updates/world/2015_04_05_03_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2015_04_05_03_world.sql diff --git a/sql/updates/world/2015_04_05_03_world.sql b/sql/updates/world/2015_04_05_03_world.sql new file mode 100644 index 00000000000..261dd6c2a9f --- /dev/null +++ b/sql/updates/world/2015_04_05_03_world.sql @@ -0,0 +1,4 @@ +-- +UPDATE `creature` SET `spawnMask`=1 WHERE `map`=429; +UPDATE `gameobject` SET `spawnMask`=1 WHERE `map`=429; +UPDATE `quest_template` SET `RewardChoiceItemCount1`=1, `RewardChoiceItemCount2`=1, `RewardChoiceItemCount3`=1, `RewardChoiceItemCount4`=1, `RewardChoiceItemCount5`=1, `RewardChoiceItemCount6`=1 WHERE `Id` IN (10645,10639); From 16481d17aacfd9e866615212df11ddcdcf1fc2e4 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Apr 2015 12:57:14 +0200 Subject: [PATCH 65/86] Scripts/Kalimdor: Ashenvale - add missing enum --- src/server/scripts/Kalimdor/zone_ashenvale.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp index 3a02034e471..b8e6bfb85e8 100644 --- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp +++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp @@ -42,6 +42,7 @@ enum RuulSnowhoof NPC_THISTLEFUR_TOTEMIC = 3922, NPC_THISTLEFUR_PATHFINDER = 3926, QUEST_FREEDOM_TO_RUUL = 6482, + FACTION_QUEST = 113, GO_CAGE = 178147 }; From 96b7b7ced51efd6e4044f816e63fcc1d97ac3b09 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 5 Apr 2015 11:32:34 +0200 Subject: [PATCH 66/86] Build fix for GCC 4.7 (cherry picked from commit e7deae947c94eab04370b5bdaab059ac425d697d) --- src/server/game/DataStores/DBCStores.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index 3060c690cfc..6586c5035ec 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -312,7 +312,7 @@ void LoadDBCStores(const std::string& dataPath) for (uint32 i = 0; i < sCharSectionsStore.GetNumRows(); ++i) if (CharSectionsEntry const* entry = sCharSectionsStore.LookupEntry(i)) if (entry->Race && ((1 << (entry->Race - 1)) & RACEMASK_ALL_PLAYABLE) != 0) //ignore Nonplayable races - sCharSectionMap.emplace(uint8(entry->GenType) | (uint8(entry->Gender) << 8) | (uint8(entry->Race) << 16), entry); + sCharSectionMap.insert({ entry->GenType | (entry->Gender << 8) | (entry->Race << 16), entry }); LoadDBC(availableDbcLocales, bad_dbc_files, sCharTitlesStore, dbcPath, "CharTitles.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sChatChannelsStore, dbcPath, "ChatChannels.dbc"); From 4403ef69da65dbf917c421ecb0617f9064dd610b Mon Sep 17 00:00:00 2001 From: Dr-J Date: Sun, 5 Apr 2015 13:25:00 +0100 Subject: [PATCH 67/86] DB/Quest: When Smokey Sings, I Get Violent Closes #2621 The other spell effect must target scourge structure in order for the damage to player to work when using item. --- sql/updates/world/2015_04_05_04_world.sql | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sql/updates/world/2015_04_05_04_world.sql diff --git a/sql/updates/world/2015_04_05_04_world.sql b/sql/updates/world/2015_04_05_04_world.sql new file mode 100644 index 00000000000..12fabf12d97 --- /dev/null +++ b/sql/updates/world/2015_04_05_04_world.sql @@ -0,0 +1,33 @@ +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(12256,12255,12254,12253,12252,12251,12249,12244); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(12256,12255,12254,12253,12252,12251,12249,12244) 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 +(12256, 0, 0, 1, 8, 0, 100, 0, 19250, 0, 120000, 120000, 33, 12247, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Kill Credit'), +(12255, 0, 0, 1, 8, 0, 100, 0, 19250, 0, 120000, 120000, 33, 12247, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Kill Credit'), +(12254, 0, 0, 1, 8, 0, 100, 0, 19250, 0, 120000, 120000, 33, 12247, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Kill Credit'), +(12253, 0, 0, 1, 8, 0, 100, 0, 19250, 0, 120000, 120000, 33, 12247, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Kill Credit'), +(12252, 0, 0, 1, 8, 0, 100, 0, 19250, 0, 120000, 120000, 33, 12247, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Kill Credit'), +(12251, 0, 0, 1, 8, 0, 100, 0, 19250, 0, 120000, 120000, 33, 12247, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Kill Credit'), +(12249, 0, 0, 1, 8, 0, 100, 0, 19250, 0, 120000, 120000, 33, 12247, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Kill Credit'), +(12244, 0, 0, 1, 8, 0, 100, 0, 19250, 0, 120000, 120000, 33, 12247, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Kill Credit'), +(12256, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 70, 120, 0, 0, 0, 0, 0, 20, 177668, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Despawn Mark of Detonation'), +(12255, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 70, 120, 0, 0, 0, 0, 0, 20, 177668, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Despawn Mark of Detonation'), +(12254, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 70, 120, 0, 0, 0, 0, 0, 20, 177668, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Despawn Mark of Detonation'), +(12253, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 70, 120, 0, 0, 0, 0, 0, 20, 177668, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Despawn Mark of Detonation'), +(12252, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 70, 120, 0, 0, 0, 0, 0, 20, 177668, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Despawn Mark of Detonation'), +(12251, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 70, 120, 0, 0, 0, 0, 0, 20, 177668, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Despawn Mark of Detonation'), +(12249, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 70, 120, 0, 0, 0, 0, 0, 20, 177668, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Despawn Mark of Detonation'), +(12244, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 70, 120, 0, 0, 0, 0, 0, 20, 177668, 0, 0, 0, 0, 0, 0, 'Mark of Detonation - On Spellhit - Despawn Mark of Detonation'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=19250; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 19250, 0, 0, 31, 0, 3, 12256, 0, 0, 0, 0, '', 'Place Smokeys Mixture targets Mark of Detonation'), +(13, 1, 19250, 0, 1, 31, 0, 3, 12255, 0, 0, 0, 0, '', 'Place Smokeys Mixture targets Mark of Detonation'), +(13, 1, 19250, 0, 2, 31, 0, 3, 12254, 0, 0, 0, 0, '', 'Place Smokeys Mixture targets Mark of Detonation'), +(13, 1, 19250, 0, 3, 31, 0, 3, 12253, 0, 0, 0, 0, '', 'Place Smokeys Mixture targets Mark of Detonation'), +(13, 1, 19250, 0, 4, 31, 0, 3, 12252, 0, 0, 0, 0, '', 'Place Smokeys Mixture targets Mark of Detonation'), +(13, 1, 19250, 0, 5, 31, 0, 3, 12251, 0, 0, 0, 0, '', 'Place Smokeys Mixture targets Mark of Detonation'), +(13, 1, 19250, 0, 6, 31, 0, 3, 12249, 0, 0, 0, 0, '', 'Place Smokeys Mixture targets Mark of Detonation'), +(13, 1, 19250, 0, 7, 31, 0, 3, 12244, 0, 0, 0, 0, '', 'Place Smokeys Mixture targets Mark of Detonation'), +(13, 4, 19250, 0, 0, 31, 0, 3, 12247, 0, 0, 0, 0, '', 'Place Smokeys Mixture targets Scourge Structure'); From 8a7ba64f7bc563a4d420cdc25a46621c00f2735c Mon Sep 17 00:00:00 2001 From: Dr-J Date: Sun, 5 Apr 2015 14:42:23 +0100 Subject: [PATCH 68/86] DB/Creature: Anub'ar Venomancer Script Anub'ar Venomancer to use poison bolt Even though wowhead lists two spells for these creatures (poison bolt & poison bolt volley) in sniff only appears to use poison bolt ie 0 casts of the volley spell. --- sql/updates/world/2015_04_05_05_world.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sql/updates/world/2015_04_05_05_world.sql diff --git a/sql/updates/world/2015_04_05_05_world.sql b/sql/updates/world/2015_04_05_05_world.sql new file mode 100644 index 00000000000..4d23ec8a4c4 --- /dev/null +++ b/sql/updates/world/2015_04_05_05_world.sql @@ -0,0 +1,7 @@ +UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` =29217; + +DELETE FROM `smart_scripts` WHERE `entryorguid` =29217 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 +(29217, 0, 0, 0, 0, 0, 100, 2, 0, 2000, 2000, 4000, 11, 53617, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Anub ar Venomancer - On Range - Cast Poison Bolt (Normal)'), +(29217, 0, 1, 0, 0, 0, 100, 4, 0, 2000, 2000, 4000, 11, 59359, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Anub ar Venomancer - On Range - Cast Poison Bolt (Heroic)'); From 108d2784115faf4d1b44abd9b1c33f566307776f Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Apr 2015 19:59:29 +0200 Subject: [PATCH 69/86] DB/Game event: Fix Noblegarden start date --- sql/updates/world/2015_04_05_06_world_335.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2015_04_05_06_world_335.sql diff --git a/sql/updates/world/2015_04_05_06_world_335.sql b/sql/updates/world/2015_04_05_06_world_335.sql new file mode 100644 index 00000000000..874cefe45d6 --- /dev/null +++ b/sql/updates/world/2015_04_05_06_world_335.sql @@ -0,0 +1,2 @@ +-- +UPDATE `game_event` SET `start_time`='2015-05-05 00:01:00' WHERE `eventEntry`=9; From c7bc73c1677dfcd031f615b7c1d56be2ca736b78 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 5 Apr 2015 20:02:45 +0200 Subject: [PATCH 70/86] Update 2015_04_05_06_world_335.sql --- sql/updates/world/2015_04_05_06_world_335.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/updates/world/2015_04_05_06_world_335.sql b/sql/updates/world/2015_04_05_06_world_335.sql index 874cefe45d6..ed7071282ab 100644 --- a/sql/updates/world/2015_04_05_06_world_335.sql +++ b/sql/updates/world/2015_04_05_06_world_335.sql @@ -1,2 +1,2 @@ -- -UPDATE `game_event` SET `start_time`='2015-05-05 00:01:00' WHERE `eventEntry`=9; +UPDATE `game_event` SET `start_time`='2015-04-05 00:01:00' WHERE `eventEntry`=9; From e743f4a479ce7ddd3f13d51ca1c19a591c803fc0 Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Sun, 5 Apr 2015 22:03:40 +0300 Subject: [PATCH 71/86] Core/LFGMgr: Fix the case where the last player left in a lfg group would be stuck in party when porting out of the instance. If you find a better way or think this is wrong feel free to remove it or improve it. --- src/server/game/DungeonFinding/LFGMgr.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index a2058fffeed..7112aaeaaee 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -1266,6 +1266,14 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false* if (player->GetMapId() == uint32(dungeon->map)) player->TeleportToBGEntryPoint(); + // in the case were we are the last in lfggroup then we must disband when porting out of the instance + if (group->GetMembersCount() == 1) + { + group->Disband(); + TC_LOG_DEBUG("lfg.teleport", "Player %s is last in lfggroup so we disband the group.", + player->GetName().c_str()); + } + return; } From 66ce97c87e347ab9426ffbd60b6fe5aa90a96b9b Mon Sep 17 00:00:00 2001 From: Naios Date: Sun, 5 Apr 2015 21:30:22 +0200 Subject: [PATCH 72/86] Dep/CppFormat: Update cppformat to cppformat/cppformat@fd53bb6fb88a23e3 * fixes /W4 warning spamming. --- dep/PackageList.txt | 2 +- dep/cppformat/format.h | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dep/PackageList.txt b/dep/PackageList.txt index 63b41e4813e..9c5e66a955e 100644 --- a/dep/PackageList.txt +++ b/dep/PackageList.txt @@ -14,7 +14,7 @@ bzip2 (a freely available, patent free, high-quality data compressor) cppformat (type safe format library) https://github.com/cppformat/cppformat - Version: 1.1.0 aab64b55a4c5db598c123e1a2770b9eb6507d7d8 + Version: 1.1.0 fd53bb6fb88a23e38ec4fe331bfe95d7372d49c9 G3D (a commercial-grade C++ 3D engine available as Open Source (BSD License) http://g3d.sourceforge.net/ diff --git a/dep/cppformat/format.h b/dep/cppformat/format.h index 3a82f8272c0..8d54bf521c7 100644 --- a/dep/cppformat/format.h +++ b/dep/cppformat/format.h @@ -800,6 +800,10 @@ struct EnableIf {}; template struct EnableIf { typedef T type; }; +// A helper function to suppress bogus "conditional expression is constant" +// warnings. +inline bool check(bool value) { return value; } + // Makes an Arg object from any type. template class MakeValue : public Arg { @@ -859,7 +863,7 @@ class MakeValue : public Arg { MakeValue(long value) { // To minimize the number of types we need to deal with, long is // translated either to int or to long long depending on its size. - if (sizeof(long) == sizeof(int)) + if (check(sizeof(long) == sizeof(int))) int_value = static_cast(value); else long_long_value = value; @@ -869,7 +873,7 @@ class MakeValue : public Arg { } MakeValue(unsigned long value) { - if (sizeof(unsigned long) == sizeof(unsigned)) + if (check(sizeof(unsigned long) == sizeof(unsigned))) uint_value = static_cast(value); else ulong_long_value = value; @@ -2634,7 +2638,7 @@ struct ArgArraySize { Arg array[fmt::internal::ArgArraySize::VALUE] = { \ fmt::internal::MakeValue(args)... \ }; \ - if (sizeof...(Args) > fmt::ArgList::MAX_PACKED_ARGS) \ + if (fmt::internal::check((sizeof...(Args) > fmt::ArgList::MAX_PACKED_ARGS))) \ set_types(array, args...); \ call(FMT_FOR_EACH(FMT_GET_ARG_NAME, __VA_ARGS__), \ fmt::ArgList(fmt::internal::make_type(args...), array)); \ From 1184e98da1690f1a12e5939d29fec2f03bef4710 Mon Sep 17 00:00:00 2001 From: Kittnz Date: Sun, 5 Apr 2015 21:38:07 +0200 Subject: [PATCH 73/86] DB/Waypoint: Add several waypoints to Shadowmoon Village --- sql/updates/world/2015_04_05_07_world.sql | 118 ++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sql/updates/world/2015_04_05_07_world.sql diff --git a/sql/updates/world/2015_04_05_07_world.sql b/sql/updates/world/2015_04_05_07_world.sql new file mode 100644 index 00000000000..af5fb8a8390 --- /dev/null +++ b/sql/updates/world/2015_04_05_07_world.sql @@ -0,0 +1,118 @@ +-- Pathing for Kor'kron Defender Entry: 19362 'TDB FORMAT' +SET @NPC := 69082; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-2973.116,`position_y`=2556.282,`position_z`=105.8032 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,-2973.116,2556.282,105.8032,0,0,0,0,100,0), -- 13:50:20 +(@PATH,2,-2962.696,2547.778,105.8032,0,0,0,0,100,0), -- 13:50:24 +(@PATH,3,-2953.723,2551.618,105.8032,0,0,0,0,100,0), -- 13:50:29 +(@PATH,4,-2954.077,2563.904,105.8032,0,0,0,0,100,0), -- 13:50:33 +(@PATH,5,-2967.127,2567.316,105.8032,0,0,0,0,100,0), -- 13:50:38 +(@PATH,6,-2968.788,2567.15,105.8032,0,0,0,0,100,0); -- 13:50:43 +-- 0x1C09FC424012E88000001A00019B696A .go -2973.116 2556.282 105.8032 + +-- Pathing for Kor'kron Defender Entry: 19362 'TDB FORMAT' +SET @NPC := 69087; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-3089.103,`position_y`=2508.026,`position_z`=83.78547 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,-3089.103,2508.026,83.78547,0,0,0,0,100,0), -- 13:47:23 +(@PATH,2,-3087.197,2507.859,83.85033,0,0,0,0,100,0), -- 13:47:23 +(@PATH,3,-3081.65,2516.463,84.05411,0,0,0,0,100,0), -- 13:47:26 +(@PATH,4,-3090.028,2524.237,84.04036,0,0,0,0,100,0), -- 13:47:30 +(@PATH,5,-3094.658,2522.566,84.06168,0,0,0,0,100,0), -- 13:47:33 +(@PATH,6,-3096.908,2520.316,83.81168,0,0,0,0,100,0), -- 13:47:33 +(@PATH,7,-3098.908,2518.066,84.06168,0,0,0,0,100,0), -- 13:47:33 +(@PATH,8,-3099.196,2517.561,84.04745,0,0,0,0,100,0), -- 13:47:37 +(@PATH,9,-3097.946,2514.811,84.04745,0,0,0,0,100,0), -- 13:47:37 +(@PATH,10,-3096.946,2512.061,84.04745,0,0,0,0,100,0); -- 13:47:37 +-- 0x1C09FC424012E88000001A00009B6969 .go -3089.103 2508.026 83.78547 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=69091; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(69091, 69091, 0, 0, 2), +(69091, 69092, 3, 270, 2); + +-- Pathing for Kor'kron Defender Entry: 19362 'TDB FORMAT' +SET @NPC := 69091; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-3146.969,`position_y`=2563.808,`position_z`=61.37704 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,-3146.969,2563.808,61.37704,0,0,0,0,100,0), -- 13:54:58 +(@PATH,2,-3120.494,2564.844,61.75181,0,0,0,0,100,0), -- 13:54:58 +(@PATH,3,-3120.494,2564.844,61.75181,0,0,0,0,100,0), -- 13:54:58 +(@PATH,4,-3120.175,2565.024,61.98759,0,0,0,0,100,0), -- 13:55:06 +(@PATH,5,-3105.344,2573.74,61.804,0,0,0,0,100,0), -- 13:55:12 +(@PATH,6,-3091.726,2572.44,62.09174,0,0,0,0,100,0), -- 13:55:18 +(@PATH,7,-3088.27,2558.042,62.11543,0,0,0,0,100,0), -- 13:55:24 +(@PATH,8,-3100.597,2545.807,62.11351,0,0,0,0,100,0), -- 13:55:32 +(@PATH,9,-3094.525,2537.95,61.9211,0,0,0,0,100,0), -- 13:55:35 +(@PATH,10,-3079.098,2537.322,62.08109,0,0,0,0,100,0), -- 13:55:43 +(@PATH,11,-3062.423,2502.734,63.59535,0,0,0,0,100,0), -- 13:55:52 +(@PATH,12,-3063.66,2507.985,63.10339,0,0,0,0,100,0), -- 13:56:00 +(@PATH,13,-3065.486,2517.504,62.46205,0,0,0,0,100,0), -- 13:56:04 +(@PATH,14,-3079.187,2537.478,62.18378,0,0,0,0,100,0), -- 13:56:14 +(@PATH,15,-3094.9,2537.977,62.13345,0,0,0,0,100,0), -- 13:56:20 +(@PATH,16,-3100.354,2544.985,61.87681,0,0,0,0,100,0), -- 13:56:30 +(@PATH,17,-3100.963,2545.778,61.87681,0,0,0,0,100,0), -- 13:56:30 +(@PATH,18,-3088.325,2558.04,61.854,0,0,0,0,100,0), -- 13:56:30 +(@PATH,19,-3088.325,2558.04,61.854,0,0,0,0,100,0), -- 13:56:30 +(@PATH,20,-3088.377,2558.176,62.10567,0,0,0,0,100,0), -- 13:56:32 +(@PATH,21,-3091.65,2572.547,62.05435,0,0,0,0,100,0), -- 13:56:38 +(@PATH,22,-3105.591,2573.866,62.01907,0,0,0,0,100,0), -- 13:56:43 +(@PATH,23,-3120.379,2565.042,61.81473,0,0,0,0,100,0), -- 13:56:50 +(@PATH,24,-3120.494,2564.844,61.75181,0,0,0,0,100,0); -- 13:57:02 +-- 0x1C09FC424012E88000001A00039B696A .go -3146.969 2563.808 61.37704 + +-- Remove too many spawns +DELETE FROM `creature` WHERE `guid` IN (74221,74220); + +-- Pathing for Kor'kron Wyvern Rider Entry: 21153 'TDB FORMAT' +SET @NPC := 74219; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-3014.283,`position_y`=2567.434,`position_z`=141.6225 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,17722,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,-3014.283,2567.434,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,2,-2997.179,2547.184,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,3,-2975.056,2527.355,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,4,-2944.816,2526.003,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,5,-2925.329,2546.514,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,6,-2919.246,2565.872,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,7,-2920.081,2589.365,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,8,-2931.993,2608.762,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,9,-2955.626,2618.87,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,10,-2977.497,2619.666,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,11,-3014.667,2609.543,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,12,-3055.036,2590.46,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,13,-3085.538,2571.631,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,14,-3114.716,2555.922,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,15,-3143.012,2552.032,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,16,-3176.688,2560.458,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,17,-3190.569,2587.816,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,18,-3187.101,2615.266,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,19,-3164.5,2634.338,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,20,-3137.512,2639.929,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,21,-3099.443,2633.703,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,22,-3074.344,2622.916,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,23,-3057.397,2608.769,141.6225,0,0,1,0,100,0), -- 13:51:11 +(@PATH,24,-3045.574,2592.941,140.8448,0,0,1,0,100,0), -- 13:51:11 +(@PATH,25,-3046.095,2591.678,139.9281,0,0,1,0,100,0), -- 13:51:11 +(@PATH,26,-3028.975,2582.002,141.6225,0,0,1,0,100,0); -- 13:51:11 +-- 0x1C09FC424014A84000001A00001B6969 .go -3014.283 2567.434 141.6225 + +DELETE FROM `creature_formations` WHERE `leaderGUID`=69079; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(69079, 69079, 0, 0, 2), +(69079, 69081, 3, 270, 2); From 2e461a511bd4f3f8cf523017aa43ad47ea447ff7 Mon Sep 17 00:00:00 2001 From: Kittnz Date: Mon, 6 Apr 2015 10:46:36 +0200 Subject: [PATCH 74/86] DB/Zone: Shadowmoon Valley/ Netherwing Ledge - Add waypoints for Barash the Den Mother, Arvoar the Rapacious, 2x Dragonmaw Transporter. - Reposition Ja'y Nosliw and Taskmaster Varkule Dragonbreath - Changed the movement speed for flying Dragonmaw Skybreakers --- sql/updates/world/2015_04_06_00_world.sql | 94 +++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 sql/updates/world/2015_04_06_00_world.sql diff --git a/sql/updates/world/2015_04_06_00_world.sql b/sql/updates/world/2015_04_06_00_world.sql new file mode 100644 index 00000000000..7ba78d72963 --- /dev/null +++ b/sql/updates/world/2015_04_06_00_world.sql @@ -0,0 +1,94 @@ +-- Pathing for Barash the Den Mother Entry: 23269 'TDB FORMAT' +SET @NPC := 40645; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-5028.414,`position_y`=385.6584,`position_z`=171.0149 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,-5028.414,385.6584,171.0149,0,0,1,0,100,0), -- 20:05:15 +(@PATH,2,-5037.621,373.1704,171.0173,0,0,1,0,100,0), -- 20:05:18 +(@PATH,3,-5051.44,373.3133,171.0181,0,0,1,0,100,0), -- 20:05:20 +(@PATH,4,-5055.748,366.6401,171.0181,0,0,1,0,100,0), -- 20:05:21 +(@PATH,5,-5058.255,357.087,171.0151,0,0,1,0,100,0), -- 20:05:23 +(@PATH,6,-5055.19,345.9996,170.9724,0,0,1,0,100,0), -- 20:05:25 +(@PATH,7,-5034.827,346.2221,171.0174,0,0,1,0,100,0), -- 20:05:27 +(@PATH,8,-5025.357,353.0934,170.6913,0,0,1,0,100,0), -- 20:05:31 +(@PATH,9,-5019.042,361.9999,170.704,0,0,1,0,100,0), -- 20:05:33 +(@PATH,10,-5018.177,373.4781,170.964,0,0,1,0,100,0); -- 20:05:34 + +-- Update position Ja'y Nosliw 22433 +UPDATE `creature` SET `position_x`=-5144.404, `position_y`=600.9089, `position_z`=82.75489, `orientation`=6.021386 WHERE `guid`=78787; + +-- Update position Taskmaster Varkule Dragonbreath 23140 +UPDATE `creature` SET `position_x`=-5114.439, `position_y`=588.4843, `position_z`=85.87241, `orientation`=3.036873 WHERE `guid`=51876; + +-- Pathing for Arvoar the Rapacious Entry: 23267 'TDB FORMAT' +SET @NPC := 40619; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-5115.436,`position_y`=144.5614,`position_z`=130.1606 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,-5115.436,144.5614,130.1606,0,0,0,0,100,0), -- 07:19:51 +(@PATH,2,-5127.696,139.5475,130.1854,0,0,0,0,100,0), -- 07:19:53 +(@PATH,3,-5122.23,120.3736,129.9845,0,0,0,0,100,0), -- 07:19:56 +(@PATH,4,-5117.039,117.6734,129.9086,0,0,0,0,100,0), -- 07:19:58 +(@PATH,5,-5107.681,117.8557,129.8407,0,0,0,0,100,0), -- 07:19:59 +(@PATH,6,-5100.675,122.349,130.0891,0,0,0,0,100,0), -- 07:20:01 +(@PATH,7,-5105.304,139.7458,130.1348,0,0,0,0,100,0); -- 07:20:04 + +-- Update fly speed of Dragonmaw Skybreakers +UPDATE `waypoint_data` SET `move_type`=1 WHERE `id` IN (782940, 782970, 782910, 782920, 782930, 782940, 782950, 782960, 782970, 782980, 782990, 783000); + +-- Pathing for Dragonmaw Transporter Entry: 23188 'TDB FORMAT' +SET @NPC := 132814; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4584.821,`position_y`=56.05914,`position_z`=260.3116 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,16314,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,-4584.821,56.05914,260.3116,0,0,1,0,100,0), -- 07:28:22 +(@PATH,2,-4554.921,74.39236,250.4782,0,0,1,0,100,0), -- 07:28:22 +(@PATH,3,-4532.374,72.2015,243.3948,0,0,1,0,100,0), -- 07:28:22 +(@PATH,4,-4508.559,67.28505,241.6727,0,0,1,0,100,0), -- 07:28:22 +(@PATH,5,-4487.302,56.6492,242.2004,0,0,1,0,100,0), -- 07:28:22 +(@PATH,6,-4470.297,28.84614,244.756,0,0,1,0,100,0), -- 07:28:22 +(@PATH,7,-4461.818,-8.348633,247.9227,0,0,1,0,100,0), -- 07:28:22 +(@PATH,8,-4477.97,-44.38118,242.3393,0,0,1,0,100,0), -- 07:28:22 +(@PATH,9,-4516.678,-59.03483,240.2283,0,0,1,0,100,0), -- 07:28:22 +(@PATH,10,-4543.176,-60.92849,240.2838,0,0,1,0,100,0), -- 07:28:22 +(@PATH,11,-4566.225,-51.06413,247.3116,0,0,1,0,100,0), -- 07:28:22 +(@PATH,12,-4581.653,-29.58301,254.2004,0,0,1,0,100,0), -- 07:28:22 +(@PATH,13,-4591.782,0.532661,260.3116,0,0,1,0,100,0), -- 07:28:22 +(@PATH,14,-4594.208,28.59668,260.3116,0,0,1,0,100,0); -- 07:28:22 + +-- Pathing for Dragonmaw Transporter Entry: 23188 'TDB FORMAT' +SET @NPC := 132818; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4735.987,`position_y`=122.2487,`position_z`=106.433 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,16314,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,-4735.987,122.2487,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,2,-4744.92,149.3799,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,3,-4751.057,182.3161,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,4,-4767.275,216.0688,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,5,-4776.866,248.6194,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,6,-4781.172,280.7835,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,7,-4783.174,319.2545,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,8,-4752.483,324.3357,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,9,-4729.643,316.453,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,10,-4715.97,309.7697,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,11,-4709.104,290.6015,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,12,-4710.651,264.7013,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,13,-4709.572,256.6543,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,14,-4706.147,218.4914,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,15,-4709.459,193.1469,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,16,-4704.721,157.6649,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,17,-4695.498,116.758,106.433,0,0,1,0,100,0), -- 07:15:27 +(@PATH,18,-4713.938,87.04405,101.2085,0,0,1,0,100,0), -- 07:15:27 +(@PATH,19,-4726.667,100.212,106.433,0,0,1,0,100,0); -- 07:15:27 From 866bda4c38f278437bcfc5b460245bd2d69e9bed Mon Sep 17 00:00:00 2001 From: Dr-J Date: Mon, 6 Apr 2015 14:17:33 +0100 Subject: [PATCH 75/86] DB/Item: Brazie's Black Book of Secrets By @Foldor Closes #14502 --- sql/updates/world/2015_04_06_01_world.sql | 114 ++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 sql/updates/world/2015_04_06_01_world.sql diff --git a/sql/updates/world/2015_04_06_01_world.sql b/sql/updates/world/2015_04_06_01_world.sql new file mode 100644 index 00000000000..2b82c2e3210 --- /dev/null +++ b/sql/updates/world/2015_04_06_01_world.sql @@ -0,0 +1,114 @@ +DELETE FROM `page_text` WHERE `entry` IN (3587, 3588, 3589, 3590, 3591, 3592, 3593, 3581, 3582, 3584, 3585, 3586, 3583); +INSERT INTO `page_text` (`entry`, `Text`, `next_page`, `VerifiedBuild`) VALUES +(3587, 'How to date a Dwarven woman: + +1. Ask her to buy you a drink.', 0, 19831), -- 3587 +(3588, 'Let''s be honest. Since the end of the Third War, Night Elf girls have heard it all. In fact, they''d already heard it all long before you or I was born. + +If you want to engage the mind of a Night Elf girl, you''re going to have to stand out. Sure, we''ve all heard the tales of Night Elf lasses dancing on mailboxes and stripping to pay for Nightsaber training. True or not, if you want to light that lovely lady''s lips up with a smile, you gotta be unique, memorable and confident. + +Start off by showing that you''re looking for more than a gal with looks. Sure, she can bounce, she can dance, but can she hold a decent conversation? Does she even understand the proper use of a samophlange? Does she know how to have a fun time? + +There''s nothing worse than bringing a Night Elf to a party, only to watch her stand awkwardly by herself, breaking conversation only to lament the loss of her Highborne sister during the War of the Ancients.', 0, 19831), -- 3588 +(3589, 'There''s nothing like wooing the heart of a human girl. Infinitely forgiving, endlessly caring and fantastically fun, human girls have been the downfall of countless heroes throughout the ages. (See Chapter 3: "Jaina Proudmoore and the men who loved her") + +However, generation after generation has proven it takes something more than just money, looks or an epic suit of armor to attract the woman of your dreams. Not even the power of Gnomish invention can help you here. + +To truly charm the heart of another, you should possess these qualities. + +* Be Fun & Friendly +* Be a Challenge +* Be a Man + +', 3590, 19831), -- 3589 +(3590, 'Be Fun & Friendly + +Ever have at friend who shows up at your house and brings everybody down? Yep. Everyone does. Does he get invited back to the parties? Not unless he''s bringing the ale. If you want to be an attractive person, live an attractive lifestyle. + +You''ll find that the more you enjoy socializing with others, the more they will enjoy socializing with you! + +There''s no faster way to ruin a girl''s night than bringing in that needy, apologetic vibe. Let it go, embrace the fun and your confidence will soar.', 3591, 19831), -- 3590 +(3591, 'Be a Challenge + +Too many Gnomes these days walk with their head slung low, shuffling along sadly from tavern to tavern, hopelessly holding on these limiting beliefs that no human girl would ever want them. They rush into the tavern, shower her with compliments and free drinks, then go home dejected. + +Well, let me be the first to tell you, friend, when you give your self away so cheaply, you diminsh the value of your unique, exquisite personality. You''ve been told by society that you are not the prize, that women will never acknowledge you, that you must beg for love and attention. + +They are wrong. Don''t give your affection away so freely. Instead of asking yourself, "Does she like me?" ask yourself instead, "Do I like her?" + +Challenge her - show her you''re looking for a girl who offers more than a pretty face. If she can''t keep up with your life, move on. If she shows she''s got something to offer, you''re at the beginning of a beautiful thing. ', 3592, 19831), -- 3591 +(3592, 'Be a Man + +In an age where we''ve been banished from our homes, forced to fight for our very survival and faced down horrors never before known to Azeroth, you would think that the nature of manhood would be better understood. + +Sadly, the art of masculinity has been lost, washed away in the glitz and glamor of battle. However, all is not lost! With practice and confidence, you can come back in touch with yourself. + +Once you''ve met the human girl of your dreams and she''s shown herself to be worthy of your affections: + +* Take the lead - show her everything that is beautiful about your world +* Hold her hand - develop a close, affectionate relationship +* Show respect - for yourself, for her and for the world around you + +Above all: + +* Be responsible +', 3593, 19831), -- 3592 +(3593, 'Troubleshooting + +While everything doesn''t always go the way you expect, that''s what make life unpredictable and exciting. However, there''s a few tips to help you a long way in improving your life. Here''s some common blunders: + +* Don''t chase +* Don''t be needy +* Don''t get stuck on someone who dislikes you + +These all stem from a core belief that women you must have the woman you''re talking to right now. Break free - there''s many women out there in this beautiful world and if one doesn''t work out, let go. You''ll find you become more attractive the less clingy you are. +', 0, 19831), -- 3593 +(3581, '"Roleplaying" + +Good roleplaying skills are essential. No Genius Gnomish gal wants a giant bore. Regale her with tales of your future cross-continental adventures: + + "You and me, babe, we''re gonna fly to Kalimdor, etch our names into the side of Teldrassil and spend the rest of our lives swinging from the trees in Un''goro Crater." + +"Storytelling" + +Share stores of your exciting future together! The more implausible, the better. Nothing gets a Gnomish girl excited like an ambitious plan. It also makes for great conversation starters! + + "With our brilliant minds combined, we could retake Gnomeregan. ... why haven''t we retaken Gnomeregan anyways?"', 3582, 19831), -- 3581 +(3582, '"Teasing" + +Teasing is the art of making fun of a woman in a humorous way. Be careful, you can easily go too far. Calling her a "Goblin Ganking Gnat" will leave you walking home wearing that Green Gordok Grog you just bought. Try something a bit more subtle. + +If she acts childish and refuses to stop jumping onto tables in the middle of the bar try: + +"I hear there''s an opening for star entertainer at the Stormwind orphanage." + +If she won''t stop talking about herself playfully try: + +"Where''s your off switch?" + +IMPORTANT NOTE: Gnomish girls do NOT have an off switch. Attempting to find it may result in the loss of life, limbs or wallet.', 0, 19831), -- 3582 +(3584, 'I''d just arrived off the boat to Azuremyst when I stopped a group of Draenei dames around the ripe young age of 230. They were laughing and having a great time. What luck, still on the docks and I''d found exactly the type of fun, energetic Draenei women I wanted to meet on this trip. + +At first a bit anxious, I breathed deeply and reminded myself, "they too are here in Azeroth on vacation, looking to meet new people and have a great time." + +Sure enough, they were delighted to see one devilishly charming Gnome like myself in the Exodar. It even turned out we were both staying near the Vault of Lights. We exchanged deep, penetrating glances into each others eyes, promising to meet again near A''dal later that night. ', 3585, 19831), -- 3584 +(3585, 'The next day, I met another beautiful Draenei woman - the gleam of her horns gave only the gentlest of glimpses into her refined tastes. I asked why she was visiting the Exodar, when in shock, she told me she wasn''t visiting - she lived here. + +The words I spoke to myself before returned to my mind: + +"She is on vacation, looking to meet amazing people and have a great time." + +I had it all wrong, she wasn''t on vacation at all! Then suddenly, the grinding gears of my mind clicked: I''d been claiming to myself that they were so receptive because they were on vacation. What a gnollish excuse! + +I''m a fun, interesting guy who any sensible minded girl would love to group with, on vacation or not! Now when I meet Draenei girls, I remind myself of the simple truth: + +"She too is looking to meet people and have a great time."', 3586, 19831), -- 3585 +(3586, 'The following 497 pages of this dictionary consistent entirely of oddly angled pictures taken from a Super Snapper FX 2000. ', 0, 19831), -- 3586 +(3583, 'Are your tastes more exotic? +Do you desire someone a little out of this world? +Are hooves your thing, but succubi a little too much for you? + +Read on, my friend...', 3584, 19831); -- 3583 + +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid` IN(20349,20345,20346,20347,20348) AND `source_type`=0 AND `id`=0 AND `link`=1; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=4498 AND `source_type`=2 AND `id`=4 AND `link`=5; From 61f6328b2bf53862a9ccdde8b89330f0b7b6c932 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Mon, 6 Apr 2015 15:06:19 +0100 Subject: [PATCH 76/86] DB/Misc: Silvermoon Guardians emote responses By @Nyeriah Closes #14471 --- sql/updates/world/2015_04_06_02_world.sql | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sql/updates/world/2015_04_06_02_world.sql diff --git a/sql/updates/world/2015_04_06_02_world.sql b/sql/updates/world/2015_04_06_02_world.sql new file mode 100644 index 00000000000..3e04c2250bf --- /dev/null +++ b/sql/updates/world/2015_04_06_02_world.sql @@ -0,0 +1,31 @@ +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 16222; + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 16222; +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 +-- Eye (Paladin's only) +(16222,0,0,1,22,0,100,0,38,5000,5000,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Receive Emote Eye (Paladin Only) - Set Orientation Invoker'), +(16222,0,1,15,61,0,100,0,0,0,0,0,67,1,1000,1000,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Event Link - Create Timed Event 1'), +(16222,0,2,0,59,0,100,0,1,0,0,0,5,16,0,0,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Timed Event - Play Emote Kneel'), +-- Kiss +(16222,0,3,4,22,0,100,0,58,5000,5000,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Receive Emote Kiss - Set Orientation Invoker'), +(16222,0,4,15,61,0,100,0,0,0,0,0,67,2,1000,1000,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Event Link - Create Timed Event 2'), +(16222,0,5,0,59,0,100,0,2,0,0,0,5,2,0,0,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Timed Event - Play Emote Bow'), +-- Salute +(16222,0,6,7,22,0,100,0,78,5000,5000,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Receive Emote Salute - Set Orientation Invoker'), +(16222,0,7,15,61,0,100,0,0,0,0,0,67,3,1000,1000,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Event Link - Create Timed Event 3'), +(16222,0,8,0,59,0,100,0,3,0,0,0,5,66,0,0,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Timed Event - Play Emote Salute'), +-- Rude +(16222,0,9,10,22,0,100,0,77,5000,5000,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Receive Emote Rude - Set Orientation Invoker'), +(16222,0,10,15,61,0,100,0,0,0,0,0,67,4,1000,1000,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Event Link - Create Timed Event 4'), +(16222,0,11,0,59,0,100,0,4,0,0,0,5,25,0,0,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Timed Event - Play Emote Poinit'), +-- Shy +(16222,0,12,13,22,0,100,0,84,5000,5000,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Receive Emote Shy - Set Orientation Invoker'), +(16222,0,13,15,61,0,100,0,0,0,0,0,67,5,1000,1000,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Event Link - Create Timed Event 5'), +(16222,0,14,0,59,0,100,0,5,0,0,0,5,23,0,0,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Timed Event - Play Emote Flex'), +-- Clean up +(16222,0,15,0,61,0,100,0,0,0,0,0,67,6,5000,5000,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Event Link - Create Timed Event 6'), +(16222,0,16,0,59,0,100,0,6,0,0,0,66,0,0,0,0,0,100,1,0,0,0,0,0,0,0,'Silvermoon City Guardian - On Timed Event - Reset Orientation'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 16222; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, 16222, 0, 0, 15, 0, 2, 0, 0, 0, 0, 0, '', 'Silvermoon Guardian - Only Kneel to Paladins'); From 2b51726fd009d580578c7bd363ce528e5dbf119c Mon Sep 17 00:00:00 2001 From: Dr-J Date: Mon, 6 Apr 2015 19:21:35 +0100 Subject: [PATCH 77/86] DB/Quest: The Thunderspike By @Killyana Closes #4458 --- sql/updates/world/2015_04_06_03_world.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sql/updates/world/2015_04_06_03_world.sql diff --git a/sql/updates/world/2015_04_06_03_world.sql b/sql/updates/world/2015_04_06_03_world.sql new file mode 100644 index 00000000000..1241c231ec2 --- /dev/null +++ b/sql/updates/world/2015_04_06_03_world.sql @@ -0,0 +1,19 @@ +UPDATE `gameobject_template` SET `AIName`='', `ScriptName`='', `data2`=13685, `data3`=3000, `data5`=1 WHERE `entry`=184729; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=21319; + +DELETE FROM `event_scripts` WHERE id IN (13685); +INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES +(13685, 1, 10, 21319, 90000, 0, 1316.469, 6686.669, -18.59028, 1.072638); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=184729 AND `source_type`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid`=21319 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 +(21319, 0, 0, 1, 63, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0,0,'Gor Grimgut- Just Summoned - Talk'), +(21319, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0,0,'Gor Grimgut- Just Summoned - Attack'), +(21319, 0, 2, 0, 0, 0, 100, 0, 3000, 5000, 7000, 10000, 75, 35492, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Gor Grimgut - In Combat - Cast Exhaustion'), +(21319, 0, 3, 0, 0, 0, 100, 0, 10000, 12000, 12000, 15000, 11, 35491, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Gor Grimgut - In Combat - Cast Furious Rage'); + +DELETE FROM `creature_text` WHERE `entry` IN (21319); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(21319, 0, 0, 'Puny $r cannot lift spear. Gor lift spear!', 12, 0, 100, 0, 0, 0, 18980, 0, 'Gor Grimgut'), +(21319, 0, 1, 'Hah! The Thunderspike is mine. Die!', 12, 0, 100, 0, 0, 0, 18979, 0, 'Gor Grimgut'); From ee0237725298e0a46a5e4bd9d39cb8e76f6ffa9e Mon Sep 17 00:00:00 2001 From: Dr-J Date: Mon, 6 Apr 2015 19:25:50 +0100 Subject: [PATCH 78/86] DB/Object: Nether Drake Egg By @Killyana Closes #6284 --- sql/updates/world/2015_04_06_04_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2015_04_06_04_world.sql diff --git a/sql/updates/world/2015_04_06_04_world.sql b/sql/updates/world/2015_04_06_04_world.sql new file mode 100644 index 00000000000..0b6adc4f550 --- /dev/null +++ b/sql/updates/world/2015_04_06_04_world.sql @@ -0,0 +1,4 @@ +UPDATE `gameobject_template` SET `data5`=1 WHERE `entry`=184867; +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 37639 AND `spell_effect` = 36326; +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +( 37639, 36326, 0, 'Nether Whelp'); From 77eb89157b85ff79d049b77f5c8bc35119c6ee41 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 6 Apr 2015 21:08:15 +0200 Subject: [PATCH 79/86] Core/Scripts: Remove The Thunderspike script As explained by @Killyana in https://github.com/TrinityCore/TrinityCore/issues/4458#issuecomment-90061073 --- .../Outland/zone_blades_edge_mountains.cpp | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp index 72355b05ec1..bacc6533d4f 100644 --- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp +++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp @@ -29,7 +29,6 @@ npc_bloodmaul_brute npc_nether_drake npc_daranelle go_legion_obelisk -go_thunderspike EndContentData */ #include "ScriptMgr.h" @@ -507,31 +506,6 @@ public: } }; -/*###### -## go_thunderspike -######*/ - -enum TheThunderspike -{ - NPC_GOR_GRIMGUT = 21319, - QUEST_THUNDERSPIKE = 10526, -}; - -class go_thunderspike : public GameObjectScript -{ - public: - go_thunderspike() : GameObjectScript("go_thunderspike") { } - - bool OnGossipHello(Player* player, GameObject* go) override - { - if (player->GetQuestStatus(QUEST_THUNDERSPIKE) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(NPC_GOR_GRIMGUT, 25.0f, true)) - if (Creature* gorGrimgut = go->SummonCreature(NPC_GOR_GRIMGUT, -2413.4f, 6914.48f, 25.01f, 3.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000)) - gorGrimgut->AI()->AttackStart(player); - - return true; - } -}; - enum SimonGame { NPC_SIMON_BUNNY = 22923, @@ -1224,7 +1198,6 @@ void AddSC_blades_edge_mountains() new npc_nether_drake(); new npc_daranelle(); new go_legion_obelisk(); - new go_thunderspike(); new npc_simon_bunny(); new go_simon_cluster(); new go_apexis_relic(); From 210e45e303b1ae33ff4bb2c21727b27ae58f0a6c Mon Sep 17 00:00:00 2001 From: Dr-J Date: Mon, 6 Apr 2015 22:06:57 +0100 Subject: [PATCH 80/86] DB/Quest: Steamtank Surprise By @Killyana, Initial work by @Kirkhammett Closes #1866 --- sql/updates/world/2015_04_06_05_world.sql | 117 ++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sql/updates/world/2015_04_06_05_world.sql diff --git a/sql/updates/world/2015_04_06_05_world.sql b/sql/updates/world/2015_04_06_05_world.sql new file mode 100644 index 00000000000..d6e63790a36 --- /dev/null +++ b/sql/updates/world/2015_04_06_05_world.sql @@ -0,0 +1,117 @@ +SET @OGUID := 5596; -- 1 free guid set by TC +SET @QUEST := 12326; +SET @TANK := 27587; -- Alliance Steam Tank +SET @ELITE := 27588; -- 7th Legion Elite +SET @ENGI := 27163; -- 7th Legion Siege Engineer +SET @SPELL_1 := 49315; -- Ice Cannon +SET @SPELL_2 := 49333; -- Ice Prison +SET @SPELL_3 := 49109; -- Drop Off Gnome +SET @SPELL_4 := 49081; -- Drop Off Soldier + +DELETE FROM `gameobject` WHERE `guid` = @OGUID; +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, 189331, 571, 1, 1, 3707.753418, -1182.235840, 120.745689, 1.24532, 0, 0, 0, 1, 120, 0, 1); + +UPDATE `creature_template` SET `npcflag`=16777216, `unit_flags`=32768, `spell1`=49315, `spell2`=49333, `spell3`=49109, `spell4`=49081 WHERE `entry`=@TANK; +UPDATE `creature_template` SET `faction` = 1975 WHERE `entry`=27335; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENGI, 27607, @TANK); + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@TANK; +INSERT INTO `npc_spellclick_spells`(`npc_entry`,`spell_id`,`cast_flags`,`user_type`) VALUES +(@TANK,49078,1,0), -- player +(@TANK,46598,1,1); -- npc + +DELETE FROM `vehicle_template_accessory` WHERE `entry`=@TANK; +INSERT INTO `vehicle_template_accessory`(`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`) VALUES +(@TANK,@ENGI,1,1,"7th Legion Siege Engineer Rides Alliance Steam Tank",5,0), +(@TANK,@ELITE,2,1,"7th Legion Elite Rides Alliance Steam Tank",5,0), +(@TANK,@ELITE,3,1,"7th Legion Elite Rides Alliance Steam Tank",5,0); +DELETE FROM `creature` WHERE `id` IN (27163,27588); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId`=16 AND `SourceEntry`=@TANK) OR (`SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (@SPELL_2,@SPELL_3)) OR (`SourceTypeOrReferenceId`=18 AND `SourceEntry` IN (46598,49078)); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(16,0,@TANK,0,0,23,0,4246,0,0,0,0,'','Dismount player when not in intended zone'), +(16,0,@TANK,0,1,23,0,4190,0,0,0,0,'','Dismount player when not in intended zone'), +(16,0,@TANK,0,2,23,0,4188,0,0,0,0,'','Dismount player when not in intended zone'), +(13,1,@SPELL_2,0,0,31,0,3,27288,0,0,0,'','Ice Prison can target Death Knight Champion'), +(13,1,@SPELL_2,0,1,31,0,3,27410,0,0,0,'','Ice Prison can target Scourge SeigeSmith'), +(13,1,@SPELL_2,0,2,31,0,3,27286,0,0,0,'','Ice Prison can target Dreadbone Invader'), +(13,1,@SPELL_2,0,3,31,0,3,27283,0,0,0,'','Ice Prison can target Risen Winterguarde Mage'), +(13,2,@SPELL_3,0,0,31,0,3,@ENGI,0,0,0,'','Drop Off Gnome target 7th Legion Siege Engineer'), +(18,@TANK,46598,0,0,31,0,3,0,0,0,0,'','Only npc for spellclick'), +(18,@TANK,49078,0,0,9,0,@QUEST,0,0,0,0,'','Required quest active for spellclick'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=3 AND `SourceEntry`=@TANK; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`, `ConditionTarget`, `ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,3,@TANK,0,1,1,49078,0,0,0,'','event require aura 49078'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=1 AND `SourceEntry`=@ENGI; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`, `ConditionTarget`, `ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES +(22,1,@ENGI,0,1,29,27607,14,0,0,'','event require creature distance'); + +DELETE FROM `creature_template_addon` WHERE `entry` IN (@ENGI,@ELITE); +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@ENGI,0,0,0,257,133,NULL), +(@ELITE,0,0,0,257,333,NULL); + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 27607 AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 27607*100 AND `source_type` = 9; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @TANK AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @TANK*100 AND `source_type` = 9; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @ENGI AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @ENGI*100 AND `source_type` = 9; +DELETE FROM `smart_scripts` WHERE `entryorguid` = @ENGI*100+1 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 +(@ENGI, 0, 0, 0, 8, 0, 100, 0, @SPELL_3, 0, 0, 0, 80, @ENGI*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - On spell hit - action list'), +(@ENGI*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - Set visible off'), +(@ENGI*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, @ENGI, 3, 18000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - Summon'), +(@ENGI*100, 9, 2, 0, 0, 0, 100, 0, 15000, 15000, 0, 0, 47, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - Set visible on'), +(@ENGI, 0, 1, 0, 23, 0, 100, 1, 46598, 0, 0, 0, 80, @ENGI*100+1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - Has aura - action list'), +(@ENGI*100+1, 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, '7th Legion Siege Engineer - action list - Talk'), +(@ENGI*100+1, 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, '7th Legion Siege Engineer - action list - React passif'), +(@ENGI*100+1, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 29, 3, 0, 0, 0, 0, 0, 19, 27607, 15, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - follow'), +(@ENGI*100+1, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 11, 49114, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - Cast to summon a GO'), +(@ENGI*100+1, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - Talk'), +(@ENGI*100+1, 9, 5, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 75, 49215, 0, 0, 0, 0, 0, 19, 27607, 15, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - Add aura'), +(@ENGI*100+1, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - Talk'), +(@ENGI*100+1, 9, 7, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 29, 1, 0, 0, 0, 0, 0, 19, @TANK, 15, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - follow'), +(@TANK,0,0,0,38,0,100,0,0,1,0,0,11,49122,0,0,0,0,0,23,0,0,0,0,0,0,0,"Tank - On data set- cast spell credit"), +(@TANK,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,"Tank - On reset- react passif"), +(@TANK,0,2,0,1,0,100,0,30000,30000,50000,50000,1,1,0,0,0,0,0,19,@ELITE,10,0,0,0,0,0,'Tank - OOC - Talk'), +(@TANK,0,4,0,25,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tank - On reset- Set Run on"), +(@TANK, 0, 3, 0, 8, 0, 100, 0, @SPELL_4, 0, 0, 0, 80, @TANK*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - On spell hit - action list'), +(@TANK*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 11, @ELITE, 10, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - Set visible off'), +(@TANK*100, 9, 1, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 11, @ELITE, 10, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - Summon'), +(@TANK*100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '7th Legion Siege Engineer - action list - Set visible on'), +(27607, 0, 1, 0, 23, 0, 100, 1, 49215, 1, 0, 0, 80, 27607*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Plague Wagon - Has aura - action list'), +(27607*100, 9, 0, 0, 0, 0, 100, 0, 11000, 11000, 0, 0, 45, 0, 1, 0, 0, 0, 0, 19, @TANK, 30, 0, 0, 0, 0, 0, 'Plague Wagon - action list - Set data'), +(27607*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Plague Wagon - action list - despawn'); + +DELETE FROM `creature_text` WHERE `entry` IN (@ELITE, @ENGI); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(@ELITE, 0, 0, 'Without you we''d be lost. Thanks for the ride!', 12, 7, 100, 0, 0, 0, 26844, 0, '7th Legion Elite'), +(@ELITE, 0, 1, 'For the Alliance and Lord Fordragon!', 12, 7, 100, 0, 0, 0, 26841, 0, '7th Legion Elite'), +(@ELITE, 0, 2, 'HOO-WAH! The cavalry has arrived!', 12, 7, 100, 0, 0, 0, 26842, 0, '7th Legion Elite'), +(@ELITE, 0, 3, 'Great driving, soldier! Not a scratch on us!', 12, 7, 100, 0, 0, 0, 26843, 0, '7th Legion Elite'), +(@ELITE, 1, 0, 'I think I see one of their plague wagons!', 12, 0, 100, 0, 0, 0, 26971, 0, '7th Legion Elite'), +(@ELITE, 1, 1, 'Did I ever tell you soldiers about the time I destroyed the Thandol Span? Yep, weren''t no dark irons destroyed that bridge! Was me!', 12, 7, 100, 0, 0, 0, 26972, 0, '7th Legion Elite'), +(@ELITE, 1, 2, 'It doesn''t make any sense. Why don''t they just fly Naxxramas over Wintergarde Keep and blow it up? I mean, that''s what I would do if I were Kel''Thuzad.', 12, 7, 100, 0, 0, 0, 26973, 0, '7th Legion Elite'), +(@ELITE, 1, 3, 'I wonder if we''ll ever solve the mystery of the strange ore. There''s gotta be some use for it!', 12, 0, 100, 0, 0, 0, 26974, 0, '7th Legion Elite'), +(@ELITE, 1, 4, 'Hey, do any of you know McGoyver over at Valgarde? He''s my uncle. You know what his title is? Pro. Yea, just "Pro." I want to be a pro too.', 12, 0, 100, 0, 0, 0, 26975, 0, '7th Legion Elite'), +(@ELITE, 1, 5, 'Something straight up stinks in here! It''s definitely not me. Gnomes smell like butter and sunshine. Not like those dwarves that smell like they were born from a trogg''s armpit! None of you are dwarves, are you?', 12, 0, 100, 0, 0, 0, 26976, 0, '7th Legion Elite'), +(@ELITE, 1, 6, 'I used to know a dwarf that claimed gnomes evolved from beneath the earth. That we all started out as sand gnomes. What a load of nonsense! Sand gnomes? PUH-LEASE!', 12, 0, 100, 0, 0, 0, 26977, 0, '7th Legion Elite'), +(@ELITE, 1, 7, 'I''ve never seen destruction like this...', 12, 0, 100, 0, 0, 0, 26978, 0, '7th Legion Elite'), +(@ELITE, 1, 8, 'Keep the chatter down, people. We need to stay alert!', 12, 0, 100, 0, 0, 0, 26979, 0, '7th Legion Elite'), +(@ELITE, 1, 9, 'The smell of death covers every inch of this place.', 12, 0, 100, 0, 0, 0, 26980, 0, '7th Legion Elite'), +(@ELITE, 1, 10, 'Driver, I hear you single handedly airlifted our villagers out of this hell-hole. Is that true?', 12, 0, 100, 0, 0, 0, 26981, 0, '7th Legion Elite'), +(@ELITE, 1, 11, 'So does anyone know anything about Thel''zan? Who is he? How did he come to leading the Scourge armies on the ground?', 12, 0, 100, 0, 0, 0, 26982, 0, '7th Legion Elite'), +(@ELITE, 1, 12, 'Look at this mess... The Scourge will pay for this!', 12, 0, 100, 0, 0, 0, 26983, 0, '7th Legion Elite'), +(@ELITE, 1, 13, 'Where are all the corpses? What have they done to our people?', 12, 0, 100, 0, 0, 0, 26984, 0, '7th Legion Elite'), +(@ELITE, 1, 14, 'I hope I''m alive to see Arthas get what''s coming to him.', 12, 0, 100, 0, 0, 0, 26985, 0, '7th Legion Elite'), +(@ELITE, 2, 0, 'Reporting for duty, sir!', 12, 7, 100, 0, 0, 0, 26954, 0, '7th Legion Elite'), +(@ENGI, 0, 1, 'Keep ''em off me for about 15 seconds and this thing is as good as dead.', 12, 7, 100, 0, 0, 0, 26854, 0, '7th Legion Siege Engineer'), +(@ENGI, 0, 2, 'Cover me!', 12, 7, 100, 0, 0, 0, 26852, 0, '7th Legion Siege Engineer'), +(@ENGI, 0, 3, 'When I''m done with this plague wagon it''ll look like a goblin built it! Keep me safe!', 12, 7, 100, 0, 0, 0, 26855, 0, '7th Legion Siege Engineer'), +(@ENGI, 0, 4, 'Keep the bad guys off me!', 12, 7, 100, 0, 0, 0, 26853, 0, '7th Legion Siege Engineer'), +(@ENGI, 1, 0, '%s deftly assembles a strange machine.', 16, 7, 100, 0, 0, 0, 26856, 0, '7th Legion Siege Engineer'), +(@ENGI, 2, 0, 'That oughta do it! Just a few more seconds now.', 12, 7, 100, 0, 0, 0, 26858, 0, '7th Legion Siege Engineer'); From 79696e08718ea74c8063fdc13624560f4bd3118f Mon Sep 17 00:00:00 2001 From: click Date: Tue, 7 Apr 2015 06:12:37 +0200 Subject: [PATCH 81/86] Core/Command: Sanitize input for .account set gmlevel handling --- src/server/scripts/Commands/cs_account.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index c6ddd73addd..5668c20d6b0 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -667,7 +667,7 @@ public: if (isAccountNameGiven) { targetAccountName = arg1; - if (!AccountMgr::normalizeString(targetAccountName)) + if (!AccountMgr::normalizeString(targetAccountName) || !AccountMgr::GetId(targetAccountName)) { handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, targetAccountName.c_str()); handler->SetSentErrorMessage(true); From dcd36c1bf61fdb01696d382667f84531f74b2f6f Mon Sep 17 00:00:00 2001 From: Dr-J Date: Tue, 7 Apr 2015 18:56:35 +0100 Subject: [PATCH 82/86] DB/Gossip: Add some missing gossips Add missing Gossips from Diremaul North --- sql/updates/world/2015_04_07_00_world.sql | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sql/updates/world/2015_04_07_00_world.sql diff --git a/sql/updates/world/2015_04_07_00_world.sql b/sql/updates/world/2015_04_07_00_world.sql new file mode 100644 index 00000000000..e5cec5e1812 --- /dev/null +++ b/sql/updates/world/2015_04_07_00_world.sql @@ -0,0 +1,21 @@ +UPDATE `creature_template` SET `gossip_menu_id`=5708, `npcflag`=1 WHERE `entry`=14353; +UPDATE `creature_template` SET `gossip_menu_id`=5733, `npcflag`=1 WHERE `entry`=14323; +UPDATE `creature_template` SET `gossip_menu_id`=5746, `npcflag`=1 WHERE `entry`=11441; +UPDATE `creature_template` SET `gossip_menu_id`=5735, `npcflag`=1 WHERE `entry`=14326; + +DELETE FROM `gossip_menu` WHERE `entry` IN(5708,5715,5740,5733,5746,5735); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(5708, 6876), +(5708, 6895), +(5715, 6882), +(5740, 6916), +(5733, 6905), +(5746, 6922), +(5735, 6907); + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN(5708,5715,5740,5733,5746,5735); +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 +(5708, 0, 0, 'I''m the new king? What are you talking about?', 9365, 1, 1, 5715, 0, 0, 0, NULL, 0), -- Entry: 14353 +(5708, 1, 0, 'Henchmen? Tribute?', 9440, 1, 1, 5740, 0, 0, 0, NULL, 0), -- Entry: 14353 +(5715, 0, 0, 'It''s good to be the king! Now, let''s get back to what you were talking about before...', 9441, 1, 1, 0, 0, 0, 0, NULL, 0), -- Entry: 14353 +(5740, 0, 0, 'Well then... show me the tribute!', 9367, 1, 1, 0, 0, 0, 0, NULL, 0); -- Entry: 14353 From 0e3607df5b6df0e85a458cbd37da124f7fa58825 Mon Sep 17 00:00:00 2001 From: click Date: Tue, 7 Apr 2015 21:26:23 +0200 Subject: [PATCH 83/86] Core/Spells: Allow non-skill-based flying mounts to be used in designated areas. - Flying mounts that are not in the "SKILL_MOUNT"-tree and area-restricted can now be used properly (ex. 64749 - Loaned Gryphon). - Remove isKnowHowFlyIn()-function (useless and deprecated since this is handled properly in the spellsystem). Massive thanks to rat for extremely good help and support on fixing this (most of this is his work). --- src/server/game/Entities/Player/Player.cpp | 7 ------- src/server/game/Entities/Player/Player.h | 2 -- src/server/game/Spells/SpellInfo.cpp | 13 ++++++++++--- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 1a8c250bfb9..e2da8e1e8d9 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -25085,13 +25085,6 @@ uint32 Player::CalculateTalentsPoints() const return uint32(talentPointsForLevel * sWorld->getRate(RATE_TALENT)); } -bool Player::IsKnowHowFlyIn(uint32 mapid, uint32 zone) const -{ - // continent checked in SpellInfo::CheckLocation at cast and area update - uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone); - return v_map != 571 || HasSpell(54197); // Cold Weather Flying -} - void Player::LearnSpellHighestRank(uint32 spellid) { LearnSpell(spellid, false); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index e6ff939d881..8394193f8c1 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2136,8 +2136,6 @@ class Player : public Unit, public GridObject void SetFallInformation(uint32 time, float z); void HandleFall(MovementInfo const& movementInfo); - bool IsKnowHowFlyIn(uint32 mapid, uint32 zone) const; - void SetClientControl(Unit* target, bool allowMove); void SetMover(Unit* target); diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 862521a068c..79db8672a4f 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1482,12 +1482,19 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a case SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED: case SPELL_AURA_FLY: { - if (player && !player->IsKnowHowFlyIn(map_id, zone_id)) - return SPELL_FAILED_INCORRECT_AREA; + if (player) + { + SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id); + for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter) + { + // spell 54197 (Cold Weather Flying) is a prereq for flying in Northrend + if (skillIter->second->skillId == SKILL_MOUNTS && player->GetMapId() != 571 && !player->HasSpell(54197)) + return SPELL_FAILED_INCORRECT_AREA; // maybe: SPELL_CUSTOM_ERROR_CANT_USE_THAT_MOUNT + } + } } } } - return SPELL_CAST_OK; } From 869955e03c3bf03352237bd33d79215aacbe06ad Mon Sep 17 00:00:00 2001 From: Kittnz Date: Tue, 7 Apr 2015 23:03:02 +0200 Subject: [PATCH 84/86] DB/NPC: Goblin Merc spawn and some adjustment on Dragonmaw Base Camp by @Killyana Closes #14453 --- sql/updates/world/2015_04_07_01_world.sql | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sql/updates/world/2015_04_07_01_world.sql diff --git a/sql/updates/world/2015_04_07_01_world.sql b/sql/updates/world/2015_04_07_01_world.sql new file mode 100644 index 00000000000..e000a43fe1c --- /dev/null +++ b/sql/updates/world/2015_04_07_01_world.sql @@ -0,0 +1,21 @@ +SET @GUID := 69717; -- 4 creature guid Set by TC +SET @OGUID := 5510; -- 1 GOB guid set by TC +DELETE FROM `creature` WHERE `id`=23142; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`,`curhealth`) VALUES +(@GUID+0, 23142, 530, 1, 1, -5121.06, 598.424, 84.7603, 0.0581088, 600, 6542), +(@GUID+1, 23142, 530, 1, 1, -5119.60, 601.834, 84.8180, 5.1726200, 600, 6542), +(@GUID+2, 23142, 530, 1, 1, -5115.02, 601.537, 85.0292, 4.0204400, 600, 6542), +(@GUID+3, 23142, 530, 1, 1, -5114.25, 597.062, 85.1574, 2.7049000, 600, 6542); + +DELETE FROM `gameobject` WHERE `guid` IN (@OGUID); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@OGUID,50983,530,1,1, -5116.788574, 631.188660, 85.055522,0.949811,0,0,0.457254, 0.889336, 300, 0, 1); + +DELETE FROM `creature_equip_template` WHERE `entry`=23146; +INSERT INTO `creature_equip_template` (`entry`, `id`, `itemEntry1`, `itemEntry2`, `itemEntry3`, `VerifiedBuild`) VALUES (23146, 1, 31603, 0, 0, 0); +UPDATE `creature` SET `position_x`= -5158.237305, `position_y`= 584.302612, `position_z`= 81.074142, `orientation`= 5.954358 WHERE `guid`= 78136; +UPDATE `creature` SET `position_x`= -5156.172363, `position_y`= 590.695251, `position_z`= 80.769630, `orientation`= 5.502757 WHERE `guid`= 78135; +UPDATE `creature` SET `position_x`= -5152.365723, `position_y`= 592.303040, `position_z`= 81.361931, `orientation`= 4.705578 WHERE `guid`= 78137; +UPDATE `creature` SET `position_x`= -5113.345703, `position_y`= 623.850159, `position_z`= 86.736343, `orientation`= 1.033840 WHERE `guid`= 78160; +UPDATE `creature` SET `position_x`= -5123.593750, `position_y`= 626.638916, `position_z`= 86.629669, `orientation`= 1.395123 WHERE `guid`= 78159; +UPDATE `creature` SET `position_x`= -5165.503418, `position_y`= 568.109131, `position_z`= 80.523895, `orientation`= 2.707489 WHERE `guid`= 52107; From b321f84a39c1c790a6519f8c0910f99c60fb536d Mon Sep 17 00:00:00 2001 From: Kittnz Date: Tue, 7 Apr 2015 23:05:03 +0200 Subject: [PATCH 85/86] DB/Zone: Netherwing Ledge Part 2 - Cleanup on the Dragonmaw Ascendant spawns - Updated Dragonmaw Ascendant positions - Added waypoints too Dragonmaw Ascendant --- sql/updates/world/2015_04_07_02_world.sql | 358 ++++++++++++++++++++++ 1 file changed, 358 insertions(+) create mode 100644 sql/updates/world/2015_04_07_02_world.sql diff --git a/sql/updates/world/2015_04_07_02_world.sql b/sql/updates/world/2015_04_07_02_world.sql new file mode 100644 index 00000000000..f7df3a0fecc --- /dev/null +++ b/sql/updates/world/2015_04_07_02_world.sql @@ -0,0 +1,358 @@ +-- Cleanup on Dragonmaw Ascendant! +DELETE FROM `creature` WHERE `guid` IN (52283, 52284, 52285, 52286, 52287, 52288, 52289, 52290, 52291, 52292, 52293, 52294, 52295, 52296, 52297, 52298, 52299, 52300, 52301, 52302, 52303, 52304, 52305, 52306, 52307, 52308, 52309, 52310, 52311, 52312, 52313, 52314, 52315, 52316, 52317, 52318, 52319, 52320, 52321, 52322, 52323, 52324, 52325, 52326, 52327, 52328, 52329, 52332, 52333); + +-- Update Pos +UPDATE `creature` SET `position_x`=-4932.889, `position_y`=22.40549, `position_z`=62.24448, `orientation`=3.612832, `MovementType`=0 WHERE `guid`=52330; +UPDATE `creature` SET `position_x`=-4941.292, `position_y`=35.20237, `position_z`=62.73532, `orientation`=3.612832, `MovementType`=0 WHERE `guid`=52331; + +-- Pathing for Dragonmaw Ascendant Entry: 22253 'TDB FORMAT' +SET @NPC := 52275; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-5195.857,`position_y`=90.12917,`position_z`=70.22656 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,-5195.857,90.12917,70.22656,0,0,0,0,100,0), -- 20:28:25 +(@PATH,2,-5191.49,106.8146,71.93172,0,0,0,0,100,0), -- 20:28:37 +(@PATH,3,-5195.716,138.8907,71.36693,0,0,0,0,100,0), -- 20:28:39 +(@PATH,4,-5200.492,147.7713,70.40874,0,0,0,0,100,0), -- 20:28:47 +(@PATH,5,-5209.126,186.8668,72.33409,0,0,0,0,100,0), -- 20:28:51 +(@PATH,6,-5208.013,200.6249,73.10587,0,0,0,0,100,0), -- 20:28:59 +(@PATH,7,-5201.791,256.0194,71.98375,0,0,0,0,100,0), -- 20:29:08 +(@PATH,8,-5188.366,291.6975,73.16975,0,0,0,0,100,0), -- 20:29:12 +(@PATH,9,-5182.603,302.7376,73.64639,0,0,0,0,100,0), -- 20:29:21 +(@PATH,10,-5176.891,356.321,72.7616,0,0,0,0,100,0), -- 20:29:28 +(@PATH,11,-5182.551,367.8651,72.34415,0,0,0,0,100,0), -- 20:29:34 +(@PATH,12,-5180.885,365.6959,72.57543,0,0,0,0,100,0), -- 20:29:42 +(@PATH,13,-5179.66,364.4311,72.66841,0,0,0,0,100,0), -- 20:29:46 +(@PATH,14,-5174.673,325.8635,73.72121,0,0,0,0,100,0), -- 20:29:53 +(@PATH,15,-5198.33,272.533,72.0965,0,0,0,0,100,0), -- 20:30:00 +(@PATH,16,-5200.696,243.5709,72.67114,0,0,0,0,100,0), -- 20:30:07 +(@PATH,17,-5201.835,233.1574,73.37646,0,0,0,0,100,0), -- 20:30:13 +(@PATH,18,-5210.627,167.8349,70.08221,0,0,0,0,100,0), -- 20:30:20 +(@PATH,19,-5198.43,145.466,70.45454,0,0,0,0,100,0), -- 20:30:29 +(@PATH,20,-5195.288,134.2268,72.13242,0,0,0,0,100,0), -- 20:30:34 +(@PATH,21,-5195.829,90.17783,70.22305,0,0,0,0,100,0); -- 20:30:41 +-- 0x1C09FC424015BB4000001A00002191E8 .go -5195.857 90.12917 70.22656 + +-- Pathing for Dragonmaw Ascendant Entry: 22253 'TDB FORMAT' +SET @NPC := 52276; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-5218.906,`position_y`=565.3663,`position_z`=50.85233 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,-5218.906,565.3663,50.85233,0,0,0,0,100,0), -- 06:57:51 +(@PATH,2,-5208.237,539.7261,64.97557,0,0,0,0,100,0), -- 06:58:07 +(@PATH,3,-5207.74,528.3329,71.45394,0,0,0,0,100,0), -- 06:58:12 +(@PATH,4,-5203.943,505.6842,74.86707,0,0,0,0,100,0), -- 06:58:15 +(@PATH,5,-5201.894,495.4175,74.75183,0,0,0,0,100,0), -- 06:58:22 +(@PATH,6,-5200.353,477.0113,74.51066,0,0,0,0,100,0), -- 06:58:25 +(@PATH,7,-5196.964,442.6382,74.37379,0,0,0,0,100,0), -- 06:58:31 +(@PATH,8,-5206.846,402.5792,75.1168,0,0,0,0,100,0), -- 06:58:37 +(@PATH,9,-5195.471,385.1235,72.39382,0,0,0,0,100,0), -- 06:58:41 +(@PATH,10,-5175.989,405.5393,74.1407,0,0,0,0,100,0), -- 06:58:46 +(@PATH,11,-5170.418,417.7219,75.94295,0,0,0,0,100,0), -- 06:58:52 +(@PATH,12,-5166.691,432.0739,76.86201,0,0,0,0,100,0), -- 06:58:55 +(@PATH,13,-5163.314,446.5266,77.07475,0,0,0,0,100,0), -- 06:59:00 +(@PATH,14,-5123.884,478.5325,80.71776,0,0,0,0,100,0), -- 06:59:04 +(@PATH,15,-5110.585,482.2175,83.02201,0,0,0,0,100,0), -- 06:59:11 +(@PATH,16,-5099.746,484.6776,83.24095,0,0,0,0,100,0), -- 06:59:16 +(@PATH,17,-5067.211,481.675,84.28523,0,0,0,0,100,0), -- 06:59:20 +(@PATH,18,-5042.09,468.0539,84.99848,0,0,0,0,100,0), -- 06:59:25 +(@PATH,19,-5020.597,458.8485,87.52278,0,0,0,0,100,0), -- 06:59:28 +(@PATH,20,-5014.573,456.4386,88.06664,0,0,0,0,100,0), -- 06:59:34 +(@PATH,21,-4981.055,419.6735,87.5862,0,0,0,0,100,0), -- 06:59:39 +(@PATH,22,-4971.752,413.9452,86.63638,0,0,0,0,100,0), -- 06:59:46 +(@PATH,23,-4981.293,436.6361,87.37029,0,0,0,0,100,0), -- 06:59:48 +(@PATH,24,-5000.16,465.5633,87.46753,0,0,0,0,100,0), -- 06:59:57 +(@PATH,25,-5003.161,469.669,87.71191,0,0,0,0,100,0), -- 07:00:01 +(@PATH,26,-5024.007,485.0092,86.62108,0,0,0,0,100,0), -- 07:00:05 +(@PATH,27,-5052.383,491.6175,85.6012,0,0,0,0,100,0), -- 07:00:10 +(@PATH,28,-5089.974,495.1535,84.65902,0,0,0,0,100,0), -- 07:00:15 +(@PATH,29,-5131.202,491.5916,82.67003,0,0,0,0,100,0), -- 07:00:23 +(@PATH,30,-5104.979,495.0316,84.09554,0,0,0,0,100,0), -- 07:00:24 +(@PATH,31,-5136.438,490.7238,82.10683,0,0,0,0,100,0), -- 07:00:32 +(@PATH,32,-5148.315,486.5536,80.46145,0,0,0,0,100,0), -- 07:00:36 +(@PATH,33,-5176.314,497.1033,78.8902,0,0,0,0,100,0), -- 07:00:40 +(@PATH,34,-5191.643,517.5717,76.7062,0,0,0,0,100,0), -- 07:00:46 +(@PATH,35,-5209.542,551.1528,59.1912,0,0,0,0,100,0), -- 07:00:52 +(@PATH,36,-5218.914,591.9361,58.3474,0,0,0,0,100,0), -- 07:01:01 +(@PATH,37,-5216.641,622.2191,67.05342,0,0,0,0,100,0), -- 07:01:09 +(@PATH,38,-5219.429,635.3921,68.57317,0,0,0,0,100,0), -- 07:01:16 +(@PATH,39,-5219.883,633.0313,68.81996,0,0,0,0,100,0), -- 07:01:19 +(@PATH,40,-5220.871,599.2662,61.02921,0,0,0,0,100,0), -- 07:01:21 +(@PATH,41,-5218.937,565.3672,50.85265,0,0,0,0,100,0); -- 07:01:27 +-- 0x1C09FC424015BB40000019000022140B .go -5218.906 565.3663 50.85233 + +-- Pathing for Dragonmaw Ascendant Entry: 22253 'TDB FORMAT' +SET @NPC := 52277; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-4898.732,`position_y`=216.78,`position_z`=54.74985 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,-4898.732,216.78,54.74985,0,0,0,0,100,0), -- 07:15:21 +(@PATH,2,-4885.031,236.3208,52.61034,0,0,0,0,100,0), -- 07:15:29 +(@PATH,3,-4889.695,229.7686,52.92027,0,0,0,0,100,0), -- 07:15:32 +(@PATH,4,-4887.056,233.156,52.68503,0,0,0,0,100,0), -- 07:15:40 +(@PATH,5,-4858.93,265.0389,48.16708,0,0,0,0,100,0), -- 07:15:41 +(@PATH,6,-4851.827,284.8839,47.34936,0,0,0,0,100,0), -- 07:15:48 +(@PATH,7,-4846.079,316.0757,55.46541,0,0,0,0,100,0), -- 07:15:54 +(@PATH,8,-4843.175,349.7769,58.46518,0,0,0,0,100,0), -- 07:16:01 +(@PATH,9,-4845.812,366.7672,60.97961,0,0,0,0,100,0), -- 07:16:07 +(@PATH,10,-4856.089,402.1339,59.56307,0,0,0,0,100,0), -- 07:16:12 +(@PATH,11,-4857.438,423.075,61.22576,0,0,0,0,100,0), -- 07:16:18 +(@PATH,12,-4859.081,457.2928,64.90662,0,0,0,0,100,0), -- 07:16:25 +(@PATH,13,-4846.12,505.6395,50.40051,0,0,0,0,100,0), -- 07:16:33 +(@PATH,14,-4851.98,549.8719,48.70653,0,0,0,0,100,0), -- 07:16:40 +(@PATH,15,-4878.309,576.0837,60.99225,0,0,0,0,100,0), -- 07:16:54 +(@PATH,16,-4877.338,605.8702,68.93106,0,0,0,0,100,0), -- 07:17:02 +(@PATH,17,-4879.686,577.7703,61.86221,0,0,0,0,100,0), -- 07:17:09 +(@PATH,18,-4853.525,555.9883,49.47371,0,0,0,0,100,0), -- 07:17:14 +(@PATH,19,-4845.978,509.1451,49.54256,0,0,0,0,100,0), -- 07:17:22 +(@PATH,20,-4846.321,510.5673,48.53417,0,0,0,0,100,0), -- 07:17:35 +(@PATH,21,-4846,508.4746,49.31151,0,0,0,0,100,0), -- 07:17:42 +(@PATH,22,-4859.021,476.5473,64.16699,0,0,0,0,100,0), -- 07:17:43 +(@PATH,23,-4857.8,436.0128,60.95083,0,0,0,0,100,0), -- 07:17:50 +(@PATH,24,-4857.147,413.6607,60.26784,0,0,0,0,100,0), -- 07:17:58 +(@PATH,25,-4848.22,378.149,60.79633,0,0,0,0,100,0), -- 07:18:04 +(@PATH,26,-4843.683,354.1476,59.12819,0,0,0,0,100,0), -- 07:18:10 +(@PATH,27,-4844.921,324.3129,56.56282,0,0,0,0,100,0), -- 07:18:15 +(@PATH,28,-4848.563,297.3202,46.17633,0,0,0,0,100,0), -- 07:18:21 +(@PATH,29,-4856.53,270.7361,47.4738,0,0,0,0,100,0), -- 07:18:28 +(@PATH,30,-4881.715,240.4737,51.88027,0,0,0,0,100,0); -- 07:18:34 +-- 0x1C09FC424015BB4000001900002230F5 .go -4898.732 216.78 54.74985 + +-- Pathing for Dragonmaw Ascendant Entry: 22253 'TDB FORMAT' +SET @NPC := 52278; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-5004.888,`position_y`=702.8807,`position_z`=82.04395 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,-5004.888,702.8807,82.04395,0,0,0,0,100,0), -- 07:09:09 +(@PATH,2,-5011.663,699.3098,81.89692,0,0,0,0,100,0), -- 07:09:11 +(@PATH,3,-5015.312,687.5909,82.03319,0,0,0,0,100,0), -- 07:09:13 +(@PATH,4,-4996.903,700.0056,82.65056,0,0,0,0,100,0), -- 07:09:17 +(@PATH,5,-4992.215,702.6887,83.10714,0,0,0,0,100,0), -- 07:09:19 +(@PATH,6,-4969.132,707.9535,83.95985,0,0,0,0,100,0), -- 07:09:23 +(@PATH,7,-4964.693,690.9923,83.32875,0,0,0,0,100,0), -- 07:09:25 +(@PATH,8,-4954.07,677.088,77.76302,0,0,0,0,100,0), -- 07:09:29 +(@PATH,9,-4949.576,659.408,77.40804,0,0,0,0,100,0), -- 07:09:34 +(@PATH,10,-4960.746,641.1125,76.67274,0,0,0,0,100,0), -- 07:09:37 +(@PATH,11,-4961.855,639.7071,77.21989,0,0,0,0,100,0), -- 07:09:43 +(@PATH,12,-4956.266,612.0739,75.91876,0,0,0,0,100,0), -- 07:09:47 +(@PATH,13,-4954.515,605.1003,75.18854,0,0,0,0,100,0), -- 07:09:51 +(@PATH,14,-4956.737,589.0807,74.53506,0,0,0,0,100,0), -- 07:09:54 +(@PATH,15,-4969.977,557.0493,76.5106,0,0,0,0,100,0), -- 07:09:59 +(@PATH,16,-4988.75,549.4487,83.39151,0,0,0,0,100,0), -- 07:10:01 +(@PATH,17,-4988.618,539.1655,83.00819,0,0,0,0,100,0), -- 07:10:05 +(@PATH,18,-4981.907,532.507,78.12585,0,0,0,0,100,0), -- 07:10:07 +(@PATH,19,-4959.939,531.2402,73.84925,0,0,0,0,100,0), -- 07:10:10 +(@PATH,20,-4946.729,533.6745,66.42971,0,0,0,0,100,0), -- 07:10:15 +(@PATH,21,-4926.818,538.8672,65.0467,0,0,0,0,100,0), -- 07:10:18 +(@PATH,22,-4911.734,530.0341,55.14276,0,0,0,0,100,0), -- 07:10:22 +(@PATH,23,-4898.571,547.2958,47.75196,0,0,0,0,100,0), -- 07:10:27 +(@PATH,24,-4890.054,557.7857,57.1432,0,0,0,0,100,0), -- 07:10:33 +(@PATH,25,-4876.696,566.1863,57.93503,0,0,0,0,100,0), -- 07:10:38 +(@PATH,26,-4862.715,575.6901,52.22014,0,0,0,0,100,0), -- 07:10:40 +(@PATH,27,-4858.512,594.1106,60.68968,0,0,0,0,100,0), -- 07:10:45 +(@PATH,28,-4856.906,612.0919,65.71946,0,0,0,0,100,0), -- 07:10:49 +(@PATH,29,-4854.059,628.2389,66.45804,0,0,0,0,100,0), -- 07:10:53 +(@PATH,30,-4849.357,642.4513,59.23316,0,0,0,0,100,0), -- 07:10:56 +(@PATH,31,-4839.23,658.6438,54.41743,0,0,0,0,100,0), -- 07:11:01 +(@PATH,32,-4840.304,673.9675,51.38053,0,0,0,0,100,0), -- 07:11:05 +(@PATH,33,-4849.471,676.6252,54.26706,0,0,0,0,100,0), -- 07:11:08 +(@PATH,34,-4862.514,682.0897,59.79738,0,0,0,0,100,0), -- 07:11:10 +(@PATH,35,-4880.908,688.1571,66.10199,0,0,0,0,100,0), -- 07:11:13 +(@PATH,36,-4863.878,682.674,59.87488,0,0,0,0,100,0), -- 07:11:15 +(@PATH,37,-4880.722,688.0911,66.16837,0,0,0,0,100,0), -- 07:11:22 +(@PATH,38,-4896.763,688.6787,70.71627,0,0,0,0,100,0), -- 07:11:24 +(@PATH,39,-4905.12,669.2037,74.99036,0,0,0,0,100,0), -- 07:11:28 +(@PATH,40,-4907.025,659.6029,77.51676,0,0,0,0,100,0), -- 07:11:33 +(@PATH,41,-4917.011,663.6454,73.60014,0,0,0,0,100,0), -- 07:11:35 +(@PATH,42,-4927.575,673.5298,75.48451,0,0,0,0,100,0), -- 07:11:38 +(@PATH,43,-4938.423,682.1601,78.2296,0,0,0,0,100,0), -- 07:11:41 +(@PATH,44,-4954.518,695.4416,84.32332,0,0,0,0,100,0), -- 07:11:45 +(@PATH,45,-4969.985,709.3942,83.46222,0,0,0,0,100,0), -- 07:11:51 +(@PATH,46,-4971.432,710.7948,83.43773,0,0,0,0,100,0), -- 07:11:55 +(@PATH,47,-4986.938,716.7153,82.9008,0,0,0,0,100,0); -- 07:11:58 +-- 0x1C09FC424015BB4000001900002230F7 .go -5004.888 702.8807 82.04395 + +-- Pathing for Dragonmaw Ascendant Entry: 22253 'TDB FORMAT' +SET @NPC := 52279; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-5022.057,`position_y`=479.9312,`position_z`=87.00283 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,-5022.057,479.9312,87.00283,0,0,0,0,100,0), -- 20:22:29 +(@PATH,2,-5014.553,472.7912,88.03943,0,0,0,0,100,0), -- 20:22:39 +(@PATH,3,-4999.62,456.4922,87.46286,0,0,0,0,100,0), -- 20:22:47 +(@PATH,4,-4967.545,406.6447,86.09462,0,0,0,0,100,0), -- 20:22:56 +(@PATH,5,-4963.545,398.6447,85.84462,0,0,0,0,100,0), -- 20:22:56 +(@PATH,6,-4966.199,380.3893,84.58515,0,0,0,0,100,0), -- 20:23:05 +(@PATH,7,-4969.449,369.8893,84.33515,0,0,0,0,100,0), -- 20:23:05 +(@PATH,8,-4971.571,363.7757,84.01563,0,0,0,0,100,0), -- 20:23:11 +(@PATH,9,-4981.193,315.1064,82.50433,0,0,0,0,100,0), -- 20:23:18 +(@PATH,10,-4982.943,308.6064,82.00433,0,0,0,0,100,0), -- 20:23:18 +(@PATH,11,-4985.527,270.3568,80.93662,0,0,0,0,100,0), -- 20:23:31 +(@PATH,12,-4984.912,261.6664,80.87724,0,0,0,0,100,0), -- 20:23:39 +(@PATH,13,-4984.194,254.0232,80.98643,0,0,0,0,100,0), -- 20:23:41 +(@PATH,14,-4983.671,226.0687,80.50131,0,0,0,0,100,0), -- 20:23:46 +(@PATH,15,-5002.183,198.7367,80.73076,0,0,0,0,100,0), -- 20:23:54 +(@PATH,16,-4997.445,147.227,79.09719,0,0,0,0,100,0), -- 20:24:01 +(@PATH,17,-4996.195,142.477,78.59719,0,0,0,0,100,0), -- 20:24:01 +(@PATH,18,-4996.078,134.5595,77.47847,0,0,0,0,100,0), -- 20:24:06 +(@PATH,19,-4996.328,129.5595,76.97847,0,0,0,0,100,0), -- 20:24:06 +(@PATH,20,-4996.578,121.8095,76.72847,0,0,0,0,100,0), -- 20:24:06 +(@PATH,21,-4997.078,112.0595,75.97847,0,0,0,0,100,0), -- 20:24:06 +(@PATH,22,-5003.599,85.19402,76.17677,0,0,0,0,100,0), -- 20:24:13 +(@PATH,23,-5000.918,93.57802,75.89561,0,0,0,0,100,0), -- 20:24:18 +(@PATH,24,-4996.32,127.891,76.83911,0,0,0,0,100,0), -- 20:24:21 +(@PATH,25,-4996.07,133.891,77.33911,0,0,0,0,100,0), -- 20:24:21 +(@PATH,26,-4995.82,139.891,78.08911,0,0,0,0,100,0), -- 20:24:21 +(@PATH,27,-4997.385,146.7997,78.94779,0,0,0,0,100,0), -- 20:24:29 +(@PATH,28,-4998.385,151.2997,79.44779,0,0,0,0,100,0), -- 20:24:29 +(@PATH,29,-4999.885,157.0497,79.94779,0,0,0,0,100,0), -- 20:24:29 +(@PATH,30,-5000.678,159.7069,80.21076,0,0,0,0,100,0), -- 20:24:32 +(@PATH,31,-5002.248,199.0518,80.65829,0,0,0,0,100,0), -- 20:24:41 +(@PATH,32,-4983.636,226.4841,80.61127,0,0,0,0,100,0), -- 20:24:47 +(@PATH,33,-4986.27,283.0035,81.57057,0,0,0,0,100,0), -- 20:24:53 +(@PATH,34,-4980.688,317.2732,82.73731,0,0,0,0,100,0), -- 20:25:02 +(@PATH,35,-4979.188,322.0232,83.23731,0,0,0,0,100,0), -- 20:25:02 +(@PATH,36,-4976.569,330.6879,83.80838,0,0,0,0,100,0), -- 20:25:09 +(@PATH,37,-4964.715,384.6398,85.10558,0,0,0,0,100,0), -- 20:25:15 +(@PATH,38,-4969.031,409.8725,86.30847,0,0,0,0,100,0), -- 20:25:22 +(@PATH,39,-4975.031,422.3725,87.05847,0,0,0,0,100,0), -- 20:25:22 +(@PATH,40,-5003.537,460.994,88.00166,0,0,0,0,100,0), -- 20:25:31 +(@PATH,41,-5022.101,479.8282,87.23804,0,0,0,0,100,0), -- 20:25:39 +(@PATH,42,-5029.75,486.7083,86.9541,0,0,0,0,100,0); -- 20:25:54 +-- 0x1C09FC424015BB4000001A0000219932 .go -5022.057 479.9312 87.00283 + +-- Pathing for Dragonmaw Ascendant Entry: 22253 'TDB FORMAT' +SET @NPC := 52280; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-5210.222,`position_y`=418.9368,`position_z`=73.92104 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,-5210.222,418.9368,73.92104,0,0,0,0,100,0), -- 07:02:01 +(@PATH,2,-5194.546,459.6038,74.90173,0,0,0,0,100,0), -- 07:02:06 +(@PATH,3,-5198.185,476.6735,74.56579,0,0,0,0,100,0), -- 07:02:16 +(@PATH,4,-5205.193,489.9176,74.52521,0,0,0,0,100,0), -- 07:02:20 +(@PATH,5,-5205.922,514.9041,74.24827,0,0,0,0,100,0), -- 07:02:25 +(@PATH,6,-5197.391,548.4199,71.05492,0,0,0,0,100,0), -- 07:02:30 +(@PATH,7,-5202.769,580.7711,57.59827,0,0,0,0,100,0), -- 07:02:35 +(@PATH,8,-5207.66,619.1582,66.18312,0,0,0,0,100,0), -- 07:02:42 +(@PATH,9,-5203.323,643.3531,69.50911,0,0,0,0,100,0), -- 07:02:50 +(@PATH,10,-5209.102,642.1717,68.62796,0,0,0,0,100,0), -- 07:02:54 +(@PATH,11,-5223.636,616.6403,64.28975,0,0,0,0,100,0), -- 07:02:59 +(@PATH,12,-5236.8,572.5868,43.20554,0,0,0,0,100,0), -- 07:03:04 +(@PATH,13,-5230.435,558.9042,52.97427,0,0,0,0,100,0), -- 07:03:14 +(@PATH,14,-5236.423,533.6864,54.42358,0,0,0,0,100,0), -- 07:03:25 +(@PATH,15,-5257.124,507.9855,45.40817,0,0,0,0,100,0), -- 07:03:31 +(@PATH,16,-5275.066,487.7511,39.84113,0,0,0,0,100,0), -- 07:03:38 +(@PATH,17,-5276.403,465.4868,50.2813,0,0,0,0,100,0), -- 07:03:44 +(@PATH,18,-5260.017,431.7862,58.83994,0,0,0,0,100,0), -- 07:03:49 +(@PATH,19,-5264.36,398.4801,59.6331,0,0,0,0,100,0), -- 07:03:58 +(@PATH,20,-5247.507,387.5706,65.87028,0,0,0,0,100,0), -- 07:04:05 +(@PATH,21,-5218.22,394.0266,74.48222,0,0,0,0,100,0), -- 07:04:10 +(@PATH,22,-5197.534,385.7352,72.49537,0,0,0,0,100,0), -- 07:04:17 +(@PATH,23,-5194.736,383.3604,72.18273,0,0,0,0,100,0), -- 07:04:22 +(@PATH,24,-5180.763,356.1179,72.43773,0,0,0,0,100,0), -- 07:04:28 +(@PATH,25,-5175.956,317.8983,74.14841,0,0,0,0,100,0), -- 07:04:33 +(@PATH,26,-5192.369,287.6161,72.80084,0,0,0,0,100,0), -- 07:04:36 +(@PATH,27,-5215.688,268.9493,70.65274,0,0,0,0,100,0), -- 07:04:43 +(@PATH,28,-5234.928,266.7101,71.72028,0,0,0,0,100,0), -- 07:04:50 +(@PATH,29,-5261.104,267.6116,66.5541,0,0,0,0,100,0), -- 07:04:53 +(@PATH,30,-5269.087,272.336,70.12495,0,0,0,0,100,0), -- 07:04:59 +(@PATH,31,-5286.044,309.7126,70.90472,0,0,0,0,100,0), -- 07:05:03 +(@PATH,32,-5281.2,352.0699,63.69888,0,0,0,0,100,0), -- 07:05:09 +(@PATH,33,-5272.806,362.6875,62.99657,0,0,0,0,100,0), -- 07:05:19 +(@PATH,34,-5246.281,400.4454,59.19219,0,0,0,0,100,0), -- 07:05:23 +(@PATH,35,-5225.892,410.2588,65.93465,0,0,0,0,100,0); -- 07:05:31 +-- 0x1C09FC424015BB4000001A0000216370 .go -5210.222 418.9368 73.92104 + +-- Pathing for Dragonmaw Ascendant Entry: 22253 'TDB FORMAT' +SET @NPC := 52281; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-5285.737,`position_y`=354.3048,`position_z`=58.63031 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,-5285.737,354.3048,58.63031,0,0,0,0,100,0), -- 19:31:06 +(@PATH,2,-5294.725,316.1119,67.75787,0,0,0,0,100,0), -- 19:31:14 +(@PATH,3,-5301.147,281.1097,59.07014,0,0,0,0,100,0), -- 19:31:23 +(@PATH,4,-5304.806,249.8802,62.29091,0,0,0,0,100,0), -- 19:31:30 +(@PATH,5,-5314.573,202.0623,63.99271,0,0,0,0,100,0), -- 19:31:37 +(@PATH,6,-5314.016,154.8896,48.03545,0,0,0,0,100,0), -- 19:31:47 +(@PATH,7,-5299.288,117.1861,34.29665,0,0,0,0,100,0), -- 19:31:57 +(@PATH,8,-5306.702,135.3764,38.50175,0,0,0,0,100,0), -- 19:32:03 +(@PATH,9,-5299.126,117.1948,34.29574,0,0,0,0,100,0), -- 19:32:10 +(@PATH,10,-5283.754,81.68874,36.04304,0,0,0,0,100,0), -- 19:32:14 +(@PATH,11,-5272.062,57.64223,42.34082,0,0,0,0,100,0), -- 19:32:21 +(@PATH,12,-5264.497,27.00165,48.20856,0,0,0,0,100,0), -- 19:32:27 +(@PATH,13,-5250.226,-6.593673,46.53293,0,0,0,0,100,0), -- 19:32:36 +(@PATH,14,-5242.217,-36.79307,41.91159,0,0,0,0,100,0), -- 19:32:43 +(@PATH,15,-5227.656,-66.75511,59.73492,0,0,0,0,100,0), -- 19:32:49 +(@PATH,16,-5240.584,-40.47152,44.62254,0,0,0,0,100,0), -- 19:32:58 +(@PATH,17,-5247.443,-12.82116,46.7327,0,0,0,0,100,0), -- 19:33:05 +(@PATH,18,-5261.27,18.16552,48.98127,0,0,0,0,100,0), -- 19:33:12 +(@PATH,19,-5270.131,51.50296,42.63126,0,0,0,0,100,0), -- 19:33:19 +(@PATH,20,-5282.171,78.36816,34.01592,0,0,0,0,100,0), -- 19:33:27 +(@PATH,21,-5295.439,108.8647,33.0154,0,0,0,0,100,0), -- 19:33:33 +(@PATH,22,-5313.281,152.3893,47.28299,0,0,0,0,100,0), -- 19:33:41 +(@PATH,23,-5315.114,198.1515,63.51984,0,0,0,0,100,0), -- 19:33:50 +(@PATH,24,-5307.13,236.8966,62.42439,0,0,0,0,100,0), -- 19:34:00 +(@PATH,25,-5301.88,277.6213,59.22523,0,0,0,0,100,0), -- 19:34:11 +(@PATH,26,-5295.718,311.9755,66.89128,0,0,0,0,100,0), -- 19:34:18 +(@PATH,27,-5300.28,287.5018,64.20296,0,0,0,0,100,0), -- 19:34:20 +(@PATH,28,-5295.666,312.1795,67.10269,0,0,0,0,100,0), -- 19:34:28 +(@PATH,29,-5286.51,351.3247,58.38956,0,0,0,0,100,0), -- 19:34:31 +(@PATH,30,-5281.85,390.6465,55.83143,0,0,0,0,100,0), -- 19:34:41 +(@PATH,31,-5273.968,437.0849,54.09414,0,0,0,0,100,0), -- 19:34:48 +(@PATH,32,-5280.505,398.1873,55.13199,0,0,0,0,100,0); -- 19:35:01 +-- 0x1C09FC424015BB4000001A0000240362 .go -5285.737 354.3048 58.63031 + +-- Pathing for Dragonmaw Ascendant Entry: 22253 'TDB FORMAT' +SET @NPC := 52282; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-5026.082,`position_y`=30.3253,`position_z`=78.81156 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,-5026.082,30.3253,78.81156,0,0,0,0,100,0), -- 19:59:18 +(@PATH,2,-5044.674,33.37571,80.91895,0,0,0,0,100,0), -- 19:59:19 +(@PATH,3,-5100.418,46.22721,80.36517,0,0,0,0,100,0), -- 19:59:25 +(@PATH,4,-5120.707,43.68564,79.09943,0,0,0,0,100,0), -- 19:59:35 +(@PATH,5,-5168.205,29.74817,77.34432,0,0,0,0,100,0), -- 19:59:41 +(@PATH,6,-5187.383,4.068243,74.23724,0,0,0,0,100,0), -- 19:59:48 +(@PATH,7,-5192.171,-27.60443,74.06621,0,0,0,0,100,0), -- 19:59:54 +(@PATH,8,-5187.181,-39.73703,74.54796,0,0,0,0,100,0), -- 20:00:02 +(@PATH,9,-5162.415,-82.17906,72.73651,0,0,0,0,100,0), -- 20:00:09 +(@PATH,10,-5132.202,-120.9739,65.05319,0,0,0,0,100,0), -- 20:00:16 +(@PATH,11,-5108.869,-123.2847,60.21478,0,0,0,0,100,0), -- 20:00:23 +(@PATH,12,-5065.221,-116.5905,61.09086,0,0,0,0,100,0), -- 20:00:31 +(@PATH,13,-5032.96,-83.59184,63.18661,0,0,0,0,100,0), -- 20:00:39 +(@PATH,14,-5018.273,-72.75426,67.76162,0,0,0,0,100,0), -- 20:00:48 +(@PATH,15,-5003.304,-38.36306,73.39491,0,0,0,0,100,0), -- 20:00:51 +(@PATH,16,-4982.256,-5.512026,72.68662,0,0,0,0,100,0), -- 20:01:01 +(@PATH,17,-4970.602,8.782578,71.2607,0,0,0,0,100,0), -- 20:01:08 +(@PATH,18,-4956.99,19.62778,67.81738,0,0,0,0,100,0), -- 20:01:12 +(@PATH,19,-4965.795,7.546585,69.8514,0,0,0,0,100,0), -- 20:01:16 +(@PATH,20,-4973.835,-2.793668,71.32764,0,0,0,0,100,0), -- 20:01:19 +(@PATH,21,-4995.399,-29.66144,72.97089,0,0,0,0,100,0), -- 20:01:23 +(@PATH,22,-5000.069,-61.59894,66.50253,0,0,0,0,100,0), -- 20:01:30 +(@PATH,23,-5007.126,-33.22968,75.18976,0,0,0,0,100,0), -- 20:01:36 +(@PATH,24,-5014.227,5.722984,77.4781,0,0,0,0,100,0); -- 20:01:44 +-- 0x1C09FC424015BB4000001A0000241AC7 .go -5026.082 30.3253 78.81156 From 6c1e4bc20d68d9fb548eb4896bd8b84a4c3ec4ff Mon Sep 17 00:00:00 2001 From: click Date: Tue, 7 Apr 2015 23:51:19 +0200 Subject: [PATCH 86/86] Core/Spells: Reinstate helperfunction removed in commit 0e3607df (with a new functionname to make more sense out of it), and adjust the remaining code slightly to accomodate that. --- src/server/game/Entities/Player/Player.cpp | 7 +++++++ src/server/game/Entities/Player/Player.h | 2 ++ src/server/game/Spells/SpellInfo.cpp | 13 +++++-------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index e2da8e1e8d9..d31b0ebfb05 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -25085,6 +25085,13 @@ uint32 Player::CalculateTalentsPoints() const return uint32(talentPointsForLevel * sWorld->getRate(RATE_TALENT)); } +bool Player::canFlyInZone(uint32 mapid, uint32 zone) const +{ + // continent checked in SpellInfo::CheckLocation at cast and area update + uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone); + return v_map != 571 || HasSpell(54197); // 54197 = Cold Weather Flying +} + void Player::LearnSpellHighestRank(uint32 spellid) { LearnSpell(spellid, false); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 8394193f8c1..ea073456a1d 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2136,6 +2136,8 @@ class Player : public Unit, public GridObject void SetFallInformation(uint32 time, float z); void HandleFall(MovementInfo const& movementInfo); + bool canFlyInZone(uint32 mapid, uint32 zone) const; + void SetClientControl(Unit* target, bool allowMove); void SetMover(Unit* target); diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 79db8672a4f..8821ba3db22 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1482,15 +1482,12 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a case SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED: case SPELL_AURA_FLY: { - if (player) + SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id); + for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter) { - SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id); - for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter) - { - // spell 54197 (Cold Weather Flying) is a prereq for flying in Northrend - if (skillIter->second->skillId == SKILL_MOUNTS && player->GetMapId() != 571 && !player->HasSpell(54197)) - return SPELL_FAILED_INCORRECT_AREA; // maybe: SPELL_CUSTOM_ERROR_CANT_USE_THAT_MOUNT - } + if (skillIter->second->skillId == SKILL_MOUNTS) + if (player && !player->canFlyInZone(map_id, zone_id)) + return SPELL_FAILED_INCORRECT_AREA; } } }