From 8f9ee58e633e0d886a9751f28cf788e17f00fb85 Mon Sep 17 00:00:00 2001 From: ille Date: Fri, 30 Nov 2012 18:53:13 +0100 Subject: [PATCH 1/9] scripts/gameobject: correct reset of gameobjects (cages/prisons), move command out of if statement --- src/server/scripts/Kalimdor/azuremyst_isle.cpp | 2 ++ src/server/scripts/Kalimdor/bloodmyst_isle.cpp | 2 +- .../scripts/Kalimdor/dustwallow_marsh.cpp | 2 +- .../scripts/Kalimdor/thousand_needles.cpp | 1 + src/server/scripts/Northrend/zuldrak.cpp | 2 +- src/server/scripts/Outland/nagrand.cpp | 6 ++---- src/server/scripts/Outland/netherstorm.cpp | 4 +--- src/server/scripts/World/go_scripts.cpp | 17 ++++++++++------- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp index 96e67c8de47..f7250114c2b 100644 --- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp @@ -584,6 +584,7 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (player->GetQuestStatus(QUEST_STRENGTH_ONE) == QUEST_STATUS_INCOMPLETE) { if (Creature* ravager = go->FindNearestCreature(NPC_DEATH_RAVAGER, 5.0f, true)) @@ -743,6 +744,7 @@ class go_bristlelimb_cage : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) { + go->SetGoState(GO_STATE_READY); if (player->GetQuestStatus(QUEST_THE_PROPHECY_OF_AKIDA) == QUEST_STATUS_INCOMPLETE) { if (Creature* capitive = go->FindNearestCreature(NPC_STILLPINE_CAPITIVE, 5.0f, true)) diff --git a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp index 339cd02c2e3..31d541e32a7 100644 --- a/src/server/scripts/Kalimdor/bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/bloodmyst_isle.cpp @@ -168,9 +168,9 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->SetGoState(GO_STATE_READY); if (Creature* stillpine = go->FindNearestCreature(NPC_PRINCESS_STILLPINE, 25, true)) { - go->SetGoState(GO_STATE_ACTIVE); stillpine->GetMotionMaster()->MovePoint(1, go->GetPositionX(), go->GetPositionY()-15, go->GetPositionZ()); player->CastedCreatureOrGO(NPC_PRINCESS_STILLPINE, 0, SPELL_OPENING_PRINCESS_STILLPINE_CREDIT); } diff --git a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp index 6ab9b653c5d..462f6666c01 100644 --- a/src/server/scripts/Kalimdor/dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/dustwallow_marsh.cpp @@ -758,9 +758,9 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (Creature* prisoner = go->FindNearestCreature(NPC_THERAMORE_PRISONER, 1.0f)) { - go->UseDoorOrButton(); if (player) player->KilledMonsterCredit(NPC_THERAMORE_PRISONER, 0); diff --git a/src/server/scripts/Kalimdor/thousand_needles.cpp b/src/server/scripts/Kalimdor/thousand_needles.cpp index 7667a8b312c..47916a83cc6 100644 --- a/src/server/scripts/Kalimdor/thousand_needles.cpp +++ b/src/server/scripts/Kalimdor/thousand_needles.cpp @@ -406,6 +406,7 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (player->GetQuestStatus(5151) == QUEST_STATUS_INCOMPLETE) { if (Creature* panther = go->FindNearestCreature(ENRAGED_PANTHER, 5, true)) diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index e5763e5baf6..c850719efdb 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -1402,12 +1402,12 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (player->GetQuestStatus(QUEST_OUR_ONLY_HOPE) == QUEST_STATUS_INCOMPLETE) { Creature* pGymerDummy = go->FindNearestCreature(NPC_GYMER_DUMMY, 20.0f); if (pGymerDummy) { - go->UseDoorOrButton(); player->KilledMonsterCredit(pGymerDummy->GetEntry(), pGymerDummy->GetGUID()); pGymerDummy->CastSpell(pGymerDummy, 55529, true); pGymerDummy->DisappearAndDie(); diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp index 0c9a60603f5..e2fbb457f35 100644 --- a/src/server/scripts/Outland/nagrand.cpp +++ b/src/server/scripts/Outland/nagrand.cpp @@ -388,11 +388,11 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->SetGoState(GO_STATE_READY); if (go->GetEntry() == GO_CORKIS_PRISON) { if (Creature* corki = go->FindNearestCreature(NPC_CORKI, 25, true)) { - go->SetGoState(GO_STATE_READY); corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()+5, go->GetPositionY(), go->GetPositionZ()); if (player) player->KilledMonsterCredit(NPC_CORKI_CREDIT_1, 0); @@ -403,7 +403,6 @@ public: { if (Creature* corki = go->FindNearestCreature(NPC_CORKI_2, 25, true)) { - go->SetGoState(GO_STATE_READY); corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()-5, go->GetPositionY(), go->GetPositionZ()); if (player) player->KilledMonsterCredit(NPC_CORKI_2, 0); @@ -414,7 +413,6 @@ public: { if (Creature* corki = go->FindNearestCreature(NPC_CORKI_3, 25, true)) { - go->SetGoState(GO_STATE_READY); corki->GetMotionMaster()->MovePoint(1, go->GetPositionX()+4, go->GetPositionY(), go->GetPositionZ()); if (player) player->KilledMonsterCredit(NPC_CORKI_CREDIT_3, 0); @@ -683,12 +681,12 @@ class go_warmaul_prison : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE) return false; if (Creature* prisoner = go->FindNearestCreature(NPC_MAGHAR_PRISONER, 5.0f)) { - go->UseDoorOrButton(); player->KilledMonsterCredit(NPC_MAGHAR_PRISONER, 0); prisoner->AI()->Talk(SAY_FREE, player->GetGUID()); diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp index eaea4960712..a0ebf17a730 100644 --- a/src/server/scripts/Outland/netherstorm.cpp +++ b/src/server/scripts/Outland/netherstorm.cpp @@ -1053,12 +1053,10 @@ class go_captain_tyralius_prison : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (Creature* tyralius = go->FindNearestCreature(NPC_CAPTAIN_TYRALIUS, 1.0f)) { - go->UseDoorOrButton(); - player->KilledMonsterCredit(NPC_CAPTAIN_TYRALIUS, 0); - tyralius->AI()->Talk(SAY_FREE); tyralius->DespawnOrUnsummon(8000); } diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index dac67b566e3..ea4a55c34b7 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -309,6 +309,7 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); int Random = rand() % (sizeof(NpcPrisonEntry) / sizeof(uint32)); if (Creature* creature = player->SummonCreature(NpcPrisonEntry[Random], go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), go->GetAngle(player), @@ -358,6 +359,7 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); int Random = rand() % (sizeof(NpcStasisEntry) / sizeof(uint32)); player->SummonCreature(NpcStasisEntry[Random], go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), go->GetAngle(player), @@ -729,9 +731,9 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (Creature* pNearestPrisoner = go->FindNearestCreature(NPC_SCOURGE_PRISONER, 5.0f, true)) { - go->SetGoState(GO_STATE_ACTIVE); player->KilledMonsterCredit(NPC_SCOURGE_PRISONER, pNearestPrisoner->GetGUID()); pNearestPrisoner->DisappearAndDie(); } @@ -811,6 +813,7 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); Creature* pPrisoner = go->FindNearestCreature(NPC_EBON_BLADE_PRISONER_HUMAN, 5.0f, true); if (!pPrisoner) { @@ -1047,6 +1050,7 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (player->GetQuestStatus(QUEST_PRISONERS_OF_WYRMSKULL) != QUEST_STATUS_INCOMPLETE) return true; @@ -1094,12 +1098,12 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (player->GetQuestStatus(QUEST_OH_NOES_THE_TADPOLES) == QUEST_STATUS_INCOMPLETE) { Creature* pTadpole = go->FindNearestCreature(NPC_WINTERFIN_TADPOLE, 1.0f); if (pTadpole) { - go->UseDoorOrButton(); pTadpole->DisappearAndDie(); player->KilledMonsterCredit(NPC_WINTERFIN_TADPOLE, 0); //FIX: Summon minion tadpole @@ -1229,13 +1233,12 @@ class go_gjalerbron_cage : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE) || (player->GetTeamId() == TEAM_HORDE && player->GetQuestStatus(QUEST_HORDE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE)) { if (Creature* prisoner = go->FindNearestCreature(NPC_GJALERBRON_PRISONER, 5.0f)) { - go->UseDoorOrButton(); - if (player) player->KilledMonsterCredit(NPC_GJALERBRON_PRISONER, 0); @@ -1258,6 +1261,7 @@ class go_large_gjalerbron_cage : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE) || (player->GetTeamId() == TEAM_HORDE && player->GetQuestStatus(QUEST_HORDE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE)) { @@ -1265,7 +1269,6 @@ class go_large_gjalerbron_cage : public GameObjectScript GetCreatureListWithEntryInGrid(prisonerList, go, NPC_GJALERBRON_PRISONER, INTERACTION_DISTANCE); for (std::list::const_iterator itr = prisonerList.begin(); itr != prisonerList.end(); ++itr) { - go->UseDoorOrButton(); player->KilledMonsterCredit(NPC_GJALERBRON_PRISONER, (*itr)->GetGUID()); (*itr)->DespawnOrUnsummon(6000); (*itr)->AI()->Talk(SAY_FREE); @@ -1293,13 +1296,13 @@ class go_veil_skith_cage : public GameObjectScript bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(); if (player->GetQuestStatus(QUEST_MISSING_FRIENDS) == QUEST_STATUS_INCOMPLETE) { std::list childrenList; GetCreatureListWithEntryInGrid(childrenList, go, NPC_CAPTIVE_CHILD, INTERACTION_DISTANCE); for (std::list::const_iterator itr = childrenList.begin(); itr != childrenList.end(); ++itr) { - go->UseDoorOrButton(); player->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetGUID()); (*itr)->DespawnOrUnsummon(5000); (*itr)->GetMotionMaster()->MovePoint(1, go->GetPositionX()+5, go->GetPositionY(), go->GetPositionZ()); @@ -1330,10 +1333,10 @@ public: bool OnGossipHello(Player* player, GameObject* go) { + go->UseDoorOrButton(10); if (!player->HasAura(SPELL_RECENT_MEDITATION)) if (player->GetQuestStatus(QUEST_THE_CLEANSING_HORDE) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(QUEST_THE_CLEANSING_ALLIANCE) == QUEST_STATUS_INCOMPLETE) { - go->UseDoorOrButton(10); player->CastSpell(player, SPELL_CLEANSING_SOUL); player->SetStandState(UNIT_STAND_STATE_SIT); } From 007461b6d8112a36b792aef990e05a94c192637d Mon Sep 17 00:00:00 2001 From: Gacko Date: Thu, 27 Dec 2012 22:11:25 +0100 Subject: [PATCH 2/9] DB/Quest: The Shadow's Vault questline. Thx @Exodius --- .../2012_12_27_00_world_the_shadows_vault.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sql/updates/world/2012_12_27_00_world_the_shadows_vault.sql diff --git a/sql/updates/world/2012_12_27_00_world_the_shadows_vault.sql b/sql/updates/world/2012_12_27_00_world_the_shadows_vault.sql new file mode 100644 index 00000000000..96d176d6d1b --- /dev/null +++ b/sql/updates/world/2012_12_27_00_world_the_shadows_vault.sql @@ -0,0 +1,18 @@ +-- If He Cannot Be Turned (12896 + 12897) +UPDATE `quest_template` SET `PrevQuestId`=12893 WHERE `Id` IN (12896,12897); +-- Get the Key (12949) +UPDATE `quest_template` SET `PrevQuestId`=12939 WHERE `Id`=12949; +-- Leave Our Mark (12995) +UPDATE `quest_template` SET `PrevQuestId`=13084 WHERE `Id`=12995; +-- Vandalizing Jotunheim (13084) / Crush Dem Vrykuls! (12992) +UPDATE `quest_template` SET `NextQuestId`=13085,`ExclusiveGroup`=-13085 WHERE `Id` IN (13084,12992); +-- Intelligence Gathering (12838) / From Their Corpses, Rise! (12813) +UPDATE `quest_template` SET `PrevQuestId`=12807 WHERE `Id` IN (12838,12813); +-- No Fly Zone (12815) +UPDATE `quest_template` SET `PrevQuestId`=12814 WHERE `Id`=12815; +-- Eliminate the Competition (12955) +UPDATE `quest_template` SET `PrevQuestId`=12938 WHERE `Id`=12955; +-- Deep in the Bowels of The Underhalls (13042) +UPDATE `quest_template` SET `PrevQuestId`=12999 WHERE `Id`=13042; +-- Battle at Valhalas: Fallen Heroes (13214) +UPDATE `quest_template` SET `PrevQuestId`=13213 WHERE `Id`=13214; From a29ec679aed4bc186f70cd3bba1a07226f5de39f Mon Sep 17 00:00:00 2001 From: Gacko Date: Thu, 27 Dec 2012 22:15:30 +0100 Subject: [PATCH 3/9] Rename SQL --- ...hadows_vault.sql => 2012_12_27_04_world_the_shadows_vault.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql/updates/world/{2012_12_27_00_world_the_shadows_vault.sql => 2012_12_27_04_world_the_shadows_vault.sql} (100%) diff --git a/sql/updates/world/2012_12_27_00_world_the_shadows_vault.sql b/sql/updates/world/2012_12_27_04_world_the_shadows_vault.sql similarity index 100% rename from sql/updates/world/2012_12_27_00_world_the_shadows_vault.sql rename to sql/updates/world/2012_12_27_04_world_the_shadows_vault.sql From 8272affe92fce922ffc898930bcc8d1ce8476bf3 Mon Sep 17 00:00:00 2001 From: secharles Date: Fri, 28 Dec 2012 01:05:30 +0000 Subject: [PATCH 4/9] Script/Commands: New command: lookup spell id #spellid Command to allow to know spell names based on id Example: lookup spell id 686: 686 - [Shadow Bolt rank 1 esES] [know] Closes #8800 Signed-off-by: Nay --- .../world/2012_12_28_00_world_command.sql | 3 + src/server/scripts/Commands/cs_lookup.cpp | 99 ++++++++++++++++++- 2 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/2012_12_28_00_world_command.sql diff --git a/sql/updates/world/2012_12_28_00_world_command.sql b/sql/updates/world/2012_12_28_00_world_command.sql new file mode 100644 index 00000000000..6de970d3b81 --- /dev/null +++ b/sql/updates/world/2012_12_28_00_world_command.sql @@ -0,0 +1,3 @@ +DELETE FROM `command` WHERE `name` LIKE 'lookup spell id'; +INSERT INTO `command` (`name`, `security`, `help`) VALUES +('lookup spell id', '3', 'Syntax: .lookup spell id #spellid\n\nLooks up a spell by #spellid, and returns the match with its spell name.'); diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index c265cd1faa5..13ee91884d0 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -46,6 +46,14 @@ public: { "email", SEC_GAMEMASTER, true, &HandleLookupPlayerEmailCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; + + static ChatCommand lookupSpellCommandTable[] = + { + { "id", SEC_ADMINISTRATOR, true, &HandleLookupSpellIdCommand, "", NULL }, + { "", SEC_ADMINISTRATOR, true, &HandleLookupSpellCommand, "", NULL }, + { NULL, 0, false, NULL, "", NULL } + }; + static ChatCommand lookupCommandTable[] = { { "area", SEC_MODERATOR, true, &HandleLookupAreaCommand, "", NULL }, @@ -58,13 +66,14 @@ public: { "quest", SEC_ADMINISTRATOR, true, &HandleLookupQuestCommand, "", NULL }, { "player", SEC_GAMEMASTER, true, NULL, "", lookupPlayerCommandTable }, { "skill", SEC_ADMINISTRATOR, true, &HandleLookupSkillCommand, "", NULL }, - { "spell", SEC_ADMINISTRATOR, true, &HandleLookupSpellCommand, "", NULL }, + { "spell", SEC_ADMINISTRATOR, true, NULL, "", lookupSpellCommandTable }, { "taxinode", SEC_ADMINISTRATOR, true, &HandleLookupTaxiNodeCommand, "", NULL }, { "tele", SEC_MODERATOR, true, &HandleLookupTeleCommand, "", NULL }, { "title", SEC_GAMEMASTER, true, &HandleLookupTitleCommand, "", NULL }, { "map", SEC_ADMINISTRATOR, true, &HandleLookupMapCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; + static ChatCommand commandTable[] = { { "lookup", SEC_ADMINISTRATOR, true, NULL, "", lookupCommandTable }, @@ -943,6 +952,94 @@ public: return true; } + static bool HandleLookupSpellIdCommand(ChatHandler* handler, char const* args) + { + if (!*args) + return false; + + // can be NULL at console call + Player* target = handler->getSelectedPlayer(); + + uint32 id = atoi((char*)args); + + bool found = false; + uint32 count = 0; + uint32 maxResults = 1; + + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id); + if (spellInfo) + { + int locale = handler->GetSessionDbcLocale(); + std::string name = spellInfo->SpellName[locale]; + if (name.empty()) + { + handler->SendSysMessage(LANG_COMMAND_NOSPELLFOUND); + return true; + } + + if (locale < TOTAL_LOCALES) + { + if (maxResults && count++ == maxResults) + { + handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults); + return true; + } + + bool known = target && target->HasSpell(id); + bool learn = (spellInfo->Effects[0].Effect == SPELL_EFFECT_LEARN_SPELL); + + SpellInfo const* learnSpellInfo = sSpellMgr->GetSpellInfo(spellInfo->Effects[0].TriggerSpell); + + uint32 talentCost = GetTalentSpellCost(id); + + bool talent = (talentCost > 0); + bool passive = spellInfo->IsPassive(); + bool active = target && target->HasAura(id); + + // unit32 used to prevent interpreting uint8 as char at output + // find rank of learned spell for learning spell, or talent rank + uint32 rank = talentCost ? talentCost : learn && learnSpellInfo ? learnSpellInfo->GetRank() : spellInfo->GetRank(); + + // send spell in "id - [name, rank N] [talent] [passive] [learn] [known]" format + std::ostringstream ss; + if (handler->GetSession()) + ss << id << " - |cffffffff|Hspell:" << id << "|h[" << name; + else + ss << id << " - " << name; + + // include rank in link name + if (rank) + ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank; + + if (handler->GetSession()) + ss << ' ' << localeNames[locale] << "]|h|r"; + else + ss << ' ' << localeNames[locale]; + + if (talent) + ss << handler->GetTrinityString(LANG_TALENT); + if (passive) + ss << handler->GetTrinityString(LANG_PASSIVE); + if (learn) + ss << handler->GetTrinityString(LANG_LEARN); + if (known) + ss << handler->GetTrinityString(LANG_KNOWN); + if (active) + ss << handler->GetTrinityString(LANG_ACTIVE); + + handler->SendSysMessage(ss.str().c_str()); + + if (!found) + found = true; + } + } + + if (!found) + handler->SendSysMessage(LANG_COMMAND_NOSPELLFOUND); + + return true; + } + static bool HandleLookupTaxiNodeCommand(ChatHandler* handler, const char * args) { if (!*args) From 95152d57539064d8278e323899290cba2fb2b0cd Mon Sep 17 00:00:00 2001 From: Trista Date: Fri, 28 Dec 2012 04:11:06 +0200 Subject: [PATCH 5/9] Core/Vehicles: Closes all issues with seats for real (finishing and fixing previous change) * Author, Joschiwald, all credits to him please * DieSide should be not calculated with basepoints for these auras, thiss correctly finish previous fix 452e585f7b4b2bc349d7386b0c42cf296f0ab4c2 from Horn * What it fixes, FL, XT, Demolishers, Accessories, Not being able to leave vehicle and so many more can't track them sorry --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 745a7baab8f..eade0b5e8b5 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -454,6 +454,11 @@ int32 AuraEffect::CalculateAmount(Unit* caster) // custom amount calculations go here switch (GetAuraType()) { + // Control vehicle auras should not get m_amount sum out of basepoints and DieSide calculated together, + // but only from basepoints. Only such aura case fow now so handle it here. + case SPELL_AURA_CONTROL_VEHICLE: + m_amount = m_baseAmount; + break; // crowd control auras case SPELL_AURA_MOD_CONFUSE: case SPELL_AURA_MOD_FEAR: @@ -3199,7 +3204,6 @@ void AuraEffect::HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 m if (apply) { - // correct amount is already calculated adding one more -1 meant calculated amount - 1 caster->_EnterVehicle(target->GetVehicleKit(), m_amount, aurApp); } else From e04275984e4dfab5686bdaf388b6067b947eb348 Mon Sep 17 00:00:00 2001 From: Faq Date: Fri, 28 Dec 2012 02:24:01 +0000 Subject: [PATCH 6/9] Core/Spells: fix self-damage caused by Glyph of Chains of Ice. oMadMano Closes #7270 Closes #644 Signed-off-by: Nay --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 4 ++-- src/server/game/Spells/SpellMgr.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index eade0b5e8b5..131d84c7fc1 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -457,8 +457,8 @@ int32 AuraEffect::CalculateAmount(Unit* caster) // Control vehicle auras should not get m_amount sum out of basepoints and DieSide calculated together, // but only from basepoints. Only such aura case fow now so handle it here. case SPELL_AURA_CONTROL_VEHICLE: - m_amount = m_baseAmount; - break; + m_amount = m_baseAmount; + break; // crowd control auras case SPELL_AURA_MOD_CONFUSE: case SPELL_AURA_MOD_FEAR: diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 9714e2bc09b..e1cbb975399 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3619,6 +3619,9 @@ void SpellMgr::LoadDbcDataCorrections() case 40167: // Introspection spellInfo->Attributes |= SPELL_ATTR0_NEGATIVE_1; break; + case 45524: // Chains of Ice + spellInfo->EffectImplicitTargetA[EFFECT_2] = 0; + break; case 2378: // Minor Fortitude spellInfo->manaCost = 0; spellInfo->manaPerSecond = 0; From 718313f1b8aeb9d1b0ef9776387a68550aae9188 Mon Sep 17 00:00:00 2001 From: ZxBiohazardZx Date: Fri, 28 Dec 2012 16:11:04 +0100 Subject: [PATCH 7/9] DB/Startups: apparently we had some creatures with wrong movementtype... --- sql/updates/world/2012_12_28_01_world_misc.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2012_12_28_01_world_misc.sql diff --git a/sql/updates/world/2012_12_28_01_world_misc.sql b/sql/updates/world/2012_12_28_01_world_misc.sql new file mode 100644 index 00000000000..44501390d9e --- /dev/null +++ b/sql/updates/world/2012_12_28_01_world_misc.sql @@ -0,0 +1,2 @@ +-- fix startups +UPDATE `creature` SET `MovementType`=0 WHERE `id`=3939 AND `guid` BETWEEN 48823 AND 45831; From 52f7a7b224151f67320e3e069816ba66494a6b1b Mon Sep 17 00:00:00 2001 From: nelgalno Date: Fri, 28 Dec 2012 16:17:20 +0100 Subject: [PATCH 8/9] DB/Quest: add some SAI for The Moment of Truth (10201) Closes #1108 --- sql/updates/world/2012_12_28_02_world_sai.sql | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sql/updates/world/2012_12_28_02_world_sai.sql diff --git a/sql/updates/world/2012_12_28_02_world_sai.sql b/sql/updates/world/2012_12_28_02_world_sai.sql new file mode 100644 index 00000000000..7a518449fde --- /dev/null +++ b/sql/updates/world/2012_12_28_02_world_sai.sql @@ -0,0 +1,32 @@ +-- And Now, the Moment of Truth (10201) quest fix +SET @ENTRY := 19606; +-- texts +DELETE FROM `creature_ai_texts` WHERE `entry` IN (-247,-246,-245,-244); +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Someone come read this wanted poster to Grek. Grek can't read.",12,0,100,18,0,6941,"Grek1"), +(@ENTRY,1,0,"Grek get a drink.",12,0,100,7,0,0,"Grek2"), +(@ENTRY,2,0,"Grek try!",12,0,100,5,0,0,"Grek - Quest1"), +(@ENTRY,3,0,"This oil no good for Grek! What Grek look like to you, some weakling in robes?",12,0,100,6,0,0,"Grek - Quest2"); +-- gossips +UPDATE `creature_template` SET `gossip_menu_id` = 7999 WHERE `entry` = @ENTRY; -- YTDB value (should work fine until someone can sniff/verify) +DELETE FROM `gossip_menu` WHERE `entry`=7999 AND `text_id`=9853; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (7999,9853); -- YTDB value (should work fine until someone can sniff/verify) +DELETE FROM `gossip_menu_option` WHERE `menu_id`=7999; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(7999,0,0,"Grek, will you try out this new weapon oil Rakoria made?",1,1,0,0,0,0,''); -- YTDB value (should work fine until someone can sniff/verify) +-- SAI +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` = @ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,1,0,100,0,120000,120000,120000,120000,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Grek - OOC - Say Grek1"), +(@ENTRY,0,1,0,1,0,100,0,420000,420000,420000,420000,1,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Grek - OOC - Say Grek2"), +(@ENTRY,0,2,3,62,0,100,0,7999,0,0,0,1,2,3000,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Grek - On gossip select - Say Quest1"), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,"Grek - Link - Close gossip"), +(@ENTRY,0,4,5,52,0,100,0,2,@ENTRY,0,0,1,3,10000,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Grek - On text_over - Say Quest2"), +(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,"Grek - Link - Give quest credit"); +-- conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=7999 AND `SourceEntry`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,7999,0,0,0,9,0,10201,0,0,0,0,'',"Display gossip only if quest taken"); From 4065b17c94859a7e7e312c0db621d9990095201e Mon Sep 17 00:00:00 2001 From: Trista Date: Fri, 28 Dec 2012 16:21:29 +0100 Subject: [PATCH 9/9] DB/Quest: remove deprecated version of Ally of the Netherwing Closes #2841 --- sql/updates/world/2012_12_28_03_world_disables.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/2012_12_28_03_world_disables.sql diff --git a/sql/updates/world/2012_12_28_03_world_disables.sql b/sql/updates/world/2012_12_28_03_world_disables.sql new file mode 100644 index 00000000000..017e3aea8c1 --- /dev/null +++ b/sql/updates/world/2012_12_28_03_world_disables.sql @@ -0,0 +1,3 @@ +-- Remove deprecated older version of "Ally of the Netherwing" +DELETE FROM `disables` WHERE `entry`=10871 AND `sourceType`=1; +INSERT INTO `disables` (`sourceType`,`entry`,`comment`) VALUES (1,10871, 'Deprecated quest - Ally of the Netherwing (first version - when it was for alliance only, reworked after 3.3.0)');