From 984877d6ead568c840d15f7f06f71a6aa7235981 Mon Sep 17 00:00:00 2001 From: Duarte Duarte Date: Mon, 12 Jan 2015 19:10:40 +0000 Subject: [PATCH 01/32] Update README.md Add labels for how long in average it takes for an issue or PR to be merged. http://www.issuestats.com/github/TrinityCore/TrinityCore (cherry picked from commit d874bf0c740af000475ed5b5c7b44d879196fe3e) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 263339fc9dd..d92b3848c94 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![Coverity Scan Build Status](https://scan.coverity.com/projects/435/badge.svg)](https://scan.coverity.com/projects/435) [![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) `6.x`: [![6.x Build Status](https://travis-ci.org/TrinityCore/TrinityCore.svg?branch=6.x)](https://travis-ci.org/TrinityCore/TrinityCore) `4.3.4`: [![4.3.4 Build Status](https://travis-ci.org/TrinityCore/TrinityCore.svg?branch=4.3.4)](https://travis-ci.org/TrinityCore/TrinityCore) `3.3.5`: [![3.3.5 Build Status](https://travis-ci.org/TrinityCore/TrinityCore.svg?branch=3.3.5)](https://travis-ci.org/TrinityCore/TrinityCore) From a46d2017230f10348a138af49aec784d28fde391 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 31 Jan 2015 19:52:36 +0100 Subject: [PATCH 02/32] Core/Spells: Renamed SPELL_ATTR4_TRIGGERED to SPELL_ATTR4_CAN_CAST_WHILE_CASTING and adjusted trigger flags accordingly (cherry picked from commit 6d70acbbd66959f7b6896a19ce3f2a25ccf94f2e) Conflicts: src/server/game/Spells/Spell.cpp --- src/server/game/Miscellaneous/SharedDefines.h | 2 +- src/server/game/Spells/Spell.cpp | 4 ++-- src/server/game/Spells/SpellMgr.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 0775a9a299a..685bcd338a9 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -427,7 +427,7 @@ enum SpellAttr4 SPELL_ATTR4_UNK4 = 0x00000010, // 4 This will no longer cause guards to attack on use?? SPELL_ATTR4_UNK5 = 0x00000020, // 5 SPELL_ATTR4_NOT_STEALABLE = 0x00000040, // 6 although such auras might be dispellable, they cannot be stolen - SPELL_ATTR4_TRIGGERED = 0x00000080, // 7 spells forced to be triggered + SPELL_ATTR4_CAN_CAST_WHILE_CASTING = 0x00000080, // 7 Can be cast while another cast is in progress - see CanCastWhileCasting(SpellRec const*,CGUnit_C *,int &) SPELL_ATTR4_FIXED_DAMAGE = 0x00000100, // 8 Ignores resilience and any (except mechanic related) damage or % damage taken auras on target. SPELL_ATTR4_TRIGGER_ACTIVATE = 0x00000200, // 9 initially disabled / trigger activate from event (Execute, Riposte, Deep Freeze end other) SPELL_ATTR4_SPELL_VS_EXTEND_COST = 0x00000400, // 10 Rogue Shiv have this flag diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 8e415b06745..8f8295d57d1 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -574,8 +574,8 @@ m_caster((info->AttributesEx6 & SPELL_ATTR6_CAST_BY_CHARMER && caster->GetCharme m_spellState = SPELL_STATE_NULL; _triggeredCastFlags = triggerFlags; - if (info->AttributesEx4 & SPELL_ATTR4_TRIGGERED) - _triggeredCastFlags = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT); + if (info->AttributesEx4 & SPELL_ATTR4_CAN_CAST_WHILE_CASTING) + _triggeredCastFlags = TriggerCastFlags(uint32(_triggeredCastFlags) | TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_CAST_DIRECTLY); m_CastItem = NULL; m_castItemGUID.Clear(); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index db16a7312ea..ad9b4db913d 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3729,7 +3729,7 @@ void SpellMgr::LoadSpellInfoCorrections() case 45440: // Steam Tonk Controller case 60256: // Collect Sample // Crashes client on pressing ESC - spellInfo->AttributesEx4 &= ~SPELL_ATTR4_TRIGGERED; + spellInfo->AttributesEx4 &= ~SPELL_ATTR4_CAN_CAST_WHILE_CASTING; break; // ISLE OF CONQUEST SPELLS // From 7870ca8fdc030d102e91ac15756e3d22332676b0 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 31 Jan 2015 22:57:08 +0100 Subject: [PATCH 03/32] Core/VMaps: Fix debug assert caused by invalid vmaps Fix debug assert thrown by G3D caused by models with empty bounding box being exported by vmap4assembler and imported by worldserver. This change will skip those models, proper investigation on the issue of why the bounding box is empty is still required. (cherry picked from commit a7ca78b2fe12c68e561782416bf5726410a3c01b) --- src/server/collision/Maps/TileAssembler.cpp | 12 ++++++++++++ src/server/collision/Models/GameObjectModel.cpp | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/src/server/collision/Maps/TileAssembler.cpp b/src/server/collision/Maps/TileAssembler.cpp index 06540ecdc61..ee978211577 100644 --- a/src/server/collision/Maps/TileAssembler.cpp +++ b/src/server/collision/Maps/TileAssembler.cpp @@ -391,6 +391,18 @@ namespace VMAP } } + if (bounds.isEmpty()) + { + std::cout << "\nModel " << std::string(buff, name_length) << " has empty bounding box" << std::endl; + continue; + } + + if (!bounds.isFinite()) + { + std::cout << "\nModel " << std::string(buff, name_length) << " has invalid bounding box" << std::endl; + continue; + } + fwrite(&displayId, sizeof(uint32), 1, model_list_copy); fwrite(&name_length, sizeof(uint32), 1, model_list_copy); fwrite(&buff, sizeof(char), name_length, model_list_copy); diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index 993c298941c..05bd5d360c6 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -78,6 +78,12 @@ void LoadGameObjectModelList() break; } + if (v1.isNaN() || v2.isNaN()) + { + VMAP_ERROR_LOG("misc", "File '%s' Model '%s' has invalid v1%s v2%s values!", VMAP::GAMEOBJECT_MODELS, std::string(buff, name_length).c_str(), v1.toString().c_str(), v2.toString().c_str()); + continue; + } + model_list.insert ( ModelList::value_type( displayId, GameobjectModelData(std::string(buff, name_length), AABox(v1, v2)) ) From 4c0476bfd7d104386806e35edfa975634495dd2c Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 31 Jan 2015 22:59:21 +0100 Subject: [PATCH 04/32] Core/Misc: Properly sanitize ReputationSpillover data Fix an issue added in 024b57bb74a664cd515cf0822d4b8e939a91fe03 that didn't properly skip ReputationSpillover rows with invalid data. Fix also a static analysis issue reported by Coverity. (cherry picked from commit 95b1204798d3ab2a141f81b294b064255c335b8a) Conflicts: src/server/game/Globals/ObjectMgr.cpp --- src/server/game/Globals/ObjectMgr.cpp | 34 +++++--------------- src/server/game/Reputation/ReputationMgr.cpp | 2 +- src/server/shared/DataStores/DBCStore.h | 7 ++++ 3 files changed, 16 insertions(+), 27 deletions(-) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index d07ec212d0c..f0d7d039dd5 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -7078,6 +7078,7 @@ void ObjectMgr::LoadReputationSpilloverTemplate() continue; } + bool invalidSpilloverFaction = false; for (uint32 i = 0; i < MAX_SPILLOVER_FACTIONS; ++i) { if (repTemplate.faction[i]) @@ -7087,47 +7088,28 @@ void ObjectMgr::LoadReputationSpilloverTemplate() if (!factionSpillover) { TC_LOG_ERROR("sql.sql", "Spillover faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template` for faction %u, skipping", repTemplate.faction[i], factionId); - continue; + invalidSpilloverFaction = true; + break; } if (factionSpillover->reputationListID < 0) { TC_LOG_ERROR("sql.sql", "Spillover faction (faction.dbc) %u for faction %u in `reputation_spillover_template` can not be listed for client, and then useless, skipping", repTemplate.faction[i], factionId); - continue; + invalidSpilloverFaction = true; + break; } if (repTemplate.faction_rank[i] >= MAX_REPUTATION_RANK) { TC_LOG_ERROR("sql.sql", "Rank %u used in `reputation_spillover_template` for spillover faction %u is not valid, skipping", repTemplate.faction_rank[i], repTemplate.faction[i]); - continue; + invalidSpilloverFaction = true; + break; } } } - FactionEntry const* factionEntry0 = sFactionStore.LookupEntry(repTemplate.faction[0]); - if (repTemplate.faction[0] && !factionEntry0) - { - TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[0]); + if (invalidSpilloverFaction) continue; - } - FactionEntry const* factionEntry1 = sFactionStore.LookupEntry(repTemplate.faction[1]); - if (repTemplate.faction[1] && !factionEntry1) - { - TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[1]); - continue; - } - FactionEntry const* factionEntry2 = sFactionStore.LookupEntry(repTemplate.faction[2]); - if (repTemplate.faction[2] && !factionEntry2) - { - TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[2]); - continue; - } - FactionEntry const* factionEntry3 = sFactionStore.LookupEntry(repTemplate.faction[3]); - if (repTemplate.faction[3] && !factionEntry3) - { - TC_LOG_ERROR("sql.sql", "Faction (faction.dbc) %u does not exist but is used in `reputation_spillover_template`", repTemplate.faction[3]); - continue; - } _repSpilloverTemplateStore[factionId] = repTemplate; diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index ad71381a1de..b99cb677ba0 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -297,7 +297,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi { // bonuses are already given, so just modify standing by rate int32 spilloverRep = int32(standing * repTemplate->faction_rate[i]); - SetOneFactionReputation(sFactionStore.LookupEntry(repTemplate->faction[i]), spilloverRep, incremental); + SetOneFactionReputation(sFactionStore.AssertEntry(repTemplate->faction[i]), spilloverRep, incremental); } } } diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h index 10d4ff1bec9..1cb67a4235e 100644 --- a/src/server/shared/DataStores/DBCStore.h +++ b/src/server/shared/DataStores/DBCStore.h @@ -87,6 +87,13 @@ class DBCStorage return (id >= nCount) ? NULL : indexTable.asT[id]; } + T const* AssertEntry(uint32 id) const + { + T const* entry = LookupEntry(id); + ASSERT(entry); + return entry; + } + uint32 GetNumRows() const { return nCount; } char const* GetFormat() const { return fmt; } uint32 GetFieldCount() const { return fieldCount; } From 644de8700c4138b01927160423463a5e222217c5 Mon Sep 17 00:00:00 2001 From: Rushor Date: Sat, 31 Jan 2015 23:24:35 +0100 Subject: [PATCH 05/32] Scripts/Bloodmyst Isle: Disable CreatureAttack for NPC: Webbed Creature --- src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp index 390fd3e529f..689b17a38ee 100644 --- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp @@ -48,14 +48,18 @@ class npc_webbed_creature : public CreatureScript public: npc_webbed_creature() : CreatureScript("npc_webbed_creature") { } - struct npc_webbed_creatureAI : public ScriptedAI + struct npc_webbed_creatureAI : public NullCreatureAI { - npc_webbed_creatureAI(Creature* creature) : ScriptedAI(creature) { } + npc_webbed_creatureAI(Creature* creature) : NullCreatureAI(creature) { } void Reset() override { } void EnterCombat(Unit* /*who*/) override { } + void AttackStart(Unit* /*who*/) override { } + + void MoveInLineOfSight(Unit* /*who*/) override { } + void JustDied(Unit* killer) override { uint32 spawnCreatureID = 0; From b01e63812629244b4acee9b2d1434f337e77af29 Mon Sep 17 00:00:00 2001 From: Rushor Date: Sun, 1 Feb 2015 23:09:35 +0100 Subject: [PATCH 06/32] Game/Spells: AoD Specials should only target one Unit --- src/server/game/Spells/SpellMgr.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index db16a7312ea..5ffb8cf6d5f 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2959,6 +2959,8 @@ void SpellMgr::LoadSpellInfoCorrections() switch (spellInfo->Id) { case 53096: // Quetz'lun's Judgment + case 70743: // AoD Special + case 70614: // AoD Special - Vegard spellInfo->MaxAffectedTargets = 1; break; case 42436: // Drink! (Brewfest) From 13cbed36ef5f873d97ba8cccd19ef8cffb2ab9e3 Mon Sep 17 00:00:00 2001 From: click Date: Sun, 1 Feb 2015 23:31:34 +0100 Subject: [PATCH 07/32] Core/Scripts: Fix missing include --- src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp index 689b17a38ee..ca5e4697c35 100644 --- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp @@ -29,6 +29,7 @@ EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "PassiveAI.h" #include "Player.h" /*###### From 7b05b0cb81dd933049aa8af49a060edf915ca94c Mon Sep 17 00:00:00 2001 From: jackpoz Date: Fri, 30 Jan 2015 22:32:26 +0100 Subject: [PATCH 08/32] Core/Misc: Fix static analysis issues Fix some static analysis issues reported by Coverity (cherry picked from commit 89c535cf2a960ccc03cd1a032310984f9b4e1d47) Conflicts: src/server/game/Entities/Player/Player.cpp --- src/server/game/Entities/Player/Player.cpp | 2 +- src/server/shared/Debugging/Errors.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index f6954385dfb..63580b355a4 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -19086,7 +19086,7 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report else if (mapDiff->hasErrorMessage) // if (missingAchievement) covered by this case SendTransferAborted(target_map, TRANSFER_ABORT_DIFFICULTY, target_difficulty); else if (missingItem) - GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, sObjectMgr->GetItemTemplate(missingItem)->Name1.c_str()); + GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, ASSERT_NOTNULL(sObjectMgr->GetItemTemplate(missingItem))->Name1.c_str()); else if (LevelMin) GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED), LevelMin); } diff --git a/src/server/shared/Debugging/Errors.h b/src/server/shared/Debugging/Errors.h index df770c2aa47..4d4624b63dd 100644 --- a/src/server/shared/Debugging/Errors.h +++ b/src/server/shared/Debugging/Errors.h @@ -49,4 +49,10 @@ namespace Trinity #define ASSERT WPAssert +template inline T* ASSERT_NOTNULL(T* pointer) +{ + ASSERT(pointer); + return pointer; +} + #endif From 2ec6844666c899704f3bb13768a4872139095ae5 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 1 Feb 2015 15:38:07 +0100 Subject: [PATCH 09/32] Core/Misc: Fix static analysis issues Fix some static analysis issues reported by Coverity (cherry picked from commit c8999449816d4fd4f72c7cdb3b1515e8e244ba5f) Conflicts: src/server/game/Entities/Player/Player.cpp src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp --- src/server/game/Groups/Group.cpp | 2 +- .../Northrend/IcecrownCitadel/boss_professor_putricide.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index d9124551c63..5664cbb6e4b 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1808,7 +1808,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* return ERR_BATTLEGROUND_NONE; // ERR_GROUP_JOIN_BATTLEGROUND_TOO_MANY handled on client side // get a player as reference, to compare other players' stats to (arena team id, queue id based on level, etc.) - Player* reference = GetFirstMember()->GetSource(); + Player* reference = ASSERT_NOTNULL(GetFirstMember())->GetSource(); // no reference found, can't join this way if (!reference) return ERR_BATTLEGROUND_JOIN_FAILED; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index 4c6fd0f2fcc..63082808e03 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -1259,7 +1259,7 @@ class spell_putricide_mutated_plague : public SpellScriptLoader return; uint32 triggerSpell = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell; - SpellInfo const* spell = sSpellMgr->GetSpellInfo(triggerSpell); + SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(triggerSpell); spell = sSpellMgr->GetSpellForDifficultyFromSpell(spell, caster); int32 damage = spell->Effects[EFFECT_0].CalcValue(caster); From 81ea9f5aa0507d233258920ec168fe86574b4429 Mon Sep 17 00:00:00 2001 From: Nayd Date: Mon, 2 Feb 2015 01:57:27 +0000 Subject: [PATCH 10/32] Core/Build: Use std namespace in getline calls (cherry picked from commit 86f7f47b58e4e044cd9a9171d83863dd8f99d91c) --- src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp | 4 ++-- src/server/scripts/Commands/cs_debug.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp index dff4077d569..733bd5e9ec8 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp @@ -44,14 +44,14 @@ bool AuctionBotSeller::Initialize() { std::stringstream includeStream(sAuctionBotConfig->GetAHBotIncludes()); std::string temp; - while (getline(includeStream, temp, ',')) + while (std::getline(includeStream, temp, ',')) includeItems.push_back(atoi(temp.c_str())); } { std::stringstream excludeStream(sAuctionBotConfig->GetAHBotExcludes()); std::string temp; - while (getline(excludeStream, temp, ',')) + while (std::getline(excludeStream, temp, ',')) excludeItems.push_back(atoi(temp.c_str())); } diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 5d6cdb3fb63..ccd82aa3ef9 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -299,7 +299,7 @@ public: else if (commentToken[1] == '/') { std::string str; - getline(ifs, str); + std::getline(ifs, str); continue; } // regular data From 6ef97aa9429bd6730394465536e291747435e884 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Mon, 2 Feb 2015 14:24:55 +0000 Subject: [PATCH 11/32] DB/Misc: Fix some run-time errors Solve issues with sai generating errors in Dalaran through sai triggering on non player characters --- sql/updates/world/2015_02_02_00_Word | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sql/updates/world/2015_02_02_00_Word diff --git a/sql/updates/world/2015_02_02_00_Word b/sql/updates/world/2015_02_02_00_Word new file mode 100644 index 00000000000..84d31ef7be1 --- /dev/null +++ b/sql/updates/world/2015_02_02_00_Word @@ -0,0 +1,16 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN(29491,28994,28721,28725,33027,28727,28715,28714,28726,29523,28989,28997,28723,28718); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, 29491, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Karandonna - Only run SAI if invoker is player'), +(22, 1, 28994, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Abra Cadabra - Only run SAI if invoker is player'), +(22, 1, 28721, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Tiffany Cartier - Only run SAI if invoker is player'), +(22, 1, 28725, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Patricia Egan - Only run SAI if invoker is player'), +(22, 1, 33027, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Jessica Sellers - Only run SAI if invoker is player'), +(22, 1, 28727, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Edward Egan - Only run SAI if invoker is player'), +(22, 1, 28714, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Ildine Sorrowspear - Only run SAI if invoker is player'), +(22, 1, 28715, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Endora Moorehead - Only run SAI if invoker is player'), +(22, 1, 28726, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Dominique Stefano - Only run SAI if invoker is player'), +(22, 1, 29523, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Bragund Brightlink - Only run SAI if invoker is player'), +(22, 1, 28997, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Griselda Hunderland - Only run SAI if invoker is player'), +(22, 1, 28989, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Aemara - Only run SAI if invoker is player'), +(22, 1, 28723, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Larana Drome - Only run SAI if invoker is player'), +(22, 1, 28718, 0, 0, 31, 0, 4, 0, 0, 0, 0, 0, '', 'Ranid Glowergold - Only run SAI if invoker is player'); From 8dcbb2f6c1015dac4488302432862b6fb349d518 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Mon, 2 Feb 2015 17:07:08 +0100 Subject: [PATCH 12/32] Rename 2015_02_02_00_Word to 2015_02_02_00_world.sql --- sql/updates/world/{2015_02_02_00_Word => 2015_02_02_00_world.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql/updates/world/{2015_02_02_00_Word => 2015_02_02_00_world.sql} (100%) diff --git a/sql/updates/world/2015_02_02_00_Word b/sql/updates/world/2015_02_02_00_world.sql similarity index 100% rename from sql/updates/world/2015_02_02_00_Word rename to sql/updates/world/2015_02_02_00_world.sql From d4db0c15c7e59f7139619720be3c26a48e6ff259 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Tue, 3 Feb 2015 22:16:41 +0100 Subject: [PATCH 13/32] Shared/Database: Fix transactions not being recommitted on dead-lock error Fix transactions not being recommitted on dead-lock error (error code 1213) because of calling http://dev.mysql.com/doc/refman/5.0/en/mysql-errno.html after sending the ROLLBACK command. This way the returned error code was related to the ROLLBACK command, not the failed transaction. --- src/server/shared/Database/DatabaseWorkerPool.h | 7 ++++--- src/server/shared/Database/MySQLConnection.cpp | 12 +++++++----- src/server/shared/Database/MySQLConnection.h | 2 +- src/server/shared/Database/Transaction.cpp | 8 +++++--- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h index 5a06ad69a1d..fe70a0ef04a 100644 --- a/src/server/shared/Database/DatabaseWorkerPool.h +++ b/src/server/shared/Database/DatabaseWorkerPool.h @@ -368,7 +368,8 @@ class DatabaseWorkerPool void DirectCommitTransaction(SQLTransaction& transaction) { T* con = GetFreeConnection(); - if (con->ExecuteTransaction(transaction)) + int errorCode = con->ExecuteTransaction(transaction); + if (!errorCode) { con->Unlock(); // OK, operation succesful return; @@ -376,12 +377,12 @@ class DatabaseWorkerPool //! Handle MySQL Errno 1213 without extending deadlock to the core itself /// @todo More elegant way - if (con->GetLastError() == 1213) + if (errorCode == ER_LOCK_DEADLOCK) { uint8 loopBreaker = 5; for (uint8 i = 0; i < loopBreaker; ++i) { - if (con->ExecuteTransaction(transaction)) + if (!con->ExecuteTransaction(transaction)) break; } } diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index bea229df184..1a9f973d47b 100644 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -359,11 +359,11 @@ void MySQLConnection::CommitTransaction() Execute("COMMIT"); } -bool MySQLConnection::ExecuteTransaction(SQLTransaction& transaction) +int MySQLConnection::ExecuteTransaction(SQLTransaction& transaction) { std::list const& queries = transaction->m_queries; if (queries.empty()) - return false; + return -1; BeginTransaction(); @@ -380,8 +380,9 @@ bool MySQLConnection::ExecuteTransaction(SQLTransaction& transaction) if (!Execute(stmt)) { TC_LOG_WARN("sql.sql", "Transaction aborted. %u queries not executed.", (uint32)queries.size()); + int errorCode = GetLastError(); RollbackTransaction(); - return false; + return errorCode; } } break; @@ -392,8 +393,9 @@ bool MySQLConnection::ExecuteTransaction(SQLTransaction& transaction) if (!Execute(sql)) { TC_LOG_WARN("sql.sql", "Transaction aborted. %u queries not executed.", (uint32)queries.size()); + int errorCode = GetLastError(); RollbackTransaction(); - return false; + return errorCode; } } break; @@ -406,7 +408,7 @@ bool MySQLConnection::ExecuteTransaction(SQLTransaction& transaction) // and not while iterating over every element. CommitTransaction(); - return true; + return 0; } MySQLPreparedStatement* MySQLConnection::GetPreparedStatement(uint32 index) diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h index 33f17d02228..d486f5b4679 100644 --- a/src/server/shared/Database/MySQLConnection.h +++ b/src/server/shared/Database/MySQLConnection.h @@ -86,7 +86,7 @@ class MySQLConnection void BeginTransaction(); void RollbackTransaction(); void CommitTransaction(); - bool ExecuteTransaction(SQLTransaction& transaction); + int ExecuteTransaction(SQLTransaction& transaction); operator bool () const { return m_Mysql != NULL; } void Ping() { mysql_ping(m_Mysql); } diff --git a/src/server/shared/Database/Transaction.cpp b/src/server/shared/Database/Transaction.cpp index 3dee865267b..b83b787a106 100644 --- a/src/server/shared/Database/Transaction.cpp +++ b/src/server/shared/Database/Transaction.cpp @@ -17,6 +17,7 @@ #include "DatabaseEnv.h" #include "Transaction.h" +#include //- Append a raw ad-hoc query to the transaction void Transaction::Append(const char* sql) @@ -74,14 +75,15 @@ void Transaction::Cleanup() bool TransactionTask::Execute() { - if (m_conn->ExecuteTransaction(m_trans)) + int errorCode = m_conn->ExecuteTransaction(m_trans); + if (!errorCode) return true; - if (m_conn->GetLastError() == 1213) + if (errorCode == ER_LOCK_DEADLOCK) { uint8 loopBreaker = 5; // Handle MySQL Errno 1213 without extending deadlock to the core itself for (uint8 i = 0; i < loopBreaker; ++i) - if (m_conn->ExecuteTransaction(m_trans)) + if (!m_conn->ExecuteTransaction(m_trans)) return true; } From c66bd709f1c58303aca39b8f43ac57379079882d Mon Sep 17 00:00:00 2001 From: Nayd Date: Wed, 4 Feb 2015 19:44:34 +0000 Subject: [PATCH 14/32] Fix build --- src/server/shared/Database/DatabaseWorkerPool.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h index fe70a0ef04a..f0ddbe91ad8 100644 --- a/src/server/shared/Database/DatabaseWorkerPool.h +++ b/src/server/shared/Database/DatabaseWorkerPool.h @@ -29,6 +29,8 @@ #include "QueryHolder.h" #include "AdhocStatement.h" +#include + #define MIN_MYSQL_SERVER_VERSION 50100u #define MIN_MYSQL_CLIENT_VERSION 50100u From cb3fcea26e9d4566987b0ea69e1498e414c703a9 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Thu, 5 Feb 2015 07:15:56 +0100 Subject: [PATCH 15/32] DB/Misc: Fix a runtime error --- sql/updates/world/2015_02_05_00_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2015_02_05_00_world.sql diff --git a/sql/updates/world/2015_02_05_00_world.sql b/sql/updates/world/2015_02_05_00_world.sql new file mode 100644 index 00000000000..77bc4fd8b53 --- /dev/null +++ b/sql/updates/world/2015_02_05_00_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `skill_fishing_base_level` WHERE `entry`=4710; +INSERT INTO `skill_fishing_base_level` (`entry`, `skill`) VALUES +(4710, 480); From 45b7477344ccc1b33159d8d6bdefc091418cb2a0 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Fri, 6 Feb 2015 03:09:01 +0100 Subject: [PATCH 16/32] DB: fixed The Brewmaiden SAI (cherry picked from commit de3d20a9458370df36de4387f53325a5e3dd7d2e) --- sql/updates/world/2015_02_06_00_world.sql | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sql/updates/world/2015_02_06_00_world.sql diff --git a/sql/updates/world/2015_02_06_00_world.sql b/sql/updates/world/2015_02_06_00_world.sql new file mode 100644 index 00000000000..96eb6a65f28 --- /dev/null +++ b/sql/updates/world/2015_02_06_00_world.sql @@ -0,0 +1,27 @@ +-- The Brewmaiden SAI +SET @ENTRY := 36021; + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*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,0,0,0,22,0,100,0,101,0,0,0,11,48249,1,0,0,0,0,7,0,0,0,0,0,0,0,'The Brewmaiden - Received Emote 101 - Cast ''Brewfest Brew Toss'''); + +DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY; +INSERT INTO `creature_template_addon` (`entry`,`bytes2`,`auras`) VALUES +(@ENTRY,0x1,'68269'); + + +-- The Brewmaiden SAI +SET @ENTRY := 27166; + +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,22,0,100,0,101,0,0,0,11,48249,1,0,0,0,0,7,0,0,0,0,0,0,0,'The Brewmaiden - Received Emote 101 - Cast ''Brewfest Brew Toss'''); + +DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY; +INSERT INTO `creature_template_addon` (`entry`,`bytes2`,`auras`) VALUES +(@ENTRY,0x1,'51847'); From 890ebd385ed3848152da7e4dca6d67bf23e30c98 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 07:35:08 +0100 Subject: [PATCH 17/32] DB/Creature: Emissary of Hate By Rushor --- sql/updates/world/2015_02_06_01_world.sql | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sql/updates/world/2015_02_06_01_world.sql diff --git a/sql/updates/world/2015_02_06_01_world.sql b/sql/updates/world/2015_02_06_01_world.sql new file mode 100644 index 00000000000..3b16d7a367c --- /dev/null +++ b/sql/updates/world/2015_02_06_01_world.sql @@ -0,0 +1,40 @@ +-- Fel Portal Alarm SAI +SET @ENTRY := 23310; +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,11,0,100,1,0,0,0,0,11,46907,0,0,0,0,0,1,0,0,0,0,0,0,0,"Fel Portal Alarm - On Respawn - Cast 'Boss Fel Portal State' (No Repeat)"), +(@ENTRY,0,1,0,38,0,100,0,1,1,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Fel Portal Alarm - On Data Set 1 1 - Increment Phase"), +(@ENTRY,0,2,3,1,32,100,0,1000,1000,0,0,12,25003,5,120000,0,0,0,1,0,0,0,0,0,0,0,"Fel Portal Alarm - Out of Combat - Summon Creature 'Emissary of Hate' (Phase 32)"), +(@ENTRY,0,3,0,61,32,100,0,1000,1000,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Fel Portal Alarm - Out of Combat - Set Event Phase 0 (Phase 32)"); + +DELETE FROM `creature` WHERE `id`=25003; + +-- Irespeaker SAI +SET @ENTRY := 24999; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,1500,3000,10000,15000,11,35913,0,0,0,0,0,2,0,0,0,0,0,0,0,"Irespeaker - In Combat - Cast 'Fel Fireball'"), +(@ENTRY,0,1,0,0,0,100,0,13000,16000,20000,35000,11,18267,0,0,0,0,0,2,0,0,0,0,0,0,0,"Irespeaker - In Combat - Cast 'Curse of Weakness'"), +(@ENTRY,0,2,0,6,0,100,1,0,0,0,0,33,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Irespeaker - On Just Died - Quest Credit 'Kanrethad's Quest' (No Repeat)"), +(@ENTRY,0,3,0,6,0,100,0,5000,5000,10000,10000,45,1,1,0,0,0,0,10,79450,23310,0,0,0,0,0,"Irespeaker - On Just Died - Set Data 1 1"); + +-- Unleashed Hellion SAI +SET @ENTRY := 25002; +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,6,0,100,1,0,0,0,0,33,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Unleashed Hellion - On Just Died - Quest Credit 'Kanrethad's Quest' (No Repeat)"), +(@ENTRY,0,1,0,0,0,100,0,4000,5000,18000,35000,11,11876,0,0,0,0,0,2,0,0,0,0,0,0,0,"Unleashed Hellion - In Combat - Cast 'War Stomp'"), +(@ENTRY,0,2,0,0,0,100,0,6000,9000,12600,16000,11,20754,0,0,0,0,0,2,0,0,0,0,0,0,0,"Unleashed Hellion - In Combat - Cast 'Rain of Fire'"), +(@ENTRY,0,3,0,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,10,79450,23310,0,0,0,0,0,"Unleashed Hellion - On Just Died - Set Data 1 1"); + +-- Emissary of Hate SAI +SET @ENTRY := 25003; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,2000,5000,15000,20000,11,25003,0,0,0,0,0,2,0,0,0,0,0,0,0,"Emissary of Hate - In Combat - Cast 'Mortar'"), +(@ENTRY,0,1,0,0,0,100,0,8000,10000,15000,20000,11,38611,0,0,0,0,0,2,0,0,0,0,0,0,0,"Emissary of Hate - In Combat - Cast 'Flame Wave'"), +(@ENTRY,0,2,0,54,0,100,0,0,0,0,0,89,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Emissary of Hate - On Just Summoned - Start Random Movement"); From b2745980ae096b01460da08e70840b3ee82daf62 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 07:37:15 +0100 Subject: [PATCH 18/32] DB/Quest: Minshina's Skull By Rushor --- sql/updates/world/2015_02_06_02_world.sql | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sql/updates/world/2015_02_06_02_world.sql diff --git a/sql/updates/world/2015_02_06_02_world.sql b/sql/updates/world/2015_02_06_02_world.sql new file mode 100644 index 00000000000..4c514ea95d4 --- /dev/null +++ b/sql/updates/world/2015_02_06_02_world.sql @@ -0,0 +1,33 @@ +-- Master Gadrin SAI +SET @ENTRY := 3188; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,20,0,100,0,808,0,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Master Gadrin - On Quest 'Minshina's Skull' Finished - Run Script"); + +-- Actionlist SAI +SET @ENTRY := 318800; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,2000,2000,0,0,12,3289,5,14000,0,0,0,8,0,0,0,-822.91,-4923.33,19.6365,3.41642,"Master Gadrin - On Script - Summon Creature 'Spirit of Minshina'"), +(@ENTRY,9,1,0,0,0,100,0,2000,2000,0,0,66,0,0,0,0,0,0,21,20,0,0,0,0,0,0,"Master Gadrin - On Script - Set Orientation Closest Player"), +(@ENTRY,9,2,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,21,20,0,0,0,0,0,0,"Master Gadrin - On Script - Say Line 0"); + +-- Spirit of Minshina SAI +SET @ENTRY := 3289; +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,54,0,100,0,0,0,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Spirit of Minshina - On Just Summoned - Run Script"); + +-- Actionlist SAI +SET @ENTRY := 328900; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,2000,2000,0,0,66,0,0,0,0,0,0,21,20,0,0,0,0,0,0,"Spirit of Minshina - On Script - Set Orientation Closest Player"), +(@ENTRY,9,1,0,0,0,100,0,2000,2000,0,0,5,2,0,0,0,0,0,1,2000,2000,0,0,0,0,0,"Spirit of Minshina - On Script - Play Emote 2"), +(@ENTRY,9,2,0,0,0,100,0,11000,11000,0,0,41,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Spirit of Minshina - On Script - Despawn Instant"); + +DELETE FROM `creature_text` WHERE `entry`=3188; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(3188, 0, 0, 'I thank you, $n. And my brother thanks you.', 12, 0, 100, 0, 0, 0, 'Master Gadrin', 983); From 4e5b54f65b077186f2c119f6015e1f754e32d088 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 07:38:44 +0100 Subject: [PATCH 19/32] DB/Creature: Caretaker Dilandrus --- sql/updates/world/2015_02_06_03_world.sql | 62 +++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sql/updates/world/2015_02_06_03_world.sql diff --git a/sql/updates/world/2015_02_06_03_world.sql b/sql/updates/world/2015_02_06_03_world.sql new file mode 100644 index 00000000000..83aedd75069 --- /dev/null +++ b/sql/updates/world/2015_02_06_03_world.sql @@ -0,0 +1,62 @@ +-- +DELETE FROM `waypoints` WHERE `entry`=16856; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(16856, 1,-807.327,2739.82,115.447, 'Caretaker Dilandrus'), +(16856, 2,-798.86,2719.21,111.628, 'Caretaker Dilandrus'), +(16856, 3,-785.502,2706.21,107.293, 'Caretaker Dilandrus'), +(16856, 4,-785.546,2702.16,106.208, 'Caretaker Dilandrus'), +(16856, 5,-787.652,2700.58,105.792, 'Caretaker Dilandrus'), +(16856, 6,-791.771,2694.26,104.589, 'Caretaker Dilandrus'), +(16856, 7,-793.482,2693.76,104.592, 'Caretaker Dilandrus'), +(16856, 8,-794.696,2691.44,104.35, 'Caretaker Dilandrus'), +(16856, 9,-797.951,2691.02,104.535, 'Caretaker Dilandrus'), +(16856, 10,-798.984,2693.63,104.891, 'Caretaker Dilandrus'), +(16856, 11,-797.778,2697.53,105.43, 'Caretaker Dilandrus'), +(16856, 12,-792.678,2705.64,106.948, 'Caretaker Dilandrus'), +(16856, 13,-792.409,2708.46,107.754, 'Caretaker Dilandrus'), +(16856, 14,-794.25,2710.38,108.384, 'Caretaker Dilandrus'), +(16856, 15,-799.924,2706.66,107.387, 'Caretaker Dilandrus'), +(16856, 16,-807.92,2692.9,104.856, 'Caretaker Dilandrus'), +(16856, 17,-811.612,2690.9,104.36, 'Caretaker Dilandrus'), +(16856, 18,-814.837,2692.26,104.736, 'Caretaker Dilandrus'), +(16856, 19,-814.33,2696.03,105.773, 'Caretaker Dilandrus'), +(16856, 20,-809.779,2704.45,107.63, 'Caretaker Dilandrus'), +(16856, 21,-801.425,2715.06,109.679, 'Caretaker Dilandrus'), +(16856, 22,-801.359,2718.11,110.676, 'Caretaker Dilandrus'), +(16856, 23,-804.433,2720.69,111.13, 'Caretaker Dilandrus'), +(16856, 24,-810.324,2717.67,110.329, 'Caretaker Dilandrus'), +(16856, 25,-814.433,2712.14,109.487, 'Caretaker Dilandrus'), +(16856, 26,-820.17,2701.35,107.506, 'Caretaker Dilandrus'), +(16856, 27,-823.067,2699.77,107.458, 'Caretaker Dilandrus'), +(16856, 28,-824.921,2701.38,107.939, 'Caretaker Dilandrus'), +(16856, 29,-824.739,2706.05,108.591, 'Caretaker Dilandrus'), +(16856, 30,-820.185,2714.8,110.056, 'Caretaker Dilandrus'), +(16856, 31,-814.476,2725.61,111.567, 'Caretaker Dilandrus'), +(16856, 32,-807.327,2739.82,115.447, 'Caretaker Dilandrus'), +(16856, 33,-807.327,2739.82,115.447, 'Caretaker Dilandrus'); + +UPDATE `creature` SET `position_x`=-807.327, `position_y`=2739.82, `position_z`=115.447, `orientation`=2.611, `MovementType`=2 WHERE `guid`=58021; + +-- Caretaker Dilandrus SAI +SET @ENTRY := 16856; +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,53,0,16856,1,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Reset - Start Waypoint"), +(@ENTRY,0,1,0,40,0,100,0,5,16856,0,0,80,@ENTRY*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Waypoint 5 Reached - Run Script"), +(@ENTRY,0,2,0,40,0,100,0,7,16856,0,0,80,@ENTRY*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Waypoint 7 Reached - Run Script"), +(@ENTRY,0,3,0,40,0,100,0,11,16856,0,0,80,@ENTRY*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Waypoint 11 Reached - Run Script"), +(@ENTRY,0,4,0,40,0,100,0,15,16856,0,0,80,@ENTRY*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Waypoint 15 Reached - Run Script"), +(@ENTRY,0,5,0,40,0,100,0,20,16856,0,0,80,@ENTRY*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Waypoint 20 Reached - Run Script"), +(@ENTRY,0,6,0,40,0,100,0,24,16856,0,0,80,@ENTRY*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Waypoint 24 Reached - Run Script"), +(@ENTRY,0,7,0,40,0,100,0,30,16856,0,0,80,@ENTRY*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Waypoint 30 Reached - Run Script"), +(@ENTRY,0,8,0,40,0,100,0,33,16856,0,0,54,300000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Waypoint 33 Reached - Pause Waypoint"); + +-- Actionlist SAI +SET @ENTRY := 1685601; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,9,0,0,0,0,100,0,0,0,0,0,54,10000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Script - Pause Waypoint"), +(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,1,0,0,0,0,0,0,2.75976,"Caretaker Dilandrus - On Script - Set Orientation Home Position"), +(@ENTRY,9,2,0,0,0,100,0,3000,3000,0,0,5,66,0,0,0,0,0,1,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Script - Play Emote 66"), +(@ENTRY,9,3,0,0,0,100,0,3000,3000,0,0,5,68,0,0,0,0,0,0,0,0,0,0,0,0,0,"Caretaker Dilandrus - On Script - Play Emote 68"); From 7b915119b4699f10a2855b51867ef9e9d769acc4 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 07:41:09 +0100 Subject: [PATCH 20/32] DB/Creature: Antu'sul By Rushor --- sql/updates/world/2015_02_06_04_world.sql | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sql/updates/world/2015_02_06_04_world.sql diff --git a/sql/updates/world/2015_02_06_04_world.sql b/sql/updates/world/2015_02_06_04_world.sql new file mode 100644 index 00000000000..1a4484df5a3 --- /dev/null +++ b/sql/updates/world/2015_02_06_04_world.sql @@ -0,0 +1,32 @@ +-- Areatrigger SAI +SET @ENTRY := 1447; +DELETE FROM `areatrigger_scripts` WHERE `entry`=@ENTRY; +INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES (@ENTRY,"SmartTrigger"); +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=2; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,2,0,0,46,0,100,0,0,0,0,0,45,1,1,0,0,0,0,10,81519,8127,0,0,0,0,0,"Areatrigger - On Trigger - Set Data 1 1"); + +-- Antu'sul SAI +SET @ENTRY := 8127; +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,1,0,0,50,2,11600,11600,13300,21700,11,8376,0,0,0,0,0,1,0,0,0,0,0,0,0,"Antu'sul - In Combat - Cast 'Earthgrab Totem' (Normal Dungeon)"), +(@ENTRY,0,1,0,61,0,50,3,11600,11600,13300,21700,11,11899,0,0,0,0,0,1,0,0,0,0,0,0,0,"Antu'sul - In Combat - Cast 'Healing Ward' (Normal Dungeon)"), +(@ENTRY,0,2,6,4,0,100,3,0,0,0,0,11,11894,0,0,0,0,0,1,0,0,0,0,0,0,0,"Antu'sul - On Aggro - Cast 'Antu'sul's Minion' (No Repeat) (Normal Dungeon)"), +(@ENTRY,0,3,0,2,0,100,3,0,20,0,0,11,11895,0,0,0,0,0,1,0,0,0,0,0,0,0,"Antu'sul - Between 0-20% Health - Cast 'Healing Wave of Antu'sul' (No Repeat) (Normal Dungeon)"), +(@ENTRY,0,4,5,2,0,100,3,0,25,0,0,11,11894,0,0,0,0,0,1,0,0,0,0,0,0,0,"Antu'sul - Between 0-25% Health - Cast 'Antu'sul's Minion' (No Repeat) (Normal Dungeon)"), +(@ENTRY,0,5,0,61,0,100,3,0,25,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Antu'sul - Between 0-25% Health - Say Line 0 (No Repeat) (Normal Dungeon)"), +(@ENTRY,0,6,0,61,0,100,3,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Antu'sul - On Aggro - Say Line 1 (No Repeat) (Normal Dungeon)"), +(@ENTRY,0,7,8,2,0,100,3,0,75,0,0,11,11894,0,0,0,0,0,1,0,0,0,0,0,0,0,"Antu'sul - Between 0-75% Health - Cast 'Antu'sul's Minion' (No Repeat) (Normal Dungeon)"), +(@ENTRY,0,8,0,61,0,100,3,0,75,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Antu'sul - Between 0-75% Health - Say Line 2 (No Repeat) (Normal Dungeon)"), +(@ENTRY,0,9,0,0,0,100,2,5000,5000,12000,14000,11,16006,0,0,0,0,0,5,0,0,0,0,0,0,0,"Antu'sul - In Combat - Cast 'Chain Lightning' (Normal Dungeon)"), +(@ENTRY,0,10,0,0,0,100,2,3000,3000,9000,11000,11,15501,0,0,0,0,0,2,0,0,0,0,0,0,0,"Antu'sul - In Combat - Cast 'Earth Shock' (Normal Dungeon)"), +(@ENTRY,0,11,0,38,0,100,0,1,1,0,0,49,0,0,0,0,0,0,21,100,0,0,0,0,0,0,"Antu'sul - On Data Set 1 1 - Start Attacking"); + +SET @ENTRY := 8127; +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(@ENTRY,0,0, 'The children of Sul will protect their master. Rise once more Sul\'lithuz!',14,0,100,0,0,0, 4178, 0, 'Antu\'sul'), +(@ENTRY,1,0, 'Lunch has arrived, my beautiful children. Tear them to pieces!',14,0,100,0,0,0, 4166, 0, 'Antu\'sul'), +(@ENTRY,2,0, 'Rise and defend your master!',14,0,100,0,0,0, 4177, 0, 'Antu\'sul'); From 40b09317efb8b088cb1984e471901e35f87d6d02 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 07:44:17 +0100 Subject: [PATCH 21/32] DB/Quest: Honor the Fallen By Rushor. --- sql/updates/world/2015_02_06_05_world.sql | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 sql/updates/world/2015_02_06_05_world.sql diff --git a/sql/updates/world/2015_02_06_05_world.sql b/sql/updates/world/2015_02_06_05_world.sql new file mode 100644 index 00000000000..bd04efd9c66 --- /dev/null +++ b/sql/updates/world/2015_02_06_05_world.sql @@ -0,0 +1,45 @@ +-- Commander Hogarth SAI +SET @ENTRY := 19937; +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,11,0,100,1,0,0,0,0,11,33900,0,0,0,0,0,1,0,0,0,0,0,0,0,"Commander Hogarth - On Respawn - Cast 'Shroud of Death' (No Repeat)"), +(@ENTRY,0,1,2,20,0,100,0,10258,0,0,0,12,20117,6,0,0,0,0,8,0,0,0,-1186.95,2608.81,27.702,5.38523,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding Knight'"), +(@ENTRY,0,2,3,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1192.14,2602.7,29.2625,0.0820243,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,3,4,61,0,100,0,10258,0,0,0,12,20117,6,0,0,0,0,8,0,0,0,-1181.95,2611.13,27.3004,4.61566,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding Knight'"), +(@ENTRY,0,4,5,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1183.65,2603.66,29.4927,6.09219,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,5,6,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1184.48,2609.26,27.7192,5.01103,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,6,7,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1175.39,2607.4,28.853,3.63473,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,7,8,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1178.36,2609.96,27.8814,4.12375,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,8,9,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1182.51,2608.35,28.1201,4.67383,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,9,10,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1189.12,2601.88,29.6988,0.242659,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,10,11,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1179.46,2606.03,29.0216,3.81031,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,11,12,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1180.6,2598.15,35.2317,1.94692,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,12,13,61,0,100,0,10258,0,0,0,12,20117,6,0,0,0,0,8,0,0,0,-1190.87,2607.06,27.9991,5.86898,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding Knight'"), +(@ENTRY,0,13,14,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1179.81,2603.43,29.8027,3.12637,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,14,15,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1184.47,2606.9,28.4442,5.18881,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,15,16,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1186.63,2605.58,28.7169,5.79079,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,16,17,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1189.03,2604.6,28.8694,6.10697,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,17,18,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1185.68,2603.39,29.4476,5.18881,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"), +(@ENTRY,0,18,0,61,0,100,0,10258,0,0,0,12,19863,6,0,0,0,0,8,0,0,0,-1181.97,2605.76,28.9476,4.40683,"Commander Hogarth - On Quest 'Honor the Fallen' Finished - Summon Creature 'Vengeful Unyielding'"); + +DELETE FROM `creature_template_addon` WHERE `entry` IN (20117, 19863); +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(20117, 0, 0, 0, 0, 0, '33900'), +(19863, 0, 0, 0, 0, 0, '33900'); + +-- Vengeful Unyielding Knight SAI +SET @ENTRY := 20117; +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,54,0,100,0,0,0,0,0,41,15000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Vengeful Unyielding Knight - On Just Summoned - Despawn In 15000 ms"), +(@ENTRY,0,1,0,54,0,100,0,0,0,0,0,5,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Vengeful Unyielding Knight - On Just Summoned - Play Emote 2"); + +-- Vengeful Unyielding SAI +SET @ENTRY := 19863; +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,54,0,100,0,0,0,0,0,41,15000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Vengeful Unyielding - On Just Summoned - Despawn In 15000 ms"), +(@ENTRY,0,1,0,54,0,100,0,0,0,0,0,5,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Vengeful Unyielding - On Just Summoned - Play Emote 2"); From 4179c35eb25a69c33f9236f61e67985f2ff26c13 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 07:45:56 +0100 Subject: [PATCH 22/32] DB/Quest: Respite for a Tormented Soul --- sql/updates/world/2015_02_06_06_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2015_02_06_06_world.sql diff --git a/sql/updates/world/2015_02_06_06_world.sql b/sql/updates/world/2015_02_06_06_world.sql new file mode 100644 index 00000000000..0d7b75a72cc --- /dev/null +++ b/sql/updates/world/2015_02_06_06_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_questender` SET `id` =38017 WHERE `quest` =24880; From 04fb8d7f242af026da357de5a18fe6fee3702b14 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 07:57:03 +0100 Subject: [PATCH 23/32] DB/Creature: Tiny Snowman By Rushor --- sql/updates/world/2015_02_06_07_world.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/2015_02_06_07_world.sql diff --git a/sql/updates/world/2015_02_06_07_world.sql b/sql/updates/world/2015_02_06_07_world.sql new file mode 100644 index 00000000000..ab3eb6ae454 --- /dev/null +++ b/sql/updates/world/2015_02_06_07_world.sql @@ -0,0 +1,6 @@ +-- Tiny Snowman SAI +SET @ENTRY := 15710; +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,22,0,100,0,34,0,0,0,5,94,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tiny Snowman - Received Emote 34 - Play Emote 94"); From ea3034cb218b6e1028ef99196e746d66a580f3d9 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 07:59:25 +0100 Subject: [PATCH 24/32] DB/Quest: Digging for Prayer Beads By Trisjdc --- sql/updates/world/2015_02_06_08_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2015_02_06_08_world.sql diff --git a/sql/updates/world/2015_02_06_08_world.sql b/sql/updates/world/2015_02_06_08_world.sql new file mode 100644 index 00000000000..e05c5e15c8e --- /dev/null +++ b/sql/updates/world/2015_02_06_08_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=20206 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 +(20206, 0, 0, 0, 20, 0, 100, 0, 10919, 0, 0, 0, 53, 0, 20206, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Fei Fei - On Quest \'Fei Fei\'s Treat\' Finished - Start Waypoint (Phase 1) (No Repeat)'); From ad350edd6844de96f331e1b565fe75903acf39cd Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 08:12:37 +0100 Subject: [PATCH 25/32] DB/Creature: Thousand Needle's Silithids By Rushor --- sql/updates/world/2015_02_06_09_world.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sql/updates/world/2015_02_06_09_world.sql diff --git a/sql/updates/world/2015_02_06_09_world.sql b/sql/updates/world/2015_02_06_09_world.sql new file mode 100644 index 00000000000..94696444dd4 --- /dev/null +++ b/sql/updates/world/2015_02_06_09_world.sql @@ -0,0 +1,11 @@ +-- +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (4131, 4133); +DELETE FROM `smart_scripts` WHERE `entryorguid`=4131 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 +(4131, 0, 0, 0, 0, 0, 100, 1, 4000, 7000, 22000, 25000, 11, 6016, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Silithid Invader - IC - Cast Pierce Armor'), +(4131, 0, 1, 0, 0, 0, 100, 1, 10000, 16000, 0, 0, 11, 8137, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Silithid Invader - IC - Cast Pierce Armor'), +(4131, 0, 2, 0, 2, 0, 100, 1, 0, 15, 0, 0, 39, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Silithid Invader - on hp below 15 % - call for help'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=4133 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 +(4133, 0, 2, 0, 2, 0, 100, 1, 0, 15, 0, 0, 39, 20, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Silithid Hive Drone - on hp below 15 % - call for help'); From 4e0fb54a41e69e6839f58154abd09bfc609f92f2 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 08:19:34 +0100 Subject: [PATCH 26/32] DB/Creature: Fix immunity Herald Volazj By Rushor --- sql/updates/world/2015_02_06_10_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2015_02_06_10_world.sql diff --git a/sql/updates/world/2015_02_06_10_world.sql b/sql/updates/world/2015_02_06_10_world.sql new file mode 100644 index 00000000000..428a0c7e8ca --- /dev/null +++ b/sql/updates/world/2015_02_06_10_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE creature_template SET mechanic_immune_mask = mechanic_immune_mask | 0x20 WHERE entry = 31464; From 826717de1b184c0e4eb41735b56622bd85a6ba6c Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 13:42:14 +0100 Subject: [PATCH 27/32] DB/Misc: Disable mmaps for Argent tournament instances If anyone can do a proper fix (allow creatures to walk over gameobjects) it will be welcome. --- sql/updates/world/2015_02_06_11_world.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sql/updates/world/2015_02_06_11_world.sql diff --git a/sql/updates/world/2015_02_06_11_world.sql b/sql/updates/world/2015_02_06_11_world.sql new file mode 100644 index 00000000000..5a385218931 --- /dev/null +++ b/sql/updates/world/2015_02_06_11_world.sql @@ -0,0 +1,7 @@ +-- +DELETE FROM `disables` WHERE `entry` IN (649,650) AND `sourceType` = 7; +DELETE FROM `disables` WHERE `entry` = 650 AND `sourceType` = 2; +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(7, 649, 0, '', '', 'Disable mmaps - Trial of the Crusader'), +(7, 650, 0, '', '', 'Disable mmaps - Trial of the Champion'), +(2, 650, 3, '', '', 'Disable Trial of the Champion, broken instance'); From abea307cdbb7cf381402a454dff4dcce63ee10a8 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 16:30:05 +0100 Subject: [PATCH 28/32] DB/Gameobject: Fix some Scholomance doors --- sql/updates/world/2015_02_06_12_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2015_02_06_12_world.sql diff --git a/sql/updates/world/2015_02_06_12_world.sql b/sql/updates/world/2015_02_06_12_world.sql new file mode 100644 index 00000000000..f6a95a7c010 --- /dev/null +++ b/sql/updates/world/2015_02_06_12_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `gameobject_template` SET `flags`=32 WHERE `entry` IN (175611,175612,175613,175614); From 4adf31ce0ac5e41e80a61c107fd2c8cee64985eb Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 6 Feb 2015 16:47:11 +0100 Subject: [PATCH 29/32] DB/Item: 3.3.5a locales_item has some Cataclysm translations By ariel-, closes #13750 --- sql/updates/world/2015_02_06_13_world_335.sql | 372 ++++++++++++++++++ 1 file changed, 372 insertions(+) create mode 100644 sql/updates/world/2015_02_06_13_world_335.sql diff --git a/sql/updates/world/2015_02_06_13_world_335.sql b/sql/updates/world/2015_02_06_13_world_335.sql new file mode 100644 index 00000000000..8cd8df2147e --- /dev/null +++ b/sql/updates/world/2015_02_06_13_world_335.sql @@ -0,0 +1,372 @@ +UPDATE `locales_item` SET `description_loc6` = '', `description_loc7` = '' WHERE `entry` IN (42469, 42734, 42739, 42740, 42747, 42750, 43357, 43420, 43426, 43429); +UPDATE `locales_item` SET `description_loc7` = `description_loc6` WHERE `entry` IN (40142, 40143, 40144, 40145, 40146, 40147, 40149, 40150, 40152, 40154, 40155, 40156, 40158, 40159, 40160, 40161, 40163); + +CREATE TEMPORARY TABLE `locales_update` ( + `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name_loc6` varchar(100) NOT NULL DEFAULT '', + `name_loc7` varchar(100) NOT NULL DEFAULT '', + `description_loc6` varchar(255) DEFAULT NULL, + `description_loc7` varchar(255) DEFAULT NULL, + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `locales_update` (`entry`, `name_loc6`, `name_loc7`, `description_loc6`, `description_loc7`) VALUES + (40143, 'Ametrino con grabados', 'Ametrino con grabados', 'Encaja en una ranura de color rojo o amarillo.', 'Encaja en una ranura de color rojo o amarillo.'), + (40148, 'Ametrino destellante', 'Ametrino destellante', 'Encaja en una ranura de color rojo o amarillo.', 'Encaja en una ranura de color rojo o amarillo.'), + (40151, 'Ametrino luminoso', 'Ametrino luminoso', 'Encaja en una ranura de color rojo o amarillo.', 'Encaja en una ranura de color rojo o amarillo.'), + (40153, 'Ametrino velado', 'Ametrino velado', 'Encaja en una ranura de color rojo o amarillo.', 'Encaja en una ranura de color rojo o amarillo.'), + (40157, 'Ametrino prístino', 'Ametrino prístino', 'Encaja en una ranura de color rojo o amarillo.', 'Encaja en una ranura de color rojo o amarillo.'), + (40162, 'Ametrino de precisión', 'Ametrino de precisión', 'Encaja en una ranura de color rojo o amarillo.', 'Encaja en una ranura de color rojo o amarillo.'), + (46947, 'Boceto: ametrino luminoso', 'Boceto: ametrino luminoso', 'Te enseña a tallar un ametrino luminoso.', 'Te enseña a tallar un ametrino luminoso.'), + (46951, 'Boceto: ametrino velado', 'Boceto: ametrino velado', 'Te enseña a tallar un ametrino velado.', 'Te enseña a tallar un ametrino velado.'), + (46953, 'Boceto: ametrino con grabados', 'Boceto: ametrino con grabados', 'Te enseña a tallar un ametrino con grabados.', ' Te enseña a tallar un ametrino con grabados.'), + (46956, 'Boceto: ametrino prístino', 'Boceto: ametrino prístino', 'Te enseña a tallar un ametrino prístino.', ' Te enseña a tallar un ametrino prístino.'), + (47008, 'Boceto: ametrino destellante', 'Boceto: ametrino destellante', 'Te enseña a tallar un ametrino destellante.', ' Te enseña a tallar un ametrino destellante.'), + (47010, 'Boceto: ametrino de precisión', 'Boceto: ametrino de precisión', 'Te enseña a tallar un ametrino de precisión.', ' Te enseña a tallar un ametrino de precisión.'), + (46900, 'Boceto: ojo de Zul deslumbrante', 'Boceto: ojo de Zul deslumbrante', 'Te enseña a tallar un ojo de Zul deslumbrante.', 'Te enseña a tallar un ojo de Zul deslumbrante.'), + (46902, 'Boceto: ojo de Zul intemporal', 'Boceto: ojo de Zul intemporal', 'Te enseña a tallar un ojo de Zul intemporal.', 'Te enseña a tallar un ojo de Zul intemporal.'), + (46903, 'Boceto: ojo de Zul vidente', 'Boceto: ojo de Zul vidente', 'Te enseña a tallar un ojo de Zul vidente.', 'Te enseña a tallar un ojo de Zul vidente.'), + (41101,'Glifo de Escudo de vengador','Glifo de Escudo de vengador','',''), + (41107,'Glifo de Cólera vengativa','Glifo de Cólera vengativa','',''), + (45743,'Glifo de Tormenta divina','Glifo de Tormenta divina','',''), + (41105,'Glifo de Destello de Luz','Glifo de Destello de Luz','',''), + (41106,'Glifo de Luz Sagrada','Glifo de Luz Sagrada','',''), + (41100,'Glifo de Defensa recta','Glifo de Defensa recta','',''), + (41094,'Glifo de Sello de orden','Glifo de Sello de orden','',''), + (41110,'Glifo de Sello de Luz','Glifo de Sello de Luz','',''), + (43868,'Glifo de Sello de rectitud','Glifo de Sello de rectitud','',''), + (43869,'Glifo de Sello de venganza','Glifo de Sello de venganza','',''), + (41109,'Glifo de Sello de sabiduría','Glifo de Sello de sabiduría','',''), + (45744,'Glifo de Escudo de rectitud','Glifo de Escudo de rectitud','',''), + (45760,'Glifo de Supresión de dolor','Glifo de Supresión de dolor','',''), + (42407,'Glifo de sombra','Glifo de sombra','',''), + (42417,'Glifo de Espíritu redentor','Glifo de Espíritu redentor','',''), + (42965,'Glifo de Golpe fantasmal','Glifo de Golpe fantasmal','',''), + (45761,'Glifo de Hambre de sangre','Glifo de Hambre de sangre','',''), + (42971,'Glifo de vigor','Glifo de vigor','',''), + (43380,'Glifo de Esfumarse','Glifo de Esfumarse','',''), + (48720,'Glifo de Zarpa','Glifo de Zarpa','',''), + (40899,'Glifo de Bramido','Glifo de Bramido','',''), + (46372,'Glifo de Instintos de supervivencia','Glifo de Instintos de supervivencia','',''), + (50125,'Glifo de Rejuvenecimiento rápido','Glifo de Rejuvenecimiento rápido','',''), + (40903,'Glifo de Arañazo','Glifo de Arañazo','',''), + (45603,'Glifo de Nutrir','Glifo de Nutrir','',''), + (43335,'Glifo de lo Salvaje','Glifo de lo Salvaje','',''), + (42899,'Glifo de la bestia','Glifo de la bestia','',''), + (42901,'Glifo de Aspecto de la víbora','Glifo de Aspecto de la víbora','',''), + (45733,'Glifo de Trampa explosiva','Glifo de Trampa explosiva','',''), + (42906,'Glifo de Trampa de Escarcha','Glifo de Trampa de Escarcha','',''), + (42907,'Glifo de Marca del cazador','Glifo de Marca del cazador','',''), + (42909,'Glifo de halcón','Glifo de halcón','',''), + (42910,'Glifo de Multidisparo','Glifo de Multidisparo','',''), + (42915,'Glifo de Aura de disparo certero','Glifo de Aura de disparo certero','',''), + (42916,'Glifo de Salva','Glifo de Salva','',''), + (43350,'Glifo de Aliviar mascota','Glifo de Aliviar mascota','',''), + (43354,'Glifo de fuerza poseída','Glifo de fuerza poseída','',''), + (43355,'Glifo de la manada','Glifo de la manada','',''), + (42734,'Glifo de Deflagración Arcana','Glifo de Deflagración Arcana','',''), + (50045,'Glifo de Agua eterna','Glifo de Agua eterna','',''), + (42740,'Glifo de Explosión de Fuego','Glifo de Explosión de Fuego','',''), + (42743,'Glifo de Armadura de hielo','Glifo de Armadura de hielo','',''), + (42747,'Glifo de Agostar','Glifo de Agostar','',''), + (45737,'Glifo de Bomba viva','Glifo de Bomba viva','',''), + (42750,'Glifo de Gema de maná','Glifo de Gema de maná','',''), + (42753,'Glifo de Eliminar maldición','Glifo de Eliminar maldición','',''), + (42754,'Glifo de Elemental de agua','Glifo de Elemental de agua','',''), + (43339,'Glifo de Intelecto Arcano','Glifo de Intelecto Arcano','',''), + (43357,'Glifo de Resguardo contra el Fuego','Glifo de Resguardo contra el Fuego','',''), + (43359,'Glifo de Armadura de Escarcha','Glifo de Armadura de Escarcha','',''), + (43360,'Glifo de Resguardo contra la Escarcha','Glifo de Resguardo contra la Escarcha','',''), + (41096,'Glifo de Protección divina','Glifo de Protección divina','',''), + (43366,'Glifo de Bendición de sabiduría','Glifo de Bendición de sabiduría','',''), + (43368,'Glifo de Captar no-muertos','Glifo de Captar no-muertos','',''), + (43369,'Glifo del Sabio','Glifo del Sabio','',''), + (45758,'Glifo de Himno de esperanza','Glifo de Himno de esperanza','',''), + (42405,'Glifo de Control mental','Glifo de Control mental','',''), + (45757,'Glifo de Abrasamiento mental','Glifo de Abrasamiento mental','',''), + (41541,'Glifo de Maestría en Agua','Glifo de Maestría en Agua','',''), + (45776,'Glifo de Tótem de cólera','Glifo de Tótem de cólera','',''), + (41538,'Glifo de Tótem Marea de maná','Glifo de Tótem Marea de maná','',''), + (41535,'Glifo de Ola de sanación inferior','Glifo de Ola de sanación inferior','',''), + (41524,'Glifo de Lava','Glifo de Lava','',''), + (43386,'Glifo de Escudo de agua','Glifo de Escudo de agua','',''), + (42456,'Glifo de Maldición de agonía','Glifo de Maldición de agonía','',''), + (50077,'Glifo de descomposición presurosa','Glifo de descomposición presurosa','',''), + (42466,'Glifo de Dolor abrasador','Glifo de Dolor abrasador','',''), + (42469,'Glifo de Succionar vida','Glifo de Succionar vida','',''), + (43394,'Glifo de almas','Glifo de almas','',''), + (43391,'Glifo de Kilrogg','Glifo de Kilrogg','',''), + (43420,'Glifo de insultos barbáricos','Glifo de insultos barbáricos','',''), + (43425,'Glifo de Bloqueo','Glifo de Bloqueo','',''), + (43412,'Glifo de Sed de sangre','Glifo de Sed de sangre','',''), + (45794,'Glifo de Regeneración iracunda','Glifo de Regeneración iracunda','',''), + (43416,'Glifo de Ejecutar','Glifo de Ejecutar','',''), + (43417,'Glifo de Seccionar','Glifo de Seccionar','',''), + (43418,'Glifo de Golpe heroico','Glifo de Golpe heroico','',''), + (43426,'Glifo de Última carga','Glifo de Última carga','',''), + (43423,'Glifo de Desgarrar','Glifo de Desgarrar','',''), + (43429,'Glifo de Provocar','Glifo de Provocar','',''), + (45793,'Glifo de Vigilancia','Glifo de Vigilancia','',''), + (43432,'Glifo de Torbellino','Glifo de Torbellino','',''), + (43398,'Glifo de Falsa arremetida','Glifo de Falsa arremetida','',''), + (49084,'Glifo de orden','Glifo de orden','',''), + (43397,'Glifo de Cargar','Glifo de Cargar','',''), + (43396,'Glifo de Ira rabiosa','Glifo de Ira rabiosa','',''), + (40114,'Rubí cárdeno brillante','Rubí cárdeno brillante','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (40117,'Rubí cárdeno fracturado','Rubí cárdeno fracturado','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (40113,'Rubí cárdeno rúnico','Rubí cárdeno rúnico','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (40115,'Rubí cárdeno sutil','Rubí cárdeno sutil','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (32197,'Espinela carmesí brillante','Espinela carmesí brillante','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (32196,'Espinela carmesí rúnica','Espinela carmesí rúnica','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (32198,'Espinela carmesí sutil','Espinela carmesí sutil','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (32195,'Lágrima de espinela carmesí','Lágrima de espinela carmesí','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (39999,'Rubí escarlata brillante','Rubí escarlata brillante','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (40002,'Rubí escarlata fracturado','Rubí escarlata fracturado','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (39998,'Rubí escarlata rúnico','Rubí escarlata rúnico','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (24031,'Rubí vivo brillante','Rubí vivo brillante','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (24030,'Rubí vivo rúnico','Rubí vivo rúnico','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (24032,'Rubí vivo sutil','Rubí vivo sutil','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (24029,'Lágrima de rubí vivo','Lágrima de rubí vivo','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (39907,'Sangrita sutil','Sangrita sutil','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (39906,'Sangrita brillante','Sangrita brillante','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (39909,'Sangrita fracturada','Sangrita fracturada','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (39911,'Sangrita rúnica','Sangrita rúnica','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (23096,'Granate de sangre rúnico','Granate de sangre rúnico','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (28595,'Granate de sangre brillante','Granate de sangre brillante','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (23094,'Lágrima de granate de sangre','Lágrima de granate de sangre','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (40175,'Ojo de Zul deslumbrante','Ojo de Zul deslumbrante','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40167,'Ojo de Zul duradero','Ojo de Zul duradero','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40174,'Ojo de Zul intrincado','Ojo de Zul intrincado','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40165,'Ojo de Zul irregular','Ojo de Zul irregular','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40177,'Ojo de Zul luminiscente','Ojo de Zul luminiscente','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40178,'Ojo de Zul opaco','Ojo de Zul opaco','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40170,'Ojo de Zul vidente','Ojo de Zul vidente','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40172,'Ojo de Zul brillante','Ojo de Zul brillante','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40176,'Ojo de Zul hendido','Ojo de Zul hendido','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40181,'Ojo de Zul tenso','Ojo de Zul tenso','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40164,'Ojo de Zul intemporal','Ojo de Zul intemporal','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40166,'Ojo de Zul vívido','Ojo de Zul vívido','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (32225,'Esmeralda de espuma marina deslumbrante','Esmeralda de espuma marina deslumbrante.','Encaja en una ranura de color amarillo o azul','Encaja en una ranura de color amarillo o azul.'), + (32223,'Esmeralda de espuma marina duradera','Esmeralda de espuma marina duradera.','Encaja en una ranura de color amarillo o azul','Encaja en una ranura de color amarillo o azul.'), + (32226,'Esmeralda de espuma marina irregular','Esmeralda de espuma marina irregular.','Encaja en una ranura de color amarillo o azul','Encaja en una ranura de color amarillo o azul.'), + (40094,'Esmeralda del bosque deslumbrante','Esmeralda del bosque deslumbrante','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40089,'Esmeralda del bosque duradera','Esmeralda del bosque duradera','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40104,'Esmeralda del bosque intrincada','Esmeralda del bosque intrincada','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40100,'Esmeralda del bosque luminiscente','Esmeralda del bosque luminiscente','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40103,'Esmeralda del bosque opaca','Esmeralda del bosque opaca','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40092,'Esmeralda del bosque de vidente','Esmeralda del bosque de vidente','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40099,'Esmeralda del bosque brillante','Esmeralda del bosque brillante','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40096,'Esmeralda del bosque hendida','Esmeralda del bosque hendida','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40101,'Esmeralda del bosque tensa','Esmeralda del bosque tensa','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40085,'Esmeralda del bosque intemporal','Esmeralda del bosque intemporal','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40088,'Esmeralda del bosque vívida','Esmeralda del bosque vívida','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (24065,'Talasita deslumbrante','Talasita deslumbrante','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (24062,'Talasita duradera','Talasita duradera','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (24067,'Talasita irregular','Talasita irregular','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39984,'Jade oscuro deslumbrante','Jade oscuro deslumbrante','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39976,'Jade oscuro duradero','Jade oscuro duradero','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39983,'Jade oscuro intrincado','Jade oscuro intrincado','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39986,'Jade oscuro luminiscente','Jade oscuro luminiscente','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39988,'Jade oscuro opaco','Jade oscuro opaco','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39979,'Jade oscuro vidente','Jade oscuro vidente','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39981,'Jade oscuro brillante','Jade oscuro brillante','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39985,'Jade oscuro hendido','Jade oscuro hendido','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39991,'Jade oscuro tenso','Jade oscuro tenso','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39968,'Jade oscuro intemporal','Jade oscuro intemporal','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (39975,'Jade oscuro vívido','Jade oscuro vívido','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (23106,'Peridoto intenso deslumbrante','Peridoto intenso deslumbrante','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (23105,'Peridoto intenso duradero','Peridoto intenso duradero','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (23104,'Peridoto intenso irregular','Peridoto intenso irregular','Encaja en una ranura de color amarillo o azul.','Encaja en una ranura de color amarillo o azul.'), + (40154,'Ametrino durable','Ametrino durable','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40158,'Ametrino potenciado','Ametrino potenciado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40161,'Ametrino de luz trémula','Ametrino de luz trémula','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40149,'Ametrino iluminado','Ametrino iluminado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40145,'Ametrino resplandeciente','Ametrino resplandeciente','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40159,'Ametrino diestro','Ametrino diestro','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40156,'Ametrino maligno','Ametrino maligno','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (32220,'Piropiedra destelleante','Piropiedra destelleante','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (32219,'Piropiedra luminosa','Piropiedra luminosa','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo'), + (32221,'Piropiedra velada','Piropiedra velada','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (32222,'Piropiedra maligna','Piropiedra maligna','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40058,'Topacio monarca de precisión','Topacio monarca de precisión','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40046,'Topacio monarca diestro','Topacio monarca diestro','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40050,'Topacio monarca durable','Topacio monarca durable','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40054,'Topacio monarca potenciado','Topacio monarca potenciado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40038,'Topacio monarca grabado','Topacio monarca grabado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40057,'Topacio monarca de luz trémula','Topacio monarca de luz trémula','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40044,'Topacio monarca destellante','Topacio monarca destellante','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40045,'Topacio monarca iluminado','Topacio monarca iluminado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40047,'Topacio monarca luminoso','Topacio monarca luminoso','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40053,'Topacio monarca prístino','Topacio monarca prístino','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40055,'Topacio monarca completo','Topacio monarca completo','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40049,'Topacio monarca velado','Topacio monarca velado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40052,'Topacio monarca maligno','Topacio monarca maligno','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (24061,'Topacio noble destellante','Topacio noble destellante','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (24060,'Topacio noble temerario','Topacio noble temerario','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (31867,'Topacio noble velado','Topacio noble velado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (31868,'Topacio noble maligno','Topacio noble maligno','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39965,'Citrino enorme de luz trémula','Citrino enorme de luz trémula','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39966,'Citrino enorme de precisión','Citrino enorme de precisión','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39958,'Citrino enorme durable','Citrino enorme durable','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39962,'Citrino enorme potenciado','Citrino enorme potenciado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39948,'Citrino enorme grabado','Citrino enorme grabado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39953,'Citrino enorme destellante','Citrino enorme destellante','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39954,'Citrino enorme iluminado','Citrino enorme iluminado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39946,'Citrino enorme luminoso','Citrino enorme luminoso','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39961,'Citrino enorme prístino','Citrino enorme prístino','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39963,'Citrino enorme completo','Citrino enorme completo','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39957,'Citrino enorme velado','Citrino enorme velado','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (39960,'Citrino enorme maligno','Citrino enorme maligno','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (31866,'Espesartita de llamas velada','Espesartita de llamas velada','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (31869,'Espesartita de llamas maligna','Espesartita de llamas maligna','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (23100,'Espesartita de llamas destellante','Espesartita de llamas destellante','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (23099,'Espesartita de llamas luminosa','Espesartita de llamas luminosa','Encaja en una ranura de color rojo o amarillo.','Encaja en una ranura de color rojo o amarillo.'), + (40136,'Piedra de terror equilibrada','Piedra de terror equilibrada','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40132,'Piedra de terror resplandeciente','Piedra de terror resplandeciente','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40137,'Piedra de terror imbuida','Piedra de terror imbuida','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40138,'Piedra de terror regia','Piedra de terror regia','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40134,'Piedra de terror real','Piedra de terror real','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40131,'Piedra de terror de tenuidad','Piedra de terror de tenuidad','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (32213,'Amatista Cantosombrío equilibrada','Amatista Cantosombrío equilibrada','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (32215,'Amatista Cantosombrío resplandeciente','Amatista Cantosombrío resplandeciente','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (32214,'Amatista Cantosombrío imbuida','Amatista Cantosombrío imbuida','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (32216,'Amatista Cantosombrío real','Amatista Cantosombrío real','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40029,'Ópalo crepuscular equilibrado','Ópalo crepuscular equilibrado','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40025,'Ópalo crepuscular resplandeciente','Ópalo crepuscular resplandeciente','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40030,'Ópalo crepuscular imbuido','Ópalo crepuscular imbuido','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40033,'Ópalo crepuscular enjundioso','Ópalo crepuscular enjundioso','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40031,'Ópalo crepuscular regio','Ópalo crepuscular regio','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40027,'Ópalo crepuscular real','Ópalo crepuscular real','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (40024,'Ópalo crepuscular de tenuidad','Ópalo crepuscular de tenuidad','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (31863,'Ojo de noche equilibrado','Ojo de noche equilibrado','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (24056,'Ojo de noche resplandeciente','Ojo de noche resplandeciente','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (31865,'Ojo de noche imbuido','Ojo de noche imbuido','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (35707,'Ojo de noche regio','Ojo de noche regio','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (24057,'Ojo de noche real','Ojo de noche real','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (39938,'Cristal de Sombras regio','Cristal de Sombras regio','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (39937,'Cristal de Sombras equilibrado','Cristal de Sombras equilibrado','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (39936,'Cristal de Sombras resplandeciente','Cristal de Sombras resplandeciente','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (39944,'Cristal de Sombras imbuido','Cristal de Sombras imbuido','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (39933,'Cristal de Sombras enjudioso','Cristal de Sombras enjudioso','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (39943,'Cristal de Sombras real','Cristal de Sombras real','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (39942,'Cristal de Sombras de tenuidad','Cristal de Sombras de tenuidad','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (31862,'Draenita de Sombras equilibrada','Draenita de Sombras equilibrada','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (31864,'Draenita de Sombras imbuida','Draenita de Sombras imbuida','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (23109,'Draenita de Sombras real','Draenita de Sombras real','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (23108,'Draenita de Sombras resplandeciente','Draenita de Sombras resplandeciente','Encaja en una ranura de color rojo o azul.','Encaja en una ranura de color rojo o azul.'), + (42701,'Perla encantada','Perla encantada','Encaja en una ranura de color rojo, amarillo o azul. Solo puedes encajar una en tu equipo.','Encaja en una ranura de color rojo, amarillo o azul. Solo puedes encajar una en tu equipo.'), + (36766,'Ojo de dragón brillante','Ojo de dragón brillante','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (42153,'Ojo de dragón fracturado','Ojo de dragón fracturado','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (42146,'Ojo de dragón lustroso','Ojo de dragón lustroso','Encaja en una ranura de color azul.','Encaja en una ranura de color azul.'), + (42144,'Ojo de dragón rúnico','Ojo de dragón rúnico','Encaja en una ranura de color rojo.','Encaja en una ranura de color rojo.'), + (42157,'Ojo de dragón grueso','Ojo de dragón grueso','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (41377,'Diamante de llama celeste refulgente','Diamante de llama celeste refulgente','Solo encaja en una ranura de gema meta.','Solo encaja en una ranura de gema meta.'), + (32202,'Zafiro empíreo luciente','Zafiro empíreo luciente','Encaja en una ranura de color azul.','Encaja en una ranura de color azul.'), + (32200,'Zafiro empíreo sólido','Zafiro empíreo sólido','Encaja en una ranura de color azul.','Encaja en una ranura de color azul.'), + (40123,'Ámbar del rey luminoso','Ámbar del rey luminoso','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (39349,'Vitela de arma','Vitela de arma','Se puede marcar como el objetivo de varios encantamientos de armas para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos sin restricciones de nivel.','Se puede marcar como el objetivo de varios encantamientos de armas para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos sin restricciones de nivel.'), + (39350,'Vitela de arma II','Vitela de arma II','Se puede marcar como el objetivo de varios encantamientos de armas para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos con restricciones de nivel 35 o inferior.','Se puede marcar como el objetivo de varios encantamientos de armas para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos con restricciones de nivel 35 o inferior.'), + (43146,'Vitela de arma III','Vitela de arma III','Se puede marcar como el objetivo de varios encantamientos de armas para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos con restricciones de nivel 60 o inferior.','Se puede marcar como el objetivo de varios encantamientos de armas para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos con restricciones de nivel 60 o inferior.'), + (38682,'Vitela de armadura','Vitela de armadura','Se puede marcar como el objetivo de varios encantamientos de armadura para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos sin restricciones de nivel.','Se puede marcar como el objetivo de varios encantamientos de armadura para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos sin restricciones de nivel.'), + (37602,'Vitela de armadura II','Vitela de armadura II','Se puede marcar como el objetivo de varios encantamientos de armadura para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos con restricciones de nivel 35 o inferior.','Se puede marcar como el objetivo de varios encantamientos de armadura para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos con restricciones de nivel 35 o inferior.'), + (43145,'Vitela de armadura III','Vitela de armadura III','Se puede marcar como el objetivo de varios encantamientos de armadura para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos con restricciones de nivel 60 o inferior.','Se puede marcar como el objetivo de varios encantamientos de armadura para almacenar el encantamiento y usarlo más tarde. Solo puede absorber encantamientos con restricciones de nivel 60 o inferior.'), + (40121,'Circón majestuoso luciente','Circón majestuoso luciente','Encaja en una ranura de color azul.','Encaja en una ranura de color azul.'), + (40010,'Zafiro celestial luciente','Zafiro celestial luciente','Encaja en una ranura de color azul.','Encaja en una ranura de color azul.'), + (24037,'Estrella de Eluna luciente','Estrella de Eluna luciente','Encaja en una ranura de color azul.','Encaja en una ranura de color azul.'), + (39927,'Calcedonia lustrosa','Calcedonia lustrosa','Encaja en una ranura de color azul.','Encaja en una ranura de color azul.'), + (39920,'Calcedonia brillante','Calcedonia brillante','Encaja en una ranura de color azul.','Encaja en una ranura de color azul.'), + (23121,'Piedra lunar azur luciente','Piedra lunar azur luciente','Encaja en una ranura de color azul.','Encaja en una ranura de color azul.'), + (40125,'Ámbar del rey rígido','Ámbar del rey rígido','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (40126,'Ámbar del rey grueso','Ámbar del rey grueso','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (32204,'Ojo de león luminoso','Ojo de león luminoso','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (32207,'Ojo de león reluciente','Ojo de león reluciente','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (32210,'Gran ojo de león','Gran ojo de león','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (32206,'Ojo de león rígido','Ojo de león rígido','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (32208,'Ojo de león grueso','Ojo de león grueso','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (40012,'Brillo de otoño luminoso','Brillo de otoño luminoso','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (40014,'Brillo de otoño rígido','Brillo de otoño rígido','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (40015,'Brillo de otoño grueso','Brillo de otoño grueso','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (24047,'Piedra del alba luminosa','Piedra del alba luminosa','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (24050,'Piedra del alba reluciente','Piedra del alba reluciente','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (31861,'Gran piedra del alba ','Gran piedra del alba ','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (24051,'Piedra del alba rígida','Piedra del alba rígida','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (24052,'Piedra del alba gruesa','Piedra del alba gruesa','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (39912,'Cristal de sol luminoso','Cristal de sol luminoso','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (39915,'Cristal de sol rígido','Cristal de sol rígido','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (39916,'Cristal de sol grueso','Cristal de sol grueso','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (31860,'Gran draenita dorada','Gran draenita dorada','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (23116,'Draenita dorada rígida','Draenita dorada rígida','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (23115,'Draenita dorada gruesa','Draenita dorada gruesa','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (23114,'Draenita dorada reluciente','Draenita dorada reluciente','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'), + (23113,'Draenita dorada luminosa','Draenita dorada luminosa','Encaja en una ranura de color amarillo.','Encaja en una ranura de color amarillo.'); + +INSERT INTO `locales_update` (`entry`, `name_loc6`, `name_loc7`, `description_loc6`) VALUES + (41580,'Boceto: brillo de otoño rígido','Boceto: brillo de otoño rígido','Te enseña a tallar un brillo de otoño rígido.'), + (41581,'Boceto: zafiro celestial luciente','Boceto: zafiro celestial luciente','Te enseña a tallar un zafiro celestial luciente.'), + (41582,'Boceto: topacio monarca destellante','Boceto: topacio monarca destellante','Te enseña a tallar un topacio monarca destellante.'), + (41687,'Boceto: topacio monarca completo','Boceto: topacio monarca completo','Te enseña a tallar un topacio monarca completo.'), + (41688,'Boceto: topacio monarca velado','Boceto: topacio monarca velado','Te enseña a tallar un topacio monarca velado.'), + (41689,'Boceto: topacio monarca luminoso','Boceto: topacio monarca luminoso','Te enseña a tallar un topacio monarca luminoso.'), + (41696,'Boceto: esmeralda del bosque luminiscente','Boceto: esmeralda del bosque luminiscente','Te enseña a tallar una esmeralda del bosque luminiscente.'), + (41694,'Boceto: esmeralda del bosque intrincada','Boceto: esmeralda del bosque intrincada','Te enseña a tallar una esmeralda del bosque intrincada.'), + (40140,'Piedra de terror enjundiosa','Piedra de terror enjundiosa','Encaja en una ranura de color rojo o azul.'), + (41697,'Boceto: esmeralda del bosque duradera','Boceto: esmeralda del bosque duradera','Te enseña a tallar una esmeralda del bosque duradera.'), + (41699,'Boceto: esmeralda del bosque de vidente','Boceto: esmeralda del bosque de vidente','Te enseña a tallar una esmeralda del bosque de vidente.'), + (41701,'Boceto: ópalo crepuscular real','Boceto: ópalo crepuscular real','Te enseña a tallar un ópalo crepuscular real.'), + (41702,'Boceto: ópalo crepuscular enjundioso','Boceto: ópalo crepuscular enjundioso','Te enseña a tallar un ópalo crepuscular enjundioso.'), + (41703,'Boceto: ópalo crepuscular regio','Boceto: ópalo crepuscular regio','Te enseña a tallar un ópalo crepuscular regio.'), + (41705,'Boceto: diamante de llama celeste refulgente','Boceto: diamante de llama celeste refulgente','Te enseña a tallar un diamante de llama celeste refulgente.'), + (42299,'Boceto: ojo de dragón brillante','Boceto: ojo de dragón brillante','Te enseña a tallar un ojo de dragón brillante.'), + (42303,'Boceto: ojo de dragón fracturado','Boceto: ojo de dragón fracturado','Te enseña a tallar un ojo de dragón fracturado.'), + (42304,'Boceto: ojo de dragón lustroso','Boceto: ojo de dragón lustroso','Te enseña a tallar un ojo de dragón lustroso.'), + (42309,'Boceto: ojo de dragón rúnico','Boceto: ojo de dragón rúnico','Te enseña a tallar un ojo de dragón rúnico.'), + (42315,'Boceto: ojo de dragón grueso','Boceto: ojo de dragón grueso','Te enseña a tallar un ojo de dragón grueso.'), + (46934,'Boceto: piedra de terror equilibrada','Boceto: piedra de terror equilibrada','Te enseña a tallar una piedra de terror equilibrada.'), + (46952,'Boceto: ametrino durable','Boceto: ametrino durable','Te enseña a tallar un ametrino durable.'), + (47016,'Boceto: ametrino potenciado','Boceto: ametrino potenciado','Te enseña a tallar un ametrino potenciado.'), + (46921,'Boceto: rubí cárdeno fracturado','Boceto: rubí cárdeno fracturado','Te enseña a tallar un rubí cárdeno fracturado.'), + (47012,'Boceto: ametrino de luz trémula','Boceto: ametrino de luz trémula','Te enseña a tallar un ametrino de luz trémula.'), + (46945,'Boceto: piedra de terror imbuida','Boceto: piedra de terror imbuida','Te enseña a tallar una piedra de terror imbuida.'), + (46901,'Boceto: ojo de Zul irregular','Boceto: ojo de Zul irregular','Te enseña a tallar un ojo de Zul irregular.'), + (46909,'Boceto: ojo de Zul luminiscente','Boceto: ojo de Zul luminiscente','Te enseña a tallar un ojo de Zul luminiscente.'), + (47021,'Boceto: ametrino iluminado','Boceto: ametrino iluminado','Te enseña a tallar un ametrino iluminado.'), + (46927,'Boceto: circón majestuoso luciente','Boceto: circón majestuoso luciente','Te enseña a tallar un circón majestuoso luciente.'), + (49112,'Boceto: Lágrima de pesadilla','Boceto: Lágrima de pesadilla','Te enseña a tallar una Lágrima de pesadilla.'), + (46914,'Boceto: ojo de Zul opaco','Boceto: ojo de Zul opaco','Te enseña a tallar un ojo de Zul opaco.'), + (46944,'Boceto: piedra de terror enjundiosa','Boceto: piedra de terror enjundiosa','Te enseña a tallar una piedra de terror enjundiosa.'), + (46940,'Boceto: piedra de terror regia','Boceto: piedra de terror regia','Te enseña a tallar una piedra de terror regia.'), + (47018,'Boceto: ametrino resplandeciente','Boceto: ametrino resplandeciente','Te enseña a tallar un ametrino resplandeciente.'), + (46928,'Boceto: ámbar del rey rígido','Boceto: ámbar del rey rígido','Te enseña a tallar un ámbar del rey rígido.'), + (46939,'Boceto: piedra de terror real','Boceto: piedra de terror real','Te enseña a tallar una piedra de terror real.'), + (46916,'Boceto: rubí cárdeno rúnico','Boceto: rubí cárdeno rúnico','Te enseña a tallar un rubí cárdeno rúnico.'), + (46907,'Boceto: ojo de Zul brillante','Boceto: ojo de Zul brillante','Te enseña a tallar un ojo de Zul brillante.'), + (46922,'Boceto: rubí cárdeno sutil','Boceto: rubí cárdeno sutil','Te enseña a tallar un rubí cárdeno sutil.'), + (46906,'Boceto: ojo de Zul hendido','Boceto: ojo de Zul hendido','Te enseña a tallar un ojo de Zul hendido.'), + (46908,'Boceto: ojo de Zul tenso','Boceto: ojo de Zul tenso','Te enseña a tallar un ojo de Zul tenso.'), + (46946,'Boceto: piedra de terror de tenuidad','Boceto: piedra de terror de tenuidad','Te enseña a tallar una piedra de terror de tenuidad.'), + (46931,'Boceto: ámbar del rey grueso','Boceto: ámbar del rey grueso','Te enseña a tallar un ámbar del rey grueso.'), + (46899,'Boceto: ojo de Zul vívido','Boceto: ojo de Zul vívido','Te enseña a tallar un ojo de Zul vívido.'), + (47011,'Boceto: ametrino maligno','Boceto: ametrino maligno','Te enseña a tallar un ametrino maligno.'), + (52023,'Diseño: Flecha de hoja de hielo','Diseño: Flecha de hoja de hielo','Te enseña a hacer flechas de hoja de hielo.'), + (52022,'Diseño: Balas destrozadoras','Diseño: Balas destrozadoras','Te enseña a hacer balas destrozadoras.'), + (50166,'Técnica: Glifo de Agua eterna','Técnica: Glifo de Agua eterna','Te enseña a inscribir un Glifo de Agua eterna.'), + (50168,'Técnica: Glifo de descomposición presurosa','Técnica: Glifo de descomposición presurosa','Te enseña a inscribir un Glifo de descomposición presurosa.'), + (50167,'Técnica: Glifo de Rejuvenecimiento rápido','Técnica: Glifo de Rejuvenecimiento rápido','Te enseña a inscribir un Glifo de Rejuvenecimiento rápido.'), + (43826,'Glifo de Golpe sangriento','Glifo de Golpe sangriento',''), + (43538,'Glifo de Orden oscura','Glifo de Orden oscura',''), + (45804,'Glifo de muerte oscura','Glifo de muerte oscura',''), + (45805,'Glifo de enfermedad','Glifo de enfermedad',''), + (43545,'Glifo de Entereza ligada al hielo','Glifo de Entereza ligada al hielo',''), + (43548,'Glifo de Golpe de peste','Glifo de Golpe de peste',''), + (43549,'Glifo del necrófago','Glifo del necrófago',''), + (43553,'Glifo de Armadura inquebrantable','Glifo de Armadura inquebrantable',''), + (45803,'Glifo de Añublo profano','Glifo de Añublo profano',''), + (43671,'Glifo de Deflagración de cadáver','Glifo de Deflagración de cadáver',''), + (43672,'Glifo de Pestilencia','Glifo de Pestilencia',''), + (43673,'Glifo de Levantar a muerto','Glifo de Levantar a muerto',''); + +UPDATE `locales_item`, `locales_update` SET `locales_item`.`name_loc6` = `locales_update`.`name_loc6`, `locales_item`.`name_loc7` = `locales_update`.`name_loc7`, `locales_item`.`description_loc6` = `locales_update`.`description_loc6`, `locales_item`.`description_loc7` = `locales_update`.`description_loc7` + WHERE `locales_item`.`entry` = `locales_update`.`entry`; + +DROP TABLE `locales_update`; +UPDATE `locales_item` SET `description_loc7` = `description_loc6` WHERE `entry` IN (41580,41581,41582,41687,41688,41689,41696,41694,41697,41699,41701,41702,41703,41705,42299,42303,42304,42309,42315,46934,46952,47016,46921,47012,46945,46901,46909,47021,46927,49112,46914,46944,46940,47018,46928,46939,46916,46907,46922,46906,46908,46946,46931,46899,47011,52023,52022,50166,50168,50167,43826,43538,45804,45805,43545,43548,43549,43553,45803,43671,43672,43673); From 0c9e39f1510c838cb3c84fc7502db9dd00bd4771 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 7 Feb 2015 09:12:25 +0100 Subject: [PATCH 30/32] DB/Quest: A Friendly Chat By nelegalno, closes #5262 --- sql/updates/world/2015_02_07_00_world.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sql/updates/world/2015_02_07_00_world.sql diff --git a/sql/updates/world/2015_02_07_00_world.sql b/sql/updates/world/2015_02_07_00_world.sql new file mode 100644 index 00000000000..c0616f833ea --- /dev/null +++ b/sql/updates/world/2015_02_07_00_world.sql @@ -0,0 +1,14 @@ +-- A Friendly Chat... (24576, 24657) +-- Snivel Rustrocket set gossip flag +UPDATE `creature_template` SET `npcflag` = 1, `AIName`='SmartAI' WHERE `entry` = 37715; + +-- Quest credit SAI +DELETE FROM `smart_scripts` WHERE (`entryorguid`=37715 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 +(37715,0,0,0,62,0,100,0,10946,0,0,0,11,70646,2,0,0,0,0,7,0,0,0,0,0,0,0, "Snivel Rustrocket - on gosip 10947 - cast Love - Create Snivel's Ledger"); + +-- Gossip option conditions +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId`=15 AND `SourceGroup`=10929); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,10929,0,0,9,24576,0,0,0,'','Show gossip only if plaer have A Friendly Chat... Horde quest'), +(15,10929,0,1,9,24657,0,0,0,'','Show gossip only if plaer have A Friendly Chat... Alliance quest'); From d4dac7e1619cd2e06b239b3062fc46b76fc5cc5b Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Fri, 6 Feb 2015 19:11:42 +0200 Subject: [PATCH 31/32] Fix AHBot Buyer buyin, bidding and enhance logic --- .../game/AuctionHouseBot/AuctionHouseBot.cpp | 20 +- .../game/AuctionHouseBot/AuctionHouseBot.h | 18 +- .../AuctionHouseBot/AuctionHouseBotBuyer.cpp | 603 +++++++++--------- .../AuctionHouseBot/AuctionHouseBotBuyer.h | 31 +- src/server/worldserver/worldserver.conf.dist | 57 +- 5 files changed, 388 insertions(+), 341 deletions(-) diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBot.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBot.cpp index 7e8ccb4bb23..9c616e49457 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBot.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBot.cpp @@ -203,15 +203,25 @@ void AuctionBotConfig::GetConfigFromFile() SetConfig(CONFIG_AHBOT_MINTIME, "AuctionHouseBot.MinTime", 1); SetConfig(CONFIG_AHBOT_MAXTIME, "AuctionHouseBot.MaxTime", 72); - - SetConfigMinMax(CONFIG_AHBOT_BUYER_CHANCE_RATIO_ALLIANCE, "AuctionHouseBot.Buyer.Alliance.Chance.Ratio", 3, 1, 100); - SetConfigMinMax(CONFIG_AHBOT_BUYER_CHANCE_RATIO_HORDE, "AuctionHouseBot.Buyer.Horde.Chance.Ratio", 3, 1, 100); - SetConfigMinMax(CONFIG_AHBOT_BUYER_CHANCE_RATIO_NEUTRAL, "AuctionHouseBot.Buyer.Neutral.Chance.Ratio", 3, 1, 100); + SetConfigMinMax(CONFIG_AHBOT_BUYER_RECHECK_INTERVAL, "AuctionHouseBot.Buyer.Recheck.Interval", 20, 1, DAY / MINUTE); + SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_GRAY, "AuctionHouseBot.Buyer.Baseprice.Gray", 3504); + SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_WHITE, "AuctionHouseBot.Buyer.Baseprice.White", 5429); + SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_GREEN, "AuctionHouseBot.Buyer.Baseprice.Green", 21752); + SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_BLUE, "AuctionHouseBot.Buyer.Baseprice.Blue", 36463); + SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_PURPLE, "AuctionHouseBot.Buyer.Baseprice.Purple", 87124); + SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_ORANGE, "AuctionHouseBot.Buyer.Baseprice.Orange", 214347); + SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_YELLOW, "AuctionHouseBot.Buyer.Baseprice.Yellow", 407406); + SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_GRAY, "AuctionHouseBot.Buyer.ChanceMultiplier.Gray", 100); + SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_WHITE, "AuctionHouseBot.Buyer.ChanceMultiplier.White", 100); + SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_GREEN, "AuctionHouseBot.Buyer.ChanceMultiplier.Green", 100); + SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_BLUE, "AuctionHouseBot.Buyer.ChanceMultiplier.Blue", 100); + SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_PURPLE, "AuctionHouseBot.Buyer.ChanceMultiplier.Purple", 100); + SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_ORANGE, "AuctionHouseBot.Buyer.ChanceMultiplier.Orange", 100); + SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_YELLOW, "AuctionHouseBot.Buyer.ChanceMultiplier.Yellow", 100); SetConfig(CONFIG_AHBOT_SELLER_ENABLED, "AuctionHouseBot.Seller.Enabled", false); SetConfig(CONFIG_AHBOT_BUYER_ENABLED, "AuctionHouseBot.Buyer.Enabled", false); - SetConfig(CONFIG_AHBOT_BUYPRICE_BUYER, "AuctionHouseBot.Buyer.Buyprice", true); SetConfig(CONFIG_AHBOT_CLASS_MISC_MOUNT_MIN_REQ_LEVEL, "AuctionHouseBot.Class.Misc.Mount.ReqLevel.Min", 0); SetConfig(CONFIG_AHBOT_CLASS_MISC_MOUNT_MAX_REQ_LEVEL, "AuctionHouseBot.Class.Misc.Mount.ReqLevel.Max", 0); diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBot.h b/src/server/game/AuctionHouseBot/AuctionHouseBot.h index 964262579e6..29460ba13d7 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBot.h +++ b/src/server/game/AuctionHouseBot/AuctionHouseBot.h @@ -110,10 +110,21 @@ enum AuctionBotConfigUInt32Values CONFIG_AHBOT_CLASS_PERMANENT_PRICE_RATIO, CONFIG_AHBOT_CLASS_MISC_PRICE_RATIO, CONFIG_AHBOT_CLASS_GLYPH_PRICE_RATIO, - CONFIG_AHBOT_BUYER_CHANCE_RATIO_ALLIANCE, - CONFIG_AHBOT_BUYER_CHANCE_RATIO_HORDE, - CONFIG_AHBOT_BUYER_CHANCE_RATIO_NEUTRAL, CONFIG_AHBOT_BUYER_RECHECK_INTERVAL, + CONFIG_AHBOT_BUYER_BASEPRICE_GRAY, + CONFIG_AHBOT_BUYER_BASEPRICE_WHITE, + CONFIG_AHBOT_BUYER_BASEPRICE_GREEN, + CONFIG_AHBOT_BUYER_BASEPRICE_BLUE, + CONFIG_AHBOT_BUYER_BASEPRICE_PURPLE, + CONFIG_AHBOT_BUYER_BASEPRICE_ORANGE, + CONFIG_AHBOT_BUYER_BASEPRICE_YELLOW, + CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_GRAY, + CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_WHITE, + CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_GREEN, + CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_BLUE, + CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_PURPLE, + CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_ORANGE, + CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_YELLOW, CONFIG_AHBOT_CLASS_MISC_MOUNT_MIN_REQ_LEVEL, CONFIG_AHBOT_CLASS_MISC_MOUNT_MAX_REQ_LEVEL, CONFIG_AHBOT_CLASS_MISC_MOUNT_MIN_SKILL_RANK, @@ -143,7 +154,6 @@ enum AuctionBotConfigBoolValues CONFIG_AHBOT_BIND_USE, CONFIG_AHBOT_BIND_QUEST, CONFIG_AHBOT_BUYPRICE_SELLER, - CONFIG_AHBOT_BUYPRICE_BUYER, CONFIG_AHBOT_SELLER_ENABLED, CONFIG_AHBOT_BUYER_ENABLED, CONFIG_AHBOT_LOCKBOX_ENABLED, diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp index af60316cbec..1c336640dcc 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp @@ -20,7 +20,7 @@ #include "ItemPrototype.h" #include "AuctionHouseBotBuyer.h" -AuctionBotBuyer::AuctionBotBuyer(): _checkInterval(20) +AuctionBotBuyer::AuctionBotBuyer() : _checkInterval(20 * MINUTE) { // Define faction for our main data class. for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) @@ -48,35 +48,12 @@ bool AuctionBotBuyer::Initialize() if (!activeHouse) return false; - //load Check interval + // load Check interval _checkInterval = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_RECHECK_INTERVAL) * MINUTE; - TC_LOG_DEBUG("ahbot", "AHBot buyer interval between 2 check = %u", _checkInterval); + TC_LOG_DEBUG("ahbot", "AHBot buyer interval is %u minutes", _checkInterval); return true; } -void AuctionBotBuyer::LoadBuyerValues(BuyerConfiguration& config) -{ - uint32 factionChance; - - switch (config.GetHouseType()) - { - case AUCTION_HOUSE_ALLIANCE: - config.BuyerPriceRatio = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_ALLIANCE_PRICE_RATIO) + 50; - factionChance = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_CHANCE_RATIO_ALLIANCE); - break; - case AUCTION_HOUSE_HORDE: - config.BuyerPriceRatio = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_HORDE_PRICE_RATIO) + 50; - factionChance = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_CHANCE_RATIO_HORDE); - break; - default: - config.BuyerPriceRatio = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_NEUTRAL_PRICE_RATIO) + 50; - factionChance = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_CHANCE_RATIO_NEUTRAL); - break; - } - - config.FactionChance = 5000 * factionChance; -} - void AuctionBotBuyer::LoadConfig() { for (int i = 0; i < MAX_AUCTION_HOUSE_TYPE; ++i) @@ -87,352 +64,378 @@ void AuctionBotBuyer::LoadConfig() } } -uint32 AuctionBotBuyer::GetBuyableEntry(BuyerConfiguration& config) +void AuctionBotBuyer::LoadBuyerValues(BuyerConfiguration& config) +{ + +} + +// Makes an AHbot buyer cycle for AH type if necessary +bool AuctionBotBuyer::Update(AuctionHouseType houseType) +{ + if (!sAuctionBotConfig->GetConfigBuyerEnabled(houseType)) + return false; + + TC_LOG_DEBUG("ahbot", "AHBot: %s buying ...", AuctionBotConfig::GetHouseTypeName(houseType)); + + BuyerConfiguration& config = _houseConfig[houseType]; + uint32 eligibleItems = GetItemInformation(config); + if (eligibleItems) + { + // Prepare list of items to bid or buy - remove old items + PrepareListOfEntry(config); + // Process buying and bidding items + BuyAndBidItems(config); + } + + return true; +} + +// Collects information about item counts and minimum prices to SameItemInfo and updates EligibleItems - a list with new items eligible for bot to buy and bid +// Returns count of items in AH that were eligible for being bought or bidded on by ahbot buyer (EligibleItems size) +uint32 AuctionBotBuyer::GetItemInformation(BuyerConfiguration& config) { config.SameItemInfo.clear(); - uint32 count = 0; time_t now = time(nullptr); + uint32 count = 0; AuctionHouseObject* house = sAuctionMgr->GetAuctionsMap(config.GetHouseType()); for (AuctionHouseObject::AuctionEntryMap::const_iterator itr = house->GetAuctionsBegin(); itr != house->GetAuctionsEnd(); ++itr) { AuctionEntry* entry = itr->second; Item* item = sAuctionMgr->GetAItem(entry->itemGUIDLow); - if (item) + if (!item) + continue; + + BuyerItemInfo& itemInfo = config.SameItemInfo[item->GetEntry()]; + + // Update item entry's count and total bid prices + // This can be used later to determine the prices and chances to bid + uint32 itemBidPrice = entry->startbid / item->GetCount(); + itemInfo.TotalBidPrice = itemInfo.TotalBidPrice + itemBidPrice; + itemInfo.BidItemCount++; + + // Set minimum bid price + if (!itemInfo.MinBidPrice) + itemInfo.MinBidPrice = itemBidPrice; + else + itemBidPrice = std::min(itemInfo.MinBidPrice, itemBidPrice); + + // Set minimum buyout price if item has buyout + if (entry->buyout) { - ItemTemplate const * prototype = item->GetTemplate(); - if (prototype) - { - ++config.SameItemInfo[item->GetEntry()].ItemCount; // Structure constructor will make sure Element are correctly initialized if entry is created here. - config.SameItemInfo[item->GetEntry()].BuyPrice = config.SameItemInfo[item->GetEntry()].BuyPrice + (itr->second->buyout / item->GetCount()); - config.SameItemInfo[item->GetEntry()].BidPrice = config.SameItemInfo[item->GetEntry()].BidPrice + (itr->second->startbid / item->GetCount()); - if (itr->second->buyout != 0) - { - if (itr->second->buyout / item->GetCount() < config.SameItemInfo[item->GetEntry()].MinBuyPrice) - config.SameItemInfo[item->GetEntry()].MinBuyPrice = itr->second->buyout / item->GetCount(); - else if (config.SameItemInfo[item->GetEntry()].MinBuyPrice == 0) - config.SameItemInfo[item->GetEntry()].MinBuyPrice = itr->second->buyout / item->GetCount(); - } - if (itr->second->startbid / item->GetCount() < config.SameItemInfo[item->GetEntry()].MinBidPrice) - config.SameItemInfo[item->GetEntry()].MinBidPrice = itr->second->startbid / item->GetCount(); - else if (config.SameItemInfo[item->GetEntry()].MinBidPrice == 0) - config.SameItemInfo[item->GetEntry()].MinBidPrice = itr->second->startbid / item->GetCount(); + // Update item entry's count and total buyout prices + // This can be used later to determine the prices and chances to buyout + uint32 itemBuyPrice = entry->buyout / item->GetCount(); + itemInfo.TotalBuyPrice = itemInfo.TotalBuyPrice + itemBuyPrice; + itemInfo.BuyItemCount++; - if (!entry->owner) - { + if (!itemInfo.MinBuyPrice) + itemInfo.MinBuyPrice = itemBuyPrice; + else + itemInfo.MinBuyPrice = std::min(itemInfo.MinBuyPrice, itemBuyPrice); + } - if (entry->bid != 0 && entry->bidder) // Add bid by player - { - config.CheckedEntry[entry->Id].LastExist = now; - config.CheckedEntry[entry->Id].AuctionId = entry->Id; - ++count; - } - } - else - { - if (entry->bid != 0) - { - if (entry->bidder) - { - config.CheckedEntry[entry->Id].LastExist = now; - config.CheckedEntry[entry->Id].AuctionId = entry->Id; - ++count; - } - } - else - { - config.CheckedEntry[entry->Id].LastExist = now; - config.CheckedEntry[entry->Id].AuctionId = entry->Id; - ++count; - } - } - } + // Add/update to EligibleItems if: + // has a bid by player or + // has no bids and not owned by bot + if ((entry->bid && entry->bidder) || (entry->owner && !entry->bid)) + { + config.EligibleItems[entry->Id].LastExist = now; + config.EligibleItems[entry->Id].AuctionId = entry->Id; + ++count; } } - TC_LOG_DEBUG("ahbot", "AHBot: %u items added to buyable vector for ah type: %u", count, config.GetHouseType()); + TC_LOG_DEBUG("ahbot", "AHBot: %u items added to buyable/biddable vector for ah type: %u", count, config.GetHouseType()); TC_LOG_DEBUG("ahbot", "AHBot: SameItemInfo size = %u", (uint32)config.SameItemInfo.size()); return count; } +// ahInfo can be NULL +bool AuctionBotBuyer::RollBuyChance(const BuyerItemInfo* ahInfo, const Item* item, const AuctionEntry* auction, uint32 /*bidPrice*/) +{ + if (!auction->buyout) + return false; + + uint32 itemBuyPrice = auction->buyout / item->GetCount(); + uint32 itemPrice = item->GetTemplate()->SellPrice ? item->GetTemplate()->SellPrice : GetVendorPrice(item->GetTemplate()->Quality); + // The AH cut needs to be added to the price, but we dont want a 100% chance to buy if the price is exactly AH default + itemPrice *= 1.4f; + + // This value is between 0 and 100 and is used directly as the chance to buy or bid + // Value equal or above 100 means 100% chance and value below 0 means 0% chance + float chance = 100 / sqrt(itemBuyPrice / float(itemPrice)); + + // If a player has bidded on item, have fifth of normal chance + if (auction->bidder) + chance = chance / 5; + + if (ahInfo) + { + float avgBuyPrice = ahInfo->TotalBuyPrice / float(ahInfo->BuyItemCount); + + TC_LOG_DEBUG("ahbot", "AHBot: buyout average: %.1f items with buyout: %u", avgBuyPrice, ahInfo->BuyItemCount); + + // If there are more than 5 items on AH of this entry, try weigh in the average buyout price + if (ahInfo->BuyItemCount > 5) + { + chance *= 1 / sqrt(itemBuyPrice / avgBuyPrice); + } + } + + // Add config weigh in for quality + chance *= GetChanceMultiplier(item->GetTemplate()->Quality) / 100.0f; + + float rand = frand(0, 100); + bool win = rand <= chance; + TC_LOG_DEBUG("ahbot", "AHBot: %s BUY! chance = %.2f, price = %u, buyprice = %u.", win ? "WIN" : "LOSE", chance, itemPrice, itemBuyPrice); + return win; +} + +// ahInfo can be NULL +bool AuctionBotBuyer::RollBidChance(const BuyerItemInfo* ahInfo, const Item* item, const AuctionEntry* auction, uint32 bidPrice) +{ + uint32 itemBidPrice = bidPrice / item->GetCount(); + uint32 itemPrice = item->GetTemplate()->SellPrice ? item->GetTemplate()->SellPrice : GetVendorPrice(item->GetTemplate()->Quality); + // The AH cut needs to be added to the price, but we dont want a 100% chance to buy if the price is exactly AH default + itemPrice *= 1.4f; + + // This value is between 0 and 100 and is used directly as the chance to buy or bid + // Value equal or above 100 means 100% chance and value below 0 means 0% chance + float chance = 100 / sqrt(itemBidPrice / float(itemPrice)); + + if (ahInfo) + { + float avgBidPrice = ahInfo->TotalBidPrice / float(ahInfo->BidItemCount); + + TC_LOG_DEBUG("ahbot", "AHBot: Bid average: %.1f biddable item count: %u", avgBidPrice, ahInfo->BidItemCount); + + // If there are more than 5 items on AH of this entry, try weigh in the average bid price + if (ahInfo->BidItemCount >= 5) + { + chance *= 1 / sqrt(itemBidPrice / avgBidPrice); + } + } + + // If a player has bidded on item, have fifth of normal chance + if (auction->bidder) + chance = chance / 5; + + // Add config weigh in for quality + chance *= GetChanceMultiplier(item->GetTemplate()->Quality) / 100.0f; + + float rand = frand(0, 100); + bool win = rand <= chance; + TC_LOG_DEBUG("ahbot", "AHBot: %s BID! chance = %.2f, price = %u, bidprice = %u.", win ? "WIN" : "LOSE", chance, itemPrice, itemBidPrice); + return win; +} + +// Removes items from EligibleItems that we shouldnt buy or bid on +// The last existed time on them should be older than now void AuctionBotBuyer::PrepareListOfEntry(BuyerConfiguration& config) { + // now - 5 seconds to leave out all old entries but keep the ones just updated a moment ago time_t now = time(nullptr) - 5; - for (CheckEntryMap::iterator itr = config.CheckedEntry.begin(); itr != config.CheckedEntry.end();) + for (CheckEntryMap::iterator itr = config.EligibleItems.begin(); itr != config.EligibleItems.end();) { - if (itr->second.LastExist < (now - 5)) - config.CheckedEntry.erase(itr++); + if (itr->second.LastExist < now) + config.EligibleItems.erase(itr++); else ++itr; } - TC_LOG_DEBUG("ahbot", "AHBot: CheckedEntry size = %u", (uint32)config.CheckedEntry.size()); + TC_LOG_DEBUG("ahbot", "AHBot: EligibleItems size = %u", (uint32)config.EligibleItems.size()); } -bool AuctionBotBuyer::IsBuyableEntry(uint32 buyoutPrice, double inGameBuyPrice, uint32 maxBuyablePrice, uint32 minBuyPrice, uint32 maxChance, uint32 chanceRatio) +// Tries to bid and buy items based on their prices and chances set in configs +void AuctionBotBuyer::BuyAndBidItems(BuyerConfiguration& config) { - double ratio = 0; - uint32 chance = 0; - - if (buyoutPrice <= minBuyPrice) - { - if (buyoutPrice <= maxBuyablePrice) - chance = maxChance; - else - { - - if (buyoutPrice > 0 && maxBuyablePrice > 0) - { - ratio = double(buyoutPrice) / double(maxBuyablePrice); - if (ratio < 10) - chance = maxChance - (ratio * maxChance / 10); - else - chance = 1; - } - } - } - else if (buyoutPrice <= inGameBuyPrice) - { - if (buyoutPrice <= maxBuyablePrice) - chance = maxChance / 5; - else - { - - if (buyoutPrice > 0 && maxBuyablePrice > 0) - { - ratio = double(buyoutPrice) / double(maxBuyablePrice); - if (ratio < 10) - chance = (maxChance / 5) - (ratio * maxChance / 50); - else - chance = 1; - } - } - } - else if (buyoutPrice <= maxBuyablePrice) - chance = maxChance / 10; - else - { - if (buyoutPrice > 0 && maxBuyablePrice > 0) - { - ratio = double(buyoutPrice) / double(maxBuyablePrice); - if (ratio < 10) - chance = (maxChance / 5) - (ratio* maxChance / 50); - else - chance = 0; - } - else - chance = 0; - } - - if (urand(1, chanceRatio) <= chance) - { - TC_LOG_DEBUG("ahbot", "AHBot: WIN BUY! Chance = %u, num = %u.", chance, chanceRatio); - return true; - } - else - { - TC_LOG_DEBUG("ahbot", "AHBot: LOOSE BUY! Chance = %u, num = %u.", chance, chanceRatio); - return false; - } -} - -bool AuctionBotBuyer::IsBidableEntry(uint32 bidPrice, double inGameBuyPrice, double maxBidablePrice, uint32 minBidPrice, uint32 maxChance, uint32 chanceRatio) -{ - double ratio = 0; - uint32 chance = 0; - - if (bidPrice <= minBidPrice) - { - if (inGameBuyPrice != 0 && bidPrice < inGameBuyPrice - (inGameBuyPrice / 30)) - chance = maxChance; - else - { - if (bidPrice < maxBidablePrice) - { - ratio = maxBidablePrice / bidPrice; - if (ratio < 3) - chance = maxChance / 500 * ratio; - else - chance = maxChance / 500; - } - } - } - else if (bidPrice < (inGameBuyPrice - (inGameBuyPrice / 30))) - chance = (maxChance / 10); - else - { - if (bidPrice < maxBidablePrice) - { - ratio = maxBidablePrice / bidPrice; - if (ratio < 4) - chance = maxChance / 1000 * ratio; - else - chance = maxChance / 1000; - } - } - - if (urand(1, chanceRatio) <= chance) - { - TC_LOG_DEBUG("ahbot", "AHBot: WIN BID! Chance = %u, num = %u.", chance, chanceRatio); - return true; - } - else - { - TC_LOG_DEBUG("ahbot", "AHBot: LOOSE BID! Chance = %u, num = %u.", chance, chanceRatio); - return false; - } -} - -void AuctionBotBuyer::PlaceBidToEntry(AuctionEntry* auction, uint32 bidPrice) -{ - TC_LOG_DEBUG("ahbot", "AHBot: Bid placed to entry %u, %.2fg", auction->Id, float(bidPrice) / 10000.0f); - auction->bid = bidPrice; -} - -void AuctionBotBuyer::BuyEntry(AuctionEntry* auction) -{ - TC_LOG_DEBUG("ahbot", "AHBot: Entry %u bought at %.2fg", auction->Id, float(auction->buyout) / 10000.0f); - auction->bid = auction->buyout; -} - -void AuctionBotBuyer::AddNewAuctionBuyerBotBid(BuyerConfiguration& config) -{ - AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(config.GetHouseType()); - - PrepareListOfEntry(config); - time_t now = time(nullptr); - uint32 buyCycles; - if (config.CheckedEntry.size() > sAuctionBotConfig->GetItemPerCycleBoost()) + AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(config.GetHouseType()); + CheckEntryMap& items = config.EligibleItems; + + // Max amount of items to buy or bid + uint32 cycles = sAuctionBotConfig->GetItemPerCycleNormal(); + if (items.size() > sAuctionBotConfig->GetItemPerCycleBoost()) { - buyCycles = sAuctionBotConfig->GetItemPerCycleBoost(); + // set more cycles if there is a huge influx of items + cycles = sAuctionBotConfig->GetItemPerCycleBoost(); TC_LOG_DEBUG("ahbot", "AHBot: Boost value used for Buyer! (if this happens often adjust both ItemsPerCycle in worldserver.conf)"); } - else - buyCycles = sAuctionBotConfig->GetItemPerCycleNormal(); - for (CheckEntryMap::iterator itr = config.CheckedEntry.begin(); itr != config.CheckedEntry.end();) + // Process items eligible to be bidded or bought + CheckEntryMap::iterator itr = items.begin(); + while (cycles && itr != items.end()) { AuctionEntry* auction = auctionHouse->GetAuction(itr->second.AuctionId); - if (!auction) // is auction not active now + if (!auction) { - TC_LOG_DEBUG("ahbot", "AHBot: Entry %u doesn't exists, perhaps bought already?", - itr->second.AuctionId); - - config.CheckedEntry.erase(itr++); + TC_LOG_DEBUG("ahbot", "AHBot: Entry %u doesn't exists, perhaps bought already?", itr->second.AuctionId); + items.erase(itr++); continue; } - if (itr->second.LastChecked != 0 && (now - itr->second.LastChecked) <= _checkInterval) + // Check if the item has been checked once before + // If it has been checked and it was recently, skip it + if (itr->second.LastChecked && (now - itr->second.LastChecked) <= _checkInterval) { TC_LOG_DEBUG("ahbot", "AHBot: In time interval wait for entry %u!", auction->Id); ++itr; continue; } - if (buyCycles == 0) - break; - - uint32 maxChance = 5000; - Item* item = sAuctionMgr->GetAItem(auction->itemGUIDLow); - if (!item) // auction item not accessible, possible auction in payment pending mode + if (!item) { - config.CheckedEntry.erase(itr++); + // auction item not accessible, possible auction in payment pending mode + items.erase(itr++); continue; } - ItemTemplate const* prototype = item->GetTemplate(); - - uint32 basePrice = sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYPRICE_BUYER) ? prototype->BuyPrice : prototype->SellPrice; - basePrice *= item->GetCount(); - - uint32 maxBuyablePrice = (basePrice * config.BuyerPriceRatio) / 100; - BuyerItemInfoMap::iterator sameItemItr = config.SameItemInfo.find(item->GetEntry()); - uint32 buyoutPrice = auction->buyout / item->GetCount(); - + // price to bid if bidding uint32 bidPrice; - uint32 bidPriceByItem; - uint32 minBidPrice; - uint32 minBuyPrice; if (auction->bid >= auction->startbid) { - bidPrice = auction->GetAuctionOutBid(); - bidPriceByItem = auction->bid / item->GetCount(); + // get bid price to outbid previous bidder + bidPrice = auction->bid + auction->GetAuctionOutBid(); } else { + // no previous bidders - use starting bid bidPrice = auction->startbid; - bidPriceByItem = auction->startbid / item->GetCount(); } - double inGameBuyPrice; - double inGameBidPrice; - if (sameItemItr == config.SameItemInfo.end()) - { - inGameBuyPrice = 0; - inGameBidPrice = 0; - minBidPrice = 0; - minBuyPrice = 0; - } - else - { - if (sameItemItr->second.ItemCount == 1) - maxBuyablePrice = maxBuyablePrice * 5; // if only one item exist can be bought if the price is high too. - inGameBuyPrice = sameItemItr->second.BuyPrice / sameItemItr->second.ItemCount; - inGameBidPrice = sameItemItr->second.BidPrice / sameItemItr->second.ItemCount; - minBidPrice = sameItemItr->second.MinBidPrice; - minBuyPrice = sameItemItr->second.MinBuyPrice; - } + const BuyerItemInfo* ahInfo = nullptr; + BuyerItemInfoMap::const_iterator sameItemItr = config.SameItemInfo.find(item->GetEntry()); + if (sameItemItr != config.SameItemInfo.end()) + ahInfo = &sameItemItr->second; - uint32 maxBidablePrice = maxBuyablePrice - (maxBuyablePrice / 30); // Max Bidable price defined to 70% of max buyable price + TC_LOG_DEBUG("ahbot", "AHBot: Rolling for AHentry %u:", auction->Id); - TC_LOG_DEBUG("ahbot", "AHBot: Auction added with data:"); - TC_LOG_DEBUG("ahbot", "AHBot: MaxPrice of Entry %u is %.1fg.", itr->second.AuctionId, double(maxBuyablePrice) / 10000.0); - TC_LOG_DEBUG("ahbot", "AHBot: GamePrice buy=%.1fg, bid=%.1fg.", inGameBuyPrice / 10000, inGameBidPrice / 10000); - TC_LOG_DEBUG("ahbot", "AHBot: Minimal price see in AH Buy=%ug, Bid=%ug.", - minBuyPrice / 10000, minBidPrice / 10000); - TC_LOG_DEBUG("ahbot", "AHBot: Actual Entry price, Buy=%ug, Bid=%ug.", buyoutPrice / 10000, bidPrice / 10000); + // Roll buy and bid chances + bool successBuy = RollBuyChance(ahInfo, item, auction, bidPrice); + bool successBid = RollBidChance(ahInfo, item, auction, bidPrice); - if (!auction->owner) // Original auction owner - maxChance = maxChance / 5; // if Owner is AHBot this mean player placed bid on this auction. We divide by 5 chance for AhBuyer to place bid on it. (This make more challenge than ignore entry) - if (auction->buyout != 0) // Is the item directly buyable? - { - if (IsBuyableEntry(buyoutPrice, inGameBuyPrice, maxBuyablePrice, minBuyPrice, maxChance, config.FactionChance)) - { - if (IsBidableEntry(bidPriceByItem, inGameBuyPrice, maxBidablePrice, minBidPrice, maxChance / 2, config.FactionChance)) - { - if (urand(0, 5) == 0) - PlaceBidToEntry(auction, bidPrice); - else - BuyEntry(auction); - } - else - BuyEntry(auction); - } - else if (IsBidableEntry(bidPriceByItem, inGameBuyPrice, maxBidablePrice, minBidPrice, maxChance / 2, config.FactionChance)) - PlaceBidToEntry(auction, bidPrice); - } - else if (IsBidableEntry(bidPriceByItem, inGameBuyPrice, maxBidablePrice, minBidPrice, maxChance, config.FactionChance)) - PlaceBidToEntry(auction, bidPrice); + // If roll bidding succesfully and bid price is above buyout -> buyout + // If roll for buying was successful but not for bid, buyout directly + // If roll bidding was also successful, buy the entry with 20% chance + // - Better bid than buy since the item is bought by bot if no player bids after + // Otherwise bid if roll for bid was successful + if ((auction->buyout && successBid && bidPrice >= auction->buyout) || + (successBuy && (!successBid || urand(1, 5) == 1))) + BuyEntry(auction, auctionHouse); // buyout + else if (successBid) + PlaceBidToEntry(auction, bidPrice); // bid itr->second.LastChecked = now; - --buyCycles; - + --cycles; ++itr; } + + // Clear not needed entries + config.SameItemInfo.clear(); } -bool AuctionBotBuyer::Update(AuctionHouseType houseType) +uint32 AuctionBotBuyer::GetVendorPrice(uint32 quality) { - if (sAuctionBotConfig->GetConfigBuyerEnabled(houseType)) + switch (quality) { - TC_LOG_DEBUG("ahbot", "AHBot: %s buying ...", AuctionBotConfig::GetHouseTypeName(houseType)); - if (GetBuyableEntry(_houseConfig[houseType]) > 0) - AddNewAuctionBuyerBotBid(_houseConfig[houseType]); - return true; + case ITEM_QUALITY_POOR: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_GRAY); + case ITEM_QUALITY_NORMAL: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_WHITE); + case ITEM_QUALITY_UNCOMMON: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_GREEN); + case ITEM_QUALITY_RARE: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_BLUE); + case ITEM_QUALITY_EPIC: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_PURPLE); + case ITEM_QUALITY_LEGENDARY: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_ORANGE); + case ITEM_QUALITY_ARTIFACT: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_YELLOW); + default: + return 1 * SILVER; } - - return false; +} + +uint32 AuctionBotBuyer::GetChanceMultiplier(uint32 quality) +{ + switch (quality) + { + case ITEM_QUALITY_POOR: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_GRAY); + case ITEM_QUALITY_NORMAL: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_WHITE); + case ITEM_QUALITY_UNCOMMON: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_GREEN); + case ITEM_QUALITY_RARE: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_BLUE); + case ITEM_QUALITY_EPIC: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_PURPLE); + case ITEM_QUALITY_LEGENDARY: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_ORANGE); + case ITEM_QUALITY_ARTIFACT: + return sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_YELLOW); + default: + return 100; + } +} + +// Buys the auction and does necessary actions to complete the buyout +void AuctionBotBuyer::BuyEntry(AuctionEntry* auction, AuctionHouseObject* auctionHouse) +{ + TC_LOG_DEBUG("ahbot", "AHBot: Entry %u bought at %.2fg", auction->Id, float(auction->buyout) / GOLD); + + SQLTransaction trans = CharacterDatabase.BeginTransaction(); + + // Send mail to previous bidder if any + if (auction->bidder) + sAuctionMgr->SendAuctionOutbiddedMail(auction, auction->buyout, NULL, trans); + + // Set bot as bidder and set new bid amount + auction->bidder = 0; + auction->bid = auction->buyout; + + // Mails must be under transaction control too to prevent data loss + sAuctionMgr->SendAuctionSalePendingMail(auction, trans); + sAuctionMgr->SendAuctionSuccessfulMail(auction, trans); + sAuctionMgr->SendAuctionWonMail(auction, trans); + + // Delete auction from DB + auction->DeleteFromDB(trans); + + // Remove auction item and auction from memory + sAuctionMgr->RemoveAItem(auction->itemGUIDLow); + auctionHouse->RemoveAuction(auction); + + // Run SQLs + CharacterDatabase.CommitTransaction(trans); +} + +// Bids on the auction and does the necessary actions for bidding +void AuctionBotBuyer::PlaceBidToEntry(AuctionEntry* auction, uint32 bidPrice) +{ + TC_LOG_DEBUG("ahbot", "AHBot: Bid placed to entry %u, %.2fg", auction->Id, float(bidPrice) / GOLD); + + SQLTransaction trans = CharacterDatabase.BeginTransaction(); + + // Send mail to previous bidder if any + if (auction->bidder) + sAuctionMgr->SendAuctionOutbiddedMail(auction, bidPrice, NULL, trans); + + // Set bot as bidder and set new bid amount + auction->bidder = 0; + auction->bid = bidPrice; + + // Update auction to DB + PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_AUCTION_BID); + stmt->setUInt32(0, auction->bidder); + stmt->setUInt32(1, auction->bid); + stmt->setUInt32(2, auction->Id); + trans->Append(stmt); + + // Run SQLs + CharacterDatabase.CommitTransaction(trans); } diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.h b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.h index bd8d6e46f0e..c030731cb40 100644 --- a/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.h +++ b/src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.h @@ -24,7 +24,7 @@ struct BuyerAuctionEval { - BuyerAuctionEval(): AuctionId(0), LastChecked(0), LastExist(0) {} + BuyerAuctionEval() : AuctionId(0), LastChecked(0), LastExist(0) { } uint32 AuctionId; time_t LastChecked; @@ -33,13 +33,14 @@ struct BuyerAuctionEval struct BuyerItemInfo { - BuyerItemInfo(): ItemCount(0), BuyPrice(0), BidPrice(0), MinBuyPrice(0), MinBidPrice(0) {} + BuyerItemInfo() : BidItemCount(0), BuyItemCount(0), MinBuyPrice(0), MinBidPrice(0), TotalBuyPrice(0), TotalBidPrice(0) { } - uint32 ItemCount; - double BuyPrice; - double BidPrice; + uint32 BidItemCount; + uint32 BuyItemCount; uint32 MinBuyPrice; uint32 MinBidPrice; + double TotalBuyPrice; + double TotalBidPrice; }; typedef std::map BuyerItemInfoMap; @@ -47,7 +48,7 @@ typedef std::map CheckEntryMap; struct BuyerConfiguration { - BuyerConfiguration(): FactionChance(3), BuyerEnabled(false), BuyerPriceRatio(100), _houseType(AUCTION_HOUSE_NEUTRAL) {} + BuyerConfiguration() : BuyerEnabled(false), _houseType(AUCTION_HOUSE_NEUTRAL) { } void Initialize(AuctionHouseType houseType) { @@ -57,10 +58,8 @@ struct BuyerConfiguration AuctionHouseType GetHouseType() const { return _houseType; } BuyerItemInfoMap SameItemInfo; - CheckEntryMap CheckedEntry; - uint32 FactionChance; + CheckEntryMap EligibleItems; bool BuyerEnabled; - uint32 BuyerPriceRatio; private: AuctionHouseType _houseType; @@ -78,19 +77,23 @@ public: bool Update(AuctionHouseType houseType) override; void LoadConfig(); - void AddNewAuctionBuyerBotBid(BuyerConfiguration& config); + void BuyAndBidItems(BuyerConfiguration& config); private: uint32 _checkInterval; BuyerConfiguration _houseConfig[MAX_AUCTION_HOUSE_TYPE]; void LoadBuyerValues(BuyerConfiguration& config); - bool IsBuyableEntry(uint32 buyoutPrice, double inGameBuyPrice, uint32 maxBuyablePrice, uint32 minBuyPrice, uint32 maxChance, uint32 chanceRatio); - bool IsBidableEntry(uint32 bidPrice, double inGameBuyPrice, double maxBidablePrice, uint32 minBidPrice, uint32 maxChance, uint32 chanceRatio); + + // ahInfo can be NULL + bool RollBuyChance(const BuyerItemInfo* ahInfo, const Item* item, const AuctionEntry* auction, uint32 bidPrice); + bool RollBidChance(const BuyerItemInfo* ahInfo, const Item* item, const AuctionEntry* auction, uint32 bidPrice); void PlaceBidToEntry(AuctionEntry* auction, uint32 bidPrice); - void BuyEntry(AuctionEntry* auction); + void BuyEntry(AuctionEntry* auction, AuctionHouseObject* auctionHouse); void PrepareListOfEntry(BuyerConfiguration& config); - uint32 GetBuyableEntry(BuyerConfiguration& config); + uint32 GetItemInformation(BuyerConfiguration& config); + uint32 GetVendorPrice(uint32 quality); + uint32 GetChanceMultiplier(uint32 quality); }; #endif diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 6a1d9706b30..33d824fac4b 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -3014,32 +3014,53 @@ AuctionHouseBot.Buyer.Horde.Enabled = 0 AuctionHouseBot.Buyer.Neutral.Enabled = 0 # -# AuctionHouseBot.BuyPrice.Buyer -# Description: Should the Buyer use BuyPrice or SellPrice to determine Bid Prices -# Default: 1 - (use BuyPrice) -# 0 - (use SellPrice) +# AuctionHouseBot.Buyer.Baseprice.QUALITY +# Description: Base sellprices in copper for non priced items for each quality. +# The default values are based on average item prices of each quality. +# Defaults: Gray 3504 +# White 5429 +# Green 21752 +# Blue 36463 +# Purple 87124 +# Orange 214347 +# Yellow 407406 -AuctionHouseBot.Buyer.Buyprice = 1 +AuctionHouseBot.Buyer.Baseprice.Gray = 3504 +AuctionHouseBot.Buyer.Baseprice.White = 5429 +AuctionHouseBot.Buyer.Baseprice.Green = 21752 +AuctionHouseBot.Buyer.Baseprice.Blue = 36463 +AuctionHouseBot.Buyer.Baseprice.Purple = 87124 +AuctionHouseBot.Buyer.Baseprice.Orange = 214347 +AuctionHouseBot.Buyer.Baseprice.Yellow = 407406 + +# +# AuctionHouseBot.Buyer.ChanceMultiplier.QUALITY +# Description: Multipliers for the buy/bid chances for each quality. 100 means the chance is 100% of the original, +# 1 would mean 1 % of the original and 200 would mean 200% of the original chance. +# Defaults: Gray 100 +# White 100 +# Green 100 +# Blue 100 +# Purple 100 +# Orange 100 +# Yellow 100 + +AuctionHouseBot.Buyer.ChanceMultiplier.Gray = 100 +AuctionHouseBot.Buyer.ChanceMultiplier.White = 100 +AuctionHouseBot.Buyer.ChanceMultiplier.Green = 100 +AuctionHouseBot.Buyer.ChanceMultiplier.Blue = 100 +AuctionHouseBot.Buyer.ChanceMultiplier.Purple = 100 +AuctionHouseBot.Buyer.ChanceMultiplier.Orange = 100 +AuctionHouseBot.Buyer.ChanceMultiplier.Yellow = 100 # # AuctionHouseBot.Buyer.Recheck.Interval -# Description: This specifies the time interval (in minutes) between two evaluations of the same selled item. -# The lesser this value is, the more chances you give for item to be bought by ahbot. +# Description: This specifies the time interval (in minutes) between two evaluations of the same sold item. +# The smaller this value is, the more chances you give for an item to be bought by ahbot. # Default: 20 (20min.) AuctionHouseBot.Buyer.Recheck.Interval = 20 -# -# AuctionHouseBot.Buyer.Alliance.Chance.Ratio -# Description: Chance ratio for the buyer to buy an item. Higher the value, lesser the probability -# Example: 3 (1 out of 3 change, that is, 33%). -# Default: 3 -# - -AuctionHouseBot.Buyer.Alliance.Chance.Ratio = 3 -AuctionHouseBot.Buyer.Horde.Chance.Ratio = 3 -AuctionHouseBot.Buyer.Neutral.Chance.Ratio = 3 - # ################################################################################################### From 03edeeb9d81728ed856d05cace9e264f0d0c37fc Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 7 Feb 2015 20:32:07 +0100 Subject: [PATCH 32/32] DB/Creature: Remove incorrect trigger flag --- sql/updates/world/2015_02_07_01_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2015_02_07_01_world.sql diff --git a/sql/updates/world/2015_02_07_01_world.sql b/sql/updates/world/2015_02_07_01_world.sql new file mode 100644 index 00000000000..742d833352e --- /dev/null +++ b/sql/updates/world/2015_02_07_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra`=0 WHERE `entry`=24938;