Merge remote-tracking branch 'tc/3.3.5' into 4.3.4
Conflicts: .travis.yml CMakeLists.txt README.md dep/libmpq/CMakeLists.txt doc/UnixInstall.txt revision_data.h.in.cmake sql/base/auth_database.sql sql/base/characters_database.sql sql/base/dev/world_database.sql sql/old/3.3.5a/auth/59_2015_11_07/2015_08_21_00_auth.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_14_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_14_01_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_14_02_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_14_03_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_14_04_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_14_05_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_15_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_15_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_15_02_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_16_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_17_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_17_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_17_02_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_17_03_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_17_04_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_18_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_18_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_19_00_world_2015_07_18_04.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_19_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_19_02_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_19_03_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_19_04_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_19_05_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_20_02_world_2015_07_19_35.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_21_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_24_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_24_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_24_02_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_24_03_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_24_04_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_24_05_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_24_06_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_24_07_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_25_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_25_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_25_02_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_25_03_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_25_04_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_26_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_26_04_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_26_05_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_26_06_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_27_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_07_27_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_02_00_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_02_01_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_03_00_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_08_00_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_08_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_08_02_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_08_03_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_08_04_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_09_00_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_13_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_13_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_13_02_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_13_03_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_13_04_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_21_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_21_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_21_02_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_23_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_25_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_25_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_26_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_26_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_27_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_29_02_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_29_03_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_08_29_04_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_01_00_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_02_02_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_02_03_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_03_05_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_05_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_05_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_05_02_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_06_00_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_08_01_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_08_02_world.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_10_00_world_335.sql sql/old/3.3.5a/world/59_2015_11_07/2015_09_10_01_world_335.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_14_02_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_14_03_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_14_04_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_14_05_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_15_00_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_15_01_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_15_02_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_16_00_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_17_00_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_17_01_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_17_02_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_17_03_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_17_04_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_18_00_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_18_01_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_19_01_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_19_02_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_19_03_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_19_04_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_19_05_world_from_335.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_21_00_world_from_335.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_24_00_world_from_335.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_24_01_world_from_335.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_24_02_world_from_335.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_24_03_world_from_335.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_24_04_world_from_335.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_24_06_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_24_07_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_25_00_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_25_01_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_25_02_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_25_03_world_from_335.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_25_04_world_from_335.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_26_04_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_26_05_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_27_00_world.sql sql/old/4.3.4/TDB09_to_TDB10_updates/world/2015_07_27_01_world.sql sql/updates/world/2015_07_14_02_world.sql sql/updates/world/2015_07_14_03_world.sql sql/updates/world/2015_07_14_04_world.sql sql/updates/world/2015_07_14_05_world.sql sql/updates/world/2015_07_15_00_world.sql sql/updates/world/2015_07_15_01_world.sql sql/updates/world/2015_07_15_02_world.sql sql/updates/world/2015_07_16_00_world.sql sql/updates/world/2015_07_17_00_world.sql sql/updates/world/2015_07_17_01_world.sql sql/updates/world/2015_07_17_02_world.sql sql/updates/world/2015_07_17_03_world.sql sql/updates/world/2015_07_17_04_world.sql sql/updates/world/2015_07_18_00_world.sql sql/updates/world/2015_07_18_01_world.sql sql/updates/world/2015_07_19_01_world.sql sql/updates/world/2015_07_19_02_world.sql sql/updates/world/2015_07_19_03_world.sql sql/updates/world/2015_07_19_04_world.sql sql/updates/world/2015_07_19_05_world.sql sql/updates/world/2015_07_21_00_world.sql sql/updates/world/2015_07_24_00_world.sql sql/updates/world/2015_07_24_01_world.sql sql/updates/world/2015_07_24_02_world.sql sql/updates/world/2015_07_24_03_world.sql sql/updates/world/2015_07_24_04_world.sql sql/updates/world/2015_07_24_06_world.sql sql/updates/world/2015_07_24_07_world.sql sql/updates/world/2015_07_25_00_world.sql sql/updates/world/2015_07_25_01_world.sql sql/updates/world/2015_07_25_02_world.sql sql/updates/world/2015_07_25_03_world.sql sql/updates/world/2015_07_25_04_world.sql sql/updates/world/2015_07_26_00_world.sql sql/updates/world/2015_07_26_04_world.sql sql/updates/world/2015_07_26_05_world.sql sql/updates/world/2015_07_26_06_world.sql sql/updates/world/2015_07_27_00_world.sql sql/updates/world/2015_07_27_01_world.sql sql/updates/world/2015_07_28_02_world.sql sql/updates/world/2015_07_28_03_world.sql sql/updates/world/2015_08_13_00_world.sql sql/updates/world/2015_08_13_01_world.sql sql/updates/world/2015_08_13_02_world.sql sql/updates/world/2015_08_13_03_world.sql sql/updates/world/2015_08_13_04_world.sql sql/updates/world/2015_08_21_00_world.sql sql/updates/world/2015_08_21_01_world.sql sql/updates/world/2015_08_21_02_world.sql sql/updates/world/2015_08_23_00_world.sql sql/updates/world/2015_08_25_00_world.sql sql/updates/world/2015_08_25_01_world.sql sql/updates/world/2015_08_26_00_world.sql sql/updates/world/2015_08_26_01_world.sql sql/updates/world/2015_08_27_00_world.sql sql/updates/world/2015_08_29_02_world.sql sql/updates/world/2015_08_29_03_world.sql sql/updates/world/2015_08_29_04_world.sql sql/updates/world/2015_09_01_00_world_335.sql sql/updates/world/2015_09_05_00_world.sql sql/updates/world/2015_09_05_01_world.sql sql/updates/world/2015_09_06_00_world.sql sql/updates/world/2015_09_08_01_world.sql sql/updates/world/2015_09_08_02_world.sql sql/updates/world/2015_09_11_00_world_from_335.sql sql/updates/world/2015_09_11_01_world_from_335.sql sql/updates/world/2015_09_11_02_world_from_335.sql sql/updates/world/2015_09_11_03_world_from_335.sql sql/updates/world/2015_09_11_04_world_from_335.sql sql/updates/world/2015_09_11_05_world_from_335.sql sql/updates/world/2015_09_11_06_world_from_335.sql sql/updates/world/2015_09_11_07_world_from_335.sql sql/updates/world/2015_09_11_08_world_from_335.sql sql/updates/world/2015_09_11_09_world_from_335.sql sql/updates/world/2015_09_11_10_world_from_335.sql sql/updates/world/2015_09_11_11_world_from_335.sql sql/updates/world/2015_09_11_12_world_from_335.sql sql/updates/world/2015_09_11_13_world_from_335.sql sql/updates/world/2015_09_11_16_world_from_335.sql sql/updates/world/2015_09_11_17_world_from_335.sql sql/updates/world/2015_09_11_18_world_from_335.sql sql/updates/world/2015_09_11_21_world_from_335.sql sql/updates/world/2015_09_11_40_world_from_335.sql sql/updates/world/2015_09_11_41_world_from_335.sql sql/updates/world/2015_09_11_43_world_from_335.sql sql/updates/world/2015_09_11_51_world_from_335.sql sql/updates/world/2015_09_11_52_world_from_335.sql sql/updates/world/2015_12_14_00_world.sql sql/updates/world/2016_01_01_00_world.sql sql/updates/world/2016_01_01_01_world.sql src/common/Common.h src/common/Cryptography/Authentication/AuthCrypt.cpp src/common/Cryptography/Authentication/AuthCrypt.h src/common/Cryptography/HMACSHA1.cpp src/common/Cryptography/HMACSHA1.h src/server/database/Database/Implementation/CharacterDatabase.cpp src/server/database/Database/Implementation/CharacterDatabase.h src/server/database/Database/Implementation/LoginDatabase.cpp src/server/game/AI/SmartScripts/SmartScript.cpp src/server/game/AI/SmartScripts/SmartScript.h src/server/game/Achievements/AchievementMgr.cpp src/server/game/Battlefield/Battlefield.cpp src/server/game/Battlegrounds/ArenaTeam.cpp src/server/game/Battlegrounds/ArenaTeamMgr.cpp src/server/game/Battlegrounds/Battleground.cpp src/server/game/Battlegrounds/BattlegroundQueue.cpp src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp src/server/game/Chat/Chat.cpp src/server/game/Chat/Chat.h src/server/game/Conditions/ConditionMgr.cpp src/server/game/Conditions/ConditionMgr.h src/server/game/DataStores/DBCStores.cpp src/server/game/DataStores/DBCStructure.h src/server/game/DataStores/DBCfmt.h src/server/game/Entities/Corpse/Corpse.cpp src/server/game/Entities/Creature/Creature.cpp src/server/game/Entities/Creature/Creature.h src/server/game/Entities/Creature/GossipDef.cpp src/server/game/Entities/DynamicObject/DynamicObject.cpp src/server/game/Entities/DynamicObject/DynamicObject.h src/server/game/Entities/GameObject/GameObject.cpp src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Object/ObjectGuid.cpp src/server/game/Entities/Object/ObjectGuid.h src/server/game/Entities/Pet/Pet.cpp src/server/game/Entities/Pet/Pet.h src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Player/Player.h src/server/game/Entities/Transport/Transport.cpp src/server/game/Entities/Transport/Transport.h src/server/game/Entities/Unit/Unit.cpp src/server/game/Events/GameEventMgr.cpp src/server/game/Globals/ObjectAccessor.cpp src/server/game/Globals/ObjectAccessor.h src/server/game/Globals/ObjectMgr.cpp src/server/game/Globals/ObjectMgr.h src/server/game/Grids/GridDefines.h src/server/game/Grids/ObjectGridLoader.cpp src/server/game/Groups/Group.cpp src/server/game/Guilds/Guild.cpp src/server/game/Guilds/Guild.h src/server/game/Guilds/GuildMgr.cpp src/server/game/Guilds/GuildMgr.h src/server/game/Handlers/AuctionHouseHandler.cpp src/server/game/Handlers/BattleGroundHandler.cpp src/server/game/Handlers/CharacterHandler.cpp src/server/game/Handlers/ChatHandler.cpp src/server/game/Handlers/GroupHandler.cpp src/server/game/Handlers/ItemHandler.cpp src/server/game/Handlers/MailHandler.cpp src/server/game/Handlers/MiscHandler.cpp src/server/game/Handlers/QueryHandler.cpp src/server/game/Handlers/QuestHandler.cpp src/server/game/Handlers/ReferAFriendHandler.cpp src/server/game/Handlers/TaxiHandler.cpp src/server/game/Handlers/TradeHandler.cpp src/server/game/Instances/InstanceScript.cpp src/server/game/Maps/Map.cpp src/server/game/Maps/Map.h src/server/game/Maps/MapInstanced.cpp src/server/game/Maps/MapManager.h src/server/game/Maps/TransportMgr.cpp src/server/game/Maps/TransportMgr.h src/server/game/Miscellaneous/Language.h src/server/game/Movement/Waypoints/Path.h src/server/game/OutdoorPvP/OutdoorPvP.cpp src/server/game/OutdoorPvP/OutdoorPvP.h src/server/game/Pools/PoolMgr.cpp src/server/game/Quests/QuestDef.cpp src/server/game/Quests/QuestDef.h src/server/game/Scripting/MapScripts.cpp src/server/game/Scripting/ScriptMgr.cpp src/server/game/Server/WorldSession.cpp src/server/game/Server/WorldSession.h src/server/game/Server/WorldSocket.cpp src/server/game/Server/WorldSocket.h src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/Auras/SpellAuras.cpp src/server/game/Spells/Spell.cpp src/server/game/Spells/SpellEffects.cpp src/server/game/Spells/SpellHistory.cpp src/server/game/Spells/SpellHistory.h src/server/game/Spells/SpellInfo.cpp src/server/game/Spells/SpellInfo.h src/server/game/Spells/SpellMgr.cpp src/server/game/Tickets/TicketMgr.cpp src/server/game/Tools/PlayerDump.cpp src/server/game/Tools/PlayerDump.h src/server/game/World/World.cpp src/server/scripts/Commands/cs_debug.cpp src/server/scripts/Commands/cs_gobject.cpp src/server/scripts/Commands/cs_misc.cpp src/server/scripts/Commands/cs_mmaps.cpp src/server/scripts/Commands/cs_modify.cpp src/server/scripts/Commands/cs_npc.cpp src/server/scripts/Commands/cs_reload.cpp src/server/scripts/Commands/cs_ticket.cpp src/server/scripts/Commands/cs_wp.cpp src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp src/server/scripts/EasternKingdoms/ZulAman/zulaman.h src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_gahzranka.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp src/server/scripts/Kalimdor/boss_azuregos.cpp src/server/scripts/Kalimdor/zone_azshara.cpp src/server/scripts/Kalimdor/zone_darkshore.cpp src/server/scripts/Kalimdor/zone_felwood.cpp src/server/scripts/Kalimdor/zone_moonglade.cpp src/server/scripts/Kalimdor/zone_orgrimmar.cpp src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp src/server/scripts/OutdoorPvP/OutdoorPvPEP.h src/server/scripts/OutdoorPvP/OutdoorPvPNA.cpp src/server/scripts/OutdoorPvP/OutdoorPvPZM.cpp src/server/scripts/Spells/spell_dk.cpp src/server/scripts/Spells/spell_druid.cpp src/server/scripts/World/duel_reset.cpp src/server/scripts/World/npc_taxi.cpp src/server/shared/Containers.h src/server/shared/Dynamic/TypeContainer.h src/server/shared/Dynamic/TypeContainerFunctions.h src/server/shared/Dynamic/TypeList.h src/server/shared/Packets/WorldPacket.h src/tools/map_extractor/CMakeLists.txt src/tools/map_extractor/System.cpp src/tools/map_extractor/loadlib.cpp src/tools/map_extractor/loadlib/loadlib.h src/tools/map_extractor/mpq_libmpq.cpp src/tools/map_extractor/mpq_libmpq04.h src/tools/vmap4_extractor/adtfile.cpp src/tools/vmap4_extractor/loadlib/loadlib.h src/tools/vmap4_extractor/mpq_libmpq.cpp src/tools/vmap4_extractor/mpq_libmpq04.h src/tools/vmap4_extractor/vmapexport.cpp src/tools/vmap4_extractor/wdtfile.cpp src/tools/vmap4_extractor/wdtfile.h src/tools/vmap4_extractor/wmo.cpp
This commit is contained in:
commit
e34e3f379f
466 files changed
+8606
-5868
No files matched your search
@@ -21,6 +21,7 @@
|
||||
#include "DatabaseEnv.h"
|
||||
#include "UpdateFields.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "World.h"
|
||||
|
||||
@@ -65,11 +66,15 @@ static DumpTable dumpTables[DUMP_TABLE_COUNT] =
|
||||
};
|
||||
|
||||
// Low level functions
|
||||
static bool findtoknth(std::string &str, int n, std::string::size_type &s, std::string::size_type &e)
|
||||
static bool FindTokNth(std::string const& str, uint32 n, std::string::size_type& s, std::string::size_type& e)
|
||||
{
|
||||
int i; s = e = 0;
|
||||
std::string::size_type size = str.size();
|
||||
for (i = 1; s < size && i < n; s++) if (str[s] == ' ') ++i;
|
||||
s = e = 0;
|
||||
|
||||
uint32 i = 1;
|
||||
for (; s < str.size() && i < n; ++s)
|
||||
if (str[s] == ' ')
|
||||
++i;
|
||||
|
||||
if (i < n)
|
||||
return false;
|
||||
|
||||
@@ -78,80 +83,86 @@ static bool findtoknth(std::string &str, int n, std::string::size_type &s, std::
|
||||
return e != std::string::npos;
|
||||
}
|
||||
|
||||
std::string gettoknth(std::string &str, int n)
|
||||
std::string GetTokNth(std::string const& str, uint32 n)
|
||||
{
|
||||
std::string::size_type s = 0, e = 0;
|
||||
if (!findtoknth(str, n, s, e))
|
||||
if (!FindTokNth(str, n, s, e))
|
||||
return "";
|
||||
|
||||
return str.substr(s, e-s);
|
||||
return str.substr(s, e - s);
|
||||
}
|
||||
|
||||
bool findnth(std::string &str, int n, std::string::size_type &s, std::string::size_type &e)
|
||||
bool FindNth(std::string const& str, uint32 n, std::string::size_type& s, std::string::size_type& e)
|
||||
{
|
||||
s = str.find("VALUES ('")+9;
|
||||
if (s == std::string::npos) return false;
|
||||
s = str.find("VALUES ('") + 9;
|
||||
if (s == std::string::npos)
|
||||
return false;
|
||||
|
||||
do
|
||||
{
|
||||
e = str.find('\'', s);
|
||||
if (e == std::string::npos) return false;
|
||||
} while (str[e-1] == '\\');
|
||||
if (e == std::string::npos)
|
||||
return false;
|
||||
} while (str[e - 1] == '\\');
|
||||
|
||||
for (int i = 1; i < n; ++i)
|
||||
for (uint32 i = 1; i < n; ++i)
|
||||
{
|
||||
do
|
||||
{
|
||||
s = e+4;
|
||||
s = e + 4;
|
||||
e = str.find('\'', s);
|
||||
if (e == std::string::npos) return false;
|
||||
} while (str[e-1] == '\\');
|
||||
if (e == std::string::npos)
|
||||
return false;
|
||||
} while (str[e - 1] == '\\');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string gettablename(std::string &str)
|
||||
std::string GetTableName(std::string const& str)
|
||||
{
|
||||
std::string::size_type s = 13;
|
||||
static std::string::size_type const s = 13;
|
||||
std::string::size_type e = str.find(_TABLE_SIM_, s);
|
||||
if (e == std::string::npos)
|
||||
return "";
|
||||
|
||||
return str.substr(s, e-s);
|
||||
return str.substr(s, e - s);
|
||||
}
|
||||
|
||||
bool changenth(std::string &str, int n, char const* with, bool insert = false, bool nonzero = false)
|
||||
bool ChangeNth(std::string& str, uint32 n, char const* with, bool insert = false, bool allowZero = false)
|
||||
{
|
||||
std::string::size_type s, e;
|
||||
if (!findnth(str, n, s, e))
|
||||
if (!FindNth(str, n, s, e))
|
||||
return false;
|
||||
|
||||
if (nonzero && str.substr(s, e-s) == "0")
|
||||
if (allowZero && str.substr(s, e - s) == "0")
|
||||
return true; // not an error
|
||||
|
||||
if (!insert)
|
||||
str.replace(s, e-s, with);
|
||||
str.replace(s, e - s, with);
|
||||
else
|
||||
str.insert(s, with);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string getnth(std::string &str, int n)
|
||||
std::string GetNth(std::string& str, uint32 n)
|
||||
{
|
||||
std::string::size_type s, e;
|
||||
if (!findnth(str, n, s, e))
|
||||
if (!FindNth(str, n, s, e))
|
||||
return "";
|
||||
|
||||
return str.substr(s, e-s);
|
||||
}
|
||||
|
||||
bool changetoknth(std::string &str, int n, char const* with, bool insert = false, bool nonzero = false)
|
||||
bool ChangeTokNth(std::string& str, uint32 n, char const* with, bool insert = false, bool allowZero = false)
|
||||
{
|
||||
std::string::size_type s = 0, e = 0;
|
||||
if (!findtoknth(str, n, s, e))
|
||||
if (!FindTokNth(str, n, s, e))
|
||||
return false;
|
||||
if (nonzero && str.substr(s, e-s) == "0")
|
||||
|
||||
if (allowZero && str.substr(s, e - s) == "0")
|
||||
return true; // not an error
|
||||
|
||||
if (!insert)
|
||||
str.replace(s, e-s, with);
|
||||
else
|
||||
@@ -160,41 +171,28 @@ bool changetoknth(std::string &str, int n, char const* with, bool insert = false
|
||||
return true;
|
||||
}
|
||||
|
||||
ObjectGuid::LowType registerNewGuid(ObjectGuid::LowType oldGuid, std::map<ObjectGuid::LowType, ObjectGuid::LowType> &guidMap, ObjectGuid::LowType hiGuid)
|
||||
ObjectGuid::LowType RegisterNewGuid(ObjectGuid::LowType oldGuid, PlayerDump::DumpGuidMap& guidMap, ObjectGuid::LowType guidOffset)
|
||||
{
|
||||
std::map<ObjectGuid::LowType, ObjectGuid::LowType>::const_iterator itr = guidMap.find(oldGuid);
|
||||
PlayerDumpWriter::DumpGuidMap::const_iterator itr = guidMap.find(oldGuid);
|
||||
if (itr != guidMap.end())
|
||||
return itr->second;
|
||||
|
||||
ObjectGuid::LowType newguid = hiGuid + guidMap.size();
|
||||
ObjectGuid::LowType newguid = guidOffset + guidMap.size();
|
||||
guidMap[oldGuid] = newguid;
|
||||
return newguid;
|
||||
}
|
||||
|
||||
bool changeGuid(std::string &str, int n, std::map<ObjectGuid::LowType, ObjectGuid::LowType> &guidMap, ObjectGuid::LowType hiGuid, bool nonzero = false)
|
||||
bool ChangeGuid(std::string& str, uint32 n, PlayerDump::DumpGuidMap& guidMap, ObjectGuid::LowType guidOffset, bool allowZero = false)
|
||||
{
|
||||
char chritem[20];
|
||||
ObjectGuid::LowType oldGuid = atoi(getnth(str, n).c_str());
|
||||
if (nonzero && oldGuid == 0)
|
||||
ObjectGuid::LowType oldGuid = strtoull(GetNth(str, n).c_str(), nullptr, 10);
|
||||
if (allowZero && !oldGuid)
|
||||
return true; // not an error
|
||||
|
||||
ObjectGuid::LowType newGuid = registerNewGuid(oldGuid, guidMap, hiGuid);
|
||||
snprintf(chritem, 20, "%u", newGuid);
|
||||
|
||||
return changenth(str, n, chritem, false, nonzero);
|
||||
}
|
||||
|
||||
bool changetokGuid(std::string &str, int n, std::map<ObjectGuid::LowType, ObjectGuid::LowType> &guidMap, ObjectGuid::LowType hiGuid, bool nonzero = false)
|
||||
{
|
||||
char chritem[20];
|
||||
ObjectGuid::LowType oldGuid = atoi(gettoknth(str, n).c_str());
|
||||
if (nonzero && oldGuid == 0)
|
||||
return true; // not an error
|
||||
|
||||
ObjectGuid::LowType newGuid = registerNewGuid(oldGuid, guidMap, hiGuid);
|
||||
ObjectGuid::LowType newGuid = RegisterNewGuid(oldGuid, guidMap, guidOffset);
|
||||
snprintf(chritem, 20, "%u", newGuid);
|
||||
|
||||
return changetoknth(str, n, chritem, false, nonzero);
|
||||
return ChangeNth(str, n, chritem, false, allowZero);
|
||||
}
|
||||
|
||||
std::string CreateDumpString(char const* tableName, QueryResult result)
|
||||
@@ -225,29 +223,26 @@ std::string PlayerDumpWriter::GenerateWhereStr(char const* field, ObjectGuid::Lo
|
||||
return wherestr.str();
|
||||
}
|
||||
|
||||
std::string PlayerDumpWriter::GenerateWhereStr(char const* field, GUIDs const& guids, GUIDs::const_iterator& itr)
|
||||
std::string PlayerDumpWriter::GenerateWhereStr(char const* field, DumpGuidSet const& guids, DumpGuidSet::const_iterator& itr)
|
||||
{
|
||||
std::ostringstream wherestr;
|
||||
wherestr << field << " IN ('";
|
||||
for (; itr != guids.end(); ++itr)
|
||||
for (; itr != guids.end();)
|
||||
{
|
||||
wherestr << *itr;
|
||||
++itr;
|
||||
|
||||
if (wherestr.str().size() > MAX_QUERY_LEN - 50) // near to max query
|
||||
{
|
||||
++itr;
|
||||
break;
|
||||
}
|
||||
|
||||
GUIDs::const_iterator itr2 = itr;
|
||||
if (++itr2 != guids.end())
|
||||
if (itr != guids.end())
|
||||
wherestr << "', '";
|
||||
}
|
||||
wherestr << "')";
|
||||
return wherestr.str();
|
||||
}
|
||||
|
||||
void StoreGUID(QueryResult result, uint32 field, std::set<ObjectGuid::LowType>& guids)
|
||||
void StoreGUID(QueryResult result, uint32 field, PlayerDump::DumpGuidSet &guids)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
ObjectGuid::LowType guid = fields[field].GetUInt32();
|
||||
@@ -255,20 +250,20 @@ void StoreGUID(QueryResult result, uint32 field, std::set<ObjectGuid::LowType>&
|
||||
guids.insert(guid);
|
||||
}
|
||||
|
||||
void StoreGUID(QueryResult result, uint32 data, uint32 field, std::set<ObjectGuid::LowType>& guids)
|
||||
void StoreGUID(QueryResult result, uint32 data, uint32 field, PlayerDump::DumpGuidSet& guids)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
std::string dataStr = fields[data].GetString();
|
||||
ObjectGuid::LowType guid = atoi(gettoknth(dataStr, field).c_str());
|
||||
ObjectGuid::LowType guid = strtoull(GetTokNth(dataStr, field).c_str(), nullptr, 10);
|
||||
if (guid)
|
||||
guids.insert(guid);
|
||||
}
|
||||
|
||||
// Writing - High-level functions
|
||||
bool PlayerDumpWriter::DumpTable(std::string& dump, ObjectGuid::LowType guid, char const*tableFrom, char const*tableTo, DumpTableType type)
|
||||
bool PlayerDumpWriter::DumpTable(std::string& dump, ObjectGuid::LowType guid, char const* tableFrom, char const* tableTo, DumpTableType type)
|
||||
{
|
||||
GUIDs const* guids = NULL;
|
||||
char const* fieldname = NULL;
|
||||
DumpGuidSet const* guids = nullptr;
|
||||
char const* fieldname = nullptr;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@@ -283,20 +278,20 @@ bool PlayerDumpWriter::DumpTable(std::string& dump, ObjectGuid::LowType guid, ch
|
||||
|
||||
// for guid set stop if set is empty
|
||||
if (guids && guids->empty())
|
||||
return true; // nothing to do
|
||||
return true; // nothing to do
|
||||
|
||||
// setup for guids case start position
|
||||
GUIDs::const_iterator guids_itr;
|
||||
DumpGuidSet::const_iterator guidsItr;
|
||||
if (guids)
|
||||
guids_itr = guids->begin();
|
||||
guidsItr = guids->begin();
|
||||
|
||||
do
|
||||
{
|
||||
std::string wherestr;
|
||||
|
||||
if (guids) // set case, get next guids string
|
||||
wherestr = GenerateWhereStr(fieldname, *guids, guids_itr);
|
||||
else // not set case, get single guid string
|
||||
if (guids) // set case, get next guids string
|
||||
wherestr = GenerateWhereStr(fieldname, *guids, guidsItr);
|
||||
else // not set case, get single guid string
|
||||
wherestr = GenerateWhereStr(fieldname, guid);
|
||||
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT * FROM %s WHERE %s", tableFrom, wherestr.c_str());
|
||||
@@ -341,7 +336,7 @@ bool PlayerDumpWriter::DumpTable(std::string& dump, ObjectGuid::LowType guid, ch
|
||||
}
|
||||
while (result->NextRow());
|
||||
}
|
||||
while (guids && guids_itr != guids->end()); // not set case iterate single time, set case iterate for all guids
|
||||
while (guids && guidsItr != guids->end()); // not set case iterate single time, set case iterate for all guids
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -350,7 +345,7 @@ bool PlayerDumpWriter::GetDump(ObjectGuid::LowType guid, std::string &dump)
|
||||
dump = "IMPORTANT NOTE: THIS DUMPFILE IS MADE FOR USE WITH THE 'PDUMP' COMMAND ONLY - EITHER THROUGH INGAME CHAT OR ON CONSOLE!\n";
|
||||
dump += "IMPORTANT NOTE: DO NOT apply it directly - it will irreversibly DAMAGE and CORRUPT your database! You have been warned!\n\n";
|
||||
|
||||
for (int i = 0; i < DUMP_TABLE_COUNT; ++i)
|
||||
for (uint8 i = 0; i < DUMP_TABLE_COUNT; ++i)
|
||||
if (!DumpTable(dump, guid, dumpTables[i].name, dumpTables[i].name, dumpTables[i].type))
|
||||
return false;
|
||||
|
||||
@@ -365,12 +360,14 @@ DumpReturn PlayerDumpWriter::WriteDump(const std::string& file, ObjectGuid::LowT
|
||||
if (sWorld->getBoolConfig(CONFIG_PDUMP_NO_PATHS))
|
||||
if (strstr(file.c_str(), "\\") || strstr(file.c_str(), "/"))
|
||||
return DUMP_FILE_OPEN_ERROR;
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_PDUMP_NO_OVERWRITE))
|
||||
if (FILE* f = fopen(file.c_str(), "r"))
|
||||
{
|
||||
fclose(f);
|
||||
return DUMP_FILE_OPEN_ERROR;
|
||||
}
|
||||
|
||||
FILE* fout = fopen(file.c_str(), "w");
|
||||
if (!fout)
|
||||
return DUMP_FILE_OPEN_ERROR;
|
||||
@@ -388,9 +385,9 @@ DumpReturn PlayerDumpWriter::WriteDump(const std::string& file, ObjectGuid::LowT
|
||||
// Reading - High-level functions
|
||||
#define ROLLBACK(DR) {fclose(fin); return (DR);}
|
||||
|
||||
void fixNULLfields(std::string &line)
|
||||
void fixNULLfields(std::string& line)
|
||||
{
|
||||
std::string nullString("'NULL'");
|
||||
static std::string const nullString("'NULL'");
|
||||
size_t pos = line.find(nullString);
|
||||
while (pos != std::string::npos)
|
||||
{
|
||||
@@ -409,7 +406,7 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
|
||||
if (!fin)
|
||||
return DUMP_FILE_OPEN_ERROR;
|
||||
|
||||
char newguid[20], chraccount[20], newpetid[20], currpetid[20], lastpetid[20];
|
||||
char newguid[20], chraccount[20];
|
||||
|
||||
// make sure the same guid doesn't already exist and is safe to use
|
||||
bool incHighest = true;
|
||||
@@ -420,11 +417,13 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (result)
|
||||
guid = sObjectMgr->sObjectMgr->GetGenerator<HighGuid::Player>().GetNextAfterMaxUsed(); // use first free if exists
|
||||
else incHighest = false;
|
||||
guid = sObjectMgr->GetGenerator<HighGuid::Player>().GetNextAfterMaxUsed(); // use first free if exists
|
||||
else
|
||||
incHighest = false;
|
||||
}
|
||||
else
|
||||
guid = sObjectMgr->sObjectMgr->GetGenerator<HighGuid::Player>().GetNextAfterMaxUsed();
|
||||
guid = sObjectMgr->GetGenerator<HighGuid::Player>().GetNextAfterMaxUsed();
|
||||
|
||||
|
||||
// normalize the name if specified and check if it exists
|
||||
if (!normalizePlayerName(name))
|
||||
@@ -446,22 +445,22 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
|
||||
|
||||
snprintf(newguid, 20, "%u", guid);
|
||||
snprintf(chraccount, 20, "%u", account);
|
||||
snprintf(newpetid, 20, "%u", sObjectMgr->GeneratePetNumber());
|
||||
snprintf(lastpetid, 20, "%s", "");
|
||||
|
||||
std::map<uint32, uint32> items;
|
||||
std::map<uint32, uint32> mails;
|
||||
char buf[32000] = "";
|
||||
DumpGuidMap items;
|
||||
DumpGuidMap mails;
|
||||
char buf[32000];
|
||||
memset(buf, 0, sizeof(buf));
|
||||
|
||||
typedef std::map<uint32, uint32> PetIds; // old->new petid relation
|
||||
typedef PetIds::value_type PetIdsPair;
|
||||
PetIds petids;
|
||||
typedef std::map<uint32 /*old*/, uint32 /*new*/> PetIds;
|
||||
PetIds petIds;
|
||||
|
||||
uint8 gender = GENDER_NONE;
|
||||
uint8 race = RACE_NONE;
|
||||
uint8 playerClass = 0;
|
||||
uint8 level = 1;
|
||||
|
||||
ObjectGuid::LowType itemLowGuidOffset = sObjectMgr->GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed();
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
while (!feof(fin))
|
||||
{
|
||||
@@ -497,7 +496,7 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
|
||||
*/
|
||||
|
||||
// determine table name and load type
|
||||
std::string tn = gettablename(line);
|
||||
std::string tn = GetTableName(line);
|
||||
if (tn.empty())
|
||||
{
|
||||
TC_LOG_ERROR("misc", "LoadPlayerDump: Can't extract table name from line: '%s'!", line.c_str());
|
||||
@@ -526,142 +525,139 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
|
||||
{
|
||||
case DTT_CHARACTER:
|
||||
{
|
||||
if (!changenth(line, 1, newguid)) // characters.guid update
|
||||
if (!ChangeNth(line, 1, newguid)) // characters.guid update
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
|
||||
if (!changenth(line, 2, chraccount)) // characters.account update
|
||||
if (!ChangeNth(line, 2, chraccount)) // characters.account update
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
|
||||
race = uint8(atoul(getnth(line, 4).c_str()));
|
||||
playerClass = uint8(atoul(getnth(line, 5).c_str()));
|
||||
gender = uint8(atoul(getnth(line, 6).c_str()));
|
||||
level = uint8(atoul(getnth(line, 7).c_str()));
|
||||
race = uint8(atoul(GetNth(line, 4).c_str()));
|
||||
playerClass = uint8(atoul(GetNth(line, 5).c_str()));
|
||||
gender = uint8(atoul(GetNth(line, 6).c_str()));
|
||||
level = uint8(atoul(GetNth(line, 7).c_str()));
|
||||
if (name.empty())
|
||||
{
|
||||
// check if the original name already exists
|
||||
name = getnth(line, 3);
|
||||
name = GetNth(line, 3);
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHECK_NAME);
|
||||
stmt->setString(0, name);
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (result)
|
||||
if (!changenth(line, 38, "1")) // characters.at_login set to "rename on login"
|
||||
if (!ChangeNth(line, 38, "1")) // characters.at_login set to "rename on login"
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
}
|
||||
else if (!changenth(line, 3, name.c_str())) // characters.name
|
||||
else if (!ChangeNth(line, 3, name.c_str())) // characters.name
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
|
||||
const char null[5] = "NULL";
|
||||
if (!changenth(line, 63, null)) // characters.deleteInfos_Account
|
||||
if (!ChangeNth(line, 63, null)) // characters.deleteInfos_Account
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
if (!changenth(line, 64, null)) // characters.deleteInfos_Name
|
||||
if (!ChangeNth(line, 64, null)) // characters.deleteInfos_Name
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
if (!changenth(line, 65, null)) // characters.deleteDate
|
||||
if (!ChangeNth(line, 65, null)) // characters.deleteDate
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
break;
|
||||
}
|
||||
case DTT_CHAR_TABLE:
|
||||
{
|
||||
if (!changenth(line, 1, newguid)) // character_*.guid update
|
||||
if (!ChangeNth(line, 1, newguid)) // character_*.guid update
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
break;
|
||||
}
|
||||
case DTT_EQSET_TABLE:
|
||||
{
|
||||
if (!changenth(line, 1, newguid))
|
||||
if (!ChangeNth(line, 1, newguid))
|
||||
ROLLBACK(DUMP_FILE_BROKEN); // character_equipmentsets.guid
|
||||
|
||||
char newSetGuid[24];
|
||||
snprintf(newSetGuid, 24, UI64FMTD, sObjectMgr->GenerateEquipmentSetGuid());
|
||||
if (!changenth(line, 2, newSetGuid))
|
||||
if (!ChangeNth(line, 2, newSetGuid))
|
||||
ROLLBACK(DUMP_FILE_BROKEN); // character_equipmentsets.setguid
|
||||
|
||||
for (uint8 slot = 0; slot < EQUIPMENT_SLOT_END; ++slot)
|
||||
if (!ChangeGuid(line, 7 + slot, items, itemLowGuidOffset, true))
|
||||
ROLLBACK(DUMP_FILE_BROKEN); // character_equipmentsets.item
|
||||
break;
|
||||
}
|
||||
case DTT_INVENTORY:
|
||||
{
|
||||
if (!changenth(line, 1, newguid)) // character_inventory.guid update
|
||||
if (!ChangeNth(line, 1, newguid)) // character_inventory.guid update
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
|
||||
if (!changeGuid(line, 2, items, sObjectMgr->GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed(), true))
|
||||
if (!ChangeGuid(line, 2, items, itemLowGuidOffset, true))
|
||||
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.bag update
|
||||
if (!changeGuid(line, 4, items, sObjectMgr->GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed()))
|
||||
if (!ChangeGuid(line, 4, items, itemLowGuidOffset))
|
||||
ROLLBACK(DUMP_FILE_BROKEN); // character_inventory.item update
|
||||
break;
|
||||
}
|
||||
case DTT_MAIL: // mail
|
||||
{
|
||||
if (!changeGuid(line, 1, mails, sObjectMgr->_mailId))
|
||||
if (!ChangeGuid(line, 1, mails, sObjectMgr->_mailId))
|
||||
ROLLBACK(DUMP_FILE_BROKEN); // mail.id update
|
||||
if (!changenth(line, 6, newguid)) // mail.receiver update
|
||||
if (!ChangeNth(line, 6, newguid)) // mail.receiver update
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
break;
|
||||
}
|
||||
case DTT_MAIL_ITEM: // mail_items
|
||||
{
|
||||
if (!changeGuid(line, 1, mails, sObjectMgr->_mailId))
|
||||
if (!ChangeGuid(line, 1, mails, sObjectMgr->_mailId))
|
||||
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.id
|
||||
if (!changeGuid(line, 2, items, sObjectMgr->GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed()))
|
||||
if (!ChangeGuid(line, 2, items, itemLowGuidOffset))
|
||||
ROLLBACK(DUMP_FILE_BROKEN); // mail_items.item_guid
|
||||
if (!changenth(line, 3, newguid)) // mail_items.receiver
|
||||
if (!ChangeNth(line, 3, newguid)) // mail_items.receiver
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
break;
|
||||
}
|
||||
case DTT_ITEM:
|
||||
{
|
||||
// item, owner, data field:item, owner guid
|
||||
if (!changeGuid(line, 1, items, sObjectMgr->GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed()))
|
||||
if (!ChangeGuid(line, 1, items, itemLowGuidOffset))
|
||||
ROLLBACK(DUMP_FILE_BROKEN); // item_instance.guid update
|
||||
if (!changenth(line, 3, newguid)) // item_instance.owner_guid update
|
||||
if (!ChangeNth(line, 3, newguid)) // item_instance.owner_guid update
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
break;
|
||||
}
|
||||
case DTT_ITEM_GIFT:
|
||||
{
|
||||
if (!changenth(line, 1, newguid)) // character_gifts.guid update
|
||||
if (!ChangeNth(line, 1, newguid)) // character_gifts.guid update
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
if (!changeGuid(line, 2, items, sObjectMgr->GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed()))
|
||||
if (!ChangeGuid(line, 2, items, itemLowGuidOffset))
|
||||
ROLLBACK(DUMP_FILE_BROKEN); // character_gifts.item_guid update
|
||||
break;
|
||||
}
|
||||
case DTT_PET:
|
||||
{
|
||||
//store a map of old pet id to new inserted pet id for use by type 5 tables
|
||||
snprintf(currpetid, 20, "%s", getnth(line, 1).c_str());
|
||||
if (*lastpetid == '\0')
|
||||
snprintf(lastpetid, 20, "%s", currpetid);
|
||||
if (strcmp(lastpetid, currpetid) != 0)
|
||||
{
|
||||
snprintf(newpetid, 20, "%u", sObjectMgr->GeneratePetNumber());
|
||||
snprintf(lastpetid, 20, "%s", currpetid);
|
||||
}
|
||||
// store a map of old pet id to new inserted pet id for use by DTT_PET_TABLE tables
|
||||
std::string petIdStr = GetNth(line, 1);
|
||||
|
||||
std::map<uint32, uint32> :: const_iterator petids_iter = petids.find(atoi(currpetid));
|
||||
uint32 currentPetId = atoul(petIdStr.c_str());
|
||||
|
||||
if (petids_iter == petids.end())
|
||||
{
|
||||
petids.insert(PetIdsPair(atoi(currpetid), atoi(newpetid)));
|
||||
}
|
||||
|
||||
if (!changenth(line, 1, newpetid)) // character_pet.id update
|
||||
PetIds::const_iterator petIdsItr = petIds.find(currentPetId);
|
||||
if (petIdsItr != petIds.end()) // duplicate pets
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
if (!changenth(line, 3, newguid)) // character_pet.owner update
|
||||
|
||||
uint32 newPetId = sObjectMgr->GeneratePetNumber();
|
||||
petIds[currentPetId] = newPetId;
|
||||
|
||||
if (!ChangeNth(line, 1, std::to_string(newPetId).c_str())) // character_pet.id update
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
if (!ChangeNth(line, 3, newguid)) // character_pet.owner update
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
|
||||
break;
|
||||
}
|
||||
case DTT_PET_TABLE: // pet_aura, pet_spell, pet_spell_cooldown
|
||||
{
|
||||
snprintf(currpetid, 20, "%s", getnth(line, 1).c_str());
|
||||
std::string petIdStr = GetNth(line, 1);
|
||||
|
||||
// lookup currpetid and match to new inserted pet id
|
||||
std::map<uint32, uint32> :: const_iterator petids_iter = petids.find(atoi(currpetid));
|
||||
if (petids_iter == petids.end()) // couldn't find new inserted id
|
||||
PetIds::const_iterator petIdsItr = petIds.find(atoul(petIdStr.c_str()));
|
||||
if (petIdsItr == petIds.end()) // couldn't find new inserted id
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
|
||||
snprintf(newpetid, 20, "%d", petids_iter->second);
|
||||
|
||||
if (!changenth(line, 1, newpetid))
|
||||
if (!ChangeNth(line, 1, std::to_string(petIdsItr->second).c_str()))
|
||||
ROLLBACK(DUMP_FILE_BROKEN);
|
||||
|
||||
break;
|
||||
@@ -682,11 +678,13 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s
|
||||
sWorld->AddCharacterInfo(ObjectGuid(HighGuid::Player, guid), account, name, gender, race, playerClass, level);
|
||||
|
||||
sObjectMgr->GetGenerator<HighGuid::Item>().Set(sObjectMgr->GetGenerator<HighGuid::Item>().GetNextAfterMaxUsed() + items.size());
|
||||
|
||||
sObjectMgr->_mailId += mails.size();
|
||||
|
||||
if (incHighest)
|
||||
sObjectMgr->GetGenerator<HighGuid::Player>().Generate();
|
||||
|
||||
|
||||
fclose(fin);
|
||||
|
||||
return DUMP_SUCCESS;
|
||||
|
||||
Reference in new issue
Block a user